@plaidev/karte-action-sdk 1.1.180-28042066.2d66783f → 1.1.181-28042947.ba6a2943

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,6 +1,6 @@
1
1
  import { writable, get } from 'svelte/store';
2
2
  import { onMount as onMount$1, onDestroy as onDestroy$1, beforeUpdate as beforeUpdate$1, afterUpdate as afterUpdate$1, tick as tick$1, setContext, getContext, createEventDispatcher } from 'svelte';
3
- import { SvelteComponent, init, safe_not_equal, element, claim_element, children, detach, insert_hydration, noop, component_subscribe, attr, create_slot, create_component, space, claim_component, claim_space, mount_component, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, append_styles, empty, group_outros, check_outros, listen, null_to_empty, is_function, add_render_callback, create_in_transition, binding_callbacks, set_style, svg_element, claim_svg_element, append_hydration, destroy_each, text, claim_text, set_data, src_url_equal, HtmlTagHydration, claim_html_tag, construct_svelte_component, subscribe } from 'svelte/internal';
3
+ import { SvelteComponent, init, safe_not_equal, element, claim_element, children, detach, insert_hydration, noop, component_subscribe, attr, create_slot, create_component, space, claim_component, claim_space, mount_component, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, append_styles, empty, group_outros, check_outros, listen, assign, set_attributes, toggle_class, get_spread_update, null_to_empty, prevent_default, is_function, add_render_callback, create_in_transition, binding_callbacks, set_style, svg_element, claim_svg_element, append_hydration, destroy_each, text, claim_text, set_data, src_url_equal, HtmlTagHydration, claim_html_tag, construct_svelte_component, subscribe } from 'svelte/internal';
4
4
  import 'svelte/easing';
5
5
 
6
6
  /** @internal */
@@ -25,6 +25,229 @@ const ALL_ACTION_SHORTEN_ID = 'KARTE_ALL_ACTION_SHORTEN_ID';
25
25
  */
26
26
  const KARTE_MODAL_ROOT = 'karte-modal-root';
27
27
 
