@incodetech/web 0.0.0-dev-20260608-c8c427ca → 0.0.0-dev-20260609-11ba3e8a

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.
Files changed (211) hide show
  1. package/dist/ae-signature/ae-signature.es.js +15 -13
  2. package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
  3. package/dist/antifraud/antifraud.es.js +22 -19
  4. package/dist/authentication/authentication.es.js +42 -33
  5. package/dist/autoFocusTitle-DM6PvgcP.js +29 -0
  6. package/dist/{back-horizontal-hint-DsPhKbR4.js → back-horizontal-hint-BXYix0Wj.js} +26 -26
  7. package/dist/back-tutorial-vb1MxlrT.js +14597 -0
  8. package/dist/{back-vertical-hint-BFJbYQrX.js → back-vertical-hint-DNSh6JNH.js} +27 -27
  9. package/dist/backdevicelottie-HypPqBz7.js +16690 -0
  10. package/dist/base.css +5 -0
  11. package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
  12. package/dist/bottomSheet-BuzqNQtG.js +39 -0
  13. package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
  14. package/dist/button-B-qlr4iI.js +35 -0
  15. package/dist/checkbox-CTPETqo5.js +96 -0
  16. package/dist/consent/consent.es.js +75 -64
  17. package/dist/countrySelector-CzyuaDIs.js +60 -0
  18. package/dist/cpf-ocr/cpf-ocr.es.js +2 -2
  19. package/dist/cpfOcr-DQVs3r8N.js +92 -0
  20. package/dist/cpfOcr-WNklFuxT.js +2 -0
  21. package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -17
  22. package/dist/curp-validation/curp-validation.es.js +246 -211
  23. package/dist/customFields-B4MqqDI6.js +140 -0
  24. package/dist/customWatchlist-Dfqw1DQP.js +36 -0
  25. package/dist/dateInputComposed-BsPQHG5o.js +1 -0
  26. package/dist/dateInputComposed-DY97tQVK.js +69 -0
  27. package/dist/defineProperty-mefzVtTv.js +39 -0
  28. package/dist/document-capture/document-capture.es.js +2 -2
  29. package/dist/documentCapture-BE78MIlR.js +876 -0
  30. package/dist/documentCapture-BVfNZL29.js +2 -0
  31. package/dist/dropdownComposed-BF4L-7mJ.js +380 -0
  32. package/dist/dropdownComposed-mvHuRFHn.js +1 -0
  33. package/dist/dynamicForms-BYGGAQoc.js +352 -0
  34. package/dist/ekyb/ekyb.es.js +2 -2
  35. package/dist/ekybModule-BUPX0QhW.js +2 -0
  36. package/dist/ekybModule-CkTXu-4u.js +279 -0
  37. package/dist/ekyc/ekyc.es.js +2 -2
  38. package/dist/ekycModule-BWsVX39d.js +257 -0
  39. package/dist/ekycModule-DNDPqvUc.js +2 -0
  40. package/dist/electronic-signature/electronic-signature.es.js +2 -2
  41. package/dist/electronic-signature-BJSyzex9.js +426 -0
  42. package/dist/email/email.es.js +198 -78
  43. package/dist/emailInput-BHp4Apt4.js +39 -0
  44. package/dist/errorIcon-B0rmz3rw.js +26 -0
  45. package/dist/expiredId-C105HVKv.js +85 -0
  46. package/dist/extensibility-DJwVxojG.js +3070 -0
  47. package/dist/extensibility.es.js +26 -26
  48. package/dist/face-match/face-match.es.js +2 -2
  49. package/dist/faceMatch-BOFGxzzx.js +343 -0
  50. package/dist/faceMatch-CDMcFQwR.js +2 -0
  51. package/dist/field-comparison/field-comparison.es.js +2 -2
  52. package/dist/fieldComparison-BMDmQ8eA.js +88 -0
  53. package/dist/fieldComparison-Z1NleSxD.js +2 -0
  54. package/dist/{flip-animation-CuQ57qTn.js → flip-animation-BGRvygw9.js} +4221 -4221
  55. package/dist/flow/flow.es.js +597 -493
  56. package/dist/flow/styles.css +0 -8
  57. package/dist/{front-horizontal-hint-CKm7PnmS.js → front-horizontal-hint-CLSU0iVo.js} +70 -70
  58. package/dist/{front-vertical-hint-CLHC2qoH.js → front-vertical-hint-BWq-yWQ8.js} +81 -81
  59. package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
  60. package/dist/geolocation/geolocation.es.js +485 -395
  61. package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
  62. package/dist/governmentValidation/governmentValidation.es.js +145 -64
  63. package/dist/governmentValidation/styles.css +0 -36
  64. package/dist/homeScreen-BsEYyiDB.js +264 -0
  65. package/dist/hooks-BtgmGvba.js +149 -0
  66. package/dist/i18n-gTHArCl9.js +2971 -0
  67. package/dist/icons-DKY3xDkf.js +360 -0
  68. package/dist/id/id.es.js +565 -413
  69. package/dist/id-laser-h-DX8UbVNH.js +467 -0
  70. package/dist/id-laser-v-DhnHdjlB.js +490 -0
  71. package/dist/id-tutorial-lj4iKtYT.js +13165 -0
  72. package/dist/id-verification/id-verification.es.js +21 -18
  73. package/dist/idOcr-BS77o1VC.js +123 -0
  74. package/dist/identity-reuse/identity-reuse.es.js +168 -130
  75. package/dist/incode-logo-57XFniXU.js +4 -0
  76. package/dist/incodeComponent-CDJxFZvS.js +63 -0
  77. package/dist/incodeModule-DkA_yd0X.js +13 -0
  78. package/dist/index.es.js +16 -14
  79. package/dist/inputComposed-5V2nLTqH.js +99 -0
  80. package/dist/inputComposed-BPOYwUBl.js +1 -0
  81. package/dist/loadingIcon-DN62ugKs.js +148 -0
  82. package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
  83. package/dist/mandatoryConsent-DP189TUn.js +107 -0
  84. package/dist/modal-B5QeulDu.js +153 -0
  85. package/dist/modal.hooks-C7K9k_pY.js +202 -0
  86. package/dist/numberedStep-DVAyTPv1.js +13 -0
  87. package/dist/optionAccessibleLabel-Czc2YC8z.js +202 -0
  88. package/dist/otpInput-2IQ-JCK8.js +195 -0
  89. package/dist/page-BZ-0eNWq.js +71 -0
  90. package/dist/{passport-horizontal-hint-C_le0HVU.js → passport-horizontal-hint-DfVsf4Cc.js} +55 -55
  91. package/dist/{passport-tutorial-BYN4T_TE.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
  92. package/dist/{passport-vertical-hint-H-pyICSv.js → passport-vertical-hint-DVxbTyQp.js} +49 -49
  93. package/dist/pdf-BZA70WbM.js +22398 -0
  94. package/dist/pdfViewer-Dr63sJ51.js +114 -0
  95. package/dist/phone/phone.es.js +214 -87
  96. package/dist/phoneInputComposed-D_IabWKJ.js +12142 -0
  97. package/dist/processing-B_u8wUB7.js +8 -0
  98. package/dist/qe-signature/qe-signature.es.js +15 -13
  99. package/dist/radioGroupComposed-DwYW-Ld-.js +215 -0
  100. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2099 -859
  101. package/dist/registerIncodeElement-BJJGzVdq.js +11 -0
  102. package/dist/requiredLabelHint-DEadtiwx.js +17 -0
  103. package/dist/richText-C7GUm0WL.js +3153 -0
  104. package/dist/rolldown-runtime--E5BIlTp.js +33 -0
  105. package/dist/selfie/selfie.es.js +54 -42
  106. package/dist/selfieTutorial-CtruLyO2.js +2689 -0
  107. package/dist/signature/signature.es.js +765 -406
  108. package/dist/snackbar-Dz9crm39.js +16 -0
  109. package/dist/spinner-BfBIZkDQ.js +42 -0
  110. package/dist/spinner-DEDtE7Pz.js +1 -0
  111. package/dist/statusPage-CVCoieyd.js +28 -0
  112. package/dist/successIcon-rmzr-pxu.js +30 -0
  113. package/dist/tabs--UMd6eEB.js +103 -0
  114. package/dist/transitionSpinner-CWhGcr7c.js +26 -0
  115. package/dist/{tutorial-QzQ536BL.js → tutorial-Jv0noW4z.js} +832 -578
  116. package/dist/types/extensibility.d.ts +3 -1
  117. package/dist/types/index.d.ts +13 -4
  118. package/dist/typography-BK4AmfKX.js +45 -0
  119. package/dist/uiConfig-sgEkFuuA.js +25 -0
  120. package/dist/useModuleLoader-CuhHtmgr.js +670 -0
  121. package/dist/vendor-preact-BH7vOa2r.js +957 -0
  122. package/dist/verificationResult-CJ0JyV6A.js +64 -0
  123. package/dist/verifiedByIncode-8QBn-kgZ.js +103 -0
  124. package/dist/watchlist/watchlist.es.js +31 -26
  125. package/dist/watchlistForBusiness-RZcnjVDb.js +80 -0
  126. package/dist/workflow/styles.css +0 -8
  127. package/dist/workflow/workflow.es.js +251 -209
  128. package/package.json +4 -2
  129. package/dist/aligndevicelottie-D8KsO77t.js +0 -12757
  130. package/dist/autoFocusTitle-BpYdaSUM.js +0 -16
  131. package/dist/back-tutorial-DhSE2FJo.js +0 -14585
  132. package/dist/backdevicelottie-CJWGVMdw.js +0 -16678
  133. package/dist/blurdevicelottie-Dxt2deEB.js +0 -15939
  134. package/dist/bottomSheet-QrpyatOD.js +0 -31
  135. package/dist/browser-ponyfill-Crda_c5R.js +0 -299
  136. package/dist/button-DcCUEn2n.js +0 -24
  137. package/dist/checkbox-DCCzBAuF.js +0 -86
  138. package/dist/countrySelector-CJ8egQ4C.js +0 -58
  139. package/dist/cpfOcr-Db06i-Lm.js +0 -2
  140. package/dist/cpfOcr-FixhUeMQ.js +0 -79
  141. package/dist/customFields-C1G9xHNX.js +0 -125
  142. package/dist/customWatchlist-IKEblz7u.js +0 -31
  143. package/dist/dateInputComposed-Cg8BvYSK.js +0 -1
  144. package/dist/dateInputComposed-Ddd7HLyM.js +0 -58
  145. package/dist/defineProperty-xczUyn-m.js +0 -39
  146. package/dist/documentCapture-D9I7FjGe.js +0 -2
  147. package/dist/documentCapture-b61wlala.js +0 -765
  148. package/dist/dropdownComposed-B4U0AIak.js +0 -1
  149. package/dist/dropdownComposed-CS2pyn-g.js +0 -293
  150. package/dist/dynamicForms-tYQog0kw.js +0 -298
  151. package/dist/ekybModule-C33C4JES.js +0 -237
  152. package/dist/ekybModule-LON6G2Bz.js +0 -2
  153. package/dist/ekycModule-BJOgtTAh.js +0 -225
  154. package/dist/ekycModule-BSf_DIG7.js +0 -2
  155. package/dist/electronic-signature-OdgTyso4.js +0 -406
  156. package/dist/emailInput-CU7mLB21.js +0 -37
  157. package/dist/errorIcon-DpHzAoAo.js +0 -24
  158. package/dist/expiredId-nfVAZgTL.js +0 -70
  159. package/dist/extensibility-BbNy3mVG.js +0 -2602
  160. package/dist/faceMatch-BIila4kf.js +0 -2
  161. package/dist/faceMatch-DJ7Mqujx.js +0 -206
  162. package/dist/fieldComparison-D2RSFYl-.js +0 -84
  163. package/dist/fieldComparison-DbUyouFd.js +0 -2
  164. package/dist/frontdevicelottie-65Vyfpff.js +0 -17302
  165. package/dist/glaredevicelottie-BEyaqtc6.js +0 -14466
  166. package/dist/homeScreen-CyPddxWl.js +0 -227
  167. package/dist/hooks-MxHtZWTS.js +0 -112
  168. package/dist/i18n-Kzzvkz94.js +0 -2019
  169. package/dist/icons-9I5g9-_1.js +0 -292
  170. package/dist/id-laser-h-iCPbFixz.js +0 -467
  171. package/dist/id-laser-v-CNzwliP2.js +0 -483
  172. package/dist/id-tutorial-CF4nO4oX.js +0 -13153
  173. package/dist/idOcr-DlMLMDqa.js +0 -97
  174. package/dist/incode-logo-DX016usY.js +0 -4
  175. package/dist/incodeComponent-BoFhgK7G.js +0 -50
  176. package/dist/incodeModule-BiCoAJ5k.js +0 -13
  177. package/dist/inputComposed-DAEey9xm.js +0 -94
  178. package/dist/inputComposed-eS4B0Mkh.js +0 -1
  179. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  180. package/dist/lottie_light-DLqSnziX.js +0 -4419
  181. package/dist/mandatoryConsent-DNz2jZ43.js +0 -98
  182. package/dist/modal-ZqAhwiRF.js +0 -135
  183. package/dist/modal.hooks-LdusROLW.js +0 -126
  184. package/dist/numberedStep-CdLWASwL.js +0 -11
  185. package/dist/optionAccessibleLabel-DcygPaME.js +0 -140
  186. package/dist/otpInput-C4pk4BJU.js +0 -157
  187. package/dist/page-DA3R7q0J.js +0 -69
  188. package/dist/pdf-51QeiFSx.js +0 -14967
  189. package/dist/pdfViewer-rKzTHket.js +0 -64
  190. package/dist/phoneInputComposed-CjAxk2Gj.js +0 -11230
  191. package/dist/processing-DPktVde2.js +0 -6
  192. package/dist/radioGroupComposed-DRRxVk9Z.js +0 -178
  193. package/dist/registerIncodeElement-BHWOwdSS.js +0 -7
  194. package/dist/requiredLabelHint-B6FN3v88.js +0 -13
  195. package/dist/richText-6pIbydcz.js +0 -1973
  196. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  197. package/dist/selfieTutorial-Yo9AlUoT.js +0 -2677
  198. package/dist/snackbar-CQiiWO4p.js +0 -14
  199. package/dist/spinner-B4dcie2T.js +0 -1
  200. package/dist/spinner-CKnjVHxw.js +0 -39
  201. package/dist/statusPage-B8b3Jg6N.js +0 -28
  202. package/dist/successIcon-SlKgTSty.js +0 -28
  203. package/dist/tabs-D7lGst3Q.js +0 -78
  204. package/dist/transitionSpinner-Di3bOyOu.js +0 -17
  205. package/dist/typography-CxjaknHN.js +0 -28
  206. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  207. package/dist/useModuleLoader-Bqs7fglI.js +0 -517
  208. package/dist/vendor-preact-D6SntenC.js +0 -958
  209. package/dist/verificationResult-DhT3hH1b.js +0 -90
  210. package/dist/verifiedByIncode-DpbxzO0y.js +0 -101
  211. package/dist/watchlistForBusiness-CRXVbH4l.js +0 -75
@@ -1,4419 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-CYMK-g2i.js";
2
- //#region ../../node_modules/.pnpm/lottie-web@5.13.0/node_modules/lottie-web/build/player/lottie_light.js
3
- var t = /* @__PURE__ */ e(((e, t) => {
4
- typeof document < "u" && typeof navigator < "u" && (function(n, r) {
5
- typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.lottie = r());
6
- })(e, (function() {
7
- var n = "http://www.w3.org/2000/svg", r = "", i = !1, a = -999999, o = function(e) {
8
- i = !!e;
9
- }, s = function() {
10
- return i;
11
- }, c = function(e) {
12
- r = e;
13
- }, l = function() {
14
- return r;
15
- };
16
- function u(e) {
17
- return document.createElement(e);
18
- }
19
- function d(e, t) {
20
- var n, r = e.length, i;
21
- for (n = 0; n < r; n += 1) for (var a in i = e[n].prototype, i) Object.prototype.hasOwnProperty.call(i, a) && (t.prototype[a] = i[a]);
22
- }
23
- function f(e) {
24
- function t() {}
25
- return t.prototype = e, t;
26
- }
27
- var p = function() {
28
- function e(e) {
29
- this.audios = [], this.audioFactory = e, this._volume = 1, this._isMuted = !1;
30
- }
31
- return e.prototype = {
32
- addAudio: function(e) {
33
- this.audios.push(e);
34
- },
35
- pause: function() {
36
- var e, t = this.audios.length;
37
- for (e = 0; e < t; e += 1) this.audios[e].pause();
38
- },
39
- resume: function() {
40
- var e, t = this.audios.length;
41
- for (e = 0; e < t; e += 1) this.audios[e].resume();
42
- },
43
- setRate: function(e) {
44
- var t, n = this.audios.length;
45
- for (t = 0; t < n; t += 1) this.audios[t].setRate(e);
46
- },
47
- createAudio: function(e) {
48
- return this.audioFactory ? this.audioFactory(e) : window.Howl ? new window.Howl({ src: [e] }) : {
49
- isPlaying: !1,
50
- play: function() {
51
- this.isPlaying = !0;
52
- },
53
- seek: function() {
54
- this.isPlaying = !1;
55
- },
56
- playing: function() {},
57
- rate: function() {},
58
- setVolume: function() {}
59
- };
60
- },
61
- setAudioFactory: function(e) {
62
- this.audioFactory = e;
63
- },
64
- setVolume: function(e) {
65
- this._volume = e, this._updateVolume();
66
- },
67
- mute: function() {
68
- this._isMuted = !0, this._updateVolume();
69
- },
70
- unmute: function() {
71
- this._isMuted = !1, this._updateVolume();
72
- },
73
- getVolume: function() {
74
- return this._volume;
75
- },
76
- _updateVolume: function() {
77
- var e, t = this.audios.length;
78
- for (e = 0; e < t; e += 1) this.audios[e].volume(this._volume * (this._isMuted ? 0 : 1));
79
- }
80
- }, function() {
81
- return new e();
82
- };
83
- }(), m = function() {
84
- function e(e, t) {
85
- var n = 0, r = [], i;
86
- switch (e) {
87
- case "int16":
88
- case "uint8c":
89
- i = 1;
90
- break;
91
- default:
92
- i = 1.1;
93
- break;
94
- }
95
- for (n = 0; n < t; n += 1) r.push(i);
96
- return r;
97
- }
98
- function t(t, n) {
99
- return t === "float32" ? new Float32Array(n) : t === "int16" ? new Int16Array(n) : t === "uint8c" ? new Uint8ClampedArray(n) : e(t, n);
100
- }
101
- return typeof Uint8ClampedArray == "function" && typeof Float32Array == "function" ? t : e;
102
- }();
103
- function h(e) {
104
- return Array.apply(null, { length: e });
105
- }
106
- function g(e) {
107
- "@babel/helpers - typeof";
108
- return g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
109
- return typeof e;
110
- } : function(e) {
111
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
112
- }, g(e);
113
- }
114
- var _ = !0, v = null, y = null, b = "", x = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), S = Math.pow, C = Math.sqrt, w = Math.floor, T = Math.min, E = {};
115
- (function() {
116
- var e = /* @__PURE__ */ "abs.acos.acosh.asin.asinh.atan.atanh.atan2.ceil.cbrt.expm1.clz32.cos.cosh.exp.floor.fround.hypot.imul.log.log1p.log2.log10.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh.trunc.E.LN10.LN2.LOG10E.LOG2E.PI.SQRT1_2.SQRT2".split("."), t, n = e.length;
117
- for (t = 0; t < n; t += 1) E[e[t]] = Math[e[t]];
118
- })(), E.random = Math.random, E.abs = function(e) {
119
- if (g(e) === "object" && e.length) {
120
- var t = h(e.length), n, r = e.length;
121
- for (n = 0; n < r; n += 1) t[n] = Math.abs(e[n]);
122
- return t;
123
- }
124
- return Math.abs(e);
125
- };
126
- var D = 150, O = Math.PI / 180, k = .5519;
127
- function A(e, t, n, r) {
128
- this.type = e, this.currentTime = t, this.totalTime = n, this.direction = r < 0 ? -1 : 1;
129
- }
130
- function j(e, t) {
131
- this.type = e, this.direction = t < 0 ? -1 : 1;
132
- }
133
- function M(e, t, n, r) {
134
- this.type = e, this.currentLoop = n, this.totalLoops = t, this.direction = r < 0 ? -1 : 1;
135
- }
136
- function N(e, t, n) {
137
- this.type = e, this.firstFrame = t, this.totalFrames = n;
138
- }
139
- function P(e, t) {
140
- this.type = e, this.target = t;
141
- }
142
- function F(e, t) {
143
- this.type = "renderFrameError", this.nativeError = e, this.currentTime = t;
144
- }
145
- function ee(e) {
146
- this.type = "configError", this.nativeError = e;
147
- }
148
- var I = function() {
149
- var e = 0;
150
- return function() {
151
- return e += 1, b + "__lottie_element_" + e;
152
- };
153
- }();
154
- function te(e, t, n) {
155
- var r, i, a, o = Math.floor(e * 6), s = e * 6 - o, c = n * (1 - t), l = n * (1 - s * t), u = n * (1 - (1 - s) * t);
156
- switch (o % 6) {
157
- case 0:
158
- r = n, i = u, a = c;
159
- break;
160
- case 1:
161
- r = l, i = n, a = c;
162
- break;
163
- case 2:
164
- r = c, i = n, a = u;
165
- break;
166
- case 3:
167
- r = c, i = l, a = n;
168
- break;
169
- case 4:
170
- r = u, i = c, a = n;
171
- break;
172
- case 5:
173
- r = n, i = c, a = l;
174
- break;
175
- default: break;
176
- }
177
- return [
178
- r,
179
- i,
180
- a
181
- ];
182
- }
183
- function ne(e, t, n) {
184
- var r = Math.max(e, t, n), i = Math.min(e, t, n), a = r - i, o, s = r === 0 ? 0 : a / r, c = r / 255;
185
- switch (r) {
186
- case i:
187
- o = 0;
188
- break;
189
- case e:
190
- o = t - n + a * (t < n ? 6 : 0), o /= 6 * a;
191
- break;
192
- case t:
193
- o = n - e + a * 2, o /= 6 * a;
194
- break;
195
- case n:
196
- o = e - t + a * 4, o /= 6 * a;
197
- break;
198
- default: break;
199
- }
200
- return [
201
- o,
202
- s,
203
- c
204
- ];
205
- }
206
- function re(e, t) {
207
- var n = ne(e[0] * 255, e[1] * 255, e[2] * 255);
208
- return n[1] += t, n[1] > 1 ? n[1] = 1 : n[1] <= 0 && (n[1] = 0), te(n[0], n[1], n[2]);
209
- }
210
- function ie(e, t) {
211
- var n = ne(e[0] * 255, e[1] * 255, e[2] * 255);
212
- return n[2] += t, n[2] > 1 ? n[2] = 1 : n[2] < 0 && (n[2] = 0), te(n[0], n[1], n[2]);
213
- }
214
- function ae(e, t) {
215
- var n = ne(e[0] * 255, e[1] * 255, e[2] * 255);
216
- return n[0] += t / 360, n[0] > 1 ? --n[0] : n[0] < 0 && (n[0] += 1), te(n[0], n[1], n[2]);
217
- }
218
- (function() {
219
- var e = [], t, n;
220
- for (t = 0; t < 256; t += 1) n = t.toString(16), e[t] = n.length === 1 ? "0" + n : n;
221
- return function(t, n, r) {
222
- return t < 0 && (t = 0), n < 0 && (n = 0), r < 0 && (r = 0), "#" + e[t] + e[n] + e[r];
223
- };
224
- })();
225
- var oe = function(e) {
226
- _ = !!e;
227
- }, se = function() {
228
- return _;
229
- }, ce = function(e) {
230
- v = e;
231
- }, le = function() {
232
- return v;
233
- }, ue = function() {
234
- return y;
235
- }, de = function(e) {
236
- D = e;
237
- }, fe = function() {
238
- return D;
239
- }, pe = function(e) {
240
- b = e;
241
- };
242
- function L(e) {
243
- return document.createElementNS(n, e);
244
- }
245
- function R(e) {
246
- "@babel/helpers - typeof";
247
- return R = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
248
- return typeof e;
249
- } : function(e) {
250
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
251
- }, R(e);
252
- }
253
- var z = function() {
254
- var e = 1, t = [], n, r, i = {
255
- onmessage: function() {},
256
- postMessage: function(e) {
257
- n({ data: e });
258
- }
259
- }, a = { postMessage: function(e) {
260
- i.onmessage({ data: e });
261
- } };
262
- function o(e) {
263
- if (window.Worker && window.Blob && s()) {
264
- var t = new Blob(["var _workerSelf = self; self.onmessage = ", e.toString()], { type: "text/javascript" }), r = URL.createObjectURL(t);
265
- return new Worker(r);
266
- }
267
- return n = e, i;
268
- }
269
- function c() {
270
- r || (r = o(function(e) {
271
- function t() {
272
- function e(t, n) {
273
- var o, s, c = t.length, l, u, d, f;
274
- for (s = 0; s < c; s += 1) if (o = t[s], "ks" in o && !o.completed) {
275
- if (o.completed = !0, o.hasMask) {
276
- var m = o.masksProperties;
277
- for (u = m.length, l = 0; l < u; l += 1) if (m[l].pt.k.i) a(m[l].pt.k);
278
- else for (f = m[l].pt.k.length, d = 0; d < f; d += 1) m[l].pt.k[d].s && a(m[l].pt.k[d].s[0]), m[l].pt.k[d].e && a(m[l].pt.k[d].e[0]);
279
- }
280
- o.ty === 0 ? (o.layers = r(o.refId, n), e(o.layers, n)) : o.ty === 4 ? i(o.shapes) : o.ty === 5 && p(o);
281
- }
282
- }
283
- function t(t, n) {
284
- if (t) {
285
- var i = 0, a = t.length;
286
- for (i = 0; i < a; i += 1) t[i].t === 1 && (t[i].data.layers = r(t[i].data.refId, n), e(t[i].data.layers, n));
287
- }
288
- }
289
- function n(e, t) {
290
- for (var n = 0, r = t.length; n < r;) {
291
- if (t[n].id === e) return t[n];
292
- n += 1;
293
- }
294
- return null;
295
- }
296
- function r(e, t) {
297
- var r = n(e, t);
298
- return r ? r.layers.__used ? JSON.parse(JSON.stringify(r.layers)) : (r.layers.__used = !0, r.layers) : null;
299
- }
300
- function i(e) {
301
- var t, n = e.length, r, o;
302
- for (t = n - 1; t >= 0; --t) if (e[t].ty === "sh") if (e[t].ks.k.i) a(e[t].ks.k);
303
- else for (o = e[t].ks.k.length, r = 0; r < o; r += 1) e[t].ks.k[r].s && a(e[t].ks.k[r].s[0]), e[t].ks.k[r].e && a(e[t].ks.k[r].e[0]);
304
- else e[t].ty === "gr" && i(e[t].it);
305
- }
306
- function a(e) {
307
- var t, n = e.i.length;
308
- for (t = 0; t < n; t += 1) e.i[t][0] += e.v[t][0], e.i[t][1] += e.v[t][1], e.o[t][0] += e.v[t][0], e.o[t][1] += e.v[t][1];
309
- }
310
- function o(e, t) {
311
- var n = t ? t.split(".") : [
312
- 100,
313
- 100,
314
- 100
315
- ];
316
- return e[0] > n[0] ? !0 : n[0] > e[0] ? !1 : e[1] > n[1] ? !0 : n[1] > e[1] ? !1 : e[2] > n[2] ? !0 : n[2] > e[2] ? !1 : null;
317
- }
318
- var s = function() {
319
- var e = [
320
- 4,
321
- 4,
322
- 14
323
- ];
324
- function t(e) {
325
- var t = e.t.d;
326
- e.t.d = { k: [{
327
- s: t,
328
- t: 0
329
- }] };
330
- }
331
- function n(e) {
332
- var n, r = e.length;
333
- for (n = 0; n < r; n += 1) e[n].ty === 5 && t(e[n]);
334
- }
335
- return function(t) {
336
- if (o(e, t.v) && (n(t.layers), t.assets)) {
337
- var r, i = t.assets.length;
338
- for (r = 0; r < i; r += 1) t.assets[r].layers && n(t.assets[r].layers);
339
- }
340
- };
341
- }(), c = function() {
342
- var e = [
343
- 4,
344
- 7,
345
- 99
346
- ];
347
- return function(t) {
348
- if (t.chars && !o(e, t.v)) {
349
- var n, r = t.chars.length;
350
- for (n = 0; n < r; n += 1) {
351
- var a = t.chars[n];
352
- a.data && a.data.shapes && (i(a.data.shapes), a.data.ip = 0, a.data.op = 99999, a.data.st = 0, a.data.sr = 1, a.data.ks = {
353
- p: {
354
- k: [0, 0],
355
- a: 0
356
- },
357
- s: {
358
- k: [100, 100],
359
- a: 0
360
- },
361
- a: {
362
- k: [0, 0],
363
- a: 0
364
- },
365
- r: {
366
- k: 0,
367
- a: 0
368
- },
369
- o: {
370
- k: 100,
371
- a: 0
372
- }
373
- }, t.chars[n].t || (a.data.shapes.push({ ty: "no" }), a.data.shapes[0].it.push({
374
- p: {
375
- k: [0, 0],
376
- a: 0
377
- },
378
- s: {
379
- k: [100, 100],
380
- a: 0
381
- },
382
- a: {
383
- k: [0, 0],
384
- a: 0
385
- },
386
- r: {
387
- k: 0,
388
- a: 0
389
- },
390
- o: {
391
- k: 100,
392
- a: 0
393
- },
394
- sk: {
395
- k: 0,
396
- a: 0
397
- },
398
- sa: {
399
- k: 0,
400
- a: 0
401
- },
402
- ty: "tr"
403
- })));
404
- }
405
- }
406
- };
407
- }(), l = function() {
408
- var e = [
409
- 5,
410
- 7,
411
- 15
412
- ];
413
- function t(e) {
414
- var t = e.t.p;
415
- typeof t.a == "number" && (t.a = {
416
- a: 0,
417
- k: t.a
418
- }), typeof t.p == "number" && (t.p = {
419
- a: 0,
420
- k: t.p
421
- }), typeof t.r == "number" && (t.r = {
422
- a: 0,
423
- k: t.r
424
- });
425
- }
426
- function n(e) {
427
- var n, r = e.length;
428
- for (n = 0; n < r; n += 1) e[n].ty === 5 && t(e[n]);
429
- }
430
- return function(t) {
431
- if (o(e, t.v) && (n(t.layers), t.assets)) {
432
- var r, i = t.assets.length;
433
- for (r = 0; r < i; r += 1) t.assets[r].layers && n(t.assets[r].layers);
434
- }
435
- };
436
- }(), u = function() {
437
- var e = [
438
- 4,
439
- 1,
440
- 9
441
- ];
442
- function t(e) {
443
- var n, r = e.length, i, a;
444
- for (n = 0; n < r; n += 1) if (e[n].ty === "gr") t(e[n].it);
445
- else if (e[n].ty === "fl" || e[n].ty === "st") if (e[n].c.k && e[n].c.k[0].i) for (a = e[n].c.k.length, i = 0; i < a; i += 1) e[n].c.k[i].s && (e[n].c.k[i].s[0] /= 255, e[n].c.k[i].s[1] /= 255, e[n].c.k[i].s[2] /= 255, e[n].c.k[i].s[3] /= 255), e[n].c.k[i].e && (e[n].c.k[i].e[0] /= 255, e[n].c.k[i].e[1] /= 255, e[n].c.k[i].e[2] /= 255, e[n].c.k[i].e[3] /= 255);
446
- else e[n].c.k[0] /= 255, e[n].c.k[1] /= 255, e[n].c.k[2] /= 255, e[n].c.k[3] /= 255;
447
- }
448
- function n(e) {
449
- var n, r = e.length;
450
- for (n = 0; n < r; n += 1) e[n].ty === 4 && t(e[n].shapes);
451
- }
452
- return function(t) {
453
- if (o(e, t.v) && (n(t.layers), t.assets)) {
454
- var r, i = t.assets.length;
455
- for (r = 0; r < i; r += 1) t.assets[r].layers && n(t.assets[r].layers);
456
- }
457
- };
458
- }(), d = function() {
459
- var e = [
460
- 4,
461
- 4,
462
- 18
463
- ];
464
- function t(e) {
465
- var n, r = e.length, i, a;
466
- for (n = r - 1; n >= 0; --n) if (e[n].ty === "sh") if (e[n].ks.k.i) e[n].ks.k.c = e[n].closed;
467
- else for (a = e[n].ks.k.length, i = 0; i < a; i += 1) e[n].ks.k[i].s && (e[n].ks.k[i].s[0].c = e[n].closed), e[n].ks.k[i].e && (e[n].ks.k[i].e[0].c = e[n].closed);
468
- else e[n].ty === "gr" && t(e[n].it);
469
- }
470
- function n(e) {
471
- var n, r, i = e.length, a, o, s, c;
472
- for (r = 0; r < i; r += 1) {
473
- if (n = e[r], n.hasMask) {
474
- var l = n.masksProperties;
475
- for (o = l.length, a = 0; a < o; a += 1) if (l[a].pt.k.i) l[a].pt.k.c = l[a].cl;
476
- else for (c = l[a].pt.k.length, s = 0; s < c; s += 1) l[a].pt.k[s].s && (l[a].pt.k[s].s[0].c = l[a].cl), l[a].pt.k[s].e && (l[a].pt.k[s].e[0].c = l[a].cl);
477
- }
478
- n.ty === 4 && t(n.shapes);
479
- }
480
- }
481
- return function(t) {
482
- if (o(e, t.v) && (n(t.layers), t.assets)) {
483
- var r, i = t.assets.length;
484
- for (r = 0; r < i; r += 1) t.assets[r].layers && n(t.assets[r].layers);
485
- }
486
- };
487
- }();
488
- function f(n) {
489
- n.__complete ||= (u(n), s(n), c(n), l(n), d(n), e(n.layers, n.assets), t(n.chars, n.assets), !0);
490
- }
491
- function p(e) {
492
- e.t.a.length === 0 && "m" in e.t.p;
493
- }
494
- var m = {};
495
- return m.completeData = f, m.checkColors = u, m.checkChars = c, m.checkPathProperties = l, m.checkShapes = d, m.completeLayers = e, m;
496
- }
497
- if (a.dataManager ||= t(), a.assetLoader ||= function() {
498
- function e(e) {
499
- var t = e.getResponseHeader("content-type");
500
- return t && e.responseType === "json" && t.indexOf("json") !== -1 || e.response && R(e.response) === "object" ? e.response : e.response && typeof e.response == "string" ? JSON.parse(e.response) : e.responseText ? JSON.parse(e.responseText) : null;
501
- }
502
- function t(t, n, r, i) {
503
- var a, o = new XMLHttpRequest();
504
- try {
505
- o.responseType = "json";
506
- } catch {}
507
- o.onreadystatechange = function() {
508
- if (o.readyState === 4) if (o.status === 200) a = e(o), r(a);
509
- else try {
510
- a = e(o), r(a);
511
- } catch (e) {
512
- i && i(e);
513
- }
514
- };
515
- try {
516
- o.open([
517
- "G",
518
- "E",
519
- "T"
520
- ].join(""), t, !0);
521
- } catch {
522
- o.open([
523
- "G",
524
- "E",
525
- "T"
526
- ].join(""), n + "/" + t, !0);
527
- }
528
- o.send();
529
- }
530
- return { load: t };
531
- }(), e.data.type === "loadAnimation") a.assetLoader.load(e.data.path, e.data.fullPath, function(t) {
532
- a.dataManager.completeData(t), a.postMessage({
533
- id: e.data.id,
534
- payload: t,
535
- status: "success"
536
- });
537
- }, function() {
538
- a.postMessage({
539
- id: e.data.id,
540
- status: "error"
541
- });
542
- });
543
- else if (e.data.type === "complete") {
544
- var n = e.data.animation;
545
- a.dataManager.completeData(n), a.postMessage({
546
- id: e.data.id,
547
- payload: n,
548
- status: "success"
549
- });
550
- } else e.data.type === "loadData" && a.assetLoader.load(e.data.path, e.data.fullPath, function(t) {
551
- a.postMessage({
552
- id: e.data.id,
553
- payload: t,
554
- status: "success"
555
- });
556
- }, function() {
557
- a.postMessage({
558
- id: e.data.id,
559
- status: "error"
560
- });
561
- });
562
- }), r.onmessage = function(e) {
563
- var n = e.data, r = n.id, i = t[r];
564
- t[r] = null, n.status === "success" ? i.onComplete(n.payload) : i.onError && i.onError();
565
- });
566
- }
567
- function l(n, r) {
568
- e += 1;
569
- var i = "processId_" + e;
570
- return t[i] = {
571
- onComplete: n,
572
- onError: r
573
- }, i;
574
- }
575
- function u(e, t, n) {
576
- c();
577
- var i = l(t, n);
578
- r.postMessage({
579
- type: "loadAnimation",
580
- path: e,
581
- fullPath: window.location.origin + window.location.pathname,
582
- id: i
583
- });
584
- }
585
- function d(e, t, n) {
586
- c();
587
- var i = l(t, n);
588
- r.postMessage({
589
- type: "loadData",
590
- path: e,
591
- fullPath: window.location.origin + window.location.pathname,
592
- id: i
593
- });
594
- }
595
- function f(e, t, n) {
596
- c();
597
- var i = l(t, n);
598
- r.postMessage({
599
- type: "complete",
600
- animation: e,
601
- id: i
602
- });
603
- }
604
- return {
605
- loadAnimation: u,
606
- loadData: d,
607
- completeAnimation: f
608
- };
609
- }(), me = function() {
610
- var e = function() {
611
- var e = u("canvas");
612
- e.width = 1, e.height = 1;
613
- var t = e.getContext("2d");
614
- return t.fillStyle = "rgba(0,0,0,0)", t.fillRect(0, 0, 1, 1), e;
615
- }();
616
- function t() {
617
- this.loadedAssets += 1, this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null);
618
- }
619
- function n() {
620
- this.loadedFootagesCount += 1, this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null);
621
- }
622
- function r(e, t, n) {
623
- var r = "";
624
- if (e.e) r = e.p;
625
- else if (t) {
626
- var i = e.p;
627
- i.indexOf("images/") !== -1 && (i = i.split("/")[1]), r = t + i;
628
- } else r = n, r += e.u ? e.u : "", r += e.p;
629
- return r;
630
- }
631
- function i(e) {
632
- var t = 0, n = setInterval(function() {
633
- (e.getBBox().width || t > 500) && (this._imageLoaded(), clearInterval(n)), t += 1;
634
- }.bind(this), 50);
635
- }
636
- function a(t) {
637
- var n = r(t, this.assetsPath, this.path), i = L("image");
638
- x ? this.testImageLoaded(i) : i.addEventListener("load", this._imageLoaded, !1), i.addEventListener("error", function() {
639
- a.img = e, this._imageLoaded();
640
- }.bind(this), !1), i.setAttributeNS("http://www.w3.org/1999/xlink", "href", n), this._elementHelper.append ? this._elementHelper.append(i) : this._elementHelper.appendChild(i);
641
- var a = {
642
- img: i,
643
- assetData: t
644
- };
645
- return a;
646
- }
647
- function o(t) {
648
- var n = r(t, this.assetsPath, this.path), i = u("img");
649
- i.crossOrigin = "anonymous", i.addEventListener("load", this._imageLoaded, !1), i.addEventListener("error", function() {
650
- a.img = e, this._imageLoaded();
651
- }.bind(this), !1), i.src = n;
652
- var a = {
653
- img: i,
654
- assetData: t
655
- };
656
- return a;
657
- }
658
- function s(e) {
659
- var t = { assetData: e }, n = r(e, this.assetsPath, this.path);
660
- return z.loadData(n, function(e) {
661
- t.img = e, this._footageLoaded();
662
- }.bind(this), function() {
663
- t.img = {}, this._footageLoaded();
664
- }.bind(this)), t;
665
- }
666
- function c(e, t) {
667
- this.imagesLoadedCb = t;
668
- var n, r = e.length;
669
- for (n = 0; n < r; n += 1) e[n].layers || (!e[n].t || e[n].t === "seq" ? (this.totalImages += 1, this.images.push(this._createImageData(e[n]))) : e[n].t === 3 && (this.totalFootages += 1, this.images.push(this.createFootageData(e[n]))));
670
- }
671
- function l(e) {
672
- this.path = e || "";
673
- }
674
- function d(e) {
675
- this.assetsPath = e || "";
676
- }
677
- function f(e) {
678
- for (var t = 0, n = this.images.length; t < n;) {
679
- if (this.images[t].assetData === e) return this.images[t].img;
680
- t += 1;
681
- }
682
- return null;
683
- }
684
- function p() {
685
- this.imagesLoadedCb = null, this.images.length = 0;
686
- }
687
- function m() {
688
- return this.totalImages === this.loadedAssets;
689
- }
690
- function h() {
691
- return this.totalFootages === this.loadedFootagesCount;
692
- }
693
- function g(e, t) {
694
- e === "svg" ? (this._elementHelper = t, this._createImageData = this.createImageData.bind(this)) : this._createImageData = this.createImgData.bind(this);
695
- }
696
- function _() {
697
- this._imageLoaded = t.bind(this), this._footageLoaded = n.bind(this), this.testImageLoaded = i.bind(this), this.createFootageData = s.bind(this), this.assetsPath = "", this.path = "", this.totalImages = 0, this.totalFootages = 0, this.loadedAssets = 0, this.loadedFootagesCount = 0, this.imagesLoadedCb = null, this.images = [];
698
- }
699
- return _.prototype = {
700
- loadAssets: c,
701
- setAssetsPath: d,
702
- setPath: l,
703
- loadedImages: m,
704
- loadedFootages: h,
705
- destroy: p,
706
- getAsset: f,
707
- createImgData: o,
708
- createImageData: a,
709
- imageLoaded: t,
710
- footageLoaded: n,
711
- setCacheType: g
712
- }, _;
713
- }();
714
- function he() {}
715
- he.prototype = {
716
- triggerEvent: function(e, t) {
717
- if (this._cbs[e]) for (var n = this._cbs[e], r = 0; r < n.length; r += 1) n[r](t);
718
- },
719
- addEventListener: function(e, t) {
720
- return this._cbs[e] || (this._cbs[e] = []), this._cbs[e].push(t), function() {
721
- this.removeEventListener(e, t);
722
- }.bind(this);
723
- },
724
- removeEventListener: function(e, t) {
725
- if (!t) this._cbs[e] = null;
726
- else if (this._cbs[e]) {
727
- for (var n = 0, r = this._cbs[e].length; n < r;) this._cbs[e][n] === t && (this._cbs[e].splice(n, 1), --n, --r), n += 1;
728
- this._cbs[e].length || (this._cbs[e] = null);
729
- }
730
- }
731
- };
732
- var ge = function() {
733
- function e(e) {
734
- for (var t = e.split("\r\n"), n = {}, r, i = 0, a = 0; a < t.length; a += 1) r = t[a].split(":"), r.length === 2 && (n[r[0]] = r[1].trim(), i += 1);
735
- if (i === 0) throw Error();
736
- return n;
737
- }
738
- return function(t) {
739
- for (var n = [], r = 0; r < t.length; r += 1) {
740
- var i = t[r], a = {
741
- time: i.tm,
742
- duration: i.dr
743
- };
744
- try {
745
- a.payload = JSON.parse(t[r].cm);
746
- } catch {
747
- try {
748
- a.payload = e(t[r].cm);
749
- } catch {
750
- a.payload = { name: t[r].cm };
751
- }
752
- }
753
- n.push(a);
754
- }
755
- return n;
756
- };
757
- }(), _e = function() {
758
- function e(e) {
759
- this.compositions.push(e);
760
- }
761
- return function() {
762
- function t(e) {
763
- for (var t = 0, n = this.compositions.length; t < n;) {
764
- if (this.compositions[t].data && this.compositions[t].data.nm === e) return this.compositions[t].prepareFrame && this.compositions[t].data.xt && this.compositions[t].prepareFrame(this.currentFrame), this.compositions[t].compInterface;
765
- t += 1;
766
- }
767
- return null;
768
- }
769
- return t.compositions = [], t.currentFrame = 0, t.registerComposition = e, t;
770
- };
771
- }(), ve = {}, ye = function(e, t) {
772
- ve[e] = t;
773
- };
774
- function be(e) {
775
- return ve[e];
776
- }
777
- function xe() {
778
- if (ve.canvas) return "canvas";
779
- for (var e in ve) if (ve[e]) return e;
780
- return "";
781
- }
782
- function Se(e) {
783
- "@babel/helpers - typeof";
784
- return Se = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
785
- return typeof e;
786
- } : function(e) {
787
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
788
- }, Se(e);
789
- }
790
- var B = function() {
791
- this._cbs = [], this.name = "", this.path = "", this.isLoaded = !1, this.currentFrame = 0, this.currentRawFrame = 0, this.firstFrame = 0, this.totalFrames = 0, this.frameRate = 0, this.frameMult = 0, this.playSpeed = 1, this.playDirection = 1, this.playCount = 0, this.animationData = {}, this.assets = [], this.isPaused = !0, this.autoplay = !1, this.loop = !0, this.renderer = null, this.animationID = I(), this.assetsPath = "", this.timeCompleted = 0, this.segmentPos = 0, this.isSubframeEnabled = se(), this.segments = [], this._idle = !0, this._completedLoop = !1, this.projectInterface = _e(), this.imagePreloader = new me(), this.audioController = p(), this.markers = [], this.configAnimation = this.configAnimation.bind(this), this.onSetupError = this.onSetupError.bind(this), this.onSegmentComplete = this.onSegmentComplete.bind(this), this.drawnFrameEvent = new A("drawnFrame", 0, 0, 0), this.expressionsPlugin = le();
792
- };
793
- d([he], B), B.prototype.setParams = function(e) {
794
- (e.wrapper || e.container) && (this.wrapper = e.wrapper || e.container);
795
- var t = "svg";
796
- e.animType ? t = e.animType : e.renderer && (t = e.renderer), this.renderer = new (be(t))(this, e.rendererSettings), this.imagePreloader.setCacheType(t, this.renderer.globalData.defs), this.renderer.setProjectInterface(this.projectInterface), this.animType = t, e.loop === "" || e.loop === null || e.loop === void 0 || e.loop === !0 ? this.loop = !0 : e.loop === !1 ? this.loop = !1 : this.loop = parseInt(e.loop, 10), this.autoplay = "autoplay" in e ? e.autoplay : !0, this.name = e.name ? e.name : "", this.autoloadSegments = Object.prototype.hasOwnProperty.call(e, "autoloadSegments") ? e.autoloadSegments : !0, this.assetsPath = e.assetsPath, this.initialSegment = e.initialSegment, e.audioFactory && this.audioController.setAudioFactory(e.audioFactory), e.animationData ? this.setupAnimation(e.animationData) : e.path && (e.path.lastIndexOf("\\") === -1 ? this.path = e.path.substr(0, e.path.lastIndexOf("/") + 1) : this.path = e.path.substr(0, e.path.lastIndexOf("\\") + 1), this.fileName = e.path.substr(e.path.lastIndexOf("/") + 1), this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf(".json")), z.loadAnimation(e.path, this.configAnimation, this.onSetupError));
797
- }, B.prototype.onSetupError = function() {
798
- this.trigger("data_failed");
799
- }, B.prototype.setupAnimation = function(e) {
800
- z.completeAnimation(e, this.configAnimation);
801
- }, B.prototype.setData = function(e, t) {
802
- t && Se(t) !== "object" && (t = JSON.parse(t));
803
- var n = {
804
- wrapper: e,
805
- animationData: t
806
- }, r = e.attributes;
807
- n.path = r.getNamedItem("data-animation-path") ? r.getNamedItem("data-animation-path").value : r.getNamedItem("data-bm-path") ? r.getNamedItem("data-bm-path").value : r.getNamedItem("bm-path") ? r.getNamedItem("bm-path").value : "", n.animType = r.getNamedItem("data-anim-type") ? r.getNamedItem("data-anim-type").value : r.getNamedItem("data-bm-type") ? r.getNamedItem("data-bm-type").value : r.getNamedItem("bm-type") ? r.getNamedItem("bm-type").value : r.getNamedItem("data-bm-renderer") ? r.getNamedItem("data-bm-renderer").value : r.getNamedItem("bm-renderer") ? r.getNamedItem("bm-renderer").value : xe() || "canvas";
808
- var i = r.getNamedItem("data-anim-loop") ? r.getNamedItem("data-anim-loop").value : r.getNamedItem("data-bm-loop") ? r.getNamedItem("data-bm-loop").value : r.getNamedItem("bm-loop") ? r.getNamedItem("bm-loop").value : "";
809
- i === "false" ? n.loop = !1 : i === "true" ? n.loop = !0 : i !== "" && (n.loop = parseInt(i, 10)), n.autoplay = (r.getNamedItem("data-anim-autoplay") ? r.getNamedItem("data-anim-autoplay").value : r.getNamedItem("data-bm-autoplay") ? r.getNamedItem("data-bm-autoplay").value : r.getNamedItem("bm-autoplay") ? r.getNamedItem("bm-autoplay").value : !0) !== "false", n.name = r.getNamedItem("data-name") ? r.getNamedItem("data-name").value : r.getNamedItem("data-bm-name") ? r.getNamedItem("data-bm-name").value : r.getNamedItem("bm-name") ? r.getNamedItem("bm-name").value : "", (r.getNamedItem("data-anim-prerender") ? r.getNamedItem("data-anim-prerender").value : r.getNamedItem("data-bm-prerender") ? r.getNamedItem("data-bm-prerender").value : r.getNamedItem("bm-prerender") ? r.getNamedItem("bm-prerender").value : "") === "false" && (n.prerender = !1), n.path ? this.setParams(n) : this.trigger("destroy");
810
- }, B.prototype.includeLayers = function(e) {
811
- e.op > this.animationData.op && (this.animationData.op = e.op, this.totalFrames = Math.floor(e.op - this.animationData.ip));
812
- var t = this.animationData.layers, n, r = t.length, i = e.layers, a, o = i.length;
813
- for (a = 0; a < o; a += 1) for (n = 0; n < r;) {
814
- if (t[n].id === i[a].id) {
815
- t[n] = i[a];
816
- break;
817
- }
818
- n += 1;
819
- }
820
- if ((e.chars || e.fonts) && (this.renderer.globalData.fontManager.addChars(e.chars), this.renderer.globalData.fontManager.addFonts(e.fonts, this.renderer.globalData.defs)), e.assets) for (r = e.assets.length, n = 0; n < r; n += 1) this.animationData.assets.push(e.assets[n]);
821
- this.animationData.__complete = !1, z.completeAnimation(this.animationData, this.onSegmentComplete);
822
- }, B.prototype.onSegmentComplete = function(e) {
823
- this.animationData = e;
824
- var t = le();
825
- t && t.initExpressions(this), this.loadNextSegment();
826
- }, B.prototype.loadNextSegment = function() {
827
- var e = this.animationData.segments;
828
- if (!e || e.length === 0 || !this.autoloadSegments) {
829
- this.trigger("data_ready"), this.timeCompleted = this.totalFrames;
830
- return;
831
- }
832
- this.timeCompleted = e.shift().time * this.frameRate;
833
- var t = this.path + this.fileName + "_" + this.segmentPos + ".json";
834
- this.segmentPos += 1, z.loadData(t, this.includeLayers.bind(this), function() {
835
- this.trigger("data_failed");
836
- }.bind(this));
837
- }, B.prototype.loadSegments = function() {
838
- this.animationData.segments || (this.timeCompleted = this.totalFrames), this.loadNextSegment();
839
- }, B.prototype.imagesLoaded = function() {
840
- this.trigger("loaded_images"), this.checkLoaded();
841
- }, B.prototype.preloadImages = function() {
842
- this.imagePreloader.setAssetsPath(this.assetsPath), this.imagePreloader.setPath(this.path), this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
843
- }, B.prototype.configAnimation = function(e) {
844
- if (this.renderer) try {
845
- this.animationData = e, this.initialSegment ? (this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]), this.firstFrame = Math.round(this.initialSegment[0])) : (this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip), this.firstFrame = Math.round(this.animationData.ip)), this.renderer.configAnimation(e), e.assets ||= [], this.assets = this.animationData.assets, this.frameRate = this.animationData.fr, this.frameMult = this.animationData.fr / 1e3, this.renderer.searchExtraCompositions(e.assets), this.markers = ge(e.markers || []), this.trigger("config_ready"), this.preloadImages(), this.loadSegments(), this.updaFrameModifier(), this.waitForFontsLoaded(), this.isPaused && this.audioController.pause();
846
- } catch (e) {
847
- this.triggerConfigError(e);
848
- }
849
- }, B.prototype.waitForFontsLoaded = function() {
850
- this.renderer && (this.renderer.globalData.fontManager.isLoaded ? this.checkLoaded() : setTimeout(this.waitForFontsLoaded.bind(this), 20));
851
- }, B.prototype.checkLoaded = function() {
852
- if (!this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== "canvas") && this.imagePreloader.loadedFootages()) {
853
- this.isLoaded = !0;
854
- var e = le();
855
- e && e.initExpressions(this), this.renderer.initItems(), setTimeout(function() {
856
- this.trigger("DOMLoaded");
857
- }.bind(this), 0), this.gotoFrame(), this.autoplay && this.play();
858
- }
859
- }, B.prototype.resize = function(e, t) {
860
- var n = typeof e == "number" ? e : void 0, r = typeof t == "number" ? t : void 0;
861
- this.renderer.updateContainerSize(n, r);
862
- }, B.prototype.setSubframe = function(e) {
863
- this.isSubframeEnabled = !!e;
864
- }, B.prototype.gotoFrame = function() {
865
- this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame, this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted && (this.currentFrame = this.timeCompleted), this.trigger("enterFrame"), this.renderFrame(), this.trigger("drawnFrame");
866
- }, B.prototype.renderFrame = function() {
867
- if (!(this.isLoaded === !1 || !this.renderer)) try {
868
- this.expressionsPlugin && this.expressionsPlugin.resetFrame(), this.renderer.renderFrame(this.currentFrame + this.firstFrame);
869
- } catch (e) {
870
- this.triggerRenderFrameError(e);
871
- }
872
- }, B.prototype.play = function(e) {
873
- e && this.name !== e || this.isPaused === !0 && (this.isPaused = !1, this.trigger("_play"), this.audioController.resume(), this._idle && (this._idle = !1, this.trigger("_active")));
874
- }, B.prototype.pause = function(e) {
875
- e && this.name !== e || this.isPaused === !1 && (this.isPaused = !0, this.trigger("_pause"), this._idle = !0, this.trigger("_idle"), this.audioController.pause());
876
- }, B.prototype.togglePause = function(e) {
877
- e && this.name !== e || (this.isPaused === !0 ? this.play() : this.pause());
878
- }, B.prototype.stop = function(e) {
879
- e && this.name !== e || (this.pause(), this.playCount = 0, this._completedLoop = !1, this.setCurrentRawFrameValue(0));
880
- }, B.prototype.getMarkerData = function(e) {
881
- for (var t, n = 0; n < this.markers.length; n += 1) if (t = this.markers[n], t.payload && t.payload.name === e) return t;
882
- return null;
883
- }, B.prototype.goToAndStop = function(e, t, n) {
884
- if (!(n && this.name !== n)) {
885
- var r = Number(e);
886
- if (isNaN(r)) {
887
- var i = this.getMarkerData(e);
888
- i && this.goToAndStop(i.time, !0);
889
- } else t ? this.setCurrentRawFrameValue(e) : this.setCurrentRawFrameValue(e * this.frameModifier);
890
- this.pause();
891
- }
892
- }, B.prototype.goToAndPlay = function(e, t, n) {
893
- if (!(n && this.name !== n)) {
894
- var r = Number(e);
895
- if (isNaN(r)) {
896
- var i = this.getMarkerData(e);
897
- i && (i.duration ? this.playSegments([i.time, i.time + i.duration], !0) : this.goToAndStop(i.time, !0));
898
- } else this.goToAndStop(r, t, n);
899
- this.play();
900
- }
901
- }, B.prototype.advanceTime = function(e) {
902
- if (!(this.isPaused === !0 || this.isLoaded === !1)) {
903
- var t = this.currentRawFrame + e * this.frameModifier, n = !1;
904
- t >= this.totalFrames - 1 && this.frameModifier > 0 ? !this.loop || this.playCount === this.loop ? this.checkSegments(t > this.totalFrames ? t % this.totalFrames : 0) || (n = !0, t = this.totalFrames - 1) : t >= this.totalFrames ? (this.playCount += 1, this.checkSegments(t % this.totalFrames) || (this.setCurrentRawFrameValue(t % this.totalFrames), this._completedLoop = !0, this.trigger("loopComplete"))) : this.setCurrentRawFrameValue(t) : t < 0 ? this.checkSegments(t % this.totalFrames) || (this.loop && !(this.playCount-- <= 0 && this.loop !== !0) ? (this.setCurrentRawFrameValue(this.totalFrames + t % this.totalFrames), this._completedLoop ? this.trigger("loopComplete") : this._completedLoop = !0) : (n = !0, t = 0)) : this.setCurrentRawFrameValue(t), n && (this.setCurrentRawFrameValue(t), this.pause(), this.trigger("complete"));
905
- }
906
- }, B.prototype.adjustSegment = function(e, t) {
907
- this.playCount = 0, e[1] < e[0] ? (this.frameModifier > 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(-1)), this.totalFrames = e[0] - e[1], this.timeCompleted = this.totalFrames, this.firstFrame = e[1], this.setCurrentRawFrameValue(this.totalFrames - .001 - t)) : e[1] > e[0] && (this.frameModifier < 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(1)), this.totalFrames = e[1] - e[0], this.timeCompleted = this.totalFrames, this.firstFrame = e[0], this.setCurrentRawFrameValue(.001 + t)), this.trigger("segmentStart");
908
- }, B.prototype.setSegment = function(e, t) {
909
- var n = -1;
910
- this.isPaused && (this.currentRawFrame + this.firstFrame < e ? n = e : this.currentRawFrame + this.firstFrame > t && (n = t - e)), this.firstFrame = e, this.totalFrames = t - e, this.timeCompleted = this.totalFrames, n !== -1 && this.goToAndStop(n, !0);
911
- }, B.prototype.playSegments = function(e, t) {
912
- if (t && (this.segments.length = 0), Se(e[0]) === "object") {
913
- var n, r = e.length;
914
- for (n = 0; n < r; n += 1) this.segments.push(e[n]);
915
- } else this.segments.push(e);
916
- this.segments.length && t && this.adjustSegment(this.segments.shift(), 0), this.isPaused && this.play();
917
- }, B.prototype.resetSegments = function(e) {
918
- this.segments.length = 0, this.segments.push([this.animationData.ip, this.animationData.op]), e && this.checkSegments(0);
919
- }, B.prototype.checkSegments = function(e) {
920
- return this.segments.length ? (this.adjustSegment(this.segments.shift(), e), !0) : !1;
921
- }, B.prototype.destroy = function(e) {
922
- e && this.name !== e || !this.renderer || (this.renderer.destroy(), this.imagePreloader.destroy(), this.trigger("destroy"), this._cbs = null, this.onEnterFrame = null, this.onLoopComplete = null, this.onComplete = null, this.onSegmentStart = null, this.onDestroy = null, this.renderer = null, this.expressionsPlugin = null, this.imagePreloader = null, this.projectInterface = null);
923
- }, B.prototype.setCurrentRawFrameValue = function(e) {
924
- this.currentRawFrame = e, this.gotoFrame();
925
- }, B.prototype.setSpeed = function(e) {
926
- this.playSpeed = e, this.updaFrameModifier();
927
- }, B.prototype.setDirection = function(e) {
928
- this.playDirection = e < 0 ? -1 : 1, this.updaFrameModifier();
929
- }, B.prototype.setLoop = function(e) {
930
- this.loop = e;
931
- }, B.prototype.setVolume = function(e, t) {
932
- t && this.name !== t || this.audioController.setVolume(e);
933
- }, B.prototype.getVolume = function() {
934
- return this.audioController.getVolume();
935
- }, B.prototype.mute = function(e) {
936
- e && this.name !== e || this.audioController.mute();
937
- }, B.prototype.unmute = function(e) {
938
- e && this.name !== e || this.audioController.unmute();
939
- }, B.prototype.updaFrameModifier = function() {
940
- this.frameModifier = this.frameMult * this.playSpeed * this.playDirection, this.audioController.setRate(this.playSpeed * this.playDirection);
941
- }, B.prototype.getPath = function() {
942
- return this.path;
943
- }, B.prototype.getAssetsPath = function(e) {
944
- var t = "";
945
- if (e.e) t = e.p;
946
- else if (this.assetsPath) {
947
- var n = e.p;
948
- n.indexOf("images/") !== -1 && (n = n.split("/")[1]), t = this.assetsPath + n;
949
- } else t = this.path, t += e.u ? e.u : "", t += e.p;
950
- return t;
951
- }, B.prototype.getAssetData = function(e) {
952
- for (var t = 0, n = this.assets.length; t < n;) {
953
- if (e === this.assets[t].id) return this.assets[t];
954
- t += 1;
955
- }
956
- return null;
957
- }, B.prototype.hide = function() {
958
- this.renderer.hide();
959
- }, B.prototype.show = function() {
960
- this.renderer.show();
961
- }, B.prototype.getDuration = function(e) {
962
- return e ? this.totalFrames : this.totalFrames / this.frameRate;
963
- }, B.prototype.updateDocumentData = function(e, t, n) {
964
- try {
965
- this.renderer.getElementByPath(e).updateDocumentData(t, n);
966
- } catch {}
967
- }, B.prototype.trigger = function(e) {
968
- if (this._cbs && this._cbs[e]) switch (e) {
969
- case "enterFrame":
970
- this.triggerEvent(e, new A(e, this.currentFrame, this.totalFrames, this.frameModifier));
971
- break;
972
- case "drawnFrame":
973
- this.drawnFrameEvent.currentTime = this.currentFrame, this.drawnFrameEvent.totalTime = this.totalFrames, this.drawnFrameEvent.direction = this.frameModifier, this.triggerEvent(e, this.drawnFrameEvent);
974
- break;
975
- case "loopComplete":
976
- this.triggerEvent(e, new M(e, this.loop, this.playCount, this.frameMult));
977
- break;
978
- case "complete":
979
- this.triggerEvent(e, new j(e, this.frameMult));
980
- break;
981
- case "segmentStart":
982
- this.triggerEvent(e, new N(e, this.firstFrame, this.totalFrames));
983
- break;
984
- case "destroy":
985
- this.triggerEvent(e, new P(e, this));
986
- break;
987
- default: this.triggerEvent(e);
988
- }
989
- e === "enterFrame" && this.onEnterFrame && this.onEnterFrame.call(this, new A(e, this.currentFrame, this.totalFrames, this.frameMult)), e === "loopComplete" && this.onLoopComplete && this.onLoopComplete.call(this, new M(e, this.loop, this.playCount, this.frameMult)), e === "complete" && this.onComplete && this.onComplete.call(this, new j(e, this.frameMult)), e === "segmentStart" && this.onSegmentStart && this.onSegmentStart.call(this, new N(e, this.firstFrame, this.totalFrames)), e === "destroy" && this.onDestroy && this.onDestroy.call(this, new P(e, this));
990
- }, B.prototype.triggerRenderFrameError = function(e) {
991
- var t = new F(e, this.currentFrame);
992
- this.triggerEvent("error", t), this.onError && this.onError.call(this, t);
993
- }, B.prototype.triggerConfigError = function(e) {
994
- var t = new ee(e, this.currentFrame);
995
- this.triggerEvent("error", t), this.onError && this.onError.call(this, t);
996
- };
997
- var V = function() {
998
- var e = {}, t = [], n = 0, r = 0, i = 0, a = !0, o = !1;
999
- function s(e) {
1000
- for (var n = 0, i = e.target; n < r;) t[n].animation === i && (t.splice(n, 1), --n, --r, i.isPaused || f()), n += 1;
1001
- }
1002
- function c(e, n) {
1003
- if (!e) return null;
1004
- for (var i = 0; i < r;) {
1005
- if (t[i].elem === e && t[i].elem !== null) return t[i].animation;
1006
- i += 1;
1007
- }
1008
- var a = new B();
1009
- return p(a, e), a.setData(e, n), a;
1010
- }
1011
- function l() {
1012
- var e, n = t.length, r = [];
1013
- for (e = 0; e < n; e += 1) r.push(t[e].animation);
1014
- return r;
1015
- }
1016
- function d() {
1017
- i += 1, D();
1018
- }
1019
- function f() {
1020
- --i;
1021
- }
1022
- function p(e, n) {
1023
- e.addEventListener("destroy", s), e.addEventListener("_active", d), e.addEventListener("_idle", f), t.push({
1024
- elem: n,
1025
- animation: e
1026
- }), r += 1;
1027
- }
1028
- function m(e) {
1029
- var t = new B();
1030
- return p(t, null), t.setParams(e), t;
1031
- }
1032
- function h(e, n) {
1033
- var i;
1034
- for (i = 0; i < r; i += 1) t[i].animation.setSpeed(e, n);
1035
- }
1036
- function g(e, n) {
1037
- var i;
1038
- for (i = 0; i < r; i += 1) t[i].animation.setDirection(e, n);
1039
- }
1040
- function _(e) {
1041
- var n;
1042
- for (n = 0; n < r; n += 1) t[n].animation.play(e);
1043
- }
1044
- function v(e) {
1045
- var s = e - n, c;
1046
- for (c = 0; c < r; c += 1) t[c].animation.advanceTime(s);
1047
- n = e, i && !o ? window.requestAnimationFrame(v) : a = !0;
1048
- }
1049
- function y(e) {
1050
- n = e, window.requestAnimationFrame(v);
1051
- }
1052
- function b(e) {
1053
- var n;
1054
- for (n = 0; n < r; n += 1) t[n].animation.pause(e);
1055
- }
1056
- function x(e, n, i) {
1057
- var a;
1058
- for (a = 0; a < r; a += 1) t[a].animation.goToAndStop(e, n, i);
1059
- }
1060
- function S(e) {
1061
- var n;
1062
- for (n = 0; n < r; n += 1) t[n].animation.stop(e);
1063
- }
1064
- function C(e) {
1065
- var n;
1066
- for (n = 0; n < r; n += 1) t[n].animation.togglePause(e);
1067
- }
1068
- function w(e) {
1069
- var n;
1070
- for (n = r - 1; n >= 0; --n) t[n].animation.destroy(e);
1071
- }
1072
- function T(e, t, n) {
1073
- var r = [].concat([].slice.call(document.getElementsByClassName("lottie")), [].slice.call(document.getElementsByClassName("bodymovin"))), i, a = r.length;
1074
- for (i = 0; i < a; i += 1) n && r[i].setAttribute("data-bm-type", n), c(r[i], e);
1075
- if (t && a === 0) {
1076
- n ||= "svg";
1077
- var o = document.getElementsByTagName("body")[0];
1078
- o.innerText = "";
1079
- var s = u("div");
1080
- s.style.width = "100%", s.style.height = "100%", s.setAttribute("data-bm-type", n), o.appendChild(s), c(s, e);
1081
- }
1082
- }
1083
- function E() {
1084
- var e;
1085
- for (e = 0; e < r; e += 1) t[e].animation.resize();
1086
- }
1087
- function D() {
1088
- !o && i && (a &&= (window.requestAnimationFrame(y), !1));
1089
- }
1090
- function O() {
1091
- o = !0;
1092
- }
1093
- function k() {
1094
- o = !1, D();
1095
- }
1096
- function A(e, n) {
1097
- var i;
1098
- for (i = 0; i < r; i += 1) t[i].animation.setVolume(e, n);
1099
- }
1100
- function j(e) {
1101
- var n;
1102
- for (n = 0; n < r; n += 1) t[n].animation.mute(e);
1103
- }
1104
- function M(e) {
1105
- var n;
1106
- for (n = 0; n < r; n += 1) t[n].animation.unmute(e);
1107
- }
1108
- return e.registerAnimation = c, e.loadAnimation = m, e.setSpeed = h, e.setDirection = g, e.play = _, e.pause = b, e.stop = S, e.togglePause = C, e.searchAnimations = T, e.resize = E, e.goToAndStop = x, e.destroy = w, e.freeze = O, e.unfreeze = k, e.setVolume = A, e.mute = j, e.unmute = M, e.getRegisteredAnimations = l, e;
1109
- }(), Ce = function() {
1110
- var e = {};
1111
- e.getBezierEasing = n;
1112
- var t = {};
1113
- function n(e, n, r, i, a) {
1114
- var o = a || ("bez_" + e + "_" + n + "_" + r + "_" + i).replace(/\./g, "p");
1115
- if (t[o]) return t[o];
1116
- var s = new _([
1117
- e,
1118
- n,
1119
- r,
1120
- i
1121
- ]);
1122
- return t[o] = s, s;
1123
- }
1124
- var r = 4, i = .001, a = 1e-7, o = 10, s = 11, c = 1 / (s - 1), l = typeof Float32Array == "function";
1125
- function u(e, t) {
1126
- return 1 - 3 * t + 3 * e;
1127
- }
1128
- function d(e, t) {
1129
- return 3 * t - 6 * e;
1130
- }
1131
- function f(e) {
1132
- return 3 * e;
1133
- }
1134
- function p(e, t, n) {
1135
- return ((u(t, n) * e + d(t, n)) * e + f(t)) * e;
1136
- }
1137
- function m(e, t, n) {
1138
- return 3 * u(t, n) * e * e + 2 * d(t, n) * e + f(t);
1139
- }
1140
- function h(e, t, n, r, i) {
1141
- var s, c, l = 0;
1142
- do
1143
- c = t + (n - t) / 2, s = p(c, r, i) - e, s > 0 ? n = c : t = c;
1144
- while (Math.abs(s) > a && ++l < o);
1145
- return c;
1146
- }
1147
- function g(e, t, n, i) {
1148
- for (var a = 0; a < r; ++a) {
1149
- var o = m(t, n, i);
1150
- if (o === 0) return t;
1151
- var s = p(t, n, i) - e;
1152
- t -= s / o;
1153
- }
1154
- return t;
1155
- }
1156
- function _(e) {
1157
- this._p = e, this._mSampleValues = l ? new Float32Array(s) : Array(s), this._precomputed = !1, this.get = this.get.bind(this);
1158
- }
1159
- return _.prototype = {
1160
- get: function(e) {
1161
- var t = this._p[0], n = this._p[1], r = this._p[2], i = this._p[3];
1162
- return this._precomputed || this._precompute(), t === n && r === i ? e : e === 0 ? 0 : e === 1 ? 1 : p(this._getTForX(e), n, i);
1163
- },
1164
- _precompute: function() {
1165
- var e = this._p[0], t = this._p[1], n = this._p[2], r = this._p[3];
1166
- this._precomputed = !0, (e !== t || n !== r) && this._calcSampleValues();
1167
- },
1168
- _calcSampleValues: function() {
1169
- for (var e = this._p[0], t = this._p[2], n = 0; n < s; ++n) this._mSampleValues[n] = p(n * c, e, t);
1170
- },
1171
- _getTForX: function(e) {
1172
- for (var t = this._p[0], n = this._p[2], r = this._mSampleValues, a = 0, o = 1, l = s - 1; o !== l && r[o] <= e; ++o) a += c;
1173
- --o;
1174
- var u = (e - r[o]) / (r[o + 1] - r[o]), d = a + u * c, f = m(d, t, n);
1175
- return f >= i ? g(e, d, t, n) : f === 0 ? d : h(e, a, a + c, t, n);
1176
- }
1177
- }, e;
1178
- }(), we = function() {
1179
- function e(e) {
1180
- return e.concat(h(e.length));
1181
- }
1182
- return { double: e };
1183
- }(), Te = function() {
1184
- return function(e, t, n) {
1185
- var r = 0, i = e, a = h(i), o = {
1186
- newElement: s,
1187
- release: c
1188
- };
1189
- function s() {
1190
- var e;
1191
- return r ? (--r, e = a[r]) : e = t(), e;
1192
- }
1193
- function c(e) {
1194
- r === i && (a = we.double(a), i *= 2), n && n(e), a[r] = e, r += 1;
1195
- }
1196
- return o;
1197
- };
1198
- }(), Ee = function() {
1199
- function e() {
1200
- return {
1201
- addedLength: 0,
1202
- percents: m("float32", fe()),
1203
- lengths: m("float32", fe())
1204
- };
1205
- }
1206
- return Te(8, e);
1207
- }(), De = function() {
1208
- function e() {
1209
- return {
1210
- lengths: [],
1211
- totalLength: 0
1212
- };
1213
- }
1214
- function t(e) {
1215
- var t, n = e.lengths.length;
1216
- for (t = 0; t < n; t += 1) Ee.release(e.lengths[t]);
1217
- e.lengths.length = 0;
1218
- }
1219
- return Te(8, e, t);
1220
- }();
1221
- function Oe() {
1222
- var e = Math;
1223
- function t(e, t, n, r, i, a) {
1224
- var o = e * r + t * i + n * a - i * r - a * e - n * t;
1225
- return o > -.001 && o < .001;
1226
- }
1227
- function n(n, r, i, a, o, s, c, l, u) {
1228
- if (i === 0 && s === 0 && u === 0) return t(n, r, a, o, c, l);
1229
- var d = e.sqrt(e.pow(a - n, 2) + e.pow(o - r, 2) + e.pow(s - i, 2)), f = e.sqrt(e.pow(c - n, 2) + e.pow(l - r, 2) + e.pow(u - i, 2)), p = e.sqrt(e.pow(c - a, 2) + e.pow(l - o, 2) + e.pow(u - s, 2)), m = d > f ? d > p ? d - f - p : p - f - d : p > f ? p - f - d : f - d - p;
1230
- return m > -1e-4 && m < 1e-4;
1231
- }
1232
- var r = function() {
1233
- return function(e, t, n, r) {
1234
- var i = fe(), a, o, s, c, l, u = 0, d, f = [], p = [], m = Ee.newElement();
1235
- for (s = n.length, a = 0; a < i; a += 1) {
1236
- for (l = a / (i - 1), d = 0, o = 0; o < s; o += 1) c = S(1 - l, 3) * e[o] + 3 * S(1 - l, 2) * l * n[o] + 3 * (1 - l) * S(l, 2) * r[o] + S(l, 3) * t[o], f[o] = c, p[o] !== null && (d += S(f[o] - p[o], 2)), p[o] = f[o];
1237
- d && (d = C(d), u += d), m.percents[a] = l, m.lengths[a] = u;
1238
- }
1239
- return m.addedLength = u, m;
1240
- };
1241
- }();
1242
- function i(e) {
1243
- var t = De.newElement(), n = e.c, i = e.v, a = e.o, o = e.i, s, c = e._length, l = t.lengths, u = 0;
1244
- for (s = 0; s < c - 1; s += 1) l[s] = r(i[s], i[s + 1], a[s], o[s + 1]), u += l[s].addedLength;
1245
- return n && c && (l[s] = r(i[s], i[0], a[s], o[0]), u += l[s].addedLength), t.totalLength = u, t;
1246
- }
1247
- function a(e) {
1248
- this.segmentLength = 0, this.points = Array(e);
1249
- }
1250
- function o(e, t) {
1251
- this.partialLength = e, this.point = t;
1252
- }
1253
- var s = function() {
1254
- var e = {};
1255
- return function(n, r, i, s) {
1256
- var c = (n[0] + "_" + n[1] + "_" + r[0] + "_" + r[1] + "_" + i[0] + "_" + i[1] + "_" + s[0] + "_" + s[1]).replace(/\./g, "p");
1257
- if (!e[c]) {
1258
- var l = fe(), u, d, f, p, m, g = 0, _, v, y = null;
1259
- n.length === 2 && (n[0] !== r[0] || n[1] !== r[1]) && t(n[0], n[1], r[0], r[1], n[0] + i[0], n[1] + i[1]) && t(n[0], n[1], r[0], r[1], r[0] + s[0], r[1] + s[1]) && (l = 2);
1260
- var b = new a(l);
1261
- for (f = i.length, u = 0; u < l; u += 1) {
1262
- for (v = h(f), m = u / (l - 1), _ = 0, d = 0; d < f; d += 1) p = S(1 - m, 3) * n[d] + 3 * S(1 - m, 2) * m * (n[d] + i[d]) + 3 * (1 - m) * S(m, 2) * (r[d] + s[d]) + S(m, 3) * r[d], v[d] = p, y !== null && (_ += S(v[d] - y[d], 2));
1263
- _ = C(_), g += _, b.points[u] = new o(_, v), y = v;
1264
- }
1265
- b.segmentLength = g, e[c] = b;
1266
- }
1267
- return e[c];
1268
- };
1269
- }();
1270
- function c(e, t) {
1271
- var n = t.percents, r = t.lengths, i = n.length, a = w((i - 1) * e), o = e * t.addedLength, s = 0;
1272
- if (a === i - 1 || a === 0 || o === r[a]) return n[a];
1273
- for (var c = r[a] > o ? -1 : 1, l = !0; l;) if (r[a] <= o && r[a + 1] > o ? (s = (o - r[a]) / (r[a + 1] - r[a]), l = !1) : a += c, a < 0 || a >= i - 1) {
1274
- if (a === i - 1) return n[a];
1275
- l = !1;
1276
- }
1277
- return n[a] + (n[a + 1] - n[a]) * s;
1278
- }
1279
- function l(t, n, r, i, a, o) {
1280
- var s = c(a, o), l = 1 - s;
1281
- return [e.round((l * l * l * t[0] + (s * l * l + l * s * l + l * l * s) * r[0] + (s * s * l + l * s * s + s * l * s) * i[0] + s * s * s * n[0]) * 1e3) / 1e3, e.round((l * l * l * t[1] + (s * l * l + l * s * l + l * l * s) * r[1] + (s * s * l + l * s * s + s * l * s) * i[1] + s * s * s * n[1]) * 1e3) / 1e3];
1282
- }
1283
- var u = m("float32", 8);
1284
- function d(t, n, r, i, a, o, s) {
1285
- a < 0 ? a = 0 : a > 1 && (a = 1);
1286
- var l = c(a, s);
1287
- o = o > 1 ? 1 : o;
1288
- var d = c(o, s), f, p = t.length, m = 1 - l, h = 1 - d, g = m * m * m, _ = l * m * m * 3, v = l * l * m * 3, y = l * l * l, b = m * m * h, x = l * m * h + m * l * h + m * m * d, S = l * l * h + m * l * d + l * m * d, C = l * l * d, w = m * h * h, T = l * h * h + m * d * h + m * h * d, E = l * d * h + m * d * d + l * h * d, D = l * d * d, O = h * h * h, k = d * h * h + h * d * h + h * h * d, A = d * d * h + h * d * d + d * h * d, j = d * d * d;
1289
- for (f = 0; f < p; f += 1) u[f * 4] = e.round((g * t[f] + _ * r[f] + v * i[f] + y * n[f]) * 1e3) / 1e3, u[f * 4 + 1] = e.round((b * t[f] + x * r[f] + S * i[f] + C * n[f]) * 1e3) / 1e3, u[f * 4 + 2] = e.round((w * t[f] + T * r[f] + E * i[f] + D * n[f]) * 1e3) / 1e3, u[f * 4 + 3] = e.round((O * t[f] + k * r[f] + A * i[f] + j * n[f]) * 1e3) / 1e3;
1290
- return u;
1291
- }
1292
- return {
1293
- getSegmentsLength: i,
1294
- getNewSegment: d,
1295
- getPointInSegment: l,
1296
- buildBezierData: s,
1297
- pointOnLine2D: t,
1298
- pointOnLine3D: n
1299
- };
1300
- }
1301
- var ke = Oe(), Ae = a, je = Math.abs;
1302
- function Me(e, t) {
1303
- var n = this.offsetTime, r;
1304
- this.propType === "multidimensional" && (r = m("float32", this.pv.length));
1305
- for (var i = t.lastIndex, a = i, o = this.keyframes.length - 1, s = !0, c, l, u; s;) {
1306
- if (c = this.keyframes[a], l = this.keyframes[a + 1], a === o - 1 && e >= l.t - n) {
1307
- c.h && (c = l), i = 0;
1308
- break;
1309
- }
1310
- if (l.t - n > e) {
1311
- i = a;
1312
- break;
1313
- }
1314
- a < o - 1 ? a += 1 : (i = 0, s = !1);
1315
- }
1316
- u = this.keyframesMetadata[a] || {};
1317
- var d, f, p, h, g, _, v = l.t - n, y = c.t - n, b;
1318
- if (c.to) {
1319
- u.bezierData ||= ke.buildBezierData(c.s, l.s || c.e, c.to, c.ti);
1320
- var x = u.bezierData;
1321
- if (e >= v || e < y) {
1322
- var S = e >= v ? x.points.length - 1 : 0;
1323
- for (f = x.points[S].point.length, d = 0; d < f; d += 1) r[d] = x.points[S].point[d];
1324
- } else {
1325
- u.__fnct ? _ = u.__fnct : (_ = Ce.getBezierEasing(c.o.x, c.o.y, c.i.x, c.i.y, c.n).get, u.__fnct = _), p = _((e - y) / (v - y));
1326
- var C = x.segmentLength * p, w, T = t.lastFrame < e && t._lastKeyframeIndex === a ? t._lastAddedLength : 0;
1327
- for (g = t.lastFrame < e && t._lastKeyframeIndex === a ? t._lastPoint : 0, s = !0, h = x.points.length; s;) {
1328
- if (T += x.points[g].partialLength, C === 0 || p === 0 || g === x.points.length - 1) {
1329
- for (f = x.points[g].point.length, d = 0; d < f; d += 1) r[d] = x.points[g].point[d];
1330
- break;
1331
- } else if (C >= T && C < T + x.points[g + 1].partialLength) {
1332
- for (w = (C - T) / x.points[g + 1].partialLength, f = x.points[g].point.length, d = 0; d < f; d += 1) r[d] = x.points[g].point[d] + (x.points[g + 1].point[d] - x.points[g].point[d]) * w;
1333
- break;
1334
- }
1335
- g < h - 1 ? g += 1 : s = !1;
1336
- }
1337
- t._lastPoint = g, t._lastAddedLength = T - x.points[g].partialLength, t._lastKeyframeIndex = a;
1338
- }
1339
- } else {
1340
- var E, D, O, k, A;
1341
- if (o = c.s.length, b = l.s || c.e, this.sh && c.h !== 1) if (e >= v) r[0] = b[0], r[1] = b[1], r[2] = b[2];
1342
- else if (e <= y) r[0] = c.s[0], r[1] = c.s[1], r[2] = c.s[2];
1343
- else {
1344
- var j = Fe(c.s), M = Fe(b), N = (e - y) / (v - y);
1345
- Pe(r, Ne(j, M, N));
1346
- }
1347
- else for (a = 0; a < o; a += 1) c.h !== 1 && (e >= v ? p = 1 : e < y ? p = 0 : (c.o.x.constructor === Array ? (u.__fnct ||= [], u.__fnct[a] ? _ = u.__fnct[a] : (E = c.o.x[a] === void 0 ? c.o.x[0] : c.o.x[a], D = c.o.y[a] === void 0 ? c.o.y[0] : c.o.y[a], O = c.i.x[a] === void 0 ? c.i.x[0] : c.i.x[a], k = c.i.y[a] === void 0 ? c.i.y[0] : c.i.y[a], _ = Ce.getBezierEasing(E, D, O, k).get, u.__fnct[a] = _)) : u.__fnct ? _ = u.__fnct : (E = c.o.x, D = c.o.y, O = c.i.x, k = c.i.y, _ = Ce.getBezierEasing(E, D, O, k).get, c.keyframeMetadata = _), p = _((e - y) / (v - y)))), b = l.s || c.e, A = c.h === 1 ? c.s[a] : c.s[a] + (b[a] - c.s[a]) * p, this.propType === "multidimensional" ? r[a] = A : r = A;
1348
- }
1349
- return t.lastIndex = i, r;
1350
- }
1351
- function Ne(e, t, n) {
1352
- var r = [], i = e[0], a = e[1], o = e[2], s = e[3], c = t[0], l = t[1], u = t[2], d = t[3], f, p = i * c + a * l + o * u + s * d, m, h, g;
1353
- return p < 0 && (p = -p, c = -c, l = -l, u = -u, d = -d), 1 - p > 1e-6 ? (f = Math.acos(p), m = Math.sin(f), h = Math.sin((1 - n) * f) / m, g = Math.sin(n * f) / m) : (h = 1 - n, g = n), r[0] = h * i + g * c, r[1] = h * a + g * l, r[2] = h * o + g * u, r[3] = h * s + g * d, r;
1354
- }
1355
- function Pe(e, t) {
1356
- var n = t[0], r = t[1], i = t[2], a = t[3], o = Math.atan2(2 * r * a - 2 * n * i, 1 - 2 * r * r - 2 * i * i), s = Math.asin(2 * n * r + 2 * i * a), c = Math.atan2(2 * n * a - 2 * r * i, 1 - 2 * n * n - 2 * i * i);
1357
- e[0] = o / O, e[1] = s / O, e[2] = c / O;
1358
- }
1359
- function Fe(e) {
1360
- var t = e[0] * O, n = e[1] * O, r = e[2] * O, i = Math.cos(t / 2), a = Math.cos(n / 2), o = Math.cos(r / 2), s = Math.sin(t / 2), c = Math.sin(n / 2), l = Math.sin(r / 2), u = i * a * o - s * c * l;
1361
- return [
1362
- s * c * o + i * a * l,
1363
- s * a * o + i * c * l,
1364
- i * c * o - s * a * l,
1365
- u
1366
- ];
1367
- }
1368
- function Ie() {
1369
- var e = this.comp.renderedFrame - this.offsetTime, t = this.keyframes[0].t - this.offsetTime, n = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
1370
- return e === this._caching.lastFrame || this._caching.lastFrame !== Ae && (this._caching.lastFrame >= n && e >= n || this._caching.lastFrame < t && e < t) || (this._caching.lastFrame >= e && (this._caching._lastKeyframeIndex = -1, this._caching.lastIndex = 0), this.pv = this.interpolateValue(e, this._caching)), this._caching.lastFrame = e, this.pv;
1371
- }
1372
- function Le(e) {
1373
- var t;
1374
- if (this.propType === "unidimensional") t = e * this.mult, je(this.v - t) > 1e-5 && (this.v = t, this._mdf = !0);
1375
- else for (var n = 0, r = this.v.length; n < r;) t = e[n] * this.mult, je(this.v[n] - t) > 1e-5 && (this.v[n] = t, this._mdf = !0), n += 1;
1376
- }
1377
- function Re() {
1378
- if (!(this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length)) {
1379
- if (this.lock) {
1380
- this.setVValue(this.pv);
1381
- return;
1382
- }
1383
- this.lock = !0, this._mdf = this._isFirstFrame;
1384
- var e, t = this.effectsSequence.length, n = this.kf ? this.pv : this.data.k;
1385
- for (e = 0; e < t; e += 1) n = this.effectsSequence[e](n);
1386
- this.setVValue(n), this._isFirstFrame = !1, this.lock = !1, this.frameId = this.elem.globalData.frameId;
1387
- }
1388
- }
1389
- function ze(e) {
1390
- this.effectsSequence.push(e), this.container.addDynamicProperty(this);
1391
- }
1392
- function Be(e, t, n, r) {
1393
- this.propType = "unidimensional", this.mult = n || 1, this.data = t, this.v = n ? t.k * n : t.k, this.pv = t.k, this._mdf = !1, this.elem = e, this.container = r, this.comp = e.comp, this.k = !1, this.kf = !1, this.vel = 0, this.effectsSequence = [], this._isFirstFrame = !0, this.getValue = Re, this.setVValue = Le, this.addEffect = ze;
1394
- }
1395
- function Ve(e, t, n, r) {
1396
- this.propType = "multidimensional", this.mult = n || 1, this.data = t, this._mdf = !1, this.elem = e, this.container = r, this.comp = e.comp, this.k = !1, this.kf = !1, this.frameId = -1;
1397
- var i, a = t.k.length;
1398
- for (this.v = m("float32", a), this.pv = m("float32", a), this.vel = m("float32", a), i = 0; i < a; i += 1) this.v[i] = t.k[i] * this.mult, this.pv[i] = t.k[i];
1399
- this._isFirstFrame = !0, this.effectsSequence = [], this.getValue = Re, this.setVValue = Le, this.addEffect = ze;
1400
- }
1401
- function He(e, t, n, r) {
1402
- this.propType = "unidimensional", this.keyframes = t.k, this.keyframesMetadata = [], this.offsetTime = e.data.st, this.frameId = -1, this._caching = {
1403
- lastFrame: Ae,
1404
- lastIndex: 0,
1405
- value: 0,
1406
- _lastKeyframeIndex: -1
1407
- }, this.k = !0, this.kf = !0, this.data = t, this.mult = n || 1, this.elem = e, this.container = r, this.comp = e.comp, this.v = Ae, this.pv = Ae, this._isFirstFrame = !0, this.getValue = Re, this.setVValue = Le, this.interpolateValue = Me, this.effectsSequence = [Ie.bind(this)], this.addEffect = ze;
1408
- }
1409
- function Ue(e, t, n, r) {
1410
- this.propType = "multidimensional";
1411
- var i, a = t.k.length, o, s, c, l;
1412
- for (i = 0; i < a - 1; i += 1) t.k[i].to && t.k[i].s && t.k[i + 1] && t.k[i + 1].s && (o = t.k[i].s, s = t.k[i + 1].s, c = t.k[i].to, l = t.k[i].ti, (o.length === 2 && !(o[0] === s[0] && o[1] === s[1]) && ke.pointOnLine2D(o[0], o[1], s[0], s[1], o[0] + c[0], o[1] + c[1]) && ke.pointOnLine2D(o[0], o[1], s[0], s[1], s[0] + l[0], s[1] + l[1]) || o.length === 3 && !(o[0] === s[0] && o[1] === s[1] && o[2] === s[2]) && ke.pointOnLine3D(o[0], o[1], o[2], s[0], s[1], s[2], o[0] + c[0], o[1] + c[1], o[2] + c[2]) && ke.pointOnLine3D(o[0], o[1], o[2], s[0], s[1], s[2], s[0] + l[0], s[1] + l[1], s[2] + l[2])) && (t.k[i].to = null, t.k[i].ti = null), o[0] === s[0] && o[1] === s[1] && c[0] === 0 && c[1] === 0 && l[0] === 0 && l[1] === 0 && (o.length === 2 || o[2] === s[2] && c[2] === 0 && l[2] === 0) && (t.k[i].to = null, t.k[i].ti = null));
1413
- this.effectsSequence = [Ie.bind(this)], this.data = t, this.keyframes = t.k, this.keyframesMetadata = [], this.offsetTime = e.data.st, this.k = !0, this.kf = !0, this._isFirstFrame = !0, this.mult = n || 1, this.elem = e, this.container = r, this.comp = e.comp, this.getValue = Re, this.setVValue = Le, this.interpolateValue = Me, this.frameId = -1;
1414
- var u = t.k[0].s.length;
1415
- for (this.v = m("float32", u), this.pv = m("float32", u), i = 0; i < u; i += 1) this.v[i] = Ae, this.pv[i] = Ae;
1416
- this._caching = {
1417
- lastFrame: Ae,
1418
- lastIndex: 0,
1419
- value: m("float32", u)
1420
- }, this.addEffect = ze;
1421
- }
1422
- var H = function() {
1423
- function e(e, t, n, r, i) {
1424
- t.sid && (t = e.globalData.slotManager.getProp(t));
1425
- var a;
1426
- if (!t.k.length) a = new Be(e, t, r, i);
1427
- else if (typeof t.k[0] == "number") a = new Ve(e, t, r, i);
1428
- else switch (n) {
1429
- case 0:
1430
- a = new He(e, t, r, i);
1431
- break;
1432
- case 1:
1433
- a = new Ue(e, t, r, i);
1434
- break;
1435
- default: break;
1436
- }
1437
- return a.effectsSequence.length && i.addDynamicProperty(a), a;
1438
- }
1439
- return { getProp: e };
1440
- }();
1441
- function U() {}
1442
- U.prototype = {
1443
- addDynamicProperty: function(e) {
1444
- this.dynamicProperties.indexOf(e) === -1 && (this.dynamicProperties.push(e), this.container.addDynamicProperty(this), this._isAnimated = !0);
1445
- },
1446
- iterateDynamicProperties: function() {
1447
- this._mdf = !1;
1448
- var e, t = this.dynamicProperties.length;
1449
- for (e = 0; e < t; e += 1) this.dynamicProperties[e].getValue(), this.dynamicProperties[e]._mdf && (this._mdf = !0);
1450
- },
1451
- initDynamicPropertyContainer: function(e) {
1452
- this.container = e, this.dynamicProperties = [], this._mdf = !1, this._isAnimated = !1;
1453
- }
1454
- };
1455
- var We = function() {
1456
- function e() {
1457
- return m("float32", 2);
1458
- }
1459
- return Te(8, e);
1460
- }();
1461
- function Ge() {
1462
- this.c = !1, this._length = 0, this._maxLength = 8, this.v = h(this._maxLength), this.o = h(this._maxLength), this.i = h(this._maxLength);
1463
- }
1464
- Ge.prototype.setPathData = function(e, t) {
1465
- this.c = e, this.setLength(t);
1466
- for (var n = 0; n < t;) this.v[n] = We.newElement(), this.o[n] = We.newElement(), this.i[n] = We.newElement(), n += 1;
1467
- }, Ge.prototype.setLength = function(e) {
1468
- for (; this._maxLength < e;) this.doubleArrayLength();
1469
- this._length = e;
1470
- }, Ge.prototype.doubleArrayLength = function() {
1471
- this.v = this.v.concat(h(this._maxLength)), this.i = this.i.concat(h(this._maxLength)), this.o = this.o.concat(h(this._maxLength)), this._maxLength *= 2;
1472
- }, Ge.prototype.setXYAt = function(e, t, n, r, i) {
1473
- var a;
1474
- switch (this._length = Math.max(this._length, r + 1), this._length >= this._maxLength && this.doubleArrayLength(), n) {
1475
- case "v":
1476
- a = this.v;
1477
- break;
1478
- case "i":
1479
- a = this.i;
1480
- break;
1481
- case "o":
1482
- a = this.o;
1483
- break;
1484
- default:
1485
- a = [];
1486
- break;
1487
- }
1488
- (!a[r] || a[r] && !i) && (a[r] = We.newElement()), a[r][0] = e, a[r][1] = t;
1489
- }, Ge.prototype.setTripleAt = function(e, t, n, r, i, a, o, s) {
1490
- this.setXYAt(e, t, "v", o, s), this.setXYAt(n, r, "o", o, s), this.setXYAt(i, a, "i", o, s);
1491
- }, Ge.prototype.reverse = function() {
1492
- var e = new Ge();
1493
- e.setPathData(this.c, this._length);
1494
- var t = this.v, n = this.o, r = this.i, i = 0;
1495
- this.c && (e.setTripleAt(t[0][0], t[0][1], r[0][0], r[0][1], n[0][0], n[0][1], 0, !1), i = 1);
1496
- var a = this._length - 1, o = this._length, s;
1497
- for (s = i; s < o; s += 1) e.setTripleAt(t[a][0], t[a][1], r[a][0], r[a][1], n[a][0], n[a][1], s, !1), --a;
1498
- return e;
1499
- }, Ge.prototype.length = function() {
1500
- return this._length;
1501
- };
1502
- var W = function() {
1503
- function e() {
1504
- return new Ge();
1505
- }
1506
- function t(e) {
1507
- var t = e._length, n;
1508
- for (n = 0; n < t; n += 1) We.release(e.v[n]), We.release(e.i[n]), We.release(e.o[n]), e.v[n] = null, e.i[n] = null, e.o[n] = null;
1509
- e._length = 0, e.c = !1;
1510
- }
1511
- function n(e) {
1512
- var t = r.newElement(), n, i = e._length === void 0 ? e.v.length : e._length;
1513
- for (t.setLength(i), t.c = e.c, n = 0; n < i; n += 1) t.setTripleAt(e.v[n][0], e.v[n][1], e.o[n][0], e.o[n][1], e.i[n][0], e.i[n][1], n);
1514
- return t;
1515
- }
1516
- var r = Te(4, e, t);
1517
- return r.clone = n, r;
1518
- }();
1519
- function Ke() {
1520
- this._length = 0, this._maxLength = 4, this.shapes = h(this._maxLength);
1521
- }
1522
- Ke.prototype.addShape = function(e) {
1523
- this._length === this._maxLength && (this.shapes = this.shapes.concat(h(this._maxLength)), this._maxLength *= 2), this.shapes[this._length] = e, this._length += 1;
1524
- }, Ke.prototype.releaseShapes = function() {
1525
- var e;
1526
- for (e = 0; e < this._length; e += 1) W.release(this.shapes[e]);
1527
- this._length = 0;
1528
- };
1529
- var qe = function() {
1530
- var e = {
1531
- newShapeCollection: i,
1532
- release: a
1533
- }, t = 0, n = 4, r = h(n);
1534
- function i() {
1535
- var e;
1536
- return t ? (--t, e = r[t]) : e = new Ke(), e;
1537
- }
1538
- function a(e) {
1539
- var i, a = e._length;
1540
- for (i = 0; i < a; i += 1) W.release(e.shapes[i]);
1541
- e._length = 0, t === n && (r = we.double(r), n *= 2), r[t] = e, t += 1;
1542
- }
1543
- return e;
1544
- }(), Je = function() {
1545
- var e = -999999;
1546
- function t(e, t, n) {
1547
- var r = n.lastIndex, i, a, o, s, c, l, u, d, f, p = this.keyframes;
1548
- if (e < p[0].t - this.offsetTime) i = p[0].s[0], o = !0, r = 0;
1549
- else if (e >= p[p.length - 1].t - this.offsetTime) i = p[p.length - 1].s ? p[p.length - 1].s[0] : p[p.length - 2].e[0], o = !0;
1550
- else {
1551
- for (var m = r, h = p.length - 1, g = !0, _, v, y; g && (_ = p[m], v = p[m + 1], !(v.t - this.offsetTime > e));) m < h - 1 ? m += 1 : g = !1;
1552
- if (y = this.keyframesMetadata[m] || {}, o = _.h === 1, r = m, !o) {
1553
- if (e >= v.t - this.offsetTime) d = 1;
1554
- else if (e < _.t - this.offsetTime) d = 0;
1555
- else {
1556
- var b;
1557
- y.__fnct ? b = y.__fnct : (b = Ce.getBezierEasing(_.o.x, _.o.y, _.i.x, _.i.y).get, y.__fnct = b), d = b((e - (_.t - this.offsetTime)) / (v.t - this.offsetTime - (_.t - this.offsetTime)));
1558
- }
1559
- a = v.s ? v.s[0] : _.e[0];
1560
- }
1561
- i = _.s[0];
1562
- }
1563
- for (l = t._length, u = i.i[0].length, n.lastIndex = r, s = 0; s < l; s += 1) for (c = 0; c < u; c += 1) f = o ? i.i[s][c] : i.i[s][c] + (a.i[s][c] - i.i[s][c]) * d, t.i[s][c] = f, f = o ? i.o[s][c] : i.o[s][c] + (a.o[s][c] - i.o[s][c]) * d, t.o[s][c] = f, f = o ? i.v[s][c] : i.v[s][c] + (a.v[s][c] - i.v[s][c]) * d, t.v[s][c] = f;
1564
- }
1565
- function n() {
1566
- var t = this.comp.renderedFrame - this.offsetTime, n = this.keyframes[0].t - this.offsetTime, r = this.keyframes[this.keyframes.length - 1].t - this.offsetTime, i = this._caching.lastFrame;
1567
- return i !== e && (i < n && t < n || i > r && t > r) || (this._caching.lastIndex = i < t ? this._caching.lastIndex : 0, this.interpolateShape(t, this.pv, this._caching)), this._caching.lastFrame = t, this.pv;
1568
- }
1569
- function r() {
1570
- this.paths = this.localShapeCollection;
1571
- }
1572
- function i(e, t) {
1573
- if (e._length !== t._length || e.c !== t.c) return !1;
1574
- var n, r = e._length;
1575
- for (n = 0; n < r; n += 1) if (e.v[n][0] !== t.v[n][0] || e.v[n][1] !== t.v[n][1] || e.o[n][0] !== t.o[n][0] || e.o[n][1] !== t.o[n][1] || e.i[n][0] !== t.i[n][0] || e.i[n][1] !== t.i[n][1]) return !1;
1576
- return !0;
1577
- }
1578
- function a(e) {
1579
- i(this.v, e) || (this.v = W.clone(e), this.localShapeCollection.releaseShapes(), this.localShapeCollection.addShape(this.v), this._mdf = !0, this.paths = this.localShapeCollection);
1580
- }
1581
- function o() {
1582
- if (this.elem.globalData.frameId !== this.frameId) {
1583
- if (!this.effectsSequence.length) {
1584
- this._mdf = !1;
1585
- return;
1586
- }
1587
- if (this.lock) {
1588
- this.setVValue(this.pv);
1589
- return;
1590
- }
1591
- this.lock = !0, this._mdf = !1;
1592
- var e = this.kf ? this.pv : this.data.ks ? this.data.ks.k : this.data.pt.k, t, n = this.effectsSequence.length;
1593
- for (t = 0; t < n; t += 1) e = this.effectsSequence[t](e);
1594
- this.setVValue(e), this.lock = !1, this.frameId = this.elem.globalData.frameId;
1595
- }
1596
- }
1597
- function s(e, t, n) {
1598
- this.propType = "shape", this.comp = e.comp, this.container = e, this.elem = e, this.data = t, this.k = !1, this.kf = !1, this._mdf = !1;
1599
- var i = n === 3 ? t.pt.k : t.ks.k;
1600
- this.v = W.clone(i), this.pv = W.clone(this.v), this.localShapeCollection = qe.newShapeCollection(), this.paths = this.localShapeCollection, this.paths.addShape(this.v), this.reset = r, this.effectsSequence = [];
1601
- }
1602
- function c(e) {
1603
- this.effectsSequence.push(e), this.container.addDynamicProperty(this);
1604
- }
1605
- s.prototype.interpolateShape = t, s.prototype.getValue = o, s.prototype.setVValue = a, s.prototype.addEffect = c;
1606
- function l(t, i, a) {
1607
- this.propType = "shape", this.comp = t.comp, this.elem = t, this.container = t, this.offsetTime = t.data.st, this.keyframes = a === 3 ? i.pt.k : i.ks.k, this.keyframesMetadata = [], this.k = !0, this.kf = !0;
1608
- var o = this.keyframes[0].s[0].i.length;
1609
- this.v = W.newElement(), this.v.setPathData(this.keyframes[0].s[0].c, o), this.pv = W.clone(this.v), this.localShapeCollection = qe.newShapeCollection(), this.paths = this.localShapeCollection, this.paths.addShape(this.v), this.lastFrame = e, this.reset = r, this._caching = {
1610
- lastFrame: e,
1611
- lastIndex: 0
1612
- }, this.effectsSequence = [n.bind(this)];
1613
- }
1614
- l.prototype.getValue = o, l.prototype.interpolateShape = t, l.prototype.setVValue = a, l.prototype.addEffect = c;
1615
- var u = function() {
1616
- var e = k;
1617
- function t(e, t) {
1618
- this.v = W.newElement(), this.v.setPathData(!0, 4), this.localShapeCollection = qe.newShapeCollection(), this.paths = this.localShapeCollection, this.localShapeCollection.addShape(this.v), this.d = t.d, this.elem = e, this.comp = e.comp, this.frameId = -1, this.initDynamicPropertyContainer(e), this.p = H.getProp(e, t.p, 1, 0, this), this.s = H.getProp(e, t.s, 1, 0, this), this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertEllToPath());
1619
- }
1620
- return t.prototype = {
1621
- reset: r,
1622
- getValue: function() {
1623
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertEllToPath());
1624
- },
1625
- convertEllToPath: function() {
1626
- var t = this.p.v[0], n = this.p.v[1], r = this.s.v[0] / 2, i = this.s.v[1] / 2, a = this.d !== 3, o = this.v;
1627
- o.v[0][0] = t, o.v[0][1] = n - i, o.v[1][0] = a ? t + r : t - r, o.v[1][1] = n, o.v[2][0] = t, o.v[2][1] = n + i, o.v[3][0] = a ? t - r : t + r, o.v[3][1] = n, o.i[0][0] = a ? t - r * e : t + r * e, o.i[0][1] = n - i, o.i[1][0] = a ? t + r : t - r, o.i[1][1] = n - i * e, o.i[2][0] = a ? t + r * e : t - r * e, o.i[2][1] = n + i, o.i[3][0] = a ? t - r : t + r, o.i[3][1] = n + i * e, o.o[0][0] = a ? t + r * e : t - r * e, o.o[0][1] = n - i, o.o[1][0] = a ? t + r : t - r, o.o[1][1] = n + i * e, o.o[2][0] = a ? t - r * e : t + r * e, o.o[2][1] = n + i, o.o[3][0] = a ? t - r : t + r, o.o[3][1] = n - i * e;
1628
- }
1629
- }, d([U], t), t;
1630
- }(), f = function() {
1631
- function e(e, t) {
1632
- this.v = W.newElement(), this.v.setPathData(!0, 0), this.elem = e, this.comp = e.comp, this.data = t, this.frameId = -1, this.d = t.d, this.initDynamicPropertyContainer(e), t.sy === 1 ? (this.ir = H.getProp(e, t.ir, 0, 0, this), this.is = H.getProp(e, t.is, 0, .01, this), this.convertToPath = this.convertStarToPath) : this.convertToPath = this.convertPolygonToPath, this.pt = H.getProp(e, t.pt, 0, 0, this), this.p = H.getProp(e, t.p, 1, 0, this), this.r = H.getProp(e, t.r, 0, O, this), this.or = H.getProp(e, t.or, 0, 0, this), this.os = H.getProp(e, t.os, 0, .01, this), this.localShapeCollection = qe.newShapeCollection(), this.localShapeCollection.addShape(this.v), this.paths = this.localShapeCollection, this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertToPath());
1633
- }
1634
- return e.prototype = {
1635
- reset: r,
1636
- getValue: function() {
1637
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertToPath());
1638
- },
1639
- convertStarToPath: function() {
1640
- var e = Math.floor(this.pt.v) * 2, t = Math.PI * 2 / e, n = !0, r = this.or.v, i = this.ir.v, a = this.os.v, o = this.is.v, s = 2 * Math.PI * r / (e * 2), c = 2 * Math.PI * i / (e * 2), l, u, d, f, p = -Math.PI / 2;
1641
- p += this.r.v;
1642
- var m = this.data.d === 3 ? -1 : 1;
1643
- for (this.v._length = 0, l = 0; l < e; l += 1) {
1644
- u = n ? r : i, d = n ? a : o, f = n ? s : c;
1645
- var h = u * Math.cos(p), g = u * Math.sin(p), _ = h === 0 && g === 0 ? 0 : g / Math.sqrt(h * h + g * g), v = h === 0 && g === 0 ? 0 : -h / Math.sqrt(h * h + g * g);
1646
- h += +this.p.v[0], g += +this.p.v[1], this.v.setTripleAt(h, g, h - _ * f * d * m, g - v * f * d * m, h + _ * f * d * m, g + v * f * d * m, l, !0), n = !n, p += t * m;
1647
- }
1648
- },
1649
- convertPolygonToPath: function() {
1650
- var e = Math.floor(this.pt.v), t = Math.PI * 2 / e, n = this.or.v, r = this.os.v, i = 2 * Math.PI * n / (e * 4), a, o = -Math.PI * .5, s = this.data.d === 3 ? -1 : 1;
1651
- for (o += this.r.v, this.v._length = 0, a = 0; a < e; a += 1) {
1652
- var c = n * Math.cos(o), l = n * Math.sin(o), u = c === 0 && l === 0 ? 0 : l / Math.sqrt(c * c + l * l), d = c === 0 && l === 0 ? 0 : -c / Math.sqrt(c * c + l * l);
1653
- c += +this.p.v[0], l += +this.p.v[1], this.v.setTripleAt(c, l, c - u * i * r * s, l - d * i * r * s, c + u * i * r * s, l + d * i * r * s, a, !0), o += t * s;
1654
- }
1655
- this.paths.length = 0, this.paths[0] = this.v;
1656
- }
1657
- }, d([U], e), e;
1658
- }(), p = function() {
1659
- function e(e, t) {
1660
- this.v = W.newElement(), this.v.c = !0, this.localShapeCollection = qe.newShapeCollection(), this.localShapeCollection.addShape(this.v), this.paths = this.localShapeCollection, this.elem = e, this.comp = e.comp, this.frameId = -1, this.d = t.d, this.initDynamicPropertyContainer(e), this.p = H.getProp(e, t.p, 1, 0, this), this.s = H.getProp(e, t.s, 1, 0, this), this.r = H.getProp(e, t.r, 0, 0, this), this.dynamicProperties.length ? this.k = !0 : (this.k = !1, this.convertRectToPath());
1661
- }
1662
- return e.prototype = {
1663
- convertRectToPath: function() {
1664
- var e = this.p.v[0], t = this.p.v[1], n = this.s.v[0] / 2, r = this.s.v[1] / 2, i = T(n, r, this.r.v), a = i * (1 - k);
1665
- this.v._length = 0, this.d === 2 || this.d === 1 ? (this.v.setTripleAt(e + n, t - r + i, e + n, t - r + i, e + n, t - r + a, 0, !0), this.v.setTripleAt(e + n, t + r - i, e + n, t + r - a, e + n, t + r - i, 1, !0), i === 0 ? (this.v.setTripleAt(e - n, t + r, e - n + a, t + r, e - n, t + r, 2), this.v.setTripleAt(e - n, t - r, e - n, t - r + a, e - n, t - r, 3)) : (this.v.setTripleAt(e + n - i, t + r, e + n - i, t + r, e + n - a, t + r, 2, !0), this.v.setTripleAt(e - n + i, t + r, e - n + a, t + r, e - n + i, t + r, 3, !0), this.v.setTripleAt(e - n, t + r - i, e - n, t + r - i, e - n, t + r - a, 4, !0), this.v.setTripleAt(e - n, t - r + i, e - n, t - r + a, e - n, t - r + i, 5, !0), this.v.setTripleAt(e - n + i, t - r, e - n + i, t - r, e - n + a, t - r, 6, !0), this.v.setTripleAt(e + n - i, t - r, e + n - a, t - r, e + n - i, t - r, 7, !0))) : (this.v.setTripleAt(e + n, t - r + i, e + n, t - r + a, e + n, t - r + i, 0, !0), i === 0 ? (this.v.setTripleAt(e - n, t - r, e - n + a, t - r, e - n, t - r, 1, !0), this.v.setTripleAt(e - n, t + r, e - n, t + r - a, e - n, t + r, 2, !0), this.v.setTripleAt(e + n, t + r, e + n - a, t + r, e + n, t + r, 3, !0)) : (this.v.setTripleAt(e + n - i, t - r, e + n - i, t - r, e + n - a, t - r, 1, !0), this.v.setTripleAt(e - n + i, t - r, e - n + a, t - r, e - n + i, t - r, 2, !0), this.v.setTripleAt(e - n, t - r + i, e - n, t - r + i, e - n, t - r + a, 3, !0), this.v.setTripleAt(e - n, t + r - i, e - n, t + r - a, e - n, t + r - i, 4, !0), this.v.setTripleAt(e - n + i, t + r, e - n + i, t + r, e - n + a, t + r, 5, !0), this.v.setTripleAt(e + n - i, t + r, e + n - a, t + r, e + n - i, t + r, 6, !0), this.v.setTripleAt(e + n, t + r - i, e + n, t + r - i, e + n, t + r - a, 7, !0)));
1666
- },
1667
- getValue: function() {
1668
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf && this.convertRectToPath());
1669
- },
1670
- reset: r
1671
- }, d([U], e), e;
1672
- }();
1673
- function m(e, t, n) {
1674
- var r;
1675
- return n === 3 || n === 4 ? r = (n === 3 ? t.pt : t.ks).k.length ? new l(e, t, n) : new s(e, t, n) : n === 5 ? r = new p(e, t) : n === 6 ? r = new u(e, t) : n === 7 && (r = new f(e, t)), r.k && e.addDynamicProperty(r), r;
1676
- }
1677
- function h() {
1678
- return s;
1679
- }
1680
- function g() {
1681
- return l;
1682
- }
1683
- var _ = {};
1684
- return _.getShapeProp = m, _.getConstructorFunction = h, _.getKeyframedConstructorFunction = g, _;
1685
- }(), G = function() {
1686
- var e = Math.cos, t = Math.sin, n = Math.tan, r = Math.round;
1687
- function i() {
1688
- return this.props[0] = 1, this.props[1] = 0, this.props[2] = 0, this.props[3] = 0, this.props[4] = 0, this.props[5] = 1, this.props[6] = 0, this.props[7] = 0, this.props[8] = 0, this.props[9] = 0, this.props[10] = 1, this.props[11] = 0, this.props[12] = 0, this.props[13] = 0, this.props[14] = 0, this.props[15] = 1, this;
1689
- }
1690
- function a(n) {
1691
- if (n === 0) return this;
1692
- var r = e(n), i = t(n);
1693
- return this._t(r, -i, 0, 0, i, r, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1694
- }
1695
- function o(n) {
1696
- if (n === 0) return this;
1697
- var r = e(n), i = t(n);
1698
- return this._t(1, 0, 0, 0, 0, r, -i, 0, 0, i, r, 0, 0, 0, 0, 1);
1699
- }
1700
- function s(n) {
1701
- if (n === 0) return this;
1702
- var r = e(n), i = t(n);
1703
- return this._t(r, 0, i, 0, 0, 1, 0, 0, -i, 0, r, 0, 0, 0, 0, 1);
1704
- }
1705
- function c(n) {
1706
- if (n === 0) return this;
1707
- var r = e(n), i = t(n);
1708
- return this._t(r, -i, 0, 0, i, r, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1709
- }
1710
- function l(e, t) {
1711
- return this._t(1, t, e, 1, 0, 0);
1712
- }
1713
- function u(e, t) {
1714
- return this.shear(n(e), n(t));
1715
- }
1716
- function d(r, i) {
1717
- var a = e(i), o = t(i);
1718
- return this._t(a, o, 0, 0, -o, a, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(1, 0, 0, 0, n(r), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)._t(a, -o, 0, 0, o, a, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1719
- }
1720
- function f(e, t, n) {
1721
- return !n && n !== 0 && (n = 1), e === 1 && t === 1 && n === 1 ? this : this._t(e, 0, 0, 0, 0, t, 0, 0, 0, 0, n, 0, 0, 0, 0, 1);
1722
- }
1723
- function p(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
1724
- return this.props[0] = e, this.props[1] = t, this.props[2] = n, this.props[3] = r, this.props[4] = i, this.props[5] = a, this.props[6] = o, this.props[7] = s, this.props[8] = c, this.props[9] = l, this.props[10] = u, this.props[11] = d, this.props[12] = f, this.props[13] = p, this.props[14] = m, this.props[15] = h, this;
1725
- }
1726
- function h(e, t, n) {
1727
- return n ||= 0, e !== 0 || t !== 0 || n !== 0 ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, e, t, n, 1) : this;
1728
- }
1729
- function g(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
1730
- var g = this.props;
1731
- if (e === 1 && t === 0 && n === 0 && r === 0 && i === 0 && a === 1 && o === 0 && s === 0 && c === 0 && l === 0 && u === 1 && d === 0) return g[12] = g[12] * e + g[15] * f, g[13] = g[13] * a + g[15] * p, g[14] = g[14] * u + g[15] * m, g[15] *= h, this._identityCalculated = !1, this;
1732
- var _ = g[0], v = g[1], y = g[2], b = g[3], x = g[4], S = g[5], C = g[6], w = g[7], T = g[8], E = g[9], D = g[10], O = g[11], k = g[12], A = g[13], j = g[14], M = g[15];
1733
- return g[0] = _ * e + v * i + y * c + b * f, g[1] = _ * t + v * a + y * l + b * p, g[2] = _ * n + v * o + y * u + b * m, g[3] = _ * r + v * s + y * d + b * h, g[4] = x * e + S * i + C * c + w * f, g[5] = x * t + S * a + C * l + w * p, g[6] = x * n + S * o + C * u + w * m, g[7] = x * r + S * s + C * d + w * h, g[8] = T * e + E * i + D * c + O * f, g[9] = T * t + E * a + D * l + O * p, g[10] = T * n + E * o + D * u + O * m, g[11] = T * r + E * s + D * d + O * h, g[12] = k * e + A * i + j * c + M * f, g[13] = k * t + A * a + j * l + M * p, g[14] = k * n + A * o + j * u + M * m, g[15] = k * r + A * s + j * d + M * h, this._identityCalculated = !1, this;
1734
- }
1735
- function _(e) {
1736
- var t = e.props;
1737
- return this.transform(t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7], t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15]);
1738
- }
1739
- function v() {
1740
- return this._identityCalculated ||= (this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1), !0), this._identity;
1741
- }
1742
- function y(e) {
1743
- for (var t = 0; t < 16;) {
1744
- if (e.props[t] !== this.props[t]) return !1;
1745
- t += 1;
1746
- }
1747
- return !0;
1748
- }
1749
- function b(e) {
1750
- var t;
1751
- for (t = 0; t < 16; t += 1) e.props[t] = this.props[t];
1752
- return e;
1753
- }
1754
- function x(e) {
1755
- var t;
1756
- for (t = 0; t < 16; t += 1) this.props[t] = e[t];
1757
- }
1758
- function S(e, t, n) {
1759
- return {
1760
- x: e * this.props[0] + t * this.props[4] + n * this.props[8] + this.props[12],
1761
- y: e * this.props[1] + t * this.props[5] + n * this.props[9] + this.props[13],
1762
- z: e * this.props[2] + t * this.props[6] + n * this.props[10] + this.props[14]
1763
- };
1764
- }
1765
- function C(e, t, n) {
1766
- return e * this.props[0] + t * this.props[4] + n * this.props[8] + this.props[12];
1767
- }
1768
- function w(e, t, n) {
1769
- return e * this.props[1] + t * this.props[5] + n * this.props[9] + this.props[13];
1770
- }
1771
- function T(e, t, n) {
1772
- return e * this.props[2] + t * this.props[6] + n * this.props[10] + this.props[14];
1773
- }
1774
- function E() {
1775
- var e = this.props[0] * this.props[5] - this.props[1] * this.props[4], t = this.props[5] / e, n = -this.props[1] / e, r = -this.props[4] / e, i = this.props[0] / e, a = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / e, o = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / e, s = new G();
1776
- return s.props[0] = t, s.props[1] = n, s.props[4] = r, s.props[5] = i, s.props[12] = a, s.props[13] = o, s;
1777
- }
1778
- function D(e) {
1779
- return this.getInverseMatrix().applyToPointArray(e[0], e[1], e[2] || 0);
1780
- }
1781
- function O(e) {
1782
- var t, n = e.length, r = [];
1783
- for (t = 0; t < n; t += 1) r[t] = D(e[t]);
1784
- return r;
1785
- }
1786
- function k(e, t, n) {
1787
- var r = m("float32", 6);
1788
- if (this.isIdentity()) r[0] = e[0], r[1] = e[1], r[2] = t[0], r[3] = t[1], r[4] = n[0], r[5] = n[1];
1789
- else {
1790
- var i = this.props[0], a = this.props[1], o = this.props[4], s = this.props[5], c = this.props[12], l = this.props[13];
1791
- r[0] = e[0] * i + e[1] * o + c, r[1] = e[0] * a + e[1] * s + l, r[2] = t[0] * i + t[1] * o + c, r[3] = t[0] * a + t[1] * s + l, r[4] = n[0] * i + n[1] * o + c, r[5] = n[0] * a + n[1] * s + l;
1792
- }
1793
- return r;
1794
- }
1795
- function A(e, t, n) {
1796
- return this.isIdentity() ? [
1797
- e,
1798
- t,
1799
- n
1800
- ] : [
1801
- e * this.props[0] + t * this.props[4] + n * this.props[8] + this.props[12],
1802
- e * this.props[1] + t * this.props[5] + n * this.props[9] + this.props[13],
1803
- e * this.props[2] + t * this.props[6] + n * this.props[10] + this.props[14]
1804
- ];
1805
- }
1806
- function j(e, t) {
1807
- if (this.isIdentity()) return e + "," + t;
1808
- var n = this.props;
1809
- return Math.round((e * n[0] + t * n[4] + n[12]) * 100) / 100 + "," + Math.round((e * n[1] + t * n[5] + n[13]) * 100) / 100;
1810
- }
1811
- function M() {
1812
- for (var e = 0, t = this.props, n = "matrix3d(", i = 1e4; e < 16;) n += r(t[e] * i) / i, n += e === 15 ? ")" : ",", e += 1;
1813
- return n;
1814
- }
1815
- function N(e) {
1816
- var t = 1e4;
1817
- return e < 1e-6 && e > 0 || e > -1e-6 && e < 0 ? r(e * t) / t : e;
1818
- }
1819
- function P() {
1820
- var e = this.props, t = N(e[0]), n = N(e[1]), r = N(e[4]), i = N(e[5]), a = N(e[12]), o = N(e[13]);
1821
- return "matrix(" + t + "," + n + "," + r + "," + i + "," + a + "," + o + ")";
1822
- }
1823
- return function() {
1824
- this.reset = i, this.rotate = a, this.rotateX = o, this.rotateY = s, this.rotateZ = c, this.skew = u, this.skewFromAxis = d, this.shear = l, this.scale = f, this.setTransform = p, this.translate = h, this.transform = g, this.multiply = _, this.applyToPoint = S, this.applyToX = C, this.applyToY = w, this.applyToZ = T, this.applyToPointArray = A, this.applyToTriplePoints = k, this.applyToPointStringified = j, this.toCSS = M, this.to2dCSS = P, this.clone = b, this.cloneFromProps = x, this.equals = y, this.inversePoints = O, this.inversePoint = D, this.getInverseMatrix = E, this._t = this.transform, this.isIdentity = v, this._identity = !0, this._identityCalculated = !1, this.props = m("float32", 16), this.reset();
1825
- };
1826
- }();
1827
- function Ye(e) {
1828
- "@babel/helpers - typeof";
1829
- return Ye = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1830
- return typeof e;
1831
- } : function(e) {
1832
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1833
- }, Ye(e);
1834
- }
1835
- var K = {}, Xe = "__[STANDALONE]__", Ze = "__[ANIMATIONDATA]__", Qe = "";
1836
- function $e(e) {
1837
- c(e);
1838
- }
1839
- function et() {
1840
- Xe === !0 ? V.searchAnimations(Ze, Xe, Qe) : V.searchAnimations();
1841
- }
1842
- function tt(e) {
1843
- oe(e);
1844
- }
1845
- function nt(e) {
1846
- pe(e);
1847
- }
1848
- function rt(e) {
1849
- return Xe === !0 && (e.animationData = JSON.parse(Ze)), V.loadAnimation(e);
1850
- }
1851
- function it(e) {
1852
- if (typeof e == "string") switch (e) {
1853
- case "high":
1854
- de(200);
1855
- break;
1856
- default:
1857
- case "medium":
1858
- de(50);
1859
- break;
1860
- case "low":
1861
- de(10);
1862
- break;
1863
- }
1864
- else !isNaN(e) && e > 1 && de(e);
1865
- }
1866
- function at() {
1867
- return typeof navigator < "u";
1868
- }
1869
- function ot(e, t) {
1870
- e === "expressions" && ce(t);
1871
- }
1872
- function st(e) {
1873
- switch (e) {
1874
- case "propertyFactory": return H;
1875
- case "shapePropertyFactory": return Je;
1876
- case "matrix": return G;
1877
- default: return null;
1878
- }
1879
- }
1880
- K.play = V.play, K.pause = V.pause, K.setLocationHref = $e, K.togglePause = V.togglePause, K.setSpeed = V.setSpeed, K.setDirection = V.setDirection, K.stop = V.stop, K.searchAnimations = et, K.registerAnimation = V.registerAnimation, K.loadAnimation = rt, K.setSubframeRendering = tt, K.resize = V.resize, K.goToAndStop = V.goToAndStop, K.destroy = V.destroy, K.setQuality = it, K.inBrowser = at, K.installPlugin = ot, K.freeze = V.freeze, K.unfreeze = V.unfreeze, K.setVolume = V.setVolume, K.mute = V.mute, K.unmute = V.unmute, K.getRegisteredAnimations = V.getRegisteredAnimations, K.useWebWorker = o, K.setIDPrefix = nt, K.__getFactory = st, K.version = "5.13.0";
1881
- function ct() {
1882
- document.readyState === "complete" && (clearInterval(pt), et());
1883
- }
1884
- function lt(e) {
1885
- for (var t = ut.split("&"), n = 0; n < t.length; n += 1) {
1886
- var r = t[n].split("=");
1887
- if (decodeURIComponent(r[0]) == e) return decodeURIComponent(r[1]);
1888
- }
1889
- return null;
1890
- }
1891
- var ut = "";
1892
- if (Xe) {
1893
- var dt = document.getElementsByTagName("script"), ft = dt[dt.length - 1] || { src: "" };
1894
- ut = ft.src ? ft.src.replace(/^[^\?]+\??/, "") : "", Qe = lt("renderer");
1895
- }
1896
- var pt = setInterval(ct, 100);
1897
- try {
1898
- !((e === void 0 ? "undefined" : Ye(e)) === "object" && t !== void 0) && !(typeof define == "function" && define.amd) && (window.bodymovin = K);
1899
- } catch {}
1900
- var mt = function() {
1901
- var e = {}, t = {};
1902
- e.registerModifier = n, e.getModifier = r;
1903
- function n(e, n) {
1904
- t[e] || (t[e] = n);
1905
- }
1906
- function r(e, n, r) {
1907
- return new t[e](n, r);
1908
- }
1909
- return e;
1910
- }();
1911
- function q() {}
1912
- q.prototype.initModifierProperties = function() {}, q.prototype.addShapeToModifier = function() {}, q.prototype.addShape = function(e) {
1913
- if (!this.closed) {
1914
- e.sh.container.addDynamicProperty(e.sh);
1915
- var t = {
1916
- shape: e.sh,
1917
- data: e,
1918
- localShapeCollection: qe.newShapeCollection()
1919
- };
1920
- this.shapes.push(t), this.addShapeToModifier(t), this._isAnimated && e.setAsAnimated();
1921
- }
1922
- }, q.prototype.init = function(e, t) {
1923
- this.shapes = [], this.elem = e, this.initDynamicPropertyContainer(e), this.initModifierProperties(e, t), this.frameId = a, this.closed = !1, this.k = !1, this.dynamicProperties.length ? this.k = !0 : this.getValue(!0);
1924
- }, q.prototype.processKeys = function() {
1925
- this.elem.globalData.frameId !== this.frameId && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties());
1926
- }, d([U], q);
1927
- function ht() {}
1928
- d([q], ht), ht.prototype.initModifierProperties = function(e, t) {
1929
- this.s = H.getProp(e, t.s, 0, .01, this), this.e = H.getProp(e, t.e, 0, .01, this), this.o = H.getProp(e, t.o, 0, 0, this), this.sValue = 0, this.eValue = 0, this.getValue = this.processKeys, this.m = t.m, this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
1930
- }, ht.prototype.addShapeToModifier = function(e) {
1931
- e.pathsData = [];
1932
- }, ht.prototype.calculateShapeEdges = function(e, t, n, r, i) {
1933
- var a = [];
1934
- t <= 1 ? a.push({
1935
- s: e,
1936
- e: t
1937
- }) : e >= 1 ? a.push({
1938
- s: e - 1,
1939
- e: t - 1
1940
- }) : (a.push({
1941
- s: e,
1942
- e: 1
1943
- }), a.push({
1944
- s: 0,
1945
- e: t - 1
1946
- }));
1947
- var o = [], s, c = a.length, l;
1948
- for (s = 0; s < c; s += 1) if (l = a[s], !(l.e * i < r || l.s * i > r + n)) {
1949
- var u = l.s * i <= r ? 0 : (l.s * i - r) / n, d = l.e * i >= r + n ? 1 : (l.e * i - r) / n;
1950
- o.push([u, d]);
1951
- }
1952
- return o.length || o.push([0, 0]), o;
1953
- }, ht.prototype.releasePathsData = function(e) {
1954
- var t, n = e.length;
1955
- for (t = 0; t < n; t += 1) De.release(e[t]);
1956
- return e.length = 0, e;
1957
- }, ht.prototype.processShapes = function(e) {
1958
- var t, n;
1959
- if (this._mdf || e) {
1960
- var r = this.o.v % 360 / 360;
1961
- if (r < 0 && (r += 1), t = this.s.v > 1 ? 1 + r : this.s.v < 0 ? 0 + r : this.s.v + r, n = this.e.v > 1 ? 1 + r : this.e.v < 0 ? 0 + r : this.e.v + r, t > n) {
1962
- var i = t;
1963
- t = n, n = i;
1964
- }
1965
- t = Math.round(t * 1e4) * 1e-4, n = Math.round(n * 1e4) * 1e-4, this.sValue = t, this.eValue = n;
1966
- } else t = this.sValue, n = this.eValue;
1967
- var a, o, s = this.shapes.length, c, l, u, d, f, p = 0;
1968
- if (n === t) for (o = 0; o < s; o += 1) this.shapes[o].localShapeCollection.releaseShapes(), this.shapes[o].shape._mdf = !0, this.shapes[o].shape.paths = this.shapes[o].localShapeCollection, this._mdf && (this.shapes[o].pathsData.length = 0);
1969
- else if (!(n === 1 && t === 0 || n === 0 && t === 1)) {
1970
- var m = [], h, g;
1971
- for (o = 0; o < s; o += 1) if (h = this.shapes[o], !h.shape._mdf && !this._mdf && !e && this.m !== 2) h.shape.paths = h.localShapeCollection;
1972
- else {
1973
- if (a = h.shape.paths, l = a._length, f = 0, !h.shape._mdf && h.pathsData.length) f = h.totalShapeLength;
1974
- else {
1975
- for (u = this.releasePathsData(h.pathsData), c = 0; c < l; c += 1) d = ke.getSegmentsLength(a.shapes[c]), u.push(d), f += d.totalLength;
1976
- h.totalShapeLength = f, h.pathsData = u;
1977
- }
1978
- p += f, h.shape._mdf = !0;
1979
- }
1980
- var _ = t, v = n, y = 0, b;
1981
- for (o = s - 1; o >= 0; --o) if (h = this.shapes[o], h.shape._mdf) {
1982
- for (g = h.localShapeCollection, g.releaseShapes(), this.m === 2 && s > 1 ? (b = this.calculateShapeEdges(t, n, h.totalShapeLength, y, p), y += h.totalShapeLength) : b = [[_, v]], l = b.length, c = 0; c < l; c += 1) {
1983
- _ = b[c][0], v = b[c][1], m.length = 0, v <= 1 ? m.push({
1984
- s: h.totalShapeLength * _,
1985
- e: h.totalShapeLength * v
1986
- }) : _ >= 1 ? m.push({
1987
- s: h.totalShapeLength * (_ - 1),
1988
- e: h.totalShapeLength * (v - 1)
1989
- }) : (m.push({
1990
- s: h.totalShapeLength * _,
1991
- e: h.totalShapeLength
1992
- }), m.push({
1993
- s: 0,
1994
- e: h.totalShapeLength * (v - 1)
1995
- }));
1996
- var x = this.addShapes(h, m[0]);
1997
- if (m[0].s !== m[0].e) {
1998
- if (m.length > 1) if (h.shape.paths.shapes[h.shape.paths._length - 1].c) {
1999
- var S = x.pop();
2000
- this.addPaths(x, g), x = this.addShapes(h, m[1], S);
2001
- } else this.addPaths(x, g), x = this.addShapes(h, m[1]);
2002
- this.addPaths(x, g);
2003
- }
2004
- }
2005
- h.shape.paths = g;
2006
- }
2007
- } else if (this._mdf) for (o = 0; o < s; o += 1) this.shapes[o].pathsData.length = 0, this.shapes[o].shape._mdf = !0;
2008
- }, ht.prototype.addPaths = function(e, t) {
2009
- var n, r = e.length;
2010
- for (n = 0; n < r; n += 1) t.addShape(e[n]);
2011
- }, ht.prototype.addSegment = function(e, t, n, r, i, a, o) {
2012
- i.setXYAt(t[0], t[1], "o", a), i.setXYAt(n[0], n[1], "i", a + 1), o && i.setXYAt(e[0], e[1], "v", a), i.setXYAt(r[0], r[1], "v", a + 1);
2013
- }, ht.prototype.addSegmentFromArray = function(e, t, n, r) {
2014
- t.setXYAt(e[1], e[5], "o", n), t.setXYAt(e[2], e[6], "i", n + 1), r && t.setXYAt(e[0], e[4], "v", n), t.setXYAt(e[3], e[7], "v", n + 1);
2015
- }, ht.prototype.addShapes = function(e, t, n) {
2016
- var r = e.pathsData, i = e.shape.paths.shapes, a, o = e.shape.paths._length, s, c, l = 0, u, d, f, p, m = [], h, g = !0;
2017
- for (n ? (d = n._length, h = n._length) : (n = W.newElement(), d = 0, h = 0), m.push(n), a = 0; a < o; a += 1) {
2018
- for (f = r[a].lengths, n.c = i[a].c, c = i[a].c ? f.length : f.length + 1, s = 1; s < c; s += 1) if (u = f[s - 1], l + u.addedLength < t.s) l += u.addedLength, n.c = !1;
2019
- else if (l > t.e) {
2020
- n.c = !1;
2021
- break;
2022
- } else t.s <= l && t.e >= l + u.addedLength ? (this.addSegment(i[a].v[s - 1], i[a].o[s - 1], i[a].i[s], i[a].v[s], n, d, g), g = !1) : (p = ke.getNewSegment(i[a].v[s - 1], i[a].v[s], i[a].o[s - 1], i[a].i[s], (t.s - l) / u.addedLength, (t.e - l) / u.addedLength, f[s - 1]), this.addSegmentFromArray(p, n, d, g), g = !1, n.c = !1), l += u.addedLength, d += 1;
2023
- if (i[a].c && f.length) {
2024
- if (u = f[s - 1], l <= t.e) {
2025
- var _ = f[s - 1].addedLength;
2026
- t.s <= l && t.e >= l + _ ? (this.addSegment(i[a].v[s - 1], i[a].o[s - 1], i[a].i[0], i[a].v[0], n, d, g), g = !1) : (p = ke.getNewSegment(i[a].v[s - 1], i[a].v[0], i[a].o[s - 1], i[a].i[0], (t.s - l) / _, (t.e - l) / _, f[s - 1]), this.addSegmentFromArray(p, n, d, g), g = !1, n.c = !1);
2027
- } else n.c = !1;
2028
- l += u.addedLength, d += 1;
2029
- }
2030
- if (n._length && (n.setXYAt(n.v[h][0], n.v[h][1], "i", h), n.setXYAt(n.v[n._length - 1][0], n.v[n._length - 1][1], "o", n._length - 1)), l > t.e) break;
2031
- a < o - 1 && (n = W.newElement(), g = !0, m.push(n), d = 0);
2032
- }
2033
- return m;
2034
- };
2035
- function gt() {}
2036
- d([q], gt), gt.prototype.initModifierProperties = function(e, t) {
2037
- this.getValue = this.processKeys, this.amount = H.getProp(e, t.a, 0, null, this), this._isAnimated = !!this.amount.effectsSequence.length;
2038
- }, gt.prototype.processPath = function(e, t) {
2039
- var n = t / 100, r = [0, 0], i = e._length, a = 0;
2040
- for (a = 0; a < i; a += 1) r[0] += e.v[a][0], r[1] += e.v[a][1];
2041
- r[0] /= i, r[1] /= i;
2042
- var o = W.newElement();
2043
- o.c = e.c;
2044
- var s, c, l, u, d, f;
2045
- for (a = 0; a < i; a += 1) s = e.v[a][0] + (r[0] - e.v[a][0]) * n, c = e.v[a][1] + (r[1] - e.v[a][1]) * n, l = e.o[a][0] + (r[0] - e.o[a][0]) * -n, u = e.o[a][1] + (r[1] - e.o[a][1]) * -n, d = e.i[a][0] + (r[0] - e.i[a][0]) * -n, f = e.i[a][1] + (r[1] - e.i[a][1]) * -n, o.setTripleAt(s, c, l, u, d, f, a);
2046
- return o;
2047
- }, gt.prototype.processShapes = function(e) {
2048
- var t, n, r = this.shapes.length, i, a, o = this.amount.v;
2049
- if (o !== 0) {
2050
- var s, c;
2051
- for (n = 0; n < r; n += 1) {
2052
- if (s = this.shapes[n], c = s.localShapeCollection, !(!s.shape._mdf && !this._mdf && !e)) for (c.releaseShapes(), s.shape._mdf = !0, t = s.shape.paths.shapes, a = s.shape.paths._length, i = 0; i < a; i += 1) c.addShape(this.processPath(t[i], o));
2053
- s.shape.paths = s.localShapeCollection;
2054
- }
2055
- }
2056
- this.dynamicProperties.length || (this._mdf = !1);
2057
- };
2058
- var _t = function() {
2059
- var e = [0, 0];
2060
- function t(e) {
2061
- var t = this._mdf;
2062
- this.iterateDynamicProperties(), this._mdf = this._mdf || t, this.a && e.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.s && e.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && e.skewFromAxis(-this.sk.v, this.sa.v), this.r ? e.rotate(-this.r.v) : e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.data.p.s ? this.data.p.z ? e.translate(this.px.v, this.py.v, -this.pz.v) : e.translate(this.px.v, this.py.v, 0) : e.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
2063
- }
2064
- function n(t) {
2065
- if (this.elem.globalData.frameId !== this.frameId) {
2066
- if (this._isDirty &&= (this.precalculateMatrix(), !1), this.iterateDynamicProperties(), this._mdf || t) {
2067
- var n;
2068
- if (this.v.cloneFromProps(this.pre.props), this.appliedTransformations < 1 && this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations < 2 && this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && this.appliedTransformations < 3 && this.v.skewFromAxis(-this.sk.v, this.sa.v), this.r && this.appliedTransformations < 4 ? this.v.rotate(-this.r.v) : !this.r && this.appliedTransformations < 4 && this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.autoOriented) {
2069
- var r, i;
2070
- if (n = this.elem.globalData.frameRate, this.p && this.p.keyframes && this.p.getValueAtTime) this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t ? (r = this.p.getValueAtTime((this.p.keyframes[0].t + .01) / n, 0), i = this.p.getValueAtTime(this.p.keyframes[0].t / n, 0)) : this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t ? (r = this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length - 1].t / n, 0), i = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - .05) / n, 0)) : (r = this.p.pv, i = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - .01) / n, this.p.offsetTime));
2071
- else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
2072
- r = [], i = [];
2073
- var a = this.px, o = this.py;
2074
- a._caching.lastFrame + a.offsetTime <= a.keyframes[0].t ? (r[0] = a.getValueAtTime((a.keyframes[0].t + .01) / n, 0), r[1] = o.getValueAtTime((o.keyframes[0].t + .01) / n, 0), i[0] = a.getValueAtTime(a.keyframes[0].t / n, 0), i[1] = o.getValueAtTime(o.keyframes[0].t / n, 0)) : a._caching.lastFrame + a.offsetTime >= a.keyframes[a.keyframes.length - 1].t ? (r[0] = a.getValueAtTime(a.keyframes[a.keyframes.length - 1].t / n, 0), r[1] = o.getValueAtTime(o.keyframes[o.keyframes.length - 1].t / n, 0), i[0] = a.getValueAtTime((a.keyframes[a.keyframes.length - 1].t - .01) / n, 0), i[1] = o.getValueAtTime((o.keyframes[o.keyframes.length - 1].t - .01) / n, 0)) : (r = [a.pv, o.pv], i[0] = a.getValueAtTime((a._caching.lastFrame + a.offsetTime - .01) / n, a.offsetTime), i[1] = o.getValueAtTime((o._caching.lastFrame + o.offsetTime - .01) / n, o.offsetTime));
2075
- } else i = e, r = i;
2076
- this.v.rotate(-Math.atan2(r[1] - i[1], r[0] - i[0]));
2077
- }
2078
- this.data.p && this.data.p.s ? this.data.p.z ? this.v.translate(this.px.v, this.py.v, -this.pz.v) : this.v.translate(this.px.v, this.py.v, 0) : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
2079
- }
2080
- this.frameId = this.elem.globalData.frameId;
2081
- }
2082
- }
2083
- function r() {
2084
- if (this.appliedTransformations = 0, this.pre.reset(), !this.a.effectsSequence.length) this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations = 1;
2085
- else return;
2086
- if (!this.s.effectsSequence.length) this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.appliedTransformations = 2;
2087
- else return;
2088
- if (this.sk) if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) this.pre.skewFromAxis(-this.sk.v, this.sa.v), this.appliedTransformations = 3;
2089
- else return;
2090
- this.r ? this.r.effectsSequence.length || (this.pre.rotate(-this.r.v), this.appliedTransformations = 4) : !this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length && (this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]), this.appliedTransformations = 4);
2091
- }
2092
- function i() {}
2093
- function a(e) {
2094
- this._addDynamicProperty(e), this.elem.addDynamicProperty(e), this._isDirty = !0;
2095
- }
2096
- function o(e, t, n) {
2097
- if (this.elem = e, this.frameId = -1, this.propType = "transform", this.data = t, this.v = new G(), this.pre = new G(), this.appliedTransformations = 0, this.initDynamicPropertyContainer(n || e), t.p && t.p.s ? (this.px = H.getProp(e, t.p.x, 0, 0, this), this.py = H.getProp(e, t.p.y, 0, 0, this), t.p.z && (this.pz = H.getProp(e, t.p.z, 0, 0, this))) : this.p = H.getProp(e, t.p || { k: [
2098
- 0,
2099
- 0,
2100
- 0
2101
- ] }, 1, 0, this), t.rx) {
2102
- if (this.rx = H.getProp(e, t.rx, 0, O, this), this.ry = H.getProp(e, t.ry, 0, O, this), this.rz = H.getProp(e, t.rz, 0, O, this), t.or.k[0].ti) {
2103
- var r, i = t.or.k.length;
2104
- for (r = 0; r < i; r += 1) t.or.k[r].to = null, t.or.k[r].ti = null;
2105
- }
2106
- this.or = H.getProp(e, t.or, 1, O, this), this.or.sh = !0;
2107
- } else this.r = H.getProp(e, t.r || { k: 0 }, 0, O, this);
2108
- t.sk && (this.sk = H.getProp(e, t.sk, 0, O, this), this.sa = H.getProp(e, t.sa, 0, O, this)), this.a = H.getProp(e, t.a || { k: [
2109
- 0,
2110
- 0,
2111
- 0
2112
- ] }, 1, 0, this), this.s = H.getProp(e, t.s || { k: [
2113
- 100,
2114
- 100,
2115
- 100
2116
- ] }, 1, .01, this), t.o ? this.o = H.getProp(e, t.o, 0, .01, e) : this.o = {
2117
- _mdf: !1,
2118
- v: 1
2119
- }, this._isDirty = !0, this.dynamicProperties.length || this.getValue(!0);
2120
- }
2121
- o.prototype = {
2122
- applyToMatrix: t,
2123
- getValue: n,
2124
- precalculateMatrix: r,
2125
- autoOrient: i
2126
- }, d([U], o), o.prototype.addDynamicProperty = a, o.prototype._addDynamicProperty = U.prototype.addDynamicProperty;
2127
- function s(e, t, n) {
2128
- return new o(e, t, n);
2129
- }
2130
- return { getTransformProperty: s };
2131
- }();
2132
- function vt() {}
2133
- d([q], vt), vt.prototype.initModifierProperties = function(e, t) {
2134
- this.getValue = this.processKeys, this.c = H.getProp(e, t.c, 0, null, this), this.o = H.getProp(e, t.o, 0, null, this), this.tr = _t.getTransformProperty(e, t.tr, this), this.so = H.getProp(e, t.tr.so, 0, .01, this), this.eo = H.getProp(e, t.tr.eo, 0, .01, this), this.data = t, this.dynamicProperties.length || this.getValue(!0), this._isAnimated = !!this.dynamicProperties.length, this.pMatrix = new G(), this.rMatrix = new G(), this.sMatrix = new G(), this.tMatrix = new G(), this.matrix = new G();
2135
- }, vt.prototype.applyTransforms = function(e, t, n, r, i, a) {
2136
- var o = a ? -1 : 1, s = r.s.v[0] + (1 - r.s.v[0]) * (1 - i), c = r.s.v[1] + (1 - r.s.v[1]) * (1 - i);
2137
- e.translate(r.p.v[0] * o * i, r.p.v[1] * o * i, r.p.v[2]), t.translate(-r.a.v[0], -r.a.v[1], r.a.v[2]), t.rotate(-r.r.v * o * i), t.translate(r.a.v[0], r.a.v[1], r.a.v[2]), n.translate(-r.a.v[0], -r.a.v[1], r.a.v[2]), n.scale(a ? 1 / s : s, a ? 1 / c : c), n.translate(r.a.v[0], r.a.v[1], r.a.v[2]);
2138
- }, vt.prototype.init = function(e, t, n, r) {
2139
- for (this.elem = e, this.arr = t, this.pos = n, this.elemsData = r, this._currentCopies = 0, this._elements = [], this._groups = [], this.frameId = -1, this.initDynamicPropertyContainer(e), this.initModifierProperties(e, t[n]); n > 0;) --n, this._elements.unshift(t[n]);
2140
- this.dynamicProperties.length ? this.k = !0 : this.getValue(!0);
2141
- }, vt.prototype.resetElements = function(e) {
2142
- var t, n = e.length;
2143
- for (t = 0; t < n; t += 1) e[t]._processed = !1, e[t].ty === "gr" && this.resetElements(e[t].it);
2144
- }, vt.prototype.cloneElements = function(e) {
2145
- var t = JSON.parse(JSON.stringify(e));
2146
- return this.resetElements(t), t;
2147
- }, vt.prototype.changeGroupRender = function(e, t) {
2148
- var n, r = e.length;
2149
- for (n = 0; n < r; n += 1) e[n]._render = t, e[n].ty === "gr" && this.changeGroupRender(e[n].it, t);
2150
- }, vt.prototype.processShapes = function(e) {
2151
- var t, n, r, i, a, o = !1;
2152
- if (this._mdf || e) {
2153
- var s = Math.ceil(this.c.v);
2154
- if (this._groups.length < s) {
2155
- for (; this._groups.length < s;) {
2156
- var c = {
2157
- it: this.cloneElements(this._elements),
2158
- ty: "gr"
2159
- };
2160
- c.it.push({
2161
- a: {
2162
- a: 0,
2163
- ix: 1,
2164
- k: [0, 0]
2165
- },
2166
- nm: "Transform",
2167
- o: {
2168
- a: 0,
2169
- ix: 7,
2170
- k: 100
2171
- },
2172
- p: {
2173
- a: 0,
2174
- ix: 2,
2175
- k: [0, 0]
2176
- },
2177
- r: {
2178
- a: 1,
2179
- ix: 6,
2180
- k: [{
2181
- s: 0,
2182
- e: 0,
2183
- t: 0
2184
- }, {
2185
- s: 0,
2186
- e: 0,
2187
- t: 1
2188
- }]
2189
- },
2190
- s: {
2191
- a: 0,
2192
- ix: 3,
2193
- k: [100, 100]
2194
- },
2195
- sa: {
2196
- a: 0,
2197
- ix: 5,
2198
- k: 0
2199
- },
2200
- sk: {
2201
- a: 0,
2202
- ix: 4,
2203
- k: 0
2204
- },
2205
- ty: "tr"
2206
- }), this.arr.splice(0, 0, c), this._groups.splice(0, 0, c), this._currentCopies += 1;
2207
- }
2208
- this.elem.reloadShapes(), o = !0;
2209
- }
2210
- a = 0;
2211
- var l;
2212
- for (r = 0; r <= this._groups.length - 1; r += 1) {
2213
- if (l = a < s, this._groups[r]._render = l, this.changeGroupRender(this._groups[r].it, l), !l) {
2214
- var u = this.elemsData[r].it, d = u[u.length - 1];
2215
- d.transform.op.v === 0 ? d.transform.op._mdf = !1 : (d.transform.op._mdf = !0, d.transform.op.v = 0);
2216
- }
2217
- a += 1;
2218
- }
2219
- this._currentCopies = s;
2220
- var f = this.o.v, p = f % 1, m = f > 0 ? Math.floor(f) : Math.ceil(f), h = this.pMatrix.props, g = this.rMatrix.props, _ = this.sMatrix.props;
2221
- this.pMatrix.reset(), this.rMatrix.reset(), this.sMatrix.reset(), this.tMatrix.reset(), this.matrix.reset();
2222
- var v = 0;
2223
- if (f > 0) {
2224
- for (; v < m;) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1), v += 1;
2225
- p && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, p, !1), v += p);
2226
- } else if (f < 0) {
2227
- for (; v > m;) this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !0), --v;
2228
- p && (this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -p, !0), v -= p);
2229
- }
2230
- r = this.data.m === 1 ? 0 : this._currentCopies - 1, i = this.data.m === 1 ? 1 : -1, a = this._currentCopies;
2231
- for (var y, b; a;) {
2232
- if (t = this.elemsData[r].it, n = t[t.length - 1].transform.mProps.v.props, b = n.length, t[t.length - 1].transform.mProps._mdf = !0, t[t.length - 1].transform.op._mdf = !0, t[t.length - 1].transform.op.v = this._currentCopies === 1 ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (r / (this._currentCopies - 1)), v !== 0) {
2233
- for ((r !== 0 && i === 1 || r !== this._currentCopies - 1 && i === -1) && this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1), this.matrix.transform(g[0], g[1], g[2], g[3], g[4], g[5], g[6], g[7], g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15]), this.matrix.transform(_[0], _[1], _[2], _[3], _[4], _[5], _[6], _[7], _[8], _[9], _[10], _[11], _[12], _[13], _[14], _[15]), this.matrix.transform(h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7], h[8], h[9], h[10], h[11], h[12], h[13], h[14], h[15]), y = 0; y < b; y += 1) n[y] = this.matrix.props[y];
2234
- this.matrix.reset();
2235
- } else for (this.matrix.reset(), y = 0; y < b; y += 1) n[y] = this.matrix.props[y];
2236
- v += 1, --a, r += i;
2237
- }
2238
- } else for (a = this._currentCopies, r = 0, i = 1; a;) t = this.elemsData[r].it, n = t[t.length - 1].transform.mProps.v.props, t[t.length - 1].transform.mProps._mdf = !1, t[t.length - 1].transform.op._mdf = !1, --a, r += i;
2239
- return o;
2240
- }, vt.prototype.addShape = function() {};
2241
- function yt() {}
2242
- d([q], yt), yt.prototype.initModifierProperties = function(e, t) {
2243
- this.getValue = this.processKeys, this.rd = H.getProp(e, t.r, 0, null, this), this._isAnimated = !!this.rd.effectsSequence.length;
2244
- }, yt.prototype.processPath = function(e, t) {
2245
- var n = W.newElement();
2246
- n.c = e.c;
2247
- var r, i = e._length, a, o, s, c, l, u, d = 0, f, p, m, h, g, _;
2248
- for (r = 0; r < i; r += 1) a = e.v[r], s = e.o[r], o = e.i[r], a[0] === s[0] && a[1] === s[1] && a[0] === o[0] && a[1] === o[1] ? (r === 0 || r === i - 1) && !e.c ? (n.setTripleAt(a[0], a[1], s[0], s[1], o[0], o[1], d), d += 1) : (c = r === 0 ? e.v[i - 1] : e.v[r - 1], l = Math.sqrt((a[0] - c[0]) ** 2 + (a[1] - c[1]) ** 2), u = l ? Math.min(l / 2, t) / l : 0, g = a[0] + (c[0] - a[0]) * u, f = g, _ = a[1] - (a[1] - c[1]) * u, p = _, m = f - (f - a[0]) * k, h = p - (p - a[1]) * k, n.setTripleAt(f, p, m, h, g, _, d), d += 1, c = r === i - 1 ? e.v[0] : e.v[r + 1], l = Math.sqrt((a[0] - c[0]) ** 2 + (a[1] - c[1]) ** 2), u = l ? Math.min(l / 2, t) / l : 0, m = a[0] + (c[0] - a[0]) * u, f = m, h = a[1] + (c[1] - a[1]) * u, p = h, g = f - (f - a[0]) * k, _ = p - (p - a[1]) * k, n.setTripleAt(f, p, m, h, g, _, d), d += 1) : (n.setTripleAt(e.v[r][0], e.v[r][1], e.o[r][0], e.o[r][1], e.i[r][0], e.i[r][1], d), d += 1);
2249
- return n;
2250
- }, yt.prototype.processShapes = function(e) {
2251
- var t, n, r = this.shapes.length, i, a, o = this.rd.v;
2252
- if (o !== 0) {
2253
- var s, c;
2254
- for (n = 0; n < r; n += 1) {
2255
- if (s = this.shapes[n], c = s.localShapeCollection, !(!s.shape._mdf && !this._mdf && !e)) for (c.releaseShapes(), s.shape._mdf = !0, t = s.shape.paths.shapes, a = s.shape.paths._length, i = 0; i < a; i += 1) c.addShape(this.processPath(t[i], o));
2256
- s.shape.paths = s.localShapeCollection;
2257
- }
2258
- }
2259
- this.dynamicProperties.length || (this._mdf = !1);
2260
- };
2261
- function bt(e, t) {
2262
- return Math.abs(e - t) * 1e5 <= Math.min(Math.abs(e), Math.abs(t));
2263
- }
2264
- function xt(e) {
2265
- return Math.abs(e) <= 1e-5;
2266
- }
2267
- function St(e, t, n) {
2268
- return e * (1 - n) + t * n;
2269
- }
2270
- function Ct(e, t, n) {
2271
- return [St(e[0], t[0], n), St(e[1], t[1], n)];
2272
- }
2273
- function wt(e, t, n) {
2274
- if (e === 0) return [];
2275
- var r = t * t - 4 * e * n;
2276
- if (r < 0) return [];
2277
- var i = -t / (2 * e);
2278
- if (r === 0) return [i];
2279
- var a = Math.sqrt(r) / (2 * e);
2280
- return [i - a, i + a];
2281
- }
2282
- function Tt(e, t, n, r) {
2283
- return [
2284
- -e + 3 * t - 3 * n + r,
2285
- 3 * e - 6 * t + 3 * n,
2286
- -3 * e + 3 * t,
2287
- e
2288
- ];
2289
- }
2290
- function Et(e) {
2291
- return new J(e, e, e, e, !1);
2292
- }
2293
- function J(e, t, n, r, i) {
2294
- i && It(e, t) && (t = Ct(e, r, 1 / 3)), i && It(n, r) && (n = Ct(e, r, 2 / 3));
2295
- var a = Tt(e[0], t[0], n[0], r[0]), o = Tt(e[1], t[1], n[1], r[1]);
2296
- this.a = [a[0], o[0]], this.b = [a[1], o[1]], this.c = [a[2], o[2]], this.d = [a[3], o[3]], this.points = [
2297
- e,
2298
- t,
2299
- n,
2300
- r
2301
- ];
2302
- }
2303
- J.prototype.point = function(e) {
2304
- return [((this.a[0] * e + this.b[0]) * e + this.c[0]) * e + this.d[0], ((this.a[1] * e + this.b[1]) * e + this.c[1]) * e + this.d[1]];
2305
- }, J.prototype.derivative = function(e) {
2306
- return [(3 * e * this.a[0] + 2 * this.b[0]) * e + this.c[0], (3 * e * this.a[1] + 2 * this.b[1]) * e + this.c[1]];
2307
- }, J.prototype.tangentAngle = function(e) {
2308
- var t = this.derivative(e);
2309
- return Math.atan2(t[1], t[0]);
2310
- }, J.prototype.normalAngle = function(e) {
2311
- var t = this.derivative(e);
2312
- return Math.atan2(t[0], t[1]);
2313
- }, J.prototype.inflectionPoints = function() {
2314
- var e = this.a[1] * this.b[0] - this.a[0] * this.b[1];
2315
- if (xt(e)) return [];
2316
- var t = -.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1]) / e, n = t * t - 1 / 3 * (this.b[1] * this.c[0] - this.b[0] * this.c[1]) / e;
2317
- if (n < 0) return [];
2318
- var r = Math.sqrt(n);
2319
- return xt(r) ? r > 0 && r < 1 ? [t] : [] : [t - r, t + r].filter(function(e) {
2320
- return e > 0 && e < 1;
2321
- });
2322
- }, J.prototype.split = function(e) {
2323
- if (e <= 0) return [Et(this.points[0]), this];
2324
- if (e >= 1) return [this, Et(this.points[this.points.length - 1])];
2325
- var t = Ct(this.points[0], this.points[1], e), n = Ct(this.points[1], this.points[2], e), r = Ct(this.points[2], this.points[3], e), i = Ct(t, n, e), a = Ct(n, r, e), o = Ct(i, a, e);
2326
- return [new J(this.points[0], t, i, o, !0), new J(o, a, r, this.points[3], !0)];
2327
- };
2328
- function Dt(e, t) {
2329
- var n = e.points[0][t], r = e.points[e.points.length - 1][t];
2330
- if (n > r) {
2331
- var i = r;
2332
- r = n, n = i;
2333
- }
2334
- for (var a = wt(3 * e.a[t], 2 * e.b[t], e.c[t]), o = 0; o < a.length; o += 1) if (a[o] > 0 && a[o] < 1) {
2335
- var s = e.point(a[o])[t];
2336
- s < n ? n = s : s > r && (r = s);
2337
- }
2338
- return {
2339
- min: n,
2340
- max: r
2341
- };
2342
- }
2343
- J.prototype.bounds = function() {
2344
- return {
2345
- x: Dt(this, 0),
2346
- y: Dt(this, 1)
2347
- };
2348
- }, J.prototype.boundingBox = function() {
2349
- var e = this.bounds();
2350
- return {
2351
- left: e.x.min,
2352
- right: e.x.max,
2353
- top: e.y.min,
2354
- bottom: e.y.max,
2355
- width: e.x.max - e.x.min,
2356
- height: e.y.max - e.y.min,
2357
- cx: (e.x.max + e.x.min) / 2,
2358
- cy: (e.y.max + e.y.min) / 2
2359
- };
2360
- };
2361
- function Ot(e, t, n) {
2362
- var r = e.boundingBox();
2363
- return {
2364
- cx: r.cx,
2365
- cy: r.cy,
2366
- width: r.width,
2367
- height: r.height,
2368
- bez: e,
2369
- t: (t + n) / 2,
2370
- t1: t,
2371
- t2: n
2372
- };
2373
- }
2374
- function kt(e) {
2375
- var t = e.bez.split(.5);
2376
- return [Ot(t[0], e.t1, e.t), Ot(t[1], e.t, e.t2)];
2377
- }
2378
- function At(e, t) {
2379
- return Math.abs(e.cx - t.cx) * 2 < e.width + t.width && Math.abs(e.cy - t.cy) * 2 < e.height + t.height;
2380
- }
2381
- function jt(e, t, n, r, i, a) {
2382
- if (At(e, t)) {
2383
- if (n >= a || e.width <= r && e.height <= r && t.width <= r && t.height <= r) {
2384
- i.push([e.t, t.t]);
2385
- return;
2386
- }
2387
- var o = kt(e), s = kt(t);
2388
- jt(o[0], s[0], n + 1, r, i, a), jt(o[0], s[1], n + 1, r, i, a), jt(o[1], s[0], n + 1, r, i, a), jt(o[1], s[1], n + 1, r, i, a);
2389
- }
2390
- }
2391
- J.prototype.intersections = function(e, t, n) {
2392
- t === void 0 && (t = 2), n === void 0 && (n = 7);
2393
- var r = [];
2394
- return jt(Ot(this, 0, 1), Ot(e, 0, 1), 0, t, r, n), r;
2395
- }, J.shapeSegment = function(e, t) {
2396
- var n = (t + 1) % e.length();
2397
- return new J(e.v[t], e.o[t], e.i[n], e.v[n], !0);
2398
- }, J.shapeSegmentInverted = function(e, t) {
2399
- var n = (t + 1) % e.length();
2400
- return new J(e.v[n], e.i[n], e.o[t], e.v[t], !0);
2401
- };
2402
- function Mt(e, t) {
2403
- return [
2404
- e[1] * t[2] - e[2] * t[1],
2405
- e[2] * t[0] - e[0] * t[2],
2406
- e[0] * t[1] - e[1] * t[0]
2407
- ];
2408
- }
2409
- function Nt(e, t, n, r) {
2410
- var i = [
2411
- e[0],
2412
- e[1],
2413
- 1
2414
- ], a = [
2415
- t[0],
2416
- t[1],
2417
- 1
2418
- ], o = [
2419
- n[0],
2420
- n[1],
2421
- 1
2422
- ], s = [
2423
- r[0],
2424
- r[1],
2425
- 1
2426
- ], c = Mt(Mt(i, a), Mt(o, s));
2427
- return xt(c[2]) ? null : [c[0] / c[2], c[1] / c[2]];
2428
- }
2429
- function Pt(e, t, n) {
2430
- return [e[0] + Math.cos(t) * n, e[1] - Math.sin(t) * n];
2431
- }
2432
- function Ft(e, t) {
2433
- return Math.hypot(e[0] - t[0], e[1] - t[1]);
2434
- }
2435
- function It(e, t) {
2436
- return bt(e[0], t[0]) && bt(e[1], t[1]);
2437
- }
2438
- function Lt() {}
2439
- d([q], Lt), Lt.prototype.initModifierProperties = function(e, t) {
2440
- this.getValue = this.processKeys, this.amplitude = H.getProp(e, t.s, 0, null, this), this.frequency = H.getProp(e, t.r, 0, null, this), this.pointsType = H.getProp(e, t.pt, 0, null, this), this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0;
2441
- };
2442
- function Rt(e, t, n, r, i, a, o) {
2443
- var s = n - Math.PI / 2, c = n + Math.PI / 2, l = t[0] + Math.cos(n) * r * i, u = t[1] - Math.sin(n) * r * i;
2444
- e.setTripleAt(l, u, l + Math.cos(s) * a, u - Math.sin(s) * a, l + Math.cos(c) * o, u - Math.sin(c) * o, e.length());
2445
- }
2446
- function zt(e, t) {
2447
- var n = [t[0] - e[0], t[1] - e[1]], r = -Math.PI * .5;
2448
- return [Math.cos(r) * n[0] - Math.sin(r) * n[1], Math.sin(r) * n[0] + Math.cos(r) * n[1]];
2449
- }
2450
- function Bt(e, t) {
2451
- var n = t === 0 ? e.length() - 1 : t - 1, r = (t + 1) % e.length(), i = e.v[n], a = e.v[r], o = zt(i, a);
2452
- return Math.atan2(0, 1) - Math.atan2(o[1], o[0]);
2453
- }
2454
- function Vt(e, t, n, r, i, a, o) {
2455
- var s = Bt(t, n), c = t.v[n % t._length], l = t.v[n === 0 ? t._length - 1 : n - 1], u = t.v[(n + 1) % t._length], d = a === 2 ? Math.sqrt((c[0] - l[0]) ** 2 + (c[1] - l[1]) ** 2) : 0, f = a === 2 ? Math.sqrt((c[0] - u[0]) ** 2 + (c[1] - u[1]) ** 2) : 0;
2456
- Rt(e, t.v[n % t._length], s, o, r, f / ((i + 1) * 2), d / ((i + 1) * 2), a);
2457
- }
2458
- function Ht(e, t, n, r, i, a) {
2459
- for (var o = 0; o < r; o += 1) {
2460
- var s = (o + 1) / (r + 1), c = i === 2 ? Math.sqrt((t.points[3][0] - t.points[0][0]) ** 2 + (t.points[3][1] - t.points[0][1]) ** 2) : 0, l = t.normalAngle(s);
2461
- Rt(e, t.point(s), l, a, n, c / ((r + 1) * 2), c / ((r + 1) * 2), i), a = -a;
2462
- }
2463
- return a;
2464
- }
2465
- Lt.prototype.processPath = function(e, t, n, r) {
2466
- var i = e._length, a = W.newElement();
2467
- if (a.c = e.c, e.c || --i, i === 0) return a;
2468
- var o = -1, s = J.shapeSegment(e, 0);
2469
- Vt(a, e, 0, t, n, r, o);
2470
- for (var c = 0; c < i; c += 1) o = Ht(a, s, t, n, r, -o), s = c === i - 1 && !e.c ? null : J.shapeSegment(e, (c + 1) % i), Vt(a, e, c + 1, t, n, r, o);
2471
- return a;
2472
- }, Lt.prototype.processShapes = function(e) {
2473
- var t, n, r = this.shapes.length, i, a, o = this.amplitude.v, s = Math.max(0, Math.round(this.frequency.v)), c = this.pointsType.v;
2474
- if (o !== 0) {
2475
- var l, u;
2476
- for (n = 0; n < r; n += 1) {
2477
- if (l = this.shapes[n], u = l.localShapeCollection, !(!l.shape._mdf && !this._mdf && !e)) for (u.releaseShapes(), l.shape._mdf = !0, t = l.shape.paths.shapes, a = l.shape.paths._length, i = 0; i < a; i += 1) u.addShape(this.processPath(t[i], o, s, c));
2478
- l.shape.paths = l.localShapeCollection;
2479
- }
2480
- }
2481
- this.dynamicProperties.length || (this._mdf = !1);
2482
- };
2483
- function Ut(e, t, n) {
2484
- var r = Math.atan2(t[0] - e[0], t[1] - e[1]);
2485
- return [Pt(e, r, n), Pt(t, r, n)];
2486
- }
2487
- function Wt(e, t) {
2488
- var n, r, i, a, o, s, c = Ut(e.points[0], e.points[1], t);
2489
- n = c[0], r = c[1], c = Ut(e.points[1], e.points[2], t), i = c[0], a = c[1], c = Ut(e.points[2], e.points[3], t), o = c[0], s = c[1];
2490
- var l = Nt(n, r, i, a);
2491
- l === null && (l = r);
2492
- var u = Nt(o, s, i, a);
2493
- return u === null && (u = o), new J(n, l, u, s);
2494
- }
2495
- function Gt(e, t, n, r, i) {
2496
- var a = t.points[3], o = n.points[0];
2497
- if (r === 3 || It(a, o)) return a;
2498
- if (r === 2) {
2499
- var s = -t.tangentAngle(1), c = -n.tangentAngle(0) + Math.PI, l = Nt(a, Pt(a, s + Math.PI / 2, 100), o, Pt(o, s + Math.PI / 2, 100)), u = l ? Ft(l, a) : Ft(a, o) / 2, d = Pt(a, s, 2 * u * k);
2500
- return e.setXYAt(d[0], d[1], "o", e.length() - 1), d = Pt(o, c, 2 * u * k), e.setTripleAt(o[0], o[1], o[0], o[1], d[0], d[1], e.length()), o;
2501
- }
2502
- var f = Nt(It(a, t.points[2]) ? t.points[0] : t.points[2], a, o, It(o, n.points[1]) ? n.points[3] : n.points[1]);
2503
- return f && Ft(f, a) < i ? (e.setTripleAt(f[0], f[1], f[0], f[1], f[0], f[1], e.length()), f) : a;
2504
- }
2505
- function Kt(e, t) {
2506
- var n = e.intersections(t);
2507
- return n.length && bt(n[0][0], 1) && n.shift(), n.length ? n[0] : null;
2508
- }
2509
- function qt(e, t) {
2510
- var n = e.slice(), r = t.slice(), i = Kt(e[e.length - 1], t[0]);
2511
- return i && (n[e.length - 1] = e[e.length - 1].split(i[0])[0], r[0] = t[0].split(i[1])[1]), e.length > 1 && t.length > 1 && (i = Kt(e[0], t[t.length - 1]), i) ? [[e[0].split(i[0])[0]], [t[t.length - 1].split(i[1])[1]]] : [n, r];
2512
- }
2513
- function Jt(e) {
2514
- for (var t, n = 1; n < e.length; n += 1) t = qt(e[n - 1], e[n]), e[n - 1] = t[0], e[n] = t[1];
2515
- return e.length > 1 && (t = qt(e[e.length - 1], e[0]), e[e.length - 1] = t[0], e[0] = t[1]), e;
2516
- }
2517
- function Yt(e, t) {
2518
- var n = e.inflectionPoints(), r, i, a, o;
2519
- if (n.length === 0) return [Wt(e, t)];
2520
- if (n.length === 1 || bt(n[1], 1)) return a = e.split(n[0]), r = a[0], i = a[1], [Wt(r, t), Wt(i, t)];
2521
- a = e.split(n[0]), r = a[0];
2522
- var s = (n[1] - n[0]) / (1 - n[0]);
2523
- return a = a[1].split(s), o = a[0], i = a[1], [
2524
- Wt(r, t),
2525
- Wt(o, t),
2526
- Wt(i, t)
2527
- ];
2528
- }
2529
- function Xt() {}
2530
- d([q], Xt), Xt.prototype.initModifierProperties = function(e, t) {
2531
- this.getValue = this.processKeys, this.amount = H.getProp(e, t.a, 0, null, this), this.miterLimit = H.getProp(e, t.ml, 0, null, this), this.lineJoin = t.lj, this._isAnimated = this.amount.effectsSequence.length !== 0;
2532
- }, Xt.prototype.processPath = function(e, t, n, r) {
2533
- var i = W.newElement();
2534
- i.c = e.c;
2535
- var a = e.length();
2536
- e.c || --a;
2537
- var o, s, c, l = [];
2538
- for (o = 0; o < a; o += 1) c = J.shapeSegment(e, o), l.push(Yt(c, t));
2539
- if (!e.c) for (o = a - 1; o >= 0; --o) c = J.shapeSegmentInverted(e, o), l.push(Yt(c, t));
2540
- l = Jt(l);
2541
- var u = null, d = null;
2542
- for (o = 0; o < l.length; o += 1) {
2543
- var f = l[o];
2544
- for (d && (u = Gt(i, d, f[0], n, r)), d = f[f.length - 1], s = 0; s < f.length; s += 1) c = f[s], u && It(c.points[0], u) ? i.setXYAt(c.points[1][0], c.points[1][1], "o", i.length() - 1) : i.setTripleAt(c.points[0][0], c.points[0][1], c.points[1][0], c.points[1][1], c.points[0][0], c.points[0][1], i.length()), i.setTripleAt(c.points[3][0], c.points[3][1], c.points[3][0], c.points[3][1], c.points[2][0], c.points[2][1], i.length()), u = c.points[3];
2545
- }
2546
- return l.length && Gt(i, d, l[0][0], n, r), i;
2547
- }, Xt.prototype.processShapes = function(e) {
2548
- var t, n, r = this.shapes.length, i, a, o = this.amount.v, s = this.miterLimit.v, c = this.lineJoin;
2549
- if (o !== 0) {
2550
- var l, u;
2551
- for (n = 0; n < r; n += 1) {
2552
- if (l = this.shapes[n], u = l.localShapeCollection, !(!l.shape._mdf && !this._mdf && !e)) for (u.releaseShapes(), l.shape._mdf = !0, t = l.shape.paths.shapes, a = l.shape.paths._length, i = 0; i < a; i += 1) u.addShape(this.processPath(t[i], o, c, s));
2553
- l.shape.paths = l.localShapeCollection;
2554
- }
2555
- }
2556
- this.dynamicProperties.length || (this._mdf = !1);
2557
- };
2558
- function Zt(e) {
2559
- for (var t = e.fStyle ? e.fStyle.split(" ") : [], n = "normal", r = "normal", i = t.length, a, o = 0; o < i; o += 1) switch (a = t[o].toLowerCase(), a) {
2560
- case "italic":
2561
- r = "italic";
2562
- break;
2563
- case "bold":
2564
- n = "700";
2565
- break;
2566
- case "black":
2567
- n = "900";
2568
- break;
2569
- case "medium":
2570
- n = "500";
2571
- break;
2572
- case "regular":
2573
- case "normal":
2574
- n = "400";
2575
- break;
2576
- case "light":
2577
- case "thin":
2578
- n = "200";
2579
- break;
2580
- default: break;
2581
- }
2582
- return {
2583
- style: r,
2584
- weight: e.fWeight || n
2585
- };
2586
- }
2587
- var Qt = function() {
2588
- var e = 5e3, t = {
2589
- w: 0,
2590
- size: 0,
2591
- shapes: [],
2592
- data: { shapes: [] }
2593
- }, n = [];
2594
- n = n.concat([
2595
- 2304,
2596
- 2305,
2597
- 2306,
2598
- 2307,
2599
- 2362,
2600
- 2363,
2601
- 2364,
2602
- 2364,
2603
- 2366,
2604
- 2367,
2605
- 2368,
2606
- 2369,
2607
- 2370,
2608
- 2371,
2609
- 2372,
2610
- 2373,
2611
- 2374,
2612
- 2375,
2613
- 2376,
2614
- 2377,
2615
- 2378,
2616
- 2379,
2617
- 2380,
2618
- 2381,
2619
- 2382,
2620
- 2383,
2621
- 2387,
2622
- 2388,
2623
- 2389,
2624
- 2390,
2625
- 2391,
2626
- 2402,
2627
- 2403
2628
- ]);
2629
- var r = 127988, i = 917631, a = 917601, o = 917626, s = 65039, c = 8205, l = 127462, d = 127487, f = [
2630
- "d83cdffb",
2631
- "d83cdffc",
2632
- "d83cdffd",
2633
- "d83cdffe",
2634
- "d83cdfff"
2635
- ];
2636
- function p(e) {
2637
- var t = e.split(","), n, r = t.length, i = [];
2638
- for (n = 0; n < r; n += 1) t[n] !== "sans-serif" && t[n] !== "monospace" && i.push(t[n]);
2639
- return i.join(",");
2640
- }
2641
- function m(e, t) {
2642
- var n = u("span");
2643
- n.setAttribute("aria-hidden", !0), n.style.fontFamily = t;
2644
- var r = u("span");
2645
- r.innerText = "giItT1WQy@!-/#", n.style.position = "absolute", n.style.left = "-10000px", n.style.top = "-10000px", n.style.fontSize = "300px", n.style.fontVariant = "normal", n.style.fontStyle = "normal", n.style.fontWeight = "normal", n.style.letterSpacing = "0", n.appendChild(r), document.body.appendChild(n);
2646
- var i = r.offsetWidth;
2647
- return r.style.fontFamily = p(e) + ", " + t, {
2648
- node: r,
2649
- w: i,
2650
- parent: n
2651
- };
2652
- }
2653
- function h() {
2654
- var t, n = this.fonts.length, r, i, a = n;
2655
- for (t = 0; t < n; t += 1) this.fonts[t].loaded ? --a : this.fonts[t].fOrigin === "n" || this.fonts[t].origin === 0 ? this.fonts[t].loaded = !0 : (r = this.fonts[t].monoCase.node, i = this.fonts[t].monoCase.w, r.offsetWidth === i ? (r = this.fonts[t].sansCase.node, i = this.fonts[t].sansCase.w, r.offsetWidth !== i && (--a, this.fonts[t].loaded = !0)) : (--a, this.fonts[t].loaded = !0), this.fonts[t].loaded && (this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent), this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));
2656
- a !== 0 && Date.now() - this.initTime < e ? setTimeout(this.checkLoadedFontsBinded, 20) : setTimeout(this.setIsLoadedBinded, 10);
2657
- }
2658
- function g(e, t) {
2659
- var n = document.body && t ? "svg" : "canvas", r, i = Zt(e);
2660
- if (n === "svg") {
2661
- var a = L("text");
2662
- a.style.fontSize = "100px", a.setAttribute("font-family", e.fFamily), a.setAttribute("font-style", i.style), a.setAttribute("font-weight", i.weight), a.textContent = "1", e.fClass ? (a.style.fontFamily = "inherit", a.setAttribute("class", e.fClass)) : a.style.fontFamily = e.fFamily, t.appendChild(a), r = a;
2663
- } else {
2664
- var o = new OffscreenCanvas(500, 500).getContext("2d");
2665
- o.font = i.style + " " + i.weight + " 100px " + e.fFamily, r = o;
2666
- }
2667
- function s(e) {
2668
- return n === "svg" ? (r.textContent = e, r.getComputedTextLength()) : r.measureText(e).width;
2669
- }
2670
- return { measureText: s };
2671
- }
2672
- function _(e, t) {
2673
- if (!e) {
2674
- this.isLoaded = !0;
2675
- return;
2676
- }
2677
- if (this.chars) {
2678
- this.isLoaded = !0, this.fonts = e.list;
2679
- return;
2680
- }
2681
- if (!document.body) {
2682
- this.isLoaded = !0, e.list.forEach(function(e) {
2683
- e.helper = g(e), e.cache = {};
2684
- }), this.fonts = e.list;
2685
- return;
2686
- }
2687
- var n = e.list, r, i = n.length, a = i;
2688
- for (r = 0; r < i; r += 1) {
2689
- var o = !0, s, c;
2690
- if (n[r].loaded = !1, n[r].monoCase = m(n[r].fFamily, "monospace"), n[r].sansCase = m(n[r].fFamily, "sans-serif"), !n[r].fPath) n[r].loaded = !0, --a;
2691
- else if (n[r].fOrigin === "p" || n[r].origin === 3) {
2692
- if (s = document.querySelectorAll("style[f-forigin=\"p\"][f-family=\"" + n[r].fFamily + "\"], style[f-origin=\"3\"][f-family=\"" + n[r].fFamily + "\"]"), s.length > 0 && (o = !1), o) {
2693
- var l = u("style");
2694
- l.setAttribute("f-forigin", n[r].fOrigin), l.setAttribute("f-origin", n[r].origin), l.setAttribute("f-family", n[r].fFamily), l.type = "text/css", l.innerText = "@font-face {font-family: " + n[r].fFamily + "; font-style: normal; src: url('" + n[r].fPath + "');}", t.appendChild(l);
2695
- }
2696
- } else if (n[r].fOrigin === "g" || n[r].origin === 1) {
2697
- for (s = document.querySelectorAll("link[f-forigin=\"g\"], link[f-origin=\"1\"]"), c = 0; c < s.length; c += 1) s[c].href.indexOf(n[r].fPath) !== -1 && (o = !1);
2698
- if (o) {
2699
- var d = u("link");
2700
- d.setAttribute("f-forigin", n[r].fOrigin), d.setAttribute("f-origin", n[r].origin), d.type = "text/css", d.rel = "stylesheet", d.href = n[r].fPath, document.body.appendChild(d);
2701
- }
2702
- } else if (n[r].fOrigin === "t" || n[r].origin === 2) {
2703
- for (s = document.querySelectorAll("script[f-forigin=\"t\"], script[f-origin=\"2\"]"), c = 0; c < s.length; c += 1) n[r].fPath === s[c].src && (o = !1);
2704
- if (o) {
2705
- var f = u("link");
2706
- f.setAttribute("f-forigin", n[r].fOrigin), f.setAttribute("f-origin", n[r].origin), f.setAttribute("rel", "stylesheet"), f.setAttribute("href", n[r].fPath), t.appendChild(f);
2707
- }
2708
- }
2709
- n[r].helper = g(n[r], t), n[r].cache = {}, this.fonts.push(n[r]);
2710
- }
2711
- a === 0 ? this.isLoaded = !0 : setTimeout(this.checkLoadedFonts.bind(this), 100);
2712
- }
2713
- function v(e) {
2714
- if (e) {
2715
- this.chars ||= [];
2716
- var t, n = e.length, r, i = this.chars.length, a;
2717
- for (t = 0; t < n; t += 1) {
2718
- for (r = 0, a = !1; r < i;) this.chars[r].style === e[t].style && this.chars[r].fFamily === e[t].fFamily && this.chars[r].ch === e[t].ch && (a = !0), r += 1;
2719
- a || (this.chars.push(e[t]), i += 1);
2720
- }
2721
- }
2722
- }
2723
- function y(e, n, r) {
2724
- for (var i = 0, a = this.chars.length; i < a;) {
2725
- if (this.chars[i].ch === e && this.chars[i].style === n && this.chars[i].fFamily === r) return this.chars[i];
2726
- i += 1;
2727
- }
2728
- return (typeof e == "string" && e.charCodeAt(0) !== 13 || !e) && console && console.warn && !this._warned && (this._warned = !0, console.warn("Missing character from exported characters list: ", e, n, r)), t;
2729
- }
2730
- function b(e, t, n) {
2731
- var r = this.getFontByName(t), i = e;
2732
- if (!r.cache[i]) {
2733
- var a = r.helper;
2734
- if (e === " ") {
2735
- var o = a.measureText("|" + e + "|"), s = a.measureText("||");
2736
- r.cache[i] = (o - s) / 100;
2737
- } else r.cache[i] = a.measureText(e) / 100;
2738
- }
2739
- return r.cache[i] * n;
2740
- }
2741
- function x(e) {
2742
- for (var t = 0, n = this.fonts.length; t < n;) {
2743
- if (this.fonts[t].fName === e) return this.fonts[t];
2744
- t += 1;
2745
- }
2746
- return this.fonts[0];
2747
- }
2748
- function S(e) {
2749
- var t = 0, n = e.charCodeAt(0);
2750
- if (n >= 55296 && n <= 56319) {
2751
- var r = e.charCodeAt(1);
2752
- r >= 56320 && r <= 57343 && (t = (n - 55296) * 1024 + r - 56320 + 65536);
2753
- }
2754
- return t;
2755
- }
2756
- function C(e, t) {
2757
- var n = e.toString(16) + t.toString(16);
2758
- return f.indexOf(n) !== -1;
2759
- }
2760
- function w(e) {
2761
- return e === c;
2762
- }
2763
- function T(e) {
2764
- return e === s;
2765
- }
2766
- function E(e) {
2767
- var t = S(e);
2768
- return t >= l && t <= d;
2769
- }
2770
- function D(e) {
2771
- return E(e.substr(0, 2)) && E(e.substr(2, 2));
2772
- }
2773
- function O(e) {
2774
- return n.indexOf(e) !== -1;
2775
- }
2776
- function k(e, t) {
2777
- var n = S(e.substr(t, 2));
2778
- if (n !== r) return !1;
2779
- var s = 0;
2780
- for (t += 2; s < 5;) {
2781
- if (n = S(e.substr(t, 2)), n < a || n > o) return !1;
2782
- s += 1, t += 2;
2783
- }
2784
- return S(e.substr(t, 2)) === i;
2785
- }
2786
- function A() {
2787
- this.isLoaded = !0;
2788
- }
2789
- var j = function() {
2790
- this.fonts = [], this.chars = null, this.typekitLoaded = 0, this.isLoaded = !1, this._warned = !1, this.initTime = Date.now(), this.setIsLoadedBinded = this.setIsLoaded.bind(this), this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this);
2791
- };
2792
- return j.isModifier = C, j.isZeroWidthJoiner = w, j.isFlagEmoji = D, j.isRegionalCode = E, j.isCombinedCharacter = O, j.isRegionalFlag = k, j.isVariationSelector = T, j.BLACK_FLAG_CODE_POINT = r, j.prototype = {
2793
- addChars: v,
2794
- addFonts: _,
2795
- getCharData: y,
2796
- getFontByName: x,
2797
- measureText: b,
2798
- checkLoadedFonts: h,
2799
- setIsLoaded: A
2800
- }, j;
2801
- }();
2802
- function $t(e) {
2803
- this.animationData = e;
2804
- }
2805
- $t.prototype.getProp = function(e) {
2806
- return this.animationData.slots && this.animationData.slots[e.sid] ? Object.assign(e, this.animationData.slots[e.sid].p) : e;
2807
- };
2808
- function en(e) {
2809
- return new $t(e);
2810
- }
2811
- function tn() {}
2812
- tn.prototype = {
2813
- initRenderable: function() {
2814
- this.isInRange = !1, this.hidden = !1, this.isTransparent = !1, this.renderableComponents = [];
2815
- },
2816
- addRenderableComponent: function(e) {
2817
- this.renderableComponents.indexOf(e) === -1 && this.renderableComponents.push(e);
2818
- },
2819
- removeRenderableComponent: function(e) {
2820
- this.renderableComponents.indexOf(e) !== -1 && this.renderableComponents.splice(this.renderableComponents.indexOf(e), 1);
2821
- },
2822
- prepareRenderableFrame: function(e) {
2823
- this.checkLayerLimits(e);
2824
- },
2825
- checkTransparency: function() {
2826
- this.finalTransform.mProp.o.v <= 0 ? !this.isTransparent && this.globalData.renderConfig.hideOnTransparent && (this.isTransparent = !0, this.hide()) : this.isTransparent && (this.isTransparent = !1, this.show());
2827
- },
2828
- checkLayerLimits: function(e) {
2829
- this.data.ip - this.data.st <= e && this.data.op - this.data.st > e ? this.isInRange !== !0 && (this.globalData._mdf = !0, this._mdf = !0, this.isInRange = !0, this.show()) : this.isInRange !== !1 && (this.globalData._mdf = !0, this.isInRange = !1, this.hide());
2830
- },
2831
- renderRenderable: function() {
2832
- var e, t = this.renderableComponents.length;
2833
- for (e = 0; e < t; e += 1) this.renderableComponents[e].renderFrame(this._isFirstFrame);
2834
- },
2835
- sourceRectAtTime: function() {
2836
- return {
2837
- top: 0,
2838
- left: 0,
2839
- width: 100,
2840
- height: 100
2841
- };
2842
- },
2843
- getLayerSize: function() {
2844
- return this.data.ty === 5 ? {
2845
- w: this.data.textData.width,
2846
- h: this.data.textData.height
2847
- } : {
2848
- w: this.data.width,
2849
- h: this.data.height
2850
- };
2851
- }
2852
- };
2853
- var nn = function() {
2854
- var e = {
2855
- 0: "source-over",
2856
- 1: "multiply",
2857
- 2: "screen",
2858
- 3: "overlay",
2859
- 4: "darken",
2860
- 5: "lighten",
2861
- 6: "color-dodge",
2862
- 7: "color-burn",
2863
- 8: "hard-light",
2864
- 9: "soft-light",
2865
- 10: "difference",
2866
- 11: "exclusion",
2867
- 12: "hue",
2868
- 13: "saturation",
2869
- 14: "color",
2870
- 15: "luminosity"
2871
- };
2872
- return function(t) {
2873
- return e[t] || "";
2874
- };
2875
- }();
2876
- function rn(e, t, n) {
2877
- this.p = H.getProp(t, e.v, 0, 0, n);
2878
- }
2879
- function an(e, t, n) {
2880
- this.p = H.getProp(t, e.v, 0, 0, n);
2881
- }
2882
- function on(e, t, n) {
2883
- this.p = H.getProp(t, e.v, 1, 0, n);
2884
- }
2885
- function sn(e, t, n) {
2886
- this.p = H.getProp(t, e.v, 1, 0, n);
2887
- }
2888
- function cn(e, t, n) {
2889
- this.p = H.getProp(t, e.v, 0, 0, n);
2890
- }
2891
- function ln(e, t, n) {
2892
- this.p = H.getProp(t, e.v, 0, 0, n);
2893
- }
2894
- function un(e, t, n) {
2895
- this.p = H.getProp(t, e.v, 0, 0, n);
2896
- }
2897
- function dn() {
2898
- this.p = {};
2899
- }
2900
- function fn(e, t) {
2901
- var n = e.ef || [];
2902
- this.effectElements = [];
2903
- var r, i = n.length, a;
2904
- for (r = 0; r < i; r += 1) a = new pn(n[r], t), this.effectElements.push(a);
2905
- }
2906
- function pn(e, t) {
2907
- this.init(e, t);
2908
- }
2909
- d([U], pn), pn.prototype.getValue = pn.prototype.iterateDynamicProperties, pn.prototype.init = function(e, t) {
2910
- this.data = e, this.effectElements = [], this.initDynamicPropertyContainer(t);
2911
- var n, r = this.data.ef.length, i, a = this.data.ef;
2912
- for (n = 0; n < r; n += 1) {
2913
- switch (i = null, a[n].ty) {
2914
- case 0:
2915
- i = new rn(a[n], t, this);
2916
- break;
2917
- case 1:
2918
- i = new an(a[n], t, this);
2919
- break;
2920
- case 2:
2921
- i = new on(a[n], t, this);
2922
- break;
2923
- case 3:
2924
- i = new sn(a[n], t, this);
2925
- break;
2926
- case 4:
2927
- case 7:
2928
- i = new un(a[n], t, this);
2929
- break;
2930
- case 10:
2931
- i = new cn(a[n], t, this);
2932
- break;
2933
- case 11:
2934
- i = new ln(a[n], t, this);
2935
- break;
2936
- case 5:
2937
- i = new fn(a[n], t, this);
2938
- break;
2939
- default:
2940
- i = new dn(a[n], t, this);
2941
- break;
2942
- }
2943
- i && this.effectElements.push(i);
2944
- }
2945
- };
2946
- function mn() {}
2947
- mn.prototype = {
2948
- checkMasks: function() {
2949
- if (!this.data.hasMask) return !1;
2950
- for (var e = 0, t = this.data.masksProperties.length; e < t;) {
2951
- if (this.data.masksProperties[e].mode !== "n" && this.data.masksProperties[e].cl !== !1) return !0;
2952
- e += 1;
2953
- }
2954
- return !1;
2955
- },
2956
- initExpressions: function() {
2957
- var e = ue();
2958
- if (e) {
2959
- var t = e("layer"), n = e("effects"), r = e("shape"), i = e("text"), a = e("comp");
2960
- this.layerInterface = t(this), this.data.hasMask && this.maskManager && this.layerInterface.registerMaskInterface(this.maskManager);
2961
- var o = n.createEffectsInterface(this, this.layerInterface);
2962
- this.layerInterface.registerEffectsInterface(o), this.data.ty === 0 || this.data.xt ? this.compInterface = a(this) : this.data.ty === 4 ? (this.layerInterface.shapeInterface = r(this.shapesData, this.itemsData, this.layerInterface), this.layerInterface.content = this.layerInterface.shapeInterface) : this.data.ty === 5 && (this.layerInterface.textInterface = i(this), this.layerInterface.text = this.layerInterface.textInterface);
2963
- }
2964
- },
2965
- setBlendMode: function() {
2966
- var e = nn(this.data.bm), t = this.baseElement || this.layerElement;
2967
- t.style["mix-blend-mode"] = e;
2968
- },
2969
- initBaseData: function(e, t, n) {
2970
- this.globalData = t, this.comp = n, this.data = e, this.layerId = I(), this.data.sr || (this.data.sr = 1), this.effectsManager = new fn(this.data, this, this.dynamicProperties);
2971
- },
2972
- getType: function() {
2973
- return this.type;
2974
- },
2975
- sourceRectAtTime: function() {}
2976
- };
2977
- function hn() {}
2978
- hn.prototype = {
2979
- initFrame: function() {
2980
- this._isFirstFrame = !1, this.dynamicProperties = [], this._mdf = !1;
2981
- },
2982
- prepareProperties: function(e, t) {
2983
- var n, r = this.dynamicProperties.length;
2984
- for (n = 0; n < r; n += 1) (t || this._isParent && this.dynamicProperties[n].propType === "transform") && (this.dynamicProperties[n].getValue(), this.dynamicProperties[n]._mdf && (this.globalData._mdf = !0, this._mdf = !0));
2985
- },
2986
- addDynamicProperty: function(e) {
2987
- this.dynamicProperties.indexOf(e) === -1 && this.dynamicProperties.push(e);
2988
- }
2989
- };
2990
- function gn(e, t, n) {
2991
- this.initFrame(), this.initRenderable(), this.assetData = t.getAssetData(e.refId), this.footageData = t.imageLoader.getAsset(this.assetData), this.initBaseData(e, t, n);
2992
- }
2993
- gn.prototype.prepareFrame = function() {}, d([
2994
- tn,
2995
- mn,
2996
- hn
2997
- ], gn), gn.prototype.getBaseElement = function() {
2998
- return null;
2999
- }, gn.prototype.renderFrame = function() {}, gn.prototype.destroy = function() {}, gn.prototype.initExpressions = function() {
3000
- var e = ue();
3001
- e && (this.layerInterface = e("footage")(this));
3002
- }, gn.prototype.getFootageData = function() {
3003
- return this.footageData;
3004
- };
3005
- function Y(e, t, n) {
3006
- this.initFrame(), this.initRenderable(), this.assetData = t.getAssetData(e.refId), this.initBaseData(e, t, n), this._isPlaying = !1, this._canPlay = !1;
3007
- var r = this.globalData.getAssetsPath(this.assetData);
3008
- this.audio = this.globalData.audioController.createAudio(r), this._currentTime = 0, this.globalData.audioController.addAudio(this), this._volumeMultiplier = 1, this._volume = 1, this._previousVolume = null, this.tm = e.tm ? H.getProp(this, e.tm, 0, t.frameRate, this) : { _placeholder: !0 }, this.lv = H.getProp(this, e.au && e.au.lv ? e.au.lv : { k: [100] }, 1, .01, this);
3009
- }
3010
- Y.prototype.prepareFrame = function(e) {
3011
- this.prepareRenderableFrame(e, !0), this.prepareProperties(e, !0), this.tm._placeholder ? this._currentTime = e / this.data.sr : this._currentTime = this.tm.v, this._volume = this.lv.v[0];
3012
- var t = this._volume * this._volumeMultiplier;
3013
- this._previousVolume !== t && (this._previousVolume = t, this.audio.volume(t));
3014
- }, d([
3015
- tn,
3016
- mn,
3017
- hn
3018
- ], Y), Y.prototype.renderFrame = function() {
3019
- this.isInRange && this._canPlay && (this._isPlaying ? (!this.audio.playing() || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > .1) && this.audio.seek(this._currentTime / this.globalData.frameRate) : (this.audio.play(), this.audio.seek(this._currentTime / this.globalData.frameRate), this._isPlaying = !0));
3020
- }, Y.prototype.show = function() {}, Y.prototype.hide = function() {
3021
- this.audio.pause(), this._isPlaying = !1;
3022
- }, Y.prototype.pause = function() {
3023
- this.audio.pause(), this._isPlaying = !1, this._canPlay = !1;
3024
- }, Y.prototype.resume = function() {
3025
- this._canPlay = !0;
3026
- }, Y.prototype.setRate = function(e) {
3027
- this.audio.rate(e);
3028
- }, Y.prototype.volume = function(e) {
3029
- this._volumeMultiplier = e, this._previousVolume = e * this._volume, this.audio.volume(this._previousVolume);
3030
- }, Y.prototype.getBaseElement = function() {
3031
- return null;
3032
- }, Y.prototype.destroy = function() {}, Y.prototype.sourceRectAtTime = function() {}, Y.prototype.initExpressions = function() {};
3033
- function X() {}
3034
- X.prototype.checkLayers = function(e) {
3035
- var t, n = this.layers.length, r;
3036
- for (this.completeLayers = !0, t = n - 1; t >= 0; --t) this.elements[t] || (r = this.layers[t], r.ip - r.st <= e - this.layers[t].st && r.op - r.st > e - this.layers[t].st && this.buildItem(t)), this.completeLayers = this.elements[t] ? this.completeLayers : !1;
3037
- this.checkPendingElements();
3038
- }, X.prototype.createItem = function(e) {
3039
- switch (e.ty) {
3040
- case 2: return this.createImage(e);
3041
- case 0: return this.createComp(e);
3042
- case 1: return this.createSolid(e);
3043
- case 3: return this.createNull(e);
3044
- case 4: return this.createShape(e);
3045
- case 5: return this.createText(e);
3046
- case 6: return this.createAudio(e);
3047
- case 13: return this.createCamera(e);
3048
- case 15: return this.createFootage(e);
3049
- default: return this.createNull(e);
3050
- }
3051
- }, X.prototype.createCamera = function() {
3052
- throw Error("You're using a 3d camera. Try the html renderer.");
3053
- }, X.prototype.createAudio = function(e) {
3054
- return new Y(e, this.globalData, this);
3055
- }, X.prototype.createFootage = function(e) {
3056
- return new gn(e, this.globalData, this);
3057
- }, X.prototype.buildAllItems = function() {
3058
- var e, t = this.layers.length;
3059
- for (e = 0; e < t; e += 1) this.buildItem(e);
3060
- this.checkPendingElements();
3061
- }, X.prototype.includeLayers = function(e) {
3062
- this.completeLayers = !1;
3063
- var t, n = e.length, r, i = this.layers.length;
3064
- for (t = 0; t < n; t += 1) for (r = 0; r < i;) {
3065
- if (this.layers[r].id === e[t].id) {
3066
- this.layers[r] = e[t];
3067
- break;
3068
- }
3069
- r += 1;
3070
- }
3071
- }, X.prototype.setProjectInterface = function(e) {
3072
- this.globalData.projectInterface = e;
3073
- }, X.prototype.initItems = function() {
3074
- this.globalData.progressiveLoad || this.buildAllItems();
3075
- }, X.prototype.buildElementParenting = function(e, t, n) {
3076
- for (var r = this.elements, i = this.layers, a = 0, o = i.length; a < o;) i[a].ind == t && (!r[a] || r[a] === !0 ? (this.buildItem(a), this.addPendingElement(e)) : (n.push(r[a]), r[a].setAsParent(), i[a].parent === void 0 ? e.setHierarchy(n) : this.buildElementParenting(e, i[a].parent, n))), a += 1;
3077
- }, X.prototype.addPendingElement = function(e) {
3078
- this.pendingElements.push(e);
3079
- }, X.prototype.searchExtraCompositions = function(e) {
3080
- var t, n = e.length;
3081
- for (t = 0; t < n; t += 1) if (e[t].xt) {
3082
- var r = this.createComp(e[t]);
3083
- r.initExpressions(), this.globalData.projectInterface.registerComposition(r);
3084
- }
3085
- }, X.prototype.getElementById = function(e) {
3086
- var t, n = this.elements.length;
3087
- for (t = 0; t < n; t += 1) if (this.elements[t].data.ind === e) return this.elements[t];
3088
- return null;
3089
- }, X.prototype.getElementByPath = function(e) {
3090
- var t = e.shift(), n;
3091
- if (typeof t == "number") n = this.elements[t];
3092
- else {
3093
- var r, i = this.elements.length;
3094
- for (r = 0; r < i; r += 1) if (this.elements[r].data.nm === t) {
3095
- n = this.elements[r];
3096
- break;
3097
- }
3098
- }
3099
- return e.length === 0 ? n : n.getElementByPath(e);
3100
- }, X.prototype.setupGlobalData = function(e, t) {
3101
- this.globalData.fontManager = new Qt(), this.globalData.slotManager = en(e), this.globalData.fontManager.addChars(e.chars), this.globalData.fontManager.addFonts(e.fonts, t), this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem), this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem), this.globalData.imageLoader = this.animationItem.imagePreloader, this.globalData.audioController = this.animationItem.audioController, this.globalData.frameId = 0, this.globalData.frameRate = e.fr, this.globalData.nm = e.nm, this.globalData.compSize = {
3102
- w: e.w,
3103
- h: e.h
3104
- };
3105
- };
3106
- var _n = { TRANSFORM_EFFECT: "transformEFfect" };
3107
- function vn() {}
3108
- vn.prototype = {
3109
- initTransform: function() {
3110
- var e = new G();
3111
- this.finalTransform = {
3112
- mProp: this.data.ks ? _t.getTransformProperty(this, this.data.ks, this) : { o: 0 },
3113
- _matMdf: !1,
3114
- _localMatMdf: !1,
3115
- _opMdf: !1,
3116
- mat: e,
3117
- localMat: e,
3118
- localOpacity: 1
3119
- }, this.data.ao && (this.finalTransform.mProp.autoOriented = !0), this.data.ty;
3120
- },
3121
- renderTransform: function() {
3122
- if (this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame, this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame, this.hierarchy) {
3123
- var e, t = this.finalTransform.mat, n = 0, r = this.hierarchy.length;
3124
- if (!this.finalTransform._matMdf) for (; n < r;) {
3125
- if (this.hierarchy[n].finalTransform.mProp._mdf) {
3126
- this.finalTransform._matMdf = !0;
3127
- break;
3128
- }
3129
- n += 1;
3130
- }
3131
- if (this.finalTransform._matMdf) for (e = this.finalTransform.mProp.v.props, t.cloneFromProps(e), n = 0; n < r; n += 1) t.multiply(this.hierarchy[n].finalTransform.mProp.v);
3132
- }
3133
- (!this.localTransforms || this.finalTransform._matMdf) && (this.finalTransform._localMatMdf = this.finalTransform._matMdf), this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v);
3134
- },
3135
- renderLocalTransform: function() {
3136
- if (this.localTransforms) {
3137
- var e = 0, t = this.localTransforms.length;
3138
- if (this.finalTransform._localMatMdf = this.finalTransform._matMdf, !this.finalTransform._localMatMdf || !this.finalTransform._opMdf) for (; e < t;) this.localTransforms[e]._mdf && (this.finalTransform._localMatMdf = !0), this.localTransforms[e]._opMdf && !this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v, this.finalTransform._opMdf = !0), e += 1;
3139
- if (this.finalTransform._localMatMdf) {
3140
- var n = this.finalTransform.localMat;
3141
- for (this.localTransforms[0].matrix.clone(n), e = 1; e < t; e += 1) {
3142
- var r = this.localTransforms[e].matrix;
3143
- n.multiply(r);
3144
- }
3145
- n.multiply(this.finalTransform.mat);
3146
- }
3147
- if (this.finalTransform._opMdf) {
3148
- var i = this.finalTransform.localOpacity;
3149
- for (e = 0; e < t; e += 1) i *= this.localTransforms[e].opacity * .01;
3150
- this.finalTransform.localOpacity = i;
3151
- }
3152
- }
3153
- },
3154
- searchEffectTransforms: function() {
3155
- if (this.renderableEffectsManager) {
3156
- var e = this.renderableEffectsManager.getEffects(_n.TRANSFORM_EFFECT);
3157
- if (e.length) {
3158
- this.localTransforms = [], this.finalTransform.localMat = new G();
3159
- var t = 0, n = e.length;
3160
- for (t = 0; t < n; t += 1) this.localTransforms.push(e[t]);
3161
- }
3162
- }
3163
- },
3164
- globalToLocal: function(e) {
3165
- var t = [];
3166
- t.push(this.finalTransform);
3167
- for (var n = !0, r = this.comp; n;) r.finalTransform ? (r.data.hasMask && t.splice(0, 0, r.finalTransform), r = r.comp) : n = !1;
3168
- var i, a = t.length, o;
3169
- for (i = 0; i < a; i += 1) o = t[i].mat.applyToPointArray(0, 0, 0), e = [
3170
- e[0] - o[0],
3171
- e[1] - o[1],
3172
- 0
3173
- ];
3174
- return e;
3175
- },
3176
- mHelper: new G()
3177
- };
3178
- function yn(e, t, n) {
3179
- this.data = e, this.element = t, this.globalData = n, this.storedData = [], this.masksProperties = this.data.masksProperties || [], this.maskElement = null;
3180
- var r = this.globalData.defs, i, a = this.masksProperties ? this.masksProperties.length : 0;
3181
- this.viewData = h(a), this.solidPath = "";
3182
- var o, s = this.masksProperties, c = 0, u = [], d, f, p = I(), m, g, _, v, y = "clipPath", b = "clip-path";
3183
- for (i = 0; i < a; i += 1) if ((s[i].mode !== "a" && s[i].mode !== "n" || s[i].inv || s[i].o.k !== 100 || s[i].o.x) && (y = "mask", b = "mask"), (s[i].mode === "s" || s[i].mode === "i") && c === 0 ? (m = L("rect"), m.setAttribute("fill", "#ffffff"), m.setAttribute("width", this.element.comp.data.w || 0), m.setAttribute("height", this.element.comp.data.h || 0), u.push(m)) : m = null, o = L("path"), s[i].mode === "n") this.viewData[i] = {
3184
- op: H.getProp(this.element, s[i].o, 0, .01, this.element),
3185
- prop: Je.getShapeProp(this.element, s[i], 3),
3186
- elem: o,
3187
- lastPath: ""
3188
- }, r.appendChild(o);
3189
- else {
3190
- c += 1, o.setAttribute("fill", s[i].mode === "s" ? "#000000" : "#ffffff"), o.setAttribute("clip-rule", "nonzero");
3191
- var x;
3192
- if (s[i].x.k === 0 ? (_ = null, v = null) : (y = "mask", b = "mask", v = H.getProp(this.element, s[i].x, 0, null, this.element), x = I(), g = L("filter"), g.setAttribute("id", x), _ = L("feMorphology"), _.setAttribute("operator", "erode"), _.setAttribute("in", "SourceGraphic"), _.setAttribute("radius", "0"), g.appendChild(_), r.appendChild(g), o.setAttribute("stroke", s[i].mode === "s" ? "#000000" : "#ffffff")), this.storedData[i] = {
3193
- elem: o,
3194
- x: v,
3195
- expan: _,
3196
- lastPath: "",
3197
- lastOperator: "",
3198
- filterId: x,
3199
- lastRadius: 0
3200
- }, s[i].mode === "i") {
3201
- f = u.length;
3202
- var S = L("g");
3203
- for (d = 0; d < f; d += 1) S.appendChild(u[d]);
3204
- var C = L("mask");
3205
- C.setAttribute("mask-type", "alpha"), C.setAttribute("id", p + "_" + c), C.appendChild(o), r.appendChild(C), S.setAttribute("mask", "url(" + l() + "#" + p + "_" + c + ")"), u.length = 0, u.push(S);
3206
- } else u.push(o);
3207
- s[i].inv && !this.solidPath && (this.solidPath = this.createLayerSolidPath()), this.viewData[i] = {
3208
- elem: o,
3209
- lastPath: "",
3210
- op: H.getProp(this.element, s[i].o, 0, .01, this.element),
3211
- prop: Je.getShapeProp(this.element, s[i], 3),
3212
- invRect: m
3213
- }, this.viewData[i].prop.k || this.drawPath(s[i], this.viewData[i].prop.v, this.viewData[i]);
3214
- }
3215
- for (this.maskElement = L(y), a = u.length, i = 0; i < a; i += 1) this.maskElement.appendChild(u[i]);
3216
- c > 0 && (this.maskElement.setAttribute("id", p), this.element.maskedElement.setAttribute(b, "url(" + l() + "#" + p + ")"), r.appendChild(this.maskElement)), this.viewData.length && this.element.addRenderableComponent(this);
3217
- }
3218
- yn.prototype.getMaskProperty = function(e) {
3219
- return this.viewData[e].prop;
3220
- }, yn.prototype.renderFrame = function(e) {
3221
- var t = this.element.finalTransform.mat, n, r = this.masksProperties.length;
3222
- for (n = 0; n < r; n += 1) if ((this.viewData[n].prop._mdf || e) && this.drawPath(this.masksProperties[n], this.viewData[n].prop.v, this.viewData[n]), (this.viewData[n].op._mdf || e) && this.viewData[n].elem.setAttribute("fill-opacity", this.viewData[n].op.v), this.masksProperties[n].mode !== "n" && (this.viewData[n].invRect && (this.element.finalTransform.mProp._mdf || e) && this.viewData[n].invRect.setAttribute("transform", t.getInverseMatrix().to2dCSS()), this.storedData[n].x && (this.storedData[n].x._mdf || e))) {
3223
- var i = this.storedData[n].expan;
3224
- this.storedData[n].x.v < 0 ? (this.storedData[n].lastOperator !== "erode" && (this.storedData[n].lastOperator = "erode", this.storedData[n].elem.setAttribute("filter", "url(" + l() + "#" + this.storedData[n].filterId + ")")), i.setAttribute("radius", -this.storedData[n].x.v)) : (this.storedData[n].lastOperator !== "dilate" && (this.storedData[n].lastOperator = "dilate", this.storedData[n].elem.setAttribute("filter", null)), this.storedData[n].elem.setAttribute("stroke-width", this.storedData[n].x.v * 2));
3225
- }
3226
- }, yn.prototype.getMaskelement = function() {
3227
- return this.maskElement;
3228
- }, yn.prototype.createLayerSolidPath = function() {
3229
- var e = "M0,0 ";
3230
- return e += " h" + this.globalData.compSize.w, e += " v" + this.globalData.compSize.h, e += " h-" + this.globalData.compSize.w, e += " v-" + this.globalData.compSize.h + " ", e;
3231
- }, yn.prototype.drawPath = function(e, t, n) {
3232
- var r = " M" + t.v[0][0] + "," + t.v[0][1], i, a = t._length;
3233
- for (i = 1; i < a; i += 1) r += " C" + t.o[i - 1][0] + "," + t.o[i - 1][1] + " " + t.i[i][0] + "," + t.i[i][1] + " " + t.v[i][0] + "," + t.v[i][1];
3234
- if (t.c && a > 1 && (r += " C" + t.o[i - 1][0] + "," + t.o[i - 1][1] + " " + t.i[0][0] + "," + t.i[0][1] + " " + t.v[0][0] + "," + t.v[0][1]), n.lastPath !== r) {
3235
- var o = "";
3236
- n.elem && (t.c && (o = e.inv ? this.solidPath + r : r), n.elem.setAttribute("d", o)), n.lastPath = r;
3237
- }
3238
- }, yn.prototype.destroy = function() {
3239
- this.element = null, this.globalData = null, this.maskElement = null, this.data = null, this.masksProperties = null;
3240
- };
3241
- var bn = function() {
3242
- var e = {};
3243
- e.createFilter = t, e.createAlphaToLuminanceFilter = n;
3244
- function t(e, t) {
3245
- var n = L("filter");
3246
- return n.setAttribute("id", e), t !== !0 && (n.setAttribute("filterUnits", "objectBoundingBox"), n.setAttribute("x", "0%"), n.setAttribute("y", "0%"), n.setAttribute("width", "100%"), n.setAttribute("height", "100%")), n;
3247
- }
3248
- function n() {
3249
- var e = L("feColorMatrix");
3250
- return e.setAttribute("type", "matrix"), e.setAttribute("color-interpolation-filters", "sRGB"), e.setAttribute("values", "0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"), e;
3251
- }
3252
- return e;
3253
- }(), xn = function() {
3254
- var e = {
3255
- maskType: !0,
3256
- svgLumaHidden: !0,
3257
- offscreenCanvas: typeof OffscreenCanvas < "u"
3258
- };
3259
- return (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) && (e.maskType = !1), /firefox/i.test(navigator.userAgent) && (e.svgLumaHidden = !1), e;
3260
- }(), Sn = {}, Cn = "filter_result_";
3261
- function wn(e) {
3262
- var t, n = "SourceGraphic", r = e.data.ef ? e.data.ef.length : 0, i = I(), a = bn.createFilter(i, !0), o = 0;
3263
- this.filters = [];
3264
- var s;
3265
- for (t = 0; t < r; t += 1) {
3266
- s = null;
3267
- var c = e.data.ef[t].ty;
3268
- if (Sn[c]) {
3269
- var u = Sn[c].effect;
3270
- s = new u(a, e.effectsManager.effectElements[t], e, Cn + o, n), n = Cn + o, Sn[c].countsAsEffect && (o += 1);
3271
- }
3272
- s && this.filters.push(s);
3273
- }
3274
- o && (e.globalData.defs.appendChild(a), e.layerElement.setAttribute("filter", "url(" + l() + "#" + i + ")")), this.filters.length && e.addRenderableComponent(this);
3275
- }
3276
- wn.prototype.renderFrame = function(e) {
3277
- var t, n = this.filters.length;
3278
- for (t = 0; t < n; t += 1) this.filters[t].renderFrame(e);
3279
- }, wn.prototype.getEffects = function(e) {
3280
- var t, n = this.filters.length, r = [];
3281
- for (t = 0; t < n; t += 1) this.filters[t].type === e && r.push(this.filters[t]);
3282
- return r;
3283
- };
3284
- function Tn() {}
3285
- Tn.prototype = {
3286
- initRendererElement: function() {
3287
- this.layerElement = L("g");
3288
- },
3289
- createContainerElements: function() {
3290
- this.matteElement = L("g"), this.transformedElement = this.layerElement, this.maskedElement = this.layerElement, this._sizeChanged = !1;
3291
- var e = null;
3292
- if (this.data.td) {
3293
- this.matteMasks = {};
3294
- var t = L("g");
3295
- t.setAttribute("id", this.layerId), t.appendChild(this.layerElement), e = t, this.globalData.defs.appendChild(t);
3296
- } else this.data.tt ? (this.matteElement.appendChild(this.layerElement), e = this.matteElement, this.baseElement = this.matteElement) : this.baseElement = this.layerElement;
3297
- if (this.data.ln && this.layerElement.setAttribute("id", this.data.ln), this.data.cl && this.layerElement.setAttribute("class", this.data.cl), this.data.ty === 0 && !this.data.hd) {
3298
- var n = L("clipPath"), r = L("path");
3299
- r.setAttribute("d", "M0,0 L" + this.data.w + ",0 L" + this.data.w + "," + this.data.h + " L0," + this.data.h + "z");
3300
- var i = I();
3301
- if (n.setAttribute("id", i), n.appendChild(r), this.globalData.defs.appendChild(n), this.checkMasks()) {
3302
- var a = L("g");
3303
- a.setAttribute("clip-path", "url(" + l() + "#" + i + ")"), a.appendChild(this.layerElement), this.transformedElement = a, e ? e.appendChild(this.transformedElement) : this.baseElement = this.transformedElement;
3304
- } else this.layerElement.setAttribute("clip-path", "url(" + l() + "#" + i + ")");
3305
- }
3306
- this.data.bm !== 0 && this.setBlendMode();
3307
- },
3308
- renderElement: function() {
3309
- this.finalTransform._localMatMdf && this.transformedElement.setAttribute("transform", this.finalTransform.localMat.to2dCSS()), this.finalTransform._opMdf && this.transformedElement.setAttribute("opacity", this.finalTransform.localOpacity);
3310
- },
3311
- destroyBaseElement: function() {
3312
- this.layerElement = null, this.matteElement = null, this.maskManager.destroy();
3313
- },
3314
- getBaseElement: function() {
3315
- return this.data.hd ? null : this.baseElement;
3316
- },
3317
- createRenderableComponents: function() {
3318
- this.maskManager = new yn(this.data, this, this.globalData), this.renderableEffectsManager = new wn(this), this.searchEffectTransforms();
3319
- },
3320
- getMatte: function(e) {
3321
- if (this.matteMasks ||= {}, !this.matteMasks[e]) {
3322
- var t = this.layerId + "_" + e, n, r, i, a;
3323
- if (e === 1 || e === 3) {
3324
- var o = L("mask");
3325
- o.setAttribute("id", t), o.setAttribute("mask-type", e === 3 ? "luminance" : "alpha"), i = L("use"), i.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), o.appendChild(i), this.globalData.defs.appendChild(o), !xn.maskType && e === 1 && (o.setAttribute("mask-type", "luminance"), n = I(), r = bn.createFilter(n), this.globalData.defs.appendChild(r), r.appendChild(bn.createAlphaToLuminanceFilter()), a = L("g"), a.appendChild(i), o.appendChild(a), a.setAttribute("filter", "url(" + l() + "#" + n + ")"));
3326
- } else if (e === 2) {
3327
- var s = L("mask");
3328
- s.setAttribute("id", t), s.setAttribute("mask-type", "alpha");
3329
- var c = L("g");
3330
- s.appendChild(c), n = I(), r = bn.createFilter(n);
3331
- var u = L("feComponentTransfer");
3332
- u.setAttribute("in", "SourceGraphic"), r.appendChild(u);
3333
- var d = L("feFuncA");
3334
- d.setAttribute("type", "table"), d.setAttribute("tableValues", "1.0 0.0"), u.appendChild(d), this.globalData.defs.appendChild(r);
3335
- var f = L("rect");
3336
- f.setAttribute("width", this.comp.data.w), f.setAttribute("height", this.comp.data.h), f.setAttribute("x", "0"), f.setAttribute("y", "0"), f.setAttribute("fill", "#ffffff"), f.setAttribute("opacity", "0"), c.setAttribute("filter", "url(" + l() + "#" + n + ")"), c.appendChild(f), i = L("use"), i.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + this.layerId), c.appendChild(i), xn.maskType || (s.setAttribute("mask-type", "luminance"), r.appendChild(bn.createAlphaToLuminanceFilter()), a = L("g"), c.appendChild(f), a.appendChild(this.layerElement), c.appendChild(a)), this.globalData.defs.appendChild(s);
3337
- }
3338
- this.matteMasks[e] = t;
3339
- }
3340
- return this.matteMasks[e];
3341
- },
3342
- setMatte: function(e) {
3343
- this.matteElement && this.matteElement.setAttribute("mask", "url(" + l() + "#" + e + ")");
3344
- }
3345
- };
3346
- function En() {}
3347
- En.prototype = {
3348
- initHierarchy: function() {
3349
- this.hierarchy = [], this._isParent = !1, this.checkParenting();
3350
- },
3351
- setHierarchy: function(e) {
3352
- this.hierarchy = e;
3353
- },
3354
- setAsParent: function() {
3355
- this._isParent = !0;
3356
- },
3357
- checkParenting: function() {
3358
- this.data.parent !== void 0 && this.comp.buildElementParenting(this, this.data.parent, []);
3359
- }
3360
- };
3361
- function Dn() {}
3362
- (function() {
3363
- d([tn, f({
3364
- initElement: function(e, t, n) {
3365
- this.initFrame(), this.initBaseData(e, t, n), this.initTransform(e, t, n), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide();
3366
- },
3367
- hide: function() {
3368
- if (!this.hidden && (!this.isInRange || this.isTransparent)) {
3369
- var e = this.baseElement || this.layerElement;
3370
- e.style.display = "none", this.hidden = !0;
3371
- }
3372
- },
3373
- show: function() {
3374
- if (this.isInRange && !this.isTransparent) {
3375
- if (!this.data.hd) {
3376
- var e = this.baseElement || this.layerElement;
3377
- e.style.display = "block";
3378
- }
3379
- this.hidden = !1, this._isFirstFrame = !0;
3380
- }
3381
- },
3382
- renderFrame: function() {
3383
- this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame &&= !1);
3384
- },
3385
- renderInnerContent: function() {},
3386
- prepareFrame: function(e) {
3387
- this._mdf = !1, this.prepareRenderableFrame(e), this.prepareProperties(e, this.isInRange), this.checkTransparency();
3388
- },
3389
- destroy: function() {
3390
- this.innerElem = null, this.destroyBaseElement();
3391
- }
3392
- })], Dn);
3393
- })();
3394
- function On(e, t, n) {
3395
- this.assetData = t.getAssetData(e.refId), this.assetData && this.assetData.sid && (this.assetData = t.slotManager.getProp(this.assetData)), this.initElement(e, t, n), this.sourceRect = {
3396
- top: 0,
3397
- left: 0,
3398
- width: this.assetData.w,
3399
- height: this.assetData.h
3400
- };
3401
- }
3402
- d([
3403
- mn,
3404
- vn,
3405
- Tn,
3406
- En,
3407
- hn,
3408
- Dn
3409
- ], On), On.prototype.createContent = function() {
3410
- var e = this.globalData.getAssetsPath(this.assetData);
3411
- this.innerElem = L("image"), this.innerElem.setAttribute("width", this.assetData.w + "px"), this.innerElem.setAttribute("height", this.assetData.h + "px"), this.innerElem.setAttribute("preserveAspectRatio", this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio), this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink", "href", e), this.layerElement.appendChild(this.innerElem);
3412
- }, On.prototype.sourceRectAtTime = function() {
3413
- return this.sourceRect;
3414
- };
3415
- function kn(e, t) {
3416
- this.elem = e, this.pos = t;
3417
- }
3418
- function An() {}
3419
- An.prototype = {
3420
- addShapeToModifiers: function(e) {
3421
- var t, n = this.shapeModifiers.length;
3422
- for (t = 0; t < n; t += 1) this.shapeModifiers[t].addShape(e);
3423
- },
3424
- isShapeInAnimatedModifiers: function(e) {
3425
- for (var t = 0, n = this.shapeModifiers.length; t < n;) if (this.shapeModifiers[t].isAnimatedWithShape(e)) return !0;
3426
- return !1;
3427
- },
3428
- renderModifiers: function() {
3429
- if (this.shapeModifiers.length) {
3430
- var e, t = this.shapes.length;
3431
- for (e = 0; e < t; e += 1) this.shapes[e].sh.reset();
3432
- t = this.shapeModifiers.length;
3433
- var n;
3434
- for (e = t - 1; e >= 0 && (n = this.shapeModifiers[e].processShapes(this._isFirstFrame), !n); --e);
3435
- }
3436
- },
3437
- searchProcessedElement: function(e) {
3438
- for (var t = this.processedElements, n = 0, r = t.length; n < r;) {
3439
- if (t[n].elem === e) return t[n].pos;
3440
- n += 1;
3441
- }
3442
- return 0;
3443
- },
3444
- addProcessedElement: function(e, t) {
3445
- for (var n = this.processedElements, r = n.length; r;) if (--r, n[r].elem === e) {
3446
- n[r].pos = t;
3447
- return;
3448
- }
3449
- n.push(new kn(e, t));
3450
- },
3451
- prepareFrame: function(e) {
3452
- this.prepareRenderableFrame(e), this.prepareProperties(e, this.isInRange);
3453
- }
3454
- };
3455
- var jn = {
3456
- 1: "butt",
3457
- 2: "round",
3458
- 3: "square"
3459
- }, Mn = {
3460
- 1: "miter",
3461
- 2: "round",
3462
- 3: "bevel"
3463
- };
3464
- function Nn(e, t, n) {
3465
- this.caches = [], this.styles = [], this.transformers = e, this.lStr = "", this.sh = n, this.lvl = t, this._isAnimated = !!n.k;
3466
- for (var r = 0, i = e.length; r < i;) {
3467
- if (e[r].mProps.dynamicProperties.length) {
3468
- this._isAnimated = !0;
3469
- break;
3470
- }
3471
- r += 1;
3472
- }
3473
- }
3474
- Nn.prototype.setAsAnimated = function() {
3475
- this._isAnimated = !0;
3476
- };
3477
- function Pn(e, t) {
3478
- this.data = e, this.type = e.ty, this.d = "", this.lvl = t, this._mdf = !1, this.closed = e.hd === !0, this.pElem = L("path"), this.msElem = null;
3479
- }
3480
- Pn.prototype.reset = function() {
3481
- this.d = "", this._mdf = !1;
3482
- };
3483
- function Fn(e, t, n, r) {
3484
- this.elem = e, this.frameId = -1, this.dataProps = h(t.length), this.renderer = n, this.k = !1, this.dashStr = "", this.dashArray = m("float32", t.length ? t.length - 1 : 0), this.dashoffset = m("float32", 1), this.initDynamicPropertyContainer(r);
3485
- var i, a = t.length || 0, o;
3486
- for (i = 0; i < a; i += 1) o = H.getProp(e, t[i].v, 0, 0, this), this.k = o.k || this.k, this.dataProps[i] = {
3487
- n: t[i].n,
3488
- p: o
3489
- };
3490
- this.k || this.getValue(!0), this._isAnimated = this.k;
3491
- }
3492
- Fn.prototype.getValue = function(e) {
3493
- if (!(this.elem.globalData.frameId === this.frameId && !e) && (this.frameId = this.elem.globalData.frameId, this.iterateDynamicProperties(), this._mdf = this._mdf || e, this._mdf)) {
3494
- var t = 0, n = this.dataProps.length;
3495
- for (this.renderer === "svg" && (this.dashStr = ""), t = 0; t < n; t += 1) this.dataProps[t].n === "o" ? this.dashoffset[0] = this.dataProps[t].p.v : this.renderer === "svg" ? this.dashStr += " " + this.dataProps[t].p.v : this.dashArray[t] = this.dataProps[t].p.v;
3496
- }
3497
- }, d([U], Fn);
3498
- function In(e, t, n) {
3499
- this.initDynamicPropertyContainer(e), this.getValue = this.iterateDynamicProperties, this.o = H.getProp(e, t.o, 0, .01, this), this.w = H.getProp(e, t.w, 0, null, this), this.d = new Fn(e, t.d || {}, "svg", this), this.c = H.getProp(e, t.c, 1, 255, this), this.style = n, this._isAnimated = !!this._isAnimated;
3500
- }
3501
- d([U], In);
3502
- function Ln(e, t, n) {
3503
- this.initDynamicPropertyContainer(e), this.getValue = this.iterateDynamicProperties, this.o = H.getProp(e, t.o, 0, .01, this), this.c = H.getProp(e, t.c, 1, 255, this), this.style = n;
3504
- }
3505
- d([U], Ln);
3506
- function Rn(e, t, n) {
3507
- this.initDynamicPropertyContainer(e), this.getValue = this.iterateDynamicProperties, this.style = n;
3508
- }
3509
- d([U], Rn);
3510
- function zn(e, t, n) {
3511
- this.data = t, this.c = m("uint8c", t.p * 4);
3512
- var r = t.k.k[0].s ? t.k.k[0].s.length - t.p * 4 : t.k.k.length - t.p * 4;
3513
- this.o = m("float32", r), this._cmdf = !1, this._omdf = !1, this._collapsable = this.checkCollapsable(), this._hasOpacity = r, this.initDynamicPropertyContainer(n), this.prop = H.getProp(e, t.k, 1, null, this), this.k = this.prop.k, this.getValue(!0);
3514
- }
3515
- zn.prototype.comparePoints = function(e, t) {
3516
- for (var n = 0, r = this.o.length / 2, i; n < r;) {
3517
- if (i = Math.abs(e[n * 4] - e[t * 4 + n * 2]), i > .01) return !1;
3518
- n += 1;
3519
- }
3520
- return !0;
3521
- }, zn.prototype.checkCollapsable = function() {
3522
- if (this.o.length / 2 != this.c.length / 4) return !1;
3523
- if (this.data.k.k[0].s) for (var e = 0, t = this.data.k.k.length; e < t;) {
3524
- if (!this.comparePoints(this.data.k.k[e].s, this.data.p)) return !1;
3525
- e += 1;
3526
- }
3527
- else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1;
3528
- return !0;
3529
- }, zn.prototype.getValue = function(e) {
3530
- if (this.prop.getValue(), this._mdf = !1, this._cmdf = !1, this._omdf = !1, this.prop._mdf || e) {
3531
- var t, n = this.data.p * 4, r, i;
3532
- for (t = 0; t < n; t += 1) r = t % 4 == 0 ? 100 : 255, i = Math.round(this.prop.v[t] * r), this.c[t] !== i && (this.c[t] = i, this._cmdf = !e);
3533
- if (this.o.length) for (n = this.prop.v.length, t = this.data.p * 4; t < n; t += 1) r = t % 2 == 0 ? 100 : 1, i = t % 2 == 0 ? Math.round(this.prop.v[t] * 100) : this.prop.v[t], this.o[t - this.data.p * 4] !== i && (this.o[t - this.data.p * 4] = i, this._omdf = !e);
3534
- this._mdf = !e;
3535
- }
3536
- }, d([U], zn);
3537
- function Bn(e, t, n) {
3538
- this.initDynamicPropertyContainer(e), this.getValue = this.iterateDynamicProperties, this.initGradientData(e, t, n);
3539
- }
3540
- Bn.prototype.initGradientData = function(e, t, n) {
3541
- this.o = H.getProp(e, t.o, 0, .01, this), this.s = H.getProp(e, t.s, 1, null, this), this.e = H.getProp(e, t.e, 1, null, this), this.h = H.getProp(e, t.h || { k: 0 }, 0, .01, this), this.a = H.getProp(e, t.a || { k: 0 }, 0, O, this), this.g = new zn(e, t.g, this), this.style = n, this.stops = [], this.setGradientData(n.pElem, t), this.setGradientOpacity(t, n), this._isAnimated = !!this._isAnimated;
3542
- }, Bn.prototype.setGradientData = function(e, t) {
3543
- var n = I(), r = L(t.t === 1 ? "linearGradient" : "radialGradient");
3544
- r.setAttribute("id", n), r.setAttribute("spreadMethod", "pad"), r.setAttribute("gradientUnits", "userSpaceOnUse");
3545
- var i = [], a, o, s = t.g.p * 4;
3546
- for (o = 0; o < s; o += 4) a = L("stop"), r.appendChild(a), i.push(a);
3547
- e.setAttribute(t.ty === "gf" ? "fill" : "stroke", "url(" + l() + "#" + n + ")"), this.gf = r, this.cst = i;
3548
- }, Bn.prototype.setGradientOpacity = function(e, t) {
3549
- if (this.g._hasOpacity && !this.g._collapsable) {
3550
- var n, r, i, a = L("mask"), o = L("path");
3551
- a.appendChild(o);
3552
- var s = I(), c = I();
3553
- a.setAttribute("id", c);
3554
- var u = L(e.t === 1 ? "linearGradient" : "radialGradient");
3555
- u.setAttribute("id", s), u.setAttribute("spreadMethod", "pad"), u.setAttribute("gradientUnits", "userSpaceOnUse"), i = e.g.k.k[0].s ? e.g.k.k[0].s.length : e.g.k.k.length;
3556
- var d = this.stops;
3557
- for (r = e.g.p * 4; r < i; r += 2) n = L("stop"), n.setAttribute("stop-color", "rgb(255,255,255)"), u.appendChild(n), d.push(n);
3558
- o.setAttribute(e.ty === "gf" ? "fill" : "stroke", "url(" + l() + "#" + s + ")"), e.ty === "gs" && (o.setAttribute("stroke-linecap", jn[e.lc || 2]), o.setAttribute("stroke-linejoin", Mn[e.lj || 2]), e.lj === 1 && o.setAttribute("stroke-miterlimit", e.ml)), this.of = u, this.ms = a, this.ost = d, this.maskId = c, t.msElem = o;
3559
- }
3560
- }, d([U], Bn);
3561
- function Vn(e, t, n) {
3562
- this.initDynamicPropertyContainer(e), this.getValue = this.iterateDynamicProperties, this.w = H.getProp(e, t.w, 0, null, this), this.d = new Fn(e, t.d || {}, "svg", this), this.initGradientData(e, t, n), this._isAnimated = !!this._isAnimated;
3563
- }
3564
- d([Bn, U], Vn);
3565
- function Hn() {
3566
- this.it = [], this.prevViewData = [], this.gr = L("g");
3567
- }
3568
- function Un(e, t, n) {
3569
- this.transform = {
3570
- mProps: e,
3571
- op: t,
3572
- container: n
3573
- }, this.elements = [], this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
3574
- }
3575
- var Wn = function(e, t, n, r) {
3576
- if (t === 0) return "";
3577
- var i = e.o, a = e.i, o = e.v, s, c = " M" + r.applyToPointStringified(o[0][0], o[0][1]);
3578
- for (s = 1; s < t; s += 1) c += " C" + r.applyToPointStringified(i[s - 1][0], i[s - 1][1]) + " " + r.applyToPointStringified(a[s][0], a[s][1]) + " " + r.applyToPointStringified(o[s][0], o[s][1]);
3579
- return n && t && (c += " C" + r.applyToPointStringified(i[s - 1][0], i[s - 1][1]) + " " + r.applyToPointStringified(a[0][0], a[0][1]) + " " + r.applyToPointStringified(o[0][0], o[0][1]), c += "z"), c;
3580
- }, Gn = function() {
3581
- var e = new G(), t = new G(), n = { createRenderFunction: r };
3582
- function r(e) {
3583
- switch (e.ty) {
3584
- case "fl": return s;
3585
- case "gf": return l;
3586
- case "gs": return c;
3587
- case "st": return u;
3588
- case "sh":
3589
- case "el":
3590
- case "rc":
3591
- case "sr": return o;
3592
- case "tr": return i;
3593
- case "no": return a;
3594
- default: return null;
3595
- }
3596
- }
3597
- function i(e, t, n) {
3598
- (n || t.transform.op._mdf) && t.transform.container.setAttribute("opacity", t.transform.op.v), (n || t.transform.mProps._mdf) && t.transform.container.setAttribute("transform", t.transform.mProps.v.to2dCSS());
3599
- }
3600
- function a() {}
3601
- function o(n, r, i) {
3602
- var a, o, s, c, l, u, d = r.styles.length, f = r.lvl, p, m, h, g;
3603
- for (u = 0; u < d; u += 1) {
3604
- if (c = r.sh._mdf || i, r.styles[u].lvl < f) {
3605
- for (m = t.reset(), h = f - r.styles[u].lvl, g = r.transformers.length - 1; !c && h > 0;) c = r.transformers[g].mProps._mdf || c, --h, --g;
3606
- if (c) for (h = f - r.styles[u].lvl, g = r.transformers.length - 1; h > 0;) m.multiply(r.transformers[g].mProps.v), --h, --g;
3607
- } else m = e;
3608
- if (p = r.sh.paths, o = p._length, c) {
3609
- for (s = "", a = 0; a < o; a += 1) l = p.shapes[a], l && l._length && (s += Wn(l, l._length, l.c, m));
3610
- r.caches[u] = s;
3611
- } else s = r.caches[u];
3612
- r.styles[u].d += n.hd === !0 ? "" : s, r.styles[u]._mdf = c || r.styles[u]._mdf;
3613
- }
3614
- }
3615
- function s(e, t, n) {
3616
- var r = t.style;
3617
- (t.c._mdf || n) && r.pElem.setAttribute("fill", "rgb(" + w(t.c.v[0]) + "," + w(t.c.v[1]) + "," + w(t.c.v[2]) + ")"), (t.o._mdf || n) && r.pElem.setAttribute("fill-opacity", t.o.v);
3618
- }
3619
- function c(e, t, n) {
3620
- l(e, t, n), u(e, t, n);
3621
- }
3622
- function l(e, t, n) {
3623
- var r = t.gf, i = t.g._hasOpacity, a = t.s.v, o = t.e.v;
3624
- if (t.o._mdf || n) {
3625
- var s = e.ty === "gf" ? "fill-opacity" : "stroke-opacity";
3626
- t.style.pElem.setAttribute(s, t.o.v);
3627
- }
3628
- if (t.s._mdf || n) {
3629
- var c = e.t === 1 ? "x1" : "cx", l = c === "x1" ? "y1" : "cy";
3630
- r.setAttribute(c, a[0]), r.setAttribute(l, a[1]), i && !t.g._collapsable && (t.of.setAttribute(c, a[0]), t.of.setAttribute(l, a[1]));
3631
- }
3632
- var u, d, f, p;
3633
- if (t.g._cmdf || n) {
3634
- u = t.cst;
3635
- var m = t.g.c;
3636
- for (f = u.length, d = 0; d < f; d += 1) p = u[d], p.setAttribute("offset", m[d * 4] + "%"), p.setAttribute("stop-color", "rgb(" + m[d * 4 + 1] + "," + m[d * 4 + 2] + "," + m[d * 4 + 3] + ")");
3637
- }
3638
- if (i && (t.g._omdf || n)) {
3639
- var h = t.g.o;
3640
- for (u = t.g._collapsable ? t.cst : t.ost, f = u.length, d = 0; d < f; d += 1) p = u[d], t.g._collapsable || p.setAttribute("offset", h[d * 2] + "%"), p.setAttribute("stop-opacity", h[d * 2 + 1]);
3641
- }
3642
- if (e.t === 1) (t.e._mdf || n) && (r.setAttribute("x2", o[0]), r.setAttribute("y2", o[1]), i && !t.g._collapsable && (t.of.setAttribute("x2", o[0]), t.of.setAttribute("y2", o[1])));
3643
- else {
3644
- var g;
3645
- if ((t.s._mdf || t.e._mdf || n) && (g = Math.sqrt((a[0] - o[0]) ** 2 + (a[1] - o[1]) ** 2), r.setAttribute("r", g), i && !t.g._collapsable && t.of.setAttribute("r", g)), t.s._mdf || t.e._mdf || t.h._mdf || t.a._mdf || n) {
3646
- g ||= Math.sqrt((a[0] - o[0]) ** 2 + (a[1] - o[1]) ** 2);
3647
- var _ = Math.atan2(o[1] - a[1], o[0] - a[0]), v = t.h.v;
3648
- v >= 1 ? v = .99 : v <= -1 && (v = -.99);
3649
- var y = g * v, b = Math.cos(_ + t.a.v) * y + a[0], x = Math.sin(_ + t.a.v) * y + a[1];
3650
- r.setAttribute("fx", b), r.setAttribute("fy", x), i && !t.g._collapsable && (t.of.setAttribute("fx", b), t.of.setAttribute("fy", x));
3651
- }
3652
- }
3653
- }
3654
- function u(e, t, n) {
3655
- var r = t.style, i = t.d;
3656
- i && (i._mdf || n) && i.dashStr && (r.pElem.setAttribute("stroke-dasharray", i.dashStr), r.pElem.setAttribute("stroke-dashoffset", i.dashoffset[0])), t.c && (t.c._mdf || n) && r.pElem.setAttribute("stroke", "rgb(" + w(t.c.v[0]) + "," + w(t.c.v[1]) + "," + w(t.c.v[2]) + ")"), (t.o._mdf || n) && r.pElem.setAttribute("stroke-opacity", t.o.v), (t.w._mdf || n) && (r.pElem.setAttribute("stroke-width", t.w.v), r.msElem && r.msElem.setAttribute("stroke-width", t.w.v));
3657
- }
3658
- return n;
3659
- }();
3660
- function Z(e, t, n) {
3661
- this.shapes = [], this.shapesData = e.shapes, this.stylesList = [], this.shapeModifiers = [], this.itemsData = [], this.processedElements = [], this.animatedContents = [], this.initElement(e, t, n), this.prevViewData = [];
3662
- }
3663
- d([
3664
- mn,
3665
- vn,
3666
- Tn,
3667
- An,
3668
- En,
3669
- hn,
3670
- Dn
3671
- ], Z), Z.prototype.initSecondaryElement = function() {}, Z.prototype.identityMatrix = new G(), Z.prototype.buildExpressionInterface = function() {}, Z.prototype.createContent = function() {
3672
- this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0), this.filterUniqueShapes();
3673
- }, Z.prototype.filterUniqueShapes = function() {
3674
- var e, t = this.shapes.length, n, r, i = this.stylesList.length, a, o = [], s = !1;
3675
- for (r = 0; r < i; r += 1) {
3676
- for (a = this.stylesList[r], s = !1, o.length = 0, e = 0; e < t; e += 1) n = this.shapes[e], n.styles.indexOf(a) !== -1 && (o.push(n), s = n._isAnimated || s);
3677
- o.length > 1 && s && this.setShapesAsAnimated(o);
3678
- }
3679
- }, Z.prototype.setShapesAsAnimated = function(e) {
3680
- var t, n = e.length;
3681
- for (t = 0; t < n; t += 1) e[t].setAsAnimated();
3682
- }, Z.prototype.createStyleElement = function(e, t) {
3683
- var n, r = new Pn(e, t), i = r.pElem;
3684
- return e.ty === "st" ? n = new In(this, e, r) : e.ty === "fl" ? n = new Ln(this, e, r) : e.ty === "gf" || e.ty === "gs" ? (n = new (e.ty === "gf" ? Bn : Vn)(this, e, r), this.globalData.defs.appendChild(n.gf), n.maskId && (this.globalData.defs.appendChild(n.ms), this.globalData.defs.appendChild(n.of), i.setAttribute("mask", "url(" + l() + "#" + n.maskId + ")"))) : e.ty === "no" && (n = new Rn(this, e, r)), (e.ty === "st" || e.ty === "gs") && (i.setAttribute("stroke-linecap", jn[e.lc || 2]), i.setAttribute("stroke-linejoin", Mn[e.lj || 2]), i.setAttribute("fill-opacity", "0"), e.lj === 1 && i.setAttribute("stroke-miterlimit", e.ml)), e.r === 2 && i.setAttribute("fill-rule", "evenodd"), e.ln && i.setAttribute("id", e.ln), e.cl && i.setAttribute("class", e.cl), e.bm && (i.style["mix-blend-mode"] = nn(e.bm)), this.stylesList.push(r), this.addToAnimatedContents(e, n), n;
3685
- }, Z.prototype.createGroupElement = function(e) {
3686
- var t = new Hn();
3687
- return e.ln && t.gr.setAttribute("id", e.ln), e.cl && t.gr.setAttribute("class", e.cl), e.bm && (t.gr.style["mix-blend-mode"] = nn(e.bm)), t;
3688
- }, Z.prototype.createTransformElement = function(e, t) {
3689
- var n = _t.getTransformProperty(this, e, this), r = new Un(n, n.o, t);
3690
- return this.addToAnimatedContents(e, r), r;
3691
- }, Z.prototype.createShapeElement = function(e, t, n) {
3692
- var r = 4;
3693
- e.ty === "rc" ? r = 5 : e.ty === "el" ? r = 6 : e.ty === "sr" && (r = 7);
3694
- var i = new Nn(t, n, Je.getShapeProp(this, e, r, this));
3695
- return this.shapes.push(i), this.addShapeToModifiers(i), this.addToAnimatedContents(e, i), i;
3696
- }, Z.prototype.addToAnimatedContents = function(e, t) {
3697
- for (var n = 0, r = this.animatedContents.length; n < r;) {
3698
- if (this.animatedContents[n].element === t) return;
3699
- n += 1;
3700
- }
3701
- this.animatedContents.push({
3702
- fn: Gn.createRenderFunction(e),
3703
- element: t,
3704
- data: e
3705
- });
3706
- }, Z.prototype.setElementStyles = function(e) {
3707
- var t = e.styles, n, r = this.stylesList.length;
3708
- for (n = 0; n < r; n += 1) t.indexOf(this.stylesList[n]) === -1 && !this.stylesList[n].closed && t.push(this.stylesList[n]);
3709
- }, Z.prototype.reloadShapes = function() {
3710
- this._isFirstFrame = !0;
3711
- var e, t = this.itemsData.length;
3712
- for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
3713
- for (this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0), this.filterUniqueShapes(), t = this.dynamicProperties.length, e = 0; e < t; e += 1) this.dynamicProperties[e].getValue();
3714
- this.renderModifiers();
3715
- }, Z.prototype.searchShapes = function(e, t, n, r, i, a, o) {
3716
- var s = [].concat(a), c, l = e.length - 1, u, d, f = [], p = [], m, h, g;
3717
- for (c = l; c >= 0; --c) {
3718
- if (g = this.searchProcessedElement(e[c]), g ? t[c] = n[g - 1] : e[c]._render = o, e[c].ty === "fl" || e[c].ty === "st" || e[c].ty === "gf" || e[c].ty === "gs" || e[c].ty === "no") g ? t[c].style.closed = e[c].hd : t[c] = this.createStyleElement(e[c], i), e[c]._render && t[c].style.pElem.parentNode !== r && r.appendChild(t[c].style.pElem), f.push(t[c].style);
3719
- else if (e[c].ty === "gr") {
3720
- if (!g) t[c] = this.createGroupElement(e[c]);
3721
- else for (d = t[c].it.length, u = 0; u < d; u += 1) t[c].prevViewData[u] = t[c].it[u];
3722
- this.searchShapes(e[c].it, t[c].it, t[c].prevViewData, t[c].gr, i + 1, s, o), e[c]._render && t[c].gr.parentNode !== r && r.appendChild(t[c].gr);
3723
- } else e[c].ty === "tr" ? (g || (t[c] = this.createTransformElement(e[c], r)), m = t[c].transform, s.push(m)) : e[c].ty === "sh" || e[c].ty === "rc" || e[c].ty === "el" || e[c].ty === "sr" ? (g || (t[c] = this.createShapeElement(e[c], s, i)), this.setElementStyles(t[c])) : e[c].ty === "tm" || e[c].ty === "rd" || e[c].ty === "ms" || e[c].ty === "pb" || e[c].ty === "zz" || e[c].ty === "op" ? (g ? (h = t[c], h.closed = !1) : (h = mt.getModifier(e[c].ty), h.init(this, e[c]), t[c] = h, this.shapeModifiers.push(h)), p.push(h)) : e[c].ty === "rp" && (g ? (h = t[c], h.closed = !0) : (h = mt.getModifier(e[c].ty), t[c] = h, h.init(this, e, c, t), this.shapeModifiers.push(h), o = !1), p.push(h));
3724
- this.addProcessedElement(e[c], c + 1);
3725
- }
3726
- for (l = f.length, c = 0; c < l; c += 1) f[c].closed = !0;
3727
- for (l = p.length, c = 0; c < l; c += 1) p[c].closed = !0;
3728
- }, Z.prototype.renderInnerContent = function() {
3729
- this.renderModifiers();
3730
- var e, t = this.stylesList.length;
3731
- for (e = 0; e < t; e += 1) this.stylesList[e].reset();
3732
- for (this.renderShape(), e = 0; e < t; e += 1) (this.stylesList[e]._mdf || this._isFirstFrame) && (this.stylesList[e].msElem && (this.stylesList[e].msElem.setAttribute("d", this.stylesList[e].d), this.stylesList[e].d = "M0 0" + this.stylesList[e].d), this.stylesList[e].pElem.setAttribute("d", this.stylesList[e].d || "M0 0"));
3733
- }, Z.prototype.renderShape = function() {
3734
- var e, t = this.animatedContents.length, n;
3735
- for (e = 0; e < t; e += 1) n = this.animatedContents[e], (this._isFirstFrame || n.element._isAnimated) && n.data !== !0 && n.fn(n.data, n.element, this._isFirstFrame);
3736
- }, Z.prototype.destroy = function() {
3737
- this.destroyBaseElement(), this.shapesData = null, this.itemsData = null;
3738
- };
3739
- function Kn(e, t, n, r, i, a) {
3740
- this.o = e, this.sw = t, this.sc = n, this.fc = r, this.m = i, this.p = a, this._mdf = {
3741
- o: !0,
3742
- sw: !!t,
3743
- sc: !!n,
3744
- fc: !!r,
3745
- m: !0,
3746
- p: !0
3747
- };
3748
- }
3749
- Kn.prototype.update = function(e, t, n, r, i, a) {
3750
- this._mdf.o = !1, this._mdf.sw = !1, this._mdf.sc = !1, this._mdf.fc = !1, this._mdf.m = !1, this._mdf.p = !1;
3751
- var o = !1;
3752
- return this.o !== e && (this.o = e, this._mdf.o = !0, o = !0), this.sw !== t && (this.sw = t, this._mdf.sw = !0, o = !0), this.sc !== n && (this.sc = n, this._mdf.sc = !0, o = !0), this.fc !== r && (this.fc = r, this._mdf.fc = !0, o = !0), this.m !== i && (this.m = i, this._mdf.m = !0, o = !0), a.length && (this.p[0] !== a[0] || this.p[1] !== a[1] || this.p[4] !== a[4] || this.p[5] !== a[5] || this.p[12] !== a[12] || this.p[13] !== a[13]) && (this.p = a, this._mdf.p = !0, o = !0), o;
3753
- };
3754
- function Q(e, t) {
3755
- this._frameId = a, this.pv = "", this.v = "", this.kf = !1, this._isFirstFrame = !0, this._mdf = !1, t.d && t.d.sid && (t.d = e.globalData.slotManager.getProp(t.d)), this.data = t, this.elem = e, this.comp = this.elem.comp, this.keysIndex = 0, this.canResize = !1, this.minimumFontSize = 1, this.effectsSequence = [], this.currentData = {
3756
- ascent: 0,
3757
- boxWidth: this.defaultBoxWidth,
3758
- f: "",
3759
- fStyle: "",
3760
- fWeight: "",
3761
- fc: "",
3762
- j: "",
3763
- justifyOffset: "",
3764
- l: [],
3765
- lh: 0,
3766
- lineWidths: [],
3767
- ls: "",
3768
- of: "",
3769
- s: "",
3770
- sc: "",
3771
- sw: 0,
3772
- t: 0,
3773
- tr: 0,
3774
- sz: 0,
3775
- ps: null,
3776
- fillColorAnim: !1,
3777
- strokeColorAnim: !1,
3778
- strokeWidthAnim: !1,
3779
- yOffset: 0,
3780
- finalSize: 0,
3781
- finalText: [],
3782
- finalLineHeight: 0,
3783
- __complete: !1
3784
- }, this.copyData(this.currentData, this.data.d.k[0].s), this.searchProperty() || this.completeTextData(this.currentData);
3785
- }
3786
- Q.prototype.defaultBoxWidth = [0, 0], Q.prototype.copyData = function(e, t) {
3787
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
3788
- return e;
3789
- }, Q.prototype.setCurrentData = function(e) {
3790
- e.__complete || this.completeTextData(e), this.currentData = e, this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth, this._mdf = !0;
3791
- }, Q.prototype.searchProperty = function() {
3792
- return this.searchKeyframes();
3793
- }, Q.prototype.searchKeyframes = function() {
3794
- return this.kf = this.data.d.k.length > 1, this.kf && this.addEffect(this.getKeyframeValue.bind(this)), this.kf;
3795
- }, Q.prototype.addEffect = function(e) {
3796
- this.effectsSequence.push(e), this.elem.addDynamicProperty(this);
3797
- }, Q.prototype.getValue = function(e) {
3798
- if (!((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !e)) {
3799
- this.currentData.t = this.data.d.k[this.keysIndex].s.t;
3800
- var t = this.currentData, n = this.keysIndex;
3801
- if (this.lock) {
3802
- this.setCurrentData(this.currentData);
3803
- return;
3804
- }
3805
- this.lock = !0, this._mdf = !1;
3806
- var r, i = this.effectsSequence.length, a = e || this.data.d.k[this.keysIndex].s;
3807
- for (r = 0; r < i; r += 1) a = n === this.keysIndex ? this.effectsSequence[r](this.currentData, a.t) : this.effectsSequence[r](a, a.t);
3808
- t !== a && this.setCurrentData(a), this.v = this.currentData, this.pv = this.v, this.lock = !1, this.frameId = this.elem.globalData.frameId;
3809
- }
3810
- }, Q.prototype.getKeyframeValue = function() {
3811
- for (var e = this.data.d.k, t = this.elem.comp.renderedFrame, n = 0, r = e.length; n <= r - 1 && !(n === r - 1 || e[n + 1].t > t);) n += 1;
3812
- return this.keysIndex !== n && (this.keysIndex = n), this.data.d.k[this.keysIndex].s;
3813
- }, Q.prototype.buildFinalText = function(e) {
3814
- for (var t = [], n = 0, r = e.length, i, a, o = !1, s = !1, c = ""; n < r;) o = s, s = !1, i = e.charCodeAt(n), c = e.charAt(n), Qt.isCombinedCharacter(i) ? o = !0 : i >= 55296 && i <= 56319 ? Qt.isRegionalFlag(e, n) ? c = e.substr(n, 14) : (a = e.charCodeAt(n + 1), a >= 56320 && a <= 57343 && (Qt.isModifier(i, a) ? (c = e.substr(n, 2), o = !0) : c = Qt.isFlagEmoji(e.substr(n, 4)) ? e.substr(n, 4) : e.substr(n, 2))) : i > 56319 ? (a = e.charCodeAt(n + 1), Qt.isVariationSelector(i) && (o = !0)) : Qt.isZeroWidthJoiner(i) && (o = !0, s = !0), o ? (t[t.length - 1] += c, o = !1) : t.push(c), n += c.length;
3815
- return t;
3816
- }, Q.prototype.completeTextData = function(e) {
3817
- e.__complete = !0;
3818
- var t = this.elem.globalData.fontManager, n = this.data, r = [], i, a, o, s = 0, c, l = n.m.g, u = 0, d = 0, f = 0, p = [], m = 0, h = 0, g, _, v = t.getFontByName(e.f), y, b = 0, x = Zt(v);
3819
- e.fWeight = x.weight, e.fStyle = x.style, e.finalSize = e.s, e.finalText = this.buildFinalText(e.t), a = e.finalText.length, e.finalLineHeight = e.lh;
3820
- var S = e.tr / 1e3 * e.finalSize, C;
3821
- if (e.sz) for (var w = !0, T = e.sz[0], E = e.sz[1], D, O; w;) {
3822
- O = this.buildFinalText(e.t), D = 0, m = 0, a = O.length, S = e.tr / 1e3 * e.finalSize;
3823
- var k = -1;
3824
- for (i = 0; i < a; i += 1) C = O[i].charCodeAt(0), o = !1, O[i] === " " ? k = i : (C === 13 || C === 3) && (m = 0, o = !0, D += e.finalLineHeight || e.finalSize * 1.2), t.chars ? (y = t.getCharData(O[i], v.fStyle, v.fFamily), b = o ? 0 : y.w * e.finalSize / 100) : b = t.measureText(O[i], e.f, e.finalSize), m + b > T && O[i] !== " " ? (k === -1 ? a += 1 : i = k, D += e.finalLineHeight || e.finalSize * 1.2, O.splice(i, k === i ? 1 : 0, "\r"), k = -1, m = 0) : (m += b, m += S);
3825
- D += v.ascent * e.finalSize / 100, this.canResize && e.finalSize > this.minimumFontSize && E < D ? (--e.finalSize, e.finalLineHeight = e.finalSize * e.lh / e.s) : (e.finalText = O, a = e.finalText.length, w = !1);
3826
- }
3827
- m = -S, b = 0;
3828
- var A = 0, j;
3829
- for (i = 0; i < a; i += 1) if (o = !1, j = e.finalText[i], C = j.charCodeAt(0), C === 13 || C === 3 ? (A = 0, p.push(m), h = m > h ? m : h, m = -2 * S, c = "", o = !0, f += 1) : c = j, t.chars ? (y = t.getCharData(j, v.fStyle, t.getFontByName(e.f).fFamily), b = o ? 0 : y.w * e.finalSize / 100) : b = t.measureText(c, e.f, e.finalSize), j === " " ? A += b + S : (m += b + S + A, A = 0), r.push({
3830
- l: b,
3831
- an: b,
3832
- add: u,
3833
- n: o,
3834
- anIndexes: [],
3835
- val: c,
3836
- line: f,
3837
- animatorJustifyOffset: 0
3838
- }), l == 2) {
3839
- if (u += b, c === "" || c === " " || i === a - 1) {
3840
- for ((c === "" || c === " ") && (u -= b); d <= i;) r[d].an = u, r[d].ind = s, r[d].extra = b, d += 1;
3841
- s += 1, u = 0;
3842
- }
3843
- } else if (l == 3) {
3844
- if (u += b, c === "" || i === a - 1) {
3845
- for (c === "" && (u -= b); d <= i;) r[d].an = u, r[d].ind = s, r[d].extra = b, d += 1;
3846
- u = 0, s += 1;
3847
- }
3848
- } else r[s].ind = s, r[s].extra = 0, s += 1;
3849
- if (e.l = r, h = m > h ? m : h, p.push(m), e.sz) e.boxWidth = e.sz[0], e.justifyOffset = 0;
3850
- else switch (e.boxWidth = h, e.j) {
3851
- case 1:
3852
- e.justifyOffset = -e.boxWidth;
3853
- break;
3854
- case 2:
3855
- e.justifyOffset = -e.boxWidth / 2;
3856
- break;
3857
- default: e.justifyOffset = 0;
3858
- }
3859
- e.lineWidths = p;
3860
- var M = n.a, N, P;
3861
- _ = M.length;
3862
- var F, ee, I = [];
3863
- for (g = 0; g < _; g += 1) {
3864
- for (N = M[g], N.a.sc && (e.strokeColorAnim = !0), N.a.sw && (e.strokeWidthAnim = !0), (N.a.fc || N.a.fh || N.a.fs || N.a.fb) && (e.fillColorAnim = !0), ee = 0, F = N.s.b, i = 0; i < a; i += 1) P = r[i], P.anIndexes[g] = ee, (F == 1 && P.val !== "" || F == 2 && P.val !== "" && P.val !== " " || F == 3 && (P.n || P.val == " " || i == a - 1) || F == 4 && (P.n || i == a - 1)) && (N.s.rn === 1 && I.push(ee), ee += 1);
3865
- n.a[g].s.totalChars = ee;
3866
- var te = -1, ne;
3867
- if (N.s.rn === 1) for (i = 0; i < a; i += 1) P = r[i], te != P.anIndexes[g] && (te = P.anIndexes[g], ne = I.splice(Math.floor(Math.random() * I.length), 1)[0]), P.anIndexes[g] = ne;
3868
- }
3869
- e.yOffset = e.finalLineHeight || e.finalSize * 1.2, e.ls = e.ls || 0, e.ascent = v.ascent * e.finalSize / 100;
3870
- }, Q.prototype.updateDocumentData = function(e, t) {
3871
- t = t === void 0 ? this.keysIndex : t;
3872
- var n = this.copyData({}, this.data.d.k[t].s);
3873
- n = this.copyData(n, e), this.data.d.k[t].s = n, this.recalculate(t), this.setCurrentData(n), this.elem.addDynamicProperty(this);
3874
- }, Q.prototype.recalculate = function(e) {
3875
- var t = this.data.d.k[e].s;
3876
- t.__complete = !1, this.keysIndex = 0, this._isFirstFrame = !0, this.getValue(t);
3877
- }, Q.prototype.canResizeFont = function(e) {
3878
- this.canResize = e, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this);
3879
- }, Q.prototype.setMinimumFontSize = function(e) {
3880
- this.minimumFontSize = Math.floor(e) || 1, this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this);
3881
- };
3882
- var qn = function() {
3883
- var e = Math.max, t = Math.min, n = Math.floor;
3884
- function r(e, t) {
3885
- this._currentTextLength = -1, this.k = !1, this.data = t, this.elem = e, this.comp = e.comp, this.finalS = 0, this.finalE = 0, this.initDynamicPropertyContainer(e), this.s = H.getProp(e, t.s || { k: 0 }, 0, 0, this), "e" in t ? this.e = H.getProp(e, t.e, 0, 0, this) : this.e = { v: 100 }, this.o = H.getProp(e, t.o || { k: 0 }, 0, 0, this), this.xe = H.getProp(e, t.xe || { k: 0 }, 0, 0, this), this.ne = H.getProp(e, t.ne || { k: 0 }, 0, 0, this), this.sm = H.getProp(e, t.sm || { k: 100 }, 0, 0, this), this.a = H.getProp(e, t.a, 0, .01, this), this.dynamicProperties.length || this.getValue();
3886
- }
3887
- r.prototype = {
3888
- getMult: function(r) {
3889
- this._currentTextLength !== this.elem.textProperty.currentData.l.length && this.getValue();
3890
- var i = 0, a = 0, o = 1, s = 1;
3891
- this.ne.v > 0 ? i = this.ne.v / 100 : a = -this.ne.v / 100, this.xe.v > 0 ? o = 1 - this.xe.v / 100 : s = 1 + this.xe.v / 100;
3892
- var c = Ce.getBezierEasing(i, a, o, s).get, l = 0, u = this.finalS, d = this.finalE, f = this.data.sh;
3893
- if (f === 2) l = d === u ? r >= d ? 1 : 0 : e(0, t(.5 / (d - u) + (r - u) / (d - u), 1)), l = c(l);
3894
- else if (f === 3) l = d === u ? r >= d ? 0 : 1 : 1 - e(0, t(.5 / (d - u) + (r - u) / (d - u), 1)), l = c(l);
3895
- else if (f === 4) d === u ? l = 0 : (l = e(0, t(.5 / (d - u) + (r - u) / (d - u), 1)), l < .5 ? l *= 2 : l = 1 - 2 * (l - .5)), l = c(l);
3896
- else if (f === 5) {
3897
- if (d === u) l = 0;
3898
- else {
3899
- var p = d - u;
3900
- r = t(e(0, r + .5 - u), d - u);
3901
- var m = -p / 2 + r, h = p / 2;
3902
- l = Math.sqrt(1 - m * m / (h * h));
3903
- }
3904
- l = c(l);
3905
- } else f === 6 ? (d === u ? l = 0 : (r = t(e(0, r + .5 - u), d - u), l = (1 + Math.cos(Math.PI + Math.PI * 2 * r / (d - u))) / 2), l = c(l)) : (r >= n(u) && (l = r - u < 0 ? e(0, t(t(d, 1) - (u - r), 1)) : e(0, t(d - r, 1))), l = c(l));
3906
- if (this.sm.v !== 100) {
3907
- var g = this.sm.v * .01;
3908
- g === 0 && (g = 1e-8);
3909
- var _ = .5 - g * .5;
3910
- l < _ ? l = 0 : (l = (l - _) / g, l > 1 && (l = 1));
3911
- }
3912
- return l * this.a.v;
3913
- },
3914
- getValue: function(e) {
3915
- this.iterateDynamicProperties(), this._mdf = e || this._mdf, this._currentTextLength = this.elem.textProperty.currentData.l.length || 0, e && this.data.r === 2 && (this.e.v = this._currentTextLength);
3916
- var t = this.data.r === 2 ? 1 : 100 / this.data.totalChars, n = this.o.v / t, r = this.s.v / t + n, i = this.e.v / t + n;
3917
- if (r > i) {
3918
- var a = r;
3919
- r = i, i = a;
3920
- }
3921
- this.finalS = r, this.finalE = i;
3922
- }
3923
- }, d([U], r);
3924
- function i(e, t, n) {
3925
- return new r(e, t, n);
3926
- }
3927
- return { getTextSelectorProp: i };
3928
- }();
3929
- function Jn(e, t, n) {
3930
- var r = { propType: !1 }, i = H.getProp, a = t.a;
3931
- this.a = {
3932
- r: a.r ? i(e, a.r, 0, O, n) : r,
3933
- rx: a.rx ? i(e, a.rx, 0, O, n) : r,
3934
- ry: a.ry ? i(e, a.ry, 0, O, n) : r,
3935
- sk: a.sk ? i(e, a.sk, 0, O, n) : r,
3936
- sa: a.sa ? i(e, a.sa, 0, O, n) : r,
3937
- s: a.s ? i(e, a.s, 1, .01, n) : r,
3938
- a: a.a ? i(e, a.a, 1, 0, n) : r,
3939
- o: a.o ? i(e, a.o, 0, .01, n) : r,
3940
- p: a.p ? i(e, a.p, 1, 0, n) : r,
3941
- sw: a.sw ? i(e, a.sw, 0, 0, n) : r,
3942
- sc: a.sc ? i(e, a.sc, 1, 0, n) : r,
3943
- fc: a.fc ? i(e, a.fc, 1, 0, n) : r,
3944
- fh: a.fh ? i(e, a.fh, 0, 0, n) : r,
3945
- fs: a.fs ? i(e, a.fs, 0, .01, n) : r,
3946
- fb: a.fb ? i(e, a.fb, 0, .01, n) : r,
3947
- t: a.t ? i(e, a.t, 0, 0, n) : r
3948
- }, this.s = qn.getTextSelectorProp(e, t.s, n), this.s.t = t.s.t;
3949
- }
3950
- function Yn(e, t, n) {
3951
- this._isFirstFrame = !0, this._hasMaskedPath = !1, this._frameId = -1, this._textData = e, this._renderType = t, this._elem = n, this._animatorsData = h(this._textData.a.length), this._pathData = {}, this._moreOptions = { alignment: {} }, this.renderedLetters = [], this.lettersChangedFlag = !1, this.initDynamicPropertyContainer(n);
3952
- }
3953
- Yn.prototype.searchProperties = function() {
3954
- var e, t = this._textData.a.length, n, r = H.getProp;
3955
- for (e = 0; e < t; e += 1) n = this._textData.a[e], this._animatorsData[e] = new Jn(this._elem, n, this);
3956
- this._textData.p && "m" in this._textData.p ? (this._pathData = {
3957
- a: r(this._elem, this._textData.p.a, 0, 0, this),
3958
- f: r(this._elem, this._textData.p.f, 0, 0, this),
3959
- l: r(this._elem, this._textData.p.l, 0, 0, this),
3960
- r: r(this._elem, this._textData.p.r, 0, 0, this),
3961
- p: r(this._elem, this._textData.p.p, 0, 0, this),
3962
- m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
3963
- }, this._hasMaskedPath = !0) : this._hasMaskedPath = !1, this._moreOptions.alignment = r(this._elem, this._textData.m.a, 1, 0, this);
3964
- }, Yn.prototype.getMeasures = function(e, t) {
3965
- if (this.lettersChangedFlag = t, !(!this._mdf && !this._isFirstFrame && !t && (!this._hasMaskedPath || !this._pathData.m._mdf))) {
3966
- this._isFirstFrame = !1;
3967
- var n = this._moreOptions.alignment.v, r = this._animatorsData, i = this._textData, a = this.mHelper, o = this._renderType, s = this.renderedLetters.length, c, l, u, d, f = e.l, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D;
3968
- if (this._hasMaskedPath) {
3969
- if (D = this._pathData.m, !this._pathData.n || this._pathData._mdf) {
3970
- var O = D.v;
3971
- this._pathData.r.v && (O = O.reverse()), p = {
3972
- tLength: 0,
3973
- segments: []
3974
- }, d = O._length - 1;
3975
- var k;
3976
- for (w = 0, u = 0; u < d; u += 1) k = ke.buildBezierData(O.v[u], O.v[u + 1], [O.o[u][0] - O.v[u][0], O.o[u][1] - O.v[u][1]], [O.i[u + 1][0] - O.v[u + 1][0], O.i[u + 1][1] - O.v[u + 1][1]]), p.tLength += k.segmentLength, p.segments.push(k), w += k.segmentLength;
3977
- u = d, D.v.c && (k = ke.buildBezierData(O.v[u], O.v[0], [O.o[u][0] - O.v[u][0], O.o[u][1] - O.v[u][1]], [O.i[0][0] - O.v[0][0], O.i[0][1] - O.v[0][1]]), p.tLength += k.segmentLength, p.segments.push(k), w += k.segmentLength), this._pathData.pi = p;
3978
- }
3979
- if (p = this._pathData.pi, m = this._pathData.f.v, y = 0, v = 1, g = 0, _ = !0, S = p.segments, m < 0 && D.v.c) for (p.tLength < Math.abs(m) && (m = -Math.abs(m) % p.tLength), y = S.length - 1, x = S[y].points, v = x.length - 1; m < 0;) m += x[v].partialLength, --v, v < 0 && (--y, x = S[y].points, v = x.length - 1);
3980
- x = S[y].points, b = x[v - 1], h = x[v], C = h.partialLength;
3981
- }
3982
- d = f.length, c = 0, l = 0;
3983
- var A = e.finalSize * 1.2 * .714, j = !0, M, N, P, F = r.length, ee, I, te = -1, ne, oe, se, ce = m, le = y, ue = v, de = -1, fe, pe, L, R, z, me, he, ge, _e = "", ve = this.defaultPropsArray, ye;
3984
- if (e.j === 2 || e.j === 1) {
3985
- var be = 0, xe = 0, Se = e.j === 2 ? -.5 : -1, B = 0, V = !0;
3986
- for (u = 0; u < d; u += 1) if (f[u].n) {
3987
- for (be && (be += xe); B < u;) f[B].animatorJustifyOffset = be, B += 1;
3988
- be = 0, V = !0;
3989
- } else {
3990
- for (P = 0; P < F; P += 1) M = r[P].a, M.t.propType && (V && e.j === 2 && (xe += M.t.v * Se), N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), I.length ? be += M.t.v * I[0] * Se : be += M.t.v * I * Se);
3991
- V = !1;
3992
- }
3993
- for (be && (be += xe); B < u;) f[B].animatorJustifyOffset = be, B += 1;
3994
- }
3995
- for (u = 0; u < d; u += 1) {
3996
- if (a.reset(), fe = 1, f[u].n) c = 0, l += e.yOffset, l += j ? 1 : 0, m = ce, j = !1, this._hasMaskedPath && (y = le, v = ue, x = S[y].points, b = x[v - 1], h = x[v], C = h.partialLength, g = 0), _e = "", ge = "", me = "", ye = "", ve = this.defaultPropsArray;
3997
- else {
3998
- if (this._hasMaskedPath) {
3999
- if (de !== f[u].line) {
4000
- switch (e.j) {
4001
- case 1:
4002
- m += w - e.lineWidths[f[u].line];
4003
- break;
4004
- case 2:
4005
- m += (w - e.lineWidths[f[u].line]) / 2;
4006
- break;
4007
- default: break;
4008
- }
4009
- de = f[u].line;
4010
- }
4011
- te !== f[u].ind && (f[te] && (m += f[te].extra), m += f[u].an / 2, te = f[u].ind), m += n[0] * f[u].an * .005;
4012
- var Ce = 0;
4013
- for (P = 0; P < F; P += 1) M = r[P].a, M.p.propType && (N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), I.length ? Ce += M.p.v[0] * I[0] : Ce += M.p.v[0] * I), M.a.propType && (N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), I.length ? Ce += M.a.v[0] * I[0] : Ce += M.a.v[0] * I);
4014
- for (_ = !0, this._pathData.a.v && (m = f[0].an * .5 + (w - this._pathData.f.v - f[0].an * .5 - f[f.length - 1].an * .5) * te / (d - 1), m += this._pathData.f.v); _;) g + C >= m + Ce || !x ? (T = (m + Ce - g) / h.partialLength, oe = b.point[0] + (h.point[0] - b.point[0]) * T, se = b.point[1] + (h.point[1] - b.point[1]) * T, a.translate(-n[0] * f[u].an * .005, -(n[1] * A) * .01), _ = !1) : x && (g += h.partialLength, v += 1, v >= x.length && (v = 0, y += 1, S[y] ? x = S[y].points : D.v.c ? (v = 0, y = 0, x = S[y].points) : (g -= h.partialLength, x = null)), x && (b = h, h = x[v], C = h.partialLength));
4015
- ne = f[u].an / 2 - f[u].add, a.translate(-ne, 0, 0);
4016
- } else ne = f[u].an / 2 - f[u].add, a.translate(-ne, 0, 0), a.translate(-n[0] * f[u].an * .005, -n[1] * A * .01, 0);
4017
- for (P = 0; P < F; P += 1) M = r[P].a, M.t.propType && (N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), (c !== 0 || e.j !== 0) && (this._hasMaskedPath ? I.length ? m += M.t.v * I[0] : m += M.t.v * I : I.length ? c += M.t.v * I[0] : c += M.t.v * I));
4018
- for (e.strokeWidthAnim && (L = e.sw || 0), e.strokeColorAnim && (pe = e.sc ? [
4019
- e.sc[0],
4020
- e.sc[1],
4021
- e.sc[2]
4022
- ] : [
4023
- 0,
4024
- 0,
4025
- 0
4026
- ]), e.fillColorAnim && e.fc && (R = [
4027
- e.fc[0],
4028
- e.fc[1],
4029
- e.fc[2]
4030
- ]), P = 0; P < F; P += 1) M = r[P].a, M.a.propType && (N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), I.length ? a.translate(-M.a.v[0] * I[0], -M.a.v[1] * I[1], M.a.v[2] * I[2]) : a.translate(-M.a.v[0] * I, -M.a.v[1] * I, M.a.v[2] * I));
4031
- for (P = 0; P < F; P += 1) M = r[P].a, M.s.propType && (N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), I.length ? a.scale(1 + (M.s.v[0] - 1) * I[0], 1 + (M.s.v[1] - 1) * I[1], 1) : a.scale(1 + (M.s.v[0] - 1) * I, 1 + (M.s.v[1] - 1) * I, 1));
4032
- for (P = 0; P < F; P += 1) {
4033
- if (M = r[P].a, N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), M.sk.propType && (I.length ? a.skewFromAxis(-M.sk.v * I[0], M.sa.v * I[1]) : a.skewFromAxis(-M.sk.v * I, M.sa.v * I)), M.r.propType && (I.length ? a.rotateZ(-M.r.v * I[2]) : a.rotateZ(-M.r.v * I)), M.ry.propType && (I.length ? a.rotateY(M.ry.v * I[1]) : a.rotateY(M.ry.v * I)), M.rx.propType && (I.length ? a.rotateX(M.rx.v * I[0]) : a.rotateX(M.rx.v * I)), M.o.propType && (I.length ? fe += (M.o.v * I[0] - fe) * I[0] : fe += (M.o.v * I - fe) * I), e.strokeWidthAnim && M.sw.propType && (I.length ? L += M.sw.v * I[0] : L += M.sw.v * I), e.strokeColorAnim && M.sc.propType) for (z = 0; z < 3; z += 1) I.length ? pe[z] += (M.sc.v[z] - pe[z]) * I[0] : pe[z] += (M.sc.v[z] - pe[z]) * I;
4034
- if (e.fillColorAnim && e.fc) {
4035
- if (M.fc.propType) for (z = 0; z < 3; z += 1) I.length ? R[z] += (M.fc.v[z] - R[z]) * I[0] : R[z] += (M.fc.v[z] - R[z]) * I;
4036
- M.fh.propType && (R = I.length ? ae(R, M.fh.v * I[0]) : ae(R, M.fh.v * I)), M.fs.propType && (R = I.length ? re(R, M.fs.v * I[0]) : re(R, M.fs.v * I)), M.fb.propType && (R = I.length ? ie(R, M.fb.v * I[0]) : ie(R, M.fb.v * I));
4037
- }
4038
- }
4039
- for (P = 0; P < F; P += 1) M = r[P].a, M.p.propType && (N = r[P].s, I = N.getMult(f[u].anIndexes[P], i.a[P].s.totalChars), this._hasMaskedPath ? I.length ? a.translate(0, M.p.v[1] * I[0], -M.p.v[2] * I[1]) : a.translate(0, M.p.v[1] * I, -M.p.v[2] * I) : I.length ? a.translate(M.p.v[0] * I[0], M.p.v[1] * I[1], -M.p.v[2] * I[2]) : a.translate(M.p.v[0] * I, M.p.v[1] * I, -M.p.v[2] * I));
4040
- if (e.strokeWidthAnim && (me = L < 0 ? 0 : L), e.strokeColorAnim && (he = "rgb(" + Math.round(pe[0] * 255) + "," + Math.round(pe[1] * 255) + "," + Math.round(pe[2] * 255) + ")"), e.fillColorAnim && e.fc && (ge = "rgb(" + Math.round(R[0] * 255) + "," + Math.round(R[1] * 255) + "," + Math.round(R[2] * 255) + ")"), this._hasMaskedPath) {
4041
- if (a.translate(0, -e.ls), a.translate(0, n[1] * A * .01 + l, 0), this._pathData.p.v) {
4042
- E = (h.point[1] - b.point[1]) / (h.point[0] - b.point[0]);
4043
- var we = Math.atan(E) * 180 / Math.PI;
4044
- h.point[0] < b.point[0] && (we += 180), a.rotate(-we * Math.PI / 180);
4045
- }
4046
- a.translate(oe, se, 0), m -= n[0] * f[u].an * .005, f[u + 1] && te !== f[u + 1].ind && (m += f[u].an / 2, m += e.tr * .001 * e.finalSize);
4047
- } else {
4048
- switch (a.translate(c, l, 0), e.ps && a.translate(e.ps[0], e.ps[1] + e.ascent, 0), e.j) {
4049
- case 1:
4050
- a.translate(f[u].animatorJustifyOffset + e.justifyOffset + (e.boxWidth - e.lineWidths[f[u].line]), 0, 0);
4051
- break;
4052
- case 2:
4053
- a.translate(f[u].animatorJustifyOffset + e.justifyOffset + (e.boxWidth - e.lineWidths[f[u].line]) / 2, 0, 0);
4054
- break;
4055
- default: break;
4056
- }
4057
- a.translate(0, -e.ls), a.translate(ne, 0, 0), a.translate(n[0] * f[u].an * .005, n[1] * A * .01, 0), c += f[u].l + e.tr * .001 * e.finalSize;
4058
- }
4059
- o === "html" ? _e = a.toCSS() : o === "svg" ? _e = a.to2dCSS() : ve = [
4060
- a.props[0],
4061
- a.props[1],
4062
- a.props[2],
4063
- a.props[3],
4064
- a.props[4],
4065
- a.props[5],
4066
- a.props[6],
4067
- a.props[7],
4068
- a.props[8],
4069
- a.props[9],
4070
- a.props[10],
4071
- a.props[11],
4072
- a.props[12],
4073
- a.props[13],
4074
- a.props[14],
4075
- a.props[15]
4076
- ], ye = fe;
4077
- }
4078
- s <= u ? (ee = new Kn(ye, me, he, ge, _e, ve), this.renderedLetters.push(ee), s += 1, this.lettersChangedFlag = !0) : (ee = this.renderedLetters[u], this.lettersChangedFlag = ee.update(ye, me, he, ge, _e, ve) || this.lettersChangedFlag);
4079
- }
4080
- }
4081
- }, Yn.prototype.getValue = function() {
4082
- this._elem.globalData.frameId !== this._frameId && (this._frameId = this._elem.globalData.frameId, this.iterateDynamicProperties());
4083
- }, Yn.prototype.mHelper = new G(), Yn.prototype.defaultPropsArray = [], d([U], Yn);
4084
- function Xn() {}
4085
- Xn.prototype.initElement = function(e, t, n) {
4086
- this.lettersChangedFlag = !0, this.initFrame(), this.initBaseData(e, t, n), this.textProperty = new Q(this, e.t, this.dynamicProperties), this.textAnimator = new Yn(e.t, this.renderType, this), this.initTransform(e, t, n), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide(), this.textAnimator.searchProperties(this.dynamicProperties);
4087
- }, Xn.prototype.prepareFrame = function(e) {
4088
- this._mdf = !1, this.prepareRenderableFrame(e), this.prepareProperties(e, this.isInRange);
4089
- }, Xn.prototype.createPathShape = function(e, t) {
4090
- var n, r = t.length, i, a = "";
4091
- for (n = 0; n < r; n += 1) t[n].ty === "sh" && (i = t[n].ks.k, a += Wn(i, i.i.length, !0, e));
4092
- return a;
4093
- }, Xn.prototype.updateDocumentData = function(e, t) {
4094
- this.textProperty.updateDocumentData(e, t);
4095
- }, Xn.prototype.canResizeFont = function(e) {
4096
- this.textProperty.canResizeFont(e);
4097
- }, Xn.prototype.setMinimumFontSize = function(e) {
4098
- this.textProperty.setMinimumFontSize(e);
4099
- }, Xn.prototype.applyTextPropertiesToMatrix = function(e, t, n, r, i) {
4100
- switch (e.ps && t.translate(e.ps[0], e.ps[1] + e.ascent, 0), t.translate(0, -e.ls, 0), e.j) {
4101
- case 1:
4102
- t.translate(e.justifyOffset + (e.boxWidth - e.lineWidths[n]), 0, 0);
4103
- break;
4104
- case 2:
4105
- t.translate(e.justifyOffset + (e.boxWidth - e.lineWidths[n]) / 2, 0, 0);
4106
- break;
4107
- default: break;
4108
- }
4109
- t.translate(r, i, 0);
4110
- }, Xn.prototype.buildColor = function(e) {
4111
- return "rgb(" + Math.round(e[0] * 255) + "," + Math.round(e[1] * 255) + "," + Math.round(e[2] * 255) + ")";
4112
- }, Xn.prototype.emptyProp = new Kn(), Xn.prototype.destroy = function() {}, Xn.prototype.validateText = function() {
4113
- (this.textProperty._mdf || this.textProperty._isFirstFrame) && (this.buildNewText(), this.textProperty._isFirstFrame = !1, this.textProperty._mdf = !1);
4114
- };
4115
- var Zn = { shapes: [] };
4116
- function Qn(e, t, n) {
4117
- this.textSpans = [], this.renderType = "svg", this.initElement(e, t, n);
4118
- }
4119
- d([
4120
- mn,
4121
- vn,
4122
- Tn,
4123
- En,
4124
- hn,
4125
- Dn,
4126
- Xn
4127
- ], Qn), Qn.prototype.createContent = function() {
4128
- this.data.singleShape && !this.globalData.fontManager.chars && (this.textContainer = L("text"));
4129
- }, Qn.prototype.buildTextContents = function(e) {
4130
- for (var t = 0, n = e.length, r = [], i = ""; t < n;) e[t] === "\r" || e[t] === "" ? (r.push(i), i = "") : i += e[t], t += 1;
4131
- return r.push(i), r;
4132
- }, Qn.prototype.buildShapeData = function(e, t) {
4133
- if (e.shapes && e.shapes.length) {
4134
- var n = e.shapes[0];
4135
- if (n.it) {
4136
- var r = n.it[n.it.length - 1];
4137
- r.s && (r.s.k[0] = t, r.s.k[1] = t);
4138
- }
4139
- }
4140
- return e;
4141
- }, Qn.prototype.buildNewText = function() {
4142
- this.addDynamicProperty(this);
4143
- var e, t, n = this.textProperty.currentData;
4144
- this.renderedLetters = h(n ? n.l.length : 0), n.fc ? this.layerElement.setAttribute("fill", this.buildColor(n.fc)) : this.layerElement.setAttribute("fill", "rgba(0,0,0,0)"), n.sc && (this.layerElement.setAttribute("stroke", this.buildColor(n.sc)), this.layerElement.setAttribute("stroke-width", n.sw)), this.layerElement.setAttribute("font-size", n.finalSize);
4145
- var r = this.globalData.fontManager.getFontByName(n.f);
4146
- if (r.fClass) this.layerElement.setAttribute("class", r.fClass);
4147
- else {
4148
- this.layerElement.setAttribute("font-family", r.fFamily);
4149
- var i = n.fWeight, a = n.fStyle;
4150
- this.layerElement.setAttribute("font-style", a), this.layerElement.setAttribute("font-weight", i);
4151
- }
4152
- this.layerElement.setAttribute("aria-label", n.t);
4153
- var o = n.l || [], s = !!this.globalData.fontManager.chars;
4154
- t = o.length;
4155
- var c, l = this.mHelper, u = "", d = this.data.singleShape, f = 0, p = 0, m = !0, g = n.tr * .001 * n.finalSize;
4156
- if (d && !s && !n.sz) {
4157
- var _ = this.textContainer, v = "start";
4158
- switch (n.j) {
4159
- case 1:
4160
- v = "end";
4161
- break;
4162
- case 2:
4163
- v = "middle";
4164
- break;
4165
- default:
4166
- v = "start";
4167
- break;
4168
- }
4169
- _.setAttribute("text-anchor", v), _.setAttribute("letter-spacing", g);
4170
- var y = this.buildTextContents(n.finalText);
4171
- for (t = y.length, p = n.ps ? n.ps[1] + n.ascent : 0, e = 0; e < t; e += 1) c = this.textSpans[e].span || L("tspan"), c.textContent = y[e], c.setAttribute("x", 0), c.setAttribute("y", p), c.style.display = "inherit", _.appendChild(c), this.textSpans[e] || (this.textSpans[e] = {
4172
- span: null,
4173
- glyph: null
4174
- }), this.textSpans[e].span = c, p += n.finalLineHeight;
4175
- this.layerElement.appendChild(_);
4176
- } else {
4177
- var b = this.textSpans.length, x;
4178
- for (e = 0; e < t; e += 1) {
4179
- if (this.textSpans[e] || (this.textSpans[e] = {
4180
- span: null,
4181
- childSpan: null,
4182
- glyph: null
4183
- }), !s || !d || e === 0) {
4184
- if (c = b > e ? this.textSpans[e].span : L(s ? "g" : "text"), b <= e) {
4185
- if (c.setAttribute("stroke-linecap", "butt"), c.setAttribute("stroke-linejoin", "round"), c.setAttribute("stroke-miterlimit", "4"), this.textSpans[e].span = c, s) {
4186
- var S = L("g");
4187
- c.appendChild(S), this.textSpans[e].childSpan = S;
4188
- }
4189
- this.textSpans[e].span = c, this.layerElement.appendChild(c);
4190
- }
4191
- c.style.display = "inherit";
4192
- }
4193
- if (l.reset(), d && (o[e].n && (f = -g, p += n.yOffset, p += m ? 1 : 0, m = !1), this.applyTextPropertiesToMatrix(n, l, o[e].line, f, p), f += o[e].l || 0, f += g), s) {
4194
- x = this.globalData.fontManager.getCharData(n.finalText[e], r.fStyle, this.globalData.fontManager.getFontByName(n.f).fFamily);
4195
- var C;
4196
- if (x.t === 1) C = new nr(x.data, this.globalData, this);
4197
- else {
4198
- var w = Zn;
4199
- x.data && x.data.shapes && (w = this.buildShapeData(x.data, n.finalSize)), C = new Z(w, this.globalData, this);
4200
- }
4201
- if (this.textSpans[e].glyph) {
4202
- var T = this.textSpans[e].glyph;
4203
- this.textSpans[e].childSpan.removeChild(T.layerElement), T.destroy();
4204
- }
4205
- this.textSpans[e].glyph = C, C._debug = !0, C.prepareFrame(0), C.renderFrame(), this.textSpans[e].childSpan.appendChild(C.layerElement), x.t === 1 && this.textSpans[e].childSpan.setAttribute("transform", "scale(" + n.finalSize / 100 + "," + n.finalSize / 100 + ")");
4206
- } else d && c.setAttribute("transform", "translate(" + l.props[12] + "," + l.props[13] + ")"), c.textContent = o[e].val, c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
4207
- }
4208
- d && c && c.setAttribute("d", u);
4209
- }
4210
- for (; e < this.textSpans.length;) this.textSpans[e].span.style.display = "none", e += 1;
4211
- this._sizeChanged = !0;
4212
- }, Qn.prototype.sourceRectAtTime = function() {
4213
- if (this.prepareFrame(this.comp.renderedFrame - this.data.st), this.renderInnerContent(), this._sizeChanged) {
4214
- this._sizeChanged = !1;
4215
- var e = this.layerElement.getBBox();
4216
- this.bbox = {
4217
- top: e.y,
4218
- left: e.x,
4219
- width: e.width,
4220
- height: e.height
4221
- };
4222
- }
4223
- return this.bbox;
4224
- }, Qn.prototype.getValue = function() {
4225
- var e, t = this.textSpans.length, n;
4226
- for (this.renderedFrame = this.comp.renderedFrame, e = 0; e < t; e += 1) n = this.textSpans[e].glyph, n && (n.prepareFrame(this.comp.renderedFrame - this.data.st), n._mdf && (this._mdf = !0));
4227
- }, Qn.prototype.renderInnerContent = function() {
4228
- if (this.validateText(), (!this.data.singleShape || this._mdf) && (this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag)) {
4229
- this._sizeChanged = !0;
4230
- var e, t, n = this.textAnimator.renderedLetters, r = this.textProperty.currentData.l;
4231
- t = r.length;
4232
- var i, a, o;
4233
- for (e = 0; e < t; e += 1) r[e].n || (i = n[e], a = this.textSpans[e].span, o = this.textSpans[e].glyph, o && o.renderFrame(), i._mdf.m && a.setAttribute("transform", i.m), i._mdf.o && a.setAttribute("opacity", i.o), i._mdf.sw && a.setAttribute("stroke-width", i.sw), i._mdf.sc && a.setAttribute("stroke", i.sc), i._mdf.fc && a.setAttribute("fill", i.fc));
4234
- }
4235
- };
4236
- function $n(e, t, n) {
4237
- this.initElement(e, t, n);
4238
- }
4239
- d([On], $n), $n.prototype.createContent = function() {
4240
- var e = L("rect");
4241
- e.setAttribute("width", this.data.sw), e.setAttribute("height", this.data.sh), e.setAttribute("fill", this.data.sc), this.layerElement.appendChild(e);
4242
- };
4243
- function er(e, t, n) {
4244
- this.initFrame(), this.initBaseData(e, t, n), this.initFrame(), this.initTransform(e, t, n), this.initHierarchy();
4245
- }
4246
- er.prototype.prepareFrame = function(e) {
4247
- this.prepareProperties(e, !0);
4248
- }, er.prototype.renderFrame = function() {}, er.prototype.getBaseElement = function() {
4249
- return null;
4250
- }, er.prototype.destroy = function() {}, er.prototype.sourceRectAtTime = function() {}, er.prototype.hide = function() {}, d([
4251
- mn,
4252
- vn,
4253
- En,
4254
- hn
4255
- ], er);
4256
- function $() {}
4257
- d([X], $), $.prototype.createNull = function(e) {
4258
- return new er(e, this.globalData, this);
4259
- }, $.prototype.createShape = function(e) {
4260
- return new Z(e, this.globalData, this);
4261
- }, $.prototype.createText = function(e) {
4262
- return new Qn(e, this.globalData, this);
4263
- }, $.prototype.createImage = function(e) {
4264
- return new On(e, this.globalData, this);
4265
- }, $.prototype.createSolid = function(e) {
4266
- return new $n(e, this.globalData, this);
4267
- }, $.prototype.configAnimation = function(e) {
4268
- this.svgElement.setAttribute("xmlns", "http://www.w3.org/2000/svg"), this.svgElement.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), this.renderConfig.viewBoxSize ? this.svgElement.setAttribute("viewBox", this.renderConfig.viewBoxSize) : this.svgElement.setAttribute("viewBox", "0 0 " + e.w + " " + e.h), this.renderConfig.viewBoxOnly || (this.svgElement.setAttribute("width", e.w), this.svgElement.setAttribute("height", e.h), this.svgElement.style.width = "100%", this.svgElement.style.height = "100%", this.svgElement.style.transform = "translate3d(0,0,0)", this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility), this.renderConfig.width && this.svgElement.setAttribute("width", this.renderConfig.width), this.renderConfig.height && this.svgElement.setAttribute("height", this.renderConfig.height), this.renderConfig.className && this.svgElement.setAttribute("class", this.renderConfig.className), this.renderConfig.id && this.svgElement.setAttribute("id", this.renderConfig.id), this.renderConfig.focusable !== void 0 && this.svgElement.setAttribute("focusable", this.renderConfig.focusable), this.svgElement.setAttribute("preserveAspectRatio", this.renderConfig.preserveAspectRatio), this.animationItem.wrapper.appendChild(this.svgElement);
4269
- var t = this.globalData.defs;
4270
- this.setupGlobalData(e, t), this.globalData.progressiveLoad = this.renderConfig.progressiveLoad, this.data = e;
4271
- var n = L("clipPath"), r = L("rect");
4272
- r.setAttribute("width", e.w), r.setAttribute("height", e.h), r.setAttribute("x", 0), r.setAttribute("y", 0);
4273
- var i = I();
4274
- n.setAttribute("id", i), n.appendChild(r), this.layerElement.setAttribute("clip-path", "url(" + l() + "#" + i + ")"), t.appendChild(n), this.layers = e.layers, this.elements = h(e.layers.length);
4275
- }, $.prototype.destroy = function() {
4276
- this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), this.layerElement = null, this.globalData.defs = null;
4277
- var e, t = this.layers ? this.layers.length : 0;
4278
- for (e = 0; e < t; e += 1) this.elements[e] && this.elements[e].destroy && this.elements[e].destroy();
4279
- this.elements.length = 0, this.destroyed = !0, this.animationItem = null;
4280
- }, $.prototype.updateContainerSize = function() {}, $.prototype.findIndexByInd = function(e) {
4281
- var t = 0, n = this.layers.length;
4282
- for (t = 0; t < n; t += 1) if (this.layers[t].ind === e) return t;
4283
- return -1;
4284
- }, $.prototype.buildItem = function(e) {
4285
- var t = this.elements;
4286
- if (!(t[e] || this.layers[e].ty === 99)) {
4287
- t[e] = !0;
4288
- var n = this.createItem(this.layers[e]);
4289
- if (t[e] = n, le() && (this.layers[e].ty === 0 && this.globalData.projectInterface.registerComposition(n), n.initExpressions()), this.appendElementInPos(n, e), this.layers[e].tt) {
4290
- var r = "tp" in this.layers[e] ? this.findIndexByInd(this.layers[e].tp) : e - 1;
4291
- if (r === -1) return;
4292
- if (!this.elements[r] || this.elements[r] === !0) this.buildItem(r), this.addPendingElement(n);
4293
- else {
4294
- var i = t[r].getMatte(this.layers[e].tt);
4295
- n.setMatte(i);
4296
- }
4297
- }
4298
- }
4299
- }, $.prototype.checkPendingElements = function() {
4300
- for (; this.pendingElements.length;) {
4301
- var e = this.pendingElements.pop();
4302
- if (e.checkParenting(), e.data.tt) for (var t = 0, n = this.elements.length; t < n;) {
4303
- if (this.elements[t] === e) {
4304
- var r = "tp" in e.data ? this.findIndexByInd(e.data.tp) : t - 1, i = this.elements[r].getMatte(this.layers[t].tt);
4305
- e.setMatte(i);
4306
- break;
4307
- }
4308
- t += 1;
4309
- }
4310
- }
4311
- }, $.prototype.renderFrame = function(e) {
4312
- if (!(this.renderedFrame === e || this.destroyed)) {
4313
- e === null ? e = this.renderedFrame : this.renderedFrame = e, this.globalData.frameNum = e, this.globalData.frameId += 1, this.globalData.projectInterface.currentFrame = e, this.globalData._mdf = !1;
4314
- var t, n = this.layers.length;
4315
- for (this.completeLayers || this.checkLayers(e), t = n - 1; t >= 0; --t) (this.completeLayers || this.elements[t]) && this.elements[t].prepareFrame(e - this.layers[t].st);
4316
- if (this.globalData._mdf) for (t = 0; t < n; t += 1) (this.completeLayers || this.elements[t]) && this.elements[t].renderFrame();
4317
- }
4318
- }, $.prototype.appendElementInPos = function(e, t) {
4319
- var n = e.getBaseElement();
4320
- if (n) {
4321
- for (var r = 0, i; r < t;) this.elements[r] && this.elements[r] !== !0 && this.elements[r].getBaseElement() && (i = this.elements[r].getBaseElement()), r += 1;
4322
- i ? this.layerElement.insertBefore(n, i) : this.layerElement.appendChild(n);
4323
- }
4324
- }, $.prototype.hide = function() {
4325
- this.layerElement.style.display = "none";
4326
- }, $.prototype.show = function() {
4327
- this.layerElement.style.display = "block";
4328
- };
4329
- function tr() {}
4330
- d([
4331
- mn,
4332
- vn,
4333
- En,
4334
- hn,
4335
- Dn
4336
- ], tr), tr.prototype.initElement = function(e, t, n) {
4337
- this.initFrame(), this.initBaseData(e, t, n), this.initTransform(e, t, n), this.initRenderable(), this.initHierarchy(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), (this.data.xt || !t.progressiveLoad) && this.buildAllItems(), this.hide();
4338
- }, tr.prototype.prepareFrame = function(e) {
4339
- if (this._mdf = !1, this.prepareRenderableFrame(e), this.prepareProperties(e, this.isInRange), !(!this.isInRange && !this.data.xt)) {
4340
- if (this.tm._placeholder) this.renderedFrame = e / this.data.sr;
4341
- else {
4342
- var t = this.tm.v;
4343
- t === this.data.op && (t = this.data.op - 1), this.renderedFrame = t;
4344
- }
4345
- var n, r = this.elements.length;
4346
- for (this.completeLayers || this.checkLayers(this.renderedFrame), n = r - 1; n >= 0; --n) (this.completeLayers || this.elements[n]) && (this.elements[n].prepareFrame(this.renderedFrame - this.layers[n].st), this.elements[n]._mdf && (this._mdf = !0));
4347
- }
4348
- }, tr.prototype.renderInnerContent = function() {
4349
- var e, t = this.layers.length;
4350
- for (e = 0; e < t; e += 1) (this.completeLayers || this.elements[e]) && this.elements[e].renderFrame();
4351
- }, tr.prototype.setElements = function(e) {
4352
- this.elements = e;
4353
- }, tr.prototype.getElements = function() {
4354
- return this.elements;
4355
- }, tr.prototype.destroyElements = function() {
4356
- var e, t = this.layers.length;
4357
- for (e = 0; e < t; e += 1) this.elements[e] && this.elements[e].destroy();
4358
- }, tr.prototype.destroy = function() {
4359
- this.destroyElements(), this.destroyBaseElement();
4360
- };
4361
- function nr(e, t, n) {
4362
- this.layers = e.layers, this.supports3d = !0, this.completeLayers = !1, this.pendingElements = [], this.elements = this.layers ? h(this.layers.length) : [], this.initElement(e, t, n), this.tm = e.tm ? H.getProp(this, e.tm, 0, t.frameRate, this) : { _placeholder: !0 };
4363
- }
4364
- d([
4365
- $,
4366
- tr,
4367
- Tn
4368
- ], nr), nr.prototype.createComp = function(e) {
4369
- return new nr(e, this.globalData, this);
4370
- };
4371
- function rr(e, t) {
4372
- this.animationItem = e, this.layers = null, this.renderedFrame = -1, this.svgElement = L("svg");
4373
- var n = "";
4374
- if (t && t.title) {
4375
- var r = L("title"), i = I();
4376
- r.setAttribute("id", i), r.textContent = t.title, this.svgElement.appendChild(r), n += i;
4377
- }
4378
- if (t && t.description) {
4379
- var a = L("desc"), o = I();
4380
- a.setAttribute("id", o), a.textContent = t.description, this.svgElement.appendChild(a), n += " " + o;
4381
- }
4382
- n && this.svgElement.setAttribute("aria-labelledby", n);
4383
- var s = L("defs");
4384
- this.svgElement.appendChild(s);
4385
- var c = L("g");
4386
- this.svgElement.appendChild(c), this.layerElement = c, this.renderConfig = {
4387
- preserveAspectRatio: t && t.preserveAspectRatio || "xMidYMid meet",
4388
- imagePreserveAspectRatio: t && t.imagePreserveAspectRatio || "xMidYMid slice",
4389
- contentVisibility: t && t.contentVisibility || "visible",
4390
- progressiveLoad: t && t.progressiveLoad || !1,
4391
- hideOnTransparent: !(t && t.hideOnTransparent === !1),
4392
- viewBoxOnly: t && t.viewBoxOnly || !1,
4393
- viewBoxSize: t && t.viewBoxSize || !1,
4394
- className: t && t.className || "",
4395
- id: t && t.id || "",
4396
- focusable: t && t.focusable,
4397
- filterSize: {
4398
- width: t && t.filterSize && t.filterSize.width || "100%",
4399
- height: t && t.filterSize && t.filterSize.height || "100%",
4400
- x: t && t.filterSize && t.filterSize.x || "0%",
4401
- y: t && t.filterSize && t.filterSize.y || "0%"
4402
- },
4403
- width: t && t.width,
4404
- height: t && t.height,
4405
- runExpressions: !t || t.runExpressions === void 0 || t.runExpressions
4406
- }, this.globalData = {
4407
- _mdf: !1,
4408
- frameNum: -1,
4409
- defs: s,
4410
- renderConfig: this.renderConfig
4411
- }, this.elements = [], this.pendingElements = [], this.destroyed = !1, this.rendererType = "svg";
4412
- }
4413
- return d([$], rr), rr.prototype.createComp = function(e) {
4414
- return new nr(e, this.globalData, this);
4415
- }, ye("svg", rr), mt.registerModifier("tm", ht), mt.registerModifier("pb", gt), mt.registerModifier("rp", vt), mt.registerModifier("rd", yt), mt.registerModifier("zz", Lt), mt.registerModifier("op", Xt), K;
4416
- }));
4417
- }));
4418
- //#endregion
4419
- export default t();