@everymatrix/casino-promotions 0.0.188 → 0.0.192

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.
@@ -1,1410 +1,2 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.app = factory());
5
- }(this, (function () { 'use strict';
6
-
7
- function noop() { }
8
- function add_location(element, file, line, column, char) {
9
- element.__svelte_meta = {
10
- loc: { file, line, column, char }
11
- };
12
- }
13
- function run(fn) {
14
- return fn();
15
- }
16
- function blank_object() {
17
- return Object.create(null);
18
- }
19
- function run_all(fns) {
20
- fns.forEach(run);
21
- }
22
- function is_function(thing) {
23
- return typeof thing === 'function';
24
- }
25
- function safe_not_equal(a, b) {
26
- return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
27
- }
28
- function is_empty(obj) {
29
- return Object.keys(obj).length === 0;
30
- }
31
-
32
- function append(target, node) {
33
- target.appendChild(node);
34
- }
35
- function insert(target, node, anchor) {
36
- target.insertBefore(node, anchor || null);
37
- }
38
- function detach(node) {
39
- node.parentNode.removeChild(node);
40
- }
41
- function destroy_each(iterations, detaching) {
42
- for (let i = 0; i < iterations.length; i += 1) {
43
- if (iterations[i])
44
- iterations[i].d(detaching);
45
- }
46
- }
47
- function element(name) {
48
- return document.createElement(name);
49
- }
50
- function svg_element(name) {
51
- return document.createElementNS('http://www.w3.org/2000/svg', name);
52
- }
53
- function text(data) {
54
- return document.createTextNode(data);
55
- }
56
- function space() {
57
- return text(' ');
58
- }
59
- function empty() {
60
- return text('');
61
- }
62
- function listen(node, event, handler, options) {
63
- node.addEventListener(event, handler, options);
64
- return () => node.removeEventListener(event, handler, options);
65
- }
66
- function attr(node, attribute, value) {
67
- if (value == null)
68
- node.removeAttribute(attribute);
69
- else if (node.getAttribute(attribute) !== value)
70
- node.setAttribute(attribute, value);
71
- }
72
- function children(element) {
73
- return Array.from(element.childNodes);
74
- }
75
- // unfortunately this can't be a constant as that wouldn't be tree-shakeable
76
- // so we cache the result instead
77
- let crossorigin;
78
- function is_crossorigin() {
79
- if (crossorigin === undefined) {
80
- crossorigin = false;
81
- try {
82
- if (typeof window !== 'undefined' && window.parent) {
83
- void window.parent.document;
84
- }
85
- }
86
- catch (error) {
87
- crossorigin = true;
88
- }
89
- }
90
- return crossorigin;
91
- }
92
- function add_resize_listener(node, fn) {
93
- const computed_style = getComputedStyle(node);
94
- if (computed_style.position === 'static') {
95
- node.style.position = 'relative';
96
- }
97
- const iframe = element('iframe');
98
- iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +
99
- 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');
100
- iframe.setAttribute('aria-hidden', 'true');
101
- iframe.tabIndex = -1;
102
- const crossorigin = is_crossorigin();
103
- let unsubscribe;
104
- if (crossorigin) {
105
- iframe.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>";
106
- unsubscribe = listen(window, 'message', (event) => {
107
- if (event.source === iframe.contentWindow)
108
- fn();
109
- });
110
- }
111
- else {
112
- iframe.src = 'about:blank';
113
- iframe.onload = () => {
114
- unsubscribe = listen(iframe.contentWindow, 'resize', fn);
115
- };
116
- }
117
- append(node, iframe);
118
- return () => {
119
- if (crossorigin) {
120
- unsubscribe();
121
- }
122
- else if (unsubscribe && iframe.contentWindow) {
123
- unsubscribe();
124
- }
125
- detach(iframe);
126
- };
127
- }
128
- function custom_event(type, detail) {
129
- const e = document.createEvent('CustomEvent');
130
- e.initCustomEvent(type, false, false, detail);
131
- return e;
132
- }
133
- function attribute_to_object(attributes) {
134
- const result = {};
135
- for (const attribute of attributes) {
136
- result[attribute.name] = attribute.value;
137
- }
138
- return result;
139
- }
140
-
141
- let current_component;
142
- function set_current_component(component) {
143
- current_component = component;
144
- }
145
-
146
- const dirty_components = [];
147
- const binding_callbacks = [];
148
- const render_callbacks = [];
149
- const flush_callbacks = [];
150
- const resolved_promise = Promise.resolve();
151
- let update_scheduled = false;
152
- function schedule_update() {
153
- if (!update_scheduled) {
154
- update_scheduled = true;
155
- resolved_promise.then(flush);
156
- }
157
- }
158
- function tick() {
159
- schedule_update();
160
- return resolved_promise;
161
- }
162
- function add_render_callback(fn) {
163
- render_callbacks.push(fn);
164
- }
165
- let flushing = false;
166
- const seen_callbacks = new Set();
167
- function flush() {
168
- if (flushing)
169
- return;
170
- flushing = true;
171
- do {
172
- // first, call beforeUpdate functions
173
- // and update components
174
- for (let i = 0; i < dirty_components.length; i += 1) {
175
- const component = dirty_components[i];
176
- set_current_component(component);
177
- update(component.$$);
178
- }
179
- set_current_component(null);
180
- dirty_components.length = 0;
181
- while (binding_callbacks.length)
182
- binding_callbacks.pop()();
183
- // then, once components are updated, call
184
- // afterUpdate functions. This may cause
185
- // subsequent updates...
186
- for (let i = 0; i < render_callbacks.length; i += 1) {
187
- const callback = render_callbacks[i];
188
- if (!seen_callbacks.has(callback)) {
189
- // ...so guard against infinite loops
190
- seen_callbacks.add(callback);
191
- callback();
192
- }
193
- }
194
- render_callbacks.length = 0;
195
- } while (dirty_components.length);
196
- while (flush_callbacks.length) {
197
- flush_callbacks.pop()();
198
- }
199
- update_scheduled = false;
200
- flushing = false;
201
- seen_callbacks.clear();
202
- }
203
- function update($$) {
204
- if ($$.fragment !== null) {
205
- $$.update();
206
- run_all($$.before_update);
207
- const dirty = $$.dirty;
208
- $$.dirty = [-1];
209
- $$.fragment && $$.fragment.p($$.ctx, dirty);
210
- $$.after_update.forEach(add_render_callback);
211
- }
212
- }
213
- const outroing = new Set();
214
- function transition_in(block, local) {
215
- if (block && block.i) {
216
- outroing.delete(block);
217
- block.i(local);
218
- }
219
- }
220
-
221
- const globals = (typeof window !== 'undefined'
222
- ? window
223
- : typeof globalThis !== 'undefined'
224
- ? globalThis
225
- : global);
226
- function mount_component(component, target, anchor, customElement) {
227
- const { fragment, on_mount, on_destroy, after_update } = component.$$;
228
- fragment && fragment.m(target, anchor);
229
- if (!customElement) {
230
- // onMount happens before the initial afterUpdate
231
- add_render_callback(() => {
232
- const new_on_destroy = on_mount.map(run).filter(is_function);
233
- if (on_destroy) {
234
- on_destroy.push(...new_on_destroy);
235
- }
236
- else {
237
- // Edge case - component was destroyed immediately,
238
- // most likely as a result of a binding initialising
239
- run_all(new_on_destroy);
240
- }
241
- component.$$.on_mount = [];
242
- });
243
- }
244
- after_update.forEach(add_render_callback);
245
- }
246
- function destroy_component(component, detaching) {
247
- const $$ = component.$$;
248
- if ($$.fragment !== null) {
249
- run_all($$.on_destroy);
250
- $$.fragment && $$.fragment.d(detaching);
251
- // TODO null out other refs, including component.$$ (but need to
252
- // preserve final state?)
253
- $$.on_destroy = $$.fragment = null;
254
- $$.ctx = [];
255
- }
256
- }
257
- function make_dirty(component, i) {
258
- if (component.$$.dirty[0] === -1) {
259
- dirty_components.push(component);
260
- schedule_update();
261
- component.$$.dirty.fill(0);
262
- }
263
- component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
264
- }
265
- function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
266
- const parent_component = current_component;
267
- set_current_component(component);
268
- const $$ = component.$$ = {
269
- fragment: null,
270
- ctx: null,
271
- // state
272
- props,
273
- update: noop,
274
- not_equal,
275
- bound: blank_object(),
276
- // lifecycle
277
- on_mount: [],
278
- on_destroy: [],
279
- on_disconnect: [],
280
- before_update: [],
281
- after_update: [],
282
- context: new Map(parent_component ? parent_component.$$.context : options.context || []),
283
- // everything else
284
- callbacks: blank_object(),
285
- dirty,
286
- skip_bound: false
287
- };
288
- let ready = false;
289
- $$.ctx = instance
290
- ? instance(component, options.props || {}, (i, ret, ...rest) => {
291
- const value = rest.length ? rest[0] : ret;
292
- if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
293
- if (!$$.skip_bound && $$.bound[i])
294
- $$.bound[i](value);
295
- if (ready)
296
- make_dirty(component, i);
297
- }
298
- return ret;
299
- })
300
- : [];
301
- $$.update();
302
- ready = true;
303
- run_all($$.before_update);
304
- // `false` as a special case of no DOM component
305
- $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
306
- if (options.target) {
307
- if (options.hydrate) {
308
- const nodes = children(options.target);
309
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
310
- $$.fragment && $$.fragment.l(nodes);
311
- nodes.forEach(detach);
312
- }
313
- else {
314
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
315
- $$.fragment && $$.fragment.c();
316
- }
317
- if (options.intro)
318
- transition_in(component.$$.fragment);
319
- mount_component(component, options.target, options.anchor, options.customElement);
320
- flush();
321
- }
322
- set_current_component(parent_component);
323
- }
324
- let SvelteElement;
325
- if (typeof HTMLElement === 'function') {
326
- SvelteElement = class extends HTMLElement {
327
- constructor() {
328
- super();
329
- this.attachShadow({ mode: 'open' });
330
- }
331
- connectedCallback() {
332
- const { on_mount } = this.$$;
333
- this.$$.on_disconnect = on_mount.map(run).filter(is_function);
334
- // @ts-ignore todo: improve typings
335
- for (const key in this.$$.slotted) {
336
- // @ts-ignore todo: improve typings
337
- this.appendChild(this.$$.slotted[key]);
338
- }
339
- }
340
- attributeChangedCallback(attr, _oldValue, newValue) {
341
- this[attr] = newValue;
342
- }
343
- disconnectedCallback() {
344
- run_all(this.$$.on_disconnect);
345
- }
346
- $destroy() {
347
- destroy_component(this, 1);
348
- this.$destroy = noop;
349
- }
350
- $on(type, callback) {
351
- // TODO should this delegate to addEventListener?
352
- const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
353
- callbacks.push(callback);
354
- return () => {
355
- const index = callbacks.indexOf(callback);
356
- if (index !== -1)
357
- callbacks.splice(index, 1);
358
- };
359
- }
360
- $set($$props) {
361
- if (this.$$set && !is_empty($$props)) {
362
- this.$$.skip_bound = true;
363
- this.$$set($$props);
364
- this.$$.skip_bound = false;
365
- }
366
- }
367
- };
368
- }
369
-
370
- function dispatch_dev(type, detail) {
371
- document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));
372
- }
373
- function append_dev(target, node) {
374
- dispatch_dev('SvelteDOMInsert', { target, node });
375
- append(target, node);
376
- }
377
- function insert_dev(target, node, anchor) {
378
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
379
- insert(target, node, anchor);
380
- }
381
- function detach_dev(node) {
382
- dispatch_dev('SvelteDOMRemove', { node });
383
- detach(node);
384
- }
385
- function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
386
- const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
387
- if (has_prevent_default)
388
- modifiers.push('preventDefault');
389
- if (has_stop_propagation)
390
- modifiers.push('stopPropagation');
391
- dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
392
- const dispose = listen(node, event, handler, options);
393
- return () => {
394
- dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
395
- dispose();
396
- };
397
- }
398
- function attr_dev(node, attribute, value) {
399
- attr(node, attribute, value);
400
- if (value == null)
401
- dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
402
- else
403
- dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
404
- }
405
- function set_data_dev(text, data) {
406
- data = '' + data;
407
- if (text.wholeText === data)
408
- return;
409
- dispatch_dev('SvelteDOMSetData', { node: text, data });
410
- text.data = data;
411
- }
412
- function validate_each_argument(arg) {
413
- if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
414
- let msg = '{#each} only iterates over array-like objects.';
415
- if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
416
- msg += ' You can use a spread to convert this iterable into an array.';
417
- }
418
- throw new Error(msg);
419
- }
420
- }
421
- function validate_slots(name, slot, keys) {
422
- for (const slot_key of Object.keys(slot)) {
423
- if (!~keys.indexOf(slot_key)) {
424
- console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
425
- }
426
- }
427
- }
428
-
429
- /* src/CasinoPromotions.svelte generated by Svelte v3.37.0 */
430
-
431
- const { Object: Object_1, console: console_1 } = globals;
432
- const file = "src/CasinoPromotions.svelte";
433
-
434
- function get_each_context(ctx, list, i) {
435
- const child_ctx = ctx.slice();
436
- child_ctx[24] = list[i];
437
- child_ctx[26] = i;
438
- return child_ctx;
439
- }
440
-
441
- function get_each_context_1(ctx, list, i) {
442
- const child_ctx = ctx.slice();
443
- child_ctx[27] = list[i];
444
- return child_ctx;
445
- }
446
-
447
- function get_each_context_2(ctx, list, i) {
448
- const child_ctx = ctx.slice();
449
- child_ctx[30] = list[i];
450
- return child_ctx;
451
- }
452
-
453
- function get_each_context_3(ctx, list, i) {
454
- const child_ctx = ctx.slice();
455
- child_ctx[27] = list[i];
456
- return child_ctx;
457
- }
458
-
459
- // (90:0) {#if isLoading !== true}
460
- function create_if_block(ctx) {
461
- let div10;
462
- let h1;
463
- let t1;
464
- let div0;
465
- let t2;
466
- let div9;
467
- let div1;
468
- let t3;
469
- let div7;
470
- let div2;
471
- let picture;
472
- let t4;
473
- let img;
474
- let img_src_value;
475
- let t5;
476
- let div6;
477
- let div5;
478
- let ul;
479
- let t6;
480
- let div4;
481
- let h3;
482
- let t7;
483
- let div3;
484
- let t8;
485
- let div8;
486
- let svg;
487
- let path;
488
- let div10_class_value;
489
- let div10_resize_listener;
490
- let mounted;
491
- let dispose;
492
- let each_value_2 = /*promotions*/ ctx[2];
493
- validate_each_argument(each_value_2);
494
- let each_blocks_2 = [];
495
-
496
- for (let i = 0; i < each_value_2.length; i += 1) {
497
- each_blocks_2[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
498
- }
499
-
500
- let each_value_1 = /*promoDetailsSources*/ ctx[8];
501
- validate_each_argument(each_value_1);
502
- let each_blocks_1 = [];
503
-
504
- for (let i = 0; i < each_value_1.length; i += 1) {
505
- each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
506
- }
507
-
508
- let each_value = /*promoDetailsTabs*/ ctx[9];
509
- validate_each_argument(each_value);
510
- let each_blocks = [];
511
-
512
- for (let i = 0; i < each_value.length; i += 1) {
513
- each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
514
- }
515
-
516
- const block = {
517
- c: function create() {
518
- div10 = element("div");
519
- h1 = element("h1");
520
- h1.textContent = "Promotions";
521
- t1 = space();
522
- div0 = element("div");
523
-
524
- for (let i = 0; i < each_blocks_2.length; i += 1) {
525
- each_blocks_2[i].c();
526
- }
527
-
528
- t2 = space();
529
- div9 = element("div");
530
- div1 = element("div");
531
- t3 = space();
532
- div7 = element("div");
533
- div2 = element("div");
534
- picture = element("picture");
535
-
536
- for (let i = 0; i < each_blocks_1.length; i += 1) {
537
- each_blocks_1[i].c();
538
- }
539
-
540
- t4 = space();
541
- img = element("img");
542
- t5 = space();
543
- div6 = element("div");
544
- div5 = element("div");
545
- ul = element("ul");
546
-
547
- for (let i = 0; i < each_blocks.length; i += 1) {
548
- each_blocks[i].c();
549
- }
550
-
551
- t6 = space();
552
- div4 = element("div");
553
- h3 = element("h3");
554
- t7 = space();
555
- div3 = element("div");
556
- t8 = space();
557
- div8 = element("div");
558
- svg = svg_element("svg");
559
- path = svg_element("path");
560
- attr_dev(h1, "class", "promotions__title");
561
- add_location(h1, file, 91, 4, 3316);
562
- attr_dev(div0, "class", "promotions__grid");
563
- add_location(div0, file, 92, 4, 3366);
564
- attr_dev(div1, "class", "modal__backdrop");
565
- add_location(div1, file, 115, 6, 4237);
566
- if (img.src !== (img_src_value = /*promoDetailsImage*/ ctx[7])) attr_dev(img, "src", img_src_value);
567
- attr_dev(img, "alt", /*promoDetailsTitle*/ ctx[5]);
568
- add_location(img, file, 125, 12, 4631);
569
- attr_dev(picture, "class", "modal__picture");
570
- add_location(picture, file, 118, 10, 4381);
571
- attr_dev(div2, "class", "modal__header");
572
- add_location(div2, file, 117, 8, 4343);
573
- attr_dev(ul, "class", "modal__tabs");
574
- add_location(ul, file, 130, 12, 4841);
575
- attr_dev(h3, "class", "modal__body_title");
576
- add_location(h3, file, 136, 14, 5142);
577
- attr_dev(div3, "class", "modal__tab_content");
578
- add_location(div3, file, 137, 14, 5217);
579
- attr_dev(div4, "class", "modal__tabContentWrapper");
580
- add_location(div4, file, 135, 12, 5089);
581
- attr_dev(div5, "class", "modal__body_content");
582
- add_location(div5, file, 129, 10, 4766);
583
- attr_dev(div6, "class", "modal__body");
584
- add_location(div6, file, 128, 8, 4730);
585
- attr_dev(div7, "class", "modal__content");
586
- add_location(div7, file, 116, 6, 4306);
587
- attr_dev(path, "stroke-linecap", "round");
588
- attr_dev(path, "stroke-linejoin", "round");
589
- attr_dev(path, "stroke-width", "2");
590
- attr_dev(path, "d", "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z");
591
- add_location(path, file, 146, 10, 5552);
592
- attr_dev(svg, "fill", "none");
593
- attr_dev(svg, "stroke", "currentColor");
594
- attr_dev(svg, "viewBox", "0 0 24 24");
595
- attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
596
- add_location(svg, file, 145, 8, 5447);
597
- attr_dev(div8, "class", "modal__close");
598
- add_location(div8, file, 144, 6, 5385);
599
- attr_dev(div9, "class", "promo__modal modal");
600
- add_location(div9, file, 114, 4, 4198);
601
- attr_dev(div10, "class", div10_class_value = "promotions " + /*currentBreakpoint*/ ctx[3]);
602
- add_render_callback(() => /*div10_elementresize_handler*/ ctx[16].call(div10));
603
- add_location(div10, file, 90, 2, 3203);
604
- },
605
- m: function mount(target, anchor) {
606
- insert_dev(target, div10, anchor);
607
- append_dev(div10, h1);
608
- append_dev(div10, t1);
609
- append_dev(div10, div0);
610
-
611
- for (let i = 0; i < each_blocks_2.length; i += 1) {
612
- each_blocks_2[i].m(div0, null);
613
- }
614
-
615
- append_dev(div10, t2);
616
- append_dev(div10, div9);
617
- append_dev(div9, div1);
618
- append_dev(div9, t3);
619
- append_dev(div9, div7);
620
- append_dev(div7, div2);
621
- append_dev(div2, picture);
622
-
623
- for (let i = 0; i < each_blocks_1.length; i += 1) {
624
- each_blocks_1[i].m(picture, null);
625
- }
626
-
627
- append_dev(picture, t4);
628
- append_dev(picture, img);
629
- append_dev(div7, t5);
630
- append_dev(div7, div6);
631
- append_dev(div6, div5);
632
- append_dev(div5, ul);
633
-
634
- for (let i = 0; i < each_blocks.length; i += 1) {
635
- each_blocks[i].m(ul, null);
636
- }
637
-
638
- append_dev(div5, t6);
639
- append_dev(div5, div4);
640
- append_dev(div4, h3);
641
- h3.innerHTML = /*promoDetailsTitle*/ ctx[5];
642
- append_dev(div4, t7);
643
- append_dev(div4, div3);
644
- div3.innerHTML = /*promoDetailsContent*/ ctx[6];
645
- /*div5_binding*/ ctx[15](div5);
646
- append_dev(div9, t8);
647
- append_dev(div9, div8);
648
- append_dev(div8, svg);
649
- append_dev(svg, path);
650
- div10_resize_listener = add_resize_listener(div10, /*div10_elementresize_handler*/ ctx[16].bind(div10));
651
- /*div10_binding*/ ctx[17](div10);
652
-
653
- if (!mounted) {
654
- dispose = [
655
- listen_dev(div1, "click", /*closePromoModal*/ ctx[12], false, false, false),
656
- listen_dev(div8, "click", /*closePromoModal*/ ctx[12], false, false, false)
657
- ];
658
-
659
- mounted = true;
660
- }
661
- },
662
- p: function update(ctx, dirty) {
663
- if (dirty[0] & /*openPromoModal, promotions*/ 2052) {
664
- each_value_2 = /*promotions*/ ctx[2];
665
- validate_each_argument(each_value_2);
666
- let i;
667
-
668
- for (i = 0; i < each_value_2.length; i += 1) {
669
- const child_ctx = get_each_context_2(ctx, each_value_2, i);
670
-
671
- if (each_blocks_2[i]) {
672
- each_blocks_2[i].p(child_ctx, dirty);
673
- } else {
674
- each_blocks_2[i] = create_each_block_2(child_ctx);
675
- each_blocks_2[i].c();
676
- each_blocks_2[i].m(div0, null);
677
- }
678
- }
679
-
680
- for (; i < each_blocks_2.length; i += 1) {
681
- each_blocks_2[i].d(1);
682
- }
683
-
684
- each_blocks_2.length = each_value_2.length;
685
- }
686
-
687
- if (dirty[0] & /*promoDetailsSources*/ 256) {
688
- each_value_1 = /*promoDetailsSources*/ ctx[8];
689
- validate_each_argument(each_value_1);
690
- let i;
691
-
692
- for (i = 0; i < each_value_1.length; i += 1) {
693
- const child_ctx = get_each_context_1(ctx, each_value_1, i);
694
-
695
- if (each_blocks_1[i]) {
696
- each_blocks_1[i].p(child_ctx, dirty);
697
- } else {
698
- each_blocks_1[i] = create_each_block_1(child_ctx);
699
- each_blocks_1[i].c();
700
- each_blocks_1[i].m(picture, t4);
701
- }
702
- }
703
-
704
- for (; i < each_blocks_1.length; i += 1) {
705
- each_blocks_1[i].d(1);
706
- }
707
-
708
- each_blocks_1.length = each_value_1.length;
709
- }
710
-
711
- if (dirty[0] & /*promoDetailsImage*/ 128 && img.src !== (img_src_value = /*promoDetailsImage*/ ctx[7])) {
712
- attr_dev(img, "src", img_src_value);
713
- }
714
-
715
- if (dirty[0] & /*promoDetailsTitle*/ 32) {
716
- attr_dev(img, "alt", /*promoDetailsTitle*/ ctx[5]);
717
- }
718
-
719
- if (dirty[0] & /*switchTabContent, promoDetailsTabs*/ 8704) {
720
- each_value = /*promoDetailsTabs*/ ctx[9];
721
- validate_each_argument(each_value);
722
- let i;
723
-
724
- for (i = 0; i < each_value.length; i += 1) {
725
- const child_ctx = get_each_context(ctx, each_value, i);
726
-
727
- if (each_blocks[i]) {
728
- each_blocks[i].p(child_ctx, dirty);
729
- } else {
730
- each_blocks[i] = create_each_block(child_ctx);
731
- each_blocks[i].c();
732
- each_blocks[i].m(ul, null);
733
- }
734
- }
735
-
736
- for (; i < each_blocks.length; i += 1) {
737
- each_blocks[i].d(1);
738
- }
739
-
740
- each_blocks.length = each_value.length;
741
- }
742
-
743
- if (dirty[0] & /*promoDetailsTitle*/ 32) h3.innerHTML = /*promoDetailsTitle*/ ctx[5]; if (dirty[0] & /*promoDetailsContent*/ 64) div3.innerHTML = /*promoDetailsContent*/ ctx[6];
744
- if (dirty[0] & /*currentBreakpoint*/ 8 && div10_class_value !== (div10_class_value = "promotions " + /*currentBreakpoint*/ ctx[3])) {
745
- attr_dev(div10, "class", div10_class_value);
746
- }
747
- },
748
- d: function destroy(detaching) {
749
- if (detaching) detach_dev(div10);
750
- destroy_each(each_blocks_2, detaching);
751
- destroy_each(each_blocks_1, detaching);
752
- destroy_each(each_blocks, detaching);
753
- /*div5_binding*/ ctx[15](null);
754
- div10_resize_listener();
755
- /*div10_binding*/ ctx[17](null);
756
- mounted = false;
757
- run_all(dispose);
758
- }
759
- };
760
-
761
- dispatch_dev("SvelteRegisterBlock", {
762
- block,
763
- id: create_if_block.name,
764
- type: "if",
765
- source: "(90:0) {#if isLoading !== true}",
766
- ctx
767
- });
768
-
769
- return block;
770
- }
771
-
772
- // (97:12) {#each promotion.image.sources as imgSource}
773
- function create_each_block_3(ctx) {
774
- let source;
775
- let source_srcset_value;
776
- let source_media_value;
777
-
778
- const block = {
779
- c: function create() {
780
- source = element("source");
781
- attr_dev(source, "srcset", source_srcset_value = /*imgSource*/ ctx[27].pictureSource);
782
- attr_dev(source, "media", source_media_value = "(" + /*imgSource*/ ctx[27].media + ")");
783
- add_location(source, file, 97, 14, 3577);
784
- },
785
- m: function mount(target, anchor) {
786
- insert_dev(target, source, anchor);
787
- },
788
- p: function update(ctx, dirty) {
789
- if (dirty[0] & /*promotions*/ 4 && source_srcset_value !== (source_srcset_value = /*imgSource*/ ctx[27].pictureSource)) {
790
- attr_dev(source, "srcset", source_srcset_value);
791
- }
792
-
793
- if (dirty[0] & /*promotions*/ 4 && source_media_value !== (source_media_value = "(" + /*imgSource*/ ctx[27].media + ")")) {
794
- attr_dev(source, "media", source_media_value);
795
- }
796
- },
797
- d: function destroy(detaching) {
798
- if (detaching) detach_dev(source);
799
- }
800
- };
801
-
802
- dispatch_dev("SvelteRegisterBlock", {
803
- block,
804
- id: create_each_block_3.name,
805
- type: "each",
806
- source: "(97:12) {#each promotion.image.sources as imgSource}",
807
- ctx
808
- });
809
-
810
- return block;
811
- }
812
-
813
- // (94:6) {#each promotions as promotion}
814
- function create_each_block_2(ctx) {
815
- let div2;
816
- let picture;
817
- let t0;
818
- let img;
819
- let img_src_value;
820
- let img_alt_value;
821
- let t1;
822
- let div1;
823
- let h2;
824
- let raw0_value = /*promotion*/ ctx[30].title + "";
825
- let t2;
826
- let div0;
827
- let raw1_value = /*promotion*/ ctx[30].content.split("</p>")[0] + "";
828
- let t3;
829
- let button;
830
- let t5;
831
- let mounted;
832
- let dispose;
833
- let each_value_3 = /*promotion*/ ctx[30].image.sources;
834
- validate_each_argument(each_value_3);
835
- let each_blocks = [];
836
-
837
- for (let i = 0; i < each_value_3.length; i += 1) {
838
- each_blocks[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i));
839
- }
840
-
841
- const block = {
842
- c: function create() {
843
- div2 = element("div");
844
- picture = element("picture");
845
-
846
- for (let i = 0; i < each_blocks.length; i += 1) {
847
- each_blocks[i].c();
848
- }
849
-
850
- t0 = space();
851
- img = element("img");
852
- t1 = space();
853
- div1 = element("div");
854
- h2 = element("h2");
855
- t2 = space();
856
- div0 = element("div");
857
- t3 = space();
858
- button = element("button");
859
- button.textContent = "More info";
860
- t5 = space();
861
- if (img.src !== (img_src_value = /*promotion*/ ctx[30].image.src)) attr_dev(img, "src", img_src_value);
862
- attr_dev(img, "alt", img_alt_value = /*promotion*/ ctx[30].title);
863
- add_location(img, file, 102, 12, 3727);
864
- attr_dev(picture, "class", "promo__picture");
865
- add_location(picture, file, 95, 10, 3473);
866
- attr_dev(h2, "class", "promo__title");
867
- add_location(h2, file, 105, 12, 3853);
868
- attr_dev(div0, "class", "promo__content text--ellipsis");
869
- add_location(div0, file, 106, 12, 3919);
870
- attr_dev(button, "class", "promo__button");
871
- add_location(button, file, 109, 12, 4051);
872
- attr_dev(div1, "class", "promo__details");
873
- add_location(div1, file, 104, 10, 3812);
874
- attr_dev(div2, "class", "promo");
875
- add_location(div2, file, 94, 8, 3443);
876
- },
877
- m: function mount(target, anchor) {
878
- insert_dev(target, div2, anchor);
879
- append_dev(div2, picture);
880
-
881
- for (let i = 0; i < each_blocks.length; i += 1) {
882
- each_blocks[i].m(picture, null);
883
- }
884
-
885
- append_dev(picture, t0);
886
- append_dev(picture, img);
887
- append_dev(div2, t1);
888
- append_dev(div2, div1);
889
- append_dev(div1, h2);
890
- h2.innerHTML = raw0_value;
891
- append_dev(div1, t2);
892
- append_dev(div1, div0);
893
- div0.innerHTML = raw1_value;
894
- append_dev(div1, t3);
895
- append_dev(div1, button);
896
- append_dev(div2, t5);
897
-
898
- if (!mounted) {
899
- dispose = listen_dev(
900
- button,
901
- "click",
902
- function () {
903
- if (is_function(/*openPromoModal*/ ctx[11](/*promotion*/ ctx[30]))) /*openPromoModal*/ ctx[11](/*promotion*/ ctx[30]).apply(this, arguments);
904
- },
905
- false,
906
- false,
907
- false
908
- );
909
-
910
- mounted = true;
911
- }
912
- },
913
- p: function update(new_ctx, dirty) {
914
- ctx = new_ctx;
915
-
916
- if (dirty[0] & /*promotions*/ 4) {
917
- each_value_3 = /*promotion*/ ctx[30].image.sources;
918
- validate_each_argument(each_value_3);
919
- let i;
920
-
921
- for (i = 0; i < each_value_3.length; i += 1) {
922
- const child_ctx = get_each_context_3(ctx, each_value_3, i);
923
-
924
- if (each_blocks[i]) {
925
- each_blocks[i].p(child_ctx, dirty);
926
- } else {
927
- each_blocks[i] = create_each_block_3(child_ctx);
928
- each_blocks[i].c();
929
- each_blocks[i].m(picture, t0);
930
- }
931
- }
932
-
933
- for (; i < each_blocks.length; i += 1) {
934
- each_blocks[i].d(1);
935
- }
936
-
937
- each_blocks.length = each_value_3.length;
938
- }
939
-
940
- if (dirty[0] & /*promotions*/ 4 && img.src !== (img_src_value = /*promotion*/ ctx[30].image.src)) {
941
- attr_dev(img, "src", img_src_value);
942
- }
943
-
944
- if (dirty[0] & /*promotions*/ 4 && img_alt_value !== (img_alt_value = /*promotion*/ ctx[30].title)) {
945
- attr_dev(img, "alt", img_alt_value);
946
- }
947
-
948
- if (dirty[0] & /*promotions*/ 4 && raw0_value !== (raw0_value = /*promotion*/ ctx[30].title + "")) h2.innerHTML = raw0_value; if (dirty[0] & /*promotions*/ 4 && raw1_value !== (raw1_value = /*promotion*/ ctx[30].content.split("</p>")[0] + "")) div0.innerHTML = raw1_value; },
949
- d: function destroy(detaching) {
950
- if (detaching) detach_dev(div2);
951
- destroy_each(each_blocks, detaching);
952
- mounted = false;
953
- dispose();
954
- }
955
- };
956
-
957
- dispatch_dev("SvelteRegisterBlock", {
958
- block,
959
- id: create_each_block_2.name,
960
- type: "each",
961
- source: "(94:6) {#each promotions as promotion}",
962
- ctx
963
- });
964
-
965
- return block;
966
- }
967
-
968
- // (120:12) {#each promoDetailsSources as imgSource}
969
- function create_each_block_1(ctx) {
970
- let source;
971
- let source_srcset_value;
972
- let source_media_value;
973
-
974
- const block = {
975
- c: function create() {
976
- source = element("source");
977
- attr_dev(source, "srcset", source_srcset_value = /*imgSource*/ ctx[27].pictureSource);
978
- attr_dev(source, "media", source_media_value = "(" + /*imgSource*/ ctx[27].media + ")");
979
- add_location(source, file, 120, 14, 4481);
980
- },
981
- m: function mount(target, anchor) {
982
- insert_dev(target, source, anchor);
983
- },
984
- p: function update(ctx, dirty) {
985
- if (dirty[0] & /*promoDetailsSources*/ 256 && source_srcset_value !== (source_srcset_value = /*imgSource*/ ctx[27].pictureSource)) {
986
- attr_dev(source, "srcset", source_srcset_value);
987
- }
988
-
989
- if (dirty[0] & /*promoDetailsSources*/ 256 && source_media_value !== (source_media_value = "(" + /*imgSource*/ ctx[27].media + ")")) {
990
- attr_dev(source, "media", source_media_value);
991
- }
992
- },
993
- d: function destroy(detaching) {
994
- if (detaching) detach_dev(source);
995
- }
996
- };
997
-
998
- dispatch_dev("SvelteRegisterBlock", {
999
- block,
1000
- id: create_each_block_1.name,
1001
- type: "each",
1002
- source: "(120:12) {#each promoDetailsSources as imgSource}",
1003
- ctx
1004
- });
1005
-
1006
- return block;
1007
- }
1008
-
1009
- // (132:14) {#each promoDetailsTabs as tab, index}
1010
- function create_each_block(ctx) {
1011
- let li;
1012
- let t_value = /*tab*/ ctx[24].tabDesc + "";
1013
- let t;
1014
- let mounted;
1015
- let dispose;
1016
-
1017
- const block = {
1018
- c: function create() {
1019
- li = element("li");
1020
- t = text(t_value);
1021
- attr_dev(li, "class", "modal__tab");
1022
- attr_dev(li, "id", `tab-${/*index*/ ctx[26]}`);
1023
- add_location(li, file, 132, 16, 4935);
1024
- },
1025
- m: function mount(target, anchor) {
1026
- insert_dev(target, li, anchor);
1027
- append_dev(li, t);
1028
-
1029
- if (!mounted) {
1030
- dispose = listen_dev(
1031
- li,
1032
- "click",
1033
- function () {
1034
- if (is_function(/*switchTabContent*/ ctx[13](/*tab*/ ctx[24], /*index*/ ctx[26]))) /*switchTabContent*/ ctx[13](/*tab*/ ctx[24], /*index*/ ctx[26]).apply(this, arguments);
1035
- },
1036
- false,
1037
- false,
1038
- false
1039
- );
1040
-
1041
- mounted = true;
1042
- }
1043
- },
1044
- p: function update(new_ctx, dirty) {
1045
- ctx = new_ctx;
1046
- if (dirty[0] & /*promoDetailsTabs*/ 512 && t_value !== (t_value = /*tab*/ ctx[24].tabDesc + "")) set_data_dev(t, t_value);
1047
- },
1048
- d: function destroy(detaching) {
1049
- if (detaching) detach_dev(li);
1050
- mounted = false;
1051
- dispose();
1052
- }
1053
- };
1054
-
1055
- dispatch_dev("SvelteRegisterBlock", {
1056
- block,
1057
- id: create_each_block.name,
1058
- type: "each",
1059
- source: "(132:14) {#each promoDetailsTabs as tab, index}",
1060
- ctx
1061
- });
1062
-
1063
- return block;
1064
- }
1065
-
1066
- function create_fragment(ctx) {
1067
- let if_block_anchor;
1068
- let if_block = /*isLoading*/ ctx[0] !== true && create_if_block(ctx);
1069
-
1070
- const block = {
1071
- c: function create() {
1072
- if (if_block) if_block.c();
1073
- if_block_anchor = empty();
1074
- this.c = noop;
1075
- },
1076
- l: function claim(nodes) {
1077
- throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
1078
- },
1079
- m: function mount(target, anchor) {
1080
- if (if_block) if_block.m(target, anchor);
1081
- insert_dev(target, if_block_anchor, anchor);
1082
- },
1083
- p: function update(ctx, dirty) {
1084
- if (/*isLoading*/ ctx[0] !== true) {
1085
- if (if_block) {
1086
- if_block.p(ctx, dirty);
1087
- } else {
1088
- if_block = create_if_block(ctx);
1089
- if_block.c();
1090
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
1091
- }
1092
- } else if (if_block) {
1093
- if_block.d(1);
1094
- if_block = null;
1095
- }
1096
- },
1097
- i: noop,
1098
- o: noop,
1099
- d: function destroy(detaching) {
1100
- if (if_block) if_block.d(detaching);
1101
- if (detaching) detach_dev(if_block_anchor);
1102
- }
1103
- };
1104
-
1105
- dispatch_dev("SvelteRegisterBlock", {
1106
- block,
1107
- id: create_fragment.name,
1108
- type: "component",
1109
- source: "",
1110
- ctx
1111
- });
1112
-
1113
- return block;
1114
- }
1115
-
1116
- function instance($$self, $$props, $$invalidate) {
1117
- let { $$slots: slots = {}, $$scope } = $$props;
1118
- validate_slots("undefined", slots, []);
1119
-
1120
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
1121
- function adopt(value) {
1122
- return value instanceof P
1123
- ? value
1124
- : new P(function (resolve) {
1125
- resolve(value);
1126
- });
1127
- }
1128
-
1129
- return new (P || (P = Promise))(function (resolve, reject) {
1130
- function fulfilled(value) {
1131
- try {
1132
- step(generator.next(value));
1133
- } catch(e) {
1134
- reject(e);
1135
- }
1136
- }
1137
-
1138
- function rejected(value) {
1139
- try {
1140
- step(generator["throw"](value));
1141
- } catch(e) {
1142
- reject(e);
1143
- }
1144
- }
1145
-
1146
- function step(result) {
1147
- result.done
1148
- ? resolve(result.value)
1149
- : adopt(result.value).then(fulfilled, rejected);
1150
- }
1151
-
1152
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1153
- });
1154
- };
1155
-
1156
- let { endpoint = "" } = $$props;
1157
- let { isLoading = false } = $$props;
1158
- let promotions = [];
1159
- let elementWidth;
1160
- let currentBreakpoint;
1161
- let promotionsContainer;
1162
- let isModalOpen = false;
1163
- let modalContainer;
1164
- let bodyWithModal;
1165
- let promoDetailsTitle = "";
1166
- let promoDetailsContent = "";
1167
- let promoDetailsImage = {};
1168
- let promoDetailsSources = [];
1169
- let promoDetailsTabs = [];
1170
- let modalBodyContent;
1171
-
1172
- const getData = () => {
1173
- $$invalidate(0, isLoading = true);
1174
-
1175
- fetch(endpoint).then(res => res.json()).then(data => {
1176
- $$invalidate(0, isLoading = false);
1177
- $$invalidate(2, promotions = data);
1178
- }).catch(err => {
1179
- $$invalidate(0, isLoading = false);
1180
- console.error(err);
1181
- });
1182
- };
1183
-
1184
- const openPromoModal = promotion => __awaiter(void 0, void 0, void 0, function* () {
1185
- isModalOpen = true;
1186
- $$invalidate(5, promoDetailsTitle = promotion.title);
1187
- $$invalidate(6, promoDetailsContent = promotion.content);
1188
- $$invalidate(7, promoDetailsImage = promotion.image.src);
1189
- $$invalidate(8, promoDetailsSources = promotion.image.sources);
1190
-
1191
- $$invalidate(9, promoDetailsTabs = [
1192
- {
1193
- order: "0",
1194
- tabContent: promoDetailsContent,
1195
- tabDesc: "Description"
1196
- },
1197
- ...promotion.tabs
1198
- ]);
1199
-
1200
- modalContainer = promotionsContainer.querySelector(".modal");
1201
- bodyWithModal = window.document.querySelector("body");
1202
- modalContainer.classList.add("modal--open");
1203
- bodyWithModal.style.overflow = "hidden";
1204
- yield tick();
1205
- switchTabContent(promoDetailsTabs[0], 0);
1206
- });
1207
-
1208
- const closePromoModal = () => {
1209
- isModalOpen = false;
1210
- modalContainer = promotionsContainer.querySelector(".modal");
1211
- bodyWithModal = window.document.querySelector("body");
1212
- modalContainer.classList.remove("modal--open");
1213
- bodyWithModal.style.overflow = "initial";
1214
- };
1215
-
1216
- const switchTabContent = (tab, index) => {
1217
- modalBodyContent.querySelector(".modal__tab_content").innerHTML = tab.tabContent;
1218
- let modalTabs = modalBodyContent.querySelectorAll(".modal__tab");
1219
-
1220
- for (let i = 0; i < modalTabs.length; i++) {
1221
- modalTabs[i].classList.remove("modal__tab--active");
1222
- }
1223
-
1224
- modalBodyContent.querySelector(`#tab-${index}`).classList.add("modal__tab--active");
1225
- };
1226
-
1227
- const breakpoints = {
1228
- sm: 640,
1229
- md: 768,
1230
- lg: 1024,
1231
- xl: 1280,
1232
- xxl: 1536
1233
- };
1234
-
1235
- const writable_props = ["endpoint", "isLoading"];
1236
-
1237
- Object_1.keys($$props).forEach(key => {
1238
- if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(`<undefined> was created with unknown prop '${key}'`);
1239
- });
1240
-
1241
- function div5_binding($$value) {
1242
- binding_callbacks[$$value ? "unshift" : "push"](() => {
1243
- modalBodyContent = $$value;
1244
- $$invalidate(10, modalBodyContent);
1245
- });
1246
- }
1247
-
1248
- function div10_elementresize_handler() {
1249
- elementWidth = this.clientWidth;
1250
- $$invalidate(1, elementWidth);
1251
- }
1252
-
1253
- function div10_binding($$value) {
1254
- binding_callbacks[$$value ? "unshift" : "push"](() => {
1255
- promotionsContainer = $$value;
1256
- $$invalidate(4, promotionsContainer);
1257
- });
1258
- }
1259
-
1260
- $$self.$$set = $$props => {
1261
- if ("endpoint" in $$props) $$invalidate(14, endpoint = $$props.endpoint);
1262
- if ("isLoading" in $$props) $$invalidate(0, isLoading = $$props.isLoading);
1263
- };
1264
-
1265
- $$self.$capture_state = () => ({
1266
- __awaiter,
1267
- tick,
1268
- endpoint,
1269
- isLoading,
1270
- promotions,
1271
- elementWidth,
1272
- currentBreakpoint,
1273
- promotionsContainer,
1274
- isModalOpen,
1275
- modalContainer,
1276
- bodyWithModal,
1277
- promoDetailsTitle,
1278
- promoDetailsContent,
1279
- promoDetailsImage,
1280
- promoDetailsSources,
1281
- promoDetailsTabs,
1282
- modalBodyContent,
1283
- getData,
1284
- openPromoModal,
1285
- closePromoModal,
1286
- switchTabContent,
1287
- breakpoints
1288
- });
1289
-
1290
- $$self.$inject_state = $$props => {
1291
- if ("__awaiter" in $$props) __awaiter = $$props.__awaiter;
1292
- if ("endpoint" in $$props) $$invalidate(14, endpoint = $$props.endpoint);
1293
- if ("isLoading" in $$props) $$invalidate(0, isLoading = $$props.isLoading);
1294
- if ("promotions" in $$props) $$invalidate(2, promotions = $$props.promotions);
1295
- if ("elementWidth" in $$props) $$invalidate(1, elementWidth = $$props.elementWidth);
1296
- if ("currentBreakpoint" in $$props) $$invalidate(3, currentBreakpoint = $$props.currentBreakpoint);
1297
- if ("promotionsContainer" in $$props) $$invalidate(4, promotionsContainer = $$props.promotionsContainer);
1298
- if ("isModalOpen" in $$props) isModalOpen = $$props.isModalOpen;
1299
- if ("modalContainer" in $$props) modalContainer = $$props.modalContainer;
1300
- if ("bodyWithModal" in $$props) bodyWithModal = $$props.bodyWithModal;
1301
- if ("promoDetailsTitle" in $$props) $$invalidate(5, promoDetailsTitle = $$props.promoDetailsTitle);
1302
- if ("promoDetailsContent" in $$props) $$invalidate(6, promoDetailsContent = $$props.promoDetailsContent);
1303
- if ("promoDetailsImage" in $$props) $$invalidate(7, promoDetailsImage = $$props.promoDetailsImage);
1304
- if ("promoDetailsSources" in $$props) $$invalidate(8, promoDetailsSources = $$props.promoDetailsSources);
1305
- if ("promoDetailsTabs" in $$props) $$invalidate(9, promoDetailsTabs = $$props.promoDetailsTabs);
1306
- if ("modalBodyContent" in $$props) $$invalidate(10, modalBodyContent = $$props.modalBodyContent);
1307
- };
1308
-
1309
- if ($$props && "$$inject" in $$props) {
1310
- $$self.$inject_state($$props.$$inject);
1311
- }
1312
-
1313
- $$self.$$.update = () => {
1314
- if ($$self.$$.dirty[0] & /*elementWidth*/ 2) {
1315
- $$invalidate(3, currentBreakpoint = Object.entries(breakpoints).reduce(
1316
- (list, [key, value]) => {
1317
- const match = elementWidth >= value ? key : "";
1318
- return [...list, match];
1319
- },
1320
- []
1321
- ).join(" "));
1322
- }
1323
-
1324
- if ($$self.$$.dirty[0] & /*endpoint*/ 16384) {
1325
- endpoint && getData();
1326
- }
1327
- };
1328
-
1329
- return [
1330
- isLoading,
1331
- elementWidth,
1332
- promotions,
1333
- currentBreakpoint,
1334
- promotionsContainer,
1335
- promoDetailsTitle,
1336
- promoDetailsContent,
1337
- promoDetailsImage,
1338
- promoDetailsSources,
1339
- promoDetailsTabs,
1340
- modalBodyContent,
1341
- openPromoModal,
1342
- closePromoModal,
1343
- switchTabContent,
1344
- endpoint,
1345
- div5_binding,
1346
- div10_elementresize_handler,
1347
- div10_binding
1348
- ];
1349
- }
1350
-
1351
- class CasinoPromotions extends SvelteElement {
1352
- constructor(options) {
1353
- super();
1354
- this.shadowRoot.innerHTML = `<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}.text--ellipsis>*{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.promotions{--bg-color:#07072a;--text-color:#ffffff;--text-color-black:#000000;--border-color:#707070;--modal-bg-color:#F9F8F8;--modal-tabs-text-color:#8E8E8E;--modal-tabs-color:#D1D1D1;--modal-active-tab-color:#07072A;--modal-title-color:#D0046C;background-color:var(--bg-color);padding:24px 16px;color:var(--text-color)}.promotions__title{font-size:22px;font-weight:normal;margin-bottom:18px}.promotions__grid{display:grid;grid-auto-rows:220px;grid-template-columns:1fr;grid-row-gap:16px}.md .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(2, 1fr);grid-gap:20px}.xl .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(3, 1fr);grid-gap:30px}.promo{display:flex;position:relative;flex-direction:column;justify-content:flex-end;width:100%;height:auto;padding:12px 8px;border:2px solid var(--border-color);border-radius:5px;overflow:hidden;transition:all 150ms ease}.promo:hover{border:2px solid var(--text-color)}.promo__picture{position:absolute;width:100%;height:100%;top:0;left:0;z-index:0}.promo__picture img{width:100%;height:100%;object-fit:cover}.promo__picture::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:black;background:linear-gradient(0deg, black 0%, rgba(7, 7, 42, 0.2) 90%)}.promo__details{z-index:5}.promo__title{display:inline-block;margin-bottom:6px;font-size:18px;font-weight:normal}.promo__content{margin-bottom:18px;font-size:14px}.promo__button{font-size:14px;text-transform:uppercase;padding:8px 24px;background:none;color:var(--text-color);border:1px solid var(--text-color);border-radius:3px;cursor:pointer;transition:all 150ms ease}.promo__button:hover{background:var(--modal-title-color);border:1px solid var(--modal-title-color)}.modal{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:100}.modal--open{display:flex}.modal__backdrop{position:absolute;background-color:var(--bg-color);opacity:0.6;width:100%;height:100%;z-index:105}.modal__content{position:relative;display:flex;flex-direction:column;width:100%;background-color:var(--modal-bg-color);z-index:110}.md .modal__content{width:60%;height:80%}.modal__close{position:absolute;width:36px;height:36px;top:16px;right:16px;z-index:110;cursor:pointer;transition:all 150ms ease}.modal__close:hover{color:var(--modal-title-color)}.modal__picture img{width:100%;height:200px;object-fit:cover}.md .modal__picture img{height:300px}.modal__body{padding:16px 8px;color:var(--text-color-black);height:calc(100vh - 200px);overflow-y:auto}.modal__body_title{font-size:18px;margin-bottom:10px;color:var(--modal-title-color)}.modal__body_content{font-size:14px;line-height:1.3}.modal__body_content *{margin-bottom:8px}.md .modal__body{height:calc(100vh - 300px);padding:22px 8%}.lg .modal__body{padding:28px 15%}.modal__tabs{position:relative;display:inline-flex;width:100%;flex-wrap:nowrap;gap:14px;white-space:nowrap;overflow-x:scroll}.modal__tabs::before{content:'';position:absolute;bottom:4px;left:0;width:100%;height:2px;background-color:var(--modal-tabs-color);z-index:125}.modal__tab{background:none;border:none;padding:8px 0;color:var(--modal-tabs-text-color);font-size:14px;cursor:pointer;transition:all 150ms ease}.modal__tab--active{position:relative;color:var(--modal-active-tab-color);z-index:130}.modal__tab--active:before{content:'';left:0;bottom:-5px;position:absolute;width:100%;height:4px;background-color:var(--modal-active-tab-color)}.modal__tab:hover{color:var(--bg-color)}</style>`;
1355
-
1356
- init(
1357
- this,
1358
- {
1359
- target: this.shadowRoot,
1360
- props: attribute_to_object(this.attributes),
1361
- customElement: true
1362
- },
1363
- instance,
1364
- create_fragment,
1365
- safe_not_equal,
1366
- { endpoint: 14, isLoading: 0 },
1367
- [-1, -1]
1368
- );
1369
-
1370
- if (options) {
1371
- if (options.target) {
1372
- insert_dev(options.target, this, options.anchor);
1373
- }
1374
-
1375
- if (options.props) {
1376
- this.$set(options.props);
1377
- flush();
1378
- }
1379
- }
1380
- }
1381
-
1382
- static get observedAttributes() {
1383
- return ["endpoint", "isLoading"];
1384
- }
1385
-
1386
- get endpoint() {
1387
- return this.$$.ctx[14];
1388
- }
1389
-
1390
- set endpoint(endpoint) {
1391
- this.$set({ endpoint });
1392
- flush();
1393
- }
1394
-
1395
- get isLoading() {
1396
- return this.$$.ctx[0];
1397
- }
1398
-
1399
- set isLoading(isLoading) {
1400
- this.$set({ isLoading });
1401
- flush();
1402
- }
1403
- }
1404
-
1405
- !customElements.get('casino-promotions') && customElements.define('casino-promotions', CasinoPromotions);
1406
-
1407
- return CasinoPromotions;
1408
-
1409
- })));
1
+ !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).app=o()}(this,function(){"use strict";function p(){}function u(t){return t()}function m(){return Object.create(null)}function N(t){t.forEach(u)}function $(t){return"function"==typeof t}function o(t,o){return t!=t?o==o:t!==o||t&&"object"==typeof t||"function"==typeof t}function W(t,o){t.appendChild(o)}function O(t,o,e){t.insertBefore(o,e||null)}function F(t){t.parentNode.removeChild(t)}function P(o,e){for(let t=0;t<o.length;t+=1)o[t]&&o[t].d(e)}function B(t){return document.createElement(t)}function c(t){return document.createTextNode(t)}function R(){return c(" ")}function I(t,o,e,n){return t.addEventListener(o,e,n),()=>t.removeEventListener(o,e,n)}function G(t,o,e){null==e?t.removeAttribute(o):t.getAttribute(o)!==e&&t.setAttribute(o,e)}let J,f;function h(t){f=t}const g=[],v=[],n=[],t=[],y=Promise.resolve();let i=!1;function w(){i||(i=!0,y.then(_))}function K(t){n.push(t)}let r=!1;const l=new Set;function _(){if(!r){r=!0;do{for(let t=0;t<g.length;t+=1){var o=g[t];h(o),function(t){{var o;null!==t.fragment&&(t.update(),N(t.before_update),o=t.dirty,t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,o),t.after_update.forEach(K))}}(o.$$)}for(h(null),g.length=0;v.length;)v.pop()();for(let t=0;t<n.length;t+=1){const e=n[t];l.has(e)||(l.add(e),e())}}while(n.length=0,g.length);for(;t.length;)t.pop()();i=!1,r=!1,l.clear()}}const b=new Set;function e(n,t,o,e,i,r,l=[-1]){var a,c=f;h(n);const s=n.$$={fragment:null,ctx:null,props:r,update:p,not_equal:i,bound:m(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:t.context||[]),callbacks:m(),dirty:l,skip_bound:!1};let d=!1;if(s.ctx=o?o(n,t.props||{},(t,o,...e)=>{e=e.length?e[0]:o;return s.ctx&&i(s.ctx[t],s.ctx[t]=e)&&(!s.skip_bound&&s.bound[t]&&s.bound[t](e),d&&(e=t,-1===(t=n).$$.dirty[0]&&(g.push(t),w(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31)),o}):[],s.update(),d=!0,N(s.before_update),s.fragment=!!e&&e(s.ctx),t.target){if(t.hydrate){const p=(e=t.target,Array.from(e.childNodes));s.fragment&&s.fragment.l(p),p.forEach(F)}else s.fragment&&s.fragment.c();t.intro&&(a=n.$$.fragment)&&a.i&&(b.delete(a),a.i(void 0)),function(o,t,e,n){const{fragment:i,on_mount:r,on_destroy:l,after_update:a}=o.$$;i&&i.m(t,e),n||K(()=>{var t=r.map(u).filter($);l?l.push(...t):N(t),o.$$.on_mount=[]}),a.forEach(K)}(n,t.target,t.anchor,t.customElement),_()}h(c)}let a;function Q(t,o,e){const n=t.slice();return n[24]=o[e],n[26]=e,n}function U(t,o,e){const n=t.slice();return n[27]=o[e],n}function V(t,o,e){const n=t.slice();return n[30]=o[e],n}function k(t,o,e){const n=t.slice();return n[27]=o[e],n}function s(e){let l,n,i,a,r,c,s,d,p,u,m,f,h,t,g,_,b,x,v,y,w,$,k,L,z,M,T,E,C,H=e[2],S=[];for(let t=0;t<H.length;t+=1)S[t]=X(V(e,H,t));let j=e[8],A=[];for(let t=0;t<j.length;t+=1)A[t]=Y(U(e,j,t));let q=e[9],D=[];for(let t=0;t<q.length;t+=1)D[t]=Z(Q(e,q,t));return{c(){l=B("div"),n=B("h1"),n.textContent="Promotions",i=R(),a=B("div");for(let t=0;t<S.length;t+=1)S[t].c();r=R(),c=B("div"),s=B("div"),d=R(),p=B("div"),u=B("div"),m=B("picture");for(let t=0;t<A.length;t+=1)A[t].c();f=R(),h=B("img"),g=R(),_=B("div"),b=B("div"),x=B("ul");for(let t=0;t<D.length;t+=1)D[t].c();v=R(),y=B("div"),w=B("h3"),$=R(),k=B("div"),L=R(),z=B("div"),z.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>',G(n,"class","promotions__title"),G(a,"class","promotions__grid"),G(s,"class","modal__backdrop"),h.src!==(t=e[7])&&G(h,"src",t),G(h,"alt",e[5]),G(m,"class","modal__picture"),G(u,"class","modal__header"),G(x,"class","modal__tabs"),G(w,"class","modal__body_title"),G(k,"class","modal__tab_content"),G(y,"class","modal__tabContentWrapper"),G(b,"class","modal__body_content"),G(_,"class","modal__body"),G(p,"class","modal__content"),G(z,"class","modal__close"),G(c,"class","promo__modal modal"),G(l,"class",M="promotions "+e[3]),K(()=>e[16].call(l))},m(t,o){O(t,l,o),W(l,n),W(l,i),W(l,a);for(let t=0;t<S.length;t+=1)S[t].m(a,null);W(l,r),W(l,c),W(c,s),W(c,d),W(c,p),W(p,u),W(u,m);for(let t=0;t<A.length;t+=1)A[t].m(m,null);W(m,f),W(m,h),W(p,g),W(p,_),W(_,b),W(b,x);for(let t=0;t<D.length;t+=1)D[t].m(x,null);W(b,v),W(b,y),W(y,w),w.innerHTML=e[5],W(y,$),W(y,k),k.innerHTML=e[6],e[15](b),W(c,L),W(c,z),T=function(t,o){"static"===getComputedStyle(t).position&&(t.style.position="relative");const e=B("iframe");e.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),e.setAttribute("aria-hidden","true"),e.tabIndex=-1;const n=function(){if(void 0===J){J=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){J=!0}}return J}();let i;return n?(e.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=I(window,"message",t=>{t.source===e.contentWindow&&o()})):(e.src="about:blank",e.onload=()=>{i=I(e.contentWindow,"resize",o)}),W(t,e),()=>{(n||i&&e.contentWindow)&&i(),F(e)}}(l,e[16].bind(l)),e[17](l),E||(C=[I(s,"click",e[12]),I(z,"click",e[12])],E=!0)},p(o,e){if(2052&e[0]){let t;for(H=o[2],t=0;t<H.length;t+=1){var n=V(o,H,t);S[t]?S[t].p(n,e):(S[t]=X(n),S[t].c(),S[t].m(a,null))}for(;t<S.length;t+=1)S[t].d(1);S.length=H.length}if(256&e[0]){let t;for(j=o[8],t=0;t<j.length;t+=1){var i=U(o,j,t);A[t]?A[t].p(i,e):(A[t]=Y(i),A[t].c(),A[t].m(m,f))}for(;t<A.length;t+=1)A[t].d(1);A.length=j.length}if(128&e[0]&&h.src!==(t=o[7])&&G(h,"src",t),32&e[0]&&G(h,"alt",o[5]),8704&e[0]){let t;for(q=o[9],t=0;t<q.length;t+=1){var r=Q(o,q,t);D[t]?D[t].p(r,e):(D[t]=Z(r),D[t].c(),D[t].m(x,null))}for(;t<D.length;t+=1)D[t].d(1);D.length=q.length}32&e[0]&&(w.innerHTML=o[5]),64&e[0]&&(k.innerHTML=o[6]),8&e[0]&&M!==(M="promotions "+o[3])&&G(l,"class",M)},d(t){t&&F(l),P(S,t),P(A,t),P(D,t),e[15](null),T(),e[17](null),E=!1,N(C)}}}function L(t){let e,n,i;return{c(){e=B("source"),G(e,"srcset",n=t[27].pictureSource),G(e,"media",i="("+t[27].media+")")},m(t,o){O(t,e,o)},p(t,o){4&o[0]&&n!==(n=t[27].pictureSource)&&G(e,"srcset",n),4&o[0]&&i!==(i="("+t[27].media+")")&&G(e,"media",i)},d(t){t&&F(e)}}}function X(e){let n,i,r,l,a,c,s,d,p,u,m,f,h,g,_,b,x=e[30].title+"",v=e[30].content.split("</p>")[0]+"",y=e[30].image.sources,w=[];for(let t=0;t<y.length;t+=1)w[t]=L(k(e,y,t));return{c(){n=B("div"),i=B("picture");for(let t=0;t<w.length;t+=1)w[t].c();r=R(),l=B("img"),s=R(),d=B("div"),p=B("h2"),u=R(),m=B("div"),f=R(),h=B("button"),h.textContent="More info",g=R(),l.src!==(a=e[30].image.src)&&G(l,"src",a),G(l,"alt",c=e[30].title),G(i,"class","promo__picture"),G(p,"class","promo__title"),G(m,"class","promo__content text--ellipsis"),G(h,"class","promo__button"),G(d,"class","promo__details"),G(n,"class","promo")},m(t,o){O(t,n,o),W(n,i);for(let t=0;t<w.length;t+=1)w[t].m(i,null);W(i,r),W(i,l),W(n,s),W(n,d),W(d,p),p.innerHTML=x,W(d,u),W(d,m),m.innerHTML=v,W(d,f),W(d,h),W(n,g),_||(b=I(h,"click",function(){$(e[11](e[30]))&&e[11](e[30]).apply(this,arguments)}),_=!0)},p(t,o){if(e=t,4&o[0]){let t;for(y=e[30].image.sources,t=0;t<y.length;t+=1){const l=k(e,y,t);w[t]?w[t].p(l,o):(w[t]=L(l),w[t].c(),w[t].m(i,r))}for(;t<w.length;t+=1)w[t].d(1);w.length=y.length}4&o[0]&&l.src!==(a=e[30].image.src)&&G(l,"src",a),4&o[0]&&c!==(c=e[30].title)&&G(l,"alt",c),4&o[0]&&x!==(x=e[30].title+"")&&(p.innerHTML=x),4&o[0]&&v!==(v=e[30].content.split("</p>")[0]+"")&&(m.innerHTML=v)},d(t){t&&F(n),P(w,t),_=!1,b()}}}function Y(t){let e,n,i;return{c(){e=B("source"),G(e,"srcset",n=t[27].pictureSource),G(e,"media",i="("+t[27].media+")")},m(t,o){O(t,e,o)},p(t,o){256&o[0]&&n!==(n=t[27].pictureSource)&&G(e,"srcset",n),256&o[0]&&i!==(i="("+t[27].media+")")&&G(e,"media",i)},d(t){t&&F(e)}}}function Z(e){let n,i,r,l,a=e[24].tabDesc+"";return{c(){n=B("li"),i=c(a),G(n,"class","modal__tab"),G(n,"id",`tab-${e[26]}`)},m(t,o){O(t,n,o),W(n,i),r||(l=I(n,"click",function(){$(e[13](e[24],e[26]))&&e[13](e[24],e[26]).apply(this,arguments)}),r=!0)},p(t,o){e=t,512&o[0]&&a!==(a=e[24].tabDesc+"")&&(t=i,o=a,t.wholeText!==(o=""+o)&&(t.data=o))},d(t){t&&F(n),r=!1,l()}}}function d(t){let e,n=!0!==t[0]&&s(t);return{c(){n&&n.c(),e=c(""),this.c=p},m(t,o){n&&n.m(t,o),O(t,e,o)},p(t,o){!0!==t[0]?n?n.p(t,o):(n=s(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:p,o:p,d(t){n&&n.d(t),t&&F(e)}}}function x(t,o,e){var n=this&&this.__awaiter||function(t,l,a,c){return new(a=a||Promise)(function(e,o){function n(t){try{r(c.next(t))}catch(t){o(t)}}function i(t){try{r(c.throw(t))}catch(t){o(t)}}function r(t){var o;t.done?e(t.value):((o=t.value)instanceof a?o:new a(function(t){t(o)})).then(n,i)}r((c=c.apply(t,l||[])).next())})};let i,r,l,a,c,s,{endpoint:d=""}=o,{isLoading:p=!1}=o,u=[],m,f,h,g,_=[];const b=(t,o)=>{s.querySelector(".modal__tab_content").innerHTML=t.tabContent;let e=s.querySelectorAll(".modal__tab");for(let t=0;t<e.length;t++)e[t].classList.remove("modal__tab--active");s.querySelector(`#tab-${o}`).classList.add("modal__tab--active")},x={sm:640,md:768,lg:1024,xl:1280,xxl:1536};return t.$$set=t=>{"endpoint"in t&&e(14,d=t.endpoint),"isLoading"in t&&e(0,p=t.isLoading)},t.$$.update=()=>{2&t.$$.dirty[0]&&e(3,r=Object.entries(x).reduce((t,[o,e])=>[...t,i>=e?o:""],[]).join(" ")),16384&t.$$.dirty[0]&&d&&(e(0,p=!0),fetch(d).then(t=>t.json()).then(t=>{e(0,p=!1),e(2,u=t)}).catch(t=>{e(0,p=!1),console.error(t)}))},[p,i,u,r,l,"","",{},[],_,s,t=>n(void 0,void 0,void 0,function*(){e(5,m=t.title),e(6,f=t.content),e(7,h=t.image.src),e(8,g=t.image.sources),e(9,_=[{order:"0",tabContent:f,tabDesc:"Description"},...t.tabs]),a=l.querySelector(".modal"),c=window.document.querySelector("body"),a.classList.add("modal--open"),c.style.overflow="hidden",w(),yield y,b(_[0],0)}),()=>{a=l.querySelector(".modal"),c=window.document.querySelector("body"),a.classList.remove("modal--open"),c.style.overflow="initial"},b,d,function(t){v[t?"unshift":"push"](()=>{s=t,e(10,s)})},function(){i=this.clientWidth,e(1,i)},function(t){v[t?"unshift":"push"](()=>{l=t,e(4,l)})}]}"function"==typeof HTMLElement&&(a=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(u).filter($);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,o,e){this[t]=e}disconnectedCallback(){N(this.$$.on_disconnect)}$destroy(){!function(t){const o=t.$$;null!==o.fragment&&(N(o.on_destroy),o.fragment&&o.fragment.d(1),o.on_destroy=o.fragment=null,o.ctx=[])}(this),this.$destroy=p}$on(t,o){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(o),()=>{var t=e.indexOf(o);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class z extends a{constructor(t){super(),this.shadowRoot.innerHTML='<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}.text--ellipsis>*{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.promotions{--bg-color:#07072a;--text-color:#ffffff;--text-color-black:#000000;--border-color:#707070;--modal-bg-color:#F9F8F8;--modal-tabs-text-color:#8E8E8E;--modal-tabs-color:#D1D1D1;--modal-active-tab-color:#07072A;--modal-title-color:#D0046C;background-color:var(--bg-color);padding:24px 16px;color:var(--text-color)}.promotions__title{font-size:22px;font-weight:normal;margin-bottom:18px}.promotions__grid{display:grid;grid-auto-rows:220px;grid-template-columns:1fr;grid-row-gap:16px}.md .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(2, 1fr);grid-gap:20px}.xl .promotions__grid{grid-auto-rows:260px;grid-template-columns:repeat(3, 1fr);grid-gap:30px}.promo{display:flex;position:relative;flex-direction:column;justify-content:flex-end;width:100%;height:auto;padding:12px 8px;border:2px solid var(--border-color);border-radius:5px;overflow:hidden;transition:all 150ms ease}.promo:hover{border:2px solid var(--text-color)}.promo__picture{position:absolute;width:100%;height:100%;top:0;left:0;z-index:0}.promo__picture img{width:100%;height:100%;object-fit:cover}.promo__picture::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:black;background:linear-gradient(0deg, black 0%, rgba(7, 7, 42, 0.2) 90%)}.promo__details{z-index:5}.promo__title{display:inline-block;margin-bottom:6px;font-size:18px;font-weight:normal}.promo__content{margin-bottom:18px;font-size:14px}.promo__button{font-size:14px;text-transform:uppercase;padding:8px 24px;background:none;color:var(--text-color);border:1px solid var(--text-color);border-radius:3px;cursor:pointer;transition:all 150ms ease}.promo__button:hover{background:var(--modal-title-color);border:1px solid var(--modal-title-color)}.modal{display:none;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:100}.modal--open{display:flex}.modal__backdrop{position:absolute;background-color:var(--bg-color);opacity:0.6;width:100%;height:100%;z-index:105}.modal__content{position:relative;display:flex;flex-direction:column;width:100%;background-color:var(--modal-bg-color);z-index:110}.md .modal__content{width:60%;height:80%}.modal__close{position:absolute;width:36px;height:36px;top:16px;right:16px;z-index:110;cursor:pointer;transition:all 150ms ease}.modal__close:hover{color:var(--modal-title-color)}.modal__picture img{width:100%;height:200px;object-fit:cover}.md .modal__picture img{height:300px}.modal__body{padding:16px 8px;color:var(--text-color-black);height:calc(100vh - 200px);overflow-y:auto}.modal__body_title{font-size:18px;margin-bottom:10px;color:var(--modal-title-color)}.modal__body_content{font-size:14px;line-height:1.3}.modal__body_content *{margin-bottom:8px}.md .modal__body{height:calc(100vh - 300px);padding:22px 8%}.lg .modal__body{padding:28px 15%}.modal__tabs{position:relative;display:inline-flex;width:100%;flex-wrap:nowrap;gap:14px;white-space:nowrap;overflow-x:scroll}.modal__tabs::before{content:\'\';position:absolute;bottom:4px;left:0;width:100%;height:2px;background-color:var(--modal-tabs-color);z-index:125}.modal__tab{background:none;border:none;padding:8px 0;color:var(--modal-tabs-text-color);font-size:14px;cursor:pointer;transition:all 150ms ease}.modal__tab--active{position:relative;color:var(--modal-active-tab-color);z-index:130}.modal__tab--active:before{content:\'\';left:0;bottom:-5px;position:absolute;width:100%;height:4px;background-color:var(--modal-active-tab-color)}.modal__tab:hover{color:var(--bg-color)}</style>',e(this,{target:this.shadowRoot,props:function(t){const o={};for(const e of t)o[e.name]=e.value;return o}(this.attributes),customElement:!0},x,d,o,{endpoint:14,isLoading:0},[-1,-1]),t&&(t.target&&O(t.target,this,t.anchor),t.props&&(this.$set(t.props),_()))}static get observedAttributes(){return["endpoint","isLoading"]}get endpoint(){return this.$$.ctx[14]}set endpoint(t){this.$set({endpoint:t}),_()}get isLoading(){return this.$$.ctx[0]}set isLoading(t){this.$set({isLoading:t}),_()}}return customElements.get("casino-promotions")||customElements.define("casino-promotions",z),z});
1410
2
  //# sourceMappingURL=casino-promotions.js.map