28
+ /** @internal */
29
+ const NOOP = (_args) => { }; // eslint-disable-line @typescript-eslint/no-unused-vars
30
+ /** @internal */
31
+ const isPreview = () => {
32
+ return true;
33
+ };
34
+ /** @internal */
35
+ const setPreviousFocus = () => {
36
+ const previously_focused = typeof document !== 'undefined' && document.activeElement;
37
+ if (previously_focused) {
38
+ previously_focused?.focus();
39
+ }
40
+ };
41
+ /** @internal */
42
+ const handleKeydown = (handlers) => (e) => {
43
+ if (handlers[e.key]) {
44
+ handlers[e.key](e);
45
+ }
46
+ };
47
+ const POSITION_STYLES = {
48
+ 'top-center': 'top: 0; right: 50%; transform: translate(+50%, 0%);',
49
+ 'top-left': 'top: 0; left: 0; transform: translate(0%, 0%);',
50
+ 'top-right': 'top: 0; right: 0; transform: translate(0%, 0%);',
51
+ 'center-left': 'top: 50%; left: 0; transform: translate(0%, -50%);',
52
+ center: 'top: 50%; left: 50%; transform: translate(-50%, -50%);',
53
+ 'center-right': 'top: 50%; right: 0; transform: translate(0%, -50%);',
54
+ 'bottom-left': 'bottom: 0; left: 0; transform: translate(0%, 0%);',
55
+ 'bottom-center': 'bottom: 0; left: 50%; transform: translate(-50%, 0%);',
56
+ 'bottom-right': 'bottom: 0; right: 0; transform: translate(0%, 0);',
57
+ none: 'top: 0; bottom: 0; right: 0; left: 0;',
58
+ };
59
+ const TRANSFORM = {
60
+ 'top-center': [50, 0],
61
+ 'top-left': [0, 0],
62
+ 'top-right': [0, 0],
63
+ 'center-left': [0, -50],
64
+ center: [-50, -50],
65
+ 'center-right': [0, -50],
66
+ 'bottom-left': [0, 0],
67
+ 'bottom-center': [-50, 0],
68
+ 'bottom-right': [0, 0],
69
+ none: [0, 0],
70
+ };
71
+ /** @internal */
72
+ const getPositionStyle = (position) => {
73
+ const style = POSITION_STYLES[position];
74
+ if (style != null) {
75
+ return style;
76
+ }
77
+ else {
78
+ console.warn(`[action-sdk] invalid '${position}', so we use 'center' instead`);
79
+ return POSITION_STYLES['center'];
80
+ }
81
+ };
82
+ /** @internal */
83
+ const getTransform = (position) => {
84
+ const transform = TRANSFORM[position];
85
+ if (transform != null) {
86
+ return transform;
87
+ }
88
+ else {
89
+ console.warn(`[action-sdk] invalid '${position}', so we use 'center' instead`);
90
+ return TRANSFORM['center'];
91
+ }
92
+ };
93
+ /** @internal */
94
+ const getMarginStyle = (margin) => {
95
+ return `margin: ${margin?.top ?? 0} ${margin?.right ?? 0} ${margin?.bottom ?? 0} ${margin?.left ?? 0};`;
96
+ };
97
+ /** @internal */
98
+ const stringifyStyleObj = (styleObj) => {
99
+ return Object.entries(styleObj)
100
+ .map(([key, value]) => `${key}:${value}`)
101
+ .join(';');
102
+ };
103
+ /**
104
+ * スクロール率が達したときに呼び出すコールバックを登録します
105
+ *
106
+ * @param rate - スクロール率。この値は viewport でのスクロールのパーセンテージ
107
+ * @param fn - スクロール率が達したときに呼び出されるコールバック関数
108
+ *
109
+ * @returns スクロール率によって呼び出されるコールバックを停止する関数を返します
110
+ *
111
+ * @public
112
+ */
113
+ function onScroll(rate, fn) {
114
+ const rates = Array.isArray(rate) ? rate : [rate];
115
+ const body = window.document.body;
116
+ const html = window.document.documentElement;
117
+ const contexts = new Map();
118
+ rates.forEach(rate => {
119
+ contexts.set(rate, {
120
+ rate,
121
+ repeat: false,
122
+ zone: 'out',
123
+ previousRate: 0,
124
+ deltaRate: 0,
125
+ scrollRate: 0,
126
+ scrollTop: html.scrollTop || body.scrollTop,
127
+ });
128
+ });
129
+ const _fn = fn;
130
+ const direction = (ctx) => ctx.deltaRate > 0 ? 'down' : 'up';
131
+ const updateStates = (ctx, repeat) => {
132
+ ctx.repeat = repeat;
133
+ // prettier-ignore
134
+ ctx.zone =
135
+ // case: the scroll rate cannot detect the rate when scrolling to the top
136
+ ctx.scrollTop === 0 && ctx.scrollRate >= ctx.rate
137
+ ? 'out'
138
+ : ctx.scrollRate >= ctx.rate
139
+ ? 'in'
140
+ : 'out';
141
+ // console.log('updateStates', ctx.zone);
142
+ };
143
+ // prettier-ignore
144
+ const canCall = ({ zone, scrollRate, rate, scrollTop, repeat }) => zone === 'out'
145
+ ? scrollRate >= rate
146
+ : repeat
147
+ // case: the scroll rate cannot detect the rate when scrolling to the top
148
+ ? scrollRate < rate || (scrollTop === 0 && scrollRate >= rate)
149
+ : false;
150
+ /*
151
+ // NOTE: same logic the above (code size optimiazation)
152
+ const canCall = (ctx: OnScrollInternalContext): boolean => {
153
+ // console.log('repeat', ctx.repeat, 'rate', ctx.rate, 'scrollRate', ctx.scrollRate, '1 - rate', 1 - ctx.rate, '1 - scrollRate', 1 - ctx.scrollRate, 'scrollRate >= rate', ctx.scrollRate >= ctx.rate, '1 - scrollRate >= 1 - rate', 1 - ctx.scrollRate >= 1 - ctx.rate);
154
+ // console.log(ctx.rate, 'deltaRate', ctx.deltaRate, 'reviousRate', ctx.previousRate)
155
+ if (ctx.zone === 'out') {
156
+ return ctx.scrollRate >= ctx.rate;
157
+ } else {
158
+ // 'in'
159
+ if (ctx.repeat) {
160
+ return ctx.scrollRate < ctx.rate || (ctx.scrollTop === 0 && ctx.scrollRate >= ctx.rate);
161
+ } else {
162
+ return false;
163
+ }
164
+ }
165
+ };
166
+ //*/
167
+ const onScroll = () => {
168
+ const scrollTop = html.scrollTop || body.scrollTop;
169
+ const pageHeight = Math.max(...[body.clientHeight, body.scrollHeight, html.scrollHeight, html.clientHeight]);
170
+ const viewHeight = Math.min(...[html.clientHeight, body.clientHeight]);
171
+ const scrollRate = (scrollTop + viewHeight) / pageHeight;
172
+ // console.log('scrollRate ->', scrollRate, 'scrollTop ->', scrollTop);
173
+ contexts.forEach(ctx => {
174
+ ctx.scrollRate = scrollRate;
175
+ ctx.deltaRate = ctx.scrollRate - ctx.previousRate;
176
+ ctx.previousRate = ctx.scrollRate;
177
+ ctx.scrollTop = scrollTop;
178
+ if (canCall(ctx)) {
179
+ const repeat = !!_fn(Object.assign({ direction: direction(ctx) }, ctx));
180
+ updateStates(ctx, repeat);
181
+ }
182
+ });
183
+ };
184
+ // register scorll event
185
+ window.addEventListener('scroll', onScroll);
186
+ // return disposing (finalizing/releasing) function
187
+ return () => {
188
+ window.removeEventListener('scroll', onScroll);
189
+ };
190
+ }
191
+ /**
192
+ * 指定した時間の経過後に呼び出すコールバックを登録します
193
+ *
194
+ * @param time - コールバックを呼び出すまでの時間。単位はミリセカンド(ms)
195
+ * @param fn - 指定した時間が経過後に呼び出されるコールバック関数
196
+ *
197
+ * @returns コールバックを呼び出すためのタイマーを停止する関数を返します
198
+ *
199
+ * @public
200
+ */
201
+ function onTime(time, fn) {
202
+ const timeoutHandler = setTimeout(fn, time);
203
+ return () => timeoutHandler && clearTimeout(timeoutHandler);
204
+ }
205
+ /** @internal */
206
+ function hasSuffix(value, suffix) {
207
+ return new RegExp(`[0-9]${suffix}$`).test(value);
208
+ }
209
+ /**
210
+ * Goolge Fonts用のURLを生成
211
+ *
212
+ * @param fonts - フォント名の配列
213
+ * @param texts - 使用するテキストの配列
214
+ *
215
+ * @remarks
216
+ * textsを指定した場合フォントサイズが削減される
217
+ *
218
+ * @internal
219
+ */
220
+ function makeGoogleFontUrl(fonts, texts) {
221
+ const params = [];
222
+ params.push('display=swap');
223
+ if (texts) {
224
+ texts.forEach(text => params.push(`text=${text}`));
225
+ }
226
+ fonts.forEach(font => params.push(`family=${font.replace(/['"]/g, '').replace(/ /g, '+')}`));
227
+ return `https://fonts.googleapis.com/css2?${params.join('&')}`;
228
+ }
229
+ /**
230
+ * HTML要素を生成
231
+ *
232
+ * @internal
233
+ */
234
+ const h = (type, props, ...children) => {
235
+ const el = document.createElement(type);
236
+ for (const key of Object.keys(props)) {
237
+ const v = props[key];
238
+ if (key === 'style') {
239
+ Object.assign(el.style, v);
240
+ }
241
+ else {
242
+ el.setAttribute(key, v);
243
+ }
244
+ }
245
+ for (const child of children) {
246
+ el.appendChild(child);
247
+ }
248
+ return el;
249
+ };
250
+
28
251
  /**
29
252
  * ポップアップ(モーダル)のコンポーネントで利用するPropの定義
30
253
  */
