@uxland/primary-shell 7.37.2 → 7.38.1

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.
@@ -70,7 +70,7 @@ function require_Reflect() {
70
70
  }
71
71
  }, fe = Object.getPrototypeOf(Function), be = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Yt(), me = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : ks(), ge = typeof WeakMap == "function" ? WeakMap : ts(), ve = oe ? Symbol.for("@reflect-metadata:registry") : void 0, _e = Ft(), we = zt(_e);
72
72
  function Se(it, nt, vt, St) {
73
- if (Be(vt)) {
73
+ if (Ve(vt)) {
74
74
  if (!qt(it))
75
75
  throw new TypeError();
76
76
  if (!Nt(nt))
@@ -79,9 +79,9 @@ function require_Reflect() {
79
79
  } else {
80
80
  if (!qt(it))
81
81
  throw new TypeError();
82
- if (!Ve(nt))
82
+ if (!Be(nt))
83
83
  throw new TypeError();
84
- if (!Ve(St) && !Be(St) && !Xe(St))
84
+ if (!Be(St) && !Ve(St) && !Xe(St))
85
85
  throw new TypeError();
86
86
  return Xe(St) && (St = void 0), vt = kt(vt), ze(it, nt, vt, St);
87
87
  }
@@ -89,9 +89,9 @@ function require_Reflect() {
89
89
  J("decorate", Se);
90
90
  function ye(it, nt) {
91
91
  function vt(St, It) {
92
- if (!Ve(St))
92
+ if (!Be(St))
93
93
  throw new TypeError();
94
- if (!Be(It) && !Vt(It))
94
+ if (!Ve(It) && !Bt(It))
95
95
  throw new TypeError();
96
96
  Qe(it, nt, St, It);
97
97
  }
@@ -99,66 +99,66 @@ function require_Reflect() {
99
99
  }
100
100
  J("metadata", ye);
101
101
  function Ce(it, nt, vt, St) {
102
- if (!Ve(vt))
102
+ if (!Be(vt))
103
103
  throw new TypeError();
104
- return Be(St) || (St = kt(St)), Qe(it, nt, vt, St);
104
+ return Ve(St) || (St = kt(St)), Qe(it, nt, vt, St);
105
105
  }
106
106
  J("defineMetadata", Ce);
107
107
  function Pe(it, nt, vt) {
108
- if (!Ve(nt))
108
+ if (!Be(nt))
109
109
  throw new TypeError();
110
- return Be(vt) || (vt = kt(vt)), We(it, nt, vt);
110
+ return Ve(vt) || (vt = kt(vt)), We(it, nt, vt);
111
111
  }
112
112
  J("hasMetadata", Pe);
113
113
  function De(it, nt, vt) {
114
- if (!Ve(nt))
114
+ if (!Be(nt))
115
115
  throw new TypeError();
116
- return Be(vt) || (vt = kt(vt)), Ge(it, nt, vt);
116
+ return Ve(vt) || (vt = kt(vt)), Ge(it, nt, vt);
117
117
  }
118
118
  J("hasOwnMetadata", De);
119
119
  function Fe(it, nt, vt) {
120
- if (!Ve(nt))
120
+ if (!Be(nt))
121
121
  throw new TypeError();
122
- return Be(vt) || (vt = kt(vt)), Ye(it, nt, vt);
122
+ return Ve(vt) || (vt = kt(vt)), Ye(it, nt, vt);
123
123
  }
124
124
  J("getMetadata", Fe);
125
125
  function He(it, nt, vt) {
126
- if (!Ve(nt))
126
+ if (!Be(nt))
127
127
  throw new TypeError();
128
- return Be(vt) || (vt = kt(vt)), ft(it, nt, vt);
128
+ return Ve(vt) || (vt = kt(vt)), ft(it, nt, vt);
129
129
  }
130
130
  J("getOwnMetadata", He);
131
131
  function qe(it, nt) {
132
- if (!Ve(it))
132
+ if (!Be(it))
133
133
  throw new TypeError();
134
- return Be(nt) || (nt = kt(nt)), Ze(it, nt);
134
+ return Ve(nt) || (nt = kt(nt)), Ze(it, nt);
135
135
  }
136
136
  J("getMetadataKeys", qe);
137
137
  function Ae(it, nt) {
138
- if (!Ve(it))
138
+ if (!Be(it))
139
139
  throw new TypeError();
140
- return Be(nt) || (nt = kt(nt)), Me(it, nt);
140
+ return Ve(nt) || (nt = kt(nt)), Me(it, nt);
141
141
  }
142
142
  J("getOwnMetadataKeys", Ae);
143
143
  function Le(it, nt, vt) {
144
- if (!Ve(nt))
144
+ if (!Be(nt))
145
145
  throw new TypeError();
146
- if (Be(vt) || (vt = kt(vt)), !Ve(nt))
146
+ if (Ve(vt) || (vt = kt(vt)), !Be(nt))
147
147
  throw new TypeError();
148
- Be(vt) || (vt = kt(vt));
148
+ Ve(vt) || (vt = kt(vt));
149
149
  var St = ds(
150
150
  nt,
151
151
  vt,
152
152
  /*Create*/
153
153
  !1
154
154
  );
155
- return Be(St) ? !1 : St.OrdinaryDeleteMetadata(it, nt, vt);
155
+ return Ve(St) ? !1 : St.OrdinaryDeleteMetadata(it, nt, vt);
156
156
  }
157
157
  J("deleteMetadata", Le);
158
158
  function Ie(it, nt) {
159
159
  for (var vt = it.length - 1; vt >= 0; --vt) {
160
160
  var St = it[vt], It = St(nt);
161
- if (!Be(It) && !Xe(It)) {
161
+ if (!Ve(It) && !Xe(It)) {
162
162
  if (!Nt(It))
163
163
  throw new TypeError();
164
164
  nt = It;
@@ -169,8 +169,8 @@ function require_Reflect() {
169
169
  function ze(it, nt, vt, St) {
170
170
  for (var It = it.length - 1; It >= 0; --It) {
171
171
  var os = it[It], ls = os(nt, vt, St);
172
- if (!Be(ls) && !Xe(ls)) {
173
- if (!Ve(ls))
172
+ if (!Ve(ls) && !Xe(ls)) {
173
+ if (!Be(ls))
174
174
  throw new TypeError();
175
175
  St = ls;
176
176
  }
@@ -191,7 +191,7 @@ function require_Reflect() {
191
191
  /*Create*/
192
192
  !1
193
193
  );
194
- return Be(St) ? !1 : ot(St.OrdinaryHasOwnMetadata(it, nt, vt));
194
+ return Ve(St) ? !1 : ot(St.OrdinaryHasOwnMetadata(it, nt, vt));
195
195
  }
196
196
  function Ye(it, nt, vt) {
197
197
  var St = Ge(it, nt, vt);
@@ -208,7 +208,7 @@ function require_Reflect() {
208
208
  /*Create*/
209
209
  !1
210
210
  );
211
- if (!Be(St))
211
+ if (!Ve(St))
212
212
  return St.OrdinaryGetOwnMetadata(it, nt, vt);
213
213
  }
214
214
  function Qe(it, nt, vt, St) {
@@ -229,8 +229,8 @@ function require_Reflect() {
229
229
  return vt;
230
230
  if (vt.length <= 0)
231
231
  return It;
232
- for (var os = new me(), ls = [], Bt = 0, At = vt; Bt < At.length; Bt++) {
233
- var Tt = At[Bt], Dt = os.has(Tt);
232
+ for (var os = new me(), ls = [], Vt = 0, At = vt; Vt < At.length; Vt++) {
233
+ var Tt = At[Vt], Dt = os.has(Tt);
234
234
  Dt || (os.add(Tt), ls.push(Tt));
235
235
  }
236
236
  for (var Ot = 0, Ht = It; Ot < Ht.length; Ot++) {
@@ -268,7 +268,7 @@ function require_Reflect() {
268
268
  return 6;
269
269
  }
270
270
  }
271
- function Be(it) {
271
+ function Ve(it) {
272
272
  return it === void 0;
273
273
  }
274
274
  function Xe(it) {
@@ -277,7 +277,7 @@ function require_Reflect() {
277
277
  function Je(it) {
278
278
  return typeof it == "symbol";
279
279
  }
280
- function Ve(it) {
280
+ function Be(it) {
281
281
  return typeof it == "object" ? it !== null : typeof it == "function";
282
282
  }
283
283
  function Ke(it, nt) {
@@ -298,7 +298,7 @@ function require_Reflect() {
298
298
  var vt = "string", St = Kt(it, ne);
299
299
  if (St !== void 0) {
300
300
  var It = St.call(it, vt);
301
- if (Ve(It))
301
+ if (Be(It))
302
302
  throw new TypeError();
303
303
  return It;
304
304
  }
@@ -310,13 +310,13 @@ function require_Reflect() {
310
310
  var os = it.toString;
311
311
  if (Lt(os)) {
312
312
  var St = os.call(it);
313
- if (!Ve(St))
313
+ if (!Be(St))
314
314
  return St;
315
315
  }
316
316
  var vt = it.valueOf;
317
317
  if (Lt(vt)) {
318
318
  var St = vt.call(it);
319
- if (!Ve(St))
319
+ if (!Be(St))
320
320
  return St;
321
321
  }
322
322
  }
@@ -341,7 +341,7 @@ function require_Reflect() {
341
341
  function Nt(it) {
342
342
  return typeof it == "function";
343
343
  }
344
- function Vt(it) {
344
+ function Bt(it) {
345
345
  switch (je(it)) {
346
346
  case 3:
347
347
  return !0;
@@ -367,7 +367,7 @@ function require_Reflect() {
367
367
  if (!Lt(nt))
368
368
  throw new TypeError();
369
369
  var vt = nt.call(it);
370
- if (!Ve(vt))
370
+ if (!Be(vt))
371
371
  throw new TypeError();
372
372
  return vt;
373
373
  }
@@ -394,7 +394,7 @@ function require_Reflect() {
394
394
  }
395
395
  function Mt() {
396
396
  var it;
397
- !Be(ve) && typeof te.Reflect < "u" && !(ve in te.Reflect) && typeof te.Reflect.defineMetadata == "function" && (it = cs(te.Reflect));
397
+ !Ve(ve) && typeof te.Reflect < "u" && !(ve in te.Reflect) && typeof te.Reflect.defineMetadata == "function" && (it = cs(te.Reflect));
398
398
  var nt, vt, St, It = new ge(), os = {
399
399
  registerProvider: ls,
400
400
  getProvider: At,
@@ -407,12 +407,12 @@ function require_Reflect() {
407
407
  switch (!0) {
408
408
  case it === Ot:
409
409
  break;
410
- case Be(nt):
410
+ case Ve(nt):
411
411
  nt = Ot;
412
412
  break;
413
413
  case nt === Ot:
414
414
  break;
415
- case Be(vt):
415
+ case Ve(vt):
416
416
  vt = Ot;
417
417
  break;
418
418
  case vt === Ot:
@@ -422,14 +422,14 @@ function require_Reflect() {
422
422
  break;
423
423
  }
424
424
  }
425
- function Bt(Ot, Ht) {
426
- if (!Be(nt)) {
425
+ function Vt(Ot, Ht) {
426
+ if (!Ve(nt)) {
427
427
  if (nt.isProviderFor(Ot, Ht))
428
428
  return nt;
429
- if (!Be(vt)) {
429
+ if (!Ve(vt)) {
430
430
  if (vt.isProviderFor(Ot, Ht))
431
431
  return nt;
432
- if (!Be(St))
432
+ if (!Ve(St))
433
433
  for (var Xt = gt(St); ; ) {
434
434
  var ns = xt(Xt);
435
435
  if (!ns)
@@ -440,34 +440,34 @@ function require_Reflect() {
440
440
  }
441
441
  }
442
442
  }
443
- if (!Be(it) && it.isProviderFor(Ot, Ht))
443
+ if (!Ve(it) && it.isProviderFor(Ot, Ht))
444
444
  return it;
445
445
  }
446
446
  function At(Ot, Ht) {
447
447
  var Xt = It.get(Ot), ns;
448
- return Be(Xt) || (ns = Xt.get(Ht)), Be(ns) && (ns = Bt(Ot, Ht), Be(ns) || (Be(Xt) && (Xt = new be(), It.set(Ot, Xt)), Xt.set(Ht, ns))), ns;
448
+ return Ve(Xt) || (ns = Xt.get(Ht)), Ve(ns) && (ns = Vt(Ot, Ht), Ve(ns) || (Ve(Xt) && (Xt = new be(), It.set(Ot, Xt)), Xt.set(Ht, ns))), ns;
449
449
  }
450
450
  function Tt(Ot) {
451
- if (Be(Ot))
451
+ if (Ve(Ot))
452
452
  throw new TypeError();
453
- return nt === Ot || vt === Ot || !Be(St) && St.has(Ot);
453
+ return nt === Ot || vt === Ot || !Ve(St) && St.has(Ot);
454
454
  }
455
455
  function Dt(Ot, Ht, Xt) {
456
456
  if (!Tt(Xt))
457
457
  throw new Error("Metadata provider not registered.");
458
458
  var ns = At(Ot, Ht);
459
459
  if (ns !== Xt) {
460
- if (!Be(ns))
460
+ if (!Ve(ns))
461
461
  return !1;
462
462
  var ps = It.get(Ot);
463
- Be(ps) && (ps = new be(), It.set(Ot, ps)), ps.set(Ht, Xt);
463
+ Ve(ps) && (ps = new be(), It.set(Ot, ps)), ps.set(Ht, Xt);
464
464
  }
465
465
  return !0;
466
466
  }
467
467
  }
468
468
  function Ft() {
469
469
  var it;
470
- return !Be(ve) && Ve(te.Reflect) && Object.isExtensible(te.Reflect) && (it = te.Reflect[ve]), Be(it) && (it = Mt()), !Be(ve) && Ve(te.Reflect) && Object.isExtensible(te.Reflect) && Object.defineProperty(te.Reflect, ve, {
470
+ return !Ve(ve) && Be(te.Reflect) && Object.isExtensible(te.Reflect) && (it = te.Reflect[ve]), Ve(it) && (it = Mt()), !Ve(ve) && Be(te.Reflect) && Object.isExtensible(te.Reflect) && Object.defineProperty(te.Reflect, ve, {
471
471
  enumerable: !1,
472
472
  configurable: !1,
473
473
  writable: !1,
@@ -478,24 +478,24 @@ function require_Reflect() {
478
478
  var nt = new ge(), vt = {
479
479
  isProviderFor: function(Tt, Dt) {
480
480
  var Ot = nt.get(Tt);
481
- return Be(Ot) ? !1 : Ot.has(Dt);
481
+ return Ve(Ot) ? !1 : Ot.has(Dt);
482
482
  },
483
483
  OrdinaryDefineOwnMetadata: ls,
484
484
  OrdinaryHasOwnMetadata: It,
485
485
  OrdinaryGetOwnMetadata: os,
486
- OrdinaryOwnMetadataKeys: Bt,
486
+ OrdinaryOwnMetadataKeys: Vt,
487
487
  OrdinaryDeleteMetadata: At
488
488
  };
489
489
  return _e.registerProvider(vt), vt;
490
490
  function St(Tt, Dt, Ot) {
491
491
  var Ht = nt.get(Tt), Xt = !1;
492
- if (Be(Ht)) {
492
+ if (Ve(Ht)) {
493
493
  if (!Ot)
494
494
  return;
495
495
  Ht = new be(), nt.set(Tt, Ht), Xt = !0;
496
496
  }
497
497
  var ns = Ht.get(Dt);
498
- if (Be(ns)) {
498
+ if (Ve(ns)) {
499
499
  if (!Ot)
500
500
  return;
501
501
  if (ns = new be(), Ht.set(Dt, ns), !it.setProvider(Tt, Dt, vt))
@@ -510,7 +510,7 @@ function require_Reflect() {
510
510
  /*Create*/
511
511
  !1
512
512
  );
513
- return Be(Ht) ? !1 : ot(Ht.has(Tt));
513
+ return Ve(Ht) ? !1 : ot(Ht.has(Tt));
514
514
  }
515
515
  function os(Tt, Dt, Ot) {
516
516
  var Ht = St(
@@ -519,7 +519,7 @@ function require_Reflect() {
519
519
  /*Create*/
520
520
  !1
521
521
  );
522
- if (!Be(Ht))
522
+ if (!Ve(Ht))
523
523
  return Ht.get(Tt);
524
524
  }
525
525
  function ls(Tt, Dt, Ot, Ht) {
@@ -531,14 +531,14 @@ function require_Reflect() {
531
531
  );
532
532
  Xt.set(Tt, Dt);
533
533
  }
534
- function Bt(Tt, Dt) {
534
+ function Vt(Tt, Dt) {
535
535
  var Ot = [], Ht = St(
536
536
  Tt,
537
537
  Dt,
538
538
  /*Create*/
539
539
  !1
540
540
  );
541
- if (Be(Ht))
541
+ if (Ve(Ht))
542
542
  return Ot;
543
543
  for (var Xt = Ht.keys(), ns = gt(Xt), ps = 0; ; ) {
544
544
  var Es = xt(ns);
@@ -564,20 +564,20 @@ function require_Reflect() {
564
564
  /*Create*/
565
565
  !1
566
566
  );
567
- if (Be(Ht) || !Ht.delete(Tt))
567
+ if (Ve(Ht) || !Ht.delete(Tt))
568
568
  return !1;
569
569
  if (Ht.size === 0) {
570
570
  var Xt = nt.get(Dt);
571
- Be(Xt) || (Xt.delete(Ot), Xt.size === 0 && nt.delete(Xt));
571
+ Ve(Xt) || (Xt.delete(Ot), Xt.size === 0 && nt.delete(Xt));
572
572
  }
573
573
  return !0;
574
574
  }
575
575
  }
576
576
  function cs(it) {
577
- var nt = it.defineMetadata, vt = it.hasOwnMetadata, St = it.getOwnMetadata, It = it.getOwnMetadataKeys, os = it.deleteMetadata, ls = new ge(), Bt = {
577
+ var nt = it.defineMetadata, vt = it.hasOwnMetadata, St = it.getOwnMetadata, It = it.getOwnMetadataKeys, os = it.deleteMetadata, ls = new ge(), Vt = {
578
578
  isProviderFor: function(At, Tt) {
579
579
  var Dt = ls.get(At);
580
- return !Be(Dt) && Dt.has(Tt) ? !0 : It(At, Tt).length ? (Be(Dt) && (Dt = new me(), ls.set(At, Dt)), Dt.add(Tt), !0) : !1;
580
+ return !Ve(Dt) && Dt.has(Tt) ? !0 : It(At, Tt).length ? (Ve(Dt) && (Dt = new me(), ls.set(At, Dt)), Dt.add(Tt), !0) : !1;
581
581
  },
582
582
  OrdinaryDefineOwnMetadata: nt,
583
583
  OrdinaryHasOwnMetadata: vt,
@@ -585,11 +585,11 @@ function require_Reflect() {
585
585
  OrdinaryOwnMetadataKeys: It,
586
586
  OrdinaryDeleteMetadata: os
587
587
  };
588
- return Bt;
588
+ return Vt;
589
589
  }
590
590
  function ds(it, nt, vt) {
591
591
  var St = _e.getProvider(it, nt);
592
- if (!Be(St))
592
+ if (!Ve(St))
593
593
  return St;
594
594
  if (vt) {
595
595
  if (_e.setProvider(it, nt, we))
@@ -601,59 +601,59 @@ function require_Reflect() {
601
601
  var it = {}, nt = [], vt = (
602
602
  /** @class */
603
603
  (function() {
604
- function Bt(At, Tt, Dt) {
604
+ function Vt(At, Tt, Dt) {
605
605
  this._index = 0, this._keys = At, this._values = Tt, this._selector = Dt;
606
606
  }
607
- return Bt.prototype["@@iterator"] = function() {
607
+ return Vt.prototype["@@iterator"] = function() {
608
608
  return this;
609
- }, Bt.prototype[de] = function() {
609
+ }, Vt.prototype[de] = function() {
610
610
  return this;
611
- }, Bt.prototype.next = function() {
611
+ }, Vt.prototype.next = function() {
612
612
  var At = this._index;
613
613
  if (At >= 0 && At < this._keys.length) {
614
614
  var Tt = this._selector(this._keys[At], this._values[At]);
615
615
  return At + 1 >= this._keys.length ? (this._index = -1, this._keys = nt, this._values = nt) : this._index++, { value: Tt, done: !1 };
616
616
  }
617
617
  return { value: void 0, done: !0 };
618
- }, Bt.prototype.throw = function(At) {
618
+ }, Vt.prototype.throw = function(At) {
619
619
  throw this._index >= 0 && (this._index = -1, this._keys = nt, this._values = nt), At;
620
- }, Bt.prototype.return = function(At) {
620
+ }, Vt.prototype.return = function(At) {
621
621
  return this._index >= 0 && (this._index = -1, this._keys = nt, this._values = nt), { value: At, done: !0 };
622
- }, Bt;
622
+ }, Vt;
623
623
  })()
624
624
  ), St = (
625
625
  /** @class */
626
626
  (function() {
627
- function Bt() {
627
+ function Vt() {
628
628
  this._keys = [], this._values = [], this._cacheKey = it, this._cacheIndex = -2;
629
629
  }
630
- return Object.defineProperty(Bt.prototype, "size", {
630
+ return Object.defineProperty(Vt.prototype, "size", {
631
631
  get: function() {
632
632
  return this._keys.length;
633
633
  },
634
634
  enumerable: !0,
635
635
  configurable: !0
636
- }), Bt.prototype.has = function(At) {
636
+ }), Vt.prototype.has = function(At) {
637
637
  return this._find(
638
638
  At,
639
639
  /*insert*/
640
640
  !1
641
641
  ) >= 0;
642
- }, Bt.prototype.get = function(At) {
642
+ }, Vt.prototype.get = function(At) {
643
643
  var Tt = this._find(
644
644
  At,
645
645
  /*insert*/
646
646
  !1
647
647
  );
648
648
  return Tt >= 0 ? this._values[Tt] : void 0;
649
- }, Bt.prototype.set = function(At, Tt) {
649
+ }, Vt.prototype.set = function(At, Tt) {
650
650
  var Dt = this._find(
651
651
  At,
652
652
  /*insert*/
653
653
  !0
654
654
  );
655
655
  return this._values[Dt] = Tt, this;
656
- }, Bt.prototype.delete = function(At) {
656
+ }, Vt.prototype.delete = function(At) {
657
657
  var Tt = this._find(
658
658
  At,
659
659
  /*insert*/
@@ -665,19 +665,19 @@ function require_Reflect() {
665
665
  return this._keys.length--, this._values.length--, rs(At, this._cacheKey) && (this._cacheKey = it, this._cacheIndex = -2), !0;
666
666
  }
667
667
  return !1;
668
- }, Bt.prototype.clear = function() {
668
+ }, Vt.prototype.clear = function() {
669
669
  this._keys.length = 0, this._values.length = 0, this._cacheKey = it, this._cacheIndex = -2;
670
- }, Bt.prototype.keys = function() {
670
+ }, Vt.prototype.keys = function() {
671
671
  return new vt(this._keys, this._values, It);
672
- }, Bt.prototype.values = function() {
672
+ }, Vt.prototype.values = function() {
673
673
  return new vt(this._keys, this._values, os);
674
- }, Bt.prototype.entries = function() {
674
+ }, Vt.prototype.entries = function() {
675
675
  return new vt(this._keys, this._values, ls);
676
- }, Bt.prototype["@@iterator"] = function() {
676
+ }, Vt.prototype["@@iterator"] = function() {
677
677
  return this.entries();
678
- }, Bt.prototype[de] = function() {
678
+ }, Vt.prototype[de] = function() {
679
679
  return this.entries();
680
- }, Bt.prototype._find = function(At, Tt) {
680
+ }, Vt.prototype._find = function(At, Tt) {
681
681
  if (!rs(this._cacheKey, At)) {
682
682
  this._cacheIndex = -1;
683
683
  for (var Dt = 0; Dt < this._keys.length; Dt++)
@@ -687,18 +687,18 @@ function require_Reflect() {
687
687
  }
688
688
  }
689
689
  return this._cacheIndex < 0 && Tt && (this._cacheIndex = this._keys.length, this._keys.push(At), this._values.push(void 0)), this._cacheIndex;
690
- }, Bt;
690
+ }, Vt;
691
691
  })()
692
692
  );
693
693
  return St;
694
- function It(Bt, At) {
695
- return Bt;
694
+ function It(Vt, At) {
695
+ return Vt;
696
696
  }
697
- function os(Bt, At) {
697
+ function os(Vt, At) {
698
698
  return At;
699
699
  }
700
- function ls(Bt, At) {
701
- return [Bt, At];
700
+ function ls(Vt, At) {
701
+ return [Vt, At];
702
702
  }
703
703
  }
704
704
  function ks() {
@@ -781,7 +781,7 @@ function require_Reflect() {
781
781
  function St() {
782
782
  var At;
783
783
  do
784
- At = "@@WeakMap@@" + Bt();
784
+ At = "@@WeakMap@@" + Vt();
785
785
  while (pe.has(nt, At));
786
786
  return nt[At] = !0, At;
787
787
  }
@@ -805,7 +805,7 @@ function require_Reflect() {
805
805
  }
806
806
  return os(new Array(At), At);
807
807
  }
808
- function Bt() {
808
+ function Vt() {
809
809
  var At = ls(it);
810
810
  At[6] = At[6] & 79 | 64, At[8] = At[8] & 191 | 128;
811
811
  for (var Tt = "", Dt = 0; Dt < it; ++Dt) {
@@ -3514,6 +3514,26 @@ class EcapEventManagerImpl {
3514
3514
  }
3515
3515
  }
3516
3516
  const createEcapEventManager = (X) => new EcapEventManagerImpl(X);
3517
+ class ExitGuardManagerImpl {
3518
+ constructor() {
3519
+ this.guards = /* @__PURE__ */ new Map();
3520
+ }
3521
+ register(W, J) {
3522
+ this.guards.set(W, J);
3523
+ }
3524
+ unregister(W) {
3525
+ this.guards.delete(W);
3526
+ }
3527
+ async canExit() {
3528
+ for (const W of this.guards.values())
3529
+ try {
3530
+ if (!await W()) return !1;
3531
+ } catch (J) {
3532
+ console.error("Exit guard failed:", J);
3533
+ }
3534
+ return !0;
3535
+ }
3536
+ }
3517
3537
  class PrimariaGlobalStateManagerImpl {
3518
3538
  constructor(W) {
3519
3539
  this.broker = W, this.state = {};
@@ -4796,11 +4816,11 @@ const resolveConfig = (X) => {
4796
4816
  duplex: "half"
4797
4817
  }), je;
4798
4818
  if (utils$1.isFormData(_e) && (je = Me.headers.get("content-type")) && Fe.setContentType(je), Me.body) {
4799
- const [Be, Xe] = progressEventDecorator(
4819
+ const [Ve, Xe] = progressEventDecorator(
4800
4820
  We,
4801
4821
  progressEventReducer(asyncDecorator(Pe))
4802
4822
  );
4803
- _e = trackStream(Me.body, DEFAULT_CHUNK_SIZE, Be, Xe);
4823
+ _e = trackStream(Me.body, DEFAULT_CHUNK_SIZE, Ve, Xe);
4804
4824
  }
4805
4825
  }
4806
4826
  utils$1.isString(He) || (He = He ? "include" : "omit");
@@ -4821,12 +4841,12 @@ const resolveConfig = (X) => {
4821
4841
  ["status", "statusText", "headers"].forEach((Je) => {
4822
4842
  Me[Je] = ft[Je];
4823
4843
  });
4824
- const je = utils$1.toFiniteNumber(ft.headers.get("content-length")), [Be, Xe] = Ce && progressEventDecorator(
4844
+ const je = utils$1.toFiniteNumber(ft.headers.get("content-length")), [Ve, Xe] = Ce && progressEventDecorator(
4825
4845
  je,
4826
4846
  progressEventReducer(asyncDecorator(Ce), !0)
4827
4847
  ) || [];
4828
4848
  ft = new te(
4829
- trackStream(ft.body, DEFAULT_CHUNK_SIZE, Be, () => {
4849
+ trackStream(ft.body, DEFAULT_CHUNK_SIZE, Ve, () => {
4830
4850
  Xe && Xe(), ze && ze();
4831
4851
  }),
4832
4852
  Me
@@ -5911,11 +5931,11 @@ function peg$parse(X, W) {
5911
5931
  return vs.pop(), Oe.replace(/\s*$/, "");
5912
5932
  }, Ge = ",", Ye = us(",", !1), ft = "number", Qe = us("number", !1), Ze = function(Oe, Ue, tt) {
5913
5933
  return __assign$4({ type: Ue === "number" ? TYPE.number : Ue === "date" ? TYPE.date : TYPE.time, style: tt && tt[2], value: Oe }, _s());
5914
- }, Me = "'", je = us("'", !1), Be = /^[^']/, Xe = $s(["'"], !0, !1), Je = /^[^a-zA-Z'{}]/, Ve = $s([["a", "z"], ["A", "Z"], "'", "{", "}"], !0, !1), Ke = /^[a-zA-Z]/, rt = $s([["a", "z"], ["A", "Z"]], !1, !1), ot = function(Oe) {
5934
+ }, Me = "'", je = us("'", !1), Ve = /^[^']/, Xe = $s(["'"], !0, !1), Je = /^[^a-zA-Z'{}]/, Be = $s([["a", "z"], ["A", "Z"], "'", "{", "}"], !0, !1), Ke = /^[a-zA-Z]/, rt = $s([["a", "z"], ["A", "Z"]], !1, !1), ot = function(Oe) {
5915
5935
  return __assign$4({ type: 1, pattern: Oe }, _s());
5916
5936
  }, _t = function() {
5917
5937
  return vs.push("dateOrTimeArgStyle"), !0;
5918
- }, kt = "date", qt = us("date", !1), Lt = "time", Nt = us("time", !1), Vt = "plural", rs = us("plural", !1), Kt = "selectordinal", gt = us("selectordinal", !1), mt = "offset:", xt = us("offset:", !1), Ct = function(Oe, Ue, tt, bt) {
5938
+ }, kt = "date", qt = us("date", !1), Lt = "time", Nt = us("time", !1), Bt = "plural", rs = us("plural", !1), Kt = "selectordinal", gt = us("selectordinal", !1), mt = "offset:", xt = us("offset:", !1), Ct = function(Oe, Ue, tt, bt) {
5919
5939
  return __assign$4({ type: TYPE.plural, pluralType: Ue === "plural" ? "cardinal" : "ordinal", value: Oe, offset: tt ? tt[2] : 0, options: bt.reduce(function(wt, Pt) {
5920
5940
  var es = Pt.id, jt = Pt.value, fs = Pt.location;
5921
5941
  return es in wt && li('Duplicate option "' + es + '" in plural element: "' + ai() + '"', qs()), wt[es] = {
@@ -5945,7 +5965,7 @@ function peg$parse(X, W) {
5945
5965
  id: Oe,
5946
5966
  value: Ue
5947
5967
  }, _s());
5948
- }, hs = bs("whitespace"), it = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, nt = $s([[" ", "\r"], " ", "…", " ", " ", [" ", " "], "\u2028", "\u2029", " ", " ", " "], !1, !1), vt = bs("syntax pattern"), St = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/, It = $s([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["¡", "§"], "©", "«", "¬", "®", "°", "±", "¶", "»", "¿", "×", "÷", ["‐", "‧"], ["‰", "‾"], ["⁁", "⁓"], ["⁕", "⁞"], ["←", "⑟"], ["─", "❵"], ["➔", "⯿"], ["⸀", "⹿"], ["、", "〃"], ["〈", "〠"], "〰", "﴾", "﴿", "﹅", "﹆"], !1, !1), os = bs("optional whitespace"), ls = bs("number"), Bt = "-", At = us("-", !1), Tt = function(Oe, Ue) {
5968
+ }, hs = bs("whitespace"), it = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, nt = $s([[" ", "\r"], " ", "…", " ", " ", [" ", " "], "\u2028", "\u2029", " ", " ", " "], !1, !1), vt = bs("syntax pattern"), St = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/, It = $s([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["¡", "§"], "©", "«", "¬", "®", "°", "±", "¶", "»", "¿", "×", "÷", ["‐", "‧"], ["‰", "‾"], ["⁁", "⁓"], ["⁕", "⁞"], ["←", "⑟"], ["─", "❵"], ["➔", "⯿"], ["⸀", "⹿"], ["、", "〃"], ["〈", "〠"], "〰", "﴾", "﴿", "﹅", "﹆"], !1, !1), os = bs("optional whitespace"), ls = bs("number"), Vt = "-", At = us("-", !1), Tt = function(Oe, Ue) {
5949
5969
  return Ue ? Oe ? -Ue : Ue : 0;
5950
5970
  }, Dt = bs("double apostrophes"), Ot = "''", Ht = us("''", !1), Xt = function() {
5951
5971
  return "'";
@@ -5974,7 +5994,7 @@ function peg$parse(X, W) {
5974
5994
  return Os(Gt, Ne);
5975
5995
  }
5976
5996
  function li(Oe, Ue) {
5977
- throw Ue = Ue !== void 0 ? Ue : Os(Gt, Ne), Bi(Oe, Ue);
5997
+ throw Ue = Ue !== void 0 ? Ue : Os(Gt, Ne), Vi(Oe, Ue);
5978
5998
  }
5979
5999
  function us(Oe, Ue) {
5980
6000
  return { type: "literal", text: Oe, ignoreCase: Ue };
@@ -6022,10 +6042,10 @@ function peg$parse(X, W) {
6022
6042
  function Et(Oe) {
6023
6043
  Ne < ms || (Ne > ms && (ms = Ne, Ls = []), Ls.push(Oe));
6024
6044
  }
6025
- function Bi(Oe, Ue) {
6045
+ function Vi(Oe, Ue) {
6026
6046
  return new SyntaxError(Oe, [], "", Ue);
6027
6047
  }
6028
- function Vi(Oe, Ue, tt) {
6048
+ function Bi(Oe, Ue, tt) {
6029
6049
  return new SyntaxError(SyntaxError.buildMessage(Oe, Ue), Oe, Ue, tt);
6030
6050
  }
6031
6051
  function ci() {
@@ -6109,18 +6129,18 @@ function peg$parse(X, W) {
6109
6129
  function bi() {
6110
6130
  var Oe, Ue, tt, bt;
6111
6131
  if (Oe = Ne, X.charCodeAt(Ne) === 39 ? (Ue = Me, Ne++) : (Ue = J, yt === 0 && Et(je)), Ue !== J) {
6112
- if (tt = [], bt = xs(), bt === J && (Be.test(X.charAt(Ne)) ? (bt = X.charAt(Ne), Ne++) : (bt = J, yt === 0 && Et(Xe))), bt !== J)
6132
+ if (tt = [], bt = xs(), bt === J && (Ve.test(X.charAt(Ne)) ? (bt = X.charAt(Ne), Ne++) : (bt = J, yt === 0 && Et(Xe))), bt !== J)
6113
6133
  for (; bt !== J; )
6114
- tt.push(bt), bt = xs(), bt === J && (Be.test(X.charAt(Ne)) ? (bt = X.charAt(Ne), Ne++) : (bt = J, yt === 0 && Et(Xe)));
6134
+ tt.push(bt), bt = xs(), bt === J && (Ve.test(X.charAt(Ne)) ? (bt = X.charAt(Ne), Ne++) : (bt = J, yt === 0 && Et(Xe)));
6115
6135
  else
6116
6136
  tt = J;
6117
6137
  tt !== J ? (X.charCodeAt(Ne) === 39 ? (bt = Me, Ne++) : (bt = J, yt === 0 && Et(je)), bt !== J ? (Ue = [Ue, tt, bt], Oe = Ue) : (Ne = Oe, Oe = J)) : (Ne = Oe, Oe = J);
6118
6138
  } else
6119
6139
  Ne = Oe, Oe = J;
6120
6140
  if (Oe === J)
6121
- if (Oe = [], Ue = xs(), Ue === J && (Je.test(X.charAt(Ne)) ? (Ue = X.charAt(Ne), Ne++) : (Ue = J, yt === 0 && Et(Ve))), Ue !== J)
6141
+ if (Oe = [], Ue = xs(), Ue === J && (Je.test(X.charAt(Ne)) ? (Ue = X.charAt(Ne), Ne++) : (Ue = J, yt === 0 && Et(Be))), Ue !== J)
6122
6142
  for (; Ue !== J; )
6123
- Oe.push(Ue), Ue = xs(), Ue === J && (Je.test(X.charAt(Ne)) ? (Ue = X.charAt(Ne), Ne++) : (Ue = J, yt === 0 && Et(Ve)));
6143
+ Oe.push(Ue), Ue = xs(), Ue === J && (Je.test(X.charAt(Ne)) ? (Ue = X.charAt(Ne), Ne++) : (Ue = J, yt === 0 && Et(Be)));
6124
6144
  else
6125
6145
  Oe = J;
6126
6146
  return Oe;
@@ -6163,7 +6183,7 @@ function peg$parse(X, W) {
6163
6183
  if (wt = Ut(), wt !== J)
6164
6184
  if (X.charCodeAt(Ne) === 44 ? (Pt = Ge, Ne++) : (Pt = J, yt === 0 && Et(Ye)), Pt !== J)
6165
6185
  if (es = Ut(), es !== J)
6166
- if (X.substr(Ne, 6) === Vt ? (jt = Vt, Ne += 6) : (jt = J, yt === 0 && Et(rs)), jt === J && (X.substr(Ne, 13) === Kt ? (jt = Kt, Ne += 13) : (jt = J, yt === 0 && Et(gt))), jt !== J)
6186
+ if (X.substr(Ne, 6) === Bt ? (jt = Bt, Ne += 6) : (jt = J, yt === 0 && Et(rs)), jt === J && (X.substr(Ne, 13) === Kt ? (jt = Kt, Ne += 13) : (jt = J, yt === 0 && Et(gt))), jt !== J)
6167
6187
  if (fs = Ut(), fs !== J)
6168
6188
  if (X.charCodeAt(Ne) === 44 ? (Wt = Ge, Ne++) : (Wt = J, yt === 0 && Et(Ye)), Wt !== J)
6169
6189
  if (as = Ut(), as !== J)
@@ -6269,7 +6289,7 @@ function peg$parse(X, W) {
6269
6289
  }
6270
6290
  function yi() {
6271
6291
  var Oe, Ue, tt;
6272
- return yt++, Oe = Ne, X.charCodeAt(Ne) === 45 ? (Ue = Bt, Ne++) : (Ue = J, yt === 0 && Et(At)), Ue === J && (Ue = null), Ue !== J ? (tt = xi(), tt !== J ? (Gt = Oe, Ue = Tt(Ue, tt), Oe = Ue) : (Ne = Oe, Oe = J)) : (Ne = Oe, Oe = J), yt--, Oe === J && (Ue = J, yt === 0 && Et(ls)), Oe;
6292
+ return yt++, Oe = Ne, X.charCodeAt(Ne) === 45 ? (Ue = Vt, Ne++) : (Ue = J, yt === 0 && Et(At)), Ue === J && (Ue = null), Ue !== J ? (tt = xi(), tt !== J ? (Gt = Oe, Ue = Tt(Ue, tt), Oe = Ue) : (Ne = Oe, Oe = J)) : (Ne = Oe, Oe = J), yt--, Oe === J && (Ue = J, yt === 0 && Et(ls)), Oe;
6273
6293
  }
6274
6294
  function xs() {
6275
6295
  var Oe, Ue;
@@ -6279,8 +6299,8 @@ function peg$parse(X, W) {
6279
6299
  var Oe, Ue, tt, bt, wt, Pt;
6280
6300
  if (Oe = Ne, X.charCodeAt(Ne) === 39 ? (Ue = Me, Ne++) : (Ue = J, yt === 0 && Et(je)), Ue !== J)
6281
6301
  if (tt = or(), tt !== J) {
6282
- for (bt = Ne, wt = [], X.substr(Ne, 2) === Ot ? (Pt = Ot, Ne += 2) : (Pt = J, yt === 0 && Et(Ht)), Pt === J && (Be.test(X.charAt(Ne)) ? (Pt = X.charAt(Ne), Ne++) : (Pt = J, yt === 0 && Et(Xe))); Pt !== J; )
6283
- wt.push(Pt), X.substr(Ne, 2) === Ot ? (Pt = Ot, Ne += 2) : (Pt = J, yt === 0 && Et(Ht)), Pt === J && (Be.test(X.charAt(Ne)) ? (Pt = X.charAt(Ne), Ne++) : (Pt = J, yt === 0 && Et(Xe)));
6302
+ for (bt = Ne, wt = [], X.substr(Ne, 2) === Ot ? (Pt = Ot, Ne += 2) : (Pt = J, yt === 0 && Et(Ht)), Pt === J && (Ve.test(X.charAt(Ne)) ? (Pt = X.charAt(Ne), Ne++) : (Pt = J, yt === 0 && Et(Xe))); Pt !== J; )
6303
+ wt.push(Pt), X.substr(Ne, 2) === Ot ? (Pt = Ot, Ne += 2) : (Pt = J, yt === 0 && Et(Ht)), Pt === J && (Ve.test(X.charAt(Ne)) ? (Pt = X.charAt(Ne), Ne++) : (Pt = J, yt === 0 && Et(Xe)));
6284
6304
  wt !== J ? bt = X.substring(bt, Ne) : bt = wt, bt !== J ? (X.charCodeAt(Ne) === 39 ? (wt = Me, Ne++) : (wt = J, yt === 0 && Et(je)), wt === J && (wt = null), wt !== J ? (Gt = Oe, Ue = ns(tt, bt), Oe = Ue) : (Ne = Oe, Oe = J)) : (Ne = Oe, Oe = J);
6285
6305
  } else
6286
6306
  Ne = Oe, Oe = J;
@@ -6336,7 +6356,7 @@ function peg$parse(X, W) {
6336
6356
  }
6337
6357
  if (Ts = re(), Ts !== J && Ne === X.length)
6338
6358
  return Ts;
6339
- throw Ts !== J && Ne < X.length && Et(Hi()), Vi(Ls, ms < X.length ? X.charAt(ms) : null, ms < X.length ? Os(ms, ms + 1) : Os(ms, ms));
6359
+ throw Ts !== J && Ne < X.length && Et(Hi()), Bi(Ls, ms < X.length ? X.charAt(ms) : null, ms < X.length ? Os(ms, ms + 1) : Os(ms, ms));
6340
6360
  }
6341
6361
  var pegParse = peg$parse, __spreadArrays$2 = function() {
6342
6362
  for (var X = 0, W = 0, J = arguments.length; W < J; W++) X += arguments[W].length;
@@ -9460,15 +9480,15 @@ const createPdfViewerManager = (X, W) => new PdfViewerManager(X, W), styles$o =
9460
9480
  )}
9461
9481
  </div>
9462
9482
  </div>
9463
- `, Bs = class Bs extends h$p {
9483
+ `, Vs = class Vs extends h$p {
9464
9484
  render() {
9465
9485
  return ke$1`${template$p(this)}`;
9466
9486
  }
9467
9487
  };
9468
- Bs.styles = i$T`
9488
+ Vs.styles = i$T`
9469
9489
  ${r$L(styles$o)}
9470
9490
  `;
9471
- let PluginBusyList = Bs;
9491
+ let PluginBusyList = Vs;
9472
9492
  class PluginBusyManagerImpl {
9473
9493
  constructor() {
9474
9494
  this.tasks = [], customElements.get("plugin-busy-list") || t$w("plugin-busy-list")(PluginBusyList);
@@ -9547,7 +9567,8 @@ class RegionManagerProxy {
9547
9567
  * @return {Promise<void>} A promise that resolves when the view is successfully registered.
9548
9568
  */
9549
9569
  registerView(W, J) {
9550
- return this.regionManager.registerViewWithRegion(W, `${this.pluginInfo.pluginId}::${J.id}`, J), Promise.resolve();
9570
+ const te = `${this.pluginInfo.pluginId}::${J.id}`;
9571
+ return this.regionManager.registerViewWithRegion(W, te, J), this.activateIfDefault(W, te, J), Promise.resolve();
9551
9572
  }
9552
9573
  /**
9553
9574
  * Removes a view from a specific region.
@@ -9625,6 +9646,20 @@ class RegionManagerProxy {
9625
9646
  getCurrentMainViewActive() {
9626
9647
  return this.regionManager.getRegion(this.regions.shell.main).currentActiveViews[0]?.id;
9627
9648
  }
9649
+ /**
9650
+ * Activates a view if it is marked as default and the region currently has no active views.
9651
+ *
9652
+ * @param {string} regionName - The name of the region to activate the view in.
9653
+ * @param {string} key - The key of the view to activate.
9654
+ * @param {HarmonixViewDefinition} view - The view to activate.
9655
+ * @return {void}
9656
+ */
9657
+ activateIfDefault(W, J, te) {
9658
+ if (!te.isDefault) return;
9659
+ const re = this.regionManager.getRegion(W);
9660
+ if (!re || typeof re.activate != "function") return;
9661
+ re.currentActiveViews?.length > 0 || re.activate(J);
9662
+ }
9628
9663
  _notifyMainViewChanged(W) {
9629
9664
  this.broker.publish(BROKER_EVENTS.shell.mainViewChanged, { viewId: W });
9630
9665
  }
@@ -9690,7 +9725,7 @@ class ImportDataManagerImpl {
9690
9725
  async import(W) {
9691
9726
  this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
9692
9727
  try {
9693
- const { ImportDataManagerModal: J } = await import("./component-dvdLH6KG.js"), { confirmed: te } = await this.interactionService.confirm(
9728
+ const { ImportDataManagerModal: J } = await import("./component-CWibLJ86.js"), { confirmed: te } = await this.interactionService.confirm(
9694
9729
  void 0,
9695
9730
  { component: J },
9696
9731
  {
@@ -9748,7 +9783,7 @@ class PrimariaContextManagerImpl {
9748
9783
  }
9749
9784
  }
9750
9785
  let contextManager$1;
9751
- const createContextManager = () => contextManager$1 || (contextManager$1 = new PrimariaContextManagerImpl(), contextManager$1), broker$1 = createBroker(), regionManager = f$p("primaria"), PrimariaRegionHost = v$m(regionManager), tokenManager = createTokenManager(), userManager = createUserManager(tokenManager), globalStateManager = createGlobalStateManager(broker$1), contextManager = createContextManager(), pluginBusyManager = new PluginBusyManagerImpl(), quickActionBusyManager = new QuickActionBusyManagerImpl(broker$1), interactionService = new ParimariaInteractionServiceImpl(), notificationService = new PrimariaNotificationServiceImpl(), ecapEventManager = createEcapEventManager(globalStateManager), pdfViewerManager = createPdfViewerManager(broker$1, notificationService), importDataManager = new ImportDataManagerImpl(interactionService), primariaApiFactory = (X) => {
9786
+ const createContextManager = () => contextManager$1 || (contextManager$1 = new PrimariaContextManagerImpl(), contextManager$1), broker$1 = createBroker(), regionManager = f$p("primaria"), PrimariaRegionHost = v$m(regionManager), tokenManager = createTokenManager(), userManager = createUserManager(tokenManager), globalStateManager = createGlobalStateManager(broker$1), contextManager = createContextManager(), pluginBusyManager = new PluginBusyManagerImpl(), exitGuardManager = new ExitGuardManagerImpl(), quickActionBusyManager = new QuickActionBusyManagerImpl(broker$1), interactionService = new ParimariaInteractionServiceImpl(), notificationService = new PrimariaNotificationServiceImpl(), ecapEventManager = createEcapEventManager(globalStateManager), pdfViewerManager = createPdfViewerManager(broker$1, notificationService), importDataManager = new ImportDataManagerImpl(interactionService), primariaApiFactory = (X) => {
9752
9787
  const W = createRegionManagerProxy(X, regionManager, broker$1);
9753
9788
  return {
9754
9789
  pluginInfo: X,
@@ -9762,6 +9797,7 @@ const createContextManager = () => contextManager$1 || (contextManager$1 = new P
9762
9797
  userManager,
9763
9798
  ecapEventManager,
9764
9799
  pluginBusyManager,
9800
+ exitGuardManager,
9765
9801
  quickActionBusyManager,
9766
9802
  interactionService,
9767
9803
  notificationService,
@@ -16289,11 +16325,7 @@ let ExitShellHandler = class {
16289
16325
  async handle(X) {
16290
16326
  const W = X && X.ecapEvent !== void 0 ? X : void 0;
16291
16327
  try {
16292
- const J = this.api.pluginBusyManager.getTasks();
16293
- if (J.length > 0) {
16294
- const { confirmed: te } = await this.askForClose(J);
16295
- if (!te) return;
16296
- }
16328
+ if (!await this.api.exitGuardManager.canExit()) return;
16297
16329
  await Promise.race([
16298
16330
  disposePlugins(),
16299
16331
  // S'intenta executar un dispose normal
@@ -16304,14 +16336,6 @@ let ExitShellHandler = class {
16304
16336
  this.api.notificationService.error(translate$1("errors.exit")), this.emitClose(W);
16305
16337
  }
16306
16338
  }
16307
- askForClose(X) {
16308
- return this.api.interactionService.confirm({ busyTasks: X }, { component: PluginBusyList }, {
16309
- title: translate$1("actions.askExit"),
16310
- state: "error",
16311
- confirmButtonText: "Sí",
16312
- cancelButtonText: "No"
16313
- });
16314
- }
16315
16339
  timeout(X) {
16316
16340
  return new Promise((W) => setTimeout(W, X));
16317
16341
  }
@@ -17933,18 +17957,18 @@ function flip(X) {
17933
17957
  }
17934
17958
  if (Fe)
17935
17959
  for (var Ze = me ? 3 : 1, Me = function(Je) {
17936
- var Ve = ye.find(function(Ke) {
17960
+ var Be = ye.find(function(Ke) {
17937
17961
  var rt = De.get(Ke);
17938
17962
  if (rt)
17939
17963
  return rt.slice(0, Je).every(function(ot) {
17940
17964
  return ot;
17941
17965
  });
17942
17966
  });
17943
- if (Ve)
17944
- return He = Ve, "break";
17967
+ if (Be)
17968
+ return He = Be, "break";
17945
17969
  }, je = Ze; je > 0; je--) {
17946
- var Be = Me(je);
17947
- if (Be === "break") break;
17970
+ var Ve = Me(je);
17971
+ if (Ve === "break") break;
17948
17972
  }
17949
17973
  W.placement !== He && (W.modifiersData[te]._skip = !0, W.placement = He, W.reset = !0);
17950
17974
  }
@@ -18061,10 +18085,10 @@ function preventOverflow(X) {
18061
18085
  };
18062
18086
  if (Pe) {
18063
18087
  if (oe) {
18064
- var Ie, ze = ye === "y" ? top : left, We = ye === "y" ? bottom : right, Ge = ye === "y" ? "height" : "width", Ye = Pe[ye], ft = Ye + ve[ze], Qe = Ye - ve[We], Ze = be ? -Fe[Ge] / 2 : 0, Me = we === start ? De[Ge] : Fe[Ge], je = we === start ? -Fe[Ge] : -De[Ge], Be = W.elements.arrow, Xe = be && Be ? getLayoutRect(Be) : {
18088
+ var Ie, ze = ye === "y" ? top : left, We = ye === "y" ? bottom : right, Ge = ye === "y" ? "height" : "width", Ye = Pe[ye], ft = Ye + ve[ze], Qe = Ye - ve[We], Ze = be ? -Fe[Ge] / 2 : 0, Me = we === start ? De[Ge] : Fe[Ge], je = we === start ? -Fe[Ge] : -De[Ge], Ve = W.elements.arrow, Xe = be && Ve ? getLayoutRect(Ve) : {
18065
18089
  width: 0,
18066
18090
  height: 0
18067
- }, Je = W.modifiersData["arrow#persistent"] ? W.modifiersData["arrow#persistent"].padding : getFreshSideObject(), Ve = Je[ze], Ke = Je[We], rt = within(0, De[Ge], Xe[Ge]), ot = Se ? De[Ge] / 2 - Ze - rt - Ve - qe.mainAxis : Me - rt - Ve - qe.mainAxis, _t = Se ? -De[Ge] / 2 + Ze + rt + Ke + qe.mainAxis : je + rt + Ke + qe.mainAxis, kt = W.elements.arrow && getOffsetParent(W.elements.arrow), qt = kt ? ye === "y" ? kt.clientTop || 0 : kt.clientLeft || 0 : 0, Lt = (Ie = Ae?.[ye]) != null ? Ie : 0, Nt = Ye + ot - Lt - qt, Vt = Ye + _t - Lt, rs = within(be ? min(ft, Nt) : ft, Ye, be ? max(Qe, Vt) : Qe);
18091
+ }, Je = W.modifiersData["arrow#persistent"] ? W.modifiersData["arrow#persistent"].padding : getFreshSideObject(), Be = Je[ze], Ke = Je[We], rt = within(0, De[Ge], Xe[Ge]), ot = Se ? De[Ge] / 2 - Ze - rt - Be - qe.mainAxis : Me - rt - Be - qe.mainAxis, _t = Se ? -De[Ge] / 2 + Ze + rt + Ke + qe.mainAxis : je + rt + Ke + qe.mainAxis, kt = W.elements.arrow && getOffsetParent(W.elements.arrow), qt = kt ? ye === "y" ? kt.clientTop || 0 : kt.clientLeft || 0 : 0, Lt = (Ie = Ae?.[ye]) != null ? Ie : 0, Nt = Ye + ot - Lt - qt, Bt = Ye + _t - Lt, rs = within(be ? min(ft, Nt) : ft, Ye, be ? max(Qe, Bt) : Qe);
18068
18092
  Pe[ye] = rs, Le[ye] = rs - Ye;
18069
18093
  }
18070
18094
  if (de) {
@@ -42593,7 +42617,7 @@ var __defProp$e = Object.defineProperty, __decorateClass$e = (X, W, J, te) => {
42593
42617
  (ne = X[oe]) && (re = ne(W, J, re) || re);
42594
42618
  return re && __defProp$e(W, J, re), re;
42595
42619
  };
42596
- const Vs = class Vs extends PrimariaRegionHost(h$p) {
42620
+ const Bs = class Bs extends PrimariaRegionHost(h$p) {
42597
42621
  constructor() {
42598
42622
  super(...arguments), this.sidebarExpanded = !1, this.viewSelected = shellViews.shell, this.quickActionBusy = !1, this.subscriptions = [];
42599
42623
  }
@@ -42687,10 +42711,10 @@ const Vs = class Vs extends PrimariaRegionHost(h$p) {
42687
42711
  }, 300);
42688
42712
  }
42689
42713
  };
42690
- Vs.styles = i$T`
42714
+ Bs.styles = i$T`
42691
42715
  ${r$L(styles$b)}
42692
42716
  `;
42693
- let PrimariaShell = Vs;
42717
+ let PrimariaShell = Bs;
42694
42718
  __decorateClass$e([
42695
42719
  s$L({ targetId: "menu-region-container", name: shellApi.regionManager.regions.shell.navigationMenu })
42696
42720
  ], PrimariaShell.prototype, "navigationMenuRegion");
@@ -43942,15 +43966,15 @@ function requireQuill() {
43942
43966
  return Qe && typeof Symbol == "function" && Qe.constructor === Symbol && Qe !== Symbol.prototype ? "symbol" : typeof Qe;
43943
43967
  }, ne = /* @__PURE__ */ (function() {
43944
43968
  function Qe(Ze, Me) {
43945
- var je = [], Be = !0, Xe = !1, Je = void 0;
43969
+ var je = [], Ve = !0, Xe = !1, Je = void 0;
43946
43970
  try {
43947
- for (var Ve = Ze[Symbol.iterator](), Ke; !(Be = (Ke = Ve.next()).done) && (je.push(Ke.value), !(Me && je.length === Me)); Be = !0)
43971
+ for (var Be = Ze[Symbol.iterator](), Ke; !(Ve = (Ke = Be.next()).done) && (je.push(Ke.value), !(Me && je.length === Me)); Ve = !0)
43948
43972
  ;
43949
43973
  } catch (rt) {
43950
43974
  Xe = !0, Je = rt;
43951
43975
  } finally {
43952
43976
  try {
43953
- !Be && Ve.return && Ve.return();
43977
+ !Ve && Be.return && Be.return();
43954
43978
  } finally {
43955
43979
  if (Xe) throw Je;
43956
43980
  }
@@ -43967,8 +43991,8 @@ function requireQuill() {
43967
43991
  })(), de = /* @__PURE__ */ (function() {
43968
43992
  function Qe(Ze, Me) {
43969
43993
  for (var je = 0; je < Me.length; je++) {
43970
- var Be = Me[je];
43971
- Be.enumerable = Be.enumerable || !1, Be.configurable = !0, "value" in Be && (Be.writable = !0), Object.defineProperty(Ze, Be.key, Be);
43994
+ var Ve = Me[je];
43995
+ Ve.enumerable = Ve.enumerable || !1, Ve.configurable = !0, "value" in Ve && (Ve.writable = !0), Object.defineProperty(Ze, Ve.key, Ve);
43972
43996
  }
43973
43997
  }
43974
43998
  return function(Ze, Me, je) {
@@ -44006,11 +44030,11 @@ function requireQuill() {
44006
44030
  }, {
44007
44031
  key: "register",
44008
44032
  value: function(Me, je) {
44009
- var Be = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
44033
+ var Ve = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
44010
44034
  if (typeof Me != "string") {
44011
44035
  var Je = Me.attrName || Me.blotName;
44012
- typeof Je == "string" ? this.register("formats/" + Je, Me, je) : Object.keys(Me).forEach(function(Ve) {
44013
- Be.register(Ve, Me[Ve], je);
44036
+ typeof Je == "string" ? this.register("formats/" + Je, Me, je) : Object.keys(Me).forEach(function(Be) {
44037
+ Ve.register(Be, Me[Be], je);
44014
44038
  });
44015
44039
  } else
44016
44040
  this.imports[Me] != null && !Xe && Ie.warn("Overwriting " + Me + " with", je), this.imports[Me] = je, (Me.startsWith("blots/") || Me.startsWith("formats/")) && je.blotName !== "abstract" ? _e.default.register(je) : Me.startsWith("modules") && typeof je.register == "function" && je.register();
@@ -44021,19 +44045,19 @@ function requireQuill() {
44021
44045
  if (Le(this, Qe), this.options = We(Ze, je), this.container = this.options.container, this.container == null)
44022
44046
  return Ie.error("Invalid Quill container", Ze);
44023
44047
  this.options.debug && Qe.debug(this.options.debug);
44024
- var Be = this.container.innerHTML.trim();
44048
+ var Ve = this.container.innerHTML.trim();
44025
44049
  this.container.classList.add("ql-container"), this.container.innerHTML = "", this.container.__quill = this, this.root = this.addContainer("ql-editor"), this.root.classList.add("ql-blank"), this.root.setAttribute("data-gramm", !1), this.scrollingContainer = this.options.scrollingContainer || this.root, this.emitter = new be.default(), this.scroll = _e.default.create(this.root, {
44026
44050
  emitter: this.emitter,
44027
44051
  whitelist: this.options.formats
44028
44052
  }), this.editor = new pe.default(this.scroll), this.selection = new Se.default(this.scroll, this.emitter), this.theme = new this.options.theme(this, this.options), this.keyboard = this.theme.addModule("keyboard"), this.clipboard = this.theme.addModule("clipboard"), this.history = this.theme.addModule("history"), this.theme.init(), this.emitter.on(be.default.events.EDITOR_CHANGE, function(Je) {
44029
44053
  Je === be.default.events.TEXT_CHANGE && Me.root.classList.toggle("ql-blank", Me.editor.isBlank());
44030
- }), this.emitter.on(be.default.events.SCROLL_UPDATE, function(Je, Ve) {
44054
+ }), this.emitter.on(be.default.events.SCROLL_UPDATE, function(Je, Be) {
44031
44055
  var Ke = Me.selection.lastRange, rt = Ke && Ke.length === 0 ? Ke.index : void 0;
44032
44056
  Ge.call(Me, function() {
44033
- return Me.editor.update(null, Ve, rt);
44057
+ return Me.editor.update(null, Be, rt);
44034
44058
  }, Je);
44035
44059
  });
44036
- var Xe = this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">` + Be + "<p><br></p></div>");
44060
+ var Xe = this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">` + Ve + "<p><br></p></div>");
44037
44061
  this.setContents(Xe), this.history.clear(), this.options.placeholder && this.root.setAttribute("data-placeholder", this.options.placeholder), this.options.readOnly && this.disable();
44038
44062
  }
44039
44063
  return de(Qe, [{
@@ -44041,8 +44065,8 @@ function requireQuill() {
44041
44065
  value: function(Me) {
44042
44066
  var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
44043
44067
  if (typeof Me == "string") {
44044
- var Be = Me;
44045
- Me = document.createElement("div"), Me.classList.add(Be);
44068
+ var Ve = Me;
44069
+ Me = document.createElement("div"), Me.classList.add(Ve);
44046
44070
  }
44047
44071
  return this.container.insertBefore(Me, je), Me;
44048
44072
  }
@@ -44053,11 +44077,11 @@ function requireQuill() {
44053
44077
  }
44054
44078
  }, {
44055
44079
  key: "deleteText",
44056
- value: function(Me, je, Be) {
44057
- var Xe = this, Je = Ye(Me, je, Be), Ve = ne(Je, 4);
44058
- return Me = Ve[0], je = Ve[1], Be = Ve[3], Ge.call(this, function() {
44080
+ value: function(Me, je, Ve) {
44081
+ var Xe = this, Je = Ye(Me, je, Ve), Be = ne(Je, 4);
44082
+ return Me = Be[0], je = Be[1], Ve = Be[3], Ge.call(this, function() {
44059
44083
  return Xe.editor.deleteText(Me, je);
44060
- }, Be, Me, -1 * je);
44084
+ }, Ve, Me, -1 * je);
44061
44085
  }
44062
44086
  }, {
44063
44087
  key: "disable",
@@ -44079,56 +44103,56 @@ function requireQuill() {
44079
44103
  }, {
44080
44104
  key: "format",
44081
44105
  value: function(Me, je) {
44082
- var Be = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : be.default.sources.API;
44106
+ var Ve = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : be.default.sources.API;
44083
44107
  return Ge.call(this, function() {
44084
- var Je = Be.getSelection(!0), Ve = new ue.default();
44108
+ var Je = Ve.getSelection(!0), Be = new ue.default();
44085
44109
  if (Je == null)
44086
- return Ve;
44110
+ return Be;
44087
44111
  if (_e.default.query(Me, _e.default.Scope.BLOCK))
44088
- Ve = Be.editor.formatLine(Je.index, Je.length, Ae({}, Me, je));
44112
+ Be = Ve.editor.formatLine(Je.index, Je.length, Ae({}, Me, je));
44089
44113
  else {
44090
44114
  if (Je.length === 0)
44091
- return Be.selection.format(Me, je), Ve;
44092
- Ve = Be.editor.formatText(Je.index, Je.length, Ae({}, Me, je));
44115
+ return Ve.selection.format(Me, je), Be;
44116
+ Be = Ve.editor.formatText(Je.index, Je.length, Ae({}, Me, je));
44093
44117
  }
44094
- return Be.setSelection(Je, be.default.sources.SILENT), Ve;
44118
+ return Ve.setSelection(Je, be.default.sources.SILENT), Be;
44095
44119
  }, Xe);
44096
44120
  }
44097
44121
  }, {
44098
44122
  key: "formatLine",
44099
- value: function(Me, je, Be, Xe, Je) {
44100
- var Ve = this, Ke = void 0, rt = Ye(Me, je, Be, Xe, Je), ot = ne(rt, 4);
44123
+ value: function(Me, je, Ve, Xe, Je) {
44124
+ var Be = this, Ke = void 0, rt = Ye(Me, je, Ve, Xe, Je), ot = ne(rt, 4);
44101
44125
  return Me = ot[0], je = ot[1], Ke = ot[2], Je = ot[3], Ge.call(this, function() {
44102
- return Ve.editor.formatLine(Me, je, Ke);
44126
+ return Be.editor.formatLine(Me, je, Ke);
44103
44127
  }, Je, Me, 0);
44104
44128
  }
44105
44129
  }, {
44106
44130
  key: "formatText",
44107
- value: function(Me, je, Be, Xe, Je) {
44108
- var Ve = this, Ke = void 0, rt = Ye(Me, je, Be, Xe, Je), ot = ne(rt, 4);
44131
+ value: function(Me, je, Ve, Xe, Je) {
44132
+ var Be = this, Ke = void 0, rt = Ye(Me, je, Ve, Xe, Je), ot = ne(rt, 4);
44109
44133
  return Me = ot[0], je = ot[1], Ke = ot[2], Je = ot[3], Ge.call(this, function() {
44110
- return Ve.editor.formatText(Me, je, Ke);
44134
+ return Be.editor.formatText(Me, je, Ke);
44111
44135
  }, Je, Me, 0);
44112
44136
  }
44113
44137
  }, {
44114
44138
  key: "getBounds",
44115
44139
  value: function(Me) {
44116
- var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, Be = void 0;
44117
- typeof Me == "number" ? Be = this.selection.getBounds(Me, je) : Be = this.selection.getBounds(Me.index, Me.length);
44140
+ var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, Ve = void 0;
44141
+ typeof Me == "number" ? Ve = this.selection.getBounds(Me, je) : Ve = this.selection.getBounds(Me.index, Me.length);
44118
44142
  var Xe = this.container.getBoundingClientRect();
44119
44143
  return {
44120
- bottom: Be.bottom - Xe.top,
44121
- height: Be.height,
44122
- left: Be.left - Xe.left,
44123
- right: Be.right - Xe.left,
44124
- top: Be.top - Xe.top,
44125
- width: Be.width
44144
+ bottom: Ve.bottom - Xe.top,
44145
+ height: Ve.height,
44146
+ left: Ve.left - Xe.left,
44147
+ right: Ve.right - Xe.left,
44148
+ top: Ve.top - Xe.top,
44149
+ width: Ve.width
44126
44150
  };
44127
44151
  }
44128
44152
  }, {
44129
44153
  key: "getContents",
44130
44154
  value: function() {
44131
- var Me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - Me, Be = Ye(Me, je), Xe = ne(Be, 2);
44155
+ var Me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - Me, Ve = Ye(Me, je), Xe = ne(Ve, 2);
44132
44156
  return Me = Xe[0], je = Xe[1], this.editor.getContents(Me, je);
44133
44157
  }
44134
44158
  }, {
@@ -44177,7 +44201,7 @@ function requireQuill() {
44177
44201
  }, {
44178
44202
  key: "getText",
44179
44203
  value: function() {
44180
- var Me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - Me, Be = Ye(Me, je), Xe = ne(Be, 2);
44204
+ var Me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - Me, Ve = Ye(Me, je), Xe = ne(Ve, 2);
44181
44205
  return Me = Xe[0], je = Xe[1], this.editor.getText(Me, je);
44182
44206
  }
44183
44207
  }, {
@@ -44187,18 +44211,18 @@ function requireQuill() {
44187
44211
  }
44188
44212
  }, {
44189
44213
  key: "insertEmbed",
44190
- value: function(Me, je, Be) {
44214
+ value: function(Me, je, Ve) {
44191
44215
  var Xe = this, Je = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Qe.sources.API;
44192
44216
  return Ge.call(this, function() {
44193
- return Xe.editor.insertEmbed(Me, je, Be);
44217
+ return Xe.editor.insertEmbed(Me, je, Ve);
44194
44218
  }, Je, Me);
44195
44219
  }
44196
44220
  }, {
44197
44221
  key: "insertText",
44198
- value: function(Me, je, Be, Xe, Je) {
44199
- var Ve = this, Ke = void 0, rt = Ye(Me, 0, Be, Xe, Je), ot = ne(rt, 4);
44222
+ value: function(Me, je, Ve, Xe, Je) {
44223
+ var Be = this, Ke = void 0, rt = Ye(Me, 0, Ve, Xe, Je), ot = ne(rt, 4);
44200
44224
  return Me = ot[0], Ke = ot[2], Je = ot[3], Ge.call(this, function() {
44201
- return Ve.editor.insertText(Me, je, Ke);
44225
+ return Be.editor.insertText(Me, je, Ke);
44202
44226
  }, Je, Me, je.length);
44203
44227
  }
44204
44228
  }, {
@@ -44223,16 +44247,16 @@ function requireQuill() {
44223
44247
  }
44224
44248
  }, {
44225
44249
  key: "pasteHTML",
44226
- value: function(Me, je, Be) {
44227
- this.clipboard.dangerouslyPasteHTML(Me, je, Be);
44250
+ value: function(Me, je, Ve) {
44251
+ this.clipboard.dangerouslyPasteHTML(Me, je, Ve);
44228
44252
  }
44229
44253
  }, {
44230
44254
  key: "removeFormat",
44231
- value: function(Me, je, Be) {
44232
- var Xe = this, Je = Ye(Me, je, Be), Ve = ne(Je, 4);
44233
- return Me = Ve[0], je = Ve[1], Be = Ve[3], Ge.call(this, function() {
44255
+ value: function(Me, je, Ve) {
44256
+ var Xe = this, Je = Ye(Me, je, Ve), Be = ne(Je, 4);
44257
+ return Me = Be[0], je = Be[1], Ve = Be[3], Ge.call(this, function() {
44234
44258
  return Xe.editor.removeFormat(Me, je);
44235
- }, Be, Me);
44259
+ }, Ve, Me);
44236
44260
  }
44237
44261
  }, {
44238
44262
  key: "scrollIntoView",
@@ -44242,31 +44266,31 @@ function requireQuill() {
44242
44266
  }, {
44243
44267
  key: "setContents",
44244
44268
  value: function(Me) {
44245
- var je = this, Be = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.default.sources.API;
44269
+ var je = this, Ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.default.sources.API;
44246
44270
  return Ge.call(this, function() {
44247
44271
  Me = new ue.default(Me);
44248
- var Xe = je.getLength(), Je = je.editor.deleteText(0, Xe), Ve = je.editor.applyDelta(Me), Ke = Ve.ops[Ve.ops.length - 1];
44272
+ var Xe = je.getLength(), Je = je.editor.deleteText(0, Xe), Be = je.editor.applyDelta(Me), Ke = Be.ops[Be.ops.length - 1];
44249
44273
  Ke != null && typeof Ke.insert == "string" && Ke.insert[Ke.insert.length - 1] === `
44250
- ` && (je.editor.deleteText(je.getLength() - 1, 1), Ve.delete(1));
44251
- var rt = Je.compose(Ve);
44274
+ ` && (je.editor.deleteText(je.getLength() - 1, 1), Be.delete(1));
44275
+ var rt = Je.compose(Be);
44252
44276
  return rt;
44253
- }, Be);
44277
+ }, Ve);
44254
44278
  }
44255
44279
  }, {
44256
44280
  key: "setSelection",
44257
- value: function(Me, je, Be) {
44281
+ value: function(Me, je, Ve) {
44258
44282
  if (Me == null)
44259
44283
  this.selection.setRange(null, je || Qe.sources.API);
44260
44284
  else {
44261
- var Xe = Ye(Me, je, Be), Je = ne(Xe, 4);
44262
- Me = Je[0], je = Je[1], Be = Je[3], this.selection.setRange(new we.Range(Me, je), Be), Be !== be.default.sources.SILENT && this.selection.scrollIntoView(this.scrollingContainer);
44285
+ var Xe = Ye(Me, je, Ve), Je = ne(Xe, 4);
44286
+ Me = Je[0], je = Je[1], Ve = Je[3], this.selection.setRange(new we.Range(Me, je), Ve), Ve !== be.default.sources.SILENT && this.selection.scrollIntoView(this.scrollingContainer);
44263
44287
  }
44264
44288
  }
44265
44289
  }, {
44266
44290
  key: "setText",
44267
44291
  value: function(Me) {
44268
- var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.default.sources.API, Be = new ue.default().insert(Me);
44269
- return this.setContents(Be, je);
44292
+ var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.default.sources.API, Ve = new ue.default().insert(Me);
44293
+ return this.setContents(Ve, je);
44270
44294
  }
44271
44295
  }, {
44272
44296
  key: "update",
@@ -44277,10 +44301,10 @@ function requireQuill() {
44277
44301
  }, {
44278
44302
  key: "updateContents",
44279
44303
  value: function(Me) {
44280
- var je = this, Be = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.default.sources.API;
44304
+ var je = this, Ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.default.sources.API;
44281
44305
  return Ge.call(this, function() {
44282
- return Me = new ue.default(Me), je.editor.applyDelta(Me, Be);
44283
- }, Be, !0);
44306
+ return Me = new ue.default(Me), je.editor.applyDelta(Me, Ve);
44307
+ }, Ve, !0);
44284
44308
  }
44285
44309
  }]), Qe;
44286
44310
  })();
@@ -44317,13 +44341,13 @@ function requireQuill() {
44317
44341
  Xe.modules[Je] === !0 && (Xe.modules[Je] = {});
44318
44342
  });
44319
44343
  });
44320
- var je = Object.keys(Me.modules).concat(Object.keys(Ze.modules)), Be = je.reduce(function(Xe, Je) {
44321
- var Ve = ze.import("modules/" + Je);
44322
- return Ve == null ? Ie.error("Cannot load " + Je + " module. Are you sure you registered it?") : Xe[Je] = Ve.DEFAULTS || {}, Xe;
44344
+ var je = Object.keys(Me.modules).concat(Object.keys(Ze.modules)), Ve = je.reduce(function(Xe, Je) {
44345
+ var Be = ze.import("modules/" + Je);
44346
+ return Be == null ? Ie.error("Cannot load " + Je + " module. Are you sure you registered it?") : Xe[Je] = Be.DEFAULTS || {}, Xe;
44323
44347
  }, {});
44324
44348
  return Ze.modules != null && Ze.modules.toolbar && Ze.modules.toolbar.constructor !== Object && (Ze.modules.toolbar = {
44325
44349
  container: Ze.modules.toolbar
44326
- }), Ze = (0, Ce.default)(!0, {}, ze.DEFAULTS, { modules: Be }, Me, Ze), ["bounds", "container", "scrollingContainer"].forEach(function(Xe) {
44350
+ }), Ze = (0, Ce.default)(!0, {}, ze.DEFAULTS, { modules: Ve }, Me, Ze), ["bounds", "container", "scrollingContainer"].forEach(function(Xe) {
44327
44351
  typeof Ze[Xe] == "string" && (Ze[Xe] = document.querySelector(Ze[Xe]));
44328
44352
  }), Ze.modules = Object.keys(Ze.modules).reduce(function(Xe, Je) {
44329
44353
  return Ze.modules[Je] && (Xe[Je] = Ze.modules[Je]), Xe;
@@ -44332,35 +44356,35 @@ function requireQuill() {
44332
44356
  function Ge(Qe, Ze, Me, je) {
44333
44357
  if (this.options.strict && !this.isEnabled() && Ze === be.default.sources.USER)
44334
44358
  return new ue.default();
44335
- var Be = Me == null ? null : this.getSelection(), Xe = this.editor.delta, Je = Qe();
44336
- if (Be != null && (Me === !0 && (Me = Be.index), je == null ? Be = ft(Be, Je, Ze) : je !== 0 && (Be = ft(Be, Me, je, Ze)), this.setSelection(Be, be.default.sources.SILENT)), Je.length() > 0) {
44337
- var Ve, Ke = [be.default.events.TEXT_CHANGE, Je, Xe, Ze];
44338
- if ((Ve = this.emitter).emit.apply(Ve, [be.default.events.EDITOR_CHANGE].concat(Ke)), Ze !== be.default.sources.SILENT) {
44359
+ var Ve = Me == null ? null : this.getSelection(), Xe = this.editor.delta, Je = Qe();
44360
+ if (Ve != null && (Me === !0 && (Me = Ve.index), je == null ? Ve = ft(Ve, Je, Ze) : je !== 0 && (Ve = ft(Ve, Me, je, Ze)), this.setSelection(Ve, be.default.sources.SILENT)), Je.length() > 0) {
44361
+ var Be, Ke = [be.default.events.TEXT_CHANGE, Je, Xe, Ze];
44362
+ if ((Be = this.emitter).emit.apply(Be, [be.default.events.EDITOR_CHANGE].concat(Ke)), Ze !== be.default.sources.SILENT) {
44339
44363
  var rt;
44340
44364
  (rt = this.emitter).emit.apply(rt, Ke);
44341
44365
  }
44342
44366
  }
44343
44367
  return Je;
44344
44368
  }
44345
- function Ye(Qe, Ze, Me, je, Be) {
44369
+ function Ye(Qe, Ze, Me, je, Ve) {
44346
44370
  var Xe = {};
44347
- return typeof Qe.index == "number" && typeof Qe.length == "number" ? typeof Ze != "number" ? (Be = je, je = Me, Me = Ze, Ze = Qe.length, Qe = Qe.index) : (Ze = Qe.length, Qe = Qe.index) : typeof Ze != "number" && (Be = je, je = Me, Me = Ze, Ze = 0), (typeof Me > "u" ? "undefined" : oe(Me)) === "object" ? (Xe = Me, Be = je) : typeof Me == "string" && (je != null ? Xe[Me] = je : Be = Me), Be = Be || be.default.sources.API, [Qe, Ze, Xe, Be];
44371
+ return typeof Qe.index == "number" && typeof Qe.length == "number" ? typeof Ze != "number" ? (Ve = je, je = Me, Me = Ze, Ze = Qe.length, Qe = Qe.index) : (Ze = Qe.length, Qe = Qe.index) : typeof Ze != "number" && (Ve = je, je = Me, Me = Ze, Ze = 0), (typeof Me > "u" ? "undefined" : oe(Me)) === "object" ? (Xe = Me, Ve = je) : typeof Me == "string" && (je != null ? Xe[Me] = je : Ve = Me), Ve = Ve || be.default.sources.API, [Qe, Ze, Xe, Ve];
44348
44372
  }
44349
44373
  function ft(Qe, Ze, Me, je) {
44350
44374
  if (Qe == null) return null;
44351
- var Be = void 0, Xe = void 0;
44375
+ var Ve = void 0, Xe = void 0;
44352
44376
  if (Ze instanceof ue.default) {
44353
44377
  var Je = [Qe.index, Qe.index + Qe.length].map(function(ot) {
44354
44378
  return Ze.transformPosition(ot, je !== be.default.sources.USER);
44355
- }), Ve = ne(Je, 2);
44356
- Be = Ve[0], Xe = Ve[1];
44379
+ }), Be = ne(Je, 2);
44380
+ Ve = Be[0], Xe = Be[1];
44357
44381
  } else {
44358
44382
  var Ke = [Qe.index, Qe.index + Qe.length].map(function(ot) {
44359
44383
  return ot < Ze || ot === Ze && je === be.default.sources.USER ? ot : Me >= 0 ? ot + Me : Math.max(Ze, ot + Me);
44360
44384
  }), rt = ne(Ke, 2);
44361
- Be = rt[0], Xe = rt[1];
44385
+ Ve = rt[0], Xe = rt[1];
44362
44386
  }
44363
- return new we.Range(Be, Xe - Be);
44387
+ return new we.Range(Ve, Xe - Ve);
44364
44388
  }
44365
44389
  te.expandConfig = We, te.overload = Ye, te.default = ze;
44366
44390
  }),
@@ -44887,15 +44911,15 @@ function requireQuill() {
44887
44911
  return Qe && typeof Symbol == "function" && Qe.constructor === Symbol && Qe !== Symbol.prototype ? "symbol" : typeof Qe;
44888
44912
  }, ne = /* @__PURE__ */ (function() {
44889
44913
  function Qe(Ze, Me) {
44890
- var je = [], Be = !0, Xe = !1, Je = void 0;
44914
+ var je = [], Ve = !0, Xe = !1, Je = void 0;
44891
44915
  try {
44892
- for (var Ve = Ze[Symbol.iterator](), Ke; !(Be = (Ke = Ve.next()).done) && (je.push(Ke.value), !(Me && je.length === Me)); Be = !0)
44916
+ for (var Be = Ze[Symbol.iterator](), Ke; !(Ve = (Ke = Be.next()).done) && (je.push(Ke.value), !(Me && je.length === Me)); Ve = !0)
44893
44917
  ;
44894
44918
  } catch (rt) {
44895
44919
  Xe = !0, Je = rt;
44896
44920
  } finally {
44897
44921
  try {
44898
- !Be && Ve.return && Ve.return();
44922
+ !Ve && Be.return && Be.return();
44899
44923
  } finally {
44900
44924
  if (Xe) throw Je;
44901
44925
  }
@@ -44912,8 +44936,8 @@ function requireQuill() {
44912
44936
  })(), de = /* @__PURE__ */ (function() {
44913
44937
  function Qe(Ze, Me) {
44914
44938
  for (var je = 0; je < Me.length; je++) {
44915
- var Be = Me[je];
44916
- Be.enumerable = Be.enumerable || !1, Be.configurable = !0, "value" in Be && (Be.writable = !0), Object.defineProperty(Ze, Be.key, Be);
44939
+ var Ve = Me[je];
44940
+ Ve.enumerable = Ve.enumerable || !1, Ve.configurable = !0, "value" in Ve && (Ve.writable = !0), Object.defineProperty(Ze, Ve.key, Ve);
44917
44941
  }
44918
44942
  }
44919
44943
  return function(Ze, Me, je) {
@@ -44937,35 +44961,35 @@ function requireQuill() {
44937
44961
  return de(Qe, [{
44938
44962
  key: "applyDelta",
44939
44963
  value: function(Me) {
44940
- var je = this, Be = !1;
44964
+ var je = this, Ve = !1;
44941
44965
  this.scroll.update();
44942
44966
  var Xe = this.scroll.length();
44943
- return this.scroll.batchStart(), Me = ft(Me), Me.reduce(function(Je, Ve) {
44944
- var Ke = Ve.retain || Ve.delete || Ve.insert.length || 1, rt = Ve.attributes || {};
44945
- if (Ve.insert != null) {
44946
- if (typeof Ve.insert == "string") {
44947
- var ot = Ve.insert;
44967
+ return this.scroll.batchStart(), Me = ft(Me), Me.reduce(function(Je, Be) {
44968
+ var Ke = Be.retain || Be.delete || Be.insert.length || 1, rt = Be.attributes || {};
44969
+ if (Be.insert != null) {
44970
+ if (typeof Be.insert == "string") {
44971
+ var ot = Be.insert;
44948
44972
  ot.endsWith(`
44949
- `) && Be && (Be = !1, ot = ot.slice(0, -1)), Je >= Xe && !ot.endsWith(`
44950
- `) && (Be = !0), je.scroll.insertAt(Je, ot);
44973
+ `) && Ve && (Ve = !1, ot = ot.slice(0, -1)), Je >= Xe && !ot.endsWith(`
44974
+ `) && (Ve = !0), je.scroll.insertAt(Je, ot);
44951
44975
  var _t = je.scroll.line(Je), kt = ne(_t, 2), qt = kt[0], Lt = kt[1], Nt = (0, Ae.default)({}, (0, we.bubbleFormats)(qt));
44952
44976
  if (qt instanceof Se.default) {
44953
- var Vt = qt.descendant(be.default.Leaf, Lt), rs = ne(Vt, 1), Kt = rs[0];
44977
+ var Bt = qt.descendant(be.default.Leaf, Lt), rs = ne(Bt, 1), Kt = rs[0];
44954
44978
  Nt = (0, Ae.default)(Nt, (0, we.bubbleFormats)(Kt));
44955
44979
  }
44956
44980
  rt = pe.default.attributes.diff(Nt, rt) || {};
44957
- } else if (oe(Ve.insert) === "object") {
44958
- var gt = Object.keys(Ve.insert)[0];
44981
+ } else if (oe(Be.insert) === "object") {
44982
+ var gt = Object.keys(Be.insert)[0];
44959
44983
  if (gt == null) return Je;
44960
- je.scroll.insertAt(Je, gt, Ve.insert[gt]);
44984
+ je.scroll.insertAt(Je, gt, Be.insert[gt]);
44961
44985
  }
44962
44986
  Xe += Ke;
44963
44987
  }
44964
44988
  return Object.keys(rt).forEach(function(mt) {
44965
44989
  je.scroll.formatAt(Je, Ke, mt, rt[mt]);
44966
44990
  }), Je + Ke;
44967
- }, 0), Me.reduce(function(Je, Ve) {
44968
- return typeof Ve.delete == "number" ? (je.scroll.deleteAt(Je, Ve.delete), Je) : Je + (Ve.retain || Ve.insert.length || 1);
44991
+ }, 0), Me.reduce(function(Je, Be) {
44992
+ return typeof Be.delete == "number" ? (je.scroll.deleteAt(Je, Be.delete), Je) : Je + (Be.retain || Be.insert.length || 1);
44969
44993
  }, 0), this.scroll.batchEnd(), this.update(Me);
44970
44994
  }
44971
44995
  }, {
@@ -44976,16 +45000,16 @@ function requireQuill() {
44976
45000
  }, {
44977
45001
  key: "formatLine",
44978
45002
  value: function(Me, je) {
44979
- var Be = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
45003
+ var Ve = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
44980
45004
  return this.scroll.update(), Object.keys(Xe).forEach(function(Je) {
44981
- if (!(Be.scroll.whitelist != null && !Be.scroll.whitelist[Je])) {
44982
- var Ve = Be.scroll.lines(Me, Math.max(je, 1)), Ke = je;
44983
- Ve.forEach(function(rt) {
45005
+ if (!(Ve.scroll.whitelist != null && !Ve.scroll.whitelist[Je])) {
45006
+ var Be = Ve.scroll.lines(Me, Math.max(je, 1)), Ke = je;
45007
+ Be.forEach(function(rt) {
44984
45008
  var ot = rt.length();
44985
45009
  if (!(rt instanceof ge.default))
44986
45010
  rt.format(Je, Xe[Je]);
44987
45011
  else {
44988
- var _t = Me - rt.offset(Be.scroll), kt = rt.newlineIndex(_t + Ke) - _t + 1;
45012
+ var _t = Me - rt.offset(Ve.scroll), kt = rt.newlineIndex(_t + Ke) - _t + 1;
44989
45013
  rt.formatAt(_t, kt, Je, Xe[Je]);
44990
45014
  }
44991
45015
  Ke -= ot;
@@ -44996,9 +45020,9 @@ function requireQuill() {
44996
45020
  }, {
44997
45021
  key: "formatText",
44998
45022
  value: function(Me, je) {
44999
- var Be = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
45023
+ var Ve = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
45000
45024
  return Object.keys(Xe).forEach(function(Je) {
45001
- Be.scroll.formatAt(Me, je, Je, Xe[Je]);
45025
+ Ve.scroll.formatAt(Me, je, Je, Xe[Je]);
45002
45026
  }), this.update(new ue.default().retain(Me).retain(je, (0, De.default)(Xe)));
45003
45027
  }
45004
45028
  }, {
@@ -45016,15 +45040,15 @@ function requireQuill() {
45016
45040
  }, {
45017
45041
  key: "getFormat",
45018
45042
  value: function(Me) {
45019
- var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, Be = [], Xe = [];
45020
- je === 0 ? this.scroll.path(Me).forEach(function(Ve) {
45021
- var Ke = ne(Ve, 1), rt = Ke[0];
45022
- rt instanceof Se.default ? Be.push(rt) : rt instanceof be.default.Leaf && Xe.push(rt);
45023
- }) : (Be = this.scroll.lines(Me, je), Xe = this.scroll.descendants(be.default.Leaf, Me, je));
45024
- var Je = [Be, Xe].map(function(Ve) {
45025
- if (Ve.length === 0) return {};
45026
- for (var Ke = (0, we.bubbleFormats)(Ve.shift()); Object.keys(Ke).length > 0; ) {
45027
- var rt = Ve.shift();
45043
+ var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, Ve = [], Xe = [];
45044
+ je === 0 ? this.scroll.path(Me).forEach(function(Be) {
45045
+ var Ke = ne(Be, 1), rt = Ke[0];
45046
+ rt instanceof Se.default ? Ve.push(rt) : rt instanceof be.default.Leaf && Xe.push(rt);
45047
+ }) : (Ve = this.scroll.lines(Me, je), Xe = this.scroll.descendants(be.default.Leaf, Me, je));
45048
+ var Je = [Ve, Xe].map(function(Be) {
45049
+ if (Be.length === 0) return {};
45050
+ for (var Ke = (0, we.bubbleFormats)(Be.shift()); Object.keys(Ke).length > 0; ) {
45051
+ var rt = Be.shift();
45028
45052
  if (rt == null) return Ke;
45029
45053
  Ke = Ye((0, we.bubbleFormats)(rt), Ke);
45030
45054
  }
@@ -45035,25 +45059,25 @@ function requireQuill() {
45035
45059
  }, {
45036
45060
  key: "getText",
45037
45061
  value: function(Me, je) {
45038
- return this.getContents(Me, je).filter(function(Be) {
45039
- return typeof Be.insert == "string";
45040
- }).map(function(Be) {
45041
- return Be.insert;
45062
+ return this.getContents(Me, je).filter(function(Ve) {
45063
+ return typeof Ve.insert == "string";
45064
+ }).map(function(Ve) {
45065
+ return Ve.insert;
45042
45066
  }).join("");
45043
45067
  }
45044
45068
  }, {
45045
45069
  key: "insertEmbed",
45046
- value: function(Me, je, Be) {
45047
- return this.scroll.insertAt(Me, je, Be), this.update(new ue.default().retain(Me).insert(Ie({}, je, Be)));
45070
+ value: function(Me, je, Ve) {
45071
+ return this.scroll.insertAt(Me, je, Ve), this.update(new ue.default().retain(Me).insert(Ie({}, je, Ve)));
45048
45072
  }
45049
45073
  }, {
45050
45074
  key: "insertText",
45051
45075
  value: function(Me, je) {
45052
- var Be = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
45076
+ var Ve = this, Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
45053
45077
  return je = je.replace(/\r\n/g, `
45054
45078
  `).replace(/\r/g, `
45055
45079
  `), this.scroll.insertAt(Me, je), Object.keys(Xe).forEach(function(Je) {
45056
- Be.scroll.formatAt(Me, je.length, Je, Xe[Je]);
45080
+ Ve.scroll.formatAt(Me, je.length, Je, Xe[Je]);
45057
45081
  }), this.update(new ue.default().retain(Me).insert(je, (0, De.default)(Xe)));
45058
45082
  }
45059
45083
  }, {
@@ -45067,23 +45091,23 @@ function requireQuill() {
45067
45091
  }, {
45068
45092
  key: "removeFormat",
45069
45093
  value: function(Me, je) {
45070
- var Be = this.getText(Me, je), Xe = this.scroll.line(Me + je), Je = ne(Xe, 2), Ve = Je[0], Ke = Je[1], rt = 0, ot = new ue.default();
45071
- Ve != null && (Ve instanceof ge.default ? rt = Ve.newlineIndex(Ke) - Ke + 1 : rt = Ve.length() - Ke, ot = Ve.delta().slice(Ke, Ke + rt - 1).insert(`
45094
+ var Ve = this.getText(Me, je), Xe = this.scroll.line(Me + je), Je = ne(Xe, 2), Be = Je[0], Ke = Je[1], rt = 0, ot = new ue.default();
45095
+ Be != null && (Be instanceof ge.default ? rt = Be.newlineIndex(Ke) - Ke + 1 : rt = Be.length() - Ke, ot = Be.delta().slice(Ke, Ke + rt - 1).insert(`
45072
45096
  `));
45073
- var _t = this.getContents(Me, je + rt), kt = _t.diff(new ue.default().insert(Be).concat(ot)), qt = new ue.default().retain(Me).concat(kt);
45097
+ var _t = this.getContents(Me, je + rt), kt = _t.diff(new ue.default().insert(Ve).concat(ot)), qt = new ue.default().retain(Me).concat(kt);
45074
45098
  return this.applyDelta(qt);
45075
45099
  }
45076
45100
  }, {
45077
45101
  key: "update",
45078
45102
  value: function(Me) {
45079
- var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], Be = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, Xe = this.delta;
45103
+ var je = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], Ve = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, Xe = this.delta;
45080
45104
  if (je.length === 1 && je[0].type === "characterData" && je[0].target.data.match(We) && be.default.find(je[0].target)) {
45081
- var Je = be.default.find(je[0].target), Ve = (0, we.bubbleFormats)(Je), Ke = Je.offset(this.scroll), rt = je[0].oldValue.replace(_e.default.CONTENTS, ""), ot = new ue.default().insert(rt), _t = new ue.default().insert(Je.value()), kt = new ue.default().retain(Ke).concat(ot.diff(_t, Be));
45105
+ var Je = be.default.find(je[0].target), Be = (0, we.bubbleFormats)(Je), Ke = Je.offset(this.scroll), rt = je[0].oldValue.replace(_e.default.CONTENTS, ""), ot = new ue.default().insert(rt), _t = new ue.default().insert(Je.value()), kt = new ue.default().retain(Ke).concat(ot.diff(_t, Ve));
45082
45106
  Me = kt.reduce(function(qt, Lt) {
45083
- return Lt.insert ? qt.insert(Lt.insert, Ve) : qt.push(Lt);
45107
+ return Lt.insert ? qt.insert(Lt.insert, Be) : qt.push(Lt);
45084
45108
  }, new ue.default()), this.delta = Xe.compose(Me);
45085
45109
  } else
45086
- this.delta = this.getDelta(), (!Me || !(0, He.default)(Xe.compose(Me), this.delta)) && (Me = Xe.diff(this.delta, Be));
45110
+ this.delta = this.getDelta(), (!Me || !(0, He.default)(Xe.compose(Me), this.delta)) && (Me = Xe.diff(this.delta, Ve));
45087
45111
  return Me;
45088
45112
  }
45089
45113
  }]), Qe;
@@ -45100,10 +45124,10 @@ function requireQuill() {
45100
45124
  return delete je.image, Ze.insert({ image: Me.attributes.image }, je);
45101
45125
  }
45102
45126
  if (Me.attributes != null && (Me.attributes.list === !0 || Me.attributes.bullet === !0) && (Me = (0, De.default)(Me), Me.attributes.list ? Me.attributes.list = "ordered" : (Me.attributes.list = "bullet", delete Me.attributes.bullet)), typeof Me.insert == "string") {
45103
- var Be = Me.insert.replace(/\r\n/g, `
45127
+ var Ve = Me.insert.replace(/\r\n/g, `
45104
45128
  `).replace(/\r/g, `
45105
45129
  `);
45106
- return Ze.insert(Be, Me.attributes);
45130
+ return Ze.insert(Ve, Me.attributes);
45107
45131
  }
45108
45132
  return Ze.push(Me);
45109
45133
  }, new ue.default());
@@ -45257,17 +45281,17 @@ function requireQuill() {
45257
45281
  var Me = document.createRange();
45258
45282
  if (Le > 0) {
45259
45283
  Me.setStart(ze, ft);
45260
- var je = this.scroll.leaf(Ae + Le), Be = oe(je, 2);
45261
- if (Ye = Be[0], ft = Be[1], Ye == null) return null;
45284
+ var je = this.scroll.leaf(Ae + Le), Ve = oe(je, 2);
45285
+ if (Ye = Ve[0], ft = Ve[1], Ye == null) return null;
45262
45286
  var Xe = Ye.position(ft, !0), Je = oe(Xe, 2);
45263
45287
  return ze = Je[0], ft = Je[1], Me.setEnd(ze, ft), Me.getBoundingClientRect();
45264
45288
  } else {
45265
- var Ve = "left", Ke = void 0;
45266
- return ze instanceof Text ? (ft < ze.data.length ? (Me.setStart(ze, ft), Me.setEnd(ze, ft + 1)) : (Me.setStart(ze, ft - 1), Me.setEnd(ze, ft), Ve = "right"), Ke = Me.getBoundingClientRect()) : (Ke = Ye.domNode.getBoundingClientRect(), ft > 0 && (Ve = "right")), {
45289
+ var Be = "left", Ke = void 0;
45290
+ return ze instanceof Text ? (ft < ze.data.length ? (Me.setStart(ze, ft), Me.setEnd(ze, ft + 1)) : (Me.setStart(ze, ft - 1), Me.setEnd(ze, ft), Be = "right"), Ke = Me.getBoundingClientRect()) : (Ke = Ye.domNode.getBoundingClientRect(), ft > 0 && (Be = "right")), {
45267
45291
  bottom: Ke.top + Ke.height,
45268
45292
  height: Ke.height,
45269
- left: Ke[Ve],
45270
- right: Ke[Ve],
45293
+ left: Ke[Be],
45294
+ right: Ke[Be],
45271
45295
  top: Ke.top,
45272
45296
  width: 0
45273
45297
  };
@@ -45332,7 +45356,7 @@ function requireQuill() {
45332
45356
  var Le = this, Ie = Ae.collapsed ? [Ae.index] : [Ae.index, Ae.index + Ae.length], ze = [], We = this.scroll.length();
45333
45357
  return Ie.forEach(function(Ge, Ye) {
45334
45358
  Ge = Math.min(We - 1, Ge);
45335
- var ft = void 0, Qe = Le.scroll.leaf(Ge), Ze = oe(Qe, 2), Me = Ze[0], je = Ze[1], Be = Me.position(je, Ye !== 0), Xe = oe(Be, 2);
45359
+ var ft = void 0, Qe = Le.scroll.leaf(Ge), Ze = oe(Qe, 2), Me = Ze[0], je = Ze[1], Ve = Me.position(je, Ye !== 0), Xe = oe(Ve, 2);
45336
45360
  ft = Xe[0], je = Xe[1], ze.push(ft, je);
45337
45361
  }), ze.length < 2 && (ze = ze.concat(ze)), ze;
45338
45362
  }
@@ -45873,8 +45897,8 @@ function requireQuill() {
45873
45897
  ye.push(Fe), Ce.push(qe);
45874
45898
  }
45875
45899
  oe(Fe, ne) && Fe.forEach(function(Ze, Me) {
45876
- var je = De(Me, He - 1), Be = De(Ze, He - 1);
45877
- qe.set(je, Be);
45900
+ var je = De(Me, He - 1), Ve = De(Ze, He - 1);
45901
+ qe.set(je, Ve);
45878
45902
  }), oe(Fe, de) && Fe.forEach(function(Ze) {
45879
45903
  var Me = De(Ze, He - 1);
45880
45904
  qe.add(Me);
@@ -46041,8 +46065,8 @@ function requireQuill() {
46041
46065
  return;
46042
46066
  }
46043
46067
  } else if (Me instanceof _e.default) {
46044
- var Be = Me.newlineIndex(0);
46045
- Be > -1 && Me.split(Be + 1);
46068
+ var Ve = Me.newlineIndex(0);
46069
+ Ve > -1 && Me.split(Ve + 1);
46046
46070
  }
46047
46071
  var Xe = Me.children.head instanceof ge.default ? null : Me.children.head;
46048
46072
  Ye.moveChildren(Me, Xe), Ye.remove();
@@ -46102,8 +46126,8 @@ function requireQuill() {
46102
46126
  value: function() {
46103
46127
  var Ie = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, ze = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE, We = function Ge(Ye, ft, Qe) {
46104
46128
  var Ze = [], Me = Qe;
46105
- return Ye.children.forEachAt(ft, Qe, function(je, Be, Xe) {
46106
- Fe(je) ? Ze.push(je) : je instanceof ue.default.Container && (Ze = Ze.concat(Ge(je, Be, Me))), Me -= Xe;
46129
+ return Ye.children.forEachAt(ft, Qe, function(je, Ve, Xe) {
46130
+ Fe(je) ? Ze.push(je) : je instanceof ue.default.Container && (Ze = Ze.concat(Ge(je, Ve, Me))), Me -= Xe;
46107
46131
  }), Ze;
46108
46132
  };
46109
46133
  return We(this, Ie, ze);
@@ -46137,18 +46161,18 @@ function requireQuill() {
46137
46161
  Object.defineProperty(te, "__esModule", {
46138
46162
  value: !0
46139
46163
  }), te.SHORTKEY = te.default = void 0;
46140
- var oe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Ve) {
46141
- return typeof Ve;
46142
- } : function(Ve) {
46143
- return Ve && typeof Symbol == "function" && Ve.constructor === Symbol && Ve !== Symbol.prototype ? "symbol" : typeof Ve;
46164
+ var oe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Be) {
46165
+ return typeof Be;
46166
+ } : function(Be) {
46167
+ return Be && typeof Symbol == "function" && Be.constructor === Symbol && Be !== Symbol.prototype ? "symbol" : typeof Be;
46144
46168
  }, ne = /* @__PURE__ */ (function() {
46145
- function Ve(Ke, rt) {
46169
+ function Be(Ke, rt) {
46146
46170
  var ot = [], _t = !0, kt = !1, qt = void 0;
46147
46171
  try {
46148
46172
  for (var Lt = Ke[Symbol.iterator](), Nt; !(_t = (Nt = Lt.next()).done) && (ot.push(Nt.value), !(rt && ot.length === rt)); _t = !0)
46149
46173
  ;
46150
- } catch (Vt) {
46151
- kt = !0, qt = Vt;
46174
+ } catch (Bt) {
46175
+ kt = !0, qt = Bt;
46152
46176
  } finally {
46153
46177
  try {
46154
46178
  !_t && Lt.return && Lt.return();
@@ -46162,42 +46186,42 @@ function requireQuill() {
46162
46186
  if (Array.isArray(Ke))
46163
46187
  return Ke;
46164
46188
  if (Symbol.iterator in Object(Ke))
46165
- return Ve(Ke, rt);
46189
+ return Be(Ke, rt);
46166
46190
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
46167
46191
  };
46168
46192
  })(), de = /* @__PURE__ */ (function() {
46169
- function Ve(Ke, rt) {
46193
+ function Be(Ke, rt) {
46170
46194
  for (var ot = 0; ot < rt.length; ot++) {
46171
46195
  var _t = rt[ot];
46172
46196
  _t.enumerable = _t.enumerable || !1, _t.configurable = !0, "value" in _t && (_t.writable = !0), Object.defineProperty(Ke, _t.key, _t);
46173
46197
  }
46174
46198
  }
46175
46199
  return function(Ke, rt, ot) {
46176
- return rt && Ve(Ke.prototype, rt), ot && Ve(Ke, ot), Ke;
46200
+ return rt && Be(Ke.prototype, rt), ot && Be(Ke, ot), Ke;
46177
46201
  };
46178
46202
  })(), ce = re(21), ue = qe(ce), he = re(11), pe = qe(he), fe = re(3), be = qe(fe), me = re(2), ge = qe(me), ve = re(20), _e = qe(ve), we = re(0), Se = qe(we), ye = re(5), Ce = qe(ye), Pe = re(10), De = qe(Pe), Fe = re(9), He = qe(Fe);
46179
- function qe(Ve) {
46180
- return Ve && Ve.__esModule ? Ve : { default: Ve };
46203
+ function qe(Be) {
46204
+ return Be && Be.__esModule ? Be : { default: Be };
46181
46205
  }
46182
- function Ae(Ve, Ke, rt) {
46183
- return Ke in Ve ? Object.defineProperty(Ve, Ke, { value: rt, enumerable: !0, configurable: !0, writable: !0 }) : Ve[Ke] = rt, Ve;
46206
+ function Ae(Be, Ke, rt) {
46207
+ return Ke in Be ? Object.defineProperty(Be, Ke, { value: rt, enumerable: !0, configurable: !0, writable: !0 }) : Be[Ke] = rt, Be;
46184
46208
  }
46185
- function Le(Ve, Ke) {
46186
- if (!(Ve instanceof Ke))
46209
+ function Le(Be, Ke) {
46210
+ if (!(Be instanceof Ke))
46187
46211
  throw new TypeError("Cannot call a class as a function");
46188
46212
  }
46189
- function Ie(Ve, Ke) {
46190
- if (!Ve)
46213
+ function Ie(Be, Ke) {
46214
+ if (!Be)
46191
46215
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
46192
- return Ke && (typeof Ke == "object" || typeof Ke == "function") ? Ke : Ve;
46216
+ return Ke && (typeof Ke == "object" || typeof Ke == "function") ? Ke : Be;
46193
46217
  }
46194
- function ze(Ve, Ke) {
46218
+ function ze(Be, Ke) {
46195
46219
  if (typeof Ke != "function" && Ke !== null)
46196
46220
  throw new TypeError("Super expression must either be null or a function, not " + typeof Ke);
46197
- Ve.prototype = Object.create(Ke && Ke.prototype, { constructor: { value: Ve, enumerable: !1, writable: !0, configurable: !0 } }), Ke && (Object.setPrototypeOf ? Object.setPrototypeOf(Ve, Ke) : Ve.__proto__ = Ke);
46221
+ Be.prototype = Object.create(Ke && Ke.prototype, { constructor: { value: Be, enumerable: !1, writable: !0, configurable: !0 } }), Ke && (Object.setPrototypeOf ? Object.setPrototypeOf(Be, Ke) : Be.__proto__ = Ke);
46198
46222
  }
46199
- var We = (0, De.default)("quill:keyboard"), Ge = /Mac/i.test(navigator.platform) ? "metaKey" : "ctrlKey", Ye = (function(Ve) {
46200
- ze(Ke, Ve), de(Ke, null, [{
46223
+ var We = (0, De.default)("quill:keyboard"), Ge = /Mac/i.test(navigator.platform) ? "metaKey" : "ctrlKey", Ye = (function(Be) {
46224
+ ze(Ke, Be), de(Ke, null, [{
46201
46225
  key: "match",
46202
46226
  value: function(ot, _t) {
46203
46227
  return _t = Je(_t), ["altKey", "ctrlKey", "metaKey", "shiftKey"].some(function(kt) {
@@ -46233,7 +46257,7 @@ function requireQuill() {
46233
46257
  if (qt.length !== 0) {
46234
46258
  var Lt = ot.quill.getSelection();
46235
46259
  if (!(Lt == null || !ot.quill.hasFocus())) {
46236
- var Nt = ot.quill.getLine(Lt.index), Vt = ne(Nt, 2), rs = Vt[0], Kt = Vt[1], gt = ot.quill.getLeaf(Lt.index), mt = ne(gt, 2), xt = mt[0], Ct = mt[1], $t = Lt.length === 0 ? [xt, Ct] : ot.quill.getLeaf(Lt.index + Lt.length), Mt = ne($t, 2), Ft = Mt[0], zt = Mt[1], cs = xt instanceof Se.default.Text ? xt.value().slice(0, Ct) : "", ds = Ft instanceof Se.default.Text ? Ft.value().slice(zt) : "", Yt = {
46260
+ var Nt = ot.quill.getLine(Lt.index), Bt = ne(Nt, 2), rs = Bt[0], Kt = Bt[1], gt = ot.quill.getLeaf(Lt.index), mt = ne(gt, 2), xt = mt[0], Ct = mt[1], $t = Lt.length === 0 ? [xt, Ct] : ot.quill.getLeaf(Lt.index + Lt.length), Mt = ne($t, 2), Ft = Mt[0], zt = Mt[1], cs = xt instanceof Se.default.Text ? xt.value().slice(0, Ct) : "", ds = Ft instanceof Se.default.Text ? Ft.value().slice(zt) : "", Yt = {
46237
46261
  collapsed: Lt.length === 0,
46238
46262
  empty: Lt.length === 0 && rs.length() <= 1,
46239
46263
  format: ot.quill.getFormat(Lt),
@@ -46308,8 +46332,8 @@ function requireQuill() {
46308
46332
  rt.format.indent != null ? this.quill.format("indent", "-1", Ce.default.sources.USER) : rt.format.list != null && this.quill.format("list", !1, Ce.default.sources.USER);
46309
46333
  }
46310
46334
  },
46311
- "indent code-block": Be(!0),
46312
- "outdent code-block": Be(!1),
46335
+ "indent code-block": Ve(!0),
46336
+ "outdent code-block": Ve(!1),
46313
46337
  "remove tab": {
46314
46338
  key: Ye.keys.TAB,
46315
46339
  shiftKey: !0,
@@ -46382,8 +46406,8 @@ function requireQuill() {
46382
46406
  Nt = "ordered";
46383
46407
  }
46384
46408
  this.quill.insertText(Ke.index, " ", Ce.default.sources.USER), this.quill.history.cutoff();
46385
- var Vt = new ge.default().retain(Ke.index - Lt).delete(ot + 1).retain(qt.length() - 2 - Lt).retain(1, { list: Nt });
46386
- this.quill.updateContents(Vt, Ce.default.sources.USER), this.quill.history.cutoff(), this.quill.setSelection(Ke.index - ot, Ce.default.sources.SILENT);
46409
+ var Bt = new ge.default().retain(Ke.index - Lt).delete(ot + 1).retain(qt.length() - 2 - Lt).retain(1, { list: Nt });
46410
+ this.quill.updateContents(Bt, Ce.default.sources.USER), this.quill.history.cutoff(), this.quill.setSelection(Ke.index - ot, Ce.default.sources.SILENT);
46387
46411
  }
46388
46412
  },
46389
46413
  "code exit": {
@@ -46403,103 +46427,103 @@ function requireQuill() {
46403
46427
  "embed right shift": ft(Ye.keys.RIGHT, !0)
46404
46428
  }
46405
46429
  };
46406
- function ft(Ve, Ke) {
46407
- var rt, ot = Ve === Ye.keys.LEFT ? "prefix" : "suffix";
46430
+ function ft(Be, Ke) {
46431
+ var rt, ot = Be === Ye.keys.LEFT ? "prefix" : "suffix";
46408
46432
  return rt = {
46409
- key: Ve,
46433
+ key: Be,
46410
46434
  shiftKey: Ke,
46411
46435
  altKey: null
46412
46436
  }, Ae(rt, ot, /^$/), Ae(rt, "handler", function(kt) {
46413
46437
  var qt = kt.index;
46414
- Ve === Ye.keys.RIGHT && (qt += kt.length + 1);
46415
- var Lt = this.quill.getLeaf(qt), Nt = ne(Lt, 1), Vt = Nt[0];
46416
- return Vt instanceof Se.default.Embed ? (Ve === Ye.keys.LEFT ? Ke ? this.quill.setSelection(kt.index - 1, kt.length + 1, Ce.default.sources.USER) : this.quill.setSelection(kt.index - 1, Ce.default.sources.USER) : Ke ? this.quill.setSelection(kt.index, kt.length + 1, Ce.default.sources.USER) : this.quill.setSelection(kt.index + kt.length + 1, Ce.default.sources.USER), !1) : !0;
46438
+ Be === Ye.keys.RIGHT && (qt += kt.length + 1);
46439
+ var Lt = this.quill.getLeaf(qt), Nt = ne(Lt, 1), Bt = Nt[0];
46440
+ return Bt instanceof Se.default.Embed ? (Be === Ye.keys.LEFT ? Ke ? this.quill.setSelection(kt.index - 1, kt.length + 1, Ce.default.sources.USER) : this.quill.setSelection(kt.index - 1, Ce.default.sources.USER) : Ke ? this.quill.setSelection(kt.index, kt.length + 1, Ce.default.sources.USER) : this.quill.setSelection(kt.index + kt.length + 1, Ce.default.sources.USER), !1) : !0;
46417
46441
  }), rt;
46418
46442
  }
46419
- function Qe(Ve, Ke) {
46420
- if (!(Ve.index === 0 || this.quill.getLength() <= 1)) {
46421
- var rt = this.quill.getLine(Ve.index), ot = ne(rt, 1), _t = ot[0], kt = {};
46443
+ function Qe(Be, Ke) {
46444
+ if (!(Be.index === 0 || this.quill.getLength() <= 1)) {
46445
+ var rt = this.quill.getLine(Be.index), ot = ne(rt, 1), _t = ot[0], kt = {};
46422
46446
  if (Ke.offset === 0) {
46423
- var qt = this.quill.getLine(Ve.index - 1), Lt = ne(qt, 1), Nt = Lt[0];
46447
+ var qt = this.quill.getLine(Be.index - 1), Lt = ne(qt, 1), Nt = Lt[0];
46424
46448
  if (Nt != null && Nt.length() > 1) {
46425
- var Vt = _t.formats(), rs = this.quill.getFormat(Ve.index - 1, 1);
46426
- kt = _e.default.attributes.diff(Vt, rs) || {};
46449
+ var Bt = _t.formats(), rs = this.quill.getFormat(Be.index - 1, 1);
46450
+ kt = _e.default.attributes.diff(Bt, rs) || {};
46427
46451
  }
46428
46452
  }
46429
46453
  var Kt = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Ke.prefix) ? 2 : 1;
46430
- this.quill.deleteText(Ve.index - Kt, Kt, Ce.default.sources.USER), Object.keys(kt).length > 0 && this.quill.formatLine(Ve.index - Kt, Kt, kt, Ce.default.sources.USER), this.quill.focus();
46454
+ this.quill.deleteText(Be.index - Kt, Kt, Ce.default.sources.USER), Object.keys(kt).length > 0 && this.quill.formatLine(Be.index - Kt, Kt, kt, Ce.default.sources.USER), this.quill.focus();
46431
46455
  }
46432
46456
  }
46433
- function Ze(Ve, Ke) {
46457
+ function Ze(Be, Ke) {
46434
46458
  var rt = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Ke.suffix) ? 2 : 1;
46435
- if (!(Ve.index >= this.quill.getLength() - rt)) {
46436
- var ot = {}, _t = 0, kt = this.quill.getLine(Ve.index), qt = ne(kt, 1), Lt = qt[0];
46459
+ if (!(Be.index >= this.quill.getLength() - rt)) {
46460
+ var ot = {}, _t = 0, kt = this.quill.getLine(Be.index), qt = ne(kt, 1), Lt = qt[0];
46437
46461
  if (Ke.offset >= Lt.length() - 1) {
46438
- var Nt = this.quill.getLine(Ve.index + 1), Vt = ne(Nt, 1), rs = Vt[0];
46462
+ var Nt = this.quill.getLine(Be.index + 1), Bt = ne(Nt, 1), rs = Bt[0];
46439
46463
  if (rs) {
46440
- var Kt = Lt.formats(), gt = this.quill.getFormat(Ve.index, 1);
46464
+ var Kt = Lt.formats(), gt = this.quill.getFormat(Be.index, 1);
46441
46465
  ot = _e.default.attributes.diff(Kt, gt) || {}, _t = rs.length();
46442
46466
  }
46443
46467
  }
46444
- this.quill.deleteText(Ve.index, rt, Ce.default.sources.USER), Object.keys(ot).length > 0 && this.quill.formatLine(Ve.index + _t - 1, rt, ot, Ce.default.sources.USER);
46468
+ this.quill.deleteText(Be.index, rt, Ce.default.sources.USER), Object.keys(ot).length > 0 && this.quill.formatLine(Be.index + _t - 1, rt, ot, Ce.default.sources.USER);
46445
46469
  }
46446
46470
  }
46447
- function Me(Ve) {
46448
- var Ke = this.quill.getLines(Ve), rt = {};
46471
+ function Me(Be) {
46472
+ var Ke = this.quill.getLines(Be), rt = {};
46449
46473
  if (Ke.length > 1) {
46450
46474
  var ot = Ke[0].formats(), _t = Ke[Ke.length - 1].formats();
46451
46475
  rt = _e.default.attributes.diff(_t, ot) || {};
46452
46476
  }
46453
- this.quill.deleteText(Ve, Ce.default.sources.USER), Object.keys(rt).length > 0 && this.quill.formatLine(Ve.index, 1, rt, Ce.default.sources.USER), this.quill.setSelection(Ve.index, Ce.default.sources.SILENT), this.quill.focus();
46477
+ this.quill.deleteText(Be, Ce.default.sources.USER), Object.keys(rt).length > 0 && this.quill.formatLine(Be.index, 1, rt, Ce.default.sources.USER), this.quill.setSelection(Be.index, Ce.default.sources.SILENT), this.quill.focus();
46454
46478
  }
46455
- function je(Ve, Ke) {
46479
+ function je(Be, Ke) {
46456
46480
  var rt = this;
46457
- Ve.length > 0 && this.quill.scroll.deleteAt(Ve.index, Ve.length);
46481
+ Be.length > 0 && this.quill.scroll.deleteAt(Be.index, Be.length);
46458
46482
  var ot = Object.keys(Ke.format).reduce(function(_t, kt) {
46459
46483
  return Se.default.query(kt, Se.default.Scope.BLOCK) && !Array.isArray(Ke.format[kt]) && (_t[kt] = Ke.format[kt]), _t;
46460
46484
  }, {});
46461
- this.quill.insertText(Ve.index, `
46462
- `, ot, Ce.default.sources.USER), this.quill.setSelection(Ve.index + 1, Ce.default.sources.SILENT), this.quill.focus(), Object.keys(Ke.format).forEach(function(_t) {
46485
+ this.quill.insertText(Be.index, `
46486
+ `, ot, Ce.default.sources.USER), this.quill.setSelection(Be.index + 1, Ce.default.sources.SILENT), this.quill.focus(), Object.keys(Ke.format).forEach(function(_t) {
46463
46487
  ot[_t] == null && (Array.isArray(Ke.format[_t]) || _t !== "link" && rt.quill.format(_t, Ke.format[_t], Ce.default.sources.USER));
46464
46488
  });
46465
46489
  }
46466
- function Be(Ve) {
46490
+ function Ve(Be) {
46467
46491
  return {
46468
46492
  key: Ye.keys.TAB,
46469
- shiftKey: !Ve,
46493
+ shiftKey: !Be,
46470
46494
  format: { "code-block": !0 },
46471
46495
  handler: function(rt) {
46472
- var ot = Se.default.query("code-block"), _t = rt.index, kt = rt.length, qt = this.quill.scroll.descendant(ot, _t), Lt = ne(qt, 2), Nt = Lt[0], Vt = Lt[1];
46496
+ var ot = Se.default.query("code-block"), _t = rt.index, kt = rt.length, qt = this.quill.scroll.descendant(ot, _t), Lt = ne(qt, 2), Nt = Lt[0], Bt = Lt[1];
46473
46497
  if (Nt != null) {
46474
- var rs = this.quill.getIndex(Nt), Kt = Nt.newlineIndex(Vt, !0) + 1, gt = Nt.newlineIndex(rs + Vt + kt), mt = Nt.domNode.textContent.slice(Kt, gt).split(`
46498
+ var rs = this.quill.getIndex(Nt), Kt = Nt.newlineIndex(Bt, !0) + 1, gt = Nt.newlineIndex(rs + Bt + kt), mt = Nt.domNode.textContent.slice(Kt, gt).split(`
46475
46499
  `);
46476
- Vt = 0, mt.forEach(function(xt, Ct) {
46477
- Ve ? (Nt.insertAt(Kt + Vt, ot.TAB), Vt += ot.TAB.length, Ct === 0 ? _t += ot.TAB.length : kt += ot.TAB.length) : xt.startsWith(ot.TAB) && (Nt.deleteAt(Kt + Vt, ot.TAB.length), Vt -= ot.TAB.length, Ct === 0 ? _t -= ot.TAB.length : kt -= ot.TAB.length), Vt += xt.length + 1;
46500
+ Bt = 0, mt.forEach(function(xt, Ct) {
46501
+ Be ? (Nt.insertAt(Kt + Bt, ot.TAB), Bt += ot.TAB.length, Ct === 0 ? _t += ot.TAB.length : kt += ot.TAB.length) : xt.startsWith(ot.TAB) && (Nt.deleteAt(Kt + Bt, ot.TAB.length), Bt -= ot.TAB.length, Ct === 0 ? _t -= ot.TAB.length : kt -= ot.TAB.length), Bt += xt.length + 1;
46478
46502
  }), this.quill.update(Ce.default.sources.USER), this.quill.setSelection(_t, kt, Ce.default.sources.SILENT);
46479
46503
  }
46480
46504
  }
46481
46505
  };
46482
46506
  }
46483
- function Xe(Ve) {
46507
+ function Xe(Be) {
46484
46508
  return {
46485
- key: Ve[0].toUpperCase(),
46509
+ key: Be[0].toUpperCase(),
46486
46510
  shortKey: !0,
46487
46511
  handler: function(rt, ot) {
46488
- this.quill.format(Ve, !ot.format[Ve], Ce.default.sources.USER);
46512
+ this.quill.format(Be, !ot.format[Be], Ce.default.sources.USER);
46489
46513
  }
46490
46514
  };
46491
46515
  }
46492
- function Je(Ve) {
46493
- if (typeof Ve == "string" || typeof Ve == "number")
46494
- return Je({ key: Ve });
46495
- if ((typeof Ve > "u" ? "undefined" : oe(Ve)) === "object" && (Ve = (0, ue.default)(Ve, !1)), typeof Ve.key == "string")
46496
- if (Ye.keys[Ve.key.toUpperCase()] != null)
46497
- Ve.key = Ye.keys[Ve.key.toUpperCase()];
46498
- else if (Ve.key.length === 1)
46499
- Ve.key = Ve.key.toUpperCase().charCodeAt(0);
46516
+ function Je(Be) {
46517
+ if (typeof Be == "string" || typeof Be == "number")
46518
+ return Je({ key: Be });
46519
+ if ((typeof Be > "u" ? "undefined" : oe(Be)) === "object" && (Be = (0, ue.default)(Be, !1)), typeof Be.key == "string")
46520
+ if (Ye.keys[Be.key.toUpperCase()] != null)
46521
+ Be.key = Ye.keys[Be.key.toUpperCase()];
46522
+ else if (Be.key.length === 1)
46523
+ Be.key = Be.key.toUpperCase().charCodeAt(0);
46500
46524
  else
46501
46525
  return null;
46502
- return Ve.shortKey && (Ve[Ge] = Ve.shortKey, delete Ve.shortKey), Ve;
46526
+ return Be.shortKey && (Be[Ge] = Be.shortKey, delete Be.shortKey), Be;
46503
46527
  }
46504
46528
  te.default = Ye, te.SHORTKEY = Ge;
46505
46529
  }),
@@ -47360,8 +47384,8 @@ function requireQuill() {
47360
47384
  throw new TypeError("unexpected type: " + Le.type);
47361
47385
  return Ae.setStart(Ge, 0), Ae.setEnd(Ye, Ye.length), { range: Ae, mode: "all" };
47362
47386
  }
47363
- var Ze = We(), Me = void 0, je = void 0, Be = Ye.length - Ce(Ye);
47364
- return ft ? (Le.extend(Ge, 0), Me = We() + ye(Ge), Le.extend(Ye, Be), je = Be - (We() - Ze), Le.extend(Ye, je)) : (Le.extend(Ye, Be), je = Be - We(), Le.extend(Ge, 0), Me = We() - Ze + ye(Ge), Le.extend(Ge, Me)), Ae.setStart(Ge, Me), Ae.setEnd(Ye, je), {
47387
+ var Ze = We(), Me = void 0, je = void 0, Ve = Ye.length - Ce(Ye);
47388
+ return ft ? (Le.extend(Ge, 0), Me = We() + ye(Ge), Le.extend(Ye, Ve), je = Ve - (We() - Ze), Le.extend(Ye, je)) : (Le.extend(Ye, Ve), je = Ve - We(), Le.extend(Ge, 0), Me = We() - Ze + ye(Ge), Le.extend(Ge, Me)), Ae.setStart(Ge, Me), Ae.setEnd(Ye, je), {
47365
47389
  mode: ft ? "right" : "left",
47366
47390
  range: Ae
47367
47391
  };
@@ -47826,92 +47850,92 @@ function requireQuill() {
47826
47850
  value: !0
47827
47851
  }), te.default = te.BaseTooltip = void 0;
47828
47852
  var oe = /* @__PURE__ */ (function() {
47829
- function je(Be, Xe) {
47853
+ function je(Ve, Xe) {
47830
47854
  for (var Je = 0; Je < Xe.length; Je++) {
47831
- var Ve = Xe[Je];
47832
- Ve.enumerable = Ve.enumerable || !1, Ve.configurable = !0, "value" in Ve && (Ve.writable = !0), Object.defineProperty(Be, Ve.key, Ve);
47855
+ var Be = Xe[Je];
47856
+ Be.enumerable = Be.enumerable || !1, Be.configurable = !0, "value" in Be && (Be.writable = !0), Object.defineProperty(Ve, Be.key, Be);
47833
47857
  }
47834
47858
  }
47835
- return function(Be, Xe, Je) {
47836
- return Xe && je(Be.prototype, Xe), Je && je(Be, Je), Be;
47859
+ return function(Ve, Xe, Je) {
47860
+ return Xe && je(Ve.prototype, Xe), Je && je(Ve, Je), Ve;
47837
47861
  };
47838
- })(), ne = function je(Be, Xe, Je) {
47839
- Be === null && (Be = Function.prototype);
47840
- var Ve = Object.getOwnPropertyDescriptor(Be, Xe);
47841
- if (Ve === void 0) {
47842
- var Ke = Object.getPrototypeOf(Be);
47862
+ })(), ne = function je(Ve, Xe, Je) {
47863
+ Ve === null && (Ve = Function.prototype);
47864
+ var Be = Object.getOwnPropertyDescriptor(Ve, Xe);
47865
+ if (Be === void 0) {
47866
+ var Ke = Object.getPrototypeOf(Ve);
47843
47867
  return Ke === null ? void 0 : je(Ke, Xe, Je);
47844
47868
  } else {
47845
- if ("value" in Ve)
47846
- return Ve.value;
47847
- var rt = Ve.get;
47869
+ if ("value" in Be)
47870
+ return Be.value;
47871
+ var rt = Be.get;
47848
47872
  return rt === void 0 ? void 0 : rt.call(Je);
47849
47873
  }
47850
47874
  }, de = re(3), ce = He(de), ue = re(2), he = He(ue), pe = re(8), fe = He(pe), be = re(23), me = He(be), ge = re(35), ve = He(ge), _e = re(60), we = He(_e), Se = re(61), ye = He(Se), Ce = re(28), Pe = He(Ce), De = re(62), Fe = He(De);
47851
47875
  function He(je) {
47852
47876
  return je && je.__esModule ? je : { default: je };
47853
47877
  }
47854
- function qe(je, Be) {
47855
- if (!(je instanceof Be))
47878
+ function qe(je, Ve) {
47879
+ if (!(je instanceof Ve))
47856
47880
  throw new TypeError("Cannot call a class as a function");
47857
47881
  }
47858
- function Ae(je, Be) {
47882
+ function Ae(je, Ve) {
47859
47883
  if (!je)
47860
47884
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
47861
- return Be && (typeof Be == "object" || typeof Be == "function") ? Be : je;
47885
+ return Ve && (typeof Ve == "object" || typeof Ve == "function") ? Ve : je;
47862
47886
  }
47863
- function Le(je, Be) {
47864
- if (typeof Be != "function" && Be !== null)
47865
- throw new TypeError("Super expression must either be null or a function, not " + typeof Be);
47866
- je.prototype = Object.create(Be && Be.prototype, { constructor: { value: je, enumerable: !1, writable: !0, configurable: !0 } }), Be && (Object.setPrototypeOf ? Object.setPrototypeOf(je, Be) : je.__proto__ = Be);
47887
+ function Le(je, Ve) {
47888
+ if (typeof Ve != "function" && Ve !== null)
47889
+ throw new TypeError("Super expression must either be null or a function, not " + typeof Ve);
47890
+ je.prototype = Object.create(Ve && Ve.prototype, { constructor: { value: je, enumerable: !1, writable: !0, configurable: !0 } }), Ve && (Object.setPrototypeOf ? Object.setPrototypeOf(je, Ve) : je.__proto__ = Ve);
47867
47891
  }
47868
47892
  var Ie = [!1, "center", "right", "justify"], ze = ["#000000", "#e60000", "#ff9900", "#ffff00", "#008a00", "#0066cc", "#9933ff", "#ffffff", "#facccc", "#ffebcc", "#ffffcc", "#cce8cc", "#cce0f5", "#ebd6ff", "#bbbbbb", "#f06666", "#ffc266", "#ffff66", "#66b966", "#66a3e0", "#c285ff", "#888888", "#a10000", "#b26b00", "#b2b200", "#006100", "#0047b2", "#6b24b2", "#444444", "#5c0000", "#663d00", "#666600", "#003700", "#002966", "#3d1466"], We = [!1, "serif", "monospace"], Ge = ["1", "2", "3", !1], Ye = ["petita", !1, "gran", "enorme"], ft = (function(je) {
47869
- Le(Be, je);
47870
- function Be(Xe, Je) {
47871
- qe(this, Be);
47872
- var Ve = Ae(this, (Be.__proto__ || Object.getPrototypeOf(Be)).call(this, Xe, Je)), Ke = function rt(ot) {
47893
+ Le(Ve, je);
47894
+ function Ve(Xe, Je) {
47895
+ qe(this, Ve);
47896
+ var Be = Ae(this, (Ve.__proto__ || Object.getPrototypeOf(Ve)).call(this, Xe, Je)), Ke = function rt(ot) {
47873
47897
  if (!document.body.contains(Xe.root))
47874
47898
  return document.body.removeEventListener("click", rt);
47875
- Ve.tooltip != null && !Ve.tooltip.root.contains(ot.target) && document.activeElement !== Ve.tooltip.textbox && !Ve.quill.hasFocus() && Ve.tooltip.hide(), Ve.pickers != null && Ve.pickers.forEach(function(_t) {
47899
+ Be.tooltip != null && !Be.tooltip.root.contains(ot.target) && document.activeElement !== Be.tooltip.textbox && !Be.quill.hasFocus() && Be.tooltip.hide(), Be.pickers != null && Be.pickers.forEach(function(_t) {
47876
47900
  _t.container.contains(ot.target) || _t.close();
47877
47901
  });
47878
47902
  };
47879
- return Xe.emitter.listenDOM("click", document.body, Ke), Ve;
47903
+ return Xe.emitter.listenDOM("click", document.body, Ke), Be;
47880
47904
  }
47881
- return oe(Be, [{
47905
+ return oe(Ve, [{
47882
47906
  key: "addModule",
47883
47907
  value: function(Je) {
47884
- var Ve = ne(Be.prototype.__proto__ || Object.getPrototypeOf(Be.prototype), "addModule", this).call(this, Je);
47885
- return Je === "toolbar" && this.extendToolbar(Ve), Ve;
47908
+ var Be = ne(Ve.prototype.__proto__ || Object.getPrototypeOf(Ve.prototype), "addModule", this).call(this, Je);
47909
+ return Je === "toolbar" && this.extendToolbar(Be), Be;
47886
47910
  }
47887
47911
  }, {
47888
47912
  key: "buildButtons",
47889
- value: function(Je, Ve) {
47913
+ value: function(Je, Be) {
47890
47914
  Je.forEach(function(Ke) {
47891
47915
  var rt = Ke.getAttribute("class") || "";
47892
47916
  rt.split(/\s+/).forEach(function(ot) {
47893
- if (ot.startsWith("ql-") && (ot = ot.slice(3), Ve[ot] != null))
47917
+ if (ot.startsWith("ql-") && (ot = ot.slice(3), Be[ot] != null))
47894
47918
  if (ot === "direction")
47895
- Ke.innerHTML = Ve[ot][""] + Ve[ot].rtl;
47896
- else if (typeof Ve[ot] == "string")
47897
- Ke.innerHTML = Ve[ot];
47919
+ Ke.innerHTML = Be[ot][""] + Be[ot].rtl;
47920
+ else if (typeof Be[ot] == "string")
47921
+ Ke.innerHTML = Be[ot];
47898
47922
  else {
47899
47923
  var _t = Ke.value || "";
47900
- _t != null && Ve[ot][_t] && (Ke.innerHTML = Ve[ot][_t]);
47924
+ _t != null && Be[ot][_t] && (Ke.innerHTML = Be[ot][_t]);
47901
47925
  }
47902
47926
  });
47903
47927
  });
47904
47928
  }
47905
47929
  }, {
47906
47930
  key: "buildPickers",
47907
- value: function(Je, Ve) {
47931
+ value: function(Je, Be) {
47908
47932
  var Ke = this;
47909
47933
  this.pickers = Je.map(function(ot) {
47910
47934
  if (ot.classList.contains("ql-align"))
47911
- return ot.querySelector("option") == null && Me(ot, Ie), new ye.default(ot, Ve.align);
47935
+ return ot.querySelector("option") == null && Me(ot, Ie), new ye.default(ot, Be.align);
47912
47936
  if (ot.classList.contains("ql-background") || ot.classList.contains("ql-color")) {
47913
47937
  var _t = ot.classList.contains("ql-background") ? "background" : "color";
47914
- return ot.querySelector("option") == null && Me(ot, ze, _t === "background" ? "#ffffff" : "#000000"), new we.default(ot, Ve[_t]);
47938
+ return ot.querySelector("option") == null && Me(ot, ze, _t === "background" ? "#ffffff" : "#000000"), new we.default(ot, Be[_t]);
47915
47939
  } else
47916
47940
  return ot.querySelector("option") == null && (ot.classList.contains("ql-font") ? Me(ot, We) : ot.classList.contains("ql-header") ? Me(ot, Ge) : ot.classList.contains("ql-size") && Me(ot, Ye)), new Pe.default(ot);
47917
47941
  });
@@ -47922,7 +47946,7 @@ function requireQuill() {
47922
47946
  };
47923
47947
  this.quill.on(fe.default.events.EDITOR_CHANGE, rt);
47924
47948
  }
47925
- }]), Be;
47949
+ }]), Ve;
47926
47950
  })(ve.default);
47927
47951
  ft.DEFAULTS = (0, ce.default)(!0, {}, ve.default.DEFAULTS, {
47928
47952
  modules: {
@@ -47932,13 +47956,13 @@ function requireQuill() {
47932
47956
  this.quill.theme.tooltip.edit("formula");
47933
47957
  },
47934
47958
  image: function() {
47935
- var Be = this, Xe = this.container.querySelector("input.ql-image[type=file]");
47959
+ var Ve = this, Xe = this.container.querySelector("input.ql-image[type=file]");
47936
47960
  Xe == null && (Xe = document.createElement("input"), Xe.setAttribute("type", "file"), Xe.setAttribute("accept", "image/png, image/gif, image/jpeg, image/bmp, image/x-icon"), Xe.classList.add("ql-image"), Xe.addEventListener("change", function() {
47937
47961
  if (Xe.files != null && Xe.files[0] != null) {
47938
47962
  var Je = new FileReader();
47939
- Je.onload = function(Ve) {
47940
- var Ke = Be.quill.getSelection(!0);
47941
- Be.quill.updateContents(new he.default().retain(Ke.index).delete(Ke.length).insert({ image: Ve.target.result }), fe.default.sources.USER), Be.quill.setSelection(Ke.index + 1, fe.default.sources.SILENT), Xe.value = "";
47963
+ Je.onload = function(Be) {
47964
+ var Ke = Ve.quill.getSelection(!0);
47965
+ Ve.quill.updateContents(new he.default().retain(Ke.index).delete(Ke.length).insert({ image: Be.target.result }), fe.default.sources.USER), Ve.quill.setSelection(Ke.index + 1, fe.default.sources.SILENT), Xe.value = "";
47942
47966
  }, Je.readAsDataURL(Xe.files[0]);
47943
47967
  }
47944
47968
  }), this.container.appendChild(Xe)), Xe.click();
@@ -47951,18 +47975,18 @@ function requireQuill() {
47951
47975
  }
47952
47976
  });
47953
47977
  var Qe = (function(je) {
47954
- Le(Be, je);
47955
- function Be(Xe, Je) {
47956
- qe(this, Be);
47957
- var Ve = Ae(this, (Be.__proto__ || Object.getPrototypeOf(Be)).call(this, Xe, Je));
47958
- return Ve.textbox = Ve.root.querySelector('input[type="text"]'), Ve.listen(), Ve;
47978
+ Le(Ve, je);
47979
+ function Ve(Xe, Je) {
47980
+ qe(this, Ve);
47981
+ var Be = Ae(this, (Ve.__proto__ || Object.getPrototypeOf(Ve)).call(this, Xe, Je));
47982
+ return Be.textbox = Be.root.querySelector('input[type="text"]'), Be.listen(), Be;
47959
47983
  }
47960
- return oe(Be, [{
47984
+ return oe(Ve, [{
47961
47985
  key: "listen",
47962
47986
  value: function() {
47963
47987
  var Je = this;
47964
- this.textbox.addEventListener("keydown", function(Ve) {
47965
- me.default.match(Ve, "enter") ? (Je.save(), Ve.preventDefault()) : me.default.match(Ve, "escape") && (Je.cancel(), Ve.preventDefault());
47988
+ this.textbox.addEventListener("keydown", function(Be) {
47989
+ me.default.match(Be, "enter") ? (Je.save(), Be.preventDefault()) : me.default.match(Be, "escape") && (Je.cancel(), Be.preventDefault());
47966
47990
  });
47967
47991
  }
47968
47992
  }, {
@@ -47973,8 +47997,8 @@ function requireQuill() {
47973
47997
  }, {
47974
47998
  key: "edit",
47975
47999
  value: function() {
47976
- var Je = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "link", Ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
47977
- this.root.classList.remove("ql-hidden"), this.root.classList.add("ql-editing"), Ve != null ? this.textbox.value = Ve : Je !== this.root.getAttribute("data-mode") && (this.textbox.value = ""), this.position(this.quill.getBounds(this.quill.selection.savedRange)), this.textbox.select(), this.textbox.setAttribute("placeholder", this.textbox.getAttribute("data-" + Je) || ""), this.root.setAttribute("data-mode", Je);
48000
+ var Je = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "link", Be = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
48001
+ this.root.classList.remove("ql-hidden"), this.root.classList.add("ql-editing"), Be != null ? this.textbox.value = Be : Je !== this.root.getAttribute("data-mode") && (this.textbox.value = ""), this.position(this.quill.getBounds(this.quill.selection.savedRange)), this.textbox.select(), this.textbox.setAttribute("placeholder", this.textbox.getAttribute("data-" + Je) || ""), this.root.setAttribute("data-mode", Je);
47978
48002
  }
47979
48003
  }, {
47980
48004
  key: "restoreFocus",
@@ -47988,8 +48012,8 @@ function requireQuill() {
47988
48012
  var Je = this.textbox.value;
47989
48013
  switch (this.root.getAttribute("data-mode")) {
47990
48014
  case "link": {
47991
- var Ve = this.quill.root.scrollTop;
47992
- this.linkRange ? (this.quill.formatText(this.linkRange, "link", Je, fe.default.sources.USER), delete this.linkRange) : (this.restoreFocus(), this.quill.format("link", Je, fe.default.sources.USER)), this.quill.root.scrollTop = Ve;
48015
+ var Be = this.quill.root.scrollTop;
48016
+ this.linkRange ? (this.quill.formatText(this.linkRange, "link", Je, fe.default.sources.USER), delete this.linkRange) : (this.restoreFocus(), this.quill.format("link", Je, fe.default.sources.USER)), this.quill.root.scrollTop = Be;
47993
48017
  break;
47994
48018
  }
47995
48019
  case "video":
@@ -48007,17 +48031,17 @@ function requireQuill() {
48007
48031
  }
48008
48032
  this.textbox.value = "", this.hide();
48009
48033
  }
48010
- }]), Be;
48034
+ }]), Ve;
48011
48035
  })(Fe.default);
48012
48036
  function Ze(je) {
48013
- var Be = je.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || je.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
48014
- return Be ? (Be[1] || "https") + "://www.youtube.com/embed/" + Be[2] + "?showinfo=0" : (Be = je.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) ? (Be[1] || "https") + "://player.vimeo.com/video/" + Be[2] + "/" : je;
48037
+ var Ve = je.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || je.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
48038
+ return Ve ? (Ve[1] || "https") + "://www.youtube.com/embed/" + Ve[2] + "?showinfo=0" : (Ve = je.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) ? (Ve[1] || "https") + "://player.vimeo.com/video/" + Ve[2] + "/" : je;
48015
48039
  }
48016
- function Me(je, Be) {
48040
+ function Me(je, Ve) {
48017
48041
  var Xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
48018
- Be.forEach(function(Je) {
48019
- var Ve = document.createElement("option");
48020
- Je === Xe ? Ve.setAttribute("selected", "selected") : Ve.setAttribute("value", Je), je.appendChild(Ve);
48042
+ Ve.forEach(function(Je) {
48043
+ var Be = document.createElement("option");
48044
+ Je === Xe ? Be.setAttribute("selected", "selected") : Be.setAttribute("value", Je), je.appendChild(Be);
48021
48045
  });
48022
48046
  }
48023
48047
  te.BaseTooltip = Qe, te.default = ft;
@@ -48453,38 +48477,38 @@ function requireQuill() {
48453
48477
  Ae[He + 1] = 0, Le[He + 1] = 0;
48454
48478
  for (var ze = Pe - De, We = ze % 2 != 0, Ge = 0, Ye = 0, ft = 0, Qe = 0, Ze = 0; Ze < Fe; Ze++) {
48455
48479
  for (var Me = -Ze + Ge; Me <= Ze - Ye; Me += 2) {
48456
- var je = He + Me, Be;
48457
- Me == -Ze || Me != Ze && Ae[je - 1] < Ae[je + 1] ? Be = Ae[je + 1] : Be = Ae[je - 1] + 1;
48458
- for (var Xe = Be - Me; Be < Pe && Xe < De && ye.charAt(Be) == Ce.charAt(Xe); )
48459
- Be++, Xe++;
48460
- if (Ae[je] = Be, Be > Pe)
48480
+ var je = He + Me, Ve;
48481
+ Me == -Ze || Me != Ze && Ae[je - 1] < Ae[je + 1] ? Ve = Ae[je + 1] : Ve = Ae[je - 1] + 1;
48482
+ for (var Xe = Ve - Me; Ve < Pe && Xe < De && ye.charAt(Ve) == Ce.charAt(Xe); )
48483
+ Ve++, Xe++;
48484
+ if (Ae[je] = Ve, Ve > Pe)
48461
48485
  Ye += 2;
48462
48486
  else if (Xe > De)
48463
48487
  Ge += 2;
48464
48488
  else if (We) {
48465
48489
  var Je = He + ze - Me;
48466
48490
  if (Je >= 0 && Je < qe && Le[Je] != -1) {
48467
- var Ve = Pe - Le[Je];
48468
- if (Be >= Ve)
48469
- return he(ye, Ce, Be, Xe);
48491
+ var Be = Pe - Le[Je];
48492
+ if (Ve >= Be)
48493
+ return he(ye, Ce, Ve, Xe);
48470
48494
  }
48471
48495
  }
48472
48496
  }
48473
48497
  for (var Ke = -Ze + ft; Ke <= Ze - Qe; Ke += 2) {
48474
- var Je = He + Ke, Ve;
48475
- Ke == -Ze || Ke != Ze && Le[Je - 1] < Le[Je + 1] ? Ve = Le[Je + 1] : Ve = Le[Je - 1] + 1;
48476
- for (var rt = Ve - Ke; Ve < Pe && rt < De && ye.charAt(Pe - Ve - 1) == Ce.charAt(De - rt - 1); )
48477
- Ve++, rt++;
48478
- if (Le[Je] = Ve, Ve > Pe)
48498
+ var Je = He + Ke, Be;
48499
+ Ke == -Ze || Ke != Ze && Le[Je - 1] < Le[Je + 1] ? Be = Le[Je + 1] : Be = Le[Je - 1] + 1;
48500
+ for (var rt = Be - Ke; Be < Pe && rt < De && ye.charAt(Pe - Be - 1) == Ce.charAt(De - rt - 1); )
48501
+ Be++, rt++;
48502
+ if (Le[Je] = Be, Be > Pe)
48479
48503
  Qe += 2;
48480
48504
  else if (rt > De)
48481
48505
  ft += 2;
48482
48506
  else if (!We) {
48483
48507
  var je = He + ze - Ke;
48484
48508
  if (je >= 0 && je < qe && Ae[je] != -1) {
48485
- var Be = Ae[je], Xe = He + Be - je;
48486
- if (Ve = Pe - Ve, Be >= Ve)
48487
- return he(ye, Ce, Be, Xe);
48509
+ var Ve = Ae[je], Xe = He + Ve - je;
48510
+ if (Be = Pe - Be, Ve >= Be)
48511
+ return he(ye, Ce, Ve, Xe);
48488
48512
  }
48489
48513
  }
48490
48514
  }
@@ -48514,7 +48538,7 @@ function requireQuill() {
48514
48538
  if (Pe.length < 4 || De.length * 2 < Pe.length)
48515
48539
  return null;
48516
48540
  function Fe(Ye, ft, Qe) {
48517
- for (var Ze = Ye.substring(Qe, Qe + Math.floor(Ye.length / 4)), Me = -1, je = "", Be, Xe, Je, Ve; (Me = ft.indexOf(Ze, Me + 1)) != -1; ) {
48541
+ for (var Ze = Ye.substring(Qe, Qe + Math.floor(Ye.length / 4)), Me = -1, je = "", Ve, Xe, Je, Be; (Me = ft.indexOf(Ze, Me + 1)) != -1; ) {
48518
48542
  var Ke = pe(
48519
48543
  Ye.substring(Qe),
48520
48544
  ft.substring(Me)
@@ -48522,13 +48546,13 @@ function requireQuill() {
48522
48546
  Ye.substring(0, Qe),
48523
48547
  ft.substring(0, Me)
48524
48548
  );
48525
- je.length < rt + Ke && (je = ft.substring(Me - rt, Me) + ft.substring(Me, Me + Ke), Be = Ye.substring(0, Qe - rt), Xe = Ye.substring(Qe + Ke), Je = ft.substring(0, Me - rt), Ve = ft.substring(Me + Ke));
48549
+ je.length < rt + Ke && (je = ft.substring(Me - rt, Me) + ft.substring(Me, Me + Ke), Ve = Ye.substring(0, Qe - rt), Xe = Ye.substring(Qe + Ke), Je = ft.substring(0, Me - rt), Be = ft.substring(Me + Ke));
48526
48550
  }
48527
48551
  return je.length * 2 >= Ye.length ? [
48528
- Be,
48552
+ Ve,
48529
48553
  Xe,
48530
48554
  Je,
48531
- Ve,
48555
+ Be,
48532
48556
  je
48533
48557
  ] : null;
48534
48558
  }
@@ -48832,7 +48856,7 @@ function requireQuill() {
48832
48856
  throw new TypeError("Super expression must either be null or a function, not " + typeof mt);
48833
48857
  gt.prototype = Object.create(mt && mt.prototype, { constructor: { value: gt, enumerable: !1, writable: !0, configurable: !0 } }), mt && (Object.setPrototypeOf ? Object.setPrototypeOf(gt, mt) : gt.__proto__ = mt);
48834
48858
  }
48835
- var Ye = (0, _e.default)("quill:clipboard"), ft = "__ql-matcher", Qe = [[Node.TEXT_NODE, Kt], [Node.TEXT_NODE, Nt], ["br", kt], [Node.ELEMENT_NODE, Nt], [Node.ELEMENT_NODE, _t], [Node.ELEMENT_NODE, Vt], [Node.ELEMENT_NODE, ot], [Node.ELEMENT_NODE, rs], ["li", Lt], ["b", rt.bind(rt, "bold")], ["i", rt.bind(rt, "italic")], ["style", qt]], Ze = [ye.AlignAttribute, He.DirectionAttribute].reduce(function(gt, mt) {
48859
+ var Ye = (0, _e.default)("quill:clipboard"), ft = "__ql-matcher", Qe = [[Node.TEXT_NODE, Kt], [Node.TEXT_NODE, Nt], ["br", kt], [Node.ELEMENT_NODE, Nt], [Node.ELEMENT_NODE, _t], [Node.ELEMENT_NODE, Bt], [Node.ELEMENT_NODE, ot], [Node.ELEMENT_NODE, rs], ["li", Lt], ["b", rt.bind(rt, "bold")], ["i", rt.bind(rt, "italic")], ["style", qt]], Ze = [ye.AlignAttribute, He.DirectionAttribute].reduce(function(gt, mt) {
48836
48860
  return gt[mt.keyName] = mt, gt;
48837
48861
  }, {}), Me = [ye.AlignStyle, Ce.BackgroundStyle, Fe.ColorStyle, He.DirectionStyle, qe.FontStyle, Ae.SizeStyle].reduce(function(gt, mt) {
48838
48862
  return gt[mt.keyName] = mt, gt;
@@ -48843,7 +48867,7 @@ function requireQuill() {
48843
48867
  var $t = We(this, (mt.__proto__ || Object.getPrototypeOf(mt)).call(this, xt, Ct));
48844
48868
  return $t.quill.root.addEventListener("paste", $t.onPaste.bind($t)), $t.container = $t.quill.addContainer("ql-clipboard"), $t.container.setAttribute("contenteditable", !0), $t.container.setAttribute("tabindex", -1), $t.matchers = [], Qe.concat($t.options.matchers).forEach(function(Mt) {
48845
48869
  var Ft = ne(Mt, 2), zt = Ft[0], cs = Ft[1];
48846
- !Ct.matchVisual && cs === Vt || $t.addMatcher(zt, cs);
48870
+ !Ct.matchVisual && cs === Bt || $t.addMatcher(zt, cs);
48847
48871
  }), $t;
48848
48872
  }
48849
48873
  return de(mt, [{
@@ -48914,9 +48938,9 @@ function requireQuill() {
48914
48938
  matchers: [],
48915
48939
  matchVisual: !0
48916
48940
  };
48917
- function Be(gt, mt, xt) {
48941
+ function Ve(gt, mt, xt) {
48918
48942
  return (typeof mt > "u" ? "undefined" : oe(mt)) === "object" ? Object.keys(mt).reduce(function(Ct, $t) {
48919
- return Be(Ct, $t, mt[$t]);
48943
+ return Ve(Ct, $t, mt[$t]);
48920
48944
  }, gt) : gt.reduce(function(Ct, $t) {
48921
48945
  return $t.attributes && $t.attributes[mt] ? Ct.push($t) : Ct.insert($t.insert, (0, ue.default)({}, Ie({}, mt, xt), $t.attributes));
48922
48946
  }, new pe.default());
@@ -48934,7 +48958,7 @@ function requireQuill() {
48934
48958
  }
48935
48959
  return xt.slice(-1 * mt.length) === mt;
48936
48960
  }
48937
- function Ve(gt) {
48961
+ function Be(gt) {
48938
48962
  if (gt.childNodes.length === 0) return !1;
48939
48963
  var mt = Xe(gt);
48940
48964
  return ["block", "list-item"].indexOf(mt.display) > -1;
@@ -48952,14 +48976,14 @@ function requireQuill() {
48952
48976
  }, new pe.default()) : new pe.default();
48953
48977
  }
48954
48978
  function rt(gt, mt, xt) {
48955
- return Be(xt, gt, !0);
48979
+ return Ve(xt, gt, !0);
48956
48980
  }
48957
48981
  function ot(gt, mt) {
48958
48982
  var xt = be.default.Attributor.Attribute.keys(gt), Ct = be.default.Attributor.Class.keys(gt), $t = be.default.Attributor.Style.keys(gt), Mt = {};
48959
48983
  return xt.concat(Ct).concat($t).forEach(function(Ft) {
48960
48984
  var zt = be.default.query(Ft, be.default.Scope.ATTRIBUTE);
48961
48985
  zt != null && (Mt[zt.attrName] = zt.value(gt), Mt[zt.attrName]) || (zt = Ze[Ft], zt != null && (zt.attrName === Ft || zt.keyName === Ft) && (Mt[zt.attrName] = zt.value(gt) || void 0), zt = Me[Ft], zt != null && (zt.attrName === Ft || zt.keyName === Ft) && (zt = Me[Ft], Mt[zt.attrName] = zt.value(gt) || void 0));
48962
- }), Object.keys(Mt).length > 0 && (mt = Be(mt, Mt)), mt;
48986
+ }), Object.keys(Mt).length > 0 && (mt = Ve(mt, Mt)), mt;
48963
48987
  }
48964
48988
  function _t(gt, mt) {
48965
48989
  var xt = be.default.query(gt);
@@ -48967,7 +48991,7 @@ function requireQuill() {
48967
48991
  if (xt.prototype instanceof be.default.Embed) {
48968
48992
  var Ct = {}, $t = xt.value(gt);
48969
48993
  $t != null && (Ct[xt.blotName] = $t, mt = new pe.default().insert(Ct, xt.formats(gt)));
48970
- } else typeof xt.formats == "function" && (mt = Be(mt, xt.blotName, xt.formats(gt)));
48994
+ } else typeof xt.formats == "function" && (mt = Ve(mt, xt.blotName, xt.formats(gt)));
48971
48995
  return mt;
48972
48996
  }
48973
48997
  function kt(gt, mt) {
@@ -48989,11 +49013,11 @@ function requireQuill() {
48989
49013
  }
48990
49014
  function Nt(gt, mt) {
48991
49015
  return Je(mt, `
48992
- `) || (Ve(gt) || mt.length() > 0 && gt.nextSibling && Ve(gt.nextSibling)) && mt.insert(`
49016
+ `) || (Be(gt) || mt.length() > 0 && gt.nextSibling && Be(gt.nextSibling)) && mt.insert(`
48993
49017
  `), mt;
48994
49018
  }
48995
- function Vt(gt, mt) {
48996
- if (Ve(gt) && gt.nextElementSibling != null && !Je(mt, `
49019
+ function Bt(gt, mt) {
49020
+ if (Be(gt) && gt.nextElementSibling != null && !Je(mt, `
48997
49021
 
48998
49022
  `)) {
48999
49023
  var xt = gt.offsetHeight + parseFloat(Xe(gt).marginTop) + parseFloat(Xe(gt).marginBottom);
@@ -49004,7 +49028,7 @@ function requireQuill() {
49004
49028
  }
49005
49029
  function rs(gt, mt) {
49006
49030
  var xt = {}, Ct = gt.style || {};
49007
- return Ct.fontStyle && Xe(gt).fontStyle === "italic" && (xt.italic = !0), Ct.fontWeight && (Xe(gt).fontWeight.startsWith("bold") || parseInt(Xe(gt).fontWeight) >= 700) && (xt.bold = !0), Object.keys(xt).length > 0 && (mt = Be(mt, xt)), parseFloat(Ct.textIndent || 0) > 0 && (mt = new pe.default().insert(" ").concat(mt)), mt;
49031
+ return Ct.fontStyle && Xe(gt).fontStyle === "italic" && (xt.italic = !0), Ct.fontWeight && (Xe(gt).fontWeight.startsWith("bold") || parseInt(Xe(gt).fontWeight) >= 700) && (xt.bold = !0), Object.keys(xt).length > 0 && (mt = Ve(mt, xt)), parseFloat(Ct.textIndent || 0) > 0 && (mt = new pe.default().insert(" ").concat(mt)), mt;
49008
49032
  }
49009
49033
  function Kt(gt, mt) {
49010
49034
  var xt = gt.data;
@@ -49016,11 +49040,11 @@ function requireQuill() {
49016
49040
  var Ct = function(Mt, Ft) {
49017
49041
  return Ft = Ft.replace(/[^\u00a0]/g, ""), Ft.length < 1 && Mt ? " " : Ft;
49018
49042
  };
49019
- xt = xt.replace(/\r\n/g, " ").replace(/\n/g, " "), xt = xt.replace(/\s\s+/g, Ct.bind(Ct, !0)), (gt.previousSibling == null && Ve(gt.parentNode) || gt.previousSibling != null && Ve(gt.previousSibling)) && (xt = xt.replace(/^\s+/, Ct.bind(Ct, !1))), (gt.nextSibling == null && Ve(gt.parentNode) || gt.nextSibling != null && Ve(gt.nextSibling)) && (xt = xt.replace(/\s+$/, Ct.bind(Ct, !1)));
49043
+ xt = xt.replace(/\r\n/g, " ").replace(/\n/g, " "), xt = xt.replace(/\s\s+/g, Ct.bind(Ct, !0)), (gt.previousSibling == null && Be(gt.parentNode) || gt.previousSibling != null && Be(gt.previousSibling)) && (xt = xt.replace(/^\s+/, Ct.bind(Ct, !1))), (gt.nextSibling == null && Be(gt.parentNode) || gt.nextSibling != null && Be(gt.nextSibling)) && (xt = xt.replace(/\s+$/, Ct.bind(Ct, !1)));
49020
49044
  }
49021
49045
  return mt.insert(xt);
49022
49046
  }
49023
- te.default = je, te.matchAttributor = ot, te.matchBlot = _t, te.matchNewline = Nt, te.matchSpacing = Vt, te.matchText = Kt;
49047
+ te.default = je, te.matchAttributor = ot, te.matchBlot = _t, te.matchNewline = Nt, te.matchSpacing = Bt, te.matchText = Kt;
49024
49048
  }),
49025
49049
  /* 57 */
49026
49050
  /***/
@@ -49213,7 +49237,7 @@ function requireQuill() {
49213
49237
  } else
49214
49238
  We.classList.contains("ql-active") ? Ze = !1 : Ze = We.value || !We.hasAttribute("value"), Qe.preventDefault();
49215
49239
  Ge.quill.focus();
49216
- var je = Ge.quill.selection.getRange(), Be = oe(je, 1), Xe = Be[0];
49240
+ var je = Ge.quill.selection.getRange(), Ve = oe(je, 1), Xe = Ve[0];
49217
49241
  if (Ge.handlers[Ye] != null)
49218
49242
  Ge.handlers[Ye].call(Ge, Ze);
49219
49243
  else if (he.default.query(Ye).prototype instanceof he.default.Embed) {
@@ -49245,8 +49269,8 @@ function requireQuill() {
49245
49269
  } else if (We == null)
49246
49270
  Ze.classList.remove("ql-active");
49247
49271
  else if (Ze.hasAttribute("value")) {
49248
- var Be = Ge[Qe] === Ze.getAttribute("value") || Ge[Qe] != null && Ge[Qe].toString() === Ze.getAttribute("value") || Ge[Qe] == null && !Ze.getAttribute("value");
49249
- Ze.classList.toggle("ql-active", Be);
49272
+ var Ve = Ge[Qe] === Ze.getAttribute("value") || Ge[Qe] != null && Ge[Qe].toString() === Ze.getAttribute("value") || Ge[Qe] == null && !Ze.getAttribute("value");
49273
+ Ze.classList.toggle("ql-active", Ve);
49250
49274
  } else
49251
49275
  Ze.classList.toggle("ql-active", Ge[Qe] != null);
49252
49276
  });
@@ -49663,7 +49687,7 @@ function requireQuill() {
49663
49687
  Object.defineProperty(te, "__esModule", {
49664
49688
  value: !0
49665
49689
  });
49666
- var oe = re(29), ne = $t(oe), de = re(37), ce = re(39), ue = re(65), he = re(66), pe = $t(he), fe = re(67), be = $t(fe), me = re(68), ge = $t(me), ve = re(38), _e = re(26), we = re(40), Se = re(41), ye = re(57), Ce = $t(ye), Pe = re(69), De = $t(Pe), Fe = re(27), He = $t(Fe), qe = re(70), Ae = $t(qe), Le = re(71), Ie = $t(Le), ze = re(72), We = $t(ze), Ge = re(73), Ye = $t(Ge), ft = re(74), Qe = $t(ft), Ze = re(13), Me = $t(Ze), je = re(75), Be = $t(je), Xe = re(76), Je = $t(Xe), Ve = re(58), Ke = $t(Ve), rt = re(42), ot = $t(rt), _t = re(28), kt = $t(_t), qt = re(60), Lt = $t(qt), Nt = re(61), Vt = $t(Nt), rs = re(62), Kt = $t(rs), gt = re(109), mt = $t(gt), xt = re(63), Ct = $t(xt);
49690
+ var oe = re(29), ne = $t(oe), de = re(37), ce = re(39), ue = re(65), he = re(66), pe = $t(he), fe = re(67), be = $t(fe), me = re(68), ge = $t(me), ve = re(38), _e = re(26), we = re(40), Se = re(41), ye = re(57), Ce = $t(ye), Pe = re(69), De = $t(Pe), Fe = re(27), He = $t(Fe), qe = re(70), Ae = $t(qe), Le = re(71), Ie = $t(Le), ze = re(72), We = $t(ze), Ge = re(73), Ye = $t(Ge), ft = re(74), Qe = $t(ft), Ze = re(13), Me = $t(Ze), je = re(75), Ve = $t(je), Xe = re(76), Je = $t(Xe), Be = re(58), Ke = $t(Be), rt = re(42), ot = $t(rt), _t = re(28), kt = $t(_t), qt = re(60), Lt = $t(qt), Nt = re(61), Bt = $t(Nt), rs = re(62), Kt = $t(rs), gt = re(109), mt = $t(gt), xt = re(63), Ct = $t(xt);
49667
49691
  function $t(Mt) {
49668
49692
  return Mt && Mt.__esModule ? Mt : { default: Mt };
49669
49693
  }
@@ -49703,14 +49727,14 @@ function requireQuill() {
49703
49727
  "formats/image": Ye.default,
49704
49728
  "formats/video": Qe.default,
49705
49729
  "formats/list/item": me.ListItem,
49706
- "modules/formula": Be.default,
49730
+ "modules/formula": Ve.default,
49707
49731
  "modules/syntax": Je.default,
49708
49732
  "modules/toolbar": Ke.default,
49709
49733
  "themes/bubble": mt.default,
49710
49734
  "themes/snow": Ct.default,
49711
49735
  "ui/icons": ot.default,
49712
49736
  "ui/picker": kt.default,
49713
- "ui/icon-picker": Vt.default,
49737
+ "ui/icon-picker": Bt.default,
49714
49738
  "ui/color-picker": Lt.default,
49715
49739
  "ui/tooltip": Kt.default
49716
49740
  }, !0), te.default = ne.default;
@@ -51089,7 +51113,7 @@ var __defProp$2 = Object.defineProperty, __decorateClass$2 = (X, W, J, te) => {
51089
51113
  };
51090
51114
  class PrimariaRegion extends PrimariaRegionHost(h$p) {
51091
51115
  constructor() {
51092
- super(), this.name = "", this._instanceConstructor = Object.create(this.constructor), Object.defineProperty(this, "constructor", {
51116
+ super(), this.name = "", this.mode = "multi", this._instanceConstructor = Object.create(this.constructor), Object.defineProperty(this, "constructor", {
51093
51117
  get: () => this._instanceConstructor,
51094
51118
  configurable: !0
51095
51119
  });
@@ -51115,8 +51139,8 @@ class PrimariaRegion extends PrimariaRegionHost(h$p) {
51115
51139
  */
51116
51140
  connectedCallback() {
51117
51141
  if (h$p.prototype.connectedCallback.call(this), this.name) {
51118
- const W = `${this.name}-container`, J = document.createElement("div");
51119
- J.id = W, J.style.cssText = "width: 100%; height: 100%; min-height: 1px", this.appendChild(J), this._instanceConstructor[o$17] = {
51142
+ const W = `${this.name}-container`, J = this.mode === "single" ? document.createElement("primaria-content-switcher") : document.createElement("div");
51143
+ J.id = W, this.mode !== "single" && (J.style.cssText = "width: 100%; height: 100%; min-height: 1px"), this.appendChild(J), this._instanceConstructor[o$17] = {
51120
51144
  ...this._instanceConstructor[o$17],
51121
51145
  region: { targetId: W, name: this.name }
51122
51146
  }, this.create && this.create();
@@ -51148,6 +51172,9 @@ class PrimariaRegion extends PrimariaRegionHost(h$p) {
51148
51172
  __decorateClass$2([
51149
51173
  n$y({ type: String })
51150
51174
  ], PrimariaRegion.prototype, "name");
51175
+ __decorateClass$2([
51176
+ n$y({ type: String })
51177
+ ], PrimariaRegion.prototype, "mode");
51151
51178
  const useSharedUI = () => {
51152
51179
  t$w("primaria-content-switcher")(PrimariaContentSwitcher), t$w("primaria-nav-item")(PrimariaNavItem), t$w("primaria-rich-text-editor")(PrimariaRichTextEditor), t$w("primaria-nav-tree-menu")(PrimariaNavTreeMenu), t$w("primaria-character-limit-badge")(PrimariaCharacterLimitBadge), t$w("primaria-region")(PrimariaRegion);
51153
51180
  }, registerPdfViewerNavItem = () => {
@@ -51935,4 +51962,4 @@ export {
51935
51962
  l as y,
51936
51963
  PrimariaInteractionService as z
51937
51964
  };
51938
- //# sourceMappingURL=index-CXxEmHmi.js.map
51965
+ //# sourceMappingURL=index-kl9Zgtus.js.map