@ppg_pl/pallete 0.0.5 → 0.0.6

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 (169) hide show
  1. package/dist/cjs/index-160fcb6c.js +1661 -0
  2. package/dist/cjs/index-160fcb6c.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +3 -21
  4. package/dist/cjs/loader.cjs.js.map +1 -1
  5. package/dist/cjs/my-backdrop_8.cjs.entry.js +7985 -0
  6. package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -0
  7. package/dist/cjs/pallete.cjs.js +5 -145
  8. package/dist/cjs/pallete.cjs.js.map +1 -1
  9. package/dist/collection/collection-manifest.json +1 -1
  10. package/dist/collection/components/my-modal/__mocks__/index.js +759 -0
  11. package/dist/collection/components/my-modal/__mocks__/index.js.map +1 -0
  12. package/dist/collection/components/my-modal/my-modal.css +74 -32
  13. package/dist/collection/components/my-modal/my-modal.js +1 -1
  14. package/dist/collection/components/my-modal/my-modal.js.map +1 -1
  15. package/dist/components/index.js +0 -4
  16. package/dist/components/index.js.map +1 -1
  17. package/dist/components/index2.js +359 -6270
  18. package/dist/components/index2.js.map +1 -1
  19. package/dist/components/my-component.js +0 -2
  20. package/dist/components/my-component.js.map +1 -1
  21. package/dist/components/my-modal2.js +3 -84
  22. package/dist/components/my-modal2.js.map +1 -1
  23. package/dist/esm/index-943c259f.js +1632 -0
  24. package/dist/esm/index-943c259f.js.map +1 -0
  25. package/dist/esm/loader.js +4 -22
  26. package/dist/esm/loader.js.map +1 -1
  27. package/dist/esm/my-backdrop_8.entry.js +7974 -0
  28. package/dist/esm/my-backdrop_8.entry.js.map +1 -0
  29. package/dist/esm/pallete.js +6 -146
  30. package/dist/esm/pallete.js.map +1 -1
  31. package/dist/pallete/index.esm.js +0 -1
  32. package/dist/pallete/index.esm.js.map +1 -1
  33. package/dist/pallete/p-9a7eff4f.entry.js +2 -0
  34. package/dist/pallete/p-9a7eff4f.entry.js.map +1 -0
  35. package/dist/pallete/p-c77aaa54.js +3 -0
  36. package/dist/pallete/p-c77aaa54.js.map +1 -0
  37. package/dist/pallete/pallete.css +1 -3
  38. package/dist/pallete/pallete.esm.js +1 -162
  39. package/dist/pallete/pallete.esm.js.map +1 -1
  40. package/dist/types/components/my-modal/__mocks__/index.d.ts +415 -0
  41. package/package.json +3 -3
  42. package/www/build/index.esm.js +0 -1
  43. package/www/build/index.esm.js.map +1 -1
  44. package/www/build/p-825a7d1d.js +163 -0
  45. package/www/build/p-9a7eff4f.entry.js +2 -0
  46. package/www/build/p-9a7eff4f.entry.js.map +1 -0
  47. package/www/build/p-c77aaa54.js +3 -0
  48. package/www/build/p-c77aaa54.js.map +1 -0
  49. package/www/build/p-fd390eef.css +3 -0
  50. package/www/build/pallete.css +1 -3
  51. package/www/build/pallete.esm.js +1 -162
  52. package/www/build/pallete.esm.js.map +1 -1
  53. package/www/index.html +2 -11
  54. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  55. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  56. package/dist/cjs/css-shim-5d56550a.js +0 -8
  57. package/dist/cjs/css-shim-5d56550a.js.map +0 -1
  58. package/dist/cjs/dom-52c0133a.js +0 -77
  59. package/dist/cjs/dom-52c0133a.js.map +0 -1
  60. package/dist/cjs/gtmUtils-11a00b2b.js +0 -9
  61. package/dist/cjs/gtmUtils-11a00b2b.js.map +0 -1
  62. package/dist/cjs/index-a230bf6e.js +0 -3434
  63. package/dist/cjs/index-a230bf6e.js.map +0 -1
  64. package/dist/cjs/my-backdrop.cjs.entry.js +0 -21
  65. package/dist/cjs/my-backdrop.cjs.entry.js.map +0 -1
  66. package/dist/cjs/my-colorbox.cjs.entry.js +0 -52
  67. package/dist/cjs/my-colorbox.cjs.entry.js.map +0 -1
  68. package/dist/cjs/my-colorinfo.cjs.entry.js +0 -46
  69. package/dist/cjs/my-colorinfo.cjs.entry.js.map +0 -1
  70. package/dist/cjs/my-component.cjs.entry.js +0 -171
  71. package/dist/cjs/my-component.cjs.entry.js.map +0 -1
  72. package/dist/cjs/my-loader.cjs.entry.js +0 -21
  73. package/dist/cjs/my-loader.cjs.entry.js.map +0 -1
  74. package/dist/cjs/my-modal.cjs.entry.js +0 -2479
  75. package/dist/cjs/my-modal.cjs.entry.js.map +0 -1
  76. package/dist/cjs/my-search.cjs.entry.js +0 -44
  77. package/dist/cjs/my-search.cjs.entry.js.map +0 -1
  78. package/dist/cjs/my-slider.cjs.entry.js +0 -11201
  79. package/dist/cjs/my-slider.cjs.entry.js.map +0 -1
  80. package/dist/cjs/shadow-css-388a8a25.js +0 -391
  81. package/dist/cjs/shadow-css-388a8a25.js.map +0 -1
  82. package/dist/esm/app-globals-0f993ce5.js +0 -5
  83. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  84. package/dist/esm/css-shim-5eb36939.js +0 -6
  85. package/dist/esm/css-shim-5eb36939.js.map +0 -1
  86. package/dist/esm/dom-c0f8af80.js +0 -75
  87. package/dist/esm/dom-c0f8af80.js.map +0 -1
  88. package/dist/esm/gtmUtils-dcdac4ce.js +0 -7
  89. package/dist/esm/gtmUtils-dcdac4ce.js.map +0 -1
  90. package/dist/esm/index-c3dfdbab.js +0 -3397
  91. package/dist/esm/index-c3dfdbab.js.map +0 -1
  92. package/dist/esm/my-backdrop.entry.js +0 -17
  93. package/dist/esm/my-backdrop.entry.js.map +0 -1
  94. package/dist/esm/my-colorbox.entry.js +0 -48
  95. package/dist/esm/my-colorbox.entry.js.map +0 -1
  96. package/dist/esm/my-colorinfo.entry.js +0 -42
  97. package/dist/esm/my-colorinfo.entry.js.map +0 -1
  98. package/dist/esm/my-component.entry.js +0 -167
  99. package/dist/esm/my-component.entry.js.map +0 -1
  100. package/dist/esm/my-loader.entry.js +0 -17
  101. package/dist/esm/my-loader.entry.js.map +0 -1
  102. package/dist/esm/my-modal.entry.js +0 -2475
  103. package/dist/esm/my-modal.entry.js.map +0 -1
  104. package/dist/esm/my-search.entry.js +0 -40
  105. package/dist/esm/my-search.entry.js.map +0 -1
  106. package/dist/esm/my-slider.entry.js +0 -11197
  107. package/dist/esm/my-slider.entry.js.map +0 -1
  108. package/dist/esm/shadow-css-12b9a099.js +0 -389
  109. package/dist/esm/shadow-css-12b9a099.js.map +0 -1
  110. package/dist/pallete/app-globals-0f993ce5.js +0 -5
  111. package/dist/pallete/app-globals-0f993ce5.js.map +0 -1
  112. package/dist/pallete/css-shim-5eb36939.js +0 -6
  113. package/dist/pallete/css-shim-5eb36939.js.map +0 -1
  114. package/dist/pallete/dom-c0f8af80.js +0 -75
  115. package/dist/pallete/dom-c0f8af80.js.map +0 -1
  116. package/dist/pallete/gtmUtils-dcdac4ce.js +0 -7
  117. package/dist/pallete/gtmUtils-dcdac4ce.js.map +0 -1
  118. package/dist/pallete/index-591def6b.js +0 -3397
  119. package/dist/pallete/index-591def6b.js.map +0 -1
  120. package/dist/pallete/index-c3dfdbab.js +0 -3397
  121. package/dist/pallete/index-c3dfdbab.js.map +0 -1
  122. package/dist/pallete/my-backdrop.entry.js +0 -17
  123. package/dist/pallete/my-backdrop.entry.js.map +0 -1
  124. package/dist/pallete/my-colorbox.entry.js +0 -48
  125. package/dist/pallete/my-colorbox.entry.js.map +0 -1
  126. package/dist/pallete/my-colorinfo.entry.js +0 -42
  127. package/dist/pallete/my-colorinfo.entry.js.map +0 -1
  128. package/dist/pallete/my-component.entry.js +0 -167
  129. package/dist/pallete/my-component.entry.js.map +0 -1
  130. package/dist/pallete/my-loader.entry.js +0 -17
  131. package/dist/pallete/my-loader.entry.js.map +0 -1
  132. package/dist/pallete/my-modal.entry.js +0 -2475
  133. package/dist/pallete/my-modal.entry.js.map +0 -1
  134. package/dist/pallete/my-search.entry.js +0 -40
  135. package/dist/pallete/my-search.entry.js.map +0 -1
  136. package/dist/pallete/my-slider.entry.js +0 -11197
  137. package/dist/pallete/my-slider.entry.js.map +0 -1
  138. package/dist/pallete/shadow-css-12b9a099.js +0 -389
  139. package/dist/pallete/shadow-css-12b9a099.js.map +0 -1
  140. package/www/build/app-globals-0f993ce5.js +0 -5
  141. package/www/build/app-globals-0f993ce5.js.map +0 -1
  142. package/www/build/css-shim-5eb36939.js +0 -6
  143. package/www/build/css-shim-5eb36939.js.map +0 -1
  144. package/www/build/dom-c0f8af80.js +0 -75
  145. package/www/build/dom-c0f8af80.js.map +0 -1
  146. package/www/build/gtmUtils-dcdac4ce.js +0 -7
  147. package/www/build/gtmUtils-dcdac4ce.js.map +0 -1
  148. package/www/build/index-591def6b.js +0 -3397
  149. package/www/build/index-591def6b.js.map +0 -1
  150. package/www/build/index-c3dfdbab.js +0 -3397
  151. package/www/build/index-c3dfdbab.js.map +0 -1
  152. package/www/build/my-backdrop.entry.js +0 -17
  153. package/www/build/my-backdrop.entry.js.map +0 -1
  154. package/www/build/my-colorbox.entry.js +0 -48
  155. package/www/build/my-colorbox.entry.js.map +0 -1
  156. package/www/build/my-colorinfo.entry.js +0 -42
  157. package/www/build/my-colorinfo.entry.js.map +0 -1
  158. package/www/build/my-component.entry.js +0 -167
  159. package/www/build/my-component.entry.js.map +0 -1
  160. package/www/build/my-loader.entry.js +0 -17
  161. package/www/build/my-loader.entry.js.map +0 -1
  162. package/www/build/my-modal.entry.js +0 -2475
  163. package/www/build/my-modal.entry.js.map +0 -1
  164. package/www/build/my-search.entry.js +0 -40
  165. package/www/build/my-search.entry.js.map +0 -1
  166. package/www/build/my-slider.entry.js +0 -11197
  167. package/www/build/my-slider.entry.js.map +0 -1
  168. package/www/build/shadow-css-12b9a099.js +0 -389
  169. package/www/build/shadow-css-12b9a099.js.map +0 -1
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-a230bf6e.js');
6
-
7
- const myBackdropCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}my-backdrop{width:100%;height:100%;background-color:rgba(0, 0, 0, 0.7);position:fixed;z-index:100;left:0;top:0}";
8
-
9
- const MyBackdrop = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- }
13
- render() {
14
- return null;
15
- }
16
- };
17
- MyBackdrop.style = myBackdropCss;
18
-
19
- exports.my_backdrop = MyBackdrop;
20
-
21
- //# sourceMappingURL=my-backdrop.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"my-backdrop.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,wKAAwK;;MCMjL,UAAU;;;;EACrB,MAAM;IACJ,OAAO,IAAI,CAAC;GACb;;;;;;","names":[],"sources":["./src/components/my-backdrop/my-backdrop.scss?tag=my-backdrop","./src/components/my-backdrop/my-backdrop.tsx"],"sourcesContent":["@import '../../global/app.scss';\n\nmy-backdrop {\n width: 100%;\n height: 100%;\n background-color: $backdrop_black;\n position: fixed;\n z-index: 100;\n left: 0;\n top: 0;\n}\n","import { Component } from '@stencil/core';\n\n@Component({\n tag: 'my-backdrop',\n styleUrl: 'my-backdrop.scss',\n})\nexport class MyBackdrop {\n render() {\n return null;\n }\n}\n"],"version":3}
@@ -1,52 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-a230bf6e.js');
6
- const gtmUtils = require('./gtmUtils-11a00b2b.js');
7
-
8
- const myColorboxCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}.my-color-box{width:125px;height:125px;display:block;margin-bottom:5px;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end;position:relative}@media (max-width: 1024px){.my-color-box{width:80px;height:80px}}.my-color-box .color-name{width:100%;background-color:#fff;padding:15px 0px 10px;border-top-left-radius:15px;border-top-right-radius:15px;opacity:0;transition:0.3s opacity ease-in-out;font-size:10px;color:#232323;text-transform:lowercase}.my-color-box.active .color-name{opacity:1}.my-color-box.categoryactive{width:120px;height:115px}.my-color-box.categoryactive .color-name{opacity:1}@media (max-width: 1024px){.my-color-box.categoryactive{width:72px;height:72px}}.my-color-box:hover .color-name{opacity:1}";
9
-
10
- const MyColorBox = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.colorCheck = () => {
14
- this.checkTimeout = setTimeout(() => {
15
- gtmUtils.setDataLayer({
16
- event: 'ColorCheck',
17
- shop: this.shop,
18
- product: this.product,
19
- color: this.name,
20
- });
21
- }, 2000);
22
- };
23
- this.colorUnCheck = () => {
24
- if (this.checkTimeout)
25
- clearTimeout(this.checkTimeout);
26
- this.checkTimeout = undefined;
27
- };
28
- this.darkenColor = (color) => {
29
- const red = parseInt(color[1] + color[2], 16) - 20;
30
- const green = parseInt(color[3] + color[4], 16) - 20;
31
- const blue = parseInt(color[5] + color[6], 16) - 20;
32
- return `rgb(${red},${green},${blue})`;
33
- };
34
- this.color = undefined;
35
- this.name = undefined;
36
- this.shop = undefined;
37
- this.product = undefined;
38
- this.isActive = undefined;
39
- this.isCategoryActive = undefined;
40
- }
41
- render() {
42
- return (index.h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
43
- background: this.color,
44
- border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
45
- } }, index.h("div", { class: "color-name" }, this.name)));
46
- }
47
- };
48
- MyColorBox.style = myColorboxCss;
49
-
50
- exports.my_colorbox = MyColorBox;
51
-
52
- //# sourceMappingURL=my-colorbox.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"my-colorbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,0xBAA0xB;;MCOnyB,UAAU;;;IAUrB,eAAU,GAAG;MACX,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC7BA,qBAAY,CAAC;UACX,KAAK,EAAE,YAAY;UACnB,IAAI,EAAE,IAAI,CAAC,IAAI;UACf,OAAO,EAAE,IAAI,CAAC,OAAO;UACrB,KAAK,EAAE,IAAI,CAAC,IAAI;S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"sources":["./src/components/my-colorbox/my-colorbox.scss?tag=my-colorbox","./src/components/my-colorbox/my-colorbox.tsx"],"sourcesContent":["@import '../../global/app.scss';\n\n.my-color-box {\n width: 125px;\n height: 125px;\n display: block;\n margin-bottom: 5px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n position: relative;\n\n @media (max-width: $medium) {\n width: 80px;\n height: 80px;\n }\n .color-name {\n width: 100%;\n background-color: $white;\n padding: 15px 0px 10px;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n opacity: 0;\n transition: 0.3s opacity ease-in-out;\n font-size: 10px;\n color: $black;\n text-transform: lowercase;\n }\n &.active {\n .color-name {\n opacity: 1;\n }\n }\n\n &.categoryactive {\n width: 120px;\n height: 115px;\n .color-name {\n opacity: 1;\n }\n\n @media (max-width: $medium) {\n width: 72px;\n height: 72px;\n }\n }\n &:hover {\n .color-name {\n opacity: 1;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\n\n@Component({\n tag: 'my-colorbox',\n styleUrl: 'my-colorbox.scss',\n})\nexport class MyColorBox {\n private checkTimeout: ReturnType<typeof setTimeout> | undefined;\n\n @Prop() color: string;\n @Prop() name: string;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() isActive?: boolean;\n @Prop() isCategoryActive?: boolean;\n\n colorCheck = () => {\n this.checkTimeout = setTimeout(() => {\n setDataLayer({\n event: 'ColorCheck',\n shop: this.shop,\n product: this.product,\n color: this.name,\n });\n }, 2000);\n };\n\n colorUnCheck = () => {\n if (this.checkTimeout) clearTimeout(this.checkTimeout);\n this.checkTimeout = undefined;\n };\n\n darkenColor = (color: string) => {\n const red = parseInt(color[1] + color[2], 16) - 20;\n const green = parseInt(color[3] + color[4], 16) - 20;\n const blue = parseInt(color[5] + color[6], 16) - 20;\n return `rgb(${red},${green},${blue})`;\n };\n\n render() {\n return (\n <div\n onMouseEnter={() => this.colorCheck()}\n onMouseLeave={() => this.colorUnCheck()}\n class={`my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`}\n style={{\n background: this.color,\n border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',\n }}\n >\n <div class=\"color-name\">{this.name}</div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,46 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-a230bf6e.js');
6
- const gtmUtils = require('./gtmUtils-11a00b2b.js');
7
-
8
- const MyColorInfo = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- this.closeInfoBox = index.createEvent(this, "closeInfoBox", 7);
12
- this.goToProduct = () => {
13
- var _a;
14
- this.currentColor &&
15
- gtmUtils.setDataLayer({
16
- event: 'GoToProduct',
17
- shop: this.shop,
18
- product: this.product,
19
- color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
20
- });
21
- };
22
- this.onCloseButtonClick = () => {
23
- this.closeInfoBox.emit();
24
- };
25
- this.currentColor = undefined;
26
- this.shop = undefined;
27
- this.product = undefined;
28
- this.data = null;
29
- this.isMobile = false;
30
- this.infoBoxWidth = undefined;
31
- this.closeImage = 'close.png';
32
- }
33
- render() {
34
- var _a, _b, _c, _d, _e, _f, _g;
35
- return (index.h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
36
- background: this.currentColor.hex,
37
- maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
38
- } }, this.isMobile && index.h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: index.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), index.h("div", { class: "boxes__box-content__info", style: {
39
- maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
40
- } }, !this.isMobile && index.h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: index.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && index.h("h2", null, this.currentColor.name), !this.isMobile && index.h("h4", null, this.currentColor.number), !this.isMobile && index.h("div", { class: "divider" }), index.h("div", { class: "boxes__box-content__info__value" }, index.h("div", { class: "boxes__box-content__info__value-image" }, ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.image.data) && index.h("img", { src: `${(_e = (_d = (_c = (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.image) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.attributes) === null || _e === void 0 ? void 0 : _e.formats.thumbnail.url}`, alt: "color-image" })), index.h("div", { class: "boxes__box-content__info__value-product" }, index.h("div", null, !this.isMobile && index.h("p", null, "Produkt:"), this.isMobile && index.h("h2", null, this.currentColor.name), " ", index.h("p", null, this.product)), this.isMobile && index.h("div", { class: 'divider' }), this.currentColor && this.currentColor.links.find((link) => { var _a, _b, _c; return ((_c = (_b = (_a = link === null || link === void 0 ? void 0 : link.shop) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.name) === this.shop; }) && (index.h("a", { onClick: this.goToProduct, class: `${this.currentColor.buttonInverse ? 'inverse' : ''}`, target: "_blank", href: (_f = this === null || this === void 0 ? void 0 : this.currentColor.links.find((link) => { var _a, _b, _c; return ((_c = (_b = (_a = link === null || link === void 0 ? void 0 : link.shop) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.name) === this.shop; })) === null || _f === void 0 ? void 0 : _f.path }, "przejd\u017A do produktu"))))), index.h("div", { class: "boxes__box-content__slider" }, index.h("my-slider", { color: this.currentColor.name, shop: this.shop, product: this.product, slides: (_g = this.data) === null || _g === void 0 ? void 0 : _g.images.data }), ' ')));
41
- }
42
- };
43
-
44
- exports.my_colorinfo = MyColorInfo;
45
-
46
- //# sourceMappingURL=my-colorinfo.cjs.entry.js.map
@@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AC,YAAY,CAAC,aAAa,GAAG,SAAS,GAAG,EAAE,EAAE,EAC5D,MAAM,EAAC,QAAQ,EACf,IAAI,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAU,uBAAK,OAAA,CAAA,MAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,IAAI,0CAAE,UAAU,0CAAE,IAAI,MAAK,IAAI,CAAC,IAAI,CAAA,EAAA,CAAC,0CAAE,IAAI,+BAGzG,CACL,CACG,CACF,CACF,EACNA,iBAAK,KAAK,EAAC,4BAA4B,IACrCA,uBAAW,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,IAAI,GAAc,EAAC,GAAG,CAC9H,CACF,EACN;GACH;;;;;","names":["setDataLayer","h","getAssetPath"],"sources":["./src/components/my-colorinfo/my-colorinfo.tsx"],"sourcesContent":["import { Component, Prop, h, getAssetPath, Event, EventEmitter } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\nimport { Color, Link, Product } from '../../types';\n@Component({\n tag: 'my-colorinfo',\n})\nexport class MyColorInfo {\n @Prop() currentColor: Color;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() data: Product | null = null;\n @Prop() isMobile: boolean = false;\n @Prop() infoBoxWidth: number | null;\n @Prop() closeImage = 'close.png';\n\n @Event() closeInfoBox: EventEmitter;\n\n goToProduct = () => {\n this.currentColor &&\n setDataLayer({\n event: 'GoToProduct',\n shop: this.shop,\n product: this.product,\n color: this.currentColor?.name,\n });\n };\n\n onCloseButtonClick = () => {\n this.closeInfoBox.emit();\n };\n\n render() {\n return (\n <div\n class={`boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`}\n style={{\n background: this.currentColor.hex,\n maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,\n }}\n >\n {this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n <div\n class=\"boxes__box-content__info\"\n style={{\n maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,\n }}\n >\n {!this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n {!this.isMobile && <h2>{this.currentColor.name}</h2>}\n {!this.isMobile && <h4>{this.currentColor.number}</h4>}\n {!this.isMobile && <div class=\"divider\"></div>}\n <div class=\"boxes__box-content__info__value\">\n <div class=\"boxes__box-content__info__value-image\">\n {this.currentColor?.image.data! && <img src={`${this.currentColor?.image?.data?.attributes?.formats.thumbnail.url}`} alt=\"color-image\" />}\n </div>\n <div class=\"boxes__box-content__info__value-product\">\n <div>\n {!this.isMobile && <p>Produkt:</p>}\n {this.isMobile && <h2>{this.currentColor.name}</h2>} <p>{this.product}</p>\n </div>\n\n {this.isMobile && <div class={'divider'}></div>}\n {this.currentColor && this.currentColor.links.find((link: Link) => link?.shop?.data?.attributes?.name === this.shop) && (\n <a\n onClick={this.goToProduct}\n class={`${this.currentColor.buttonInverse ? 'inverse' : ''}`}\n target=\"_blank\"\n href={this?.currentColor.links.find((link: Link) => link?.shop?.data?.attributes?.name === this.shop)?.path}\n >\n przejdź do produktu\n </a>\n )}\n </div>\n </div>\n </div>\n <div class=\"boxes__box-content__slider\">\n <my-slider color={this.currentColor.name} shop={this.shop} product={this.product} slides={this.data?.images.data}></my-slider>{' '}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,171 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-a230bf6e.js');
6
-
7
- const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
8
- const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
9
- const isTextNode = ({ vtext }) => typeof vtext === 'string';
10
- // Can't use instanceof HTMLElement because MockHTMLElement during pre-rendering isn't
11
- const isElement = (val) => typeof val === 'object' && val.nodeType === 1 && typeof val.ownerDocument === 'object';
12
- const isElementArray = (val) => Array.isArray(val) && val.every(isElement);
13
-
14
- const createElement = ({ vtag, vattrs, vchildren, vtext }, utils) => {
15
- if (vtext != null) {
16
- return document.createTextNode(vtext);
17
- }
18
- const element = document.createElement(vtag);
19
- if (vattrs != null) {
20
- for (const key in vattrs) {
21
- element.setAttribute(key, vattrs[key]);
22
- }
23
- }
24
- if (vchildren != null) {
25
- utils.forEach(vchildren, (child) => {
26
- element.appendChild(createElement(child, utils));
27
- });
28
- }
29
- return element;
30
- };
31
- const shouldApplyToHead = (val) => isElement(val) || (isElementArray(val) && val.length === 2);
32
- const applyToHead = (element) => {
33
- if (Array.isArray(element)) {
34
- return document.head.replaceChild(element[0], element[1]);
35
- }
36
- return document.head.appendChild(element);
37
- };
38
-
39
- const hasChildren = (node) => Array.isArray(node.vchildren);
40
- const getFirstChild = (vchildren, utils) => {
41
- let firstChild = null;
42
- utils.forEach(vchildren || [], (c, i) => {
43
- if (i === 0) {
44
- firstChild = c;
45
- return;
46
- }
47
- });
48
- return firstChild;
49
- };
50
- function title(node, head, utils) {
51
- const firstChild = getFirstChild(node.vchildren || [], utils);
52
- if (firstChild && isTextNode(firstChild)) {
53
- return [createElement(node, utils), head.querySelector('title')];
54
- }
55
- }
56
- function meta(node, head, utils) {
57
- var _a, _b, _c;
58
- const namePropKey = ((_a = node.vattrs) === null || _a === void 0 ? void 0 : _a.property) ? 'property' : 'name';
59
- const namePropValue = ((_b = node.vattrs) === null || _b === void 0 ? void 0 : _b.property) || ((_c = node.vattrs) === null || _c === void 0 ? void 0 : _c.name);
60
- const existingElement = head.querySelector(`meta[${namePropKey}="${namePropValue}"]`);
61
- if (existingElement !== null) {
62
- return [createElement(node, utils), existingElement];
63
- }
64
- else {
65
- return createElement(node, utils);
66
- }
67
- }
68
- function link(node, _head, utils) {
69
- if (!hasChildren(node)) {
70
- return createElement(node, utils);
71
- }
72
- }
73
- function style(node, _head, utils) {
74
- const firstChild = getFirstChild(node.vchildren || [], utils);
75
- if (firstChild && isTextNode(firstChild)) {
76
- return createElement(node, utils);
77
- }
78
- }
79
- function script(node, _head, utils) {
80
- if (hasChildren(node) || hasAttributes(node)) {
81
- return createElement(node, utils);
82
- }
83
- }
84
- function base(node, _head, utils) {
85
- if (!hasChildren(node) && hasAttributes(node)) {
86
- return createElement(node, utils);
87
- }
88
- }
89
- const template = createElement;
90
- const noscript = createElement; // SSR only
91
- const types = {
92
- title,
93
- meta,
94
- link,
95
- style,
96
- script,
97
- base,
98
- template,
99
- noscript,
100
- };
101
-
102
- const headExists = document && document.head;
103
- const validTagNames = Object.keys(types);
104
- const isValidNode = (node) => validTagNames.indexOf(node.vtag) > -1;
105
- const renderNode = (node, utils) => types[node.vtag](node, document.head, utils);
106
- const Helmet = (_props, children, utils) => {
107
- if (!headExists) {
108
- return null;
109
- }
110
- const rendered = [];
111
- const validChildren = [];
112
- utils.forEach(children, (n) => {
113
- if (isValidNode(n)) {
114
- validChildren.push(n);
115
- rendered.push(renderNode(n, utils));
116
- }
117
- });
118
- // Build an HTMLElement for each provided virtual child
119
- rendered
120
- .filter(shouldApplyToHead)
121
- .forEach(applyToHead);
122
- return null;
123
- };
124
-
125
- const myComponentCss = ".pallete-wrapper.sc-my-component{display:flex;flex-direction:column;align-items:center;justify-content:center}";
126
-
127
- const MyModalBundle = class {
128
- constructor(hostRef) {
129
- index.registerInstance(this, hostRef);
130
- this.shop = undefined;
131
- this.product = undefined;
132
- this.show = false;
133
- this.readyToClose = false;
134
- }
135
- async open() {
136
- this.show = true;
137
- }
138
- setReadyToCloseHandler(value) {
139
- this.readyToClose = value.detail.observable;
140
- }
141
- closeModalHandler() {
142
- this.show = false;
143
- this.readyToClose = false;
144
- }
145
- render() {
146
- let content = null;
147
- if (this.show) {
148
- content = [index.h("my-backdrop", null), index.h("my-modal", { shop: this.shop, product: this.product })];
149
- }
150
- return (index.h("div", { onClick: () => {
151
- if (this.readyToClose) {
152
- this.closeModalHandler();
153
- }
154
- } }, index.h(Helmet, null, index.h("script", null, `(function (w, d, s, l, i) {
155
- w[l] = w[l] || [];
156
- w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });
157
- var f = d.getElementsByTagName(s)[0],
158
- j = d.createElement(s),
159
- dl = l != 'dataLayer' ? '&l=' + l : '';
160
- j.async = true;
161
- j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
162
- f.parentNode.insertBefore(j, f);
163
- })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`)), index.h("div", { class: "pallete-wrapper" }, content), index.h("noscript", null, index.h("iframe", { src: "https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX", height: "0", width: "0", style: { display: 'none', visibility: 'hidden' } }))));
164
- }
165
- get modalEl() { return index.getElement(this); }
166
- };
167
- MyModalBundle.style = myComponentCss;
168
-
169
- exports.my_component = MyModalBundle;
170
-
171
- //# sourceMappingURL=my-component.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"my-component.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC;AAClF,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,EAAE,KAAK,QAAQ,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,C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,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAa,CAAC,CAAC;KACxG;IACD,QACEA,iBACE,OAAO,EAAE;QACP,IAAI,IAAI,CAAC,YAAY,EAAE;UACrB,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;OACF,IAEDA,QAAC,MAAM,QACLA,wBACG;;;;;;;;;kEASqD,CAC/C,CACF,EACTA,iBAAK,KAAK,EAAC,iBAAiB,IAAE,OAAO,CAAO,EAC5CA,0BACEA,oBAAQ,GAAG,EAAC,yDAAyD,EAAC,MAAM,EAAC,GAAG,EAAC,KAAK,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAW,CAC7I,CACP,EACN;GACH;;;;;;;","names":["RenderTypes","h"],"sources":["./node_modules/@stencil/helmet/dist/util.js","./node_modules/@stencil/helmet/dist/dom.js","./node_modules/@stencil/helmet/dist/render.js","./node_modules/@stencil/helmet/dist/stencil-helmet.js","./src/components/my-component/my-component.scss?tag=my-component&encapsulation=scoped","./src/components/my-component/my-component.tsx"],"sourcesContent":["const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';\nexport const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));\nexport const isTextNode = ({ vtext }) => typeof vtext === 'string';\n// Can't use instanceof HTMLElement because MockHTMLElement during pre-rendering isn't\nexport const isElement = (val) => typeof val === 'object' && val.nodeType === 1 && typeof val.ownerDocument === 'object';\nexport const isElementArray = (val) => Array.isArray(val) && val.every(isElement);\n","import { isElement, isElementArray } from './util';\nexport const createElement = ({ vtag, vattrs, vchildren, vtext }, utils) => {\n if (vtext != null) {\n return document.createTextNode(vtext);\n }\n const element = document.createElement(vtag);\n if (vattrs != null) {\n for (const key in vattrs) {\n element.setAttribute(key, vattrs[key]);\n }\n }\n if (vchildren != null) {\n utils.forEach(vchildren, (child) => {\n element.appendChild(createElement(child, utils));\n });\n }\n return element;\n};\nexport const shouldApplyToHead = (val) => isElement(val) || (isElementArray(val) && val.length === 2);\nexport const applyToHead = (element) => {\n if (Array.isArray(element)) {\n return document.head.replaceChild(element[0], element[1]);\n }\n return document.head.appendChild(element);\n};\n","import { hasAttributes, isTextNode } from './util';\nimport { createElement } from './dom';\nconst hasChildren = (node) => Array.isArray(node.vchildren);\nconst getFirstChild = (vchildren, utils) => {\n let firstChild = null;\n utils.forEach(vchildren || [], (c, i) => {\n if (i === 0) {\n firstChild = c;\n return;\n }\n });\n return firstChild;\n};\nfunction title(node, head, utils) {\n const firstChild = getFirstChild(node.vchildren || [], utils);\n if (firstChild && isTextNode(firstChild)) {\n return [createElement(node, utils), head.querySelector('title')];\n }\n}\nfunction meta(node, head, utils) {\n var _a, _b, _c;\n const namePropKey = ((_a = node.vattrs) === null || _a === void 0 ? void 0 : _a.property) ? 'property' : 'name';\n const namePropValue = ((_b = node.vattrs) === null || _b === void 0 ? void 0 : _b.property) || ((_c = node.vattrs) === null || _c === void 0 ? void 0 : _c.name);\n const existingElement = head.querySelector(`meta[${namePropKey}=\"${namePropValue}\"]`);\n if (existingElement !== null) {\n return [createElement(node, utils), existingElement];\n }\n else {\n return createElement(node, utils);\n }\n}\nfunction link(node, _head, utils) {\n if (!hasChildren(node)) {\n return createElement(node, utils);\n }\n}\nfunction style(node, _head, utils) {\n const firstChild = getFirstChild(node.vchildren || [], utils);\n if (firstChild && isTextNode(firstChild)) {\n return createElement(node, utils);\n }\n}\nfunction script(node, _head, utils) {\n if (hasChildren(node) || hasAttributes(node)) {\n return createElement(node, utils);\n }\n}\nfunction base(node, _head, utils) {\n if (!hasChildren(node) && hasAttributes(node)) {\n return createElement(node, utils);\n }\n}\nconst template = createElement;\nconst noscript = createElement; // SSR only\nconst types = {\n title,\n meta,\n link,\n style,\n script,\n base,\n template,\n noscript,\n};\nexport default types;\n","import RenderTypes from './render';\nimport { shouldApplyToHead, applyToHead } from './dom';\nconst headExists = document && document.head;\nconst validTagNames = Object.keys(RenderTypes);\nconst isValidNode = (node) => validTagNames.indexOf(node.vtag) > -1;\nconst renderNode = (node, utils) => RenderTypes[node.vtag](node, document.head, utils);\nexport const Helmet = (_props, children, utils) => {\n if (!headExists) {\n return null;\n }\n const rendered = [];\n const validChildren = [];\n utils.forEach(children, (n) => {\n if (isValidNode(n)) {\n validChildren.push(n);\n rendered.push(renderNode(n, utils));\n }\n });\n // Build an HTMLElement for each provided virtual child\n rendered\n .filter(shouldApplyToHead)\n .forEach(applyToHead);\n return null;\n};\nexport default Helmet;\n",".pallete-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n","import Helmet from '@stencil/helmet';\nimport { Component, Prop, Method, Element, State, Listen, h } from '@stencil/core';\n\n@Component({\n tag: 'my-component',\n styleUrl: 'my-component.scss',\n scoped: true,\n})\nexport class MyModalBundle {\n @Element() modalEl: HTMLElement;\n\n @Prop() shop: string;\n @Prop() product: string;\n @State() show = false;\n @State() readyToClose = false;\n\n @Method()\n async open() {\n this.show = true;\n }\n\n @Listen('readyToCLose')\n setReadyToCloseHandler(value: CustomEvent) {\n this.readyToClose = value.detail.observable;\n }\n\n @Listen('close')\n closeModalHandler() {\n this.show = false;\n this.readyToClose = false;\n }\n\n render() {\n let content = null;\n if (this.show) {\n content = [<my-backdrop></my-backdrop>, <my-modal shop={this.shop} product={this.product}></my-modal>];\n }\n return (\n <div\n onClick={() => {\n if (this.readyToClose) {\n this.closeModalHandler();\n }\n }}\n >\n <Helmet>\n <script>\n {`(function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`}\n </script>\n </Helmet>\n <div class=\"pallete-wrapper\">{content}</div>\n <noscript>\n <iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX\" height=\"0\" width=\"0\" style={{ display: 'none', visibility: 'hidden' }}></iframe>\n </noscript>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-a230bf6e.js');
6
-
7
- const myLoaderCss = ".container.sc-my-loader{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.item.sc-my-loader{width:20px;height:20px;margin:3px;list-style-type:none;transition:0.5s all ease}.item.sc-my-loader:nth-child(1){animation:right-1 1s infinite alternate;background-color:#b8cf40;animation-delay:20ms}@keyframes right-1{0%{transform:translateY(-18px)}100%{transform:translateY(18px)}}.item.sc-my-loader:nth-child(2){animation:right-2 1s infinite alternate;background-color:#ee4b5e;animation-delay:40ms}@keyframes right-2{0%{transform:translateY(-21px)}100%{transform:translateY(21px)}}.item.sc-my-loader:nth-child(3){animation:right-3 1s infinite alternate;background-color:#ea0f47;animation-delay:60ms}@keyframes right-3{0%{transform:translateY(-24px)}100%{transform:translateY(24px)}}.item.sc-my-loader:nth-child(4){animation:right-4 1s infinite alternate;background-color:#d42840;animation-delay:80ms}@keyframes right-4{0%{transform:translateY(-27px)}100%{transform:translateY(27px)}}.item.sc-my-loader:nth-child(5){animation:right-5 1s infinite alternate;background-color:#8b2850;animation-delay:100ms}@keyframes right-5{0%{transform:translateY(-30px)}100%{transform:translateY(30px)}}";
8
-
9
- const MyLoader = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- }
13
- render() {
14
- return (index.h("div", { class: "container" }, index.h("div", { class: "item" }), index.h("div", { class: "item" }), index.h("div", { class: "item" }), index.h("div", { class: "item" }), index.h("div", { class: "item" })));
15
- }
16
- };
17
- MyLoader.style = myLoaderCss;
18
-
19
- exports.my_loader = MyLoader;
20
-
21
- //# sourceMappingURL=my-loader.cjs.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"my-loader.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,+rCAA+rC;;MCOtsC,QAAQ;;;;EACnB,MAAM;IACJ,QACEA,iBAAK,KAAK,EAAC,WAAW,IACpBA,iBAAK,KAAK,EAAC,MAAM,GAAO,EACxBA,iBAAK,KAAK,EAAC,MAAM,GAAO,EACxBA,iBAAK,KAAK,EAAC,MAAM,GAAO,EACxBA,iBAAK,KAAK,EAAC,MAAM,GAAO,EACxBA,iBAAK,KAAK,EAAC,MAAM,GAAO,CACpB,EACN;GACH;;;;;;","names":["h"],"sources":["./src/components/my-loader/my-loader.scss?tag=my-loader&encapsulation=scoped","./src/components/my-loader/my-loader.tsx"],"sourcesContent":["$color: #b8cf40, #ee4b5e, #ea0f47, #d42840, #8b2850;\n\n@mixin anim($i) {\n $y: ($i + 5) * 3;\n\n @keyframes right-#{$i} {\n 0% {\n transform: translateY(#{-$y}px);\n }\n 100% {\n transform: translateY(#{$y}px);\n }\n }\n}\n\n.container {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100px;\n overflow: hidden;\n}\n\n.item {\n width: 20px;\n height: 20px;\n margin: 3px;\n list-style-type: none;\n transition: 0.5s all ease;\n}\n\n@for $i from 1 through 5 {\n .item:nth-child(#{$i}) {\n @include anim($i);\n animation: right-#{$i} 1s infinite alternate;\n background-color: nth($color, $i);\n animation-delay: 20ms * $i;\n }\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'my-loader',\n styleUrl: 'my-loader.scss',\n scoped: true,\n})\nexport class MyLoader {\n render() {\n return (\n <div class=\"container\">\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n </div>\n );\n }\n}\n"],"version":3}