@@ -253,254 +476,21 @@ const DefaultSlideButton = {
253
476
  type: 'icon',
254
477
  icon: 'chevron-left',
255
478
  color: '#999',
256
- fill: '#999',
257
- size: '20px',
258
- };
259
- /** @internal */
260
- const DefaultSlideNavigationButton = {
261
- type: 'circle',
262
- size: '8px',
263
- color: '#ddd',
264
- colorActive: '#666',
265
- };
266
- /** @internal */
267
- const DefaultFormButtonColor = {
268
- main: '#2aab9f',
269
- sub: '#fff',
270
- };
271
-
272
- /** @internal */
273
- const NOOP = (_args) => { }; // eslint-disable-line @typescript-eslint/no-unused-vars
274
- /** @internal */
275
- const isPreview = () => {
276
- return true;
277
- };
278
- /** @internal */
279
- const setPreviousFocus = () => {
280
- const previously_focused = typeof document !== 'undefined' && document.activeElement;
281
- if (previously_focused) {
282
- previously_focused?.focus();
283
- }
284
- };
285
- /** @internal */
286
- const handleKeydown = (handlers) => (e) => {
287
- if (handlers[e.key]) {
288
- handlers[e.key](e);
289
- }
290
- };
291
- const POSITION_STYLES = {
292
- 'top-center': 'top: 0; right: 50%; transform: translate(+50%, 0%);',
293
- 'top-left': 'top: 0; left: 0; transform: translate(0%, 0%);',
294
- 'top-right': 'top: 0; right: 0; transform: translate(0%, 0%);',
295
- 'center-left': 'top: 50%; left: 0; transform: translate(0%, -50%);',
296
- center: 'top: 50%; left: 50%; transform: translate(-50%, -50%);',
297
- 'center-right': 'top: 50%; right: 0; transform: translate(0%, -50%);',
298
- 'bottom-left': 'bottom: 0; left: 0; transform: translate(0%, 0%);',
299
- 'bottom-center': 'bottom: 0; left: 50%; transform: translate(-50%, 0%);',
300
- 'bottom-right': 'bottom: 0; right: 0; transform: translate(0%, 0);',
301
- none: 'top: 0; bottom: 0; right: 0; left: 0;',
302
- };
303
- const TRANSFORM = {
304
- 'top-center': [50, 0],
305
- 'top-left': [0, 0],
306
- 'top-right': [0, 0],
307
- 'center-left': [0, -50],
308
- center: [-50, -50],
309
- 'center-right': [0, -50],
310
- 'bottom-left': [0, 0],
311
- 'bottom-center': [-50, 0],
312
- 'bottom-right': [0, 0],
313
- none: [0, 0],
314
- };
315
- /** @internal */
316
- const getPositionStyle = (position) => {
317
- const style = POSITION_STYLES[position];
318
- if (style != null) {
319
- return style;
320
- }
321
- else {
322
- console.warn(`[action-sdk] invalid '${position}', so we use 'center' instead`);
323
- return POSITION_STYLES['center'];
324
- }
325
- };
326
- /** @internal */
327
- const getTransform = (position) => {
328
- const transform = TRANSFORM[position];
329
- if (transform != null) {
330
- return transform;
331
- }
332
- else {
333
- console.warn(`[action-sdk] invalid '${position}', so we use 'center' instead`);
334
- return TRANSFORM['center'];
335
- }
336
- };
337
- /** @internal */
338
- const getMarginStyle = (margin) => {
339
- return `margin: ${margin?.top ?? 0} ${margin?.right ?? 0} ${margin?.bottom ?? 0} ${margin?.left ?? 0};`;
479
+ fill: '#999',
480
+ size: '20px',
340
481
  };
341
482
  /** @internal */
