jodit 3.19.2 → 3.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/vdom.js ADDED
@@ -0,0 +1,1297 @@
1
+ /*!
2
+ * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
+ * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
4
+ * Version: v3.19.3
5
+ * Url: https://xdsoft.net/jodit/
6
+ * License(s): MIT
7
+ */
8
+
9
+ (function webpackUniversalModuleDefinition(root, factory) {
10
+ if(typeof exports === 'object' && typeof module === 'object')
11
+ module.exports = factory();
12
+ else if(typeof define === 'function' && define.amd)
13
+ define([], factory);
14
+ else {
15
+ var a = factory();
16
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
+ }
18
+ })(self, function() {
19
+ return /******/ (function() { // webpackBootstrap
20
+ /******/ "use strict";
21
+ /******/ var __webpack_modules__ = ({
22
+
23
+ /***/ 8058:
24
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
25
+
26
+ __webpack_require__.r(__webpack_exports__);
27
+ // extracted by mini-css-extract-plugin
28
+
29
+
30
+ /***/ }),
31
+
32
+ /***/ 70631:
33
+ /***/ (function(__unused_webpack_module, exports) {
34
+
35
+
36
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37
+ exports.boundClass = exports.boundMethod = void 0;
38
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
39
+ _typeof = function _typeof(obj) { return typeof obj; };
40
+ }
41
+ else {
42
+ _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
43
+ } return _typeof(obj); }
44
+ function boundMethod(target, key, descriptor) {
45
+ var fn = descriptor.value;
46
+ if (typeof fn !== 'function') {
47
+ throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
48
+ }
49
+ var definingProperty = false;
50
+ return {
51
+ configurable: true,
52
+ get: function get() {
53
+ if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
54
+ return fn;
55
+ }
56
+ var boundFn = fn.bind(this);
57
+ definingProperty = true;
58
+ Object.defineProperty(this, key, {
59
+ configurable: true,
60
+ get: function get() {
61
+ return boundFn;
62
+ },
63
+ set: function set(value) {
64
+ fn = value;
65
+ delete this[key];
66
+ }
67
+ });
68
+ definingProperty = false;
69
+ return boundFn;
70
+ },
71
+ set: function set(value) {
72
+ fn = value;
73
+ }
74
+ };
75
+ }
76
+ exports.boundMethod = boundMethod;
77
+ function boundClass(target) {
78
+ var keys;
79
+ if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
80
+ keys = Reflect.ownKeys(target.prototype);
81
+ }
82
+ else {
83
+ keys = Object.getOwnPropertyNames(target.prototype);
84
+ if (typeof Object.getOwnPropertySymbols === 'function') {
85
+ keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
86
+ }
87
+ }
88
+ keys.forEach(function (key) {
89
+ if (key === 'constructor') {
90
+ return;
91
+ }
92
+ var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key);
93
+ if (typeof descriptor.value === 'function') {
94
+ Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
95
+ }
96
+ });
97
+ return target;
98
+ }
99
+ exports.boundClass = boundClass;
100
+ function autobind() {
101
+ if (arguments.length === 1) {
102
+ return boundClass.apply(void 0, arguments);
103
+ }
104
+ return boundMethod.apply(void 0, arguments);
105
+ }
106
+ exports["default"] = autobind;
107
+
108
+
109
+ /***/ }),
110
+
111
+ /***/ 20255:
112
+ /***/ (function(__unused_webpack_module, exports) {
113
+
114
+
115
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
116
+ exports.__classPrivateFieldIn = exports.__classPrivateFieldSet = exports.__classPrivateFieldGet = exports.__importDefault = exports.__importStar = exports.__makeTemplateObject = exports.__asyncValues = exports.__asyncDelegator = exports.__asyncGenerator = exports.__await = exports.__spreadArray = exports.__spreadArrays = exports.__spread = exports.__read = exports.__values = exports.__exportStar = exports.__createBinding = exports.__generator = exports.__awaiter = exports.__metadata = exports.__param = exports.__decorate = exports.__rest = exports.__assign = exports.__extends = void 0;
117
+ var extendStatics = function (d, b) {
118
+ extendStatics = Object.setPrototypeOf ||
119
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
120
+ function (d, b) { for (var p in b)
121
+ if (Object.prototype.hasOwnProperty.call(b, p))
122
+ d[p] = b[p]; };
123
+ return extendStatics(d, b);
124
+ };
125
+ function __extends(d, b) {
126
+ if (typeof b !== "function" && b !== null)
127
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
128
+ extendStatics(d, b);
129
+ function __() { this.constructor = d; }
130
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
131
+ }
132
+ exports.__extends = __extends;
133
+ var __assign = function () {
134
+ exports.__assign = Object.assign || function __assign(t) {
135
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
136
+ s = arguments[i];
137
+ for (var p in s)
138
+ if (Object.prototype.hasOwnProperty.call(s, p))
139
+ t[p] = s[p];
140
+ }
141
+ return t;
142
+ };
143
+ return exports.__assign.apply(this, arguments);
144
+ };
145
+ exports.__assign = __assign;
146
+ function __rest(s, e) {
147
+ var t = {};
148
+ for (var p in s)
149
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
150
+ t[p] = s[p];
151
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
152
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
153
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
154
+ t[p[i]] = s[p[i]];
155
+ }
156
+ return t;
157
+ }
158
+ exports.__rest = __rest;
159
+ function __decorate(decorators, target, key, desc) {
160
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
161
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
162
+ r = Reflect.decorate(decorators, target, key, desc);
163
+ else
164
+ for (var i = decorators.length - 1; i >= 0; i--)
165
+ if (d = decorators[i])
166
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
167
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
168
+ }
169
+ exports.__decorate = __decorate;
170
+ function __param(paramIndex, decorator) {
171
+ return function (target, key) { decorator(target, key, paramIndex); };
172
+ }
173
+ exports.__param = __param;
174
+ function __metadata(metadataKey, metadataValue) {
175
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
176
+ return Reflect.metadata(metadataKey, metadataValue);
177
+ }
178
+ exports.__metadata = __metadata;
179
+ function __awaiter(thisArg, _arguments, P, generator) {
180
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
181
+ return new (P || (P = Promise))(function (resolve, reject) {
182
+ function fulfilled(value) { try {
183
+ step(generator.next(value));
184
+ }
185
+ catch (e) {
186
+ reject(e);
187
+ } }
188
+ function rejected(value) { try {
189
+ step(generator["throw"](value));
190
+ }
191
+ catch (e) {
192
+ reject(e);
193
+ } }
194
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
195
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
196
+ });
197
+ }
198
+ exports.__awaiter = __awaiter;
199
+ function __generator(thisArg, body) {
200
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
201
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
202
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
203
+ function verb(n) { return function (v) { return step([n, v]); }; }
204
+ function step(op) {
205
+ if (f)
206
+ throw new TypeError("Generator is already executing.");
207
+ while (_)
208
+ try {
209
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
210
+ return t;
211
+ if (y = 0, t)
212
+ op = [op[0] & 2, t.value];
213
+ switch (op[0]) {
214
+ case 0:
215
+ case 1:
216
+ t = op;
217
+ break;
218
+ case 4:
219
+ _.label++;
220
+ return { value: op[1], done: false };
221
+ case 5:
222
+ _.label++;
223
+ y = op[1];
224
+ op = [0];
225
+ continue;
226
+ case 7:
227
+ op = _.ops.pop();
228
+ _.trys.pop();
229
+ continue;
230
+ default:
231
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
232
+ _ = 0;
233
+ continue;
234
+ }
235
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
236
+ _.label = op[1];
237
+ break;
238
+ }
239
+ if (op[0] === 6 && _.label < t[1]) {
240
+ _.label = t[1];
241
+ t = op;
242
+ break;
243
+ }
244
+ if (t && _.label < t[2]) {
245
+ _.label = t[2];
246
+ _.ops.push(op);
247
+ break;
248
+ }
249
+ if (t[2])
250
+ _.ops.pop();
251
+ _.trys.pop();
252
+ continue;
253
+ }
254
+ op = body.call(thisArg, _);
255
+ }
256
+ catch (e) {
257
+ op = [6, e];
258
+ y = 0;
259
+ }
260
+ finally {
261
+ f = t = 0;
262
+ }
263
+ if (op[0] & 5)
264
+ throw op[1];
265
+ return { value: op[0] ? op[1] : void 0, done: true };
266
+ }
267
+ }
268
+ exports.__generator = __generator;
269
+ exports.__createBinding = Object.create ? (function (o, m, k, k2) {
270
+ if (k2 === undefined)
271
+ k2 = k;
272
+ var desc = Object.getOwnPropertyDescriptor(m, k);
273
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
274
+ desc = { enumerable: true, get: function () { return m[k]; } };
275
+ }
276
+ Object.defineProperty(o, k2, desc);
277
+ }) : (function (o, m, k, k2) {
278
+ if (k2 === undefined)
279
+ k2 = k;
280
+ o[k2] = m[k];
281
+ });
282
+ function __exportStar(m, o) {
283
+ for (var p in m)
284
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
285
+ (0, exports.__createBinding)(o, m, p);
286
+ }
287
+ exports.__exportStar = __exportStar;
288
+ function __values(o) {
289
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
290
+ if (m)
291
+ return m.call(o);
292
+ if (o && typeof o.length === "number")
293
+ return {
294
+ next: function () {
295
+ if (o && i >= o.length)
296
+ o = void 0;
297
+ return { value: o && o[i++], done: !o };
298
+ }
299
+ };
300
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
301
+ }
302
+ exports.__values = __values;
303
+ function __read(o, n) {
304
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
305
+ if (!m)
306
+ return o;
307
+ var i = m.call(o), r, ar = [], e;
308
+ try {
309
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
310
+ ar.push(r.value);
311
+ }
312
+ catch (error) {
313
+ e = { error: error };
314
+ }
315
+ finally {
316
+ try {
317
+ if (r && !r.done && (m = i["return"]))
318
+ m.call(i);
319
+ }
320
+ finally {
321
+ if (e)
322
+ throw e.error;
323
+ }
324
+ }
325
+ return ar;
326
+ }
327
+ exports.__read = __read;
328
+ function __spread() {
329
+ for (var ar = [], i = 0; i < arguments.length; i++)
330
+ ar = ar.concat(__read(arguments[i]));
331
+ return ar;
332
+ }
333
+ exports.__spread = __spread;
334
+ function __spreadArrays() {
335
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
336
+ s += arguments[i].length;
337
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
338
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
339
+ r[k] = a[j];
340
+ return r;
341
+ }
342
+ exports.__spreadArrays = __spreadArrays;
343
+ function __spreadArray(to, from, pack) {
344
+ if (pack || arguments.length === 2)
345
+ for (var i = 0, l = from.length, ar; i < l; i++) {
346
+ if (ar || !(i in from)) {
347
+ if (!ar)
348
+ ar = Array.prototype.slice.call(from, 0, i);
349
+ ar[i] = from[i];
350
+ }
351
+ }
352
+ return to.concat(ar || Array.prototype.slice.call(from));
353
+ }
354
+ exports.__spreadArray = __spreadArray;
355
+ function __await(v) {
356
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
357
+ }
358
+ exports.__await = __await;
359
+ function __asyncGenerator(thisArg, _arguments, generator) {
360
+ if (!Symbol.asyncIterator)
361
+ throw new TypeError("Symbol.asyncIterator is not defined.");
362
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
363
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
364
+ function verb(n) { if (g[n])
365
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
366
+ function resume(n, v) { try {
367
+ step(g[n](v));
368
+ }
369
+ catch (e) {
370
+ settle(q[0][3], e);
371
+ } }
372
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
373
+ function fulfill(value) { resume("next", value); }
374
+ function reject(value) { resume("throw", value); }
375
+ function settle(f, v) { if (f(v), q.shift(), q.length)
376
+ resume(q[0][0], q[0][1]); }
377
+ }
378
+ exports.__asyncGenerator = __asyncGenerator;
379
+ function __asyncDelegator(o) {
380
+ var i, p;
381
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
382
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
383
+ }
384
+ exports.__asyncDelegator = __asyncDelegator;
385
+ function __asyncValues(o) {
386
+ if (!Symbol.asyncIterator)
387
+ throw new TypeError("Symbol.asyncIterator is not defined.");
388
+ var m = o[Symbol.asyncIterator], i;
389
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
390
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
391
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
392
+ }
393
+ exports.__asyncValues = __asyncValues;
394
+ function __makeTemplateObject(cooked, raw) {
395
+ if (Object.defineProperty) {
396
+ Object.defineProperty(cooked, "raw", { value: raw });
397
+ }
398
+ else {
399
+ cooked.raw = raw;
400
+ }
401
+ return cooked;
402
+ }
403
+ exports.__makeTemplateObject = __makeTemplateObject;
404
+ ;
405
+ var __setModuleDefault = Object.create ? (function (o, v) {
406
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
407
+ }) : function (o, v) {
408
+ o["default"] = v;
409
+ };
410
+ function __importStar(mod) {
411
+ if (mod && mod.__esModule)
412
+ return mod;
413
+ var result = {};
414
+ if (mod != null)
415
+ for (var k in mod)
416
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
417
+ (0, exports.__createBinding)(result, mod, k);
418
+ __setModuleDefault(result, mod);
419
+ return result;
420
+ }
421
+ exports.__importStar = __importStar;
422
+ function __importDefault(mod) {
423
+ return (mod && mod.__esModule) ? mod : { default: mod };
424
+ }
425
+ exports.__importDefault = __importDefault;
426
+ function __classPrivateFieldGet(receiver, state, kind, f) {
427
+ if (kind === "a" && !f)
428
+ throw new TypeError("Private accessor was defined without a getter");
429
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
430
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
431
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
432
+ }
433
+ exports.__classPrivateFieldGet = __classPrivateFieldGet;
434
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
435
+ if (kind === "m")
436
+ throw new TypeError("Private method is not writable");
437
+ if (kind === "a" && !f)
438
+ throw new TypeError("Private accessor was defined without a setter");
439
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
440
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
441
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
442
+ }
443
+ exports.__classPrivateFieldSet = __classPrivateFieldSet;
444
+ function __classPrivateFieldIn(state, receiver) {
445
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
446
+ throw new TypeError("Cannot use 'in' operator on non-object");
447
+ return typeof state === "function" ? receiver === state : state.has(receiver);
448
+ }
449
+ exports.__classPrivateFieldIn = __classPrivateFieldIn;
450
+
451
+
452
+ /***/ }),
453
+
454
+ /***/ 14722:
455
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
456
+
457
+
458
+ /*!
459
+ * Jodit Editor (https://xdsoft.net/jodit/)
460
+ * Released under MIT see LICENSE.txt in the project root for license information.
461
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
462
+ */
463
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
464
+ exports.Async = void 0;
465
+ var tslib_1 = __webpack_require__(20255);
466
+ var async_1 = __webpack_require__(97336);
467
+ var is_function_1 = __webpack_require__(84121);
468
+ var is_plain_object_1 = __webpack_require__(77184);
469
+ var is_promise_1 = __webpack_require__(30317);
470
+ var is_string_1 = __webpack_require__(40607);
471
+ var is_number_1 = __webpack_require__(93860);
472
+ var Async = (function () {
473
+ function Async() {
474
+ var _this = this;
475
+ var _a, _b, _c, _d;
476
+ this.timers = new Map();
477
+ this.promisesRejections = new Set();
478
+ this.requestsIdle = new Set();
479
+ this.requestsRaf = new Set();
480
+ this.requestIdleCallbackNative = (_b = (_a = window['requestIdleCallback']) === null || _a === void 0 ? void 0 : _a.bind(window)) !== null && _b !== void 0 ? _b : (function (callback, options) {
481
+ var _a;
482
+ var start = Date.now();
483
+ return _this.setTimeout(function () {
484
+ callback({
485
+ didTimeout: false,
486
+ timeRemaining: function () { return Math.max(0, 50 - (Date.now() - start)); }
487
+ });
488
+ }, (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : 1);
489
+ });
490
+ this.cancelIdleCallbackNative = (_d = (_c = window['cancelIdleCallback']) === null || _c === void 0 ? void 0 : _c.bind(window)) !== null && _d !== void 0 ? _d : (function (request) {
491
+ _this.clearTimeout(request);
492
+ });
493
+ this.isDestructed = false;
494
+ }
495
+ Async.prototype.delay = function (timeout) {
496
+ var _this = this;
497
+ return this.promise(function (resolve) { return _this.setTimeout(resolve, timeout); });
498
+ };
499
+ Async.prototype.setTimeout = function (callback, timeout) {
500
+ var args = [];
501
+ for (var _i = 2; _i < arguments.length; _i++) {
502
+ args[_i - 2] = arguments[_i];
503
+ }
504
+ if (this.isDestructed) {
505
+ return 0;
506
+ }
507
+ var options = {};
508
+ if (!(0, is_number_1.isNumber)(timeout)) {
509
+ options = timeout;
510
+ timeout = options.timeout || 0;
511
+ }
512
+ if (options.label) {
513
+ this.clearLabel(options.label);
514
+ }
515
+ var timer = async_1.setTimeout.apply(void 0, tslib_1.__spreadArray([callback, timeout], tslib_1.__read(args), false)), key = options.label || timer;
516
+ this.timers.set(key, timer);
517
+ return timer;
518
+ };
519
+ Async.prototype.clearLabel = function (label) {
520
+ if (label && this.timers.has(label)) {
521
+ (0, async_1.clearTimeout)(this.timers.get(label));
522
+ this.timers.delete(label);
523
+ }
524
+ };
525
+ Async.prototype.clearTimeout = function (timerOrLabel) {
526
+ if ((0, is_string_1.isString)(timerOrLabel)) {
527
+ return this.clearLabel(timerOrLabel);
528
+ }
529
+ (0, async_1.clearTimeout)(timerOrLabel);
530
+ this.timers.delete(timerOrLabel);
531
+ };
532
+ Async.prototype.debounce = function (fn, timeout, firstCallImmediately) {
533
+ var _this = this;
534
+ if (firstCallImmediately === void 0) { firstCallImmediately = false; }
535
+ var timer = 0, fired = false;
536
+ var promises = [];
537
+ var callFn = function () {
538
+ var args = [];
539
+ for (var _i = 0; _i < arguments.length; _i++) {
540
+ args[_i] = arguments[_i];
541
+ }
542
+ if (!fired) {
543
+ timer = 0;
544
+ var res = fn.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
545
+ fired = true;
546
+ if (promises.length) {
547
+ var runPromises = function () {
548
+ promises.forEach(function (res) { return res(); });
549
+ promises.length = 0;
550
+ };
551
+ (0, is_promise_1.isPromise)(res) ? res.finally(runPromises) : runPromises();
552
+ }
553
+ }
554
+ };
555
+ var onFire = function () {
556
+ var args = [];
557
+ for (var _i = 0; _i < arguments.length; _i++) {
558
+ args[_i] = arguments[_i];
559
+ }
560
+ fired = false;
561
+ if (!timeout) {
562
+ callFn.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
563
+ }
564
+ else {
565
+ if (!timer && firstCallImmediately) {
566
+ callFn.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
567
+ }
568
+ (0, async_1.clearTimeout)(timer);
569
+ timer = _this.setTimeout(function () { return callFn.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false)); }, (0, is_function_1.isFunction)(timeout) ? timeout() : timeout);
570
+ _this.timers.set(fn, timer);
571
+ }
572
+ };
573
+ return (0, is_plain_object_1.isPlainObject)(timeout) && timeout.promisify
574
+ ? function () {
575
+ var args = [];
576
+ for (var _i = 0; _i < arguments.length; _i++) {
577
+ args[_i] = arguments[_i];
578
+ }
579
+ var promise = _this.promise(function (res) {
580
+ promises.push(res);
581
+ });
582
+ onFire.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(args), false));
583
+ return promise;
584
+ }
585
+ : onFire;
586
+ };
587
+ Async.prototype.throttle = function (fn, timeout, ignore) {
588
+ var _this = this;
589
+ if (ignore === void 0) { ignore = false; }
590
+ var timer = null, needInvoke, callee, lastArgs;
591
+ return function () {
592
+ var args = [];
593
+ for (var _i = 0; _i < arguments.length; _i++) {
594
+ args[_i] = arguments[_i];
595
+ }
596
+ needInvoke = true;
597
+ lastArgs = args;
598
+ if (!timeout) {
599
+ fn.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(lastArgs), false));
600
+ return;
601
+ }
602
+ if (!timer) {
603
+ callee = function () {
604
+ if (needInvoke) {
605
+ fn.apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(lastArgs), false));
606
+ needInvoke = false;
607
+ timer = _this.setTimeout(callee, (0, is_function_1.isFunction)(timeout) ? timeout() : timeout);
608
+ _this.timers.set(callee, timer);
609
+ }
610
+ else {
611
+ timer = null;
612
+ }
613
+ };
614
+ callee();
615
+ }
616
+ };
617
+ };
618
+ Async.prototype.promise = function (executor) {
619
+ var _this = this;
620
+ var rejectCallback = function () { };
621
+ var promise = new Promise(function (resolve, reject) {
622
+ _this.promisesRejections.add(reject);
623
+ rejectCallback = reject;
624
+ return executor(resolve, reject);
625
+ });
626
+ if (!promise.finally && "es5" !== 'es2018') {
627
+ promise.finally = function (onfinally) {
628
+ promise.then(onfinally).catch(onfinally);
629
+ return promise;
630
+ };
631
+ }
632
+ promise
633
+ .finally(function () {
634
+ _this.promisesRejections.delete(rejectCallback);
635
+ })
636
+ .catch(function () { return null; });
637
+ promise.rejectCallback = rejectCallback;
638
+ return promise;
639
+ };
640
+ Async.prototype.promiseState = function (p) {
641
+ var _this = this;
642
+ if (p.status) {
643
+ return p.status;
644
+ }
645
+ if (!Promise.race) {
646
+ return new Promise(function (resolve) {
647
+ p.then(function (v) {
648
+ resolve('fulfilled');
649
+ return v;
650
+ }, function (e) {
651
+ resolve('rejected');
652
+ throw e;
653
+ });
654
+ _this.setTimeout(function () {
655
+ resolve('pending');
656
+ }, 100);
657
+ });
658
+ }
659
+ var t = {};
660
+ return Promise.race([p, t]).then(function (v) { return (v === t ? 'pending' : 'fulfilled'); }, function () { return 'rejected'; });
661
+ };
662
+ Async.prototype.requestIdleCallback = function (callback, options) {
663
+ var request = this.requestIdleCallbackNative(callback, options);
664
+ this.requestsIdle.add(request);
665
+ return request;
666
+ };
667
+ Async.prototype.requestIdlePromise = function (options) {
668
+ var _this = this;
669
+ return this.promise(function (res) {
670
+ var request = _this.requestIdleCallback(function () { return res(request); }, options);
671
+ });
672
+ };
673
+ Async.prototype.cancelIdleCallback = function (request) {
674
+ this.requestsIdle.delete(request);
675
+ return this.cancelIdleCallbackNative(request);
676
+ };
677
+ Async.prototype.requestAnimationFrame = function (callback) {
678
+ var request = requestAnimationFrame(callback);
679
+ this.requestsRaf.add(request);
680
+ return request;
681
+ };
682
+ Async.prototype.cancelAnimationFrame = function (request) {
683
+ this.requestsRaf.delete(request);
684
+ cancelAnimationFrame(request);
685
+ };
686
+ Async.prototype.clear = function () {
687
+ var _this = this;
688
+ this.requestsIdle.forEach(function (key) { return _this.cancelIdleCallback(key); });
689
+ this.requestsRaf.forEach(function (key) { return _this.cancelAnimationFrame(key); });
690
+ this.timers.forEach(function (key) {
691
+ return (0, async_1.clearTimeout)(_this.timers.get(key));
692
+ });
693
+ this.timers.clear();
694
+ this.promisesRejections.forEach(function (reject) { return reject(); });
695
+ this.promisesRejections.clear();
696
+ };
697
+ Async.prototype.destruct = function () {
698
+ this.clear();
699
+ this.isDestructed = true;
700
+ };
701
+ return Async;
702
+ }());
703
+ exports.Async = Async;
704
+
705
+
706
+ /***/ }),
707
+
708
+ /***/ 60588:
709
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
710
+
711
+
712
+ /*!
713
+ * Jodit Editor (https://xdsoft.net/jodit/)
714
+ * Released under MIT see LICENSE.txt in the project root for license information.
715
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
716
+ */
717
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
718
+ var tslib_1 = __webpack_require__(20255);
719
+ tslib_1.__exportStar(__webpack_require__(14722), exports);
720
+
721
+
722
+ /***/ }),
723
+
724
+ /***/ 97336:
725
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
726
+
727
+
728
+ /*!
729
+ * Jodit Editor (https://xdsoft.net/jodit/)
730
+ * Released under MIT see LICENSE.txt in the project root for license information.
731
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
732
+ */
733
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
734
+ var tslib_1 = __webpack_require__(20255);
735
+ tslib_1.__exportStar(__webpack_require__(60232), exports);
736
+
737
+
738
+ /***/ }),
739
+
740
+ /***/ 60232:
741
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
742
+
743
+
744
+ /*!
745
+ * Jodit Editor (https://xdsoft.net/jodit/)
746
+ * Released under MIT see LICENSE.txt in the project root for license information.
747
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
748
+ */
749
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
750
+ exports.clearTimeout = exports.setTimeout = void 0;
751
+ var tslib_1 = __webpack_require__(20255);
752
+ function setTimeout(callback, timeout) {
753
+ var args = [];
754
+ for (var _i = 2; _i < arguments.length; _i++) {
755
+ args[_i - 2] = arguments[_i];
756
+ }
757
+ if (!timeout) {
758
+ callback.call.apply(callback, tslib_1.__spreadArray([null], tslib_1.__read(args), false));
759
+ }
760
+ else {
761
+ return window.setTimeout.apply(window, tslib_1.__spreadArray([callback, timeout], tslib_1.__read(args), false));
762
+ }
763
+ return 0;
764
+ }
765
+ exports.setTimeout = setTimeout;
766
+ function clearTimeout(timer) {
767
+ window.clearTimeout(timer);
768
+ }
769
+ exports.clearTimeout = clearTimeout;
770
+
771
+
772
+ /***/ }),
773
+
774
+ /***/ 2555:
775
+ /***/ (function(__unused_webpack_module, exports) {
776
+
777
+
778
+ /*!
779
+ * Jodit Editor (https://xdsoft.net/jodit/)
780
+ * Released under MIT see LICENSE.txt in the project root for license information.
781
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
782
+ */
783
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
784
+ exports.isArray = void 0;
785
+ function isArray(elm) {
786
+ return Array.isArray(elm);
787
+ }
788
+ exports.isArray = isArray;
789
+
790
+
791
+ /***/ }),
792
+
793
+ /***/ 84121:
794
+ /***/ (function(__unused_webpack_module, exports) {
795
+
796
+
797
+ /*!
798
+ * Jodit Editor (https://xdsoft.net/jodit/)
799
+ * Released under MIT see LICENSE.txt in the project root for license information.
800
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
801
+ */
802
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
803
+ exports.isFunction = void 0;
804
+ function isFunction(value) {
805
+ return typeof value === 'function';
806
+ }
807
+ exports.isFunction = isFunction;
808
+
809
+
810
+ /***/ }),
811
+
812
+ /***/ 93860:
813
+ /***/ (function(__unused_webpack_module, exports) {
814
+
815
+
816
+ /*!
817
+ * Jodit Editor (https://xdsoft.net/jodit/)
818
+ * Released under MIT see LICENSE.txt in the project root for license information.
819
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
820
+ */
821
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
822
+ exports.isNumber = void 0;
823
+ function isNumber(value) {
824
+ return typeof value === 'number' && !isNaN(value) && isFinite(value);
825
+ }
826
+ exports.isNumber = isNumber;
827
+
828
+
829
+ /***/ }),
830
+
831
+ /***/ 77184:
832
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
833
+
834
+
835
+ /*!
836
+ * Jodit Editor (https://xdsoft.net/jodit/)
837
+ * Released under MIT see LICENSE.txt in the project root for license information.
838
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
839
+ */
840
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
841
+ exports.isPlainObject = void 0;
842
+ var is_window_1 = __webpack_require__(99562);
843
+ function isPlainObject(obj) {
844
+ if (!obj || typeof obj !== 'object' || obj.nodeType || (0, is_window_1.isWindow)(obj)) {
845
+ return false;
846
+ }
847
+ return !(obj.constructor &&
848
+ !{}.hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'));
849
+ }
850
+ exports.isPlainObject = isPlainObject;
851
+
852
+
853
+ /***/ }),
854
+
855
+ /***/ 30317:
856
+ /***/ (function(__unused_webpack_module, exports) {
857
+
858
+
859
+ /*!
860
+ * Jodit Editor (https://xdsoft.net/jodit/)
861
+ * Released under MIT see LICENSE.txt in the project root for license information.
862
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
863
+ */
864
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
865
+ exports.isPromise = void 0;
866
+ function isPromise(val) {
867
+ return val && typeof val.then === 'function';
868
+ }
869
+ exports.isPromise = isPromise;
870
+
871
+
872
+ /***/ }),
873
+
874
+ /***/ 40607:
875
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
876
+
877
+
878
+ /*!
879
+ * Jodit Editor (https://xdsoft.net/jodit/)
880
+ * Released under MIT see LICENSE.txt in the project root for license information.
881
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
882
+ */
883
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
884
+ exports.isStringArray = exports.isString = void 0;
885
+ var is_array_1 = __webpack_require__(2555);
886
+ function isString(value) {
887
+ return typeof value === 'string';
888
+ }
889
+ exports.isString = isString;
890
+ function isStringArray(value) {
891
+ return (0, is_array_1.isArray)(value) && isString(value[0]);
892
+ }
893
+ exports.isStringArray = isStringArray;
894
+
895
+
896
+ /***/ }),
897
+
898
+ /***/ 99562:
899
+ /***/ (function(__unused_webpack_module, exports) {
900
+
901
+
902
+ /*!
903
+ * Jodit Editor (https://xdsoft.net/jodit/)
904
+ * Released under MIT see LICENSE.txt in the project root for license information.
905
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
906
+ */
907
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
908
+ exports.isWindow = void 0;
909
+ function isWindow(obj) {
910
+ return obj != null && obj === obj.window;
911
+ }
912
+ exports.isWindow = isWindow;
913
+
914
+
915
+ /***/ }),
916
+
917
+ /***/ 36211:
918
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
919
+
920
+
921
+ /*!
922
+ * Jodit Editor (https://xdsoft.net/jodit/)
923
+ * Released under MIT see LICENSE.txt in the project root for license information.
924
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
925
+ */
926
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
927
+ exports.domToVDom = exports.attrsToDict = void 0;
928
+ var tslib_1 = __webpack_require__(20255);
929
+ function attrsToDict(elm) {
930
+ var _a, _b;
931
+ var result = {};
932
+ if (elm.nodeName === 'SCRIPT') {
933
+ result.textContent = (_a = elm.textContent) !== null && _a !== void 0 ? _a : '';
934
+ }
935
+ if (elm.nodeType === Node.TEXT_NODE) {
936
+ result.nodeValue = (_b = elm.nodeValue) !== null && _b !== void 0 ? _b : '';
937
+ }
938
+ if (elm instanceof HTMLElement) {
939
+ for (var i = 0; i < elm.attributes.length; i += 1) {
940
+ var attr = elm.attributes.item(i);
941
+ if (attr) {
942
+ result[attr.name] = attr.value;
943
+ }
944
+ }
945
+ }
946
+ return result;
947
+ }
948
+ exports.attrsToDict = attrsToDict;
949
+ function domToVDom(elm, noNode) {
950
+ var _a;
951
+ if (noNode === void 0) { noNode = true; }
952
+ if (elm.nodeType === Node.TEXT_NODE) {
953
+ return {
954
+ type: 'TEXT_ELEMENT',
955
+ props: {
956
+ children: [],
957
+ nodeValue: (_a = elm.nodeValue) !== null && _a !== void 0 ? _a : ''
958
+ }
959
+ };
960
+ }
961
+ return {
962
+ type: elm.nodeName.toLowerCase(),
963
+ props: tslib_1.__assign({ children: Array.from(elm.childNodes).map(function (n) { return domToVDom(n, noNode); }) }, attrsToDict(elm))
964
+ };
965
+ }
966
+ exports.domToVDom = domToVDom;
967
+
968
+
969
+ /***/ }),
970
+
971
+ /***/ 23336:
972
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
973
+
974
+
975
+ /*!
976
+ * Jodit Editor (https://xdsoft.net/jodit/)
977
+ * Released under MIT see LICENSE.txt in the project root for license information.
978
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
979
+ */
980
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
981
+ var tslib_1 = __webpack_require__(20255);
982
+ tslib_1.__exportStar(__webpack_require__(66814), exports);
983
+ tslib_1.__exportStar(__webpack_require__(52464), exports);
984
+ tslib_1.__exportStar(__webpack_require__(53401), exports);
985
+
986
+
987
+ /***/ }),
988
+
989
+ /***/ 66814:
990
+ /***/ (function(__unused_webpack_module, exports) {
991
+
992
+
993
+ /*!
994
+ * Jodit Editor (https://xdsoft.net/jodit/)
995
+ * Released under MIT see LICENSE.txt in the project root for license information.
996
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
997
+ */
998
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
999
+
1000
+
1001
+ /***/ }),
1002
+
1003
+ /***/ 52464:
1004
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1005
+
1006
+
1007
+ /*!
1008
+ * Jodit Editor (https://xdsoft.net/jodit/)
1009
+ * Released under MIT see LICENSE.txt in the project root for license information.
1010
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1011
+ */
1012
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1013
+ exports.VDomRender = void 0;
1014
+ var tslib_1 = __webpack_require__(20255);
1015
+ var helpers_1 = __webpack_require__(36211);
1016
+ var async_1 = __webpack_require__(60588);
1017
+ var autobind_decorator_1 = __webpack_require__(70631);
1018
+ var isProperty = function (key) { return key !== 'children'; };
1019
+ var isNew = function (prev, next) {
1020
+ return function (key) {
1021
+ return prev[key] !== next[key];
1022
+ };
1023
+ };
1024
+ var isGone = function (prev, next) {
1025
+ return function (key) {
1026
+ return !(key in next);
1027
+ };
1028
+ };
1029
+ var updateDom = function (dom, prevProps, nextProps) {
1030
+ Object.keys(prevProps)
1031
+ .filter(isProperty)
1032
+ .filter(isGone(prevProps, nextProps))
1033
+ .forEach(function (name) {
1034
+ dom[name] = '';
1035
+ });
1036
+ Object.keys(nextProps)
1037
+ .filter(isProperty)
1038
+ .filter(isNew(prevProps, nextProps))
1039
+ .forEach(function (name) {
1040
+ dom[name] = nextProps[name];
1041
+ });
1042
+ };
1043
+ var createDom = function (fiber) {
1044
+ var dom = fiber.type === 'TEXT_ELEMENT'
1045
+ ? document.createTextNode('')
1046
+ : document.createElement(fiber.type);
1047
+ updateDom(dom, {}, fiber.props);
1048
+ return dom;
1049
+ };
1050
+ var VDomRender = (function () {
1051
+ function VDomRender() {
1052
+ this.async = new async_1.Async();
1053
+ this.nextUnitOfWork = undefined;
1054
+ this.currentRoot = undefined;
1055
+ this.wipRoot = undefined;
1056
+ this.deletions = [];
1057
+ this.async.requestIdleCallback(this.workLoop);
1058
+ }
1059
+ VDomRender.prototype.commitRoot = function () {
1060
+ var _a;
1061
+ this.deletions.forEach(this.commitWork);
1062
+ this.deletions.length = 0;
1063
+ this.commitWork((_a = this.wipRoot) === null || _a === void 0 ? void 0 : _a.child);
1064
+ this.currentRoot = this.wipRoot;
1065
+ this.wipRoot = undefined;
1066
+ };
1067
+ VDomRender.prototype.commitWork = function (fiber) {
1068
+ var _a, _b;
1069
+ if (!fiber) {
1070
+ return;
1071
+ }
1072
+ var domParentFiber = fiber.parent;
1073
+ while (!(domParentFiber === null || domParentFiber === void 0 ? void 0 : domParentFiber.dom)) {
1074
+ domParentFiber = domParentFiber === null || domParentFiber === void 0 ? void 0 : domParentFiber.parent;
1075
+ }
1076
+ var domParent = domParentFiber.dom;
1077
+ if (fiber.effectTag === 'PLACEMENT' && fiber.dom != null) {
1078
+ domParent.appendChild(fiber.dom);
1079
+ }
1080
+ else if (fiber.effectTag === 'UPDATE' && fiber.dom != null) {
1081
+ updateDom(fiber.dom, (_b = (_a = fiber.alternate) === null || _a === void 0 ? void 0 : _a.props) !== null && _b !== void 0 ? _b : {}, fiber.props);
1082
+ }
1083
+ else if (fiber.effectTag === 'DELETION') {
1084
+ this.commitDeletion(fiber, domParent);
1085
+ }
1086
+ this.commitWork(fiber === null || fiber === void 0 ? void 0 : fiber.child);
1087
+ this.commitWork(fiber === null || fiber === void 0 ? void 0 : fiber.sibling);
1088
+ };
1089
+ VDomRender.prototype.commitDeletion = function (fiber, domParent) {
1090
+ if (fiber === null || fiber === void 0 ? void 0 : fiber.dom) {
1091
+ domParent.removeChild(fiber.dom);
1092
+ }
1093
+ else {
1094
+ this.commitDeletion(fiber === null || fiber === void 0 ? void 0 : fiber.child, domParent);
1095
+ }
1096
+ };
1097
+ VDomRender.prototype.render = function (element, container) {
1098
+ var _a;
1099
+ this.wipRoot = {
1100
+ type: 'div',
1101
+ dom: container,
1102
+ props: {
1103
+ children: [element]
1104
+ },
1105
+ alternate: (_a = this.currentRoot) !== null && _a !== void 0 ? _a : undefined
1106
+ };
1107
+ this.deletions = [];
1108
+ this.nextUnitOfWork = this.wipRoot;
1109
+ };
1110
+ VDomRender.prototype.workLoop = function (deadline) {
1111
+ var shouldYield = false;
1112
+ while (this.nextUnitOfWork && !shouldYield) {
1113
+ this.nextUnitOfWork = this.performUnitOfWork(this.nextUnitOfWork);
1114
+ shouldYield = deadline.timeRemaining() < 1;
1115
+ }
1116
+ if (!this.nextUnitOfWork && this.wipRoot) {
1117
+ this.commitRoot();
1118
+ }
1119
+ this.async.requestIdleCallback(this.workLoop);
1120
+ };
1121
+ VDomRender.prototype.performUnitOfWork = function (fiber) {
1122
+ this.__updateHostComponent(fiber);
1123
+ if (fiber.child) {
1124
+ return fiber.child;
1125
+ }
1126
+ var nextFiber = fiber;
1127
+ while (nextFiber) {
1128
+ if (nextFiber.sibling) {
1129
+ return nextFiber.sibling;
1130
+ }
1131
+ nextFiber = nextFiber.parent;
1132
+ }
1133
+ return;
1134
+ };
1135
+ VDomRender.prototype.__updateHostComponent = function (fiber) {
1136
+ if (!fiber.dom) {
1137
+ fiber.dom = createDom(fiber);
1138
+ }
1139
+ this.__reconcileChildren(fiber, fiber.props.children);
1140
+ };
1141
+ VDomRender.prototype.__reconcileChildren = function (wipFiber, elements) {
1142
+ var index = 0;
1143
+ var oldFiber = wipFiber.alternate && wipFiber.alternate.child;
1144
+ var prevSibling = undefined;
1145
+ while (index < elements.length || oldFiber) {
1146
+ var element = elements[index];
1147
+ var newFiber = undefined;
1148
+ var sameType = oldFiber && element && element.type === oldFiber.type;
1149
+ if (sameType && oldFiber) {
1150
+ newFiber = {
1151
+ type: oldFiber.type,
1152
+ props: element.props,
1153
+ dom: oldFiber.dom,
1154
+ parent: wipFiber,
1155
+ alternate: oldFiber,
1156
+ effectTag: 'UPDATE'
1157
+ };
1158
+ }
1159
+ if (element && !sameType) {
1160
+ newFiber = {
1161
+ type: element.type,
1162
+ props: element.props,
1163
+ dom: null,
1164
+ parent: wipFiber,
1165
+ alternate: undefined,
1166
+ effectTag: 'PLACEMENT'
1167
+ };
1168
+ }
1169
+ if (oldFiber && !sameType) {
1170
+ oldFiber.effectTag = 'DELETION';
1171
+ this.deletions.push(oldFiber);
1172
+ }
1173
+ if (oldFiber) {
1174
+ oldFiber = oldFiber.sibling;
1175
+ }
1176
+ if (index === 0 && wipFiber) {
1177
+ wipFiber.child = newFiber;
1178
+ }
1179
+ else if (element && prevSibling) {
1180
+ prevSibling.sibling = newFiber;
1181
+ }
1182
+ prevSibling = newFiber;
1183
+ index++;
1184
+ }
1185
+ };
1186
+ VDomRender.prototype.htmlToVDom = function (html) {
1187
+ var box = document.createElement('div');
1188
+ box.innerHTML = html;
1189
+ return (0, helpers_1.domToVDom)(box.children.length > 1 || !box.firstChild ? box : box.firstChild);
1190
+ };
1191
+ VDomRender = tslib_1.__decorate([
1192
+ autobind_decorator_1.default
1193
+ ], VDomRender);
1194
+ return VDomRender;
1195
+ }());
1196
+ exports.VDomRender = VDomRender;
1197
+
1198
+
1199
+ /***/ }),
1200
+
1201
+ /***/ 53401:
1202
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1203
+
1204
+
1205
+ /*!
1206
+ * Jodit Editor (https://xdsoft.net/jodit/)
1207
+ * Released under MIT see LICENSE.txt in the project root for license information.
1208
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1209
+ */
1210
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1211
+ exports.VDomJodit = void 0;
1212
+ __webpack_require__(8058);
1213
+ var render_1 = __webpack_require__(52464);
1214
+ var VDomJodit = (function () {
1215
+ function VDomJodit(elm) {
1216
+ var _a;
1217
+ this.render = new render_1.VDomRender();
1218
+ this.container = document.createElement('div');
1219
+ elm.style.display = 'none';
1220
+ (_a = elm.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.container, elm);
1221
+ this.container.setAttribute('contenteditable', 'true');
1222
+ this.container.classList.add('jodit-v-dom-container');
1223
+ this.value = elm.value;
1224
+ this.preventAllInputEvents();
1225
+ }
1226
+ Object.defineProperty(VDomJodit.prototype, "value", {
1227
+ set: function (v) {
1228
+ this.vdom = this.render.htmlToVDom(v);
1229
+ this.render.render(this.vdom, this.container);
1230
+ },
1231
+ enumerable: false,
1232
+ configurable: true
1233
+ });
1234
+ VDomJodit.make = function (elm) {
1235
+ return new VDomJodit(elm);
1236
+ };
1237
+ VDomJodit.prototype.preventAllInputEvents = function () {
1238
+ this.container.addEventListener('keydown', function (e) {
1239
+ e.preventDefault();
1240
+ });
1241
+ };
1242
+ return VDomJodit;
1243
+ }());
1244
+ exports.VDomJodit = VDomJodit;
1245
+
1246
+
1247
+ /***/ })
1248
+
1249
+ /******/ });
1250
+ /************************************************************************/
1251
+ /******/ // The module cache
1252
+ /******/ var __webpack_module_cache__ = {};
1253
+ /******/
1254
+ /******/ // The require function
1255
+ /******/ function __webpack_require__(moduleId) {
1256
+ /******/ // Check if module is in cache
1257
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1258
+ /******/ if (cachedModule !== undefined) {
1259
+ /******/ return cachedModule.exports;
1260
+ /******/ }
1261
+ /******/ // Create a new module (and put it into the cache)
1262
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1263
+ /******/ // no module.id needed
1264
+ /******/ // no module.loaded needed
1265
+ /******/ exports: {}
1266
+ /******/ };
1267
+ /******/
1268
+ /******/ // Execute the module function
1269
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1270
+ /******/
1271
+ /******/ // Return the exports of the module
1272
+ /******/ return module.exports;
1273
+ /******/ }
1274
+ /******/
1275
+ /************************************************************************/
1276
+ /******/ /* webpack/runtime/make namespace object */
1277
+ /******/ !function() {
1278
+ /******/ // define __esModule on exports
1279
+ /******/ __webpack_require__.r = function(exports) {
1280
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1281
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1282
+ /******/ }
1283
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1284
+ /******/ };
1285
+ /******/ }();
1286
+ /******/
1287
+ /************************************************************************/
1288
+ /******/
1289
+ /******/ // startup
1290
+ /******/ // Load entry module and return exports
1291
+ /******/ // This entry module is referenced by other modules so it can't be inlined
1292
+ /******/ var __webpack_exports__ = __webpack_require__(23336);
1293
+ /******/
1294
+ /******/ return __webpack_exports__;
1295
+ /******/ })()
1296
+ ;
1297
+ });