storyly-web 3.2.1 → 3.2.4

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 (221) hide show
  1. package/README.md +1 -4
  2. package/convertImports.js +51 -0
  3. package/dist/PromoCode.ff2688bf.js +2 -10
  4. package/dist/index.js +7 -5
  5. package/dist/storyly-web.js +7 -5
  6. package/index.html +116 -1
  7. package/package.json +5 -4
  8. package/src-raw/StorylyEmbed.js +70 -0
  9. package/src-raw/StorylyWeb.js +3265 -0
  10. package/src-raw/components/AdGroup/AdStory.js +406 -0
  11. package/src-raw/components/AdGroup/index.js +248 -0
  12. package/src-raw/components/AdGroup/template.js +7 -0
  13. package/src-raw/components/Alert/index.js +15 -0
  14. package/src-raw/components/Alert/style.scss +54 -0
  15. package/src-raw/components/AudioNotification/index.js +5 -0
  16. package/src-raw/components/AudioNotification/style.scss +20 -0
  17. package/src-raw/components/BottomSheet/index.js +241 -0
  18. package/src-raw/components/BottomSheet/style.scss +98 -0
  19. package/src-raw/components/BottomSheet/template/index.js +11 -0
  20. package/src-raw/components/LoadingSpinner/index.js +17 -0
  21. package/src-raw/components/LoadingSpinner/style.scss +117 -0
  22. package/src-raw/components/LoadingSpinner/template/android.js +8 -0
  23. package/src-raw/components/LoadingSpinner/template/ios.js +9 -0
  24. package/src-raw/components/Modal/index.js +161 -0
  25. package/src-raw/components/Modal/style.scss +77 -0
  26. package/src-raw/components/Modal/template/index.js +11 -0
  27. package/src-raw/components/ShareWidget/index.js +163 -0
  28. package/src-raw/components/ShareWidget/style.scss +174 -0
  29. package/src-raw/components/ShareWidget/template/index.js +47 -0
  30. package/src-raw/components/StoryCart/countUpdater.js +89 -0
  31. package/src-raw/components/StoryCart/index.js +619 -0
  32. package/src-raw/components/StoryCart/style.scss +2 -0
  33. package/src-raw/components/StoryCart/template/CartButton/index.js +14 -0
  34. package/src-raw/components/StoryCart/template/CartButton/style.scss +154 -0
  35. package/src-raw/components/StoryCart/template/Container/index.js +11 -0
  36. package/src-raw/components/StoryCart/template/Container/style.scss +8 -0
  37. package/src-raw/components/StoryCart/template/Content/index.js +73 -0
  38. package/src-raw/components/StoryCart/template/Content/style.scss +311 -0
  39. package/src-raw/components/StoryCart/template/EmptyState/index.js +22 -0
  40. package/src-raw/components/StoryCart/template/EmptyState/style.scss +78 -0
  41. package/src-raw/components/StoryCart/template/Footer/index.js +32 -0
  42. package/src-raw/components/StoryCart/template/Footer/style.scss +119 -0
  43. package/src-raw/components/StoryCart/template/Modal/index.js +20 -0
  44. package/src-raw/components/StoryCart/template/Modal/style.scss +181 -0
  45. package/src-raw/components/StoryCart/template/index.js +7 -0
  46. package/src-raw/components/StoryCart/template/index.scss +6 -0
  47. package/src-raw/components/StoryProduct/index.js +494 -0
  48. package/src-raw/components/StoryProduct/style.scss +575 -0
  49. package/src-raw/components/StoryProduct/template/index.js +5 -0
  50. package/src-raw/components/StoryProduct/template/productCheckoutFooter.js +65 -0
  51. package/src-raw/components/StoryProduct/template/productDetail.js +196 -0
  52. package/src-raw/components/StoryProduct/template/productDetailFooter.js +87 -0
  53. package/src-raw/components/StoryProduct/util.ts +34 -0
  54. package/src-raw/components/VideoSeekBar/index.js +486 -0
  55. package/src-raw/components/VideoSeekBar/style.scss +69 -0
  56. package/src-raw/components/VideoSeekBar/template/seekbar-template.js +20 -0
  57. package/src-raw/components/style.scss +9 -0
  58. package/src-raw/constants/animation.js +5 -0
  59. package/src-raw/constants/barLayouts.js +4 -0
  60. package/src-raw/constants/browsers.js +11 -0
  61. package/src-raw/constants/common.js +23 -0
  62. package/src-raw/constants/directions.js +7 -0
  63. package/src-raw/constants/events.js +134 -0
  64. package/src-raw/constants/instanceStyleKeys.js +17 -0
  65. package/src-raw/constants/layerTypes.js +43 -0
  66. package/src-raw/constants/layouts.js +4 -0
  67. package/src-raw/constants/os.js +9 -0
  68. package/src-raw/constants/playmode.js +7 -0
  69. package/src-raw/fonts.css +1562 -0
  70. package/src-raw/index.js +48 -0
  71. package/src-raw/lang/de.json +65 -0
  72. package/src-raw/lang/en.json +65 -0
  73. package/src-raw/lang/es.json +65 -0
  74. package/src-raw/lang/he.json +65 -0
  75. package/src-raw/lang/index.js +8 -0
  76. package/src-raw/lang/pt.json +65 -0
  77. package/src-raw/lang/tr.json +65 -0
  78. package/src-raw/layers/BlankStory/index.ts +16 -0
  79. package/src-raw/layers/BlankStory/template/index.ts +16 -0
  80. package/src-raw/layers/CTA/dataConvertor.ts +119 -0
  81. package/src-raw/layers/CTA/index.ts +197 -0
  82. package/src-raw/layers/CTA/style.scss +211 -0
  83. package/src-raw/layers/CTA/template/button.ts +48 -0
  84. package/src-raw/layers/CTA/template/swipe.ts +49 -0
  85. package/src-raw/layers/CTA/types/index.ts +87 -0
  86. package/src-raw/layers/Countdown/dataConvertor.ts +39 -0
  87. package/src-raw/layers/Countdown/index.ts +219 -0
  88. package/src-raw/layers/Countdown/style.scss +117 -0
  89. package/src-raw/layers/Countdown/template/index.ts +66 -0
  90. package/src-raw/layers/Countdown/types/index.ts +42 -0
  91. package/src-raw/layers/Emoji/dataConvertor.ts +62 -0
  92. package/src-raw/layers/Emoji/index.ts +249 -0
  93. package/src-raw/layers/Emoji/style.scss +137 -0
  94. package/src-raw/layers/Emoji/template/index.ts +32 -0
  95. package/src-raw/layers/Emoji/types/index.ts +49 -0
  96. package/src-raw/layers/ImageCTA/dataConvertor.ts +45 -0
  97. package/src-raw/layers/ImageCTA/index.ts +108 -0
  98. package/src-raw/layers/ImageCTA/style.scss +11 -0
  99. package/src-raw/layers/ImageCTA/template/index.ts +24 -0
  100. package/src-raw/layers/ImageCTA/types/index.ts +44 -0
  101. package/src-raw/layers/ImageQuiz/dataConvertor.ts +37 -0
  102. package/src-raw/layers/ImageQuiz/index.ts +328 -0
  103. package/src-raw/layers/ImageQuiz/style.scss +228 -0
  104. package/src-raw/layers/ImageQuiz/template/index.ts +54 -0
  105. package/src-raw/layers/ImageQuiz/types/index.ts +44 -0
  106. package/src-raw/layers/Media/dataConvertor.ts +40 -0
  107. package/src-raw/layers/Media/index.ts +48 -0
  108. package/src-raw/layers/Media/style.scss +14 -0
  109. package/src-raw/layers/Media/template/index.ts +33 -0
  110. package/src-raw/layers/Media/types/index.ts +36 -0
  111. package/src-raw/layers/Poll/dataConvertor.ts +72 -0
  112. package/src-raw/layers/Poll/index.ts +205 -0
  113. package/src-raw/layers/Poll/style.scss +172 -0
  114. package/src-raw/layers/Poll/template/index.ts +57 -0
  115. package/src-raw/layers/Poll/types/index.ts +49 -0
  116. package/src-raw/layers/ProductCard/dataConvertor.ts +29 -0
  117. package/src-raw/layers/ProductCard/index.ts +112 -0
  118. package/src-raw/layers/ProductCard/style.scss +108 -0
  119. package/src-raw/layers/ProductCard/template/index.ts +46 -0
  120. package/src-raw/layers/ProductCard/types/index.ts +42 -0
  121. package/src-raw/layers/ProductCatalog/index.ts +272 -0
  122. package/src-raw/layers/ProductCatalog/style.scss +189 -0
  123. package/src-raw/layers/ProductCatalog/template/index.ts +4 -0
  124. package/src-raw/layers/ProductCatalog/template/productCard.ts +90 -0
  125. package/src-raw/layers/ProductCatalog/template/productCatalog.ts +25 -0
  126. package/src-raw/layers/ProductCatalog/types/index.ts +34 -0
  127. package/src-raw/layers/ProductTag/dataConvertor.ts +37 -0
  128. package/src-raw/layers/ProductTag/index.ts +337 -0
  129. package/src-raw/layers/ProductTag/style.scss +129 -0
  130. package/src-raw/layers/ProductTag/template/index.ts +49 -0
  131. package/src-raw/layers/ProductTag/types/index.ts +51 -0
  132. package/src-raw/layers/PromoCode/dataConvertor.ts +50 -0
  133. package/src-raw/layers/PromoCode/index.ts +85 -0
  134. package/src-raw/layers/PromoCode/style.scss +220 -0
  135. package/src-raw/layers/PromoCode/template/index.ts +34 -0
  136. package/src-raw/layers/PromoCode/types/index.ts +39 -0
  137. package/src-raw/layers/Question/dataConvertor.ts +60 -0
  138. package/src-raw/layers/Question/index.ts +254 -0
  139. package/src-raw/layers/Question/style.scss +243 -0
  140. package/src-raw/layers/Question/template/layer.ts +111 -0
  141. package/src-raw/layers/Question/template/textbox.ts +43 -0
  142. package/src-raw/layers/Question/types/index.ts +48 -0
  143. package/src-raw/layers/Quiz/dataConvertor.ts +51 -0
  144. package/src-raw/layers/Quiz/index.ts +208 -0
  145. package/src-raw/layers/Quiz/style.scss +296 -0
  146. package/src-raw/layers/Quiz/template/index.ts +39 -0
  147. package/src-raw/layers/Quiz/types/index.ts +46 -0
  148. package/src-raw/layers/Rating/dataConvertor.ts +49 -0
  149. package/src-raw/layers/Rating/index.ts +243 -0
  150. package/src-raw/layers/Rating/style.scss +269 -0
  151. package/src-raw/layers/Rating/template/index.ts +39 -0
  152. package/src-raw/layers/Rating/types/index.ts +45 -0
  153. package/src-raw/layers/Text/animation-impl.ts +180 -0
  154. package/src-raw/layers/Text/dataConvertor.ts +106 -0
  155. package/src-raw/layers/Text/index.ts +115 -0
  156. package/src-raw/layers/Text/style.scss +86 -0
  157. package/src-raw/layers/Text/template/index.ts +44 -0
  158. package/src-raw/layers/Text/types/index.ts +65 -0
  159. package/src-raw/layers/base.js +490 -0
  160. package/src-raw/layers/index.js +33 -0
  161. package/src-raw/layers/style.scss +15 -0
  162. package/src-raw/layers/types/layer.d.ts +32 -0
  163. package/src-raw/layouts/BaseStory.js +1007 -0
  164. package/src-raw/layouts/Classic/Group/index.js +819 -0
  165. package/src-raw/layouts/Classic/Story/index.js +15 -0
  166. package/src-raw/layouts/Classic/index.js +127 -0
  167. package/src-raw/layouts/Classic/style.scss +772 -0
  168. package/src-raw/layouts/Classic/templates/story.js +98 -0
  169. package/src-raw/layouts/Classic/templates/storyHeader.js +45 -0
  170. package/src-raw/layouts/Classic/templates/storyProgress.js +5 -0
  171. package/src-raw/layouts/Modern/Group/index.js +834 -0
  172. package/src-raw/layouts/Modern/Story/index.js +45 -0
  173. package/src-raw/layouts/Modern/index.js +266 -0
  174. package/src-raw/layouts/Modern/style.scss +793 -0
  175. package/src-raw/layouts/Modern/templates/keyboardShortcuts.js +38 -0
  176. package/src-raw/layouts/Modern/templates/navigationButtons.js +34 -0
  177. package/src-raw/layouts/Modern/templates/story.js +98 -0
  178. package/src-raw/layouts/Modern/templates/storyHeader.js +42 -0
  179. package/src-raw/layouts/Modern/templates/storyProgress.js +5 -0
  180. package/src-raw/lib/api.ts +151 -0
  181. package/src-raw/lib/copy-to-clipboard.js +118 -0
  182. package/src-raw/lib/currencies.js +189 -0
  183. package/src-raw/lib/icons.js +95 -0
  184. package/src-raw/lib/proxy.js +52 -0
  185. package/src-raw/lib/storage.js +140 -0
  186. package/src-raw/lib/style.js +418 -0
  187. package/src-raw/lib/util.js +994 -0
  188. package/src-raw/main.scss +65 -0
  189. package/src-raw/models/ApiBody.ts +39 -0
  190. package/src-raw/models/EventPayload.ts +26 -0
  191. package/src-raw/models/GlobalInstanceData.ts +26 -0
  192. package/src-raw/models/Product.ts +56 -0
  193. package/src-raw/models/StoryGroup.ts +99 -0
  194. package/src-raw/public/scss/_function.scss +28 -0
  195. package/src-raw/public/scss/_library.scss +46 -0
  196. package/src-raw/service/BarLayout/bar-layout.impl.js +21 -0
  197. package/src-raw/service/BarLayout/templates/energized-template.js +228 -0
  198. package/src-raw/service/HlsPlayer.js +37 -0
  199. package/src-raw/service/background-blur-impl.js +33 -0
  200. package/src-raw/service/calculate-story-size-impl.js +25 -0
  201. package/src-raw/service/create-product-feed-impl.js +291 -0
  202. package/src-raw/service/create-user-property-impl.js +116 -0
  203. package/src-raw/service/custom-story-group-design-impl.js +209 -0
  204. package/src-raw/service/event-impl.js +335 -0
  205. package/src-raw/service/focal-point-impl.ts +136 -0
  206. package/src-raw/service/index.js +35 -0
  207. package/src-raw/service/intersection-observer-impl.js +15 -0
  208. package/src-raw/service/isotope-horizontal-mode.js +30 -0
  209. package/src-raw/service/layout-impl.js +28 -0
  210. package/src-raw/service/localization-impl.js +73 -0
  211. package/src-raw/service/nudge-story-groups-impl.js +175 -0
  212. package/src-raw/service/platform-impl.js +25 -0
  213. package/src-raw/service/read-accessibility-text-impl.js +20 -0
  214. package/src-raw/service/scroll-Indicator.js +106 -0
  215. package/src-raw/service/story-group-animation-impl.js +37 -0
  216. package/src-raw/service/story-group-badge.impl.js +161 -0
  217. package/src-raw/service/story-group-circle-template-impl.js +51 -0
  218. package/src-raw/service/swiper-impl.js +54 -0
  219. package/src-raw/service/tab-visibility-impl.js +22 -0
  220. package/styleConvertorRaw.js +40 -0
  221. package/dist/copy-to-clipboard.5440b891.js +0 -3