342
- const stringifyStyleObj = (styleObj) => {
343
- return Object.entries(styleObj)
344
- .map(([key, value]) => `${key}:${value}`)
345
- .join(';');
483
+ const DefaultSlideNavigationButton = {
484
+ type: 'circle',
485
+ size: '8px',
486
+ color: '#ddd',
487
+ colorActive: '#666',
346
488
  };
347
- /**
348
- * スクロール率が達したときに呼び出すコールバックを登録します
349
- *
350
- * @param rate - スクロール率。この値は viewport でのスクロールのパーセンテージ
351
- * @param fn - スクロール率が達したときに呼び出されるコールバック関数
352
- *
353
- * @returns スクロール率によって呼び出されるコールバックを停止する関数を返します
354
- *
355
- * @public
356
- */
357
- function onScroll(rate, fn) {
358
- const rates = Array.isArray(rate) ? rate : [rate];
359
- const body = window.document.body;
360
- const html = window.document.documentElement;
361
- const contexts = new Map();
362
- rates.forEach(rate => {
363
- contexts.set(rate, {
364
- rate,
365
- repeat: false,
366
- zone: 'out',
367
- previousRate: 0,
368
- deltaRate: 0,
369
- scrollRate: 0,
370
- scrollTop: html.scrollTop || body.scrollTop,
371
- });
372
- });
373
- const _fn = fn;
374
- const direction = (ctx) => ctx.deltaRate > 0 ? 'down' : 'up';
375
- const updateStates = (ctx, repeat) => {
376
- ctx.repeat = repeat;
377
- // prettier-ignore
378
- ctx.zone =
379
- // case: the scroll rate cannot detect the rate when scrolling to the top
380
- ctx.scrollTop === 0 && ctx.scrollRate >= ctx.rate
381
- ? 'out'
382
- : ctx.scrollRate >= ctx.rate
383
- ? 'in'
384
- : 'out';
385
- // console.log('updateStates', ctx.zone);
386
- };
387
- // prettier-ignore
388
- const canCall = ({ zone, scrollRate, rate, scrollTop, repeat }) => zone === 'out'
389
- ? scrollRate >= rate
390
- : repeat
391
- // case: the scroll rate cannot detect the rate when scrolling to the top
392
- ? scrollRate < rate || (scrollTop === 0 && scrollRate >= rate)
393
- : false;
394
- /*
395
- // NOTE: same logic the above (code size optimiazation)
396
- const canCall = (ctx: OnScrollInternalContext): boolean => {
397
- // console.log('repeat', ctx.repeat, 'rate', ctx.rate, 'scrollRate', ctx.scrollRate, '1 - rate', 1 - ctx.rate, '1 - scrollRate', 1 - ctx.scrollRate, 'scrollRate >= rate', ctx.scrollRate >= ctx.rate, '1 - scrollRate >= 1 - rate', 1 - ctx.scrollRate >= 1 - ctx.rate);
398
- // console.log(ctx.rate, 'deltaRate', ctx.deltaRate, 'reviousRate', ctx.previousRate)
399
- if (ctx.zone === 'out') {
400
- return ctx.scrollRate >= ctx.rate;
401
- } else {
402
- // 'in'
403
- if (ctx.repeat) {
404
- return ctx.scrollRate < ctx.rate || (ctx.scrollTop === 0 && ctx.scrollRate >= ctx.rate);
405
- } else {
406
- return false;
407
- }
408
- }
409
- };
410
- //*/
411
- const onScroll = () => {
412
- const scrollTop = html.scrollTop || body.scrollTop;
413
- const pageHeight = Math.max(...[body.clientHeight, body.scrollHeight, html.scrollHeight, html.clientHeight]);
414
- const viewHeight = Math.min(...[html.clientHeight, body.clientHeight]);
415
- const scrollRate = (scrollTop + viewHeight) / pageHeight;
416
- // console.log('scrollRate ->', scrollRate, 'scrollTop ->', scrollTop);
417
- contexts.forEach(ctx => {
418
- ctx.scrollRate = scrollRate;
419
- ctx.deltaRate = ctx.scrollRate - ctx.previousRate;
420
- ctx.previousRate = ctx.scrollRate;
421
- ctx.scrollTop = scrollTop;
422
- if (canCall(ctx)) {
423
- const repeat = !!_fn(Object.assign({ direction: direction(ctx) }, ctx));
424
- updateStates(ctx, repeat);
425
- }
426
- });
427
- };
428
- // register scorll event
429
- window.addEventListener('scroll', onScroll);
430
- // return disposing (finalizing/releasing) function
431
- return () => {
432
- window.removeEventListener('scroll', onScroll);
433
- };
434
- }
435
- /**
436
- * 指定した時間の経過後に呼び出すコールバックを登録します
437
- *
438
- * @param time - コールバックを呼び出すまでの時間。単位はミリセカンド(ms)
439
- * @param fn - 指定した時間が経過後に呼び出されるコールバック関数
440
- *
441
- * @returns コールバックを呼び出すためのタイマーを停止する関数を返します
442
- *
443
- * @public
444
- */
445
- function onTime(time, fn) {
446
- const timeoutHandler = setTimeout(fn, time);
447
- return () => timeoutHandler && clearTimeout(timeoutHandler);
448
- }
449
489
  /** @internal */
450
- function hasSuffix(value, suffix) {
451
- return new RegExp(`[0-9]${suffix}$`).test(value);
452
- }
453
- /**
454
- * Goolge Fonts用のURLを生成
455
- *
456
- * @param fonts - フォント名の配列
457
- * @param texts - 使用するテキストの配列
458
- *
459
- * @remarks
460
- * textsを指定した場合フォントサイズが削減される
461
- *
462
- * @internal
463
- */
464
- function makeGoogleFontUrl(fonts, texts) {
465
- const params = [];
466
- params.push('display=swap');
467
- if (texts) {
468
- texts.forEach(text => params.push(`text=${text}`));
469
- }
470
- fonts.forEach(font => params.push(`family=${font.replace(/['"]/g, '').replace(/ /g, '+')}`));
471
- return `https://fonts.googleapis.com/css2?${params.join('&')}`;
472
- }
473
- /**
474
- * HTML要素を生成
475
- *
476
- * @internal
477
- */
478
- const h = (type, props, ...children) => {
479
- const el = document.createElement(type);
480
- for (const key of Object.keys(props)) {
481
- const v = props[key];
482
- if (key === 'style') {
483
- Object.assign(el.style, v);
484
- }
485
- else {
486
- el.setAttribute(key, v);
487
- }
488
- }
489
- for (const child of children) {
490
- el.appendChild(child);
491
- }
492
- return el;
490
+ const DefaultFormButtonColor = {
491
+ main: '#2aab9f',
492
+ sub: '#fff',
493
493
  };
494
- /**
495
- * 非推奨
496
- *
497
- * @deprecated 非推奨
498
- *
499
- * @internal
500
- */
501
- function getGoogleFontsParam() {
502
- return 'family=' + Fonts.map(font => font.replace(/ /g, '+')).join('&family=');
503
- }
504
494
 
505
495
  /**
506
496
  * Store to handle action setting
@@ -2899,20 +2889,66 @@ class BackgroundOverlay extends SvelteComponent {
2899
2889
  }
2900
2890
  }
2901
2891
 
2892
+ /**
2893
+ * data属性とカスタムのイベントハンドラによるstopPropagation。
2894
+ * デフォルトのstopPropagationだと伝播先のpreventDefaultも無効化されてしまうため、それの対策。
2895
+ */
2896
+ function createDataAttrKey(eventName) {
2897
+ return `data-stop-propagation-${eventName}-${actionId}`;
2898
+ }
2899
+ function dataAttrStopPropagation(eventName) {
2900
+ const dataAttr = createDataAttrKey(eventName);
2901
+ return {
2902
+ [dataAttr]: true,
2903
+ };
2904
+ }
2905
+ function checkStopPropagation(eventName, handler) {
2906
+ const dataAttr = createDataAttrKey(eventName);
2907
+ return function (event) {
2908
+ let el = event.target;
2909
+ do {
2910
+ const _el = el;
2911
+ if (_el === this) {
2912
+ // handlerの中で伝播先のDOMが同期的に消されると
2913
+ // preventDefaultが呼ばれずにデフォルトの挙動だけ残ってしまう
2914
+ setTimeout(() => {
2915
+ handler(event);
2916
+ }, 0);
2917
+ break;
2918
+ }
2919
+ if (_el.hasAttribute(dataAttr))
2920
+ break;
2921
+ el = el.parentElement || el.parentNode;
2922
+ } while (el !== null && el.nodeType === 1);
2923
+ };
2924
+ }
2925
+
2902
2926
  /* src/components/Button.svelte generated by Svelte v3.53.1 */
2903
2927
 
2904
2928
  function add_css$r(target) {
2905
2929
  append_styles(target, "svelte-1tg0tf", ".button.svelte-1tg0tf{display:block;text-decoration:none;color:inherit;border:none;background:none;margin:0;padding:0}.button.svelte-1tg0tf:link,.button.svelte-1tg0tf:visited,.button.svelte-1tg0tf:active,.button.svelte-1tg0tf:hover{color:inherit}");
2906
2930
  }
2907
2931
 
2908
- // (49:0) {:else}
2932
+ // (50:0) {:else}
2909
2933
  function create_else_block$3(ctx) {
2910
2934
  let button;
2911
2935
  let current;
2912
2936
  let mounted;
2913
2937
  let dispose;
2914
- const default_slot_template = /*#slots*/ ctx[10].default;
2915
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[9], null);
2938
+ const default_slot_template = /*#slots*/ ctx[9].default;
2939
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[8], null);
2940
+
2941
+ let button_levels = [
2942
+ { class: BUTTON_CLASS },
2943
+ { style: /*style*/ ctx[1] },
2944
+ dataAttrStopPropagation('click')
2945
+ ];
2946
+
2947
+ let button_data = {};
2948
+
2949
+ for (let i = 0; i < button_levels.length; i += 1) {
2950
+ button_data = assign(button_data, button_levels[i]);
2951
+ }
2916
2952
 
2917
2953
  return {
2918
2954
  c() {
@@ -2928,8 +2964,8 @@ function create_else_block$3(ctx) {
2928
2964
  this.h();
2929
2965
  },
2930
2966
  h() {
2931
- attr(button, "class", "" + (null_to_empty(BUTTON_CLASS) + " svelte-1tg0tf"));
2932
- attr(button, "style", /*style*/ ctx[1]);
2967
+ set_attributes(button, button_data);
2968
+ toggle_class(button, "svelte-1tg0tf", true);
2933
2969
  },
2934
2970
  m(target, anchor) {
2935
2971
  insert_hydration(target, button, anchor);
@@ -2938,32 +2974,37 @@ function create_else_block$3(ctx) {
2938
2974
  default_slot.m(button, null);
2939
2975
  }
2940
2976
 
2977
+ if (button.autofocus) button.focus();
2941
2978
  current = true;
2942
2979
 
2943
2980
  if (!mounted) {
2944
- dispose = listen(button, "click", /*handleClickButton*/ ctx[3]);
2981
+ dispose = listen(button, "click", checkStopPropagation('click', /*handleClick*/ ctx[3]));
2945
2982
  mounted = true;
2946
2983
  }
2947
2984
  },
2948
2985
  p(ctx, dirty) {
2949
2986
  if (default_slot) {
2950
- if (default_slot.p && (!current || dirty & /*$$scope*/ 512)) {
2987
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 256)) {
2951
2988
  update_slot_base(
2952
2989
  default_slot,
2953
2990
  default_slot_template,
2954
2991
  ctx,
2955
- /*$$scope*/ ctx[9],
2992
+ /*$$scope*/ ctx[8],
2956
2993
  !current
2957
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[9])
2958
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[9], dirty, null),
2994
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[8])
2995
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[8], dirty, null),
2959
2996
  null
2960
2997
  );
2961
2998
  }
