-
Notifications
You must be signed in to change notification settings - Fork 0
/
356.js
1229 lines (1042 loc) · 50.5 KB
/
356.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(self["webpackChunk_lenna_project_lenna_web"] = self["webpackChunk_lenna_project_lenna_web"] || []).push([[356],{
/***/ 356:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: consume shared module (default) vue@^3.0.11 (strict) (fallback: ./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js)
var runtime_dom_esm_bundler_js_ = __webpack_require__(748);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/App.vue?vue&type=template&id=12a8c975
function render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_Navbar = (0,runtime_dom_esm_bundler_js_.resolveComponent)("Navbar")
const _component_router_view = (0,runtime_dom_esm_bundler_js_.resolveComponent)("router-view")
const _component_Footer = (0,runtime_dom_esm_bundler_js_.resolveComponent)("Footer")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_Navbar),
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_router_view),
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_Footer)
], 64))
}
;// CONCATENATED MODULE: ./src/App.vue?vue&type=template&id=12a8c975
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/Navbar.vue?vue&type=template&id=76c602d9&scoped=true
const _withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-76c602d9")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-76c602d9")
const _hoisted_1 = { class: "navbar" }
const _hoisted_2 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createTextVNode)("Home")
const _hoisted_3 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("a", { href: "marketplace" }, "Marketplace", -1)
const _hoisted_4 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createTextVNode)("About")
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const Navbarvue_type_template_id_76c602d9_scoped_true_render = /*#__PURE__*/_withId((_ctx, _cache, $props, $setup, $data, $options) => {
const _component_router_link = (0,runtime_dom_esm_bundler_js_.resolveComponent)("router-link")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", _hoisted_1, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_router_link, { to: "/" }, {
default: _withId(() => [
_hoisted_2
]),
_: 1
}),
_hoisted_3,
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_router_link, { to: "/about" }, {
default: _withId(() => [
_hoisted_4
]),
_: 1
})
]))
})
;// CONCATENATED MODULE: ./src/components/Navbar.vue?vue&type=template&id=76c602d9&scoped=true
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/Navbar.vue?vue&type=script&lang=js
/* harmony default export */ const Navbarvue_type_script_lang_js = ({
name: "Navbar",
});
;// CONCATENATED MODULE: ./src/components/Navbar.vue?vue&type=script&lang=js
;// CONCATENATED MODULE: ./src/components/Navbar.vue
;
Navbarvue_type_script_lang_js.render = Navbarvue_type_template_id_76c602d9_scoped_true_render
Navbarvue_type_script_lang_js.__scopeId = "data-v-76c602d9"
/* harmony default export */ const Navbar = (Navbarvue_type_script_lang_js);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/Footer.vue?vue&type=template&id=0add3bce&scoped=true
const Footervue_type_template_id_0add3bce_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-0add3bce")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-0add3bce")
const Footervue_type_template_id_0add3bce_scoped_true_hoisted_1 = { class: "footer" }
const Footervue_type_template_id_0add3bce_scoped_true_hoisted_2 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createTextVNode)(" Convert images online without upload of your data. ")
const Footervue_type_template_id_0add3bce_scoped_true_hoisted_3 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("a", { href: "https://lenna.app" }, " lenna.app ", -1)
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const Footervue_type_template_id_0add3bce_scoped_true_render = /*#__PURE__*/Footervue_type_template_id_0add3bce_scoped_true_withId((_ctx, _cache) => {
const _component_v_footer = (0,runtime_dom_esm_bundler_js_.resolveComponent)("v-footer")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", Footervue_type_template_id_0add3bce_scoped_true_hoisted_1, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_v_footer, null, {
default: Footervue_type_template_id_0add3bce_scoped_true_withId(() => [
Footervue_type_template_id_0add3bce_scoped_true_hoisted_2,
(0,runtime_dom_esm_bundler_js_.createVNode)("p", null, [
(0,runtime_dom_esm_bundler_js_.createTextVNode)(" © " + (0,runtime_dom_esm_bundler_js_.toDisplayString)(new Date().getFullYear()) + " — ", 1),
Footervue_type_template_id_0add3bce_scoped_true_hoisted_3
])
]),
_: 1
})
]))
})
;// CONCATENATED MODULE: ./src/components/Footer.vue?vue&type=template&id=0add3bce&scoped=true
;// CONCATENATED MODULE: ./src/components/Footer.vue
const script = {}
;
script.render = Footervue_type_template_id_0add3bce_scoped_true_render
script.__scopeId = "data-v-0add3bce"
/* harmony default export */ const Footer = (script);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/App.vue?vue&type=script&lang=js
/* harmony default export */ const Appvue_type_script_lang_js = ((0,runtime_dom_esm_bundler_js_.defineComponent)({
name: "App",
components: {
Navbar: Navbar,
Footer: Footer
},
}));
;// CONCATENATED MODULE: ./src/App.vue?vue&type=script&lang=js
;// CONCATENATED MODULE: ./src/App.vue
Appvue_type_script_lang_js.render = render
/* harmony default export */ const App = (Appvue_type_script_lang_js);
// EXTERNAL MODULE: consume shared module (default) vue-router@^4.0.6 (strict) (fallback: ./node_modules/vue-router/dist/vue-router.esm-bundler.js)
var vue_router_esm_bundler_js_ = __webpack_require__(755);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/views/Home.vue?vue&type=template&id=21f00078&scoped=true
const Homevue_type_template_id_21f00078_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-21f00078")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-21f00078")
const Homevue_type_template_id_21f00078_scoped_true_hoisted_1 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("div", { id: "circle" }, null, -1)
const Homevue_type_template_id_21f00078_scoped_true_hoisted_2 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("br", null, null, -1)
const Homevue_type_template_id_21f00078_scoped_true_hoisted_3 = { class: "main" }
const Homevue_type_template_id_21f00078_scoped_true_hoisted_4 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("h1", null, "Convert images online without upload of your data", -1)
const _hoisted_5 = { class: "top_main" }
const _hoisted_6 = { id: "process" }
const _hoisted_7 = { class: "bottom_main" }
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const Homevue_type_template_id_21f00078_scoped_true_render = /*#__PURE__*/Homevue_type_template_id_21f00078_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
const _component_Config = (0,runtime_dom_esm_bundler_js_.resolveComponent)("Config")
const _component_Slide = (0,runtime_dom_esm_bundler_js_.resolveComponent)("Slide")
const _component_ImageUpload = (0,runtime_dom_esm_bundler_js_.resolveComponent)("ImageUpload")
const _component_ImagePreview = (0,runtime_dom_esm_bundler_js_.resolveComponent)("ImagePreview")
const _component_PluginsManager = (0,runtime_dom_esm_bundler_js_.resolveComponent)("PluginsManager")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, [
Homevue_type_template_id_21f00078_scoped_true_hoisted_1,
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_Slide, null, {
default: Homevue_type_template_id_21f00078_scoped_true_withId(() => [
(0,runtime_dom_esm_bundler_js_.createVNode)("button", {
onClick: _cache[1] || (_cache[1] = $event => (_ctx.loadPlugin(_ctx.pluginUrl)))
}, "add plugin"),
(0,runtime_dom_esm_bundler_js_.withDirectives)((0,runtime_dom_esm_bundler_js_.createVNode)("input", {
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (_ctx.pluginUrl = $event)),
placeholder: "https://lenna.app/lenna-plugins/desaturate/remoteEntry.js"
}, null, 512), [
[runtime_dom_esm_bundler_js_.vModelText, _ctx.pluginUrl]
]),
Homevue_type_template_id_21f00078_scoped_true_hoisted_2,
(_ctx.pluginsManager)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)(_component_Config, {
key: 0,
plugins: _ctx.pluginsManager.plugins
}, null, 8, ["plugins"]))
: (0,runtime_dom_esm_bundler_js_.createCommentVNode)("", true)
]),
_: 1
}),
(0,runtime_dom_esm_bundler_js_.createVNode)("div", Homevue_type_template_id_21f00078_scoped_true_hoisted_3, [
Homevue_type_template_id_21f00078_scoped_true_hoisted_4,
(0,runtime_dom_esm_bundler_js_.createVNode)("div", _hoisted_5, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_ImageUpload, {
ref: "imageUpload",
onChangeImage: _cache[3] || (_cache[3] = $event => (_ctx.changeImages($event)))
}, null, 512),
(0,runtime_dom_esm_bundler_js_.createVNode)("div", _hoisted_6, [
(0,runtime_dom_esm_bundler_js_.createVNode)("button", {
onClick: _cache[4] || (_cache[4] = (...args) => (_ctx.processImages && _ctx.processImages(...args)))
}, "PROCESS IMAGE")
]),
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_ImagePreview, { images: _ctx.resultImages }, null, 8, ["images"])
]),
(0,runtime_dom_esm_bundler_js_.createVNode)("div", _hoisted_7, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_PluginsManager, {
ref: "pluginsManager",
defaultConfig: _ctx.defaultConfig,
defaultPlugins: _ctx.defaultPlugins,
pluginsmap: "https://lenna.app/lenna-plugins/importmap.json",
pluginsjson: "https://lenna.app/lenna-plugins/plugins.json"
}, null, 8, ["defaultConfig", "defaultPlugins"])
])
])
], 64))
})
;// CONCATENATED MODULE: ./src/views/Home.vue?vue&type=template&id=21f00078&scoped=true
// EXTERNAL MODULE: ./node_modules/nprogress/nprogress.js
var nprogress = __webpack_require__(865);
// EXTERNAL MODULE: ./node_modules/vue3-burger-menu/dist/vue3-burger-menu.common.js
var vue3_burger_menu_common = __webpack_require__(471);
// EXTERNAL MODULE: ./node_modules/vue-toastification/dist/esm/index.js
var esm = __webpack_require__(151);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/PluginsManager.vue?vue&type=template&id=52c12c3e&scoped=true
const PluginsManagervue_type_template_id_52c12c3e_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-52c12c3e")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-52c12c3e")
const PluginsManagervue_type_template_id_52c12c3e_scoped_true_hoisted_1 = { class: "plugins-manager" }
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const PluginsManagervue_type_template_id_52c12c3e_scoped_true_render = /*#__PURE__*/PluginsManagervue_type_template_id_52c12c3e_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
const _component_Plugin = (0,runtime_dom_esm_bundler_js_.resolveComponent)("Plugin")
const _component_draggable = (0,runtime_dom_esm_bundler_js_.resolveComponent)("draggable")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", PluginsManagervue_type_template_id_52c12c3e_scoped_true_hoisted_1, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_draggable, {
class: "dragArea list-group plugins",
list: _ctx.plugins
}, {
default: PluginsManagervue_type_template_id_52c12c3e_scoped_true_withId(() => [
((0,runtime_dom_esm_bundler_js_.openBlock)(true), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, (0,runtime_dom_esm_bundler_js_.renderList)(_ctx.plugins, (item) => {
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", {
class: "list-group-item",
key: item.name
}, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_Plugin, {
name: item.name,
plugin: item.plugin,
url: item.url,
defaultConfig: _ctx.defaultConfig,
onChangeEnabled: $event => (_ctx.changeEnabled(item.name, $event)),
onChangeConfig: $event => (_ctx.changeConfig(item.name, $event))
}, null, 8, ["name", "plugin", "url", "defaultConfig", "onChangeEnabled", "onChangeConfig"])
]))
}), 128))
]),
_: 1
}, 8, ["list"])
]))
})
;// CONCATENATED MODULE: ./src/components/PluginsManager.vue?vue&type=template&id=52c12c3e&scoped=true
// EXTERNAL MODULE: ./node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js
var vue_draggable_next_esm_bundler = __webpack_require__(496);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/Plugin.vue?vue&type=template&id=38210140&scoped=true
const Pluginvue_type_template_id_38210140_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-38210140")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-38210140")
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_1 = {
key: 0,
class: "plugin"
}
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_2 = { for: "checkbox" }
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_3 = { class: "checkbox-container" }
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_4 = { class: "checkbox" }
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_5 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("span", null, null, -1)
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_6 = { key: 0 }
const Pluginvue_type_template_id_38210140_scoped_true_hoisted_7 = { key: 0 }
const _hoisted_8 = { key: 1 }
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const Pluginvue_type_template_id_38210140_scoped_true_render = /*#__PURE__*/Pluginvue_type_template_id_38210140_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
const _component_PluginConfig = (0,runtime_dom_esm_bundler_js_.resolveComponent)("PluginConfig")
return ($props.plugin)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", Pluginvue_type_template_id_38210140_scoped_true_hoisted_1, [
(0,runtime_dom_esm_bundler_js_.createVNode)("div", null, [
($data.icon && !$data.enabled)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("img", {
key: 0,
id: "icon",
src: $data.icon
}, null, 8, ["src"]))
: (0,runtime_dom_esm_bundler_js_.createCommentVNode)("", true)
]),
(0,runtime_dom_esm_bundler_js_.createVNode)("div", null, [
(0,runtime_dom_esm_bundler_js_.createVNode)("h2", Pluginvue_type_template_id_38210140_scoped_true_hoisted_2, (0,runtime_dom_esm_bundler_js_.toDisplayString)($props.plugin.name()), 1),
(0,runtime_dom_esm_bundler_js_.createVNode)("div", Pluginvue_type_template_id_38210140_scoped_true_hoisted_3, [
(0,runtime_dom_esm_bundler_js_.createVNode)("label", Pluginvue_type_template_id_38210140_scoped_true_hoisted_4, [
(0,runtime_dom_esm_bundler_js_.withDirectives)((0,runtime_dom_esm_bundler_js_.createVNode)("input", {
type: "checkbox",
id: "checkbox",
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ($data.enabled = $event)),
onChange: _cache[2] || (_cache[2] = $event => ($options.updateEnabled($data.enabled)))
}, null, 544), [
[runtime_dom_esm_bundler_js_.vModelCheckbox, $data.enabled]
]),
Pluginvue_type_template_id_38210140_scoped_true_hoisted_5
])
])
]),
($data.enabled)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", Pluginvue_type_template_id_38210140_scoped_true_hoisted_6, [
(0,runtime_dom_esm_bundler_js_.createVNode)("span", null, (0,runtime_dom_esm_bundler_js_.toDisplayString)($props.plugin.description()), 1),
($data.ui && $data.config)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", Pluginvue_type_template_id_38210140_scoped_true_hoisted_7, [
((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)((0,runtime_dom_esm_bundler_js_.resolveDynamicComponent)($data.ui), {
key: $data.pluginKey,
defaultConfig: $data.config,
onChangeConfig: _cache[3] || (_cache[3] = $event => ($options.updateConfig($event)))
}, null, 8, ["defaultConfig"]))
]))
: ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", _hoisted_8, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_PluginConfig, {
key: $data.pluginKey,
defaultConfig: $data.config,
onChangeConfig: _cache[4] || (_cache[4] = $event => ($options.updateConfig($event)))
}, null, 8, ["defaultConfig"])
]))
]))
: (0,runtime_dom_esm_bundler_js_.createCommentVNode)("", true)
]))
: (0,runtime_dom_esm_bundler_js_.createCommentVNode)("", true)
})
;// CONCATENATED MODULE: ./src/components/Plugin.vue?vue&type=template&id=38210140&scoped=true
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/PluginConfig.vue?vue&type=template&id=060f4b2f&scoped=true
const PluginConfigvue_type_template_id_060f4b2f_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-060f4b2f")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-060f4b2f")
const PluginConfigvue_type_template_id_060f4b2f_scoped_true_hoisted_1 = {
key: 0,
class: "plugin-config"
}
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const PluginConfigvue_type_template_id_060f4b2f_scoped_true_render = /*#__PURE__*/PluginConfigvue_type_template_id_060f4b2f_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
return ($data.config)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", PluginConfigvue_type_template_id_060f4b2f_scoped_true_hoisted_1, [
((0,runtime_dom_esm_bundler_js_.openBlock)(true), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, (0,runtime_dom_esm_bundler_js_.renderList)($data.config, (c) => {
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", {
key: c.key
}, [
(0,runtime_dom_esm_bundler_js_.createVNode)("label", null, (0,runtime_dom_esm_bundler_js_.toDisplayString)(c.key) + ": ", 1),
(0,runtime_dom_esm_bundler_js_.withDirectives)((0,runtime_dom_esm_bundler_js_.createVNode)("input", {
type: "number",
placeholder: c.key,
"onUpdate:modelValue": $event => (c.value = $event),
onChange: _cache[1] || (_cache[1] = $event => ($options.updateConfig()))
}, null, 40, ["placeholder", "onUpdate:modelValue"]), [
[
runtime_dom_esm_bundler_js_.vModelText,
c.value,
void 0,
{ number: true }
]
])
]))
}), 128))
]))
: (0,runtime_dom_esm_bundler_js_.createCommentVNode)("", true)
})
;// CONCATENATED MODULE: ./src/components/PluginConfig.vue?vue&type=template&id=060f4b2f&scoped=true
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/PluginConfig.vue?vue&type=script&lang=ts
/* harmony default export */ const PluginConfigvue_type_script_lang_ts = ({
name: "PluginConfig",
props: {
defaultConfig: Object,
},
data() {
return {
config: [],
};
},
methods: {
async updateConfig() {
let config = {};
for (let c of this.config) {
config[c.key] = c.value;
}
this.$emit("changeConfig", config);
},
},
created() {
for (let key in this.defaultConfig) {
let config = { key: key, value: this.defaultConfig[key] };
this.config.push(config);
}
this.updateConfig();
},
});
;// CONCATENATED MODULE: ./src/components/PluginConfig.vue?vue&type=script&lang=ts
;// CONCATENATED MODULE: ./src/components/PluginConfig.vue
;
PluginConfigvue_type_script_lang_ts.render = PluginConfigvue_type_template_id_060f4b2f_scoped_true_render
PluginConfigvue_type_script_lang_ts.__scopeId = "data-v-060f4b2f"
/* harmony default export */ const PluginConfig = (PluginConfigvue_type_script_lang_ts);
;// CONCATENATED MODULE: ./src/config.js
const saveConfig = (plugin) => {
let config = {
enabled: plugin.enabled,
config: plugin.config,
};
localStorage.setItem(plugin.name, JSON.stringify(config));
};
const loadConfig = (plugin) => {
let config = localStorage.getItem(plugin.name);
if (config) {
config = JSON.parse(config);
plugin.enabled = config.enabled;
plugin.config = Object.assign(plugin.config, config.config);
}
return plugin;
};
const loadConfigFromParams = (plugin, params) => {
params.forEach((config) => {
if (config.name === plugin.name) {
console.log(config);
plugin.enabled = config.enabled;
plugin.config = Object.assign(plugin.config, config.config);
}
});
return plugin;
};
const listPlugins = () => {
let plugins = localStorage.getItem("plugins") || "[]";
return JSON.parse(plugins);
}
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/Plugin.vue?vue&type=script&lang=js
const createUI = (name, component) => {
return component;
};
/* harmony default export */ const Pluginvue_type_script_lang_js = ({
name: "Plugin",
props: {
name: String,
plugin: Object,
url: String,
defaultConfig: Object,
},
components: {
PluginConfig: PluginConfig,
},
data() {
return {
ui: (0,runtime_dom_esm_bundler_js_.shallowRef)(null),
icon: (0,runtime_dom_esm_bundler_js_.shallowRef)(null),
processor: null,
enabled: false,
keyCounter: 0,
pluginKey: "",
config: null,
};
},
methods: {
async loadDefaultConfig() {
this.plugin.defaultConfig().then((defaultConfig) => {
if (this.defaultConfig) {
const { enabled, config } = loadConfigFromParams(
{
name: this.name,
config: defaultConfig,
},
this.defaultConfig
);
this.config = config;
this.enabled = enabled;
} else {
const { enabled, config } = loadConfig({
name: this.name,
config: defaultConfig,
});
this.config = config;
this.enabled = enabled;
}
});
},
async loadUI() {
if (this.plugin.ui && this.url) {
System.import(this.url)
.then((module) => {
module.get("./Widget").then((widget) => {
this.ui = createUI(this.name, widget().default);
});
})
.catch((e) => console.log(e));
}
if (this.plugin.icon) {
this.icon = this.plugin.icon();
}
},
async updateConfig(config) {
saveConfig({
name: this.name,
enabled: this.enabled,
config: config,
});
this.$emit("changeConfig", config);
},
async updateEnabled(enabled) {
saveConfig({
name: this.name,
enabled: this.enabled,
config: this.config,
});
this.$emit("changeEnabled", enabled);
},
},
created() {
this.loadUI();
this.loadDefaultConfig();
},
watch: {
defaultConfig: {
handler: function (val) {
this.keyCounter += 1;
this.pluginKey = this.name + this.keyCounter;
},
},
},
});
;// CONCATENATED MODULE: ./src/components/Plugin.vue?vue&type=script&lang=js
;// CONCATENATED MODULE: ./src/components/Plugin.vue
;
Pluginvue_type_script_lang_js.render = Pluginvue_type_template_id_38210140_scoped_true_render
Pluginvue_type_script_lang_js.__scopeId = "data-v-38210140"
/* harmony default export */ const Plugin = (Pluginvue_type_script_lang_js);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/PluginsManager.vue?vue&type=script&lang=js
/* harmony default export */ const PluginsManagervue_type_script_lang_js = ((0,runtime_dom_esm_bundler_js_.defineComponent)({
name: "PluginsManager",
props: {
pluginsmap: String,
pluginsjson: String,
defaultConfig: Object,
defaultPlugins: Array,
},
components: {
Plugin: Plugin,
draggable: vue_draggable_next_esm_bundler/* VueDraggableNext */.J,
},
data() {
return {
plugins: [],
};
},
beforeMount() {
try {
this.getPluginsmap();
this.getPluginsjson();
} catch (error) {
console.log(error);
}
if (this.defaultPlugins) {
this.defaultPlugins.forEach((plugin) => {
this.importPlugin(plugin, plugin);
});
}
listPlugins().forEach((plugin) => {
this.importPlugin(plugin, plugin);
})
//this.importPlugin("local", "http://localhost:3002/remoteEntry.js");
},
methods: {
changeEnabled(name, enabled) {
let plugin = this.plugins.find((o) => o.name === name);
plugin.enabled = enabled;
},
changeConfig(name, config) {
let plugin = this.plugins.find((o) => o.name === name);
plugin.config = config;
},
raw(comp) {
return comp;
},
importPlugin(key, url) {
System.import(url).then((module) => {
module.init(__webpack_require__.S["default"]);
module.get("default").then((plugin) => {
let pluginConfig = {
name: key,
url: url,
plugin: plugin(),
enabled: false,
config: {},
};
pluginConfig = loadConfig(pluginConfig);
this.plugins.push(pluginConfig);
});
});
},
async getPluginsmap() {
if (this.pluginsmap) {
const res = await fetch(this.pluginsmap);
const data = await res.json();
for (const key in data.imports) {
System.import(key).then((plugin) => {
let pluginConfig = {
name: key,
url: data.imports[key],
plugin: plugin,
enabled: false,
config: {},
};
pluginConfig = loadConfig(pluginConfig);
this.plugins.push(pluginConfig);
});
}
}
},
async getPluginsjson() {
if (this.pluginsjson) {
const res = await fetch(this.pluginsjson);
const data = await res.json();
for (const key in data.plugins) {
let url = data.plugins[key];
this.importPlugin(key, url);
}
}
},
},
}));
;// CONCATENATED MODULE: ./src/components/PluginsManager.vue?vue&type=script&lang=js
;// CONCATENATED MODULE: ./src/components/PluginsManager.vue
;
PluginsManagervue_type_script_lang_js.render = PluginsManagervue_type_template_id_52c12c3e_scoped_true_render
PluginsManagervue_type_script_lang_js.__scopeId = "data-v-52c12c3e"
/* harmony default export */ const PluginsManager = (PluginsManagervue_type_script_lang_js);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/ImageUpload.vue?vue&type=template&id=7371e6d3&scoped=true
const ImageUploadvue_type_template_id_7371e6d3_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-7371e6d3")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-7371e6d3")
const ImageUploadvue_type_template_id_7371e6d3_scoped_true_hoisted_1 = { class: "image-upload" }
const ImageUploadvue_type_template_id_7371e6d3_scoped_true_hoisted_2 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("h3", null, [
/*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createTextVNode)("DROP"),
/*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("br"),
/*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createTextVNode)("OR"),
/*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("br"),
/*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createTextVNode)("SELECT FILES")
], -1)
const ImageUploadvue_type_template_id_7371e6d3_scoped_true_hoisted_3 = { class: "image-container" }
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const ImageUploadvue_type_template_id_7371e6d3_scoped_true_render = /*#__PURE__*/ImageUploadvue_type_template_id_7371e6d3_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
const _component_FileUpload = (0,runtime_dom_esm_bundler_js_.resolveComponent)("FileUpload")
const _component_vue_easy_lightbox = (0,runtime_dom_esm_bundler_js_.resolveComponent)("vue-easy-lightbox")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", ImageUploadvue_type_template_id_7371e6d3_scoped_true_hoisted_1, [
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_FileUpload, {
multiple: true,
drop: true,
"drop-directory": true,
extensions: "gif,jpg,jpeg,png,webp",
accept: "image/png,image/gif,image/jpeg,image/webp",
modelValue: _ctx.files,
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (_ctx.files = $event)),
onInputFilter: _ctx.inputFilter,
onInputFile: _ctx.inputFile,
ref: "upload",
class: "file-upload"
}, {
default: ImageUploadvue_type_template_id_7371e6d3_scoped_true_withId(() => [
ImageUploadvue_type_template_id_7371e6d3_scoped_true_hoisted_2
]),
_: 1
}, 8, ["modelValue", "onInputFilter", "onInputFile"]),
(0,runtime_dom_esm_bundler_js_.createVNode)("div", ImageUploadvue_type_template_id_7371e6d3_scoped_true_hoisted_3, [
((0,runtime_dom_esm_bundler_js_.openBlock)(true), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, (0,runtime_dom_esm_bundler_js_.renderList)(_ctx.images, (src, index) => {
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", {
key: index,
class: "pic",
onClick: () => _ctx.showImg(index)
}, [
(0,runtime_dom_esm_bundler_js_.createVNode)("img", {
height: "140",
src: src
}, null, 8, ["src"])
], 8, ["onClick"]))
}), 128)),
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_vue_easy_lightbox, {
escDisabled: "",
moveDisabled: "",
visible: _ctx.visible,
imgs: _ctx.images,
index: _ctx.index,
onHide: _ctx.handleHide
}, null, 8, ["visible", "imgs", "index", "onHide"])
])
]))
})
;// CONCATENATED MODULE: ./src/components/ImageUpload.vue?vue&type=template&id=7371e6d3&scoped=true
// EXTERNAL MODULE: ./node_modules/vue-upload-component/dist/vue-upload-component.js
var vue_upload_component = __webpack_require__(948);
var vue_upload_component_default = /*#__PURE__*/__webpack_require__.n(vue_upload_component);
// EXTERNAL MODULE: ./node_modules/vue-easy-lightbox/dist/vue-easy-lightbox.es5.esm.min.js
var vue_easy_lightbox_es5_esm_min = __webpack_require__(470);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/ImageUpload.vue?vue&type=script&lang=ts
/* harmony default export */ const ImageUploadvue_type_script_lang_ts = ((0,runtime_dom_esm_bundler_js_.defineComponent)({
components: {
FileUpload: (vue_upload_component_default()),
VueEasyLightbox: vue_easy_lightbox_es5_esm_min/* default */.Z,
},
data() {
return {
files: [],
images: [],
visible: false,
index: 0,
};
},
methods: {
inputFile(newFile, oldFile, prevent) {
this.images.push(newFile.url);
this.$emit("changeImage", newFile);
},
inputFilter(newFile, oldFile, prevent) {
if (newFile && !oldFile) {
if (!/\.(gif|jpg|jpeg|png|webp)$/i.test(newFile.name)) {
this.alert("Your choice is not a picture");
return prevent();
}
}
if (newFile && (!oldFile || newFile.file !== oldFile.file)) {
newFile.url = "";
let URL = window.URL || window.webkitURL;
if (URL && URL.createObjectURL) {
newFile.url = URL.createObjectURL(newFile.file);
}
}
},
showImg(index) {
this.index = index;
this.visible = true;
},
handleHide() {
this.visible = false;
},
},
}));
;// CONCATENATED MODULE: ./src/components/ImageUpload.vue?vue&type=script&lang=ts
;// CONCATENATED MODULE: ./src/components/ImageUpload.vue
;
ImageUploadvue_type_script_lang_ts.render = ImageUploadvue_type_template_id_7371e6d3_scoped_true_render
ImageUploadvue_type_script_lang_ts.__scopeId = "data-v-7371e6d3"
/* harmony default export */ const ImageUpload = (ImageUploadvue_type_script_lang_ts);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/ImagePreview.vue?vue&type=template&id=b67a1a22&scoped=true
const ImagePreviewvue_type_template_id_b67a1a22_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-b67a1a22")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-b67a1a22")
const ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_1 = { class: "image-preview" }
const ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_2 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("p", null, "SAVE FILES", -1)
const ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_3 = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.createVNode)("br", null, null, -1)
const ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_4 = { class: "image-container" }
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const ImagePreviewvue_type_template_id_b67a1a22_scoped_true_render = /*#__PURE__*/ImagePreviewvue_type_template_id_b67a1a22_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
const _component_vue_easy_lightbox = (0,runtime_dom_esm_bundler_js_.resolveComponent)("vue-easy-lightbox")
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_1, [
(0,runtime_dom_esm_bundler_js_.createVNode)("div", {
id: "save",
onClick: _cache[2] || (_cache[2] = (...args) => ($options.downloadZip && $options.downloadZip(...args)))
}, [
(0,runtime_dom_esm_bundler_js_.withDirectives)((0,runtime_dom_esm_bundler_js_.createVNode)("select", {
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ($data.filetype = $event))
}, [
((0,runtime_dom_esm_bundler_js_.openBlock)(true), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, (0,runtime_dom_esm_bundler_js_.renderList)($data.options, (option) => {
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("option", {
value: option.value,
key: option.text
}, (0,runtime_dom_esm_bundler_js_.toDisplayString)(option.text), 9, ["value"]))
}), 128))
], 512), [
[runtime_dom_esm_bundler_js_.vModelSelect, $data.filetype]
]),
ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_2
]),
ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_3,
(0,runtime_dom_esm_bundler_js_.createVNode)("div", ImagePreviewvue_type_template_id_b67a1a22_scoped_true_hoisted_4, [
((0,runtime_dom_esm_bundler_js_.openBlock)(true), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, (0,runtime_dom_esm_bundler_js_.renderList)($data.imgs, (src, index) => {
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("div", {
key: index,
class: "pic",
onClick: () => $options.showImg(index)
}, [
(0,runtime_dom_esm_bundler_js_.createVNode)("img", {
height: "140",
src: src
}, null, 8, ["src"])
], 8, ["onClick"]))
}), 128))
]),
(0,runtime_dom_esm_bundler_js_.createVNode)(_component_vue_easy_lightbox, {
escDisabled: "",
moveDisabled: "",
visible: $data.visible,
imgs: $data.imgs,
index: $data.index,
onHide: $options.handleHide
}, null, 8, ["visible", "imgs", "index", "onHide"])
]))
})
;// CONCATENATED MODULE: ./src/components/ImagePreview.vue?vue&type=template&id=b67a1a22&scoped=true
// EXTERNAL MODULE: ./node_modules/file-saver/dist/FileSaver.min.js
var FileSaver_min = __webpack_require__(162);
// EXTERNAL MODULE: ./node_modules/jszip/dist/jszip.min.js
var jszip_min = __webpack_require__(733);
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/ImagePreview.vue?vue&type=script&lang=ts
/* harmony default export */ const ImagePreviewvue_type_script_lang_ts = ({
components: {
VueEasyLightbox: vue_easy_lightbox_es5_esm_min/* default */.Z,
},
props: {
images: Array,
},
data() {
return {
imgs: [],
visible: false,
index: 0,
filetype: "png",
options: [
{ text: "png", value: "png" },
{ text: "jpg", value: "jpg" },
],
};
},
methods: {
createObjectURL(image) {
return URL.createObjectURL(image);
},
async safeImage(cli, file, format) {
let data = await file
.arrayBuffer()
.then((image) => new Uint8Array(image));
return cli.save(data, format);
},
async downloadZip() {
let cli = await System.import(
"https://lenna.app/lenna-cli/remoteEntry.js"
).then((module) => {
module.init(__webpack_require__.S["default"]);
return module.get("default").then((cli) => {
return cli();
});
});
let zip = new (jszip_min_default())();
const toast = (0,esm/* useToast */.pm)();
const imageCount = this.images.length;
let compressedCount = 0;
toast.info(`compressing of ${this.images.length} images started`);
let promises = this.images.map((image) => {
let type = `image/${this.filetype}`;
return this.safeImage(cli, image, this.filetype).then(
(compressed_image) => {
let file = new File([compressed_image], image.name, { type });
compressedCount++;
toast.success(
`compressed ${image.name} ${compressedCount} / ${imageCount} images`
);
return zip.file(
`${image.name.replace(/(\.[^/.]+)+$/, "")}.${this.filetype}`,
file
);
}
);
});
await Promise.all(promises);
zip.generateAsync({ type: "blob" }).then(function (blob) {
(0,FileSaver_min.saveAs)(blob, "images.zip");
});
},
show() {
this.visible = true;
},
showImg(index) {
this.index = index;
this.visible = true;
},
handleHide() {
this.visible = false;
},
},
watch: {
$props: {
handler() {
this.imgs = [];
this.index = 0;
this.images.forEach((image) => {
this.imgs.push(this.createObjectURL(image));
});
},
deep: true,
immediate: true,
},
},
});
;// CONCATENATED MODULE: ./src/components/ImagePreview.vue?vue&type=script&lang=ts
;// CONCATENATED MODULE: ./src/components/ImagePreview.vue
;
ImagePreviewvue_type_script_lang_ts.render = ImagePreviewvue_type_template_id_b67a1a22_scoped_true_render
ImagePreviewvue_type_script_lang_ts.__scopeId = "data-v-b67a1a22"
/* harmony default export */ const ImagePreview = (ImagePreviewvue_type_script_lang_ts);
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/components/Config.vue?vue&type=template&id=f11c0258&scoped=true
const Configvue_type_template_id_f11c0258_scoped_true_withId = /*#__PURE__*/(0,runtime_dom_esm_bundler_js_.withScopeId)("data-v-f11c0258")
;(0,runtime_dom_esm_bundler_js_.pushScopeId)("data-v-f11c0258")
const Configvue_type_template_id_f11c0258_scoped_true_hoisted_1 = {
key: 1,
class: "config"
}
;(0,runtime_dom_esm_bundler_js_.popScopeId)()
const Configvue_type_template_id_f11c0258_scoped_true_render = /*#__PURE__*/Configvue_type_template_id_f11c0258_scoped_true_withId((_ctx, _cache, $props, $setup, $data, $options) => {
return ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)(runtime_dom_esm_bundler_js_.Fragment, null, [
($props.plugins)
? ((0,runtime_dom_esm_bundler_js_.openBlock)(), (0,runtime_dom_esm_bundler_js_.createBlock)("button", {
key: 0,
onClick: _cache[1] || (_cache[1] = (...args) => ($options.generateConfigUrlBase64 && $options.generateConfigUrlBase64(...args)))
}, " generate config url "))
: (0,runtime_dom_esm_bundler_js_.createCommentVNode)("", true),
($data.base64config)