package/README.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # Storyly Web
2
2
 
3
- To add Storyly Web SDK to your project using npm, please use one of the following methods:
4
-
5
-
6
3
  ```Text Yarn
7
4
  yarn add storyly-web
8
5
  ```
@@ -28,4 +25,4 @@ For further information regarding the usage of `storyly-web`, please check out [
28
25
 
29
26
  # Change Log
30
27
 
31
- please check out [release notes](https://github.com/Netvent/storyly-mobile/blob/master/web/RELEASENOTES.md).
28
+ check out [release notes](https://github.com/Netvent/storyly-mobile/blob/master/web/RELEASENOTES.md).
@@ -0,0 +1,51 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const srcDir = path.join(__dirname, 'src');
5
+ const destDir = path.join(__dirname, 'src-raw');
6
+
7
+ // Bir dosyadaki dinamik importları require ile değiştirir
8
+ function replaceImportsInFile(filePath) {
9
+ fs.readFile(filePath, 'utf8', (err, data) => {
10
+ const replacedData = data.replace(
11
+ /\(?await\s*import\(([^)]+)\)\)?\.default;/g,
12
+ (match, importPath) => `require(${importPath}).default;`
13
+ );
14
+
15
+ const relativePath = path.relative(srcDir, filePath);
16
+ const destFilePath = path.join(destDir, relativePath);
17
+
18
+ fs.mkdirSync(path.dirname(destFilePath), { recursive: true });
19
+ fs.writeFile(destFilePath, replacedData, 'utf8', () => {});
20
+ });
21
+ }
22
+
23
+ // Dosyaları kopyala (sadece .js ve .ts dosyaları)
24
+ function copyFiles(filePath) {
25
+ const relativePath = path.relative(srcDir, filePath);
26
+ const destFilePath = path.join(destDir, relativePath);
27
+
28
+ fs.mkdirSync(path.dirname(destFilePath), { recursive: true });
29
+ fs.copyFile(filePath, destFilePath, () => {});
30
+ }
31
+
32
+ // Belirtilen dizindeki tüm dosyaları tarar, importları değiştirir ve dosyaları kopyalar
33
+ function traverseDirectory(directory) {
34
+ fs.readdir(directory, { withFileTypes: true }, (err, files) => {
35
+ files.forEach((file) => {
36
+ const fullPath = path.join(directory, file.name);
37
+ if (file.isDirectory()) {
38
+ traverseDirectory(fullPath);
39
+ } else if (file.isFile()) {
40
+ if (path.extname(fullPath) === '.js' || path.extname(fullPath) === '.ts') {
41
+ replaceImportsInFile(fullPath);
42
+ } else {
43
+ copyFiles(fullPath);
44
+ }
45
+ }
46
+ });
47
+ });
48
+ }
49
+
50
+ // Ana işlemi başlat
51
+ traverseDirectory(srcDir);
@@ -3,13 +3,5 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcel
3
3
  },{}],"rOna":[function(require,module,exports) {
4
4
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../../lib/icons"),o=require("../../../lib/util");exports.default=function(a,t){return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n class="promo-code-component"\n style="\n font-family: '.concat((0,o.getFontFamily)({instanceId:t,font:null}),";\n left: ").concat(a.x,"%;\n top: ").concat(a.y,"%;\n z-index: ").concat(a.z_index,";\n ").concat(a.transform?"transform: ".concat(a.transform,"; --data-rotation: ").concat(a.rotation,"deg"):"",'\n "\n role="component"\n data-group=""\n data-story=""\n data-mode="').concat(a.theme,'"\n data-scale="').concat(a.scale,'"\n >\n <div class="promo-code">\n <span class="promo-code-title">').concat(a.text,'</span>\n <span class="promo-code-icon">').concat((0,n.copyIcon)((0,o.randomAlphaNum)(4)),'</span>\n </div>\n <span data-i18n-key="copied" class="promo-code-component-copied">Copied</span>\n </div>\n </div>\n')};
5
5
  },{"../../../lib/icons":"irwm","../../../lib/util":"PesM"}],"frVD":[function(require,module,exports) {
6
- "use strict";var e=a(require("@babel/runtime/helpers/classCallCheck")),t=a(require("@babel/runtime/helpers/createClass")),r=a(require("@babel/runtime/helpers/inherits")),n=a(require("@babel/runtime/helpers/possibleConstructorReturn")),o=a(require("@babel/runtime/helpers/getPrototypeOf")),i=a(require("@babel/runtime/regenerator"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=u();return function(){var r,i=(0,o.default)(e);if(t){var a=(0,o.default)(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return(0,n.default)(this,r)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var l=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(t){i(t)}}function s(e){try{u(n.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})},c=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var d=require("../../constants/events"),p=require("../../constants/layerTypes"),y=require("../../lib/icons"),_=c(require("../base")),f=c(require("./dataConvertor.ts")),h=c(require("./template/index.ts")),v=function(n){(0,r.default)(a,n);var o=s(a);function a(t){var r,n=t.layer,i=t.group,s=t.storyDom,u=t.story,l=t.instanceId;return(0,e.default)(this,a),(r=o.call(this,{type:p.LayerTemplateTypes.PROMO_CODE,storyDom:s,instanceId:l})).story_=u,r.group_=i,r.setLayerData((0,f.default)(n)),r.generateComponentAndAppendToPage((0,h.default)(r.layerData,l)).then(function(e){r.dom_=e,r.init_()}),r.attachCallbacksToElement_(),r}return(0,t.default)(a,[{key:"attachCallbacksToElement_",value:function(){this.onCopy_=this.onCopy_.bind(this)}},{key:"init_",value:function(){this.dom_.addEventListener("pointerdown",this.onCopy_)}},{key:"onCopy_",value:function(){return l(this,void 0,void 0,i.default.mark(function e(){var t,r,n,o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.setStyle(this.dom_,"animation","none"),t=this.layerData.text,r={event_type:d.LayerEventTypes.PromoCodeCopied,ivod_total_session_time:0,event_time:Date.now(),story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,duration:null,story_interactive_type:"promo_code",story_interactive_y:this.layerData.y,watch_length:null,story_interactive_x:this.layerData.x,uid:this.layerData.uid,story_group_type:"default",story_group_index:null,story_index:null},e.next=5,require("_bundle_loader")(require.resolve("../../lib/copy-to-clipboard.js"));case 5:(0,e.sent)(t),n=this.dom_.querySelector(".promo-code-component-copied"),o=this.dom_.querySelector(".promo-code-icon"),a=o.innerHTML,o.innerHTML=y.checkIconGradient,n.classList.add("show"),setTimeout(function(){n.classList.remove("show"),o.innerHTML=a},2e3),this.api.sendEvent(r);case 14:case"end":return e.stop()}},e,this)}))}}]),a}(_.default);exports.default=v;
7
- },{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../../constants/events":"d0lR","../../constants/layerTypes":"aJRz","../../lib/icons":"irwm","../base":"skR7","./dataConvertor.ts":"UXk0","./template/index.ts":"rOna","_bundle_loader":"TUK3","../../lib/copy-to-clipboard.js":[["copy-to-clipboard.5440b891.js","E8rF"],"E8rF"]}],"FheM":[function(require,module,exports) {
8
- var t=null;function e(){return t||(t=n()),t}function n(){try{throw new Error}catch(e){var t=(""+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return r(t[0])}return"/"}function r(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}exports.getBundleURL=e,exports.getBaseURL=r;
9
- },{}],"TUK3":[function(require,module,exports) {
10
- var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new s(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(u))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function u(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),u=n[i];return u?o[e]=u(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}).catch(function(r){throw delete o[e],r}):void 0}function s(r){this.executor=r,this.promise=null}s.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},s.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)};
11
- },{"./bundle-url":"FheM"}],"Yi9z":[function(require,module,exports) {
12
- module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})};
13
- },{}],0:[function(require,module,exports) {
14
- var b=require("TUK3");b.register("js",require("Yi9z"));b.load([]).then(function(){require("frVD");});
15
- },{}]},{},[0], null)
6
+ "use strict";var e=a(require("@babel/runtime/helpers/classCallCheck")),t=a(require("@babel/runtime/helpers/createClass")),r=a(require("@babel/runtime/helpers/inherits")),n=a(require("@babel/runtime/helpers/possibleConstructorReturn")),o=a(require("@babel/runtime/helpers/getPrototypeOf")),i=a(require("@babel/runtime/regenerator"));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=s();return function(){var r,i=(0,o.default)(e);if(t){var a=(0,o.default)(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return(0,n.default)(this,r)}}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var l=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{s(n.next(e))}catch(t){i(t)}}function u(e){try{s(n.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,u)}s((n=n.apply(e,t||[])).next())})},c=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var d=require("../../constants/events"),p=require("../../constants/layerTypes"),y=require("../../lib/icons"),_=c(require("../base")),f=c(require("./dataConvertor.ts")),h=c(require("./template/index.ts")),v=c(require("../../lib/copy-to-clipboard.js")),m=function(n){(0,r.default)(a,n);var o=u(a);function a(t){var r,n=t.layer,i=t.group,u=t.storyDom,s=t.story,l=t.instanceId;return(0,e.default)(this,a),(r=o.call(this,{type:p.LayerTemplateTypes.PROMO_CODE,storyDom:u,instanceId:l})).story_=s,r.group_=i,r.setLayerData((0,f.default)(n)),r.generateComponentAndAppendToPage((0,h.default)(r.layerData,l)).then(function(e){r.dom_=e,r.init_()}),r.attachCallbacksToElement_(),r}return(0,t.default)(a,[{key:"attachCallbacksToElement_",value:function(){this.onCopy_=this.onCopy_.bind(this)}},{key:"init_",value:function(){this.dom_.addEventListener("pointerdown",this.onCopy_)}},{key:"onCopy_",value:function(){return l(this,void 0,void 0,i.default.mark(function e(){var t,r,n,o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.setStyle(this.dom_,"animation","none"),t=this.layerData.text,r={event_type:d.LayerEventTypes.PromoCodeCopied,ivod_total_session_time:0,event_time:Date.now(),story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,duration:null,story_interactive_type:"promo_code",story_interactive_y:this.layerData.y,watch_length:null,story_interactive_x:this.layerData.x,uid:this.layerData.uid,story_group_type:"default",story_group_index:null,story_index:null},(0,v.default)(t),n=this.dom_.querySelector(".promo-code-component-copied"),o=this.dom_.querySelector(".promo-code-icon"),a=o.innerHTML,o.innerHTML=y.checkIconGradient,n.classList.add("show"),setTimeout(function(){n.classList.remove("show"),o.innerHTML=a},2e3),this.api.sendEvent(r);case 11:case"end":return e.stop()}},e,this)}))}}]),a}(_.default);exports.default=m;
7
+ },{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../../constants/events":"d0lR","../../constants/layerTypes":"aJRz","../../lib/icons":"irwm","../base":"skR7","./dataConvertor.ts":"UXk0","./template/index.ts":"rOna","../../lib/copy-to-clipboard.js":"E8rF"}]},{},[], null)