2962
2999
  }
2963
3000
 
2964
- if (!current || dirty & /*style*/ 2) {
2965
- attr(button, "style", /*style*/ ctx[1]);
2966
- }
3001
+ set_attributes(button, button_data = get_spread_update(button_levels, [
3002
+ { class: BUTTON_CLASS },
3003
+ (!current || dirty & /*style*/ 2) && { style: /*style*/ ctx[1] },
3004
+ dataAttrStopPropagation('click')
3005
+ ]));
3006
+
3007
+ toggle_class(button, "svelte-1tg0tf", true);
2967
3008
  },
2968
3009
  i(local) {
2969
3010
  if (current) return;
@@ -2983,12 +3024,12 @@ function create_else_block$3(ctx) {
2983
3024
  };
2984
3025
  }
2985
3026
 
2986
- // (45:39)
3027
+ // (46:39)
2987
3028
  function create_if_block_2(ctx) {
2988
3029
  let div;
2989
3030
  let current;
2990
- const default_slot_template = /*#slots*/ ctx[10].default;
2991
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[9], null);
3031
+ const default_slot_template = /*#slots*/ ctx[9].default;
3032
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[8], null);
2992
3033
 
2993
3034
  return {
2994
3035
  c() {
@@ -3018,15 +3059,15 @@ function create_if_block_2(ctx) {
3018
3059
  },
3019
3060
  p(ctx, dirty) {
3020
3061
  if (default_slot) {
3021
- if (default_slot.p && (!current || dirty & /*$$scope*/ 512)) {
3062
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 256)) {
3022
3063
  update_slot_base(
3023
3064
  default_slot,
3024
3065
  default_slot_template,
3025
3066
  ctx,
3026
- /*$$scope*/ ctx[9],
3067
+ /*$$scope*/ ctx[8],
3027
3068
  !current
3028
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[9])
3029
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[9], dirty, null),
3069
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[8])
3070
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[8], dirty, null),
3030
3071
  null
3031
3072
  );
3032
3073
  }
@@ -3052,7 +3093,7 @@ function create_if_block_2(ctx) {
3052
3093
  };
3053
3094
  }
3054
3095
 
3055
- // (41:41)
3096
+ // (35:41)
3056
3097
  function create_if_block_1$2(ctx) {
3057
3098
  let a;
3058
3099
  let a_href_value;
@@ -3060,8 +3101,26 @@ function create_if_block_1$2(ctx) {
3060
3101
  let current;
3061
3102
  let mounted;
3062
3103
  let dispose;
3063
- const default_slot_template = /*#slots*/ ctx[10].default;
3064
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[9], null);
3104
+ const default_slot_template = /*#slots*/ ctx[9].default;
3105
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[8], null);
3106
+
3107
+ let a_levels = [
3108
+ { class: BUTTON_CLASS },
3109
+ { style: /*style*/ ctx[1] },
3110
+ {
3111
+ href: a_href_value = /*onClick*/ ctx[0].args[0]
3112
+ },
3113
+ {
3114
+ target: a_target_value = /*onClick*/ ctx[0].args[1] === true ? '_blank' : null
3115
+ },
3116
+ dataAttrStopPropagation('click')
3117
+ ];
3118
+
3119
+ let a_data = {};
3120
+
3121
+ for (let i = 0; i < a_levels.length; i += 1) {
3122
+ a_data = assign(a_data, a_levels[i]);
3123
+ }
3065
3124
 
