tui-image-editor.js
906 KB
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
/*!
* tui-image-editor.js
* @version 3.11.0
* @author NHN FE Development Lab <dl_javascript@nhn.com>
* @license MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("fabric")["fabric"], require("tui-code-snippet"), require("tui-color-picker"));
else if(typeof define === 'function' && define.amd)
define(["fabric", "tui-code-snippet", "tui-color-picker"], factory);
else if(typeof exports === 'object')
exports["ImageEditor"] = factory(require("fabric")["fabric"], require("tui-code-snippet"), require("tui-color-picker"));
else
root["tui"] = root["tui"] || {}, root["tui"]["ImageEditor"] = factory(root["fabric"], (root["tui"] && root["tui"]["util"]), (root["tui"] && root["tui"]["colorPicker"]));
})(window, function(__WEBPACK_EXTERNAL_MODULE_fabric__, __WEBPACK_EXTERNAL_MODULE_tui_code_snippet__, __WEBPACK_EXTERNAL_MODULE_tui_color_picker__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./node_modules/core-js-pure/es/promise/index.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js-pure/es/promise/index.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("__webpack_require__(/*! ../../modules/es.object.to-string */ \"./node_modules/core-js-pure/modules/es.object.to-string.js\");\n__webpack_require__(/*! ../../modules/es.string.iterator */ \"./node_modules/core-js-pure/modules/es.string.iterator.js\");\n__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ \"./node_modules/core-js-pure/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! ../../modules/es.promise */ \"./node_modules/core-js-pure/modules/es.promise.js\");\n__webpack_require__(/*! ../../modules/es.promise.all-settled */ \"./node_modules/core-js-pure/modules/es.promise.all-settled.js\");\n__webpack_require__(/*! ../../modules/es.promise.finally */ \"./node_modules/core-js-pure/modules/es.promise.finally.js\");\nvar path = __webpack_require__(/*! ../../internals/path */ \"./node_modules/core-js-pure/internals/path.js\");\n\nmodule.exports = path.Promise;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/es/promise/index.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/features/promise/index.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js-pure/features/promise/index.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var parent = __webpack_require__(/*! ../../es/promise */ \"./node_modules/core-js-pure/es/promise/index.js\");\n__webpack_require__(/*! ../../modules/esnext.aggregate-error */ \"./node_modules/core-js-pure/modules/esnext.aggregate-error.js\");\n// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../../modules/esnext.promise.all-settled */ \"./node_modules/core-js-pure/modules/esnext.promise.all-settled.js\");\n__webpack_require__(/*! ../../modules/esnext.promise.try */ \"./node_modules/core-js-pure/modules/esnext.promise.try.js\");\n__webpack_require__(/*! ../../modules/esnext.promise.any */ \"./node_modules/core-js-pure/modules/esnext.promise.any.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/features/promise/index.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/a-function.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js-pure/internals/a-function.js ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/a-function.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/a-possible-prototype.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/a-possible-prototype.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/a-possible-prototype.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/add-to-unscopables.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/add-to-unscopables.js ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function () { /* empty */ };\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/add-to-unscopables.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/an-instance.js":
/*!************************************************************!*\
!*** ./node_modules/core-js-pure/internals/an-instance.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/an-instance.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/an-object.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/an-object.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/an-object.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/array-includes.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js-pure/internals/array-includes.js ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js-pure/internals/to-indexed-object.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js-pure/internals/to-length.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js-pure/internals/to-absolute-index.js\");\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/array-includes.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js":
/*!*********************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/check-correctness-of-iteration.js":
/*!*******************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/check-correctness-of-iteration.js ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/check-correctness-of-iteration.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/classof-raw.js":
/*!************************************************************!*\
!*** ./node_modules/core-js-pure/internals/classof-raw.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/classof-raw.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/classof.js":
/*!********************************************************!*\
!*** ./node_modules/core-js-pure/internals/classof.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ \"./node_modules/core-js-pure/internals/to-string-tag-support.js\");\nvar classofRaw = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js-pure/internals/classof-raw.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/classof.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/correct-prototype-getter.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/correct-prototype-getter.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/correct-prototype-getter.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/create-iterator-constructor.js":
/*!****************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/create-iterator-constructor.js ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ \"./node_modules/core-js-pure/internals/iterators-core.js\").IteratorPrototype;\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js-pure/internals/object-create.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js-pure/internals/create-property-descriptor.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js-pure/internals/set-to-string-tag.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js-pure/internals/iterators.js\");\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/create-iterator-constructor.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/create-non-enumerable-property.js":
/*!*******************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/create-non-enumerable-property.js ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js-pure/internals/object-define-property.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js-pure/internals/create-property-descriptor.js\");\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/create-non-enumerable-property.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/create-property-descriptor.js":
/*!***************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/create-property-descriptor.js ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/create-property-descriptor.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/define-iterator.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js-pure/internals/define-iterator.js ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ \"./node_modules/core-js-pure/internals/create-iterator-constructor.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js-pure/internals/object-get-prototype-of.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js-pure/internals/object-set-prototype-of.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js-pure/internals/set-to-string-tag.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js-pure/internals/redefine.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js-pure/internals/iterators.js\");\nvar IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ \"./node_modules/core-js-pure/internals/iterators-core.js\");\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/define-iterator.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/descriptors.js":
/*!************************************************************!*\
!*** ./node_modules/core-js-pure/internals/descriptors.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/descriptors.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/document-create-element.js":
/*!************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/document-create-element.js ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/document-create-element.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/dom-iterables.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js-pure/internals/dom-iterables.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/dom-iterables.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/engine-is-ios.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js-pure/internals/engine-is-ios.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ \"./node_modules/core-js-pure/internals/engine-user-agent.js\");\n\nmodule.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/engine-is-ios.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/engine-user-agent.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/engine-user-agent.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/engine-user-agent.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/engine-v8-version.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/engine-v8-version.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ \"./node_modules/core-js-pure/internals/engine-user-agent.js\");\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/engine-v8-version.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/enum-bug-keys.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js-pure/internals/enum-bug-keys.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/enum-bug-keys.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/export.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js-pure/internals/export.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js\").f;\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js-pure/internals/is-forced.js\");\nvar path = __webpack_require__(/*! ../internals/path */ \"./node_modules/core-js-pure/internals/path.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js-pure/internals/function-bind-context.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\n\nvar wrapConstructor = function (NativeConstructor) {\n var Wrapper = function (a, b, c) {\n if (this instanceof NativeConstructor) {\n switch (arguments.length) {\n case 0: return new NativeConstructor();\n case 1: return new NativeConstructor(a);\n case 2: return new NativeConstructor(a, b);\n } return new NativeConstructor(a, b, c);\n } return NativeConstructor.apply(this, arguments);\n };\n Wrapper.prototype = NativeConstructor.prototype;\n return Wrapper;\n};\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var PROTO = options.proto;\n\n var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;\n\n var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {});\n var targetPrototype = target.prototype;\n\n var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n for (key in source) {\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contains in native\n USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key);\n\n targetProperty = target[key];\n\n if (USE_NATIVE) if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(nativeSource, key);\n nativeProperty = descriptor && descriptor.value;\n } else nativeProperty = nativeSource[key];\n\n // export native or implementation\n sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n if (USE_NATIVE && typeof targetProperty === typeof sourceProperty) continue;\n\n // bind timers to global for call from export context\n if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);\n // wrap global constructors for prevent changs in this version\n else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n // make static versions for prototype methods\n else if (PROTO && typeof sourceProperty == 'function') resultProperty = bind(Function.call, sourceProperty);\n // default case\n else resultProperty = sourceProperty;\n\n // add a flag to not completely full polyfills\n if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(resultProperty, 'sham', true);\n }\n\n target[key] = resultProperty;\n\n if (PROTO) {\n VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n if (!has(path, VIRTUAL_PROTOTYPE)) {\n createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n }\n // export virtual prototype methods\n path[VIRTUAL_PROTOTYPE][key] = sourceProperty;\n // export real prototype methods\n if (options.real && targetPrototype && !targetPrototype[key]) {\n createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n }\n }\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/export.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/fails.js":
/*!******************************************************!*\
!*** ./node_modules/core-js-pure/internals/fails.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/fails.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/function-bind-context.js":
/*!**********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/function-bind-context.js ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js-pure/internals/a-function.js\");\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/function-bind-context.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/get-built-in.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js-pure/internals/get-built-in.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var path = __webpack_require__(/*! ../internals/path */ \"./node_modules/core-js-pure/internals/path.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/get-built-in.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/get-iterator-method.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/get-iterator-method.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js-pure/internals/classof.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js-pure/internals/iterators.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/get-iterator-method.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/global.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js-pure/internals/global.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/global.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/has.js":
/*!****************************************************!*\
!*** ./node_modules/core-js-pure/internals/has.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/has.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/hidden-keys.js":
/*!************************************************************!*\
!*** ./node_modules/core-js-pure/internals/hidden-keys.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = {};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/hidden-keys.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/host-report-errors.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/host-report-errors.js ***!
\*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/host-report-errors.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/html.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js-pure/internals/html.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/html.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/ie8-dom-define.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js-pure/internals/ie8-dom-define.js ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js-pure/internals/document-create-element.js\");\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/ie8-dom-define.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/indexed-object.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js-pure/internals/indexed-object.js ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js-pure/internals/classof-raw.js\");\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/indexed-object.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/inspect-source.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js-pure/internals/inspect-source.js ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js-pure/internals/shared-store.js\");\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/inspect-source.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/internal-state.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js-pure/internals/internal-state.js ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ \"./node_modules/core-js-pure/internals/native-weak-map.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar objectHas = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js-pure/internals/shared-key.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js-pure/internals/hidden-keys.js\");\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/internal-state.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/is-array-iterator-method.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/is-array-iterator-method.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js-pure/internals/iterators.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/is-array-iterator-method.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/is-forced.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/is-forced.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/is-forced.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/is-object.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/is-object.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/is-object.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/is-pure.js":
/*!********************************************************!*\
!*** ./node_modules/core-js-pure/internals/is-pure.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = true;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/is-pure.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/iterate.js":
/*!********************************************************!*\
!*** ./node_modules/core-js-pure/internals/iterate.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ \"./node_modules/core-js-pure/internals/is-array-iterator-method.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js-pure/internals/to-length.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js-pure/internals/function-bind-context.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js-pure/internals/get-iterator-method.js\");\nvar callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ \"./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js\");\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, next, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/iterate.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/iterators-core.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js-pure/internals/iterators-core.js ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js-pure/internals/object-get-prototype-of.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/iterators-core.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/iterators.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/iterators.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = {};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/iterators.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/microtask.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/microtask.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js\").f;\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js-pure/internals/classof-raw.js\");\nvar macrotask = __webpack_require__(/*! ../internals/task */ \"./node_modules/core-js-pure/internals/task.js\").set;\nvar IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ \"./node_modules/core-js-pure/internals/engine-is-ios.js\");\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver && !IS_IOS) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/microtask.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/native-promise-constructor.js":
/*!***************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/native-promise-constructor.js ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\n\nmodule.exports = global.Promise;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/native-promise-constructor.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/native-symbol.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js-pure/internals/native-symbol.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/native-symbol.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/native-weak-map.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js-pure/internals/native-weak-map.js ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js-pure/internals/inspect-source.js\");\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/native-weak-map.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/new-promise-capability.js":
/*!***********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/new-promise-capability.js ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js-pure/internals/a-function.js\");\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/new-promise-capability.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-create.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-create.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js-pure/internals/object-define-properties.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js-pure/internals/enum-bug-keys.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js-pure/internals/hidden-keys.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js-pure/internals/html.js\");\nvar documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js-pure/internals/document-create-element.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js-pure/internals/shared-key.js\");\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-create.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-define-properties.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-define-properties.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js-pure/internals/object-define-property.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js-pure/internals/object-keys.js\");\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-define-properties.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-define-property.js":
/*!***********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-define-property.js ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js-pure/internals/ie8-dom-define.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js-pure/internals/to-primitive.js\");\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-define-property.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js":
/*!***********************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js-pure/internals/object-property-is-enumerable.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js-pure/internals/create-property-descriptor.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js-pure/internals/to-indexed-object.js\");\nvar toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js-pure/internals/to-primitive.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js-pure/internals/ie8-dom-define.js\");\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-get-prototype-of.js":
/*!************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-get-prototype-of.js ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js-pure/internals/to-object.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js-pure/internals/shared-key.js\");\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ \"./node_modules/core-js-pure/internals/correct-prototype-getter.js\");\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-get-prototype-of.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-keys-internal.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-keys-internal.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js-pure/internals/to-indexed-object.js\");\nvar indexOf = __webpack_require__(/*! ../internals/array-includes */ \"./node_modules/core-js-pure/internals/array-includes.js\").indexOf;\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js-pure/internals/hidden-keys.js\");\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-keys-internal.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-keys.js":
/*!************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-keys.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js-pure/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js-pure/internals/enum-bug-keys.js\");\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-keys.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-property-is-enumerable.js":
/*!******************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-property-is-enumerable.js ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-property-is-enumerable.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-set-prototype-of.js":
/*!************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-set-prototype-of.js ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ \"./node_modules/core-js-pure/internals/a-possible-prototype.js\");\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-set-prototype-of.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/object-to-string.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js-pure/internals/object-to-string.js ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ \"./node_modules/core-js-pure/internals/to-string-tag-support.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js-pure/internals/classof.js\");\n\n// `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/object-to-string.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/path.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js-pure/internals/path.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = {};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/path.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/perform.js":
/*!********************************************************!*\
!*** ./node_modules/core-js-pure/internals/perform.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/perform.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/promise-resolve.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js-pure/internals/promise-resolve.js ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\nvar newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js-pure/internals/new-promise-capability.js\");\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/promise-resolve.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/redefine-all.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js-pure/internals/redefine-all.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js-pure/internals/redefine.js\");\n\nmodule.exports = function (target, src, options) {\n for (var key in src) {\n if (options && options.unsafe && target[key]) target[key] = src[key];\n else redefine(target, key, src[key], options);\n } return target;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/redefine-all.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/redefine.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js-pure/internals/redefine.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\n\nmodule.exports = function (target, key, value, options) {\n if (options && options.enumerable) target[key] = value;\n else createNonEnumerableProperty(target, key, value);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/redefine.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/require-object-coercible.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js-pure/internals/require-object-coercible.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/require-object-coercible.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/set-global.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js-pure/internals/set-global.js ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/set-global.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/set-species.js":
/*!************************************************************!*\
!*** ./node_modules/core-js-pure/internals/set-species.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js-pure/internals/object-define-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/set-species.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/set-to-string-tag.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/set-to-string-tag.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ \"./node_modules/core-js-pure/internals/to-string-tag-support.js\");\nvar defineProperty = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js-pure/internals/object-define-property.js\").f;\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar toString = __webpack_require__(/*! ../internals/object-to-string */ \"./node_modules/core-js-pure/internals/object-to-string.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC, SET_METHOD) {\n if (it) {\n var target = STATIC ? it : it.prototype;\n if (!has(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {\n createNonEnumerableProperty(target, 'toString', toString);\n }\n }\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/set-to-string-tag.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/shared-key.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js-pure/internals/shared-key.js ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js-pure/internals/shared.js\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js-pure/internals/uid.js\");\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/shared-key.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/shared-store.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js-pure/internals/shared-store.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar setGlobal = __webpack_require__(/*! ../internals/set-global */ \"./node_modules/core-js-pure/internals/set-global.js\");\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/shared-store.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/shared.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js-pure/internals/shared.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js-pure/internals/shared-store.js\");\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.4',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/shared.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/species-constructor.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/species-constructor.js ***!
\********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js-pure/internals/an-object.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js-pure/internals/a-function.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/species-constructor.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/string-multibyte.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js-pure/internals/string-multibyte.js ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js-pure/internals/to-integer.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js-pure/internals/require-object-coercible.js\");\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/string-multibyte.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/task.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js-pure/internals/task.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js-pure/internals/classof-raw.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js-pure/internals/function-bind-context.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js-pure/internals/html.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js-pure/internals/document-create-element.js\");\nvar IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ \"./node_modules/core-js-pure/internals/engine-is-ios.js\");\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && !fails(post)) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/task.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-absolute-index.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-absolute-index.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js-pure/internals/to-integer.js\");\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-absolute-index.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-indexed-object.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-indexed-object.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ \"./node_modules/core-js-pure/internals/indexed-object.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js-pure/internals/require-object-coercible.js\");\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-indexed-object.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-integer.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-integer.js ***!
\***********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-integer.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-length.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-length.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js-pure/internals/to-integer.js\");\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-length.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-object.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-object.js ***!
\**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js-pure/internals/require-object-coercible.js\");\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-object.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-primitive.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-primitive.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-primitive.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/to-string-tag-support.js":
/*!**********************************************************************!*\
!*** ./node_modules/core-js-pure/internals/to-string-tag-support.js ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/to-string-tag-support.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/uid.js":
/*!****************************************************!*\
!*** ./node_modules/core-js-pure/internals/uid.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/uid.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/use-symbol-as-uid.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/use-symbol-as-uid.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ \"./node_modules/core-js-pure/internals/native-symbol.js\");\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/use-symbol-as-uid.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/internals/well-known-symbol.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/internals/well-known-symbol.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js-pure/internals/shared.js\");\nvar has = __webpack_require__(/*! ../internals/has */ \"./node_modules/core-js-pure/internals/has.js\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js-pure/internals/uid.js\");\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ \"./node_modules/core-js-pure/internals/native-symbol.js\");\nvar USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ \"./node_modules/core-js-pure/internals/use-symbol-as-uid.js\");\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/internals/well-known-symbol.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/es.array.iterator.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js-pure/modules/es.array.iterator.js ***!
\****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js-pure/internals/to-indexed-object.js\");\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js-pure/internals/add-to-unscopables.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js-pure/internals/iterators.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js-pure/internals/internal-state.js\");\nvar defineIterator = __webpack_require__(/*! ../internals/define-iterator */ \"./node_modules/core-js-pure/internals/define-iterator.js\");\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/es.array.iterator.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/es.object.to-string.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js-pure/modules/es.object.to-string.js ***!
\******************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("// empty\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/es.object.to-string.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/es.promise.all-settled.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js-pure/modules/es.promise.all-settled.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js-pure/internals/a-function.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js-pure/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js-pure/internals/perform.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js-pure/internals/iterate.js\");\n\n// `Promise.allSettled` method\n// https://github.com/tc39/proposal-promise-allSettled\n$({ target: 'Promise', stat: true }, {\n allSettled: function allSettled(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'fulfilled', value: value };\n --remaining || resolve(values);\n }, function (e) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'rejected', reason: e };\n --remaining || resolve(values);\n });\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/es.promise.all-settled.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/es.promise.finally.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js-pure/modules/es.promise.finally.js ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ \"./node_modules/core-js-pure/internals/native-promise-constructor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js-pure/internals/fails.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js-pure/internals/species-constructor.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js-pure/internals/promise-resolve.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js-pure/internals/redefine.js\");\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.github.io/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// patch native Promise.prototype for native async functions\nif (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {\n redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);\n}\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/es.promise.finally.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/es.promise.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js-pure/modules/es.promise.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js-pure/internals/is-pure.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\nvar NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ \"./node_modules/core-js-pure/internals/native-promise-constructor.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js-pure/internals/redefine.js\");\nvar redefineAll = __webpack_require__(/*! ../internals/redefine-all */ \"./node_modules/core-js-pure/internals/redefine-all.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js-pure/internals/set-to-string-tag.js\");\nvar setSpecies = __webpack_require__(/*! ../internals/set-species */ \"./node_modules/core-js-pure/internals/set-species.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js-pure/internals/is-object.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js-pure/internals/a-function.js\");\nvar anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js-pure/internals/an-instance.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js-pure/internals/classof-raw.js\");\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js-pure/internals/inspect-source.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js-pure/internals/iterate.js\");\nvar checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ \"./node_modules/core-js-pure/internals/check-correctness-of-iteration.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js-pure/internals/species-constructor.js\");\nvar task = __webpack_require__(/*! ../internals/task */ \"./node_modules/core-js-pure/internals/task.js\").set;\nvar microtask = __webpack_require__(/*! ../internals/microtask */ \"./node_modules/core-js-pure/internals/microtask.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js-pure/internals/promise-resolve.js\");\nvar hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ \"./node_modules/core-js-pure/internals/host-report-errors.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js-pure/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js-pure/internals/perform.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js-pure/internals/internal-state.js\");\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js-pure/internals/is-forced.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js-pure/internals/engine-v8-version.js\");\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = NativePromise;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = getBuiltIn('fetch');\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n if (!GLOBAL_CORE_JS_PROMISE) {\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (V8_VERSION === 66) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;\n }\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n return !(promise.then(function () { /* empty */ }) instanceof FakePromise);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n task.call(global, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n task.call(global, function () {\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function') {\n nativeThen = NativePromise.prototype.then;\n\n // wrap native Promise#then for native async functions\n redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // wrap fetch result\n if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input /* , init */) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/es.promise.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/es.string.iterator.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js-pure/modules/es.string.iterator.js ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar charAt = __webpack_require__(/*! ../internals/string-multibyte */ \"./node_modules/core-js-pure/internals/string-multibyte.js\").charAt;\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js-pure/internals/internal-state.js\");\nvar defineIterator = __webpack_require__(/*! ../internals/define-iterator */ \"./node_modules/core-js-pure/internals/define-iterator.js\");\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/es.string.iterator.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/esnext.aggregate-error.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js-pure/modules/esnext.aggregate-error.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js-pure/internals/descriptors.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js-pure/internals/object-get-prototype-of.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js-pure/internals/object-set-prototype-of.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js-pure/internals/object-create.js\");\nvar defineProperty = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js-pure/internals/object-define-property.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js-pure/internals/create-property-descriptor.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js-pure/internals/iterate.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js-pure/internals/internal-state.js\");\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalAggregateErrorState = InternalStateModule.getterFor('AggregateError');\n\nvar $AggregateError = function AggregateError(errors, message) {\n var that = this;\n if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message);\n if (setPrototypeOf) {\n that = setPrototypeOf(new Error(message), getPrototypeOf(that));\n }\n var errorsArray = [];\n iterate(errors, errorsArray.push, errorsArray);\n if (DESCRIPTORS) setInternalState(that, { errors: errorsArray, type: 'AggregateError' });\n else that.errors = errorsArray;\n if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message));\n return that;\n};\n\n$AggregateError.prototype = create(Error.prototype, {\n constructor: createPropertyDescriptor(5, $AggregateError),\n message: createPropertyDescriptor(5, ''),\n name: createPropertyDescriptor(5, 'AggregateError')\n});\n\nif (DESCRIPTORS) defineProperty.f($AggregateError.prototype, 'errors', {\n get: function () {\n return getInternalAggregateErrorState(this).errors;\n },\n configurable: true\n});\n\n$({ global: true }, {\n AggregateError: $AggregateError\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/esnext.aggregate-error.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/esnext.promise.all-settled.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js-pure/modules/esnext.promise.all-settled.js ***!
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ./es.promise.all-settled.js */ \"./node_modules/core-js-pure/modules/es.promise.all-settled.js\");\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/esnext.promise.all-settled.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/esnext.promise.any.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js-pure/modules/esnext.promise.any.js ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar aFunction = __webpack_require__(/*! ../internals/a-function */ \"./node_modules/core-js-pure/internals/a-function.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js-pure/internals/get-built-in.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js-pure/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js-pure/internals/perform.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js-pure/internals/iterate.js\");\n\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n// `Promise.any` method\n// https://github.com/tc39/proposal-promise-any\n$({ target: 'Promise', stat: true }, {\n any: function any(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aFunction(C.resolve);\n var errors = [];\n var counter = 0;\n var remaining = 1;\n var alreadyResolved = false;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyRejected = false;\n errors.push(undefined);\n remaining++;\n promiseResolve.call(C, promise).then(function (value) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyResolved = true;\n resolve(value);\n }, function (e) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyRejected = true;\n errors[index] = e;\n --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));\n });\n });\n --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/esnext.promise.any.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/esnext.promise.try.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js-pure/modules/esnext.promise.try.js ***!
\*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js-pure/internals/export.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js-pure/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js-pure/internals/perform.js\");\n\n// `Promise.try` method\n// https://github.com/tc39/proposal-promise-try\n$({ target: 'Promise', stat: true }, {\n 'try': function (callbackfn) {\n var promiseCapability = newPromiseCapabilityModule.f(this);\n var result = perform(callbackfn);\n (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);\n return promiseCapability.promise;\n }\n});\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/esnext.promise.try.js?");
/***/ }),
/***/ "./node_modules/core-js-pure/modules/web.dom-collections.iterator.js":
/*!***************************************************************************!*\
!*** ./node_modules/core-js-pure/modules/web.dom-collections.iterator.js ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("__webpack_require__(/*! ./es.array.iterator */ \"./node_modules/core-js-pure/modules/es.array.iterator.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js-pure/internals/dom-iterables.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js-pure/internals/global.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js-pure/internals/classof.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js-pure/internals/create-non-enumerable-property.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js-pure/internals/iterators.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js-pure/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n Iterators[COLLECTION_NAME] = Iterators.Array;\n}\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/core-js-pure/modules/web.dom-collections.iterator.js?");
/***/ }),
/***/ "./node_modules/tui-code-snippet/src/js/array.js":
/*!*******************************************************!*\
!*** ./node_modules/tui-code-snippet/src/js/array.js ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("/**\n * @fileoverview This module has some functions for handling array.\n * @author NHN.\n * FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar collection = __webpack_require__(/*! ./collection */ \"./node_modules/tui-code-snippet/src/js/collection.js\");\nvar type = __webpack_require__(/*! ./type */ \"./node_modules/tui-code-snippet/src/js/type.js\");\n\nvar aps = Array.prototype.slice;\nvar util;\n\n/**\n * Generate an integer Array containing an arithmetic progression.\n * @param {number} start - start index\n * @param {number} stop - stop index\n * @param {number} step - next visit index = current index + step\n * @returns {Array}\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * util.range(5); // [0, 1, 2, 3, 4]\n * util.range(1, 5); // [1,2,3,4]\n * util.range(2, 10, 2); // [2,4,6,8]\n * util.range(10, 2, -2); // [10,8,6,4]\n */\nvar range = function(start, stop, step) {\n var arr = [];\n var flag;\n\n if (type.isUndefined(stop)) {\n stop = start || 0;\n start = 0;\n }\n\n step = step || 1;\n flag = step < 0 ? -1 : 1;\n stop *= flag;\n\n for (; start * flag < stop; start += step) {\n arr.push(start);\n }\n\n return arr;\n};\n\n/* eslint-disable valid-jsdoc */\n/**\n * Zip together multiple lists into a single array\n * @param {...Array}\n * @returns {Array}\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var result = util.zip([1, 2, 3], ['a', 'b','c'], [true, false, true]);\n * console.log(result[0]); // [1, 'a', true]\n * console.log(result[1]); // [2, 'b', false]\n * console.log(result[2]); // [3, 'c', true]\n */\nvar zip = function() {/* eslint-enable valid-jsdoc */\n var arr2d = aps.call(arguments);\n var result = [];\n\n collection.forEach(arr2d, function(arr) {\n collection.forEach(arr, function(value, index) {\n if (!result[index]) {\n result[index] = [];\n }\n result[index].push(value);\n });\n });\n\n return result;\n};\n\n/**\n * Returns the first index at which a given element can be found in the array\n * from start index(default 0), or -1 if it is not present.<br>\n * It compares searchElement to elements of the Array using strict equality\n * (the same method used by the ===, or triple-equals, operator).\n * @param {*} searchElement Element to locate in the array\n * @param {Array} array Array that will be traversed.\n * @param {number} startIndex Start index in array for searching (default 0)\n * @returns {number} the First index at which a given element, or -1 if it is not present\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var arr = ['one', 'two', 'three', 'four'];\n * var idx1 = util.inArray('one', arr, 3); // -1\n * var idx2 = util.inArray('one', arr); // 0\n */\nvar inArray = function(searchElement, array, startIndex) {\n var i;\n var length;\n startIndex = startIndex || 0;\n\n if (!type.isArray(array)) {\n return -1;\n }\n\n if (Array.prototype.indexOf) {\n return Array.prototype.indexOf.call(array, searchElement, startIndex);\n }\n\n length = array.length;\n for (i = startIndex; startIndex >= 0 && i < length; i += 1) {\n if (array[i] === searchElement) {\n return i;\n }\n }\n\n return -1;\n};\n\nutil = {\n inArray: inArray,\n range: range,\n zip: zip\n};\n\nmodule.exports = util;\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/tui-code-snippet/src/js/array.js?");
/***/ }),
/***/ "./node_modules/tui-code-snippet/src/js/collection.js":
/*!************************************************************!*\
!*** ./node_modules/tui-code-snippet/src/js/collection.js ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("/**\n * @fileoverview This module has some functions for handling object as collection.\n * @author NHN.\n * FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar type = __webpack_require__(/*! ./type */ \"./node_modules/tui-code-snippet/src/js/type.js\");\nvar object = __webpack_require__(/*! ./object */ \"./node_modules/tui-code-snippet/src/js/object.js\");\n\n/**\n * Execute the provided callback once for each element present\n * in the array(or Array-like object) in ascending order.<br>\n * If the callback function returns false, the loop will be stopped.<br>\n * Callback function(iteratee) is invoked with three arguments:\n * - The value of the element\n * - The index of the element\n * - The array(or Array-like object) being traversed\n * @param {Array} arr The array(or Array-like object) that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var sum = 0;\n *\n * util.forEachArray([1,2,3], function(value){\n * sum += value;\n * });\n * alert(sum); // 6\n */\nfunction forEachArray(arr, iteratee, context) {\n var index = 0;\n var len = arr.length;\n\n context = context || null;\n\n for (; index < len; index += 1) {\n if (iteratee.call(context, arr[index], index, arr) === false) {\n break;\n }\n }\n}\n\n/**\n * Execute the provided callback once for each property of object which actually exist.<br>\n * If the callback function returns false, the loop will be stopped.<br>\n * Callback function(iteratee) is invoked with three arguments:\n * - The value of the property\n * - The name of the property\n * - The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var sum = 0;\n *\n * util.forEachOwnProperties({a:1,b:2,c:3}, function(value){\n * sum += value;\n * });\n * alert(sum); // 6\n **/\nfunction forEachOwnProperties(obj, iteratee, context) {\n var key;\n\n context = context || null;\n\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (iteratee.call(context, obj[key], key, obj) === false) {\n break;\n }\n }\n }\n}\n\n/**\n * Execute the provided callback once for each property of object(or element of array) which actually exist.<br>\n * If the object is Array-like object(ex-arguments object), It needs to transform to Array.(see 'ex2' of example).<br>\n * If the callback function returns false, the loop will be stopped.<br>\n * Callback function(iteratee) is invoked with three arguments:\n * - The value of the property(or The value of the element)\n * - The name of the property(or The index of the element)\n * - The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var sum = 0;\n *\n * util.forEach([1,2,3], function(value){\n * sum += value;\n * });\n * alert(sum); // 6\n *\n * // In case of Array-like object\n * var array = Array.prototype.slice.call(arrayLike); // change to array\n * util.forEach(array, function(value){\n * sum += value;\n * });\n */\nfunction forEach(obj, iteratee, context) {\n if (type.isArray(obj)) {\n forEachArray(obj, iteratee, context);\n } else {\n forEachOwnProperties(obj, iteratee, context);\n }\n}\n\n/**\n * Execute the provided callback function once for each element in an array, in order,\n * and constructs a new array from the results.<br>\n * If the object is Array-like object(ex-arguments object),\n * It needs to transform to Array.(see 'ex2' of forEach example)<br>\n * Callback function(iteratee) is invoked with three arguments:\n * - The value of the property(or The value of the element)\n * - The name of the property(or The index of the element)\n * - The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @returns {Array} A new array composed of returned values from callback function\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var result = util.map([0,1,2,3], function(value) {\n * return value + 1;\n * });\n *\n * alert(result); // 1,2,3,4\n */\nfunction map(obj, iteratee, context) {\n var resultArray = [];\n\n context = context || null;\n\n forEach(obj, function() {\n resultArray.push(iteratee.apply(context, arguments));\n });\n\n return resultArray;\n}\n\n/**\n * Execute the callback function once for each element present in the array(or Array-like object or plain object).<br>\n * If the object is Array-like object(ex-arguments object),\n * It needs to transform to Array.(see 'ex2' of forEach example)<br>\n * Callback function(iteratee) is invoked with four arguments:\n * - The previousValue\n * - The currentValue\n * - The index\n * - The object being traversed\n * @param {Object} obj The object that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @returns {*} The result value\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var result = util.reduce([0,1,2,3], function(stored, value) {\n * return stored + value;\n * });\n *\n * alert(result); // 6\n */\nfunction reduce(obj, iteratee, context) {\n var index = 0;\n var keys, length, store;\n\n context = context || null;\n\n if (!type.isArray(obj)) {\n keys = object.keys(obj);\n length = keys.length;\n store = obj[keys[index += 1]];\n } else {\n length = obj.length;\n store = obj[index];\n }\n\n index += 1;\n for (; index < length; index += 1) {\n store = iteratee.call(context, store, obj[keys ? keys[index] : index]);\n }\n\n return store;\n}\n\n/**\n * Transform the Array-like object to Array.<br>\n * In low IE (below 8), Array.prototype.slice.call is not perfect. So, try-catch statement is used.\n * @param {*} arrayLike Array-like object\n * @returns {Array} Array\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var arrayLike = {\n * 0: 'one',\n * 1: 'two',\n * 2: 'three',\n * 3: 'four',\n * length: 4\n * };\n * var result = util.toArray(arrayLike);\n *\n * alert(result instanceof Array); // true\n * alert(result); // one,two,three,four\n */\nfunction toArray(arrayLike) {\n var arr;\n try {\n arr = Array.prototype.slice.call(arrayLike);\n } catch (e) {\n arr = [];\n forEachArray(arrayLike, function(value) {\n arr.push(value);\n });\n }\n\n return arr;\n}\n\n/**\n * Create a new array or plain object with all elements(or properties)\n * that pass the test implemented by the provided function.<br>\n * Callback function(iteratee) is invoked with three arguments:\n * - The value of the property(or The value of the element)\n * - The name of the property(or The index of the element)\n * - The object being traversed\n * @param {Object} obj Object(plain object or Array) that will be traversed\n * @param {function} iteratee Callback function\n * @param {Object} [context] Context(this) of callback function\n * @returns {Object} plain object or Array\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var result1 = util.filter([0,1,2,3], function(value) {\n * return (value % 2 === 0);\n * });\n * alert(result1); // [0, 2]\n *\n * var result2 = util.filter({a : 1, b: 2, c: 3}, function(value) {\n * return (value % 2 !== 0);\n * });\n * alert(result2.a); // 1\n * alert(result2.b); // undefined\n * alert(result2.c); // 3\n */\nfunction filter(obj, iteratee, context) {\n var result, add;\n\n context = context || null;\n\n if (!type.isObject(obj) || !type.isFunction(iteratee)) {\n throw new Error('wrong parameter');\n }\n\n if (type.isArray(obj)) {\n result = [];\n add = function(subResult, args) {\n subResult.push(args[0]);\n };\n } else {\n result = {};\n add = function(subResult, args) {\n subResult[args[1]] = args[0];\n };\n }\n\n forEach(obj, function() {\n if (iteratee.apply(context, arguments)) {\n add(result, arguments);\n }\n }, context);\n\n return result;\n}\n\n/**\n * fetching a property\n * @param {Array} arr target collection\n * @param {String|Number} property property name\n * @returns {Array}\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var objArr = [\n * {'abc': 1, 'def': 2, 'ghi': 3},\n * {'abc': 4, 'def': 5, 'ghi': 6},\n * {'abc': 7, 'def': 8, 'ghi': 9}\n * ];\n * var arr2d = [\n * [1, 2, 3],\n * [4, 5, 6],\n * [7, 8, 9]\n * ];\n * util.pluck(objArr, 'abc'); // [1, 4, 7]\n * util.pluck(arr2d, 2); // [3, 6, 9]\n */\nfunction pluck(arr, property) {\n var result = map(arr, function(item) {\n return item[property];\n });\n\n return result;\n}\n\nmodule.exports = {\n forEachOwnProperties: forEachOwnProperties,\n forEachArray: forEachArray,\n forEach: forEach,\n toArray: toArray,\n map: map,\n reduce: reduce,\n filter: filter,\n pluck: pluck\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/tui-code-snippet/src/js/collection.js?");
/***/ }),
/***/ "./node_modules/tui-code-snippet/src/js/object.js":
/*!********************************************************!*\
!*** ./node_modules/tui-code-snippet/src/js/object.js ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("/**\n * @fileoverview This module has some functions for handling a plain object, json.\n * @author NHN.\n * FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar type = __webpack_require__(/*! ./type */ \"./node_modules/tui-code-snippet/src/js/type.js\");\nvar array = __webpack_require__(/*! ./array */ \"./node_modules/tui-code-snippet/src/js/array.js\");\n\n/**\n * The last id of stamp\n * @type {number}\n * @private\n */\nvar lastId = 0;\n\n/**\n * Extend the target object from other objects.\n * @param {object} target - Object that will be extended\n * @param {...object} objects - Objects as sources\n * @returns {object} Extended object\n * @memberof tui.util\n */\nfunction extend(target, objects) { // eslint-disable-line no-unused-vars\n var hasOwnProp = Object.prototype.hasOwnProperty;\n var source, prop, i, len;\n\n for (i = 1, len = arguments.length; i < len; i += 1) {\n source = arguments[i];\n for (prop in source) {\n if (hasOwnProp.call(source, prop)) {\n target[prop] = source[prop];\n }\n }\n }\n\n return target;\n}\n\n/**\n * Assign a unique id to an object\n * @param {object} obj - Object that will be assigned id.\n * @returns {number} Stamped id\n * @memberof tui.util\n */\nfunction stamp(obj) {\n if (!obj.__fe_id) {\n lastId += 1;\n obj.__fe_id = lastId; // eslint-disable-line camelcase\n }\n\n return obj.__fe_id;\n}\n\n/**\n * Verify whether an object has a stamped id or not.\n * @param {object} obj - adjusted object\n * @returns {boolean}\n * @memberof tui.util\n */\nfunction hasStamp(obj) {\n return type.isExisty(pick(obj, '__fe_id'));\n}\n\n/**\n * Reset the last id of stamp\n * @private\n */\nfunction resetLastId() {\n lastId = 0;\n}\n\n/**\n * Return a key-list(array) of a given object\n * @param {object} obj - Object from which a key-list will be extracted\n * @returns {Array} A key-list(array)\n * @memberof tui.util\n */\nfunction keys(obj) {\n var keyArray = [];\n var key;\n\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n keyArray.push(key);\n }\n }\n\n return keyArray;\n}\n\n/**\n * Return the equality for multiple objects(jsonObjects).<br>\n * See {@link http://stackoverflow.com/questions/1068834/object-comparison-in-javascript}\n * @param {...object} object - Multiple objects for comparing.\n * @returns {boolean} Equality\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var jsonObj1 = {name:'milk', price: 1000};\n * var jsonObj2 = {name:'milk', price: 1000};\n * var jsonObj3 = {name:'milk', price: 1000};\n * util.compareJSON(jsonObj1, jsonObj2, jsonObj3); // true\n *\n * var jsonObj4 = {name:'milk', price: 1000};\n * var jsonObj5 = {name:'beer', price: 3000};\n * util.compareJSON(jsonObj4, jsonObj5); // false\n */\nfunction compareJSON(object) {\n var argsLen = arguments.length;\n var i = 1;\n\n if (argsLen < 1) {\n return true;\n }\n\n for (; i < argsLen; i += 1) {\n if (!isSameObject(object, arguments[i])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * @param {*} x - object to compare\n * @param {*} y - object to compare\n * @returns {boolean} - whether object x and y is same or not\n * @private\n */\nfunction isSameObject(x, y) { // eslint-disable-line complexity\n var leftChain = [];\n var rightChain = [];\n var p;\n\n // remember that NaN === NaN returns false\n // and isNaN(undefined) returns true\n if (isNaN(x) &&\n isNaN(y) &&\n type.isNumber(x) &&\n type.isNumber(y)) {\n return true;\n }\n\n // Compare primitives and functions.\n // Check if both arguments link to the same object.\n // Especially useful on step when comparing prototypes\n if (x === y) {\n return true;\n }\n\n // Works in case when functions are created in constructor.\n // Comparing dates is a common scenario. Another built-ins?\n // We can even handle functions passed across iframes\n if ((type.isFunction(x) && type.isFunction(y)) ||\n (x instanceof Date && y instanceof Date) ||\n (x instanceof RegExp && y instanceof RegExp) ||\n (x instanceof String && y instanceof String) ||\n (x instanceof Number && y instanceof Number)) {\n return x.toString() === y.toString();\n }\n\n // At last checking prototypes as good a we can\n if (!(x instanceof Object && y instanceof Object)) {\n return false;\n }\n\n if (x.isPrototypeOf(y) ||\n y.isPrototypeOf(x) ||\n x.constructor !== y.constructor ||\n x.prototype !== y.prototype) {\n return false;\n }\n\n // check for infinitive linking loops\n if (array.inArray(x, leftChain) > -1 ||\n array.inArray(y, rightChain) > -1) {\n return false;\n }\n\n // Quick checking of one object beeing a subset of another.\n for (p in y) {\n if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {\n return false;\n } else if (typeof y[p] !== typeof x[p]) {\n return false;\n }\n }\n\n // This for loop executes comparing with hasOwnProperty() and typeof for each property in 'x' object,\n // and verifying equality for x[property] and y[property].\n for (p in x) {\n if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {\n return false;\n } else if (typeof y[p] !== typeof x[p]) {\n return false;\n }\n\n if (typeof (x[p]) === 'object' || typeof (x[p]) === 'function') {\n leftChain.push(x);\n rightChain.push(y);\n\n if (!isSameObject(x[p], y[p])) {\n return false;\n }\n\n leftChain.pop();\n rightChain.pop();\n } else if (x[p] !== y[p]) {\n return false;\n }\n }\n\n return true;\n}\n/* eslint-enable complexity */\n\n/**\n * Retrieve a nested item from the given object/array\n * @param {object|Array} obj - Object for retrieving\n * @param {...string|number} paths - Paths of property\n * @returns {*} Value\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * var obj = {\n * 'key1': 1,\n * 'nested' : {\n * 'key1': 11,\n * 'nested': {\n * 'key1': 21\n * }\n * }\n * };\n * util.pick(obj, 'nested', 'nested', 'key1'); // 21\n * util.pick(obj, 'nested', 'nested', 'key2'); // undefined\n *\n * var arr = ['a', 'b', 'c'];\n * util.pick(arr, 1); // 'b'\n */\nfunction pick(obj, paths) { // eslint-disable-line no-unused-vars\n var args = arguments;\n var target = args[0];\n var i = 1;\n var length = args.length;\n\n for (; i < length; i += 1) {\n if (type.isUndefined(target) ||\n type.isNull(target)) {\n return;\n }\n\n target = target[args[i]];\n }\n\n return target; // eslint-disable-line consistent-return\n}\n\nmodule.exports = {\n extend: extend,\n stamp: stamp,\n hasStamp: hasStamp,\n resetLastId: resetLastId,\n keys: Object.prototype.keys || keys,\n compareJSON: compareJSON,\n pick: pick\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/tui-code-snippet/src/js/object.js?");
/***/ }),
/***/ "./node_modules/tui-code-snippet/src/js/type.js":
/*!******************************************************!*\
!*** ./node_modules/tui-code-snippet/src/js/type.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("/**\n * @fileoverview This module provides some functions to check the type of variable\n * @author NHN.\n * FE Development Lab <dl_javascript@nhn.com>\n */\n\n\n\nvar toString = Object.prototype.toString;\n\n/**\n * Check whether the given variable is existing or not.<br>\n * If the given variable is not null and not undefined, returns true.\n * @param {*} param - Target for checking\n * @returns {boolean} Is existy?\n * @memberof tui.util\n * @example\n * //-- #1. Get Module --//\n * var util = require('tui-code-snippet'); // node, commonjs\n * var util = tui.util; // distribution file\n *\n * //-- #2. Use property --//\n * util.isExisty(''); //true\n * util.isExisty(0); //true\n * util.isExisty([]); //true\n * util.isExisty({}); //true\n * util.isExisty(null); //false\n * util.isExisty(undefined); //false\n*/\nfunction isExisty(param) {\n return !isUndefined(param) && !isNull(param);\n}\n\n/**\n * Check whether the given variable is undefined or not.<br>\n * If the given variable is undefined, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is undefined?\n * @memberof tui.util\n */\nfunction isUndefined(obj) {\n return obj === undefined; // eslint-disable-line no-undefined\n}\n\n/**\n * Check whether the given variable is null or not.<br>\n * If the given variable(arguments[0]) is null, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is null?\n * @memberof tui.util\n */\nfunction isNull(obj) {\n return obj === null;\n}\n\n/**\n * Check whether the given variable is truthy or not.<br>\n * If the given variable is not null or not undefined or not false, returns true.<br>\n * (It regards 0 as true)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is truthy?\n * @memberof tui.util\n */\nfunction isTruthy(obj) {\n return isExisty(obj) && obj !== false;\n}\n\n/**\n * Check whether the given variable is falsy or not.<br>\n * If the given variable is null or undefined or false, returns true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is falsy?\n * @memberof tui.util\n */\nfunction isFalsy(obj) {\n return !isTruthy(obj);\n}\n\n/**\n * Check whether the given variable is an arguments object or not.<br>\n * If the given variable is an arguments object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is arguments?\n * @memberof tui.util\n */\nfunction isArguments(obj) {\n var result = isExisty(obj) &&\n ((toString.call(obj) === '[object Arguments]') || !!obj.callee);\n\n return result;\n}\n\n/**\n * Check whether the given variable is an instance of Array or not.<br>\n * If the given variable is an instance of Array, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is array instance?\n * @memberof tui.util\n */\nfunction isArray(obj) {\n return obj instanceof Array;\n}\n\n/**\n * Check whether the given variable is an object or not.<br>\n * If the given variable is an object, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is object?\n * @memberof tui.util\n */\nfunction isObject(obj) {\n return obj === Object(obj);\n}\n\n/**\n * Check whether the given variable is a function or not.<br>\n * If the given variable is a function, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is function?\n * @memberof tui.util\n */\nfunction isFunction(obj) {\n return obj instanceof Function;\n}\n\n/**\n * Check whether the given variable is a number or not.<br>\n * If the given variable is a number, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is number?\n * @memberof tui.util\n */\nfunction isNumber(obj) {\n return typeof obj === 'number' || obj instanceof Number;\n}\n\n/**\n * Check whether the given variable is a string or not.<br>\n * If the given variable is a string, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is string?\n * @memberof tui.util\n */\nfunction isString(obj) {\n return typeof obj === 'string' || obj instanceof String;\n}\n\n/**\n * Check whether the given variable is a boolean or not.<br>\n * If the given variable is a boolean, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is boolean?\n * @memberof tui.util\n */\nfunction isBoolean(obj) {\n return typeof obj === 'boolean' || obj instanceof Boolean;\n}\n\n/**\n * Check whether the given variable is an instance of Array or not.<br>\n * If the given variable is an instance of Array, return true.<br>\n * (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of array?\n * @memberof tui.util\n */\nfunction isArraySafe(obj) {\n return toString.call(obj) === '[object Array]';\n}\n\n/**\n * Check whether the given variable is a function or not.<br>\n * If the given variable is a function, return true.<br>\n * (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a function?\n * @memberof tui.util\n */\nfunction isFunctionSafe(obj) {\n return toString.call(obj) === '[object Function]';\n}\n\n/**\n * Check whether the given variable is a number or not.<br>\n * If the given variable is a number, return true.<br>\n * (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a number?\n * @memberof tui.util\n */\nfunction isNumberSafe(obj) {\n return toString.call(obj) === '[object Number]';\n}\n\n/**\n * Check whether the given variable is a string or not.<br>\n * If the given variable is a string, return true.<br>\n * (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a string?\n * @memberof tui.util\n */\nfunction isStringSafe(obj) {\n return toString.call(obj) === '[object String]';\n}\n\n/**\n * Check whether the given variable is a boolean or not.<br>\n * If the given variable is a boolean, return true.<br>\n * (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is a boolean?\n * @memberof tui.util\n */\nfunction isBooleanSafe(obj) {\n return toString.call(obj) === '[object Boolean]';\n}\n\n/**\n * Check whether the given variable is a instance of HTMLNode or not.<br>\n * If the given variables is a instance of HTMLNode, return true.\n * @param {*} html - Target for checking\n * @returns {boolean} Is HTMLNode ?\n * @memberof tui.util\n */\nfunction isHTMLNode(html) {\n if (typeof HTMLElement === 'object') {\n return (html && (html instanceof HTMLElement || !!html.nodeType));\n }\n\n return !!(html && html.nodeType);\n}\n\n/**\n * Check whether the given variable is a HTML tag or not.<br>\n * If the given variables is a HTML tag, return true.\n * @param {*} html - Target for checking\n * @returns {Boolean} Is HTML tag?\n * @memberof tui.util\n */\nfunction isHTMLTag(html) {\n if (typeof HTMLElement === 'object') {\n return (html && (html instanceof HTMLElement));\n }\n\n return !!(html && html.nodeType && html.nodeType === 1);\n}\n\n/**\n * Check whether the given variable is empty(null, undefined, or empty array, empty object) or not.<br>\n * If the given variables is empty, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is empty?\n * @memberof tui.util\n */\nfunction isEmpty(obj) {\n if (!isExisty(obj) || _isEmptyString(obj)) {\n return true;\n }\n\n if (isArray(obj) || isArguments(obj)) {\n return obj.length === 0;\n }\n\n if (isObject(obj) && !isFunction(obj)) {\n return !_hasOwnProperty(obj);\n }\n\n return true;\n}\n\n/**\n * Check whether given argument is empty string\n * @param {*} obj - Target for checking\n * @returns {boolean} whether given argument is empty string\n * @memberof tui.util\n * @private\n */\nfunction _isEmptyString(obj) {\n return isString(obj) && obj === '';\n}\n\n/**\n * Check whether given argument has own property\n * @param {Object} obj - Target for checking\n * @returns {boolean} - whether given argument has own property\n * @memberof tui.util\n * @private\n */\nfunction _hasOwnProperty(obj) {\n var key;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Check whether the given variable is not empty\n * (not null, not undefined, or not empty array, not empty object) or not.<br>\n * If the given variables is not empty, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is not empty?\n * @memberof tui.util\n */\nfunction isNotEmpty(obj) {\n return !isEmpty(obj);\n}\n\n/**\n * Check whether the given variable is an instance of Date or not.<br>\n * If the given variables is an instance of Date, return true.\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of Date?\n * @memberof tui.util\n */\nfunction isDate(obj) {\n return obj instanceof Date;\n}\n\n/**\n * Check whether the given variable is an instance of Date or not.<br>\n * If the given variables is an instance of Date, return true.<br>\n * (It is used for multiple frame environments)\n * @param {*} obj - Target for checking\n * @returns {boolean} Is an instance of Date?\n * @memberof tui.util\n */\nfunction isDateSafe(obj) {\n return toString.call(obj) === '[object Date]';\n}\n\nmodule.exports = {\n isExisty: isExisty,\n isUndefined: isUndefined,\n isNull: isNull,\n isTruthy: isTruthy,\n isFalsy: isFalsy,\n isArguments: isArguments,\n isArray: isArray,\n isArraySafe: isArraySafe,\n isObject: isObject,\n isFunction: isFunction,\n isFunctionSafe: isFunctionSafe,\n isNumber: isNumber,\n isNumberSafe: isNumberSafe,\n isDate: isDate,\n isDateSafe: isDateSafe,\n isString: isString,\n isStringSafe: isStringSafe,\n isBoolean: isBoolean,\n isBooleanSafe: isBooleanSafe,\n isHTMLNode: isHTMLNode,\n isHTMLTag: isHTMLTag,\n isEmpty: isEmpty,\n isNotEmpty: isNotEmpty\n};\n\n\n//# sourceURL=webpack://tui.ImageEditor/./node_modules/tui-code-snippet/src/js/type.js?");
/***/ }),
/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
!*** (webpack)/buildin/global.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://tui.ImageEditor/(webpack)/buildin/global.js?");
/***/ }),
/***/ "./src/css/index.styl":
/*!****************************!*\
!*** ./src/css/index.styl ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://tui.ImageEditor/./src/css/index.styl?");
/***/ }),
/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n__webpack_require__(/*! ./js/polyfill */ \"./src/js/polyfill.js\");\n\nvar _imageEditor = __webpack_require__(/*! ./js/imageEditor */ \"./src/js/imageEditor.js\");\n\nvar _imageEditor2 = _interopRequireDefault(_imageEditor);\n\n__webpack_require__(/*! ./css/index.styl */ \"./src/css/index.styl\");\n\n__webpack_require__(/*! ./js/command/addIcon */ \"./src/js/command/addIcon.js\");\n\n__webpack_require__(/*! ./js/command/addImageObject */ \"./src/js/command/addImageObject.js\");\n\n__webpack_require__(/*! ./js/command/addObject */ \"./src/js/command/addObject.js\");\n\n__webpack_require__(/*! ./js/command/addShape */ \"./src/js/command/addShape.js\");\n\n__webpack_require__(/*! ./js/command/addText */ \"./src/js/command/addText.js\");\n\n__webpack_require__(/*! ./js/command/applyFilter */ \"./src/js/command/applyFilter.js\");\n\n__webpack_require__(/*! ./js/command/changeIconColor */ \"./src/js/command/changeIconColor.js\");\n\n__webpack_require__(/*! ./js/command/changeShape */ \"./src/js/command/changeShape.js\");\n\n__webpack_require__(/*! ./js/command/changeText */ \"./src/js/command/changeText.js\");\n\n__webpack_require__(/*! ./js/command/changeTextStyle */ \"./src/js/command/changeTextStyle.js\");\n\n__webpack_require__(/*! ./js/command/clearObjects */ \"./src/js/command/clearObjects.js\");\n\n__webpack_require__(/*! ./js/command/flip */ \"./src/js/command/flip.js\");\n\n__webpack_require__(/*! ./js/command/loadImage */ \"./src/js/command/loadImage.js\");\n\n__webpack_require__(/*! ./js/command/removeFilter */ \"./src/js/command/removeFilter.js\");\n\n__webpack_require__(/*! ./js/command/removeObject */ \"./src/js/command/removeObject.js\");\n\n__webpack_require__(/*! ./js/command/resizeCanvasDimension */ \"./src/js/command/resizeCanvasDimension.js\");\n\n__webpack_require__(/*! ./js/command/rotate */ \"./src/js/command/rotate.js\");\n\n__webpack_require__(/*! ./js/command/setObjectProperties */ \"./src/js/command/setObjectProperties.js\");\n\n__webpack_require__(/*! ./js/command/setObjectPosition */ \"./src/js/command/setObjectPosition.js\");\n\n__webpack_require__(/*! ./js/command/changeSelection */ \"./src/js/command/changeSelection.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// commands\nmodule.exports = _imageEditor2.default;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/index.js?");
/***/ }),
/***/ "./src/js/action.js":
/*!**************************!*\
!*** ./src/js/action.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _util = __webpack_require__(/*! ./util */ \"./src/js/util.js\");\n\nvar _imagetracer = __webpack_require__(/*! ./helper/imagetracer */ \"./src/js/helper/imagetracer.js\");\n\nvar _imagetracer2 = _interopRequireDefault(_imagetracer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n /**\n * Get ui actions\n * @returns {Object} actions for ui\n * @private\n */\n getActions: function getActions() {\n return {\n main: this._mainAction(),\n shape: this._shapeAction(),\n crop: this._cropAction(),\n flip: this._flipAction(),\n rotate: this._rotateAction(),\n text: this._textAction(),\n mask: this._maskAction(),\n draw: this._drawAction(),\n icon: this._iconAction(),\n filter: this._filterAction()\n };\n },\n\n\n /**\n * Main Action\n * @returns {Object} actions for ui main\n * @private\n */\n _mainAction: function _mainAction() {\n var _this = this;\n\n var exitCropOnAction = function exitCropOnAction() {\n if (_this.ui.submenu === 'crop') {\n _this.stopDrawingMode();\n _this.ui.changeMenu('crop');\n }\n };\n var setAngleRangeBarOnAction = function setAngleRangeBarOnAction(angle) {\n if (_this.ui.submenu === 'rotate') {\n _this.ui.rotate.setRangeBarAngle('setAngle', angle);\n }\n };\n var setFilterStateRangeBarOnAction = function setFilterStateRangeBarOnAction(filterOptions) {\n if (_this.ui.submenu === 'filter') {\n _this.ui.filter.setFilterState(filterOptions);\n }\n };\n var onEndUndoRedo = function onEndUndoRedo(result) {\n setAngleRangeBarOnAction(result);\n setFilterStateRangeBarOnAction(result);\n\n return result;\n };\n\n return (0, _tuiCodeSnippet.extend)({\n initLoadImage: function initLoadImage(imagePath, imageName) {\n return _this.loadImageFromURL(imagePath, imageName).then(function (sizeValue) {\n exitCropOnAction();\n _this.ui.initializeImgUrl = imagePath;\n _this.ui.resizeEditor({ imageSize: sizeValue });\n _this.clearUndoStack();\n });\n },\n undo: function undo() {\n if (!_this.isEmptyUndoStack()) {\n exitCropOnAction();\n _this.deactivateAll();\n _this.undo().then(onEndUndoRedo);\n }\n },\n redo: function redo() {\n if (!_this.isEmptyRedoStack()) {\n exitCropOnAction();\n _this.deactivateAll();\n _this.redo().then(onEndUndoRedo);\n }\n },\n reset: function reset() {\n exitCropOnAction();\n _this.loadImageFromURL(_this.ui.initializeImgUrl, 'resetImage').then(function (sizeValue) {\n exitCropOnAction();\n _this.ui.resizeEditor({ imageSize: sizeValue });\n _this.clearUndoStack();\n });\n },\n delete: function _delete() {\n _this.ui.changeHelpButtonEnabled('delete', false);\n exitCropOnAction();\n _this.removeActiveObject();\n _this.activeObjectId = null;\n },\n deleteAll: function deleteAll() {\n exitCropOnAction();\n _this.clearObjects();\n _this.ui.changeHelpButtonEnabled('delete', false);\n _this.ui.changeHelpButtonEnabled('deleteAll', false);\n },\n load: function load(file) {\n if (!(0, _util.isSupportFileApi)()) {\n alert('This browser does not support file-api');\n }\n\n _this.ui.initializeImgUrl = URL.createObjectURL(file);\n _this.loadImageFromFile(file).then(function (sizeValue) {\n exitCropOnAction();\n _this.clearUndoStack();\n _this.ui.activeMenuEvent();\n _this.ui.resizeEditor({ imageSize: sizeValue });\n })['catch'](function (message) {\n return Promise.reject(message);\n });\n },\n download: function download() {\n var dataURL = _this.toDataURL();\n var imageName = _this.getImageName();\n var blob = void 0,\n type = void 0,\n w = void 0;\n\n if ((0, _util.isSupportFileApi)() && window.saveAs) {\n blob = (0, _util.base64ToBlob)(dataURL);\n type = blob.type.split('/')[1];\n if (imageName.split('.').pop() !== type) {\n imageName += '.' + type;\n }\n saveAs(blob, imageName); // eslint-disable-line\n } else {\n w = window.open();\n w.document.body.innerHTML = '<img src=\\'' + dataURL + '\\'>';\n }\n }\n }, this._commonAction());\n },\n\n\n /**\n * Icon Action\n * @returns {Object} actions for ui icon\n * @private\n */\n _iconAction: function _iconAction() {\n var _this2 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n changeColor: function changeColor(color) {\n if (_this2.activeObjectId) {\n _this2.changeIconColor(_this2.activeObjectId, color);\n }\n },\n addIcon: function addIcon(iconType, iconColor) {\n _this2.startDrawingMode('ICON');\n _this2.setDrawingIcon(iconType, iconColor);\n },\n cancelAddIcon: function cancelAddIcon() {\n _this2.ui.icon.clearIconType();\n _this2.changeSelectableAll(true);\n _this2.changeCursor('default');\n _this2.stopDrawingMode();\n },\n registDefalutIcons: function registDefalutIcons(type, path) {\n var iconObj = {};\n iconObj[type] = path;\n _this2.registerIcons(iconObj);\n },\n registCustomIcon: function registCustomIcon(imgUrl, file) {\n var imagetracer = new _imagetracer2.default();\n imagetracer.imageToSVG(imgUrl, function (svgstr) {\n var _svgstr$match = svgstr.match(/path[^>]*d=\"([^\"]*)\"/),\n svgPath = _svgstr$match[1];\n\n var iconObj = {};\n iconObj[file.name] = svgPath;\n _this2.registerIcons(iconObj);\n _this2.addIcon(file.name, {\n left: 100,\n top: 100\n });\n }, _imagetracer2.default.tracerDefaultOption());\n }\n }, this._commonAction());\n },\n\n\n /**\n * Draw Action\n * @returns {Object} actions for ui draw\n * @private\n */\n _drawAction: function _drawAction() {\n var _this3 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n setDrawMode: function setDrawMode(type, settings) {\n _this3.stopDrawingMode();\n if (type === 'free') {\n _this3.startDrawingMode('FREE_DRAWING', settings);\n } else {\n _this3.startDrawingMode('LINE_DRAWING', settings);\n }\n },\n setColor: function setColor(color) {\n _this3.setBrush({\n color: color\n });\n }\n }, this._commonAction());\n },\n\n\n /**\n * Mask Action\n * @returns {Object} actions for ui mask\n * @private\n */\n _maskAction: function _maskAction() {\n var _this4 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n loadImageFromURL: function loadImageFromURL(imgUrl, file) {\n return _this4.loadImageFromURL(_this4.toDataURL(), 'FilterImage').then(function () {\n _this4.addImageObject(imgUrl).then(function () {\n URL.revokeObjectURL(file);\n });\n });\n },\n applyFilter: function applyFilter() {\n _this4.applyFilter('mask', {\n maskObjId: _this4.activeObjectId\n });\n }\n }, this._commonAction());\n },\n\n\n /**\n * Text Action\n * @returns {Object} actions for ui text\n * @private\n */\n _textAction: function _textAction() {\n var _this5 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n changeTextStyle: function changeTextStyle(styleObj, isSilent) {\n if (_this5.activeObjectId) {\n _this5.changeTextStyle(_this5.activeObjectId, styleObj, isSilent);\n }\n }\n }, this._commonAction());\n },\n\n\n /**\n * Rotate Action\n * @returns {Object} actions for ui rotate\n * @private\n */\n _rotateAction: function _rotateAction() {\n var _this6 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n rotate: function rotate(angle, isSilent) {\n _this6.rotate(angle, isSilent);\n _this6.ui.resizeEditor();\n _this6.ui.rotate.setRangeBarAngle('rotate', angle);\n },\n setAngle: function setAngle(angle, isSilent) {\n _this6.setAngle(angle, isSilent);\n _this6.ui.resizeEditor();\n _this6.ui.rotate.setRangeBarAngle('setAngle', angle);\n }\n }, this._commonAction());\n },\n\n\n /**\n * Shape Action\n * @returns {Object} actions for ui shape\n * @private\n */\n _shapeAction: function _shapeAction() {\n var _this7 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n changeShape: function changeShape(changeShapeObject, isSilent) {\n if (_this7.activeObjectId) {\n _this7.changeShape(_this7.activeObjectId, changeShapeObject, isSilent);\n }\n },\n setDrawingShape: function setDrawingShape(shapeType) {\n _this7.setDrawingShape(shapeType);\n }\n }, this._commonAction());\n },\n\n\n /**\n * Crop Action\n * @returns {Object} actions for ui crop\n * @private\n */\n _cropAction: function _cropAction() {\n var _this8 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n crop: function crop() {\n var cropRect = _this8.getCropzoneRect();\n if (cropRect) {\n _this8.crop(cropRect).then(function () {\n _this8.stopDrawingMode();\n _this8.ui.resizeEditor();\n _this8.ui.changeMenu('crop');\n })['catch'](function (message) {\n return Promise.reject(message);\n });\n }\n },\n cancel: function cancel() {\n _this8.stopDrawingMode();\n _this8.ui.changeMenu('crop');\n },\n /* eslint-disable */\n preset: function preset(presetType) {\n switch (presetType) {\n case 'preset-square':\n _this8.setCropzoneRect(1 / 1);\n break;\n case 'preset-3-2':\n _this8.setCropzoneRect(3 / 2);\n break;\n case 'preset-4-3':\n _this8.setCropzoneRect(4 / 3);\n break;\n case 'preset-5-4':\n _this8.setCropzoneRect(5 / 4);\n break;\n case 'preset-7-5':\n _this8.setCropzoneRect(7 / 5);\n break;\n case 'preset-16-9':\n _this8.setCropzoneRect(16 / 9);\n break;\n default:\n _this8.setCropzoneRect();\n _this8.ui.crop.changeApplyButtonStatus(false);\n break;\n }\n }\n }, this._commonAction());\n },\n\n\n /**\n * Flip Action\n * @returns {Object} actions for ui flip\n * @private\n */\n _flipAction: function _flipAction() {\n var _this9 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n flip: function flip(flipType) {\n return _this9[flipType]();\n }\n }, this._commonAction());\n },\n\n\n /**\n * Filter Action\n * @returns {Object} actions for ui filter\n * @private\n */\n _filterAction: function _filterAction() {\n var _this10 = this;\n\n return (0, _tuiCodeSnippet.extend)({\n applyFilter: function applyFilter(applying, type, options, isSilent) {\n if (applying) {\n _this10.applyFilter(type, options, isSilent);\n } else if (_this10.hasFilter(type)) {\n _this10.removeFilter(type);\n }\n }\n }, this._commonAction());\n },\n\n\n /**\n * Image Editor Event Observer\n */\n setReAction: function setReAction() {\n var _this11 = this;\n\n this.on({\n undoStackChanged: function undoStackChanged(length) {\n if (length) {\n _this11.ui.changeHelpButtonEnabled('undo', true);\n _this11.ui.changeHelpButtonEnabled('reset', true);\n } else {\n _this11.ui.changeHelpButtonEnabled('undo', false);\n _this11.ui.changeHelpButtonEnabled('reset', false);\n }\n _this11.ui.resizeEditor();\n },\n redoStackChanged: function redoStackChanged(length) {\n if (length) {\n _this11.ui.changeHelpButtonEnabled('redo', true);\n } else {\n _this11.ui.changeHelpButtonEnabled('redo', false);\n }\n _this11.ui.resizeEditor();\n },\n /* eslint-disable complexity */\n objectActivated: function objectActivated(obj) {\n _this11.activeObjectId = obj.id;\n\n _this11.ui.changeHelpButtonEnabled('delete', true);\n _this11.ui.changeHelpButtonEnabled('deleteAll', true);\n\n if (obj.type === 'cropzone') {\n _this11.ui.crop.changeApplyButtonStatus(true);\n } else if (['rect', 'circle', 'triangle'].indexOf(obj.type) > -1) {\n _this11.stopDrawingMode();\n if (_this11.ui.submenu !== 'shape') {\n _this11.ui.changeMenu('shape', false, false);\n }\n _this11.ui.shape.setShapeStatus({\n strokeColor: obj.stroke,\n strokeWidth: obj.strokeWidth,\n fillColor: obj.fill\n });\n\n _this11.ui.shape.setMaxStrokeValue(Math.min(obj.width, obj.height));\n } else if (obj.type === 'path' || obj.type === 'line') {\n if (_this11.ui.submenu !== 'draw') {\n _this11.ui.changeMenu('draw', false, false);\n _this11.ui.draw.changeStandbyMode();\n }\n } else if (['i-text', 'text'].indexOf(obj.type) > -1) {\n if (_this11.ui.submenu !== 'text') {\n _this11.ui.changeMenu('text', false, false);\n }\n\n _this11.ui.text.setTextStyleStateOnAction(obj);\n } else if (obj.type === 'icon') {\n _this11.stopDrawingMode();\n if (_this11.ui.submenu !== 'icon') {\n _this11.ui.changeMenu('icon', false, false);\n }\n _this11.ui.icon.setIconPickerColor(obj.fill);\n }\n },\n /* eslint-enable complexity */\n addText: function addText(pos) {\n var _ui$text = _this11.ui.text,\n fill = _ui$text.textColor,\n fontSize = _ui$text.fontSize,\n fontStyle = _ui$text.fontStyle,\n fontWeight = _ui$text.fontWeight,\n underline = _ui$text.underline;\n\n var fontFamily = 'Noto Sans';\n\n _this11.addText('Double Click', {\n position: pos.originPosition,\n styles: { fill: fill, fontSize: fontSize, fontFamily: fontFamily, fontStyle: fontStyle, fontWeight: fontWeight, underline: underline }\n }).then(function () {\n _this11.changeCursor('default');\n });\n },\n addObjectAfter: function addObjectAfter(obj) {\n if (obj.type === 'icon') {\n _this11.ui.icon.changeStandbyMode();\n } else if (['rect', 'circle', 'triangle'].indexOf(obj.type) > -1) {\n _this11.ui.shape.setMaxStrokeValue(Math.min(obj.width, obj.height));\n _this11.ui.shape.changeStandbyMode();\n }\n },\n objectScaled: function objectScaled(obj) {\n if (['i-text', 'text'].indexOf(obj.type) > -1) {\n _this11.ui.text.fontSize = (0, _util.toInteger)(obj.fontSize);\n } else if (['rect', 'circle', 'triangle'].indexOf(obj.type) >= 0) {\n var width = obj.width,\n height = obj.height;\n\n var strokeValue = _this11.ui.shape.getStrokeValue();\n\n if (width < strokeValue) {\n _this11.ui.shape.setStrokeValue(width);\n }\n if (height < strokeValue) {\n _this11.ui.shape.setStrokeValue(height);\n }\n }\n },\n selectionCleared: function selectionCleared() {\n _this11.activeObjectId = null;\n if (_this11.ui.submenu === 'text') {\n _this11.changeCursor('text');\n } else if (_this11.ui.submenu !== 'draw' && _this11.ui.submenu !== 'crop') {\n _this11.stopDrawingMode();\n }\n }\n });\n },\n\n\n /**\n * Common Action\n * @returns {Object} common actions for ui\n * @private\n */\n _commonAction: function _commonAction() {\n var _this12 = this;\n\n return {\n modeChange: function modeChange(menu) {\n switch (menu) {\n case 'text':\n _this12._changeActivateMode('TEXT');\n break;\n case 'crop':\n _this12.startDrawingMode('CROPPER');\n break;\n case 'shape':\n _this12._changeActivateMode('SHAPE');\n _this12.setDrawingShape(_this12.ui.shape.type, _this12.ui.shape.options);\n break;\n default:\n break;\n }\n },\n deactivateAll: this.deactivateAll.bind(this),\n changeSelectableAll: this.changeSelectableAll.bind(this),\n discardSelection: this.discardSelection.bind(this),\n stopDrawingMode: this.stopDrawingMode.bind(this)\n };\n },\n\n\n /**\n * Mixin\n * @param {ImageEditor} ImageEditor instance\n */\n mixin: function mixin(ImageEditor) {\n (0, _tuiCodeSnippet.extend)(ImageEditor.prototype, this);\n }\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/action.js?");
/***/ }),
/***/ "./src/js/command/addIcon.js":
/*!***********************************!*\
!*** ./src/js/command/addIcon.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ICON = _consts.componentNames.ICON; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add an icon\n */\n\nvar command = {\n name: _consts.commandNames.ADD_ICON,\n\n /**\n * Add an icon\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - Icon type ('arrow', 'cancel', custom icon name)\n * @param {Object} options - Icon options\n * @param {string} [options.fill] - Icon foreground color\n * @param {string} [options.left] - Icon x position\n * @param {string} [options.top] - Icon y position\n * @returns {Promise}\n */\n execute: function execute(graphics, type, options) {\n var _this = this;\n\n var iconComp = graphics.getComponent(ICON);\n\n return iconComp.add(type, options).then(function (objectProps) {\n _this.undoData.object = graphics.getObject(objectProps.id);\n\n return objectProps;\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n graphics.remove(this.undoData.object);\n\n return _util.Promise.resolve();\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/addIcon.js?");
/***/ }),
/***/ "./src/js/command/addImageObject.js":
/*!******************************************!*\
!*** ./src/js/command/addImageObject.js ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar command = {\n name: _consts.commandNames.ADD_IMAGE_OBJECT,\n\n /**\n * Add an image object\n * @param {Graphics} graphics - Graphics instance\n * @param {string} imgUrl - Image url to make object\n * @returns {Promise}\n */\n execute: function execute(graphics, imgUrl) {\n var _this = this;\n\n return graphics.addImageObject(imgUrl).then(function (objectProps) {\n _this.undoData.object = graphics.getObject(objectProps.id);\n\n return objectProps;\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n graphics.remove(this.undoData.object);\n\n return _util.Promise.resolve();\n }\n}; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add an image object\n */\n\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/addImageObject.js?");
/***/ }),
/***/ "./src/js/command/addObject.js":
/*!*************************************!*\
!*** ./src/js/command/addObject.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar command = {\n name: _consts.commandNames.ADD_OBJECT,\n\n /**\n * Add an object\n * @param {Graphics} graphics - Graphics instance\n * @param {Object} object - Fabric object\n * @returns {Promise}\n */\n execute: function execute(graphics, object) {\n return new _util.Promise(function (resolve, reject) {\n if (!graphics.contains(object)) {\n graphics.add(object);\n resolve(object);\n } else {\n reject(_consts.rejectMessages.addedObject);\n }\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @param {Object} object - Fabric object\n * @returns {Promise}\n */\n undo: function undo(graphics, object) {\n return new _util.Promise(function (resolve, reject) {\n if (graphics.contains(object)) {\n graphics.remove(object);\n resolve(object);\n } else {\n reject(_consts.rejectMessages.noObject);\n }\n });\n }\n}; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add an object\n */\n\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/addObject.js?");
/***/ }),
/***/ "./src/js/command/addShape.js":
/*!************************************!*\
!*** ./src/js/command/addShape.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SHAPE = _consts.componentNames.SHAPE; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add a shape\n */\n\nvar command = {\n name: _consts.commandNames.ADD_SHAPE,\n\n /**\n * Add a shape\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - Shape type (ex: 'rect', 'circle', 'triangle')\n * @param {Object} options - Shape options\n * @param {string} [options.fill] - Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stroke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.left] - Shape x position\n * @param {number} [options.top] - Shape y position\n * @param {number} [options.isRegular] - Whether resizing shape has 1:1 ratio or not\n * @returns {Promise}\n */\n execute: function execute(graphics, type, options) {\n var _this = this;\n\n var shapeComp = graphics.getComponent(SHAPE);\n\n return shapeComp.add(type, options).then(function (objectProps) {\n _this.undoData.object = graphics.getObject(objectProps.id);\n\n return objectProps;\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n graphics.remove(this.undoData.object);\n\n return _util.Promise.resolve();\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/addShape.js?");
/***/ }),
/***/ "./src/js/command/addText.js":
/*!***********************************!*\
!*** ./src/js/command/addText.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar TEXT = _consts.componentNames.TEXT; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add a text object\n */\n\nvar command = {\n name: _consts.commandNames.ADD_TEXT,\n\n /**\n * Add a text object\n * @param {Graphics} graphics - Graphics instance\n * @param {string} text - Initial input text\n * @param {Object} [options] Options for text styles\n * @param {Object} [options.styles] Initial styles\n * @param {string} [options.styles.fill] Color\n * @param {string} [options.styles.fontFamily] Font type for text\n * @param {number} [options.styles.fontSize] Size\n * @param {string} [options.styles.fontStyle] Type of inclination (normal / italic)\n * @param {string} [options.styles.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [options.styles.textAlign] Type of text align (left / center / right)\n * @param {string} [options.styles.textDecoration] Type of line (underline / line-through / overline)\n * @param {{x: number, y: number}} [options.position] - Initial position\n * @returns {Promise}\n */\n execute: function execute(graphics, text, options) {\n var _this = this;\n\n var textComp = graphics.getComponent(TEXT);\n\n if (this.undoData.object) {\n var undoObject = this.undoData.object;\n\n return new _util.Promise(function (resolve, reject) {\n if (!graphics.contains(undoObject)) {\n graphics.add(undoObject);\n resolve(undoObject);\n } else {\n reject(_consts.rejectMessages.redo);\n }\n });\n }\n\n return textComp.add(text, options).then(function (objectProps) {\n var id = objectProps.id;\n\n var textObject = graphics.getObject(id);\n\n _this.undoData.object = textObject;\n\n return objectProps;\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n graphics.remove(this.undoData.object);\n\n return _util.Promise.resolve();\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/addText.js?");
/***/ }),
/***/ "./src/js/command/applyFilter.js":
/*!***************************************!*\
!*** ./src/js/command/applyFilter.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FILTER = _consts.componentNames.FILTER;\n\n/**\n * Chched data for undo\n * @type {Object}\n */\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Apply a filter into an image\n */\n\nvar chchedUndoDataForSilent = null;\n\n/**\n * Make undoData\n * @param {string} type - Filter type\n * @param {Object} prevfilterOption - prev Filter options\n * @param {Object} options - Filter options\n * @returns {object} - undo data\n */\nfunction makeUndoData(type, prevfilterOption, options) {\n var undoData = {};\n\n if (type === 'mask') {\n undoData.object = options.mask;\n }\n\n undoData.options = prevfilterOption;\n\n return undoData;\n}\n\nvar command = {\n name: _consts.commandNames.APPLY_FILTER,\n\n /**\n * Apply a filter into an image\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - Filter type\n * @param {Object} options - Filter options\n * @param {number} options.maskObjId - masking image object id\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise}\n */\n execute: function execute(graphics, type, options, isSilent) {\n var filterComp = graphics.getComponent(FILTER);\n\n if (type === 'mask') {\n var maskObj = graphics.getObject(options.maskObjId);\n\n if (!(maskObj && maskObj.isType('image'))) {\n return Promise.reject(_consts.rejectMessages.invalidParameters);\n }\n\n _tuiCodeSnippet2.default.extend(options, { mask: maskObj });\n graphics.remove(options.mask);\n }\n if (!this.isRedo) {\n var prevfilterOption = filterComp.getOptions(type);\n var undoData = makeUndoData(type, prevfilterOption, options);\n\n chchedUndoDataForSilent = this.setUndoData(undoData, chchedUndoDataForSilent, isSilent);\n }\n\n return filterComp.add(type, options);\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - Filter type\n * @returns {Promise}\n */\n undo: function undo(graphics, type) {\n var filterComp = graphics.getComponent(FILTER);\n\n if (type === 'mask') {\n var mask = this.undoData.object;\n graphics.add(mask);\n graphics.setActiveObject(mask);\n\n return filterComp.remove(type);\n }\n\n // options changed case\n if (this.undoData.options) {\n return filterComp.add(type, this.undoData.options);\n }\n\n // filter added case\n return filterComp.remove(type);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/applyFilter.js?");
/***/ }),
/***/ "./src/js/command/changeIconColor.js":
/*!*******************************************!*\
!*** ./src/js/command/changeIconColor.js ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ICON = _consts.componentNames.ICON; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Change icon color\n */\n\nvar command = {\n name: _consts.commandNames.CHANGE_ICON_COLOR,\n\n /**\n * Change icon color\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @param {string} color - Color for icon\n * @returns {Promise}\n */\n execute: function execute(graphics, id, color) {\n var _this = this;\n\n return new _util.Promise(function (resolve, reject) {\n var iconComp = graphics.getComponent(ICON);\n var targetObj = graphics.getObject(id);\n\n if (!targetObj) {\n reject(_consts.rejectMessages.noObject);\n }\n\n _this.undoData.object = targetObj;\n _this.undoData.color = iconComp.getColor(targetObj);\n iconComp.setColor(color, targetObj);\n resolve();\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var iconComp = graphics.getComponent(ICON);\n var _undoData = this.undoData,\n icon = _undoData.object,\n color = _undoData.color;\n\n\n iconComp.setColor(color, icon);\n\n return _util.Promise.resolve();\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/changeIconColor.js?");
/***/ }),
/***/ "./src/js/command/changeSelection.js":
/*!*******************************************!*\
!*** ./src/js/command/changeSelection.js ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nvar _selectionModifyHelper = __webpack_require__(/*! ../helper/selectionModifyHelper */ \"./src/js/helper/selectionModifyHelper.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview change selection\n */\nvar command = {\n name: _consts.commandNames.CHANGE_SELECTION,\n\n execute: function execute(graphics, props) {\n if (this.isRedo) {\n props.forEach(function (prop) {\n graphics.setObjectProperties(prop.id, prop);\n });\n } else {\n this.undoData = (0, _selectionModifyHelper.getCachedUndoDataForDimension)();\n }\n\n return _util.Promise.resolve();\n },\n undo: function undo(graphics) {\n this.undoData.forEach(function (datum) {\n graphics.setObjectProperties(datum.id, datum);\n });\n\n return _util.Promise.resolve();\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/changeSelection.js?");
/***/ }),
/***/ "./src/js/command/changeShape.js":
/*!***************************************!*\
!*** ./src/js/command/changeShape.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview change a shape\n */\nvar SHAPE = _consts.componentNames.SHAPE;\n\n/**\n * Chched data for undo\n * @type {Object}\n */\n\nvar chchedUndoDataForSilent = null;\n\n/**\n * Make undoData\n * @param {object} options - shape options\n * @param {Component} targetObj - shape component\n * @returns {object} - undo data\n */\nfunction makeUndoData(options, targetObj) {\n var undoData = {\n object: targetObj,\n options: {}\n };\n\n _tuiCodeSnippet2.default.forEachOwnProperties(options, function (value, key) {\n undoData.options[key] = targetObj[key];\n });\n\n return undoData;\n}\n\nvar command = {\n name: _consts.commandNames.CHANGE_SHAPE,\n\n /**\n * Change a shape\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @param {Object} options - Shape options\n * @param {string} [options.fill] - Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stroke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.left] - Shape x position\n * @param {number} [options.top] - Shape y position\n * @param {number} [options.isRegular] - Whether resizing shape has 1:1 ratio or not\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise}\n */\n execute: function execute(graphics, id, options, isSilent) {\n var shapeComp = graphics.getComponent(SHAPE);\n var targetObj = graphics.getObject(id);\n\n if (!targetObj) {\n return _util.Promise.reject(_consts.rejectMessages.noObject);\n }\n\n if (!this.isRedo) {\n var undoData = makeUndoData(options, targetObj);\n\n chchedUndoDataForSilent = this.setUndoData(undoData, chchedUndoDataForSilent, isSilent);\n }\n\n return shapeComp.change(targetObj, options);\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var shapeComp = graphics.getComponent(SHAPE);\n var _undoData = this.undoData,\n shape = _undoData.object,\n options = _undoData.options;\n\n\n return shapeComp.change(shape, options);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/changeShape.js?");
/***/ }),
/***/ "./src/js/command/changeText.js":
/*!**************************************!*\
!*** ./src/js/command/changeText.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar TEXT = _consts.componentNames.TEXT; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Change a text\n */\n\nvar command = {\n name: _consts.commandNames.CHANGE_TEXT,\n\n /**\n * Change a text\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @param {string} text - Changing text\n * @returns {Promise}\n */\n execute: function execute(graphics, id, text) {\n var textComp = graphics.getComponent(TEXT);\n var targetObj = graphics.getObject(id);\n\n if (!targetObj) {\n return _util.Promise.reject(_consts.rejectMessages.noObject);\n }\n\n this.undoData.object = targetObj;\n this.undoData.text = textComp.getText(targetObj);\n\n return textComp.change(targetObj, text);\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var textComp = graphics.getComponent(TEXT);\n var _undoData = this.undoData,\n textObj = _undoData.object,\n text = _undoData.text;\n\n\n return textComp.change(textObj, text);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/changeText.js?");
/***/ }),
/***/ "./src/js/command/changeTextStyle.js":
/*!*******************************************!*\
!*** ./src/js/command/changeTextStyle.js ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Change text styles\n */\nvar TEXT = _consts.componentNames.TEXT;\n\n/**\n * Chched data for undo\n * @type {Object}\n */\n\nvar chchedUndoDataForSilent = null;\n\n/**\n * Make undoData\n * @param {object} styles - text styles\n * @param {Component} targetObj - text component\n * @returns {object} - undo data\n */\nfunction makeUndoData(styles, targetObj) {\n var undoData = {\n object: targetObj,\n styles: {}\n };\n _tuiCodeSnippet2.default.forEachOwnProperties(styles, function (value, key) {\n var undoValue = targetObj[key];\n undoData.styles[key] = undoValue;\n });\n\n return undoData;\n}\n\nvar command = {\n name: _consts.commandNames.CHANGE_TEXT_STYLE,\n\n /**\n * Change text styles\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @param {Object} styles - text styles\n * @param {string} [styles.fill] Color\n * @param {string} [styles.fontFamily] Font type for text\n * @param {number} [styles.fontSize] Size\n * @param {string} [styles.fontStyle] Type of inclination (normal / italic)\n * @param {string} [styles.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [styles.textAlign] Type of text align (left / center / right)\n * @param {string} [styles.textDecoration] Type of line (underline / line-through / overline)\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise}\n */\n execute: function execute(graphics, id, styles, isSilent) {\n var textComp = graphics.getComponent(TEXT);\n var targetObj = graphics.getObject(id);\n\n if (!targetObj) {\n return _util.Promise.reject(_consts.rejectMessages.noObject);\n }\n if (!this.isRedo) {\n var undoData = makeUndoData(styles, targetObj);\n\n chchedUndoDataForSilent = this.setUndoData(undoData, chchedUndoDataForSilent, isSilent);\n }\n\n return textComp.setStyle(targetObj, styles);\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var textComp = graphics.getComponent(TEXT);\n var _undoData = this.undoData,\n textObj = _undoData.object,\n styles = _undoData.styles;\n\n\n return textComp.setStyle(textObj, styles);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/changeTextStyle.js?");
/***/ }),
/***/ "./src/js/command/clearObjects.js":
/*!****************************************!*\
!*** ./src/js/command/clearObjects.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar command = {\n name: _consts.commandNames.CLEAR_OBJECTS,\n\n /**\n * Clear all objects without background (main) image\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n execute: function execute(graphics) {\n var _this = this;\n\n return new _util.Promise(function (resolve) {\n _this.undoData.objects = graphics.removeAll();\n resolve();\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n * @ignore\n */\n undo: function undo(graphics) {\n graphics.add(this.undoData.objects);\n\n return _util.Promise.resolve();\n }\n}; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Clear all objects\n */\n\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/clearObjects.js?");
/***/ }),
/***/ "./src/js/command/flip.js":
/*!********************************!*\
!*** ./src/js/command/flip.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Flip an image\n */\nvar FLIP = _consts.componentNames.FLIP;\n\n\nvar command = {\n name: _consts.commandNames.FLIP_IMAGE,\n\n /**\n * flip an image\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - 'flipX' or 'flipY' or 'reset'\n * @returns {Promise}\n */\n execute: function execute(graphics, type) {\n var flipComp = graphics.getComponent(FLIP);\n\n this.undoData.setting = flipComp.getCurrentSetting();\n\n return flipComp[type]();\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var flipComp = graphics.getComponent(FLIP);\n\n return flipComp.set(this.undoData.setting);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/flip.js?");
/***/ }),
/***/ "./src/js/command/loadImage.js":
/*!*************************************!*\
!*** ./src/js/command/loadImage.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Load a background (main) image\n */\nvar IMAGE_LOADER = _consts.componentNames.IMAGE_LOADER;\n\n\nvar command = {\n name: _consts.commandNames.LOAD_IMAGE,\n\n /**\n * Load a background (main) image\n * @param {Graphics} graphics - Graphics instance\n * @param {string} imageName - Image name\n * @param {string} imgUrl - Image Url\n * @returns {Promise}\n */\n execute: function execute(graphics, imageName, imgUrl) {\n var loader = graphics.getComponent(IMAGE_LOADER);\n var prevImage = loader.getCanvasImage();\n var prevImageWidth = prevImage ? prevImage.width : 0;\n var prevImageHeight = prevImage ? prevImage.height : 0;\n var objects = graphics.removeAll(true).filter(function (objectItem) {\n return objectItem.type !== 'cropzone';\n });\n\n objects.forEach(function (objectItem) {\n objectItem.evented = true;\n });\n\n this.undoData = {\n name: loader.getImageName(),\n image: prevImage,\n objects: objects\n };\n\n return loader.load(imageName, imgUrl).then(function (newImage) {\n return {\n oldWidth: prevImageWidth,\n oldHeight: prevImageHeight,\n newWidth: newImage.width,\n newHeight: newImage.height\n };\n });\n },\n\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var loader = graphics.getComponent(IMAGE_LOADER);\n var _undoData = this.undoData,\n objects = _undoData.objects,\n name = _undoData.name,\n image = _undoData.image;\n\n\n graphics.removeAll(true);\n graphics.add(objects);\n\n return loader.load(name, image);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/loadImage.js?");
/***/ }),
/***/ "./src/js/command/removeFilter.js":
/*!****************************************!*\
!*** ./src/js/command/removeFilter.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Remove a filter from an image\n */\nvar FILTER = _consts.componentNames.FILTER;\n\n\nvar command = {\n name: _consts.commandNames.REMOVE_FILTER,\n\n /**\n * Remove a filter from an image\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - Filter type\n * @returns {Promise}\n */\n execute: function execute(graphics, type) {\n var filterComp = graphics.getComponent(FILTER);\n\n this.undoData.options = filterComp.getOptions(type);\n\n return filterComp.remove(type);\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - Filter type\n * @returns {Promise}\n */\n undo: function undo(graphics, type) {\n var filterComp = graphics.getComponent(FILTER);\n var options = this.undoData.options;\n\n\n return filterComp.add(type, options);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/removeFilter.js?");
/***/ }),
/***/ "./src/js/command/removeObject.js":
/*!****************************************!*\
!*** ./src/js/command/removeObject.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar command = {\n name: _consts.commandNames.REMOVE_OBJECT,\n\n /**\n * Remove an object\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @returns {Promise}\n */\n execute: function execute(graphics, id) {\n var _this = this;\n\n return new _util.Promise(function (resolve, reject) {\n _this.undoData.objects = graphics.removeObjectById(id);\n if (_this.undoData.objects.length) {\n resolve();\n } else {\n reject(_consts.rejectMessages.noObject);\n }\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n graphics.add(this.undoData.objects);\n\n return _util.Promise.resolve();\n }\n}; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Remove an object\n */\n\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/removeObject.js?");
/***/ }),
/***/ "./src/js/command/resizeCanvasDimension.js":
/*!*************************************************!*\
!*** ./src/js/command/resizeCanvasDimension.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar command = {\n name: _consts.commandNames.RESIZE_CANVAS_DIMENSION,\n\n /**\n * resize the canvas with given dimension\n * @param {Graphics} graphics - Graphics instance\n * @param {{width: number, height: number}} dimension - Max width & height\n * @returns {Promise}\n */\n execute: function execute(graphics, dimension) {\n var _this = this;\n\n return new _util.Promise(function (resolve) {\n _this.undoData.size = {\n width: graphics.cssMaxWidth,\n height: graphics.cssMaxHeight\n };\n\n graphics.setCssMaxDimension(dimension);\n graphics.adjustCanvasDimension();\n resolve();\n });\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n graphics.setCssMaxDimension(this.undoData.size);\n graphics.adjustCanvasDimension();\n\n return _util.Promise.resolve();\n }\n}; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Resize a canvas\n */\n\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/resizeCanvasDimension.js?");
/***/ }),
/***/ "./src/js/command/rotate.js":
/*!**********************************!*\
!*** ./src/js/command/rotate.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Rotate an image\n */\nvar ROTATION = _consts.componentNames.ROTATION;\n\n/**\n * Chched data for undo\n * @type {Object}\n */\n\nvar chchedUndoDataForSilent = null;\n\n/**\n * Make undo data\n * @param {Component} rotationComp - rotation component\n * @returns {object} - undodata\n */\nfunction makeUndoData(rotationComp) {\n return {\n angle: rotationComp.getCurrentAngle()\n };\n}\n\nvar command = {\n name: _consts.commandNames.ROTATE_IMAGE,\n\n /**\n * Rotate an image\n * @param {Graphics} graphics - Graphics instance\n * @param {string} type - 'rotate' or 'setAngle'\n * @param {number} angle - angle value (degree)\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise}\n */\n execute: function execute(graphics, type, angle, isSilent) {\n var rotationComp = graphics.getComponent(ROTATION);\n\n if (!this.isRedo) {\n var undoData = makeUndoData(rotationComp);\n\n chchedUndoDataForSilent = this.setUndoData(undoData, chchedUndoDataForSilent, isSilent);\n }\n\n return rotationComp[type](angle);\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var rotationComp = graphics.getComponent(ROTATION);\n var _args = this.args,\n type = _args[1],\n angle = _args[2];\n\n\n if (type === 'setAngle') {\n return rotationComp[type](this.undoData.angle);\n }\n\n return rotationComp.rotate(-angle);\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/rotate.js?");
/***/ }),
/***/ "./src/js/command/setObjectPosition.js":
/*!*********************************************!*\
!*** ./src/js/command/setObjectPosition.js ***!
\*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar command = {\n name: _consts.commandNames.SET_OBJECT_POSITION,\n\n /**\n * Set object properties\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @param {Object} posInfo - position object\n * @param {number} posInfo.x - x position\n * @param {number} posInfo.y - y position\n * @param {string} posInfo.originX - can be 'left', 'center', 'right'\n * @param {string} posInfo.originY - can be 'top', 'center', 'bottom'\n * @returns {Promise}\n */\n execute: function execute(graphics, id, posInfo) {\n var targetObj = graphics.getObject(id);\n\n if (!targetObj) {\n return _util.Promise.reject(_consts.rejectMessages.noObject);\n }\n\n this.undoData.objectId = id;\n this.undoData.props = graphics.getObjectProperties(id, ['left', 'top']);\n\n graphics.setObjectPosition(id, posInfo);\n graphics.renderAll();\n\n return _util.Promise.resolve();\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @returns {Promise}\n */\n undo: function undo(graphics) {\n var _undoData = this.undoData,\n objectId = _undoData.objectId,\n props = _undoData.props;\n\n\n graphics.setObjectProperties(objectId, props);\n graphics.renderAll();\n\n return _util.Promise.resolve();\n }\n}; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Set object properties\n */\n\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/setObjectPosition.js?");
/***/ }),
/***/ "./src/js/command/setObjectProperties.js":
/*!***********************************************!*\
!*** ./src/js/command/setObjectProperties.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _command = __webpack_require__(/*! ../factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Set object properties\n */\nvar command = {\n name: _consts.commandNames.SET_OBJECT_PROPERTIES,\n\n /**\n * Set object properties\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @param {Object} props - properties\n * @param {string} [props.fill] Color\n * @param {string} [props.fontFamily] Font type for text\n * @param {number} [props.fontSize] Size\n * @param {string} [props.fontStyle] Type of inclination (normal / italic)\n * @param {string} [props.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [props.textAlign] Type of text align (left / center / right)\n * @param {string} [props.textDecoration] Type of line (underline / line-through / overline)\n * @returns {Promise}\n */\n execute: function execute(graphics, id, props) {\n var _this = this;\n\n var targetObj = graphics.getObject(id);\n\n if (!targetObj) {\n return _util.Promise.reject(_consts.rejectMessages.noObject);\n }\n\n this.undoData.props = {};\n _tuiCodeSnippet2.default.forEachOwnProperties(props, function (value, key) {\n _this.undoData.props[key] = targetObj[key];\n });\n\n graphics.setObjectProperties(id, props);\n\n return _util.Promise.resolve();\n },\n\n /**\n * @param {Graphics} graphics - Graphics instance\n * @param {number} id - object id\n * @returns {Promise}\n */\n undo: function undo(graphics, id) {\n var props = this.undoData.props;\n\n\n graphics.setObjectProperties(id, props);\n\n return _util.Promise.resolve();\n }\n};\n\n_command2.default.register(command);\n\nexports.default = command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/command/setObjectProperties.js?");
/***/ }),
/***/ "./src/js/component/cropper.js":
/*!*************************************!*\
!*** ./src/js/component/cropper.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _cropzone = __webpack_require__(/*! ../extension/cropzone */ \"./src/js/extension/cropzone.js\");\n\nvar _cropzone2 = _interopRequireDefault(_cropzone);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Image crop module (start cropping, end cropping)\n */\n\n\nvar MOUSE_MOVE_THRESHOLD = 10;\nvar DEFAULT_OPTION = {\n presetRatio: null,\n top: -10,\n left: -10,\n height: 1,\n width: 1\n};\n\n/**\n * Cropper components\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @class Cropper\n * @ignore\n */\n\nvar Cropper = function (_Component) {\n _inherits(Cropper, _Component);\n\n function Cropper(graphics) {\n _classCallCheck(this, Cropper);\n\n /**\n * Cropzone\n * @type {Cropzone}\n * @private\n */\n var _this = _possibleConstructorReturn(this, (Cropper.__proto__ || Object.getPrototypeOf(Cropper)).call(this, _consts.componentNames.CROPPER, graphics));\n\n _this._cropzone = null;\n\n /**\n * StartX of Cropzone\n * @type {number}\n * @private\n */\n _this._startX = null;\n\n /**\n * StartY of Cropzone\n * @type {number}\n * @private\n */\n _this._startY = null;\n\n /**\n * State whether shortcut key is pressed or not\n * @type {boolean}\n * @private\n */\n _this._withShiftKey = false;\n\n /**\n * Listeners\n * @type {object.<string, function>}\n * @private\n */\n _this._listeners = {\n keydown: _this._onKeyDown.bind(_this),\n keyup: _this._onKeyUp.bind(_this),\n mousedown: _this._onFabricMouseDown.bind(_this),\n mousemove: _this._onFabricMouseMove.bind(_this),\n mouseup: _this._onFabricMouseUp.bind(_this)\n };\n return _this;\n }\n\n /**\n * Start cropping\n */\n\n\n _createClass(Cropper, [{\n key: 'start',\n value: function start() {\n if (this._cropzone) {\n return;\n }\n var canvas = this.getCanvas();\n\n canvas.forEachObject(function (obj) {\n // {@link http://fabricjs.com/docs/fabric.Object.html#evented}\n obj.evented = false;\n });\n\n this._cropzone = new _cropzone2.default(canvas, _tuiCodeSnippet2.default.extend({\n left: 0,\n top: 0,\n width: 0.5,\n height: 0.5,\n strokeWidth: 0, // {@link https://github.com/kangax/fabric.js/issues/2860}\n cornerSize: 10,\n cornerColor: 'black',\n fill: 'transparent'\n }, _consts.CROPZONE_DEFAULT_OPTIONS, this.graphics.cropSelectionStyle));\n\n canvas.discardActiveObject();\n canvas.add(this._cropzone);\n canvas.on('mouse:down', this._listeners.mousedown);\n canvas.selection = false;\n canvas.defaultCursor = 'crosshair';\n\n _fabric2.default.util.addListener(document, 'keydown', this._listeners.keydown);\n _fabric2.default.util.addListener(document, 'keyup', this._listeners.keyup);\n }\n\n /**\n * End cropping\n */\n\n }, {\n key: 'end',\n value: function end() {\n var canvas = this.getCanvas();\n var cropzone = this._cropzone;\n\n if (!cropzone) {\n return;\n }\n canvas.remove(cropzone);\n canvas.selection = true;\n canvas.defaultCursor = 'default';\n canvas.off('mouse:down', this._listeners.mousedown);\n canvas.forEachObject(function (obj) {\n obj.evented = true;\n });\n\n this._cropzone = null;\n\n _fabric2.default.util.removeListener(document, 'keydown', this._listeners.keydown);\n _fabric2.default.util.removeListener(document, 'keyup', this._listeners.keyup);\n }\n\n /**\n * Change cropzone visible\n * @param {boolean} visible - cropzone visible state\n */\n\n }, {\n key: 'changeVisibility',\n value: function changeVisibility(visible) {\n if (this._cropzone) {\n this._cropzone.set({ visible: visible });\n }\n }\n\n /**\n * onMousedown handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onFabricMouseDown',\n value: function _onFabricMouseDown(fEvent) {\n var canvas = this.getCanvas();\n\n if (fEvent.target) {\n return;\n }\n\n canvas.selection = false;\n var coord = canvas.getPointer(fEvent.e);\n\n this._startX = coord.x;\n this._startY = coord.y;\n\n canvas.on({\n 'mouse:move': this._listeners.mousemove,\n 'mouse:up': this._listeners.mouseup\n });\n }\n\n /**\n * onMousemove handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onFabricMouseMove',\n value: function _onFabricMouseMove(fEvent) {\n var canvas = this.getCanvas();\n var pointer = canvas.getPointer(fEvent.e);\n var x = pointer.x,\n y = pointer.y;\n\n var cropzone = this._cropzone;\n\n if (Math.abs(x - this._startX) + Math.abs(y - this._startY) > MOUSE_MOVE_THRESHOLD) {\n canvas.remove(cropzone);\n cropzone.set(this._calcRectDimensionFromPoint(x, y));\n\n canvas.add(cropzone);\n canvas.setActiveObject(cropzone);\n }\n }\n\n /**\n * Get rect dimension setting from Canvas-Mouse-Position(x, y)\n * @param {number} x - Canvas-Mouse-Position x\n * @param {number} y - Canvas-Mouse-Position Y\n * @returns {{left: number, top: number, width: number, height: number}}\n * @private\n */\n\n }, {\n key: '_calcRectDimensionFromPoint',\n value: function _calcRectDimensionFromPoint(x, y) {\n var canvas = this.getCanvas();\n var canvasWidth = canvas.getWidth();\n var canvasHeight = canvas.getHeight();\n var startX = this._startX;\n var startY = this._startY;\n var left = (0, _util.clamp)(x, 0, startX);\n var top = (0, _util.clamp)(y, 0, startY);\n var width = (0, _util.clamp)(x, startX, canvasWidth) - left; // (startX <= x(mouse) <= canvasWidth) - left\n var height = (0, _util.clamp)(y, startY, canvasHeight) - top; // (startY <= y(mouse) <= canvasHeight) - top\n\n if (this._withShiftKey) {\n // make fixed ratio cropzone\n if (width > height) {\n height = width;\n } else if (height > width) {\n width = height;\n }\n\n if (startX >= x) {\n left = startX - width;\n }\n\n if (startY >= y) {\n top = startY - height;\n }\n }\n\n return {\n left: left,\n top: top,\n width: width,\n height: height\n };\n }\n\n /**\n * onMouseup handler in fabric canvas\n * @private\n */\n\n }, {\n key: '_onFabricMouseUp',\n value: function _onFabricMouseUp() {\n var cropzone = this._cropzone;\n var listeners = this._listeners;\n var canvas = this.getCanvas();\n\n canvas.setActiveObject(cropzone);\n canvas.off({\n 'mouse:move': listeners.mousemove,\n 'mouse:up': listeners.mouseup\n });\n }\n\n /**\n * Get cropped image data\n * @param {Object} cropRect cropzone rect\n * @param {Number} cropRect.left left position\n * @param {Number} cropRect.top top position\n * @param {Number} cropRect.width width\n * @param {Number} cropRect.height height\n * @returns {?{imageName: string, url: string}} cropped Image data\n */\n\n }, {\n key: 'getCroppedImageData',\n value: function getCroppedImageData(cropRect) {\n var canvas = this.getCanvas();\n var containsCropzone = canvas.contains(this._cropzone);\n if (!cropRect) {\n return null;\n }\n\n if (containsCropzone) {\n canvas.remove(this._cropzone);\n }\n\n var imageData = {\n imageName: this.getImageName(),\n url: canvas.toDataURL(cropRect)\n };\n\n if (containsCropzone) {\n canvas.add(this._cropzone);\n }\n\n return imageData;\n }\n\n /**\n * Get cropped rect\n * @returns {Object} rect\n */\n\n }, {\n key: 'getCropzoneRect',\n value: function getCropzoneRect() {\n var cropzone = this._cropzone;\n\n if (!cropzone.isValid()) {\n return null;\n }\n\n return {\n left: cropzone.left,\n top: cropzone.top,\n width: cropzone.width,\n height: cropzone.height\n };\n }\n\n /**\n * Set a cropzone square\n * @param {number} [presetRatio] - preset ratio\n */\n\n }, {\n key: 'setCropzoneRect',\n value: function setCropzoneRect(presetRatio) {\n var canvas = this.getCanvas();\n var cropzone = this._cropzone;\n\n canvas.discardActiveObject();\n canvas.selection = false;\n canvas.remove(cropzone);\n\n cropzone.set(presetRatio ? this._getPresetPropertiesForCropSize(presetRatio) : DEFAULT_OPTION);\n\n canvas.add(cropzone);\n canvas.selection = true;\n\n if (presetRatio) {\n canvas.setActiveObject(cropzone);\n }\n }\n\n /**\n * get a cropzone square info\n * @param {number} presetRatio - preset ratio\n * @returns {{presetRatio: number, left: number, top: number, width: number, height: number}}\n * @private\n */\n\n }, {\n key: '_getPresetPropertiesForCropSize',\n value: function _getPresetPropertiesForCropSize(presetRatio) {\n var canvas = this.getCanvas();\n var originalWidth = canvas.getWidth();\n var originalHeight = canvas.getHeight();\n\n var standardSize = originalWidth >= originalHeight ? originalWidth : originalHeight;\n var getScale = function getScale(value, orignalValue) {\n return value > orignalValue ? orignalValue / value : 1;\n };\n\n var width = standardSize * presetRatio;\n var height = standardSize;\n\n var scaleWidth = getScale(width, originalWidth);\n\n var _snippet$map = _tuiCodeSnippet2.default.map([width, height], function (sizeValue) {\n return sizeValue * scaleWidth;\n });\n\n width = _snippet$map[0];\n height = _snippet$map[1];\n\n\n var scaleHeight = getScale(height, originalHeight);\n\n var _snippet$map2 = _tuiCodeSnippet2.default.map([width, height], function (sizeValue) {\n return (0, _util.fixFloatingPoint)(sizeValue * scaleHeight);\n });\n\n width = _snippet$map2[0];\n height = _snippet$map2[1];\n\n\n return {\n presetRatio: presetRatio,\n top: (originalHeight - height) / 2,\n left: (originalWidth - width) / 2,\n width: width,\n height: height\n };\n }\n\n /**\n * Keydown event handler\n * @param {KeyboardEvent} e - Event object\n * @private\n */\n\n }, {\n key: '_onKeyDown',\n value: function _onKeyDown(e) {\n if (e.keyCode === _consts.keyCodes.SHIFT) {\n this._withShiftKey = true;\n }\n }\n\n /**\n * Keyup event handler\n * @param {KeyboardEvent} e - Event object\n * @private\n */\n\n }, {\n key: '_onKeyUp',\n value: function _onKeyUp(e) {\n if (e.keyCode === _consts.keyCodes.SHIFT) {\n this._withShiftKey = false;\n }\n }\n }]);\n\n return Cropper;\n}(_component2.default);\n\nexports.default = Cropper;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/cropper.js?");
/***/ }),
/***/ "./src/js/component/filter.js":
/*!************************************!*\
!*** ./src/js/component/filter.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _mask = __webpack_require__(/*! ../extension/mask */ \"./src/js/extension/mask.js\");\n\nvar _mask2 = _interopRequireDefault(_mask);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nvar _sharpen = __webpack_require__(/*! ../extension/sharpen */ \"./src/js/extension/sharpen.js\");\n\nvar _sharpen2 = _interopRequireDefault(_sharpen);\n\nvar _emboss = __webpack_require__(/*! ../extension/emboss */ \"./src/js/extension/emboss.js\");\n\nvar _emboss2 = _interopRequireDefault(_emboss);\n\nvar _colorFilter = __webpack_require__(/*! ../extension/colorFilter */ \"./src/js/extension/colorFilter.js\");\n\nvar _colorFilter2 = _interopRequireDefault(_colorFilter);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add filter module\n */\n\n\nvar filters = _fabric2.default.Image.filters;\n\nfilters.Mask = _mask2.default;\nfilters.Sharpen = _sharpen2.default;\nfilters.Emboss = _emboss2.default;\nfilters.ColorFilter = _colorFilter2.default;\n\n/**\n * Filter\n * @class Filter\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\n\nvar Filter = function (_Component) {\n _inherits(Filter, _Component);\n\n function Filter(graphics) {\n _classCallCheck(this, Filter);\n\n return _possibleConstructorReturn(this, (Filter.__proto__ || Object.getPrototypeOf(Filter)).call(this, _consts.componentNames.FILTER, graphics));\n }\n\n /**\n * Add filter to source image (a specific filter is added on fabric.js)\n * @param {string} type - Filter type\n * @param {Object} [options] - Options of filter\n * @returns {Promise}\n */\n\n\n _createClass(Filter, [{\n key: 'add',\n value: function add(type, options) {\n var _this2 = this;\n\n return new _util.Promise(function (resolve, reject) {\n var sourceImg = _this2._getSourceImage();\n var canvas = _this2.getCanvas();\n var imgFilter = _this2._getFilter(sourceImg, type);\n if (!imgFilter) {\n imgFilter = _this2._createFilter(sourceImg, type, options);\n }\n\n if (!imgFilter) {\n reject(_consts.rejectMessages.invalidParameters);\n }\n\n _this2._changeFilterValues(imgFilter, options);\n\n _this2._apply(sourceImg, function () {\n canvas.renderAll();\n resolve({\n type: type,\n action: 'add',\n options: options\n });\n });\n });\n }\n\n /**\n * Remove filter to source image\n * @param {string} type - Filter type\n * @returns {Promise}\n */\n\n }, {\n key: 'remove',\n value: function remove(type) {\n var _this3 = this;\n\n return new _util.Promise(function (resolve, reject) {\n var sourceImg = _this3._getSourceImage();\n var canvas = _this3.getCanvas();\n var options = _this3.getOptions(type);\n\n if (!sourceImg.filters.length) {\n reject(_consts.rejectMessages.unsupportedOperation);\n }\n\n _this3._removeFilter(sourceImg, type);\n\n _this3._apply(sourceImg, function () {\n canvas.renderAll();\n resolve({\n type: type,\n action: 'remove',\n options: options\n });\n });\n });\n }\n\n /**\n * Whether this has the filter or not\n * @param {string} type - Filter type\n * @returns {boolean} true if it has the filter\n */\n\n }, {\n key: 'hasFilter',\n value: function hasFilter(type) {\n return !!this._getFilter(this._getSourceImage(), type);\n }\n\n /**\n * Get a filter options\n * @param {string} type - Filter type\n * @returns {Object} filter options or null if there is no that filter\n */\n\n }, {\n key: 'getOptions',\n value: function getOptions(type) {\n var sourceImg = this._getSourceImage();\n var imgFilter = this._getFilter(sourceImg, type);\n if (!imgFilter) {\n return null;\n }\n\n return (0, _tuiCodeSnippet.extend)({}, imgFilter.options);\n }\n\n /**\n * Change filter values\n * @param {Object} imgFilter object of filter\n * @param {Object} options object\n * @private\n */\n\n }, {\n key: '_changeFilterValues',\n value: function _changeFilterValues(imgFilter, options) {\n (0, _tuiCodeSnippet.forEach)(options, function (value, key) {\n if (!(0, _tuiCodeSnippet.isUndefined)(imgFilter[key])) {\n imgFilter[key] = value;\n }\n });\n (0, _tuiCodeSnippet.forEach)(imgFilter.options, function (value, key) {\n if (!(0, _tuiCodeSnippet.isUndefined)(options[key])) {\n imgFilter.options[key] = options[key];\n }\n });\n }\n\n /**\n * Apply filter\n * @param {fabric.Image} sourceImg - Source image to apply filter\n * @param {function} callback - Executed function after applying filter\n * @private\n */\n\n }, {\n key: '_apply',\n value: function _apply(sourceImg, callback) {\n sourceImg.filters.push();\n var result = sourceImg.applyFilters();\n if (result) {\n callback();\n }\n }\n\n /**\n * Get source image on canvas\n * @returns {fabric.Image} Current source image on canvas\n * @private\n */\n\n }, {\n key: '_getSourceImage',\n value: function _getSourceImage() {\n return this.getCanvasImage();\n }\n\n /**\n * Create filter instance\n * @param {fabric.Image} sourceImg - Source image to apply filter\n * @param {string} type - Filter type\n * @param {Object} [options] - Options of filter\n * @returns {Object} Fabric object of filter\n * @private\n */\n\n }, {\n key: '_createFilter',\n value: function _createFilter(sourceImg, type, options) {\n var filterObj = void 0;\n // capitalize first letter for matching with fabric image filter name\n var fabricType = this._getFabricFilterType(type);\n var ImageFilter = _fabric2.default.Image.filters[fabricType];\n if (ImageFilter) {\n filterObj = new ImageFilter(options);\n filterObj.options = options;\n sourceImg.filters.push(filterObj);\n }\n\n return filterObj;\n }\n\n /**\n * Get applied filter instance\n * @param {fabric.Image} sourceImg - Source image to apply filter\n * @param {string} type - Filter type\n * @returns {Object} Fabric object of filter\n * @private\n */\n\n }, {\n key: '_getFilter',\n value: function _getFilter(sourceImg, type) {\n var imgFilter = null;\n\n if (sourceImg) {\n var fabricType = this._getFabricFilterType(type);\n var length = sourceImg.filters.length;\n\n var item = void 0,\n i = void 0;\n\n for (i = 0; i < length; i += 1) {\n item = sourceImg.filters[i];\n if (item.type === fabricType) {\n imgFilter = item;\n break;\n }\n }\n }\n\n return imgFilter;\n }\n\n /**\n * Remove applied filter instance\n * @param {fabric.Image} sourceImg - Source image to apply filter\n * @param {string} type - Filter type\n * @private\n */\n\n }, {\n key: '_removeFilter',\n value: function _removeFilter(sourceImg, type) {\n var fabricType = this._getFabricFilterType(type);\n sourceImg.filters = (0, _tuiCodeSnippet.filter)(sourceImg.filters, function (value) {\n return value.type !== fabricType;\n });\n }\n\n /**\n * Change filter class name to fabric's, especially capitalizing first letter\n * @param {string} type - Filter type\n * @example\n * 'grayscale' -> 'Grayscale'\n * @returns {string} Fabric filter class name\n */\n\n }, {\n key: '_getFabricFilterType',\n value: function _getFabricFilterType(type) {\n return type.charAt(0).toUpperCase() + type.slice(1);\n }\n }]);\n\n return Filter;\n}(_component2.default);\n\nexports.default = Filter;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/filter.js?");
/***/ }),
/***/ "./src/js/component/flip.js":
/*!**********************************!*\
!*** ./src/js/component/flip.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Image flip module\n */\n\n\n/**\n * Flip\n * @class Flip\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\nvar Flip = function (_Component) {\n _inherits(Flip, _Component);\n\n function Flip(graphics) {\n _classCallCheck(this, Flip);\n\n return _possibleConstructorReturn(this, (Flip.__proto__ || Object.getPrototypeOf(Flip)).call(this, _consts.componentNames.FLIP, graphics));\n }\n\n /**\n * Get current flip settings\n * @returns {{flipX: Boolean, flipY: Boolean}}\n */\n\n\n _createClass(Flip, [{\n key: 'getCurrentSetting',\n value: function getCurrentSetting() {\n var canvasImage = this.getCanvasImage();\n\n return {\n flipX: canvasImage.flipX,\n flipY: canvasImage.flipY\n };\n }\n\n /**\n * Set flipX, flipY\n * @param {{flipX: Boolean, flipY: Boolean}} newSetting - Flip setting\n * @returns {Promise}\n */\n\n }, {\n key: 'set',\n value: function set(newSetting) {\n var setting = this.getCurrentSetting();\n var isChangingFlipX = setting.flipX !== newSetting.flipX;\n var isChangingFlipY = setting.flipY !== newSetting.flipY;\n\n if (!isChangingFlipX && !isChangingFlipY) {\n return _util.Promise.reject(_consts.rejectMessages.flip);\n }\n\n _tuiCodeSnippet2.default.extend(setting, newSetting);\n this.setImageProperties(setting, true);\n this._invertAngle(isChangingFlipX, isChangingFlipY);\n this._flipObjects(isChangingFlipX, isChangingFlipY);\n\n return _util.Promise.resolve({\n flipX: setting.flipX,\n flipY: setting.flipY,\n angle: this.getCanvasImage().angle\n });\n }\n\n /**\n * Invert image angle for flip\n * @param {boolean} isChangingFlipX - Change flipX\n * @param {boolean} isChangingFlipY - Change flipY\n */\n\n }, {\n key: '_invertAngle',\n value: function _invertAngle(isChangingFlipX, isChangingFlipY) {\n var canvasImage = this.getCanvasImage();\n var angle = canvasImage.angle;\n\n\n if (isChangingFlipX) {\n angle *= -1;\n }\n if (isChangingFlipY) {\n angle *= -1;\n }\n canvasImage.rotate(parseFloat(angle)).setCoords(); // parseFloat for -0 to 0\n }\n\n /**\n * Flip objects\n * @param {boolean} isChangingFlipX - Change flipX\n * @param {boolean} isChangingFlipY - Change flipY\n * @private\n */\n\n }, {\n key: '_flipObjects',\n value: function _flipObjects(isChangingFlipX, isChangingFlipY) {\n var canvas = this.getCanvas();\n\n if (isChangingFlipX) {\n canvas.forEachObject(function (obj) {\n obj.set({\n angle: parseFloat(obj.angle * -1), // parseFloat for -0 to 0\n flipX: !obj.flipX,\n left: canvas.width - obj.left\n }).setCoords();\n });\n }\n if (isChangingFlipY) {\n canvas.forEachObject(function (obj) {\n obj.set({\n angle: parseFloat(obj.angle * -1), // parseFloat for -0 to 0\n flipY: !obj.flipY,\n top: canvas.height - obj.top\n }).setCoords();\n });\n }\n canvas.renderAll();\n }\n\n /**\n * Reset flip settings\n * @returns {Promise}\n */\n\n }, {\n key: 'reset',\n value: function reset() {\n return this.set({\n flipX: false,\n flipY: false\n });\n }\n\n /**\n * Flip x\n * @returns {Promise}\n */\n\n }, {\n key: 'flipX',\n value: function flipX() {\n var current = this.getCurrentSetting();\n\n return this.set({\n flipX: !current.flipX,\n flipY: current.flipY\n });\n }\n\n /**\n * Flip y\n * @returns {Promise}\n */\n\n }, {\n key: 'flipY',\n value: function flipY() {\n var current = this.getCurrentSetting();\n\n return this.set({\n flipX: current.flipX,\n flipY: !current.flipY\n });\n }\n }]);\n\n return Flip;\n}(_component2.default);\n\nexports.default = Flip;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/flip.js?");
/***/ }),
/***/ "./src/js/component/freeDrawing.js":
/*!*****************************************!*\
!*** ./src/js/component/freeDrawing.js ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Free drawing module, Set brush\n */\n\n\n/**\n * FreeDrawing\n * @class FreeDrawing\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\nvar FreeDrawing = function (_Component) {\n _inherits(FreeDrawing, _Component);\n\n function FreeDrawing(graphics) {\n _classCallCheck(this, FreeDrawing);\n\n /**\n * Brush width\n * @type {number}\n */\n var _this = _possibleConstructorReturn(this, (FreeDrawing.__proto__ || Object.getPrototypeOf(FreeDrawing)).call(this, _consts.componentNames.FREE_DRAWING, graphics));\n\n _this.width = 12;\n\n /**\n * fabric.Color instance for brush color\n * @type {fabric.Color}\n */\n _this.oColor = new _fabric2.default.Color('rgba(0, 0, 0, 0.5)');\n return _this;\n }\n\n /**\n * Start free drawing mode\n * @param {{width: ?number, color: ?string}} [setting] - Brush width & color\n */\n\n\n _createClass(FreeDrawing, [{\n key: 'start',\n value: function start(setting) {\n var canvas = this.getCanvas();\n\n canvas.isDrawingMode = true;\n this.setBrush(setting);\n }\n\n /**\n * Set brush\n * @param {{width: ?number, color: ?string}} [setting] - Brush width & color\n */\n\n }, {\n key: 'setBrush',\n value: function setBrush(setting) {\n var brush = this.getCanvas().freeDrawingBrush;\n\n setting = setting || {};\n this.width = setting.width || this.width;\n if (setting.color) {\n this.oColor = new _fabric2.default.Color(setting.color);\n }\n brush.width = this.width;\n brush.color = this.oColor.toRgba();\n }\n\n /**\n * End free drawing mode\n */\n\n }, {\n key: 'end',\n value: function end() {\n var canvas = this.getCanvas();\n\n canvas.isDrawingMode = false;\n }\n }]);\n\n return FreeDrawing;\n}(_component2.default);\n\nexports.default = FreeDrawing;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/freeDrawing.js?");
/***/ }),
/***/ "./src/js/component/icon.js":
/*!**********************************!*\
!*** ./src/js/component/icon.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Add icon module\n */\n\n\nvar pathMap = {\n arrow: 'M 0 90 H 105 V 120 L 160 60 L 105 0 V 30 H 0 Z',\n cancel: 'M 0 30 L 30 60 L 0 90 L 30 120 L 60 90 L 90 120 L 120 90 ' + 'L 90 60 L 120 30 L 90 0 L 60 30 L 30 0 Z'\n};\n\n/**\n * Icon\n * @class Icon\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\n\nvar Icon = function (_Component) {\n _inherits(Icon, _Component);\n\n function Icon(graphics) {\n _classCallCheck(this, Icon);\n\n /**\n * Default icon color\n * @type {string}\n */\n var _this = _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).call(this, _consts.componentNames.ICON, graphics));\n\n _this._oColor = '#000000';\n\n /**\n * Path value of each icon type\n * @type {Object}\n */\n _this._pathMap = pathMap;\n\n /**\n * Type of the drawing icon\n * @type {string}\n * @private\n */\n _this._type = null;\n\n /**\n * Color of the drawing icon\n * @type {string}\n * @private\n */\n _this._iconColor = null;\n\n /**\n * Event handler list\n * @type {Object}\n * @private\n */\n _this._handlers = {\n mousedown: _this._onFabricMouseDown.bind(_this),\n mousemove: _this._onFabricMouseMove.bind(_this),\n mouseup: _this._onFabricMouseUp.bind(_this)\n };\n return _this;\n }\n\n /**\n * Set states of the current drawing shape\n * @ignore\n * @param {string} type - Icon type ('arrow', 'cancel', custom icon name)\n * @param {string} iconColor - Icon foreground color\n */\n\n\n _createClass(Icon, [{\n key: 'setStates',\n value: function setStates(type, iconColor) {\n this._type = type;\n this._iconColor = iconColor;\n }\n\n /**\n * Start to draw the icon on canvas\n * @ignore\n */\n\n }, {\n key: 'start',\n value: function start() {\n var canvas = this.getCanvas();\n canvas.selection = false;\n canvas.on('mouse:down', this._handlers.mousedown);\n }\n\n /**\n * End to draw the icon on canvas\n * @ignore\n */\n\n }, {\n key: 'end',\n value: function end() {\n var canvas = this.getCanvas();\n\n canvas.selection = true;\n canvas.off({\n 'mouse:down': this._handlers.mousedown\n });\n }\n\n /**\n * Add icon\n * @param {string} type - Icon type\n * @param {Object} options - Icon options\n * @param {string} [options.fill] - Icon foreground color\n * @param {string} [options.left] - Icon x position\n * @param {string} [options.top] - Icon y position\n * @returns {Promise}\n */\n\n }, {\n key: 'add',\n value: function add(type, options) {\n var _this2 = this;\n\n return new _util.Promise(function (resolve, reject) {\n var canvas = _this2.getCanvas();\n var path = _this2._pathMap[type];\n var selectionStyle = _consts.fObjectOptions.SELECTION_STYLE;\n var icon = path ? _this2._createIcon(path) : null;\n _this2._icon = icon;\n\n if (!icon) {\n reject(_consts.rejectMessages.invalidParameters);\n }\n\n icon.set(_tuiCodeSnippet2.default.extend({\n type: 'icon',\n fill: _this2._oColor\n }, selectionStyle, options, _this2.graphics.controlStyle));\n\n canvas.add(icon).setActiveObject(icon);\n\n resolve(_this2.graphics.createObjectProperties(icon));\n });\n }\n\n /**\n * Register icon paths\n * @param {{key: string, value: string}} pathInfos - Path infos\n */\n\n }, {\n key: 'registerPaths',\n value: function registerPaths(pathInfos) {\n var _this3 = this;\n\n _tuiCodeSnippet2.default.forEach(pathInfos, function (path, type) {\n _this3._pathMap[type] = path;\n }, this);\n }\n\n /**\n * Set icon object color\n * @param {string} color - Color to set\n * @param {fabric.Path}[obj] - Current activated path object\n */\n\n }, {\n key: 'setColor',\n value: function setColor(color, obj) {\n this._oColor = color;\n\n if (obj && obj.get('type') === 'icon') {\n obj.set({ fill: this._oColor });\n this.getCanvas().renderAll();\n }\n }\n\n /**\n * Get icon color\n * @param {fabric.Path}[obj] - Current activated path object\n * @returns {string} color\n */\n\n }, {\n key: 'getColor',\n value: function getColor(obj) {\n return obj.fill;\n }\n\n /**\n * Create icon object\n * @param {string} path - Path value to create icon\n * @returns {fabric.Path} Path object\n */\n\n }, {\n key: '_createIcon',\n value: function _createIcon(path) {\n return new _fabric2.default.Path(path);\n }\n\n /**\n * MouseDown event handler on canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseDown',\n value: function _onFabricMouseDown(fEvent) {\n var _this4 = this;\n\n var canvas = this.getCanvas();\n\n this._startPoint = canvas.getPointer(fEvent.e);\n var _startPoint = this._startPoint,\n left = _startPoint.x,\n top = _startPoint.y;\n\n\n this.add(this._type, {\n left: left,\n top: top,\n fill: this._iconColor\n }).then(function () {\n _this4.fire(_consts.eventNames.ADD_OBJECT, _this4.graphics.createObjectProperties(_this4._icon));\n canvas.on('mouse:move', _this4._handlers.mousemove);\n canvas.on('mouse:up', _this4._handlers.mouseup);\n });\n }\n\n /**\n * MouseMove event handler on canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseMove',\n value: function _onFabricMouseMove(fEvent) {\n var canvas = this.getCanvas();\n\n if (!this._icon) {\n return;\n }\n var moveOriginPointer = canvas.getPointer(fEvent.e);\n\n var scaleX = (moveOriginPointer.x - this._startPoint.x) / this._icon.width;\n var scaleY = (moveOriginPointer.y - this._startPoint.y) / this._icon.height;\n\n this._icon.set({\n scaleX: Math.abs(scaleX * 2),\n scaleY: Math.abs(scaleY * 2)\n });\n\n this._icon.setCoords();\n canvas.renderAll();\n }\n\n /**\n * MouseUp event handler on canvas\n * @private\n */\n\n }, {\n key: '_onFabricMouseUp',\n value: function _onFabricMouseUp() {\n var canvas = this.getCanvas();\n\n this.fire(_consts.eventNames.OBJECT_ADDED, this.graphics.createObjectProperties(this._icon));\n\n this._icon = null;\n\n canvas.off('mouse:down', this._handlers.mousedown);\n canvas.off('mouse:move', this._handlers.mousemove);\n canvas.off('mouse:up', this._handlers.mouseup);\n }\n }]);\n\n return Icon;\n}(_component2.default);\n\nexports.default = Icon;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/icon.js?");
/***/ }),
/***/ "./src/js/component/imageLoader.js":
/*!*****************************************!*\
!*** ./src/js/component/imageLoader.js ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Image loader\n */\n\n\nvar imageOption = {\n padding: 0,\n crossOrigin: 'Anonymous'\n};\n\n/**\n * ImageLoader components\n * @extends {Component}\n * @class ImageLoader\n * @param {Graphics} graphics - Graphics instance\n * @ignore\n */\n\nvar ImageLoader = function (_Component) {\n _inherits(ImageLoader, _Component);\n\n function ImageLoader(graphics) {\n _classCallCheck(this, ImageLoader);\n\n return _possibleConstructorReturn(this, (ImageLoader.__proto__ || Object.getPrototypeOf(ImageLoader)).call(this, _consts.componentNames.IMAGE_LOADER, graphics));\n }\n\n /**\n * Load image from url\n * @param {?string} imageName - File name\n * @param {?(fabric.Image|string)} img - fabric.Image instance or URL of an image\n * @returns {Promise}\n */\n\n\n _createClass(ImageLoader, [{\n key: 'load',\n value: function load(imageName, img) {\n var _this2 = this;\n\n var promise = void 0;\n\n if (!imageName && !img) {\n // Back to the initial state, not error.\n var canvas = this.getCanvas();\n\n canvas.backgroundImage = null;\n canvas.renderAll();\n\n promise = new _util.Promise(function (resolve) {\n _this2.setCanvasImage('', null);\n resolve();\n });\n } else {\n promise = this._setBackgroundImage(img).then(function (oImage) {\n _this2.setCanvasImage(imageName, oImage);\n _this2.adjustCanvasDimension();\n\n return oImage;\n });\n }\n\n return promise;\n }\n\n /**\n * Set background image\n * @param {?(fabric.Image|String)} img fabric.Image instance or URL of an image to set background to\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: '_setBackgroundImage',\n value: function _setBackgroundImage(img) {\n var _this3 = this;\n\n if (!img) {\n return _util.Promise.reject(_consts.rejectMessages.loadImage);\n }\n\n return new _util.Promise(function (resolve, reject) {\n var canvas = _this3.getCanvas();\n\n canvas.setBackgroundImage(img, function () {\n var oImage = canvas.backgroundImage;\n\n if (oImage && oImage.getElement()) {\n resolve(oImage);\n } else {\n reject(_consts.rejectMessages.loadingImageFailed);\n }\n }, imageOption);\n });\n }\n }]);\n\n return ImageLoader;\n}(_component2.default);\n\nexports.default = ImageLoader;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/imageLoader.js?");
/***/ }),
/***/ "./src/js/component/line.js":
/*!**********************************!*\
!*** ./src/js/component/line.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _arrowLine = __webpack_require__(/*! ../extension/arrowLine */ \"./src/js/extension/arrowLine.js\");\n\nvar _arrowLine2 = _interopRequireDefault(_arrowLine);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Free drawing module, Set brush\n */\n\n\n/**\n * Line\n * @class Line\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\nvar Line = function (_Component) {\n _inherits(Line, _Component);\n\n function Line(graphics) {\n _classCallCheck(this, Line);\n\n /**\n * Brush width\n * @type {number}\n * @private\n */\n var _this = _possibleConstructorReturn(this, (Line.__proto__ || Object.getPrototypeOf(Line)).call(this, _consts.componentNames.LINE, graphics));\n\n _this._width = 12;\n\n /**\n * fabric.Color instance for brush color\n * @type {fabric.Color}\n * @private\n */\n _this._oColor = new _fabric2.default.Color('rgba(0, 0, 0, 0.5)');\n\n /**\n * Listeners\n * @type {object.<string, function>}\n * @private\n */\n _this._listeners = {\n mousedown: _this._onFabricMouseDown.bind(_this),\n mousemove: _this._onFabricMouseMove.bind(_this),\n mouseup: _this._onFabricMouseUp.bind(_this)\n };\n return _this;\n }\n\n /**\n * Start drawing line mode\n * @param {{width: ?number, color: ?string}} [setting] - Brush width & color\n */\n\n\n _createClass(Line, [{\n key: 'setHeadOption',\n value: function setHeadOption(setting) {\n var _setting$arrowType = setting.arrowType,\n arrowType = _setting$arrowType === undefined ? {\n head: null,\n tail: null\n } : _setting$arrowType;\n\n\n this._arrowType = arrowType;\n }\n\n /**\n * Start drawing line mode\n * @param {{width: ?number, color: ?string}} [setting] - Brush width & color\n */\n\n }, {\n key: 'start',\n value: function start() {\n var setting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var canvas = this.getCanvas();\n\n canvas.defaultCursor = 'crosshair';\n canvas.selection = false;\n\n this.setHeadOption(setting);\n this.setBrush(setting);\n\n canvas.forEachObject(function (obj) {\n obj.set({\n evented: false\n });\n });\n\n canvas.on({\n 'mouse:down': this._listeners.mousedown\n });\n }\n\n /**\n * Set brush\n * @param {{width: ?number, color: ?string}} [setting] - Brush width & color\n */\n\n }, {\n key: 'setBrush',\n value: function setBrush(setting) {\n var brush = this.getCanvas().freeDrawingBrush;\n\n setting = setting || {};\n this._width = setting.width || this._width;\n\n if (setting.color) {\n this._oColor = new _fabric2.default.Color(setting.color);\n }\n brush.width = this._width;\n brush.color = this._oColor.toRgba();\n }\n\n /**\n * End drawing line mode\n */\n\n }, {\n key: 'end',\n value: function end() {\n var canvas = this.getCanvas();\n\n canvas.defaultCursor = 'default';\n canvas.selection = true;\n\n canvas.forEachObject(function (obj) {\n obj.set({\n evented: true\n });\n });\n\n canvas.off('mouse:down', this._listeners.mousedown);\n }\n\n /**\n * Mousedown event handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseDown',\n value: function _onFabricMouseDown(fEvent) {\n var canvas = this.getCanvas();\n\n var _canvas$getPointer = canvas.getPointer(fEvent.e),\n x = _canvas$getPointer.x,\n y = _canvas$getPointer.y;\n\n var points = [x, y, x, y];\n\n this._line = new _arrowLine2.default(points, {\n stroke: this._oColor.toRgba(),\n strokeWidth: this._width,\n arrowType: this._arrowType,\n evented: false\n });\n\n this._line.set(_consts.fObjectOptions.SELECTION_STYLE);\n\n canvas.add(this._line);\n\n canvas.on({\n 'mouse:move': this._listeners.mousemove,\n 'mouse:up': this._listeners.mouseup\n });\n\n this.fire(_consts.eventNames.ADD_OBJECT, this._createLineEventObjectProperties());\n }\n\n /**\n * Mousemove event handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseMove',\n value: function _onFabricMouseMove(fEvent) {\n var canvas = this.getCanvas();\n var pointer = canvas.getPointer(fEvent.e);\n\n this._line.set({\n x2: pointer.x,\n y2: pointer.y\n });\n\n this._line.setCoords();\n\n canvas.renderAll();\n }\n\n /**\n * Mouseup event handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseUp',\n value: function _onFabricMouseUp() {\n var canvas = this.getCanvas();\n\n this.fire(_consts.eventNames.OBJECT_ADDED, this._createLineEventObjectProperties());\n\n this._line = null;\n\n canvas.off({\n 'mouse:move': this._listeners.mousemove,\n 'mouse:up': this._listeners.mouseup\n });\n }\n\n /**\n * create line event object properties\n * @returns {Object} properties line object\n * @private\n */\n\n }, {\n key: '_createLineEventObjectProperties',\n value: function _createLineEventObjectProperties() {\n var params = this.graphics.createObjectProperties(this._line);\n var _line = this._line,\n x1 = _line.x1,\n x2 = _line.x2,\n y1 = _line.y1,\n y2 = _line.y2;\n\n\n return _tuiCodeSnippet2.default.extend({}, params, {\n startPosition: {\n x: x1,\n y: y1\n },\n endPosition: {\n x: x2,\n y: y2\n }\n });\n }\n }]);\n\n return Line;\n}(_component2.default);\n\nexports.default = Line;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/line.js?");
/***/ }),
/***/ "./src/js/component/rotation.js":
/*!**************************************!*\
!*** ./src/js/component/rotation.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Image rotation module\n */\n\n\n/**\n * Image Rotation component\n * @class Rotation\n * @extends {Component}\n * @param {Graphics} graphics - Graphics instance\n * @ignore\n */\nvar Rotation = function (_Component) {\n _inherits(Rotation, _Component);\n\n function Rotation(graphics) {\n _classCallCheck(this, Rotation);\n\n return _possibleConstructorReturn(this, (Rotation.__proto__ || Object.getPrototypeOf(Rotation)).call(this, _consts.componentNames.ROTATION, graphics));\n }\n\n /**\n * Get current angle\n * @returns {Number}\n */\n\n\n _createClass(Rotation, [{\n key: 'getCurrentAngle',\n value: function getCurrentAngle() {\n return this.getCanvasImage().angle;\n }\n\n /**\n * Set angle of the image\n *\n * Do not call \"this.setImageProperties\" for setting angle directly.\n * Before setting angle, The originX,Y of image should be set to center.\n * See \"http://fabricjs.com/docs/fabric.Object.html#setAngle\"\n *\n * @param {number} angle - Angle value\n * @returns {Promise}\n */\n\n }, {\n key: 'setAngle',\n value: function setAngle(angle) {\n var oldAngle = this.getCurrentAngle() % 360; // The angle is lower than 2*PI(===360 degrees)\n\n angle %= 360;\n\n var canvasImage = this.getCanvasImage();\n var oldImageCenter = canvasImage.getCenterPoint();\n canvasImage.set({ angle: angle }).setCoords();\n this.adjustCanvasDimension();\n var newImageCenter = canvasImage.getCenterPoint();\n this._rotateForEachObject(oldImageCenter, newImageCenter, angle - oldAngle);\n\n return _util.Promise.resolve(angle);\n }\n\n /**\n * Rotate for each object\n * @param {fabric.Point} oldImageCenter - Image center point before rotation\n * @param {fabric.Point} newImageCenter - Image center point after rotation\n * @param {number} angleDiff - Image angle difference after rotation\n * @private\n */\n\n }, {\n key: '_rotateForEachObject',\n value: function _rotateForEachObject(oldImageCenter, newImageCenter, angleDiff) {\n var canvas = this.getCanvas();\n var centerDiff = {\n x: oldImageCenter.x - newImageCenter.x,\n y: oldImageCenter.y - newImageCenter.y\n };\n\n canvas.forEachObject(function (obj) {\n var objCenter = obj.getCenterPoint();\n var radian = _fabric2.default.util.degreesToRadians(angleDiff);\n var newObjCenter = _fabric2.default.util.rotatePoint(objCenter, oldImageCenter, radian);\n\n obj.set({\n left: newObjCenter.x - centerDiff.x,\n top: newObjCenter.y - centerDiff.y,\n angle: (obj.angle + angleDiff) % 360\n });\n obj.setCoords();\n });\n canvas.renderAll();\n }\n\n /**\n * Rotate the image\n * @param {number} additionalAngle - Additional angle\n * @returns {Promise}\n */\n\n }, {\n key: 'rotate',\n value: function rotate(additionalAngle) {\n var current = this.getCurrentAngle();\n\n return this.setAngle(current + additionalAngle);\n }\n }]);\n\n return Rotation;\n}(_component2.default);\n\nexports.default = Rotation;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/rotation.js?");
/***/ }),
/***/ "./src/js/component/shape.js":
/*!***********************************!*\
!*** ./src/js/component/shape.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nvar _shapeResizeHelper = __webpack_require__(/*! ../helper/shapeResizeHelper */ \"./src/js/helper/shapeResizeHelper.js\");\n\nvar _shapeResizeHelper2 = _interopRequireDefault(_shapeResizeHelper);\n\nvar _shapeFilterFillHelper = __webpack_require__(/*! ../helper/shapeFilterFillHelper */ \"./src/js/helper/shapeFilterFillHelper.js\");\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Shape component\n */\n\n\nvar SHAPE_INIT_OPTIONS = (0, _tuiCodeSnippet.extend)({\n strokeWidth: 1,\n stroke: '#000000',\n fill: '#ffffff',\n width: 1,\n height: 1,\n rx: 0,\n ry: 0\n}, _consts.SHAPE_DEFAULT_OPTIONS);\n\nvar DEFAULT_TYPE = 'rect';\nvar DEFAULT_WIDTH = 20;\nvar DEFAULT_HEIGHT = 20;\n\n/**\n * Make fill option\n * @param {Object} options - Options to create the shape\n * @param {Object.Image} canvasImage - canvas background image\n * @param {Function} createStaticCanvas - static canvas creater\n * @returns {Object} - shape option\n * @private\n */\nfunction makeFabricFillOption(options, canvasImage, createStaticCanvas) {\n var fillOption = options.fill;\n var fillType = (0, _util.getFillTypeFromOption)(options.fill);\n var fill = fillOption;\n\n if (fillOption.color) {\n fill = fillOption.color;\n }\n\n var extOption = null;\n if (fillType === 'filter') {\n var newStaticCanvas = createStaticCanvas();\n extOption = (0, _shapeFilterFillHelper.makeFillPatternForFilter)(canvasImage, fillOption.filter, newStaticCanvas);\n } else {\n extOption = { fill: fill };\n }\n\n return (0, _tuiCodeSnippet.extend)({}, options, extOption);\n}\n\n/**\n * Shape\n * @class Shape\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\n\nvar Shape = function (_Component) {\n _inherits(Shape, _Component);\n\n function Shape(graphics) {\n _classCallCheck(this, Shape);\n\n /**\n * Object of The drawing shape\n * @type {fabric.Object}\n * @private\n */\n var _this = _possibleConstructorReturn(this, (Shape.__proto__ || Object.getPrototypeOf(Shape)).call(this, _consts.componentNames.SHAPE, graphics));\n\n _this._shapeObj = null;\n\n /**\n * Type of the drawing shape\n * @type {string}\n * @private\n */\n _this._type = DEFAULT_TYPE;\n\n /**\n * Options to draw the shape\n * @type {Object}\n * @private\n */\n _this._options = (0, _tuiCodeSnippet.extend)({}, SHAPE_INIT_OPTIONS);\n\n /**\n * Whether the shape object is selected or not\n * @type {boolean}\n * @private\n */\n _this._isSelected = false;\n\n /**\n * Pointer for drawing shape (x, y)\n * @type {Object}\n * @private\n */\n _this._startPoint = {};\n\n /**\n * Using shortcut on drawing shape\n * @type {boolean}\n * @private\n */\n _this._withShiftKey = false;\n\n /**\n * Event handler list\n * @type {Object}\n * @private\n */\n _this._handlers = {\n mousedown: _this._onFabricMouseDown.bind(_this),\n mousemove: _this._onFabricMouseMove.bind(_this),\n mouseup: _this._onFabricMouseUp.bind(_this),\n keydown: _this._onKeyDown.bind(_this),\n keyup: _this._onKeyUp.bind(_this)\n };\n return _this;\n }\n\n /**\n * Start to draw the shape on canvas\n * @ignore\n */\n\n\n _createClass(Shape, [{\n key: 'start',\n value: function start() {\n var canvas = this.getCanvas();\n\n this._isSelected = false;\n\n canvas.defaultCursor = 'crosshair';\n canvas.selection = false;\n canvas.uniformScaling = true;\n canvas.on({\n 'mouse:down': this._handlers.mousedown\n });\n\n _fabric2.default.util.addListener(document, 'keydown', this._handlers.keydown);\n _fabric2.default.util.addListener(document, 'keyup', this._handlers.keyup);\n }\n\n /**\n * End to draw the shape on canvas\n * @ignore\n */\n\n }, {\n key: 'end',\n value: function end() {\n var canvas = this.getCanvas();\n\n this._isSelected = false;\n\n canvas.defaultCursor = 'default';\n\n canvas.selection = true;\n canvas.uniformScaling = false;\n canvas.off({\n 'mouse:down': this._handlers.mousedown\n });\n\n _fabric2.default.util.removeListener(document, 'keydown', this._handlers.keydown);\n _fabric2.default.util.removeListener(document, 'keyup', this._handlers.keyup);\n }\n\n /**\n * Set states of the current drawing shape\n * @ignore\n * @param {string} type - Shape type (ex: 'rect', 'circle')\n * @param {Object} [options] - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - {@link ShapeFillOption} or\n * Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stoke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n */\n\n }, {\n key: 'setStates',\n value: function setStates(type, options) {\n this._type = type;\n\n if (options) {\n this._options = (0, _tuiCodeSnippet.extend)(this._options, options);\n }\n }\n\n /**\n * Add the shape\n * @ignore\n * @param {string} type - Shape type (ex: 'rect', 'circle')\n * @param {Object} options - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - ShapeFillOption or Shape foreground color (ex: '#fff', 'transparent') or ShapeFillOption object\n * @param {string} [options.stroke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.isRegular] - Whether scaling shape has 1:1 ratio or not\n * @returns {Promise}\n */\n\n }, {\n key: 'add',\n value: function add(type, options) {\n var _this2 = this;\n\n return new _util.Promise(function (resolve) {\n var canvas = _this2.getCanvas();\n var extendOption = _this2._extendOptions(options);\n\n var shapeObj = _this2._createInstance(type, extendOption);\n var objectProperties = _this2.graphics.createObjectProperties(shapeObj);\n\n _this2._bindEventOnShape(shapeObj);\n\n canvas.add(shapeObj).setActiveObject(shapeObj);\n\n _this2._resetPositionFillFilter(shapeObj);\n\n resolve(objectProperties);\n });\n }\n\n /**\n * Change the shape\n * @ignore\n * @param {fabric.Object} shapeObj - Selected shape object on canvas\n * @param {Object} options - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - {@link ShapeFillOption} or\n * Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stroke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.isRegular] - Whether scaling shape has 1:1 ratio or not\n * @returns {Promise}\n */\n\n }, {\n key: 'change',\n value: function change(shapeObj, options) {\n var _this3 = this;\n\n return new _util.Promise(function (resolve, reject) {\n if (!(0, _util.isShape)(shapeObj)) {\n reject(_consts.rejectMessages.unsupportedType);\n }\n var hasFillOption = (0, _util.getFillTypeFromOption)(options.fill) === 'filter';\n var _graphics = _this3.graphics,\n canvasImage = _graphics.canvasImage,\n createStaticCanvas = _graphics.createStaticCanvas;\n\n\n shapeObj.set(hasFillOption ? makeFabricFillOption(options, canvasImage, createStaticCanvas) : options);\n\n if (hasFillOption) {\n _this3._resetPositionFillFilter(shapeObj);\n }\n\n _this3.getCanvas().renderAll();\n resolve();\n });\n }\n\n /**\n * make fill property for user event\n * @param {fabric.Object} shapeObj - fabric object\n * @returns {Object}\n */\n\n }, {\n key: 'makeFillPropertyForUserEvent',\n value: function makeFillPropertyForUserEvent(shapeObj) {\n var fillType = (0, _util.getFillTypeFromObject)(shapeObj);\n var fillProp = {};\n\n if (fillType === _consts.SHAPE_FILL_TYPE.FILTER) {\n var fillImage = (0, _shapeFilterFillHelper.getFillImageFromShape)(shapeObj);\n var filterOption = (0, _shapeFilterFillHelper.makeFilterOptionFromFabricImage)(fillImage);\n\n fillProp.type = fillType;\n fillProp.filter = filterOption;\n } else {\n fillProp.type = _consts.SHAPE_FILL_TYPE.COLOR;\n fillProp.color = shapeObj.fill || 'transparent';\n }\n\n return fillProp;\n }\n\n /**\n * Copy object handling.\n * @param {fabric.Object} shapeObj - Shape object\n * @param {fabric.Object} originalShapeObj - Shape object\n */\n\n }, {\n key: 'processForCopiedObject',\n value: function processForCopiedObject(shapeObj, originalShapeObj) {\n this._bindEventOnShape(shapeObj);\n\n if ((0, _util.getFillTypeFromObject)(shapeObj) === 'filter') {\n var fillImage = (0, _shapeFilterFillHelper.getFillImageFromShape)(originalShapeObj);\n var filterOption = (0, _shapeFilterFillHelper.makeFilterOptionFromFabricImage)(fillImage);\n var newStaticCanvas = this.graphics.createStaticCanvas();\n\n shapeObj.set((0, _shapeFilterFillHelper.makeFillPatternForFilter)(this.graphics.canvasImage, filterOption, newStaticCanvas));\n this._resetPositionFillFilter(shapeObj);\n }\n }\n\n /**\n * Create the instance of shape\n * @param {string} type - Shape type\n * @param {Object} options - Options to creat the shape\n * @returns {fabric.Object} Shape instance\n * @private\n */\n\n }, {\n key: '_createInstance',\n value: function _createInstance(type, options) {\n var instance = void 0;\n\n switch (type) {\n case 'rect':\n instance = new _fabric2.default.Rect(options);\n break;\n case 'circle':\n instance = new _fabric2.default.Ellipse((0, _tuiCodeSnippet.extend)({\n type: 'circle'\n }, options));\n break;\n case 'triangle':\n instance = new _fabric2.default.Triangle(options);\n break;\n default:\n instance = {};\n }\n\n return instance;\n }\n\n /**\n * Get the options to create the shape\n * @param {Object} options - Options to creat the shape\n * @returns {Object} Shape options\n * @private\n */\n\n }, {\n key: '_extendOptions',\n value: function _extendOptions(options) {\n var selectionStyles = _consts.fObjectOptions.SELECTION_STYLE;\n var _graphics2 = this.graphics,\n canvasImage = _graphics2.canvasImage,\n createStaticCanvas = _graphics2.createStaticCanvas;\n\n\n options = (0, _tuiCodeSnippet.extend)({}, SHAPE_INIT_OPTIONS, this._options, selectionStyles, options);\n\n return makeFabricFillOption(options, canvasImage, createStaticCanvas);\n }\n\n /**\n * Bind fabric events on the creating shape object\n * @param {fabric.Object} shapeObj - Shape object\n * @private\n */\n\n }, {\n key: '_bindEventOnShape',\n value: function _bindEventOnShape(shapeObj) {\n var self = this;\n var canvas = this.getCanvas();\n\n shapeObj.on({\n added: function added() {\n self._shapeObj = this;\n _shapeResizeHelper2.default.setOrigins(self._shapeObj);\n },\n selected: function selected() {\n self._isSelected = true;\n self._shapeObj = this;\n canvas.uniformScaling = true;\n canvas.defaultCursor = 'default';\n _shapeResizeHelper2.default.setOrigins(self._shapeObj);\n },\n deselected: function deselected() {\n self._isSelected = false;\n self._shapeObj = null;\n canvas.defaultCursor = 'crosshair';\n canvas.uniformScaling = false;\n },\n modified: function modified() {\n var currentObj = self._shapeObj;\n\n _shapeResizeHelper2.default.adjustOriginToCenter(currentObj);\n _shapeResizeHelper2.default.setOrigins(currentObj);\n },\n modifiedInGroup: function modifiedInGroup(activeSelection) {\n self._fillFilterRePositionInGroupSelection(shapeObj, activeSelection);\n },\n moving: function moving() {\n self._resetPositionFillFilter(this);\n },\n rotating: function rotating() {\n self._resetPositionFillFilter(this);\n },\n scaling: function scaling(fEvent) {\n var pointer = canvas.getPointer(fEvent.e);\n var currentObj = self._shapeObj;\n\n canvas.setCursor('crosshair');\n _shapeResizeHelper2.default.resize(currentObj, pointer, true);\n\n self._resetPositionFillFilter(this);\n }\n });\n }\n\n /**\n * MouseDown event handler on canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseDown',\n value: function _onFabricMouseDown(fEvent) {\n if (!fEvent.target) {\n this._isSelected = false;\n this._shapeObj = false;\n }\n\n if (!this._isSelected && !this._shapeObj) {\n var canvas = this.getCanvas();\n this._startPoint = canvas.getPointer(fEvent.e);\n\n canvas.on({\n 'mouse:move': this._handlers.mousemove,\n 'mouse:up': this._handlers.mouseup\n });\n }\n }\n\n /**\n * MouseDown event handler on canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event object\n * @private\n */\n\n }, {\n key: '_onFabricMouseMove',\n value: function _onFabricMouseMove(fEvent) {\n var _this4 = this;\n\n var canvas = this.getCanvas();\n var pointer = canvas.getPointer(fEvent.e);\n var startPointX = this._startPoint.x;\n var startPointY = this._startPoint.y;\n var width = startPointX - pointer.x;\n var height = startPointY - pointer.y;\n var shape = this._shapeObj;\n\n if (!shape) {\n this.add(this._type, {\n left: startPointX,\n top: startPointY,\n width: width,\n height: height\n }).then(function (objectProps) {\n _this4.fire(_consts.eventNames.ADD_OBJECT, objectProps);\n });\n } else {\n this._shapeObj.set({\n isRegular: this._withShiftKey\n });\n\n _shapeResizeHelper2.default.resize(shape, pointer);\n canvas.renderAll();\n\n this._resetPositionFillFilter(shape);\n }\n }\n\n /**\n * MouseUp event handler on canvas\n * @private\n */\n\n }, {\n key: '_onFabricMouseUp',\n value: function _onFabricMouseUp() {\n var _this5 = this;\n\n var canvas = this.getCanvas();\n var startPointX = this._startPoint.x;\n var startPointY = this._startPoint.y;\n var shape = this._shapeObj;\n\n if (!shape) {\n this.add(this._type, {\n left: startPointX,\n top: startPointY,\n width: DEFAULT_WIDTH,\n height: DEFAULT_HEIGHT\n }).then(function (objectProps) {\n _this5.fire(_consts.eventNames.ADD_OBJECT, objectProps);\n });\n } else if (shape) {\n _shapeResizeHelper2.default.adjustOriginToCenter(shape);\n this.fire(_consts.eventNames.OBJECT_ADDED, this.graphics.createObjectProperties(shape));\n }\n\n canvas.off({\n 'mouse:move': this._handlers.mousemove,\n 'mouse:up': this._handlers.mouseup\n });\n }\n\n /**\n * Keydown event handler on document\n * @param {KeyboardEvent} e - Event object\n * @private\n */\n\n }, {\n key: '_onKeyDown',\n value: function _onKeyDown(e) {\n if (e.keyCode === _consts.keyCodes.SHIFT) {\n this._withShiftKey = true;\n\n if (this._shapeObj) {\n this._shapeObj.isRegular = true;\n }\n }\n }\n\n /**\n * Keyup event handler on document\n * @param {KeyboardEvent} e - Event object\n * @private\n */\n\n }, {\n key: '_onKeyUp',\n value: function _onKeyUp(e) {\n if (e.keyCode === _consts.keyCodes.SHIFT) {\n this._withShiftKey = false;\n\n if (this._shapeObj) {\n this._shapeObj.isRegular = false;\n }\n }\n }\n\n /**\n * Reset shape position and internal proportions in the filter type fill area.\n * @param {fabric.Object} shapeObj - Shape object\n * @private\n */\n\n }, {\n key: '_resetPositionFillFilter',\n value: function _resetPositionFillFilter(shapeObj) {\n if ((0, _util.getFillTypeFromObject)(shapeObj) !== 'filter') {\n return;\n }\n\n var _getCustomProperty = (0, _util.getCustomProperty)(shapeObj, 'patternSourceCanvas'),\n patternSourceCanvas = _getCustomProperty.patternSourceCanvas;\n\n var fillImage = (0, _shapeFilterFillHelper.getFillImageFromShape)(shapeObj);\n\n var _getCustomProperty2 = (0, _util.getCustomProperty)(fillImage, 'originalAngle'),\n originalAngle = _getCustomProperty2.originalAngle;\n\n if (this.graphics.canvasImage.angle !== originalAngle) {\n (0, _shapeFilterFillHelper.reMakePatternImageSource)(shapeObj, this.graphics.canvasImage);\n }\n var originX = shapeObj.originX,\n originY = shapeObj.originY;\n\n\n _shapeResizeHelper2.default.adjustOriginToCenter(shapeObj);\n\n shapeObj.width *= shapeObj.scaleX;\n shapeObj.height *= shapeObj.scaleY;\n shapeObj.rx *= shapeObj.scaleX;\n shapeObj.ry *= shapeObj.scaleY;\n shapeObj.scaleX = 1;\n shapeObj.scaleY = 1;\n\n (0, _shapeFilterFillHelper.rePositionFilterTypeFillImage)(shapeObj);\n\n (0, _util.changeOrigin)(shapeObj, {\n originX: originX,\n originY: originY\n });\n\n (0, _shapeFilterFillHelper.resetFillPatternCanvas)(patternSourceCanvas);\n }\n\n /**\n * Reset filter area position within group selection.\n * @param {fabric.Object} shapeObj - Shape object\n * @param {fabric.ActiveSelection} activeSelection - Shape object\n * @private\n */\n\n }, {\n key: '_fillFilterRePositionInGroupSelection',\n value: function _fillFilterRePositionInGroupSelection(shapeObj, activeSelection) {\n if (activeSelection.scaleX !== 1 || activeSelection.scaleY !== 1) {\n // This is necessary because the group's scale transition state affects the relative size of the fill area.\n // The only way to reset the object transformation scale state to neutral.\n // {@link https://github.com/fabricjs/fabric.js/issues/5372}\n activeSelection.addWithUpdate();\n }\n\n var angle = shapeObj.angle,\n left = shapeObj.left,\n top = shapeObj.top;\n\n\n activeSelection.realizeTransform(shapeObj);\n this._resetPositionFillFilter(shapeObj);\n\n shapeObj.set({\n angle: angle,\n left: left,\n top: top\n });\n }\n }]);\n\n return Shape;\n}(_component2.default);\n\nexports.default = Shape;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/shape.js?");
/***/ }),
/***/ "./src/js/component/text.js":
/*!**********************************!*\
!*** ./src/js/component/text.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _component = __webpack_require__(/*! ../interface/component */ \"./src/js/interface/component.js\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Text module\n */\n\n\nvar defaultStyles = {\n fill: '#000000',\n left: 0,\n top: 0\n};\nvar resetStyles = {\n fill: '#000000',\n fontStyle: 'normal',\n fontWeight: 'normal',\n textAlign: 'left',\n underline: false\n};\n\nvar DBCLICK_TIME = 500;\n\n/**\n * Text\n * @class Text\n * @param {Graphics} graphics - Graphics instance\n * @extends {Component}\n * @ignore\n */\n\nvar Text = function (_Component) {\n _inherits(Text, _Component);\n\n function Text(graphics) {\n _classCallCheck(this, Text);\n\n /**\n * Default text style\n * @type {Object}\n */\n var _this = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, _consts.componentNames.TEXT, graphics));\n\n _this._defaultStyles = defaultStyles;\n\n /**\n * Selected state\n * @type {boolean}\n */\n _this._isSelected = false;\n\n /**\n * Selected text object\n * @type {Object}\n */\n _this._selectedObj = {};\n\n /**\n * Editing text object\n * @type {Object}\n */\n _this._editingObj = {};\n\n /**\n * Listeners for fabric event\n * @type {Object}\n */\n _this._listeners = {\n mousedown: _this._onFabricMouseDown.bind(_this),\n select: _this._onFabricSelect.bind(_this),\n selectClear: _this._onFabricSelectClear.bind(_this),\n scaling: _this._onFabricScaling.bind(_this)\n };\n\n /**\n * Textarea element for editing\n * @type {HTMLElement}\n */\n _this._textarea = null;\n\n /**\n * Ratio of current canvas\n * @type {number}\n */\n _this._ratio = 1;\n\n /**\n * Last click time\n * @type {Date}\n */\n _this._lastClickTime = new Date().getTime();\n\n /**\n * Text object infos before editing\n * @type {Object}\n */\n _this._editingObjInfos = {};\n\n /**\n * Previous state of editing\n * @type {boolean}\n */\n _this.isPrevEditing = false;\n return _this;\n }\n\n /**\n * Start input text mode\n */\n\n\n _createClass(Text, [{\n key: 'start',\n value: function start() {\n var _this2 = this;\n\n var canvas = this.getCanvas();\n\n canvas.selection = false;\n canvas.defaultCursor = 'text';\n canvas.on({\n 'mouse:down': this._listeners.mousedown,\n 'selection:created': this._listeners.select,\n 'selection:updated': this._listeners.select,\n 'before:selection:cleared': this._listeners.selectClear,\n 'object:scaling': this._listeners.scaling,\n 'text:editing': this._listeners.modify\n });\n\n canvas.forEachObject(function (obj) {\n if (obj.type === 'i-text') {\n _this2.adjustOriginPosition(obj, 'start');\n }\n });\n\n this.setCanvasRatio();\n }\n\n /**\n * End input text mode\n */\n\n }, {\n key: 'end',\n value: function end() {\n var _this3 = this;\n\n var canvas = this.getCanvas();\n\n canvas.selection = true;\n canvas.defaultCursor = 'default';\n\n canvas.forEachObject(function (obj) {\n if (obj.type === 'i-text') {\n if (obj.text === '') {\n canvas.remove(obj);\n } else {\n _this3.adjustOriginPosition(obj, 'end');\n }\n }\n });\n\n canvas.off({\n 'mouse:down': this._listeners.mousedown,\n 'object:selected': this._listeners.select,\n 'before:selection:cleared': this._listeners.selectClear,\n 'object:scaling': this._listeners.scaling,\n 'text:editing': this._listeners.modify\n });\n }\n\n /**\n * Adjust the origin position\n * @param {fabric.Object} text - text object\n * @param {string} editStatus - 'start' or 'end'\n */\n\n }, {\n key: 'adjustOriginPosition',\n value: function adjustOriginPosition(text, editStatus) {\n var originX = 'center',\n originY = 'center';\n\n if (editStatus === 'start') {\n originX = 'left';\n originY = 'top';\n }\n\n var _text$getPointByOrigi = text.getPointByOrigin(originX, originY),\n left = _text$getPointByOrigi.x,\n top = _text$getPointByOrigi.y;\n\n text.set({\n left: left,\n top: top,\n originX: originX,\n originY: originY\n });\n text.setCoords();\n }\n\n /**\n * Add new text on canvas image\n * @param {string} text - Initial input text\n * @param {Object} options - Options for generating text\n * @param {Object} [options.styles] Initial styles\n * @param {string} [options.styles.fill] Color\n * @param {string} [options.styles.fontFamily] Font type for text\n * @param {number} [options.styles.fontSize] Size\n * @param {string} [options.styles.fontStyle] Type of inclination (normal / italic)\n * @param {string} [options.styles.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [options.styles.textAlign] Type of text align (left / center / right)\n * @param {string} [options.styles.textDecoration] Type of line (underline / line-through / overline)\n * @param {{x: number, y: number}} [options.position] - Initial position\n * @returns {Promise}\n */\n\n }, {\n key: 'add',\n value: function add(text, options) {\n var _this4 = this;\n\n return new _util.Promise(function (resolve) {\n var canvas = _this4.getCanvas();\n var newText = null;\n var selectionStyle = _consts.fObjectOptions.SELECTION_STYLE;\n var styles = _this4._defaultStyles;\n\n _this4._setInitPos(options.position);\n\n if (options.styles) {\n styles = _tuiCodeSnippet2.default.extend(styles, options.styles);\n }\n\n if (!_tuiCodeSnippet2.default.isExisty(options.autofocus)) {\n options.autofocus = true;\n }\n\n newText = new _fabric2.default.IText(text, styles);\n selectionStyle = _tuiCodeSnippet2.default.extend({}, selectionStyle, {\n originX: 'left',\n originY: 'top'\n });\n\n newText.set(selectionStyle);\n newText.on({\n mouseup: _this4._onFabricMouseUp.bind(_this4)\n });\n\n canvas.add(newText);\n\n if (options.autofocus) {\n newText.enterEditing();\n newText.selectAll();\n }\n\n if (!canvas.getActiveObject()) {\n canvas.setActiveObject(newText);\n }\n\n _this4.isPrevEditing = true;\n resolve(_this4.graphics.createObjectProperties(newText));\n });\n }\n\n /**\n * Change text of activate object on canvas image\n * @param {Object} activeObj - Current selected text object\n * @param {string} text - Changed text\n * @returns {Promise}\n */\n\n }, {\n key: 'change',\n value: function change(activeObj, text) {\n var _this5 = this;\n\n return new _util.Promise(function (resolve) {\n activeObj.set('text', text);\n\n _this5.getCanvas().renderAll();\n resolve();\n });\n }\n\n /**\n * Set style\n * @param {Object} activeObj - Current selected text object\n * @param {Object} styleObj - Initial styles\n * @param {string} [styleObj.fill] Color\n * @param {string} [styleObj.fontFamily] Font type for text\n * @param {number} [styleObj.fontSize] Size\n * @param {string} [styleObj.fontStyle] Type of inclination (normal / italic)\n * @param {string} [styleObj.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [styleObj.textAlign] Type of text align (left / center / right)\n * @param {string} [styleObj.textDecoration] Type of line (underline / line-through / overline)\n * @returns {Promise}\n */\n\n }, {\n key: 'setStyle',\n value: function setStyle(activeObj, styleObj) {\n var _this6 = this;\n\n return new _util.Promise(function (resolve) {\n _tuiCodeSnippet2.default.forEach(styleObj, function (val, key) {\n if (activeObj[key] === val && key !== 'fontSize') {\n styleObj[key] = resetStyles[key] || '';\n }\n }, _this6);\n\n if ('textDecoration' in styleObj) {\n _tuiCodeSnippet2.default.extend(styleObj, _this6._getTextDecorationAdaptObject(styleObj.textDecoration));\n }\n\n activeObj.set(styleObj);\n\n _this6.getCanvas().renderAll();\n resolve();\n });\n }\n\n /**\n * Get the text\n * @param {Object} activeObj - Current selected text object\n * @returns {String} text\n */\n\n }, {\n key: 'getText',\n value: function getText(activeObj) {\n return activeObj.text;\n }\n\n /**\n * Set infos of the current selected object\n * @param {fabric.Text} obj - Current selected text object\n * @param {boolean} state - State of selecting\n */\n\n }, {\n key: 'setSelectedInfo',\n value: function setSelectedInfo(obj, state) {\n this._selectedObj = obj;\n this._isSelected = state;\n }\n\n /**\n * Whether object is selected or not\n * @returns {boolean} State of selecting\n */\n\n }, {\n key: 'isSelected',\n value: function isSelected() {\n return this._isSelected;\n }\n\n /**\n * Get current selected text object\n * @returns {fabric.Text} Current selected text object\n */\n\n }, {\n key: 'getSelectedObj',\n value: function getSelectedObj() {\n return this._selectedObj;\n }\n\n /**\n * Set ratio value of canvas\n */\n\n }, {\n key: 'setCanvasRatio',\n value: function setCanvasRatio() {\n var canvasElement = this.getCanvasElement();\n var cssWidth = parseInt(canvasElement.style.maxWidth, 10);\n var originWidth = canvasElement.width;\n var ratio = originWidth / cssWidth;\n\n this._ratio = ratio;\n }\n\n /**\n * Get ratio value of canvas\n * @returns {number} Ratio value\n */\n\n }, {\n key: 'getCanvasRatio',\n value: function getCanvasRatio() {\n return this._ratio;\n }\n\n /**\n * Get text decoration adapt object\n * @param {string} textDecoration - text decoration option string\n * @returns {object} adapt object for override\n */\n\n }, {\n key: '_getTextDecorationAdaptObject',\n value: function _getTextDecorationAdaptObject(textDecoration) {\n return {\n underline: textDecoration === 'underline',\n linethrough: textDecoration === 'line-through',\n overline: textDecoration === 'overline'\n };\n }\n\n /**\n * Set initial position on canvas image\n * @param {{x: number, y: number}} [position] - Selected position\n * @private\n */\n\n }, {\n key: '_setInitPos',\n value: function _setInitPos(position) {\n position = position || this.getCanvasImage().getCenterPoint();\n\n this._defaultStyles.left = position.x;\n this._defaultStyles.top = position.y;\n }\n\n /**\n * Input event handler\n * @private\n */\n\n }, {\n key: '_onInput',\n value: function _onInput() {\n var ratio = this.getCanvasRatio();\n var obj = this._editingObj;\n var textareaStyle = this._textarea.style;\n\n textareaStyle.width = Math.ceil(obj.width / ratio) + 'px';\n textareaStyle.height = Math.ceil(obj.height / ratio) + 'px';\n }\n\n /**\n * Keydown event handler\n * @private\n */\n\n }, {\n key: '_onKeyDown',\n value: function _onKeyDown() {\n var _this7 = this;\n\n var ratio = this.getCanvasRatio();\n var obj = this._editingObj;\n var textareaStyle = this._textarea.style;\n\n setTimeout(function () {\n obj.text(_this7._textarea.value);\n\n textareaStyle.width = Math.ceil(obj.width / ratio) + 'px';\n textareaStyle.height = Math.ceil(obj.height / ratio) + 'px';\n }, 0);\n }\n\n /**\n * Blur event handler\n * @private\n */\n\n }, {\n key: '_onBlur',\n value: function _onBlur() {\n var ratio = this.getCanvasRatio();\n var editingObj = this._editingObj;\n var editingObjInfos = this._editingObjInfos;\n var textContent = this._textarea.value;\n var transWidth = editingObj.width / ratio - editingObjInfos.width / ratio;\n var transHeight = editingObj.height / ratio - editingObjInfos.height / ratio;\n\n if (ratio === 1) {\n transWidth /= 2;\n transHeight /= 2;\n }\n\n this._textarea.style.display = 'none';\n\n editingObj.set({\n left: editingObjInfos.left + transWidth,\n top: editingObjInfos.top + transHeight\n });\n\n if (textContent.length) {\n this.getCanvas().add(editingObj);\n\n var params = {\n id: _tuiCodeSnippet2.default.stamp(editingObj),\n type: editingObj.type,\n text: textContent\n };\n\n this.fire(_consts.eventNames.TEXT_CHANGED, params);\n }\n }\n\n /**\n * Scroll event handler\n * @private\n */\n\n }, {\n key: '_onScroll',\n value: function _onScroll() {\n this._textarea.scrollLeft = 0;\n this._textarea.scrollTop = 0;\n }\n\n /**\n * Fabric scaling event handler\n * @param {fabric.Event} fEvent - Current scaling event on selected object\n * @private\n */\n\n }, {\n key: '_onFabricScaling',\n value: function _onFabricScaling(fEvent) {\n var obj = fEvent.target;\n var scalingSize = obj.fontSize * obj.scaleY;\n\n obj.fontSize = scalingSize;\n obj.scaleX = 1;\n obj.scaleY = 1;\n }\n\n /**\n * onSelectClear handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onFabricSelectClear',\n value: function _onFabricSelectClear(fEvent) {\n var obj = this.getSelectedObj();\n\n this.isPrevEditing = true;\n\n this.setSelectedInfo(fEvent.target, false);\n\n if (obj) {\n // obj is empty object at initial time, will be set fabric object\n if (obj.text === '') {\n this.getCanvas().remove(obj);\n }\n }\n }\n\n /**\n * onSelect handler in fabric canvas\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onFabricSelect',\n value: function _onFabricSelect(fEvent) {\n this.isPrevEditing = true;\n\n this.setSelectedInfo(fEvent.target, true);\n }\n\n /**\n * Fabric 'mousedown' event handler\n * @param {fabric.Event} fEvent - Current mousedown event on selected object\n * @private\n */\n\n }, {\n key: '_onFabricMouseDown',\n value: function _onFabricMouseDown(fEvent) {\n var obj = fEvent.target;\n\n if (obj && !obj.isType('text')) {\n return;\n }\n\n if (this.isPrevEditing) {\n this.isPrevEditing = false;\n\n return;\n }\n\n this._fireAddText(fEvent);\n }\n\n /**\n * Fire 'addText' event if object is not selected.\n * @param {fabric.Event} fEvent - Current mousedown event on selected object\n * @private\n */\n\n }, {\n key: '_fireAddText',\n value: function _fireAddText(fEvent) {\n var obj = fEvent.target;\n var e = fEvent.e || {};\n var originPointer = this.getCanvas().getPointer(e);\n\n if (!obj) {\n this.fire(_consts.eventNames.ADD_TEXT, {\n originPosition: {\n x: originPointer.x,\n y: originPointer.y\n },\n clientPosition: {\n x: e.clientX || 0,\n y: e.clientY || 0\n }\n });\n }\n }\n\n /**\n * Fabric mouseup event handler\n * @param {fabric.Event} fEvent - Current mousedown event on selected object\n * @private\n */\n\n }, {\n key: '_onFabricMouseUp',\n value: function _onFabricMouseUp(fEvent) {\n var target = fEvent.target;\n\n var newClickTime = new Date().getTime();\n\n if (this._isDoubleClick(newClickTime) && !target.isEditing) {\n target.enterEditing();\n }\n\n if (target.isEditing) {\n this.fire(_consts.eventNames.TEXT_EDITING); // fire editing text event\n }\n\n this._lastClickTime = newClickTime;\n }\n\n /**\n * Get state of firing double click event\n * @param {Date} newClickTime - Current clicked time\n * @returns {boolean} Whether double clicked or not\n * @private\n */\n\n }, {\n key: '_isDoubleClick',\n value: function _isDoubleClick(newClickTime) {\n return newClickTime - this._lastClickTime < DBCLICK_TIME;\n }\n }]);\n\n return Text;\n}(_component2.default);\n\nexports.default = Text;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/component/text.js?");
/***/ }),
/***/ "./src/js/consts.js":
/*!**************************!*\
!*** ./src/js/consts.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultFilterRangeValus = exports.defaultTextRangeValus = exports.defaultShapeStrokeValus = exports.defaultDrawRangeValus = exports.defaultRotateRangeValus = exports.defaultIconPath = exports.rejectMessages = exports.fObjectOptions = exports.keyCodes = exports.drawingModes = exports.eventNames = exports.commandNames = exports.CROPZONE_DEFAULT_OPTIONS = exports.SHAPE_DEFAULT_OPTIONS = exports.componentNames = exports.SHAPE_TYPE = exports.SHAPE_FILL_TYPE = exports.FILTER_NAME_VALUE_MAP = exports.HELP_MENUS = undefined;\n\nvar _util = __webpack_require__(/*! ./util */ \"./src/js/util.js\");\n\n/**\n * Editor help features\n * @type {Array.<string>}\n */\nvar HELP_MENUS = exports.HELP_MENUS = ['undo', 'redo', 'reset', 'delete', 'deleteAll'];\n\n/**\n * Filter name value map\n * @type {Object.<string, string>}\n */\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Constants\n */\nvar FILTER_NAME_VALUE_MAP = exports.FILTER_NAME_VALUE_MAP = {\n blur: 'blur',\n blocksize: 'pixelate'\n};\n\n/**\n * Fill type for shape\n * @type {Object.<string, string>}\n */\nvar SHAPE_FILL_TYPE = exports.SHAPE_FILL_TYPE = {\n FILTER: 'filter',\n COLOR: 'color'\n};\n\n/**\n * Shape type list\n * @type {Array.<string>}\n */\nvar SHAPE_TYPE = exports.SHAPE_TYPE = ['rect', 'circle', 'triangle'];\n\n/**\n * Component names\n * @type {Object.<string, string>}\n */\nvar componentNames = exports.componentNames = (0, _util.keyMirror)('IMAGE_LOADER', 'CROPPER', 'FLIP', 'ROTATION', 'FREE_DRAWING', 'LINE', 'TEXT', 'ICON', 'FILTER', 'SHAPE');\n\n/**\n * Shape default option\n * @type {Object}\n */\nvar SHAPE_DEFAULT_OPTIONS = exports.SHAPE_DEFAULT_OPTIONS = {\n lockSkewingX: true,\n lockSkewingY: true,\n bringForward: true,\n isRegular: false\n};\n\n/**\n * Cropzone default option\n * @type {Object}\n */\nvar CROPZONE_DEFAULT_OPTIONS = exports.CROPZONE_DEFAULT_OPTIONS = {\n hasRotatingPoint: false,\n hasBorders: false,\n lockScalingFlip: true,\n lockRotation: true,\n lockSkewingX: true,\n lockSkewingY: true\n};\n\n/**\n * Command names\n * @type {Object.<string, string>}\n */\nvar commandNames = exports.commandNames = {\n CLEAR_OBJECTS: 'clearObjects',\n LOAD_IMAGE: 'loadImage',\n FLIP_IMAGE: 'flip',\n ROTATE_IMAGE: 'rotate',\n ADD_OBJECT: 'addObject',\n REMOVE_OBJECT: 'removeObject',\n APPLY_FILTER: 'applyFilter',\n REMOVE_FILTER: 'removeFilter',\n ADD_ICON: 'addIcon',\n CHANGE_ICON_COLOR: 'changeIconColor',\n ADD_SHAPE: 'addShape',\n CHANGE_SHAPE: 'changeShape',\n ADD_TEXT: 'addText',\n CHANGE_TEXT: 'changeText',\n CHANGE_TEXT_STYLE: 'changeTextStyle',\n ADD_IMAGE_OBJECT: 'addImageObject',\n RESIZE_CANVAS_DIMENSION: 'resizeCanvasDimension',\n SET_OBJECT_PROPERTIES: 'setObjectProperties',\n SET_OBJECT_POSITION: 'setObjectPosition',\n CHANGE_SELECTION: 'changeSelection'\n};\n\n/**\n * Event names\n * @type {Object.<string, string>}\n */\nvar eventNames = exports.eventNames = {\n OBJECT_ACTIVATED: 'objectActivated',\n OBJECT_MOVED: 'objectMoved',\n OBJECT_SCALED: 'objectScaled',\n OBJECT_CREATED: 'objectCreated',\n OBJECT_ROTATED: 'objectRotated',\n OBJECT_ADDED: 'objectAdded',\n OBJECT_MODIFIED: 'objectModified',\n TEXT_EDITING: 'textEditing',\n TEXT_CHANGED: 'textChanged',\n ICON_CREATE_RESIZE: 'iconCreateResize',\n ICON_CREATE_END: 'iconCreateEnd',\n ADD_TEXT: 'addText',\n ADD_OBJECT: 'addObject',\n ADD_OBJECT_AFTER: 'addObjectAfter',\n MOUSE_DOWN: 'mousedown',\n MOUSE_UP: 'mouseup',\n MOUSE_MOVE: 'mousemove',\n // UNDO/REDO Events\n REDO_STACK_CHANGED: 'redoStackChanged',\n UNDO_STACK_CHANGED: 'undoStackChanged',\n SELECTION_CLEARED: 'selectionCleared',\n SELECTION_CREATED: 'selectionCreated'\n};\n\n/**\n * Editor states\n * @type {Object.<string, string>}\n */\nvar drawingModes = exports.drawingModes = (0, _util.keyMirror)('NORMAL', 'CROPPER', 'FREE_DRAWING', 'LINE_DRAWING', 'TEXT', 'SHAPE', 'ICON');\n\n/**\n * Shortcut key values\n * @type {Object.<string, number>}\n */\nvar keyCodes = exports.keyCodes = {\n Z: 90,\n Y: 89,\n C: 67,\n V: 86,\n SHIFT: 16,\n BACKSPACE: 8,\n DEL: 46,\n ARROW_DOWN: 40,\n ARROW_UP: 38\n};\n\n/**\n * Fabric object options\n * @type {Object.<string, Object>}\n */\nvar fObjectOptions = exports.fObjectOptions = {\n SELECTION_STYLE: {\n borderColor: 'red',\n cornerColor: 'green',\n cornerSize: 10,\n originX: 'center',\n originY: 'center',\n transparentCorners: false\n }\n};\n\n/**\n * Promise reject messages\n * @type {Object.<string, string>}\n */\nvar rejectMessages = exports.rejectMessages = {\n addedObject: 'The object is already added.',\n flip: 'The flipX and flipY setting values are not changed.',\n invalidDrawingMode: 'This operation is not supported in the drawing mode.',\n invalidParameters: 'Invalid parameters.',\n isLock: 'The executing command state is locked.',\n loadImage: 'The background image is empty.',\n loadingImageFailed: 'Invalid image loaded.',\n noActiveObject: 'There is no active object.',\n noObject: 'The object is not in canvas.',\n redo: 'The promise of redo command is reject.',\n rotation: 'The current angle is same the old angle.',\n undo: 'The promise of undo command is reject.',\n unsupportedOperation: 'Unsupported operation.',\n unsupportedType: 'Unsupported object type.'\n};\n\n/**\n * Default icon menu svg path\n * @type {Object.<string, string>}\n */\nvar defaultIconPath = exports.defaultIconPath = {\n 'icon-arrow': 'M40 12V0l24 24-24 24V36H0V12h40z',\n 'icon-arrow-2': 'M49,32 H3 V22 h46 l-18,-18 h12 l23,23 L43,50 h-12 l18,-18 z ',\n 'icon-arrow-3': 'M43.349998,27 L17.354,53 H1.949999 l25.996,-26 L1.949999,1 h15.404 L43.349998,27 z ',\n 'icon-star': 'M35,54.557999 l-19.912001,10.468 l3.804,-22.172001 l-16.108,-15.7 l22.26,-3.236 L35,3.746 l9.956,20.172001 l22.26,3.236 l-16.108,15.7 l3.804,22.172001 z ',\n 'icon-star-2': 'M17,31.212 l-7.194,4.08 l-4.728,-6.83 l-8.234,0.524 l-1.328,-8.226 l-7.644,-3.14 l2.338,-7.992 l-5.54,-6.18 l5.54,-6.176 l-2.338,-7.994 l7.644,-3.138 l1.328,-8.226 l8.234,0.522 l4.728,-6.83 L17,-24.312 l7.194,-4.08 l4.728,6.83 l8.234,-0.522 l1.328,8.226 l7.644,3.14 l-2.338,7.992 l5.54,6.178 l-5.54,6.178 l2.338,7.992 l-7.644,3.14 l-1.328,8.226 l-8.234,-0.524 l-4.728,6.83 z ',\n 'icon-polygon': 'M3,31 L19,3 h32 l16,28 l-16,28 H19 z ',\n 'icon-location': 'M24 62C8 45.503 0 32.837 0 24 0 10.745 10.745 0 24 0s24 10.745 24 24c0 8.837-8 21.503-24 38zm0-28c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10z',\n 'icon-heart': 'M49.994999,91.349998 l-6.96,-6.333 C18.324001,62.606995 2.01,47.829002 2.01,29.690998 C2.01,14.912998 13.619999,3.299999 28.401001,3.299999 c8.349,0 16.362,5.859 21.594,12 c5.229,-6.141 13.242001,-12 21.591,-12 c14.778,0 26.390999,11.61 26.390999,26.390999 c0,18.138 -16.314001,32.916 -41.025002,55.374001 l-6.96,6.285 z ',\n 'icon-bubble': 'M44 48L34 58V48H12C5.373 48 0 42.627 0 36V12C0 5.373 5.373 0 12 0h40c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12h-8z'\n};\n\nvar defaultRotateRangeValus = exports.defaultRotateRangeValus = {\n realTimeEvent: true,\n min: -360,\n max: 360,\n value: 0\n};\n\nvar defaultDrawRangeValus = exports.defaultDrawRangeValus = {\n min: 5,\n max: 30,\n value: 12\n};\n\nvar defaultShapeStrokeValus = exports.defaultShapeStrokeValus = {\n realTimeEvent: true,\n min: 2,\n max: 300,\n value: 3\n};\n\nvar defaultTextRangeValus = exports.defaultTextRangeValus = {\n realTimeEvent: true,\n min: 10,\n max: 100,\n value: 50\n};\n\nvar defaultFilterRangeValus = exports.defaultFilterRangeValus = {\n tintOpacityRange: {\n realTimeEvent: true,\n min: 0,\n max: 1,\n value: 0.7,\n useDecimal: true\n },\n removewhiteDistanceRange: {\n realTimeEvent: true,\n min: 0,\n max: 1,\n value: 0.2,\n useDecimal: true\n },\n brightnessRange: {\n realTimeEvent: true,\n min: -1,\n max: 1,\n value: 0,\n useDecimal: true\n },\n noiseRange: {\n realTimeEvent: true,\n min: 0,\n max: 1000,\n value: 100\n },\n pixelateRange: {\n realTimeEvent: true,\n min: 2,\n max: 20,\n value: 4\n },\n colorfilterThresholeRange: {\n realTimeEvent: true,\n min: 0,\n max: 1,\n value: 0.2,\n useDecimal: true\n },\n blurFilterRange: {\n value: 0.1\n }\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/consts.js?");
/***/ }),
/***/ "./src/js/drawingMode/cropper.js":
/*!***************************************!*\
!*** ./src/js/drawingMode/cropper.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _drawingMode = __webpack_require__(/*! ../interface/drawingMode */ \"./src/js/interface/drawingMode.js\");\n\nvar _drawingMode2 = _interopRequireDefault(_drawingMode);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview CropperDrawingMode class\n */\n\n\n/**\n * CropperDrawingMode class\n * @class\n * @ignore\n */\nvar CropperDrawingMode = function (_DrawingMode) {\n _inherits(CropperDrawingMode, _DrawingMode);\n\n function CropperDrawingMode() {\n _classCallCheck(this, CropperDrawingMode);\n\n return _possibleConstructorReturn(this, (CropperDrawingMode.__proto__ || Object.getPrototypeOf(CropperDrawingMode)).call(this, _consts.drawingModes.CROPPER));\n }\n\n /**\n * start this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n\n _createClass(CropperDrawingMode, [{\n key: 'start',\n value: function start(graphics) {\n var cropper = graphics.getComponent(_consts.componentNames.CROPPER);\n cropper.start();\n }\n\n /**\n * stop this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n }, {\n key: 'end',\n value: function end(graphics) {\n var cropper = graphics.getComponent(_consts.componentNames.CROPPER);\n cropper.end();\n }\n }]);\n\n return CropperDrawingMode;\n}(_drawingMode2.default);\n\nexports.default = CropperDrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/drawingMode/cropper.js?");
/***/ }),
/***/ "./src/js/drawingMode/freeDrawing.js":
/*!*******************************************!*\
!*** ./src/js/drawingMode/freeDrawing.js ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _drawingMode = __webpack_require__(/*! ../interface/drawingMode */ \"./src/js/interface/drawingMode.js\");\n\nvar _drawingMode2 = _interopRequireDefault(_drawingMode);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview FreeDrawingMode class\n */\n\n\n/**\n * FreeDrawingMode class\n * @class\n * @ignore\n */\nvar FreeDrawingMode = function (_DrawingMode) {\n _inherits(FreeDrawingMode, _DrawingMode);\n\n function FreeDrawingMode() {\n _classCallCheck(this, FreeDrawingMode);\n\n return _possibleConstructorReturn(this, (FreeDrawingMode.__proto__ || Object.getPrototypeOf(FreeDrawingMode)).call(this, _consts.drawingModes.FREE_DRAWING));\n }\n\n /**\n * start this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @param {{width: ?number, color: ?string}} [options] - Brush width & color\n * @override\n */\n\n\n _createClass(FreeDrawingMode, [{\n key: 'start',\n value: function start(graphics, options) {\n var freeDrawing = graphics.getComponent(_consts.componentNames.FREE_DRAWING);\n freeDrawing.start(options);\n }\n\n /**\n * stop this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n }, {\n key: 'end',\n value: function end(graphics) {\n var freeDrawing = graphics.getComponent(_consts.componentNames.FREE_DRAWING);\n freeDrawing.end();\n }\n }]);\n\n return FreeDrawingMode;\n}(_drawingMode2.default);\n\nexports.default = FreeDrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/drawingMode/freeDrawing.js?");
/***/ }),
/***/ "./src/js/drawingMode/icon.js":
/*!************************************!*\
!*** ./src/js/drawingMode/icon.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _drawingMode = __webpack_require__(/*! ../interface/drawingMode */ \"./src/js/interface/drawingMode.js\");\n\nvar _drawingMode2 = _interopRequireDefault(_drawingMode);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview IconDrawingMode class\n */\n\n\n/**\n * IconDrawingMode class\n * @class\n * @ignore\n */\nvar IconDrawingMode = function (_DrawingMode) {\n _inherits(IconDrawingMode, _DrawingMode);\n\n function IconDrawingMode() {\n _classCallCheck(this, IconDrawingMode);\n\n return _possibleConstructorReturn(this, (IconDrawingMode.__proto__ || Object.getPrototypeOf(IconDrawingMode)).call(this, _consts.drawingModes.ICON));\n }\n\n /**\n * start this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n\n _createClass(IconDrawingMode, [{\n key: 'start',\n value: function start(graphics) {\n var icon = graphics.getComponent(_consts.componentNames.ICON);\n icon.start();\n }\n\n /**\n * stop this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n }, {\n key: 'end',\n value: function end(graphics) {\n var icon = graphics.getComponent(_consts.componentNames.ICON);\n icon.end();\n }\n }]);\n\n return IconDrawingMode;\n}(_drawingMode2.default);\n\nexports.default = IconDrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/drawingMode/icon.js?");
/***/ }),
/***/ "./src/js/drawingMode/lineDrawing.js":
/*!*******************************************!*\
!*** ./src/js/drawingMode/lineDrawing.js ***!
\*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _drawingMode = __webpack_require__(/*! ../interface/drawingMode */ \"./src/js/interface/drawingMode.js\");\n\nvar _drawingMode2 = _interopRequireDefault(_drawingMode);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview LineDrawingMode class\n */\n\n\n/**\n * LineDrawingMode class\n * @class\n * @ignore\n */\nvar LineDrawingMode = function (_DrawingMode) {\n _inherits(LineDrawingMode, _DrawingMode);\n\n function LineDrawingMode() {\n _classCallCheck(this, LineDrawingMode);\n\n return _possibleConstructorReturn(this, (LineDrawingMode.__proto__ || Object.getPrototypeOf(LineDrawingMode)).call(this, _consts.drawingModes.LINE_DRAWING));\n }\n\n /**\n * start this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @param {{width: ?number, color: ?string}} [options] - Brush width & color\n * @override\n */\n\n\n _createClass(LineDrawingMode, [{\n key: 'start',\n value: function start(graphics, options) {\n var lineDrawing = graphics.getComponent(_consts.componentNames.LINE);\n lineDrawing.start(options);\n }\n\n /**\n * stop this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n }, {\n key: 'end',\n value: function end(graphics) {\n var lineDrawing = graphics.getComponent(_consts.componentNames.LINE);\n lineDrawing.end();\n }\n }]);\n\n return LineDrawingMode;\n}(_drawingMode2.default);\n\nexports.default = LineDrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/drawingMode/lineDrawing.js?");
/***/ }),
/***/ "./src/js/drawingMode/shape.js":
/*!*************************************!*\
!*** ./src/js/drawingMode/shape.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _drawingMode = __webpack_require__(/*! ../interface/drawingMode */ \"./src/js/interface/drawingMode.js\");\n\nvar _drawingMode2 = _interopRequireDefault(_drawingMode);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview ShapeDrawingMode class\n */\n\n\n/**\n * ShapeDrawingMode class\n * @class\n * @ignore\n */\nvar ShapeDrawingMode = function (_DrawingMode) {\n _inherits(ShapeDrawingMode, _DrawingMode);\n\n function ShapeDrawingMode() {\n _classCallCheck(this, ShapeDrawingMode);\n\n return _possibleConstructorReturn(this, (ShapeDrawingMode.__proto__ || Object.getPrototypeOf(ShapeDrawingMode)).call(this, _consts.drawingModes.SHAPE));\n }\n\n /**\n * start this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n\n _createClass(ShapeDrawingMode, [{\n key: 'start',\n value: function start(graphics) {\n var shape = graphics.getComponent(_consts.componentNames.SHAPE);\n shape.start();\n }\n\n /**\n * stop this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n }, {\n key: 'end',\n value: function end(graphics) {\n var shape = graphics.getComponent(_consts.componentNames.SHAPE);\n shape.end();\n }\n }]);\n\n return ShapeDrawingMode;\n}(_drawingMode2.default);\n\nexports.default = ShapeDrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/drawingMode/shape.js?");
/***/ }),
/***/ "./src/js/drawingMode/text.js":
/*!************************************!*\
!*** ./src/js/drawingMode/text.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _drawingMode = __webpack_require__(/*! ../interface/drawingMode */ \"./src/js/interface/drawingMode.js\");\n\nvar _drawingMode2 = _interopRequireDefault(_drawingMode);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview TextDrawingMode class\n */\n\n\n/**\n * TextDrawingMode class\n * @class\n * @ignore\n */\nvar TextDrawingMode = function (_DrawingMode) {\n _inherits(TextDrawingMode, _DrawingMode);\n\n function TextDrawingMode() {\n _classCallCheck(this, TextDrawingMode);\n\n return _possibleConstructorReturn(this, (TextDrawingMode.__proto__ || Object.getPrototypeOf(TextDrawingMode)).call(this, _consts.drawingModes.TEXT));\n }\n\n /**\n * start this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n\n _createClass(TextDrawingMode, [{\n key: 'start',\n value: function start(graphics) {\n var text = graphics.getComponent(_consts.componentNames.TEXT);\n text.start();\n }\n\n /**\n * stop this drawing mode\n * @param {Graphics} graphics - Graphics instance\n * @override\n */\n\n }, {\n key: 'end',\n value: function end(graphics) {\n var text = graphics.getComponent(_consts.componentNames.TEXT);\n text.end();\n }\n }]);\n\n return TextDrawingMode;\n}(_drawingMode2.default);\n\nexports.default = TextDrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/drawingMode/text.js?");
/***/ }),
/***/ "./src/js/extension/arrowLine.js":
/*!***************************************!*\
!*** ./src/js/extension/arrowLine.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ARROW_ANGLE = 30; /**\n * @author NHN. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Blur extending fabric.Image.filters.Convolute\n */\n\nvar CHEVRON_SIZE_RATIO = 2.7;\nvar TRIANGLE_SIZE_RATIO = 1.7;\nvar RADIAN_CONVERSION_VALUE = 180;\n\nvar ArrowLine = _fabric2.default.util.createClass(_fabric2.default.Line,\n/** @lends Convolute.prototype */{\n /**\n * Line type\n * @param {String} type\n * @default\n */\n type: 'line',\n\n /**\n * Constructor\n * @param {Array} [points] Array of points\n * @param {Object} [options] Options object\n * @override\n */\n initialize: function initialize(points) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.callSuper('initialize', points, options);\n\n this.arrowType = options.arrowType;\n },\n\n\n /**\n * Render ArrowLine\n * @private\n * @override\n */\n _render: function _render(ctx) {\n var _calcLinePoints = this.calcLinePoints(),\n fromX = _calcLinePoints.x1,\n fromY = _calcLinePoints.y1,\n toX = _calcLinePoints.x2,\n toY = _calcLinePoints.y2;\n\n var linePosition = {\n fromX: fromX,\n fromY: fromY,\n toX: toX,\n toY: toY\n };\n this.ctx = ctx;\n ctx.lineWidth = this.strokeWidth;\n\n this._renderBasicLinePath(linePosition);\n this._drawDecoratorPath(linePosition);\n\n this._renderStroke(ctx);\n },\n\n\n /**\n * Render Basic line path\n * @param {Object} linePosition - line position\n * @param {number} option.fromX - line start position x\n * @param {number} option.fromY - line start position y\n * @param {number} option.toX - line end position x\n * @param {number} option.toY - line end position y\n * @private\n */\n _renderBasicLinePath: function _renderBasicLinePath(_ref) {\n var fromX = _ref.fromX,\n fromY = _ref.fromY,\n toX = _ref.toX,\n toY = _ref.toY;\n\n this.ctx.beginPath();\n this.ctx.moveTo(fromX, fromY);\n this.ctx.lineTo(toX, toY);\n },\n\n\n /**\n * Render Arrow Head\n * @param {Object} linePosition - line position\n * @param {number} option.fromX - line start position x\n * @param {number} option.fromY - line start position y\n * @param {number} option.toX - line end position x\n * @param {number} option.toY - line end position y\n * @private\n */\n _drawDecoratorPath: function _drawDecoratorPath(linePosition) {\n this._drawDecoratorPathType('head', linePosition);\n this._drawDecoratorPathType('tail', linePosition);\n },\n\n\n /**\n * Render Arrow Head\n * @param {string} type - 'head' or 'tail'\n * @param {Object} linePosition - line position\n * @param {number} option.fromX - line start position x\n * @param {number} option.fromY - line start position y\n * @param {number} option.toX - line end position x\n * @param {number} option.toY - line end position y\n * @private\n */\n _drawDecoratorPathType: function _drawDecoratorPathType(type, linePosition) {\n switch (this.arrowType[type]) {\n case 'triangle':\n this._drawTrianglePath(type, linePosition);\n break;\n case 'chevron':\n this._drawChevronPath(type, linePosition);\n break;\n default:\n break;\n }\n },\n\n\n /**\n * Render Triangle Head\n * @param {string} type - 'head' or 'tail'\n * @param {Object} linePosition - line position\n * @param {number} option.fromX - line start position x\n * @param {number} option.fromY - line start position y\n * @param {number} option.toX - line end position x\n * @param {number} option.toY - line end position y\n * @private\n */\n _drawTrianglePath: function _drawTrianglePath(type, linePosition) {\n var decorateSize = this.ctx.lineWidth * TRIANGLE_SIZE_RATIO;\n\n this._drawChevronPath(type, linePosition, decorateSize);\n this.ctx.closePath();\n },\n\n\n /**\n * Render Chevron Head\n * @param {string} type - 'head' or 'tail'\n * @param {Object} linePosition - line position\n * @param {number} option.fromX - line start position x\n * @param {number} option.fromY - line start position y\n * @param {number} option.toX - line end position x\n * @param {number} option.toY - line end position y\n * @param {number} decorateSize - decorate size\n * @private\n */\n _drawChevronPath: function _drawChevronPath(type, _ref2, decorateSize) {\n var _this = this;\n\n var fromX = _ref2.fromX,\n fromY = _ref2.fromY,\n toX = _ref2.toX,\n toY = _ref2.toY;\n var ctx = this.ctx;\n\n if (!decorateSize) {\n decorateSize = this.ctx.lineWidth * CHEVRON_SIZE_RATIO;\n }\n\n var _ref3 = type === 'head' ? [fromX, fromY] : [toX, toY],\n standardX = _ref3[0],\n standardY = _ref3[1];\n\n var _ref4 = type === 'head' ? [toX, toY] : [fromX, fromY],\n compareX = _ref4[0],\n compareY = _ref4[1];\n\n var angle = Math.atan2(compareY - standardY, compareX - standardX) * RADIAN_CONVERSION_VALUE / Math.PI;\n var rotatedPosition = function rotatedPosition(changeAngle) {\n return _this.getRotatePosition(decorateSize, changeAngle, {\n x: standardX,\n y: standardY\n });\n };\n\n ctx.moveTo.apply(ctx, rotatedPosition(angle + ARROW_ANGLE));\n ctx.lineTo(standardX, standardY);\n ctx.lineTo.apply(ctx, rotatedPosition(angle - ARROW_ANGLE));\n },\n\n\n /**\n * return position from change angle.\n * @param {number} distance - change distance\n * @param {number} angle - change angle\n * @param {Object} referencePosition - reference position\n * @returns {Array}\n * @private\n */\n getRotatePosition: function getRotatePosition(distance, angle, referencePosition) {\n var radian = angle * Math.PI / RADIAN_CONVERSION_VALUE;\n var x = referencePosition.x,\n y = referencePosition.y;\n\n\n return [distance * Math.cos(radian) + x, distance * Math.sin(radian) + y];\n }\n});\n\nexports.default = ArrowLine;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/extension/arrowLine.js?");
/***/ }),
/***/ "./src/js/extension/colorFilter.js":
/*!*****************************************!*\
!*** ./src/js/extension/colorFilter.js ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * ColorFilter object\n * @class ColorFilter\n * @extends {fabric.Image.filters.BaseFilter}\n * @ignore\n */\nvar ColorFilter = _fabric2.default.util.createClass(_fabric2.default.Image.filters.BaseFilter,\n/** @lends BaseFilter.prototype */{\n /**\n * Filter type\n * @param {String} type\n * @default\n */\n type: 'ColorFilter',\n\n /**\n * Constructor\n * @member fabric.Image.filters.ColorFilter.prototype\n * @param {Object} [options] Options object\n * @param {Number} [options.color='#FFFFFF'] Value of color (0...255)\n * @param {Number} [options.threshold=45] Value of threshold (0...255)\n * @override\n */\n initialize: function initialize(options) {\n if (!options) {\n options = {};\n }\n this.color = options.color || '#FFFFFF';\n this.threshold = options.threshold || 45;\n this.x = options.x || null;\n this.y = options.y || null;\n },\n\n\n /**\n * Applies filter to canvas element\n * @param {Object} canvas Canvas object passed by fabric\n */\n // eslint-disable-next-line complexity\n applyTo: function applyTo(canvas) {\n var canvasEl = canvas.canvasEl;\n\n var context = canvasEl.getContext('2d');\n var imageData = context.getImageData(0, 0, canvasEl.width, canvasEl.height);\n var data = imageData.data;\n var threshold = this.threshold;\n\n var filterColor = _fabric2.default.Color.sourceFromHex(this.color);\n var i = void 0,\n len = void 0;\n\n if (this.x && this.y) {\n filterColor = this._getColor(imageData, this.x, this.y);\n }\n\n for (i = 0, len = data.length; i < len; i += 4) {\n if (this._isOutsideThreshold(data[i], filterColor[0], threshold) || this._isOutsideThreshold(data[i + 1], filterColor[1], threshold) || this._isOutsideThreshold(data[i + 2], filterColor[2], threshold)) {\n continue;\n }\n data[i] = data[i + 1] = data[i + 2] = data[i + 3] = 0;\n }\n context.putImageData(imageData, 0, 0);\n },\n\n\n /**\n * Check color if it is within threshold\n * @param {Number} color1 source color\n * @param {Number} color2 filtering color\n * @param {Number} threshold threshold\n * @returns {boolean} true if within threshold or false\n */\n _isOutsideThreshold: function _isOutsideThreshold(color1, color2, threshold) {\n var diff = color1 - color2;\n\n return Math.abs(diff) > threshold;\n },\n\n\n /**\n * Get color at (x, y)\n * @param {Object} imageData of canvas\n * @param {Number} x left position\n * @param {Number} y top position\n * @returns {Array} color array\n */\n _getColor: function _getColor(imageData, x, y) {\n var color = [0, 0, 0, 0];\n var data = imageData.data,\n width = imageData.width;\n\n var bytes = 4;\n var position = (width * y + x) * bytes;\n\n color[0] = data[position];\n color[1] = data[position + 1];\n color[2] = data[position + 2];\n color[3] = data[position + 3];\n\n return color;\n }\n}); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview ColorFilter extending fabric.Image.filters.BaseFilter\n */\nexports.default = ColorFilter;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/extension/colorFilter.js?");
/***/ }),
/***/ "./src/js/extension/cropzone.js":
/*!**************************************!*\
!*** ./src/js/extension/cropzone.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Cropzone extending fabric.Rect\n */\n\n\nvar CORNER_TYPE_TOP_LEFT = 'tl';\nvar CORNER_TYPE_TOP_RIGHT = 'tr';\nvar CORNER_TYPE_MIDDLE_TOP = 'mt';\nvar CORNER_TYPE_MIDDLE_LEFT = 'ml';\nvar CORNER_TYPE_MIDDLE_RIGHT = 'mr';\nvar CORNER_TYPE_MIDDLE_BOTTOM = 'mb';\nvar CORNER_TYPE_BOTTOM_LEFT = 'bl';\nvar CORNER_TYPE_BOTTOM_RIGHT = 'br';\nvar CORNER_TYPE_LIST = [CORNER_TYPE_TOP_LEFT, CORNER_TYPE_TOP_RIGHT, CORNER_TYPE_MIDDLE_TOP, CORNER_TYPE_MIDDLE_LEFT, CORNER_TYPE_MIDDLE_RIGHT, CORNER_TYPE_MIDDLE_BOTTOM, CORNER_TYPE_BOTTOM_LEFT, CORNER_TYPE_BOTTOM_RIGHT];\nvar NOOP_FUNCTION = function NOOP_FUNCTION() {};\n\n/**\n * Align with cropzone ratio\n * @param {string} selectedCorner - selected corner type\n * @returns {{width: number, height: number}}\n * @private\n */\nfunction cornerTypeValid(selectedCorner) {\n return CORNER_TYPE_LIST.indexOf(selectedCorner) >= 0;\n}\n\n/**\n * return scale basis type\n * @param {number} diffX - X distance of the cursor and corner.\n * @param {number} diffY - Y distance of the cursor and corner.\n * @returns {string}\n * @private\n */\nfunction getScaleBasis(diffX, diffY) {\n return diffX > diffY ? 'width' : 'height';\n}\n\n/**\n * Cropzone object\n * Issue: IE7, 8(with excanvas)\n * - Cropzone is a black zone without transparency.\n * @class Cropzone\n * @extends {fabric.Rect}\n * @ignore\n */\nvar Cropzone = _fabric2.default.util.createClass(_fabric2.default.Rect,\n/** @lends Cropzone.prototype */{\n /**\n * Constructor\n * @param {Object} canvas canvas\n * @param {Object} options Options object\n * @param {Object} extendsOptions object for extends \"options\"\n * @override\n */\n initialize: function initialize(canvas, options, extendsOptions) {\n options = _tuiCodeSnippet2.default.extend(options, extendsOptions);\n options.type = 'cropzone';\n\n this.callSuper('initialize', options);\n this._addEventHandler();\n\n this.canvas = canvas;\n this.options = options;\n },\n canvasEventDelegation: function canvasEventDelegation(eventName) {\n var delegationState = 'unregisted';\n var isRegisted = this.canvasEventTrigger[eventName] !== NOOP_FUNCTION;\n if (isRegisted) {\n delegationState = 'registed';\n } else if ([_consts.eventNames.OBJECT_MOVED, _consts.eventNames.OBJECT_SCALED].indexOf(eventName) < 0) {\n delegationState = 'none';\n }\n\n return delegationState;\n },\n canvasEventRegister: function canvasEventRegister(eventName, eventTrigger) {\n this.canvasEventTrigger[eventName] = eventTrigger;\n },\n _addEventHandler: function _addEventHandler() {\n var _canvasEventTrigger;\n\n this.canvasEventTrigger = (_canvasEventTrigger = {}, _defineProperty(_canvasEventTrigger, _consts.eventNames.OBJECT_MOVED, NOOP_FUNCTION), _defineProperty(_canvasEventTrigger, _consts.eventNames.OBJECT_SCALED, NOOP_FUNCTION), _canvasEventTrigger);\n this.on({\n moving: this._onMoving.bind(this),\n scaling: this._onScaling.bind(this)\n });\n },\n _renderCropzone: function _renderCropzone(ctx) {\n var cropzoneDashLineWidth = 7;\n var cropzoneDashLineOffset = 7;\n\n // Calc original scale\n var originalFlipX = this.flipX ? -1 : 1;\n var originalFlipY = this.flipY ? -1 : 1;\n var originalScaleX = originalFlipX / this.scaleX;\n var originalScaleY = originalFlipY / this.scaleY;\n\n // Set original scale\n ctx.scale(originalScaleX, originalScaleY);\n\n // Render outer rect\n this._fillOuterRect(ctx, 'rgba(0, 0, 0, 0.5)');\n\n if (this.options.lineWidth) {\n this._fillInnerRect(ctx);\n this._strokeBorder(ctx, 'rgb(255, 255, 255)', {\n lineWidth: this.options.lineWidth\n });\n } else {\n // Black dash line\n this._strokeBorder(ctx, 'rgb(0, 0, 0)', {\n lineDashWidth: cropzoneDashLineWidth\n });\n\n // White dash line\n this._strokeBorder(ctx, 'rgb(255, 255, 255)', {\n lineDashWidth: cropzoneDashLineWidth,\n lineDashOffset: cropzoneDashLineOffset\n });\n }\n\n // Reset scale\n ctx.scale(1 / originalScaleX, 1 / originalScaleY);\n },\n\n\n /**\n * Render Crop-zone\n * @private\n * @override\n */\n _render: function _render(ctx) {\n this.callSuper('_render', ctx);\n\n this._renderCropzone(ctx);\n },\n\n\n /**\n * Cropzone-coordinates with outer rectangle\n *\n * x0 x1 x2 x3\n * y0 +--------------------------+\n * |///////|//////////|///////| // <--- \"Outer-rectangle\"\n * |///////|//////////|///////|\n * y1 +-------+----------+-------+\n * |///////| Cropzone |///////| Cropzone is the \"Inner-rectangle\"\n * |///////| (0, 0) |///////| Center point (0, 0)\n * y2 +-------+----------+-------+\n * |///////|//////////|///////|\n * |///////|//////////|///////|\n * y3 +--------------------------+\n *\n * @typedef {{x: Array<number>, y: Array<number>}} cropzoneCoordinates\n * @ignore\n */\n\n /**\n * Fill outer rectangle\n * @param {CanvasRenderingContext2D} ctx - Context\n * @param {string|CanvasGradient|CanvasPattern} fillStyle - Fill-style\n * @private\n */\n _fillOuterRect: function _fillOuterRect(ctx, fillStyle) {\n var _getCoordinates = this._getCoordinates(),\n x = _getCoordinates.x,\n y = _getCoordinates.y;\n\n ctx.save();\n ctx.fillStyle = fillStyle;\n ctx.beginPath();\n\n // Outer rectangle\n // Numbers are +/-1 so that overlay edges don't get blurry.\n ctx.moveTo(x[0] - 1, y[0] - 1);\n ctx.lineTo(x[3] + 1, y[0] - 1);\n ctx.lineTo(x[3] + 1, y[3] + 1);\n ctx.lineTo(x[0] - 1, y[3] + 1);\n ctx.lineTo(x[0] - 1, y[0] - 1);\n ctx.closePath();\n\n // Inner rectangle\n ctx.moveTo(x[1], y[1]);\n ctx.lineTo(x[1], y[2]);\n ctx.lineTo(x[2], y[2]);\n ctx.lineTo(x[2], y[1]);\n ctx.lineTo(x[1], y[1]);\n ctx.closePath();\n\n ctx.fill();\n ctx.restore();\n },\n\n\n /**\n * Draw Inner grid line\n * @param {CanvasRenderingContext2D} ctx - Context\n * @private\n */\n _fillInnerRect: function _fillInnerRect(ctx) {\n var _getCoordinates2 = this._getCoordinates(),\n outerX = _getCoordinates2.x,\n outerY = _getCoordinates2.y;\n\n var x = this._caculateInnerPosition(outerX, (outerX[2] - outerX[1]) / 3);\n var y = this._caculateInnerPosition(outerY, (outerY[2] - outerY[1]) / 3);\n\n ctx.save();\n ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)';\n ctx.lineWidth = this.options.lineWidth;\n ctx.beginPath();\n\n ctx.moveTo(x[0], y[1]);\n ctx.lineTo(x[3], y[1]);\n\n ctx.moveTo(x[0], y[2]);\n ctx.lineTo(x[3], y[2]);\n\n ctx.moveTo(x[1], y[0]);\n ctx.lineTo(x[1], y[3]);\n\n ctx.moveTo(x[2], y[0]);\n ctx.lineTo(x[2], y[3]);\n ctx.stroke();\n ctx.closePath();\n\n ctx.restore();\n },\n\n\n /**\n * Calculate Inner Position\n * @param {Array} outer - outer position\n * @param {number} size - interval for calculate\n * @returns {Array} - inner position\n * @private\n */\n _caculateInnerPosition: function _caculateInnerPosition(outer, size) {\n var position = [];\n position[0] = outer[1];\n position[1] = outer[1] + size;\n position[2] = outer[1] + size * 2;\n position[3] = outer[2];\n\n return position;\n },\n\n\n /**\n * Get coordinates\n * @returns {cropzoneCoordinates} - {@link cropzoneCoordinates}\n * @private\n */\n _getCoordinates: function _getCoordinates() {\n var canvas = this.canvas,\n width = this.width,\n height = this.height,\n left = this.left,\n top = this.top;\n\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var canvasHeight = canvas.getHeight(); // fabric object\n var canvasWidth = canvas.getWidth(); // fabric object\n\n return {\n x: _tuiCodeSnippet2.default.map([-(halfWidth + left), // x0\n -halfWidth, // x1\n halfWidth, // x2\n halfWidth + (canvasWidth - left - width)], Math.ceil),\n y: _tuiCodeSnippet2.default.map([-(halfHeight + top), // y0\n -halfHeight, // y1\n halfHeight, // y2\n halfHeight + (canvasHeight - top - height)], Math.ceil)\n };\n },\n\n\n /**\n * Stroke border\n * @param {CanvasRenderingContext2D} ctx - Context\n * @param {string|CanvasGradient|CanvasPattern} strokeStyle - Stroke-style\n * @param {number} lineDashWidth - Dash width\n * @param {number} [lineDashOffset] - Dash offset\n * @param {number} [lineWidth] - line width\n * @private\n */\n _strokeBorder: function _strokeBorder(ctx, strokeStyle, _ref) {\n var lineDashWidth = _ref.lineDashWidth,\n lineDashOffset = _ref.lineDashOffset,\n lineWidth = _ref.lineWidth;\n\n var halfWidth = this.width / 2;\n var halfHeight = this.height / 2;\n\n ctx.save();\n ctx.strokeStyle = strokeStyle;\n\n if (ctx.setLineDash) {\n ctx.setLineDash([lineDashWidth, lineDashWidth]);\n }\n if (lineDashOffset) {\n ctx.lineDashOffset = lineDashOffset;\n }\n if (lineWidth) {\n ctx.lineWidth = lineWidth;\n }\n\n ctx.beginPath();\n ctx.moveTo(-halfWidth, -halfHeight);\n ctx.lineTo(halfWidth, -halfHeight);\n ctx.lineTo(halfWidth, halfHeight);\n ctx.lineTo(-halfWidth, halfHeight);\n ctx.lineTo(-halfWidth, -halfHeight);\n ctx.stroke();\n\n ctx.restore();\n },\n\n\n /**\n * onMoving event listener\n * @private\n */\n _onMoving: function _onMoving() {\n var height = this.height,\n width = this.width,\n left = this.left,\n top = this.top;\n\n var maxLeft = this.canvas.getWidth() - width;\n var maxTop = this.canvas.getHeight() - height;\n\n this.left = (0, _util.clamp)(left, 0, maxLeft);\n this.top = (0, _util.clamp)(top, 0, maxTop);\n\n this.canvasEventTrigger[_consts.eventNames.OBJECT_MOVED](this);\n },\n\n\n /**\n * onScaling event listener\n * @param {{e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n _onScaling: function _onScaling(fEvent) {\n var selectedCorner = fEvent.transform.corner;\n var pointer = this.canvas.getPointer(fEvent.e);\n var settings = this._calcScalingSizeFromPointer(pointer, selectedCorner);\n\n // On scaling cropzone,\n // change real width and height and fix scaleFactor to 1\n this.scale(1).set(settings);\n\n this.canvasEventTrigger[_consts.eventNames.OBJECT_SCALED](this);\n },\n\n\n /**\n * Calc scaled size from mouse pointer with selected corner\n * @param {{x: number, y: number}} pointer - Mouse position\n * @param {string} selectedCorner - selected corner type\n * @returns {Object} Having left or(and) top or(and) width or(and) height.\n * @private\n */\n _calcScalingSizeFromPointer: function _calcScalingSizeFromPointer(pointer, selectedCorner) {\n var isCornerTypeValid = cornerTypeValid(selectedCorner);\n\n return isCornerTypeValid && this._resizeCropZone(pointer, selectedCorner);\n },\n\n\n /**\n * Align with cropzone ratio\n * @param {number} width - cropzone width\n * @param {number} height - cropzone height\n * @param {number} maxWidth - limit max width\n * @param {number} maxHeight - limit max height\n * @param {number} scaleTo - cropzone ratio\n * @returns {{width: number, height: number}}\n * @private\n */\n adjustRatioCropzoneSize: function adjustRatioCropzoneSize(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n leftMaker = _ref2.leftMaker,\n topMaker = _ref2.topMaker,\n maxWidth = _ref2.maxWidth,\n maxHeight = _ref2.maxHeight,\n scaleTo = _ref2.scaleTo;\n\n width = maxWidth ? (0, _util.clamp)(width, 1, maxWidth) : width;\n height = maxHeight ? (0, _util.clamp)(height, 1, maxHeight) : height;\n\n if (!this.presetRatio) {\n return {\n width: width,\n height: height,\n left: leftMaker(width),\n top: topMaker(height)\n };\n }\n\n if (scaleTo === 'width') {\n height = width / this.presetRatio;\n } else {\n width = height * this.presetRatio;\n }\n\n var maxScaleFactor = Math.min(maxWidth / width, maxHeight / height);\n if (maxScaleFactor <= 1) {\n var _map = [width, height].map(function (v) {\n return v * maxScaleFactor;\n });\n\n width = _map[0];\n height = _map[1];\n }\n\n return {\n width: width,\n height: height,\n left: leftMaker(width),\n top: topMaker(height)\n };\n },\n\n\n /**\n * Get dimension last state cropzone\n * @returns {{rectTop: number, rectLeft: number, rectWidth: number, rectHeight: number}}\n * @private\n */\n _getCropzoneRectInfo: function _getCropzoneRectInfo() {\n var _canvas = this.canvas,\n canvasWidth = _canvas.width,\n canvasHeight = _canvas.height;\n\n var _getBoundingRect = this.getBoundingRect(false, true),\n rectTop = _getBoundingRect.top,\n rectLeft = _getBoundingRect.left,\n rectWidth = _getBoundingRect.width,\n rectHeight = _getBoundingRect.height;\n\n return {\n rectTop: rectTop,\n rectLeft: rectLeft,\n rectWidth: rectWidth,\n rectHeight: rectHeight,\n rectRight: rectLeft + rectWidth,\n rectBottom: rectTop + rectHeight,\n canvasWidth: canvasWidth,\n canvasHeight: canvasHeight\n };\n },\n\n\n /**\n * Calc scaling dimension\n * @param {Object} position - Mouse position\n * @param {string} corner - corner type\n * @returns {{left: number, top: number, width: number, height: number}}\n * @private\n */\n _resizeCropZone: function _resizeCropZone(_ref3, corner) {\n var x = _ref3.x,\n y = _ref3.y;\n\n var _getCropzoneRectInfo2 = this._getCropzoneRectInfo(),\n rectWidth = _getCropzoneRectInfo2.rectWidth,\n rectHeight = _getCropzoneRectInfo2.rectHeight,\n rectTop = _getCropzoneRectInfo2.rectTop,\n rectLeft = _getCropzoneRectInfo2.rectLeft,\n rectBottom = _getCropzoneRectInfo2.rectBottom,\n rectRight = _getCropzoneRectInfo2.rectRight,\n canvasWidth = _getCropzoneRectInfo2.canvasWidth,\n canvasHeight = _getCropzoneRectInfo2.canvasHeight;\n\n var resizeInfoMap = {\n tl: {\n width: rectRight - x,\n height: rectBottom - y,\n leftMaker: function leftMaker(newWidth) {\n return rectRight - newWidth;\n },\n topMaker: function topMaker(newHeight) {\n return rectBottom - newHeight;\n },\n maxWidth: rectRight,\n maxHeight: rectBottom,\n scaleTo: getScaleBasis(rectLeft - x, rectTop - y)\n },\n tr: {\n width: x - rectLeft,\n height: rectBottom - y,\n leftMaker: function leftMaker() {\n return rectLeft;\n },\n topMaker: function topMaker(newHeight) {\n return rectBottom - newHeight;\n },\n maxWidth: canvasWidth - rectLeft,\n maxHeight: rectBottom,\n scaleTo: getScaleBasis(x - rectRight, rectTop - y)\n },\n mt: {\n width: rectWidth,\n height: rectBottom - y,\n leftMaker: function leftMaker() {\n return rectLeft;\n },\n topMaker: function topMaker(newHeight) {\n return rectBottom - newHeight;\n },\n maxWidth: canvasWidth - rectLeft,\n maxHeight: rectBottom,\n scaleTo: 'height'\n },\n ml: {\n width: rectRight - x,\n height: rectHeight,\n leftMaker: function leftMaker(newWidth) {\n return rectRight - newWidth;\n },\n topMaker: function topMaker() {\n return rectTop;\n },\n maxWidth: rectRight,\n maxHeight: canvasHeight - rectTop,\n scaleTo: 'width'\n },\n mr: {\n width: x - rectLeft,\n height: rectHeight,\n leftMaker: function leftMaker() {\n return rectLeft;\n },\n topMaker: function topMaker() {\n return rectTop;\n },\n maxWidth: canvasWidth - rectLeft,\n maxHeight: canvasHeight - rectTop,\n scaleTo: 'width'\n },\n mb: {\n width: rectWidth,\n height: y - rectTop,\n leftMaker: function leftMaker() {\n return rectLeft;\n },\n topMaker: function topMaker() {\n return rectTop;\n },\n maxWidth: canvasWidth - rectLeft,\n maxHeight: canvasHeight - rectTop,\n scaleTo: 'height'\n },\n bl: {\n width: rectRight - x,\n height: y - rectTop,\n leftMaker: function leftMaker(newWidth) {\n return rectRight - newWidth;\n },\n topMaker: function topMaker() {\n return rectTop;\n },\n maxWidth: rectRight,\n maxHeight: canvasHeight - rectTop,\n scaleTo: getScaleBasis(rectLeft - x, y - rectBottom)\n },\n br: {\n width: x - rectLeft,\n height: y - rectTop,\n leftMaker: function leftMaker() {\n return rectLeft;\n },\n topMaker: function topMaker() {\n return rectTop;\n },\n maxWidth: canvasWidth - rectLeft,\n maxHeight: canvasHeight - rectTop,\n scaleTo: getScaleBasis(x - rectRight, y - rectBottom)\n }\n };\n\n return this.adjustRatioCropzoneSize(resizeInfoMap[corner]);\n },\n\n\n /**\n * Return the whether this cropzone is valid\n * @returns {boolean}\n */\n isValid: function isValid() {\n return this.left >= 0 && this.top >= 0 && this.width > 0 && this.height > 0;\n }\n});\n\nexports.default = Cropzone;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/extension/cropzone.js?");
/***/ }),
/***/ "./src/js/extension/emboss.js":
/*!************************************!*\
!*** ./src/js/extension/emboss.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Emboss object\n * @class Emboss\n * @extends {fabric.Image.filters.Convolute}\n * @ignore\n */\nvar Emboss = _fabric2.default.util.createClass(_fabric2.default.Image.filters.Convolute,\n/** @lends Convolute.prototype */{\n /**\n * Filter type\n * @param {String} type\n * @default\n */\n type: 'Emboss',\n\n /**\n * constructor\n * @override\n */\n initialize: function initialize() {\n var matrix = [1, 1, 1, 1, 0.7, -1, -1, -1, -1];\n this.matrix = matrix;\n }\n}); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Emboss extending fabric.Image.filters.Convolute\n */\nexports.default = Emboss;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/extension/emboss.js?");
/***/ }),
/***/ "./src/js/extension/mask.js":
/*!**********************************!*\
!*** ./src/js/extension/mask.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Mask object\n * @class Mask\n * @extends {fabric.Image.filters.BlendImage}\n * @ignore\n */\nvar Mask = _fabric2.default.util.createClass(_fabric2.default.Image.filters.BlendImage,\n/** @lends Mask.prototype */{\n /**\n * Apply filter to canvas element\n * @param {Object} pipelineState - Canvas element to apply filter\n * @override\n */\n applyTo: function applyTo(pipelineState) {\n if (!this.mask) {\n return;\n }\n\n var canvas = pipelineState.canvasEl;\n var width = canvas.width,\n height = canvas.height;\n\n var maskCanvasEl = this._createCanvasOfMask(width, height);\n var ctx = canvas.getContext('2d');\n var maskCtx = maskCanvasEl.getContext('2d');\n var imageData = ctx.getImageData(0, 0, width, height);\n\n this._drawMask(maskCtx, canvas, ctx);\n this._mapData(maskCtx, imageData, width, height);\n\n pipelineState.imageData = imageData;\n },\n\n\n /**\n * Create canvas of mask image\n * @param {number} width - Width of main canvas\n * @param {number} height - Height of main canvas\n * @returns {HTMLElement} Canvas element\n * @private\n */\n _createCanvasOfMask: function _createCanvasOfMask(width, height) {\n var maskCanvasEl = _fabric2.default.util.createCanvasElement();\n\n maskCanvasEl.width = width;\n maskCanvasEl.height = height;\n\n return maskCanvasEl;\n },\n\n\n /**\n * Draw mask image on canvas element\n * @param {Object} maskCtx - Context of mask canvas\n * @private\n */\n _drawMask: function _drawMask(maskCtx) {\n var mask = this.mask;\n\n var maskImg = mask.getElement();\n var angle = mask.angle,\n left = mask.left,\n scaleX = mask.scaleX,\n scaleY = mask.scaleY,\n top = mask.top;\n\n\n maskCtx.save();\n maskCtx.translate(left, top);\n maskCtx.rotate(angle * Math.PI / 180);\n maskCtx.scale(scaleX, scaleY);\n maskCtx.drawImage(maskImg, -maskImg.width / 2, -maskImg.height / 2);\n maskCtx.restore();\n },\n\n\n /**\n * Map mask image data to source image data\n * @param {Object} maskCtx - Context of mask canvas\n * @param {Object} imageData - Data of source image\n * @param {number} width - Width of main canvas\n * @param {number} height - Height of main canvas\n * @private\n */\n _mapData: function _mapData(maskCtx, imageData, width, height) {\n var data = imageData.data,\n imgHeight = imageData.height,\n imgWidth = imageData.width;\n\n var sourceData = data;\n var len = imgWidth * imgHeight * 4;\n var maskData = maskCtx.getImageData(0, 0, width, height).data;\n\n for (var i = 0; i < len; i += 4) {\n sourceData[i + 3] = maskData[i]; // adjust value of alpha data\n }\n }\n}); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Mask extending fabric.Image.filters.Mask\n */\nexports.default = Mask;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/extension/mask.js?");
/***/ }),
/***/ "./src/js/extension/sharpen.js":
/*!*************************************!*\
!*** ./src/js/extension/sharpen.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Sharpen object\n * @class Sharpen\n * @extends {fabric.Image.filters.Convolute}\n * @ignore\n */\nvar Sharpen = _fabric2.default.util.createClass(_fabric2.default.Image.filters.Convolute,\n/** @lends Convolute.prototype */{\n /**\n * Filter type\n * @param {String} type\n * @default\n */\n type: 'Sharpen',\n\n /**\n * constructor\n * @override\n */\n initialize: function initialize() {\n var matrix = [0, -1, 0, -1, 5, -1, 0, -1, 0];\n this.matrix = matrix;\n }\n}); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Sharpen extending fabric.Image.filters.Convolute\n */\nexports.default = Sharpen;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/extension/sharpen.js?");
/***/ }),
/***/ "./src/js/factory/command.js":
/*!***********************************!*\
!*** ./src/js/factory/command.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _command = __webpack_require__(/*! ../interface/command */ \"./src/js/interface/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar commands = {};\n\n/**\n * Create a command\n * @param {string} name - Command name\n * @param {...*} args - Arguments for creating command\n * @returns {Command}\n * @ignore\n */\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Command factory\n */\nfunction create(name) {\n var actions = commands[name];\n if (actions) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return new _command2.default(actions, args);\n }\n\n return null;\n}\n\n/**\n * Register a command with name as a key\n * @param {Object} command - {name:{string}, execute: {function}, undo: {function}}\n * @param {string} command.name - command name\n * @param {function} command.execute - executable function\n * @param {function} command.undo - undo function\n * @ignore\n */\nfunction register(command) {\n commands[command.name] = command;\n}\n\nexports.default = {\n create: create,\n register: register\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/factory/command.js?");
/***/ }),
/***/ "./src/js/factory/errorMessage.js":
/*!****************************************!*\
!*** ./src/js/factory/errorMessage.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Error-message factory\n */\nvar types = (0, _util.keyMirror)('UN_IMPLEMENTATION', 'NO_COMPONENT_NAME');\nvar messages = {\n UN_IMPLEMENTATION: 'Should implement a method: ',\n NO_COMPONENT_NAME: 'Should set a component name'\n};\nvar map = {\n UN_IMPLEMENTATION: function UN_IMPLEMENTATION(methodName) {\n return messages.UN_IMPLEMENTATION + methodName;\n },\n NO_COMPONENT_NAME: function NO_COMPONENT_NAME() {\n return messages.NO_COMPONENT_NAME;\n }\n};\n\nexports.default = {\n types: _tuiCodeSnippet2.default.extend({}, types),\n\n create: function create(type) {\n type = type.toLowerCase();\n var func = map[type];\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return func.apply(undefined, args);\n }\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/factory/errorMessage.js?");
/***/ }),
/***/ "./src/js/graphics.js":
/*!****************************!*\
!*** ./src/js/graphics.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Graphics module\n */\n\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _fabric = __webpack_require__(/*! fabric */ \"fabric\");\n\nvar _fabric2 = _interopRequireDefault(_fabric);\n\nvar _imageLoader = __webpack_require__(/*! ./component/imageLoader */ \"./src/js/component/imageLoader.js\");\n\nvar _imageLoader2 = _interopRequireDefault(_imageLoader);\n\nvar _cropper = __webpack_require__(/*! ./component/cropper */ \"./src/js/component/cropper.js\");\n\nvar _cropper2 = _interopRequireDefault(_cropper);\n\nvar _flip = __webpack_require__(/*! ./component/flip */ \"./src/js/component/flip.js\");\n\nvar _flip2 = _interopRequireDefault(_flip);\n\nvar _rotation = __webpack_require__(/*! ./component/rotation */ \"./src/js/component/rotation.js\");\n\nvar _rotation2 = _interopRequireDefault(_rotation);\n\nvar _freeDrawing = __webpack_require__(/*! ./component/freeDrawing */ \"./src/js/component/freeDrawing.js\");\n\nvar _freeDrawing2 = _interopRequireDefault(_freeDrawing);\n\nvar _line = __webpack_require__(/*! ./component/line */ \"./src/js/component/line.js\");\n\nvar _line2 = _interopRequireDefault(_line);\n\nvar _text = __webpack_require__(/*! ./component/text */ \"./src/js/component/text.js\");\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _icon = __webpack_require__(/*! ./component/icon */ \"./src/js/component/icon.js\");\n\nvar _icon2 = _interopRequireDefault(_icon);\n\nvar _filter = __webpack_require__(/*! ./component/filter */ \"./src/js/component/filter.js\");\n\nvar _filter2 = _interopRequireDefault(_filter);\n\nvar _shape = __webpack_require__(/*! ./component/shape */ \"./src/js/component/shape.js\");\n\nvar _shape2 = _interopRequireDefault(_shape);\n\nvar _cropper3 = __webpack_require__(/*! ./drawingMode/cropper */ \"./src/js/drawingMode/cropper.js\");\n\nvar _cropper4 = _interopRequireDefault(_cropper3);\n\nvar _freeDrawing3 = __webpack_require__(/*! ./drawingMode/freeDrawing */ \"./src/js/drawingMode/freeDrawing.js\");\n\nvar _freeDrawing4 = _interopRequireDefault(_freeDrawing3);\n\nvar _lineDrawing = __webpack_require__(/*! ./drawingMode/lineDrawing */ \"./src/js/drawingMode/lineDrawing.js\");\n\nvar _lineDrawing2 = _interopRequireDefault(_lineDrawing);\n\nvar _shape3 = __webpack_require__(/*! ./drawingMode/shape */ \"./src/js/drawingMode/shape.js\");\n\nvar _shape4 = _interopRequireDefault(_shape3);\n\nvar _text3 = __webpack_require__(/*! ./drawingMode/text */ \"./src/js/drawingMode/text.js\");\n\nvar _text4 = _interopRequireDefault(_text3);\n\nvar _icon3 = __webpack_require__(/*! ./drawingMode/icon */ \"./src/js/drawingMode/icon.js\");\n\nvar _icon4 = _interopRequireDefault(_icon3);\n\nvar _util = __webpack_require__(/*! ./util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ./consts */ \"./src/js/consts.js\");\n\nvar _selectionModifyHelper = __webpack_require__(/*! ./helper/selectionModifyHelper */ \"./src/js/helper/selectionModifyHelper.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar extend = _tuiCodeSnippet2.default.extend,\n stamp = _tuiCodeSnippet2.default.stamp,\n isArray = _tuiCodeSnippet2.default.isArray,\n isString = _tuiCodeSnippet2.default.isString,\n forEachArray = _tuiCodeSnippet2.default.forEachArray,\n forEachOwnProperties = _tuiCodeSnippet2.default.forEachOwnProperties,\n CustomEvents = _tuiCodeSnippet2.default.CustomEvents;\n\nvar DEFAULT_CSS_MAX_WIDTH = 1000;\nvar DEFAULT_CSS_MAX_HEIGHT = 800;\nvar EXTRA_PX_FOR_PASTE = 10;\n\nvar cssOnly = {\n cssOnly: true\n};\nvar backstoreOnly = {\n backstoreOnly: true\n};\n\n/**\n * Graphics class\n * @class\n * @param {string|HTMLElement} wrapper - Wrapper's element or selector\n * @param {Object} [option] - Canvas max width & height of css\n * @param {number} option.cssMaxWidth - Canvas css-max-width\n * @param {number} option.cssMaxHeight - Canvas css-max-height\n * @ignore\n */\n\nvar Graphics = function () {\n function Graphics(element) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n cssMaxWidth = _ref.cssMaxWidth,\n cssMaxHeight = _ref.cssMaxHeight;\n\n _classCallCheck(this, Graphics);\n\n /**\n * Fabric image instance\n * @type {fabric.Image}\n */\n this.canvasImage = null;\n\n /**\n * Max width of canvas elements\n * @type {number}\n */\n this.cssMaxWidth = cssMaxWidth || DEFAULT_CSS_MAX_WIDTH;\n\n /**\n * Max height of canvas elements\n * @type {number}\n */\n this.cssMaxHeight = cssMaxHeight || DEFAULT_CSS_MAX_HEIGHT;\n\n /**\n * cropper Selection Style\n * @type {Object}\n */\n this.cropSelectionStyle = {};\n\n /**\n * target fabric object for copy paste feature\n * @type {fabric.Object}\n * @private\n */\n this.targetObjectForCopyPaste = null;\n\n /**\n * Image name\n * @type {string}\n */\n this.imageName = '';\n\n /**\n * Object Map\n * @type {Object}\n * @private\n */\n this._objects = {};\n\n /**\n * Fabric-Canvas instance\n * @type {fabric.Canvas}\n * @private\n */\n this._canvas = null;\n\n /**\n * Drawing mode\n * @type {string}\n * @private\n */\n this._drawingMode = _consts.drawingModes.NORMAL;\n\n /**\n * DrawingMode map\n * @type {Object.<string, DrawingMode>}\n * @private\n */\n this._drawingModeMap = {};\n\n /**\n * Component map\n * @type {Object.<string, Component>}\n * @private\n */\n this._componentMap = {};\n\n /**\n * fabric event handlers\n * @type {Object.<string, function>}\n * @private\n */\n this._handler = {\n onMouseDown: this._onMouseDown.bind(this),\n onObjectAdded: this._onObjectAdded.bind(this),\n onObjectRemoved: this._onObjectRemoved.bind(this),\n onObjectMoved: this._onObjectMoved.bind(this),\n onObjectScaled: this._onObjectScaled.bind(this),\n onObjectModified: this._onObjectModified.bind(this),\n onObjectRotated: this._onObjectRotated.bind(this),\n onObjectSelected: this._onObjectSelected.bind(this),\n onPathCreated: this._onPathCreated.bind(this),\n onSelectionCleared: this._onSelectionCleared.bind(this),\n onSelectionCreated: this._onSelectionCreated.bind(this)\n };\n\n this._setObjectCachingToFalse();\n this._setCanvasElement(element);\n this._createDrawingModeInstances();\n this._createComponents();\n this._attachCanvasEvents();\n }\n\n /**\n * Destroy canvas element\n */\n\n\n _createClass(Graphics, [{\n key: 'destroy',\n value: function destroy() {\n var wrapperEl = this._canvas.wrapperEl;\n\n\n this._canvas.clear();\n\n wrapperEl.parentNode.removeChild(wrapperEl);\n }\n\n /**\n * Deactivates all objects on canvas\n * @returns {Graphics} this\n */\n\n }, {\n key: 'deactivateAll',\n value: function deactivateAll() {\n this._canvas.discardActiveObject();\n\n return this;\n }\n\n /**\n * Renders all objects on canvas\n * @returns {Graphics} this\n */\n\n }, {\n key: 'renderAll',\n value: function renderAll() {\n this._canvas.renderAll();\n\n return this;\n }\n\n /**\n * Adds objects on canvas\n * @param {Object|Array} objects - objects\n */\n\n }, {\n key: 'add',\n value: function add(objects) {\n var _canvas;\n\n var theArgs = [];\n if (isArray(objects)) {\n theArgs = objects;\n } else {\n theArgs.push(objects);\n }\n\n (_canvas = this._canvas).add.apply(_canvas, theArgs);\n }\n\n /**\n * Removes the object or group\n * @param {Object} target - graphics object or group\n * @returns {boolean} true if contains or false\n */\n\n }, {\n key: 'contains',\n value: function contains(target) {\n return this._canvas.contains(target);\n }\n\n /**\n * Gets all objects or group\n * @returns {Array} all objects, shallow copy\n */\n\n }, {\n key: 'getObjects',\n value: function getObjects() {\n return this._canvas.getObjects().slice();\n }\n\n /**\n * Get an object by id\n * @param {number} id - object id\n * @returns {fabric.Object} object corresponding id\n */\n\n }, {\n key: 'getObject',\n value: function getObject(id) {\n return this._objects[id];\n }\n\n /**\n * Removes the object or group\n * @param {Object} target - graphics object or group\n */\n\n }, {\n key: 'remove',\n value: function remove(target) {\n this._canvas.remove(target);\n }\n\n /**\n * Removes all object or group\n * @param {boolean} includesBackground - remove the background image or not\n * @returns {Array} all objects array which is removed\n */\n\n }, {\n key: 'removeAll',\n value: function removeAll(includesBackground) {\n var canvas = this._canvas;\n var objects = canvas.getObjects().slice();\n canvas.remove.apply(canvas, this._canvas.getObjects());\n\n if (includesBackground) {\n canvas.clear();\n }\n\n return objects;\n }\n\n /**\n * Removes an object or group by id\n * @param {number} id - object id\n * @returns {Array} removed objects\n */\n\n }, {\n key: 'removeObjectById',\n value: function removeObjectById(id) {\n var objects = [];\n var canvas = this._canvas;\n var target = this.getObject(id);\n var isValidGroup = target && target.isType('group') && !target.isEmpty();\n\n if (isValidGroup) {\n canvas.discardActiveObject(); // restore states for each objects\n target.forEachObject(function (obj) {\n objects.push(obj);\n canvas.remove(obj);\n });\n } else if (canvas.contains(target)) {\n objects.push(target);\n canvas.remove(target);\n }\n\n return objects;\n }\n\n /**\n * Get an id by object instance\n * @param {fabric.Object} object object\n * @returns {number} object id if it exists or null\n */\n\n }, {\n key: 'getObjectId',\n value: function getObjectId(object) {\n var key = null;\n for (key in this._objects) {\n if (this._objects.hasOwnProperty(key)) {\n if (object === this._objects[key]) {\n return key;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Gets an active object or group\n * @returns {Object} active object or group instance\n */\n\n }, {\n key: 'getActiveObject',\n value: function getActiveObject() {\n return this._canvas._activeObject;\n }\n\n /**\n * Returns the object ID to delete the object.\n * @returns {number} object id for remove\n */\n\n }, {\n key: 'getActiveObjectIdForRemove',\n value: function getActiveObjectIdForRemove() {\n var activeObject = this.getActiveObject();\n var type = activeObject.type,\n left = activeObject.left,\n top = activeObject.top;\n\n var isSelection = type === 'activeSelection';\n\n if (isSelection) {\n var group = new _fabric2.default.Group([].concat(activeObject.getObjects()), {\n left: left,\n top: top\n });\n\n return this._addFabricObject(group);\n }\n\n return this.getObjectId(activeObject);\n }\n\n /**\n * Verify that you are ready to erase the object.\n * @returns {boolean} ready for object remove\n */\n\n }, {\n key: 'isReadyRemoveObject',\n value: function isReadyRemoveObject() {\n var activeObject = this.getActiveObject();\n\n return activeObject && !activeObject.isEditing;\n }\n\n /**\n * Gets an active group object\n * @returns {Object} active group object instance\n */\n\n }, {\n key: 'getActiveObjects',\n value: function getActiveObjects() {\n var activeObject = this._canvas._activeObject;\n\n return activeObject && activeObject.type === 'activeSelection' ? activeObject : null;\n }\n\n /**\n * Get Active object Selection from object ids\n * @param {Array.<Object>} objects - fabric objects\n * @returns {Object} target - target object group\n */\n\n }, {\n key: 'getActiveSelectionFromObjects',\n value: function getActiveSelectionFromObjects(objects) {\n var canvas = this.getCanvas();\n\n return new _fabric2.default.ActiveSelection(objects, { canvas: canvas });\n }\n\n /**\n * Activates an object or group\n * @param {Object} target - target object or group\n */\n\n }, {\n key: 'setActiveObject',\n value: function setActiveObject(target) {\n this._canvas.setActiveObject(target);\n }\n\n /**\n * Set Crop selection style\n * @param {Object} style - Selection styles\n */\n\n }, {\n key: 'setCropSelectionStyle',\n value: function setCropSelectionStyle(style) {\n this.cropSelectionStyle = style;\n }\n\n /**\n * Get component\n * @param {string} name - Component name\n * @returns {Component}\n */\n\n }, {\n key: 'getComponent',\n value: function getComponent(name) {\n return this._componentMap[name];\n }\n\n /**\n * Get current drawing mode\n * @returns {string}\n */\n\n }, {\n key: 'getDrawingMode',\n value: function getDrawingMode() {\n return this._drawingMode;\n }\n\n /**\n * Start a drawing mode. If the current mode is not 'NORMAL', 'stopDrawingMode()' will be called first.\n * @param {String} mode Can be one of <I>'CROPPER', 'FREE_DRAWING', 'LINE', 'TEXT', 'SHAPE'</I>\n * @param {Object} [option] parameters of drawing mode, it's available with 'FREE_DRAWING', 'LINE_DRAWING'\n * @param {Number} [option.width] brush width\n * @param {String} [option.color] brush color\n * @returns {boolean} true if success or false\n */\n\n }, {\n key: 'startDrawingMode',\n value: function startDrawingMode(mode, option) {\n if (this._isSameDrawingMode(mode)) {\n return true;\n }\n\n // If the current mode is not 'NORMAL', 'stopDrawingMode()' will be called first.\n this.stopDrawingMode();\n\n var drawingModeInstance = this._getDrawingModeInstance(mode);\n if (drawingModeInstance && drawingModeInstance.start) {\n drawingModeInstance.start(this, option);\n\n this._drawingMode = mode;\n }\n\n return !!drawingModeInstance;\n }\n\n /**\n * Stop the current drawing mode and back to the 'NORMAL' mode\n */\n\n }, {\n key: 'stopDrawingMode',\n value: function stopDrawingMode() {\n if (this._isSameDrawingMode(_consts.drawingModes.NORMAL)) {\n return;\n }\n\n var drawingModeInstance = this._getDrawingModeInstance(this.getDrawingMode());\n if (drawingModeInstance && drawingModeInstance.end) {\n drawingModeInstance.end(this);\n }\n this._drawingMode = _consts.drawingModes.NORMAL;\n }\n\n /**\n * To data url from canvas\n * @param {Object} options - options for toDataURL\n * @param {String} [options.format=png] The format of the output image. Either \"jpeg\" or \"png\"\n * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.\n * @param {Number} [options.multiplier=1] Multiplier to scale by\n * @param {Number} [options.left] Cropping left offset. Introduced in fabric v1.2.14\n * @param {Number} [options.top] Cropping top offset. Introduced in fabric v1.2.14\n * @param {Number} [options.width] Cropping width. Introduced in fabric v1.2.14\n * @param {Number} [options.height] Cropping height. Introduced in fabric v1.2.14\n * @returns {string} A DOMString containing the requested data URI.\n */\n\n }, {\n key: 'toDataURL',\n value: function toDataURL(options) {\n var cropper = this.getComponent(_consts.componentNames.CROPPER);\n cropper.changeVisibility(false);\n\n var dataUrl = this._canvas && this._canvas.toDataURL(options);\n cropper.changeVisibility(true);\n\n return dataUrl;\n }\n\n /**\n * Save image(background) of canvas\n * @param {string} name - Name of image\n * @param {?fabric.Image} canvasImage - Fabric image instance\n */\n\n }, {\n key: 'setCanvasImage',\n value: function setCanvasImage(name, canvasImage) {\n if (canvasImage) {\n stamp(canvasImage);\n }\n this.imageName = name;\n this.canvasImage = canvasImage;\n }\n\n /**\n * Set css max dimension\n * @param {{width: number, height: number}} maxDimension - Max width & Max height\n */\n\n }, {\n key: 'setCssMaxDimension',\n value: function setCssMaxDimension(maxDimension) {\n this.cssMaxWidth = maxDimension.width || this.cssMaxWidth;\n this.cssMaxHeight = maxDimension.height || this.cssMaxHeight;\n }\n\n /**\n * Adjust canvas dimension with scaling image\n */\n\n }, {\n key: 'adjustCanvasDimension',\n value: function adjustCanvasDimension() {\n var canvasImage = this.canvasImage.scale(1);\n\n var _canvasImage$getBound = canvasImage.getBoundingRect(),\n width = _canvasImage$getBound.width,\n height = _canvasImage$getBound.height;\n\n var maxDimension = this._calcMaxDimension(width, height);\n\n this.setCanvasCssDimension({\n width: '100%',\n height: '100%', // Set height '' for IE9\n 'max-width': maxDimension.width + 'px',\n 'max-height': maxDimension.height + 'px'\n });\n\n this.setCanvasBackstoreDimension({\n width: width,\n height: height\n });\n this._canvas.centerObject(canvasImage);\n }\n\n /**\n * Set canvas dimension - css only\n * {@link http://fabricjs.com/docs/fabric.Canvas.html#setDimensions}\n * @param {Object} dimension - Canvas css dimension\n */\n\n }, {\n key: 'setCanvasCssDimension',\n value: function setCanvasCssDimension(dimension) {\n this._canvas.setDimensions(dimension, cssOnly);\n }\n\n /**\n * Set canvas dimension - backstore only\n * {@link http://fabricjs.com/docs/fabric.Canvas.html#setDimensions}\n * @param {Object} dimension - Canvas backstore dimension\n */\n\n }, {\n key: 'setCanvasBackstoreDimension',\n value: function setCanvasBackstoreDimension(dimension) {\n this._canvas.setDimensions(dimension, backstoreOnly);\n }\n\n /**\n * Set image properties\n * {@link http://fabricjs.com/docs/fabric.Image.html#set}\n * @param {Object} setting - Image properties\n * @param {boolean} [withRendering] - If true, The changed image will be reflected in the canvas\n */\n\n }, {\n key: 'setImageProperties',\n value: function setImageProperties(setting, withRendering) {\n var canvasImage = this.canvasImage;\n\n\n if (!canvasImage) {\n return;\n }\n\n canvasImage.set(setting).setCoords();\n if (withRendering) {\n this._canvas.renderAll();\n }\n }\n\n /**\n * Returns canvas element of fabric.Canvas[[lower-canvas]]\n * @returns {HTMLCanvasElement}\n */\n\n }, {\n key: 'getCanvasElement',\n value: function getCanvasElement() {\n return this._canvas.getElement();\n }\n\n /**\n * Get fabric.Canvas instance\n * @returns {fabric.Canvas}\n * @private\n */\n\n }, {\n key: 'getCanvas',\n value: function getCanvas() {\n return this._canvas;\n }\n\n /**\n * Get canvasImage (fabric.Image instance)\n * @returns {fabric.Image}\n */\n\n }, {\n key: 'getCanvasImage',\n value: function getCanvasImage() {\n return this.canvasImage;\n }\n\n /**\n * Get image name\n * @returns {string}\n */\n\n }, {\n key: 'getImageName',\n value: function getImageName() {\n return this.imageName;\n }\n\n /**\n * Add image object on canvas\n * @param {string} imgUrl - Image url to make object\n * @returns {Promise}\n */\n\n }, {\n key: 'addImageObject',\n value: function addImageObject(imgUrl) {\n var _this = this;\n\n var callback = this._callbackAfterLoadingImageObject.bind(this);\n\n return new _util.Promise(function (resolve) {\n _fabric2.default.Image.fromURL(imgUrl, function (image) {\n callback(image);\n resolve(_this.createObjectProperties(image));\n }, {\n crossOrigin: 'Anonymous'\n });\n });\n }\n\n /**\n * Get center position of canvas\n * @returns {Object} {left, top}\n */\n\n }, {\n key: 'getCenter',\n value: function getCenter() {\n return this._canvas.getCenter();\n }\n\n /**\n * Get cropped rect\n * @returns {Object} rect\n */\n\n }, {\n key: 'getCropzoneRect',\n value: function getCropzoneRect() {\n return this.getComponent(_consts.componentNames.CROPPER).getCropzoneRect();\n }\n\n /**\n * Get cropped rect\n * @param {number} [mode] cropzone rect mode\n */\n\n }, {\n key: 'setCropzoneRect',\n value: function setCropzoneRect(mode) {\n this.getComponent(_consts.componentNames.CROPPER).setCropzoneRect(mode);\n }\n\n /**\n * Get cropped image data\n * @param {Object} cropRect cropzone rect\n * @param {Number} cropRect.left left position\n * @param {Number} cropRect.top top position\n * @param {Number} cropRect.width width\n * @param {Number} cropRect.height height\n * @returns {?{imageName: string, url: string}} cropped Image data\n */\n\n }, {\n key: 'getCroppedImageData',\n value: function getCroppedImageData(cropRect) {\n return this.getComponent(_consts.componentNames.CROPPER).getCroppedImageData(cropRect);\n }\n\n /**\n * Set brush option\n * @param {Object} option brush option\n * @param {Number} option.width width\n * @param {String} option.color color like 'FFFFFF', 'rgba(0, 0, 0, 0.5)'\n */\n\n }, {\n key: 'setBrush',\n value: function setBrush(option) {\n var drawingMode = this._drawingMode;\n var compName = _consts.componentNames.FREE_DRAWING;\n\n if (drawingMode === _consts.drawingModes.LINE_DRAWING) {\n compName = _consts.componentNames.LINE;\n }\n\n this.getComponent(compName).setBrush(option);\n }\n\n /**\n * Set states of current drawing shape\n * @param {string} type - Shape type (ex: 'rect', 'circle', 'triangle')\n * @param {Object} [options] - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - {@link ShapeFillOption} or\n * Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stoke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.isRegular] - Whether resizing shape has 1:1 ratio or not\n */\n\n }, {\n key: 'setDrawingShape',\n value: function setDrawingShape(type, options) {\n this.getComponent(_consts.componentNames.SHAPE).setStates(type, options);\n }\n\n /**\n * Set style of current drawing icon\n * @param {string} type - icon type (ex: 'icon-arrow', 'icon-star')\n * @param {Object} [iconColor] - Icon color\n */\n\n }, {\n key: 'setIconStyle',\n value: function setIconStyle(type, iconColor) {\n this.getComponent(_consts.componentNames.ICON).setStates(type, iconColor);\n }\n\n /**\n * Register icon paths\n * @param {Object} pathInfos - Path infos\n * @param {string} pathInfos.key - key\n * @param {string} pathInfos.value - value\n */\n\n }, {\n key: 'registerPaths',\n value: function registerPaths(pathInfos) {\n this.getComponent(_consts.componentNames.ICON).registerPaths(pathInfos);\n }\n\n /**\n * Change cursor style\n * @param {string} cursorType - cursor type\n */\n\n }, {\n key: 'changeCursor',\n value: function changeCursor(cursorType) {\n var canvas = this.getCanvas();\n canvas.defaultCursor = cursorType;\n canvas.renderAll();\n }\n\n /**\n * Whether it has the filter or not\n * @param {string} type - Filter type\n * @returns {boolean} true if it has the filter\n */\n\n }, {\n key: 'hasFilter',\n value: function hasFilter(type) {\n return this.getComponent(_consts.componentNames.FILTER).hasFilter(type);\n }\n\n /**\n * Set selection style of fabric object by init option\n * @param {Object} styles - Selection styles\n */\n\n }, {\n key: 'setSelectionStyle',\n value: function setSelectionStyle(styles) {\n extend(_consts.fObjectOptions.SELECTION_STYLE, styles);\n }\n\n /**\n * Set object properties\n * @param {number} id - object id\n * @param {Object} props - props\n * @param {string} [props.fill] Color\n * @param {string} [props.fontFamily] Font type for text\n * @param {number} [props.fontSize] Size\n * @param {string} [props.fontStyle] Type of inclination (normal / italic)\n * @param {string} [props.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [props.textAlign] Type of text align (left / center / right)\n * @param {string} [props.textDecoration] Type of line (underline / line-through / overline)\n * @returns {Object} applied properties\n */\n\n }, {\n key: 'setObjectProperties',\n value: function setObjectProperties(id, props) {\n var object = this.getObject(id);\n var clone = extend({}, props);\n\n object.set(clone);\n\n object.setCoords();\n\n this.getCanvas().renderAll();\n\n return clone;\n }\n\n /**\n * Get object properties corresponding key\n * @param {number} id - object id\n * @param {Array<string>|ObjectProps|string} keys - property's key\n * @returns {Object} properties\n */\n\n }, {\n key: 'getObjectProperties',\n value: function getObjectProperties(id, keys) {\n var object = this.getObject(id);\n var props = {};\n\n if (isString(keys)) {\n props[keys] = object[keys];\n } else if (isArray(keys)) {\n forEachArray(keys, function (value) {\n props[value] = object[value];\n });\n } else {\n forEachOwnProperties(keys, function (value, key) {\n props[key] = object[key];\n });\n }\n\n return props;\n }\n\n /**\n * Get object position by originX, originY\n * @param {number} id - object id\n * @param {string} originX - can be 'left', 'center', 'right'\n * @param {string} originY - can be 'top', 'center', 'bottom'\n * @returns {Object} {{x:number, y: number}} position by origin if id is valid, or null\n */\n\n }, {\n key: 'getObjectPosition',\n value: function getObjectPosition(id, originX, originY) {\n var targetObj = this.getObject(id);\n if (!targetObj) {\n return null;\n }\n\n return targetObj.getPointByOrigin(originX, originY);\n }\n\n /**\n * Set object position by originX, originY\n * @param {number} id - object id\n * @param {Object} posInfo - position object\n * @param {number} posInfo.x - x position\n * @param {number} posInfo.y - y position\n * @param {string} posInfo.originX - can be 'left', 'center', 'right'\n * @param {string} posInfo.originY - can be 'top', 'center', 'bottom'\n * @returns {boolean} true if target id is valid or false\n */\n\n }, {\n key: 'setObjectPosition',\n value: function setObjectPosition(id, posInfo) {\n var targetObj = this.getObject(id);\n var x = posInfo.x,\n y = posInfo.y,\n originX = posInfo.originX,\n originY = posInfo.originY;\n\n if (!targetObj) {\n return false;\n }\n\n var targetOrigin = targetObj.getPointByOrigin(originX, originY);\n var centerOrigin = targetObj.getPointByOrigin('center', 'center');\n var diffX = centerOrigin.x - targetOrigin.x;\n var diffY = centerOrigin.y - targetOrigin.y;\n\n targetObj.set({\n left: x + diffX,\n top: y + diffY\n });\n\n targetObj.setCoords();\n\n return true;\n }\n\n /**\n * Get the canvas size\n * @returns {Object} {{width: number, height: number}} image size\n */\n\n }, {\n key: 'getCanvasSize',\n value: function getCanvasSize() {\n var image = this.getCanvasImage();\n\n return {\n width: image ? image.width : 0,\n height: image ? image.height : 0\n };\n }\n\n /**\n * Create fabric static canvas\n * @returns {Object} {{width: number, height: number}} image size\n */\n\n }, {\n key: 'createStaticCanvas',\n value: function createStaticCanvas() {\n var staticCanvas = new _fabric2.default.StaticCanvas();\n\n staticCanvas.set({\n enableRetinaScaling: false\n });\n\n return staticCanvas;\n }\n\n /**\n * Get a DrawingMode instance\n * @param {string} modeName - DrawingMode Class Name\n * @returns {DrawingMode} DrawingMode instance\n * @private\n */\n\n }, {\n key: '_getDrawingModeInstance',\n value: function _getDrawingModeInstance(modeName) {\n return this._drawingModeMap[modeName];\n }\n\n /**\n * Set object caching to false. This brought many bugs when draw Shape & cropzone\n * @see http://fabricjs.com/fabric-object-caching\n * @private\n */\n\n }, {\n key: '_setObjectCachingToFalse',\n value: function _setObjectCachingToFalse() {\n _fabric2.default.Object.prototype.objectCaching = false;\n }\n\n /**\n * Set canvas element to fabric.Canvas\n * @param {Element|string} element - Wrapper or canvas element or selector\n * @private\n */\n\n }, {\n key: '_setCanvasElement',\n value: function _setCanvasElement(element) {\n var selectedElement = void 0;\n var canvasElement = void 0;\n\n if (element.nodeType) {\n selectedElement = element;\n } else {\n selectedElement = document.querySelector(element);\n }\n\n if (selectedElement.nodeName.toUpperCase() !== 'CANVAS') {\n canvasElement = document.createElement('canvas');\n selectedElement.appendChild(canvasElement);\n }\n\n this._canvas = new _fabric2.default.Canvas(canvasElement, {\n containerClass: 'tui-image-editor-canvas-container',\n enableRetinaScaling: false\n });\n }\n\n /**\n * Creates DrawingMode instances\n * @private\n */\n\n }, {\n key: '_createDrawingModeInstances',\n value: function _createDrawingModeInstances() {\n this._register(this._drawingModeMap, new _cropper4.default());\n this._register(this._drawingModeMap, new _freeDrawing4.default());\n this._register(this._drawingModeMap, new _lineDrawing2.default());\n this._register(this._drawingModeMap, new _shape4.default());\n this._register(this._drawingModeMap, new _text4.default());\n this._register(this._drawingModeMap, new _icon4.default());\n }\n\n /**\n * Create components\n * @private\n */\n\n }, {\n key: '_createComponents',\n value: function _createComponents() {\n this._register(this._componentMap, new _imageLoader2.default(this));\n this._register(this._componentMap, new _cropper2.default(this));\n this._register(this._componentMap, new _flip2.default(this));\n this._register(this._componentMap, new _rotation2.default(this));\n this._register(this._componentMap, new _freeDrawing2.default(this));\n this._register(this._componentMap, new _line2.default(this));\n this._register(this._componentMap, new _text2.default(this));\n this._register(this._componentMap, new _icon2.default(this));\n this._register(this._componentMap, new _filter2.default(this));\n this._register(this._componentMap, new _shape2.default(this));\n }\n\n /**\n * Register component\n * @param {Object} map - map object\n * @param {Object} module - module which has getName method\n * @private\n */\n\n }, {\n key: '_register',\n value: function _register(map, module) {\n map[module.getName()] = module;\n }\n\n /**\n * Get the current drawing mode is same with given mode\n * @param {string} mode drawing mode\n * @returns {boolean} true if same or false\n */\n\n }, {\n key: '_isSameDrawingMode',\n value: function _isSameDrawingMode(mode) {\n return this.getDrawingMode() === mode;\n }\n\n /**\n * Calculate max dimension of canvas\n * The css-max dimension is dynamically decided with maintaining image ratio\n * The css-max dimension is lower than canvas dimension (attribute of canvas, not css)\n * @param {number} width - Canvas width\n * @param {number} height - Canvas height\n * @returns {{width: number, height: number}} - Max width & Max height\n * @private\n */\n\n }, {\n key: '_calcMaxDimension',\n value: function _calcMaxDimension(width, height) {\n var wScaleFactor = this.cssMaxWidth / width;\n var hScaleFactor = this.cssMaxHeight / height;\n var cssMaxWidth = Math.min(width, this.cssMaxWidth);\n var cssMaxHeight = Math.min(height, this.cssMaxHeight);\n\n if (wScaleFactor < 1 && wScaleFactor < hScaleFactor) {\n cssMaxWidth = width * wScaleFactor;\n cssMaxHeight = height * wScaleFactor;\n } else if (hScaleFactor < 1 && hScaleFactor < wScaleFactor) {\n cssMaxWidth = width * hScaleFactor;\n cssMaxHeight = height * hScaleFactor;\n }\n\n return {\n width: Math.floor(cssMaxWidth),\n height: Math.floor(cssMaxHeight)\n };\n }\n\n /**\n * Callback function after loading image\n * @param {fabric.Image} obj - Fabric image object\n * @private\n */\n\n }, {\n key: '_callbackAfterLoadingImageObject',\n value: function _callbackAfterLoadingImageObject(obj) {\n var centerPos = this.getCanvasImage().getCenterPoint();\n\n obj.set(_consts.fObjectOptions.SELECTION_STYLE);\n obj.set({\n left: centerPos.x,\n top: centerPos.y,\n crossOrigin: 'Anonymous'\n });\n\n this.getCanvas().add(obj).setActiveObject(obj);\n }\n\n /**\n * Attach canvas's events\n */\n\n }, {\n key: '_attachCanvasEvents',\n value: function _attachCanvasEvents() {\n var canvas = this._canvas;\n var handler = this._handler;\n canvas.on({\n 'mouse:down': handler.onMouseDown,\n 'object:added': handler.onObjectAdded,\n 'object:removed': handler.onObjectRemoved,\n 'object:moving': handler.onObjectMoved,\n 'object:scaling': handler.onObjectScaled,\n 'object:modified': handler.onObjectModified,\n 'object:rotating': handler.onObjectRotated,\n 'path:created': handler.onPathCreated,\n 'selection:cleared': handler.onSelectionCleared,\n 'selection:created': handler.onSelectionCreated,\n 'selection:updated': handler.onObjectSelected\n });\n }\n\n /**\n * \"mouse:down\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onMouseDown',\n value: function _onMouseDown(fEvent) {\n var _this2 = this;\n\n var event = fEvent.e,\n target = fEvent.target;\n\n var originPointer = this._canvas.getPointer(event);\n\n if (target) {\n var type = target.type;\n\n var undoData = (0, _selectionModifyHelper.makeSelectionUndoData)(target, function (item) {\n return (0, _selectionModifyHelper.makeSelectionUndoDatum)(_this2.getObjectId(item), item, type === 'activeSelection');\n });\n\n (0, _selectionModifyHelper.setCachedUndoDataForDimension)(undoData);\n }\n\n this.fire(_consts.eventNames.MOUSE_DOWN, event, originPointer);\n }\n\n /**\n * \"object:added\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectAdded',\n value: function _onObjectAdded(fEvent) {\n var obj = fEvent.target;\n if (obj.isType('cropzone')) {\n return;\n }\n\n this._addFabricObject(obj);\n }\n\n /**\n * \"object:removed\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectRemoved',\n value: function _onObjectRemoved(fEvent) {\n var obj = fEvent.target;\n\n this._removeFabricObject(stamp(obj));\n }\n\n /**\n * \"object:moving\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectMoved',\n value: function _onObjectMoved(fEvent) {\n var _this3 = this;\n\n this._lazyFire(_consts.eventNames.OBJECT_MOVED, function (object) {\n return _this3.createObjectProperties(object);\n }, fEvent.target);\n }\n\n /**\n * \"object:scaling\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectScaled',\n value: function _onObjectScaled(fEvent) {\n var _this4 = this;\n\n this._lazyFire(_consts.eventNames.OBJECT_SCALED, function (object) {\n return _this4.createObjectProperties(object);\n }, fEvent.target);\n }\n\n /**\n * \"object:modified\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectModified',\n value: function _onObjectModified(fEvent) {\n var target = fEvent.target;\n\n if (target.type === 'activeSelection') {\n var items = target.getObjects();\n\n items.forEach(function (item) {\n return item.fire('modifiedInGroup', target);\n });\n }\n\n this.fire(_consts.eventNames.OBJECT_MODIFIED, target, this.getObjectId(target));\n }\n\n /**\n * \"object:rotating\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectRotated',\n value: function _onObjectRotated(fEvent) {\n var _this5 = this;\n\n this._lazyFire(_consts.eventNames.OBJECT_ROTATED, function (object) {\n return _this5.createObjectProperties(object);\n }, fEvent.target);\n }\n\n /**\n * Lazy event emitter\n * @param {string} eventName - event name\n * @param {Function} paramsMaker - make param function\n * @param {Object} [target] - Object of the event owner.\n * @private\n */\n\n }, {\n key: '_lazyFire',\n value: function _lazyFire(eventName, paramsMaker, target) {\n var _this6 = this;\n\n var existEventDelegation = target && target.canvasEventDelegation;\n var delegationState = existEventDelegation ? target.canvasEventDelegation(eventName) : 'none';\n\n if (delegationState === 'unregisted') {\n target.canvasEventRegister(eventName, function (object) {\n _this6.fire(eventName, paramsMaker(object));\n });\n }\n\n if (delegationState === 'none') {\n this.fire(eventName, paramsMaker(target));\n }\n }\n\n /**\n * \"object:selected\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onObjectSelected',\n value: function _onObjectSelected(fEvent) {\n var target = fEvent.target;\n\n var params = this.createObjectProperties(target);\n\n this.fire(_consts.eventNames.OBJECT_ACTIVATED, params);\n }\n\n /**\n * \"path:created\" canvas event handler\n * @param {{path: fabric.Path}} obj - Path object\n * @private\n */\n\n }, {\n key: '_onPathCreated',\n value: function _onPathCreated(obj) {\n var _obj$path$getCenterPo = obj.path.getCenterPoint(),\n left = _obj$path$getCenterPo.x,\n top = _obj$path$getCenterPo.y;\n\n obj.path.set(extend({\n left: left,\n top: top\n }, _consts.fObjectOptions.SELECTION_STYLE));\n\n var params = this.createObjectProperties(obj.path);\n\n this.fire(_consts.eventNames.ADD_OBJECT, params);\n }\n\n /**\n * \"selction:cleared\" canvas event handler\n * @private\n */\n\n }, {\n key: '_onSelectionCleared',\n value: function _onSelectionCleared() {\n this.fire(_consts.eventNames.SELECTION_CLEARED);\n }\n\n /**\n * \"selction:created\" canvas event handler\n * @param {{target: fabric.Object, e: MouseEvent}} fEvent - Fabric event\n * @private\n */\n\n }, {\n key: '_onSelectionCreated',\n value: function _onSelectionCreated(fEvent) {\n var target = fEvent.target;\n\n var params = this.createObjectProperties(target);\n\n this.fire(_consts.eventNames.OBJECT_ACTIVATED, params);\n this.fire(_consts.eventNames.SELECTION_CREATED, fEvent.target);\n }\n\n /**\n * Canvas discard selection all\n */\n\n }, {\n key: 'discardSelection',\n value: function discardSelection() {\n this._canvas.discardActiveObject();\n this._canvas.renderAll();\n }\n\n /**\n * Canvas Selectable status change\n * @param {boolean} selectable - expect status\n */\n\n }, {\n key: 'changeSelectableAll',\n value: function changeSelectableAll(selectable) {\n this._canvas.forEachObject(function (obj) {\n obj.selectable = selectable;\n obj.hoverCursor = selectable ? 'move' : 'crosshair';\n });\n }\n\n /**\n * Return object's properties\n * @param {fabric.Object} obj - fabric object\n * @returns {Object} properties object\n */\n\n }, {\n key: 'createObjectProperties',\n value: function createObjectProperties(obj) {\n var predefinedKeys = ['left', 'top', 'width', 'height', 'fill', 'stroke', 'strokeWidth', 'opacity', 'angle'];\n var props = {\n id: stamp(obj),\n type: obj.type\n };\n\n extend(props, (0, _util.getProperties)(obj, predefinedKeys));\n\n if ((0, _util.includes)(['i-text', 'text'], obj.type)) {\n extend(props, this._createTextProperties(obj, props));\n } else if ((0, _util.includes)(['rect', 'triangle', 'circle'], obj.type)) {\n var shapeComp = this.getComponent(_consts.componentNames.SHAPE);\n extend(props, {\n fill: shapeComp.makeFillPropertyForUserEvent(obj)\n });\n }\n\n return props;\n }\n\n /**\n * Get text object's properties\n * @param {fabric.Object} obj - fabric text object\n * @param {Object} props - properties\n * @returns {Object} properties object\n */\n\n }, {\n key: '_createTextProperties',\n value: function _createTextProperties(obj) {\n var predefinedKeys = ['text', 'fontFamily', 'fontSize', 'fontStyle', 'textAlign', 'textDecoration', 'fontWeight'];\n var props = {};\n extend(props, (0, _util.getProperties)(obj, predefinedKeys));\n\n return props;\n }\n\n /**\n * Add object array by id\n * @param {fabric.Object} obj - fabric object\n * @returns {number} object id\n */\n\n }, {\n key: '_addFabricObject',\n value: function _addFabricObject(obj) {\n var id = stamp(obj);\n this._objects[id] = obj;\n\n return id;\n }\n\n /**\n * Remove an object in array yb id\n * @param {number} id - object id\n */\n\n }, {\n key: '_removeFabricObject',\n value: function _removeFabricObject(id) {\n delete this._objects[id];\n }\n\n /**\n * Reset targetObjectForCopyPaste value from activeObject\n */\n\n }, {\n key: 'resetTargetObjectForCopyPaste',\n value: function resetTargetObjectForCopyPaste() {\n var activeObject = this.getActiveObject();\n\n if (activeObject) {\n this.targetObjectForCopyPaste = activeObject;\n }\n }\n\n /**\n * Paste fabric object\n * @returns {Promise}\n */\n\n }, {\n key: 'pasteObject',\n value: function pasteObject() {\n var _this7 = this;\n\n if (!this.targetObjectForCopyPaste) {\n return _util.Promise.resolve([]);\n }\n\n var targetObject = this.targetObjectForCopyPaste;\n var isGroupSelect = targetObject.type === 'activeSelection';\n var targetObjects = isGroupSelect ? targetObject.getObjects() : [targetObject];\n var newTargetObject = null;\n\n this.discardSelection();\n\n return this._cloneObject(targetObjects).then(function (addedObjects) {\n if (addedObjects.length > 1) {\n newTargetObject = _this7.getActiveSelectionFromObjects(addedObjects);\n } else {\n newTargetObject = addedObjects[0];\n }\n _this7.targetObjectForCopyPaste = newTargetObject;\n _this7.setActiveObject(newTargetObject);\n });\n }\n\n /**\n * Clone object\n * @param {fabric.Object} targetObjects - fabric object\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: '_cloneObject',\n value: function _cloneObject(targetObjects) {\n var _this8 = this;\n\n var addedObjects = _tuiCodeSnippet2.default.map(targetObjects, function (targetObject) {\n return _this8._cloneObjectItem(targetObject);\n });\n\n return _util.Promise.all(addedObjects);\n }\n\n /**\n * Clone object one item\n * @param {fabric.Object} targetObject - fabric object\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: '_cloneObjectItem',\n value: function _cloneObjectItem(targetObject) {\n var _this9 = this;\n\n return this._copyFabricObjectForPaste(targetObject).then(function (clonedObject) {\n var objectProperties = _this9.createObjectProperties(clonedObject);\n _this9.add(clonedObject);\n\n _this9.fire(_consts.eventNames.ADD_OBJECT, objectProperties);\n\n return clonedObject;\n });\n }\n\n /**\n * Copy fabric object with Changed position for copy and paste\n * @param {fabric.Object} targetObject - fabric object\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: '_copyFabricObjectForPaste',\n value: function _copyFabricObjectForPaste(targetObject) {\n var _this10 = this;\n\n var addExtraPx = function addExtraPx(value, isReverse) {\n return isReverse ? value - EXTRA_PX_FOR_PASTE : value + EXTRA_PX_FOR_PASTE;\n };\n\n return this._copyFabricObject(targetObject).then(function (clonedObject) {\n var left = clonedObject.left,\n top = clonedObject.top,\n width = clonedObject.width,\n height = clonedObject.height;\n\n var _getCanvasSize = _this10.getCanvasSize(),\n canvasWidth = _getCanvasSize.width,\n canvasHeight = _getCanvasSize.height;\n\n var rightEdge = left + width / 2;\n var bottomEdge = top + height / 2;\n\n clonedObject.set(_tuiCodeSnippet2.default.extend({\n left: addExtraPx(left, rightEdge + EXTRA_PX_FOR_PASTE > canvasWidth),\n top: addExtraPx(top, bottomEdge + EXTRA_PX_FOR_PASTE > canvasHeight)\n }, _consts.fObjectOptions.SELECTION_STYLE));\n\n return clonedObject;\n });\n }\n\n /**\n * Copy fabric object\n * @param {fabric.Object} targetObject - fabric object\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: '_copyFabricObject',\n value: function _copyFabricObject(targetObject) {\n var _this11 = this;\n\n return new _util.Promise(function (resolve) {\n targetObject.clone(function (cloned) {\n var shapeComp = _this11.getComponent(_consts.componentNames.SHAPE);\n if ((0, _util.isShape)(cloned)) {\n shapeComp.processForCopiedObject(cloned, targetObject);\n }\n\n resolve(cloned);\n });\n });\n }\n }]);\n\n return Graphics;\n}();\n\nCustomEvents.mixin(Graphics);\n\nexports.default = Graphics;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/graphics.js?");
/***/ }),
/***/ "./src/js/helper/imagetracer.js":
/*!**************************************!*\
!*** ./src/js/helper/imagetracer.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\n imagetracer.js version 1.2.4\n Simple raster image tracer and vectorizer written in JavaScript.\n andras@jankovics.net\n*/\n\n/*\n The Unlicense / PUBLIC DOMAIN\n This is free and unencumbered software released into the public domain.\n Anyone is free to copy, modify, publish, use, compile, sell, or\n distribute this software, either in source code form or as a compiled\n binary, for any purpose, commercial or non-commercial, and by any\n means.\n In jurisdictions that recognize copyright laws, the author or authors\n of this software dedicate any and all copyright interest in the\n software to the public domain. We make this dedication for the benefit\n of the public at large and to the detriment of our heirs and\n successors. We intend this dedication to be an overt act of\n relinquishment in perpetuity of all present and future rights to this\n software under copyright law.\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n For more information, please refer to http://unlicense.org/\n*/\nvar ImageTracer = function () {\n _createClass(ImageTracer, null, [{\n key: 'tracerDefaultOption',\n value: function tracerDefaultOption() {\n return {\n pathomit: 100,\n ltres: 0.1,\n qtres: 1,\n\n scale: 1,\n strokewidth: 5,\n viewbox: false,\n linefilter: true,\n desc: false,\n rightangleenhance: false,\n pal: [{\n r: 0,\n g: 0,\n b: 0,\n a: 255\n }, {\n r: 255,\n g: 255,\n b: 255,\n a: 255\n }]\n };\n }\n /* eslint-disable */\n\n }]);\n\n function ImageTracer() {\n _classCallCheck(this, ImageTracer);\n\n this.versionnumber = '1.2.4';\n this.optionpresets = {\n default: {\n corsenabled: false,\n ltres: 1,\n qtres: 1,\n pathomit: 8,\n rightangleenhance: true,\n colorsampling: 2,\n numberofcolors: 16,\n mincolorratio: 0,\n colorquantcycles: 3,\n layering: 0,\n strokewidth: 1,\n linefilter: false,\n scale: 1,\n roundcoords: 1,\n viewbox: false,\n desc: false,\n lcpr: 0,\n qcpr: 0,\n blurradius: 0,\n blurdelta: 20\n },\n posterized1: {\n colorsampling: 0,\n numberofcolors: 2\n },\n posterized2: {\n numberofcolors: 4,\n blurradius: 5\n },\n curvy: {\n ltres: 0.01,\n linefilter: true,\n rightangleenhance: false\n },\n sharp: { qtres: 0.01, linefilter: false },\n detailed: { pathomit: 0, roundcoords: 2, ltres: 0.5, qtres: 0.5, numberofcolors: 64 },\n smoothed: { blurradius: 5, blurdelta: 64 },\n grayscale: { colorsampling: 0, colorquantcycles: 1, numberofcolors: 7 },\n fixedpalette: { colorsampling: 0, colorquantcycles: 1, numberofcolors: 27 },\n randomsampling1: { colorsampling: 1, numberofcolors: 8 },\n randomsampling2: { colorsampling: 1, numberofcolors: 64 },\n artistic1: {\n colorsampling: 0,\n colorquantcycles: 1,\n pathomit: 0,\n blurradius: 5,\n blurdelta: 64,\n ltres: 0.01,\n linefilter: true,\n numberofcolors: 16,\n strokewidth: 2\n },\n artistic2: {\n qtres: 0.01,\n colorsampling: 0,\n colorquantcycles: 1,\n numberofcolors: 4,\n strokewidth: 0\n },\n artistic3: { qtres: 10, ltres: 10, numberofcolors: 8 },\n artistic4: {\n qtres: 10,\n ltres: 10,\n numberofcolors: 64,\n blurradius: 5,\n blurdelta: 256,\n strokewidth: 2\n },\n posterized3: {\n ltres: 1,\n qtres: 1,\n pathomit: 20,\n rightangleenhance: true,\n colorsampling: 0,\n numberofcolors: 3,\n mincolorratio: 0,\n colorquantcycles: 3,\n blurradius: 3,\n blurdelta: 20,\n strokewidth: 0,\n linefilter: false,\n roundcoords: 1,\n pal: [{ r: 0, g: 0, b: 100, a: 255 }, { r: 255, g: 255, b: 255, a: 255 }]\n }\n };\n\n this.pathscan_combined_lookup = [[[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1]], [[0, 1, 0, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [0, 2, -1, 0]], [[-1, -1, -1, -1], [-1, -1, -1, -1], [0, 1, 0, -1], [0, 0, 1, 0]], [[0, 0, 1, 0], [-1, -1, -1, -1], [0, 2, -1, 0], [-1, -1, -1, -1]], [[-1, -1, -1, -1], [0, 0, 1, 0], [0, 3, 0, 1], [-1, -1, -1, -1]], [[13, 3, 0, 1], [13, 2, -1, 0], [7, 1, 0, -1], [7, 0, 1, 0]], [[-1, -1, -1, -1], [0, 1, 0, -1], [-1, -1, -1, -1], [0, 3, 0, 1]], [[0, 3, 0, 1], [0, 2, -1, 0], [-1, -1, -1, -1], [-1, -1, -1, -1]], [[0, 3, 0, 1], [0, 2, -1, 0], [-1, -1, -1, -1], [-1, -1, -1, -1]], [[-1, -1, -1, -1], [0, 1, 0, -1], [-1, -1, -1, -1], [0, 3, 0, 1]], [[11, 1, 0, -1], [14, 0, 1, 0], [14, 3, 0, 1], [11, 2, -1, 0]], [[-1, -1, -1, -1], [0, 0, 1, 0], [0, 3, 0, 1], [-1, -1, -1, -1]], [[0, 0, 1, 0], [-1, -1, -1, -1], [0, 2, -1, 0], [-1, -1, -1, -1]], [[-1, -1, -1, -1], [-1, -1, -1, -1], [0, 1, 0, -1], [0, 0, 1, 0]], [[0, 1, 0, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [0, 2, -1, 0]], [[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1]]];\n\n this.gks = [[0.27901, 0.44198, 0.27901], [0.135336, 0.228569, 0.272192, 0.228569, 0.135336], [0.086776, 0.136394, 0.178908, 0.195843, 0.178908, 0.136394, 0.086776], [0.063327, 0.093095, 0.122589, 0.144599, 0.152781, 0.144599, 0.122589, 0.093095, 0.063327], [0.049692, 0.069304, 0.089767, 0.107988, 0.120651, 0.125194, 0.120651, 0.107988, 0.089767, 0.069304, 0.049692]];\n\n this.specpalette = [{ r: 0, g: 0, b: 0, a: 255 }, { r: 128, g: 128, b: 128, a: 255 }, { r: 0, g: 0, b: 128, a: 255 }, { r: 64, g: 64, b: 128, a: 255 }, { r: 192, g: 192, b: 192, a: 255 }, { r: 255, g: 255, b: 255, a: 255 }, { r: 128, g: 128, b: 192, a: 255 }, { r: 0, g: 0, b: 192, a: 255 }, { r: 128, g: 0, b: 0, a: 255 }, { r: 128, g: 64, b: 64, a: 255 }, { r: 128, g: 0, b: 128, a: 255 }, { r: 168, g: 168, b: 168, a: 255 }, { r: 192, g: 128, b: 128, a: 255 }, { r: 192, g: 0, b: 0, a: 255 }, { r: 255, g: 255, b: 255, a: 255 }, { r: 0, g: 128, b: 0, a: 255 }];\n }\n\n _createClass(ImageTracer, [{\n key: 'imageToSVG',\n value: function imageToSVG(url, callback, options) {\n var _this = this;\n\n options = this.checkoptions(options);\n this.loadImage(url, function (canvas) {\n callback(_this.imagedataToSVG(_this.getImgdata(canvas), options));\n }, options);\n }\n }, {\n key: 'imagedataToSVG',\n value: function imagedataToSVG(imgd, options) {\n options = this.checkoptions(options);\n var td = this.imagedataToTracedata(imgd, options);\n\n return this.getsvgstring(td, options);\n }\n }, {\n key: 'imageToTracedata',\n value: function imageToTracedata(url, callback, options) {\n var _this2 = this;\n\n options = this.checkoptions(options);\n this.loadImage(url, function (canvas) {\n callback(_this2.imagedataToTracedata(_this2.getImgdata(canvas), options));\n }, options);\n }\n }, {\n key: 'imagedataToTracedata',\n value: function imagedataToTracedata(imgd, options) {\n options = this.checkoptions(options);\n var ii = this.colorquantization(imgd, options);\n var tracedata = void 0;\n if (options.layering === 0) {\n tracedata = {\n layers: [],\n palette: ii.palette,\n width: ii.array[0].length - 2,\n height: ii.array.length - 2\n };\n\n for (var colornum = 0; colornum < ii.palette.length; colornum += 1) {\n var tracedlayer = this.batchtracepaths(this.internodes(this.pathscan(this.layeringstep(ii, colornum), options.pathomit), options), options.ltres, options.qtres);\n tracedata.layers.push(tracedlayer);\n }\n } else {\n var ls = this.layering(ii);\n if (options.layercontainerid) {\n this.drawLayers(ls, this.specpalette, options.scale, options.layercontainerid);\n }\n var bps = this.batchpathscan(ls, options.pathomit);\n var bis = this.batchinternodes(bps, options);\n tracedata = {\n layers: this.batchtracelayers(bis, options.ltres, options.qtres),\n palette: ii.palette,\n width: imgd.width,\n height: imgd.height\n };\n }\n\n return tracedata;\n }\n }, {\n key: 'checkoptions',\n value: function checkoptions(options) {\n options = options || {};\n if (typeof options === 'string') {\n options = options.toLowerCase();\n if (this.optionpresets[options]) {\n options = this.optionpresets[options];\n } else {\n options = {};\n }\n }\n var ok = Object.keys(this.optionpresets['default']);\n for (var k = 0; k < ok.length; k += 1) {\n if (!options.hasOwnProperty(ok[k])) {\n options[ok[k]] = this.optionpresets['default'][ok[k]];\n }\n }\n\n return options;\n }\n }, {\n key: 'colorquantization',\n value: function colorquantization(imgd, options) {\n var arr = [];\n var idx = 0;\n var cd = void 0;\n var cdl = void 0;\n var ci = void 0;\n var paletteacc = [];\n var pixelnum = imgd.width * imgd.height;\n var i = void 0;\n var j = void 0;\n var k = void 0;\n var cnt = void 0;\n var palette = void 0;\n\n for (j = 0; j < imgd.height + 2; j += 1) {\n arr[j] = [];\n for (i = 0; i < imgd.width + 2; i += 1) {\n arr[j][i] = -1;\n }\n }\n if (options.pal) {\n palette = options.pal;\n } else if (options.colorsampling === 0) {\n palette = this.generatepalette(options.numberofcolors);\n } else if (options.colorsampling === 1) {\n palette = this.samplepalette(options.numberofcolors, imgd);\n } else {\n palette = this.samplepalette2(options.numberofcolors, imgd);\n }\n if (options.blurradius > 0) {\n imgd = this.blur(imgd, options.blurradius, options.blurdelta);\n }\n for (cnt = 0; cnt < options.colorquantcycles; cnt += 1) {\n if (cnt > 0) {\n for (k = 0; k < palette.length; k += 1) {\n if (paletteacc[k].n > 0) {\n palette[k] = {\n r: Math.floor(paletteacc[k].r / paletteacc[k].n),\n g: Math.floor(paletteacc[k].g / paletteacc[k].n),\n b: Math.floor(paletteacc[k].b / paletteacc[k].n),\n a: Math.floor(paletteacc[k].a / paletteacc[k].n)\n };\n }\n\n if (paletteacc[k].n / pixelnum < options.mincolorratio && cnt < options.colorquantcycles - 1) {\n palette[k] = {\n r: Math.floor(Math.random() * 255),\n g: Math.floor(Math.random() * 255),\n b: Math.floor(Math.random() * 255),\n a: Math.floor(Math.random() * 255)\n };\n }\n }\n }\n\n for (i = 0; i < palette.length; i += 1) {\n paletteacc[i] = { r: 0, g: 0, b: 0, a: 0, n: 0 };\n }\n\n for (j = 0; j < imgd.height; j += 1) {\n for (i = 0; i < imgd.width; i += 1) {\n idx = (j * imgd.width + i) * 4;\n\n ci = 0;\n cdl = 1024;\n for (k = 0; k < palette.length; k += 1) {\n cd = Math.abs(palette[k].r - imgd.data[idx]) + Math.abs(palette[k].g - imgd.data[idx + 1]) + Math.abs(palette[k].b - imgd.data[idx + 2]) + Math.abs(palette[k].a - imgd.data[idx + 3]);\n\n if (cd < cdl) {\n cdl = cd;\n ci = k;\n }\n }\n\n paletteacc[ci].r += imgd.data[idx];\n paletteacc[ci].g += imgd.data[idx + 1];\n paletteacc[ci].b += imgd.data[idx + 2];\n paletteacc[ci].a += imgd.data[idx + 3];\n paletteacc[ci].n += 1;\n\n arr[j + 1][i + 1] = ci;\n }\n }\n }\n\n return { array: arr, palette: palette };\n }\n }, {\n key: 'samplepalette',\n value: function samplepalette(numberofcolors, imgd) {\n var idx = void 0;\n var palette = [];\n for (var i = 0; i < numberofcolors; i += 1) {\n idx = Math.floor(Math.random() * imgd.data.length / 4) * 4;\n palette.push({\n r: imgd.data[idx],\n g: imgd.data[idx + 1],\n b: imgd.data[idx + 2],\n a: imgd.data[idx + 3]\n });\n }\n\n return palette;\n }\n }, {\n key: 'samplepalette2',\n value: function samplepalette2(numberofcolors, imgd) {\n var idx = void 0;\n var palette = [];\n var ni = Math.ceil(Math.sqrt(numberofcolors));\n var nj = Math.ceil(numberofcolors / ni);\n var vx = imgd.width / (ni + 1);\n var vy = imgd.height / (nj + 1);\n for (var j = 0; j < nj; j += 1) {\n for (var i = 0; i < ni; i += 1) {\n if (palette.length === numberofcolors) {\n break;\n } else {\n idx = Math.floor((j + 1) * vy * imgd.width + (i + 1) * vx) * 4;\n palette.push({\n r: imgd.data[idx],\n g: imgd.data[idx + 1],\n b: imgd.data[idx + 2],\n a: imgd.data[idx + 3]\n });\n }\n }\n }\n\n return palette;\n }\n }, {\n key: 'generatepalette',\n value: function generatepalette(numberofcolors) {\n var palette = [];\n var rcnt = void 0;\n var gcnt = void 0;\n var bcnt = void 0;\n if (numberofcolors < 8) {\n var graystep = Math.floor(255 / (numberofcolors - 1));\n for (var i = 0; i < numberofcolors; i += 1) {\n palette.push({ r: i * graystep, g: i * graystep, b: i * graystep, a: 255 });\n }\n } else {\n var colorqnum = Math.floor(Math.pow(numberofcolors, 1 / 3));\n var colorstep = Math.floor(255 / (colorqnum - 1));\n var rndnum = numberofcolors - colorqnum * colorqnum * colorqnum;\n for (rcnt = 0; rcnt < colorqnum; rcnt += 1) {\n for (gcnt = 0; gcnt < colorqnum; gcnt += 1) {\n for (bcnt = 0; bcnt < colorqnum; bcnt += 1) {\n palette.push({ r: rcnt * colorstep, g: gcnt * colorstep, b: bcnt * colorstep, a: 255 });\n }\n }\n }\n for (rcnt = 0; rcnt < rndnum; rcnt += 1) {\n palette.push({\n r: Math.floor(Math.random() * 255),\n g: Math.floor(Math.random() * 255),\n b: Math.floor(Math.random() * 255),\n a: Math.floor(Math.random() * 255)\n });\n }\n }\n\n return palette;\n }\n }, {\n key: 'layering',\n value: function layering(ii) {\n var layers = [];\n var val = 0;\n var ah = ii.array.length;\n var aw = ii.array[0].length;\n var n1 = void 0;\n var n2 = void 0;\n var n3 = void 0;\n var n4 = void 0;\n var n5 = void 0;\n var n6 = void 0;\n var n7 = void 0;\n var n8 = void 0;\n var i = void 0;\n var j = void 0;\n var k = void 0;\n for (k = 0; k < ii.palette.length; k += 1) {\n layers[k] = [];\n for (j = 0; j < ah; j += 1) {\n layers[k][j] = [];\n for (i = 0; i < aw; i += 1) {\n layers[k][j][i] = 0;\n }\n }\n }\n for (j = 1; j < ah - 1; j += 1) {\n for (i = 1; i < aw - 1; i += 1) {\n val = ii.array[j][i];\n\n n1 = ii.array[j - 1][i - 1] === val ? 1 : 0;\n n2 = ii.array[j - 1][i] === val ? 1 : 0;\n n3 = ii.array[j - 1][i + 1] === val ? 1 : 0;\n n4 = ii.array[j][i - 1] === val ? 1 : 0;\n n5 = ii.array[j][i + 1] === val ? 1 : 0;\n n6 = ii.array[j + 1][i - 1] === val ? 1 : 0;\n n7 = ii.array[j + 1][i] === val ? 1 : 0;\n n8 = ii.array[j + 1][i + 1] === val ? 1 : 0;\n\n layers[val][j + 1][i + 1] = 1 + n5 * 2 + n8 * 4 + n7 * 8;\n if (!n4) {\n layers[val][j + 1][i] = 0 + 2 + n7 * 4 + n6 * 8;\n }\n if (!n2) {\n layers[val][j][i + 1] = 0 + n3 * 2 + n5 * 4 + 8;\n }\n if (!n1) {\n layers[val][j][i] = 0 + n2 * 2 + 4 + n4 * 8;\n }\n }\n }\n\n return layers;\n }\n }, {\n key: 'layeringstep',\n value: function layeringstep(ii, cnum) {\n var layer = [];\n var ah = ii.array.length;\n var aw = ii.array[0].length;\n var i = void 0;\n var j = void 0;\n for (j = 0; j < ah; j += 1) {\n layer[j] = [];\n for (i = 0; i < aw; i += 1) {\n layer[j][i] = 0;\n }\n }\n for (j = 1; j < ah; j += 1) {\n for (i = 1; i < aw; i += 1) {\n layer[j][i] = (ii.array[j - 1][i - 1] === cnum ? 1 : 0) + (ii.array[j - 1][i] === cnum ? 2 : 0) + (ii.array[j][i - 1] === cnum ? 8 : 0) + (ii.array[j][i] === cnum ? 4 : 0);\n }\n }\n\n return layer;\n }\n }, {\n key: 'pathscan',\n value: function pathscan(arr, pathomit) {\n var paths = [];\n var pacnt = 0;\n var pcnt = 0;\n var px = 0;\n var py = 0;\n var w = arr[0].length;\n var h = arr.length;\n var dir = 0;\n var pathfinished = true;\n var holepath = false;\n var lookuprow = void 0;\n for (var j = 0; j < h; j += 1) {\n for (var i = 0; i < w; i += 1) {\n if (arr[j][i] === 4 || arr[j][i] === 11) {\n px = i;\n py = j;\n paths[pacnt] = {};\n paths[pacnt].points = [];\n paths[pacnt].boundingbox = [px, py, px, py];\n paths[pacnt].holechildren = [];\n pathfinished = false;\n pcnt = 0;\n holepath = arr[j][i] === 11;\n dir = 1;\n\n while (!pathfinished) {\n paths[pacnt].points[pcnt] = {};\n paths[pacnt].points[pcnt].x = px - 1;\n paths[pacnt].points[pcnt].y = py - 1;\n paths[pacnt].points[pcnt].t = arr[py][px];\n\n if (px - 1 < paths[pacnt].boundingbox[0]) {\n paths[pacnt].boundingbox[0] = px - 1;\n }\n if (px - 1 > paths[pacnt].boundingbox[2]) {\n paths[pacnt].boundingbox[2] = px - 1;\n }\n if (py - 1 < paths[pacnt].boundingbox[1]) {\n paths[pacnt].boundingbox[1] = py - 1;\n }\n if (py - 1 > paths[pacnt].boundingbox[3]) {\n paths[pacnt].boundingbox[3] = py - 1;\n }\n\n lookuprow = this.pathscan_combined_lookup[arr[py][px]][dir];\n arr[py][px] = lookuprow[0];\n dir = lookuprow[1];\n px += lookuprow[2];\n py += lookuprow[3];\n\n if (px - 1 === paths[pacnt].points[0].x && py - 1 === paths[pacnt].points[0].y) {\n pathfinished = true;\n\n if (paths[pacnt].points.length < pathomit) {\n paths.pop();\n } else {\n paths[pacnt].isholepath = !!holepath;\n\n if (holepath) {\n var parentidx = 0,\n parentbbox = [-1, -1, w + 1, h + 1];\n for (var parentcnt = 0; parentcnt < pacnt; parentcnt++) {\n if (!paths[parentcnt].isholepath && this.boundingboxincludes(paths[parentcnt].boundingbox, paths[pacnt].boundingbox) && this.boundingboxincludes(parentbbox, paths[parentcnt].boundingbox)) {\n parentidx = parentcnt;\n parentbbox = paths[parentcnt].boundingbox;\n }\n }\n paths[parentidx].holechildren.push(pacnt);\n }\n pacnt += 1;\n }\n }\n pcnt += 1;\n }\n }\n }\n }\n\n return paths;\n }\n }, {\n key: 'boundingboxincludes',\n value: function boundingboxincludes(parentbbox, childbbox) {\n return parentbbox[0] < childbbox[0] && parentbbox[1] < childbbox[1] && parentbbox[2] > childbbox[2] && parentbbox[3] > childbbox[3];\n }\n }, {\n key: 'batchpathscan',\n value: function batchpathscan(layers, pathomit) {\n var bpaths = [];\n for (var k in layers) {\n if (!layers.hasOwnProperty(k)) {\n continue;\n }\n bpaths[k] = this.pathscan(layers[k], pathomit);\n }\n\n return bpaths;\n }\n }, {\n key: 'internodes',\n value: function internodes(paths, options) {\n var ins = [];\n var palen = 0;\n var nextidx = 0;\n var nextidx2 = 0;\n var previdx = 0;\n var previdx2 = 0;\n var pacnt = void 0;\n var pcnt = void 0;\n for (pacnt = 0; pacnt < paths.length; pacnt += 1) {\n ins[pacnt] = {};\n ins[pacnt].points = [];\n ins[pacnt].boundingbox = paths[pacnt].boundingbox;\n ins[pacnt].holechildren = paths[pacnt].holechildren;\n ins[pacnt].isholepath = paths[pacnt].isholepath;\n palen = paths[pacnt].points.length;\n\n for (pcnt = 0; pcnt < palen; pcnt += 1) {\n nextidx = (pcnt + 1) % palen;\n nextidx2 = (pcnt + 2) % palen;\n previdx = (pcnt - 1 + palen) % palen;\n previdx2 = (pcnt - 2 + palen) % palen;\n\n if (options.rightangleenhance && this.testrightangle(paths[pacnt], previdx2, previdx, pcnt, nextidx, nextidx2)) {\n if (ins[pacnt].points.length > 0) {\n ins[pacnt].points[ins[pacnt].points.length - 1].linesegment = this.getdirection(ins[pacnt].points[ins[pacnt].points.length - 1].x, ins[pacnt].points[ins[pacnt].points.length - 1].y, paths[pacnt].points[pcnt].x, paths[pacnt].points[pcnt].y);\n }\n\n ins[pacnt].points.push({\n x: paths[pacnt].points[pcnt].x,\n y: paths[pacnt].points[pcnt].y,\n linesegment: this.getdirection(paths[pacnt].points[pcnt].x, paths[pacnt].points[pcnt].y, (paths[pacnt].points[pcnt].x + paths[pacnt].points[nextidx].x) / 2, (paths[pacnt].points[pcnt].y + paths[pacnt].points[nextidx].y) / 2)\n });\n }\n\n ins[pacnt].points.push({\n x: (paths[pacnt].points[pcnt].x + paths[pacnt].points[nextidx].x) / 2,\n y: (paths[pacnt].points[pcnt].y + paths[pacnt].points[nextidx].y) / 2,\n linesegment: this.getdirection((paths[pacnt].points[pcnt].x + paths[pacnt].points[nextidx].x) / 2, (paths[pacnt].points[pcnt].y + paths[pacnt].points[nextidx].y) / 2, (paths[pacnt].points[nextidx].x + paths[pacnt].points[nextidx2].x) / 2, (paths[pacnt].points[nextidx].y + paths[pacnt].points[nextidx2].y) / 2)\n });\n }\n }\n\n return ins;\n }\n }, {\n key: 'testrightangle',\n value: function testrightangle(path, idx1, idx2, idx3, idx4, idx5) {\n return path.points[idx3].x === path.points[idx1].x && path.points[idx3].x === path.points[idx2].x && path.points[idx3].y === path.points[idx4].y && path.points[idx3].y === path.points[idx5].y || path.points[idx3].y === path.points[idx1].y && path.points[idx3].y === path.points[idx2].y && path.points[idx3].x === path.points[idx4].x && path.points[idx3].x === path.points[idx5].x;\n }\n }, {\n key: 'getdirection',\n value: function getdirection(x1, y1, x2, y2) {\n var val = 8;\n if (x1 < x2) {\n if (y1 < y2) {\n val = 1;\n } else if (y1 > y2) {\n val = 7;\n } else {\n val = 0;\n }\n } else if (x1 > x2) {\n if (y1 < y2) {\n val = 3;\n } else if (y1 > y2) {\n val = 5;\n } else {\n val = 4;\n }\n } else if (y1 < y2) {\n val = 2;\n } else if (y1 > y2) {\n val = 6;\n } else {\n val = 8;\n }\n\n return val;\n }\n }, {\n key: 'batchinternodes',\n value: function batchinternodes(bpaths, options) {\n var binternodes = [];\n for (var k in bpaths) {\n if (!bpaths.hasOwnProperty(k)) {\n continue;\n }\n binternodes[k] = this.internodes(bpaths[k], options);\n }\n\n return binternodes;\n }\n }, {\n key: 'tracepath',\n value: function tracepath(path, ltres, qtres) {\n var pcnt = 0;\n var segtype1 = void 0;\n var segtype2 = void 0;\n var seqend = void 0;\n var smp = {};\n smp.segments = [];\n smp.boundingbox = path.boundingbox;\n smp.holechildren = path.holechildren;\n smp.isholepath = path.isholepath;\n\n while (pcnt < path.points.length) {\n segtype1 = path.points[pcnt].linesegment;\n segtype2 = -1;\n seqend = pcnt + 1;\n while ((path.points[seqend].linesegment === segtype1 || path.points[seqend].linesegment === segtype2 || segtype2 === -1) && seqend < path.points.length - 1) {\n if (path.points[seqend].linesegment !== segtype1 && segtype2 === -1) {\n segtype2 = path.points[seqend].linesegment;\n }\n seqend += 1;\n }\n if (seqend === path.points.length - 1) {\n seqend = 0;\n }\n\n smp.segments = smp.segments.concat(this.fitseq(path, ltres, qtres, pcnt, seqend));\n\n if (seqend > 0) {\n pcnt = seqend;\n } else {\n pcnt = path.points.length;\n }\n }\n\n return smp;\n }\n }, {\n key: 'fitseq',\n value: function fitseq(path, ltres, qtres, seqstart, seqend) {\n if (seqend > path.points.length || seqend < 0) {\n return [];\n }\n var errorpoint = seqstart,\n errorval = 0,\n curvepass = true,\n px = void 0,\n py = void 0,\n dist2 = void 0;\n var tl = seqend - seqstart;\n if (tl < 0) {\n tl += path.points.length;\n }\n var vx = (path.points[seqend].x - path.points[seqstart].x) / tl,\n vy = (path.points[seqend].y - path.points[seqstart].y) / tl;\n var pcnt = (seqstart + 1) % path.points.length,\n pl = void 0;\n while (pcnt != seqend) {\n pl = pcnt - seqstart;\n if (pl < 0) {\n pl += path.points.length;\n }\n px = path.points[seqstart].x + vx * pl;\n py = path.points[seqstart].y + vy * pl;\n dist2 = (path.points[pcnt].x - px) * (path.points[pcnt].x - px) + (path.points[pcnt].y - py) * (path.points[pcnt].y - py);\n if (dist2 > ltres) {\n curvepass = false;\n }\n if (dist2 > errorval) {\n errorpoint = pcnt;\n errorval = dist2;\n }\n pcnt = (pcnt + 1) % path.points.length;\n }\n if (curvepass) {\n return [{\n type: 'L',\n x1: path.points[seqstart].x,\n y1: path.points[seqstart].y,\n x2: path.points[seqend].x,\n y2: path.points[seqend].y\n }];\n }\n var fitpoint = errorpoint;\n curvepass = true;\n errorval = 0;\n var t = (fitpoint - seqstart) / tl,\n t1 = (1 - t) * (1 - t),\n t2 = 2 * (1 - t) * t,\n t3 = t * t;\n var cpx = (t1 * path.points[seqstart].x + t3 * path.points[seqend].x - path.points[fitpoint].x) / -t2,\n cpy = (t1 * path.points[seqstart].y + t3 * path.points[seqend].y - path.points[fitpoint].y) / -t2;\n pcnt = seqstart + 1;\n while (pcnt != seqend) {\n t = (pcnt - seqstart) / tl;\n t1 = (1 - t) * (1 - t);\n t2 = 2 * (1 - t) * t;\n t3 = t * t;\n px = t1 * path.points[seqstart].x + t2 * cpx + t3 * path.points[seqend].x;\n py = t1 * path.points[seqstart].y + t2 * cpy + t3 * path.points[seqend].y;\n dist2 = (path.points[pcnt].x - px) * (path.points[pcnt].x - px) + (path.points[pcnt].y - py) * (path.points[pcnt].y - py);\n if (dist2 > qtres) {\n curvepass = false;\n }\n if (dist2 > errorval) {\n errorpoint = pcnt;\n errorval = dist2;\n }\n pcnt = (pcnt + 1) % path.points.length;\n }\n if (curvepass) {\n return [{\n type: 'Q',\n x1: path.points[seqstart].x,\n y1: path.points[seqstart].y,\n x2: cpx,\n y2: cpy,\n x3: path.points[seqend].x,\n y3: path.points[seqend].y\n }];\n }\n var splitpoint = fitpoint;\n\n return this.fitseq(path, ltres, qtres, seqstart, splitpoint).concat(this.fitseq(path, ltres, qtres, splitpoint, seqend));\n }\n }, {\n key: 'batchtracepaths',\n value: function batchtracepaths(internodepaths, ltres, qtres) {\n var btracedpaths = [];\n for (var k in internodepaths) {\n if (!internodepaths.hasOwnProperty(k)) {\n continue;\n }\n btracedpaths.push(this.tracepath(internodepaths[k], ltres, qtres));\n }\n\n return btracedpaths;\n }\n }, {\n key: 'batchtracelayers',\n value: function batchtracelayers(binternodes, ltres, qtres) {\n var btbis = [];\n for (var k in binternodes) {\n if (!binternodes.hasOwnProperty(k)) {\n continue;\n }\n btbis[k] = this.batchtracepaths(binternodes[k], ltres, qtres);\n }\n\n return btbis;\n }\n }, {\n key: 'roundtodec',\n value: function roundtodec(val, places) {\n return Number(val.toFixed(places));\n }\n }, {\n key: 'svgpathstring',\n value: function svgpathstring(tracedata, lnum, pathnum, options) {\n var layer = tracedata.layers[lnum],\n smp = layer[pathnum],\n str = '',\n pcnt = void 0;\n if (options.linefilter && smp.segments.length < 3) {\n return str;\n }\n str = '<path ' + (options.desc ? 'desc=\"l ' + lnum + ' p ' + pathnum + '\" ' : '') + this.tosvgcolorstr(tracedata.palette[lnum], options) + 'd=\"';\n if (options.roundcoords === -1) {\n str += 'M ' + smp.segments[0].x1 * options.scale + ' ' + smp.segments[0].y1 * options.scale + ' ';\n for (pcnt = 0; pcnt < smp.segments.length; pcnt++) {\n str += smp.segments[pcnt].type + ' ' + smp.segments[pcnt].x2 * options.scale + ' ' + smp.segments[pcnt].y2 * options.scale + ' ';\n if (smp.segments[pcnt].hasOwnProperty('x3')) {\n str += smp.segments[pcnt].x3 * options.scale + ' ' + smp.segments[pcnt].y3 * options.scale + ' ';\n }\n }\n str += 'Z ';\n } else {\n str += 'M ' + this.roundtodec(smp.segments[0].x1 * options.scale, options.roundcoords) + ' ' + this.roundtodec(smp.segments[0].y1 * options.scale, options.roundcoords) + ' ';\n for (pcnt = 0; pcnt < smp.segments.length; pcnt++) {\n str += smp.segments[pcnt].type + ' ' + this.roundtodec(smp.segments[pcnt].x2 * options.scale, options.roundcoords) + ' ' + this.roundtodec(smp.segments[pcnt].y2 * options.scale, options.roundcoords) + ' ';\n if (smp.segments[pcnt].hasOwnProperty('x3')) {\n str += this.roundtodec(smp.segments[pcnt].x3 * options.scale, options.roundcoords) + ' ' + this.roundtodec(smp.segments[pcnt].y3 * options.scale, options.roundcoords) + ' ';\n }\n }\n str += 'Z ';\n }\n for (var hcnt = 0; hcnt < smp.holechildren.length; hcnt++) {\n var hsmp = layer[smp.holechildren[hcnt]];\n\n if (options.roundcoords === -1) {\n if (hsmp.segments[hsmp.segments.length - 1].hasOwnProperty('x3')) {\n str += 'M ' + hsmp.segments[hsmp.segments.length - 1].x3 * options.scale + ' ' + hsmp.segments[hsmp.segments.length - 1].y3 * options.scale + ' ';\n } else {\n str += 'M ' + hsmp.segments[hsmp.segments.length - 1].x2 * options.scale + ' ' + hsmp.segments[hsmp.segments.length - 1].y2 * options.scale + ' ';\n }\n for (pcnt = hsmp.segments.length - 1; pcnt >= 0; pcnt--) {\n str += hsmp.segments[pcnt].type + ' ';\n if (hsmp.segments[pcnt].hasOwnProperty('x3')) {\n str += hsmp.segments[pcnt].x2 * options.scale + ' ' + hsmp.segments[pcnt].y2 * options.scale + ' ';\n }\n str += hsmp.segments[pcnt].x1 * options.scale + ' ' + hsmp.segments[pcnt].y1 * options.scale + ' ';\n }\n } else {\n if (hsmp.segments[hsmp.segments.length - 1].hasOwnProperty('x3')) {\n str += 'M ' + this.roundtodec(hsmp.segments[hsmp.segments.length - 1].x3 * options.scale) + ' ' + this.roundtodec(hsmp.segments[hsmp.segments.length - 1].y3 * options.scale) + ' ';\n } else {\n str += 'M ' + this.roundtodec(hsmp.segments[hsmp.segments.length - 1].x2 * options.scale) + ' ' + this.roundtodec(hsmp.segments[hsmp.segments.length - 1].y2 * options.scale) + ' ';\n }\n for (pcnt = hsmp.segments.length - 1; pcnt >= 0; pcnt--) {\n str += hsmp.segments[pcnt].type + ' ';\n if (hsmp.segments[pcnt].hasOwnProperty('x3')) {\n str += this.roundtodec(hsmp.segments[pcnt].x2 * options.scale) + ' ' + this.roundtodec(hsmp.segments[pcnt].y2 * options.scale) + ' ';\n }\n str += this.roundtodec(hsmp.segments[pcnt].x1 * options.scale) + ' ' + this.roundtodec(hsmp.segments[pcnt].y1 * options.scale) + ' ';\n }\n }\n str += 'Z ';\n }\n str += '\" />';\n if (options.lcpr || options.qcpr) {\n for (pcnt = 0; pcnt < smp.segments.length; pcnt++) {\n if (smp.segments[pcnt].hasOwnProperty('x3') && options.qcpr) {\n str += '<circle cx=\"' + smp.segments[pcnt].x2 * options.scale + '\" cy=\"' + smp.segments[pcnt].y2 * options.scale + '\" r=\"' + options.qcpr + '\" fill=\"cyan\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"black\" />';\n str += '<circle cx=\"' + smp.segments[pcnt].x3 * options.scale + '\" cy=\"' + smp.segments[pcnt].y3 * options.scale + '\" r=\"' + options.qcpr + '\" fill=\"white\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"black\" />';\n str += '<line x1=\"' + smp.segments[pcnt].x1 * options.scale + '\" y1=\"' + smp.segments[pcnt].y1 * options.scale + '\" x2=\"' + smp.segments[pcnt].x2 * options.scale + '\" y2=\"' + smp.segments[pcnt].y2 * options.scale + '\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"cyan\" />';\n str += '<line x1=\"' + smp.segments[pcnt].x2 * options.scale + '\" y1=\"' + smp.segments[pcnt].y2 * options.scale + '\" x2=\"' + smp.segments[pcnt].x3 * options.scale + '\" y2=\"' + smp.segments[pcnt].y3 * options.scale + '\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"cyan\" />';\n }\n if (!smp.segments[pcnt].hasOwnProperty('x3') && options.lcpr) {\n str += '<circle cx=\"' + smp.segments[pcnt].x2 * options.scale + '\" cy=\"' + smp.segments[pcnt].y2 * options.scale + '\" r=\"' + options.lcpr + '\" fill=\"white\" stroke-width=\"' + options.lcpr * 0.2 + '\" stroke=\"black\" />';\n }\n }\n\n for (var hcnt = 0; hcnt < smp.holechildren.length; hcnt++) {\n var hsmp = layer[smp.holechildren[hcnt]];\n for (pcnt = 0; pcnt < hsmp.segments.length; pcnt++) {\n if (hsmp.segments[pcnt].hasOwnProperty('x3') && options.qcpr) {\n str += '<circle cx=\"' + hsmp.segments[pcnt].x2 * options.scale + '\" cy=\"' + hsmp.segments[pcnt].y2 * options.scale + '\" r=\"' + options.qcpr + '\" fill=\"cyan\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"black\" />';\n str += '<circle cx=\"' + hsmp.segments[pcnt].x3 * options.scale + '\" cy=\"' + hsmp.segments[pcnt].y3 * options.scale + '\" r=\"' + options.qcpr + '\" fill=\"white\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"black\" />';\n str += '<line x1=\"' + hsmp.segments[pcnt].x1 * options.scale + '\" y1=\"' + hsmp.segments[pcnt].y1 * options.scale + '\" x2=\"' + hsmp.segments[pcnt].x2 * options.scale + '\" y2=\"' + hsmp.segments[pcnt].y2 * options.scale + '\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"cyan\" />';\n str += '<line x1=\"' + hsmp.segments[pcnt].x2 * options.scale + '\" y1=\"' + hsmp.segments[pcnt].y2 * options.scale + '\" x2=\"' + hsmp.segments[pcnt].x3 * options.scale + '\" y2=\"' + hsmp.segments[pcnt].y3 * options.scale + '\" stroke-width=\"' + options.qcpr * 0.2 + '\" stroke=\"cyan\" />';\n }\n if (!hsmp.segments[pcnt].hasOwnProperty('x3') && options.lcpr) {\n str += '<circle cx=\"' + hsmp.segments[pcnt].x2 * options.scale + '\" cy=\"' + hsmp.segments[pcnt].y2 * options.scale + '\" r=\"' + options.lcpr + '\" fill=\"white\" stroke-width=\"' + options.lcpr * 0.2 + '\" stroke=\"black\" />';\n }\n }\n }\n }\n\n return str;\n }\n }, {\n key: 'getsvgstring',\n value: function getsvgstring(tracedata, options) {\n options = this.checkoptions(options);\n var w = tracedata.width * options.scale;\n var h = tracedata.height * options.scale;\n\n var svgstr = '<svg ' + (options.viewbox ? 'viewBox=\"0 0 ' + w + ' ' + h + '\" ' : 'width=\"' + w + '\" height=\"' + h + '\" ') + 'version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" desc=\"Created with imagetracer.js version ' + this.versionnumber + '\" >';\n for (var lcnt = 0; lcnt < tracedata.layers.length; lcnt += 1) {\n for (var pcnt = 0; pcnt < tracedata.layers[lcnt].length; pcnt += 1) {\n if (!tracedata.layers[lcnt][pcnt].isholepath) {\n svgstr += this.svgpathstring(tracedata, lcnt, pcnt, options);\n }\n }\n }\n svgstr += '</svg>';\n\n return svgstr;\n }\n }, {\n key: 'compareNumbers',\n value: function compareNumbers(a, b) {\n return a - b;\n }\n }, {\n key: 'torgbastr',\n value: function torgbastr(c) {\n return 'rgba(' + c.r + ',' + c.g + ',' + c.b + ',' + c.a + ')';\n }\n }, {\n key: 'tosvgcolorstr',\n value: function tosvgcolorstr(c, options) {\n return 'fill=\"rgb(' + c.r + ',' + c.g + ',' + c.b + ')\" stroke=\"rgb(' + c.r + ',' + c.g + ',' + c.b + ')\" stroke-width=\"' + options.strokewidth + '\" opacity=\"' + c.a / 255.0 + '\" ';\n }\n }, {\n key: 'appendSVGString',\n value: function appendSVGString(svgstr, parentid) {\n var div = void 0;\n if (parentid) {\n div = document.getElementById(parentid);\n if (!div) {\n div = document.createElement('div');\n div.id = parentid;\n document.body.appendChild(div);\n }\n } else {\n div = document.createElement('div');\n document.body.appendChild(div);\n }\n div.innerHTML += svgstr;\n }\n }, {\n key: 'blur',\n value: function blur(imgd, radius, delta) {\n var i = void 0,\n j = void 0,\n k = void 0,\n d = void 0,\n idx = void 0,\n racc = void 0,\n gacc = void 0,\n bacc = void 0,\n aacc = void 0,\n wacc = void 0;\n var imgd2 = { width: imgd.width, height: imgd.height, data: [] };\n radius = Math.floor(radius);\n if (radius < 1) {\n return imgd;\n }\n if (radius > 5) {\n radius = 5;\n }\n delta = Math.abs(delta);\n if (delta > 1024) {\n delta = 1024;\n }\n var thisgk = this.gks[radius - 1];\n for (j = 0; j < imgd.height; j++) {\n for (i = 0; i < imgd.width; i++) {\n racc = 0;\n gacc = 0;\n bacc = 0;\n aacc = 0;\n wacc = 0;\n\n for (k = -radius; k < radius + 1; k++) {\n if (i + k > 0 && i + k < imgd.width) {\n idx = (j * imgd.width + i + k) * 4;\n racc += imgd.data[idx] * thisgk[k + radius];\n gacc += imgd.data[idx + 1] * thisgk[k + radius];\n bacc += imgd.data[idx + 2] * thisgk[k + radius];\n aacc += imgd.data[idx + 3] * thisgk[k + radius];\n wacc += thisgk[k + radius];\n }\n }\n\n idx = (j * imgd.width + i) * 4;\n imgd2.data[idx] = Math.floor(racc / wacc);\n imgd2.data[idx + 1] = Math.floor(gacc / wacc);\n imgd2.data[idx + 2] = Math.floor(bacc / wacc);\n imgd2.data[idx + 3] = Math.floor(aacc / wacc);\n }\n }\n var himgd = new Uint8ClampedArray(imgd2.data);\n for (j = 0; j < imgd.height; j++) {\n for (i = 0; i < imgd.width; i++) {\n racc = 0;\n gacc = 0;\n bacc = 0;\n aacc = 0;\n wacc = 0;\n\n for (k = -radius; k < radius + 1; k++) {\n if (j + k > 0 && j + k < imgd.height) {\n idx = ((j + k) * imgd.width + i) * 4;\n racc += himgd[idx] * thisgk[k + radius];\n gacc += himgd[idx + 1] * thisgk[k + radius];\n bacc += himgd[idx + 2] * thisgk[k + radius];\n aacc += himgd[idx + 3] * thisgk[k + radius];\n wacc += thisgk[k + radius];\n }\n }\n\n idx = (j * imgd.width + i) * 4;\n imgd2.data[idx] = Math.floor(racc / wacc);\n imgd2.data[idx + 1] = Math.floor(gacc / wacc);\n imgd2.data[idx + 2] = Math.floor(bacc / wacc);\n imgd2.data[idx + 3] = Math.floor(aacc / wacc);\n }\n }\n for (j = 0; j < imgd.height; j++) {\n for (i = 0; i < imgd.width; i++) {\n idx = (j * imgd.width + i) * 4;\n\n d = Math.abs(imgd2.data[idx] - imgd.data[idx]) + Math.abs(imgd2.data[idx + 1] - imgd.data[idx + 1]) + Math.abs(imgd2.data[idx + 2] - imgd.data[idx + 2]) + Math.abs(imgd2.data[idx + 3] - imgd.data[idx + 3]);\n\n if (d > delta) {\n imgd2.data[idx] = imgd.data[idx];\n imgd2.data[idx + 1] = imgd.data[idx + 1];\n imgd2.data[idx + 2] = imgd.data[idx + 2];\n imgd2.data[idx + 3] = imgd.data[idx + 3];\n }\n }\n }\n\n return imgd2;\n }\n }, {\n key: 'loadImage',\n value: function loadImage(url, callback, options) {\n var img = new Image();\n if (options && options.corsenabled) {\n img.crossOrigin = 'Anonymous';\n }\n img.src = url;\n img.onload = function () {\n var canvas = document.createElement('canvas');\n canvas.width = img.width;\n canvas.height = img.height;\n var context = canvas.getContext('2d');\n context.drawImage(img, 0, 0);\n callback(canvas);\n };\n }\n }, {\n key: 'getImgdata',\n value: function getImgdata(canvas) {\n var context = canvas.getContext('2d');\n\n return context.getImageData(0, 0, canvas.width, canvas.height);\n }\n }, {\n key: 'drawLayers',\n value: function drawLayers(layers, palette, scale, parentid) {\n scale = scale || 1;\n var w = void 0,\n h = void 0,\n i = void 0,\n j = void 0,\n k = void 0;\n var div = void 0;\n if (parentid) {\n div = document.getElementById(parentid);\n if (!div) {\n div = document.createElement('div');\n div.id = parentid;\n document.body.appendChild(div);\n }\n } else {\n div = document.createElement('div');\n document.body.appendChild(div);\n }\n for (k in layers) {\n if (!layers.hasOwnProperty(k)) {\n continue;\n }\n\n w = layers[k][0].length;\n h = layers[k].length;\n\n var canvas = document.createElement('canvas');\n canvas.width = w * scale;\n canvas.height = h * scale;\n var context = canvas.getContext('2d');\n\n for (j = 0; j < h; j += 1) {\n for (i = 0; i < w; i += 1) {\n context.fillStyle = this.torgbastr(palette[layers[k][j][i] % palette.length]);\n context.fillRect(i * scale, j * scale, scale, scale);\n }\n }\n\n div.appendChild(canvas);\n }\n }\n }]);\n\n return ImageTracer;\n}();\n\nexports.default = ImageTracer;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/helper/imagetracer.js?");
/***/ }),
/***/ "./src/js/helper/selectionModifyHelper.js":
/*!************************************************!*\
!*** ./src/js/helper/selectionModifyHelper.js ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.setCachedUndoDataForDimension = setCachedUndoDataForDimension;\nexports.getCachedUndoDataForDimension = getCachedUndoDataForDimension;\nexports.makeSelectionUndoData = makeSelectionUndoData;\nexports.makeSelectionUndoDatum = makeSelectionUndoDatum;\n\nvar _object = __webpack_require__(/*! tui-code-snippet/src/js/object */ \"./node_modules/tui-code-snippet/src/js/object.js\");\n\n/**\n * Cached selection's info\n * @type {Array}\n * @private\n */\nvar cachedUndoDataForChangeDimension = null;\n\n/**\n * Set cached undo data\n * @param {Array} undoData - selection object\n * @private\n */\n/**\n * @author NHN. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Selection modification helper\n */\n\nfunction setCachedUndoDataForDimension(undoData) {\n cachedUndoDataForChangeDimension = undoData;\n}\n\n/**\n * Get cached undo data\n * @returns {Object} cached undo data\n * @private\n */\nfunction getCachedUndoDataForDimension() {\n return cachedUndoDataForChangeDimension;\n}\n\n/**\n * Make undo data\n * @param {fabric.Object} obj - selection object\n * @param {Function} undoDatumMaker - make undo datum\n * @returns {Array} undoData\n * @private\n */\nfunction makeSelectionUndoData(obj, undoDatumMaker) {\n var undoData = void 0;\n\n if (obj.type === 'activeSelection') {\n undoData = obj.getObjects().map(function (item) {\n var angle = item.angle,\n left = item.left,\n top = item.top,\n scaleX = item.scaleX,\n scaleY = item.scaleY,\n width = item.width,\n height = item.height;\n\n\n obj.realizeTransform(item);\n var result = undoDatumMaker(item);\n\n item.set({\n angle: angle,\n left: left,\n top: top,\n width: width,\n height: height,\n scaleX: scaleX,\n scaleY: scaleY\n });\n\n return result;\n });\n } else {\n undoData = [undoDatumMaker(obj)];\n }\n\n return undoData;\n}\n\n/**\n * Make undo datum\n * @param {number} id - object id\n * @param {fabric.Object} obj - selection object\n * @param {boolean} isSelection - whether or not object is selection\n * @returns {Object} undo datum\n * @private\n */\nfunction makeSelectionUndoDatum(id, obj, isSelection) {\n return isSelection ? {\n id: id,\n width: obj.width,\n height: obj.height,\n top: obj.top,\n left: obj.left,\n angle: obj.angle,\n scaleX: obj.scaleX,\n scaleY: obj.scaleY\n } : (0, _object.extend)({ id: id }, obj);\n}\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/helper/selectionModifyHelper.js?");
/***/ }),
/***/ "./src/js/helper/shapeFilterFillHelper.js":
/*!************************************************!*\
!*** ./src/js/helper/shapeFilterFillHelper.js ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFillImageFromShape = getFillImageFromShape;\nexports.rePositionFilterTypeFillImage = rePositionFilterTypeFillImage;\nexports.makeFilterOptionFromFabricImage = makeFilterOptionFromFabricImage;\nexports.makeFillPatternForFilter = makeFillPatternForFilter;\nexports.resetFillPatternCanvas = resetFillPatternCanvas;\nexports.reMakePatternImageSource = reMakePatternImageSource;\nexports.getCachedCanvasImageElement = getCachedCanvasImageElement;\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _shapeResizeHelper = __webpack_require__(/*! ../helper/shapeResizeHelper */ \"./src/js/helper/shapeResizeHelper.js\");\n\nvar _shapeResizeHelper2 = _interopRequireDefault(_shapeResizeHelper);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**\n * @author NHN. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Shape resize helper\n */\n\n\nvar FILTER_OPTION_MAP = {\n pixelate: 'blocksize',\n blur: 'blur'\n};\nvar POSITION_DIMENSION_MAP = {\n x: 'width',\n y: 'height'\n};\n\nvar FILTER_NAME_VALUE_MAP = (0, _util.flipObject)(FILTER_OPTION_MAP);\n\n/**\n * Cached canvas image element for fill image\n * @type {boolean}\n * @private\n */\nvar cachedCanvasImageElement = null;\n\n/**\n * Get background image of fill\n * @param {fabric.Object} shapeObj - Shape object\n * @returns {fabric.Image}\n * @private\n */\nfunction getFillImageFromShape(shapeObj) {\n var _getCustomProperty = (0, _util.getCustomProperty)(shapeObj, 'patternSourceCanvas'),\n patternSourceCanvas = _getCustomProperty.patternSourceCanvas;\n\n var _patternSourceCanvas$ = patternSourceCanvas.getObjects(),\n fillImage = _patternSourceCanvas$[0];\n\n return fillImage;\n}\n\n/**\n * Reset the image position in the filter type fill area.\n * @param {fabric.Object} shapeObj - Shape object\n * @private\n */\nfunction rePositionFilterTypeFillImage(shapeObj) {\n var angle = shapeObj.angle,\n flipX = shapeObj.flipX,\n flipY = shapeObj.flipY;\n\n var fillImage = getFillImageFromShape(shapeObj);\n var rotatedShapeCornerDimension = getRotatedDimension(shapeObj);\n var right = rotatedShapeCornerDimension.right,\n bottom = rotatedShapeCornerDimension.bottom;\n var width = rotatedShapeCornerDimension.width,\n height = rotatedShapeCornerDimension.height;\n\n var diffLeft = (width - shapeObj.width) / 2;\n var diffTop = (height - shapeObj.height) / 2;\n var cropX = shapeObj.left - shapeObj.width / 2 - diffLeft;\n var cropY = shapeObj.top - shapeObj.height / 2 - diffTop;\n var left = width / 2 - diffLeft;\n var top = height / 2 - diffTop;\n var fillImageMaxSize = Math.max(width, height) + Math.max(diffLeft, diffTop);\n\n var _calculateFillImageDi = calculateFillImageDimensionOutsideCanvas({\n shapeObj: shapeObj,\n left: left,\n top: top,\n width: width,\n height: height,\n cropX: cropX,\n cropY: cropY,\n flipX: flipX,\n flipY: flipY,\n right: right,\n bottom: bottom\n });\n\n left = _calculateFillImageDi[0];\n top = _calculateFillImageDi[1];\n width = _calculateFillImageDi[2];\n height = _calculateFillImageDi[3];\n\n\n fillImage.set({\n angle: flipX === flipY ? -angle : angle,\n left: left,\n top: top,\n width: width,\n height: height,\n cropX: cropX,\n cropY: cropY,\n flipX: flipX,\n flipY: flipY\n });\n\n (0, _util.setCustomProperty)(fillImage, { fillImageMaxSize: fillImageMaxSize });\n}\n\n/**\n * Make filter option from fabric image\n * @param {fabric.Image} imageObject - fabric image object\n * @returns {object}\n */\nfunction makeFilterOptionFromFabricImage(imageObject) {\n return (0, _tuiCodeSnippet.map)(imageObject.filters, function (filter) {\n var _Object$keys = Object.keys(filter),\n key = _Object$keys[0];\n\n return _defineProperty({}, FILTER_NAME_VALUE_MAP[key], filter[key]);\n });\n}\n\n/**\n * Calculate fill image position and size for out of Canvas\n * @param {Object} options - options for position dimension calculate\n * @param {fabric.Object} shapeObj - shape object\n * @param {number} left - original left position\n * @param {number} top - original top position\n * @param {number} width - image width\n * @param {number} height - image height\n * @param {number} cropX - image cropX\n * @param {number} cropY - image cropY\n * @param {boolean} flipX - shape flipX\n * @param {boolean} flipY - shape flipY\n * @returns {Object}\n */\nfunction calculateFillImageDimensionOutsideCanvas(_ref2) {\n var shapeObj = _ref2.shapeObj,\n left = _ref2.left,\n top = _ref2.top,\n width = _ref2.width,\n height = _ref2.height,\n cropX = _ref2.cropX,\n cropY = _ref2.cropY,\n flipX = _ref2.flipX,\n flipY = _ref2.flipY,\n right = _ref2.right,\n bottom = _ref2.bottom;\n\n var overflowAreaPositionFixer = function overflowAreaPositionFixer(type, outDistance, imageLeft, imageTop) {\n return calculateDistanceOverflowPart({\n type: type,\n outDistance: outDistance,\n shapeObj: shapeObj,\n flipX: flipX,\n flipY: flipY,\n left: imageLeft,\n top: imageTop\n });\n };\n var originalWidth = width,\n originalHeight = height;\n\n var _calculateDimensionLe = calculateDimensionLeftTopEdge(overflowAreaPositionFixer, {\n left: left,\n top: top,\n width: width,\n height: height,\n cropX: cropX,\n cropY: cropY\n });\n\n left = _calculateDimensionLe[0];\n top = _calculateDimensionLe[1];\n width = _calculateDimensionLe[2];\n height = _calculateDimensionLe[3];\n\n var _calculateDimensionRi = calculateDimensionRightBottomEdge(overflowAreaPositionFixer, {\n left: left,\n top: top,\n insideCanvasRealImageWidth: width,\n insideCanvasRealImageHeight: height,\n right: right,\n bottom: bottom,\n cropX: cropX,\n cropY: cropY,\n originalWidth: originalWidth,\n originalHeight: originalHeight\n });\n\n left = _calculateDimensionRi[0];\n top = _calculateDimensionRi[1];\n width = _calculateDimensionRi[2];\n height = _calculateDimensionRi[3];\n\n\n return [left, top, width, height];\n}\n\n/**\n * Calculate fill image position and size for for right bottom edge\n * @param {Function} overflowAreaPositionFixer - position fixer\n * @param {Object} options - options for position dimension calculate\n * @param {fabric.Object} shapeObj - shape object\n * @param {number} left - original left position\n * @param {number} top - original top position\n * @param {number} width - image width\n * @param {number} height - image height\n * @param {number} right - image right\n * @param {number} bottom - image bottom\n * @param {number} cropX - image cropX\n * @param {number} cropY - image cropY\n * @param {boolean} originalWidth - image original width\n * @param {boolean} originalHeight - image original height\n * @returns {Object}\n */\nfunction calculateDimensionRightBottomEdge(overflowAreaPositionFixer, _ref3) {\n var left = _ref3.left,\n top = _ref3.top,\n insideCanvasRealImageWidth = _ref3.insideCanvasRealImageWidth,\n insideCanvasRealImageHeight = _ref3.insideCanvasRealImageHeight,\n right = _ref3.right,\n bottom = _ref3.bottom,\n cropX = _ref3.cropX,\n cropY = _ref3.cropY,\n originalWidth = _ref3.originalWidth,\n originalHeight = _ref3.originalHeight;\n var width = insideCanvasRealImageWidth,\n height = insideCanvasRealImageHeight;\n var _cachedCanvasImageEle = cachedCanvasImageElement,\n canvasWidth = _cachedCanvasImageEle.width,\n canvasHeight = _cachedCanvasImageEle.height;\n\n\n if (right > canvasWidth && cropX > 0) {\n width = originalWidth - Math.abs(right - canvasWidth);\n }\n if (bottom > canvasHeight && cropY > 0) {\n height = originalHeight - Math.abs(bottom - canvasHeight);\n }\n\n var diff = {\n x: (insideCanvasRealImageWidth - width) / 2,\n y: (insideCanvasRealImageHeight - height) / 2\n };\n\n (0, _tuiCodeSnippet.forEach)(['x', 'y'], function (type) {\n var cropDistance2 = diff[type];\n if (cropDistance2 > 0) {\n var _overflowAreaPosition = overflowAreaPositionFixer(type, cropDistance2, left, top);\n\n left = _overflowAreaPosition[0];\n top = _overflowAreaPosition[1];\n }\n });\n\n return [left, top, width, height];\n}\n\n/**\n * Calculate fill image position and size for for left top\n * @param {Function} overflowAreaPositionFixer - position fixer\n * @param {Object} options - options for position dimension calculate\n * @param {fabric.Object} shapeObj - shape object\n * @param {number} left - original left position\n * @param {number} top - original top position\n * @param {number} width - image width\n * @param {number} height - image height\n * @param {number} cropX - image cropX\n * @param {number} cropY - image cropY\n * @returns {Object}\n */\nfunction calculateDimensionLeftTopEdge(overflowAreaPositionFixer, _ref4) {\n var left = _ref4.left,\n top = _ref4.top,\n width = _ref4.width,\n height = _ref4.height,\n cropX = _ref4.cropX,\n cropY = _ref4.cropY;\n\n var dimension = {\n width: width,\n height: height\n };\n\n (0, _tuiCodeSnippet.forEach)(['x', 'y'], function (type) {\n var cropDistance = type === 'x' ? cropX : cropY;\n var compareSize = dimension[POSITION_DIMENSION_MAP[type]];\n var standardSize = cachedCanvasImageElement[POSITION_DIMENSION_MAP[type]];\n\n if (compareSize > standardSize) {\n var outDistance = (compareSize - standardSize) / 2;\n\n dimension[POSITION_DIMENSION_MAP[type]] = standardSize;\n\n var _overflowAreaPosition2 = overflowAreaPositionFixer(type, outDistance, left, top);\n\n left = _overflowAreaPosition2[0];\n top = _overflowAreaPosition2[1];\n }\n if (cropDistance < 0) {\n var _overflowAreaPosition3 = overflowAreaPositionFixer(type, cropDistance, left, top);\n\n left = _overflowAreaPosition3[0];\n top = _overflowAreaPosition3[1];\n }\n });\n\n return [left, top, dimension.width, dimension.height];\n}\n\n/**\n * Make fill property of dynamic pattern type\n * @param {fabric.Image} canvasImage - canvas background image\n * @param {Array} filterOption - filter option\n * @param {fabric.StaticCanvas} patternSourceCanvas - fabric static canvas\n * @returns {Object}\n */\nfunction makeFillPatternForFilter(canvasImage, filterOption, patternSourceCanvas) {\n var copiedCanvasElement = getCachedCanvasImageElement(canvasImage);\n var fillImage = makeFillImage(copiedCanvasElement, canvasImage.angle, filterOption);\n patternSourceCanvas.add(fillImage);\n\n var fabricProperty = {\n fill: new fabric.Pattern({\n source: patternSourceCanvas.getElement(),\n repeat: 'no-repeat'\n })\n };\n\n (0, _util.setCustomProperty)(fabricProperty, { patternSourceCanvas: patternSourceCanvas });\n\n return fabricProperty;\n}\n\n/**\n * Reset fill pattern canvas\n * @param {fabric.StaticCanvas} patternSourceCanvas - fabric static canvas\n */\nfunction resetFillPatternCanvas(patternSourceCanvas) {\n var _patternSourceCanvas$2 = patternSourceCanvas.getObjects(),\n innerImage = _patternSourceCanvas$2[0];\n\n var _getCustomProperty2 = (0, _util.getCustomProperty)(innerImage, 'fillImageMaxSize'),\n fillImageMaxSize = _getCustomProperty2.fillImageMaxSize;\n\n fillImageMaxSize = Math.max(1, fillImageMaxSize);\n\n patternSourceCanvas.setDimensions({\n width: fillImageMaxSize,\n height: fillImageMaxSize\n });\n patternSourceCanvas.renderAll();\n}\n\n/**\n * Remake filter pattern image source\n * @param {fabric.Object} shapeObj - Shape object\n * @param {fabric.Image} canvasImage - canvas background image\n */\nfunction reMakePatternImageSource(shapeObj, canvasImage) {\n var _getCustomProperty3 = (0, _util.getCustomProperty)(shapeObj, 'patternSourceCanvas'),\n patternSourceCanvas = _getCustomProperty3.patternSourceCanvas;\n\n var _patternSourceCanvas$3 = patternSourceCanvas.getObjects(),\n fillImage = _patternSourceCanvas$3[0];\n\n var filterOption = makeFilterOptionFromFabricImage(fillImage);\n\n patternSourceCanvas.remove(fillImage);\n\n var copiedCanvasElement = getCachedCanvasImageElement(canvasImage, true);\n var newFillImage = makeFillImage(copiedCanvasElement, canvasImage.angle, filterOption);\n\n patternSourceCanvas.add(newFillImage);\n}\n\n/**\n * Calculate a point line outside the canvas.\n * @param {fabric.Image} canvasImage - canvas background image\n * @param {boolean} reset - default is false\n * @returns {HTMLImageElement}\n */\nfunction getCachedCanvasImageElement(canvasImage) {\n var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!cachedCanvasImageElement || reset) {\n cachedCanvasImageElement = canvasImage.toCanvasElement();\n }\n\n return cachedCanvasImageElement;\n}\n\n/**\n * Calculate fill image position for out of Canvas\n * @param {string} type - 'x' or 'y'\n * @param {fabric.Object} shapeObj - shape object\n * @param {number} outDistance - distance away\n * @param {number} left - original left position\n * @param {number} top - original top position\n * @returns {Array}\n */\nfunction calculateDistanceOverflowPart(_ref5) {\n var type = _ref5.type,\n shapeObj = _ref5.shapeObj,\n outDistance = _ref5.outDistance,\n left = _ref5.left,\n top = _ref5.top,\n flipX = _ref5.flipX,\n flipY = _ref5.flipY;\n\n var shapePointNavigation = getShapeEdgePoint(shapeObj);\n var shapeNeighborPointNavigation = [[1, 2], [0, 3], [0, 3], [1, 2]];\n var linePointsOutsideCanvas = calculateLinePointsOutsideCanvas(type, shapePointNavigation, shapeNeighborPointNavigation);\n var reatAngles = calculateLineAngleOfOutsideCanvas(type, shapePointNavigation, linePointsOutsideCanvas);\n var startPointIndex = linePointsOutsideCanvas.startPointIndex;\n\n var diffPosition = getReversePositionForFlip({\n outDistance: outDistance,\n startPointIndex: startPointIndex,\n flipX: flipX,\n flipY: flipY,\n reatAngles: reatAngles\n });\n\n return [left + diffPosition.left, top + diffPosition.top];\n}\n\n/**\n * Calculate fill image position for out of Canvas\n * @param {number} outDistance - distance away\n * @param {boolean} flipX - flip x statux\n * @param {boolean} flipY - flip y statux\n * @param {Array} reatAngles - Line angle of the rectangle vertex.\n * @returns {Object} diffPosition\n */\nfunction getReversePositionForFlip(_ref6) {\n var outDistance = _ref6.outDistance,\n startPointIndex = _ref6.startPointIndex,\n flipX = _ref6.flipX,\n flipY = _ref6.flipY,\n reatAngles = _ref6.reatAngles;\n\n var rotationChangePoint1 = outDistance * Math.cos(reatAngles[0] * Math.PI / 180);\n var rotationChangePoint2 = outDistance * Math.cos(reatAngles[1] * Math.PI / 180);\n var isForward = startPointIndex === 2 || startPointIndex === 3;\n var diffPosition = {\n top: isForward ? rotationChangePoint1 : rotationChangePoint2,\n left: isForward ? rotationChangePoint2 : rotationChangePoint1\n };\n\n if (isReverseLeftPositionForFlip(startPointIndex, flipX, flipY)) {\n diffPosition.left = diffPosition.left * -1;\n }\n if (isReverseTopPositionForFlip(startPointIndex, flipX, flipY)) {\n diffPosition.top = diffPosition.top * -1;\n }\n\n return diffPosition;\n}\n\n/**\n * Calculate a point line outside the canvas.\n * @param {string} type - 'x' or 'y'\n * @param {Array} shapePointNavigation - shape edge positions\n * @param {Object} shapePointNavigation.lefttop - left top position\n * @param {Object} shapePointNavigation.righttop - right top position\n * @param {Object} shapePointNavigation.leftbottom - lefttop position\n * @param {Object} shapePointNavigation.rightbottom - rightbottom position\n * @param {Array} shapeNeighborPointNavigation - Array to find adjacent edges.\n * @returns {Object}\n */\nfunction calculateLinePointsOutsideCanvas(type, shapePointNavigation, shapeNeighborPointNavigation) {\n var minimumPoint = 0;\n var minimumPointIndex = 0;\n (0, _tuiCodeSnippet.forEach)(shapePointNavigation, function (point, index) {\n if (point[type] < minimumPoint) {\n minimumPoint = point[type];\n minimumPointIndex = index;\n }\n });\n\n var _shapeNeighborPointNa = shapeNeighborPointNavigation[minimumPointIndex],\n endPointIndex1 = _shapeNeighborPointNa[0],\n endPointIndex2 = _shapeNeighborPointNa[1];\n\n\n return {\n startPointIndex: minimumPointIndex,\n endPointIndex1: endPointIndex1,\n endPointIndex2: endPointIndex2\n };\n}\n\n/**\n * Calculate a point line outside the canvas.\n * @param {string} type - 'x' or 'y'\n * @param {Array} shapePointNavigation - shape edge positions\n * @param {object} shapePointNavigation.lefttop - left top position\n * @param {object} shapePointNavigation.righttop - right top position\n * @param {object} shapePointNavigation.leftbottom - lefttop position\n * @param {object} shapePointNavigation.rightbottom - rightbottom position\n * @param {Object} linePointsOfOneVertexIndex - Line point of one vertex\n * @param {Object} linePointsOfOneVertexIndex.startPoint - start point index\n * @param {Object} linePointsOfOneVertexIndex.endPointIndex1 - end point index\n * @param {Object} linePointsOfOneVertexIndex.endPointIndex2 - end point index\n * @returns {Object}\n */\nfunction calculateLineAngleOfOutsideCanvas(type, shapePointNavigation, linePointsOfOneVertexIndex) {\n var startPointIndex = linePointsOfOneVertexIndex.startPointIndex,\n endPointIndex1 = linePointsOfOneVertexIndex.endPointIndex1,\n endPointIndex2 = linePointsOfOneVertexIndex.endPointIndex2;\n\n var horizontalVerticalAngle = type === 'x' ? 180 : 270;\n\n return (0, _tuiCodeSnippet.map)([endPointIndex1, endPointIndex2], function (pointIndex) {\n var startPoint = shapePointNavigation[startPointIndex];\n var endPoint = shapePointNavigation[pointIndex];\n var diffY = startPoint.y - endPoint.y;\n var diffX = startPoint.x - endPoint.x;\n\n return Math.atan2(diffY, diffX) * 180 / Math.PI - horizontalVerticalAngle;\n });\n}\n\n/* eslint-disable complexity */\n/**\n * Calculate a point line outside the canvas for horizontal.\n * @param {number} startPointIndex - start point index\n * @param {boolean} flipX - flip x statux\n * @param {boolean} flipY - flip y statux\n * @returns {boolean} flipY - flip y statux\n */\nfunction isReverseLeftPositionForFlip(startPointIndex, flipX, flipY) {\n return (!flipX && flipY || !flipX && !flipY) && startPointIndex === 0 || (flipX && flipY || flipX && !flipY) && startPointIndex === 1 || (!flipX && !flipY || !flipX && flipY) && startPointIndex === 2 || (flipX && !flipY || flipX && flipY) && startPointIndex === 3;\n}\n/* eslint-enable complexity */\n\n/* eslint-disable complexity */\n/**\n * Calculate a point line outside the canvas for vertical.\n * @param {number} startPointIndex - start point index\n * @param {boolean} flipX - flip x statux\n * @param {boolean} flipY - flip y statux\n * @returns {boolean} flipY - flip y statux\n */\nfunction isReverseTopPositionForFlip(startPointIndex, flipX, flipY) {\n return (flipX && !flipY || !flipX && !flipY) && startPointIndex === 0 || (!flipX && !flipY || flipX && !flipY) && startPointIndex === 1 || (flipX && flipY || !flipX && flipY) && startPointIndex === 2 || (!flipX && flipY || flipX && flipY) && startPointIndex === 3;\n}\n/* eslint-enable complexity */\n\n/**\n * Shape edge points\n * @param {fabric.Object} shapeObj - Selected shape object on canvas\n * @returns {Array} shapeEdgePoint - shape edge positions\n */\nfunction getShapeEdgePoint(shapeObj) {\n return [shapeObj.getPointByOrigin('left', 'top'), shapeObj.getPointByOrigin('right', 'top'), shapeObj.getPointByOrigin('left', 'bottom'), shapeObj.getPointByOrigin('right', 'bottom')];\n}\n\n/**\n * Rotated shape dimension\n * @param {fabric.Object} shapeObj - Shape object\n * @returns {Object} Rotated shape dimension\n */\nfunction getRotatedDimension(shapeObj) {\n var _getShapeEdgePoint = getShapeEdgePoint(shapeObj),\n _getShapeEdgePoint$ = _getShapeEdgePoint[0],\n ax = _getShapeEdgePoint$.x,\n ay = _getShapeEdgePoint$.y,\n _getShapeEdgePoint$2 = _getShapeEdgePoint[1],\n bx = _getShapeEdgePoint$2.x,\n by = _getShapeEdgePoint$2.y,\n _getShapeEdgePoint$3 = _getShapeEdgePoint[2],\n cx = _getShapeEdgePoint$3.x,\n cy = _getShapeEdgePoint$3.y,\n _getShapeEdgePoint$4 = _getShapeEdgePoint[3],\n dx = _getShapeEdgePoint$4.x,\n dy = _getShapeEdgePoint$4.y;\n\n var left = Math.min(ax, bx, cx, dx);\n var top = Math.min(ay, by, cy, dy);\n var right = Math.max(ax, bx, cx, dx);\n var bottom = Math.max(ay, by, cy, dy);\n\n return {\n left: left,\n top: top,\n right: right,\n bottom: bottom,\n width: right - left,\n height: bottom - top\n };\n}\n\n/**\n * Make fill image\n * @param {HTMLImageElement} copiedCanvasElement - html image element\n * @param {number} currentCanvasImageAngle - current canvas angle\n * @param {Array} filterOption - filter option\n * @returns {fabric.Image}\n * @private\n */\nfunction makeFillImage(copiedCanvasElement, currentCanvasImageAngle, filterOption) {\n var fillImage = new fabric.Image(copiedCanvasElement);\n\n (0, _tuiCodeSnippet.forEach)(_tuiCodeSnippet.extend.apply(undefined, [{}].concat(filterOption)), function (value, key) {\n var fabricFiterClassName = (0, _util.capitalizeString)(key);\n var filter = new fabric.Image.filters[fabricFiterClassName](_defineProperty({}, FILTER_OPTION_MAP[key], value));\n fillImage.filters.push(filter);\n });\n fillImage.applyFilters();\n\n (0, _util.setCustomProperty)(fillImage, {\n originalAngle: currentCanvasImageAngle,\n fillImageMaxSize: Math.max(fillImage.width, fillImage.height)\n });\n _shapeResizeHelper2.default.adjustOriginToCenter(fillImage);\n\n return fillImage;\n}\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/helper/shapeFilterFillHelper.js?");
/***/ }),
/***/ "./src/js/helper/shapeResizeHelper.js":
/*!********************************************!*\
!*** ./src/js/helper/shapeResizeHelper.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Shape resize helper\n */\nvar DIVISOR = {\n rect: 1,\n circle: 2,\n triangle: 1\n};\nvar DIMENSION_KEYS = {\n rect: {\n w: 'width',\n h: 'height'\n },\n circle: {\n w: 'rx',\n h: 'ry'\n },\n triangle: {\n w: 'width',\n h: 'height'\n }\n};\n\n/**\n * Set the start point value to the shape object\n * @param {fabric.Object} shape - Shape object\n * @ignore\n */\nfunction setStartPoint(shape) {\n var originX = shape.originX,\n originY = shape.originY;\n\n var originKey = originX.substring(0, 1) + originY.substring(0, 1);\n\n shape.startPoint = shape.origins[originKey];\n}\n\n/**\n * Get the positions of ratated origin by the pointer value\n * @param {{x: number, y: number}} origin - Origin value\n * @param {{x: number, y: number}} pointer - Pointer value\n * @param {number} angle - Rotating angle\n * @returns {Object} Postions of origin\n * @ignore\n */\nfunction getPositionsOfRotatedOrigin(origin, pointer, angle) {\n var sx = origin.x;\n var sy = origin.y;\n var px = pointer.x;\n var py = pointer.y;\n var r = angle * Math.PI / 180;\n var rx = (px - sx) * Math.cos(r) - (py - sy) * Math.sin(r) + sx;\n var ry = (px - sx) * Math.sin(r) + (py - sy) * Math.cos(r) + sy;\n\n return {\n originX: sx > rx ? 'right' : 'left',\n originY: sy > ry ? 'bottom' : 'top'\n };\n}\n\n/**\n * Whether the shape has the center origin or not\n * @param {fabric.Object} shape - Shape object\n * @returns {boolean} State\n * @ignore\n */\nfunction hasCenterOrigin(shape) {\n return shape.originX === 'center' && shape.originY === 'center';\n}\n\n/**\n * Adjust the origin of shape by the start point\n * @param {{x: number, y: number}} pointer - Pointer value\n * @param {fabric.Object} shape - Shape object\n * @ignore\n */\nfunction adjustOriginByStartPoint(pointer, shape) {\n var centerPoint = shape.getPointByOrigin('center', 'center');\n var angle = -shape.angle;\n var originPositions = getPositionsOfRotatedOrigin(centerPoint, pointer, angle);\n var originX = originPositions.originX,\n originY = originPositions.originY;\n\n var origin = shape.getPointByOrigin(originX, originY);\n var left = shape.left - (centerPoint.x - origin.x);\n var top = shape.top - (centerPoint.y - origin.y);\n\n shape.set({\n originX: originX,\n originY: originY,\n left: left,\n top: top\n });\n\n shape.setCoords();\n}\n\n/**\n * Adjust the origin of shape by the moving pointer value\n * @param {{x: number, y: number}} pointer - Pointer value\n * @param {fabric.Object} shape - Shape object\n * @ignore\n */\nfunction adjustOriginByMovingPointer(pointer, shape) {\n var origin = shape.startPoint;\n var angle = -shape.angle;\n var originPositions = getPositionsOfRotatedOrigin(origin, pointer, angle);\n var originX = originPositions.originX,\n originY = originPositions.originY;\n\n\n shape.setPositionByOrigin(origin, originX, originY);\n shape.setCoords();\n}\n\n/**\n * Adjust the dimension of shape on firing scaling event\n * @param {fabric.Object} shape - Shape object\n * @ignore\n */\nfunction adjustDimensionOnScaling(shape) {\n var type = shape.type,\n scaleX = shape.scaleX,\n scaleY = shape.scaleY;\n\n var dimensionKeys = DIMENSION_KEYS[type];\n var width = shape[dimensionKeys.w] * scaleX;\n var height = shape[dimensionKeys.h] * scaleY;\n\n if (shape.isRegular) {\n var maxScale = Math.max(scaleX, scaleY);\n\n width = shape[dimensionKeys.w] * maxScale;\n height = shape[dimensionKeys.h] * maxScale;\n }\n\n var options = {\n hasControls: false,\n hasBorders: false,\n scaleX: 1,\n scaleY: 1\n };\n\n options[dimensionKeys.w] = width;\n options[dimensionKeys.h] = height;\n\n shape.set(options);\n}\n\n/**\n * Adjust the dimension of shape on firing mouse move event\n * @param {{x: number, y: number}} pointer - Pointer value\n * @param {fabric.Object} shape - Shape object\n * @ignore\n */\nfunction adjustDimensionOnMouseMove(pointer, shape) {\n var type = shape.type,\n strokeWidth = shape.strokeWidth,\n origin = shape.startPoint;\n\n var divisor = DIVISOR[type];\n var dimensionKeys = DIMENSION_KEYS[type];\n var isTriangle = !!(shape.type === 'triangle');\n var options = {};\n var width = Math.abs(origin.x - pointer.x) / divisor;\n var height = Math.abs(origin.y - pointer.y) / divisor;\n\n if (width > strokeWidth) {\n width -= strokeWidth / divisor;\n }\n\n if (height > strokeWidth) {\n height -= strokeWidth / divisor;\n }\n\n if (shape.isRegular) {\n width = height = Math.max(width, height);\n\n if (isTriangle) {\n height = Math.sqrt(3) / 2 * width;\n }\n }\n\n options[dimensionKeys.w] = width;\n options[dimensionKeys.h] = height;\n\n shape.set(options);\n}\n\nmodule.exports = {\n /**\n * Set each origin value to shape\n * @param {fabric.Object} shape - Shape object\n */\n setOrigins: function setOrigins(shape) {\n var leftTopPoint = shape.getPointByOrigin('left', 'top');\n var rightTopPoint = shape.getPointByOrigin('right', 'top');\n var rightBottomPoint = shape.getPointByOrigin('right', 'bottom');\n var leftBottomPoint = shape.getPointByOrigin('left', 'bottom');\n\n shape.origins = {\n lt: leftTopPoint,\n rt: rightTopPoint,\n rb: rightBottomPoint,\n lb: leftBottomPoint\n };\n },\n\n\n /**\n * Resize the shape\n * @param {fabric.Object} shape - Shape object\n * @param {{x: number, y: number}} pointer - Mouse pointer values on canvas\n * @param {boolean} isScaling - Whether the resizing action is scaling or not\n */\n resize: function resize(shape, pointer, isScaling) {\n if (hasCenterOrigin(shape)) {\n adjustOriginByStartPoint(pointer, shape);\n setStartPoint(shape);\n }\n\n if (isScaling) {\n adjustDimensionOnScaling(shape, pointer);\n } else {\n adjustDimensionOnMouseMove(pointer, shape);\n }\n\n adjustOriginByMovingPointer(pointer, shape);\n },\n\n\n /**\n * Adjust the origin position of shape to center\n * @param {fabric.Object} shape - Shape object\n */\n adjustOriginToCenter: function adjustOriginToCenter(shape) {\n var centerPoint = shape.getPointByOrigin('center', 'center');\n var originX = shape.originX,\n originY = shape.originY;\n\n var origin = shape.getPointByOrigin(originX, originY);\n var left = shape.left + (centerPoint.x - origin.x);\n var top = shape.top + (centerPoint.y - origin.y);\n\n shape.set({\n hasControls: true,\n hasBorders: true,\n originX: 'center',\n originY: 'center',\n left: left,\n top: top\n });\n\n shape.setCoords(); // For left, top properties\n }\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/helper/shapeResizeHelper.js?");
/***/ }),
/***/ "./src/js/imageEditor.js":
/*!*******************************!*\
!*** ./src/js/imageEditor.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Image-editor application class\n */\n\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _invoker3 = __webpack_require__(/*! ./invoker */ \"./src/js/invoker.js\");\n\nvar _invoker4 = _interopRequireDefault(_invoker3);\n\nvar _ui = __webpack_require__(/*! ./ui */ \"./src/js/ui.js\");\n\nvar _ui2 = _interopRequireDefault(_ui);\n\nvar _action = __webpack_require__(/*! ./action */ \"./src/js/action.js\");\n\nvar _action2 = _interopRequireDefault(_action);\n\nvar _command = __webpack_require__(/*! ./factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _graphics = __webpack_require__(/*! ./graphics */ \"./src/js/graphics.js\");\n\nvar _graphics2 = _interopRequireDefault(_graphics);\n\nvar _util = __webpack_require__(/*! ./util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ./consts */ \"./src/js/consts.js\");\n\nvar _selectionModifyHelper = __webpack_require__(/*! ./helper/selectionModifyHelper */ \"./src/js/helper/selectionModifyHelper.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar isUndefined = _tuiCodeSnippet2.default.isUndefined,\n forEach = _tuiCodeSnippet2.default.forEach,\n CustomEvents = _tuiCodeSnippet2.default.CustomEvents;\nvar MOUSE_DOWN = _consts.eventNames.MOUSE_DOWN,\n OBJECT_MOVED = _consts.eventNames.OBJECT_MOVED,\n OBJECT_SCALED = _consts.eventNames.OBJECT_SCALED,\n OBJECT_ACTIVATED = _consts.eventNames.OBJECT_ACTIVATED,\n OBJECT_ROTATED = _consts.eventNames.OBJECT_ROTATED,\n OBJECT_ADDED = _consts.eventNames.OBJECT_ADDED,\n OBJECT_MODIFIED = _consts.eventNames.OBJECT_MODIFIED,\n ADD_TEXT = _consts.eventNames.ADD_TEXT,\n ADD_OBJECT = _consts.eventNames.ADD_OBJECT,\n TEXT_EDITING = _consts.eventNames.TEXT_EDITING,\n TEXT_CHANGED = _consts.eventNames.TEXT_CHANGED,\n ICON_CREATE_RESIZE = _consts.eventNames.ICON_CREATE_RESIZE,\n ICON_CREATE_END = _consts.eventNames.ICON_CREATE_END,\n SELECTION_CLEARED = _consts.eventNames.SELECTION_CLEARED,\n SELECTION_CREATED = _consts.eventNames.SELECTION_CREATED,\n ADD_OBJECT_AFTER = _consts.eventNames.ADD_OBJECT_AFTER;\n\n/**\n * Image filter result\n * @typedef {object} FilterResult\n * @property {string} type - filter type like 'mask', 'Grayscale' and so on\n * @property {string} action - action type like 'add', 'remove'\n */\n\n/**\n * Flip status\n * @typedef {object} FlipStatus\n * @property {boolean} flipX - x axis\n * @property {boolean} flipY - y axis\n * @property {Number} angle - angle\n */\n/**\n * Rotation status\n * @typedef {Number} RotateStatus\n * @property {Number} angle - angle\n */\n\n/**\n * Old and new Size\n * @typedef {object} SizeChange\n * @property {Number} oldWidth - old width\n * @property {Number} oldHeight - old height\n * @property {Number} newWidth - new width\n * @property {Number} newHeight - new height\n */\n\n/**\n * @typedef {string} ErrorMsg - {string} error message\n */\n\n/**\n * @typedef {object} ObjectProps - graphics object properties\n * @property {number} id - object id\n * @property {string} type - object type\n * @property {string} text - text content\n * @property {(string | number)} left - Left\n * @property {(string | number)} top - Top\n * @property {(string | number)} width - Width\n * @property {(string | number)} height - Height\n * @property {string} fill - Color\n * @property {string} stroke - Stroke\n * @property {(string | number)} strokeWidth - StrokeWidth\n * @property {string} fontFamily - Font type for text\n * @property {number} fontSize - Font Size\n * @property {string} fontStyle - Type of inclination (normal / italic)\n * @property {string} fontWeight - Type of thicker or thinner looking (normal / bold)\n * @property {string} textAlign - Type of text align (left / center / right)\n * @property {string} textDecoration - Type of line (underline / line-through / overline)\n */\n\n/**\n * Shape filter option\n * @typedef {object.<string, number>} ShapeFilterOption\n */\n\n/**\n * Shape filter option\n * @typedef {object} ShapeFillOption - fill option of shape\n * @property {string} type - fill type ('color' or 'filter')\n * @property {Array.<ShapeFillFilterOption>} [filter] - {@link ShapeFilterOption} List.\n * only applies to filter types\n * (ex: \\[\\{pixelate: 20\\}, \\{blur: 0.3\\}\\])\n * @property {string} [color] - Shape foreground color (ex: '#fff', 'transparent')\n */\n\n/**\n * Image editor\n * @class\n * @param {string|HTMLElement} wrapper - Wrapper's element or selector\n * @param {Object} [options] - Canvas max width & height of css\n * @param {number} [options.includeUI] - Use the provided UI\n * @param {Object} [options.includeUI.loadImage] - Basic editing image\n * @param {string} options.includeUI.loadImage.path - image path\n * @param {string} options.includeUI.loadImage.name - image name\n * @param {Object} [options.includeUI.theme] - Theme object\n * @param {Array} [options.includeUI.menu] - It can be selected when only specific menu is used, Default values are \\['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask', 'filter'\\].\n * @param {string} [options.includeUI.initMenu] - The first menu to be selected and started.\n * @param {Object} [options.includeUI.uiSize] - ui size of editor\n * @param {string} options.includeUI.uiSize.width - width of ui\n * @param {string} options.includeUI.uiSize.height - height of ui\n * @param {string} [options.includeUI.menuBarPosition=bottom] - Menu bar position('top', 'bottom', 'left', 'right')\n * @param {number} options.cssMaxWidth - Canvas css-max-width\n * @param {number} options.cssMaxHeight - Canvas css-max-height\n * @param {Object} [options.selectionStyle] - selection style\n * @param {string} [options.selectionStyle.cornerStyle] - selection corner style\n * @param {number} [options.selectionStyle.cornerSize] - selection corner size\n * @param {string} [options.selectionStyle.cornerColor] - selection corner color\n * @param {string} [options.selectionStyle.cornerStrokeColor] = selection corner stroke color\n * @param {boolean} [options.selectionStyle.transparentCorners] - selection corner transparent\n * @param {number} [options.selectionStyle.lineWidth] - selection line width\n * @param {string} [options.selectionStyle.borderColor] - selection border color\n * @param {number} [options.selectionStyle.rotatingPointOffset] - selection rotating point length\n * @param {Boolean} [options.usageStatistics=true] - Let us know the hostname. If you don't want to send the hostname, please set to false.\n * @example\n * var ImageEditor = require('tui-image-editor');\n * var blackTheme = require('./js/theme/black-theme.js');\n * var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {\n * includeUI: {\n * loadImage: {\n * path: 'img/sampleImage.jpg',\n * name: 'SampleImage'\n * },\n * theme: blackTheme, // or whiteTheme\n * menu: ['shape', 'filter'],\n * initMenu: 'filter',\n * uiSize: {\n * width: '1000px',\n * height: '700px'\n * },\n * menuBarPosition: 'bottom'\n * },\n * cssMaxWidth: 700,\n * cssMaxHeight: 500,\n * selectionStyle: {\n * cornerSize: 20,\n * rotatingPointOffset: 70\n * }\n * });\n */\n\nvar ImageEditor = function () {\n function ImageEditor(wrapper, options) {\n _classCallCheck(this, ImageEditor);\n\n options = _tuiCodeSnippet2.default.extend({\n includeUI: false,\n usageStatistics: true\n }, options);\n\n this.mode = null;\n\n this.activeObjectId = null;\n\n /**\n * UI instance\n * @type {Ui}\n */\n if (options.includeUI) {\n var UIOption = options.includeUI;\n UIOption.usageStatistics = options.usageStatistics;\n\n this.ui = new _ui2.default(wrapper, UIOption, this.getActions());\n options = this.ui.setUiDefaultSelectionStyle(options);\n }\n\n /**\n * Invoker\n * @type {Invoker}\n * @private\n */\n this._invoker = new _invoker4.default();\n\n /**\n * Graphics instance\n * @type {Graphics}\n * @private\n */\n this._graphics = new _graphics2.default(this.ui ? this.ui.getEditorArea() : wrapper, {\n cssMaxWidth: options.cssMaxWidth,\n cssMaxHeight: options.cssMaxHeight\n });\n\n /**\n * Event handler list\n * @type {Object}\n * @private\n */\n this._handlers = {\n keydown: this._onKeyDown.bind(this),\n mousedown: this._onMouseDown.bind(this),\n objectActivated: this._onObjectActivated.bind(this),\n objectMoved: this._onObjectMoved.bind(this),\n objectScaled: this._onObjectScaled.bind(this),\n objectRotated: this._onObjectRotated.bind(this),\n objectAdded: this._onObjectAdded.bind(this),\n objectModified: this._onObjectModified.bind(this),\n createdPath: this._onCreatedPath,\n addText: this._onAddText.bind(this),\n addObject: this._onAddObject.bind(this),\n textEditing: this._onTextEditing.bind(this),\n textChanged: this._onTextChanged.bind(this),\n iconCreateResize: this._onIconCreateResize.bind(this),\n iconCreateEnd: this._onIconCreateEnd.bind(this),\n selectionCleared: this._selectionCleared.bind(this),\n selectionCreated: this._selectionCreated.bind(this)\n };\n\n this._attachInvokerEvents();\n this._attachGraphicsEvents();\n this._attachDomEvents();\n this._setSelectionStyle(options.selectionStyle, {\n applyCropSelectionStyle: options.applyCropSelectionStyle,\n applyGroupSelectionStyle: options.applyGroupSelectionStyle\n });\n\n if (options.usageStatistics) {\n (0, _util.sendHostName)();\n }\n\n if (this.ui) {\n this.ui.initCanvas();\n this.setReAction();\n }\n fabric.enableGLFiltering = false;\n }\n\n /**\n * Set selection style by init option\n * @param {Object} selectionStyle - Selection styles\n * @param {Object} applyTargets - Selection apply targets\n * @param {boolean} applyCropSelectionStyle - whether apply with crop selection style or not\n * @param {boolean} applyGroupSelectionStyle - whether apply with group selection style or not\n * @private\n */\n\n\n _createClass(ImageEditor, [{\n key: '_setSelectionStyle',\n value: function _setSelectionStyle(selectionStyle, _ref) {\n var applyCropSelectionStyle = _ref.applyCropSelectionStyle,\n applyGroupSelectionStyle = _ref.applyGroupSelectionStyle;\n\n if (selectionStyle) {\n this._graphics.setSelectionStyle(selectionStyle);\n }\n\n if (applyCropSelectionStyle) {\n this._graphics.setCropSelectionStyle(selectionStyle);\n }\n\n if (applyGroupSelectionStyle) {\n this.on('selectionCreated', function (eventTarget) {\n if (eventTarget.type === 'activeSelection') {\n eventTarget.set(selectionStyle);\n }\n });\n }\n }\n\n /**\n * Attach invoker events\n * @private\n */\n\n }, {\n key: '_attachInvokerEvents',\n value: function _attachInvokerEvents() {\n var UNDO_STACK_CHANGED = _consts.eventNames.UNDO_STACK_CHANGED,\n REDO_STACK_CHANGED = _consts.eventNames.REDO_STACK_CHANGED;\n\n /**\n * Undo stack changed event\n * @event ImageEditor#undoStackChanged\n * @param {Number} length - undo stack length\n * @example\n * imageEditor.on('undoStackChanged', function(length) {\n * console.log(length);\n * });\n */\n\n this._invoker.on(UNDO_STACK_CHANGED, this.fire.bind(this, UNDO_STACK_CHANGED));\n /**\n * Redo stack changed event\n * @event ImageEditor#redoStackChanged\n * @param {Number} length - redo stack length\n * @example\n * imageEditor.on('redoStackChanged', function(length) {\n * console.log(length);\n * });\n */\n this._invoker.on(REDO_STACK_CHANGED, this.fire.bind(this, REDO_STACK_CHANGED));\n }\n\n /**\n * Attach canvas events\n * @private\n */\n\n }, {\n key: '_attachGraphicsEvents',\n value: function _attachGraphicsEvents() {\n var _graphics$on;\n\n this._graphics.on((_graphics$on = {}, _defineProperty(_graphics$on, MOUSE_DOWN, this._handlers.mousedown), _defineProperty(_graphics$on, OBJECT_MOVED, this._handlers.objectMoved), _defineProperty(_graphics$on, OBJECT_SCALED, this._handlers.objectScaled), _defineProperty(_graphics$on, OBJECT_ROTATED, this._handlers.objectRotated), _defineProperty(_graphics$on, OBJECT_ACTIVATED, this._handlers.objectActivated), _defineProperty(_graphics$on, OBJECT_ADDED, this._handlers.objectAdded), _defineProperty(_graphics$on, OBJECT_MODIFIED, this._handlers.objectModified), _defineProperty(_graphics$on, ADD_TEXT, this._handlers.addText), _defineProperty(_graphics$on, ADD_OBJECT, this._handlers.addObject), _defineProperty(_graphics$on, TEXT_EDITING, this._handlers.textEditing), _defineProperty(_graphics$on, TEXT_CHANGED, this._handlers.textChanged), _defineProperty(_graphics$on, ICON_CREATE_RESIZE, this._handlers.iconCreateResize), _defineProperty(_graphics$on, ICON_CREATE_END, this._handlers.iconCreateEnd), _defineProperty(_graphics$on, SELECTION_CLEARED, this._handlers.selectionCleared), _defineProperty(_graphics$on, SELECTION_CREATED, this._handlers.selectionCreated), _graphics$on));\n }\n\n /**\n * Attach dom events\n * @private\n */\n\n }, {\n key: '_attachDomEvents',\n value: function _attachDomEvents() {\n // ImageEditor supports IE 9 higher\n document.addEventListener('keydown', this._handlers.keydown);\n }\n\n /**\n * Detach dom events\n * @private\n */\n\n }, {\n key: '_detachDomEvents',\n value: function _detachDomEvents() {\n // ImageEditor supports IE 9 higher\n document.removeEventListener('keydown', this._handlers.keydown);\n }\n\n /**\n * Keydown event handler\n * @param {KeyboardEvent} e - Event object\n * @private\n */\n /* eslint-disable complexity */\n\n }, {\n key: '_onKeyDown',\n value: function _onKeyDown(e) {\n var ctrlKey = e.ctrlKey,\n keyCode = e.keyCode,\n metaKey = e.metaKey;\n\n var isModifierKey = ctrlKey || metaKey;\n\n if (isModifierKey) {\n if (keyCode === _consts.keyCodes.C) {\n this._graphics.resetTargetObjectForCopyPaste();\n } else if (keyCode === _consts.keyCodes.V) {\n this._graphics.pasteObject();\n this.clearRedoStack();\n } else if (keyCode === _consts.keyCodes.Z) {\n // There is no error message on shortcut when it's empty\n this.undo()['catch'](function () {});\n } else if (keyCode === _consts.keyCodes.Y) {\n // There is no error message on shortcut when it's empty\n this.redo()['catch'](function () {});\n }\n }\n\n var isDeleteKey = keyCode === _consts.keyCodes.BACKSPACE || keyCode === _consts.keyCodes.DEL;\n var isRemoveReady = this._graphics.isReadyRemoveObject();\n\n if (isRemoveReady && isDeleteKey) {\n e.preventDefault();\n this.removeActiveObject();\n }\n }\n\n /**\n * Remove Active Object\n */\n\n }, {\n key: 'removeActiveObject',\n value: function removeActiveObject() {\n var activeObjectId = this._graphics.getActiveObjectIdForRemove();\n\n this.removeObject(activeObjectId);\n }\n\n /**\n * mouse down event handler\n * @param {Event} event - mouse down event\n * @param {Object} originPointer - origin pointer\n * @param {Number} originPointer.x x position\n * @param {Number} originPointer.y y position\n * @private\n */\n\n }, {\n key: '_onMouseDown',\n value: function _onMouseDown(event, originPointer) {\n /**\n * The mouse down event with position x, y on canvas\n * @event ImageEditor#mousedown\n * @param {Object} event - browser mouse event object\n * @param {Object} originPointer origin pointer\n * @param {Number} originPointer.x x position\n * @param {Number} originPointer.y y position\n * @example\n * imageEditor.on('mousedown', function(event, originPointer) {\n * console.log(event);\n * console.log(originPointer);\n * if (imageEditor.hasFilter('colorFilter')) {\n * imageEditor.applyFilter('colorFilter', {\n * x: parseInt(originPointer.x, 10),\n * y: parseInt(originPointer.y, 10)\n * });\n * }\n * });\n */\n\n this.fire(_consts.eventNames.MOUSE_DOWN, event, originPointer);\n }\n\n /**\n * Add a 'addObject' command\n * @param {Object} obj - Fabric object\n * @private\n */\n\n }, {\n key: '_pushAddObjectCommand',\n value: function _pushAddObjectCommand(obj) {\n var command = _command2.default.create(_consts.commandNames.ADD_OBJECT, this._graphics, obj);\n this._invoker.pushUndoStack(command);\n }\n\n /**\n * Add a 'changeSelection' command\n * @param {fabric.Object} obj - selection object\n * @private\n */\n\n }, {\n key: '_pushModifyObjectCommand',\n value: function _pushModifyObjectCommand(obj) {\n var _this = this;\n\n var type = obj.type;\n\n var props = (0, _selectionModifyHelper.makeSelectionUndoData)(obj, function (item) {\n return (0, _selectionModifyHelper.makeSelectionUndoDatum)(_this._graphics.getObjectId(item), item, type === 'activeSelection');\n });\n var command = _command2.default.create(_consts.commandNames.CHANGE_SELECTION, this._graphics, props);\n command.execute(this._graphics, props);\n\n this._invoker.pushUndoStack(command);\n }\n\n /**\n * 'objectActivated' event handler\n * @param {ObjectProps} props - object properties\n * @private\n */\n\n }, {\n key: '_onObjectActivated',\n value: function _onObjectActivated(props) {\n /**\n * The event when object is selected(aka activated).\n * @event ImageEditor#objectActivated\n * @param {ObjectProps} objectProps - object properties\n * @example\n * imageEditor.on('objectActivated', function(props) {\n * console.log(props);\n * console.log(props.type);\n * console.log(props.id);\n * });\n */\n this.fire(_consts.eventNames.OBJECT_ACTIVATED, props);\n }\n\n /**\n * 'objectMoved' event handler\n * @param {ObjectProps} props - object properties\n * @private\n */\n\n }, {\n key: '_onObjectMoved',\n value: function _onObjectMoved(props) {\n /**\n * The event when object is moved\n * @event ImageEditor#objectMoved\n * @param {ObjectProps} props - object properties\n * @example\n * imageEditor.on('objectMoved', function(props) {\n * console.log(props);\n * console.log(props.type);\n * });\n */\n this.fire(_consts.eventNames.OBJECT_MOVED, props);\n }\n\n /**\n * 'objectScaled' event handler\n * @param {ObjectProps} props - object properties\n * @private\n */\n\n }, {\n key: '_onObjectScaled',\n value: function _onObjectScaled(props) {\n /**\n * The event when scale factor is changed\n * @event ImageEditor#objectScaled\n * @param {ObjectProps} props - object properties\n * @example\n * imageEditor.on('objectScaled', function(props) {\n * console.log(props);\n * console.log(props.type);\n * });\n */\n this.fire(_consts.eventNames.OBJECT_SCALED, props);\n }\n\n /**\n * 'objectRotated' event handler\n * @param {ObjectProps} props - object properties\n * @private\n */\n\n }, {\n key: '_onObjectRotated',\n value: function _onObjectRotated(props) {\n /**\n * The event when object angle is changed\n * @event ImageEditor#objectRotated\n * @param {ObjectProps} props - object properties\n * @example\n * imageEditor.on('objectRotated', function(props) {\n * console.log(props);\n * console.log(props.type);\n * });\n */\n this.fire(_consts.eventNames.OBJECT_ROTATED, props);\n }\n\n /**\n * Get current drawing mode\n * @returns {string}\n * @example\n * // Image editor drawing mode\n * //\n * // NORMAL: 'NORMAL'\n * // CROPPER: 'CROPPER'\n * // FREE_DRAWING: 'FREE_DRAWING'\n * // LINE_DRAWING: 'LINE_DRAWING'\n * // TEXT: 'TEXT'\n * //\n * if (imageEditor.getDrawingMode() === 'FREE_DRAWING') {\n * imageEditor.stopDrawingMode();\n * }\n */\n\n }, {\n key: 'getDrawingMode',\n value: function getDrawingMode() {\n return this._graphics.getDrawingMode();\n }\n\n /**\n * Clear all objects\n * @returns {Promise}\n * @example\n * imageEditor.clearObjects();\n */\n\n }, {\n key: 'clearObjects',\n value: function clearObjects() {\n return this.execute(_consts.commandNames.CLEAR_OBJECTS);\n }\n\n /**\n * Deactivate all objects\n * @example\n * imageEditor.deactivateAll();\n */\n\n }, {\n key: 'deactivateAll',\n value: function deactivateAll() {\n this._graphics.deactivateAll();\n this._graphics.renderAll();\n }\n\n /**\n * discard selction\n * @example\n * imageEditor.discardSelection();\n */\n\n }, {\n key: 'discardSelection',\n value: function discardSelection() {\n this._graphics.discardSelection();\n }\n\n /**\n * selectable status change\n * @param {boolean} selectable - selctable status\n * @example\n * imageEditor.changeSelectableAll(false); // or true\n */\n\n }, {\n key: 'changeSelectableAll',\n value: function changeSelectableAll(selectable) {\n this._graphics.changeSelectableAll(selectable);\n }\n\n /**\n * Invoke command\n * @param {String} commandName - Command name\n * @param {...*} args - Arguments for creating command\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: 'execute',\n value: function execute(commandName) {\n var _invoker;\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // Inject an Graphics instance as first parameter\n var theArgs = [this._graphics].concat(args);\n\n return (_invoker = this._invoker).execute.apply(_invoker, [commandName].concat(theArgs));\n }\n\n /**\n * Invoke command\n * @param {String} commandName - Command name\n * @param {...*} args - Arguments for creating command\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: 'executeSilent',\n value: function executeSilent(commandName) {\n var _invoker2;\n\n for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n // Inject an Graphics instance as first parameter\n var theArgs = [this._graphics].concat(args);\n\n return (_invoker2 = this._invoker).executeSilent.apply(_invoker2, [commandName].concat(theArgs));\n }\n\n /**\n * Undo\n * @returns {Promise}\n * @example\n * imageEditor.undo();\n */\n\n }, {\n key: 'undo',\n value: function undo() {\n return this._invoker.undo();\n }\n\n /**\n * Redo\n * @returns {Promise}\n * @example\n * imageEditor.redo();\n */\n\n }, {\n key: 'redo',\n value: function redo() {\n return this._invoker.redo();\n }\n\n /**\n * Load image from file\n * @param {File} imgFile - Image file\n * @param {string} [imageName] - imageName\n * @returns {Promise<SizeChange, ErrorMsg>}\n * @example\n * imageEditor.loadImageFromFile(file).then(result => {\n * console.log('old : ' + result.oldWidth + ', ' + result.oldHeight);\n * console.log('new : ' + result.newWidth + ', ' + result.newHeight);\n * });\n */\n\n }, {\n key: 'loadImageFromFile',\n value: function loadImageFromFile(imgFile, imageName) {\n if (!imgFile) {\n return _util.Promise.reject(_consts.rejectMessages.invalidParameters);\n }\n\n var imgUrl = URL.createObjectURL(imgFile);\n imageName = imageName || imgFile.name;\n\n return this.loadImageFromURL(imgUrl, imageName).then(function (value) {\n URL.revokeObjectURL(imgFile);\n\n return value;\n });\n }\n\n /**\n * Load image from url\n * @param {string} url - File url\n * @param {string} imageName - imageName\n * @returns {Promise<SizeChange, ErrorMsg>}\n * @example\n * imageEditor.loadImageFromURL('http://url/testImage.png', 'lena').then(result => {\n * console.log('old : ' + result.oldWidth + ', ' + result.oldHeight);\n * console.log('new : ' + result.newWidth + ', ' + result.newHeight);\n * });\n */\n\n }, {\n key: 'loadImageFromURL',\n value: function loadImageFromURL(url, imageName) {\n if (!imageName || !url) {\n return _util.Promise.reject(_consts.rejectMessages.invalidParameters);\n }\n\n return this.execute(_consts.commandNames.LOAD_IMAGE, imageName, url);\n }\n\n /**\n * Add image object on canvas\n * @param {string} imgUrl - Image url to make object\n * @returns {Promise<ObjectProps, ErrorMsg>}\n * @example\n * imageEditor.addImageObject('path/fileName.jpg').then(objectProps => {\n * console.log(ojectProps.id);\n * });\n */\n\n }, {\n key: 'addImageObject',\n value: function addImageObject(imgUrl) {\n if (!imgUrl) {\n return _util.Promise.reject(_consts.rejectMessages.invalidParameters);\n }\n\n return this.execute(_consts.commandNames.ADD_IMAGE_OBJECT, imgUrl);\n }\n\n /**\n * Start a drawing mode. If the current mode is not 'NORMAL', 'stopDrawingMode()' will be called first.\n * @param {String} mode Can be one of <I>'CROPPER', 'FREE_DRAWING', 'LINE_DRAWING', 'TEXT', 'SHAPE'</I>\n * @param {Object} [option] parameters of drawing mode, it's available with 'FREE_DRAWING', 'LINE_DRAWING'\n * @param {Number} [option.width] brush width\n * @param {String} [option.color] brush color\n * @param {Object} [option.arrowType] arrow decorate\n * @param {string} [option.arrowType.tail] arrow decorate for tail. 'chevron' or 'triangle'\n * @param {string} [option.arrowType.head] arrow decorate for head. 'chevron' or 'triangle'\n * @returns {boolean} true if success or false\n * @example\n * imageEditor.startDrawingMode('FREE_DRAWING', {\n * width: 10,\n * color: 'rgba(255,0,0,0.5)'\n * });\n * imageEditor.startDrawingMode('LINE_DRAWING', {\n * width: 10,\n * color: 'rgba(255,0,0,0.5)',\n * arrowType: {\n * tail: 'chevron' // triangle\n * }\n * });\n *\n */\n\n }, {\n key: 'startDrawingMode',\n value: function startDrawingMode(mode, option) {\n return this._graphics.startDrawingMode(mode, option);\n }\n\n /**\n * Stop the current drawing mode and back to the 'NORMAL' mode\n * @example\n * imageEditor.stopDrawingMode();\n */\n\n }, {\n key: 'stopDrawingMode',\n value: function stopDrawingMode() {\n this._graphics.stopDrawingMode();\n }\n\n /**\n * Crop this image with rect\n * @param {Object} rect crop rect\n * @param {Number} rect.left left position\n * @param {Number} rect.top top position\n * @param {Number} rect.width width\n * @param {Number} rect.height height\n * @returns {Promise}\n * @example\n * imageEditor.crop(imageEditor.getCropzoneRect());\n */\n\n }, {\n key: 'crop',\n value: function crop(rect) {\n var data = this._graphics.getCroppedImageData(rect);\n if (!data) {\n return _util.Promise.reject(_consts.rejectMessages.invalidParameters);\n }\n\n return this.loadImageFromURL(data.url, data.imageName);\n }\n\n /**\n * Get the cropping rect\n * @returns {Object} {{left: number, top: number, width: number, height: number}} rect\n */\n\n }, {\n key: 'getCropzoneRect',\n value: function getCropzoneRect() {\n return this._graphics.getCropzoneRect();\n }\n\n /**\n * Set the cropping rect\n * @param {number} [mode] crop rect mode [1, 1.5, 1.3333333333333333, 1.25, 1.7777777777777777]\n */\n\n }, {\n key: 'setCropzoneRect',\n value: function setCropzoneRect(mode) {\n this._graphics.setCropzoneRect(mode);\n }\n\n /**\n * Flip\n * @returns {Promise}\n * @param {string} type - 'flipX' or 'flipY' or 'reset'\n * @returns {Promise<FlipStatus, ErrorMsg>}\n * @private\n */\n\n }, {\n key: '_flip',\n value: function _flip(type) {\n return this.execute(_consts.commandNames.FLIP_IMAGE, type);\n }\n\n /**\n * Flip x\n * @returns {Promise<FlipStatus, ErrorMsg>}\n * @example\n * imageEditor.flipX().then((status => {\n * console.log('flipX: ', status.flipX);\n * console.log('flipY: ', status.flipY);\n * console.log('angle: ', status.angle);\n * }).catch(message => {\n * console.log('error: ', message);\n * });\n */\n\n }, {\n key: 'flipX',\n value: function flipX() {\n return this._flip('flipX');\n }\n\n /**\n * Flip y\n * @returns {Promise<FlipStatus, ErrorMsg>}\n * @example\n * imageEditor.flipY().then(status => {\n * console.log('flipX: ', status.flipX);\n * console.log('flipY: ', status.flipY);\n * console.log('angle: ', status.angle);\n * }).catch(message => {\n * console.log('error: ', message);\n * });\n */\n\n }, {\n key: 'flipY',\n value: function flipY() {\n return this._flip('flipY');\n }\n\n /**\n * Reset flip\n * @returns {Promise<FlipStatus, ErrorMsg>}\n * @example\n * imageEditor.resetFlip().then(status => {\n * console.log('flipX: ', status.flipX);\n * console.log('flipY: ', status.flipY);\n * console.log('angle: ', status.angle);\n * }).catch(message => {\n * console.log('error: ', message);\n * });;\n */\n\n }, {\n key: 'resetFlip',\n value: function resetFlip() {\n return this._flip('reset');\n }\n\n /**\n * @param {string} type - 'rotate' or 'setAngle'\n * @param {number} angle - angle value (degree)\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise<RotateStatus, ErrorMsg>}\n * @private\n */\n\n }, {\n key: '_rotate',\n value: function _rotate(type, angle, isSilent) {\n var result = null;\n if (isSilent) {\n result = this.executeSilent(_consts.commandNames.ROTATE_IMAGE, type, angle);\n } else {\n result = this.execute(_consts.commandNames.ROTATE_IMAGE, type, angle);\n }\n\n return result;\n }\n\n /**\n * Rotate image\n * @returns {Promise}\n * @param {number} angle - Additional angle to rotate image\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise<RotateStatus, ErrorMsg>}\n * @example\n * imageEditor.rotate(10); // angle = 10\n * imageEditor.rotate(10); // angle = 20\n * imageEidtor.rotate(5); // angle = 5\n * imageEidtor.rotate(-95); // angle = -90\n * imageEditor.rotate(10).then(status => {\n * console.log('angle: ', status.angle);\n * })).catch(message => {\n * console.log('error: ', message);\n * });\n */\n\n }, {\n key: 'rotate',\n value: function rotate(angle, isSilent) {\n return this._rotate('rotate', angle, isSilent);\n }\n\n /**\n * Set angle\n * @param {number} angle - Angle of image\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise<RotateStatus, ErrorMsg>}\n * @example\n * imageEditor.setAngle(10); // angle = 10\n * imageEditor.rotate(10); // angle = 20\n * imageEidtor.setAngle(5); // angle = 5\n * imageEidtor.rotate(50); // angle = 55\n * imageEidtor.setAngle(-40); // angle = -40\n * imageEditor.setAngle(10).then(status => {\n * console.log('angle: ', status.angle);\n * })).catch(message => {\n * console.log('error: ', message);\n * });\n */\n\n }, {\n key: 'setAngle',\n value: function setAngle(angle, isSilent) {\n return this._rotate('setAngle', angle, isSilent);\n }\n\n /**\n * Set drawing brush\n * @param {Object} option brush option\n * @param {Number} option.width width\n * @param {String} option.color color like 'FFFFFF', 'rgba(0, 0, 0, 0.5)'\n * @example\n * imageEditor.startDrawingMode('FREE_DRAWING');\n * imageEditor.setBrush({\n * width: 12,\n * color: 'rgba(0, 0, 0, 0.5)'\n * });\n * imageEditor.setBrush({\n * width: 8,\n * color: 'FFFFFF'\n * });\n */\n\n }, {\n key: 'setBrush',\n value: function setBrush(option) {\n this._graphics.setBrush(option);\n }\n\n /**\n * Set states of current drawing shape\n * @param {string} type - Shape type (ex: 'rect', 'circle', 'triangle')\n * @param {Object} [options] - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - {@link ShapeFillOption} or\n * Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stoke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.isRegular] - Whether resizing shape has 1:1 ratio or not\n * @example\n * imageEditor.setDrawingShape('rect', {\n * fill: 'red',\n * width: 100,\n * height: 200\n * });\n * @example\n * imageEditor.setDrawingShape('rect', {\n * fill: {\n * type: 'filter',\n * filter: [{blur: 0.3}, {pixelate: 20}]\n * },\n * width: 100,\n * height: 200\n * });\n * @example\n * imageEditor.setDrawingShape('circle', {\n * fill: 'transparent',\n * stroke: 'blue',\n * strokeWidth: 3,\n * rx: 10,\n * ry: 100\n * });\n * @example\n * imageEditor.setDrawingShape('triangle', { // When resizing, the shape keep the 1:1 ratio\n * width: 1,\n * height: 1,\n * isRegular: true\n * });\n * @example\n * imageEditor.setDrawingShape('circle', { // When resizing, the shape keep the 1:1 ratio\n * rx: 10,\n * ry: 10,\n * isRegular: true\n * });\n */\n\n }, {\n key: 'setDrawingShape',\n value: function setDrawingShape(type, options) {\n this._graphics.setDrawingShape(type, options);\n }\n }, {\n key: 'setDrawingIcon',\n value: function setDrawingIcon(type, iconColor) {\n this._graphics.setIconStyle(type, iconColor);\n }\n\n /**\n * Add shape\n * @param {string} type - Shape type (ex: 'rect', 'circle', 'triangle')\n * @param {Object} options - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - {@link ShapeFillOption} or\n * Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stroke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {number} [options.left] - Shape x position\n * @param {number} [options.top] - Shape y position\n * @param {boolean} [options.isRegular] - Whether resizing shape has 1:1 ratio or not\n * @returns {Promise<ObjectProps, ErrorMsg>}\n * @example\n * imageEditor.addShape('rect', {\n * fill: 'red',\n * stroke: 'blue',\n * strokeWidth: 3,\n * width: 100,\n * height: 200,\n * left: 10,\n * top: 10,\n * isRegular: true\n * });\n * @example\n * imageEditor.addShape('circle', {\n * fill: 'red',\n * stroke: 'blue',\n * strokeWidth: 3,\n * rx: 10,\n * ry: 100,\n * isRegular: false\n * }).then(objectProps => {\n * console.log(objectProps.id);\n * });\n * @example\n * imageEditor.addShape('rect', {\n * fill: {\n * type: 'filter',\n * filter: [{blur: 0.3}, {pixelate: 20}]\n * },\n * stroke: 'blue',\n * strokeWidth: 3,\n * rx: 10,\n * ry: 100,\n * isRegular: false\n * }).then(objectProps => {\n * console.log(objectProps.id);\n * });\n */\n\n }, {\n key: 'addShape',\n value: function addShape(type, options) {\n options = options || {};\n\n this._setPositions(options);\n\n return this.execute(_consts.commandNames.ADD_SHAPE, type, options);\n }\n\n /**\n * Change shape\n * @param {number} id - object id\n * @param {Object} options - Shape options\n * @param {(ShapeFillOption | string)} [options.fill] - {@link ShapeFillOption} or\n * Shape foreground color (ex: '#fff', 'transparent')\n * @param {string} [options.stroke] - Shape outline color\n * @param {number} [options.strokeWidth] - Shape outline width\n * @param {number} [options.width] - Width value (When type option is 'rect', this options can use)\n * @param {number} [options.height] - Height value (When type option is 'rect', this options can use)\n * @param {number} [options.rx] - Radius x value (When type option is 'circle', this options can use)\n * @param {number} [options.ry] - Radius y value (When type option is 'circle', this options can use)\n * @param {boolean} [options.isRegular] - Whether resizing shape has 1:1 ratio or not\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise}\n * @example\n * // call after selecting shape object on canvas\n * imageEditor.changeShape(id, { // change rectagle or triangle\n * fill: 'red',\n * stroke: 'blue',\n * strokeWidth: 3,\n * width: 100,\n * height: 200\n * });\n * @example\n * // call after selecting shape object on canvas\n * imageEditor.changeShape(id, { // change circle\n * fill: 'red',\n * stroke: 'blue',\n * strokeWidth: 3,\n * rx: 10,\n * ry: 100\n * });\n */\n\n }, {\n key: 'changeShape',\n value: function changeShape(id, options, isSilent) {\n var executeMethodName = isSilent ? 'executeSilent' : 'execute';\n\n return this[executeMethodName](_consts.commandNames.CHANGE_SHAPE, id, options);\n }\n\n /**\n * Add text on image\n * @param {string} text - Initial input text\n * @param {Object} [options] Options for generating text\n * @param {Object} [options.styles] Initial styles\n * @param {string} [options.styles.fill] Color\n * @param {string} [options.styles.fontFamily] Font type for text\n * @param {number} [options.styles.fontSize] Size\n * @param {string} [options.styles.fontStyle] Type of inclination (normal / italic)\n * @param {string} [options.styles.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [options.styles.textAlign] Type of text align (left / center / right)\n * @param {string} [options.styles.textDecoration] Type of line (underline / line-through / overline)\n * @param {{x: number, y: number}} [options.position] - Initial position\n * @param {boolean} [options.autofocus] - text autofocus, default is true\n * @returns {Promise}\n * @example\n * imageEditor.addText('init text');\n * @example\n * imageEditor.addText('init text', {\n * styles: {\n * fill: '#000',\n * fontSize: 20,\n * fontWeight: 'bold'\n * },\n * position: {\n * x: 10,\n * y: 10\n * }\n * }).then(objectProps => {\n * console.log(objectProps.id);\n * });\n */\n\n }, {\n key: 'addText',\n value: function addText(text, options) {\n text = text || '';\n options = options || {};\n\n return this.execute(_consts.commandNames.ADD_TEXT, text, options);\n }\n\n /**\n * Change contents of selected text object on image\n * @param {number} id - object id\n * @param {string} text - Changing text\n * @returns {Promise<ObjectProps, ErrorMsg>}\n * @example\n * imageEditor.changeText(id, 'change text');\n */\n\n }, {\n key: 'changeText',\n value: function changeText(id, text) {\n text = text || '';\n\n return this.execute(_consts.commandNames.CHANGE_TEXT, id, text);\n }\n\n /**\n * Set style\n * @param {number} id - object id\n * @param {Object} styleObj - text styles\n * @param {string} [styleObj.fill] Color\n * @param {string} [styleObj.fontFamily] Font type for text\n * @param {number} [styleObj.fontSize] Size\n * @param {string} [styleObj.fontStyle] Type of inclination (normal / italic)\n * @param {string} [styleObj.fontWeight] Type of thicker or thinner looking (normal / bold)\n * @param {string} [styleObj.textAlign] Type of text align (left / center / right)\n * @param {string} [styleObj.textDecoration] Type of line (underline / line-through / overline)\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise}\n * @example\n * imageEditor.changeTextStyle(id, {\n * fontStyle: 'italic'\n * });\n */\n\n }, {\n key: 'changeTextStyle',\n value: function changeTextStyle(id, styleObj, isSilent) {\n var executeMethodName = isSilent ? 'executeSilent' : 'execute';\n\n return this[executeMethodName](_consts.commandNames.CHANGE_TEXT_STYLE, id, styleObj);\n }\n\n /**\n * change text mode\n * @param {string} type - change type\n * @private\n */\n\n }, {\n key: '_changeActivateMode',\n value: function _changeActivateMode(type) {\n if (type !== 'ICON' && this.getDrawingMode() !== type) {\n this.startDrawingMode(type);\n }\n }\n\n /**\n * 'textChanged' event handler\n * @param {Object} objectProps changed object properties\n * @private\n */\n\n }, {\n key: '_onTextChanged',\n value: function _onTextChanged(objectProps) {\n this.changeText(objectProps.id, objectProps.text);\n }\n\n /**\n * 'iconCreateResize' event handler\n * @param {Object} originPointer origin pointer\n * @param {Number} originPointer.x x position\n * @param {Number} originPointer.y y position\n * @private\n */\n\n }, {\n key: '_onIconCreateResize',\n value: function _onIconCreateResize(originPointer) {\n this.fire(_consts.eventNames.ICON_CREATE_RESIZE, originPointer);\n }\n\n /**\n * 'iconCreateEnd' event handler\n * @param {Object} originPointer origin pointer\n * @param {Number} originPointer.x x position\n * @param {Number} originPointer.y y position\n * @private\n */\n\n }, {\n key: '_onIconCreateEnd',\n value: function _onIconCreateEnd(originPointer) {\n this.fire(_consts.eventNames.ICON_CREATE_END, originPointer);\n }\n\n /**\n * 'textEditing' event handler\n * @private\n */\n\n }, {\n key: '_onTextEditing',\n value: function _onTextEditing() {\n /**\n * The event which starts to edit text object\n * @event ImageEditor#textEditing\n * @example\n * imageEditor.on('textEditing', function() {\n * console.log('text editing');\n * });\n */\n this.fire(_consts.eventNames.TEXT_EDITING);\n }\n\n /**\n * Mousedown event handler in case of 'TEXT' drawing mode\n * @param {fabric.Event} event - Current mousedown event object\n * @private\n */\n\n }, {\n key: '_onAddText',\n value: function _onAddText(event) {\n /**\n * The event when 'TEXT' drawing mode is enabled and click non-object area.\n * @event ImageEditor#addText\n * @param {Object} pos\n * @param {Object} pos.originPosition - Current position on origin canvas\n * @param {Number} pos.originPosition.x - x\n * @param {Number} pos.originPosition.y - y\n * @param {Object} pos.clientPosition - Current position on client area\n * @param {Number} pos.clientPosition.x - x\n * @param {Number} pos.clientPosition.y - y\n * @example\n * imageEditor.on('addText', function(pos) {\n * console.log('text position on canvas: ' + pos.originPosition);\n * console.log('text position on brwoser: ' + pos.clientPosition);\n * });\n */\n this.fire(_consts.eventNames.ADD_TEXT, {\n originPosition: event.originPosition,\n clientPosition: event.clientPosition\n });\n }\n\n /**\n * 'addObject' event handler\n * @param {Object} objectProps added object properties\n * @private\n */\n\n }, {\n key: '_onAddObject',\n value: function _onAddObject(objectProps) {\n var obj = this._graphics.getObject(objectProps.id);\n this._pushAddObjectCommand(obj);\n }\n\n /**\n * 'objectAdded' event handler\n * @param {Object} objectProps added object properties\n * @private\n */\n\n }, {\n key: '_onObjectAdded',\n value: function _onObjectAdded(objectProps) {\n /**\n * The event when object added\n * @event ImageEditor#objectAdded\n * @param {ObjectProps} props - object properties\n * @example\n * imageEditor.on('objectAdded', function(props) {\n * console.log(props);\n * });\n */\n this.fire(OBJECT_ADDED, objectProps);\n\n /**\n * The event when object added (deprecated)\n * @event ImageEditor#addObjectAfter\n * @param {ObjectProps} props - object properties\n * @deprecated\n */\n this.fire(ADD_OBJECT_AFTER, objectProps);\n }\n\n /**\n * 'objectModified' event handler\n * @param {fabric.Object} obj - selection object\n * @private\n */\n\n }, {\n key: '_onObjectModified',\n value: function _onObjectModified(obj) {\n this._pushModifyObjectCommand(obj);\n }\n\n /**\n * 'selectionCleared' event handler\n * @private\n */\n\n }, {\n key: '_selectionCleared',\n value: function _selectionCleared() {\n this.fire(SELECTION_CLEARED);\n }\n\n /**\n * 'selectionCreated' event handler\n * @param {Object} eventTarget - Fabric object\n * @private\n */\n\n }, {\n key: '_selectionCreated',\n value: function _selectionCreated(eventTarget) {\n this.fire(SELECTION_CREATED, eventTarget);\n }\n\n /**\n * Register custom icons\n * @param {{iconType: string, pathValue: string}} infos - Infos to register icons\n * @example\n * imageEditor.registerIcons({\n * customIcon: 'M 0 0 L 20 20 L 10 10 Z',\n * customArrow: 'M 60 0 L 120 60 H 90 L 75 45 V 180 H 45 V 45 L 30 60 H 0 Z'\n * });\n */\n\n }, {\n key: 'registerIcons',\n value: function registerIcons(infos) {\n this._graphics.registerPaths(infos);\n }\n\n /**\n * Change canvas cursor type\n * @param {string} cursorType - cursor type\n * @example\n * imageEditor.changeCursor('crosshair');\n */\n\n }, {\n key: 'changeCursor',\n value: function changeCursor(cursorType) {\n this._graphics.changeCursor(cursorType);\n }\n\n /**\n * Add icon on canvas\n * @param {string} type - Icon type ('arrow', 'cancel', custom icon name)\n * @param {Object} options - Icon options\n * @param {string} [options.fill] - Icon foreground color\n * @param {number} [options.left] - Icon x position\n * @param {number} [options.top] - Icon y position\n * @returns {Promise<ObjectProps, ErrorMsg>}\n * @example\n * imageEditor.addIcon('arrow'); // The position is center on canvas\n * @example\n * imageEditor.addIcon('arrow', {\n * left: 100,\n * top: 100\n * }).then(objectProps => {\n * console.log(objectProps.id);\n * });\n */\n\n }, {\n key: 'addIcon',\n value: function addIcon(type, options) {\n options = options || {};\n\n this._setPositions(options);\n\n return this.execute(_consts.commandNames.ADD_ICON, type, options);\n }\n\n /**\n * Change icon color\n * @param {number} id - object id\n * @param {string} color - Color for icon\n * @returns {Promise}\n * @example\n * imageEditor.changeIconColor(id, '#000000');\n */\n\n }, {\n key: 'changeIconColor',\n value: function changeIconColor(id, color) {\n return this.execute(_consts.commandNames.CHANGE_ICON_COLOR, id, color);\n }\n\n /**\n * Remove an object or group by id\n * @param {number} id - object id\n * @returns {Promise}\n * @example\n * imageEditor.removeObject(id);\n */\n\n }, {\n key: 'removeObject',\n value: function removeObject(id) {\n return this.execute(_consts.commandNames.REMOVE_OBJECT, id);\n }\n\n /**\n * Whether it has the filter or not\n * @param {string} type - Filter type\n * @returns {boolean} true if it has the filter\n */\n\n }, {\n key: 'hasFilter',\n value: function hasFilter(type) {\n return this._graphics.hasFilter(type);\n }\n\n /**\n * Remove filter on canvas image\n * @param {string} type - Filter type\n * @returns {Promise<FilterResult, ErrorMsg>}\n * @example\n * imageEditor.removeFilter('Grayscale').then(obj => {\n * console.log('filterType: ', obj.type);\n * console.log('actType: ', obj.action);\n * }).catch(message => {\n * console.log('error: ', message);\n * });\n */\n\n }, {\n key: 'removeFilter',\n value: function removeFilter(type) {\n return this.execute(_consts.commandNames.REMOVE_FILTER, type);\n }\n\n /**\n * Apply filter on canvas image\n * @param {string} type - Filter type\n * @param {Object} options - Options to apply filter\n * @param {number} options.maskObjId - masking image object id\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Promise<FilterResult, ErrorMsg>}\n * @example\n * imageEditor.applyFilter('Grayscale');\n * @example\n * imageEditor.applyFilter('mask', {maskObjId: id}).then(obj => {\n * console.log('filterType: ', obj.type);\n * console.log('actType: ', obj.action);\n * }).catch(message => {\n * console.log('error: ', message);\n * });;\n */\n\n }, {\n key: 'applyFilter',\n value: function applyFilter(type, options, isSilent) {\n var executeMethodName = isSilent ? 'executeSilent' : 'execute';\n\n return this[executeMethodName](_consts.commandNames.APPLY_FILTER, type, options);\n }\n\n /**\n * Get data url\n * @param {Object} options - options for toDataURL\n * @param {String} [options.format=png] The format of the output image. Either \"jpeg\" or \"png\"\n * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.\n * @param {Number} [options.multiplier=1] Multiplier to scale by\n * @param {Number} [options.left] Cropping left offset. Introduced in fabric v1.2.14\n * @param {Number} [options.top] Cropping top offset. Introduced in fabric v1.2.14\n * @param {Number} [options.width] Cropping width. Introduced in fabric v1.2.14\n * @param {Number} [options.height] Cropping height. Introduced in fabric v1.2.14\n * @returns {string} A DOMString containing the requested data URI\n * @example\n * imgEl.src = imageEditor.toDataURL();\n *\n * imageEditor.loadImageFromURL(imageEditor.toDataURL(), 'FilterImage').then(() => {\n * imageEditor.addImageObject(imgUrl);\n * });\n */\n\n }, {\n key: 'toDataURL',\n value: function toDataURL(options) {\n return this._graphics.toDataURL(options);\n }\n\n /**\n * Get image name\n * @returns {string} image name\n * @example\n * console.log(imageEditor.getImageName());\n */\n\n }, {\n key: 'getImageName',\n value: function getImageName() {\n return this._graphics.getImageName();\n }\n\n /**\n * Clear undoStack\n * @example\n * imageEditor.clearUndoStack();\n */\n\n }, {\n key: 'clearUndoStack',\n value: function clearUndoStack() {\n this._invoker.clearUndoStack();\n }\n\n /**\n * Clear redoStack\n * @example\n * imageEditor.clearRedoStack();\n */\n\n }, {\n key: 'clearRedoStack',\n value: function clearRedoStack() {\n this._invoker.clearRedoStack();\n }\n\n /**\n * Whehter the undo stack is empty or not\n * @returns {boolean}\n * imageEditor.isEmptyUndoStack();\n */\n\n }, {\n key: 'isEmptyUndoStack',\n value: function isEmptyUndoStack() {\n return this._invoker.isEmptyUndoStack();\n }\n\n /**\n * Whehter the redo stack is empty or not\n * @returns {boolean}\n * imageEditor.isEmptyRedoStack();\n */\n\n }, {\n key: 'isEmptyRedoStack',\n value: function isEmptyRedoStack() {\n return this._invoker.isEmptyRedoStack();\n }\n\n /**\n * Resize canvas dimension\n * @param {{width: number, height: number}} dimension - Max width & height\n * @returns {Promise}\n */\n\n }, {\n key: 'resizeCanvasDimension',\n value: function resizeCanvasDimension(dimension) {\n if (!dimension) {\n return _util.Promise.reject(_consts.rejectMessages.invalidParameters);\n }\n\n return this.execute(_consts.commandNames.RESIZE_CANVAS_DIMENSION, dimension);\n }\n\n /**\n * Destroy\n */\n\n }, {\n key: 'destroy',\n value: function destroy() {\n var _this2 = this;\n\n this.stopDrawingMode();\n this._detachDomEvents();\n this._graphics.destroy();\n this._graphics = null;\n\n if (this.ui) {\n this.ui.destroy();\n }\n\n forEach(this, function (value, key) {\n _this2[key] = null;\n }, this);\n }\n\n /**\n * Set position\n * @param {Object} options - Position options (left or top)\n * @private\n */\n\n }, {\n key: '_setPositions',\n value: function _setPositions(options) {\n var centerPosition = this._graphics.getCenter();\n\n if (isUndefined(options.left)) {\n options.left = centerPosition.left;\n }\n\n if (isUndefined(options.top)) {\n options.top = centerPosition.top;\n }\n }\n\n /**\n * Set properties of active object\n * @param {number} id - object id\n * @param {Object} keyValue - key & value\n * @returns {Promise}\n * @example\n * imageEditor.setObjectProperties(id, {\n * left:100,\n * top:100,\n * width: 200,\n * height: 200,\n * opacity: 0.5\n * });\n */\n\n }, {\n key: 'setObjectProperties',\n value: function setObjectProperties(id, keyValue) {\n return this.execute(_consts.commandNames.SET_OBJECT_PROPERTIES, id, keyValue);\n }\n\n /**\n * Set properties of active object, Do not leave an invoke history.\n * @param {number} id - object id\n * @param {Object} keyValue - key & value\n * @example\n * imageEditor.setObjectPropertiesQuietly(id, {\n * left:100,\n * top:100,\n * width: 200,\n * height: 200,\n * opacity: 0.5\n * });\n */\n\n }, {\n key: 'setObjectPropertiesQuietly',\n value: function setObjectPropertiesQuietly(id, keyValue) {\n this._graphics.setObjectProperties(id, keyValue);\n }\n\n /**\n * Get properties of active object corresponding key\n * @param {number} id - object id\n * @param {Array<string>|ObjectProps|string} keys - property's key\n * @returns {ObjectProps} properties if id is valid or null\n * @example\n * var props = imageEditor.getObjectProperties(id, 'left');\n * console.log(props);\n * @example\n * var props = imageEditor.getObjectProperties(id, ['left', 'top', 'width', 'height']);\n * console.log(props);\n * @example\n * var props = imageEditor.getObjectProperties(id, {\n * left: null,\n * top: null,\n * width: null,\n * height: null,\n * opacity: null\n * });\n * console.log(props);\n */\n\n }, {\n key: 'getObjectProperties',\n value: function getObjectProperties(id, keys) {\n var object = this._graphics.getObject(id);\n if (!object) {\n return null;\n }\n\n return this._graphics.getObjectProperties(id, keys);\n }\n\n /**\n * Get the canvas size\n * @returns {Object} {{width: number, height: number}} canvas size\n * @example\n * var canvasSize = imageEditor.getCanvasSize();\n * console.log(canvasSize.width);\n * console.height(canvasSize.height);\n */\n\n }, {\n key: 'getCanvasSize',\n value: function getCanvasSize() {\n return this._graphics.getCanvasSize();\n }\n\n /**\n * Get object position by originX, originY\n * @param {number} id - object id\n * @param {string} originX - can be 'left', 'center', 'right'\n * @param {string} originY - can be 'top', 'center', 'bottom'\n * @returns {Object} {{x:number, y: number}} position by origin if id is valid, or null\n * @example\n * var position = imageEditor.getObjectPosition(id, 'left', 'top');\n * console.log(position);\n */\n\n }, {\n key: 'getObjectPosition',\n value: function getObjectPosition(id, originX, originY) {\n return this._graphics.getObjectPosition(id, originX, originY);\n }\n\n /**\n * Set object position by originX, originY\n * @param {number} id - object id\n * @param {Object} posInfo - position object\n * @param {number} posInfo.x - x position\n * @param {number} posInfo.y - y position\n * @param {string} posInfo.originX - can be 'left', 'center', 'right'\n * @param {string} posInfo.originY - can be 'top', 'center', 'bottom'\n * @returns {Promise}\n * @example\n * // align the object to 'left', 'top'\n * imageEditor.setObjectPosition(id, {\n * x: 0,\n * y: 0,\n * originX: 'left',\n * originY: 'top'\n * });\n * @example\n * // align the object to 'right', 'top'\n * var canvasSize = imageEditor.getCanvasSize();\n * imageEditor.setObjectPosition(id, {\n * x: canvasSize.width,\n * y: 0,\n * originX: 'right',\n * originY: 'top'\n * });\n * @example\n * // align the object to 'left', 'bottom'\n * var canvasSize = imageEditor.getCanvasSize();\n * imageEditor.setObjectPosition(id, {\n * x: 0,\n * y: canvasSize.height,\n * originX: 'left',\n * originY: 'bottom'\n * });\n * @example\n * // align the object to 'right', 'bottom'\n * var canvasSize = imageEditor.getCanvasSize();\n * imageEditor.setObjectPosition(id, {\n * x: canvasSize.width,\n * y: canvasSize.height,\n * originX: 'right',\n * originY: 'bottom'\n * });\n */\n\n }, {\n key: 'setObjectPosition',\n value: function setObjectPosition(id, posInfo) {\n return this.execute(_consts.commandNames.SET_OBJECT_POSITION, id, posInfo);\n }\n }]);\n\n return ImageEditor;\n}();\n\n_action2.default.mixin(ImageEditor);\nCustomEvents.mixin(ImageEditor);\n\nexports.default = ImageEditor;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/imageEditor.js?");
/***/ }),
/***/ "./src/js/interface/command.js":
/*!*************************************!*\
!*** ./src/js/interface/command.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Command interface\n */\n\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _errorMessage = __webpack_require__(/*! ../factory/errorMessage */ \"./src/js/factory/errorMessage.js\");\n\nvar _errorMessage2 = _interopRequireDefault(_errorMessage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar createMessage = _errorMessage2.default.create;\nvar errorTypes = _errorMessage2.default.types;\n\n/**\n * Command class\n * @class\n * @param {{name:function, execute: function, undo: function,\n * executeCallback: function, undoCallback: function}} actions - Command actions\n * @param {Array} args - passing arguments on execute, undo\n * @ignore\n */\n\nvar Command = function () {\n function Command(actions, args) {\n _classCallCheck(this, Command);\n\n /**\n * command name\n * @type {string}\n */\n this.name = actions.name;\n\n /**\n * arguments\n * @type {Array}\n */\n this.args = args;\n\n /**\n * Execute function\n * @type {function}\n */\n this.execute = actions.execute;\n\n /**\n * Undo function\n * @type {function}\n */\n this.undo = actions.undo;\n\n /**\n * executeCallback\n * @type {function}\n */\n this.executeCallback = actions.executeCallback || null;\n\n /**\n * undoCallback\n * @type {function}\n */\n this.undoCallback = actions.undoCallback || null;\n\n /**\n * data for undo\n * @type {Object}\n */\n this.undoData = {};\n }\n\n /**\n * Execute action\n * @param {Object.<string, Component>} compMap - Components injection\n * @abstract\n */\n\n\n _createClass(Command, [{\n key: 'execute',\n value: function execute() {\n throw new Error(createMessage(errorTypes.UN_IMPLEMENTATION, 'execute'));\n }\n\n /**\n * Undo action\n * @param {Object.<string, Component>} compMap - Components injection\n * @abstract\n */\n\n }, {\n key: 'undo',\n value: function undo() {\n throw new Error(createMessage(errorTypes.UN_IMPLEMENTATION, 'undo'));\n }\n\n /**\n * command for redo if undoData exists\n * @returns {boolean} isRedo\n */\n\n }, {\n key: 'setUndoData',\n\n\n /**\n * Set undoData action\n * @param {Object} undoData - maked undo data\n * @param {Object} cachedUndoDataForSilent - cached undo data\n * @param {boolean} isSilent - is silent execution or not\n * @returns {Object} cachedUndoDataForSilent\n */\n value: function setUndoData(undoData, cachedUndoDataForSilent, isSilent) {\n if (cachedUndoDataForSilent) {\n undoData = cachedUndoDataForSilent;\n }\n\n if (!isSilent) {\n _tuiCodeSnippet2.default.extend(this.undoData, undoData);\n cachedUndoDataForSilent = null;\n } else if (!cachedUndoDataForSilent) {\n cachedUndoDataForSilent = undoData;\n }\n\n return cachedUndoDataForSilent;\n }\n\n /**\n * Attach execute callabck\n * @param {function} callback - Callback after execution\n * @returns {Command} this\n */\n\n }, {\n key: 'setExecuteCallback',\n value: function setExecuteCallback(callback) {\n this.executeCallback = callback;\n\n return this;\n }\n\n /**\n * Attach undo callback\n * @param {function} callback - Callback after undo\n * @returns {Command} this\n */\n\n }, {\n key: 'setUndoCallback',\n value: function setUndoCallback(callback) {\n this.undoCallback = callback;\n\n return this;\n }\n }, {\n key: 'isRedo',\n get: function get() {\n return Object.keys(this.undoData).length;\n }\n }]);\n\n return Command;\n}();\n\nexports.default = Command;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/interface/command.js?");
/***/ }),
/***/ "./src/js/interface/component.js":
/*!***************************************!*\
!*** ./src/js/interface/component.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Component interface\n */\n\n/**\n * Component interface\n * @class\n * @param {string} name - component name\n * @param {Graphics} graphics - Graphics instance\n * @ignore\n */\nvar Component = function () {\n function Component(name, graphics) {\n _classCallCheck(this, Component);\n\n /**\n * Component name\n * @type {string}\n */\n this.name = name;\n\n /**\n * Graphics instance\n * @type {Graphics}\n */\n this.graphics = graphics;\n }\n\n /**\n * Fire Graphics event\n * @returns {Object} return value\n */\n\n\n _createClass(Component, [{\n key: \"fire\",\n value: function fire() {\n var context = this.graphics;\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.graphics.fire.apply(context, args);\n }\n\n /**\n * Save image(background) of canvas\n * @param {string} name - Name of image\n * @param {fabric.Image} oImage - Fabric image instance\n */\n\n }, {\n key: \"setCanvasImage\",\n value: function setCanvasImage(name, oImage) {\n this.graphics.setCanvasImage(name, oImage);\n }\n\n /**\n * Returns canvas element of fabric.Canvas[[lower-canvas]]\n * @returns {HTMLCanvasElement}\n */\n\n }, {\n key: \"getCanvasElement\",\n value: function getCanvasElement() {\n return this.graphics.getCanvasElement();\n }\n\n /**\n * Get fabric.Canvas instance\n * @returns {fabric.Canvas}\n */\n\n }, {\n key: \"getCanvas\",\n value: function getCanvas() {\n return this.graphics.getCanvas();\n }\n\n /**\n * Get canvasImage (fabric.Image instance)\n * @returns {fabric.Image}\n */\n\n }, {\n key: \"getCanvasImage\",\n value: function getCanvasImage() {\n return this.graphics.getCanvasImage();\n }\n\n /**\n * Get image name\n * @returns {string}\n */\n\n }, {\n key: \"getImageName\",\n value: function getImageName() {\n return this.graphics.getImageName();\n }\n\n /**\n * Get image editor\n * @returns {ImageEditor}\n */\n\n }, {\n key: \"getEditor\",\n value: function getEditor() {\n return this.graphics.getEditor();\n }\n\n /**\n * Return component name\n * @returns {string}\n */\n\n }, {\n key: \"getName\",\n value: function getName() {\n return this.name;\n }\n\n /**\n * Set image properties\n * @param {Object} setting - Image properties\n * @param {boolean} [withRendering] - If true, The changed image will be reflected in the canvas\n */\n\n }, {\n key: \"setImageProperties\",\n value: function setImageProperties(setting, withRendering) {\n this.graphics.setImageProperties(setting, withRendering);\n }\n\n /**\n * Set canvas dimension - css only\n * @param {Object} dimension - Canvas css dimension\n */\n\n }, {\n key: \"setCanvasCssDimension\",\n value: function setCanvasCssDimension(dimension) {\n this.graphics.setCanvasCssDimension(dimension);\n }\n\n /**\n * Set canvas dimension - css only\n * @param {Object} dimension - Canvas backstore dimension\n */\n\n }, {\n key: \"setCanvasBackstoreDimension\",\n value: function setCanvasBackstoreDimension(dimension) {\n this.graphics.setCanvasBackstoreDimension(dimension);\n }\n\n /**\n * Adjust canvas dimension with scaling image\n */\n\n }, {\n key: \"adjustCanvasDimension\",\n value: function adjustCanvasDimension() {\n this.graphics.adjustCanvasDimension();\n }\n }]);\n\n return Component;\n}();\n\nexports.default = Component;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/interface/component.js?");
/***/ }),
/***/ "./src/js/interface/drawingMode.js":
/*!*****************************************!*\
!*** ./src/js/interface/drawingMode.js ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview DrawingMode interface\n */\n\n\nvar _errorMessage = __webpack_require__(/*! ../factory/errorMessage */ \"./src/js/factory/errorMessage.js\");\n\nvar _errorMessage2 = _interopRequireDefault(_errorMessage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar createMessage = _errorMessage2.default.create;\nvar errorTypes = _errorMessage2.default.types;\n\n/**\n * DrawingMode interface\n * @class\n * @param {string} name - drawing mode name\n * @ignore\n */\n\nvar DrawingMode = function () {\n function DrawingMode(name) {\n _classCallCheck(this, DrawingMode);\n\n /**\n * the name of drawing mode\n * @type {string}\n */\n this.name = name;\n }\n\n /**\n * Get this drawing mode name;\n * @returns {string} drawing mode name\n */\n\n\n _createClass(DrawingMode, [{\n key: 'getName',\n value: function getName() {\n return this.name;\n }\n\n /**\n * start this drawing mode\n * @param {Object} options - drawing mode options\n * @abstract\n */\n\n }, {\n key: 'start',\n value: function start() {\n throw new Error(createMessage(errorTypes.UN_IMPLEMENTATION, 'start'));\n }\n\n /**\n * stop this drawing mode\n * @abstract\n */\n\n }, {\n key: 'stop',\n value: function stop() {\n throw new Error(createMessage(errorTypes.UN_IMPLEMENTATION, 'stop'));\n }\n }]);\n\n return DrawingMode;\n}();\n\nexports.default = DrawingMode;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/interface/drawingMode.js?");
/***/ }),
/***/ "./src/js/invoker.js":
/*!***************************!*\
!*** ./src/js/invoker.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Invoker - invoke commands\n */\n\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ./util */ \"./src/js/util.js\");\n\nvar _command = __webpack_require__(/*! ./factory/command */ \"./src/js/factory/command.js\");\n\nvar _command2 = _interopRequireDefault(_command);\n\nvar _consts = __webpack_require__(/*! ./consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar isFunction = _tuiCodeSnippet2.default.isFunction,\n isString = _tuiCodeSnippet2.default.isString,\n CustomEvents = _tuiCodeSnippet2.default.CustomEvents;\n\n/**\n * Invoker\n * @class\n * @ignore\n */\n\nvar Invoker = function () {\n function Invoker() {\n _classCallCheck(this, Invoker);\n\n /**\n * Undo stack\n * @type {Array.<Command>}\n * @private\n */\n this._undoStack = [];\n\n /**\n * Redo stack\n * @type {Array.<Command>}\n * @private\n */\n this._redoStack = [];\n\n /**\n * Lock-flag for executing command\n * @type {boolean}\n * @private\n */\n this._isLocked = false;\n\n this._isSilent = false;\n }\n\n /**\n * Invoke command execution\n * @param {Command} command - Command\n * @returns {Promise}\n * @private\n */\n\n\n _createClass(Invoker, [{\n key: '_invokeExecution',\n value: function _invokeExecution(command) {\n var _this = this;\n\n this.lock();\n\n var args = command.args;\n\n if (!args) {\n args = [];\n }\n\n return command.execute.apply(command, args).then(function (value) {\n if (!_this._isSilent) {\n _this.pushUndoStack(command);\n }\n _this.unlock();\n if (isFunction(command.executeCallback)) {\n command.executeCallback(value);\n }\n\n return value;\n })['catch'](function (message) {\n _this.unlock();\n\n return _util.Promise.reject(message);\n });\n }\n\n /**\n * Invoke command undo\n * @param {Command} command - Command\n * @returns {Promise}\n * @private\n */\n\n }, {\n key: '_invokeUndo',\n value: function _invokeUndo(command) {\n var _this2 = this;\n\n this.lock();\n\n var args = command.args;\n\n if (!args) {\n args = [];\n }\n\n return command.undo.apply(command, args).then(function (value) {\n _this2.pushRedoStack(command);\n _this2.unlock();\n if (isFunction(command.undoCallback)) {\n command.undoCallback(value);\n }\n\n return value;\n })['catch'](function (message) {\n _this2.unlock();\n\n return _util.Promise.reject(message);\n });\n }\n\n /**\n * fire REDO_STACK_CHANGED event\n * @private\n */\n\n }, {\n key: '_fireRedoStackChanged',\n value: function _fireRedoStackChanged() {\n this.fire(_consts.eventNames.REDO_STACK_CHANGED, this._redoStack.length);\n }\n\n /**\n * fire UNDO_STACK_CHANGED event\n * @private\n */\n\n }, {\n key: '_fireUndoStackChanged',\n value: function _fireUndoStackChanged() {\n this.fire(_consts.eventNames.UNDO_STACK_CHANGED, this._undoStack.length);\n }\n\n /**\n * Lock this invoker\n */\n\n }, {\n key: 'lock',\n value: function lock() {\n this._isLocked = true;\n }\n\n /**\n * Unlock this invoker\n */\n\n }, {\n key: 'unlock',\n value: function unlock() {\n this._isLocked = false;\n }\n }, {\n key: 'executeSilent',\n value: function executeSilent() {\n var _this3 = this;\n\n this._isSilent = true;\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.execute.apply(this, args.concat([this._isSilent])).then(function () {\n _this3._isSilent = false;\n });\n }\n\n /**\n * Invoke command\n * Store the command to the undoStack\n * Clear the redoStack\n * @param {String} commandName - Command name\n * @param {...*} args - Arguments for creating command\n * @returns {Promise}\n */\n\n }, {\n key: 'execute',\n value: function execute() {\n var _this4 = this;\n\n if (this._isLocked) {\n return _util.Promise.reject(_consts.rejectMessages.isLock);\n }\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var command = args[0];\n\n if (isString(command)) {\n command = _command2.default.create.apply(_command2.default, args);\n }\n\n return this._invokeExecution(command).then(function (value) {\n _this4.clearRedoStack();\n\n return value;\n });\n }\n\n /**\n * Undo command\n * @returns {Promise}\n */\n\n }, {\n key: 'undo',\n value: function undo() {\n var command = this._undoStack.pop();\n var promise = void 0;\n var message = '';\n\n if (command && this._isLocked) {\n this.pushUndoStack(command, true);\n command = null;\n }\n if (command) {\n if (this.isEmptyUndoStack()) {\n this._fireUndoStackChanged();\n }\n promise = this._invokeUndo(command);\n } else {\n message = _consts.rejectMessages.undo;\n if (this._isLocked) {\n message = message + ' Because ' + _consts.rejectMessages.isLock;\n }\n promise = _util.Promise.reject(message);\n }\n\n return promise;\n }\n\n /**\n * Redo command\n * @returns {Promise}\n */\n\n }, {\n key: 'redo',\n value: function redo() {\n var command = this._redoStack.pop();\n var promise = void 0;\n var message = '';\n\n if (command && this._isLocked) {\n this.pushRedoStack(command, true);\n command = null;\n }\n if (command) {\n if (this.isEmptyRedoStack()) {\n this._fireRedoStackChanged();\n }\n promise = this._invokeExecution(command);\n } else {\n message = _consts.rejectMessages.redo;\n if (this._isLocked) {\n message = message + ' Because ' + _consts.rejectMessages.isLock;\n }\n promise = _util.Promise.reject(message);\n }\n\n return promise;\n }\n\n /**\n * Push undo stack\n * @param {Command} command - command\n * @param {boolean} [isSilent] - Fire event or not\n */\n\n }, {\n key: 'pushUndoStack',\n value: function pushUndoStack(command, isSilent) {\n this._undoStack.push(command);\n if (!isSilent) {\n this._fireUndoStackChanged();\n }\n }\n\n /**\n * Push redo stack\n * @param {Command} command - command\n * @param {boolean} [isSilent] - Fire event or not\n */\n\n }, {\n key: 'pushRedoStack',\n value: function pushRedoStack(command, isSilent) {\n this._redoStack.push(command);\n if (!isSilent) {\n this._fireRedoStackChanged();\n }\n }\n\n /**\n * Return whether the redoStack is empty\n * @returns {boolean}\n */\n\n }, {\n key: 'isEmptyRedoStack',\n value: function isEmptyRedoStack() {\n return this._redoStack.length === 0;\n }\n\n /**\n * Return whether the undoStack is empty\n * @returns {boolean}\n */\n\n }, {\n key: 'isEmptyUndoStack',\n value: function isEmptyUndoStack() {\n return this._undoStack.length === 0;\n }\n\n /**\n * Clear undoStack\n */\n\n }, {\n key: 'clearUndoStack',\n value: function clearUndoStack() {\n if (!this.isEmptyUndoStack()) {\n this._undoStack = [];\n this._fireUndoStackChanged();\n }\n }\n\n /**\n * Clear redoStack\n */\n\n }, {\n key: 'clearRedoStack',\n value: function clearRedoStack() {\n if (!this.isEmptyRedoStack()) {\n this._redoStack = [];\n this._fireRedoStackChanged();\n }\n }\n }]);\n\n return Invoker;\n}();\n\nCustomEvents.mixin(Invoker);\n\nexports.default = Invoker;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/invoker.js?");
/***/ }),
/***/ "./src/js/polyfill.js":
/*!****************************!*\
!*** ./src/js/polyfill.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\n// Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/if (!Element.prototype.matches)\nElement.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nif (!Element.prototype.closest) Element.prototype.closest = function (s) {\n var el = this;\n if (!document.documentElement.contains(el)) return null;\n do {\n if (el.matches(s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n};\n\n/*\n * classList.js: Cross-browser full element.classList implementation.\n * 1.1.20170427\n *\n * By Eli Grey, http://eligrey.com\n * License: Dedicated to the public domain.\n * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md\n */\n\n/*global self, document, DOMException */\n\n/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */\n\nif ('document' in window.self) {\n // Full polyfill for browsers with no classList support\n // Including IE < Edge missing SVGElement.classList\n if (!('classList' in document.createElement('_')) || document.createElementNS && !('classList' in document.createElementNS('http://www.w3.org/2000/svg', 'g'))) {\n (function (view) {\n 'use strict';\n\n if (!('Element' in view)) return;\n\n var classListProp = 'classList',\n protoProp = 'prototype',\n elemCtrProto = view.Element[protoProp],\n objCtr = Object,\n strTrim = String[protoProp].trim || function () {\n return this.replace(/^\\s+|\\s+$/g, '');\n },\n arrIndexOf = Array[protoProp].indexOf || function (item) {\n var i = 0,\n len = this.length;\n for (; i < len; i++) {\n if (i in this && this[i] === item) {\n return i;\n }\n }\n return -1;\n },\n\n // Vendors: please allow content code to instantiate DOMExceptions\n DOMEx = function DOMEx(type, message) {\n this.name = type;\n this.code = DOMException[type];\n this.message = message;\n },\n checkTokenAndGetIndex = function checkTokenAndGetIndex(classList, token) {\n if (token === '') {\n throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified');\n }\n if (/\\s/.test(token)) {\n throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character');\n }\n return arrIndexOf.call(classList, token);\n },\n ClassList = function ClassList(elem) {\n var trimmedClasses = strTrim.call(elem.getAttribute('class') || ''),\n classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : [],\n i = 0,\n len = classes.length;\n for (; i < len; i++) {\n this.push(classes[i]);\n }\n this._updateClassName = function () {\n elem.setAttribute('class', this.toString());\n };\n },\n classListProto = ClassList[protoProp] = [],\n classListGetter = function classListGetter() {\n return new ClassList(this);\n };\n // Most DOMException implementations don't allow calling DOMException's toString()\n // on non-DOMExceptions. Error's toString() is sufficient here.\n DOMEx[protoProp] = Error[protoProp];\n classListProto.item = function (i) {\n return this[i] || null;\n };\n classListProto.contains = function (token) {\n token += '';\n return checkTokenAndGetIndex(this, token) !== -1;\n };\n classListProto.add = function () {\n var tokens = arguments,\n i = 0,\n l = tokens.length,\n token,\n updated = false;\n do {\n token = tokens[i] + '';\n if (checkTokenAndGetIndex(this, token) === -1) {\n this.push(token);\n updated = true;\n }\n } while (++i < l);\n\n if (updated) {\n this._updateClassName();\n }\n };\n classListProto.remove = function () {\n var tokens = arguments,\n i = 0,\n l = tokens.length,\n token,\n updated = false,\n index;\n do {\n token = tokens[i] + '';\n index = checkTokenAndGetIndex(this, token);\n while (index !== -1) {\n this.splice(index, 1);\n updated = true;\n index = checkTokenAndGetIndex(this, token);\n }\n } while (++i < l);\n\n if (updated) {\n this._updateClassName();\n }\n };\n classListProto.toggle = function (token, force) {\n token += '';\n\n var result = this.contains(token),\n method = result ? force !== true && 'remove' : force !== false && 'add';\n if (method) {\n this[method](token);\n }\n\n if (force === true || force === false) {\n return force;\n } else {\n return !result;\n }\n };\n classListProto.toString = function () {\n return this.join(' ');\n };\n\n if (objCtr.defineProperty) {\n var classListPropDesc = {\n get: classListGetter,\n enumerable: true,\n configurable: true\n };\n try {\n objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\n } catch (ex) {\n // IE 8 doesn't support enumerable:true\n // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36\n // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected\n if (ex.number === undefined || ex.number === -0x7ff5ec54) {\n classListPropDesc.enumerable = false;\n objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\n }\n }\n } else if (objCtr[protoProp].__defineGetter__) {\n elemCtrProto.__defineGetter__(classListProp, classListGetter);\n }\n })(window.self);\n }\n\n // There is full or partial native classList support, so just check if we need\n // to normalize the add/remove and toggle APIs.\n\n (function () {\n 'use strict';\n\n var testElement = document.createElement('_');\n\n testElement.classList.add('c1', 'c2');\n\n // Polyfill for IE 10/11 and Firefox <26, where classList.add and\n // classList.remove exist but support only one argument at a time.\n if (!testElement.classList.contains('c2')) {\n var createMethod = function createMethod(method) {\n var original = DOMTokenList.prototype[method];\n\n DOMTokenList.prototype[method] = function (token) {\n var i,\n len = arguments.length;\n\n for (i = 0; i < len; i++) {\n token = arguments[i];\n original.call(this, token);\n }\n };\n };\n createMethod('add');\n createMethod('remove');\n }\n\n testElement.classList.toggle('c3', false);\n\n // Polyfill for IE 10 and Firefox <24, where classList.toggle does not\n // support the second argument.\n if (testElement.classList.contains('c3')) {\n var _toggle = DOMTokenList.prototype.toggle;\n\n DOMTokenList.prototype.toggle = function (token, force) {\n if (1 in arguments && !this.contains(token) === !force) {\n return force;\n } else {\n return _toggle.call(this, token);\n }\n };\n }\n\n testElement = null;\n })();\n}\n\n/*!\n * @copyright Copyright (c) 2017 IcoMoon.io\n * @license Licensed under MIT license\n * See https://github.com/Keyamoon/svgxuse\n * @version 1.2.6\n */\n/*jslint browser: true */\n/*global XDomainRequest, MutationObserver, window */\n(function () {\n 'use strict';\n\n if (typeof window !== 'undefined' && window.addEventListener) {\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\n var checkUseElems;\n var tid; // timeout id\n var debouncedCheck = function debouncedCheck() {\n clearTimeout(tid);\n tid = setTimeout(checkUseElems, 100);\n };\n var unobserveChanges = function unobserveChanges() {\n return;\n };\n var observeChanges = function observeChanges() {\n var observer;\n window.addEventListener('resize', debouncedCheck, false);\n window.addEventListener('orientationchange', debouncedCheck, false);\n if (window.MutationObserver) {\n observer = new MutationObserver(debouncedCheck);\n observer.observe(document.documentElement, {\n childList: true,\n subtree: true,\n attributes: true\n });\n unobserveChanges = function unobserveChanges() {\n try {\n observer.disconnect();\n window.removeEventListener('resize', debouncedCheck, false);\n window.removeEventListener('orientationchange', debouncedCheck, false);\n } catch (ignore) {}\n };\n } else {\n document.documentElement.addEventListener('DOMSubtreeModified', debouncedCheck, false);\n unobserveChanges = function unobserveChanges() {\n document.documentElement.removeEventListener('DOMSubtreeModified', debouncedCheck, false);\n window.removeEventListener('resize', debouncedCheck, false);\n window.removeEventListener('orientationchange', debouncedCheck, false);\n };\n }\n };\n var createRequest = function createRequest(url) {\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\n // XDomainRequest would fail if CORS headers are not set.\n // Therefore, XDomainRequest should only be used with cross origin requests.\n function getOrigin(loc) {\n var a;\n if (loc.protocol !== undefined) {\n a = loc;\n } else {\n a = document.createElement('a');\n a.href = loc;\n }\n return a.protocol.replace(/:/g, '') + a.host;\n }\n var Request;\n var origin;\n var origin2;\n if (window.XMLHttpRequest) {\n Request = new XMLHttpRequest();\n origin = getOrigin(location);\n origin2 = getOrigin(url);\n if (Request.withCredentials === undefined && origin2 !== '' && origin2 !== origin) {\n Request = XDomainRequest || undefined;\n } else {\n Request = XMLHttpRequest;\n }\n }\n return Request;\n };\n var xlinkNS = 'http://www.w3.org/1999/xlink';\n checkUseElems = function checkUseElems() {\n var base;\n var bcr;\n var fallback = ''; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\n var hash;\n var href;\n var i;\n var inProgressCount = 0;\n var isHidden;\n var Request;\n var url;\n var uses;\n var xhr;\n function observeIfDone() {\n // If done with making changes, start watching for chagnes in DOM again\n inProgressCount -= 1;\n if (inProgressCount === 0) {\n // if all xhrs were resolved\n unobserveChanges(); // make sure to remove old handlers\n observeChanges(); // watch for changes to DOM\n }\n }\n function attrUpdateFunc(spec) {\n return function () {\n if (cache[spec.base] !== true) {\n spec.useEl.setAttributeNS(xlinkNS, 'xlink:href', '#' + spec.hash);\n if (spec.useEl.hasAttribute('href')) {\n spec.useEl.setAttribute('href', '#' + spec.hash);\n }\n }\n };\n }\n function onloadFunc(xhr) {\n return function () {\n var body = document.body;\n var x = document.createElement('x');\n var svg;\n xhr.onload = null;\n x.innerHTML = xhr.responseText;\n svg = x.getElementsByTagName('svg')[0];\n if (svg) {\n svg.setAttribute('aria-hidden', 'true');\n svg.style.position = 'absolute';\n svg.style.width = 0;\n svg.style.height = 0;\n svg.style.overflow = 'hidden';\n body.insertBefore(svg, body.firstChild);\n }\n observeIfDone();\n };\n }\n function onErrorTimeout(xhr) {\n return function () {\n xhr.onerror = null;\n xhr.ontimeout = null;\n observeIfDone();\n };\n }\n unobserveChanges(); // stop watching for changes to DOM\n // find all use elements\n uses = document.getElementsByTagName('use');\n for (i = 0; i < uses.length; i += 1) {\n try {\n bcr = uses[i].getBoundingClientRect();\n } catch (ignore) {\n // failed to get bounding rectangle of the use element\n bcr = false;\n }\n href = uses[i].getAttribute('href') || uses[i].getAttributeNS(xlinkNS, 'href') || uses[i].getAttribute('xlink:href');\n if (href && href.split) {\n url = href.split('#');\n } else {\n url = ['', ''];\n }\n base = url[0];\n hash = url[1];\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\n // the use element is empty\n // if there is a reference to an external SVG, try to fetch it\n // use the optional fallback URL if there is no reference to an external SVG\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\n base = fallback;\n }\n if (uses[i].hasAttribute('href')) {\n uses[i].setAttributeNS(xlinkNS, 'xlink:href', href);\n }\n if (base.length) {\n // schedule updating xlink:href\n xhr = cache[base];\n if (xhr !== true) {\n // true signifies that prepending the SVG was not required\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n if (xhr === undefined) {\n Request = createRequest(base);\n if (Request !== undefined) {\n xhr = new Request();\n cache[base] = xhr;\n xhr.onload = onloadFunc(xhr);\n xhr.onerror = onErrorTimeout(xhr);\n xhr.ontimeout = onErrorTimeout(xhr);\n xhr.open('GET', base);\n xhr.send();\n inProgressCount += 1;\n }\n }\n }\n } else {\n if (!isHidden) {\n if (cache[base] === undefined) {\n // remember this URL if the use element was not empty and no request was sent\n cache[base] = true;\n } else if (cache[base].onload) {\n // if it turns out that prepending the SVG is not necessary,\n // abort the in-progress xhr.\n cache[base].abort();\n delete cache[base].onload;\n cache[base] = true;\n }\n } else if (base.length && cache[base]) {\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash\n }), 0);\n }\n }\n }\n uses = '';\n inProgressCount += 1;\n observeIfDone();\n };\n var _winLoad;\n _winLoad = function winLoad() {\n window.removeEventListener('load', _winLoad, false); // to prevent memory leaks\n tid = setTimeout(checkUseElems, 0);\n };\n if (document.readyState !== 'complete') {\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\n window.addEventListener('load', _winLoad, false);\n } else {\n // No need to add a listener if the document is already loaded, initialize immediately.\n _winLoad();\n }\n }\n})();\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/polyfill.js?");
/***/ }),
/***/ "./src/js/ui.js":
/*!**********************!*\
!*** ./src/js/ui.js ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _consts = __webpack_require__(/*! ./consts */ \"./src/js/consts.js\");\n\nvar _util = __webpack_require__(/*! ./util */ \"./src/js/util.js\");\n\nvar _mainContainer = __webpack_require__(/*! ./ui/template/mainContainer */ \"./src/js/ui/template/mainContainer.js\");\n\nvar _mainContainer2 = _interopRequireDefault(_mainContainer);\n\nvar _controls = __webpack_require__(/*! ./ui/template/controls */ \"./src/js/ui/template/controls.js\");\n\nvar _controls2 = _interopRequireDefault(_controls);\n\nvar _theme = __webpack_require__(/*! ./ui/theme/theme */ \"./src/js/ui/theme/theme.js\");\n\nvar _theme2 = _interopRequireDefault(_theme);\n\nvar _shape = __webpack_require__(/*! ./ui/shape */ \"./src/js/ui/shape.js\");\n\nvar _shape2 = _interopRequireDefault(_shape);\n\nvar _crop = __webpack_require__(/*! ./ui/crop */ \"./src/js/ui/crop.js\");\n\nvar _crop2 = _interopRequireDefault(_crop);\n\nvar _flip = __webpack_require__(/*! ./ui/flip */ \"./src/js/ui/flip.js\");\n\nvar _flip2 = _interopRequireDefault(_flip);\n\nvar _rotate = __webpack_require__(/*! ./ui/rotate */ \"./src/js/ui/rotate.js\");\n\nvar _rotate2 = _interopRequireDefault(_rotate);\n\nvar _text = __webpack_require__(/*! ./ui/text */ \"./src/js/ui/text.js\");\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _mask = __webpack_require__(/*! ./ui/mask */ \"./src/js/ui/mask.js\");\n\nvar _mask2 = _interopRequireDefault(_mask);\n\nvar _icon = __webpack_require__(/*! ./ui/icon */ \"./src/js/ui/icon.js\");\n\nvar _icon2 = _interopRequireDefault(_icon);\n\nvar _draw = __webpack_require__(/*! ./ui/draw */ \"./src/js/ui/draw.js\");\n\nvar _draw2 = _interopRequireDefault(_draw);\n\nvar _filter = __webpack_require__(/*! ./ui/filter */ \"./src/js/ui/filter.js\");\n\nvar _filter2 = _interopRequireDefault(_filter);\n\nvar _locale = __webpack_require__(/*! ./ui/locale/locale */ \"./src/js/ui/locale/locale.js\");\n\nvar _locale2 = _interopRequireDefault(_locale);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SUB_UI_COMPONENT = {\n Shape: _shape2.default,\n Crop: _crop2.default,\n Flip: _flip2.default,\n Rotate: _rotate2.default,\n Text: _text2.default,\n Mask: _mask2.default,\n Icon: _icon2.default,\n Draw: _draw2.default,\n Filter: _filter2.default\n};\n\nvar BI_EXPRESSION_MINSIZE_WHEN_TOP_POSITION = '1300';\n\n/**\n * Default UI Class\n * @class\n * @param {string|HTMLElement} element - Wrapper's element or selector\n * @param {Object} [options] - Ui setting options\n * @param {number} options.loadImage - Init default load image\n * @param {number} options.initMenu - Init start menu\n * @param {Boolean} [options.menuBarPosition=bottom] - Let\n * @param {Boolean} [options.applyCropSelectionStyle=false] - Let\n * @param {Boolean} [options.usageStatistics=false] - Use statistics or not\n * @param {Object} [options.uiSize] - ui size of editor\n * @param {string} options.uiSize.width - width of ui\n * @param {string} options.uiSize.height - height of ui\n * @param {Object} actions - ui action instance\n */\n\nvar Ui = function () {\n function Ui(element, options, actions) {\n _classCallCheck(this, Ui);\n\n this.options = this._initializeOption(options);\n this._actions = actions;\n this.submenu = false;\n this.imageSize = {};\n this.uiSize = {};\n this._locale = new _locale2.default(this.options.locale);\n this.theme = new _theme2.default(this.options.theme);\n this.eventHandler = {};\n this._submenuChangeTransection = false;\n this._selectedElement = null;\n this._mainElement = null;\n this._editorElementWrap = null;\n this._editorElement = null;\n this._menuElement = null;\n this._subMenuElement = null;\n this._makeUiElement(element);\n this._setUiSize();\n this._initMenuEvent = false;\n\n this._makeSubMenu();\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Ui, [{\n key: 'destroy',\n value: function destroy() {\n this._removeUiEvent();\n this._destroyAllMenu();\n this._selectedElement.innerHTML = '';\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Set Default Selection for includeUI\n * @param {Object} option - imageEditor options\n * @returns {Object} - extends selectionStyle option\n * @ignore\n */\n\n }, {\n key: 'setUiDefaultSelectionStyle',\n value: function setUiDefaultSelectionStyle(option) {\n return _tuiCodeSnippet2.default.extend({\n applyCropSelectionStyle: true,\n applyGroupSelectionStyle: true,\n selectionStyle: {\n cornerStyle: 'circle',\n cornerSize: 16,\n cornerColor: '#fff',\n cornerStrokeColor: '#fff',\n transparentCorners: false,\n lineWidth: 2,\n borderColor: '#fff'\n }\n }, option);\n }\n\n /**\n * Change editor size\n * @param {Object} resizeInfo - ui & image size info\n * @param {Object} [resizeInfo.uiSize] - image size dimension\n * @param {string} resizeInfo.uiSize.width - ui width\n * @param {string} resizeInfo.uiSize.height - ui height\n * @param {Object} [resizeInfo.imageSize] - image size dimension\n * @param {Number} resizeInfo.imageSize.oldWidth - old width\n * @param {Number} resizeInfo.imageSize.oldHeight - old height\n * @param {Number} resizeInfo.imageSize.newWidth - new width\n * @param {Number} resizeInfo.imageSize.newHeight - new height\n * @example\n * // Change the image size and ui size, and change the affected ui state together.\n * imageEditor.ui.resizeEditor({\n * imageSize: {oldWidth: 100, oldHeight: 100, newWidth: 700, newHeight: 700},\n * uiSize: {width: 1000, height: 1000}\n * });\n * @example\n * // Apply the ui state while preserving the previous attribute (for example, if responsive Ui)\n * imageEditor.ui.resizeEditor();\n */\n\n }, {\n key: 'resizeEditor',\n value: function resizeEditor() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n uiSize = _ref.uiSize,\n _ref$imageSize = _ref.imageSize,\n imageSize = _ref$imageSize === undefined ? this.imageSize : _ref$imageSize;\n\n if (imageSize !== this.imageSize) {\n this.imageSize = imageSize;\n }\n if (uiSize) {\n this._setUiSize(uiSize);\n }\n\n var _getCanvasMaxDimensio = this._getCanvasMaxDimension(),\n width = _getCanvasMaxDimensio.width,\n height = _getCanvasMaxDimensio.height;\n\n var editorElementStyle = this._editorElement.style;\n var menuBarPosition = this.options.menuBarPosition;\n\n\n editorElementStyle.height = height + 'px';\n editorElementStyle.width = width + 'px';\n\n this._setEditorPosition(menuBarPosition);\n\n this._editorElementWrap.style.bottom = '0px';\n this._editorElementWrap.style.top = '0px';\n this._editorElementWrap.style.left = '0px';\n this._editorElementWrap.style.width = '100%';\n\n var selectElementClassList = this._selectedElement.classList;\n\n if (menuBarPosition === 'top' && this._selectedElement.offsetWidth < BI_EXPRESSION_MINSIZE_WHEN_TOP_POSITION) {\n selectElementClassList.add('tui-image-editor-top-optimization');\n } else {\n selectElementClassList.remove('tui-image-editor-top-optimization');\n }\n }\n\n /**\n * Change help button status\n * @param {string} buttonType - target button type\n * @param {Boolean} enableStatus - enabled status\n * @ignore\n */\n\n }, {\n key: 'changeHelpButtonEnabled',\n value: function changeHelpButtonEnabled(buttonType, enableStatus) {\n var buttonClassList = this._buttonElements[buttonType].classList;\n\n buttonClassList[enableStatus ? 'add' : 'remove']('enabled');\n }\n\n /**\n * Change delete button status\n * @param {Object} [options] - Ui setting options\n * @param {object} [options.loadImage] - Init default load image\n * @param {string} [options.initMenu] - Init start menu\n * @param {string} [options.menuBarPosition=bottom] - Let\n * @param {boolean} [options.applyCropSelectionStyle=false] - Let\n * @param {boolean} [options.usageStatistics=false] - Send statistics ping or not\n * @returns {Object} initialize option\n * @private\n */\n\n }, {\n key: '_initializeOption',\n value: function _initializeOption(options) {\n return _tuiCodeSnippet2.default.extend({\n loadImage: {\n path: '',\n name: ''\n },\n locale: {},\n menuIconPath: '',\n menu: ['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask', 'filter'],\n initMenu: '',\n uiSize: {\n width: '100%',\n height: '100%'\n },\n menuBarPosition: 'bottom'\n }, options);\n }\n\n /**\n * Set ui container size\n * @param {Object} uiSize - ui dimension\n * @param {string} uiSize.width - css width property\n * @param {string} uiSize.height - css height property\n * @private\n */\n\n }, {\n key: '_setUiSize',\n value: function _setUiSize() {\n var uiSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.uiSize;\n\n var elementDimension = this._selectedElement.style;\n elementDimension.width = uiSize.width;\n elementDimension.height = uiSize.height;\n }\n\n /**\n * Make submenu dom element\n * @private\n */\n\n }, {\n key: '_makeSubMenu',\n value: function _makeSubMenu() {\n var _this = this;\n\n _tuiCodeSnippet2.default.forEach(this.options.menu, function (menuName) {\n var SubComponentClass = SUB_UI_COMPONENT[menuName.replace(/^[a-z]/, function ($0) {\n return $0.toUpperCase();\n })];\n\n // make menu element\n _this._makeMenuElement(menuName);\n\n // menu btn element\n _this._buttonElements[menuName] = _this._menuElement.querySelector('.tie-btn-' + menuName);\n\n // submenu ui instance\n _this[menuName] = new SubComponentClass(_this._subMenuElement, {\n locale: _this._locale,\n makeSvgIcon: _this.theme.makeMenSvgIconSet.bind(_this.theme),\n menuBarPosition: _this.options.menuBarPosition,\n usageStatistics: _this.options.usageStatistics\n });\n });\n }\n\n /**\n * Make primary ui dom element\n * @param {string|HTMLElement} element - Wrapper's element or selector\n * @private\n */\n\n }, {\n key: '_makeUiElement',\n value: function _makeUiElement(element) {\n var selectedElement = void 0;\n\n window.snippet = _tuiCodeSnippet2.default;\n\n if (element.nodeType) {\n selectedElement = element;\n } else {\n selectedElement = document.querySelector(element);\n }\n var selector = (0, _util.getSelector)(selectedElement);\n\n selectedElement.classList.add('tui-image-editor-container');\n selectedElement.innerHTML = (0, _controls2.default)({\n locale: this._locale,\n biImage: this.theme.getStyle('common.bi'),\n loadButtonStyle: this.theme.getStyle('loadButton'),\n downloadButtonStyle: this.theme.getStyle('downloadButton')\n }) + (0, _mainContainer2.default)({\n locale: this._locale,\n biImage: this.theme.getStyle('common.bi'),\n commonStyle: this.theme.getStyle('common'),\n headerStyle: this.theme.getStyle('header'),\n loadButtonStyle: this.theme.getStyle('loadButton'),\n downloadButtonStyle: this.theme.getStyle('downloadButton'),\n submenuStyle: this.theme.getStyle('submenu')\n });\n\n this._selectedElement = selectedElement;\n this._selectedElement.classList.add(this.options.menuBarPosition);\n\n this._mainElement = selector('.tui-image-editor-main');\n this._editorElementWrap = selector('.tui-image-editor-wrap');\n this._editorElement = selector('.tui-image-editor');\n this._menuElement = selector('.tui-image-editor-menu');\n this._subMenuElement = selector('.tui-image-editor-submenu');\n this._buttonElements = {\n download: this._selectedElement.querySelectorAll('.tui-image-editor-download-btn'),\n load: this._selectedElement.querySelectorAll('.tui-image-editor-load-btn')\n };\n\n this._addHelpMenus();\n }\n\n /**\n * make array for help menu output, including partitions.\n * @returns {Array}\n * @private\n */\n\n }, {\n key: '_makeHelpMenuWithPartition',\n value: function _makeHelpMenuWithPartition() {\n var helpMenuWithPartition = [].concat(_consts.HELP_MENUS, ['']);\n helpMenuWithPartition.splice(3, 0, '');\n\n return helpMenuWithPartition;\n }\n\n /**\n * Add help menu\n * @private\n */\n\n }, {\n key: '_addHelpMenus',\n value: function _addHelpMenus() {\n var _this2 = this;\n\n var helpMenuWithPartition = this._makeHelpMenuWithPartition();\n\n _tuiCodeSnippet2.default.forEach(helpMenuWithPartition, function (menuName) {\n if (!menuName) {\n _this2._makeMenuPartitionElement();\n } else {\n _this2._makeMenuElement(menuName, ['normal', 'disabled', 'hover'], 'help');\n\n if (menuName) {\n _this2._buttonElements[menuName] = _this2._menuElement.querySelector('.tie-btn-' + menuName);\n }\n }\n });\n }\n\n /**\n * Make menu partition element\n * @private\n */\n\n }, {\n key: '_makeMenuPartitionElement',\n value: function _makeMenuPartitionElement() {\n var partitionElement = document.createElement('li');\n var partitionInnerElement = document.createElement('div');\n partitionElement.className = (0, _util.cls)('item');\n partitionInnerElement.className = (0, _util.cls)('icpartition');\n partitionElement.appendChild(partitionInnerElement);\n\n this._menuElement.appendChild(partitionElement);\n }\n\n /**\n * Make menu button element\n * @param {string} menuName - menu name\n * @param {Array} useIconTypes - Possible values are \\['normal', 'active', 'hover', 'disabled'\\]\n * @param {string} menuType - 'normal' or 'help'\n * @private\n */\n\n }, {\n key: '_makeMenuElement',\n value: function _makeMenuElement(menuName) {\n var useIconTypes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['normal', 'active', 'hover'];\n var menuType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';\n\n var btnElement = document.createElement('li');\n var menuItemHtml = this.theme.makeMenSvgIconSet(useIconTypes, menuName);\n\n this._addTooltipAttribute(btnElement, menuName);\n btnElement.className = 'tie-btn-' + menuName + ' ' + (0, _util.cls)('item') + ' ' + menuType;\n btnElement.innerHTML = menuItemHtml;\n\n this._menuElement.appendChild(btnElement);\n }\n\n /**\n * Add help action event\n * @private\n */\n\n }, {\n key: '_addHelpActionEvent',\n value: function _addHelpActionEvent() {\n var _this3 = this;\n\n _tuiCodeSnippet2.default.forEach(_consts.HELP_MENUS, function (helpName) {\n _this3.eventHandler[helpName] = function () {\n return _this3._actions.main[helpName]();\n };\n _this3._buttonElements[helpName].addEventListener('click', _this3.eventHandler[helpName]);\n });\n }\n\n /**\n * Remove help action event\n * @private\n */\n\n }, {\n key: '_removeHelpActionEvent',\n value: function _removeHelpActionEvent() {\n var _this4 = this;\n\n _tuiCodeSnippet2.default.forEach(_consts.HELP_MENUS, function (helpName) {\n _this4._buttonElements[helpName].removeEventListener('click', _this4.eventHandler[helpName]);\n });\n }\n\n /**\n * Add attribute for menu tooltip\n * @param {HTMLElement} element - menu element\n * @param {string} tooltipName - tooltipName\n * @private\n */\n\n }, {\n key: '_addTooltipAttribute',\n value: function _addTooltipAttribute(element, tooltipName) {\n element.setAttribute('tooltip-content', this._locale.localize(tooltipName.replace(/^[a-z]/g, function ($0) {\n return $0.toUpperCase();\n })));\n }\n\n /**\n * Add download event\n * @private\n */\n\n }, {\n key: '_addDownloadEvent',\n value: function _addDownloadEvent() {\n var _this5 = this;\n\n this.eventHandler.download = function () {\n return _this5._actions.main.download();\n };\n _tuiCodeSnippet2.default.forEach(this._buttonElements.download, function (element) {\n element.addEventListener('click', _this5.eventHandler.download);\n });\n }\n }, {\n key: '_removeDownloadEvent',\n value: function _removeDownloadEvent() {\n var _this6 = this;\n\n _tuiCodeSnippet2.default.forEach(this._buttonElements.download, function (element) {\n element.removeEventListener('click', _this6.eventHandler.download);\n });\n }\n\n /**\n * Add load event\n * @private\n */\n\n }, {\n key: '_addLoadEvent',\n value: function _addLoadEvent() {\n var _this7 = this;\n\n this.eventHandler.loadImage = function (event) {\n return _this7._actions.main.load(event.target.files[0]);\n };\n\n _tuiCodeSnippet2.default.forEach(this._buttonElements.load, function (element) {\n element.addEventListener('change', _this7.eventHandler.loadImage);\n });\n }\n\n /**\n * Remmove load event\n * @private\n */\n\n }, {\n key: '_removeLoadEvent',\n value: function _removeLoadEvent() {\n var _this8 = this;\n\n _tuiCodeSnippet2.default.forEach(this._buttonElements.load, function (element) {\n element.removeEventListener('change', _this8.eventHandler.loadImage);\n });\n }\n\n /**\n * Add menu event\n * @param {string} menuName - menu name\n * @private\n */\n\n }, {\n key: '_addMainMenuEvent',\n value: function _addMainMenuEvent(menuName) {\n var _this9 = this;\n\n this.eventHandler[menuName] = function () {\n return _this9.changeMenu(menuName);\n };\n this._buttonElements[menuName].addEventListener('click', this.eventHandler[menuName]);\n }\n\n /**\n * Add menu event\n * @param {string} menuName - menu name\n * @private\n */\n\n }, {\n key: '_addSubMenuEvent',\n value: function _addSubMenuEvent(menuName) {\n this[menuName].addEvent(this._actions[menuName]);\n }\n\n /**\n * Add menu event\n * @private\n */\n\n }, {\n key: '_addMenuEvent',\n value: function _addMenuEvent() {\n var _this10 = this;\n\n _tuiCodeSnippet2.default.forEach(this.options.menu, function (menuName) {\n _this10._addMainMenuEvent(menuName);\n _this10._addSubMenuEvent(menuName);\n });\n }\n\n /**\n * Remove menu event\n * @private\n */\n\n }, {\n key: '_removeMainMenuEvent',\n value: function _removeMainMenuEvent() {\n var _this11 = this;\n\n _tuiCodeSnippet2.default.forEach(this.options.menu, function (menuName) {\n _this11._buttonElements[menuName].removeEventListener('click', _this11.eventHandler[menuName]);\n });\n }\n\n /**\n * Get editor area element\n * @returns {HTMLElement} editor area html element\n * @ignore\n */\n\n }, {\n key: 'getEditorArea',\n value: function getEditorArea() {\n return this._editorElement;\n }\n\n /**\n * Add event for menu items\n * @ignore\n */\n\n }, {\n key: 'activeMenuEvent',\n value: function activeMenuEvent() {\n if (this._initMenuEvent) {\n return;\n }\n\n this._addHelpActionEvent();\n this._addDownloadEvent();\n this._addMenuEvent();\n this._initMenu();\n this._initMenuEvent = true;\n }\n\n /**\n * Remove ui event\n * @private\n */\n\n }, {\n key: '_removeUiEvent',\n value: function _removeUiEvent() {\n this._removeHelpActionEvent();\n this._removeDownloadEvent();\n this._removeLoadEvent();\n this._removeMainMenuEvent();\n }\n\n /**\n * Destroy all menu instance\n * @private\n */\n\n }, {\n key: '_destroyAllMenu',\n value: function _destroyAllMenu() {\n var _this12 = this;\n\n _tuiCodeSnippet2.default.forEach(this.options.menu, function (menuName) {\n _this12[menuName].destroy();\n });\n }\n\n /**\n * Init canvas\n * @ignore\n */\n\n }, {\n key: 'initCanvas',\n value: function initCanvas() {\n var _this13 = this;\n\n var loadImageInfo = this._getLoadImage();\n if (loadImageInfo.path) {\n this._actions.main.initLoadImage(loadImageInfo.path, loadImageInfo.name).then(function () {\n _this13.activeMenuEvent();\n });\n }\n\n this._addLoadEvent();\n\n var gridVisual = document.createElement('div');\n\n gridVisual.className = (0, _util.cls)('grid-visual');\n var grid = '<table>\\n <tr><td class=\"dot left-top\"></td><td></td><td class=\"dot right-top\"></td></tr>\\n <tr><td></td><td></td><td></td></tr>\\n <tr><td class=\"dot left-bottom\"></td><td></td><td class=\"dot right-bottom\"></td></tr>\\n </table>';\n gridVisual.innerHTML = grid;\n this._editorContainerElement = this._editorElement.querySelector('.tui-image-editor-canvas-container');\n this._editorContainerElement.appendChild(gridVisual);\n }\n\n /**\n * get editor area element\n * @returns {Object} load image option\n * @private\n */\n\n }, {\n key: '_getLoadImage',\n value: function _getLoadImage() {\n return this.options.loadImage;\n }\n\n /**\n * change menu\n * @param {string} menuName - menu name\n * @param {boolean} toggle - whether toogle or not\n * @param {boolean} discardSelection - discard selection\n * @ignore\n */\n\n }, {\n key: 'changeMenu',\n value: function changeMenu(menuName) {\n var toggle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var discardSelection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (!this._submenuChangeTransection) {\n this._submenuChangeTransection = true;\n this._changeMenu(menuName, toggle, discardSelection);\n this._submenuChangeTransection = false;\n }\n }\n\n /**\n * change menu\n * @param {string} menuName - menu name\n * @param {boolean} toggle - whether toogle or not\n * @param {boolean} discardSelection - discard selection\n * @private\n */\n\n }, {\n key: '_changeMenu',\n value: function _changeMenu(menuName, toggle, discardSelection) {\n if (this.submenu) {\n this._buttonElements[this.submenu].classList.remove('active');\n this._mainElement.classList.remove('tui-image-editor-menu-' + this.submenu);\n if (discardSelection) {\n this._actions.main.discardSelection();\n }\n this._actions.main.changeSelectableAll(true);\n this[this.submenu].changeStandbyMode();\n }\n\n if (this.submenu === menuName && toggle) {\n this.submenu = null;\n } else {\n this._buttonElements[menuName].classList.add('active');\n this._mainElement.classList.add('tui-image-editor-menu-' + menuName);\n this.submenu = menuName;\n this[this.submenu].changeStartMode();\n }\n\n this.resizeEditor();\n }\n\n /**\n * Init menu\n * @private\n */\n\n }, {\n key: '_initMenu',\n value: function _initMenu() {\n if (this.options.initMenu) {\n var evt = document.createEvent('MouseEvents');\n evt.initEvent('click', true, false);\n this._buttonElements[this.options.initMenu].dispatchEvent(evt);\n }\n\n if (this.icon) {\n this.icon.registDefaultIcon();\n }\n }\n\n /**\n * Get canvas max Dimension\n * @returns {Object} - width & height of editor\n * @private\n */\n\n }, {\n key: '_getCanvasMaxDimension',\n value: function _getCanvasMaxDimension() {\n var _editorContainerEleme = this._editorContainerElement.style,\n maxWidth = _editorContainerEleme.maxWidth,\n maxHeight = _editorContainerEleme.maxHeight;\n\n var width = parseFloat(maxWidth);\n var height = parseFloat(maxHeight);\n\n return {\n width: width,\n height: height\n };\n }\n\n /**\n * Set editor position\n * @param {string} menuBarPosition - top or right or bottom or left\n * @private\n */\n // eslint-disable-next-line complexity\n\n }, {\n key: '_setEditorPosition',\n value: function _setEditorPosition(menuBarPosition) {\n var _getCanvasMaxDimensio2 = this._getCanvasMaxDimension(),\n width = _getCanvasMaxDimensio2.width,\n height = _getCanvasMaxDimensio2.height;\n\n var editorElementStyle = this._editorElement.style;\n var top = 0;\n var left = 0;\n\n if (this.submenu) {\n if (menuBarPosition === 'bottom') {\n if (height > this._editorElementWrap.scrollHeight - 150) {\n top = (height - this._editorElementWrap.scrollHeight) / 2;\n } else {\n top = 150 / 2 * -1;\n }\n } else if (menuBarPosition === 'top') {\n if (height > this._editorElementWrap.offsetHeight - 150) {\n top = 150 / 2 - (height - (this._editorElementWrap.offsetHeight - 150)) / 2;\n } else {\n top = 150 / 2;\n }\n } else if (menuBarPosition === 'left') {\n if (width > this._editorElementWrap.offsetWidth - 248) {\n left = 248 / 2 - (width - (this._editorElementWrap.offsetWidth - 248)) / 2;\n } else {\n left = 248 / 2;\n }\n } else if (menuBarPosition === 'right') {\n if (width > this._editorElementWrap.scrollWidth - 248) {\n left = (width - this._editorElementWrap.scrollWidth) / 2;\n } else {\n left = 248 / 2 * -1;\n }\n }\n }\n editorElementStyle.top = top + 'px';\n editorElementStyle.left = left + 'px';\n }\n }]);\n\n return Ui;\n}();\n\nexports.default = Ui;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui.js?");
/***/ }),
/***/ "./src/js/ui/crop.js":
/*!***************************!*\
!*** ./src/js/ui/crop.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _crop = __webpack_require__(/*! ./template/submenu/crop */ \"./src/js/ui/template/submenu/crop.js\");\n\nvar _crop2 = _interopRequireDefault(_crop);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Crop ui class\n * @class\n * @ignore\n */\nvar Crop = function (_Submenu) {\n _inherits(Crop, _Submenu);\n\n function Crop(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Crop);\n\n var _this = _possibleConstructorReturn(this, (Crop.__proto__ || Object.getPrototypeOf(Crop)).call(this, subMenuElement, {\n locale: locale,\n name: 'crop',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _crop2.default,\n usageStatistics: usageStatistics\n }));\n\n _this.status = 'active';\n\n _this._els = {\n apply: _this.selector('.tie-crop-button .apply'),\n cancel: _this.selector('.tie-crop-button .cancel'),\n preset: _this.selector('.tie-crop-preset-button')\n };\n\n _this.defaultPresetButton = _this._els.preset.querySelector('.preset-none');\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Crop, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for crop\n * @param {Object} actions - actions for crop\n * @param {Function} actions.crop - crop action\n * @param {Function} actions.cancel - cancel action\n * @param {Function} actions.preset - draw rectzone at a predefined ratio\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n var apply = this._applyEventHandler.bind(this);\n var cancel = this._cancelEventHandler.bind(this);\n var cropzonePreset = this._cropzonePresetEventHandler.bind(this);\n\n this.eventHandler = {\n apply: apply,\n cancel: cancel,\n cropzonePreset: cropzonePreset\n };\n\n this.actions = actions;\n this._els.apply.addEventListener('click', apply);\n this._els.cancel.addEventListener('click', cancel);\n this._els.preset.addEventListener('click', cropzonePreset);\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.apply.removeEventListener('click', this.eventHandler.apply);\n this._els.cancel.removeEventListener('click', this.eventHandler.cancel);\n this._els.preset.removeEventListener('click', this.eventHandler.cropzonePreset);\n }\n }, {\n key: '_applyEventHandler',\n value: function _applyEventHandler() {\n this.actions.crop();\n this._els.apply.classList.remove('active');\n }\n }, {\n key: '_cancelEventHandler',\n value: function _cancelEventHandler() {\n this.actions.cancel();\n this._els.apply.classList.remove('active');\n }\n }, {\n key: '_cropzonePresetEventHandler',\n value: function _cropzonePresetEventHandler(event) {\n var button = event.target.closest('.tui-image-editor-button.preset');\n if (button) {\n var _button$className$mat = button.className.match(/preset-[^\\s]+/),\n presetType = _button$className$mat[0];\n\n this._setPresetButtonActive(button);\n this.actions.preset(presetType);\n }\n }\n\n /**\n * Executed when the menu starts.\n */\n\n }, {\n key: 'changeStartMode',\n value: function changeStartMode() {\n this.actions.modeChange('crop');\n }\n\n /**\n * Returns the menu to its default state.\n */\n\n }, {\n key: 'changeStandbyMode',\n value: function changeStandbyMode() {\n this.actions.stopDrawingMode();\n this._setPresetButtonActive();\n }\n\n /**\n * Change apply button status\n * @param {Boolean} enableStatus - apply button status\n */\n\n }, {\n key: 'changeApplyButtonStatus',\n value: function changeApplyButtonStatus(enableStatus) {\n if (enableStatus) {\n this._els.apply.classList.add('active');\n } else {\n this._els.apply.classList.remove('active');\n }\n }\n\n /**\n * Set preset button to active status\n * @param {HTMLElement} button - event target element\n * @private\n */\n\n }, {\n key: '_setPresetButtonActive',\n value: function _setPresetButtonActive() {\n var button = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.defaultPresetButton;\n\n _tuiCodeSnippet2.default.forEach([].slice.call(this._els.preset.querySelectorAll('.preset')), function (presetButton) {\n presetButton.classList.remove('active');\n });\n\n if (button) {\n button.classList.add('active');\n }\n }\n }]);\n\n return Crop;\n}(_submenuBase2.default);\n\nexports.default = Crop;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/crop.js?");
/***/ }),
/***/ "./src/js/ui/draw.js":
/*!***************************!*\
!*** ./src/js/ui/draw.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _colorpicker = __webpack_require__(/*! ./tools/colorpicker */ \"./src/js/ui/tools/colorpicker.js\");\n\nvar _colorpicker2 = _interopRequireDefault(_colorpicker);\n\nvar _range = __webpack_require__(/*! ./tools/range */ \"./src/js/ui/tools/range.js\");\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _draw = __webpack_require__(/*! ./template/submenu/draw */ \"./src/js/ui/template/submenu/draw.js\");\n\nvar _draw2 = _interopRequireDefault(_draw);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DRAW_OPACITY = 0.7;\n\n/**\n * Draw ui class\n * @class\n * @ignore\n */\n\nvar Draw = function (_Submenu) {\n _inherits(Draw, _Submenu);\n\n function Draw(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Draw);\n\n var _this = _possibleConstructorReturn(this, (Draw.__proto__ || Object.getPrototypeOf(Draw)).call(this, subMenuElement, {\n locale: locale,\n name: 'draw',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _draw2.default,\n usageStatistics: usageStatistics\n }));\n\n _this._els = {\n lineSelectButton: _this.selector('.tie-draw-line-select-button'),\n drawColorPicker: new _colorpicker2.default(_this.selector('.tie-draw-color'), '#00a9ff', _this.toggleDirection, _this.usageStatistics),\n drawRange: new _range2.default({\n slider: _this.selector('.tie-draw-range'),\n input: _this.selector('.tie-draw-range-value')\n }, _consts.defaultDrawRangeValus)\n };\n\n _this.type = null;\n _this.color = _this._els.drawColorPicker.color;\n _this.width = _this._els.drawRange.value;\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Draw, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n this._els.drawColorPicker.destroy();\n this._els.drawRange.destroy();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for draw\n * @param {Object} actions - actions for crop\n * @param {Function} actions.setDrawMode - set draw mode\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n this.eventHandler.changeDrawType = this._changeDrawType.bind(this);\n\n this.actions = actions;\n this._els.lineSelectButton.addEventListener('click', this.eventHandler.changeDrawType);\n this._els.drawColorPicker.on('change', this._changeDrawColor.bind(this));\n this._els.drawRange.on('change', this._changeDrawRange.bind(this));\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.lineSelectButton.removeEventListener('click', this.eventHandler.changeDrawType);\n this._els.drawColorPicker.off();\n this._els.drawRange.off();\n }\n\n /**\n * set draw mode - action runner\n */\n\n }, {\n key: 'setDrawMode',\n value: function setDrawMode() {\n this.actions.setDrawMode(this.type, {\n width: this.width,\n color: (0, _util.getRgb)(this.color, DRAW_OPACITY)\n });\n }\n\n /**\n * Returns the menu to its default state.\n */\n\n }, {\n key: 'changeStandbyMode',\n value: function changeStandbyMode() {\n this.type = null;\n this.actions.stopDrawingMode();\n this.actions.changeSelectableAll(true);\n this._els.lineSelectButton.classList.remove('free');\n this._els.lineSelectButton.classList.remove('line');\n }\n\n /**\n * Executed when the menu starts.\n */\n\n }, {\n key: 'changeStartMode',\n value: function changeStartMode() {\n this.type = 'free';\n this._els.lineSelectButton.classList.add('free');\n this.setDrawMode();\n }\n\n /**\n * Change draw type event\n * @param {object} event - line select event\n * @private\n */\n\n }, {\n key: '_changeDrawType',\n value: function _changeDrawType(event) {\n var button = event.target.closest('.tui-image-editor-button');\n if (button) {\n var lineType = this.getButtonType(button, ['free', 'line']);\n this.actions.discardSelection();\n\n if (this.type === lineType) {\n this.changeStandbyMode();\n\n return;\n }\n\n this.changeStandbyMode();\n this.type = lineType;\n this._els.lineSelectButton.classList.add(lineType);\n this.setDrawMode();\n }\n }\n\n /**\n * Change drawing color\n * @param {string} color - select drawing color\n * @private\n */\n\n }, {\n key: '_changeDrawColor',\n value: function _changeDrawColor(color) {\n this.color = color || 'transparent';\n if (!this.type) {\n this.changeStartMode();\n } else {\n this.setDrawMode();\n }\n }\n\n /**\n * Change drawing Range\n * @param {number} value - select drawing range\n * @private\n */\n\n }, {\n key: '_changeDrawRange',\n value: function _changeDrawRange(value) {\n this.width = value;\n if (!this.type) {\n this.changeStartMode();\n } else {\n this.setDrawMode();\n }\n }\n }]);\n\n return Draw;\n}(_submenuBase2.default);\n\nexports.default = Draw;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/draw.js?");
/***/ }),
/***/ "./src/js/ui/filter.js":
/*!*****************************!*\
!*** ./src/js/ui/filter.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _colorpicker = __webpack_require__(/*! ./tools/colorpicker */ \"./src/js/ui/tools/colorpicker.js\");\n\nvar _colorpicker2 = _interopRequireDefault(_colorpicker);\n\nvar _range = __webpack_require__(/*! ./tools/range */ \"./src/js/ui/tools/range.js\");\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _filter = __webpack_require__(/*! ./template/submenu/filter */ \"./src/js/ui/template/submenu/filter.js\");\n\nvar _filter2 = _interopRequireDefault(_filter);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PICKER_CONTROL_HEIGHT = '130px';\nvar BLEND_OPTIONS = ['add', 'diff', 'subtract', 'multiply', 'screen', 'lighten', 'darken'];\nvar FILTER_OPTIONS = ['grayscale', 'invert', 'sepia', 'vintage', 'blur', 'sharpen', 'emboss', 'remove-white', 'brightness', 'noise', 'pixelate', 'color-filter', 'tint', 'multiply', 'blend'];\n\nvar filterNameMap = {\n grayscale: 'grayscale',\n invert: 'invert',\n sepia: 'sepia',\n blur: 'blur',\n sharpen: 'sharpen',\n emboss: 'emboss',\n removeWhite: 'removeColor',\n brightness: 'brightness',\n contrast: 'contrast',\n saturation: 'saturation',\n vintage: 'vintage',\n polaroid: 'polaroid',\n noise: 'noise',\n pixelate: 'pixelate',\n colorFilter: 'removeColor',\n tint: 'blendColor',\n multiply: 'blendColor',\n blend: 'blendColor',\n hue: 'hue',\n gamma: 'gamma'\n};\n\nvar RANGE_INSTANCE_NAMES = ['removewhiteDistanceRange', 'colorfilterThresholeRange', 'pixelateRange', 'noiseRange', 'brightnessRange', 'tintOpacity'];\nvar COLORPICKER_INSTANCE_NAMES = ['filterBlendColor', 'filterMultiplyColor', 'filterTintColor'];\n\n/**\n * Filter ui class\n * @class\n * @ignore\n */\n\nvar Filter = function (_Submenu) {\n _inherits(Filter, _Submenu);\n\n function Filter(subMenuElement, _ref) {\n var locale = _ref.locale,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Filter);\n\n var _this = _possibleConstructorReturn(this, (Filter.__proto__ || Object.getPrototypeOf(Filter)).call(this, subMenuElement, {\n locale: locale,\n name: 'filter',\n menuBarPosition: menuBarPosition,\n templateHtml: _filter2.default,\n usageStatistics: usageStatistics\n }));\n\n _this.selectBoxShow = false;\n\n _this.checkedMap = {};\n _this._makeControlElement();\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Filter, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n this._destroyToolInstance();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Remove event for filter\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n var _this2 = this;\n\n _tuiCodeSnippet2.default.forEach(FILTER_OPTIONS, function (filter) {\n var filterCheckElement = _this2.selector('.tie-' + filter);\n var filterNameCamelCase = (0, _util.toCamelCase)(filter);\n\n filterCheckElement.removeEventListener('change', _this2.eventHandler[filterNameCamelCase]);\n });\n\n _tuiCodeSnippet2.default.forEach([].concat(RANGE_INSTANCE_NAMES, COLORPICKER_INSTANCE_NAMES), function (instanceName) {\n _this2._els[instanceName].off();\n });\n\n this._els.blendType.removeEventListener('change', this.eventHandler.changeBlendFilter);\n this._els.blendType.removeEventListener('click', this.eventHandler.changeBlendFilter);\n }\n }, {\n key: '_destroyToolInstance',\n value: function _destroyToolInstance() {\n var _this3 = this;\n\n _tuiCodeSnippet2.default.forEach([].concat(RANGE_INSTANCE_NAMES, COLORPICKER_INSTANCE_NAMES), function (instanceName) {\n _this3._els[instanceName].destroy();\n });\n }\n\n /**\n * Add event for filter\n * @param {Object} actions - actions for crop\n * @param {Function} actions.applyFilter - apply filter option\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(_ref2) {\n var _this4 = this;\n\n var applyFilter = _ref2.applyFilter;\n\n var changeFilterState = function changeFilterState(filterName) {\n return _this4._changeFilterState.bind(_this4, applyFilter, filterName);\n };\n var changeFilterStateForRange = function changeFilterStateForRange(filterName) {\n return function (value, isLast) {\n return _this4._changeFilterState(applyFilter, filterName, isLast);\n };\n };\n\n this.eventHandler = {\n changeBlendFilter: changeFilterState('blend'),\n blandTypeClick: function blandTypeClick(event) {\n return event.stopPropagation();\n }\n };\n\n _tuiCodeSnippet2.default.forEach(FILTER_OPTIONS, function (filter) {\n var filterCheckElement = _this4.selector('.tie-' + filter);\n var filterNameCamelCase = (0, _util.toCamelCase)(filter);\n _this4.checkedMap[filterNameCamelCase] = filterCheckElement;\n _this4.eventHandler[filterNameCamelCase] = changeFilterState(filterNameCamelCase);\n\n filterCheckElement.addEventListener('change', _this4.eventHandler[filterNameCamelCase]);\n });\n\n this._els.removewhiteDistanceRange.on('change', changeFilterStateForRange('removeWhite'));\n this._els.colorfilterThresholeRange.on('change', changeFilterStateForRange('colorFilter'));\n this._els.pixelateRange.on('change', changeFilterStateForRange('pixelate'));\n this._els.noiseRange.on('change', changeFilterStateForRange('noise'));\n this._els.brightnessRange.on('change', changeFilterStateForRange('brightness'));\n\n this._els.filterBlendColor.on('change', this.eventHandler.changeBlendFilter);\n this._els.filterMultiplyColor.on('change', changeFilterState('multiply'));\n this._els.filterTintColor.on('change', changeFilterState('tint'));\n this._els.tintOpacity.on('change', changeFilterStateForRange('tint'));\n this._els.filterMultiplyColor.on('changeShow', this.colorPickerChangeShow.bind(this));\n this._els.filterTintColor.on('changeShow', this.colorPickerChangeShow.bind(this));\n this._els.filterBlendColor.on('changeShow', this.colorPickerChangeShow.bind(this));\n\n this._els.blendType.addEventListener('change', this.eventHandler.changeBlendFilter);\n this._els.blendType.addEventListener('click', this.eventHandler.blandTypeClick);\n }\n\n /**\n * Set filter for undo changed\n * @param {Object} chagedFilterInfos - changed command infos\n * @param {string} type - filter type\n * @param {string} action - add or remove\n * @param {Object} options - filter options\n */\n\n }, {\n key: 'setFilterState',\n value: function setFilterState(chagedFilterInfos) {\n var type = chagedFilterInfos.type,\n options = chagedFilterInfos.options,\n action = chagedFilterInfos.action;\n\n var filterName = this._getFilterNameFromOptions(type, options);\n var isRemove = action === 'remove';\n\n if (!isRemove) {\n this._setFilterState(filterName, options);\n }\n\n this.checkedMap[filterName].checked = !isRemove;\n }\n\n /**\n * Set filter for undo changed\n * @param {string} filterName - filter name\n * @param {Object} options - filter options\n * @private\n */\n // eslint-disable-next-line complexity\n\n }, {\n key: '_setFilterState',\n value: function _setFilterState(filterName, options) {\n if (filterName === 'colorFilter') {\n this._els.colorfilterThresholeRange.value = options.distance;\n } else if (filterName === 'removeWhite') {\n this._els.removewhiteDistanceRange.value = options.distance;\n } else if (filterName === 'pixelate') {\n this._els.pixelateRange.value = options.blocksize;\n } else if (filterName === 'brightness') {\n this._els.brightnessRange.value = options.brightness;\n } else if (filterName === 'noise') {\n this._els.noiseRange.value = options.noise;\n } else if (filterName === 'tint') {\n this._els.tintOpacity.value = options.alpha;\n this._els.filterTintColor.color = options.color;\n } else if (filterName === 'blend') {\n this._els.filterBlendColor.color = options.color;\n } else if (filterName === 'multiply') {\n this._els.filterMultiplyColor.color = options.color;\n }\n }\n\n /**\n * Get filter name\n * @param {string} type - filter type\n * @param {Object} options - filter options\n * @returns {string} filter name\n * @private\n */\n\n }, {\n key: '_getFilterNameFromOptions',\n value: function _getFilterNameFromOptions(type, options) {\n var filterName = type;\n\n if (type === 'removeColor') {\n filterName = _tuiCodeSnippet2.default.isExisty(options.useAlpha) ? 'removeWhite' : 'colorFilter';\n } else if (type === 'blendColor') {\n filterName = {\n add: 'blend',\n multiply: 'multiply',\n tint: 'tint'\n }[options.mode];\n }\n\n return filterName;\n }\n\n /**\n * Add event for filter\n * @param {Function} applyFilter - actions for firter\n * @param {string} filterName - filter name\n * @param {boolean} [isLast] - Is last change\n */\n\n }, {\n key: '_changeFilterState',\n value: function _changeFilterState(applyFilter, filterName) {\n var isLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n var apply = this.checkedMap[filterName].checked;\n var type = filterNameMap[filterName];\n\n var checkboxGroup = this.checkedMap[filterName].closest('.tui-image-editor-checkbox-group');\n if (checkboxGroup) {\n if (apply) {\n checkboxGroup.classList.remove('tui-image-editor-disabled');\n } else {\n checkboxGroup.classList.add('tui-image-editor-disabled');\n }\n }\n applyFilter(apply, type, this._getFilterOption(filterName), !isLast);\n }\n\n /**\n * Get filter option\n * @param {String} type - filter type\n * @returns {Object} filter option object\n * @private\n */\n // eslint-disable-next-line complexity\n\n }, {\n key: '_getFilterOption',\n value: function _getFilterOption(type) {\n var option = {};\n switch (type) {\n case 'removeWhite':\n option.color = '#FFFFFF';\n option.useAlpha = false;\n option.distance = parseFloat(this._els.removewhiteDistanceRange.value);\n break;\n case 'colorFilter':\n option.color = '#FFFFFF';\n option.distance = parseFloat(this._els.colorfilterThresholeRange.value);\n break;\n case 'pixelate':\n option.blocksize = (0, _util.toInteger)(this._els.pixelateRange.value);\n break;\n case 'noise':\n option.noise = (0, _util.toInteger)(this._els.noiseRange.value);\n break;\n case 'brightness':\n option.brightness = parseFloat(this._els.brightnessRange.value);\n break;\n case 'blend':\n option.mode = 'add';\n option.color = this._els.filterBlendColor.color;\n option.mode = this._els.blendType.value;\n break;\n case 'multiply':\n option.mode = 'multiply';\n option.color = this._els.filterMultiplyColor.color;\n break;\n case 'tint':\n option.mode = 'tint';\n option.color = this._els.filterTintColor.color;\n option.alpha = this._els.tintOpacity.value;\n break;\n case 'blur':\n option.blur = this._els.blurRange.value;\n break;\n default:\n break;\n }\n\n return option;\n }\n\n /**\n * Make submenu range and colorpicker control\n * @private\n */\n\n }, {\n key: '_makeControlElement',\n value: function _makeControlElement() {\n this._els = {\n removewhiteDistanceRange: new _range2.default({ slider: this.selector('.tie-removewhite-distance-range') }, _consts.defaultFilterRangeValus.removewhiteDistanceRange),\n brightnessRange: new _range2.default({ slider: this.selector('.tie-brightness-range') }, _consts.defaultFilterRangeValus.brightnessRange),\n noiseRange: new _range2.default({ slider: this.selector('.tie-noise-range') }, _consts.defaultFilterRangeValus.noiseRange),\n pixelateRange: new _range2.default({ slider: this.selector('.tie-pixelate-range') }, _consts.defaultFilterRangeValus.pixelateRange),\n colorfilterThresholeRange: new _range2.default({ slider: this.selector('.tie-colorfilter-threshole-range') }, _consts.defaultFilterRangeValus.colorfilterThresholeRange),\n filterTintColor: new _colorpicker2.default(this.selector('.tie-filter-tint-color'), '#03bd9e', this.toggleDirection, this.usageStatistics),\n filterMultiplyColor: new _colorpicker2.default(this.selector('.tie-filter-multiply-color'), '#515ce6', this.toggleDirection, this.usageStatistics),\n filterBlendColor: new _colorpicker2.default(this.selector('.tie-filter-blend-color'), '#ffbb3b', this.toggleDirection, this.usageStatistics),\n blurRange: _consts.defaultFilterRangeValus.blurFilterRange\n };\n\n this._els.tintOpacity = this._pickerWithRange(this._els.filterTintColor.pickerControl);\n this._els.blendType = this._pickerWithSelectbox(this._els.filterBlendColor.pickerControl);\n\n this.colorPickerControls.push(this._els.filterTintColor);\n this.colorPickerControls.push(this._els.filterMultiplyColor);\n this.colorPickerControls.push(this._els.filterBlendColor);\n }\n\n /**\n * Make submenu control for picker & range mixin\n * @param {HTMLElement} pickerControl - pickerControl dom element\n * @returns {Range}\n * @private\n */\n\n }, {\n key: '_pickerWithRange',\n value: function _pickerWithRange(pickerControl) {\n var rangeWrap = document.createElement('div');\n var rangelabel = document.createElement('label');\n var slider = document.createElement('div');\n\n slider.id = 'tie-filter-tint-opacity';\n rangelabel.innerHTML = 'Opacity';\n rangeWrap.appendChild(rangelabel);\n rangeWrap.appendChild(slider);\n pickerControl.appendChild(rangeWrap);\n pickerControl.style.height = PICKER_CONTROL_HEIGHT;\n\n return new _range2.default({ slider: slider }, _consts.defaultFilterRangeValus.tintOpacityRange);\n }\n\n /**\n * Make submenu control for picker & selectbox\n * @param {HTMLElement} pickerControl - pickerControl dom element\n * @returns {HTMLElement}\n * @private\n */\n\n }, {\n key: '_pickerWithSelectbox',\n value: function _pickerWithSelectbox(pickerControl) {\n var selectlistWrap = document.createElement('div');\n var selectlist = document.createElement('select');\n var optionlist = document.createElement('ul');\n\n selectlistWrap.className = 'tui-image-editor-selectlist-wrap';\n optionlist.className = 'tui-image-editor-selectlist';\n\n selectlistWrap.appendChild(selectlist);\n selectlistWrap.appendChild(optionlist);\n\n this._makeSelectOptionList(selectlist);\n\n pickerControl.appendChild(selectlistWrap);\n pickerControl.style.height = PICKER_CONTROL_HEIGHT;\n\n this._drawSelectOptionList(selectlist, optionlist);\n this._pickerWithSelectboxForAddEvent(selectlist, optionlist);\n\n return selectlist;\n }\n\n /**\n * Make selectbox option list custom style\n * @param {HTMLElement} selectlist - selectbox element\n * @param {HTMLElement} optionlist - custom option list item element\n * @private\n */\n\n }, {\n key: '_drawSelectOptionList',\n value: function _drawSelectOptionList(selectlist, optionlist) {\n var options = selectlist.querySelectorAll('option');\n _tuiCodeSnippet2.default.forEach(options, function (option) {\n var optionElement = document.createElement('li');\n optionElement.innerHTML = option.innerHTML;\n optionElement.setAttribute('data-item', option.value);\n optionlist.appendChild(optionElement);\n });\n }\n\n /**\n * custome selectbox custom event\n * @param {HTMLElement} selectlist - selectbox element\n * @param {HTMLElement} optionlist - custom option list item element\n * @private\n */\n\n }, {\n key: '_pickerWithSelectboxForAddEvent',\n value: function _pickerWithSelectboxForAddEvent(selectlist, optionlist) {\n var _this5 = this;\n\n optionlist.addEventListener('click', function (event) {\n var optionValue = event.target.getAttribute('data-item');\n var fireEvent = document.createEvent('HTMLEvents');\n\n selectlist.querySelector('[value=\"' + optionValue + '\"]').selected = true;\n fireEvent.initEvent('change', true, true);\n\n selectlist.dispatchEvent(fireEvent);\n\n _this5.selectBoxShow = false;\n optionlist.style.display = 'none';\n });\n\n selectlist.addEventListener('mousedown', function (event) {\n event.preventDefault();\n _this5.selectBoxShow = !_this5.selectBoxShow;\n optionlist.style.display = _this5.selectBoxShow ? 'block' : 'none';\n optionlist.setAttribute('data-selectitem', selectlist.value);\n optionlist.querySelector('[data-item=\\'' + selectlist.value + '\\']').classList.add('active');\n });\n }\n\n /**\n * Make option list for select control\n * @param {HTMLElement} selectlist - blend option select list element\n * @private\n */\n\n }, {\n key: '_makeSelectOptionList',\n value: function _makeSelectOptionList(selectlist) {\n _tuiCodeSnippet2.default.forEach(BLEND_OPTIONS, function (option) {\n var selectOption = document.createElement('option');\n selectOption.setAttribute('value', option);\n selectOption.innerHTML = option.replace(/^[a-z]/, function ($0) {\n return $0.toUpperCase();\n });\n selectlist.appendChild(selectOption);\n });\n }\n }]);\n\n return Filter;\n}(_submenuBase2.default);\n\nexports.default = Filter;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/filter.js?");
/***/ }),
/***/ "./src/js/ui/flip.js":
/*!***************************!*\
!*** ./src/js/ui/flip.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _flip = __webpack_require__(/*! ./template/submenu/flip */ \"./src/js/ui/template/submenu/flip.js\");\n\nvar _flip2 = _interopRequireDefault(_flip);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Flip ui class\n * @class\n * @ignore\n */\nvar Flip = function (_Submenu) {\n _inherits(Flip, _Submenu);\n\n function Flip(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Flip);\n\n var _this = _possibleConstructorReturn(this, (Flip.__proto__ || Object.getPrototypeOf(Flip)).call(this, subMenuElement, {\n locale: locale,\n name: 'flip',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _flip2.default,\n usageStatistics: usageStatistics\n }));\n\n _this.flipStatus = false;\n\n _this._els = {\n flipButton: _this.selector('.tie-flip-button')\n };\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Flip, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for flip\n * @param {Object} actions - actions for flip\n * @param {Function} actions.flip - flip action\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n this.eventHandler.changeFlip = this._changeFlip.bind(this);\n this._actions = actions;\n this._els.flipButton.addEventListener('click', this.eventHandler.changeFlip);\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.flipButton.removeEventListener('click', this.eventHandler.changeFlip);\n }\n\n /**\n * change Flip status\n * @param {object} event - change event\n * @private\n */\n\n }, {\n key: '_changeFlip',\n value: function _changeFlip(event) {\n var _this2 = this;\n\n var button = event.target.closest('.tui-image-editor-button');\n if (button) {\n var flipType = this.getButtonType(button, ['flipX', 'flipY', 'resetFlip']);\n if (!this.flipStatus && flipType === 'resetFlip') {\n return;\n }\n\n this._actions.flip(flipType).then(function (flipStatus) {\n var flipClassList = _this2._els.flipButton.classList;\n _this2.flipStatus = false;\n\n flipClassList.remove('resetFlip');\n _tuiCodeSnippet2.default.forEach(['flipX', 'flipY'], function (type) {\n flipClassList.remove(type);\n if (flipStatus[type]) {\n flipClassList.add(type);\n flipClassList.add('resetFlip');\n _this2.flipStatus = true;\n }\n });\n });\n }\n }\n }]);\n\n return Flip;\n}(_submenuBase2.default);\n\nexports.default = Flip;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/flip.js?");
/***/ }),
/***/ "./src/js/ui/icon.js":
/*!***************************!*\
!*** ./src/js/ui/icon.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _colorpicker = __webpack_require__(/*! ./tools/colorpicker */ \"./src/js/ui/tools/colorpicker.js\");\n\nvar _colorpicker2 = _interopRequireDefault(_colorpicker);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _icon = __webpack_require__(/*! ./template/submenu/icon */ \"./src/js/ui/template/submenu/icon.js\");\n\nvar _icon2 = _interopRequireDefault(_icon);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Icon ui class\n * @class\n * @ignore\n */\nvar Icon = function (_Submenu) {\n _inherits(Icon, _Submenu);\n\n function Icon(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Icon);\n\n var _this = _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).call(this, subMenuElement, {\n locale: locale,\n name: 'icon',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _icon2.default,\n usageStatistics: usageStatistics\n }));\n\n _this.iconType = null;\n _this._iconMap = {};\n\n _this._els = {\n registrIconButton: _this.selector('.tie-icon-image-file'),\n addIconButton: _this.selector('.tie-icon-add-button'),\n iconColorpicker: new _colorpicker2.default(_this.selector('.tie-icon-color'), '#ffbb3b', _this.toggleDirection, _this.usageStatistics)\n };\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Icon, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n this._els.iconColorpicker.destroy();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for icon\n * @param {Object} actions - actions for icon\n * @param {Function} actions.registCustomIcon - register icon\n * @param {Function} actions.addIcon - add icon\n * @param {Function} actions.changeColor - change icon color\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n var registerIcon = this._registerIconHandler.bind(this);\n var addIcon = this._addIconHandler.bind(this);\n\n this.eventHandler = {\n registerIcon: registerIcon,\n addIcon: addIcon\n };\n\n this.actions = actions;\n this._els.iconColorpicker.on('change', this._changeColorHandler.bind(this));\n this._els.registrIconButton.addEventListener('change', registerIcon);\n this._els.addIconButton.addEventListener('click', addIcon);\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.iconColorpicker.off();\n this._els.registrIconButton.removeEventListener('change', this.eventHandler.registerIcon);\n this._els.addIconButton.removeEventListener('click', this.eventHandler.addIcon);\n }\n\n /**\n * Clear icon type\n */\n\n }, {\n key: 'clearIconType',\n value: function clearIconType() {\n this._els.addIconButton.classList.remove(this.iconType);\n this.iconType = null;\n }\n\n /**\n * Register default icon\n */\n\n }, {\n key: 'registDefaultIcon',\n value: function registDefaultIcon() {\n var _this2 = this;\n\n _tuiCodeSnippet2.default.forEach(_consts.defaultIconPath, function (path, type) {\n _this2.actions.registDefalutIcons(type, path);\n });\n }\n\n /**\n * Set icon picker color\n * @param {string} iconColor - rgb color string\n */\n\n }, {\n key: 'setIconPickerColor',\n value: function setIconPickerColor(iconColor) {\n this._els.iconColorpicker.color = iconColor;\n }\n\n /**\n * Returns the menu to its default state.\n */\n\n }, {\n key: 'changeStandbyMode',\n value: function changeStandbyMode() {\n this.clearIconType();\n this.actions.cancelAddIcon();\n }\n\n /**\n * Change icon color\n * @param {string} color - color for change\n * @private\n */\n\n }, {\n key: '_changeColorHandler',\n value: function _changeColorHandler(color) {\n color = color || 'transparent';\n this.actions.changeColor(color);\n }\n\n /**\n * Change icon color\n * @param {object} event - add button event object\n * @private\n */\n\n }, {\n key: '_addIconHandler',\n value: function _addIconHandler(event) {\n var button = event.target.closest('.tui-image-editor-button');\n\n if (button) {\n var iconType = button.getAttribute('data-icontype');\n var iconColor = this._els.iconColorpicker.color;\n this.actions.discardSelection();\n this.actions.changeSelectableAll(false);\n this._els.addIconButton.classList.remove(this.iconType);\n this._els.addIconButton.classList.add(iconType);\n\n if (this.iconType === iconType) {\n this.changeStandbyMode();\n } else {\n this.actions.addIcon(iconType, iconColor);\n this.iconType = iconType;\n }\n }\n }\n\n /**\n * register icon\n * @param {object} event - file change event object\n * @private\n */\n\n }, {\n key: '_registerIconHandler',\n value: function _registerIconHandler(event) {\n var imgUrl = void 0;\n\n if (!_util.isSupportFileApi) {\n alert('This browser does not support file-api');\n }\n\n var _event$target$files = event.target.files,\n file = _event$target$files[0];\n\n\n if (file) {\n imgUrl = URL.createObjectURL(file);\n this.actions.registCustomIcon(imgUrl, file);\n }\n }\n }]);\n\n return Icon;\n}(_submenuBase2.default);\n\nexports.default = Icon;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/icon.js?");
/***/ }),
/***/ "./src/js/ui/locale/locale.js":
/*!************************************!*\
!*** ./src/js/ui/locale/locale.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Translate messages\n */\nvar Locale = function () {\n /**\n * @constructor\n * @param {Object} locale - Locale object for initialise\n */\n function Locale(locale) {\n _classCallCheck(this, Locale);\n\n this._locale = locale;\n }\n\n /**\n * localize message\n * @param {string} message - message who will be localized\n * @returns {string}\n */\n\n\n _createClass(Locale, [{\n key: \"localize\",\n value: function localize(message) {\n return this._locale[message] || message;\n }\n }]);\n\n return Locale;\n}();\n\nexports.default = Locale;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/locale/locale.js?");
/***/ }),
/***/ "./src/js/ui/mask.js":
/*!***************************!*\
!*** ./src/js/ui/mask.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _mask = __webpack_require__(/*! ./template/submenu/mask */ \"./src/js/ui/template/submenu/mask.js\");\n\nvar _mask2 = _interopRequireDefault(_mask);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Mask ui class\n * @class\n * @ignore\n */\nvar Mask = function (_Submenu) {\n _inherits(Mask, _Submenu);\n\n function Mask(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Mask);\n\n var _this = _possibleConstructorReturn(this, (Mask.__proto__ || Object.getPrototypeOf(Mask)).call(this, subMenuElement, {\n locale: locale,\n name: 'mask',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _mask2.default,\n usageStatistics: usageStatistics\n }));\n\n _this._els = {\n applyButton: _this.selector('.tie-mask-apply'),\n maskImageButton: _this.selector('.tie-mask-image-file')\n };\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Mask, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for mask\n * @param {Object} actions - actions for crop\n * @param {Function} actions.loadImageFromURL - load image action\n * @param {Function} actions.applyFilter - apply filter action\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n var loadMaskFile = this._loadMaskFile.bind(this);\n var applyMask = this._applyMask.bind(this);\n\n this.eventHandler = {\n loadMaskFile: loadMaskFile,\n applyMask: applyMask\n };\n\n this.actions = actions;\n this._els.maskImageButton.addEventListener('change', loadMaskFile);\n this._els.applyButton.addEventListener('click', applyMask);\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.maskImageButton.removeEventListener('change', this.eventHandler.loadMaskFile);\n this._els.applyButton.removeEventListener('click', this.eventHandler.applyMask);\n }\n\n /**\n * Apply mask\n * @private\n */\n\n }, {\n key: '_applyMask',\n value: function _applyMask() {\n this.actions.applyFilter();\n this._els.applyButton.classList.remove('active');\n }\n\n /**\n * Load mask file\n * @param {object} event - File change event object\n * @private\n */\n\n }, {\n key: '_loadMaskFile',\n value: function _loadMaskFile(event) {\n var imgUrl = void 0;\n\n if (!(0, _util.isSupportFileApi)()) {\n alert('This browser does not support file-api');\n }\n\n var _event$target$files = event.target.files,\n file = _event$target$files[0];\n\n\n if (file) {\n imgUrl = URL.createObjectURL(file);\n this.actions.loadImageFromURL(imgUrl, file);\n this._els.applyButton.classList.add('active');\n }\n }\n }]);\n\n return Mask;\n}(_submenuBase2.default);\n\nexports.default = Mask;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/mask.js?");
/***/ }),
/***/ "./src/js/ui/rotate.js":
/*!*****************************!*\
!*** ./src/js/ui/rotate.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _range = __webpack_require__(/*! ./tools/range */ \"./src/js/ui/tools/range.js\");\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _rotate = __webpack_require__(/*! ./template/submenu/rotate */ \"./src/js/ui/template/submenu/rotate.js\");\n\nvar _rotate2 = _interopRequireDefault(_rotate);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar CLOCKWISE = 30;\nvar COUNTERCLOCKWISE = -30;\n\n/**\n * Rotate ui class\n * @class\n * @ignore\n */\n\nvar Rotate = function (_Submenu) {\n _inherits(Rotate, _Submenu);\n\n function Rotate(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Rotate);\n\n var _this = _possibleConstructorReturn(this, (Rotate.__proto__ || Object.getPrototypeOf(Rotate)).call(this, subMenuElement, {\n locale: locale,\n name: 'rotate',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _rotate2.default,\n usageStatistics: usageStatistics\n }));\n\n _this._value = 0;\n\n _this._els = {\n rotateButton: _this.selector('.tie-retate-button'),\n rotateRange: new _range2.default({\n slider: _this.selector('.tie-rotate-range'),\n input: _this.selector('.tie-ratate-range-value')\n }, _consts.defaultRotateRangeValus)\n };\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Rotate, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n this._els.rotateRange.destroy();\n\n (0, _util.assignmentForDestroy)(this);\n }\n }, {\n key: 'setRangeBarAngle',\n value: function setRangeBarAngle(type, angle) {\n var resultAngle = angle;\n\n if (type === 'rotate') {\n resultAngle = parseInt(this._els.rotateRange.value, 10) + angle;\n }\n\n this._setRangeBarRatio(resultAngle);\n }\n }, {\n key: '_setRangeBarRatio',\n value: function _setRangeBarRatio(angle) {\n this._els.rotateRange.value = angle;\n }\n\n /**\n * Add event for rotate\n * @param {Object} actions - actions for crop\n * @param {Function} actions.rotate - rotate action\n * @param {Function} actions.setAngle - set angle action\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n this.eventHandler.rotationAngleChanged = this._changeRotateForButton.bind(this);\n\n // {rotate, setAngle}\n this.actions = actions;\n this._els.rotateButton.addEventListener('click', this.eventHandler.rotationAngleChanged);\n this._els.rotateRange.on('change', this._changeRotateForRange.bind(this));\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.rotateButton.removeEventListener('click', this.eventHandler.rotationAngleChanged);\n this._els.rotateRange.off();\n }\n\n /**\n * Change rotate for range\n * @param {number} value - angle value\n * @param {boolean} isLast - Is last change\n * @private\n */\n\n }, {\n key: '_changeRotateForRange',\n value: function _changeRotateForRange(value, isLast) {\n var angle = (0, _util.toInteger)(value);\n this.actions.setAngle(angle, !isLast);\n this._value = angle;\n }\n\n /**\n * Change rotate for button\n * @param {object} event - add button event object\n * @private\n */\n\n }, {\n key: '_changeRotateForButton',\n value: function _changeRotateForButton(event) {\n var button = event.target.closest('.tui-image-editor-button');\n var angle = this._els.rotateRange.value;\n\n if (button) {\n var rotateType = this.getButtonType(button, ['counterclockwise', 'clockwise']);\n var rotateAngle = {\n clockwise: CLOCKWISE,\n counterclockwise: COUNTERCLOCKWISE\n }[rotateType];\n var newAngle = parseInt(angle, 10) + rotateAngle;\n var isRotatable = newAngle >= -360 && newAngle <= 360;\n if (isRotatable) {\n this.actions.rotate(rotateAngle);\n }\n }\n }\n }]);\n\n return Rotate;\n}(_submenuBase2.default);\n\nexports.default = Rotate;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/rotate.js?");
/***/ }),
/***/ "./src/js/ui/shape.js":
/*!****************************!*\
!*** ./src/js/ui/shape.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _colorpicker = __webpack_require__(/*! ./tools/colorpicker */ \"./src/js/ui/tools/colorpicker.js\");\n\nvar _colorpicker2 = _interopRequireDefault(_colorpicker);\n\nvar _range = __webpack_require__(/*! ./tools/range */ \"./src/js/ui/tools/range.js\");\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _shape = __webpack_require__(/*! ./template/submenu/shape */ \"./src/js/ui/template/submenu/shape.js\");\n\nvar _shape2 = _interopRequireDefault(_shape);\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SHAPE_DEFAULT_OPTION = {\n stroke: '#ffbb3b',\n fill: '',\n strokeWidth: 3\n};\n\n/**\n * Shape ui class\n * @class\n * @ignore\n */\n\nvar Shape = function (_Submenu) {\n _inherits(Shape, _Submenu);\n\n function Shape(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Shape);\n\n var _this = _possibleConstructorReturn(this, (Shape.__proto__ || Object.getPrototypeOf(Shape)).call(this, subMenuElement, {\n locale: locale,\n name: 'shape',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _shape2.default,\n usageStatistics: usageStatistics\n }));\n\n _this.type = null;\n _this.options = SHAPE_DEFAULT_OPTION;\n\n _this._els = {\n shapeSelectButton: _this.selector('.tie-shape-button'),\n shapeColorButton: _this.selector('.tie-shape-color-button'),\n strokeRange: new _range2.default({\n slider: _this.selector('.tie-stroke-range'),\n input: _this.selector('.tie-stroke-range-value')\n }, _consts.defaultShapeStrokeValus),\n fillColorpicker: new _colorpicker2.default(_this.selector('.tie-color-fill'), '', _this.toggleDirection, _this.usageStatistics),\n strokeColorpicker: new _colorpicker2.default(_this.selector('.tie-color-stroke'), '#ffbb3b', _this.toggleDirection, _this.usageStatistics)\n };\n\n _this.colorPickerControls.push(_this._els.fillColorpicker);\n _this.colorPickerControls.push(_this._els.strokeColorpicker);\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Shape, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n this._els.strokeRange.destroy();\n this._els.fillColorpicker.destroy();\n this._els.strokeColorpicker.destroy();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for shape\n * @param {Object} actions - actions for shape\n * @param {Function} actions.changeShape - change shape mode\n * @param {Function} actions.setDrawingShape - set dreawing shape\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n this.eventHandler.shapeTypeSelected = this._changeShapeHandler.bind(this);\n this.actions = actions;\n\n this._els.shapeSelectButton.addEventListener('click', this.eventHandler.shapeTypeSelected);\n this._els.strokeRange.on('change', this._changeStrokeRangeHandler.bind(this));\n this._els.fillColorpicker.on('change', this._changeFillColorHandler.bind(this));\n this._els.strokeColorpicker.on('change', this._changeStrokeColorHandler.bind(this));\n this._els.fillColorpicker.on('changeShow', this.colorPickerChangeShow.bind(this));\n this._els.strokeColorpicker.on('changeShow', this.colorPickerChangeShow.bind(this));\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this._els.shapeSelectButton.removeEventListener('click', this.eventHandler.shapeTypeSelected);\n this._els.strokeRange.off();\n this._els.fillColorpicker.off();\n this._els.strokeColorpicker.off();\n }\n\n /**\n * Set Shape status\n * @param {Object} options - options of shape status\n * @param {string} strokeWidth - stroke width\n * @param {string} strokeColor - stroke color\n * @param {string} fillColor - fill color\n */\n\n }, {\n key: 'setShapeStatus',\n value: function setShapeStatus(_ref2) {\n var strokeWidth = _ref2.strokeWidth,\n strokeColor = _ref2.strokeColor,\n fillColor = _ref2.fillColor;\n\n this._els.strokeRange.value = strokeWidth;\n this._els.strokeColorpicker.color = strokeColor;\n this._els.fillColorpicker.color = fillColor;\n this.options.stroke = strokeColor;\n this.options.fill = fillColor;\n this.options.strokeWidth = strokeWidth;\n\n this.actions.setDrawingShape(this.type, { strokeWidth: strokeWidth });\n }\n\n /**\n * Executed when the menu starts.\n */\n\n }, {\n key: 'changeStartMode',\n value: function changeStartMode() {\n this.actions.stopDrawingMode();\n }\n\n /**\n * Returns the menu to its default state.\n */\n\n }, {\n key: 'changeStandbyMode',\n value: function changeStandbyMode() {\n this.type = null;\n this.actions.changeSelectableAll(true);\n this._els.shapeSelectButton.classList.remove('circle');\n this._els.shapeSelectButton.classList.remove('triangle');\n this._els.shapeSelectButton.classList.remove('rect');\n }\n\n /**\n * set range stroke max value\n * @param {number} maxValue - expect max value for change\n */\n\n }, {\n key: 'setMaxStrokeValue',\n value: function setMaxStrokeValue(maxValue) {\n var strokeMaxValue = maxValue;\n if (strokeMaxValue <= 0) {\n strokeMaxValue = _consts.defaultShapeStrokeValus.max;\n }\n this._els.strokeRange.max = strokeMaxValue;\n }\n\n /**\n * Set stroke value\n * @param {number} value - expect value for strokeRange change\n */\n\n }, {\n key: 'setStrokeValue',\n value: function setStrokeValue(value) {\n this._els.strokeRange.value = value;\n this._els.strokeRange.trigger('change');\n }\n\n /**\n * Get stroke value\n * @returns {number} - stroke range value\n */\n\n }, {\n key: 'getStrokeValue',\n value: function getStrokeValue() {\n return this._els.strokeRange.value;\n }\n\n /**\n * Change icon color\n * @param {object} event - add button event object\n * @private\n */\n\n }, {\n key: '_changeShapeHandler',\n value: function _changeShapeHandler(event) {\n var button = event.target.closest('.tui-image-editor-button');\n if (button) {\n this.actions.stopDrawingMode();\n this.actions.discardSelection();\n var shapeType = this.getButtonType(button, ['circle', 'triangle', 'rect']);\n\n if (this.type === shapeType) {\n this.changeStandbyMode();\n\n return;\n }\n this.changeStandbyMode();\n this.type = shapeType;\n event.currentTarget.classList.add(shapeType);\n this.actions.changeSelectableAll(false);\n this.actions.modeChange('shape');\n }\n }\n\n /**\n * Change stroke range\n * @param {number} value - stroke range value\n * @param {boolean} isLast - Is last change\n * @private\n */\n\n }, {\n key: '_changeStrokeRangeHandler',\n value: function _changeStrokeRangeHandler(value, isLast) {\n this.options.strokeWidth = (0, _util.toInteger)(value);\n this.actions.changeShape({\n strokeWidth: value\n }, !isLast);\n\n this.actions.setDrawingShape(this.type, this.options);\n }\n\n /**\n * Change shape color\n * @param {string} color - fill color\n * @private\n */\n\n }, {\n key: '_changeFillColorHandler',\n value: function _changeFillColorHandler(color) {\n color = color || 'transparent';\n this.options.fill = color;\n this.actions.changeShape({\n fill: color\n });\n }\n\n /**\n * Change shape stroke color\n * @param {string} color - fill color\n * @private\n */\n\n }, {\n key: '_changeStrokeColorHandler',\n value: function _changeStrokeColorHandler(color) {\n color = color || 'transparent';\n this.options.stroke = color;\n this.actions.changeShape({\n stroke: color\n });\n }\n }]);\n\n return Shape;\n}(_submenuBase2.default);\n\nexports.default = Shape;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/shape.js?");
/***/ }),
/***/ "./src/js/ui/submenuBase.js":
/*!**********************************!*\
!*** ./src/js/ui/submenuBase.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Submenu Base Class\n * @class\n * @ignore\n */\nvar Submenu = function () {\n /**\n * @param {HTMLElement} subMenuElement - submenu dom element\n * @param {Locale} locale - translate text\n * @param {string} name - name of sub menu\n * @param {Object} iconStyle - style of icon\n * @param {string} menuBarPosition - position of menu\n * @param {*} templateHtml - template for SubMenuElement\n * @param {boolean} [usageStatistics=false] - template for SubMenuElement\n */\n function Submenu(subMenuElement, _ref) {\n var locale = _ref.locale,\n name = _ref.name,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n templateHtml = _ref.templateHtml,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Submenu);\n\n this.subMenuElement = subMenuElement;\n this.menuBarPosition = menuBarPosition;\n this.toggleDirection = menuBarPosition === 'top' ? 'down' : 'up';\n this.colorPickerControls = [];\n this.usageStatistics = usageStatistics;\n this.eventHandler = {};\n this._makeSubMenuElement({\n locale: locale,\n name: name,\n makeSvgIcon: makeSvgIcon,\n templateHtml: templateHtml\n });\n }\n\n /**\n * editor dom ui query selector\n * @param {string} selectName - query selector string name\n * @returns {HTMLElement}\n */\n\n\n _createClass(Submenu, [{\n key: 'selector',\n value: function selector(selectName) {\n return this.subMenuElement.querySelector(selectName);\n }\n\n /**\n * change show state change for colorpicker instance\n * @param {Colorpicker} occurredControl - target Colorpicker Instance\n */\n\n }, {\n key: 'colorPickerChangeShow',\n value: function colorPickerChangeShow(occurredControl) {\n this.colorPickerControls.forEach(function (pickerControl) {\n if (occurredControl !== pickerControl) {\n pickerControl.hide();\n }\n });\n }\n\n /**\n * Get butten type\n * @param {HTMLElement} button - event target element\n * @param {array} buttonNames - Array of button names\n * @returns {string} - button type\n */\n\n }, {\n key: 'getButtonType',\n value: function getButtonType(button, buttonNames) {\n return button.className.match(RegExp('(' + buttonNames.join('|') + ')'))[0];\n }\n\n /**\n * Get butten type\n * @param {HTMLElement} target - event target element\n * @param {string} removeClass - remove class name\n * @param {string} addClass - add class name\n */\n\n }, {\n key: 'changeClass',\n value: function changeClass(target, removeClass, addClass) {\n target.classList.remove(removeClass);\n target.classList.add(addClass);\n }\n\n /**\n * Interface method whose implementation is optional.\n * Returns the menu to its default state.\n */\n\n }, {\n key: 'changeStandbyMode',\n value: function changeStandbyMode() {}\n\n /**\n * Interface method whose implementation is optional.\n * Executed when the menu starts.\n */\n\n }, {\n key: 'changeStartMode',\n value: function changeStartMode() {}\n\n /**\n * Make submenu dom element\n * @param {Locale} locale - translate text\n * @param {string} name - submenu name\n * @param {Object} iconStyle - icon style\n * @param {*} templateHtml - template for SubMenuElement\n * @private\n */\n\n }, {\n key: '_makeSubMenuElement',\n value: function _makeSubMenuElement(_ref2) {\n var locale = _ref2.locale,\n name = _ref2.name,\n iconStyle = _ref2.iconStyle,\n makeSvgIcon = _ref2.makeSvgIcon,\n templateHtml = _ref2.templateHtml;\n\n var iconSubMenu = document.createElement('div');\n iconSubMenu.className = 'tui-image-editor-menu-' + name;\n iconSubMenu.innerHTML = templateHtml({\n locale: locale,\n iconStyle: iconStyle,\n makeSvgIcon: makeSvgIcon\n });\n\n this.subMenuElement.appendChild(iconSubMenu);\n }\n }]);\n\n return Submenu;\n}();\n\nexports.default = Submenu;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/submenuBase.js?");
/***/ }),
/***/ "./src/js/ui/template/controls.js":
/*!****************************************!*\
!*** ./src/js/ui/template/controls.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (_ref) {\n var locale = _ref.locale,\n biImage = _ref.biImage,\n loadButtonStyle = _ref.loadButtonStyle,\n downloadButtonStyle = _ref.downloadButtonStyle;\n return '\\n <div class=\"tui-image-editor-controls\">\\n <div class=\"tui-image-editor-controls-logo\">\\n <img src=\"' + biImage + '\" />\\n </div>\\n <ul class=\"tui-image-editor-menu\"></ul>\\n\\n <div class=\"tui-image-editor-controls-buttons\">\\n <div style=\"' + loadButtonStyle + '\">\\n ' + locale.localize('Load') + '\\n <input type=\"file\" class=\"tui-image-editor-load-btn\" />\\n </div>\\n <button class=\"tui-image-editor-download-btn\" style=\"' + downloadButtonStyle + '\">\\n ' + locale.localize('Download') + '\\n </button>\\n </div>\\n </div>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/controls.js?");
/***/ }),
/***/ "./src/js/ui/template/mainContainer.js":
/*!*********************************************!*\
!*** ./src/js/ui/template/mainContainer.js ***!
\*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (_ref) {\n var locale = _ref.locale,\n biImage = _ref.biImage,\n commonStyle = _ref.commonStyle,\n headerStyle = _ref.headerStyle,\n loadButtonStyle = _ref.loadButtonStyle,\n downloadButtonStyle = _ref.downloadButtonStyle,\n submenuStyle = _ref.submenuStyle;\n return '\\n <div class=\"tui-image-editor-main-container\" style=\"' + commonStyle + '\">\\n <div class=\"tui-image-editor-header\" style=\"' + headerStyle + '\">\\n <div class=\"tui-image-editor-header-logo\">\\n <img src=\"' + biImage + '\" />\\n </div>\\n <div class=\"tui-image-editor-header-buttons\">\\n <div style=\"' + loadButtonStyle + '\">\\n ' + locale.localize('Load') + '\\n <input type=\"file\" class=\"tui-image-editor-load-btn\" />\\n </div>\\n <button class=\"tui-image-editor-download-btn\" style=\"' + downloadButtonStyle + '\">\\n ' + locale.localize('Download') + '\\n </button>\\n </div>\\n </div>\\n <div class=\"tui-image-editor-main\">\\n <div class=\"tui-image-editor-submenu\">\\n <div class=\"tui-image-editor-submenu-style\" style=\"' + submenuStyle + '\"></div>\\n </div>\\n <div class=\"tui-image-editor-wrap\">\\n <div class=\"tui-image-editor-size-wrap\">\\n <div class=\"tui-image-editor-align-wrap\">\\n <div class=\"tui-image-editor\"></div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/mainContainer.js?");
/***/ }),
/***/ "./src/js/ui/template/style.js":
/*!*************************************!*\
!*** ./src/js/ui/template/style.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (_ref) {\n var subMenuLabelActive = _ref.subMenuLabelActive,\n subMenuLabelNormal = _ref.subMenuLabelNormal,\n subMenuRangeTitle = _ref.subMenuRangeTitle,\n submenuPartitionVertical = _ref.submenuPartitionVertical,\n submenuPartitionHorizontal = _ref.submenuPartitionHorizontal,\n submenuCheckbox = _ref.submenuCheckbox,\n submenuRangePointer = _ref.submenuRangePointer,\n submenuRangeValue = _ref.submenuRangeValue,\n submenuColorpickerTitle = _ref.submenuColorpickerTitle,\n submenuColorpickerButton = _ref.submenuColorpickerButton,\n submenuRangeBar = _ref.submenuRangeBar,\n submenuRangeSubbar = _ref.submenuRangeSubbar,\n submenuDisabledRangePointer = _ref.submenuDisabledRangePointer,\n submenuDisabledRangeBar = _ref.submenuDisabledRangeBar,\n submenuDisabledRangeSubbar = _ref.submenuDisabledRangeSubbar,\n submenuIconSize = _ref.submenuIconSize,\n menuIconSize = _ref.menuIconSize,\n biSize = _ref.biSize,\n menuIconStyle = _ref.menuIconStyle,\n submenuIconStyle = _ref.submenuIconStyle;\n return \"\\n .tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=\\\"icon-bubble\\\"] label,\\n .tie-icon-add-button.icon-heart .tui-image-editor-button[data-icontype=\\\"icon-heart\\\"] label,\\n .tie-icon-add-button.icon-location .tui-image-editor-button[data-icontype=\\\"icon-location\\\"] label,\\n .tie-icon-add-button.icon-polygon .tui-image-editor-button[data-icontype=\\\"icon-polygon\\\"] label,\\n .tie-icon-add-button.icon-star .tui-image-editor-button[data-icontype=\\\"icon-star\\\"] label,\\n .tie-icon-add-button.icon-star-2 .tui-image-editor-button[data-icontype=\\\"icon-star-2\\\"] label,\\n .tie-icon-add-button.icon-arrow-3 .tui-image-editor-button[data-icontype=\\\"icon-arrow-3\\\"] label,\\n .tie-icon-add-button.icon-arrow-2 .tui-image-editor-button[data-icontype=\\\"icon-arrow-2\\\"] label,\\n .tie-icon-add-button.icon-arrow .tui-image-editor-button[data-icontype=\\\"icon-arrow\\\"] label,\\n .tie-icon-add-button.icon-bubble .tui-image-editor-button[data-icontype=\\\"icon-bubble\\\"] label,\\n .tie-draw-line-select-button.line .tui-image-editor-button.line label,\\n .tie-draw-line-select-button.free .tui-image-editor-button.free label,\\n .tie-flip-button.flipX .tui-image-editor-button.flipX label,\\n .tie-flip-button.flipY .tui-image-editor-button.flipY label,\\n .tie-flip-button.resetFlip .tui-image-editor-button.resetFlip label,\\n .tie-crop-button .tui-image-editor-button.apply.active label,\\n .tie-crop-preset-button .tui-image-editor-button.preset.active label,\\n .tie-shape-button.rect .tui-image-editor-button.rect label,\\n .tie-shape-button.circle .tui-image-editor-button.circle label,\\n .tie-shape-button.triangle .tui-image-editor-button.triangle label,\\n .tie-text-effect-button .tui-image-editor-button.active label,\\n .tie-text-align-button.left .tui-image-editor-button.left label,\\n .tie-text-align-button.center .tui-image-editor-button.center label,\\n .tie-text-align-button.right .tui-image-editor-button.right label,\\n .tie-mask-apply.apply.active .tui-image-editor-button.apply label,\\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button:hover > label,\\n .tui-image-editor-container .tui-image-editor-checkbox label > span {\\n \" + subMenuLabelActive + \"\\n }\\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button > label,\\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label,\\n .tui-image-editor-container .tui-image-editor-range-wrap.tui-image-editor-newline.short label > span {\\n \" + subMenuLabelNormal + \"\\n }\\n .tui-image-editor-container .tui-image-editor-range-wrap label > span {\\n \" + subMenuRangeTitle + \"\\n }\\n .tui-image-editor-container .tui-image-editor-partition > div {\\n \" + submenuPartitionVertical + \"\\n }\\n .tui-image-editor-container.left .tui-image-editor-submenu .tui-image-editor-partition > div,\\n .tui-image-editor-container.right .tui-image-editor-submenu .tui-image-editor-partition > div {\\n \" + submenuPartitionHorizontal + \"\\n }\\n .tui-image-editor-container .tui-image-editor-checkbox label > span:before {\\n \" + submenuCheckbox + \"\\n }\\n .tui-image-editor-container .tui-image-editor-checkbox label > input:checked + span:before {\\n border: 0;\\n }\\n .tui-image-editor-container .tui-image-editor-virtual-range-pointer {\\n \" + submenuRangePointer + \"\\n }\\n .tui-image-editor-container .tui-image-editor-virtual-range-bar {\\n \" + submenuRangeBar + \"\\n }\\n .tui-image-editor-container .tui-image-editor-virtual-range-subbar {\\n \" + submenuRangeSubbar + \"\\n }\\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-pointer {\\n \" + submenuDisabledRangePointer + \"\\n }\\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-subbar {\\n \" + submenuDisabledRangeSubbar + \"\\n }\\n .tui-image-editor-container .tui-image-editor-disabled .tui-image-editor-virtual-range-bar {\\n \" + submenuDisabledRangeBar + \"\\n }\\n .tui-image-editor-container .tui-image-editor-range-value {\\n \" + submenuRangeValue + \"\\n }\\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value + label {\\n \" + submenuColorpickerTitle + \"\\n }\\n .tui-image-editor-container .tui-image-editor-submenu .tui-image-editor-button .color-picker-value {\\n \" + submenuColorpickerButton + \"\\n }\\n .tui-image-editor-container .svg_ic-menu {\\n \" + menuIconSize + \"\\n }\\n .tui-image-editor-container .svg_ic-submenu {\\n \" + submenuIconSize + \"\\n }\\n .tui-image-editor-container .tui-image-editor-controls-logo > img,\\n .tui-image-editor-container .tui-image-editor-header-logo > img {\\n \" + biSize + \"\\n }\\n .tui-image-editor-menu use.normal.use-default {\\n fill-rule: evenodd;\\n fill: \" + menuIconStyle.normal.color + \";\\n stroke: \" + menuIconStyle.normal.color + \";\\n }\\n .tui-image-editor-menu use.active.use-default {\\n fill-rule: evenodd;\\n fill: \" + menuIconStyle.active.color + \";\\n stroke: \" + menuIconStyle.active.color + \";\\n }\\n .tui-image-editor-menu use.hover.use-default {\\n fill-rule: evenodd;\\n fill: \" + menuIconStyle.hover.color + \";\\n stroke: \" + menuIconStyle.hover.color + \";\\n }\\n .tui-image-editor-menu use.disabled.use-default {\\n fill-rule: evenodd;\\n fill: \" + menuIconStyle.disabled.color + \";\\n stroke: \" + menuIconStyle.disabled.color + \";\\n }\\n .tui-image-editor-submenu use.normal.use-default {\\n fill-rule: evenodd;\\n fill: \" + submenuIconStyle.normal.color + \";\\n stroke: \" + submenuIconStyle.normal.color + \";\\n }\\n .tui-image-editor-submenu use.active.use-default {\\n fill-rule: evenodd;\\n fill: \" + submenuIconStyle.active.color + \";\\n stroke: \" + submenuIconStyle.active.color + \";\\n }\\n\";\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/style.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/crop.js":
/*!********************************************!*\
!*** ./src/js/ui/template/submenu/crop.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tie-crop-preset-button\">\\n <div class=\"tui-image-editor-button preset preset-none active\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'shape-rectangle', true) + '\\n </div>\\n <label> ' + locale.localize('Custom') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button preset preset-square\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'crop', true) + '\\n </div>\\n <label> ' + locale.localize('Square') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button preset preset-3-2\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'crop', true) + '\\n </div>\\n <label> ' + locale.localize('3:2') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button preset preset-4-3\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'crop', true) + '\\n </div>\\n <label> ' + locale.localize('4:3') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button preset preset-5-4\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'crop', true) + '\\n </div>\\n <label> ' + locale.localize('5:4') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button preset preset-7-5\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'crop', true) + '\\n </div>\\n <label> ' + locale.localize('7:5') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button preset preset-16-9\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'crop', true) + '\\n </div>\\n <label> ' + locale.localize('16:9') + ' </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition tui-image-editor-newline\">\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tie-crop-button action\">\\n <div class=\"tui-image-editor-button apply\">\\n ' + makeSvgIcon(['normal', 'active'], 'apply') + '\\n <label>\\n ' + locale.localize('Apply') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button cancel\">\\n ' + makeSvgIcon(['normal', 'active'], 'cancel') + '\\n <label>\\n ' + locale.localize('Cancel') + '\\n </label>\\n </div>\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/crop.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/draw.js":
/*!********************************************!*\
!*** ./src/js/ui/template/submenu/draw.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tie-draw-line-select-button\">\\n <div class=\"tui-image-editor-button free\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'draw-free', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Free') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button line\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'draw-line', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Straight') + '\\n </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li>\\n <div class=\"tie-draw-color\" title=\"' + locale.localize('Color') + '\"></div>\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tui-image-editor-newline tui-image-editor-range-wrap\">\\n <label class=\"range\">' + locale.localize('Range') + '</label>\\n <div class=\"tie-draw-range\"></div>\\n <input class=\"tie-draw-range-value tui-image-editor-range-value\" value=\"0\" />\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/draw.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/filter.js":
/*!**********************************************!*\
!*** ./src/js/ui/template/submenu/filter.js ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Locale} locale - Translate text\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tui-image-editor-submenu-align\">\\n <div class=\"tui-image-editor-checkbox-wrap fixed-width\">\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-grayscale\">\\n <span>' + locale.localize('Grayscale') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-invert\">\\n <span>' + locale.localize('Invert') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-sepia\">\\n <span>' + locale.localize('Sepia') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-vintage\">\\n <span>' + locale.localize('Sepia2') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-blur\">\\n <span>' + locale.localize('Blur') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-sharpen\">\\n <span>' + locale.localize('Sharpen') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-emboss\">\\n <span>' + locale.localize('Emboss') + '</span>\\n </label>\\n </div>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li class=\"tui-image-editor-submenu-align\">\\n <div class=\"tui-image-editor-checkbox-group tui-image-editor-disabled\" style=\"margin-bottom: 7px;\">\\n <div class=\"tui-image-editor-checkbox-wrap\">\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-remove-white\">\\n <span>' + locale.localize('Remove White') + '</span>\\n </label>\\n </div>\\n </div>\\n <div class=\"tui-image-editor-newline tui-image-editor-range-wrap short\">\\n <label>' + locale.localize('Distance') + '</label>\\n <div class=\"tie-removewhite-distance-range\"></div>\\n </div>\\n </div>\\n <div class=\"tui-image-editor-checkbox-group tui-image-editor-disabled\">\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-brightness\">\\n <span>' + locale.localize('Brightness') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-range-wrap short\">\\n <div class=\"tie-brightness-range\"></div>\\n </div>\\n </div>\\n <div class=\"tui-image-editor-checkbox-group tui-image-editor-disabled\">\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-noise\">\\n <span>' + locale.localize('Noise') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-range-wrap short\">\\n <div class=\"tie-noise-range\"></div>\\n </div>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tui-image-editor-submenu-align\">\\n <div class=\"tui-image-editor-checkbox-group tui-image-editor-disabled\">\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-pixelate\">\\n <span>' + locale.localize('Pixelate') + '</span>\\n </label>\\n </div>\\n <div class=\"tui-image-editor-range-wrap short\">\\n <div class=\"tie-pixelate-range\"></div>\\n </div>\\n </div>\\n <div class=\"tui-image-editor-checkbox-group tui-image-editor-disabled\">\\n <div class=\"tui-image-editor-newline tui-image-editor-checkbox-wrap\">\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-color-filter\">\\n <span>' + locale.localize('Color Filter') + '</span>\\n </label>\\n </div>\\n </div>\\n <div class=\"tui-image-editor-newline tui-image-editor-range-wrap short\">\\n <label>' + locale.localize('Threshold') + '</label>\\n <div class=\"tie-colorfilter-threshole-range\"></div>\\n </div>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li>\\n <div class=\"filter-color-item\">\\n <div class=\"tie-filter-tint-color\" title=\"' + locale.localize('Tint') + '\"></div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-tint\">\\n <span></span>\\n </label>\\n </div>\\n </div>\\n <div class=\"filter-color-item\">\\n <div class=\"tie-filter-multiply-color\" title=\"' + locale.localize('Multiply') + '\"></div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-multiply\">\\n <span></span>\\n </label>\\n </div>\\n </div>\\n <div class=\"filter-color-item\">\\n <div class=\"tie-filter-blend-color\" title=\"' + locale.localize('Blend') + '\"></div>\\n <div class=\"tui-image-editor-checkbox\">\\n <label>\\n <input type=\"checkbox\" class=\"tie-blend\">\\n <span></span>\\n </label>\\n </div>\\n </div>\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/filter.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/flip.js":
/*!********************************************!*\
!*** ./src/js/ui/template/submenu/flip.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tie-flip-button tui-image-editor-submenu-item\">\\n <li>\\n <div class=\"tui-image-editor-button flipX\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'flip-x', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Flip X') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button flipY\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'flip-y', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Flip Y') + '\\n </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li>\\n <div class=\"tui-image-editor-button resetFlip\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'flip-reset', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Reset') + '\\n </label>\\n </div>\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/flip.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/icon.js":
/*!********************************************!*\
!*** ./src/js/ui/template/submenu/icon.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tie-icon-add-button\">\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-arrow\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-arrow', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Arrow') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-arrow-2\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-arrow-2', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Arrow-2') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-arrow-3\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-arrow-3', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Arrow-3') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-star\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-star', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Star-1') + '\\n </label>\\n </div>\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-star-2\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-star-2', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Star-2') + '\\n </label>\\n </div>\\n\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-polygon\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-polygon', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Polygon') + '\\n </label>\\n </div>\\n\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-location\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-location', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Location') + '\\n </label>\\n </div>\\n\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-heart\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-heart', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Heart') + '\\n </label>\\n </div>\\n\\n <div class=\"tui-image-editor-button\" data-icontype=\"icon-bubble\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'icon-bubble', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Bubble') + '\\n </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li class=\"tie-icon-add-button\">\\n <div class=\"tui-image-editor-button\" style=\"margin:0\">\\n <div>\\n <input type=\"file\" accept=\"image/*\" class=\"tie-icon-image-file\">\\n ' + makeSvgIcon(['normal', 'active'], 'icon-load', true) + '\\n </div>\\n <label>\\n ' + locale.localize('Custom icon') + '\\n </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li>\\n <div class=\"tie-icon-color\" title=\"' + locale.localize('Color') + '\"></div>\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/icon.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/mask.js":
/*!********************************************!*\
!*** ./src/js/ui/template/submenu/mask.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li>\\n <div class=\"tui-image-editor-button\">\\n <div>\\n <input type=\"file\" accept=\"image/*\" class=\"tie-mask-image-file\">\\n ' + makeSvgIcon(['normal', 'active'], 'mask-load', true) + '\\n </div>\\n <label> ' + locale.localize('Load Mask Image') + ' </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tie-mask-apply tui-image-editor-newline apply\" style=\"margin-top: 22px;margin-bottom: 5px\">\\n <div class=\"tui-image-editor-button apply\">\\n ' + makeSvgIcon(['normal', 'active'], 'apply') + '\\n <label>\\n ' + locale.localize('Apply') + '\\n </label>\\n </div>\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/mask.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/rotate.js":
/*!**********************************************!*\
!*** ./src/js/ui/template/submenu/rotate.js ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tie-retate-button\">\\n <div class=\"tui-image-editor-button clockwise\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'rotate-clockwise', true) + '\\n </div>\\n <label> 30 </label>\\n </div>\\n <div class=\"tui-image-editor-button counterclockwise\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'rotate-counterclockwise', true) + '\\n </div>\\n <label> -30 </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tui-image-editor-newline tui-image-editor-range-wrap\">\\n <label class=\"range\">' + locale.localize('Range') + '</label>\\n <div class=\"tie-rotate-range\"></div>\\n <input class=\"tie-ratate-range-value tui-image-editor-range-value\" value=\"0\" />\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/rotate.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/shape.js":
/*!*********************************************!*\
!*** ./src/js/ui/template/submenu/shape.js ***!
\*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tie-shape-button\">\\n <div class=\"tui-image-editor-button rect\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'shape-rectangle', true) + '\\n </div>\\n <label> ' + locale.localize('Rectangle') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button circle\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'shape-circle', true) + '\\n </div>\\n <label> ' + locale.localize('Circle') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button triangle\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'shape-triangle', true) + '\\n </div>\\n <label> ' + locale.localize('Triangle') + ' </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li class=\"tie-shape-color-button\">\\n <div class=\"tie-color-fill\" title=\"' + locale.localize('Fill') + '\"></div>\\n <div class=\"tie-color-stroke\" title=\"' + locale.localize('Stroke') + '\"></div>\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tui-image-editor-newline tui-image-editor-range-wrap\">\\n <label class=\"range\">' + locale.localize('Stroke') + '</label>\\n <div class=\"tie-stroke-range\"></div>\\n <input class=\"tie-stroke-range-value tui-image-editor-range-value\" value=\"0\" />\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/shape.js?");
/***/ }),
/***/ "./src/js/ui/template/submenu/text.js":
/*!********************************************!*\
!*** ./src/js/ui/template/submenu/text.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @param {Object} submenuInfo - submenu info for make template\n * @param {Locale} locale - Translate text\n * @param {Function} makeSvgIcon - svg icon generator\n * @returns {string}\n */\nexports.default = function (_ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon;\n return '\\n <ul class=\"tui-image-editor-submenu-item\">\\n <li class=\"tie-text-effect-button\">\\n <div class=\"tui-image-editor-button bold\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'text-bold', true) + '\\n </div>\\n <label> ' + locale.localize('Bold') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button italic\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'text-italic', true) + '\\n </div>\\n <label> ' + locale.localize('Italic') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button underline\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'text-underline', true) + '\\n </div>\\n <label> ' + locale.localize('Underline') + ' </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li class=\"tie-text-align-button\">\\n <div class=\"tui-image-editor-button left\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'text-align-left', true) + '\\n </div>\\n <label> ' + locale.localize('Left') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button center\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'text-align-center', true) + '\\n </div>\\n <label> ' + locale.localize('Center') + ' </label>\\n </div>\\n <div class=\"tui-image-editor-button right\">\\n <div>\\n ' + makeSvgIcon(['normal', 'active'], 'text-align-right', true) + '\\n </div>\\n <label> ' + locale.localize('Right') + ' </label>\\n </div>\\n </li>\\n <li class=\"tui-image-editor-partition\">\\n <div></div>\\n </li>\\n <li>\\n <div class=\"tie-text-color\" title=\"' + locale.localize('Color') + '\"></div>\\n </li>\\n <li class=\"tui-image-editor-partition only-left-right\">\\n <div></div>\\n </li>\\n <li class=\"tui-image-editor-newline tui-image-editor-range-wrap\">\\n <label class=\"range\">' + locale.localize('Text size') + '</label>\\n <div class=\"tie-text-range\"></div>\\n <input class=\"tie-text-range-value tui-image-editor-range-value\" value=\"0\" />\\n </li>\\n </ul>\\n';\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/template/submenu/text.js?");
/***/ }),
/***/ "./src/js/ui/text.js":
/*!***************************!*\
!*** ./src/js/ui/text.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _util = __webpack_require__(/*! ../util */ \"./src/js/util.js\");\n\nvar _range = __webpack_require__(/*! ./tools/range */ \"./src/js/ui/tools/range.js\");\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _colorpicker = __webpack_require__(/*! ./tools/colorpicker */ \"./src/js/ui/tools/colorpicker.js\");\n\nvar _colorpicker2 = _interopRequireDefault(_colorpicker);\n\nvar _submenuBase = __webpack_require__(/*! ./submenuBase */ \"./src/js/ui/submenuBase.js\");\n\nvar _submenuBase2 = _interopRequireDefault(_submenuBase);\n\nvar _text = __webpack_require__(/*! ./template/submenu/text */ \"./src/js/ui/template/submenu/text.js\");\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _consts = __webpack_require__(/*! ../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/**\n * Crop ui class\n * @class\n * @ignore\n */\nvar Text = function (_Submenu) {\n _inherits(Text, _Submenu);\n\n function Text(subMenuElement, _ref) {\n var locale = _ref.locale,\n makeSvgIcon = _ref.makeSvgIcon,\n menuBarPosition = _ref.menuBarPosition,\n usageStatistics = _ref.usageStatistics;\n\n _classCallCheck(this, Text);\n\n var _this = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, subMenuElement, {\n locale: locale,\n name: 'text',\n makeSvgIcon: makeSvgIcon,\n menuBarPosition: menuBarPosition,\n templateHtml: _text2.default,\n usageStatistics: usageStatistics\n }));\n\n _this.effect = {\n bold: false,\n italic: false,\n underline: false\n };\n _this.align = 'left';\n _this._els = {\n textEffectButton: _this.selector('.tie-text-effect-button'),\n textAlignButton: _this.selector('.tie-text-align-button'),\n textColorpicker: new _colorpicker2.default(_this.selector('.tie-text-color'), '#ffbb3b', _this.toggleDirection, _this.usageStatistics),\n textRange: new _range2.default({\n slider: _this.selector('.tie-text-range'),\n input: _this.selector('.tie-text-range-value')\n }, _consts.defaultTextRangeValus)\n };\n return _this;\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Text, [{\n key: 'destroy',\n value: function destroy() {\n this._removeEvent();\n this._els.textColorpicker.destroy();\n this._els.textRange.destroy();\n\n (0, _util.assignmentForDestroy)(this);\n }\n\n /**\n * Add event for text\n * @param {Object} actions - actions for text\n * @param {Function} actions.changeTextStyle - change text style\n */\n\n }, {\n key: 'addEvent',\n value: function addEvent(actions) {\n var setTextEffect = this._setTextEffectHandler.bind(this);\n var setTextAlign = this._setTextAlignHandler.bind(this);\n\n this.eventHandler = {\n setTextEffect: setTextEffect,\n setTextAlign: setTextAlign\n };\n\n this.actions = actions;\n this._els.textEffectButton.addEventListener('click', setTextEffect);\n this._els.textAlignButton.addEventListener('click', setTextAlign);\n this._els.textRange.on('change', this._changeTextRnageHandler.bind(this));\n this._els.textColorpicker.on('change', this._changeColorHandler.bind(this));\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n var _eventHandler = this.eventHandler,\n setTextEffect = _eventHandler.setTextEffect,\n setTextAlign = _eventHandler.setTextAlign;\n\n\n this._els.textEffectButton.removeEventListener('click', setTextEffect);\n this._els.textAlignButton.removeEventListener('click', setTextAlign);\n this._els.textRange.off();\n this._els.textColorpicker.off();\n }\n\n /**\n * Returns the menu to its default state.\n */\n\n }, {\n key: 'changeStandbyMode',\n value: function changeStandbyMode() {\n this.actions.stopDrawingMode();\n }\n\n /**\n * Executed when the menu starts.\n */\n\n }, {\n key: 'changeStartMode',\n value: function changeStartMode() {\n this.actions.modeChange('text');\n }\n }, {\n key: 'setTextStyleStateOnAction',\n value: function setTextStyleStateOnAction() {\n var textStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var fill = textStyle.fill,\n fontSize = textStyle.fontSize,\n fontStyle = textStyle.fontStyle,\n fontWeight = textStyle.fontWeight,\n textDecoration = textStyle.textDecoration,\n textAlign = textStyle.textAlign;\n\n\n this.textColor = fill;\n this.fontSize = fontSize;\n this.setEffactState('italic', fontStyle);\n this.setEffactState('bold', fontWeight);\n this.setEffactState('underline', textDecoration);\n this.setAlignState(textAlign);\n }\n }, {\n key: 'setEffactState',\n value: function setEffactState(effactName, value) {\n var effactValue = value === 'italic' || value === 'bold' || value === 'underline';\n var button = this._els.textEffectButton.querySelector('.tui-image-editor-button.' + effactName);\n\n this.effect[effactName] = effactValue;\n\n button.classList[effactValue ? 'add' : 'remove']('active');\n }\n }, {\n key: 'setAlignState',\n value: function setAlignState(value) {\n var button = this._els.textAlignButton;\n button.classList.remove(this.align);\n button.classList.add(value);\n this.align = value;\n }\n\n /**\n * text effect set handler\n * @param {object} event - add button event object\n * @private\n */\n\n }, {\n key: '_setTextEffectHandler',\n value: function _setTextEffectHandler(event) {\n var button = event.target.closest('.tui-image-editor-button');\n\n var _button$className$mat = button.className.match(/(bold|italic|underline)/),\n styleType = _button$className$mat[0];\n\n var styleObj = {\n bold: { fontWeight: 'bold' },\n italic: { fontStyle: 'italic' },\n underline: { textDecoration: 'underline' }\n }[styleType];\n\n this.effect[styleType] = !this.effect[styleType];\n button.classList.toggle('active');\n this.actions.changeTextStyle(styleObj);\n }\n\n /**\n * text effect set handler\n * @param {object} event - add button event object\n * @private\n */\n\n }, {\n key: '_setTextAlignHandler',\n value: function _setTextAlignHandler(event) {\n var button = event.target.closest('.tui-image-editor-button');\n if (button) {\n var styleType = this.getButtonType(button, ['left', 'center', 'right']);\n\n event.currentTarget.classList.remove(this.align);\n if (this.align !== styleType) {\n event.currentTarget.classList.add(styleType);\n }\n this.actions.changeTextStyle({ textAlign: styleType });\n\n this.align = styleType;\n }\n }\n\n /**\n * text align set handler\n * @param {number} value - range value\n * @param {boolean} isLast - Is last change\n * @private\n */\n\n }, {\n key: '_changeTextRnageHandler',\n value: function _changeTextRnageHandler(value, isLast) {\n this.actions.changeTextStyle({\n fontSize: value\n }, !isLast);\n }\n\n /**\n * change color handler\n * @param {string} color - change color string\n * @private\n */\n\n }, {\n key: '_changeColorHandler',\n value: function _changeColorHandler(color) {\n color = color || 'transparent';\n this.actions.changeTextStyle({\n fill: color\n });\n }\n }, {\n key: 'textColor',\n set: function set(color) {\n this._els.textColorpicker.color = color;\n }\n\n /**\n * Get text color\n * @returns {string} - text color\n */\n ,\n get: function get() {\n return this._els.textColorpicker.color;\n }\n\n /**\n * Get text size\n * @returns {string} - text size\n */\n\n }, {\n key: 'fontSize',\n get: function get() {\n return this._els.textRange.value;\n }\n\n /**\n * Set text size\n * @param {Number} value - text size\n */\n ,\n set: function set(value) {\n this._els.textRange.value = value;\n }\n\n /**\n * get font style\n * @returns {string} - font style\n */\n\n }, {\n key: 'fontStyle',\n get: function get() {\n return this.effect.italic ? 'italic' : 'normal';\n }\n\n /**\n * get font weight\n * @returns {string} - font weight\n */\n\n }, {\n key: 'fontWeight',\n get: function get() {\n return this.effect.bold ? 'bold' : 'normal';\n }\n\n /**\n * get text underline text underline\n * @returns {boolean} - true or false\n */\n\n }, {\n key: 'underline',\n get: function get() {\n return this.effect.underline;\n }\n }]);\n\n return Text;\n}(_submenuBase2.default);\n\nexports.default = Text;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/text.js?");
/***/ }),
/***/ "./src/js/ui/theme/standard.js":
/*!*************************************!*\
!*** ./src/js/ui/theme/standard.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * @fileoverview The standard theme\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n */\n\n/**\n * Full configuration for theme.<br>\n * @typedef {object} themeConfig\n * @property {string} common.bi.image - Brand icon image\n * @property {string} common.bisize.width - Icon image width\n * @property {string} common.bisize.height - Icon Image Height\n * @property {string} common.backgroundImage - Background image\n * @property {string} common.backgroundColor - Background color\n * @property {string} common.border - Full area border style\n * @property {string} header.backgroundImage - header area background\n * @property {string} header.backgroundColor - header area background color\n * @property {string} header.border - header area border style\n * @property {string} loadButton.backgroundColor - load button background color\n * @property {string} loadButton.border - load button border style\n * @property {string} loadButton.color - load button foreground color\n * @property {string} loadButton.fontFamily - load button font type\n * @property {string} loadButton.fontSize - load button font size\n * @property {string} downloadButton.backgroundColor - download button background color\n * @property {string} downloadButton.border - download button border style\n * @property {string} downloadButton.color - download button foreground color\n * @property {string} downloadButton.fontFamily - download button font type\n * @property {string} downloadButton.fontSize - download button font size\n * @property {string} menu.normalIcon.color - Menu normal color for default icon\n * @property {string} menu.normalIcon.path - Menu normal icon svg bundle file path\n * @property {string} menu.normalIcon.name - Menu normal icon svg bundle name\n * @property {string} menu.activeIcon.color - Menu active color for default icon\n * @property {string} menu.activeIcon.path - Menu active icon svg bundle file path\n * @property {string} menu.activeIcon.name - Menu active icon svg bundle name\n * @property {string} menu.disabled.color - Menu disabled color for default icon\n * @property {string} menu.disabled.path - Menu disabled icon svg bundle file path\n * @property {string} menu.disabled.name - Menu disabled icon svg bundle name\n * @property {string} menu.hover.color - Menu default icon hover color\n * @property {string} menu.hover.path - Menu hover icon svg bundle file path\n * @property {string} menu.hover.name - Menu hover icon svg bundle name\n * @property {string} menu.iconSize.width - Menu icon Size Width\n * @property {string} menu.iconSize.height - Menu Icon Size Height\n * @property {string} submenu.backgroundColor - Sub-menu area background color\n * @property {string} submenu.partition.color - Submenu partition line color\n * @property {string} submenu.normalIcon.color - Submenu normal color for default icon\n * @property {string} submenu.normalIcon.path - Submenu default icon svg bundle file path\n * @property {string} submenu.normalIcon.name - Submenu default icon svg bundle name\n * @property {string} submenu.activeIcon.color - Submenu active color for default icon\n * @property {string} submenu.activeIcon.path - Submenu active icon svg bundle file path\n * @property {string} submenu.activeIcon.name - Submenu active icon svg bundle name\n * @property {string} submenu.iconSize.width - Submenu icon Size Width\n * @property {string} submenu.iconSize.height - Submenu Icon Size Height\n * @property {string} submenu.normalLabel.color - Submenu default label color\n * @property {string} submenu.normalLabel.fontWeight - Sub Menu Default Label Font Thickness\n * @property {string} submenu.activeLabel.color - Submenu active label color\n * @property {string} submenu.activeLabel.fontWeight - Submenu active label Font thickness\n * @property {string} checkbox.border - Checkbox border style\n * @property {string} checkbox.backgroundColor - Checkbox background color\n * @property {string} range.pointer.color - range control pointer color\n * @property {string} range.bar.color - range control bar color\n * @property {string} range.subbar.color - range control subbar color\n * @property {string} range.value.color - range number box font color\n * @property {string} range.value.fontWeight - range number box font thickness\n * @property {string} range.value.fontSize - range number box font size\n * @property {string} range.value.border - range number box border style\n * @property {string} range.value.backgroundColor - range number box background color\n * @property {string} range.title.color - range title font color\n * @property {string} range.title.fontWeight - range title font weight\n * @property {string} colorpicker.button.border - colorpicker button border style\n * @property {string} colorpicker.title.color - colorpicker button title font color\n * @example\n // default keys and styles\n var customTheme = {\n 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png',\n 'common.bisize.width': '251px',\n 'common.bisize.height': '21px',\n 'common.backgroundImage': 'none',\n 'common.backgroundColor': '#1e1e1e',\n 'common.border': '0px',\n\n // header\n 'header.backgroundImage': 'none',\n 'header.backgroundColor': 'transparent',\n 'header.border': '0px',\n\n // load button\n 'loadButton.backgroundColor': '#fff',\n 'loadButton.border': '1px solid #ddd',\n 'loadButton.color': '#222',\n 'loadButton.fontFamily': 'NotoSans, sans-serif',\n 'loadButton.fontSize': '12px',\n\n // download button\n 'downloadButton.backgroundColor': '#fdba3b',\n 'downloadButton.border': '1px solid #fdba3b',\n 'downloadButton.color': '#fff',\n 'downloadButton.fontFamily': 'NotoSans, sans-serif',\n 'downloadButton.fontSize': '12px',\n\n // icons default\n 'menu.normalIcon.color': '#8a8a8a',\n 'menu.activeIcon.color': '#555555',\n 'menu.disabledIcon.color': '#434343',\n 'menu.hoverIcon.color': '#e9e9e9',\n 'submenu.normalIcon.color': '#8a8a8a',\n 'submenu.activeIcon.color': '#e9e9e9',\n\n 'menu.iconSize.width': '24px',\n 'menu.iconSize.height': '24px',\n 'submenu.iconSize.width': '32px',\n 'submenu.iconSize.height': '32px',\n\n // submenu primary color\n 'submenu.backgroundColor': '#1e1e1e',\n 'submenu.partition.color': '#858585',\n\n // submenu labels\n 'submenu.normalLabel.color': '#858585',\n 'submenu.normalLabel.fontWeight': 'lighter',\n 'submenu.activeLabel.color': '#fff',\n 'submenu.activeLabel.fontWeight': 'lighter',\n\n // checkbox style\n 'checkbox.border': '1px solid #ccc',\n 'checkbox.backgroundColor': '#fff',\n\n // rango style\n 'range.pointer.color': '#fff',\n 'range.bar.color': '#666',\n 'range.subbar.color': '#d1d1d1',\n\n 'range.disabledPointer.color': '#414141',\n 'range.disabledBar.color': '#282828',\n 'range.disabledSubbar.color': '#414141',\n\n 'range.value.color': '#fff',\n 'range.value.fontWeight': 'lighter',\n 'range.value.fontSize': '11px',\n 'range.value.border': '1px solid #353535',\n 'range.value.backgroundColor': '#151515',\n 'range.title.color': '#fff',\n 'range.title.fontWeight': 'lighter',\n\n // colorpicker style\n 'colorpicker.button.border': '1px solid #1e1e1e',\n 'colorpicker.title.color': '#fff'\n};\n */\nexports.default = {\n 'common.bi.image': 'https://uicdn.toast.com/toastui/img/tui-image-editor-bi.png',\n 'common.bisize.width': '251px',\n 'common.bisize.height': '21px',\n 'common.backgroundImage': 'none',\n 'common.backgroundColor': '#1e1e1e',\n 'common.border': '0px',\n\n // header\n 'header.backgroundImage': 'none',\n 'header.backgroundColor': 'transparent',\n 'header.border': '0px',\n\n // load button\n 'loadButton.backgroundColor': '#fff',\n 'loadButton.border': '1px solid #ddd',\n 'loadButton.color': '#222',\n 'loadButton.fontFamily': \"'Noto Sans', sans-serif\",\n 'loadButton.fontSize': '12px',\n\n // download button\n 'downloadButton.backgroundColor': '#fdba3b',\n 'downloadButton.border': '1px solid #fdba3b',\n 'downloadButton.color': '#fff',\n 'downloadButton.fontFamily': \"'Noto Sans', sans-serif\",\n 'downloadButton.fontSize': '12px',\n\n // main icons\n 'menu.normalIcon.color': '#8a8a8a',\n 'menu.activeIcon.color': '#555555',\n 'menu.disabledIcon.color': '#434343',\n 'menu.hoverIcon.color': '#e9e9e9',\n\n // submenu icons\n 'submenu.normalIcon.color': '#8a8a8a',\n 'submenu.activeIcon.color': '#e9e9e9',\n\n 'menu.iconSize.width': '24px',\n 'menu.iconSize.height': '24px',\n\n 'submenu.iconSize.width': '32px',\n 'submenu.iconSize.height': '32px',\n\n // submenu primary color\n 'submenu.backgroundColor': '#1e1e1e',\n 'submenu.partition.color': '#3c3c3c',\n\n // submenu labels\n 'submenu.normalLabel.color': '#8a8a8a',\n 'submenu.normalLabel.fontWeight': 'lighter',\n 'submenu.activeLabel.color': '#fff',\n 'submenu.activeLabel.fontWeight': 'lighter',\n\n // checkbox style\n 'checkbox.border': '0px',\n 'checkbox.backgroundColor': '#fff',\n\n // range style\n 'range.pointer.color': '#fff',\n 'range.bar.color': '#666',\n 'range.subbar.color': '#d1d1d1',\n\n 'range.disabledPointer.color': '#414141',\n 'range.disabledBar.color': '#282828',\n 'range.disabledSubbar.color': '#414141',\n\n 'range.value.color': '#fff',\n 'range.value.fontWeight': 'lighter',\n 'range.value.fontSize': '11px',\n 'range.value.border': '1px solid #353535',\n 'range.value.backgroundColor': '#151515',\n 'range.title.color': '#fff',\n 'range.title.fontWeight': 'lighter',\n\n // colorpicker style\n 'colorpicker.button.border': '1px solid #1e1e1e',\n 'colorpicker.title.color': '#fff'\n};\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/theme/standard.js?");
/***/ }),
/***/ "./src/js/ui/theme/theme.js":
/*!**********************************!*\
!*** ./src/js/ui/theme/theme.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _util = __webpack_require__(/*! ../../util */ \"./src/js/util.js\");\n\nvar _style = __webpack_require__(/*! ../template/style */ \"./src/js/ui/template/style.js\");\n\nvar _style2 = _interopRequireDefault(_style);\n\nvar _standard = __webpack_require__(/*! ./standard */ \"./src/js/ui/theme/standard.js\");\n\nvar _standard2 = _interopRequireDefault(_standard);\n\nvar _default = __webpack_require__(/*! ../../../svg/default.svg */ \"./src/svg/default.svg\");\n\nvar _default2 = _interopRequireDefault(_default);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Theme manager\n * @class\n * @param {Object} customTheme - custom theme\n * @ignore\n */\nvar Theme = function () {\n function Theme(customTheme) {\n _classCallCheck(this, Theme);\n\n this.styles = this._changeToObject((0, _tuiCodeSnippet.extend)({}, _standard2.default, customTheme));\n (0, _util.styleLoad)(this._styleMaker());\n\n this._loadDefaultSvgIcon();\n }\n\n /**\n * Get a Style cssText or StyleObject\n * @param {string} type - style type\n * @returns {string|object} - cssText or StyleObject\n */\n // eslint-disable-next-line complexity\n\n\n _createClass(Theme, [{\n key: 'getStyle',\n value: function getStyle(type) {\n var result = null;\n var firstProperty = type.replace(/\\..+$/, '');\n var option = this.styles[type];\n switch (type) {\n case 'common.bi':\n result = this.styles[type].image;\n break;\n case 'menu.icon':\n result = {\n active: this.styles[firstProperty + '.activeIcon'],\n normal: this.styles[firstProperty + '.normalIcon'],\n hover: this.styles[firstProperty + '.hoverIcon'],\n disabled: this.styles[firstProperty + '.disabledIcon']\n };\n break;\n case 'submenu.icon':\n result = {\n active: this.styles[firstProperty + '.activeIcon'],\n normal: this.styles[firstProperty + '.normalIcon']\n };\n break;\n case 'submenu.label':\n result = {\n active: this._makeCssText(this.styles[firstProperty + '.activeLabel']),\n normal: this._makeCssText(this.styles[firstProperty + '.normalLabel'])\n };\n break;\n case 'submenu.partition':\n result = {\n vertical: this._makeCssText((0, _tuiCodeSnippet.extend)({}, option, { borderLeft: '1px solid ' + option.color })),\n horizontal: this._makeCssText((0, _tuiCodeSnippet.extend)({}, option, { borderBottom: '1px solid ' + option.color }))\n };\n break;\n\n case 'range.disabledPointer':\n case 'range.disabledBar':\n case 'range.disabledSubbar':\n case 'range.pointer':\n case 'range.bar':\n case 'range.subbar':\n option.backgroundColor = option.color;\n result = this._makeCssText(option);\n break;\n default:\n result = this._makeCssText(option);\n break;\n }\n\n return result;\n }\n\n /**\n * Make css resource\n * @returns {string} - serialized css text\n * @private\n */\n\n }, {\n key: '_styleMaker',\n value: function _styleMaker() {\n var submenuLabelStyle = this.getStyle('submenu.label');\n var submenuPartitionStyle = this.getStyle('submenu.partition');\n\n return (0, _style2.default)({\n subMenuLabelActive: submenuLabelStyle.active,\n subMenuLabelNormal: submenuLabelStyle.normal,\n submenuPartitionVertical: submenuPartitionStyle.vertical,\n submenuPartitionHorizontal: submenuPartitionStyle.horizontal,\n biSize: this.getStyle('common.bisize'),\n subMenuRangeTitle: this.getStyle('range.title'),\n submenuRangePointer: this.getStyle('range.pointer'),\n submenuRangeBar: this.getStyle('range.bar'),\n submenuRangeSubbar: this.getStyle('range.subbar'),\n\n submenuDisabledRangePointer: this.getStyle('range.disabledPointer'),\n submenuDisabledRangeBar: this.getStyle('range.disabledBar'),\n submenuDisabledRangeSubbar: this.getStyle('range.disabledSubbar'),\n\n submenuRangeValue: this.getStyle('range.value'),\n submenuColorpickerTitle: this.getStyle('colorpicker.title'),\n submenuColorpickerButton: this.getStyle('colorpicker.button'),\n submenuCheckbox: this.getStyle('checkbox'),\n menuIconSize: this.getStyle('menu.iconSize'),\n submenuIconSize: this.getStyle('submenu.iconSize'),\n menuIconStyle: this.getStyle('menu.icon'),\n submenuIconStyle: this.getStyle('submenu.icon')\n });\n }\n\n /**\n * Change to low dimensional object.\n * @param {object} styleOptions - style object of user interface\n * @returns {object} low level object for style apply\n * @private\n */\n\n }, {\n key: '_changeToObject',\n value: function _changeToObject(styleOptions) {\n var styleObject = {};\n (0, _tuiCodeSnippet.forEach)(styleOptions, function (value, key) {\n var keyExplode = key.match(/^(.+)\\.([a-z]+)$/i);\n var property = keyExplode[1],\n subProperty = keyExplode[2];\n\n\n if (!styleObject[property]) {\n styleObject[property] = {};\n }\n styleObject[property][subProperty] = value;\n });\n\n return styleObject;\n }\n\n /**\n * Style object to Csstext serialize\n * @param {object} styleObject - style object\n * @returns {string} - css text string\n * @private\n */\n\n }, {\n key: '_makeCssText',\n value: function _makeCssText(styleObject) {\n var _this = this;\n\n var converterStack = [];\n\n (0, _tuiCodeSnippet.forEach)(styleObject, function (value, key) {\n if (['backgroundImage'].indexOf(key) > -1 && value !== 'none') {\n value = 'url(' + value + ')';\n }\n\n converterStack.push(_this._toUnderScore(key) + ': ' + value);\n });\n\n return converterStack.join(';');\n }\n\n /**\n * Camel key string to Underscore string\n * @param {string} targetString - change target\n * @returns {string}\n * @private\n */\n\n }, {\n key: '_toUnderScore',\n value: function _toUnderScore(targetString) {\n return targetString.replace(/([A-Z])/g, function ($0, $1) {\n return '-' + $1.toLowerCase();\n });\n }\n\n /**\n * Load defulat svg icon\n * @private\n */\n\n }, {\n key: '_loadDefaultSvgIcon',\n value: function _loadDefaultSvgIcon() {\n if (!document.getElementById('tui-image-editor-svg-default-icons')) {\n var parser = new DOMParser();\n var dom = parser.parseFromString(_default2.default, 'text/xml');\n\n document.body.appendChild(dom.documentElement);\n }\n }\n\n /**\n * Make className for svg icon\n * @param {string} iconType - normal' or 'active' or 'hover' or 'disabled\n * @param {boolean} isSubmenu - submenu icon or not.\n * @returns {string}\n * @private\n */\n\n }, {\n key: '_makeIconClassName',\n value: function _makeIconClassName(iconType, isSubmenu) {\n var iconStyleInfo = isSubmenu ? this.getStyle('submenu.icon') : this.getStyle('menu.icon');\n var _iconStyleInfo$iconTy = iconStyleInfo[iconType],\n path = _iconStyleInfo$iconTy.path,\n name = _iconStyleInfo$iconTy.name;\n\n\n return path && name ? iconType : iconType + ' use-default';\n }\n\n /**\n * Make svg use link path name\n * @param {string} iconType - normal' or 'active' or 'hover' or 'disabled\n * @param {boolean} isSubmenu - submenu icon or not.\n * @returns {string}\n * @private\n */\n\n }, {\n key: '_makeSvgIconPrefix',\n value: function _makeSvgIconPrefix(iconType, isSubmenu) {\n var iconStyleInfo = isSubmenu ? this.getStyle('submenu.icon') : this.getStyle('menu.icon');\n var _iconStyleInfo$iconTy2 = iconStyleInfo[iconType],\n path = _iconStyleInfo$iconTy2.path,\n name = _iconStyleInfo$iconTy2.name;\n\n\n return path && name ? path + '#' + name + '-' : '#';\n }\n\n /**\n * Make svg use link path name\n * @param {Array.<string>} useIconTypes - normal' or 'active' or 'hover' or 'disabled\n * @param {string} menuName - menu name\n * @param {boolean} isSubmenu - submenu icon or not.\n * @returns {string}\n * @private\n */\n\n }, {\n key: '_makeSvgItem',\n value: function _makeSvgItem(useIconTypes, menuName, isSubmenu) {\n var _this2 = this;\n\n return (0, _tuiCodeSnippet.map)(useIconTypes, function (iconType) {\n var svgIconPrefix = _this2._makeSvgIconPrefix(iconType, isSubmenu);\n var iconName = _this2._toUnderScore(menuName);\n var svgIconClassName = _this2._makeIconClassName(iconType, isSubmenu);\n\n return '<use xlink:href=\"' + svgIconPrefix + 'ic-' + iconName + '\" class=\"' + svgIconClassName + '\"/>';\n }).join('');\n }\n\n /**\n * Make svg icon set\n * @param {Array.<string>} useIconTypes - normal' or 'active' or 'hover' or 'disabled\n * @param {string} menuName - menu name\n * @param {boolean} isSubmenu - submenu icon or not.\n * @returns {string}\n */\n\n }, {\n key: 'makeMenSvgIconSet',\n value: function makeMenSvgIconSet(useIconTypes, menuName) {\n var isSubmenu = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n return '<svg class=\"svg_ic-' + (isSubmenu ? 'submenu' : 'menu') + '\">' + this._makeSvgItem(useIconTypes, menuName, isSubmenu) + '</svg>';\n }\n }]);\n\n return Theme;\n}();\n\nexports.default = Theme;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/theme/theme.js?");
/***/ }),
/***/ "./src/js/ui/tools/colorpicker.js":
/*!****************************************!*\
!*** ./src/js/ui/tools/colorpicker.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _tuiColorPicker = __webpack_require__(/*! tui-color-picker */ \"tui-color-picker\");\n\nvar _tuiColorPicker2 = _interopRequireDefault(_tuiColorPicker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PICKER_COLOR = ['#000000', '#2a2a2a', '#545454', '#7e7e7e', '#a8a8a8', '#d2d2d2', '#ffffff', '', '#ff4040', '#ff6518', '#ffbb3b', '#03bd9e', '#00a9ff', '#515ce6', '#9e5fff', '#ff5583'];\n\n/**\n * Colorpicker control class\n * @class\n * @ignore\n */\n\nvar Colorpicker = function () {\n function Colorpicker(colorpickerElement) {\n var defaultColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#7e7e7e';\n var toggleDirection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'up';\n var usageStatistics = arguments[3];\n\n _classCallCheck(this, Colorpicker);\n\n this.colorpickerElement = colorpickerElement;\n this.usageStatistics = usageStatistics;\n\n this._show = false;\n\n this._colorpickerElement = colorpickerElement;\n this._toggleDirection = toggleDirection;\n this._makePickerButtonElement(defaultColor);\n this._makePickerLayerElement(colorpickerElement, colorpickerElement.getAttribute('title'));\n this._color = defaultColor;\n this.picker = _tuiColorPicker2.default.create({\n container: this.pickerElement,\n preset: PICKER_COLOR,\n color: defaultColor,\n usageStatistics: this.usageStatistics\n });\n\n this._addEvent();\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Colorpicker, [{\n key: 'destroy',\n value: function destroy() {\n var _this = this;\n\n this._removeEvent();\n this.picker.destroy();\n this.colorpickerElement.innerHTML = '';\n _tuiCodeSnippet2.default.forEach(this, function (value, key) {\n _this[key] = null;\n });\n }\n\n /**\n * Get color\n * @returns {Number} color value\n */\n\n }, {\n key: '_changeColorElement',\n\n\n /**\n * Change color element\n * @param {string} color color value\n * #private\n */\n value: function _changeColorElement(color) {\n if (color) {\n this.colorElement.classList.remove('transparent');\n this.colorElement.style.backgroundColor = color;\n } else {\n this.colorElement.style.backgroundColor = '#fff';\n this.colorElement.classList.add('transparent');\n }\n }\n\n /**\n * Make picker button element\n * @param {string} defaultColor color value\n * @private\n */\n\n }, {\n key: '_makePickerButtonElement',\n value: function _makePickerButtonElement(defaultColor) {\n this.colorpickerElement.classList.add('tui-image-editor-button');\n\n this.colorElement = document.createElement('div');\n this.colorElement.className = 'color-picker-value';\n if (defaultColor) {\n this.colorElement.style.backgroundColor = defaultColor;\n } else {\n this.colorElement.classList.add('transparent');\n }\n }\n\n /**\n * Make picker layer element\n * @param {HTMLElement} colorpickerElement color picker element\n * @param {string} title picker title\n * @private\n */\n\n }, {\n key: '_makePickerLayerElement',\n value: function _makePickerLayerElement(colorpickerElement, title) {\n var label = document.createElement('label');\n var triangle = document.createElement('div');\n\n this.pickerControl = document.createElement('div');\n this.pickerControl.className = 'color-picker-control';\n\n this.pickerElement = document.createElement('div');\n this.pickerElement.className = 'color-picker';\n\n label.innerHTML = title;\n triangle.className = 'triangle';\n\n this.pickerControl.appendChild(this.pickerElement);\n this.pickerControl.appendChild(triangle);\n\n colorpickerElement.appendChild(this.pickerControl);\n colorpickerElement.appendChild(this.colorElement);\n colorpickerElement.appendChild(label);\n }\n\n /**\n * Add event\n * @private\n */\n\n }, {\n key: '_addEvent',\n value: function _addEvent() {\n var _this2 = this;\n\n this.picker.on('selectColor', function (value) {\n _this2._changeColorElement(value.color);\n _this2._color = value.color;\n _this2.fire('change', value.color);\n });\n\n this.eventHandler = {\n pickerToggle: this._pickerToggleEventHandler.bind(this),\n pickerHide: function pickerHide() {\n return _this2.hide();\n }\n };\n\n this.colorpickerElement.addEventListener('click', this.eventHandler.pickerToggle);\n document.body.addEventListener('click', this.eventHandler.pickerHide);\n }\n\n /**\n * Remove event\n * @private\n */\n\n }, {\n key: '_removeEvent',\n value: function _removeEvent() {\n this.colorpickerElement.removeEventListener('click', this.eventHandler.pickerToggle);\n document.body.removeEventListener('click', this.eventHandler.pickerHide);\n this.picker.off();\n }\n\n /**\n * Picker toggle event handler\n * @param {object} event - change event\n * @private\n */\n\n }, {\n key: '_pickerToggleEventHandler',\n value: function _pickerToggleEventHandler(event) {\n var target = event.target;\n\n var isInPickerControl = target && this._isElementInColorPickerControl(target);\n\n if (!isInPickerControl || isInPickerControl && this._isPaletteButton(target)) {\n this._show = !this._show;\n this.pickerControl.style.display = this._show ? 'block' : 'none';\n this._setPickerControlPosition();\n this.fire('changeShow', this);\n }\n event.stopPropagation();\n }\n\n /**\n * Check hex input or not\n * @param {Element} target - Event target element\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: '_isPaletteButton',\n value: function _isPaletteButton(target) {\n return target.className === 'tui-colorpicker-palette-button';\n }\n\n /**\n * Check given element is in pickerControl element\n * @param {Element} element - element to check\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: '_isElementInColorPickerControl',\n value: function _isElementInColorPickerControl(element) {\n var parentNode = element;\n\n while (parentNode !== document.body) {\n if (!parentNode) {\n break;\n }\n\n if (parentNode === this.pickerControl) {\n return true;\n }\n\n parentNode = parentNode.parentNode;\n }\n\n return false;\n }\n }, {\n key: 'hide',\n value: function hide() {\n this._show = false;\n this.pickerControl.style.display = 'none';\n }\n\n /**\n * Set picker control position\n * @private\n */\n\n }, {\n key: '_setPickerControlPosition',\n value: function _setPickerControlPosition() {\n var controlStyle = this.pickerControl.style;\n var halfPickerWidth = this._colorpickerElement.clientWidth / 2 + 2;\n var left = this.pickerControl.offsetWidth / 2 - halfPickerWidth;\n var top = (this.pickerControl.offsetHeight + 10) * -1;\n\n if (this._toggleDirection === 'down') {\n top = 30;\n }\n\n controlStyle.top = top + 'px';\n controlStyle.left = '-' + left + 'px';\n }\n }, {\n key: 'color',\n get: function get() {\n return this._color;\n }\n\n /**\n * Set color\n * @param {string} color color value\n */\n ,\n set: function set(color) {\n this._color = color;\n this._changeColorElement(color);\n }\n }]);\n\n return Colorpicker;\n}();\n\n_tuiCodeSnippet2.default.CustomEvents.mixin(Colorpicker);\nexports.default = Colorpicker;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/tools/colorpicker.js?");
/***/ }),
/***/ "./src/js/ui/tools/range.js":
/*!**********************************!*\
!*** ./src/js/ui/tools/range.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _tuiCodeSnippet2 = _interopRequireDefault(_tuiCodeSnippet);\n\nvar _util = __webpack_require__(/*! ../../util */ \"./src/js/util.js\");\n\nvar _consts = __webpack_require__(/*! ../../consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar INPUT_FILTER_REGEXP = /(-?)([0-9]*)[^0-9]*([0-9]*)/g;\n\n/**\n * Range control class\n * @class\n * @ignore\n */\n\nvar Range = function () {\n /**\n * @constructor\n * @extends {View}\n * @param {Object} rangeElements - Html resources for creating sliders\n * @param {HTMLElement} rangeElements.slider - b\n * @param {HTMLElement} [rangeElements.input] - c\n * @param {Object} options - Slider make options\n * @param {number} options.min - min value\n * @param {number} options.max - max value\n * @param {number} options.value - default value\n * @param {number} [options.useDecimal] - Decimal point processing.\n * @param {number} [options.realTimeEvent] - Reflect live events.\n */\n function Range(rangeElements) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Range);\n\n this._value = options.value || 0;\n\n this.rangeElement = rangeElements.slider;\n this.rangeInputElement = rangeElements.input;\n\n this._drawRangeElement();\n\n this.rangeWidth = this._getRangeWidth();\n this._min = options.min || 0;\n this._max = options.max || 100;\n this._useDecimal = options.useDecimal;\n this._absMax = this._min * -1 + this._max;\n this.realTimeEvent = options.realTimeEvent || false;\n\n this.eventHandler = {\n startChangingSlide: this._startChangingSlide.bind(this),\n stopChangingSlide: this._stopChangingSlide.bind(this),\n changeSlide: this._changeSlide.bind(this),\n changeSlideFinally: this._changeSlideFinally.bind(this),\n changeInput: this._changeValueWithInput.bind(this, false),\n changeInputFinally: this._changeValueWithInput.bind(this, true),\n changeInputWithArrow: this._changeValueWithInputKeyEvent.bind(this)\n };\n\n this._addClickEvent();\n this._addDragEvent();\n this._addInputEvent();\n this.value = options.value;\n this.trigger('change');\n }\n\n /**\n * Destroys the instance.\n */\n\n\n _createClass(Range, [{\n key: 'destroy',\n value: function destroy() {\n var _this = this;\n\n this._removeClickEvent();\n this._removeDragEvent();\n this._removeInputEvent();\n this.rangeElement.innerHTML = '';\n _tuiCodeSnippet2.default.forEach(this, function (value, key) {\n _this[key] = null;\n });\n }\n\n /**\n * Set range max value and re position cursor\n * @param {number} maxValue - max value\n */\n\n }, {\n key: 'trigger',\n\n\n /**\n * event tirigger\n * @param {string} type - type\n */\n value: function trigger(type) {\n this.fire(type, this._value);\n }\n\n /**\n * Calculate slider width\n * @returns {number} - slider width\n */\n\n }, {\n key: '_getRangeWidth',\n value: function _getRangeWidth() {\n var getElementWidth = function getElementWidth(element) {\n return (0, _util.toInteger)(window.getComputedStyle(element, null).width);\n };\n\n return getElementWidth(this.rangeElement) - getElementWidth(this.pointer);\n }\n\n /**\n * Make range element\n * @private\n */\n\n }, {\n key: '_drawRangeElement',\n value: function _drawRangeElement() {\n this.rangeElement.classList.add('tui-image-editor-range');\n\n this.bar = document.createElement('div');\n this.bar.className = 'tui-image-editor-virtual-range-bar';\n\n this.subbar = document.createElement('div');\n this.subbar.className = 'tui-image-editor-virtual-range-subbar';\n\n this.pointer = document.createElement('div');\n this.pointer.className = 'tui-image-editor-virtual-range-pointer';\n\n this.bar.appendChild(this.subbar);\n this.bar.appendChild(this.pointer);\n this.rangeElement.appendChild(this.bar);\n }\n\n /**\n * Add range input editing event\n * @private\n */\n\n }, {\n key: '_addInputEvent',\n value: function _addInputEvent() {\n if (this.rangeInputElement) {\n this.rangeInputElement.addEventListener('keydown', this.eventHandler.changeInputWithArrow);\n this.rangeInputElement.addEventListener('keyup', this.eventHandler.changeInput);\n this.rangeInputElement.addEventListener('blur', this.eventHandler.changeInputFinally);\n }\n }\n\n /**\n * Remove range input editing event\n * @private\n */\n\n }, {\n key: '_removeInputEvent',\n value: function _removeInputEvent() {\n if (this.rangeInputElement) {\n this.rangeInputElement.removeEventListener('keydown', this.eventHandler.changeInputWithArrow);\n this.rangeInputElement.removeEventListener('keyup', this.eventHandler.changeInput);\n this.rangeInputElement.removeEventListener('blur', this.eventHandler.changeInputFinally);\n }\n }\n\n /**\n * change angle event\n * @param {object} event - key event\n * @private\n */\n\n }, {\n key: '_changeValueWithInputKeyEvent',\n value: function _changeValueWithInputKeyEvent(event) {\n var keyCode = event.keyCode,\n target = event.target;\n\n\n if ([_consts.keyCodes.ARROW_UP, _consts.keyCodes.ARROW_DOWN].indexOf(keyCode) < 0) {\n return;\n }\n\n var value = Number(target.value);\n\n value = this._valueUpDownForKeyEvent(value, keyCode);\n\n var unChanged = value < this._min || value > this._max;\n\n if (!unChanged) {\n var clampValue = (0, _util.clamp)(value, this._min, this.max);\n this.value = clampValue;\n this.fire('change', clampValue, false);\n }\n }\n\n /**\n * value up down for input\n * @param {number} value - original value number\n * @param {number} keyCode - input event key code\n * @returns {number} value - changed value\n * @private\n */\n\n }, {\n key: '_valueUpDownForKeyEvent',\n value: function _valueUpDownForKeyEvent(value, keyCode) {\n var step = this._useDecimal ? 0.1 : 1;\n\n if (keyCode === _consts.keyCodes.ARROW_UP) {\n value += step;\n } else if (keyCode === _consts.keyCodes.ARROW_DOWN) {\n value -= step;\n }\n\n return value;\n }\n\n /**\n * change angle event\n * @param {boolean} isLast - Is last change\n * @param {object} event - key event\n * @private\n */\n\n }, {\n key: '_changeValueWithInput',\n value: function _changeValueWithInput(isLast, event) {\n var keyCode = event.keyCode,\n target = event.target;\n\n\n if ([_consts.keyCodes.ARROW_UP, _consts.keyCodes.ARROW_DOWN].indexOf(keyCode) >= 0) {\n return;\n }\n\n var stringValue = this._filterForInputText(target.value);\n var waitForChange = !stringValue || isNaN(stringValue);\n target.value = stringValue;\n\n if (!waitForChange) {\n var value = this._useDecimal ? Number(stringValue) : (0, _util.toInteger)(stringValue);\n value = (0, _util.clamp)(value, this._min, this.max);\n\n this.value = value;\n this.fire('change', value, isLast);\n }\n }\n\n /**\n * Add Range click event\n * @private\n */\n\n }, {\n key: '_addClickEvent',\n value: function _addClickEvent() {\n this.rangeElement.addEventListener('click', this.eventHandler.changeSlideFinally);\n }\n\n /**\n * Remove Range click event\n * @private\n */\n\n }, {\n key: '_removeClickEvent',\n value: function _removeClickEvent() {\n this.rangeElement.removeEventListener('click', this.eventHandler.changeSlideFinally);\n }\n\n /**\n * Add Range drag event\n * @private\n */\n\n }, {\n key: '_addDragEvent',\n value: function _addDragEvent() {\n this.pointer.addEventListener('mousedown', this.eventHandler.startChangingSlide);\n }\n\n /**\n * Remove Range drag event\n * @private\n */\n\n }, {\n key: '_removeDragEvent',\n value: function _removeDragEvent() {\n this.pointer.removeEventListener('mousedown', this.eventHandler.startChangingSlide);\n }\n\n /**\n * change angle event\n * @param {object} event - change event\n * @private\n */\n\n }, {\n key: '_changeSlide',\n value: function _changeSlide(event) {\n var changePosition = event.screenX;\n var diffPosition = changePosition - this.firstPosition;\n var touchPx = this.firstLeft + diffPosition;\n touchPx = touchPx > this.rangeWidth ? this.rangeWidth : touchPx;\n touchPx = touchPx < 0 ? 0 : touchPx;\n\n this.pointer.style.left = touchPx + 'px';\n this.subbar.style.right = this.rangeWidth - touchPx + 'px';\n\n var ratio = touchPx / this.rangeWidth;\n var resultValue = this._absMax * ratio + this._min;\n var value = this._useDecimal ? resultValue : (0, _util.toInteger)(resultValue);\n var isValueChanged = this.value !== value;\n\n if (isValueChanged) {\n this.value = value;\n if (this.realTimeEvent) {\n this.fire('change', this._value, false);\n }\n }\n }\n }, {\n key: '_changeSlideFinally',\n value: function _changeSlideFinally(event) {\n event.stopPropagation();\n if (event.target.className !== 'tui-image-editor-range') {\n return;\n }\n var touchPx = event.offsetX;\n var ratio = touchPx / this.rangeWidth;\n var value = this._absMax * ratio + this._min;\n this.pointer.style.left = ratio * this.rangeWidth + 'px';\n this.subbar.style.right = (1 - ratio) * this.rangeWidth + 'px';\n this.value = value;\n\n this.fire('change', value, true);\n }\n }, {\n key: '_startChangingSlide',\n value: function _startChangingSlide(event) {\n this.firstPosition = event.screenX;\n this.firstLeft = (0, _util.toInteger)(this.pointer.style.left) || 0;\n\n document.addEventListener('mousemove', this.eventHandler.changeSlide);\n document.addEventListener('mouseup', this.eventHandler.stopChangingSlide);\n }\n\n /**\n * stop change angle event\n * @private\n */\n\n }, {\n key: '_stopChangingSlide',\n value: function _stopChangingSlide() {\n this.fire('change', this._value, true);\n\n document.removeEventListener('mousemove', this.eventHandler.changeSlide);\n document.removeEventListener('mouseup', this.eventHandler.stopChangingSlide);\n }\n\n /**\n * Unnecessary string filtering.\n * @param {string} inputValue - origin string of input\n * @returns {string} filtered string\n * @private\n */\n\n }, {\n key: '_filterForInputText',\n value: function _filterForInputText(inputValue) {\n return inputValue.replace(INPUT_FILTER_REGEXP, '$1$2$3');\n }\n }, {\n key: 'max',\n set: function set(maxValue) {\n this._max = maxValue;\n this._absMax = this._min * -1 + this._max;\n this.value = this._value;\n },\n get: function get() {\n return this._max;\n }\n\n /**\n * Get range value\n * @returns {Number} range value\n */\n\n }, {\n key: 'value',\n get: function get() {\n return this._value;\n }\n\n /**\n * Set range value\n * @param {Number} value range value\n * @param {Boolean} fire whether fire custom event or not\n */\n ,\n set: function set(value) {\n value = this._useDecimal ? value : (0, _util.toInteger)(value);\n\n var absValue = value - this._min;\n var leftPosition = absValue * this.rangeWidth / this._absMax;\n\n if (this.rangeWidth < leftPosition) {\n leftPosition = this.rangeWidth;\n }\n\n this.pointer.style.left = leftPosition + 'px';\n this.subbar.style.right = this.rangeWidth - leftPosition + 'px';\n\n this._value = value;\n if (this.rangeInputElement) {\n this.rangeInputElement.value = value;\n }\n }\n }]);\n\n return Range;\n}();\n\n_tuiCodeSnippet2.default.CustomEvents.mixin(Range);\nexports.default = Range;\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/ui/tools/range.js?");
/***/ }),
/***/ "./src/js/util.js":
/*!************************!*\
!*** ./src/js/util.js ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Promise = undefined;\nexports.clamp = clamp;\nexports.keyMirror = keyMirror;\nexports.makeStyleText = makeStyleText;\nexports.getProperties = getProperties;\nexports.toInteger = toInteger;\nexports.toCamelCase = toCamelCase;\nexports.isSupportFileApi = isSupportFileApi;\nexports.getRgb = getRgb;\nexports.sendHostName = sendHostName;\nexports.styleLoad = styleLoad;\nexports.getSelector = getSelector;\nexports.base64ToBlob = base64ToBlob;\nexports.fixFloatingPoint = fixFloatingPoint;\nexports.assignmentForDestroy = assignmentForDestroy;\nexports.cls = cls;\nexports.changeOrigin = changeOrigin;\nexports.flipObject = flipObject;\nexports.setCustomProperty = setCustomProperty;\nexports.getCustomProperty = getCustomProperty;\nexports.capitalizeString = capitalizeString;\nexports.includes = includes;\nexports.getFillTypeFromOption = getFillTypeFromOption;\nexports.getFillTypeFromObject = getFillTypeFromObject;\nexports.isShape = isShape;\n\nvar _tuiCodeSnippet = __webpack_require__(/*! tui-code-snippet */ \"tui-code-snippet\");\n\nvar _promise = __webpack_require__(/*! core-js-pure/features/promise */ \"./node_modules/core-js-pure/features/promise/index.js\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _consts = __webpack_require__(/*! ./consts */ \"./src/js/consts.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FLOATING_POINT_DIGIT = 2; /**\n * @author NHN Ent. FE Development Team <dl_javascript@nhn.com>\n * @fileoverview Util\n */\n\nvar CSS_PREFIX = 'tui-image-editor-';\nvar min = Math.min,\n max = Math.max;\n\nvar hostnameSent = false;\n\n/**\n * Export Promise Class (for simplified module path)\n * @returns {Promise} promise class\n */\nexports.Promise = _promise2.default;\n\n/**\n * Clamp value\n * @param {number} value - Value\n * @param {number} minValue - Minimum value\n * @param {number} maxValue - Maximum value\n * @returns {number} clamped value\n */\n\nfunction clamp(value, minValue, maxValue) {\n var temp = void 0;\n if (minValue > maxValue) {\n temp = minValue;\n minValue = maxValue;\n maxValue = temp;\n }\n\n return max(minValue, min(value, maxValue));\n}\n\n/**\n * Make key-value object from arguments\n * @returns {object.<string, string>}\n */\nfunction keyMirror() {\n var obj = {};\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n (0, _tuiCodeSnippet.forEach)(args, function (key) {\n obj[key] = key;\n });\n\n return obj;\n}\n\n/**\n * Make CSSText\n * @param {Object} styleObj - Style info object\n * @returns {string} Connected string of style\n */\nfunction makeStyleText(styleObj) {\n var styleStr = '';\n\n (0, _tuiCodeSnippet.forEach)(styleObj, function (value, prop) {\n styleStr += prop + ': ' + value + ';';\n });\n\n return styleStr;\n}\n\n/**\n * Get object's properties\n * @param {Object} obj - object\n * @param {Array} keys - keys\n * @returns {Object} properties object\n */\nfunction getProperties(obj, keys) {\n var props = {};\n var length = keys.length;\n\n var i = 0;\n var key = void 0;\n\n for (i = 0; i < length; i += 1) {\n key = keys[i];\n props[key] = obj[key];\n }\n\n return props;\n}\n\n/**\n * ParseInt simpliment\n * @param {number} value - Value\n * @returns {number}\n */\nfunction toInteger(value) {\n return parseInt(value, 10);\n}\n\n/**\n * String to camelcase string\n * @param {string} targetString - change target\n * @returns {string}\n * @private\n */\nfunction toCamelCase(targetString) {\n return targetString.replace(/-([a-z])/g, function ($0, $1) {\n return $1.toUpperCase();\n });\n}\n\n/**\n * Check browser file api support\n * @returns {boolean}\n * @private\n */\nfunction isSupportFileApi() {\n return !!(window.File && window.FileList && window.FileReader);\n}\n\n/**\n * hex to rgb\n * @param {string} color - hex color\n * @param {string} alpha - color alpha value\n * @returns {string} rgb expression\n */\nfunction getRgb(color, alpha) {\n if (color.length === 4) {\n color = '' + color + color.slice(1, 4);\n }\n var r = parseInt(color.slice(1, 3), 16);\n var g = parseInt(color.slice(3, 5), 16);\n var b = parseInt(color.slice(5, 7), 16);\n var a = alpha || 1;\n\n return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + a + ')';\n}\n\n/**\n * send hostname\n */\nfunction sendHostName() {\n if (hostnameSent) {\n return;\n }\n hostnameSent = true;\n\n (0, _tuiCodeSnippet.sendHostname)('image-editor', 'UA-129999381-1');\n}\n\n/**\n * Apply css resource\n * @param {string} styleBuffer - serialized css text\n * @param {string} tagId - style tag id\n */\nfunction styleLoad(styleBuffer, tagId) {\n var _document$getElements = document.getElementsByTagName('head'),\n head = _document$getElements[0];\n\n var linkElement = document.createElement('link');\n var styleData = encodeURIComponent(styleBuffer);\n if (tagId) {\n linkElement.id = tagId;\n // linkElement.id = 'tui-image-editor-theme-style';\n }\n linkElement.setAttribute('rel', 'stylesheet');\n linkElement.setAttribute('type', 'text/css');\n linkElement.setAttribute('href', 'data:text/css;charset=UTF-8,' + styleData);\n head.appendChild(linkElement);\n}\n\n/**\n * Get selector\n * @param {HTMLElement} targetElement - target element\n * @returns {Function} selector\n */\nfunction getSelector(targetElement) {\n return function (str) {\n return targetElement.querySelector(str);\n };\n}\n\n/**\n * Change base64 to blob\n * @param {String} data - base64 string data\n * @returns {Blob} Blob Data\n */\nfunction base64ToBlob(data) {\n var rImageType = /data:(image\\/.+);base64,/;\n var mimeString = '';\n var raw = void 0,\n uInt8Array = void 0,\n i = void 0;\n\n raw = data.replace(rImageType, function (header, imageType) {\n mimeString = imageType;\n\n return '';\n });\n\n raw = atob(raw);\n var rawLength = raw.length;\n uInt8Array = new Uint8Array(rawLength); // eslint-disable-line\n\n for (i = 0; i < rawLength; i += 1) {\n uInt8Array[i] = raw.charCodeAt(i);\n }\n\n return new Blob([uInt8Array], { type: mimeString });\n}\n\n/**\n * Fix floating point diff.\n * @param {number} value - original value\n * @returns {number} fixed value\n */\nfunction fixFloatingPoint(value) {\n return Number(value.toFixed(FLOATING_POINT_DIGIT));\n}\n\n/**\n * Assignment for destroying objects.\n * @param {Object} targetObject - object to be removed.\n */\nfunction assignmentForDestroy(targetObject) {\n (0, _tuiCodeSnippet.forEach)(targetObject, function (value, key) {\n targetObject[key] = null;\n });\n}\n\n/**\n * Make class name for ui\n * @param {String} str - main string of className\n * @param {String} prefix - prefix string of className\n * @returns {String} class name\n */\nfunction cls() {\n var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n if (str.charAt(0) === '.') {\n return '.' + CSS_PREFIX + prefix + str.slice(1);\n }\n\n return '' + CSS_PREFIX + prefix + str;\n}\n\n/**\n * Change object origin\n * @param {fabric.Object} fObject - fabric object\n * @param {Object} origin - origin of fabric object\n * @param {string} originX - horizontal basis.\n * @param {string} originY - vertical basis.\n */\nfunction changeOrigin(fObject, origin) {\n var originX = origin.originX,\n originY = origin.originY;\n\n var _fObject$getPointByOr = fObject.getPointByOrigin(originX, originY),\n left = _fObject$getPointByOr.x,\n top = _fObject$getPointByOr.y;\n\n fObject.set({\n left: left,\n top: top,\n originX: originX,\n originY: originY\n });\n\n fObject.setCoords();\n}\n\n/**\n * Object key value flip\n * @param {Object} targetObject - The data object of the key value.\n * @returns {Object}\n */\nfunction flipObject(targetObject) {\n var result = {};\n\n Object.keys(targetObject).forEach(function (key) {\n result[targetObject[key]] = key;\n });\n\n return result;\n}\n\n/**\n * Set custom properties\n * @param {Object} targetObject - target object\n * @param {Object} props - custom props object\n */\nfunction setCustomProperty(targetObject, props) {\n targetObject.customProps = targetObject.customProps || {};\n (0, _tuiCodeSnippet.extend)(targetObject.customProps, props);\n}\n\n/**\n * Get custom property\n * @param {fabric.Object} fObject - fabric object\n * @param {Array|string} propNames - prop name array\n * @returns {object | number | string}\n */\nfunction getCustomProperty(fObject, propNames) {\n var resultObject = {};\n if ((0, _tuiCodeSnippet.isString)(propNames)) {\n propNames = [propNames];\n }\n (0, _tuiCodeSnippet.forEach)(propNames, function (propName) {\n resultObject[propName] = fObject.customProps[propName];\n });\n\n return resultObject;\n}\n\n/**\n * Capitalize string\n * @param {string} targetString - target string\n * @returns {string}\n */\nfunction capitalizeString(targetString) {\n return targetString.charAt(0).toUpperCase() + targetString.slice(1);\n}\n\n/**\n * Array includes check\n * @param {Array} targetArray - target array\n * @param {string|number} compareValue - compare value\n * @returns {boolean}\n */\nfunction includes(targetArray, compareValue) {\n return targetArray.indexOf(compareValue) >= 0;\n}\n\n/**\n * Get fill type\n * @param {Object | string} fillOption - shape fill option\n * @returns {string} 'color' or 'filter'\n */\nfunction getFillTypeFromOption() {\n var fillOption = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n return (0, _tuiCodeSnippet.pick)(fillOption, 'type') || _consts.SHAPE_FILL_TYPE.COLOR;\n}\n\n/**\n * Get fill type of shape type object\n * @param {fabric.Object} shapeObj - fabric object\n * @returns {string} 'transparent' or 'color' or 'filter'\n */\nfunction getFillTypeFromObject(shapeObj) {\n var _shapeObj$fill = shapeObj.fill,\n fill = _shapeObj$fill === undefined ? {} : _shapeObj$fill;\n\n if (fill.source) {\n return _consts.SHAPE_FILL_TYPE.FILTER;\n }\n\n return _consts.SHAPE_FILL_TYPE.COLOR;\n}\n\n/**\n * Check if the object is a shape object.\n * @param {fabric.Object} obj - fabric object\n * @returns {boolean}\n */\nfunction isShape(obj) {\n return (0, _tuiCodeSnippet.inArray)(obj.get('type'), _consts.SHAPE_TYPE) >= 0;\n}\n\n//# sourceURL=webpack://tui.ImageEditor/./src/js/util.js?");
/***/ }),
/***/ "./src/svg/default.svg":
/*!*****************************!*\
!*** ./src/svg/default.svg ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = \"<svg display=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs id=\\\"tui-image-editor-svg-default-icons\\\"><symbol id=\\\"ic-apply\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" stroke=\\\"none\\\" fill=\\\"none\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M4 12.011l5 5L20.011 6\\\"></path></symbol><symbol id=\\\"ic-cancel\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" fill=\\\"none\\\" stroke=\\\"none\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M6 6l12 12M18 6L6 18\\\"></path></symbol><symbol id=\\\"ic-crop\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" stroke=\\\"none\\\" fill=\\\"none\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M4 0h1v20a1 1 0 0 1-1-1V0zM20 17h-1V5h1v12zm0 2v5h-1v-5h1z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M5 19h19v1H5zM4.762 4v1H0V4h4.762zM7 4h12a1 1 0 0 1 1 1H7V4z\\\"></path></symbol><symbol id=\\\"ic-delete-all\\\" viewBox=\\\"0 0 24 24\\\"><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M5 23H3a1 1 0 0 1-1-1V6h1v16h2v1zm16-10h-1V6h1v7zM9 13H8v-3h1v3zm3 0h-1v-3h1v3zm3 0h-1v-3h1v3zM14.794 3.794L13 2h-3L8.206 3.794A.963.963 0 0 1 8 2.5l.703-1.055A1 1 0 0 1 9.535 1h3.93a1 1 0 0 1 .832.445L15 2.5a.965.965 0 0 1-.206 1.294zM14.197 4H8.803h5.394z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M0 3h23v1H0zM11.286 21H8.714L8 23H7l1-2.8V20h.071L9.5 16h1l1.429 4H12v.2l1 2.8h-1l-.714-2zm-.357-1L10 17.4 9.071 20h1.858zM20 22h3v1h-4v-7h1v6zm-5 0h3v1h-4v-7h1v6z\\\"></path></symbol><symbol id=\\\"ic-delete\\\" viewBox=\\\"0 0 24 24\\\"><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M3 6v16h17V6h1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6h1zM14.794 3.794L13 2h-3L8.206 3.794A.963.963 0 0 1 8 2.5l.703-1.055A1 1 0 0 1 9.535 1h3.93a1 1 0 0 1 .832.445L15 2.5a.965.965 0 0 1-.206 1.294zM14.197 4H8.803h5.394z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M0 3h23v1H0zM8 10h1v6H8v-6zm3 0h1v6h-1v-6zm3 0h1v6h-1v-6z\\\"></path></symbol><symbol id=\\\"ic-draw-free\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M2.5 20.929C2.594 10.976 4.323 6 7.686 6c5.872 0 2.524 19 7.697 19s1.89-14.929 6.414-14.929 1.357 10.858 5.13 10.858c1.802 0 2.657-2.262 2.566-6.786\\\"></path></symbol><symbol id=\\\"ic-draw-line\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M2 15.5h28\\\"></path></symbol><symbol id=\\\"ic-draw\\\" viewBox=\\\"0 0 24 24\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M2.5 21.5H5c.245 0 .48-.058.691-.168l.124-.065.14.01c.429.028.85-.127 1.16-.437L22.55 5.405a.5.5 0 0 0 0-.707l-3.246-3.245a.5.5 0 0 0-.707 0L3.162 16.888a1.495 1.495 0 0 0-.437 1.155l.01.14-.065.123c-.111.212-.17.448-.17.694v2.5z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M16.414 3.707l3.89 3.89-.708.706-3.889-3.889z\\\"></path></symbol><symbol id=\\\"ic-filter\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" fill=\\\"none\\\" stroke=\\\"none\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M12 7v1H2V7h10zm6 0h4v1h-4V7zM12 16v1h10v-1H12zm-6 0H2v1h4v-1z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M8.5 20a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM15.5 11a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z\\\"></path></symbol><symbol id=\\\"ic-flip-reset\\\" viewBox=\\\"0 0 31 32\\\"><path fill=\\\"none\\\" stroke=\\\"none\\\" d=\\\"M31 0H0v32h31z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M28 16a8 8 0 0 1-8 8H3v-1h1v-7H3a8 8 0 0 1 8-8h17v1h-1v7h1zM11 9a7 7 0 0 0-7 7v7h16a7 7 0 0 0 7-7V9H11z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"square\\\" d=\\\"M24 5l3.5 3.5L24 12M7 20l-3.5 3.5L7 27\\\"></path></symbol><symbol id=\\\"ic-flip-x\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"none\\\" d=\\\"M32 32H0V0h32z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M17 32h-1V0h1zM27.167 11l.5 3h-1.03l-.546-3h1.076zm-.5-3h-1.122L25 5h-5V4h5.153a1 1 0 0 1 .986.836L26.667 8zm1.5 9l.5 3h-.94l-.545-3h.985zm1 6l.639 3.836A1 1 0 0 1 28.819 28H26v-1h3l-.726-4h.894zM23 28h-3v-1h3v1zM13 4v1H7L3 27h10v1H3.18a1 1 0 0 1-.986-1.164l3.666-22A1 1 0 0 1 6.847 4H13z\\\"></path></symbol><symbol id=\\\"ic-flip-y\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"none\\\" d=\\\"M0 0v32h32V0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M0 16v1h32v-1zM11 27.167l3 .5v-1.03l-3-.546v1.076zm-3-.5v-1.122L5 25v-5H4v5.153a1 1 0 0 0 .836.986L8 26.667zm9 1.5l3 .5v-.94l-3-.545v.985zm6 1l3.836.639A1 1 0 0 0 28 28.82V26h-1v3l-4-.727v.894zM28 23v-3h-1v3h1zM4 13h1V7l22-4v10h1V3.18a1 1 0 0 0-1.164-.986l-22 3.667A1 1 0 0 0 4 6.847V13z\\\"></path></symbol><symbol id=\\\"ic-flip\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" fill=\\\"none\\\" stroke=\\\"none\\\"></path><path fill=\\\"inherit\\\" stroke=\\\"none\\\" d=\\\"M11 0h1v24h-1zM19 21v-1h2v-2h1v2a1 1 0 0 1-1 1h-2zm-2 0h-3v-1h3v1zm5-5h-1v-3h1v3zm0-5h-1V8h1v3zm0-5h-1V4h-2V3h2a1 1 0 0 1 1 1v2zm-5-3v1h-3V3h3zM9 3v1H2v16h7v1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7z\\\"></path></symbol><symbol id=\\\"ic-icon-arrow-2\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M21.793 18.5H2.5v-5h18.935l-7.6-8h5.872l10.5 10.5-10.5 10.5h-5.914l8-8z\\\"></path></symbol><symbol id=\\\"ic-icon-arrow-3\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M25.288 16.42L14.208 27.5H6.792l11.291-11.291L6.826 4.5h7.381l11.661 11.661-.58.258z\\\"></path></symbol><symbol id=\\\"ic-icon-arrow\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M2.5 11.5v9h18v5.293L30.293 16 20.5 6.207V11.5h-18z\\\"></path></symbol><symbol id=\\\"ic-icon-bubble\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M22.207 24.5L16.5 30.207V24.5H8A6.5 6.5 0 0 1 1.5 18V9A6.5 6.5 0 0 1 8 2.5h16A6.5 6.5 0 0 1 30.5 9v9a6.5 6.5 0 0 1-6.5 6.5h-1.793z\\\"></path></symbol><symbol id=\\\"ic-icon-heart\\\" viewBox=\\\"0 0 32 32\\\"><path fill-rule=\\\"nonzero\\\" fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M15.996 30.675l1.981-1.79c7.898-7.177 10.365-9.718 12.135-13.012.922-1.716 1.377-3.37 1.377-5.076 0-4.65-3.647-8.297-8.297-8.297-2.33 0-4.86 1.527-6.817 3.824l-.38.447-.381-.447C13.658 4.027 11.126 2.5 8.797 2.5 4.147 2.5.5 6.147.5 10.797c0 1.714.46 3.375 1.389 5.098 1.775 3.288 4.26 5.843 12.123 12.974l1.984 1.806z\\\"></path></symbol><symbol id=\\\"ic-icon-load\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M17.314 18.867l1.951-2.53 4 5.184h-17l6.5-8.84 4.549 6.186z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M18.01 4a11.798 11.798 0 0 0 0 1H3v24h24V14.986a8.738 8.738 0 0 0 1 0V29a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h15.01z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M25 3h1v9h-1z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M22 6l3.5-3.5L29 6\\\"></path></symbol><symbol id=\\\"ic-icon-location\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M16 31.28C23.675 23.302 27.5 17.181 27.5 13c0-6.351-5.149-11.5-11.5-11.5S4.5 6.649 4.5 13c0 4.181 3.825 10.302 11.5 18.28z\\\"></path><circle fill=\\\"none\\\" stroke=\\\"inherit\\\" cx=\\\"16\\\" cy=\\\"13\\\" r=\\\"4.5\\\"></circle></symbol><symbol id=\\\"ic-icon-polygon\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M.576 16L8.29 29.5h15.42L31.424 16 23.71 2.5H8.29L.576 16z\\\"></path></symbol><symbol id=\\\"ic-icon-star-2\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M19.446 31.592l2.265-3.272 3.946.25.636-3.94 3.665-1.505-1.12-3.832 2.655-2.962-2.656-2.962 1.12-3.832-3.664-1.505-.636-3.941-3.946.25-2.265-3.271L16 3.024 12.554 1.07 10.289 4.34l-3.946-.25-.636 3.941-3.665 1.505 1.12 3.832L.508 16.33l2.656 2.962-1.12 3.832 3.664 1.504.636 3.942 3.946-.25 2.265 3.27L16 29.638l3.446 1.955z\\\"></path></symbol><symbol id=\\\"ic-icon-star\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M25.292 29.878l-1.775-10.346 7.517-7.327-10.388-1.51L16 1.282l-4.646 9.413-10.388 1.51 7.517 7.327-1.775 10.346L16 24.993l9.292 4.885z\\\"></path></symbol><symbol id=\\\"ic-icon\\\" viewBox=\\\"0 0 24 24\\\"><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M11.923 19.136L5.424 22l.715-7.065-4.731-5.296 6.94-1.503L11.923 2l3.574 6.136 6.94 1.503-4.731 5.296L18.42 22z\\\"></path></symbol><symbol id=\\\"ic-mask-load\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" fill=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M18.01 4a11.798 11.798 0 0 0 0 1H3v24h24V14.986a8.738 8.738 0 0 0 1 0V29a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h15.01zM15 23a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-1a5 5 0 1 0 0-10 5 5 0 0 0 0 10z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M25 3h1v9h-1z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" d=\\\"M22 6l3.5-3.5L29 6\\\"></path></symbol><symbol id=\\\"ic-mask\\\" viewBox=\\\"0 0 24 24\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"4.5\\\" stroke=\\\"inherit\\\" fill=\\\"none\\\"></circle><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M2 1h20a1 1 0 0 1 1 1v20a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 1v20h20V2H2z\\\"></path></symbol><symbol id=\\\"ic-redo\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" opacity=\\\".5\\\" fill=\\\"none\\\" stroke=\\\"none\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M21 6H9a6 6 0 1 0 0 12h12v1H9A7 7 0 0 1 9 5h12v1z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"square\\\" d=\\\"M19 3l2.5 2.5L19 8\\\"></path></symbol><symbol id=\\\"ic-reset\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" opacity=\\\".5\\\" stroke=\\\"none\\\" fill=\\\"none\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M2 13v-1a7 7 0 0 1 7-7h13v1h-1v5h1v1a7 7 0 0 1-7 7H2v-1h1v-5H2zm7-7a6 6 0 0 0-6 6v6h12a6 6 0 0 0 6-6V6H9z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"square\\\" d=\\\"M19 3l2.5 2.5L19 8M5 16l-2.5 2.5L5 21\\\"></path></symbol><symbol id=\\\"ic-rotate-clockwise\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M29 17h-.924c0 6.627-5.373 12-12 12-6.628 0-12-5.373-12-12C4.076 10.398 9.407 5.041 16 5V4C8.82 4 3 9.82 3 17s5.82 13 13 13 13-5.82 13-13z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"square\\\" d=\\\"M16 1.5l4 3-4 3\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-rule=\\\"nonzero\\\" d=\\\"M16 4h4v1h-4z\\\"></path></symbol><symbol id=\\\"ic-rotate-counterclockwise\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" d=\\\"M3 17h.924c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.602-5.331-11.96-11.924-12V4c7.18 0 13 5.82 13 13s-5.82 13-13 13S3 24.18 3 17z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-rule=\\\"nonzero\\\" d=\\\"M12 4h4v1h-4z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"square\\\" d=\\\"M16 1.5l-4 3 4 3\\\"></path></symbol><symbol id=\\\"ic-rotate\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0 0h24v24H0z\\\" fill=\\\"none\\\" stroke=\\\"none\\\"></path><path fill=\\\"inherit\\\" stroke=\\\"none\\\" d=\\\"M8.349 22.254a10.002 10.002 0 0 1-2.778-1.719l.65-.76a9.002 9.002 0 0 0 2.495 1.548l-.367.931zm2.873.704l.078-.997a9 9 0 1 0-.557-17.852l-.14-.99A10.076 10.076 0 0 1 12.145 3c5.523 0 10 4.477 10 10s-4.477 10-10 10c-.312 0-.62-.014-.924-.042zm-7.556-4.655a9.942 9.942 0 0 1-1.253-2.996l.973-.234a8.948 8.948 0 0 0 1.124 2.693l-.844.537zm-1.502-5.91A9.949 9.949 0 0 1 2.88 9.23l.925.382a8.954 8.954 0 0 0-.644 2.844l-.998-.062zm2.21-5.686c.687-.848 1.51-1.58 2.436-2.166l.523.852a9.048 9.048 0 0 0-2.188 1.95l-.771-.636z\\\"></path><path stroke=\\\"inherit\\\" fill=\\\"none\\\" stroke-linecap=\\\"square\\\" d=\\\"M13 1l-2.5 2.5L13 6\\\"></path></symbol><symbol id=\\\"ic-shape-circle\\\" viewBox=\\\"0 0 32 32\\\"><circle cx=\\\"16\\\" cy=\\\"16\\\" r=\\\"14.5\\\" fill=\\\"none\\\" stroke=\\\"inherit\\\"></circle></symbol><symbol id=\\\"ic-shape-rectangle\\\" viewBox=\\\"0 0 32 32\\\"><rect width=\\\"27\\\" height=\\\"27\\\" x=\\\"2.5\\\" y=\\\"2.5\\\" fill=\\\"none\\\" stroke=\\\"inherit\\\" rx=\\\"1\\\"></rect></symbol><symbol id=\\\"ic-shape-triangle\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M16 2.5l15.5 27H.5z\\\"></path></symbol><symbol id=\\\"ic-shape\\\" viewBox=\\\"0 0 24 24\\\"><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M14.706 8H21a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-4h1v4h12V9h-5.706l-.588-1z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" d=\\\"M8.5 1.5l7.5 13H1z\\\"></path></symbol><symbol id=\\\"ic-text-align-center\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" fill=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M2 5h28v1H2zM8 12h16v1H8zM2 19h28v1H2zM8 26h16v1H8z\\\"></path></symbol><symbol id=\\\"ic-text-align-left\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" fill=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M2 5h28v1H2zM2 12h16v1H2zM2 19h28v1H2zM2 26h16v1H2z\\\"></path></symbol><symbol id=\\\"ic-text-align-right\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" fill=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M2 5h28v1H2zM14 12h16v1H14zM2 19h28v1H2zM14 26h16v1H14z\\\"></path></symbol><symbol id=\\\"ic-text-bold\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M7 2h2v2H7zM7 28h2v2H7z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-width=\\\"2\\\" d=\\\"M9 3v12h9a6 6 0 1 0 0-12H9zM9 15v14h10a7 7 0 0 0 0-14H9z\\\"></path></symbol><symbol id=\\\"ic-text-italic\\\" viewBox=\\\"0 0 32 32\\\"><path fill=\\\"none\\\" stroke=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M15 2h5v1h-5zM11 29h5v1h-5zM17 3h1l-4 26h-1z\\\"></path></symbol><symbol id=\\\"ic-text-underline\\\" viewBox=\\\"0 0 32 32\\\"><path stroke=\\\"none\\\" fill=\\\"none\\\" d=\\\"M0 0h32v32H0z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M8 2v14a8 8 0 1 0 16 0V2h1v14a9 9 0 0 1-18 0V2h1zM3 29h26v1H3z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M5 2h5v1H5zM22 2h5v1h-5z\\\"></path></symbol><symbol id=\\\"ic-text\\\" viewBox=\\\"0 0 24 24\\\"><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M4 3h15a1 1 0 0 1 1 1H3a1 1 0 0 1 1-1zM3 4h1v1H3zM19 4h1v1h-1z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M11 3h1v18h-1z\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M10 20h3v1h-3z\\\"></path></symbol><symbol id=\\\"ic-undo\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M24 0H0v24h24z\\\" opacity=\\\".5\\\" fill=\\\"none\\\" stroke=\\\"none\\\"></path><path stroke=\\\"none\\\" fill=\\\"inherit\\\" d=\\\"M3 6h12a6 6 0 1 1 0 12H3v1h12a7 7 0 0 0 0-14H3v1z\\\"></path><path fill=\\\"none\\\" stroke=\\\"inherit\\\" stroke-linecap=\\\"square\\\" d=\\\"M5 3L2.5 5.5 5 8\\\"></path></symbol></defs></svg>\"\n\n//# sourceURL=webpack://tui.ImageEditor/./src/svg/default.svg?");
/***/ }),
/***/ "fabric":
/*!****************************************************************************************************************!*\
!*** external {"commonjs":["fabric","fabric"],"commonjs2":["fabric","fabric"],"amd":"fabric","root":"fabric"} ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_fabric__;\n\n//# sourceURL=webpack://tui.ImageEditor/external_%7B%22commonjs%22:%5B%22fabric%22,%22fabric%22%5D,%22commonjs2%22:%5B%22fabric%22,%22fabric%22%5D,%22amd%22:%22fabric%22,%22root%22:%22fabric%22%7D?");
/***/ }),
/***/ "tui-code-snippet":
/*!******************************************************************************************************************************!*\
!*** external {"commonjs":"tui-code-snippet","commonjs2":"tui-code-snippet","amd":"tui-code-snippet","root":["tui","util"]} ***!
\******************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_tui_code_snippet__;\n\n//# sourceURL=webpack://tui.ImageEditor/external_%7B%22commonjs%22:%22tui-code-snippet%22,%22commonjs2%22:%22tui-code-snippet%22,%22amd%22:%22tui-code-snippet%22,%22root%22:%5B%22tui%22,%22util%22%5D%7D?");
/***/ }),
/***/ "tui-color-picker":
/*!*************************************************************************************************************************************!*\
!*** external {"commonjs":"tui-color-picker","commonjs2":"tui-color-picker","amd":"tui-color-picker","root":["tui","colorPicker"]} ***!
\*************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_tui_color_picker__;\n\n//# sourceURL=webpack://tui.ImageEditor/external_%7B%22commonjs%22:%22tui-color-picker%22,%22commonjs2%22:%22tui-color-picker%22,%22amd%22:%22tui-color-picker%22,%22root%22:%5B%22tui%22,%22colorPicker%22%5D%7D?");
/***/ })
/******/ });
});