3066
3125
  return {
3067
3126
  c() {
@@ -3083,10 +3142,8 @@ function create_if_block_1$2(ctx) {
3083
3142
  this.h();
3084
3143
  },
3085
3144
  h() {
3086
- attr(a, "class", "" + (null_to_empty(BUTTON_CLASS) + " svelte-1tg0tf"));
3087
- attr(a, "style", /*style*/ ctx[1]);
3088
- attr(a, "href", a_href_value = /*onClick*/ ctx[0].args[0]);
3089
- attr(a, "target", a_target_value = /*onClick*/ ctx[0].args[1] === true ? '_blank' : null);
3145
+ set_attributes(a, a_data);
3146
+ toggle_class(a, "svelte-1tg0tf", true);
3090
3147
  },
3091
3148
  m(target, anchor) {
3092
3149
  insert_hydration(target, a, anchor);
@@ -3098,37 +3155,35 @@ function create_if_block_1$2(ctx) {
3098
3155
  current = true;
3099
3156
 
3100
3157
  if (!mounted) {
3101
- dispose = listen(a, "click", /*handleClickAnchor*/ ctx[4]);
3158
+ dispose = listen(a, "click", prevent_default(checkStopPropagation('click', /*handleClick*/ ctx[3])));
3102
3159
  mounted = true;
3103
3160
  }
3104
3161
  },
3105
3162
  p(ctx, dirty) {
3106
3163
  if (default_slot) {
3107
- if (default_slot.p && (!current || dirty & /*$$scope*/ 512)) {
3164
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 256)) {
3108
3165
  update_slot_base(
3109
3166
  default_slot,
3110
3167
  default_slot_template,
3111
3168
  ctx,
3112
- /*$$scope*/ ctx[9],
3169
+ /*$$scope*/ ctx[8],
3113
3170
  !current
3114
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[9])
3115
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[9], dirty, null),
3171
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[8])
3172
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[8], dirty, null),
3116
3173
  null
3117
3174
  );
3118
3175
  }
3119
3176
  }
3120
3177
 
3121
- if (!current || dirty & /*style*/ 2) {
3122
- attr(a, "style", /*style*/ ctx[1]);
3123
- }
3124
-
3125
- if (!current || dirty & /*onClick*/ 1 && a_href_value !== (a_href_value = /*onClick*/ ctx[0].args[0])) {
3126
- attr(a, "href", a_href_value);
3127
- }
3178
+ set_attributes(a, a_data = get_spread_update(a_levels, [
3179
+ { class: BUTTON_CLASS },
3180
+ (!current || dirty & /*style*/ 2) && { style: /*style*/ ctx[1] },
3181
+ (!current || dirty & /*onClick*/ 1 && a_href_value !== (a_href_value = /*onClick*/ ctx[0].args[0])) && { href: a_href_value },
3182
+ (!current || dirty & /*onClick*/ 1 && a_target_value !== (a_target_value = /*onClick*/ ctx[0].args[1] === true ? '_blank' : null)) && { target: a_target_value },
3183
+ dataAttrStopPropagation('click')
3184
+ ]));
3128
3185
 
3129
- if (!current || dirty & /*onClick*/ 1 && a_target_value !== (a_target_value = /*onClick*/ ctx[0].args[1] === true ? '_blank' : null)) {
3130
- attr(a, "target", a_target_value);
3131
- }
3186
+ toggle_class(a, "svelte-1tg0tf", true);
3132
3187
  },
3133
3188
  i(local) {
3134
3189
  if (current) return;
@@ -3148,12 +3203,12 @@ function create_if_block_1$2(ctx) {
3148
3203
  };
3149
3204
  }
3150
3205
 
3151
- // (37:0) {#if disabled}
3206
+ // (31:0) {#if disabled}
3152
3207
  function create_if_block$6(ctx) {
3153
3208
  let div;
3154
3209
  let current;
3155
- const default_slot_template = /*#slots*/ ctx[10].default;
3156
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[9], null);
3210
+ const default_slot_template = /*#slots*/ ctx[9].default;
3211
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[8], null);
3157
3212
 
3158
3213
  return {
3159
3214
  c() {
@@ -3183,15 +3238,15 @@ function create_if_block$6(ctx) {
3183
3238
  },
3184
3239
  p(ctx, dirty) {
3185
3240
  if (default_slot) {
3186
- if (default_slot.p && (!current || dirty & /*$$scope*/ 512)) {
3241
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 256)) {
3187
3242
  update_slot_base(
3188
3243
  default_slot,
3189
3244
  default_slot_template,
3190
3245
  ctx,
3191
- /*$$scope*/ ctx[9],
3246
+ /*$$scope*/ ctx[8],
3192
3247
  !current
3193
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[9])
3194
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[9], dirty, null),
3248
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[8])
3249
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[8], dirty, null),
3195
3250
  null
3196
3251
  );
3197
3252
  }
@@ -3303,17 +3358,7 @@ function instance$u($$self, $$props, $$invalidate) {
3303
3358
  let { eventValue = undefined } = $$props;
3304
3359
  let { style = '' } = $$props;
3305
3360
 
3306
- function handleClickButton() {
3307
- if (eventName) {
3308
- send_event(eventName, eventValue);
3309
- }
3310
-
3311
- execOnClickOperation(onClick);
3312
- }
3313
-
3314
- function handleClickAnchor(e) {
3315
- e.preventDefault();
3316
-
3361
+ function handleClick() {
3317
3362
  if (eventName) {
3318
3363
  send_event(eventName, eventValue);
3319
3364
  }
@@ -3323,18 +3368,18 @@ function instance$u($$self, $$props, $$invalidate) {
3323
3368
 
3324
3369
  const { path: statePath } = getStateItemContext() ?? { path: '/' };
3325
3370
  const valuesAreValid = getValuesAreValidReader(statePath);
3326
- component_subscribe($$self, valuesAreValid, value => $$invalidate(8, $valuesAreValid = value));
3371
+ component_subscribe($$self, valuesAreValid, value => $$invalidate(7, $valuesAreValid = value));
3327
3372
 
3328
3373
  $$self.$$set = $$props => {
3329
3374
  if ('onClick' in $$props) $$invalidate(0, onClick = $$props.onClick);
3330
- if ('eventName' in $$props) $$invalidate(6, eventName = $$props.eventName);
3331
- if ('eventValue' in $$props) $$invalidate(7, eventValue = $$props.eventValue);
3375
+ if ('eventName' in $$props) $$invalidate(5, eventName = $$props.eventName);
3376
+ if ('eventValue' in $$props) $$invalidate(6, eventValue = $$props.eventValue);
3332
3377
  if ('style' in $$props) $$invalidate(1, style = $$props.style);
3333
- if ('$$scope' in $$props) $$invalidate(9, $$scope = $$props.$$scope);
3378
+ if ('$$scope' in $$props) $$invalidate(8, $$scope = $$props.$$scope);
3334
3379
  };
3335
3380
 
3336
3381
  $$self.$$.update = () => {
3337
- if ($$self.$$.dirty & /*onClick, $valuesAreValid*/ 257) {
3382
+ if ($$self.$$.dirty & /*onClick, $valuesAreValid*/ 129) {
3338
3383
  $$invalidate(2, disabled = (() => {
3339
3384
  let isEnabled = true;
3340
3385
 
@@ -3353,8 +3398,7 @@ function instance$u($$self, $$props, $$invalidate) {
3353
3398
  onClick,
3354
3399
  style,
3355
3400
  disabled,
3356
- handleClickButton,
3357
- handleClickAnchor,
3401
+ handleClick,
3358
3402
  valuesAreValid,
3359
3403
  eventName,
3360
3404
  eventValue,
@@ -3376,8 +3420,8 @@ class Button extends SvelteComponent {
3376
3420
  safe_not_equal,
3377
3421
  {
3378
3422
  onClick: 0,
3379
- eventName: 6,
3380
- eventValue: 7,
3423
+ eventName: 5,
3424
+ eventValue: 6,
3381
3425
  style: 1
3382
3426
  },
3383
3427
  add_css$r
@@ -4890,7 +4934,7 @@ function add_css$n(target) {
4890
4934
  append_styles(target, "svelte-wb7ek", ".text-button-element.svelte-wb7ek{width:100%;height:100%}.text-button-element.svelte-wb7ek > .button{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:transparent;border:none;box-shadow:transparent;box-sizing:border-box;cursor:pointer;transition:box-shadow 0.2s;white-space:pre-wrap;overflow:hidden}.text-button-element.svelte-wb7ek > .button._disabled{cursor:not-allowed !important;opacity:0.2}.text-button-element.svelte-wb7ek > .button:not(._disabled):active{box-shadow:inset 0 0 100px 100px rgba(0, 0, 0, 0.3)}.text-button-element.svelte-wb7ek > .button:not(._disabled):hover{box-shadow:inset 0 0 100px 100px rgba(255, 255, 255, 0.3)}");
4891
4935
  }
4892
4936
 
4893
- // (36:2) <Button onClick={onClick} {style} {eventName}>
4937
+ // (46:2) <Button onClick={onClick} {style} {eventName}>
4894
4938
  function create_default_slot$5(ctx) {
4895
4939
  let rendertext;
4896
4940
  let current;
@@ -4929,9 +4973,6 @@ function create_default_slot$5(ctx) {
4929
4973
 
4930
4974
  function create_fragment$o(ctx) {
4931
4975
  let div;
4932
- let link;
4933
- let link_href_value;
4934
- let t;
4935
4976
  let button;
4936
4977
  let current;
4937
4978
 
@@ -4948,43 +4989,31 @@ function create_fragment$o(ctx) {
4948
4989
  return {
4949
4990
  c() {
4950
4991
  div = element("div");
4951
- link = element("link");
4952
- t = space();
4953
4992
  create_component(button.$$.fragment);
4954
4993
  this.h();
4955
4994
  },
4956
4995
  l(nodes) {
4957
4996
  div = claim_element(nodes, "DIV", { class: true });
4958
4997
  var div_nodes = children(div);
4959
- link = claim_element(div_nodes, "LINK", { href: true, rel: true });
4960
- t = claim_space(div_nodes);
4961
4998
  claim_component(button.$$.fragment, div_nodes);
4962
4999
  div_nodes.forEach(detach);
4963
5000
  this.h();
4964
5001
  },
4965
5002
  h() {
4966
- attr(link, "href", link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`);
4967
- attr(link, "rel", "stylesheet");
4968
5003
  attr(div, "class", "text-button-element svelte-wb7ek");
4969
5004
  },
4970
5005
  m(target, anchor) {
4971
5006
  insert_hydration(target, div, anchor);
4972
- append_hydration(div, link);
4973
- append_hydration(div, t);
4974
5007
  mount_component(button, div, null);
4975
5008
  current = true;
4976
5009
  },
4977
5010
  p(ctx, [dirty]) {
4978
- if (!current || dirty & /*text*/ 1 && link_href_value !== (link_href_value = `https://fonts.googleapis.com/css2?${getGoogleFontsParam()}&display=swap&text=${/*text*/ ctx[0]}`)) {
4979
- attr(link, "href", link_href_value);
4980
- }
4981
-
4982
5011
  const button_changes = {};
4983
5012
  if (dirty & /*onClick*/ 2) button_changes.onClick = /*onClick*/ ctx[1];
4984
5013
  if (dirty & /*style*/ 8) button_changes.style = /*style*/ ctx[3];
4985
5014
  if (dirty & /*eventName*/ 4) button_changes.eventName = /*eventName*/ ctx[2];
4986
5015
 
4987
- if (dirty & /*$$scope, text*/ 65) {
5016
+ if (dirty & /*$$scope, text*/ 129) {
4988
5017
  button_changes.$$scope = { dirty, ctx };
4989
5018
  }
4990
5019
 
@@ -5011,6 +5040,7 @@ function instance$o($$self, $$props, $$invalidate) {
5011
5040
  let { text = 'ボタンラベル' } = $$props;
5012
5041
  let { onClick = { operation: 'none', args: [] } } = $$props;
5013
5042
  let { eventName = '' } = $$props;
5043
+ let { font = SYSTEM_FONT } = $$props;
5014
5044
  let { _buttonStyle = 'color:#ffffff; font-size:14px; font-weight:bold; justify-content:center; align-items:center; padding:1px 6px 1px 6px; line-height: 1.5;' } = $$props;
5015
5045
  let { _style = 'background-color: #000000; border-radius:4px; cursor: pointer' } = $$props;
5016
5046
 
@@ -5018,17 +5048,22 @@ function instance$o($$self, $$props, $$invalidate) {
5018
5048
  if ('text' in $$props) $$invalidate(0, text = $$props.text);
5019
5049
  if ('onClick' in $$props) $$invalidate(1, onClick = $$props.onClick);
5020
5050
  if ('eventName' in $$props) $$invalidate(2, eventName = $$props.eventName);
5021
- if ('_buttonStyle' in $$props) $$invalidate(4, _buttonStyle = $$props._buttonStyle);
5022
- if ('_style' in $$props) $$invalidate(5, _style = $$props._style);
5051
+ if ('font' in $$props) $$invalidate(4, font = $$props.font);
5052
+ if ('_buttonStyle' in $$props) $$invalidate(5, _buttonStyle = $$props._buttonStyle);
5053
+ if ('_style' in $$props) $$invalidate(6, _style = $$props._style);
5023
5054
  };
5024
5055
 
5025
5056
  $$self.$$.update = () => {
5026
- if ($$self.$$.dirty & /*_buttonStyle, _style*/ 48) {
5027
- $$invalidate(3, style = [..._buttonStyle.split(';'), ..._style.split(';')].filter(Boolean).join(';'));
5057
+ if ($$self.$$.dirty & /*font*/ 16) {
5058
+ addFont(font);
5059
+ }
5060
+
5061
+ if ($$self.$$.dirty & /*_buttonStyle, _style, font*/ 112) {
5062
+ $$invalidate(3, style = [..._buttonStyle.split(';'), ..._style.split(';'), `font-family:${font}`].filter(prop => prop).join(';'));
5028
5063
  }
5029
5064
  };
5030
5065
 
5031
- return [text, onClick, eventName, style, _buttonStyle, _style];
5066
+ return [text, onClick, eventName, style, font, _buttonStyle, _style];
5032
5067
  }
5033
5068
 
5034
5069
  class TextButtonElement extends SvelteComponent {
@@ -5045,8 +5080,9 @@ class TextButtonElement extends SvelteComponent {
5045
5080
  text: 0,
5046
5081
  onClick: 1,
5047
5082
  eventName: 2,
5048
- _buttonStyle: 4,
5049
- _style: 5
5083
+ font: 4,
5084
+ _buttonStyle: 5,
5085
+ _style: 6
5050
5086
  },
5051
5087
  add_css$n
5052
5088
  );
@@ -7705,7 +7741,7 @@ function get_each_context(ctx, list, i) {
7705
7741
  return child_ctx;
7706
7742
  }
7707
7743
 
7708
- // (369:2) {#if isVisiblePrevButton}
7744
+ // (371:2) {#if isVisiblePrevButton}
7709
7745
  function create_if_block_1(ctx) {
7710
7746
  let div1;
7711
7747
  let div0;
@@ -7773,7 +7809,7 @@ function create_if_block_1(ctx) {
7773
7809
  };
7774
7810
  }
7775
7811
 
7776
- // (378:2) {#if isVisibleNextButton}
7812
+ // (380:2) {#if isVisibleNextButton}
7777
7813
  function create_if_block$1(ctx) {
7778
7814
  let div1;
7779
7815
  let div0;
@@ -7841,7 +7877,7 @@ function create_if_block$1(ctx) {
7841
7877
  };
7842
7878
  }
7843
7879
 
7844
- // (391:4) {#each items as _, i}
7880
+ // (393:4) {#each items as _, i}
7845
7881
  function create_each_block(ctx) {
7846
7882
  let div1;
7847
7883
  let div0;
@@ -7926,6 +7962,13 @@ function create_fragment$b(ctx) {
7926
7962
  each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
7927
7963
  }
7928
7964
 
7965
+ let div3_levels = [{ class: "root" }, dataAttrStopPropagation('click')];
7966
+ let div3_data = {};
7967
+
7968
+ for (let i = 0; i < div3_levels.length; i += 1) {
7969
+ div3_data = assign(div3_data, div3_levels[i]);
7970
+ }
7971
+
7929
7972
  return {
7930
7973
  c() {
7931
7974
  div3 = element("div");
@@ -7978,7 +8021,8 @@ function create_fragment$b(ctx) {
7978
8021
  attr(div1, "style", /*_style*/ ctx[0]);
7979
8022
  attr(div2, "class", "navigation svelte-1wlcw5a");
7980
8023
  attr(div2, "style", /*navigationStyle*/ ctx[4]);
7981
- attr(div3, "class", "root svelte-1wlcw5a");
8024
+ set_attributes(div3, div3_data);
8025
+ toggle_class(div3, "svelte-1wlcw5a", true);
7982
8026
  },
7983
8027
  m(target, anchor) {
7984
8028
  insert_hydration(target, div3, anchor);
@@ -8084,6 +8128,9 @@ function create_fragment$b(ctx) {
8084
8128
  if (!current || dirty[0] & /*navigationStyle*/ 16) {
8085
8129
  attr(div2, "style", /*navigationStyle*/ ctx[4]);
8086
8130
  }
8131
+
8132
+ set_attributes(div3, div3_data = get_spread_update(div3_levels, [{ class: "root" }, dataAttrStopPropagation('click')]));
8133
+ toggle_class(div3, "svelte-1wlcw5a", true);
8087
8134
  },
8088
8135
  i(local) {
8089
8136
  if (current) return;
@@ -8337,7 +8384,9 @@ function instance$b($$self, $$props, $$invalidate) {
8337
8384
  }
8338
8385
 
8339
8386
  function handleTouchMove(event) {
8387
+ // ウィンドウのスクロールを防ぐ
8340
8388
  event.preventDefault();
8389
+
8341
8390
  const clientX = event.touches[0].clientX;
8342
8391
  const timeStamp = event.timeStamp;
8343
8392
  handleMoving(clientX, timeStamp);