plutonium 0.50.0 → 0.52.0
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.
- checksums.yaml +4 -4
- data/.claude/skills/plutonium/SKILL.md +85 -102
- data/.claude/skills/plutonium-app/SKILL.md +574 -0
- data/.claude/skills/plutonium-auth/SKILL.md +167 -302
- data/.claude/skills/plutonium-behavior/SKILL.md +838 -0
- data/.claude/skills/plutonium-resource/SKILL.md +1176 -0
- data/.claude/skills/plutonium-tenancy/SKILL.md +674 -0
- data/.claude/skills/plutonium-testing/SKILL.md +9 -6
- data/.claude/skills/plutonium-ui/SKILL.md +900 -0
- data/CHANGELOG.md +44 -2
- data/Rakefile +2 -1
- data/app/assets/plutonium.css +1 -11
- data/app/assets/plutonium.js +1010 -1214
- data/app/assets/plutonium.js.map +3 -3
- data/app/assets/plutonium.min.js +52 -51
- data/app/assets/plutonium.min.js.map +3 -3
- data/docs/.vitepress/config.ts +38 -29
- data/docs/.vitepress/theme/components/HomeAudienceSplit.vue +53 -0
- data/docs/.vitepress/theme/components/HomeCta.vue +108 -0
- data/docs/.vitepress/theme/components/HomeHero.vue +70 -0
- data/docs/.vitepress/theme/components/HomeInTheBox.vue +74 -0
- data/docs/.vitepress/theme/components/HomePillars.vue +42 -0
- data/docs/.vitepress/theme/components/HomeStopWriting.vue +49 -0
- data/docs/.vitepress/theme/components/HomeWalkthrough.vue +111 -0
- data/docs/.vitepress/theme/components/SectionLanding.vue +115 -0
- data/docs/.vitepress/theme/custom.css +144 -0
- data/docs/.vitepress/theme/index.ts +58 -1
- data/docs/getting-started/index.md +33 -57
- data/docs/getting-started/installation.md +37 -80
- data/docs/getting-started/tutorial/02-first-resource.md +17 -8
- data/docs/getting-started/tutorial/03-authentication.md +31 -23
- data/docs/getting-started/tutorial/05-custom-actions.md +9 -4
- data/docs/getting-started/tutorial/06-nested-resources.md +7 -1
- data/docs/getting-started/tutorial/07-author-portal.md +8 -0
- data/docs/getting-started/tutorial/08-customizing-ui.md +4 -0
- data/docs/getting-started/tutorial/index.md +4 -5
- data/docs/guides/adding-resources.md +66 -377
- data/docs/guides/authentication.md +98 -462
- data/docs/guides/authorization.md +124 -370
- data/docs/guides/creating-packages.md +93 -298
- data/docs/guides/custom-actions.md +126 -441
- data/docs/guides/customizing-ui.md +258 -0
- data/docs/guides/index.md +49 -52
- data/docs/guides/multi-tenancy.md +123 -186
- data/docs/guides/nested-resources.md +137 -396
- data/docs/guides/search-filtering.md +127 -238
- data/docs/guides/testing.md +10 -5
- data/docs/guides/theming.md +168 -405
- data/docs/guides/troubleshooting.md +5 -3
- data/docs/guides/user-invites.md +112 -425
- data/docs/guides/user-profile.md +82 -241
- data/docs/index.md +10 -219
- data/docs/public/asciinema/home-scaffold.cast +305 -0
- data/docs/public/images/guides/custom-actions-bulk.png +0 -0
- data/docs/public/images/guides/multi-tenancy-dashboard.png +0 -0
- data/docs/public/images/guides/multi-tenancy-welcome.png +0 -0
- data/docs/public/images/guides/nested-inputs.png +0 -0
- data/docs/public/images/guides/nested-resources-tab.png +0 -0
- data/docs/public/images/guides/search-filtering-index.png +0 -0
- data/docs/public/images/guides/search-filtering-panel.png +0 -0
- data/docs/public/images/guides/theming-after.png +0 -0
- data/docs/public/images/guides/theming-before.png +0 -0
- data/docs/public/images/guides/user-invites-landing.png +0 -0
- data/docs/public/images/guides/user-profile-edit.png +0 -0
- data/docs/public/images/guides/user-profile-show.png +0 -0
- data/docs/public/images/home-index.png +0 -0
- data/docs/public/images/home-new.png +0 -0
- data/docs/public/images/home-show.png +0 -0
- data/docs/public/images/tutorial/02-empty-index.png +0 -0
- data/docs/public/images/tutorial/02-index-with-posts.png +0 -0
- data/docs/public/images/tutorial/02-new-form-modal.png +0 -0
- data/docs/public/images/tutorial/02-new-form.png +0 -0
- data/docs/public/images/tutorial/03-create-account.png +0 -0
- data/docs/public/images/tutorial/03-login.png +0 -0
- data/docs/public/images/tutorial/04-admin-index.png +0 -0
- data/docs/public/images/tutorial/05-actions-menu.png +0 -0
- data/docs/public/images/tutorial/05-row-actions.png +0 -0
- data/docs/public/images/tutorial/06-comments-tab.png +0 -0
- data/docs/public/images/tutorial/06-post-with-comments.png +0 -0
- data/docs/public/images/tutorial/07-author-dashboard.png +0 -0
- data/docs/public/images/tutorial/07-author-portal.png +0 -0
- data/docs/public/images/tutorial/08-customized-index.png +0 -0
- data/docs/reference/app/generators.md +517 -0
- data/docs/reference/app/index.md +158 -0
- data/docs/reference/app/packages.md +146 -0
- data/docs/reference/app/portals.md +377 -0
- data/docs/reference/auth/accounts.md +229 -0
- data/docs/reference/auth/index.md +88 -0
- data/docs/reference/auth/profile.md +185 -0
- data/docs/reference/behavior/controllers.md +395 -0
- data/docs/reference/behavior/index.md +22 -0
- data/docs/reference/behavior/interactions.md +341 -0
- data/docs/reference/behavior/policies.md +417 -0
- data/docs/reference/index.md +67 -48
- data/docs/reference/resource/actions.md +423 -0
- data/docs/reference/resource/definition.md +508 -0
- data/docs/reference/resource/index.md +50 -0
- data/docs/reference/resource/model.md +348 -0
- data/docs/reference/resource/query.md +305 -0
- data/docs/reference/tenancy/entity-scoping.md +368 -0
- data/docs/reference/tenancy/index.md +36 -0
- data/docs/reference/tenancy/invites.md +400 -0
- data/docs/reference/tenancy/nested-resources.md +267 -0
- data/docs/reference/testing/index.md +287 -0
- data/docs/reference/ui/assets.md +400 -0
- data/docs/reference/ui/components.md +165 -0
- data/docs/reference/ui/displays.md +104 -0
- data/docs/reference/ui/forms.md +284 -0
- data/docs/reference/ui/index.md +30 -0
- data/docs/reference/ui/layouts.md +106 -0
- data/docs/reference/ui/pages.md +189 -0
- data/docs/reference/ui/tables.md +121 -0
- data/docs/superpowers/plans/2026-05-15-public-pages-overhaul.md +1648 -0
- data/docs/superpowers/plans/2026-05-15-public-pages-overhaul.md.tasks.json +109 -0
- data/docs/superpowers/specs/2026-05-09-typeahead-endpoint-design.md +203 -0
- data/docs/superpowers/specs/2026-05-12-skill-compaction-design.md +99 -0
- data/docs/superpowers/specs/2026-05-13-docs-restructure-design.md +186 -0
- data/docs/superpowers/specs/2026-05-15-public-pages-overhaul-design.md +263 -0
- data/gemfiles/rails_7.gemfile.lock +1 -1
- data/gemfiles/rails_8.0.gemfile.lock +1 -1
- data/gemfiles/rails_8.1.gemfile.lock +1 -1
- data/lib/generators/pu/core/assets/assets_generator.rb +10 -0
- data/lib/generators/pu/core/update/update_generator.rb +0 -20
- data/lib/generators/pu/invites/install_generator.rb +45 -0
- data/lib/generators/pu/invites/templates/packages/invites/app/controllers/invites/user_invitations_controller.rb.tt +1 -0
- data/lib/generators/pu/profile/conn_generator.rb +2 -2
- data/lib/generators/pu/res/conn/conn_generator.rb +33 -6
- data/lib/generators/pu/res/model/templates/model.rb.tt +4 -0
- data/lib/generators/pu/rodauth/account_generator.rb +2 -1
- data/lib/generators/pu/rodauth/admin_generator.rb +0 -2
- data/lib/generators/pu/rodauth/migration_generator.rb +0 -2
- data/lib/generators/pu/rodauth/views_generator.rb +0 -2
- data/lib/generators/pu/saas/membership/USAGE +4 -1
- data/lib/generators/pu/saas/setup_generator.rb +16 -4
- data/lib/generators/pu/saas/welcome/templates/app/controllers/welcome_controller.rb.tt +1 -1
- data/lib/plutonium/definition/base.rb +1 -1
- data/lib/plutonium/definition/{views.rb → index_views.rb} +21 -20
- data/lib/plutonium/helpers/turbo_helper.rb +30 -0
- data/lib/plutonium/helpers/turbo_stream_actions_helper.rb +14 -0
- data/lib/plutonium/resource/controller.rb +1 -0
- data/lib/plutonium/resource/controllers/crud_actions.rb +23 -5
- data/lib/plutonium/resource/controllers/interactive_actions.rb +3 -3
- data/lib/plutonium/resource/controllers/typeahead.rb +180 -0
- data/lib/plutonium/resource/policy.rb +7 -0
- data/lib/plutonium/routing/mapper_extensions.rb +15 -0
- data/lib/plutonium/ui/component/methods.rb +5 -0
- data/lib/plutonium/ui/form/base.rb +23 -3
- data/lib/plutonium/ui/form/components/json.rb +58 -0
- data/lib/plutonium/ui/form/components/resource_select.rb +62 -8
- data/lib/plutonium/ui/form/components/secure_association.rb +103 -22
- data/lib/plutonium/ui/form/concerns/typeahead_attributes.rb +83 -0
- data/lib/plutonium/ui/form/interaction.rb +1 -1
- data/lib/plutonium/ui/form/resource.rb +0 -4
- data/lib/plutonium/ui/form/theme.rb +1 -1
- data/lib/plutonium/ui/grid/resource.rb +1 -1
- data/lib/plutonium/ui/layout/base.rb +1 -0
- data/lib/plutonium/ui/page/base.rb +0 -7
- data/lib/plutonium/ui/page/edit.rb +1 -1
- data/lib/plutonium/ui/page/index.rb +4 -4
- data/lib/plutonium/ui/page/new.rb +1 -1
- data/lib/plutonium/ui/table/components/filter_form.rb +12 -4
- data/lib/plutonium/ui/table/resource.rb +1 -1
- data/lib/plutonium/version.rb +1 -1
- data/lib/plutonium.rb +8 -0
- data/lib/tasks/release.rake +15 -1
- data/package.json +13 -10
- data/src/css/slim_select.css +4 -0
- data/src/js/controllers/form_controller.js +5 -4
- data/src/js/controllers/slim_select_controller.js +61 -0
- data/src/js/turbo/turbo_actions.js +33 -0
- data/yarn.lock +661 -544
- metadata +86 -33
- data/.claude/skills/plutonium-assets/SKILL.md +0 -512
- data/.claude/skills/plutonium-controller/SKILL.md +0 -396
- data/.claude/skills/plutonium-create-resource/SKILL.md +0 -303
- data/.claude/skills/plutonium-definition/SKILL.md +0 -1223
- data/.claude/skills/plutonium-entity-scoping/SKILL.md +0 -317
- data/.claude/skills/plutonium-forms/SKILL.md +0 -465
- data/.claude/skills/plutonium-installation/SKILL.md +0 -331
- data/.claude/skills/plutonium-interaction/SKILL.md +0 -413
- data/.claude/skills/plutonium-invites/SKILL.md +0 -408
- data/.claude/skills/plutonium-model/SKILL.md +0 -440
- data/.claude/skills/plutonium-nested-resources/SKILL.md +0 -360
- data/.claude/skills/plutonium-package/SKILL.md +0 -198
- data/.claude/skills/plutonium-policy/SKILL.md +0 -456
- data/.claude/skills/plutonium-portal/SKILL.md +0 -410
- data/.claude/skills/plutonium-views/SKILL.md +0 -651
- data/docs/reference/assets/index.md +0 -496
- data/docs/reference/controller/index.md +0 -412
- data/docs/reference/definition/actions.md +0 -462
- data/docs/reference/definition/fields.md +0 -383
- data/docs/reference/definition/index.md +0 -326
- data/docs/reference/definition/query.md +0 -351
- data/docs/reference/generators/index.md +0 -648
- data/docs/reference/interaction/index.md +0 -449
- data/docs/reference/model/features.md +0 -248
- data/docs/reference/model/index.md +0 -218
- data/docs/reference/policy/index.md +0 -456
- data/docs/reference/portal/index.md +0 -379
- data/docs/reference/views/forms.md +0 -411
- data/docs/reference/views/index.md +0 -544
data/app/assets/plutonium.js
CHANGED
|
@@ -134,10 +134,10 @@
|
|
|
134
134
|
"node_modules/lodash/_objectToString.js"(exports, module) {
|
|
135
135
|
var objectProto = Object.prototype;
|
|
136
136
|
var nativeObjectToString = objectProto.toString;
|
|
137
|
-
function
|
|
137
|
+
function objectToString2(value) {
|
|
138
138
|
return nativeObjectToString.call(value);
|
|
139
139
|
}
|
|
140
|
-
module.exports =
|
|
140
|
+
module.exports = objectToString2;
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"node_modules/lodash/_baseGetTag.js"(exports, module) {
|
|
147
147
|
var Symbol2 = require_Symbol();
|
|
148
148
|
var getRawTag = require_getRawTag();
|
|
149
|
-
var
|
|
149
|
+
var objectToString2 = require_objectToString();
|
|
150
150
|
var nullTag = "[object Null]";
|
|
151
151
|
var undefinedTag = "[object Undefined]";
|
|
152
152
|
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
if (value == null) {
|
|
155
155
|
return value === void 0 ? undefinedTag : nullTag;
|
|
156
156
|
}
|
|
157
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) :
|
|
157
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString2(value);
|
|
158
158
|
}
|
|
159
159
|
module.exports = baseGetTag;
|
|
160
160
|
}
|
|
@@ -364,11 +364,11 @@
|
|
|
364
364
|
var keep = [];
|
|
365
365
|
if (event && fn3) {
|
|
366
366
|
var fns = this._fns[event];
|
|
367
|
-
var
|
|
367
|
+
var i4 = 0;
|
|
368
368
|
var l4 = fns ? fns.length : 0;
|
|
369
|
-
for (
|
|
370
|
-
if (fns[
|
|
371
|
-
keep.push(fns[
|
|
369
|
+
for (i4; i4 < l4; i4++) {
|
|
370
|
+
if (fns[i4] !== fn3) {
|
|
371
|
+
keep.push(fns[i4]);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
@@ -379,10 +379,10 @@
|
|
|
379
379
|
var idx = e4.indexOf(":");
|
|
380
380
|
var args = idx === -1 ? [e4] : [e4.substring(0, idx), e4.substring(idx + 1)];
|
|
381
381
|
var keys = Object.keys(_fns);
|
|
382
|
-
var
|
|
382
|
+
var i4 = 0;
|
|
383
383
|
var l4 = keys.length;
|
|
384
|
-
for (
|
|
385
|
-
var key = keys[
|
|
384
|
+
for (i4; i4 < l4; i4++) {
|
|
385
|
+
var key = keys[i4];
|
|
386
386
|
if (key === "*") {
|
|
387
387
|
out = out.concat(_fns[key]);
|
|
388
388
|
}
|
|
@@ -394,13 +394,12 @@
|
|
|
394
394
|
return out;
|
|
395
395
|
}
|
|
396
396
|
function emitAll(e4, fns, args) {
|
|
397
|
-
var
|
|
397
|
+
var i4 = 0;
|
|
398
398
|
var l4 = fns.length;
|
|
399
|
-
for (
|
|
400
|
-
if (!fns[
|
|
401
|
-
|
|
402
|
-
fns[
|
|
403
|
-
fns[i5].apply(fns[i5], args);
|
|
399
|
+
for (i4; i4 < l4; i4++) {
|
|
400
|
+
if (!fns[i4]) break;
|
|
401
|
+
fns[i4].event = e4;
|
|
402
|
+
fns[i4].apply(fns[i4], args);
|
|
404
403
|
}
|
|
405
404
|
}
|
|
406
405
|
return emitter;
|
|
@@ -515,8 +514,8 @@
|
|
|
515
514
|
var hasOwn = {}.hasOwnProperty;
|
|
516
515
|
function classNames15() {
|
|
517
516
|
var classes = "";
|
|
518
|
-
for (var
|
|
519
|
-
var arg = arguments[
|
|
517
|
+
for (var i4 = 0; i4 < arguments.length; i4++) {
|
|
518
|
+
var arg = arguments[i4];
|
|
520
519
|
if (arg) {
|
|
521
520
|
classes = appendClass(classes, parseValue(arg));
|
|
522
521
|
}
|
|
@@ -577,8 +576,7 @@
|
|
|
577
576
|
}
|
|
578
577
|
if (Object.create) {
|
|
579
578
|
Events.prototype = /* @__PURE__ */ Object.create(null);
|
|
580
|
-
if (!new Events().__proto__)
|
|
581
|
-
prefix = false;
|
|
579
|
+
if (!new Events().__proto__) prefix = false;
|
|
582
580
|
}
|
|
583
581
|
function EE(fn3, context, once) {
|
|
584
582
|
this.fn = fn3;
|
|
@@ -590,19 +588,14 @@
|
|
|
590
588
|
throw new TypeError("The listener must be a function");
|
|
591
589
|
}
|
|
592
590
|
var listener = new EE(fn3, context || emitter, once), evt = prefix ? prefix + event : event;
|
|
593
|
-
if (!emitter._events[evt])
|
|
594
|
-
|
|
595
|
-
else
|
|
596
|
-
emitter._events[evt].push(listener);
|
|
597
|
-
else
|
|
598
|
-
emitter._events[evt] = [emitter._events[evt], listener];
|
|
591
|
+
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
592
|
+
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
593
|
+
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
599
594
|
return emitter;
|
|
600
595
|
}
|
|
601
596
|
function clearEvent(emitter, evt) {
|
|
602
|
-
if (--emitter._eventsCount === 0)
|
|
603
|
-
|
|
604
|
-
else
|
|
605
|
-
delete emitter._events[evt];
|
|
597
|
+
if (--emitter._eventsCount === 0) emitter._events = new Events();
|
|
598
|
+
else delete emitter._events[evt];
|
|
606
599
|
}
|
|
607
600
|
function EventEmitter2() {
|
|
608
601
|
this._events = new Events();
|
|
@@ -610,11 +603,9 @@
|
|
|
610
603
|
}
|
|
611
604
|
EventEmitter2.prototype.eventNames = function eventNames() {
|
|
612
605
|
var names = [], events, name;
|
|
613
|
-
if (this._eventsCount === 0)
|
|
614
|
-
return names;
|
|
606
|
+
if (this._eventsCount === 0) return names;
|
|
615
607
|
for (name in events = this._events) {
|
|
616
|
-
if (has.call(events, name))
|
|
617
|
-
names.push(prefix ? name.slice(1) : name);
|
|
608
|
+
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
|
|
618
609
|
}
|
|
619
610
|
if (Object.getOwnPropertySymbols) {
|
|
620
611
|
return names.concat(Object.getOwnPropertySymbols(events));
|
|
@@ -623,31 +614,25 @@
|
|
|
623
614
|
};
|
|
624
615
|
EventEmitter2.prototype.listeners = function listeners(event) {
|
|
625
616
|
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
626
|
-
if (!handlers)
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
for (var i5 = 0, l4 = handlers.length, ee3 = new Array(l4); i5 < l4; i5++) {
|
|
631
|
-
ee3[i5] = handlers[i5].fn;
|
|
617
|
+
if (!handlers) return [];
|
|
618
|
+
if (handlers.fn) return [handlers.fn];
|
|
619
|
+
for (var i4 = 0, l4 = handlers.length, ee3 = new Array(l4); i4 < l4; i4++) {
|
|
620
|
+
ee3[i4] = handlers[i4].fn;
|
|
632
621
|
}
|
|
633
622
|
return ee3;
|
|
634
623
|
};
|
|
635
624
|
EventEmitter2.prototype.listenerCount = function listenerCount(event) {
|
|
636
625
|
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
637
|
-
if (!listeners)
|
|
638
|
-
|
|
639
|
-
if (listeners.fn)
|
|
640
|
-
return 1;
|
|
626
|
+
if (!listeners) return 0;
|
|
627
|
+
if (listeners.fn) return 1;
|
|
641
628
|
return listeners.length;
|
|
642
629
|
};
|
|
643
630
|
EventEmitter2.prototype.emit = function emit(event, a1, a22, a32, a4, a5) {
|
|
644
631
|
var evt = prefix ? prefix + event : event;
|
|
645
|
-
if (!this._events[evt])
|
|
646
|
-
|
|
647
|
-
var listeners = this._events[evt], len = arguments.length, args, i5;
|
|
632
|
+
if (!this._events[evt]) return false;
|
|
633
|
+
var listeners = this._events[evt], len = arguments.length, args, i4;
|
|
648
634
|
if (listeners.fn) {
|
|
649
|
-
if (listeners.once)
|
|
650
|
-
this.removeListener(event, listeners.fn, void 0, true);
|
|
635
|
+
if (listeners.once) this.removeListener(event, listeners.fn, void 0, true);
|
|
651
636
|
switch (len) {
|
|
652
637
|
case 1:
|
|
653
638
|
return listeners.fn.call(listeners.context), true;
|
|
@@ -662,34 +647,32 @@
|
|
|
662
647
|
case 6:
|
|
663
648
|
return listeners.fn.call(listeners.context, a1, a22, a32, a4, a5), true;
|
|
664
649
|
}
|
|
665
|
-
for (
|
|
666
|
-
args[
|
|
650
|
+
for (i4 = 1, args = new Array(len - 1); i4 < len; i4++) {
|
|
651
|
+
args[i4 - 1] = arguments[i4];
|
|
667
652
|
}
|
|
668
653
|
listeners.fn.apply(listeners.context, args);
|
|
669
654
|
} else {
|
|
670
655
|
var length = listeners.length, j5;
|
|
671
|
-
for (
|
|
672
|
-
if (listeners[
|
|
673
|
-
this.removeListener(event, listeners[i5].fn, void 0, true);
|
|
656
|
+
for (i4 = 0; i4 < length; i4++) {
|
|
657
|
+
if (listeners[i4].once) this.removeListener(event, listeners[i4].fn, void 0, true);
|
|
674
658
|
switch (len) {
|
|
675
659
|
case 1:
|
|
676
|
-
listeners[
|
|
660
|
+
listeners[i4].fn.call(listeners[i4].context);
|
|
677
661
|
break;
|
|
678
662
|
case 2:
|
|
679
|
-
listeners[
|
|
663
|
+
listeners[i4].fn.call(listeners[i4].context, a1);
|
|
680
664
|
break;
|
|
681
665
|
case 3:
|
|
682
|
-
listeners[
|
|
666
|
+
listeners[i4].fn.call(listeners[i4].context, a1, a22);
|
|
683
667
|
break;
|
|
684
668
|
case 4:
|
|
685
|
-
listeners[
|
|
669
|
+
listeners[i4].fn.call(listeners[i4].context, a1, a22, a32);
|
|
686
670
|
break;
|
|
687
671
|
default:
|
|
688
|
-
if (!args)
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
listeners[i5].fn.apply(listeners[i5].context, args);
|
|
672
|
+
if (!args) for (j5 = 1, args = new Array(len - 1); j5 < len; j5++) {
|
|
673
|
+
args[j5 - 1] = arguments[j5];
|
|
674
|
+
}
|
|
675
|
+
listeners[i4].fn.apply(listeners[i4].context, args);
|
|
693
676
|
}
|
|
694
677
|
}
|
|
695
678
|
}
|
|
@@ -703,8 +686,7 @@
|
|
|
703
686
|
};
|
|
704
687
|
EventEmitter2.prototype.removeListener = function removeListener(event, fn3, context, once) {
|
|
705
688
|
var evt = prefix ? prefix + event : event;
|
|
706
|
-
if (!this._events[evt])
|
|
707
|
-
return this;
|
|
689
|
+
if (!this._events[evt]) return this;
|
|
708
690
|
if (!fn3) {
|
|
709
691
|
clearEvent(this, evt);
|
|
710
692
|
return this;
|
|
@@ -715,15 +697,13 @@
|
|
|
715
697
|
clearEvent(this, evt);
|
|
716
698
|
}
|
|
717
699
|
} else {
|
|
718
|
-
for (var
|
|
719
|
-
if (listeners[
|
|
720
|
-
events.push(listeners[
|
|
700
|
+
for (var i4 = 0, events = [], length = listeners.length; i4 < length; i4++) {
|
|
701
|
+
if (listeners[i4].fn !== fn3 || once && !listeners[i4].once || context && listeners[i4].context !== context) {
|
|
702
|
+
events.push(listeners[i4]);
|
|
721
703
|
}
|
|
722
704
|
}
|
|
723
|
-
if (events.length)
|
|
724
|
-
|
|
725
|
-
else
|
|
726
|
-
clearEvent(this, evt);
|
|
705
|
+
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
|
|
706
|
+
else clearEvent(this, evt);
|
|
727
707
|
}
|
|
728
708
|
return this;
|
|
729
709
|
};
|
|
@@ -731,8 +711,7 @@
|
|
|
731
711
|
var evt;
|
|
732
712
|
if (event) {
|
|
733
713
|
evt = prefix ? prefix + event : event;
|
|
734
|
-
if (this._events[evt])
|
|
735
|
-
clearEvent(this, evt);
|
|
714
|
+
if (this._events[evt]) clearEvent(this, evt);
|
|
736
715
|
} else {
|
|
737
716
|
this._events = new Events();
|
|
738
717
|
this._eventsCount = 0;
|
|
@@ -754,7 +733,7 @@
|
|
|
754
733
|
"node_modules/cropperjs/dist/cropper.js"(exports, module) {
|
|
755
734
|
(function(global2, factory) {
|
|
756
735
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.Cropper = factory());
|
|
757
|
-
})(exports, function() {
|
|
736
|
+
})(exports, (function() {
|
|
758
737
|
"use strict";
|
|
759
738
|
function ownKeys(e4, r4) {
|
|
760
739
|
var t4 = Object.keys(e4);
|
|
@@ -778,20 +757,18 @@
|
|
|
778
757
|
return e4;
|
|
779
758
|
}
|
|
780
759
|
function _toPrimitive(t4, r4) {
|
|
781
|
-
if ("object" != typeof t4 || !t4)
|
|
782
|
-
return t4;
|
|
760
|
+
if ("object" != typeof t4 || !t4) return t4;
|
|
783
761
|
var e4 = t4[Symbol.toPrimitive];
|
|
784
762
|
if (void 0 !== e4) {
|
|
785
|
-
var
|
|
786
|
-
if ("object" != typeof
|
|
787
|
-
return i5;
|
|
763
|
+
var i4 = e4.call(t4, r4 || "default");
|
|
764
|
+
if ("object" != typeof i4) return i4;
|
|
788
765
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
789
766
|
}
|
|
790
767
|
return ("string" === r4 ? String : Number)(t4);
|
|
791
768
|
}
|
|
792
769
|
function _toPropertyKey(t4) {
|
|
793
|
-
var
|
|
794
|
-
return "symbol" == typeof
|
|
770
|
+
var i4 = _toPrimitive(t4, "string");
|
|
771
|
+
return "symbol" == typeof i4 ? i4 : i4 + "";
|
|
795
772
|
}
|
|
796
773
|
function _typeof(o4) {
|
|
797
774
|
"@babel/helpers - typeof";
|
|
@@ -807,20 +784,17 @@
|
|
|
807
784
|
}
|
|
808
785
|
}
|
|
809
786
|
function _defineProperties(target, props) {
|
|
810
|
-
for (var
|
|
811
|
-
var descriptor = props[
|
|
787
|
+
for (var i4 = 0; i4 < props.length; i4++) {
|
|
788
|
+
var descriptor = props[i4];
|
|
812
789
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
813
790
|
descriptor.configurable = true;
|
|
814
|
-
if ("value" in descriptor)
|
|
815
|
-
descriptor.writable = true;
|
|
791
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
816
792
|
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
817
793
|
}
|
|
818
794
|
}
|
|
819
795
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
820
|
-
if (protoProps)
|
|
821
|
-
|
|
822
|
-
if (staticProps)
|
|
823
|
-
_defineProperties(Constructor, staticProps);
|
|
796
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
797
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
824
798
|
Object.defineProperty(Constructor, "prototype", {
|
|
825
799
|
writable: false
|
|
826
800
|
});
|
|
@@ -841,34 +815,25 @@
|
|
|
841
815
|
return obj;
|
|
842
816
|
}
|
|
843
817
|
function _toConsumableArray(arr) {
|
|
844
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
818
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray2(arr) || _nonIterableSpread();
|
|
845
819
|
}
|
|
846
820
|
function _arrayWithoutHoles(arr) {
|
|
847
|
-
if (Array.isArray(arr))
|
|
848
|
-
return _arrayLikeToArray(arr);
|
|
821
|
+
if (Array.isArray(arr)) return _arrayLikeToArray2(arr);
|
|
849
822
|
}
|
|
850
823
|
function _iterableToArray(iter) {
|
|
851
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
852
|
-
return Array.from(iter);
|
|
824
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
853
825
|
}
|
|
854
|
-
function
|
|
855
|
-
if (!o4)
|
|
856
|
-
|
|
857
|
-
if (typeof o4 === "string")
|
|
858
|
-
return _arrayLikeToArray(o4, minLen);
|
|
826
|
+
function _unsupportedIterableToArray2(o4, minLen) {
|
|
827
|
+
if (!o4) return;
|
|
828
|
+
if (typeof o4 === "string") return _arrayLikeToArray2(o4, minLen);
|
|
859
829
|
var n3 = Object.prototype.toString.call(o4).slice(8, -1);
|
|
860
|
-
if (n3 === "Object" && o4.constructor)
|
|
861
|
-
|
|
862
|
-
if (n3 === "
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
function _arrayLikeToArray(arr, len) {
|
|
868
|
-
if (len == null || len > arr.length)
|
|
869
|
-
len = arr.length;
|
|
870
|
-
for (var i5 = 0, arr2 = new Array(len); i5 < len; i5++)
|
|
871
|
-
arr2[i5] = arr[i5];
|
|
830
|
+
if (n3 === "Object" && o4.constructor) n3 = o4.constructor.name;
|
|
831
|
+
if (n3 === "Map" || n3 === "Set") return Array.from(o4);
|
|
832
|
+
if (n3 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3)) return _arrayLikeToArray2(o4, minLen);
|
|
833
|
+
}
|
|
834
|
+
function _arrayLikeToArray2(arr, len) {
|
|
835
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
836
|
+
for (var i4 = 0, arr2 = new Array(len); i4 < len; i4++) arr2[i4] = arr[i4];
|
|
872
837
|
return arr2;
|
|
873
838
|
}
|
|
874
839
|
function _nonIterableSpread() {
|
|
@@ -1173,7 +1138,7 @@
|
|
|
1173
1138
|
}
|
|
1174
1139
|
}
|
|
1175
1140
|
var REGEXP_SPACES = /\s\s*/;
|
|
1176
|
-
var onceSupported = function() {
|
|
1141
|
+
var onceSupported = (function() {
|
|
1177
1142
|
var supported = false;
|
|
1178
1143
|
if (IS_BROWSER) {
|
|
1179
1144
|
var once = false;
|
|
@@ -1197,7 +1162,7 @@
|
|
|
1197
1162
|
WINDOW.removeEventListener("test", listener, options2);
|
|
1198
1163
|
}
|
|
1199
1164
|
return supported;
|
|
1200
|
-
}();
|
|
1165
|
+
})();
|
|
1201
1166
|
function removeListener(element, type, listener) {
|
|
1202
1167
|
var options2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1203
1168
|
var handler = listener;
|
|
@@ -1275,8 +1240,8 @@
|
|
|
1275
1240
|
var timestamp = "timestamp=".concat((/* @__PURE__ */ new Date()).getTime());
|
|
1276
1241
|
return url + (url.indexOf("?") === -1 ? "?" : "&") + timestamp;
|
|
1277
1242
|
}
|
|
1278
|
-
function getTransforms(
|
|
1279
|
-
var rotate =
|
|
1243
|
+
function getTransforms(_ref2) {
|
|
1244
|
+
var rotate = _ref2.rotate, scaleX = _ref2.scaleX, scaleY = _ref2.scaleY, translateX = _ref2.translateX, translateY = _ref2.translateY;
|
|
1280
1245
|
var values = [];
|
|
1281
1246
|
if (isNumber(translateX) && translateX !== 0) {
|
|
1282
1247
|
values.push("translateX(".concat(translateX, "px)"));
|
|
@@ -1443,8 +1408,8 @@
|
|
|
1443
1408
|
function getStringFromCharCode(dataView, start3, length) {
|
|
1444
1409
|
var str = "";
|
|
1445
1410
|
length += start3;
|
|
1446
|
-
for (var
|
|
1447
|
-
str += fromCharCode(dataView.getUint8(
|
|
1411
|
+
for (var i4 = start3; i4 < length; i4 += 1) {
|
|
1412
|
+
str += fromCharCode(dataView.getUint8(i4));
|
|
1448
1413
|
}
|
|
1449
1414
|
return str;
|
|
1450
1415
|
}
|
|
@@ -1454,8 +1419,8 @@
|
|
|
1454
1419
|
var binary = atob(base64);
|
|
1455
1420
|
var arrayBuffer = new ArrayBuffer(binary.length);
|
|
1456
1421
|
var uint8 = new Uint8Array(arrayBuffer);
|
|
1457
|
-
forEach(uint8, function(value,
|
|
1458
|
-
uint8[
|
|
1422
|
+
forEach(uint8, function(value, i4) {
|
|
1423
|
+
uint8[i4] = binary.charCodeAt(i4);
|
|
1459
1424
|
});
|
|
1460
1425
|
return arrayBuffer;
|
|
1461
1426
|
}
|
|
@@ -1506,9 +1471,9 @@
|
|
|
1506
1471
|
if (ifdStart) {
|
|
1507
1472
|
var _length = dataView.getUint16(ifdStart, littleEndian);
|
|
1508
1473
|
var _offset;
|
|
1509
|
-
var
|
|
1510
|
-
for (
|
|
1511
|
-
_offset = ifdStart +
|
|
1474
|
+
var i4;
|
|
1475
|
+
for (i4 = 0; i4 < _length; i4 += 1) {
|
|
1476
|
+
_offset = ifdStart + i4 * 12 + 2;
|
|
1512
1477
|
if (dataView.getUint16(_offset, littleEndian) === 274) {
|
|
1513
1478
|
_offset += 8;
|
|
1514
1479
|
orientation = dataView.getUint16(_offset, littleEndian);
|
|
@@ -1527,26 +1492,33 @@
|
|
|
1527
1492
|
var scaleX = 1;
|
|
1528
1493
|
var scaleY = 1;
|
|
1529
1494
|
switch (orientation) {
|
|
1495
|
+
// Flip horizontal
|
|
1530
1496
|
case 2:
|
|
1531
1497
|
scaleX = -1;
|
|
1532
1498
|
break;
|
|
1499
|
+
// Rotate left 180°
|
|
1533
1500
|
case 3:
|
|
1534
1501
|
rotate = -180;
|
|
1535
1502
|
break;
|
|
1503
|
+
// Flip vertical
|
|
1536
1504
|
case 4:
|
|
1537
1505
|
scaleY = -1;
|
|
1538
1506
|
break;
|
|
1507
|
+
// Flip vertical and rotate right 90°
|
|
1539
1508
|
case 5:
|
|
1540
1509
|
rotate = 90;
|
|
1541
1510
|
scaleY = -1;
|
|
1542
1511
|
break;
|
|
1512
|
+
// Rotate right 90°
|
|
1543
1513
|
case 6:
|
|
1544
1514
|
rotate = 90;
|
|
1545
1515
|
break;
|
|
1516
|
+
// Flip horizontal and rotate right 90°
|
|
1546
1517
|
case 7:
|
|
1547
1518
|
rotate = 90;
|
|
1548
1519
|
scaleX = -1;
|
|
1549
1520
|
break;
|
|
1521
|
+
// Rotate left 90°
|
|
1550
1522
|
case 8:
|
|
1551
1523
|
rotate = -90;
|
|
1552
1524
|
break;
|
|
@@ -2061,11 +2033,11 @@
|
|
|
2061
2033
|
}
|
|
2062
2034
|
this.render();
|
|
2063
2035
|
if (options2.restore) {
|
|
2064
|
-
this.setCanvasData(forEach(canvasData, function(n3,
|
|
2065
|
-
canvasData[
|
|
2036
|
+
this.setCanvasData(forEach(canvasData, function(n3, i4) {
|
|
2037
|
+
canvasData[i4] = n3 * ratio;
|
|
2066
2038
|
}));
|
|
2067
|
-
this.setCropBoxData(forEach(cropBoxData, function(n3,
|
|
2068
|
-
cropBoxData[
|
|
2039
|
+
this.setCropBoxData(forEach(cropBoxData, function(n3, i4) {
|
|
2040
|
+
cropBoxData[i4] = n3 * ratio;
|
|
2069
2041
|
}));
|
|
2070
2042
|
}
|
|
2071
2043
|
}
|
|
@@ -2241,10 +2213,12 @@
|
|
|
2241
2213
|
}
|
|
2242
2214
|
};
|
|
2243
2215
|
switch (action) {
|
|
2216
|
+
// Move crop box
|
|
2244
2217
|
case ACTION_ALL:
|
|
2245
2218
|
left2 += range.x;
|
|
2246
2219
|
top2 += range.y;
|
|
2247
2220
|
break;
|
|
2221
|
+
// Resize crop box
|
|
2248
2222
|
case ACTION_EAST:
|
|
2249
2223
|
if (range.x >= 0 && (right2 >= maxWidth || aspectRatio && (top2 <= minTop || bottom2 >= maxHeight))) {
|
|
2250
2224
|
renderable = false;
|
|
@@ -2507,14 +2481,17 @@
|
|
|
2507
2481
|
top2 -= height;
|
|
2508
2482
|
}
|
|
2509
2483
|
break;
|
|
2484
|
+
// Move canvas
|
|
2510
2485
|
case ACTION_MOVE:
|
|
2511
2486
|
this.move(range.x, range.y);
|
|
2512
2487
|
renderable = false;
|
|
2513
2488
|
break;
|
|
2489
|
+
// Zoom canvas
|
|
2514
2490
|
case ACTION_ZOOM:
|
|
2515
2491
|
this.zoom(getMaxZoomRatio(pointers), event);
|
|
2516
2492
|
renderable = false;
|
|
2517
2493
|
break;
|
|
2494
|
+
// Create crop box
|
|
2518
2495
|
case ACTION_CROP:
|
|
2519
2496
|
if (!range.x || !range.y) {
|
|
2520
2497
|
renderable = false;
|
|
@@ -2846,8 +2823,8 @@
|
|
|
2846
2823
|
height: cropBoxData.height
|
|
2847
2824
|
};
|
|
2848
2825
|
var ratio = imageData.width / imageData.naturalWidth;
|
|
2849
|
-
forEach(data, function(n3,
|
|
2850
|
-
data[
|
|
2826
|
+
forEach(data, function(n3, i4) {
|
|
2827
|
+
data[i4] = n3 / ratio;
|
|
2851
2828
|
});
|
|
2852
2829
|
if (rounded) {
|
|
2853
2830
|
var bottom2 = Math.round(data.y + data.height);
|
|
@@ -3172,7 +3149,7 @@
|
|
|
3172
3149
|
}
|
|
3173
3150
|
};
|
|
3174
3151
|
var AnotherCropper = WINDOW.Cropper;
|
|
3175
|
-
var Cropper2 = /* @__PURE__ */ function() {
|
|
3152
|
+
var Cropper2 = /* @__PURE__ */ (function() {
|
|
3176
3153
|
function Cropper3(element) {
|
|
3177
3154
|
var options2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3178
3155
|
_classCallCheck(this, Cropper3);
|
|
@@ -3483,10 +3460,10 @@
|
|
|
3483
3460
|
assign2(DEFAULTS, isPlainObject(options2) && options2);
|
|
3484
3461
|
}
|
|
3485
3462
|
}]);
|
|
3486
|
-
}();
|
|
3463
|
+
})();
|
|
3487
3464
|
assign2(Cropper2.prototype, render, preview, events, handlers, change, methods);
|
|
3488
3465
|
return Cropper2;
|
|
3489
|
-
});
|
|
3466
|
+
}));
|
|
3490
3467
|
}
|
|
3491
3468
|
});
|
|
3492
3469
|
|
|
@@ -3773,18 +3750,18 @@
|
|
|
3773
3750
|
return lines.map((line) => line.slice(indent)).join("\n");
|
|
3774
3751
|
}
|
|
3775
3752
|
function interpolate(strings, values) {
|
|
3776
|
-
return strings.reduce((result, string,
|
|
3777
|
-
const value = values[
|
|
3753
|
+
return strings.reduce((result, string, i4) => {
|
|
3754
|
+
const value = values[i4] == void 0 ? "" : values[i4];
|
|
3778
3755
|
return result + string + value;
|
|
3779
3756
|
}, "");
|
|
3780
3757
|
}
|
|
3781
3758
|
function uuid() {
|
|
3782
|
-
return Array.from({ length: 36 }).map((_4,
|
|
3783
|
-
if (
|
|
3759
|
+
return Array.from({ length: 36 }).map((_4, i4) => {
|
|
3760
|
+
if (i4 == 8 || i4 == 13 || i4 == 18 || i4 == 23) {
|
|
3784
3761
|
return "-";
|
|
3785
|
-
} else if (
|
|
3762
|
+
} else if (i4 == 14) {
|
|
3786
3763
|
return "4";
|
|
3787
|
-
} else if (
|
|
3764
|
+
} else if (i4 == 19) {
|
|
3788
3765
|
return (Math.floor(Math.random() * 4) + 8).toString(16);
|
|
3789
3766
|
} else {
|
|
3790
3767
|
return Math.floor(Math.random() * 16).toString(16);
|
|
@@ -3793,8 +3770,7 @@
|
|
|
3793
3770
|
}
|
|
3794
3771
|
function getAttribute(attributeName, ...elements) {
|
|
3795
3772
|
for (const value of elements.map((element) => element?.getAttribute(attributeName))) {
|
|
3796
|
-
if (typeof value == "string")
|
|
3797
|
-
return value;
|
|
3773
|
+
if (typeof value == "string") return value;
|
|
3798
3774
|
}
|
|
3799
3775
|
return null;
|
|
3800
3776
|
}
|
|
@@ -3893,8 +3869,7 @@
|
|
|
3893
3869
|
return false;
|
|
3894
3870
|
} else if (name) {
|
|
3895
3871
|
for (const element of document.getElementsByName(name)) {
|
|
3896
|
-
if (element instanceof HTMLIFrameElement)
|
|
3897
|
-
return false;
|
|
3872
|
+
if (element instanceof HTMLIFrameElement) return false;
|
|
3898
3873
|
}
|
|
3899
3874
|
return true;
|
|
3900
3875
|
} else {
|
|
@@ -3903,15 +3878,11 @@
|
|
|
3903
3878
|
}
|
|
3904
3879
|
function findLinkFromClickTarget(target) {
|
|
3905
3880
|
const link2 = findClosestRecursively(target, "a[href], a[xlink\\:href]");
|
|
3906
|
-
if (!link2)
|
|
3907
|
-
|
|
3908
|
-
if (link2.
|
|
3909
|
-
return null;
|
|
3910
|
-
if (link2.hasAttribute("download"))
|
|
3911
|
-
return null;
|
|
3881
|
+
if (!link2) return null;
|
|
3882
|
+
if (link2.href.startsWith("#")) return null;
|
|
3883
|
+
if (link2.hasAttribute("download")) return null;
|
|
3912
3884
|
const linkTarget = link2.getAttribute("target");
|
|
3913
|
-
if (linkTarget && linkTarget !== "_self")
|
|
3914
|
-
return null;
|
|
3885
|
+
if (linkTarget && linkTarget !== "_self") return null;
|
|
3915
3886
|
return link2;
|
|
3916
3887
|
}
|
|
3917
3888
|
function debounce(fn3, delay) {
|
|
@@ -4237,8 +4208,7 @@
|
|
|
4237
4208
|
target: this.target
|
|
4238
4209
|
});
|
|
4239
4210
|
this.url = event.detail.url;
|
|
4240
|
-
if (event.defaultPrevented)
|
|
4241
|
-
await requestInterception;
|
|
4211
|
+
if (event.defaultPrevented) await requestInterception;
|
|
4242
4212
|
return event;
|
|
4243
4213
|
}
|
|
4244
4214
|
#willDelegateErrorHandling(error2) {
|
|
@@ -4266,10 +4236,8 @@
|
|
|
4266
4236
|
function entriesExcludingFiles(requestBody) {
|
|
4267
4237
|
const entries2 = [];
|
|
4268
4238
|
for (const [name, value] of requestBody) {
|
|
4269
|
-
if (value instanceof File)
|
|
4270
|
-
|
|
4271
|
-
else
|
|
4272
|
-
entries2.push([name, value]);
|
|
4239
|
+
if (value instanceof File) continue;
|
|
4240
|
+
else entries2.push([name, value]);
|
|
4273
4241
|
}
|
|
4274
4242
|
return entries2;
|
|
4275
4243
|
}
|
|
@@ -4366,8 +4334,7 @@
|
|
|
4366
4334
|
touch(key) {
|
|
4367
4335
|
key = this.#toCacheKey(key);
|
|
4368
4336
|
const index = this.keys.indexOf(key);
|
|
4369
|
-
if (index > -1)
|
|
4370
|
-
this.keys.splice(index, 1);
|
|
4337
|
+
if (index > -1) this.keys.splice(index, 1);
|
|
4371
4338
|
this.keys.unshift(key);
|
|
4372
4339
|
this.trim();
|
|
4373
4340
|
}
|
|
@@ -4401,8 +4368,7 @@
|
|
|
4401
4368
|
}
|
|
4402
4369
|
clear() {
|
|
4403
4370
|
super.clear();
|
|
4404
|
-
if (this.#prefetchTimeout)
|
|
4405
|
-
clearTimeout(this.#prefetchTimeout);
|
|
4371
|
+
if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout);
|
|
4406
4372
|
}
|
|
4407
4373
|
evict(key) {
|
|
4408
4374
|
super.evict(key);
|
|
@@ -4505,8 +4471,7 @@
|
|
|
4505
4471
|
}
|
|
4506
4472
|
requestStarted(_request) {
|
|
4507
4473
|
this.state = FormSubmissionState.waiting;
|
|
4508
|
-
if (this.submitter)
|
|
4509
|
-
config.forms.submitter.beforeSubmit(this.submitter);
|
|
4474
|
+
if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter);
|
|
4510
4475
|
this.setSubmitsWith();
|
|
4511
4476
|
markAsBusy(this.formElement);
|
|
4512
4477
|
dispatch("turbo:submit-start", {
|
|
@@ -4544,8 +4509,7 @@
|
|
|
4544
4509
|
}
|
|
4545
4510
|
requestFinished(_request) {
|
|
4546
4511
|
this.state = FormSubmissionState.stopped;
|
|
4547
|
-
if (this.submitter)
|
|
4548
|
-
config.forms.submitter.afterSubmit(this.submitter);
|
|
4512
|
+
if (this.submitter) config.forms.submitter.afterSubmit(this.submitter);
|
|
4549
4513
|
this.resetSubmitterText();
|
|
4550
4514
|
clearBusyState(this.formElement);
|
|
4551
4515
|
dispatch("turbo:submit-end", {
|
|
@@ -4556,8 +4520,7 @@
|
|
|
4556
4520
|
}
|
|
4557
4521
|
// Private
|
|
4558
4522
|
setSubmitsWith() {
|
|
4559
|
-
if (!this.submitter || !this.submitsWith)
|
|
4560
|
-
return;
|
|
4523
|
+
if (!this.submitter || !this.submitsWith) return;
|
|
4561
4524
|
if (this.submitter.matches("button")) {
|
|
4562
4525
|
this.originalSubmitText = this.submitter.innerHTML;
|
|
4563
4526
|
this.submitter.innerHTML = this.submitsWith;
|
|
@@ -4568,8 +4531,7 @@
|
|
|
4568
4531
|
}
|
|
4569
4532
|
}
|
|
4570
4533
|
resetSubmitterText() {
|
|
4571
|
-
if (!this.submitter || !this.originalSubmitText)
|
|
4572
|
-
return;
|
|
4534
|
+
if (!this.submitter || !this.originalSubmitText) return;
|
|
4573
4535
|
if (this.submitter.matches("button")) {
|
|
4574
4536
|
this.submitter.innerHTML = this.originalSubmitText;
|
|
4575
4537
|
} else if (this.submitter.matches("input")) {
|
|
@@ -4776,8 +4738,7 @@
|
|
|
4776
4738
|
const renderInterception = new Promise((resolve) => this.#resolveInterceptionPromise = resolve);
|
|
4777
4739
|
const options2 = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement, renderMethod: this.renderer.renderMethod };
|
|
4778
4740
|
const immediateRender = this.delegate.allowsImmediateRender(snapshot, options2);
|
|
4779
|
-
if (!immediateRender)
|
|
4780
|
-
await renderInterception;
|
|
4741
|
+
if (!immediateRender) await renderInterception;
|
|
4781
4742
|
await this.renderSnapshot(renderer);
|
|
4782
4743
|
this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod);
|
|
4783
4744
|
this.delegate.preloadOnLoadLinksForView(this.element);
|
|
@@ -4939,20 +4900,15 @@
|
|
|
4939
4900
|
form.setAttribute("action", action.href);
|
|
4940
4901
|
form.setAttribute("hidden", "");
|
|
4941
4902
|
const method = link2.getAttribute("data-turbo-method");
|
|
4942
|
-
if (method)
|
|
4943
|
-
form.setAttribute("method", method);
|
|
4903
|
+
if (method) form.setAttribute("method", method);
|
|
4944
4904
|
const turboFrame = link2.getAttribute("data-turbo-frame");
|
|
4945
|
-
if (turboFrame)
|
|
4946
|
-
form.setAttribute("data-turbo-frame", turboFrame);
|
|
4905
|
+
if (turboFrame) form.setAttribute("data-turbo-frame", turboFrame);
|
|
4947
4906
|
const turboAction = getVisitAction(link2);
|
|
4948
|
-
if (turboAction)
|
|
4949
|
-
form.setAttribute("data-turbo-action", turboAction);
|
|
4907
|
+
if (turboAction) form.setAttribute("data-turbo-action", turboAction);
|
|
4950
4908
|
const turboConfirm = link2.getAttribute("data-turbo-confirm");
|
|
4951
|
-
if (turboConfirm)
|
|
4952
|
-
form.setAttribute("data-turbo-confirm", turboConfirm);
|
|
4909
|
+
if (turboConfirm) form.setAttribute("data-turbo-confirm", turboConfirm);
|
|
4953
4910
|
const turboStream = link2.hasAttribute("data-turbo-stream");
|
|
4954
|
-
if (turboStream)
|
|
4955
|
-
form.setAttribute("data-turbo-stream", "");
|
|
4911
|
+
if (turboStream) form.setAttribute("data-turbo-stream", "");
|
|
4956
4912
|
this.delegate.submittedFormLinkToLocation(link2, location2, form);
|
|
4957
4913
|
document.body.appendChild(form);
|
|
4958
4914
|
form.addEventListener("turbo:submit-end", () => form.remove(), { once: true });
|
|
@@ -5055,8 +5011,7 @@
|
|
|
5055
5011
|
}
|
|
5056
5012
|
// Bardo delegate
|
|
5057
5013
|
enteringBardo(currentPermanentElement) {
|
|
5058
|
-
if (this.#activeElement)
|
|
5059
|
-
return;
|
|
5014
|
+
if (this.#activeElement) return;
|
|
5060
5015
|
if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {
|
|
5061
5016
|
this.#activeElement = this.currentSnapshot.activeElement;
|
|
5062
5017
|
}
|
|
@@ -5153,7 +5108,7 @@
|
|
|
5153
5108
|
return defaultValue;
|
|
5154
5109
|
}
|
|
5155
5110
|
}
|
|
5156
|
-
var Idiomorph = function() {
|
|
5111
|
+
var Idiomorph = (function() {
|
|
5157
5112
|
const noOp = () => {
|
|
5158
5113
|
};
|
|
5159
5114
|
const defaults = {
|
|
@@ -5214,8 +5169,7 @@
|
|
|
5214
5169
|
return Array.from(oldParent.childNodes);
|
|
5215
5170
|
}
|
|
5216
5171
|
function saveAndRestoreFocus(ctx, fn3) {
|
|
5217
|
-
if (!ctx.config.restoreFocus)
|
|
5218
|
-
return fn3();
|
|
5172
|
+
if (!ctx.config.restoreFocus) return fn3();
|
|
5219
5173
|
let activeElement = (
|
|
5220
5174
|
/** @type {HTMLInputElement|HTMLTextAreaElement|null} */
|
|
5221
5175
|
document.activeElement
|
|
@@ -5234,7 +5188,7 @@
|
|
|
5234
5188
|
}
|
|
5235
5189
|
return results;
|
|
5236
5190
|
}
|
|
5237
|
-
const morphChildren2 = /* @__PURE__ */ function() {
|
|
5191
|
+
const morphChildren2 = /* @__PURE__ */ (function() {
|
|
5238
5192
|
function morphChildren3(ctx, oldParent, newParent, insertionPoint = null, endPoint = null) {
|
|
5239
5193
|
if (oldParent instanceof HTMLTemplateElement && newParent instanceof HTMLTemplateElement) {
|
|
5240
5194
|
oldParent = oldParent.content;
|
|
@@ -5292,8 +5246,7 @@
|
|
|
5292
5246
|
}
|
|
5293
5247
|
}
|
|
5294
5248
|
function createNode(oldParent, newChild, insertionPoint, ctx) {
|
|
5295
|
-
if (ctx.callbacks.beforeNodeAdded(newChild) === false)
|
|
5296
|
-
return null;
|
|
5249
|
+
if (ctx.callbacks.beforeNodeAdded(newChild) === false) return null;
|
|
5297
5250
|
if (ctx.idMap.has(newChild)) {
|
|
5298
5251
|
const newEmptyChild = document.createElement(
|
|
5299
5252
|
/** @type {Element} */
|
|
@@ -5310,7 +5263,7 @@
|
|
|
5310
5263
|
return newClonedChild;
|
|
5311
5264
|
}
|
|
5312
5265
|
}
|
|
5313
|
-
const findBestMatch = /* @__PURE__ */ function() {
|
|
5266
|
+
const findBestMatch = /* @__PURE__ */ (function() {
|
|
5314
5267
|
function findBestMatch2(ctx, node, startPoint, endPoint) {
|
|
5315
5268
|
let softMatch = null;
|
|
5316
5269
|
let nextSibling = node.nextSibling;
|
|
@@ -5334,8 +5287,7 @@
|
|
|
5334
5287
|
softMatch = void 0;
|
|
5335
5288
|
}
|
|
5336
5289
|
}
|
|
5337
|
-
if (ctx.activeElementAndParents.includes(cursor))
|
|
5338
|
-
break;
|
|
5290
|
+
if (ctx.activeElementAndParents.includes(cursor)) break;
|
|
5339
5291
|
cursor = cursor.nextSibling;
|
|
5340
5292
|
}
|
|
5341
5293
|
return softMatch || null;
|
|
@@ -5343,8 +5295,7 @@
|
|
|
5343
5295
|
function isIdSetMatch(ctx, oldNode, newNode) {
|
|
5344
5296
|
let oldSet = ctx.idMap.get(oldNode);
|
|
5345
5297
|
let newSet = ctx.idMap.get(newNode);
|
|
5346
|
-
if (!newSet || !oldSet)
|
|
5347
|
-
return false;
|
|
5298
|
+
if (!newSet || !oldSet) return false;
|
|
5348
5299
|
for (const id2 of oldSet) {
|
|
5349
5300
|
if (newSet.has(id2)) {
|
|
5350
5301
|
return true;
|
|
@@ -5368,13 +5319,12 @@
|
|
|
5368
5319
|
(!oldElt.getAttribute?.("id") || oldElt.getAttribute?.("id") === newElt.getAttribute?.("id"));
|
|
5369
5320
|
}
|
|
5370
5321
|
return findBestMatch2;
|
|
5371
|
-
}();
|
|
5322
|
+
})();
|
|
5372
5323
|
function removeNode(ctx, node) {
|
|
5373
5324
|
if (ctx.idMap.has(node)) {
|
|
5374
5325
|
moveBefore(ctx.pantry, node, null);
|
|
5375
5326
|
} else {
|
|
5376
|
-
if (ctx.callbacks.beforeNodeRemoved(node) === false)
|
|
5377
|
-
return;
|
|
5327
|
+
if (ctx.callbacks.beforeNodeRemoved(node) === false) return;
|
|
5378
5328
|
node.parentNode?.removeChild(node);
|
|
5379
5329
|
ctx.callbacks.afterNodeRemoved(node);
|
|
5380
5330
|
}
|
|
@@ -5429,8 +5379,8 @@
|
|
|
5429
5379
|
}
|
|
5430
5380
|
}
|
|
5431
5381
|
return morphChildren3;
|
|
5432
|
-
}();
|
|
5433
|
-
const morphNode = /* @__PURE__ */ function() {
|
|
5382
|
+
})();
|
|
5383
|
+
const morphNode = /* @__PURE__ */ (function() {
|
|
5434
5384
|
function morphNode2(oldNode, newContent, ctx) {
|
|
5435
5385
|
if (ctx.ignoreActive && oldNode === document.activeElement) {
|
|
5436
5386
|
return null;
|
|
@@ -5438,8 +5388,7 @@
|
|
|
5438
5388
|
if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) {
|
|
5439
5389
|
return oldNode;
|
|
5440
5390
|
}
|
|
5441
|
-
if (oldNode instanceof HTMLHeadElement && ctx.head.ignore)
|
|
5442
|
-
;
|
|
5391
|
+
if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ;
|
|
5443
5392
|
else if (oldNode instanceof HTMLHeadElement && ctx.head.style !== "morph") {
|
|
5444
5393
|
handleHeadElement(
|
|
5445
5394
|
oldNode,
|
|
@@ -5477,10 +5426,9 @@
|
|
|
5477
5426
|
oldElt.setAttribute(newAttribute.name, newAttribute.value);
|
|
5478
5427
|
}
|
|
5479
5428
|
}
|
|
5480
|
-
for (let
|
|
5481
|
-
const oldAttribute = oldAttributes[
|
|
5482
|
-
if (!oldAttribute)
|
|
5483
|
-
continue;
|
|
5429
|
+
for (let i4 = oldAttributes.length - 1; 0 <= i4; i4--) {
|
|
5430
|
+
const oldAttribute = oldAttributes[i4];
|
|
5431
|
+
if (!oldAttribute) continue;
|
|
5484
5432
|
if (!newElt.hasAttribute(oldAttribute.name)) {
|
|
5485
5433
|
if (ignoreAttribute(oldAttribute.name, oldElt, "remove", ctx)) {
|
|
5486
5434
|
continue;
|
|
@@ -5564,7 +5512,7 @@
|
|
|
5564
5512
|
return !!ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body;
|
|
5565
5513
|
}
|
|
5566
5514
|
return morphNode2;
|
|
5567
|
-
}();
|
|
5515
|
+
})();
|
|
5568
5516
|
function withHeadBlocking(ctx, oldNode, newNode, callback) {
|
|
5569
5517
|
if (ctx.head.block) {
|
|
5570
5518
|
const oldHead = oldNode.querySelector("head");
|
|
@@ -5653,7 +5601,7 @@
|
|
|
5653
5601
|
});
|
|
5654
5602
|
return promises;
|
|
5655
5603
|
}
|
|
5656
|
-
const createMorphContext = /* @__PURE__ */ function() {
|
|
5604
|
+
const createMorphContext = /* @__PURE__ */ (function() {
|
|
5657
5605
|
function createMorphContext2(oldNode, newContent, config2) {
|
|
5658
5606
|
const { persistentIds, idMap } = createIdMaps(oldNode, newContent);
|
|
5659
5607
|
const mergedConfig = mergeDefaults(config2);
|
|
@@ -5700,8 +5648,7 @@
|
|
|
5700
5648
|
if (elt?.tagName !== "BODY" && oldNode.contains(elt)) {
|
|
5701
5649
|
while (elt) {
|
|
5702
5650
|
activeElementAndParents.push(elt);
|
|
5703
|
-
if (elt === oldNode)
|
|
5704
|
-
break;
|
|
5651
|
+
if (elt === oldNode) break;
|
|
5705
5652
|
elt = elt.parentElement;
|
|
5706
5653
|
}
|
|
5707
5654
|
}
|
|
@@ -5729,8 +5676,7 @@
|
|
|
5729
5676
|
idMap.set(current, idSet);
|
|
5730
5677
|
}
|
|
5731
5678
|
idSet.add(id2);
|
|
5732
|
-
if (current === root)
|
|
5733
|
-
break;
|
|
5679
|
+
if (current === root) break;
|
|
5734
5680
|
current = current.parentElement;
|
|
5735
5681
|
}
|
|
5736
5682
|
}
|
|
@@ -5770,8 +5716,8 @@
|
|
|
5770
5716
|
return persistentIds;
|
|
5771
5717
|
}
|
|
5772
5718
|
return createMorphContext2;
|
|
5773
|
-
}();
|
|
5774
|
-
const { normalizeElement, normalizeParent } = /* @__PURE__ */ function() {
|
|
5719
|
+
})();
|
|
5720
|
+
const { normalizeElement, normalizeParent } = /* @__PURE__ */ (function() {
|
|
5775
5721
|
const generatedByIdiomorph = /* @__PURE__ */ new WeakSet();
|
|
5776
5722
|
function normalizeElement2(content) {
|
|
5777
5723
|
if (content instanceof Document) {
|
|
@@ -5839,11 +5785,10 @@
|
|
|
5839
5785
|
return this.childNodes.reduce(
|
|
5840
5786
|
(results, node) => {
|
|
5841
5787
|
if (node instanceof Element) {
|
|
5842
|
-
if (node.matches(selector))
|
|
5843
|
-
results.push(node);
|
|
5788
|
+
if (node.matches(selector)) results.push(node);
|
|
5844
5789
|
const nodeList = node.querySelectorAll(selector);
|
|
5845
|
-
for (let
|
|
5846
|
-
results.push(nodeList[
|
|
5790
|
+
for (let i4 = 0; i4 < nodeList.length; i4++) {
|
|
5791
|
+
results.push(nodeList[i4]);
|
|
5847
5792
|
}
|
|
5848
5793
|
}
|
|
5849
5794
|
return results;
|
|
@@ -5908,12 +5853,12 @@
|
|
|
5908
5853
|
}
|
|
5909
5854
|
}
|
|
5910
5855
|
return { normalizeElement: normalizeElement2, normalizeParent: normalizeParent2 };
|
|
5911
|
-
}();
|
|
5856
|
+
})();
|
|
5912
5857
|
return {
|
|
5913
5858
|
morph,
|
|
5914
5859
|
defaults
|
|
5915
5860
|
};
|
|
5916
|
-
}();
|
|
5861
|
+
})();
|
|
5917
5862
|
function morphElements(currentElement, newElement, { callbacks, ...options2 } = {}) {
|
|
5918
5863
|
Idiomorph.morph(currentElement, newElement, {
|
|
5919
5864
|
...options2,
|
|
@@ -6208,10 +6153,8 @@
|
|
|
6208
6153
|
const clonedSelectElements = clonedElement.querySelectorAll("select");
|
|
6209
6154
|
for (const [index, source] of selectElements.entries()) {
|
|
6210
6155
|
const clone2 = clonedSelectElements[index];
|
|
6211
|
-
for (const option of clone2.selectedOptions)
|
|
6212
|
-
|
|
6213
|
-
for (const option of source.selectedOptions)
|
|
6214
|
-
clone2.options[option.index].selected = true;
|
|
6156
|
+
for (const option of clone2.selectedOptions) option.selected = false;
|
|
6157
|
+
for (const option of source.selectedOptions) clone2.options[option.index].selected = true;
|
|
6215
6158
|
}
|
|
6216
6159
|
for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]')) {
|
|
6217
6160
|
clonedPasswordInput.value = "";
|
|
@@ -6456,10 +6399,8 @@
|
|
|
6456
6399
|
if (this.response) {
|
|
6457
6400
|
const { statusCode, responseHTML } = this.response;
|
|
6458
6401
|
this.render(async () => {
|
|
6459
|
-
if (this.shouldCacheSnapshot)
|
|
6460
|
-
|
|
6461
|
-
if (this.view.renderPromise)
|
|
6462
|
-
await this.view.renderPromise;
|
|
6402
|
+
if (this.shouldCacheSnapshot) this.cacheSnapshot();
|
|
6403
|
+
if (this.view.renderPromise) await this.view.renderPromise;
|
|
6463
6404
|
if (isSuccessful(statusCode) && responseHTML != null) {
|
|
6464
6405
|
const snapshot = PageSnapshot.fromHTMLString(responseHTML);
|
|
6465
6406
|
await this.renderPageSnapshot(snapshot, false);
|
|
@@ -6498,8 +6439,7 @@
|
|
|
6498
6439
|
if (this.isPageRefresh) {
|
|
6499
6440
|
this.adapter.visitRendered(this);
|
|
6500
6441
|
} else {
|
|
6501
|
-
if (this.view.renderPromise)
|
|
6502
|
-
await this.view.renderPromise;
|
|
6442
|
+
if (this.view.renderPromise) await this.view.renderPromise;
|
|
6503
6443
|
await this.renderPageSnapshot(snapshot, isPreview);
|
|
6504
6444
|
this.adapter.visitRendered(this);
|
|
6505
6445
|
if (!isPreview) {
|
|
@@ -6861,8 +6801,7 @@
|
|
|
6861
6801
|
this.update(history.replaceState, location2, restorationIdentifier);
|
|
6862
6802
|
}
|
|
6863
6803
|
update(method, location2, restorationIdentifier = uuid()) {
|
|
6864
|
-
if (method === history.pushState)
|
|
6865
|
-
++this.currentIndex;
|
|
6804
|
+
if (method === history.pushState) ++this.currentIndex;
|
|
6866
6805
|
const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } };
|
|
6867
6806
|
method.call(history, state, "", location2.href);
|
|
6868
6807
|
this.location = location2;
|
|
@@ -6917,8 +6856,7 @@
|
|
|
6917
6856
|
this.eventTarget = eventTarget;
|
|
6918
6857
|
}
|
|
6919
6858
|
start() {
|
|
6920
|
-
if (this.started)
|
|
6921
|
-
return;
|
|
6859
|
+
if (this.started) return;
|
|
6922
6860
|
if (this.eventTarget.readyState === "loading") {
|
|
6923
6861
|
this.eventTarget.addEventListener("DOMContentLoaded", this.#enable, { once: true });
|
|
6924
6862
|
} else {
|
|
@@ -6926,8 +6864,7 @@
|
|
|
6926
6864
|
}
|
|
6927
6865
|
}
|
|
6928
6866
|
stop() {
|
|
6929
|
-
if (!this.started)
|
|
6930
|
-
return;
|
|
6867
|
+
if (!this.started) return;
|
|
6931
6868
|
this.eventTarget.removeEventListener("mouseenter", this.#tryToPrefetchRequest, {
|
|
6932
6869
|
capture: true,
|
|
6933
6870
|
passive: true
|
|
@@ -6952,8 +6889,7 @@
|
|
|
6952
6889
|
this.started = true;
|
|
6953
6890
|
};
|
|
6954
6891
|
#tryToPrefetchRequest = (event) => {
|
|
6955
|
-
if (getMetaContent("turbo-prefetch") === "false")
|
|
6956
|
-
return;
|
|
6892
|
+
if (getMetaContent("turbo-prefetch") === "false") return;
|
|
6957
6893
|
const target = event.target;
|
|
6958
6894
|
const isLink = target.matches && target.matches("a[href]:not([target^=_]):not([download])");
|
|
6959
6895
|
if (isLink && this.#isPrefetchable(target)) {
|
|
@@ -6974,8 +6910,7 @@
|
|
|
6974
6910
|
}
|
|
6975
6911
|
};
|
|
6976
6912
|
#cancelRequestIfObsolete = (event) => {
|
|
6977
|
-
if (event.target === this.#prefetchedLink)
|
|
6978
|
-
this.#cancelPrefetchRequest();
|
|
6913
|
+
if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest();
|
|
6979
6914
|
};
|
|
6980
6915
|
#cancelPrefetchRequest = () => {
|
|
6981
6916
|
prefetchCache.clear();
|
|
@@ -7017,18 +6952,12 @@
|
|
|
7017
6952
|
}
|
|
7018
6953
|
#isPrefetchable(link2) {
|
|
7019
6954
|
const href = link2.getAttribute("href");
|
|
7020
|
-
if (!href)
|
|
7021
|
-
|
|
7022
|
-
if (
|
|
7023
|
-
|
|
7024
|
-
if (
|
|
7025
|
-
|
|
7026
|
-
if (linkOptsOut(link2))
|
|
7027
|
-
return false;
|
|
7028
|
-
if (nonSafeLink(link2))
|
|
7029
|
-
return false;
|
|
7030
|
-
if (eventPrevented(link2))
|
|
7031
|
-
return false;
|
|
6955
|
+
if (!href) return false;
|
|
6956
|
+
if (unfetchableLink(link2)) return false;
|
|
6957
|
+
if (linkToTheSamePage(link2)) return false;
|
|
6958
|
+
if (linkOptsOut(link2)) return false;
|
|
6959
|
+
if (nonSafeLink(link2)) return false;
|
|
6960
|
+
if (eventPrevented(link2)) return false;
|
|
7032
6961
|
return true;
|
|
7033
6962
|
}
|
|
7034
6963
|
};
|
|
@@ -7039,25 +6968,18 @@
|
|
|
7039
6968
|
return link2.pathname + link2.search === document.location.pathname + document.location.search || link2.href.startsWith("#");
|
|
7040
6969
|
};
|
|
7041
6970
|
var linkOptsOut = (link2) => {
|
|
7042
|
-
if (link2.getAttribute("data-turbo-prefetch") === "false")
|
|
7043
|
-
|
|
7044
|
-
if (link2.getAttribute("data-turbo") === "false")
|
|
7045
|
-
return true;
|
|
6971
|
+
if (link2.getAttribute("data-turbo-prefetch") === "false") return true;
|
|
6972
|
+
if (link2.getAttribute("data-turbo") === "false") return true;
|
|
7046
6973
|
const turboPrefetchParent = findClosestRecursively(link2, "[data-turbo-prefetch]");
|
|
7047
|
-
if (turboPrefetchParent && turboPrefetchParent.getAttribute("data-turbo-prefetch") === "false")
|
|
7048
|
-
return true;
|
|
6974
|
+
if (turboPrefetchParent && turboPrefetchParent.getAttribute("data-turbo-prefetch") === "false") return true;
|
|
7049
6975
|
return false;
|
|
7050
6976
|
};
|
|
7051
6977
|
var nonSafeLink = (link2) => {
|
|
7052
6978
|
const turboMethod = link2.getAttribute("data-turbo-method");
|
|
7053
|
-
if (turboMethod && turboMethod.toLowerCase() !== "get")
|
|
7054
|
-
|
|
7055
|
-
if (
|
|
7056
|
-
|
|
7057
|
-
if (link2.hasAttribute("data-turbo-confirm"))
|
|
7058
|
-
return true;
|
|
7059
|
-
if (link2.hasAttribute("data-turbo-stream"))
|
|
7060
|
-
return true;
|
|
6979
|
+
if (turboMethod && turboMethod.toLowerCase() !== "get") return true;
|
|
6980
|
+
if (isUJS(link2)) return true;
|
|
6981
|
+
if (link2.hasAttribute("data-turbo-confirm")) return true;
|
|
6982
|
+
if (link2.hasAttribute("data-turbo-stream")) return true;
|
|
7061
6983
|
return false;
|
|
7062
6984
|
};
|
|
7063
6985
|
var isUJS = (link2) => {
|
|
@@ -7348,8 +7270,7 @@
|
|
|
7348
7270
|
function firstAutofocusableElementInStreams(nodeListOfStreamElements) {
|
|
7349
7271
|
for (const streamElement of nodeListOfStreamElements) {
|
|
7350
7272
|
const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content);
|
|
7351
|
-
if (elementWithAutofocus)
|
|
7352
|
-
return elementWithAutofocus;
|
|
7273
|
+
if (elementWithAutofocus) return elementWithAutofocus;
|
|
7353
7274
|
}
|
|
7354
7275
|
return null;
|
|
7355
7276
|
}
|
|
@@ -8274,8 +8195,7 @@
|
|
|
8274
8195
|
}
|
|
8275
8196
|
}
|
|
8276
8197
|
sourceURLChanged() {
|
|
8277
|
-
if (this.#isIgnoringChangesTo("src"))
|
|
8278
|
-
return;
|
|
8198
|
+
if (this.#isIgnoringChangesTo("src")) return;
|
|
8279
8199
|
if (!this.sourceURL) {
|
|
8280
8200
|
this.#currentFetchRequest?.cancel();
|
|
8281
8201
|
}
|
|
@@ -8341,8 +8261,7 @@
|
|
|
8341
8261
|
}
|
|
8342
8262
|
submittedFormLinkToLocation(link2, _location, form) {
|
|
8343
8263
|
const frame = this.#findFrameElement(link2);
|
|
8344
|
-
if (frame)
|
|
8345
|
-
form.setAttribute("data-turbo-frame", frame.id);
|
|
8264
|
+
if (frame) form.setAttribute("data-turbo-frame", frame.id);
|
|
8346
8265
|
}
|
|
8347
8266
|
// Link interceptor delegate
|
|
8348
8267
|
shouldInterceptLinkClick(element, _location, _event) {
|
|
@@ -8456,8 +8375,7 @@
|
|
|
8456
8375
|
if (newFrameElement) {
|
|
8457
8376
|
const snapshot = new Snapshot(newFrameElement);
|
|
8458
8377
|
const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false);
|
|
8459
|
-
if (this.view.renderPromise)
|
|
8460
|
-
await this.view.renderPromise;
|
|
8378
|
+
if (this.view.renderPromise) await this.view.renderPromise;
|
|
8461
8379
|
this.changeHistory();
|
|
8462
8380
|
await this.view.render(renderer);
|
|
8463
8381
|
this.complete = true;
|
|
@@ -8507,8 +8425,7 @@
|
|
|
8507
8425
|
restorationIdentifier: this.restorationIdentifier,
|
|
8508
8426
|
snapshot: pageSnapshot
|
|
8509
8427
|
};
|
|
8510
|
-
if (this.action)
|
|
8511
|
-
options2.action = this.action;
|
|
8428
|
+
if (this.action) options2.action = this.action;
|
|
8512
8429
|
session.visit(frame.src, options2);
|
|
8513
8430
|
}
|
|
8514
8431
|
};
|
|
@@ -8922,10 +8839,8 @@
|
|
|
8922
8839
|
}
|
|
8923
8840
|
(() => {
|
|
8924
8841
|
const scriptElement = document.currentScript;
|
|
8925
|
-
if (!scriptElement)
|
|
8926
|
-
|
|
8927
|
-
if (scriptElement.hasAttribute("data-turbo-suppress-warning"))
|
|
8928
|
-
return;
|
|
8842
|
+
if (!scriptElement) return;
|
|
8843
|
+
if (scriptElement.hasAttribute("data-turbo-suppress-warning")) return;
|
|
8929
8844
|
let element = scriptElement.parentElement;
|
|
8930
8845
|
while (element) {
|
|
8931
8846
|
if (element == document.body) {
|
|
@@ -11584,8 +11499,7 @@
|
|
|
11584
11499
|
this.updateState();
|
|
11585
11500
|
}
|
|
11586
11501
|
updateState() {
|
|
11587
|
-
if (!this.hasAddButtonTarget || this.limitValue == 0)
|
|
11588
|
-
return;
|
|
11502
|
+
if (!this.hasAddButtonTarget || this.limitValue == 0) return;
|
|
11589
11503
|
if (this.childCount >= this.limitValue)
|
|
11590
11504
|
this.addButtonTarget.style.display = "none";
|
|
11591
11505
|
else
|
|
@@ -11601,6 +11515,7 @@
|
|
|
11601
11515
|
connect() {
|
|
11602
11516
|
}
|
|
11603
11517
|
preSubmit() {
|
|
11518
|
+
this.element.querySelectorAll('input[name="pre_submit"]').forEach((n3) => n3.remove());
|
|
11604
11519
|
const hiddenField = document.createElement("input");
|
|
11605
11520
|
hiddenField.type = "hidden";
|
|
11606
11521
|
hiddenField.name = "pre_submit";
|
|
@@ -11679,8 +11594,8 @@
|
|
|
11679
11594
|
}
|
|
11680
11595
|
|
|
11681
11596
|
// node_modules/@popperjs/core/lib/modifiers/applyStyles.js
|
|
11682
|
-
function applyStyles(
|
|
11683
|
-
var state =
|
|
11597
|
+
function applyStyles(_ref2) {
|
|
11598
|
+
var state = _ref2.state;
|
|
11684
11599
|
Object.keys(state.elements).forEach(function(name) {
|
|
11685
11600
|
var style = state.styles[name] || {};
|
|
11686
11601
|
var attributes = state.attributes[name] || {};
|
|
@@ -11787,7 +11702,7 @@
|
|
|
11787
11702
|
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
11788
11703
|
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
11789
11704
|
}
|
|
11790
|
-
var
|
|
11705
|
+
var _ref2 = isElement(element) ? getWindow(element) : window, visualViewport = _ref2.visualViewport;
|
|
11791
11706
|
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
11792
11707
|
var x4 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
11793
11708
|
var y4 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
@@ -11963,9 +11878,9 @@
|
|
|
11963
11878
|
})) : padding;
|
|
11964
11879
|
return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
|
|
11965
11880
|
};
|
|
11966
|
-
function arrow(
|
|
11881
|
+
function arrow(_ref2) {
|
|
11967
11882
|
var _state$modifiersData$;
|
|
11968
|
-
var state =
|
|
11883
|
+
var state = _ref2.state, name = _ref2.name, options2 = _ref2.options;
|
|
11969
11884
|
var arrowElement = state.elements.arrow;
|
|
11970
11885
|
var popperOffsets2 = state.modifiersData.popperOffsets;
|
|
11971
11886
|
var basePlacement = getBasePlacement(state.placement);
|
|
@@ -12030,8 +11945,8 @@
|
|
|
12030
11945
|
bottom: "auto",
|
|
12031
11946
|
left: "auto"
|
|
12032
11947
|
};
|
|
12033
|
-
function roundOffsetsByDPR(
|
|
12034
|
-
var x4 =
|
|
11948
|
+
function roundOffsetsByDPR(_ref2, win) {
|
|
11949
|
+
var x4 = _ref2.x, y4 = _ref2.y;
|
|
12035
11950
|
var dpr = win.devicePixelRatio || 1;
|
|
12036
11951
|
return {
|
|
12037
11952
|
x: round(x4 * dpr) / dpr || 0,
|
|
@@ -12148,8 +12063,8 @@
|
|
|
12148
12063
|
var passive = {
|
|
12149
12064
|
passive: true
|
|
12150
12065
|
};
|
|
12151
|
-
function effect3(
|
|
12152
|
-
var state =
|
|
12066
|
+
function effect3(_ref2) {
|
|
12067
|
+
var state = _ref2.state, instance = _ref2.instance, options2 = _ref2.options;
|
|
12153
12068
|
var _options$scroll = options2.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options2.resize, resize = _options$resize === void 0 ? true : _options$resize;
|
|
12154
12069
|
var window2 = getWindow(state.elements.popper);
|
|
12155
12070
|
var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
|
|
@@ -12360,8 +12275,8 @@
|
|
|
12360
12275
|
}
|
|
12361
12276
|
|
|
12362
12277
|
// node_modules/@popperjs/core/lib/utils/computeOffsets.js
|
|
12363
|
-
function computeOffsets(
|
|
12364
|
-
var reference2 =
|
|
12278
|
+
function computeOffsets(_ref2) {
|
|
12279
|
+
var reference2 = _ref2.reference, element = _ref2.element, placement = _ref2.placement;
|
|
12365
12280
|
var basePlacement = placement ? getBasePlacement(placement) : null;
|
|
12366
12281
|
var variation = placement ? getVariation(placement) : null;
|
|
12367
12282
|
var commonX = reference2.x + reference2.width / 2 - element.width / 2;
|
|
@@ -12490,8 +12405,8 @@
|
|
|
12490
12405
|
var oppositePlacement = getOppositePlacement(placement);
|
|
12491
12406
|
return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
|
|
12492
12407
|
}
|
|
12493
|
-
function flip(
|
|
12494
|
-
var state =
|
|
12408
|
+
function flip(_ref2) {
|
|
12409
|
+
var state = _ref2.state, options2 = _ref2.options, name = _ref2.name;
|
|
12495
12410
|
if (state.modifiersData[name]._skip) {
|
|
12496
12411
|
return;
|
|
12497
12412
|
}
|
|
@@ -12515,8 +12430,8 @@
|
|
|
12515
12430
|
var checksMap = /* @__PURE__ */ new Map();
|
|
12516
12431
|
var makeFallbackChecks = true;
|
|
12517
12432
|
var firstFittingPlacement = placements2[0];
|
|
12518
|
-
for (var
|
|
12519
|
-
var placement = placements2[
|
|
12433
|
+
for (var i4 = 0; i4 < placements2.length; i4++) {
|
|
12434
|
+
var placement = placements2[i4];
|
|
12520
12435
|
var _basePlacement = getBasePlacement(placement);
|
|
12521
12436
|
var isStartVariation = getVariation(placement) === start2;
|
|
12522
12437
|
var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
|
|
@@ -12567,8 +12482,7 @@
|
|
|
12567
12482
|
};
|
|
12568
12483
|
for (var _i = numberOfChecks; _i > 0; _i--) {
|
|
12569
12484
|
var _ret = _loop(_i);
|
|
12570
|
-
if (_ret === "break")
|
|
12571
|
-
break;
|
|
12485
|
+
if (_ret === "break") break;
|
|
12572
12486
|
}
|
|
12573
12487
|
}
|
|
12574
12488
|
if (state.placement !== firstFittingPlacement) {
|
|
@@ -12608,8 +12522,8 @@
|
|
|
12608
12522
|
return overflow[side] >= 0;
|
|
12609
12523
|
});
|
|
12610
12524
|
}
|
|
12611
|
-
function hide(
|
|
12612
|
-
var state =
|
|
12525
|
+
function hide(_ref2) {
|
|
12526
|
+
var state = _ref2.state, name = _ref2.name;
|
|
12613
12527
|
var referenceRect = state.rects.reference;
|
|
12614
12528
|
var popperRect = state.rects.popper;
|
|
12615
12529
|
var preventedOffsets = state.modifiersData.preventOverflow;
|
|
@@ -12646,9 +12560,9 @@
|
|
|
12646
12560
|
function distanceAndSkiddingToXY(placement, rects, offset2) {
|
|
12647
12561
|
var basePlacement = getBasePlacement(placement);
|
|
12648
12562
|
var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
|
|
12649
|
-
var
|
|
12563
|
+
var _ref2 = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
|
|
12650
12564
|
placement
|
|
12651
|
-
})) : offset2, skidding =
|
|
12565
|
+
})) : offset2, skidding = _ref2[0], distance = _ref2[1];
|
|
12652
12566
|
skidding = skidding || 0;
|
|
12653
12567
|
distance = (distance || 0) * invertDistance;
|
|
12654
12568
|
return [left, right].indexOf(basePlacement) >= 0 ? {
|
|
@@ -12682,8 +12596,8 @@
|
|
|
12682
12596
|
};
|
|
12683
12597
|
|
|
12684
12598
|
// node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
|
|
12685
|
-
function popperOffsets(
|
|
12686
|
-
var state =
|
|
12599
|
+
function popperOffsets(_ref2) {
|
|
12600
|
+
var state = _ref2.state, name = _ref2.name;
|
|
12687
12601
|
state.modifiersData[name] = computeOffsets({
|
|
12688
12602
|
reference: state.rects.reference,
|
|
12689
12603
|
element: state.rects.popper,
|
|
@@ -12705,8 +12619,8 @@
|
|
|
12705
12619
|
}
|
|
12706
12620
|
|
|
12707
12621
|
// node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
|
|
12708
|
-
function preventOverflow(
|
|
12709
|
-
var state =
|
|
12622
|
+
function preventOverflow(_ref2) {
|
|
12623
|
+
var state = _ref2.state, options2 = _ref2.options, name = _ref2.name;
|
|
12710
12624
|
var _options$mainAxis = options2.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options2.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options2.boundary, rootBoundary = options2.rootBoundary, altBoundary = options2.altBoundary, padding = options2.padding, _options$tether = options2.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options2.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
|
|
12711
12625
|
var overflow = detectOverflow(state, {
|
|
12712
12626
|
boundary,
|
|
@@ -13041,8 +12955,8 @@
|
|
|
13041
12955
|
}
|
|
13042
12956
|
});
|
|
13043
12957
|
function runModifierEffects() {
|
|
13044
|
-
state.orderedModifiers.forEach(function(
|
|
13045
|
-
var name =
|
|
12958
|
+
state.orderedModifiers.forEach(function(_ref2) {
|
|
12959
|
+
var name = _ref2.name, _ref$options = _ref2.options, options3 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref2.effect;
|
|
13046
12960
|
if (typeof effect4 === "function") {
|
|
13047
12961
|
var cleanupFn = effect4({
|
|
13048
12962
|
state,
|
|
@@ -13276,8 +13190,7 @@
|
|
|
13276
13190
|
}
|
|
13277
13191
|
}
|
|
13278
13192
|
disconnect() {
|
|
13279
|
-
if (this.autoDismissTimeout)
|
|
13280
|
-
clearTimeout(this.autoDismissTimeout);
|
|
13193
|
+
if (this.autoDismissTimeout) clearTimeout(this.autoDismissTimeout);
|
|
13281
13194
|
this.autoDismissTimeout = null;
|
|
13282
13195
|
}
|
|
13283
13196
|
dismiss() {
|
|
@@ -13314,12 +13227,9 @@
|
|
|
13314
13227
|
this.frameTarget.addEventListener("turbo:fetch-request-error", this.frameFailed);
|
|
13315
13228
|
}
|
|
13316
13229
|
disconnect() {
|
|
13317
|
-
if (this.hasRefreshButtonTarget)
|
|
13318
|
-
|
|
13319
|
-
if (this.
|
|
13320
|
-
this.backButtonTarget.removeEventListener("click", this.backButtonClicked);
|
|
13321
|
-
if (this.hasHomeButtonTarget)
|
|
13322
|
-
this.homeButtonTarget.removeEventListener("click", this.homeButtonClicked);
|
|
13230
|
+
if (this.hasRefreshButtonTarget) this.refreshButtonTarget.removeEventListener("click", this.refreshButtonClicked);
|
|
13231
|
+
if (this.hasBackButtonTarget) this.backButtonTarget.removeEventListener("click", this.backButtonClicked);
|
|
13232
|
+
if (this.hasHomeButtonTarget) this.homeButtonTarget.removeEventListener("click", this.homeButtonClicked);
|
|
13323
13233
|
this.frameTarget.removeEventListener("turbo:frame-load", this.frameLoaded);
|
|
13324
13234
|
this.frameTarget.removeEventListener("turbo:click", this.frameLoading);
|
|
13325
13235
|
this.frameTarget.removeEventListener("turbo:submit-start", this.frameLoading);
|
|
@@ -13329,8 +13239,7 @@
|
|
|
13329
13239
|
if (event) {
|
|
13330
13240
|
const trigger = event.target.closest("a, form");
|
|
13331
13241
|
const requested = trigger?.dataset?.turboFrame;
|
|
13332
|
-
if (requested && requested !== this.frameTarget.id)
|
|
13333
|
-
return;
|
|
13242
|
+
if (requested && requested !== this.frameTarget.id) return;
|
|
13334
13243
|
}
|
|
13335
13244
|
this.#loadingStarted();
|
|
13336
13245
|
}
|
|
@@ -13374,17 +13283,14 @@
|
|
|
13374
13283
|
this.srcHistory.push(src);
|
|
13375
13284
|
}
|
|
13376
13285
|
this.#updateNavigationButtonsDisplay();
|
|
13377
|
-
if (this.hasMaximizeLinkTarget)
|
|
13378
|
-
this.maximizeLinkTarget.href = src;
|
|
13286
|
+
if (this.hasMaximizeLinkTarget) this.maximizeLinkTarget.href = src;
|
|
13379
13287
|
}
|
|
13380
13288
|
#loadingStarted() {
|
|
13381
|
-
if (this.hasRefreshButtonTarget)
|
|
13382
|
-
this.refreshButtonTarget.classList.add("motion-safe:animate-spin");
|
|
13289
|
+
if (this.hasRefreshButtonTarget) this.refreshButtonTarget.classList.add("motion-safe:animate-spin");
|
|
13383
13290
|
this.frameTarget.classList.add("motion-safe:animate-pulse");
|
|
13384
13291
|
}
|
|
13385
13292
|
#loadingStopped() {
|
|
13386
|
-
if (this.hasRefreshButtonTarget)
|
|
13387
|
-
this.refreshButtonTarget.classList.remove("motion-safe:animate-spin");
|
|
13293
|
+
if (this.hasRefreshButtonTarget) this.refreshButtonTarget.classList.remove("motion-safe:animate-spin");
|
|
13388
13294
|
this.frameTarget.classList.remove("motion-safe:animate-pulse");
|
|
13389
13295
|
}
|
|
13390
13296
|
#updateNavigationButtonsDisplay() {
|
|
@@ -13404,21 +13310,18 @@
|
|
|
13404
13310
|
connect() {
|
|
13405
13311
|
this.applyMode(this.readMode());
|
|
13406
13312
|
this.handleStorageChange = (e4) => {
|
|
13407
|
-
if (e4.key === "theme")
|
|
13408
|
-
this.applyMode(this.readMode());
|
|
13313
|
+
if (e4.key === "theme") this.applyMode(this.readMode());
|
|
13409
13314
|
};
|
|
13410
13315
|
window.addEventListener("storage", this.handleStorageChange);
|
|
13411
13316
|
this.mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
13412
13317
|
this.handleMqChange = () => {
|
|
13413
|
-
if (this.readMode() === "auto")
|
|
13414
|
-
this.applyMode("auto");
|
|
13318
|
+
if (this.readMode() === "auto") this.applyMode("auto");
|
|
13415
13319
|
};
|
|
13416
13320
|
this.mq.addEventListener("change", this.handleMqChange);
|
|
13417
13321
|
}
|
|
13418
13322
|
disconnect() {
|
|
13419
13323
|
window.removeEventListener("storage", this.handleStorageChange);
|
|
13420
|
-
if (this.mq)
|
|
13421
|
-
this.mq.removeEventListener("change", this.handleMqChange);
|
|
13324
|
+
if (this.mq) this.mq.removeEventListener("change", this.handleMqChange);
|
|
13422
13325
|
}
|
|
13423
13326
|
toggleMode() {
|
|
13424
13327
|
const current = this.readMode();
|
|
@@ -13440,8 +13343,7 @@
|
|
|
13440
13343
|
return ORDER.includes(saved) ? saved : "auto";
|
|
13441
13344
|
}
|
|
13442
13345
|
effectiveMode(mode) {
|
|
13443
|
-
if (mode === "light" || mode === "dark")
|
|
13444
|
-
return mode;
|
|
13346
|
+
if (mode === "light" || mode === "dark") return mode;
|
|
13445
13347
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
13446
13348
|
}
|
|
13447
13349
|
toggleIcons(mode) {
|
|
@@ -13451,30 +13353,64 @@
|
|
|
13451
13353
|
dark: this.element.querySelector(".color-mode-icon-dark")
|
|
13452
13354
|
};
|
|
13453
13355
|
for (const [key, el] of Object.entries(icons)) {
|
|
13454
|
-
if (!el)
|
|
13455
|
-
continue;
|
|
13356
|
+
if (!el) continue;
|
|
13456
13357
|
el.classList.toggle("hidden", key !== mode);
|
|
13457
13358
|
}
|
|
13458
13359
|
}
|
|
13459
13360
|
};
|
|
13460
13361
|
|
|
13461
13362
|
// node_modules/dompurify/dist/purify.es.mjs
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13363
|
+
function _arrayLikeToArray(r4, a4) {
|
|
13364
|
+
(null == a4 || a4 > r4.length) && (a4 = r4.length);
|
|
13365
|
+
for (var e4 = 0, n3 = Array(a4); e4 < a4; e4++) n3[e4] = r4[e4];
|
|
13366
|
+
return n3;
|
|
13367
|
+
}
|
|
13368
|
+
function _arrayWithHoles(r4) {
|
|
13369
|
+
if (Array.isArray(r4)) return r4;
|
|
13370
|
+
}
|
|
13371
|
+
function _iterableToArrayLimit(r4, l4) {
|
|
13372
|
+
var t4 = null == r4 ? null : "undefined" != typeof Symbol && r4[Symbol.iterator] || r4["@@iterator"];
|
|
13373
|
+
if (null != t4) {
|
|
13374
|
+
var e4, n3, i4, u5, a4 = [], f5 = true, o4 = false;
|
|
13375
|
+
try {
|
|
13376
|
+
if (i4 = (t4 = t4.call(r4)).next, 0 === l4) ;
|
|
13377
|
+
else for (; !(f5 = (e4 = i4.call(t4)).done) && (a4.push(e4.value), a4.length !== l4); f5 = true) ;
|
|
13378
|
+
} catch (r5) {
|
|
13379
|
+
o4 = true, n3 = r5;
|
|
13380
|
+
} finally {
|
|
13381
|
+
try {
|
|
13382
|
+
if (!f5 && null != t4.return && (u5 = t4.return(), Object(u5) !== u5)) return;
|
|
13383
|
+
} finally {
|
|
13384
|
+
if (o4) throw n3;
|
|
13385
|
+
}
|
|
13386
|
+
}
|
|
13387
|
+
return a4;
|
|
13388
|
+
}
|
|
13389
|
+
}
|
|
13390
|
+
function _nonIterableRest() {
|
|
13391
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13392
|
+
}
|
|
13393
|
+
function _slicedToArray(r4, e4) {
|
|
13394
|
+
return _arrayWithHoles(r4) || _iterableToArrayLimit(r4, e4) || _unsupportedIterableToArray(r4, e4) || _nonIterableRest();
|
|
13395
|
+
}
|
|
13396
|
+
function _unsupportedIterableToArray(r4, a4) {
|
|
13397
|
+
if (r4) {
|
|
13398
|
+
if ("string" == typeof r4) return _arrayLikeToArray(r4, a4);
|
|
13399
|
+
var t4 = {}.toString.call(r4).slice(8, -1);
|
|
13400
|
+
return "Object" === t4 && r4.constructor && (t4 = r4.constructor.name), "Map" === t4 || "Set" === t4 ? Array.from(r4) : "Arguments" === t4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t4) ? _arrayLikeToArray(r4, a4) : void 0;
|
|
13401
|
+
}
|
|
13402
|
+
}
|
|
13403
|
+
var entries = Object.entries;
|
|
13404
|
+
var setPrototypeOf = Object.setPrototypeOf;
|
|
13405
|
+
var isFrozen = Object.isFrozen;
|
|
13406
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
13407
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
13408
|
+
var freeze = Object.freeze;
|
|
13409
|
+
var seal = Object.seal;
|
|
13410
|
+
var create = Object.create;
|
|
13411
|
+
var _ref = typeof Reflect !== "undefined" && Reflect;
|
|
13412
|
+
var apply = _ref.apply;
|
|
13413
|
+
var construct = _ref.construct;
|
|
13478
13414
|
if (!freeze) {
|
|
13479
13415
|
freeze = function freeze2(x4) {
|
|
13480
13416
|
return x4;
|
|
@@ -13506,13 +13442,19 @@
|
|
|
13506
13442
|
var arrayPop = unapply(Array.prototype.pop);
|
|
13507
13443
|
var arrayPush = unapply(Array.prototype.push);
|
|
13508
13444
|
var arraySplice = unapply(Array.prototype.splice);
|
|
13445
|
+
var arrayIsArray = Array.isArray;
|
|
13509
13446
|
var stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
13510
13447
|
var stringToString = unapply(String.prototype.toString);
|
|
13511
13448
|
var stringMatch = unapply(String.prototype.match);
|
|
13512
13449
|
var stringReplace = unapply(String.prototype.replace);
|
|
13513
13450
|
var stringIndexOf = unapply(String.prototype.indexOf);
|
|
13514
13451
|
var stringTrim = unapply(String.prototype.trim);
|
|
13452
|
+
var numberToString = unapply(Number.prototype.toString);
|
|
13453
|
+
var booleanToString = unapply(Boolean.prototype.toString);
|
|
13454
|
+
var bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
|
|
13455
|
+
var symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
|
|
13515
13456
|
var objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
13457
|
+
var objectToString = unapply(Object.prototype.toString);
|
|
13516
13458
|
var regExpTest = unapply(RegExp.prototype.test);
|
|
13517
13459
|
var typeErrorCreate = unconstruct(TypeError);
|
|
13518
13460
|
function unapply(func) {
|
|
@@ -13539,6 +13481,9 @@
|
|
|
13539
13481
|
if (setPrototypeOf) {
|
|
13540
13482
|
setPrototypeOf(set, null);
|
|
13541
13483
|
}
|
|
13484
|
+
if (!arrayIsArray(array)) {
|
|
13485
|
+
return set;
|
|
13486
|
+
}
|
|
13542
13487
|
let l4 = array.length;
|
|
13543
13488
|
while (l4--) {
|
|
13544
13489
|
let element = array[l4];
|
|
@@ -13566,10 +13511,13 @@
|
|
|
13566
13511
|
}
|
|
13567
13512
|
function clone(object) {
|
|
13568
13513
|
const newObject = create(null);
|
|
13569
|
-
for (const
|
|
13514
|
+
for (const _ref2 of entries(object)) {
|
|
13515
|
+
var _ref3 = _slicedToArray(_ref2, 2);
|
|
13516
|
+
const property = _ref3[0];
|
|
13517
|
+
const value = _ref3[1];
|
|
13570
13518
|
const isPropertyExist = objectHasOwnProperty(object, property);
|
|
13571
13519
|
if (isPropertyExist) {
|
|
13572
|
-
if (
|
|
13520
|
+
if (arrayIsArray(value)) {
|
|
13573
13521
|
newObject[property] = cleanArray(value);
|
|
13574
13522
|
} else if (value && typeof value === "object" && value.constructor === Object) {
|
|
13575
13523
|
newObject[property] = clone(value);
|
|
@@ -13580,6 +13528,44 @@
|
|
|
13580
13528
|
}
|
|
13581
13529
|
return newObject;
|
|
13582
13530
|
}
|
|
13531
|
+
function stringifyValue(value) {
|
|
13532
|
+
switch (typeof value) {
|
|
13533
|
+
case "string": {
|
|
13534
|
+
return value;
|
|
13535
|
+
}
|
|
13536
|
+
case "number": {
|
|
13537
|
+
return numberToString(value);
|
|
13538
|
+
}
|
|
13539
|
+
case "boolean": {
|
|
13540
|
+
return booleanToString(value);
|
|
13541
|
+
}
|
|
13542
|
+
case "bigint": {
|
|
13543
|
+
return bigintToString ? bigintToString(value) : "0";
|
|
13544
|
+
}
|
|
13545
|
+
case "symbol": {
|
|
13546
|
+
return symbolToString ? symbolToString(value) : "Symbol()";
|
|
13547
|
+
}
|
|
13548
|
+
case "undefined": {
|
|
13549
|
+
return objectToString(value);
|
|
13550
|
+
}
|
|
13551
|
+
case "function":
|
|
13552
|
+
case "object": {
|
|
13553
|
+
if (value === null) {
|
|
13554
|
+
return objectToString(value);
|
|
13555
|
+
}
|
|
13556
|
+
const valueAsRecord = value;
|
|
13557
|
+
const valueToString = lookupGetter(valueAsRecord, "toString");
|
|
13558
|
+
if (typeof valueToString === "function") {
|
|
13559
|
+
const stringified = valueToString(valueAsRecord);
|
|
13560
|
+
return typeof stringified === "string" ? stringified : objectToString(stringified);
|
|
13561
|
+
}
|
|
13562
|
+
return objectToString(value);
|
|
13563
|
+
}
|
|
13564
|
+
default: {
|
|
13565
|
+
return objectToString(value);
|
|
13566
|
+
}
|
|
13567
|
+
}
|
|
13568
|
+
}
|
|
13583
13569
|
function lookupGetter(object, prop) {
|
|
13584
13570
|
while (object !== null) {
|
|
13585
13571
|
const desc = getOwnPropertyDescriptor(object, prop);
|
|
@@ -13598,6 +13584,14 @@
|
|
|
13598
13584
|
}
|
|
13599
13585
|
return fallbackValue;
|
|
13600
13586
|
}
|
|
13587
|
+
function isRegex(value) {
|
|
13588
|
+
try {
|
|
13589
|
+
regExpTest(value, "");
|
|
13590
|
+
return true;
|
|
13591
|
+
} catch (_unused) {
|
|
13592
|
+
return false;
|
|
13593
|
+
}
|
|
13594
|
+
}
|
|
13601
13595
|
var html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
13602
13596
|
var svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
13603
13597
|
var svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
|
|
@@ -13605,13 +13599,13 @@
|
|
|
13605
13599
|
var mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
|
|
13606
13600
|
var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
13607
13601
|
var text = freeze(["#text"]);
|
|
13608
|
-
var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"
|
|
13602
|
+
var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
|
|
13609
13603
|
var svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
13610
|
-
var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "
|
|
13604
|
+
var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
|
|
13611
13605
|
var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
13612
|
-
var MUSTACHE_EXPR = seal(
|
|
13613
|
-
var ERB_EXPR = seal(/<%[\w\W]
|
|
13614
|
-
var TMPLIT_EXPR = seal(
|
|
13606
|
+
var MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
|
|
13607
|
+
var ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
|
|
13608
|
+
var TMPLIT_EXPR = seal(/\${[\w\W]*/g);
|
|
13615
13609
|
var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
|
|
13616
13610
|
var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
|
|
13617
13611
|
var IS_ALLOWED_URI = seal(
|
|
@@ -13625,35 +13619,13 @@
|
|
|
13625
13619
|
);
|
|
13626
13620
|
var DOCTYPE_NAME = seal(/^html$/i);
|
|
13627
13621
|
var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
13628
|
-
var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
|
|
13629
|
-
__proto__: null,
|
|
13630
|
-
ARIA_ATTR,
|
|
13631
|
-
ATTR_WHITESPACE,
|
|
13632
|
-
CUSTOM_ELEMENT,
|
|
13633
|
-
DATA_ATTR,
|
|
13634
|
-
DOCTYPE_NAME,
|
|
13635
|
-
ERB_EXPR,
|
|
13636
|
-
IS_ALLOWED_URI,
|
|
13637
|
-
IS_SCRIPT_OR_DATA,
|
|
13638
|
-
MUSTACHE_EXPR,
|
|
13639
|
-
TMPLIT_EXPR
|
|
13640
|
-
});
|
|
13641
13622
|
var NODE_TYPE = {
|
|
13642
13623
|
element: 1,
|
|
13643
|
-
attribute: 2,
|
|
13644
13624
|
text: 3,
|
|
13645
|
-
cdataSection: 4,
|
|
13646
|
-
entityReference: 5,
|
|
13647
|
-
// Deprecated
|
|
13648
|
-
entityNode: 6,
|
|
13649
13625
|
// Deprecated
|
|
13650
13626
|
progressingInstruction: 7,
|
|
13651
13627
|
comment: 8,
|
|
13652
|
-
document: 9
|
|
13653
|
-
documentType: 10,
|
|
13654
|
-
documentFragment: 11,
|
|
13655
|
-
notation: 12
|
|
13656
|
-
// Deprecated
|
|
13628
|
+
document: 9
|
|
13657
13629
|
};
|
|
13658
13630
|
var getGlobal = function getGlobal2() {
|
|
13659
13631
|
return typeof window === "undefined" ? null : window;
|
|
@@ -13698,28 +13670,16 @@
|
|
|
13698
13670
|
function createDOMPurify() {
|
|
13699
13671
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
13700
13672
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
13701
|
-
DOMPurify.version = "3.3
|
|
13673
|
+
DOMPurify.version = "3.4.3";
|
|
13702
13674
|
DOMPurify.removed = [];
|
|
13703
13675
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
13704
13676
|
DOMPurify.isSupported = false;
|
|
13705
13677
|
return DOMPurify;
|
|
13706
13678
|
}
|
|
13707
|
-
let
|
|
13708
|
-
document: document2
|
|
13709
|
-
} = window2;
|
|
13679
|
+
let document2 = window2.document;
|
|
13710
13680
|
const originalDocument = document2;
|
|
13711
13681
|
const currentScript = originalDocument.currentScript;
|
|
13712
|
-
const
|
|
13713
|
-
DocumentFragment,
|
|
13714
|
-
HTMLTemplateElement: HTMLTemplateElement2,
|
|
13715
|
-
Node: Node2,
|
|
13716
|
-
Element: Element2,
|
|
13717
|
-
NodeFilter,
|
|
13718
|
-
NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
|
|
13719
|
-
HTMLFormElement: HTMLFormElement2,
|
|
13720
|
-
DOMParser: DOMParser2,
|
|
13721
|
-
trustedTypes
|
|
13722
|
-
} = window2;
|
|
13682
|
+
const DocumentFragment = window2.DocumentFragment, HTMLTemplateElement2 = window2.HTMLTemplateElement, Node2 = window2.Node, Element2 = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement2 = window2.HTMLFormElement, DOMParser2 = window2.DOMParser, trustedTypes = window2.trustedTypes;
|
|
13723
13683
|
const ElementPrototype = Element2.prototype;
|
|
13724
13684
|
const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
|
|
13725
13685
|
const remove = lookupGetter(ElementPrototype, "remove");
|
|
@@ -13734,30 +13694,12 @@
|
|
|
13734
13694
|
}
|
|
13735
13695
|
let trustedTypesPolicy;
|
|
13736
13696
|
let emptyHTML = "";
|
|
13737
|
-
const
|
|
13738
|
-
|
|
13739
|
-
createNodeIterator,
|
|
13740
|
-
createDocumentFragment: createDocumentFragment2,
|
|
13741
|
-
getElementsByTagName
|
|
13742
|
-
} = document2;
|
|
13743
|
-
const {
|
|
13744
|
-
importNode
|
|
13745
|
-
} = originalDocument;
|
|
13697
|
+
const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment2 = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
|
|
13698
|
+
const importNode = originalDocument.importNode;
|
|
13746
13699
|
let hooks = _createHooksMap();
|
|
13747
13700
|
DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode2 === "function" && implementation && implementation.createHTMLDocument !== void 0;
|
|
13748
|
-
const
|
|
13749
|
-
|
|
13750
|
-
ERB_EXPR: ERB_EXPR2,
|
|
13751
|
-
TMPLIT_EXPR: TMPLIT_EXPR2,
|
|
13752
|
-
DATA_ATTR: DATA_ATTR2,
|
|
13753
|
-
ARIA_ATTR: ARIA_ATTR2,
|
|
13754
|
-
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
|
|
13755
|
-
ATTR_WHITESPACE: ATTR_WHITESPACE2,
|
|
13756
|
-
CUSTOM_ELEMENT: CUSTOM_ELEMENT2
|
|
13757
|
-
} = EXPRESSIONS;
|
|
13758
|
-
let {
|
|
13759
|
-
IS_ALLOWED_URI: IS_ALLOWED_URI$1
|
|
13760
|
-
} = EXPRESSIONS;
|
|
13701
|
+
const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
|
|
13702
|
+
let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
|
|
13761
13703
|
let ALLOWED_TAGS = null;
|
|
13762
13704
|
const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
|
|
13763
13705
|
let ALLOWED_ATTR = null;
|
|
@@ -13853,15 +13795,15 @@
|
|
|
13853
13795
|
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
|
|
13854
13796
|
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
13855
13797
|
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
|
|
13856
|
-
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
13857
|
-
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
13858
|
-
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
13859
|
-
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
13860
|
-
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
13861
|
-
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
13862
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
13863
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
13864
|
-
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
|
|
13798
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
13799
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
13800
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
13801
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
13802
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
13803
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
13804
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
13805
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
13806
|
+
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
13865
13807
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
13866
13808
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
13867
13809
|
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
|
|
@@ -13877,19 +13819,20 @@
|
|
|
13877
13819
|
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
|
|
13878
13820
|
KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
|
|
13879
13821
|
IN_PLACE = cfg.IN_PLACE || false;
|
|
13880
|
-
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP
|
|
13881
|
-
NAMESPACE = cfg.NAMESPACE
|
|
13882
|
-
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS
|
|
13883
|
-
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13822
|
+
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
|
|
13823
|
+
NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
|
|
13824
|
+
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
|
|
13825
|
+
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
|
|
13826
|
+
const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
13827
|
+
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
13828
|
+
if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
13829
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
|
|
13887
13830
|
}
|
|
13888
|
-
if (
|
|
13889
|
-
CUSTOM_ELEMENT_HANDLING.attributeNameCheck =
|
|
13831
|
+
if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
|
|
13832
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
|
|
13890
13833
|
}
|
|
13891
|
-
if (
|
|
13892
|
-
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =
|
|
13834
|
+
if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
|
|
13835
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
|
|
13893
13836
|
}
|
|
13894
13837
|
if (SAFE_FOR_TEMPLATES) {
|
|
13895
13838
|
ALLOW_DATA_ATTR = false;
|
|
@@ -13899,7 +13842,7 @@
|
|
|
13899
13842
|
}
|
|
13900
13843
|
if (USE_PROFILES) {
|
|
13901
13844
|
ALLOWED_TAGS = addToSet({}, text);
|
|
13902
|
-
ALLOWED_ATTR =
|
|
13845
|
+
ALLOWED_ATTR = create(null);
|
|
13903
13846
|
if (USE_PROFILES.html === true) {
|
|
13904
13847
|
addToSet(ALLOWED_TAGS, html$1);
|
|
13905
13848
|
addToSet(ALLOWED_ATTR, html);
|
|
@@ -13920,36 +13863,38 @@
|
|
|
13920
13863
|
addToSet(ALLOWED_ATTR, xml);
|
|
13921
13864
|
}
|
|
13922
13865
|
}
|
|
13923
|
-
|
|
13866
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = null;
|
|
13867
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
13868
|
+
if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
|
|
13924
13869
|
if (typeof cfg.ADD_TAGS === "function") {
|
|
13925
13870
|
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
13926
|
-
} else {
|
|
13871
|
+
} else if (arrayIsArray(cfg.ADD_TAGS)) {
|
|
13927
13872
|
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
13928
13873
|
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
13929
13874
|
}
|
|
13930
13875
|
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
13931
13876
|
}
|
|
13932
13877
|
}
|
|
13933
|
-
if (cfg
|
|
13878
|
+
if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
|
|
13934
13879
|
if (typeof cfg.ADD_ATTR === "function") {
|
|
13935
13880
|
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
13936
|
-
} else {
|
|
13881
|
+
} else if (arrayIsArray(cfg.ADD_ATTR)) {
|
|
13937
13882
|
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
13938
13883
|
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
13939
13884
|
}
|
|
13940
13885
|
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
13941
13886
|
}
|
|
13942
13887
|
}
|
|
13943
|
-
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
13888
|
+
if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
|
|
13944
13889
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
13945
13890
|
}
|
|
13946
|
-
if (cfg.FORBID_CONTENTS) {
|
|
13891
|
+
if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
|
|
13947
13892
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
13948
13893
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
13949
13894
|
}
|
|
13950
13895
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
13951
13896
|
}
|
|
13952
|
-
if (cfg.ADD_FORBID_CONTENTS) {
|
|
13897
|
+
if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
|
|
13953
13898
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
13954
13899
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
13955
13900
|
}
|
|
@@ -14142,6 +14087,10 @@
|
|
|
14142
14087
|
_forceRemove(currentNode);
|
|
14143
14088
|
return true;
|
|
14144
14089
|
}
|
|
14090
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
|
|
14091
|
+
_forceRemove(currentNode);
|
|
14092
|
+
return true;
|
|
14093
|
+
}
|
|
14145
14094
|
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
14146
14095
|
_forceRemove(currentNode);
|
|
14147
14096
|
return true;
|
|
@@ -14150,7 +14099,7 @@
|
|
|
14150
14099
|
_forceRemove(currentNode);
|
|
14151
14100
|
return true;
|
|
14152
14101
|
}
|
|
14153
|
-
if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) &&
|
|
14102
|
+
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
14154
14103
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
14155
14104
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
14156
14105
|
return false;
|
|
@@ -14164,9 +14113,8 @@
|
|
|
14164
14113
|
const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
|
14165
14114
|
if (childNodes && parentNode) {
|
|
14166
14115
|
const childCount = childNodes.length;
|
|
14167
|
-
for (let
|
|
14168
|
-
const childClone = cloneNode(childNodes[
|
|
14169
|
-
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
14116
|
+
for (let i4 = childCount - 1; i4 >= 0; --i4) {
|
|
14117
|
+
const childClone = cloneNode(childNodes[i4], true);
|
|
14170
14118
|
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
14171
14119
|
}
|
|
14172
14120
|
}
|
|
@@ -14184,7 +14132,7 @@
|
|
|
14184
14132
|
}
|
|
14185
14133
|
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
14186
14134
|
content = currentNode.textContent;
|
|
14187
|
-
arrayForEach([
|
|
14135
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
14188
14136
|
content = stringReplace(content, expr, " ");
|
|
14189
14137
|
});
|
|
14190
14138
|
if (currentNode.textContent !== content) {
|
|
@@ -14198,16 +14146,16 @@
|
|
|
14198
14146
|
return false;
|
|
14199
14147
|
};
|
|
14200
14148
|
const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
|
|
14149
|
+
if (FORBID_ATTR[lcName]) {
|
|
14150
|
+
return false;
|
|
14151
|
+
}
|
|
14201
14152
|
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
|
|
14202
14153
|
return false;
|
|
14203
14154
|
}
|
|
14204
|
-
|
|
14205
|
-
|
|
14206
|
-
else if (ALLOW_ARIA_ATTR && regExpTest(
|
|
14207
|
-
|
|
14208
|
-
else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag))
|
|
14209
|
-
;
|
|
14210
|
-
else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
14155
|
+
const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
|
|
14156
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
|
|
14157
|
+
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
|
|
14158
|
+
else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
|
|
14211
14159
|
if (
|
|
14212
14160
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
14213
14161
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
@@ -14215,33 +14163,26 @@
|
|
|
14215
14163
|
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
14216
14164
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
14217
14165
|
lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
|
|
14218
|
-
)
|
|
14219
|
-
;
|
|
14166
|
+
) ;
|
|
14220
14167
|
else {
|
|
14221
14168
|
return false;
|
|
14222
14169
|
}
|
|
14223
|
-
} else if (URI_SAFE_ATTRIBUTES[lcName])
|
|
14224
|
-
|
|
14225
|
-
else if (
|
|
14226
|
-
|
|
14227
|
-
else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag])
|
|
14228
|
-
;
|
|
14229
|
-
else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, "")))
|
|
14230
|
-
;
|
|
14170
|
+
} else if (URI_SAFE_ATTRIBUTES[lcName]) ;
|
|
14171
|
+
else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
|
|
14172
|
+
else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
|
|
14173
|
+
else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
|
|
14231
14174
|
else if (value) {
|
|
14232
14175
|
return false;
|
|
14233
|
-
} else
|
|
14234
|
-
;
|
|
14176
|
+
} else ;
|
|
14235
14177
|
return true;
|
|
14236
14178
|
};
|
|
14179
|
+
const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
|
|
14237
14180
|
const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
|
|
14238
|
-
return tagName
|
|
14181
|
+
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
|
|
14239
14182
|
};
|
|
14240
14183
|
const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
|
|
14241
14184
|
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
14242
|
-
const
|
|
14243
|
-
attributes
|
|
14244
|
-
} = currentNode;
|
|
14185
|
+
const attributes = currentNode.attributes;
|
|
14245
14186
|
if (!attributes || _isClobbered(currentNode)) {
|
|
14246
14187
|
return;
|
|
14247
14188
|
}
|
|
@@ -14255,11 +14196,7 @@
|
|
|
14255
14196
|
let l4 = attributes.length;
|
|
14256
14197
|
while (l4--) {
|
|
14257
14198
|
const attr = attributes[l4];
|
|
14258
|
-
const
|
|
14259
|
-
name,
|
|
14260
|
-
namespaceURI,
|
|
14261
|
-
value: attrValue
|
|
14262
|
-
} = attr;
|
|
14199
|
+
const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
|
|
14263
14200
|
const lcName = transformCaseFunc(name);
|
|
14264
14201
|
const initValue = attrValue;
|
|
14265
14202
|
let value = name === "value" ? initValue : stringTrim(initValue);
|
|
@@ -14269,11 +14206,11 @@
|
|
|
14269
14206
|
hookEvent.forceKeepAttr = void 0;
|
|
14270
14207
|
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
14271
14208
|
value = hookEvent.attrValue;
|
|
14272
|
-
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
|
|
14209
|
+
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
|
|
14273
14210
|
_removeAttribute(name, currentNode);
|
|
14274
14211
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
14275
14212
|
}
|
|
14276
|
-
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
|
|
14213
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
|
|
14277
14214
|
_removeAttribute(name, currentNode);
|
|
14278
14215
|
continue;
|
|
14279
14216
|
}
|
|
@@ -14293,7 +14230,7 @@
|
|
|
14293
14230
|
continue;
|
|
14294
14231
|
}
|
|
14295
14232
|
if (SAFE_FOR_TEMPLATES) {
|
|
14296
|
-
arrayForEach([
|
|
14233
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
14297
14234
|
value = stringReplace(value, expr, " ");
|
|
14298
14235
|
});
|
|
14299
14236
|
}
|
|
@@ -14303,8 +14240,7 @@
|
|
|
14303
14240
|
continue;
|
|
14304
14241
|
}
|
|
14305
14242
|
if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
|
|
14306
|
-
if (namespaceURI)
|
|
14307
|
-
;
|
|
14243
|
+
if (namespaceURI) ;
|
|
14308
14244
|
else {
|
|
14309
14245
|
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
14310
14246
|
case "TrustedHTML": {
|
|
@@ -14337,7 +14273,7 @@
|
|
|
14337
14273
|
}
|
|
14338
14274
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
14339
14275
|
};
|
|
14340
|
-
const
|
|
14276
|
+
const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
|
|
14341
14277
|
let shadowNode = null;
|
|
14342
14278
|
const shadowIterator = _createNodeIterator(fragment);
|
|
14343
14279
|
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
@@ -14351,6 +14287,24 @@
|
|
|
14351
14287
|
}
|
|
14352
14288
|
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
|
14353
14289
|
};
|
|
14290
|
+
const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root) {
|
|
14291
|
+
if (root.nodeType === NODE_TYPE.element && root.shadowRoot instanceof DocumentFragment) {
|
|
14292
|
+
const sr = root.shadowRoot;
|
|
14293
|
+
_sanitizeAttachedShadowRoots2(sr);
|
|
14294
|
+
_sanitizeShadowDOM2(sr);
|
|
14295
|
+
}
|
|
14296
|
+
const childNodes = root.childNodes;
|
|
14297
|
+
if (!childNodes) {
|
|
14298
|
+
return;
|
|
14299
|
+
}
|
|
14300
|
+
const snapshot = [];
|
|
14301
|
+
arrayForEach(childNodes, (child) => {
|
|
14302
|
+
arrayPush(snapshot, child);
|
|
14303
|
+
});
|
|
14304
|
+
for (const child of snapshot) {
|
|
14305
|
+
_sanitizeAttachedShadowRoots2(child);
|
|
14306
|
+
}
|
|
14307
|
+
};
|
|
14354
14308
|
DOMPurify.sanitize = function(dirty) {
|
|
14355
14309
|
let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
14356
14310
|
let body = null;
|
|
@@ -14362,13 +14316,9 @@
|
|
|
14362
14316
|
dirty = "<!-->";
|
|
14363
14317
|
}
|
|
14364
14318
|
if (typeof dirty !== "string" && !_isNode(dirty)) {
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
throw typeErrorCreate("dirty is not a string, aborting");
|
|
14369
|
-
}
|
|
14370
|
-
} else {
|
|
14371
|
-
throw typeErrorCreate("toString is not a function");
|
|
14319
|
+
dirty = stringifyValue(dirty);
|
|
14320
|
+
if (typeof dirty !== "string") {
|
|
14321
|
+
throw typeErrorCreate("dirty is not a string, aborting");
|
|
14372
14322
|
}
|
|
14373
14323
|
}
|
|
14374
14324
|
if (!DOMPurify.isSupported) {
|
|
@@ -14382,12 +14332,14 @@
|
|
|
14382
14332
|
IN_PLACE = false;
|
|
14383
14333
|
}
|
|
14384
14334
|
if (IN_PLACE) {
|
|
14385
|
-
|
|
14386
|
-
|
|
14335
|
+
const nn2 = dirty.nodeName;
|
|
14336
|
+
if (typeof nn2 === "string") {
|
|
14337
|
+
const tagName = transformCaseFunc(nn2);
|
|
14387
14338
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
14388
14339
|
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
14389
14340
|
}
|
|
14390
14341
|
}
|
|
14342
|
+
_sanitizeAttachedShadowRoots2(dirty);
|
|
14391
14343
|
} else if (dirty instanceof Node2) {
|
|
14392
14344
|
body = _initDocument("<!---->");
|
|
14393
14345
|
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
@@ -14398,6 +14350,7 @@
|
|
|
14398
14350
|
} else {
|
|
14399
14351
|
body.appendChild(importedNode);
|
|
14400
14352
|
}
|
|
14353
|
+
_sanitizeAttachedShadowRoots2(importedNode);
|
|
14401
14354
|
} else {
|
|
14402
14355
|
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
|
|
14403
14356
|
dirty.indexOf("<") === -1) {
|
|
@@ -14416,13 +14369,21 @@
|
|
|
14416
14369
|
_sanitizeElements(currentNode);
|
|
14417
14370
|
_sanitizeAttributes(currentNode);
|
|
14418
14371
|
if (currentNode.content instanceof DocumentFragment) {
|
|
14419
|
-
|
|
14372
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
14420
14373
|
}
|
|
14421
14374
|
}
|
|
14422
14375
|
if (IN_PLACE) {
|
|
14423
14376
|
return dirty;
|
|
14424
14377
|
}
|
|
14425
14378
|
if (RETURN_DOM) {
|
|
14379
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
14380
|
+
body.normalize();
|
|
14381
|
+
let html3 = body.innerHTML;
|
|
14382
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
14383
|
+
html3 = stringReplace(html3, expr, " ");
|
|
14384
|
+
});
|
|
14385
|
+
body.innerHTML = html3;
|
|
14386
|
+
}
|
|
14426
14387
|
if (RETURN_DOM_FRAGMENT) {
|
|
14427
14388
|
returnNode = createDocumentFragment2.call(body.ownerDocument);
|
|
14428
14389
|
while (body.firstChild) {
|
|
@@ -14441,7 +14402,7 @@
|
|
|
14441
14402
|
serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
|
|
14442
14403
|
}
|
|
14443
14404
|
if (SAFE_FOR_TEMPLATES) {
|
|
14444
|
-
arrayForEach([
|
|
14405
|
+
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
|
|
14445
14406
|
serializedHTML = stringReplace(serializedHTML, expr, " ");
|
|
14446
14407
|
});
|
|
14447
14408
|
}
|
|
@@ -14751,7 +14712,7 @@
|
|
|
14751
14712
|
return " |";
|
|
14752
14713
|
}
|
|
14753
14714
|
}), cells = row.split(other.splitPipe);
|
|
14754
|
-
let
|
|
14715
|
+
let i4 = 0;
|
|
14755
14716
|
if (!cells[0].trim()) {
|
|
14756
14717
|
cells.shift();
|
|
14757
14718
|
}
|
|
@@ -14766,8 +14727,8 @@
|
|
|
14766
14727
|
cells.push("");
|
|
14767
14728
|
}
|
|
14768
14729
|
}
|
|
14769
|
-
for (;
|
|
14770
|
-
cells[
|
|
14730
|
+
for (; i4 < cells.length; i4++) {
|
|
14731
|
+
cells[i4] = cells[i4].trim().replace(other.slashPipe, "|");
|
|
14771
14732
|
}
|
|
14772
14733
|
return cells;
|
|
14773
14734
|
}
|
|
@@ -14792,15 +14753,15 @@
|
|
|
14792
14753
|
return -1;
|
|
14793
14754
|
}
|
|
14794
14755
|
let level = 0;
|
|
14795
|
-
for (let
|
|
14796
|
-
if (str[
|
|
14797
|
-
|
|
14798
|
-
} else if (str[
|
|
14756
|
+
for (let i4 = 0; i4 < str.length; i4++) {
|
|
14757
|
+
if (str[i4] === "\\") {
|
|
14758
|
+
i4++;
|
|
14759
|
+
} else if (str[i4] === b3[0]) {
|
|
14799
14760
|
level++;
|
|
14800
|
-
} else if (str[
|
|
14761
|
+
} else if (str[i4] === b3[1]) {
|
|
14801
14762
|
level--;
|
|
14802
14763
|
if (level < 0) {
|
|
14803
|
-
return
|
|
14764
|
+
return i4;
|
|
14804
14765
|
}
|
|
14805
14766
|
}
|
|
14806
14767
|
}
|
|
@@ -14932,18 +14893,18 @@
|
|
|
14932
14893
|
while (lines.length > 0) {
|
|
14933
14894
|
let inBlockquote = false;
|
|
14934
14895
|
const currentLines = [];
|
|
14935
|
-
let
|
|
14936
|
-
for (
|
|
14937
|
-
if (this.rules.other.blockquoteStart.test(lines[
|
|
14938
|
-
currentLines.push(lines[
|
|
14896
|
+
let i4;
|
|
14897
|
+
for (i4 = 0; i4 < lines.length; i4++) {
|
|
14898
|
+
if (this.rules.other.blockquoteStart.test(lines[i4])) {
|
|
14899
|
+
currentLines.push(lines[i4]);
|
|
14939
14900
|
inBlockquote = true;
|
|
14940
14901
|
} else if (!inBlockquote) {
|
|
14941
|
-
currentLines.push(lines[
|
|
14902
|
+
currentLines.push(lines[i4]);
|
|
14942
14903
|
} else {
|
|
14943
14904
|
break;
|
|
14944
14905
|
}
|
|
14945
14906
|
}
|
|
14946
|
-
lines = lines.slice(
|
|
14907
|
+
lines = lines.slice(i4);
|
|
14947
14908
|
const currentRaw = currentLines.join("\n");
|
|
14948
14909
|
const currentText = currentRaw.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
14949
14910
|
raw = raw ? `${raw}
|
|
@@ -15132,18 +15093,18 @@ ${currentText}` : currentText;
|
|
|
15132
15093
|
return;
|
|
15133
15094
|
}
|
|
15134
15095
|
list2.raw = list2.raw.trimEnd();
|
|
15135
|
-
for (let
|
|
15096
|
+
for (let i4 = 0; i4 < list2.items.length; i4++) {
|
|
15136
15097
|
this.lexer.state.top = false;
|
|
15137
|
-
list2.items[
|
|
15098
|
+
list2.items[i4].tokens = this.lexer.blockTokens(list2.items[i4].text, []);
|
|
15138
15099
|
if (!list2.loose) {
|
|
15139
|
-
const spacers = list2.items[
|
|
15100
|
+
const spacers = list2.items[i4].tokens.filter((t4) => t4.type === "space");
|
|
15140
15101
|
const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t4) => this.rules.other.anyLine.test(t4.raw));
|
|
15141
15102
|
list2.loose = hasMultipleLineBreaks;
|
|
15142
15103
|
}
|
|
15143
15104
|
}
|
|
15144
15105
|
if (list2.loose) {
|
|
15145
|
-
for (let
|
|
15146
|
-
list2.items[
|
|
15106
|
+
for (let i4 = 0; i4 < list2.items.length; i4++) {
|
|
15107
|
+
list2.items[i4].loose = true;
|
|
15147
15108
|
}
|
|
15148
15109
|
}
|
|
15149
15110
|
return list2;
|
|
@@ -15209,21 +15170,21 @@ ${currentText}` : currentText;
|
|
|
15209
15170
|
item.align.push(null);
|
|
15210
15171
|
}
|
|
15211
15172
|
}
|
|
15212
|
-
for (let
|
|
15173
|
+
for (let i4 = 0; i4 < headers.length; i4++) {
|
|
15213
15174
|
item.header.push({
|
|
15214
|
-
text: headers[
|
|
15215
|
-
tokens: this.lexer.inline(headers[
|
|
15175
|
+
text: headers[i4],
|
|
15176
|
+
tokens: this.lexer.inline(headers[i4]),
|
|
15216
15177
|
header: true,
|
|
15217
|
-
align: item.align[
|
|
15178
|
+
align: item.align[i4]
|
|
15218
15179
|
});
|
|
15219
15180
|
}
|
|
15220
15181
|
for (const row of rows) {
|
|
15221
|
-
item.rows.push(splitCells(row, item.header.length).map((cell,
|
|
15182
|
+
item.rows.push(splitCells(row, item.header.length).map((cell, i4) => {
|
|
15222
15183
|
return {
|
|
15223
15184
|
text: cell,
|
|
15224
15185
|
tokens: this.lexer.inline(cell),
|
|
15225
15186
|
header: false,
|
|
15226
|
-
align: item.align[
|
|
15187
|
+
align: item.align[i4]
|
|
15227
15188
|
};
|
|
15228
15189
|
}));
|
|
15229
15190
|
}
|
|
@@ -15589,8 +15550,8 @@ ${currentText}` : currentText;
|
|
|
15589
15550
|
lex(src) {
|
|
15590
15551
|
src = src.replace(other.carriageReturn, "\n");
|
|
15591
15552
|
this.blockTokens(src, this.tokens);
|
|
15592
|
-
for (let
|
|
15593
|
-
const next = this.inlineQueue[
|
|
15553
|
+
for (let i4 = 0; i4 < this.inlineQueue.length; i4++) {
|
|
15554
|
+
const next = this.inlineQueue[i4];
|
|
15594
15555
|
this.inlineTokens(next.src, next.tokens);
|
|
15595
15556
|
}
|
|
15596
15557
|
this.inlineQueue = [];
|
|
@@ -16109,8 +16070,8 @@ ${text2}</tr>
|
|
|
16109
16070
|
*/
|
|
16110
16071
|
parse(tokens, top2 = true) {
|
|
16111
16072
|
let out = "";
|
|
16112
|
-
for (let
|
|
16113
|
-
const anyToken = tokens[
|
|
16073
|
+
for (let i4 = 0; i4 < tokens.length; i4++) {
|
|
16074
|
+
const anyToken = tokens[i4];
|
|
16114
16075
|
if (this.options.extensions?.renderers?.[anyToken.type]) {
|
|
16115
16076
|
const genericToken = anyToken;
|
|
16116
16077
|
const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
|
|
@@ -16160,8 +16121,8 @@ ${text2}</tr>
|
|
|
16160
16121
|
case "text": {
|
|
16161
16122
|
let textToken = token;
|
|
16162
16123
|
let body = this.renderer.text(textToken);
|
|
16163
|
-
while (
|
|
16164
|
-
textToken = tokens[++
|
|
16124
|
+
while (i4 + 1 < tokens.length && tokens[i4 + 1].type === "text") {
|
|
16125
|
+
textToken = tokens[++i4];
|
|
16165
16126
|
body += "\n" + this.renderer.text(textToken);
|
|
16166
16127
|
}
|
|
16167
16128
|
if (top2) {
|
|
@@ -16194,8 +16155,8 @@ ${text2}</tr>
|
|
|
16194
16155
|
*/
|
|
16195
16156
|
parseInline(tokens, renderer = this.renderer) {
|
|
16196
16157
|
let out = "";
|
|
16197
|
-
for (let
|
|
16198
|
-
const anyToken = tokens[
|
|
16158
|
+
for (let i4 = 0; i4 < tokens.length; i4++) {
|
|
16159
|
+
const anyToken = tokens[i4];
|
|
16199
16160
|
if (this.options.extensions?.renderers?.[anyToken.type]) {
|
|
16200
16161
|
const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
|
|
16201
16162
|
if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
|
|
@@ -16620,8 +16581,7 @@ ${text2}</tr>
|
|
|
16620
16581
|
var easymde_controller_default = class extends Controller {
|
|
16621
16582
|
static targets = ["textarea"];
|
|
16622
16583
|
connect() {
|
|
16623
|
-
if (this.easyMDE)
|
|
16624
|
-
return;
|
|
16584
|
+
if (this.easyMDE) return;
|
|
16625
16585
|
this.originalValue = this.element.value;
|
|
16626
16586
|
this.easyMDE = new EasyMDE(this.#buildOptions());
|
|
16627
16587
|
this.element.addEventListener("turbo:before-morph-element", (event) => {
|
|
@@ -16648,8 +16608,7 @@ ${text2}</tr>
|
|
|
16648
16608
|
}
|
|
16649
16609
|
}
|
|
16650
16610
|
#handleMorph() {
|
|
16651
|
-
if (!this.element.isConnected)
|
|
16652
|
-
return;
|
|
16611
|
+
if (!this.element.isConnected) return;
|
|
16653
16612
|
if (this.easyMDE) {
|
|
16654
16613
|
this.easyMDE = null;
|
|
16655
16614
|
}
|
|
@@ -16687,9 +16646,12 @@ ${text2}</tr>
|
|
|
16687
16646
|
|
|
16688
16647
|
// src/js/controllers/slim_select_controller.js
|
|
16689
16648
|
var slim_select_controller_default = class extends Controller {
|
|
16649
|
+
static values = {
|
|
16650
|
+
typeaheadUrl: String,
|
|
16651
|
+
typeaheadDebounceMs: { type: Number, default: 200 }
|
|
16652
|
+
};
|
|
16690
16653
|
connect() {
|
|
16691
|
-
if (this.slimSelect)
|
|
16692
|
-
return;
|
|
16654
|
+
if (this.slimSelect) return;
|
|
16693
16655
|
this.#setupSlimSelect();
|
|
16694
16656
|
this.element.addEventListener("turbo:morph-element", (event) => {
|
|
16695
16657
|
if (event.target === this.element && !this.morphing) {
|
|
@@ -16721,9 +16683,14 @@ ${text2}</tr>
|
|
|
16721
16683
|
settings.contentPosition = "absolute";
|
|
16722
16684
|
settings.openPosition = "auto";
|
|
16723
16685
|
}
|
|
16686
|
+
const events = {};
|
|
16687
|
+
if (this.hasTypeaheadUrlValue && this.typeaheadUrlValue) {
|
|
16688
|
+
events.search = (search, currentData) => this.#typeaheadFetch(search, currentData);
|
|
16689
|
+
}
|
|
16724
16690
|
this.slimSelect = new SlimSelect({
|
|
16725
16691
|
select: this.element,
|
|
16726
|
-
settings
|
|
16692
|
+
settings,
|
|
16693
|
+
events
|
|
16727
16694
|
});
|
|
16728
16695
|
this.handleDropdownPosition();
|
|
16729
16696
|
this.boundHandleDropdownOpen = this.handleDropdownOpen.bind(this);
|
|
@@ -16811,9 +16778,44 @@ ${text2}</tr>
|
|
|
16811
16778
|
disconnect() {
|
|
16812
16779
|
this.#cleanupSlimSelect();
|
|
16813
16780
|
}
|
|
16781
|
+
// Server-driven search. SlimSelect calls events.search on each
|
|
16782
|
+
// keystroke; we debounce so that rapid typing produces a single
|
|
16783
|
+
// request, and abort any in-flight fetch when a newer one starts.
|
|
16784
|
+
// Returns a Promise resolving to either a DataArray (rendered as
|
|
16785
|
+
// options) or a string (rendered as the no-results label).
|
|
16786
|
+
#typeaheadFetch(search, _currentData) {
|
|
16787
|
+
if (this._typeaheadDebounce) clearTimeout(this._typeaheadDebounce);
|
|
16788
|
+
if (this._typeaheadAbort) this._typeaheadAbort.abort();
|
|
16789
|
+
return new Promise((resolve) => {
|
|
16790
|
+
this._typeaheadDebounce = setTimeout(() => {
|
|
16791
|
+
this._typeaheadAbort = new AbortController();
|
|
16792
|
+
this.#performTypeaheadFetch(search, this._typeaheadAbort.signal).then(resolve);
|
|
16793
|
+
}, this.typeaheadDebounceMsValue);
|
|
16794
|
+
});
|
|
16795
|
+
}
|
|
16796
|
+
async #performTypeaheadFetch(search, signal) {
|
|
16797
|
+
const url = new URL(this.typeaheadUrlValue, window.location.origin);
|
|
16798
|
+
url.searchParams.set("q", search || "");
|
|
16799
|
+
try {
|
|
16800
|
+
const res = await fetch(url.toString(), {
|
|
16801
|
+
headers: { Accept: "application/json" },
|
|
16802
|
+
signal
|
|
16803
|
+
});
|
|
16804
|
+
if (!res.ok) return "Search failed";
|
|
16805
|
+
const json = await res.json();
|
|
16806
|
+
const results = Array.isArray(json.results) ? json.results : [];
|
|
16807
|
+
return results.map((row) => ({
|
|
16808
|
+
value: String(row.value ?? ""),
|
|
16809
|
+
text: String(row.label ?? "")
|
|
16810
|
+
}));
|
|
16811
|
+
} catch (e4) {
|
|
16812
|
+
if (e4.name === "AbortError") return [];
|
|
16813
|
+
console.warn("[slim-select] typeahead error", e4);
|
|
16814
|
+
return "Search failed";
|
|
16815
|
+
}
|
|
16816
|
+
}
|
|
16814
16817
|
#handleMorph() {
|
|
16815
|
-
if (!this.element.isConnected)
|
|
16816
|
-
return;
|
|
16818
|
+
if (!this.element.isConnected) return;
|
|
16817
16819
|
this.#cleanupSlimSelect();
|
|
16818
16820
|
this.#setupSlimSelect();
|
|
16819
16821
|
}
|
|
@@ -16859,8 +16861,7 @@ ${text2}</tr>
|
|
|
16859
16861
|
// src/js/controllers/flatpickr_controller.js
|
|
16860
16862
|
var flatpickr_controller_default = class extends Controller {
|
|
16861
16863
|
connect() {
|
|
16862
|
-
if (this.picker)
|
|
16863
|
-
return;
|
|
16864
|
+
if (this.picker) return;
|
|
16864
16865
|
this.modal = document.querySelector("[data-controller=remote-modal]");
|
|
16865
16866
|
this.picker = new flatpickr(this.element, this.#buildOptions());
|
|
16866
16867
|
this.element.addEventListener("turbo:morph-element", (event) => {
|
|
@@ -16880,8 +16881,7 @@ ${text2}</tr>
|
|
|
16880
16881
|
}
|
|
16881
16882
|
}
|
|
16882
16883
|
#handleMorph() {
|
|
16883
|
-
if (!this.element.isConnected)
|
|
16884
|
-
return;
|
|
16884
|
+
if (!this.element.isConnected) return;
|
|
16885
16885
|
if (this.picker) {
|
|
16886
16886
|
this.picker.destroy();
|
|
16887
16887
|
this.picker = null;
|
|
@@ -16928,8 +16928,7 @@ ${text2}</tr>
|
|
|
16928
16928
|
this.inputTargetDisconnected();
|
|
16929
16929
|
}
|
|
16930
16930
|
inputTargetConnected() {
|
|
16931
|
-
if (!this.hasInputTarget || this.iti)
|
|
16932
|
-
return;
|
|
16931
|
+
if (!this.hasInputTarget || this.iti) return;
|
|
16933
16932
|
this.iti = window.intlTelInput(this.inputTarget, this.#buildOptions());
|
|
16934
16933
|
this.element.addEventListener("turbo:morph-element", (event) => {
|
|
16935
16934
|
if (event.target === this.element && !this.morphing) {
|
|
@@ -16948,8 +16947,7 @@ ${text2}</tr>
|
|
|
16948
16947
|
}
|
|
16949
16948
|
}
|
|
16950
16949
|
#handleMorph() {
|
|
16951
|
-
if (!this.inputTarget || !this.inputTarget.isConnected)
|
|
16952
|
-
return;
|
|
16950
|
+
if (!this.inputTarget || !this.inputTarget.isConnected) return;
|
|
16953
16951
|
if (this.iti) {
|
|
16954
16952
|
this.iti.destroy();
|
|
16955
16953
|
this.iti = null;
|
|
@@ -17004,8 +17002,7 @@ ${text2}</tr>
|
|
|
17004
17002
|
}
|
|
17005
17003
|
_syncFromHash() {
|
|
17006
17004
|
const id2 = this.#buttonIdFromHash();
|
|
17007
|
-
if (id2)
|
|
17008
|
-
this.#selectInternal(id2, { skipFocus: true, skipHashUpdate: true });
|
|
17005
|
+
if (id2) this.#selectInternal(id2, { skipFocus: true, skipHashUpdate: true });
|
|
17009
17006
|
}
|
|
17010
17007
|
select(event) {
|
|
17011
17008
|
this.#selectInternal(event.currentTarget.id);
|
|
@@ -17037,8 +17034,7 @@ ${text2}</tr>
|
|
|
17037
17034
|
selectedBtn.classList.add(...this.activeClasses);
|
|
17038
17035
|
selectedTab.hidden = false;
|
|
17039
17036
|
selectedTab.setAttribute("aria-hidden", "false");
|
|
17040
|
-
if (!options2.skipHashUpdate)
|
|
17041
|
-
this.#updateHash(id2);
|
|
17037
|
+
if (!options2.skipHashUpdate) this.#updateHash(id2);
|
|
17042
17038
|
if (!options2.skipFocus && selectedBtn !== document.activeElement) {
|
|
17043
17039
|
selectedBtn.focus();
|
|
17044
17040
|
}
|
|
@@ -17047,8 +17043,7 @@ ${text2}</tr>
|
|
|
17047
17043
|
// the identifier (e.g., #details, #orders).
|
|
17048
17044
|
#buttonIdFromHash() {
|
|
17049
17045
|
const hash3 = window.location.hash.replace(/^#/, "");
|
|
17050
|
-
if (!hash3)
|
|
17051
|
-
return null;
|
|
17046
|
+
if (!hash3) return null;
|
|
17052
17047
|
const candidateId = `${hash3}-tab`;
|
|
17053
17048
|
const exists = this.btnTargets.some((btn) => btn.id === candidateId);
|
|
17054
17049
|
return exists ? candidateId : null;
|
|
@@ -17069,11 +17064,11 @@ ${text2}</tr>
|
|
|
17069
17064
|
if (typeof chunk !== "string") {
|
|
17070
17065
|
return newParts.push(chunk);
|
|
17071
17066
|
}
|
|
17072
|
-
return rx[Symbol.split](chunk).forEach((raw,
|
|
17067
|
+
return rx[Symbol.split](chunk).forEach((raw, i4, list2) => {
|
|
17073
17068
|
if (raw !== "") {
|
|
17074
17069
|
newParts.push(raw);
|
|
17075
17070
|
}
|
|
17076
|
-
if (
|
|
17071
|
+
if (i4 < list2.length - 1) {
|
|
17077
17072
|
newParts.push(replacement);
|
|
17078
17073
|
}
|
|
17079
17074
|
});
|
|
@@ -17306,24 +17301,20 @@ ${text2}</tr>
|
|
|
17306
17301
|
var y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
17307
17302
|
var d = Array.isArray;
|
|
17308
17303
|
function w(n3, l4) {
|
|
17309
|
-
for (var u5 in l4)
|
|
17310
|
-
n3[u5] = l4[u5];
|
|
17304
|
+
for (var u5 in l4) n3[u5] = l4[u5];
|
|
17311
17305
|
return n3;
|
|
17312
17306
|
}
|
|
17313
17307
|
function g(n3) {
|
|
17314
17308
|
n3 && n3.parentNode && n3.parentNode.removeChild(n3);
|
|
17315
17309
|
}
|
|
17316
17310
|
function _(l4, u5, t4) {
|
|
17317
|
-
var
|
|
17318
|
-
for (r4 in u5)
|
|
17319
|
-
|
|
17320
|
-
|
|
17321
|
-
|
|
17322
|
-
|
|
17323
|
-
|
|
17324
|
-
}
|
|
17325
|
-
function m(n3, t4, i5, o4, r4) {
|
|
17326
|
-
var e4 = { type: n3, props: t4, key: i5, ref: o4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == r4 ? ++u : r4, __i: -1, __u: 0 };
|
|
17311
|
+
var i4, o4, r4, e4 = {};
|
|
17312
|
+
for (r4 in u5) "key" == r4 ? i4 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : e4[r4] = u5[r4];
|
|
17313
|
+
if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps) for (r4 in l4.defaultProps) void 0 === e4[r4] && (e4[r4] = l4.defaultProps[r4]);
|
|
17314
|
+
return m(l4, e4, i4, o4, null);
|
|
17315
|
+
}
|
|
17316
|
+
function m(n3, t4, i4, o4, r4) {
|
|
17317
|
+
var e4 = { type: n3, props: t4, key: i4, ref: o4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == r4 ? ++u : r4, __i: -1, __u: 0 };
|
|
17327
17318
|
return null == r4 && null != l.vnode && l.vnode(e4), e4;
|
|
17328
17319
|
}
|
|
17329
17320
|
function b() {
|
|
@@ -17336,21 +17327,17 @@ ${text2}</tr>
|
|
|
17336
17327
|
this.props = n3, this.context = l4;
|
|
17337
17328
|
}
|
|
17338
17329
|
function S(n3, l4) {
|
|
17339
|
-
if (null == l4)
|
|
17340
|
-
|
|
17341
|
-
for (var u5; l4 < n3.__k.length; l4++)
|
|
17342
|
-
if (null != (u5 = n3.__k[l4]) && null != u5.__e)
|
|
17343
|
-
return u5.__e;
|
|
17330
|
+
if (null == l4) return n3.__ ? S(n3.__, n3.__i + 1) : null;
|
|
17331
|
+
for (var u5; l4 < n3.__k.length; l4++) if (null != (u5 = n3.__k[l4]) && null != u5.__e) return u5.__e;
|
|
17344
17332
|
return "function" == typeof n3.type ? S(n3) : null;
|
|
17345
17333
|
}
|
|
17346
17334
|
function C(n3) {
|
|
17347
17335
|
var l4, u5;
|
|
17348
17336
|
if (null != (n3 = n3.__) && null != n3.__c) {
|
|
17349
|
-
for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++)
|
|
17350
|
-
|
|
17351
|
-
|
|
17352
|
-
|
|
17353
|
-
}
|
|
17337
|
+
for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++) if (null != (u5 = n3.__k[l4]) && null != u5.__e) {
|
|
17338
|
+
n3.__e = n3.__c.base = u5.__e;
|
|
17339
|
+
break;
|
|
17340
|
+
}
|
|
17354
17341
|
return C(n3);
|
|
17355
17342
|
}
|
|
17356
17343
|
}
|
|
@@ -17358,30 +17345,24 @@ ${text2}</tr>
|
|
|
17358
17345
|
(!n3.__d && (n3.__d = true) && i.push(n3) && !$.__r++ || o != l.debounceRendering) && ((o = l.debounceRendering) || r)($);
|
|
17359
17346
|
}
|
|
17360
17347
|
function $() {
|
|
17361
|
-
for (var n3, u5, t4, o4, r4, f5, c4, s4 = 1; i.length; )
|
|
17362
|
-
i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (t4 = void 0, o4 = void 0, r4 = (o4 = (u5 = n3).__v).__e, f5 = [], c4 = [], u5.__P && ((t4 = w({}, o4)).__v = o4.__v + 1, l.vnode && l.vnode(t4), O(u5.__P, t4, o4, u5.__n, u5.__P.namespaceURI, 32 & o4.__u ? [r4] : null, f5, null == r4 ? S(o4) : r4, !!(32 & o4.__u), c4), t4.__v = o4.__v, t4.__.__k[t4.__i] = t4, N(f5, t4, c4), o4.__e = o4.__ = null, t4.__e != r4 && C(t4)));
|
|
17348
|
+
for (var n3, u5, t4, o4, r4, f5, c4, s4 = 1; i.length; ) i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (t4 = void 0, o4 = void 0, r4 = (o4 = (u5 = n3).__v).__e, f5 = [], c4 = [], u5.__P && ((t4 = w({}, o4)).__v = o4.__v + 1, l.vnode && l.vnode(t4), O(u5.__P, t4, o4, u5.__n, u5.__P.namespaceURI, 32 & o4.__u ? [r4] : null, f5, null == r4 ? S(o4) : r4, !!(32 & o4.__u), c4), t4.__v = o4.__v, t4.__.__k[t4.__i] = t4, N(f5, t4, c4), o4.__e = o4.__ = null, t4.__e != r4 && C(t4)));
|
|
17363
17349
|
$.__r = 0;
|
|
17364
17350
|
}
|
|
17365
|
-
function I(n3, l4, u5, t4,
|
|
17351
|
+
function I(n3, l4, u5, t4, i4, o4, r4, e4, f5, c4, s4) {
|
|
17366
17352
|
var a4, h4, y4, d4, w4, g5, _4, m4 = t4 && t4.__k || v, b3 = l4.length;
|
|
17367
|
-
for (f5 = P(u5, l4, m4, f5, b3), a4 = 0; a4 < b3; a4++)
|
|
17368
|
-
null != (y4 = u5.__k[a4]) && (h4 = -1 == y4.__i ? p : m4[y4.__i] || p, y4.__i = a4, g5 = O(n3, y4, h4, i5, o4, r4, e4, f5, c4, s4), d4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && B(h4.ref, null, y4), s4.push(y4.ref, y4.__c || d4, y4)), null == w4 && null != d4 && (w4 = d4), (_4 = !!(4 & y4.__u)) || h4.__k === y4.__k ? f5 = A(y4, f5, n3, _4) : "function" == typeof y4.type && void 0 !== g5 ? f5 = g5 : d4 && (f5 = d4.nextSibling), y4.__u &= -7);
|
|
17353
|
+
for (f5 = P(u5, l4, m4, f5, b3), a4 = 0; a4 < b3; a4++) null != (y4 = u5.__k[a4]) && (h4 = -1 == y4.__i ? p : m4[y4.__i] || p, y4.__i = a4, g5 = O(n3, y4, h4, i4, o4, r4, e4, f5, c4, s4), d4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && B(h4.ref, null, y4), s4.push(y4.ref, y4.__c || d4, y4)), null == w4 && null != d4 && (w4 = d4), (_4 = !!(4 & y4.__u)) || h4.__k === y4.__k ? f5 = A(y4, f5, n3, _4) : "function" == typeof y4.type && void 0 !== g5 ? f5 = g5 : d4 && (f5 = d4.nextSibling), y4.__u &= -7);
|
|
17369
17354
|
return u5.__e = w4, f5;
|
|
17370
17355
|
}
|
|
17371
|
-
function P(n3, l4, u5, t4,
|
|
17356
|
+
function P(n3, l4, u5, t4, i4) {
|
|
17372
17357
|
var o4, r4, e4, f5, c4, s4 = u5.length, a4 = s4, h4 = 0;
|
|
17373
|
-
for (n3.__k = new Array(
|
|
17374
|
-
|
|
17375
|
-
if (a4)
|
|
17376
|
-
for (o4 = 0; o4 < s4; o4++)
|
|
17377
|
-
null != (e4 = u5[o4]) && 0 == (2 & e4.__u) && (e4.__e == t4 && (t4 = S(e4)), D(e4, e4));
|
|
17358
|
+
for (n3.__k = new Array(i4), o4 = 0; o4 < i4; o4++) null != (r4 = l4[o4]) && "boolean" != typeof r4 && "function" != typeof r4 ? ("string" == typeof r4 || "number" == typeof r4 || "bigint" == typeof r4 || r4.constructor == String ? r4 = n3.__k[o4] = m(null, r4, null, null, null) : d(r4) ? r4 = n3.__k[o4] = m(k, { children: r4 }, null, null, null) : void 0 === r4.constructor && r4.__b > 0 ? r4 = n3.__k[o4] = m(r4.type, r4.props, r4.key, r4.ref ? r4.ref : null, r4.__v) : n3.__k[o4] = r4, f5 = o4 + h4, r4.__ = n3, r4.__b = n3.__b + 1, e4 = null, -1 != (c4 = r4.__i = L(r4, u5, f5, a4)) && (a4--, (e4 = u5[c4]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c4 && (i4 > s4 ? h4-- : i4 < s4 && h4++), "function" != typeof r4.type && (r4.__u |= 4)) : c4 != f5 && (c4 == f5 - 1 ? h4-- : c4 == f5 + 1 ? h4++ : (c4 > f5 ? h4-- : h4++, r4.__u |= 4))) : n3.__k[o4] = null;
|
|
17359
|
+
if (a4) for (o4 = 0; o4 < s4; o4++) null != (e4 = u5[o4]) && 0 == (2 & e4.__u) && (e4.__e == t4 && (t4 = S(e4)), D(e4, e4));
|
|
17378
17360
|
return t4;
|
|
17379
17361
|
}
|
|
17380
17362
|
function A(n3, l4, u5, t4) {
|
|
17381
|
-
var
|
|
17363
|
+
var i4, o4;
|
|
17382
17364
|
if ("function" == typeof n3.type) {
|
|
17383
|
-
for (
|
|
17384
|
-
i5[o4] && (i5[o4].__ = n3, l4 = A(i5[o4], l4, u5, t4));
|
|
17365
|
+
for (i4 = n3.__k, o4 = 0; i4 && o4 < i4.length; o4++) i4[o4] && (i4[o4].__ = n3, l4 = A(i4[o4], l4, u5, t4));
|
|
17385
17366
|
return l4;
|
|
17386
17367
|
}
|
|
17387
17368
|
n3.__e != l4 && (t4 && (l4 && n3.type && !l4.parentNode && (l4 = S(n3)), u5.insertBefore(n3.__e, l4 || null)), l4 = n3.__e);
|
|
@@ -17396,116 +17377,88 @@ ${text2}</tr>
|
|
|
17396
17377
|
}) : l4.push(n3)), l4;
|
|
17397
17378
|
}
|
|
17398
17379
|
function L(n3, l4, u5, t4) {
|
|
17399
|
-
var
|
|
17400
|
-
if (null === c4 && null == e4 || s4 && e4 == c4.key && f5 == c4.type)
|
|
17401
|
-
return u5;
|
|
17380
|
+
var i4, o4, r4, e4 = n3.key, f5 = n3.type, c4 = l4[u5], s4 = null != c4 && 0 == (2 & c4.__u);
|
|
17381
|
+
if (null === c4 && null == e4 || s4 && e4 == c4.key && f5 == c4.type) return u5;
|
|
17402
17382
|
if (t4 > (s4 ? 1 : 0)) {
|
|
17403
|
-
for (
|
|
17404
|
-
if (null != (c4 = l4[r4 = i5 >= 0 ? i5-- : o4++]) && 0 == (2 & c4.__u) && e4 == c4.key && f5 == c4.type)
|
|
17405
|
-
return r4;
|
|
17383
|
+
for (i4 = u5 - 1, o4 = u5 + 1; i4 >= 0 || o4 < l4.length; ) if (null != (c4 = l4[r4 = i4 >= 0 ? i4-- : o4++]) && 0 == (2 & c4.__u) && e4 == c4.key && f5 == c4.type) return r4;
|
|
17406
17384
|
}
|
|
17407
17385
|
return -1;
|
|
17408
17386
|
}
|
|
17409
17387
|
function T(n3, l4, u5) {
|
|
17410
17388
|
"-" == l4[0] ? n3.setProperty(l4, null == u5 ? "" : u5) : n3[l4] = null == u5 ? "" : "number" != typeof u5 || y.test(l4) ? u5 : u5 + "px";
|
|
17411
17389
|
}
|
|
17412
|
-
function j(n3, l4, u5, t4,
|
|
17390
|
+
function j(n3, l4, u5, t4, i4) {
|
|
17413
17391
|
var o4, r4;
|
|
17414
|
-
n:
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
else if ("o" == l4[0] && "n" == l4[1])
|
|
17427
|
-
o4 = l4 != (l4 = l4.replace(f, "$1")), r4 = l4.toLowerCase(), l4 = r4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? r4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u5, u5 ? t4 ? u5.u = t4.u : (u5.u = c, n3.addEventListener(l4, o4 ? a : s, o4)) : n3.removeEventListener(l4, o4 ? a : s, o4);
|
|
17428
|
-
else {
|
|
17429
|
-
if ("http://www.w3.org/2000/svg" == i5)
|
|
17430
|
-
l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
17431
|
-
else if ("width" != l4 && "height" != l4 && "href" != l4 && "list" != l4 && "form" != l4 && "tabIndex" != l4 && "download" != l4 && "rowSpan" != l4 && "colSpan" != l4 && "role" != l4 && "popover" != l4 && l4 in n3)
|
|
17432
|
-
try {
|
|
17433
|
-
n3[l4] = null == u5 ? "" : u5;
|
|
17434
|
-
break n;
|
|
17435
|
-
} catch (n4) {
|
|
17436
|
-
}
|
|
17437
|
-
"function" == typeof u5 || (null == u5 || false === u5 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == u5 ? "" : u5));
|
|
17392
|
+
n: if ("style" == l4) if ("string" == typeof u5) n3.style.cssText = u5;
|
|
17393
|
+
else {
|
|
17394
|
+
if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4) for (l4 in t4) u5 && l4 in u5 || T(n3.style, l4, "");
|
|
17395
|
+
if (u5) for (l4 in u5) t4 && u5[l4] == t4[l4] || T(n3.style, l4, u5[l4]);
|
|
17396
|
+
}
|
|
17397
|
+
else if ("o" == l4[0] && "n" == l4[1]) o4 = l4 != (l4 = l4.replace(f, "$1")), r4 = l4.toLowerCase(), l4 = r4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? r4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u5, u5 ? t4 ? u5.u = t4.u : (u5.u = c, n3.addEventListener(l4, o4 ? a : s, o4)) : n3.removeEventListener(l4, o4 ? a : s, o4);
|
|
17398
|
+
else {
|
|
17399
|
+
if ("http://www.w3.org/2000/svg" == i4) l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
17400
|
+
else if ("width" != l4 && "height" != l4 && "href" != l4 && "list" != l4 && "form" != l4 && "tabIndex" != l4 && "download" != l4 && "rowSpan" != l4 && "colSpan" != l4 && "role" != l4 && "popover" != l4 && l4 in n3) try {
|
|
17401
|
+
n3[l4] = null == u5 ? "" : u5;
|
|
17402
|
+
break n;
|
|
17403
|
+
} catch (n4) {
|
|
17438
17404
|
}
|
|
17405
|
+
"function" == typeof u5 || (null == u5 || false === u5 && "-" != l4[4] ? n3.removeAttribute(l4) : n3.setAttribute(l4, "popover" == l4 && 1 == u5 ? "" : u5));
|
|
17406
|
+
}
|
|
17439
17407
|
}
|
|
17440
17408
|
function F(n3) {
|
|
17441
17409
|
return function(u5) {
|
|
17442
17410
|
if (this.l) {
|
|
17443
17411
|
var t4 = this.l[u5.type + n3];
|
|
17444
|
-
if (null == u5.t)
|
|
17445
|
-
|
|
17446
|
-
else if (u5.t < t4.u)
|
|
17447
|
-
return;
|
|
17412
|
+
if (null == u5.t) u5.t = c++;
|
|
17413
|
+
else if (u5.t < t4.u) return;
|
|
17448
17414
|
return t4(l.event ? l.event(u5) : u5);
|
|
17449
17415
|
}
|
|
17450
17416
|
};
|
|
17451
17417
|
}
|
|
17452
|
-
function O(n3, u5, t4,
|
|
17418
|
+
function O(n3, u5, t4, i4, o4, r4, e4, f5, c4, s4) {
|
|
17453
17419
|
var a4, h4, p4, v4, y4, _4, m4, b3, S3, C4, M3, $3, P5, A5, H4, L3, T5, j5 = u5.type;
|
|
17454
|
-
if (void 0 !== u5.constructor)
|
|
17455
|
-
return null;
|
|
17420
|
+
if (void 0 !== u5.constructor) return null;
|
|
17456
17421
|
128 & t4.__u && (c4 = !!(32 & t4.__u), r4 = [f5 = u5.__e = t4.__e]), (a4 = l.__b) && a4(u5);
|
|
17457
|
-
n:
|
|
17458
|
-
if ("
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
|
|
17481
|
-
|
|
17482
|
-
|
|
17483
|
-
|
|
17484
|
-
|
|
17485
|
-
|
|
17486
|
-
|
|
17487
|
-
|
|
17488
|
-
|
|
17489
|
-
|
|
17490
|
-
} else {
|
|
17491
|
-
for (T5 = r4.length; T5--; )
|
|
17492
|
-
g(r4[T5]);
|
|
17493
|
-
z(u5);
|
|
17494
|
-
}
|
|
17495
|
-
else
|
|
17496
|
-
u5.__e = t4.__e, u5.__k = t4.__k, n4.then || z(u5);
|
|
17497
|
-
l.__e(n4, u5, t4);
|
|
17498
|
-
}
|
|
17499
|
-
else
|
|
17500
|
-
null == r4 && u5.__v == t4.__v ? (u5.__k = t4.__k, u5.__e = t4.__e) : f5 = u5.__e = q(t4.__e, u5, t4, i5, o4, r4, e4, c4, s4);
|
|
17422
|
+
n: if ("function" == typeof j5) try {
|
|
17423
|
+
if (b3 = u5.props, S3 = "prototype" in j5 && j5.prototype.render, C4 = (a4 = j5.contextType) && i4[a4.__c], M3 = a4 ? C4 ? C4.props.value : a4.__ : i4, t4.__c ? m4 = (h4 = u5.__c = t4.__c).__ = h4.__E : (S3 ? u5.__c = h4 = new j5(b3, M3) : (u5.__c = h4 = new x(b3, M3), h4.constructor = j5, h4.render = E), C4 && C4.sub(h4), h4.state || (h4.state = {}), h4.__n = i4, p4 = h4.__d = true, h4.__h = [], h4._sb = []), S3 && null == h4.__s && (h4.__s = h4.state), S3 && null != j5.getDerivedStateFromProps && (h4.__s == h4.state && (h4.__s = w({}, h4.__s)), w(h4.__s, j5.getDerivedStateFromProps(b3, h4.__s))), v4 = h4.props, y4 = h4.state, h4.__v = u5, p4) S3 && null == j5.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
|
|
17424
|
+
else {
|
|
17425
|
+
if (S3 && null == j5.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), u5.__v == t4.__v || !h4.__e && null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b3, h4.__s, M3)) {
|
|
17426
|
+
for (u5.__v != t4.__v && (h4.props = b3, h4.state = h4.__s, h4.__d = false), u5.__e = t4.__e, u5.__k = t4.__k, u5.__k.some(function(n4) {
|
|
17427
|
+
n4 && (n4.__ = u5);
|
|
17428
|
+
}), $3 = 0; $3 < h4._sb.length; $3++) h4.__h.push(h4._sb[$3]);
|
|
17429
|
+
h4._sb = [], h4.__h.length && e4.push(h4);
|
|
17430
|
+
break n;
|
|
17431
|
+
}
|
|
17432
|
+
null != h4.componentWillUpdate && h4.componentWillUpdate(b3, h4.__s, M3), S3 && null != h4.componentDidUpdate && h4.__h.push(function() {
|
|
17433
|
+
h4.componentDidUpdate(v4, y4, _4);
|
|
17434
|
+
});
|
|
17435
|
+
}
|
|
17436
|
+
if (h4.context = M3, h4.props = b3, h4.__P = n3, h4.__e = false, P5 = l.__r, A5 = 0, S3) {
|
|
17437
|
+
for (h4.state = h4.__s, h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), H4 = 0; H4 < h4._sb.length; H4++) h4.__h.push(h4._sb[H4]);
|
|
17438
|
+
h4._sb = [];
|
|
17439
|
+
} else do {
|
|
17440
|
+
h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
|
|
17441
|
+
} while (h4.__d && ++A5 < 25);
|
|
17442
|
+
h4.state = h4.__s, null != h4.getChildContext && (i4 = w(w({}, i4), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_4 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = V(a4.props.children)), f5 = I(n3, d(L3) ? L3 : [L3], u5, t4, i4, o4, r4, e4, f5, c4, s4), h4.base = u5.__e, u5.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
|
|
17443
|
+
} catch (n4) {
|
|
17444
|
+
if (u5.__v = null, c4 || null != r4) if (n4.then) {
|
|
17445
|
+
for (u5.__u |= c4 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; ) f5 = f5.nextSibling;
|
|
17446
|
+
r4[r4.indexOf(f5)] = null, u5.__e = f5;
|
|
17447
|
+
} else {
|
|
17448
|
+
for (T5 = r4.length; T5--; ) g(r4[T5]);
|
|
17449
|
+
z(u5);
|
|
17450
|
+
}
|
|
17451
|
+
else u5.__e = t4.__e, u5.__k = t4.__k, n4.then || z(u5);
|
|
17452
|
+
l.__e(n4, u5, t4);
|
|
17453
|
+
}
|
|
17454
|
+
else null == r4 && u5.__v == t4.__v ? (u5.__k = t4.__k, u5.__e = t4.__e) : f5 = u5.__e = q(t4.__e, u5, t4, i4, o4, r4, e4, c4, s4);
|
|
17501
17455
|
return (a4 = l.diffed) && a4(u5), 128 & u5.__u ? void 0 : f5;
|
|
17502
17456
|
}
|
|
17503
17457
|
function z(n3) {
|
|
17504
17458
|
n3 && n3.__c && (n3.__c.__e = true), n3 && n3.__k && n3.__k.forEach(z);
|
|
17505
17459
|
}
|
|
17506
17460
|
function N(n3, u5, t4) {
|
|
17507
|
-
for (var
|
|
17508
|
-
B(t4[i5], t4[++i5], t4[++i5]);
|
|
17461
|
+
for (var i4 = 0; i4 < t4.length; i4++) B(t4[i4], t4[++i4], t4[++i4]);
|
|
17509
17462
|
l.__c && l.__c(u5, n3), n3.some(function(u6) {
|
|
17510
17463
|
try {
|
|
17511
17464
|
n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
|
|
@@ -17519,43 +17472,30 @@ ${text2}</tr>
|
|
|
17519
17472
|
function V(n3) {
|
|
17520
17473
|
return "object" != typeof n3 || null == n3 || n3.__b && n3.__b > 0 ? n3 : d(n3) ? n3.map(V) : w({}, n3);
|
|
17521
17474
|
}
|
|
17522
|
-
function q(u5, t4,
|
|
17523
|
-
var a4, h4, v4, y4, w4, _4, m4, b3 =
|
|
17475
|
+
function q(u5, t4, i4, o4, r4, e4, f5, c4, s4) {
|
|
17476
|
+
var a4, h4, v4, y4, w4, _4, m4, b3 = i4.props || p, k4 = t4.props, x4 = t4.type;
|
|
17524
17477
|
if ("svg" == x4 ? r4 = "http://www.w3.org/2000/svg" : "math" == x4 ? r4 = "http://www.w3.org/1998/Math/MathML" : r4 || (r4 = "http://www.w3.org/1999/xhtml"), null != e4) {
|
|
17525
|
-
for (a4 = 0; a4 < e4.length; a4++)
|
|
17526
|
-
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
}
|
|
17478
|
+
for (a4 = 0; a4 < e4.length; a4++) if ((w4 = e4[a4]) && "setAttribute" in w4 == !!x4 && (x4 ? w4.localName == x4 : 3 == w4.nodeType)) {
|
|
17479
|
+
u5 = w4, e4[a4] = null;
|
|
17480
|
+
break;
|
|
17481
|
+
}
|
|
17530
17482
|
}
|
|
17531
17483
|
if (null == u5) {
|
|
17532
|
-
if (null == x4)
|
|
17533
|
-
return document.createTextNode(k4);
|
|
17484
|
+
if (null == x4) return document.createTextNode(k4);
|
|
17534
17485
|
u5 = document.createElementNS(r4, x4, k4.is && k4), c4 && (l.__m && l.__m(t4, e4), c4 = false), e4 = null;
|
|
17535
17486
|
}
|
|
17536
|
-
if (null == x4)
|
|
17537
|
-
b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
|
|
17487
|
+
if (null == x4) b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
|
|
17538
17488
|
else {
|
|
17539
|
-
if (e4 = e4 && n.call(u5.childNodes), !c4 && null != e4)
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17543
|
-
if (
|
|
17544
|
-
|
|
17545
|
-
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
continue;
|
|
17550
|
-
j(u5, a4, null, w4, r4);
|
|
17551
|
-
}
|
|
17552
|
-
for (a4 in k4)
|
|
17553
|
-
w4 = k4[a4], "children" == a4 ? y4 = w4 : "dangerouslySetInnerHTML" == a4 ? h4 = w4 : "value" == a4 ? _4 = w4 : "checked" == a4 ? m4 = w4 : c4 && "function" != typeof w4 || b3[a4] === w4 || j(u5, a4, w4, b3[a4], r4);
|
|
17554
|
-
if (h4)
|
|
17555
|
-
c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t4.__k = [];
|
|
17556
|
-
else if (v4 && (u5.innerHTML = ""), I("template" == t4.type ? u5.content : u5, d(y4) ? y4 : [y4], t4, i5, o4, "foreignObject" == x4 ? "http://www.w3.org/1999/xhtml" : r4, e4, f5, e4 ? e4[0] : i5.__k && S(i5, 0), c4, s4), null != e4)
|
|
17557
|
-
for (a4 = e4.length; a4--; )
|
|
17558
|
-
g(e4[a4]);
|
|
17489
|
+
if (e4 = e4 && n.call(u5.childNodes), !c4 && null != e4) for (b3 = {}, a4 = 0; a4 < u5.attributes.length; a4++) b3[(w4 = u5.attributes[a4]).name] = w4.value;
|
|
17490
|
+
for (a4 in b3) if (w4 = b3[a4], "children" == a4) ;
|
|
17491
|
+
else if ("dangerouslySetInnerHTML" == a4) v4 = w4;
|
|
17492
|
+
else if (!(a4 in k4)) {
|
|
17493
|
+
if ("value" == a4 && "defaultValue" in k4 || "checked" == a4 && "defaultChecked" in k4) continue;
|
|
17494
|
+
j(u5, a4, null, w4, r4);
|
|
17495
|
+
}
|
|
17496
|
+
for (a4 in k4) w4 = k4[a4], "children" == a4 ? y4 = w4 : "dangerouslySetInnerHTML" == a4 ? h4 = w4 : "value" == a4 ? _4 = w4 : "checked" == a4 ? m4 = w4 : c4 && "function" != typeof w4 || b3[a4] === w4 || j(u5, a4, w4, b3[a4], r4);
|
|
17497
|
+
if (h4) c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t4.__k = [];
|
|
17498
|
+
else if (v4 && (u5.innerHTML = ""), I("template" == t4.type ? u5.content : u5, d(y4) ? y4 : [y4], t4, i4, o4, "foreignObject" == x4 ? "http://www.w3.org/1999/xhtml" : r4, e4, f5, e4 ? e4[0] : i4.__k && S(i4, 0), c4, s4), null != e4) for (a4 = e4.length; a4--; ) g(e4[a4]);
|
|
17559
17499
|
c4 || (a4 = "value", "progress" == x4 && null == _4 ? u5.removeAttribute("value") : null != _4 && (_4 !== u5[a4] || "progress" == x4 && !_4 || "option" == x4 && _4 != b3[a4]) && j(u5, a4, _4, b3[a4], r4), a4 = "checked", null != m4 && m4 != u5[a4] && j(u5, a4, m4, b3[a4], r4));
|
|
17560
17500
|
}
|
|
17561
17501
|
return u5;
|
|
@@ -17563,52 +17503,44 @@ ${text2}</tr>
|
|
|
17563
17503
|
function B(n3, u5, t4) {
|
|
17564
17504
|
try {
|
|
17565
17505
|
if ("function" == typeof n3) {
|
|
17566
|
-
var
|
|
17567
|
-
|
|
17568
|
-
} else
|
|
17569
|
-
n3.current = u5;
|
|
17506
|
+
var i4 = "function" == typeof n3.__u;
|
|
17507
|
+
i4 && n3.__u(), i4 && null == u5 || (n3.__u = n3(u5));
|
|
17508
|
+
} else n3.current = u5;
|
|
17570
17509
|
} catch (n4) {
|
|
17571
17510
|
l.__e(n4, t4);
|
|
17572
17511
|
}
|
|
17573
17512
|
}
|
|
17574
17513
|
function D(n3, u5, t4) {
|
|
17575
|
-
var
|
|
17576
|
-
if (l.unmount && l.unmount(n3), (
|
|
17577
|
-
if (
|
|
17578
|
-
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
i5.base = i5.__P = null;
|
|
17514
|
+
var i4, o4;
|
|
17515
|
+
if (l.unmount && l.unmount(n3), (i4 = n3.ref) && (i4.current && i4.current != n3.__e || B(i4, null, u5)), null != (i4 = n3.__c)) {
|
|
17516
|
+
if (i4.componentWillUnmount) try {
|
|
17517
|
+
i4.componentWillUnmount();
|
|
17518
|
+
} catch (n4) {
|
|
17519
|
+
l.__e(n4, u5);
|
|
17520
|
+
}
|
|
17521
|
+
i4.base = i4.__P = null;
|
|
17584
17522
|
}
|
|
17585
|
-
if (
|
|
17586
|
-
for (o4 = 0; o4 < i5.length; o4++)
|
|
17587
|
-
i5[o4] && D(i5[o4], u5, t4 || "function" != typeof n3.type);
|
|
17523
|
+
if (i4 = n3.__k) for (o4 = 0; o4 < i4.length; o4++) i4[o4] && D(i4[o4], u5, t4 || "function" != typeof n3.type);
|
|
17588
17524
|
t4 || g(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
|
|
17589
17525
|
}
|
|
17590
17526
|
function E(n3, l4, u5) {
|
|
17591
17527
|
return this.constructor(n3, u5);
|
|
17592
17528
|
}
|
|
17593
|
-
function G(u5, t4,
|
|
17529
|
+
function G(u5, t4, i4) {
|
|
17594
17530
|
var o4, r4, e4, f5;
|
|
17595
|
-
t4 == document && (t4 = document.documentElement), l.__ && l.__(u5, t4), r4 = (o4 = "function" == typeof
|
|
17531
|
+
t4 == document && (t4 = document.documentElement), l.__ && l.__(u5, t4), r4 = (o4 = "function" == typeof i4) ? null : i4 && i4.__k || t4.__k, e4 = [], f5 = [], O(t4, u5 = (!o4 && i4 || t4).__k = _(k, null, [u5]), r4 || p, p, t4.namespaceURI, !o4 && i4 ? [i4] : r4 ? null : t4.firstChild ? n.call(t4.childNodes) : null, e4, !o4 && i4 ? i4 : r4 ? r4.__e : t4.firstChild, o4, f5), N(e4, u5, f5);
|
|
17596
17532
|
}
|
|
17597
17533
|
function K(l4, u5, t4) {
|
|
17598
|
-
var
|
|
17599
|
-
for (r4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u5)
|
|
17600
|
-
|
|
17601
|
-
return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t4), m(l4.type, f5, i5 || l4.key, o4 || l4.ref, null);
|
|
17534
|
+
var i4, o4, r4, e4, f5 = w({}, l4.props);
|
|
17535
|
+
for (r4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u5) "key" == r4 ? i4 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : f5[r4] = void 0 === u5[r4] && null != e4 ? e4[r4] : u5[r4];
|
|
17536
|
+
return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t4), m(l4.type, f5, i4 || l4.key, o4 || l4.ref, null);
|
|
17602
17537
|
}
|
|
17603
17538
|
n = v.slice, l = { __e: function(n3, l4, u5, t4) {
|
|
17604
|
-
for (var
|
|
17605
|
-
if ((
|
|
17606
|
-
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
} catch (l5) {
|
|
17610
|
-
n3 = l5;
|
|
17611
|
-
}
|
|
17539
|
+
for (var i4, o4, r4; l4 = l4.__; ) if ((i4 = l4.__c) && !i4.__) try {
|
|
17540
|
+
if ((o4 = i4.constructor) && null != o4.getDerivedStateFromError && (i4.setState(o4.getDerivedStateFromError(n3)), r4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3, t4 || {}), r4 = i4.__d), r4) return i4.__E = i4;
|
|
17541
|
+
} catch (l5) {
|
|
17542
|
+
n3 = l5;
|
|
17543
|
+
}
|
|
17612
17544
|
throw n3;
|
|
17613
17545
|
} }, u = 0, t = function(n3) {
|
|
17614
17546
|
return null != n3 && void 0 === n3.constructor;
|
|
@@ -17643,29 +17575,27 @@ ${text2}</tr>
|
|
|
17643
17575
|
function d2(n3) {
|
|
17644
17576
|
return o2 = 1, h2(D2, n3);
|
|
17645
17577
|
}
|
|
17646
|
-
function h2(n3, u5,
|
|
17578
|
+
function h2(n3, u5, i4) {
|
|
17647
17579
|
var o4 = p2(t2++, 2);
|
|
17648
|
-
if (o4.t = n3, !o4.__c && (o4.__ = [
|
|
17580
|
+
if (o4.t = n3, !o4.__c && (o4.__ = [i4 ? i4(u5) : D2(void 0, u5), function(n4) {
|
|
17649
17581
|
var t4 = o4.__N ? o4.__N[0] : o4.__[0], r4 = o4.t(t4, n4);
|
|
17650
17582
|
t4 !== r4 && (o4.__N = [r4, o4.__[1]], o4.__c.setState({}));
|
|
17651
17583
|
}], o4.__c = r2, !r2.__f)) {
|
|
17652
17584
|
var f5 = function(n4, t4, r4) {
|
|
17653
|
-
if (!o4.__c.__H)
|
|
17654
|
-
return true;
|
|
17585
|
+
if (!o4.__c.__H) return true;
|
|
17655
17586
|
var u6 = o4.__c.__H.__.filter(function(n5) {
|
|
17656
17587
|
return !!n5.__c;
|
|
17657
17588
|
});
|
|
17658
17589
|
if (u6.every(function(n5) {
|
|
17659
17590
|
return !n5.__N;
|
|
17660
|
-
}))
|
|
17661
|
-
|
|
17662
|
-
var i6 = o4.__c.props !== n4;
|
|
17591
|
+
})) return !c4 || c4.call(this, n4, t4, r4);
|
|
17592
|
+
var i5 = o4.__c.props !== n4;
|
|
17663
17593
|
return u6.forEach(function(n5) {
|
|
17664
17594
|
if (n5.__N) {
|
|
17665
17595
|
var t5 = n5.__[0];
|
|
17666
|
-
n5.__ = n5.__N, n5.__N = void 0, t5 !== n5.__[0] && (
|
|
17596
|
+
n5.__ = n5.__N, n5.__N = void 0, t5 !== n5.__[0] && (i5 = true);
|
|
17667
17597
|
}
|
|
17668
|
-
}), c4 && c4.call(this, n4, t4, r4) ||
|
|
17598
|
+
}), c4 && c4.call(this, n4, t4, r4) || i5;
|
|
17669
17599
|
};
|
|
17670
17600
|
r2.__f = true;
|
|
17671
17601
|
var c4 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
|
|
@@ -17680,8 +17610,8 @@ ${text2}</tr>
|
|
|
17680
17610
|
return o4.__N || o4.__;
|
|
17681
17611
|
}
|
|
17682
17612
|
function y2(n3, u5) {
|
|
17683
|
-
var
|
|
17684
|
-
!c2.__s && C2(
|
|
17613
|
+
var i4 = p2(t2++, 3);
|
|
17614
|
+
!c2.__s && C2(i4.__H, u5) && (i4.__ = n3, i4.u = u5, r2.__H.__h.push(i4));
|
|
17685
17615
|
}
|
|
17686
17616
|
function A2(n3) {
|
|
17687
17617
|
return o2 = 5, T2(function() {
|
|
@@ -17698,13 +17628,11 @@ ${text2}</tr>
|
|
|
17698
17628
|
}, t4);
|
|
17699
17629
|
}
|
|
17700
17630
|
function j2() {
|
|
17701
|
-
for (var n3; n3 = f2.shift(); )
|
|
17702
|
-
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
n3.__H.__h = [], c2.__e(t4, n3.__v);
|
|
17707
|
-
}
|
|
17631
|
+
for (var n3; n3 = f2.shift(); ) if (n3.__P && n3.__H) try {
|
|
17632
|
+
n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
|
|
17633
|
+
} catch (t4) {
|
|
17634
|
+
n3.__H.__h = [], c2.__e(t4, n3.__v);
|
|
17635
|
+
}
|
|
17708
17636
|
}
|
|
17709
17637
|
c2.__b = function(n3) {
|
|
17710
17638
|
r2 = null, e2 && e2(n3);
|
|
@@ -17712,10 +17640,10 @@ ${text2}</tr>
|
|
|
17712
17640
|
n3 && t4.__k && t4.__k.__m && (n3.__m = t4.__k.__m), s2 && s2(n3, t4);
|
|
17713
17641
|
}, c2.__r = function(n3) {
|
|
17714
17642
|
a2 && a2(n3), t2 = 0;
|
|
17715
|
-
var
|
|
17716
|
-
|
|
17643
|
+
var i4 = (r2 = n3.__c).__H;
|
|
17644
|
+
i4 && (u2 === r2 ? (i4.__h = [], r2.__h = [], i4.__.forEach(function(n4) {
|
|
17717
17645
|
n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
|
|
17718
|
-
})) : (
|
|
17646
|
+
})) : (i4.__h.forEach(z2), i4.__h.forEach(B2), i4.__h = [], t2 = 0)), u2 = r2;
|
|
17719
17647
|
}, c2.diffed = function(n3) {
|
|
17720
17648
|
v2 && v2(n3);
|
|
17721
17649
|
var t4 = n3.__c;
|
|
@@ -17771,17 +17699,12 @@ ${text2}</tr>
|
|
|
17771
17699
|
|
|
17772
17700
|
// node_modules/preact/compat/dist/compat.module.js
|
|
17773
17701
|
function g3(n3, t4) {
|
|
17774
|
-
for (var e4 in t4)
|
|
17775
|
-
n3[e4] = t4[e4];
|
|
17702
|
+
for (var e4 in t4) n3[e4] = t4[e4];
|
|
17776
17703
|
return n3;
|
|
17777
17704
|
}
|
|
17778
17705
|
function E2(n3, t4) {
|
|
17779
|
-
for (var e4 in n3)
|
|
17780
|
-
|
|
17781
|
-
return true;
|
|
17782
|
-
for (var r4 in t4)
|
|
17783
|
-
if ("__source" !== r4 && n3[r4] !== t4[r4])
|
|
17784
|
-
return true;
|
|
17706
|
+
for (var e4 in n3) if ("__source" !== e4 && !(e4 in t4)) return true;
|
|
17707
|
+
for (var r4 in t4) if ("__source" !== r4 && n3[r4] !== t4[r4]) return true;
|
|
17785
17708
|
return false;
|
|
17786
17709
|
}
|
|
17787
17710
|
function N2(n3, t4) {
|
|
@@ -17794,13 +17717,11 @@ ${text2}</tr>
|
|
|
17794
17717
|
l.__b = function(n3) {
|
|
17795
17718
|
n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), T3 && T3(n3);
|
|
17796
17719
|
};
|
|
17797
|
-
var A3 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
17720
|
+
var A3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
17798
17721
|
var F3 = l.__e;
|
|
17799
17722
|
l.__e = function(n3, t4, e4, r4) {
|
|
17800
17723
|
if (n3.then) {
|
|
17801
|
-
for (var u5, o4 = t4; o4 = o4.__; )
|
|
17802
|
-
if ((u5 = o4.__c) && u5.__c)
|
|
17803
|
-
return null == t4.__e && (t4.__e = e4.__e, t4.__k = e4.__k), u5.__c(n3, t4);
|
|
17724
|
+
for (var u5, o4 = t4; o4 = o4.__; ) if ((u5 = o4.__c) && u5.__c) return null == t4.__e && (t4.__e = e4.__e, t4.__k = e4.__k), u5.__c(n3, t4);
|
|
17804
17725
|
}
|
|
17805
17726
|
F3(n3, t4, e4, r4);
|
|
17806
17727
|
};
|
|
@@ -17833,10 +17754,10 @@ ${text2}</tr>
|
|
|
17833
17754
|
}, (P3.prototype = new x()).__c = function(n3, t4) {
|
|
17834
17755
|
var e4 = t4.__c, r4 = this;
|
|
17835
17756
|
null == r4.o && (r4.o = []), r4.o.push(e4);
|
|
17836
|
-
var u5 = j3(r4.__v), o4 = false,
|
|
17757
|
+
var u5 = j3(r4.__v), o4 = false, i4 = function() {
|
|
17837
17758
|
o4 || (o4 = true, e4.__R = null, u5 ? u5(l4) : l4());
|
|
17838
17759
|
};
|
|
17839
|
-
e4.__R =
|
|
17760
|
+
e4.__R = i4;
|
|
17840
17761
|
var l4 = function() {
|
|
17841
17762
|
if (!--r4.__u) {
|
|
17842
17763
|
if (r4.state.__a) {
|
|
@@ -17844,11 +17765,10 @@ ${text2}</tr>
|
|
|
17844
17765
|
r4.__v.__k[0] = W(n4, n4.__c.__P, n4.__c.__O);
|
|
17845
17766
|
}
|
|
17846
17767
|
var t5;
|
|
17847
|
-
for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); )
|
|
17848
|
-
t5.forceUpdate();
|
|
17768
|
+
for (r4.setState({ __a: r4.__b = null }); t5 = r4.o.pop(); ) t5.forceUpdate();
|
|
17849
17769
|
}
|
|
17850
17770
|
};
|
|
17851
|
-
r4.__u++ || 32 & t4.__u || r4.setState({ __a: r4.__b = r4.__v.__k[0] }), n3.then(
|
|
17771
|
+
r4.__u++ || 32 & t4.__u || r4.setState({ __a: r4.__b = r4.__v.__k[0] }), n3.then(i4, i4);
|
|
17852
17772
|
}, P3.prototype.componentWillUnmount = function() {
|
|
17853
17773
|
this.o = [];
|
|
17854
17774
|
}, P3.prototype.render = function(n3, e4) {
|
|
@@ -17859,18 +17779,15 @@ ${text2}</tr>
|
|
|
17859
17779
|
}
|
|
17860
17780
|
this.__b = null;
|
|
17861
17781
|
}
|
|
17862
|
-
var
|
|
17863
|
-
return
|
|
17782
|
+
var i4 = e4.__a && _(k, null, n3.fallback);
|
|
17783
|
+
return i4 && (i4.__u &= -33), [_(k, null, e4.__a ? null : n3.children), i4];
|
|
17864
17784
|
};
|
|
17865
17785
|
var H2 = function(n3, t4, e4) {
|
|
17866
|
-
if (++e4[1] === e4[0] && n3.l.delete(t4), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size))
|
|
17867
|
-
for (e4
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
break;
|
|
17872
|
-
n3.i = e4 = e4[2];
|
|
17873
|
-
}
|
|
17786
|
+
if (++e4[1] === e4[0] && n3.l.delete(t4), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size)) for (e4 = n3.i; e4; ) {
|
|
17787
|
+
for (; e4.length > 3; ) e4.pop()();
|
|
17788
|
+
if (e4[1] < e4[0]) break;
|
|
17789
|
+
n3.i = e4 = e4[2];
|
|
17790
|
+
}
|
|
17874
17791
|
};
|
|
17875
17792
|
(B3.prototype = new x()).__a = function(n3) {
|
|
17876
17793
|
var t4 = this, e4 = j3(t4.__v), r4 = t4.l.get(n3);
|
|
@@ -17884,8 +17801,7 @@ ${text2}</tr>
|
|
|
17884
17801
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
17885
17802
|
var t4 = H(n3.children);
|
|
17886
17803
|
n3.revealOrder && "b" === n3.revealOrder[0] && t4.reverse();
|
|
17887
|
-
for (var e4 = t4.length; e4--; )
|
|
17888
|
-
this.l.set(t4[e4], this.i = [1, 0, this.i]);
|
|
17804
|
+
for (var e4 = t4.length; e4--; ) this.l.set(t4[e4], this.i = [1, 0, this.i]);
|
|
17889
17805
|
return n3.children;
|
|
17890
17806
|
}, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
|
|
17891
17807
|
var n3 = this;
|
|
@@ -17893,13 +17809,13 @@ ${text2}</tr>
|
|
|
17893
17809
|
H2(n3, e4, t4);
|
|
17894
17810
|
});
|
|
17895
17811
|
};
|
|
17896
|
-
var q3 = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
|
|
17812
|
+
var q3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103;
|
|
17897
17813
|
var G2 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
|
|
17898
17814
|
var J2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
|
|
17899
17815
|
var K2 = /[A-Z0-9]/g;
|
|
17900
17816
|
var Q2 = "undefined" != typeof document;
|
|
17901
17817
|
var X = function(n3) {
|
|
17902
|
-
return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
|
|
17818
|
+
return ("undefined" != typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
|
|
17903
17819
|
};
|
|
17904
17820
|
function nn(n3, t4, e4) {
|
|
17905
17821
|
return null == t4.__k && (t4.textContent = ""), G(n3, t4), "function" == typeof e4 && e4(), n3 ? n3.__c : null;
|
|
@@ -17929,13 +17845,13 @@ ${text2}</tr>
|
|
|
17929
17845
|
} };
|
|
17930
17846
|
var fn2 = l.vnode;
|
|
17931
17847
|
l.vnode = function(n3) {
|
|
17932
|
-
"string" == typeof n3.type && function(n4) {
|
|
17848
|
+
"string" == typeof n3.type && (function(n4) {
|
|
17933
17849
|
var t4 = n4.props, e4 = n4.type, u5 = {}, o4 = -1 === e4.indexOf("-");
|
|
17934
|
-
for (var
|
|
17935
|
-
var l4 = t4[
|
|
17936
|
-
if (!("value" ===
|
|
17937
|
-
var c4 =
|
|
17938
|
-
"defaultValue" ===
|
|
17850
|
+
for (var i4 in t4) {
|
|
17851
|
+
var l4 = t4[i4];
|
|
17852
|
+
if (!("value" === i4 && "defaultValue" in t4 && null == l4 || Q2 && "children" === i4 && "noscript" === e4 || "class" === i4 || "className" === i4)) {
|
|
17853
|
+
var c4 = i4.toLowerCase();
|
|
17854
|
+
"defaultValue" === i4 && "value" in t4 && null == t4.value ? i4 = "value" : "download" === i4 && true === l4 ? l4 = "" : "translate" === c4 && "no" === l4 ? l4 = false : "o" === c4[0] && "n" === c4[1] ? "ondoubleclick" === c4 ? i4 = "ondblclick" : "onchange" !== c4 || "input" !== e4 && "textarea" !== e4 || X(t4.type) ? "onfocus" === c4 ? i4 = "onfocusin" : "onblur" === c4 ? i4 = "onfocusout" : J2.test(i4) && (i4 = c4) : c4 = i4 = "oninput" : o4 && G2.test(i4) ? i4 = i4.replace(K2, "-$&").toLowerCase() : null === l4 && (l4 = void 0), "oninput" === c4 && u5[i4 = c4] && (i4 = "oninputCapture"), u5[i4] = l4;
|
|
17939
17855
|
}
|
|
17940
17856
|
}
|
|
17941
17857
|
"select" == e4 && u5.multiple && Array.isArray(u5.value) && (u5.value = H(t4.children).forEach(function(n5) {
|
|
@@ -17943,7 +17859,7 @@ ${text2}</tr>
|
|
|
17943
17859
|
})), "select" == e4 && null != u5.defaultValue && (u5.value = H(t4.children).forEach(function(n5) {
|
|
17944
17860
|
n5.props.selected = u5.multiple ? -1 != u5.defaultValue.indexOf(n5.props.value) : u5.defaultValue == n5.props.value;
|
|
17945
17861
|
})), t4.class && !t4.className ? (u5.class = t4.class, Object.defineProperty(u5, "className", cn)) : (t4.className && !t4.class || t4.class && t4.className) && (u5.class = u5.className = t4.className), n4.props = u5;
|
|
17946
|
-
}(n3), n3.$$typeof = q3, fn2 && fn2(n3);
|
|
17862
|
+
})(n3), n3.$$typeof = q3, fn2 && fn2(n3);
|
|
17947
17863
|
};
|
|
17948
17864
|
var an = l.__r;
|
|
17949
17865
|
l.__r = function(n3) {
|
|
@@ -18277,8 +18193,8 @@ ${text2}</tr>
|
|
|
18277
18193
|
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
18278
18194
|
var nanoid = (size = 21) => {
|
|
18279
18195
|
let id2 = "";
|
|
18280
|
-
let
|
|
18281
|
-
while (
|
|
18196
|
+
let i4 = size | 0;
|
|
18197
|
+
while (i4--) {
|
|
18282
18198
|
id2 += urlAlphabet[Math.random() * 64 | 0];
|
|
18283
18199
|
}
|
|
18284
18200
|
return id2;
|
|
@@ -19381,7 +19297,7 @@ ${text2}</tr>
|
|
|
19381
19297
|
// - We must throttle at around >500ms to avoid performance lags.
|
|
19382
19298
|
// [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
|
|
19383
19299
|
#updateTotalProgressThrottled = (0, import_throttle.default)(() => this.#updateTotalProgress(), 500, { leading: true, trailing: true });
|
|
19384
|
-
[Symbol.for("uppy test: updateTotalProgress")]() {
|
|
19300
|
+
[/* @__PURE__ */ Symbol.for("uppy test: updateTotalProgress")]() {
|
|
19385
19301
|
return this.#updateTotalProgress();
|
|
19386
19302
|
}
|
|
19387
19303
|
#calculateTotalProgress() {
|
|
@@ -19632,7 +19548,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
19632
19548
|
}
|
|
19633
19549
|
return void 0;
|
|
19634
19550
|
}
|
|
19635
|
-
[Symbol.for("uppy test: getPlugins")](type) {
|
|
19551
|
+
[/* @__PURE__ */ Symbol.for("uppy test: getPlugins")](type) {
|
|
19636
19552
|
return this.#plugins[type];
|
|
19637
19553
|
}
|
|
19638
19554
|
/**
|
|
@@ -19783,7 +19699,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
19783
19699
|
});
|
|
19784
19700
|
return uploadID;
|
|
19785
19701
|
}
|
|
19786
|
-
[Symbol.for("uppy test: createUpload")](...args) {
|
|
19702
|
+
[/* @__PURE__ */ Symbol.for("uppy test: createUpload")](...args) {
|
|
19787
19703
|
return this.#createUpload(...args);
|
|
19788
19704
|
}
|
|
19789
19705
|
#getUpload(uploadID) {
|
|
@@ -19946,17 +19862,12 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
19946
19862
|
|
|
19947
19863
|
// node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
19948
19864
|
var f3 = 0;
|
|
19949
|
-
|
|
19950
|
-
function u3(e4, t4, n3, o4, i5, u5) {
|
|
19865
|
+
function u3(e4, t4, n3, o4, i4, u5) {
|
|
19951
19866
|
t4 || (t4 = {});
|
|
19952
19867
|
var a4, c4, p4 = t4;
|
|
19953
|
-
if ("ref" in p4)
|
|
19954
|
-
|
|
19955
|
-
|
|
19956
|
-
var l4 = { type: e4, props: p4, key: n3, ref: a4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f3, __i: -1, __u: 0, __source: i5, __self: u5 };
|
|
19957
|
-
if ("function" == typeof e4 && (a4 = e4.defaultProps))
|
|
19958
|
-
for (c4 in a4)
|
|
19959
|
-
void 0 === p4[c4] && (p4[c4] = a4[c4]);
|
|
19868
|
+
if ("ref" in p4) for (c4 in p4 = {}, t4) "ref" == c4 ? a4 = t4[c4] : p4[c4] = t4[c4];
|
|
19869
|
+
var l4 = { type: e4, props: p4, key: n3, ref: a4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f3, __i: -1, __u: 0, __source: i4, __self: u5 };
|
|
19870
|
+
if ("function" == typeof e4 && (a4 = e4.defaultProps)) for (c4 in a4) void 0 === p4[c4] && (p4[c4] = a4[c4]);
|
|
19960
19871
|
return l.vnode && l.vnode(l4), l4;
|
|
19961
19872
|
}
|
|
19962
19873
|
|
|
@@ -20048,10 +19959,10 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
20048
19959
|
}
|
|
20049
19960
|
function getChildMapping(children) {
|
|
20050
19961
|
const out = {};
|
|
20051
|
-
for (let
|
|
20052
|
-
if (children[
|
|
20053
|
-
const key = getKey(children[
|
|
20054
|
-
out[key] = children[
|
|
19962
|
+
for (let i4 = 0; i4 < children.length; i4++) {
|
|
19963
|
+
if (children[i4] != null) {
|
|
19964
|
+
const key = getKey(children[i4], i4.toString(36));
|
|
19965
|
+
out[key] = children[i4];
|
|
20055
19966
|
}
|
|
20056
19967
|
}
|
|
20057
19968
|
return out;
|
|
@@ -20075,19 +19986,19 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
20075
19986
|
const childMapping = {};
|
|
20076
19987
|
for (const nextKey in next) {
|
|
20077
19988
|
if (Object.hasOwn(nextKeysPending, nextKey)) {
|
|
20078
|
-
for (let
|
|
20079
|
-
const pendingNextKey = nextKeysPending[nextKey][
|
|
20080
|
-
childMapping[nextKeysPending[nextKey][
|
|
19989
|
+
for (let i4 = 0; i4 < nextKeysPending[nextKey].length; i4++) {
|
|
19990
|
+
const pendingNextKey = nextKeysPending[nextKey][i4];
|
|
19991
|
+
childMapping[nextKeysPending[nextKey][i4]] = getValueForKey(pendingNextKey);
|
|
20081
19992
|
}
|
|
20082
19993
|
}
|
|
20083
19994
|
childMapping[nextKey] = getValueForKey(nextKey);
|
|
20084
19995
|
}
|
|
20085
|
-
for (let
|
|
20086
|
-
childMapping[pendingKeys[
|
|
19996
|
+
for (let i4 = 0; i4 < pendingKeys.length; i4++) {
|
|
19997
|
+
childMapping[pendingKeys[i4]] = getValueForKey(pendingKeys[i4]);
|
|
20087
19998
|
}
|
|
20088
19999
|
return childMapping;
|
|
20089
20000
|
}
|
|
20090
|
-
var identity2 = (
|
|
20001
|
+
var identity2 = (i4) => i4;
|
|
20091
20002
|
var TransitionGroup = class extends x {
|
|
20092
20003
|
constructor(props, context) {
|
|
20093
20004
|
super(props, context);
|
|
@@ -20582,7 +20493,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
20582
20493
|
return true;
|
|
20583
20494
|
}
|
|
20584
20495
|
if (item.type === "folder" && item.status === "checked") {
|
|
20585
|
-
const doesItHaveChildren = partialTree.some((
|
|
20496
|
+
const doesItHaveChildren = partialTree.some((i4) => i4.type !== "root" && i4.parentId === item.id);
|
|
20586
20497
|
return !doesItHaveChildren;
|
|
20587
20498
|
}
|
|
20588
20499
|
return false;
|
|
@@ -20760,14 +20671,14 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
20760
20671
|
const checkedFiles = partialTree.filter((item) => item.type === "file" && item.status === "checked");
|
|
20761
20672
|
const companionFilesWithInjectedPaths = checkedFiles.map((file) => {
|
|
20762
20673
|
const absFolders = getPath(partialTree, file.id, cache2);
|
|
20763
|
-
const firstCheckedFolderIndex = absFolders.findIndex((
|
|
20674
|
+
const firstCheckedFolderIndex = absFolders.findIndex((i4) => i4.type === "folder" && i4.status === "checked");
|
|
20764
20675
|
const relFolders = absFolders.slice(firstCheckedFolderIndex);
|
|
20765
|
-
const absDirPath = `/${absFolders.map((
|
|
20676
|
+
const absDirPath = `/${absFolders.map((i4) => i4.data.name).join("/")}`;
|
|
20766
20677
|
const relDirPath = relFolders.length === 1 ? (
|
|
20767
20678
|
// Must return `undefined` (which later turns into `null` in `.getTagFile()`)
|
|
20768
20679
|
// (https://github.com/transloadit/uppy/pull/4537#issuecomment-1629136652)
|
|
20769
20680
|
void 0
|
|
20770
|
-
) : relFolders.map((
|
|
20681
|
+
) : relFolders.map((i4) => i4.data.name).join("/");
|
|
20771
20682
|
return {
|
|
20772
20683
|
...file.data,
|
|
20773
20684
|
absDirPath,
|
|
@@ -21277,8 +21188,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21277
21188
|
items = items.concat(response.items);
|
|
21278
21189
|
currentPath = response.nextPagePath;
|
|
21279
21190
|
}
|
|
21280
|
-
const newFolders = items.filter((
|
|
21281
|
-
const newFiles = items.filter((
|
|
21191
|
+
const newFolders = items.filter((i4) => i4.isFolder === true);
|
|
21192
|
+
const newFiles = items.filter((i4) => i4.isFolder === false);
|
|
21282
21193
|
const folders = newFolders.map((folder) => ({
|
|
21283
21194
|
type: "folder",
|
|
21284
21195
|
id: folder.requestPath,
|
|
@@ -21315,7 +21226,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21315
21226
|
queue.add(() => recursivelyFetch(queue, poorTree, poorFolder, apiList, validateSingleFile));
|
|
21316
21227
|
});
|
|
21317
21228
|
queue.on("completed", () => {
|
|
21318
|
-
const nOfFilesChecked = poorTree.filter((
|
|
21229
|
+
const nOfFilesChecked = poorTree.filter((i4) => i4.type === "file" && i4.status === "checked").length;
|
|
21319
21230
|
reportProgress(nOfFilesChecked);
|
|
21320
21231
|
});
|
|
21321
21232
|
await queue.onIdle();
|
|
@@ -21325,8 +21236,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21325
21236
|
|
|
21326
21237
|
// node_modules/@uppy/provider-views/lib/utils/PartialTreeUtils/afterOpenFolder.js
|
|
21327
21238
|
var afterOpenFolder = (oldPartialTree, discoveredItems, clickedFolder, currentPagePath, validateSingleFile) => {
|
|
21328
|
-
const discoveredFolders = discoveredItems.filter((
|
|
21329
|
-
const discoveredFiles = discoveredItems.filter((
|
|
21239
|
+
const discoveredFolders = discoveredItems.filter((i4) => i4.isFolder === true);
|
|
21240
|
+
const discoveredFiles = discoveredItems.filter((i4) => i4.isFolder === false);
|
|
21330
21241
|
const isParentFolderChecked = clickedFolder.type === "folder" && clickedFolder.status === "checked";
|
|
21331
21242
|
const folders = discoveredFolders.map((folder) => ({
|
|
21332
21243
|
type: "folder",
|
|
@@ -21365,9 +21276,9 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21365
21276
|
|
|
21366
21277
|
// node_modules/@uppy/provider-views/lib/utils/PartialTreeUtils/afterScrollFolder.js
|
|
21367
21278
|
var afterScrollFolder = (oldPartialTree, currentFolderId, items, nextPagePath, validateSingleFile) => {
|
|
21368
|
-
const currentFolder = oldPartialTree.find((
|
|
21369
|
-
const newFolders = items.filter((
|
|
21370
|
-
const newFiles = items.filter((
|
|
21279
|
+
const currentFolder = oldPartialTree.find((i4) => i4.id === currentFolderId);
|
|
21280
|
+
const newFolders = items.filter((i4) => i4.isFolder === true);
|
|
21281
|
+
const newFiles = items.filter((i4) => i4.isFolder === false);
|
|
21371
21282
|
const scrolledFolder = { ...currentFolder, nextPagePath };
|
|
21372
21283
|
const partialTreeWithUpdatedScrolledFolder = oldPartialTree.map((folder) => folder.id === scrolledFolder.id ? scrolledFolder : folder);
|
|
21373
21284
|
const isParentFolderChecked = scrolledFolder.type === "folder" && scrolledFolder.status === "checked";
|
|
@@ -21642,7 +21553,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21642
21553
|
}
|
|
21643
21554
|
async handleScroll(event) {
|
|
21644
21555
|
const { partialTree, currentFolderId } = this.plugin.getPluginState();
|
|
21645
|
-
const currentFolder = partialTree.find((
|
|
21556
|
+
const currentFolder = partialTree.find((i4) => i4.id === currentFolderId);
|
|
21646
21557
|
if (shouldHandleScroll_default(event) && !this.isHandlingScroll && currentFolder.nextPagePath) {
|
|
21647
21558
|
this.isHandlingScroll = true;
|
|
21648
21559
|
await this.#withAbort(async (signal) => {
|
|
@@ -21816,7 +21727,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21816
21727
|
}
|
|
21817
21728
|
async handleScroll(event) {
|
|
21818
21729
|
const { partialTree, searchString } = this.plugin.getPluginState();
|
|
21819
|
-
const root = partialTree.find((
|
|
21730
|
+
const root = partialTree.find((i4) => i4.type === "root");
|
|
21820
21731
|
if (shouldHandleScroll_default(event) && !this.isHandlingScroll && root.nextPagePath) {
|
|
21821
21732
|
this.isHandlingScroll = true;
|
|
21822
21733
|
try {
|
|
@@ -21825,7 +21736,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
21825
21736
|
...root,
|
|
21826
21737
|
nextPagePath: response.nextPageQuery
|
|
21827
21738
|
};
|
|
21828
|
-
const oldItems = partialTree.filter((
|
|
21739
|
+
const oldItems = partialTree.filter((i4) => i4.type !== "root");
|
|
21829
21740
|
const newPartialTree = [
|
|
21830
21741
|
newRoot,
|
|
21831
21742
|
...oldItems,
|
|
@@ -22273,8 +22184,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22273
22184
|
}
|
|
22274
22185
|
let state = StatusBarStates_default.STATE_WAITING;
|
|
22275
22186
|
const fileIDs = Object.keys(files);
|
|
22276
|
-
for (let
|
|
22277
|
-
const { progress } = files[fileIDs[
|
|
22187
|
+
for (let i4 = 0; i4 < fileIDs.length; i4++) {
|
|
22188
|
+
const { progress } = files[fileIDs[i4]];
|
|
22278
22189
|
if (progress.uploadStarted && !progress.uploadComplete) {
|
|
22279
22190
|
return StatusBarStates_default.STATE_UPLOADING;
|
|
22280
22191
|
}
|
|
@@ -22341,8 +22252,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22341
22252
|
return Math.round(filteredETA / 100) / 10;
|
|
22342
22253
|
}
|
|
22343
22254
|
startUpload = () => {
|
|
22344
|
-
return this.uppy.upload().catch(() => {
|
|
22345
|
-
});
|
|
22255
|
+
return this.uppy.upload().catch((() => {
|
|
22256
|
+
}));
|
|
22346
22257
|
};
|
|
22347
22258
|
render(state) {
|
|
22348
22259
|
const { capabilities, files, allowNewUpload, totalProgress, error: error2, recoveredState } = state;
|
|
@@ -22442,8 +22353,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22442
22353
|
if (dataURIData?.[2] != null) {
|
|
22443
22354
|
const binary = atob(decodeURIComponent(dataURIData[3]));
|
|
22444
22355
|
const bytes = new Uint8Array(binary.length);
|
|
22445
|
-
for (let
|
|
22446
|
-
bytes[
|
|
22356
|
+
for (let i4 = 0; i4 < binary.length; i4++) {
|
|
22357
|
+
bytes[i4] = binary.charCodeAt(i4);
|
|
22447
22358
|
}
|
|
22448
22359
|
data = [bytes];
|
|
22449
22360
|
} else if (dataURIData?.[3] != null) {
|
|
@@ -22474,7 +22385,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22474
22385
|
}
|
|
22475
22386
|
var t3 = "undefined" != typeof self ? self : global;
|
|
22476
22387
|
var s3 = "undefined" != typeof navigator;
|
|
22477
|
-
var
|
|
22388
|
+
var i3 = s3 && "undefined" == typeof HTMLImageElement;
|
|
22478
22389
|
var n2 = !("undefined" == typeof global || "undefined" == typeof process || !process.versions || !process.versions.node);
|
|
22479
22390
|
var r3 = t3.Buffer;
|
|
22480
22391
|
var a3 = !!r3;
|
|
@@ -22487,10 +22398,10 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22487
22398
|
throw delete t4.stack, t4;
|
|
22488
22399
|
}
|
|
22489
22400
|
function o3(e4) {
|
|
22490
|
-
let t4 = function(e5) {
|
|
22401
|
+
let t4 = (function(e5) {
|
|
22491
22402
|
let t5 = 0;
|
|
22492
22403
|
return e5.ifd0.enabled && (t5 += 1024), e5.exif.enabled && (t5 += 2048), e5.makerNote && (t5 += 2048), e5.userComment && (t5 += 1024), e5.gps.enabled && (t5 += 512), e5.interop.enabled && (t5 += 100), e5.ifd1.enabled && (t5 += 1024), t5 + 2048;
|
|
22493
|
-
}(e4);
|
|
22404
|
+
})(e4);
|
|
22494
22405
|
return e4.jfif.enabled && (t4 += 50), e4.xmp.enabled && (t4 += 2e4), e4.iptc.enabled && (t4 += 14e3), e4.icc.enabled && (t4 += 6e3), t4;
|
|
22495
22406
|
}
|
|
22496
22407
|
var u4 = (e4) => String.fromCharCode.apply(null, e4);
|
|
@@ -22499,22 +22410,20 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22499
22410
|
static from(e4, t4) {
|
|
22500
22411
|
return e4 instanceof this && e4.le === t4 ? e4 : new _c(e4, void 0, void 0, t4);
|
|
22501
22412
|
}
|
|
22502
|
-
constructor(e4, t4 = 0, s4,
|
|
22503
|
-
if ("boolean" == typeof
|
|
22504
|
-
this.byteOffset = 0, this.byteLength = 0;
|
|
22413
|
+
constructor(e4, t4 = 0, s4, i4) {
|
|
22414
|
+
if ("boolean" == typeof i4 && (this.le = i4), Array.isArray(e4) && (e4 = new Uint8Array(e4)), 0 === e4) this.byteOffset = 0, this.byteLength = 0;
|
|
22505
22415
|
else if (e4 instanceof ArrayBuffer) {
|
|
22506
22416
|
void 0 === s4 && (s4 = e4.byteLength - t4);
|
|
22507
|
-
let
|
|
22508
|
-
this._swapDataView(
|
|
22417
|
+
let i5 = new DataView(e4, t4, s4);
|
|
22418
|
+
this._swapDataView(i5);
|
|
22509
22419
|
} else if (e4 instanceof Uint8Array || e4 instanceof DataView || e4 instanceof _c) {
|
|
22510
22420
|
void 0 === s4 && (s4 = e4.byteLength - t4), (t4 += e4.byteOffset) + s4 > e4.byteOffset + e4.byteLength && l3("Creating view outside of available memory in ArrayBuffer");
|
|
22511
|
-
let
|
|
22512
|
-
this._swapDataView(
|
|
22421
|
+
let i5 = new DataView(e4.buffer, t4, s4);
|
|
22422
|
+
this._swapDataView(i5);
|
|
22513
22423
|
} else if ("number" == typeof e4) {
|
|
22514
22424
|
let t5 = new DataView(new ArrayBuffer(e4));
|
|
22515
22425
|
this._swapDataView(t5);
|
|
22516
|
-
} else
|
|
22517
|
-
l3("Invalid input argument for BufferView: " + e4);
|
|
22426
|
+
} else l3("Invalid input argument for BufferView: " + e4);
|
|
22518
22427
|
}
|
|
22519
22428
|
_swapArrayBuffer(e4) {
|
|
22520
22429
|
this._swapDataView(new DataView(e4));
|
|
@@ -22542,8 +22451,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22542
22451
|
}
|
|
22543
22452
|
getString(e4 = 0, t4 = this.byteLength) {
|
|
22544
22453
|
let s4 = this.getUint8Array(e4, t4);
|
|
22545
|
-
return
|
|
22546
|
-
var
|
|
22454
|
+
return i4 = s4, d3 ? d3.decode(i4) : a3 ? Buffer.from(i4).toString("utf8") : decodeURIComponent(escape(u4(i4)));
|
|
22455
|
+
var i4;
|
|
22547
22456
|
}
|
|
22548
22457
|
getLatin1String(e4 = 0, t4 = this.byteLength) {
|
|
22549
22458
|
let s4 = this.getUint8Array(e4, t4);
|
|
@@ -22551,8 +22460,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22551
22460
|
}
|
|
22552
22461
|
getUnicodeString(e4 = 0, t4 = this.byteLength) {
|
|
22553
22462
|
const s4 = [];
|
|
22554
|
-
for (let
|
|
22555
|
-
s4.push(this.getUint16(e4 + i5));
|
|
22463
|
+
for (let i4 = 0; i4 < t4 && e4 + i4 < this.byteLength; i4 += 2) s4.push(this.getUint16(e4 + i4));
|
|
22556
22464
|
return u4(s4);
|
|
22557
22465
|
}
|
|
22558
22466
|
getInt8(e4) {
|
|
@@ -22623,9 +22531,9 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22623
22531
|
super(), this.kind = e4;
|
|
22624
22532
|
}
|
|
22625
22533
|
get(e4, t4) {
|
|
22626
|
-
return this.has(e4) || p3(this.kind, e4), t4 && (e4 in t4 || function(e5, t5) {
|
|
22534
|
+
return this.has(e4) || p3(this.kind, e4), t4 && (e4 in t4 || (function(e5, t5) {
|
|
22627
22535
|
l3(`Unknown ${e5} '${t5}'.`);
|
|
22628
|
-
}(this.kind, e4), t4[e4].enabled || p3(this.kind, e4)), super.get(e4);
|
|
22536
|
+
})(this.kind, e4), t4[e4].enabled || p3(this.kind, e4)), super.get(e4);
|
|
22629
22537
|
}
|
|
22630
22538
|
keyList() {
|
|
22631
22539
|
return Array.from(this.keys());
|
|
@@ -22636,24 +22544,24 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22636
22544
|
var b2 = new g4("file reader");
|
|
22637
22545
|
var w3 = t3.fetch;
|
|
22638
22546
|
function k3(e4, t4) {
|
|
22639
|
-
return (
|
|
22640
|
-
var
|
|
22547
|
+
return (i4 = e4).startsWith("data:") || i4.length > 1e4 ? v3(e4, t4, "base64") : n2 && e4.includes("://") ? O2(e4, t4, "url", S2) : n2 ? v3(e4, t4, "fs") : s3 ? O2(e4, t4, "url", S2) : void l3("Invalid input argument");
|
|
22548
|
+
var i4;
|
|
22641
22549
|
}
|
|
22642
|
-
async function O2(e4, t4, s4,
|
|
22643
|
-
return b2.has(s4) ? v3(e4, t4, s4) :
|
|
22550
|
+
async function O2(e4, t4, s4, i4) {
|
|
22551
|
+
return b2.has(s4) ? v3(e4, t4, s4) : i4 ? (async function(e5, t5) {
|
|
22644
22552
|
let s5 = await t5(e5);
|
|
22645
22553
|
return new c3(s5);
|
|
22646
|
-
}(e4,
|
|
22554
|
+
})(e4, i4) : void l3(`Parser ${s4} is not loaded`);
|
|
22647
22555
|
}
|
|
22648
22556
|
async function v3(e4, t4, s4) {
|
|
22649
|
-
let
|
|
22650
|
-
return await
|
|
22651
|
-
}
|
|
22652
|
-
var S2 = (e4) => w3(e4).then((e5) => e5.arrayBuffer());
|
|
22653
|
-
var A4 = (e4) => new Promise((t4, s4) => {
|
|
22654
|
-
let
|
|
22655
|
-
|
|
22656
|
-
});
|
|
22557
|
+
let i4 = new (b2.get(s4))(e4, t4);
|
|
22558
|
+
return await i4.read(), i4;
|
|
22559
|
+
}
|
|
22560
|
+
var S2 = (e4) => w3(e4).then(((e5) => e5.arrayBuffer()));
|
|
22561
|
+
var A4 = (e4) => new Promise(((t4, s4) => {
|
|
22562
|
+
let i4 = new FileReader();
|
|
22563
|
+
i4.onloadend = () => t4(i4.result || new ArrayBuffer()), i4.onerror = s4, i4.readAsArrayBuffer(e4);
|
|
22564
|
+
}));
|
|
22657
22565
|
var U2 = class extends Map {
|
|
22658
22566
|
get tagKeys() {
|
|
22659
22567
|
return this.allKeys || (this.allKeys = Array.from(this.keys())), this.allKeys;
|
|
@@ -22663,20 +22571,15 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22663
22571
|
}
|
|
22664
22572
|
};
|
|
22665
22573
|
function x3(e4, t4, s4) {
|
|
22666
|
-
let
|
|
22667
|
-
for (let [e5, t5] of s4)
|
|
22668
|
-
|
|
22669
|
-
|
|
22670
|
-
|
|
22671
|
-
e4.set(s5, i5);
|
|
22672
|
-
else
|
|
22673
|
-
e4.set(t4, i5);
|
|
22674
|
-
return i5;
|
|
22574
|
+
let i4 = new U2();
|
|
22575
|
+
for (let [e5, t5] of s4) i4.set(e5, t5);
|
|
22576
|
+
if (Array.isArray(t4)) for (let s5 of t4) e4.set(s5, i4);
|
|
22577
|
+
else e4.set(t4, i4);
|
|
22578
|
+
return i4;
|
|
22675
22579
|
}
|
|
22676
22580
|
function C3(e4, t4, s4) {
|
|
22677
|
-
let
|
|
22678
|
-
for (
|
|
22679
|
-
n3.set(i5[0], i5[1]);
|
|
22581
|
+
let i4, n3 = e4.get(t4);
|
|
22582
|
+
for (i4 of s4) n3.set(i4[0], i4[1]);
|
|
22680
22583
|
}
|
|
22681
22584
|
var B4 = /* @__PURE__ */ new Map();
|
|
22682
22585
|
var V3 = /* @__PURE__ */ new Map();
|
|
@@ -22698,32 +22601,25 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22698
22601
|
get needed() {
|
|
22699
22602
|
return this.enabled || this.deps.size > 0;
|
|
22700
22603
|
}
|
|
22701
|
-
constructor(t4, s4,
|
|
22702
|
-
if (super(), e3(this, "enabled", false), e3(this, "skip", /* @__PURE__ */ new Set()), e3(this, "pick", /* @__PURE__ */ new Set()), e3(this, "deps", /* @__PURE__ */ new Set()), e3(this, "translateKeys", false), e3(this, "translateValues", false), e3(this, "reviveValues", false), this.key = t4, this.enabled = s4, this.parse = this.enabled, this.applyInheritables(n3), this.canBeFiltered = P4.includes(t4), this.canBeFiltered && (this.dict = B4.get(t4)), void 0 !==
|
|
22703
|
-
|
|
22704
|
-
|
|
22705
|
-
|
|
22706
|
-
|
|
22707
|
-
|
|
22708
|
-
|
|
22709
|
-
|
|
22710
|
-
this.applyInheritables(i5);
|
|
22711
|
-
} else
|
|
22712
|
-
true === i5 || false === i5 ? this.parse = this.enabled = i5 : l3(`Invalid options argument: ${i5}`);
|
|
22604
|
+
constructor(t4, s4, i4, n3) {
|
|
22605
|
+
if (super(), e3(this, "enabled", false), e3(this, "skip", /* @__PURE__ */ new Set()), e3(this, "pick", /* @__PURE__ */ new Set()), e3(this, "deps", /* @__PURE__ */ new Set()), e3(this, "translateKeys", false), e3(this, "translateValues", false), e3(this, "reviveValues", false), this.key = t4, this.enabled = s4, this.parse = this.enabled, this.applyInheritables(n3), this.canBeFiltered = P4.includes(t4), this.canBeFiltered && (this.dict = B4.get(t4)), void 0 !== i4) if (Array.isArray(i4)) this.parse = this.enabled = true, this.canBeFiltered && i4.length > 0 && this.translateTagSet(i4, this.pick);
|
|
22606
|
+
else if ("object" == typeof i4) {
|
|
22607
|
+
if (this.enabled = true, this.parse = false !== i4.parse, this.canBeFiltered) {
|
|
22608
|
+
let { pick: e4, skip: t5 } = i4;
|
|
22609
|
+
e4 && e4.length > 0 && this.translateTagSet(e4, this.pick), t5 && t5.length > 0 && this.translateTagSet(t5, this.skip);
|
|
22610
|
+
}
|
|
22611
|
+
this.applyInheritables(i4);
|
|
22612
|
+
} else true === i4 || false === i4 ? this.parse = this.enabled = i4 : l3(`Invalid options argument: ${i4}`);
|
|
22713
22613
|
}
|
|
22714
22614
|
applyInheritables(e4) {
|
|
22715
22615
|
let t4, s4;
|
|
22716
|
-
for (t4 of E3)
|
|
22717
|
-
s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
|
|
22616
|
+
for (t4 of E3) s4 = e4[t4], void 0 !== s4 && (this[t4] = s4);
|
|
22718
22617
|
}
|
|
22719
22618
|
translateTagSet(e4, t4) {
|
|
22720
22619
|
if (this.dict) {
|
|
22721
|
-
let s4,
|
|
22722
|
-
for (s4 of e4)
|
|
22723
|
-
|
|
22724
|
-
} else
|
|
22725
|
-
for (let s4 of e4)
|
|
22726
|
-
t4.add(s4);
|
|
22620
|
+
let s4, i4, { tagKeys: n3, tagValues: r4 } = this.dict;
|
|
22621
|
+
for (s4 of e4) "string" == typeof s4 ? (i4 = r4.indexOf(s4), -1 === i4 && (i4 = n3.indexOf(Number(s4))), -1 !== i4 && t4.add(Number(n3[i4]))) : t4.add(s4);
|
|
22622
|
+
} else for (let s4 of e4) t4.add(s4);
|
|
22727
22623
|
}
|
|
22728
22624
|
finalizeFilters() {
|
|
22729
22625
|
!this.enabled && this.deps.size > 0 ? (this.enabled = true, X2(this.pick, this.deps)) : this.enabled && this.pick.size > 0 && X2(this.pick, this.deps);
|
|
@@ -22741,55 +22637,37 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22741
22637
|
}
|
|
22742
22638
|
setupFromUndefined() {
|
|
22743
22639
|
let e4;
|
|
22744
|
-
for (e4 of L2)
|
|
22745
|
-
|
|
22746
|
-
for (e4 of
|
|
22747
|
-
|
|
22748
|
-
for (e4 of j4)
|
|
22749
|
-
this[e4] = N3[e4];
|
|
22750
|
-
for (e4 of F4)
|
|
22751
|
-
this[e4] = new D3(e4, N3[e4], void 0, this);
|
|
22640
|
+
for (e4 of L2) this[e4] = N3[e4];
|
|
22641
|
+
for (e4 of M2) this[e4] = N3[e4];
|
|
22642
|
+
for (e4 of j4) this[e4] = N3[e4];
|
|
22643
|
+
for (e4 of F4) this[e4] = new D3(e4, N3[e4], void 0, this);
|
|
22752
22644
|
}
|
|
22753
22645
|
setupFromTrue() {
|
|
22754
22646
|
let e4;
|
|
22755
|
-
for (e4 of L2)
|
|
22756
|
-
|
|
22757
|
-
for (e4 of
|
|
22758
|
-
|
|
22759
|
-
for (e4 of j4)
|
|
22760
|
-
this[e4] = true;
|
|
22761
|
-
for (e4 of F4)
|
|
22762
|
-
this[e4] = new D3(e4, true, void 0, this);
|
|
22647
|
+
for (e4 of L2) this[e4] = N3[e4];
|
|
22648
|
+
for (e4 of M2) this[e4] = N3[e4];
|
|
22649
|
+
for (e4 of j4) this[e4] = true;
|
|
22650
|
+
for (e4 of F4) this[e4] = new D3(e4, true, void 0, this);
|
|
22763
22651
|
}
|
|
22764
22652
|
setupFromArray(e4) {
|
|
22765
22653
|
let t4;
|
|
22766
|
-
for (t4 of L2)
|
|
22767
|
-
|
|
22768
|
-
for (t4 of
|
|
22769
|
-
|
|
22770
|
-
for (t4 of j4)
|
|
22771
|
-
this[t4] = N3[t4];
|
|
22772
|
-
for (t4 of F4)
|
|
22773
|
-
this[t4] = new D3(t4, false, void 0, this);
|
|
22654
|
+
for (t4 of L2) this[t4] = N3[t4];
|
|
22655
|
+
for (t4 of M2) this[t4] = N3[t4];
|
|
22656
|
+
for (t4 of j4) this[t4] = N3[t4];
|
|
22657
|
+
for (t4 of F4) this[t4] = new D3(t4, false, void 0, this);
|
|
22774
22658
|
this.setupGlobalFilters(e4, void 0, P4);
|
|
22775
22659
|
}
|
|
22776
22660
|
setupFromObject(e4) {
|
|
22777
22661
|
let t4;
|
|
22778
|
-
for (t4 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2))
|
|
22779
|
-
|
|
22780
|
-
for (t4 of
|
|
22781
|
-
|
|
22782
|
-
for (t4 of
|
|
22783
|
-
this[t4] = W2(e4[t4], N3[t4]);
|
|
22784
|
-
for (t4 of z3)
|
|
22785
|
-
this[t4] = new D3(t4, N3[t4], e4[t4], this);
|
|
22786
|
-
for (t4 of P4)
|
|
22787
|
-
this[t4] = new D3(t4, N3[t4], e4[t4], this.tiff);
|
|
22662
|
+
for (t4 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2)) this[t4] = W2(e4[t4], N3[t4]);
|
|
22663
|
+
for (t4 of M2) this[t4] = W2(e4[t4], N3[t4]);
|
|
22664
|
+
for (t4 of j4) this[t4] = W2(e4[t4], N3[t4]);
|
|
22665
|
+
for (t4 of z3) this[t4] = new D3(t4, N3[t4], e4[t4], this);
|
|
22666
|
+
for (t4 of P4) this[t4] = new D3(t4, N3[t4], e4[t4], this.tiff);
|
|
22788
22667
|
this.setupGlobalFilters(e4.pick, e4.skip, P4, F4), true === e4.tiff ? this.batchEnableWithBool(P4, true) : false === e4.tiff ? this.batchEnableWithUserValue(P4, e4) : Array.isArray(e4.tiff) ? this.setupGlobalFilters(e4.tiff, void 0, P4) : "object" == typeof e4.tiff && this.setupGlobalFilters(e4.tiff.pick, e4.tiff.skip, P4);
|
|
22789
22668
|
}
|
|
22790
22669
|
batchEnableWithBool(e4, t4) {
|
|
22791
|
-
for (let s4 of e4)
|
|
22792
|
-
this[s4].enabled = t4;
|
|
22670
|
+
for (let s4 of e4) this[s4].enabled = t4;
|
|
22793
22671
|
}
|
|
22794
22672
|
batchEnableWithUserValue(e4, t4) {
|
|
22795
22673
|
for (let s4 of e4) {
|
|
@@ -22797,43 +22675,37 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22797
22675
|
this[s4].enabled = false !== e5 && void 0 !== e5;
|
|
22798
22676
|
}
|
|
22799
22677
|
}
|
|
22800
|
-
setupGlobalFilters(e4, t4, s4,
|
|
22678
|
+
setupGlobalFilters(e4, t4, s4, i4 = s4) {
|
|
22801
22679
|
if (e4 && e4.length) {
|
|
22802
|
-
for (let e5 of
|
|
22803
|
-
this[e5].enabled = false;
|
|
22680
|
+
for (let e5 of i4) this[e5].enabled = false;
|
|
22804
22681
|
let t5 = K3(e4, s4);
|
|
22805
|
-
for (let [e5, s5] of t5)
|
|
22806
|
-
X2(this[e5].pick, s5), this[e5].enabled = true;
|
|
22682
|
+
for (let [e5, s5] of t5) X2(this[e5].pick, s5), this[e5].enabled = true;
|
|
22807
22683
|
} else if (t4 && t4.length) {
|
|
22808
22684
|
let e5 = K3(t4, s4);
|
|
22809
|
-
for (let [t5, s5] of e5)
|
|
22810
|
-
X2(this[t5].skip, s5);
|
|
22685
|
+
for (let [t5, s5] of e5) X2(this[t5].skip, s5);
|
|
22811
22686
|
}
|
|
22812
22687
|
}
|
|
22813
22688
|
filterNestedSegmentTags() {
|
|
22814
|
-
let { ifd0: e4, exif: t4, xmp: s4, iptc:
|
|
22815
|
-
this.makerNote ? t4.deps.add(37500) : t4.skip.add(37500), this.userComment ? t4.deps.add(37510) : t4.skip.add(37510), s4.enabled || e4.skip.add(700),
|
|
22689
|
+
let { ifd0: e4, exif: t4, xmp: s4, iptc: i4, icc: n3 } = this;
|
|
22690
|
+
this.makerNote ? t4.deps.add(37500) : t4.skip.add(37500), this.userComment ? t4.deps.add(37510) : t4.skip.add(37510), s4.enabled || e4.skip.add(700), i4.enabled || e4.skip.add(33723), n3.enabled || e4.skip.add(34675);
|
|
22816
22691
|
}
|
|
22817
22692
|
traverseTiffDependencyTree() {
|
|
22818
|
-
let { ifd0: e4, exif: t4, gps: s4, interop:
|
|
22819
|
-
|
|
22820
|
-
for (let e5 of P4)
|
|
22821
|
-
this[e5].finalizeFilters();
|
|
22693
|
+
let { ifd0: e4, exif: t4, gps: s4, interop: i4 } = this;
|
|
22694
|
+
i4.needed && (t4.deps.add(40965), e4.deps.add(40965)), t4.needed && e4.deps.add(34665), s4.needed && e4.deps.add(34853), this.tiff.enabled = P4.some(((e5) => true === this[e5].enabled)) || this.makerNote || this.userComment;
|
|
22695
|
+
for (let e5 of P4) this[e5].finalizeFilters();
|
|
22822
22696
|
}
|
|
22823
22697
|
get onlyTiff() {
|
|
22824
|
-
return !T4.map((e4) => this[e4].enabled).some((e4) => true === e4) && this.tiff.enabled;
|
|
22698
|
+
return !T4.map(((e4) => this[e4].enabled)).some(((e4) => true === e4)) && this.tiff.enabled;
|
|
22825
22699
|
}
|
|
22826
22700
|
checkLoadedPlugins() {
|
|
22827
|
-
for (let e4 of z3)
|
|
22828
|
-
this[e4].enabled && !y3.has(e4) && p3("segment parser", e4);
|
|
22701
|
+
for (let e4 of z3) this[e4].enabled && !y3.has(e4) && p3("segment parser", e4);
|
|
22829
22702
|
}
|
|
22830
22703
|
};
|
|
22831
22704
|
function K3(e4, t4) {
|
|
22832
|
-
let s4,
|
|
22705
|
+
let s4, i4, n3, r4, a4 = [];
|
|
22833
22706
|
for (n3 of t4) {
|
|
22834
|
-
for (r4 of (s4 = B4.get(n3),
|
|
22835
|
-
|
|
22836
|
-
i5.length && a4.push([n3, i5]);
|
|
22707
|
+
for (r4 of (s4 = B4.get(n3), i4 = [], s4)) (e4.includes(r4[0]) || e4.includes(r4[1])) && i4.push(r4[0]);
|
|
22708
|
+
i4.length && a4.push([n3, i4]);
|
|
22837
22709
|
}
|
|
22838
22710
|
return a4;
|
|
22839
22711
|
}
|
|
@@ -22841,26 +22713,22 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22841
22713
|
return void 0 !== e4 ? e4 : void 0 !== t4 ? t4 : void 0;
|
|
22842
22714
|
}
|
|
22843
22715
|
function X2(e4, t4) {
|
|
22844
|
-
for (let s4 of t4)
|
|
22845
|
-
e4.add(s4);
|
|
22716
|
+
for (let s4 of t4) e4.add(s4);
|
|
22846
22717
|
}
|
|
22847
22718
|
e3(R, "default", N3);
|
|
22848
22719
|
var H3 = class {
|
|
22849
22720
|
constructor(t4) {
|
|
22850
|
-
e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", (e4) => this.errors.push(e4)), this.options = R.useCached(t4);
|
|
22721
|
+
e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", ((e4) => this.errors.push(e4))), this.options = R.useCached(t4);
|
|
22851
22722
|
}
|
|
22852
22723
|
async read(e4) {
|
|
22853
|
-
this.file = await function(e5, t4) {
|
|
22854
|
-
return "string" == typeof e5 ? k3(e5, t4) : s3 && !
|
|
22855
|
-
}(e4, this.options);
|
|
22724
|
+
this.file = await (function(e5, t4) {
|
|
22725
|
+
return "string" == typeof e5 ? k3(e5, t4) : s3 && !i3 && e5 instanceof HTMLImageElement ? k3(e5.src, t4) : e5 instanceof Uint8Array || e5 instanceof ArrayBuffer || e5 instanceof DataView ? new c3(e5) : s3 && e5 instanceof Blob ? O2(e5, t4, "blob", A4) : void l3("Invalid input argument");
|
|
22726
|
+
})(e4, this.options);
|
|
22856
22727
|
}
|
|
22857
22728
|
setup() {
|
|
22858
|
-
if (this.fileParser)
|
|
22859
|
-
return;
|
|
22729
|
+
if (this.fileParser) return;
|
|
22860
22730
|
let { file: e4 } = this, t4 = e4.getUint16(0);
|
|
22861
|
-
for (let [s4,
|
|
22862
|
-
if (i5.canHandle(e4, t4))
|
|
22863
|
-
return this.fileParser = new i5(this.options, this.file, this.parsers), e4[s4] = true;
|
|
22731
|
+
for (let [s4, i4] of m3) if (i4.canHandle(e4, t4)) return this.fileParser = new i4(this.options, this.file, this.parsers), e4[s4] = true;
|
|
22864
22732
|
this.file.close && this.file.close(), l3("Unknown file format");
|
|
22865
22733
|
}
|
|
22866
22734
|
async parse() {
|
|
@@ -22871,19 +22739,18 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22871
22739
|
async executeParsers() {
|
|
22872
22740
|
let { output: e4 } = this;
|
|
22873
22741
|
await this.fileParser.parse();
|
|
22874
|
-
let t4 = Object.values(this.parsers).map(async (t5) => {
|
|
22742
|
+
let t4 = Object.values(this.parsers).map((async (t5) => {
|
|
22875
22743
|
let s4 = await t5.parse();
|
|
22876
22744
|
t5.assignToOutput(e4, s4);
|
|
22877
|
-
});
|
|
22878
|
-
this.options.silentErrors && (t4 = t4.map((e5) => e5.catch(this.pushToErrors))), await Promise.all(t4);
|
|
22745
|
+
}));
|
|
22746
|
+
this.options.silentErrors && (t4 = t4.map(((e5) => e5.catch(this.pushToErrors)))), await Promise.all(t4);
|
|
22879
22747
|
}
|
|
22880
22748
|
async extractThumbnail() {
|
|
22881
22749
|
this.setup();
|
|
22882
22750
|
let { options: e4, file: t4 } = this, s4 = y3.get("tiff", e4);
|
|
22883
|
-
var
|
|
22884
|
-
if (t4.tiff ?
|
|
22885
|
-
|
|
22886
|
-
let n3 = await this.fileParser.ensureSegmentChunk(i5), r4 = this.parsers.tiff = new s4(n3, e4, t4), a4 = await r4.extractThumbnail();
|
|
22751
|
+
var i4;
|
|
22752
|
+
if (t4.tiff ? i4 = { start: 0, type: "tiff" } : t4.jpeg && (i4 = await this.fileParser.getOrFindSegment("tiff")), void 0 === i4) return;
|
|
22753
|
+
let n3 = await this.fileParser.ensureSegmentChunk(i4), r4 = this.parsers.tiff = new s4(n3, e4, t4), a4 = await r4.extractThumbnail();
|
|
22887
22754
|
return t4.close && t4.close(), a4;
|
|
22888
22755
|
}
|
|
22889
22756
|
};
|
|
@@ -22894,8 +22761,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22894
22761
|
var G3 = Object.freeze({ __proto__: null, parse: Y, Exifr: H3, fileParsers: m3, segmentParsers: y3, fileReaders: b2, tagKeys: B4, tagValues: V3, tagRevivers: I2, createDictionary: x3, extendDictionary: C3, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A4, chunkedProps: L2, otherSegments: T4, segments: z3, tiffBlocks: P4, segmentsAndBlocks: F4, tiffExtractables: j4, inheritables: E3, allFormatters: M2, Options: R });
|
|
22895
22762
|
var J3 = class {
|
|
22896
22763
|
static findPosition(e4, t4) {
|
|
22897
|
-
let s4 = e4.getUint16(t4 + 2) + 2,
|
|
22898
|
-
return { offset: t4, length: s4, headerLength:
|
|
22764
|
+
let s4 = e4.getUint16(t4 + 2) + 2, i4 = "function" == typeof this.headerLength ? this.headerLength(e4, t4, s4) : this.headerLength, n3 = t4 + i4, r4 = s4 - i4;
|
|
22765
|
+
return { offset: t4, length: s4, headerLength: i4, start: n3, size: r4, end: n3 + r4 };
|
|
22899
22766
|
}
|
|
22900
22767
|
static parse(e4, t4 = {}) {
|
|
22901
22768
|
return new this(e4, new R({ [this.type]: t4 }), e4).parse();
|
|
@@ -22903,12 +22770,11 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22903
22770
|
normalizeInput(e4) {
|
|
22904
22771
|
return e4 instanceof c3 ? e4 : new c3(e4);
|
|
22905
22772
|
}
|
|
22906
|
-
constructor(t4, s4 = {},
|
|
22907
|
-
e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", (e4) => {
|
|
22908
|
-
if (!this.options.silentErrors)
|
|
22909
|
-
throw e4;
|
|
22773
|
+
constructor(t4, s4 = {}, i4) {
|
|
22774
|
+
e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", ((e4) => {
|
|
22775
|
+
if (!this.options.silentErrors) throw e4;
|
|
22910
22776
|
this.errors.push(e4.message);
|
|
22911
|
-
}), this.chunk = this.normalizeInput(t4), this.file =
|
|
22777
|
+
})), this.chunk = this.normalizeInput(t4), this.file = i4, this.type = this.constructor.type, this.globalOptions = this.options = s4, this.localOptions = s4[this.type], this.canTranslate = this.localOptions && this.localOptions.translate;
|
|
22912
22778
|
}
|
|
22913
22779
|
translate() {
|
|
22914
22780
|
this.canTranslate && (this.translated = this.translateBlock(this.raw, this.type));
|
|
@@ -22917,9 +22783,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22917
22783
|
return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0;
|
|
22918
22784
|
}
|
|
22919
22785
|
translateBlock(e4, t4) {
|
|
22920
|
-
let s4 = I2.get(t4),
|
|
22921
|
-
for (let [t5, r5] of e4)
|
|
22922
|
-
a4 && s4.has(t5) ? r5 = s4.get(t5)(r5) : h4 && i5.has(t5) && (r5 = this.translateValue(r5, i5.get(t5))), f5 && n3.has(t5) && (t5 = n3.get(t5) || t5), l4[t5] = r5;
|
|
22786
|
+
let s4 = I2.get(t4), i4 = V3.get(t4), n3 = B4.get(t4), r4 = this.options[t4], a4 = r4.reviveValues && !!s4, h4 = r4.translateValues && !!i4, f5 = r4.translateKeys && !!n3, l4 = {};
|
|
22787
|
+
for (let [t5, r5] of e4) a4 && s4.has(t5) ? r5 = s4.get(t5)(r5) : h4 && i4.has(t5) && (r5 = this.translateValue(r5, i4.get(t5))), f5 && n3.has(t5) && (t5 = n3.get(t5) || t5), l4[t5] = r5;
|
|
22923
22788
|
return l4;
|
|
22924
22789
|
}
|
|
22925
22790
|
translateValue(e4, t4) {
|
|
@@ -22929,12 +22794,11 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22929
22794
|
this.assignObjectToOutput(e4, this.constructor.type, t4);
|
|
22930
22795
|
}
|
|
22931
22796
|
assignObjectToOutput(e4, t4, s4) {
|
|
22932
|
-
if (this.globalOptions.mergeOutput)
|
|
22933
|
-
return Object.assign(e4, s4);
|
|
22797
|
+
if (this.globalOptions.mergeOutput) return Object.assign(e4, s4);
|
|
22934
22798
|
e4[t4] ? Object.assign(e4[t4], s4) : e4[t4] = s4;
|
|
22935
22799
|
}
|
|
22936
22800
|
};
|
|
22937
|
-
e3(J3, "headerLength", 4), e3(J3, "type", void 0), e3(J3, "multiSegment", false), e3(J3, "canHandle", () => false);
|
|
22801
|
+
e3(J3, "headerLength", 4), e3(J3, "type", void 0), e3(J3, "multiSegment", false), e3(J3, "canHandle", (() => false));
|
|
22938
22802
|
function q4(e4) {
|
|
22939
22803
|
return 192 === e4 || 194 === e4 || 196 === e4 || 219 === e4 || 221 === e4 || 218 === e4 || 254 === e4;
|
|
22940
22804
|
}
|
|
@@ -22942,27 +22806,21 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22942
22806
|
return e4 >= 224 && e4 <= 239;
|
|
22943
22807
|
}
|
|
22944
22808
|
function Z(e4, t4, s4) {
|
|
22945
|
-
for (let [
|
|
22946
|
-
if (n3.canHandle(e4, t4, s4))
|
|
22947
|
-
return i5;
|
|
22809
|
+
for (let [i4, n3] of y3) if (n3.canHandle(e4, t4, s4)) return i4;
|
|
22948
22810
|
}
|
|
22949
22811
|
var ee2 = class extends class {
|
|
22950
|
-
constructor(t4, s4,
|
|
22951
|
-
e3(this, "errors", []), e3(this, "ensureSegmentChunk", async (e4) => {
|
|
22812
|
+
constructor(t4, s4, i4) {
|
|
22813
|
+
e3(this, "errors", []), e3(this, "ensureSegmentChunk", (async (e4) => {
|
|
22952
22814
|
let t5 = e4.start, s5 = e4.size || 65536;
|
|
22953
|
-
if (this.file.chunked)
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
|
|
22961
|
-
}
|
|
22962
|
-
else
|
|
22963
|
-
this.file.byteLength > t5 + s5 ? e4.chunk = this.file.subarray(t5, s5) : void 0 === e4.size ? e4.chunk = this.file.subarray(t5) : l3("Segment unreachable: " + JSON.stringify(e4));
|
|
22815
|
+
if (this.file.chunked) if (this.file.available(t5, s5)) e4.chunk = this.file.subarray(t5, s5);
|
|
22816
|
+
else try {
|
|
22817
|
+
e4.chunk = await this.file.readChunk(t5, s5);
|
|
22818
|
+
} catch (t6) {
|
|
22819
|
+
l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t6.message}`);
|
|
22820
|
+
}
|
|
22821
|
+
else this.file.byteLength > t5 + s5 ? e4.chunk = this.file.subarray(t5, s5) : void 0 === e4.size ? e4.chunk = this.file.subarray(t5) : l3("Segment unreachable: " + JSON.stringify(e4));
|
|
22964
22822
|
return e4.chunk;
|
|
22965
|
-
}), this.extendOptions && this.extendOptions(t4), this.options = t4, this.file = s4, this.parsers =
|
|
22823
|
+
})), this.extendOptions && this.extendOptions(t4), this.options = t4, this.file = s4, this.parsers = i4;
|
|
22966
22824
|
}
|
|
22967
22825
|
injectSegment(e4, t4) {
|
|
22968
22826
|
this.options[e4].enabled && this.createParser(e4, t4);
|
|
@@ -22973,8 +22831,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22973
22831
|
}
|
|
22974
22832
|
createParsers(e4) {
|
|
22975
22833
|
for (let t4 of e4) {
|
|
22976
|
-
let { type: e5, chunk: s4 } = t4,
|
|
22977
|
-
if (
|
|
22834
|
+
let { type: e5, chunk: s4 } = t4, i4 = this.options[e5];
|
|
22835
|
+
if (i4 && i4.enabled) {
|
|
22978
22836
|
let t5 = this.parsers[e5];
|
|
22979
22837
|
t5 && t5.append || t5 || this.createParser(e5, s4);
|
|
22980
22838
|
}
|
|
@@ -22995,59 +22853,53 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22995
22853
|
await this.findAppSegments(), await this.readSegments(this.appSegments), this.mergeMultiSegments(), this.createParsers(this.mergedAppSegments || this.appSegments);
|
|
22996
22854
|
}
|
|
22997
22855
|
setupSegmentFinderArgs(e4) {
|
|
22998
|
-
true === e4 ? (this.findAll = true, this.wanted = new Set(y3.keyList())) : (e4 = void 0 === e4 ? y3.keyList().filter((e5) => this.options[e5].enabled) : e4.filter((e5) => this.options[e5].enabled && y3.has(e5)), this.findAll = false, this.remaining = new Set(e4), this.wanted = new Set(e4)), this.unfinishedMultiSegment = false;
|
|
22856
|
+
true === e4 ? (this.findAll = true, this.wanted = new Set(y3.keyList())) : (e4 = void 0 === e4 ? y3.keyList().filter(((e5) => this.options[e5].enabled)) : e4.filter(((e5) => this.options[e5].enabled && y3.has(e5))), this.findAll = false, this.remaining = new Set(e4), this.wanted = new Set(e4)), this.unfinishedMultiSegment = false;
|
|
22999
22857
|
}
|
|
23000
22858
|
async findAppSegments(e4 = 0, t4) {
|
|
23001
22859
|
this.setupSegmentFinderArgs(t4);
|
|
23002
|
-
let { file: s4, findAll:
|
|
23003
|
-
if (!
|
|
22860
|
+
let { file: s4, findAll: i4, wanted: n3, remaining: r4 } = this;
|
|
22861
|
+
if (!i4 && this.file.chunked && (i4 = Array.from(n3).some(((e5) => {
|
|
23004
22862
|
let t5 = y3.get(e5), s5 = this.options[e5];
|
|
23005
22863
|
return t5.multiSegment && s5.multiSegment;
|
|
23006
|
-
}),
|
|
22864
|
+
})), i4 && await this.file.readWhole()), e4 = this.findAppSegmentsInRange(e4, s4.byteLength), !this.options.onlyTiff && s4.chunked) {
|
|
23007
22865
|
let t5 = false;
|
|
23008
22866
|
for (; r4.size > 0 && !t5 && (s4.canReadNextChunk || this.unfinishedMultiSegment); ) {
|
|
23009
|
-
let { nextChunkOffset:
|
|
23010
|
-
if (t5 = e4 >
|
|
23011
|
-
return;
|
|
22867
|
+
let { nextChunkOffset: i5 } = s4, n4 = this.appSegments.some(((e5) => !this.file.available(e5.offset || e5.start, e5.length || e5.size)));
|
|
22868
|
+
if (t5 = e4 > i5 && !n4 ? !await s4.readNextChunk(e4) : !await s4.readNextChunk(i5), void 0 === (e4 = this.findAppSegmentsInRange(e4, s4.byteLength))) return;
|
|
23012
22869
|
}
|
|
23013
22870
|
}
|
|
23014
22871
|
}
|
|
23015
22872
|
findAppSegmentsInRange(e4, t4) {
|
|
23016
22873
|
t4 -= 2;
|
|
23017
|
-
let s4,
|
|
23018
|
-
for (; e4 < t4; e4++)
|
|
23019
|
-
if (
|
|
23020
|
-
if (
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
if (i5 = f5.getUint16(e4 + 2), 218 === s4 && false !== d4.stopAfterSos)
|
|
23026
|
-
return;
|
|
23027
|
-
d4.recordJpegSegments && this.jpegSegments.push({ offset: e4, length: i5, marker: s4 }), e4 += i5 + 1;
|
|
23028
|
-
}
|
|
22874
|
+
let s4, i4, n3, r4, a4, h4, { file: f5, findAll: l4, wanted: o4, remaining: u5, options: d4 } = this;
|
|
22875
|
+
for (; e4 < t4; e4++) if (255 === f5.getUint8(e4)) {
|
|
22876
|
+
if (s4 = f5.getUint8(e4 + 1), Q3(s4)) {
|
|
22877
|
+
if (i4 = f5.getUint16(e4 + 2), n3 = Z(f5, e4, i4), n3 && o4.has(n3) && (r4 = y3.get(n3), a4 = r4.findPosition(f5, e4), h4 = d4[n3], a4.type = n3, this.appSegments.push(a4), !l4 && (r4.multiSegment && h4.multiSegment ? (this.unfinishedMultiSegment = a4.chunkNumber < a4.chunkCount, this.unfinishedMultiSegment || u5.delete(n3)) : u5.delete(n3), 0 === u5.size))) break;
|
|
22878
|
+
d4.recordUnknownSegments && (a4 = J3.findPosition(f5, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i4 + 1;
|
|
22879
|
+
} else if (q4(s4)) {
|
|
22880
|
+
if (i4 = f5.getUint16(e4 + 2), 218 === s4 && false !== d4.stopAfterSos) return;
|
|
22881
|
+
d4.recordJpegSegments && this.jpegSegments.push({ offset: e4, length: i4, marker: s4 }), e4 += i4 + 1;
|
|
23029
22882
|
}
|
|
22883
|
+
}
|
|
23030
22884
|
return e4;
|
|
23031
22885
|
}
|
|
23032
22886
|
mergeMultiSegments() {
|
|
23033
|
-
if (!this.appSegments.some((e5) => e5.multiSegment))
|
|
23034
|
-
|
|
23035
|
-
|
|
23036
|
-
let s4
|
|
23037
|
-
for (let a4 = 0; a4 < e5.length; a4++)
|
|
23038
|
-
s4 = e5[a4], i5 = s4[t4], r4.has(i5) ? n3 = r4.get(i5) : r4.set(i5, n3 = []), n3.push(s4);
|
|
22887
|
+
if (!this.appSegments.some(((e5) => e5.multiSegment))) return;
|
|
22888
|
+
let e4 = (function(e5, t4) {
|
|
22889
|
+
let s4, i4, n3, r4 = /* @__PURE__ */ new Map();
|
|
22890
|
+
for (let a4 = 0; a4 < e5.length; a4++) s4 = e5[a4], i4 = s4[t4], r4.has(i4) ? n3 = r4.get(i4) : r4.set(i4, n3 = []), n3.push(s4);
|
|
23039
22891
|
return Array.from(r4);
|
|
23040
|
-
}(this.appSegments, "type");
|
|
23041
|
-
this.mergedAppSegments = e4.map(([e5, t4]) => {
|
|
22892
|
+
})(this.appSegments, "type");
|
|
22893
|
+
this.mergedAppSegments = e4.map((([e5, t4]) => {
|
|
23042
22894
|
let s4 = y3.get(e5, this.options);
|
|
23043
22895
|
if (s4.handleMultiSegments) {
|
|
23044
22896
|
return { type: e5, chunk: s4.handleMultiSegments(t4) };
|
|
23045
22897
|
}
|
|
23046
22898
|
return t4[0];
|
|
23047
|
-
});
|
|
22899
|
+
}));
|
|
23048
22900
|
}
|
|
23049
22901
|
getSegment(e4) {
|
|
23050
|
-
return this.appSegments.find((t4) => t4.type === e4);
|
|
22902
|
+
return this.appSegments.find(((t4) => t4.type === e4));
|
|
23051
22903
|
}
|
|
23052
22904
|
async getOrFindSegment(e4) {
|
|
23053
22905
|
let t4 = this.getSegment(e4);
|
|
@@ -23062,38 +22914,31 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23062
22914
|
18761 === e4 ? this.le = true : 19789 === e4 && (this.le = false), this.chunk.le = this.le, this.headerParsed = true;
|
|
23063
22915
|
}
|
|
23064
22916
|
parseTags(e4, t4, s4 = /* @__PURE__ */ new Map()) {
|
|
23065
|
-
let { pick:
|
|
23066
|
-
|
|
23067
|
-
let r4 =
|
|
22917
|
+
let { pick: i4, skip: n3 } = this.options[t4];
|
|
22918
|
+
i4 = new Set(i4);
|
|
22919
|
+
let r4 = i4.size > 0, a4 = 0 === n3.size, h4 = this.chunk.getUint16(e4);
|
|
23068
22920
|
e4 += 2;
|
|
23069
22921
|
for (let f5 = 0; f5 < h4; f5++) {
|
|
23070
22922
|
let h5 = this.chunk.getUint16(e4);
|
|
23071
22923
|
if (r4) {
|
|
23072
|
-
if (
|
|
23073
|
-
|
|
23074
|
-
} else
|
|
23075
|
-
!a4 && n3.has(h5) || s4.set(h5, this.parseTag(e4, h5, t4));
|
|
22924
|
+
if (i4.has(h5) && (s4.set(h5, this.parseTag(e4, h5, t4)), i4.delete(h5), 0 === i4.size)) break;
|
|
22925
|
+
} else !a4 && n3.has(h5) || s4.set(h5, this.parseTag(e4, h5, t4));
|
|
23076
22926
|
e4 += 12;
|
|
23077
22927
|
}
|
|
23078
22928
|
return s4;
|
|
23079
22929
|
}
|
|
23080
22930
|
parseTag(e4, t4, s4) {
|
|
23081
|
-
let { chunk:
|
|
23082
|
-
if (a4 * r4 <= 4 ? e4 += 8 : e4 =
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
return
|
|
23086
|
-
|
|
23087
|
-
e5 = e5.slice(0, -1);
|
|
23088
|
-
return e5;
|
|
23089
|
-
}(h4 = i5.getString(e4, r4)).trim()) ? void 0 : h4;
|
|
22931
|
+
let { chunk: i4 } = this, n3 = i4.getUint16(e4 + 2), r4 = i4.getUint32(e4 + 4), a4 = te[n3];
|
|
22932
|
+
if (a4 * r4 <= 4 ? e4 += 8 : e4 = i4.getUint32(e4 + 8), (n3 < 1 || n3 > 13) && l3(`Invalid TIFF value type. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4}`), e4 > i4.byteLength && l3(`Invalid TIFF value offset. block: ${s4.toUpperCase()}, tag: ${t4.toString(16)}, type: ${n3}, offset ${e4} is outside of chunk size ${i4.byteLength}`), 1 === n3) return i4.getUint8Array(e4, r4);
|
|
22933
|
+
if (2 === n3) return "" === (h4 = (function(e5) {
|
|
22934
|
+
for (; e5.endsWith("\0"); ) e5 = e5.slice(0, -1);
|
|
22935
|
+
return e5;
|
|
22936
|
+
})(h4 = i4.getString(e4, r4)).trim()) ? void 0 : h4;
|
|
23090
22937
|
var h4;
|
|
23091
|
-
if (7 === n3)
|
|
23092
|
-
|
|
23093
|
-
if (1 === r4)
|
|
23094
|
-
return this.parseTagValue(n3, e4);
|
|
22938
|
+
if (7 === n3) return i4.getUint8Array(e4, r4);
|
|
22939
|
+
if (1 === r4) return this.parseTagValue(n3, e4);
|
|
23095
22940
|
{
|
|
23096
|
-
let t5 = new (function(e5) {
|
|
22941
|
+
let t5 = new ((function(e5) {
|
|
23097
22942
|
switch (e5) {
|
|
23098
22943
|
case 1:
|
|
23099
22944
|
return Uint8Array;
|
|
@@ -23118,9 +22963,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23118
22963
|
default:
|
|
23119
22964
|
return Array;
|
|
23120
22965
|
}
|
|
23121
|
-
}(n3))(r4), s5 = a4;
|
|
23122
|
-
for (let
|
|
23123
|
-
t5[i6] = this.parseTagValue(n3, e4), e4 += s5;
|
|
22966
|
+
})(n3))(r4), s5 = a4;
|
|
22967
|
+
for (let i5 = 0; i5 < r4; i5++) t5[i5] = this.parseTagValue(n3, e4), e4 += s5;
|
|
23124
22968
|
return t5;
|
|
23125
22969
|
}
|
|
23126
22970
|
}
|
|
@@ -23182,8 +23026,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23182
23026
|
return this[t4] = s4, this.parseTags(e4, t4, s4), s4;
|
|
23183
23027
|
}
|
|
23184
23028
|
async parseIfd0Block() {
|
|
23185
|
-
if (this.ifd0)
|
|
23186
|
-
return;
|
|
23029
|
+
if (this.ifd0) return;
|
|
23187
23030
|
let { file: e4 } = this;
|
|
23188
23031
|
this.findIfd0Offset(), this.ifd0Offset < 8 && l3("Malformed EXIF data"), !e4.chunked && this.ifd0Offset > e4.byteLength && l3(`IFD0 offset points to outside of file.
|
|
23189
23032
|
this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tiff && await e4.ensureChunk(this.ifd0Offset, o3(this.options));
|
|
@@ -23191,10 +23034,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23191
23034
|
return 0 !== t4.size ? (this.exifOffset = t4.get(34665), this.interopOffset = t4.get(40965), this.gpsOffset = t4.get(34853), this.xmp = t4.get(700), this.iptc = t4.get(33723), this.icc = t4.get(34675), this.options.sanitize && (t4.delete(34665), t4.delete(40965), t4.delete(34853), t4.delete(700), t4.delete(33723), t4.delete(34675)), t4) : void 0;
|
|
23192
23035
|
}
|
|
23193
23036
|
async parseExifBlock() {
|
|
23194
|
-
if (this.exif)
|
|
23195
|
-
|
|
23196
|
-
if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset)
|
|
23197
|
-
return;
|
|
23037
|
+
if (this.exif) return;
|
|
23038
|
+
if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.exifOffset) return;
|
|
23198
23039
|
this.file.tiff && await this.file.ensureChunk(this.exifOffset, o3(this.options));
|
|
23199
23040
|
let e4 = this.parseBlock(this.exifOffset, "exif");
|
|
23200
23041
|
return this.interopOffset || (this.interopOffset = e4.get(40965)), this.makerNote = e4.get(37500), this.userComment = e4.get(37510), this.options.sanitize && (e4.delete(40965), e4.delete(37500), e4.delete(37510)), this.unpack(e4, 41728), this.unpack(e4, 41729), e4;
|
|
@@ -23204,24 +23045,19 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23204
23045
|
s4 && 1 === s4.length && e4.set(t4, s4[0]);
|
|
23205
23046
|
}
|
|
23206
23047
|
async parseGpsBlock() {
|
|
23207
|
-
if (this.gps)
|
|
23208
|
-
|
|
23209
|
-
if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.gpsOffset)
|
|
23210
|
-
return;
|
|
23048
|
+
if (this.gps) return;
|
|
23049
|
+
if (this.ifd0 || await this.parseIfd0Block(), void 0 === this.gpsOffset) return;
|
|
23211
23050
|
let e4 = this.parseBlock(this.gpsOffset, "gps");
|
|
23212
23051
|
return e4 && e4.has(2) && e4.has(4) && (e4.set("latitude", ne(...e4.get(2), e4.get(1))), e4.set("longitude", ne(...e4.get(4), e4.get(3)))), e4;
|
|
23213
23052
|
}
|
|
23214
23053
|
async parseInteropBlock() {
|
|
23215
|
-
if (!this.interop && (this.ifd0 || await this.parseIfd0Block(), void 0 !== this.interopOffset || this.exif || await this.parseExifBlock(), void 0 !== this.interopOffset))
|
|
23216
|
-
return this.parseBlock(this.interopOffset, "interop");
|
|
23054
|
+
if (!this.interop && (this.ifd0 || await this.parseIfd0Block(), void 0 !== this.interopOffset || this.exif || await this.parseExifBlock(), void 0 !== this.interopOffset)) return this.parseBlock(this.interopOffset, "interop");
|
|
23217
23055
|
}
|
|
23218
23056
|
async parseThumbnailBlock(e4 = false) {
|
|
23219
|
-
if (!this.ifd1 && !this.ifd1Parsed && (!this.options.mergeOutput || e4))
|
|
23220
|
-
return this.findIfd1Offset(), this.ifd1Offset > 0 && (this.parseBlock(this.ifd1Offset, "ifd1"), this.ifd1Parsed = true), this.ifd1;
|
|
23057
|
+
if (!this.ifd1 && !this.ifd1Parsed && (!this.options.mergeOutput || e4)) return this.findIfd1Offset(), this.ifd1Offset > 0 && (this.parseBlock(this.ifd1Offset, "ifd1"), this.ifd1Parsed = true), this.ifd1;
|
|
23221
23058
|
}
|
|
23222
23059
|
async extractThumbnail() {
|
|
23223
|
-
if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1)
|
|
23224
|
-
return;
|
|
23060
|
+
if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1) return;
|
|
23225
23061
|
let e4 = this.ifd1.get(513), t4 = this.ifd1.get(514);
|
|
23226
23062
|
return this.chunk.getUint8Array(e4, t4);
|
|
23227
23063
|
}
|
|
@@ -23232,28 +23068,21 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23232
23068
|
return this.ifd1;
|
|
23233
23069
|
}
|
|
23234
23070
|
createOutput() {
|
|
23235
|
-
let e4, t4, s4,
|
|
23236
|
-
for (t4 of P4)
|
|
23237
|
-
if (
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23241
|
-
Object.assign(i5, s4);
|
|
23242
|
-
} else
|
|
23243
|
-
i5[t4] = s4;
|
|
23244
|
-
return this.makerNote && (i5.makerNote = this.makerNote), this.userComment && (i5.userComment = this.userComment), i5;
|
|
23071
|
+
let e4, t4, s4, i4 = {};
|
|
23072
|
+
for (t4 of P4) if (e4 = this[t4], !f4(e4)) if (s4 = this.canTranslate ? this.translateBlock(e4, t4) : Object.fromEntries(e4), this.options.mergeOutput) {
|
|
23073
|
+
if ("ifd1" === t4) continue;
|
|
23074
|
+
Object.assign(i4, s4);
|
|
23075
|
+
} else i4[t4] = s4;
|
|
23076
|
+
return this.makerNote && (i4.makerNote = this.makerNote), this.userComment && (i4.userComment = this.userComment), i4;
|
|
23245
23077
|
}
|
|
23246
23078
|
assignToOutput(e4, t4) {
|
|
23247
|
-
if (this.globalOptions.mergeOutput)
|
|
23248
|
-
|
|
23249
|
-
else
|
|
23250
|
-
for (let [s4, i5] of Object.entries(t4))
|
|
23251
|
-
this.assignObjectToOutput(e4, s4, i5);
|
|
23079
|
+
if (this.globalOptions.mergeOutput) Object.assign(e4, t4);
|
|
23080
|
+
else for (let [s4, i4] of Object.entries(t4)) this.assignObjectToOutput(e4, s4, i4);
|
|
23252
23081
|
}
|
|
23253
23082
|
};
|
|
23254
|
-
function ne(e4, t4, s4,
|
|
23083
|
+
function ne(e4, t4, s4, i4) {
|
|
23255
23084
|
var n3 = e4 + t4 / 60 + s4 / 3600;
|
|
23256
|
-
return "S" !==
|
|
23085
|
+
return "S" !== i4 && "W" !== i4 || (n3 *= -1), n3;
|
|
23257
23086
|
}
|
|
23258
23087
|
e3(ie, "type", "tiff"), e3(ie, "headerLength", 10), y3.set("tiff", ie);
|
|
23259
23088
|
var re = Object.freeze({ __proto__: null, default: G3, Exifr: H3, fileParsers: m3, segmentParsers: y3, fileReaders: b2, tagKeys: B4, tagValues: V3, tagRevivers: I2, createDictionary: x3, extendDictionary: C3, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A4, chunkedProps: L2, otherSegments: T4, segments: z3, tiffBlocks: P4, segmentsAndBlocks: F4, tiffExtractables: j4, inheritables: E3, allFormatters: M2, Options: R, parse: Y });
|
|
@@ -23265,8 +23094,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23265
23094
|
let t4 = new H3(de);
|
|
23266
23095
|
await t4.read(e4);
|
|
23267
23096
|
let s4 = await t4.parse();
|
|
23268
|
-
if (s4 && s4.ifd0)
|
|
23269
|
-
return s4.ifd0[274];
|
|
23097
|
+
if (s4 && s4.ifd0) return s4.ifd0[274];
|
|
23270
23098
|
}
|
|
23271
23099
|
var pe = Object.freeze({ 1: { dimensionSwapped: false, scaleX: 1, scaleY: 1, deg: 0, rad: 0 }, 2: { dimensionSwapped: false, scaleX: -1, scaleY: 1, deg: 0, rad: 0 }, 3: { dimensionSwapped: false, scaleX: 1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 4: { dimensionSwapped: false, scaleX: -1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 5: { dimensionSwapped: true, scaleX: 1, scaleY: -1, deg: 90, rad: 90 * Math.PI / 180 }, 6: { dimensionSwapped: true, scaleX: 1, scaleY: 1, deg: 90, rad: 90 * Math.PI / 180 }, 7: { dimensionSwapped: true, scaleX: 1, scaleY: -1, deg: 270, rad: 270 * Math.PI / 180 }, 8: { dimensionSwapped: true, scaleX: 1, scaleY: 1, deg: 270, rad: 270 * Math.PI / 180 } });
|
|
23272
23100
|
var ge = true;
|
|
@@ -23276,8 +23104,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23276
23104
|
if (e4.includes("iPad") || e4.includes("iPhone")) {
|
|
23277
23105
|
let t4 = e4.match(/OS (\d+)_(\d+)/);
|
|
23278
23106
|
if (t4) {
|
|
23279
|
-
let [, e5, s4] = t4,
|
|
23280
|
-
ge =
|
|
23107
|
+
let [, e5, s4] = t4, i4 = Number(e5) + 0.1 * Number(s4);
|
|
23108
|
+
ge = i4 < 13.4, me = false;
|
|
23281
23109
|
}
|
|
23282
23110
|
} else if (e4.includes("OS X 10")) {
|
|
23283
23111
|
let [, t4] = e4.match(/OS X 10[_.](\d+)/);
|
|
@@ -23322,8 +23150,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23322
23150
|
}
|
|
23323
23151
|
set(e4, t4, s4 = false) {
|
|
23324
23152
|
s4 && this._tryExtend(t4, e4.byteLength, e4);
|
|
23325
|
-
let
|
|
23326
|
-
return this.ranges.add(t4,
|
|
23153
|
+
let i4 = super.set(e4, t4);
|
|
23154
|
+
return this.ranges.add(t4, i4.byteLength), i4;
|
|
23327
23155
|
}
|
|
23328
23156
|
async ensureChunk(e4, t4) {
|
|
23329
23157
|
this.chunked && (this.ranges.available(e4, t4) || await this.readChunk(e4, t4));
|
|
@@ -23340,17 +23168,16 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23340
23168
|
return this.list.length;
|
|
23341
23169
|
}
|
|
23342
23170
|
add(e4, t4, s4 = 0) {
|
|
23343
|
-
let
|
|
23171
|
+
let i4 = e4 + t4, n3 = this.list.filter(((t5) => ke(e4, t5.offset, i4) || ke(e4, t5.end, i4)));
|
|
23344
23172
|
if (n3.length > 0) {
|
|
23345
|
-
e4 = Math.min(e4, ...n3.map((e5) => e5.offset)),
|
|
23173
|
+
e4 = Math.min(e4, ...n3.map(((e5) => e5.offset))), i4 = Math.max(i4, ...n3.map(((e5) => e5.end))), t4 = i4 - e4;
|
|
23346
23174
|
let s5 = n3.shift();
|
|
23347
|
-
s5.offset = e4, s5.length = t4, s5.end =
|
|
23348
|
-
} else
|
|
23349
|
-
this.list.push({ offset: e4, length: t4, end: i5 });
|
|
23175
|
+
s5.offset = e4, s5.length = t4, s5.end = i4, this.list = this.list.filter(((e5) => !n3.includes(e5)));
|
|
23176
|
+
} else this.list.push({ offset: e4, length: t4, end: i4 });
|
|
23350
23177
|
}
|
|
23351
23178
|
available(e4, t4) {
|
|
23352
23179
|
let s4 = e4 + t4;
|
|
23353
|
-
return this.list.some((t5) => t5.offset <= e4 && s4 <= t5.end);
|
|
23180
|
+
return this.list.some(((t5) => t5.offset <= e4 && s4 <= t5.end));
|
|
23354
23181
|
}
|
|
23355
23182
|
};
|
|
23356
23183
|
function ke(e4, t4, s4) {
|
|
@@ -23367,21 +23194,18 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23367
23194
|
this.chunked = true, await this.readChunk(0, this.options.firstChunkSize);
|
|
23368
23195
|
}
|
|
23369
23196
|
async readNextChunk(e4 = this.nextChunkOffset) {
|
|
23370
|
-
if (this.fullyRead)
|
|
23371
|
-
return this.chunksRead++, false;
|
|
23197
|
+
if (this.fullyRead) return this.chunksRead++, false;
|
|
23372
23198
|
let t4 = this.options.chunkSize, s4 = await this.readChunk(e4, t4);
|
|
23373
23199
|
return !!s4 && s4.byteLength === t4;
|
|
23374
23200
|
}
|
|
23375
23201
|
async readChunk(e4, t4) {
|
|
23376
|
-
if (this.chunksRead++, 0 !== (t4 = this.safeWrapAddress(e4, t4)))
|
|
23377
|
-
return this._readChunk(e4, t4);
|
|
23202
|
+
if (this.chunksRead++, 0 !== (t4 = this.safeWrapAddress(e4, t4))) return this._readChunk(e4, t4);
|
|
23378
23203
|
}
|
|
23379
23204
|
safeWrapAddress(e4, t4) {
|
|
23380
23205
|
return void 0 !== this.size && e4 + t4 > this.size ? Math.max(0, this.size - e4) : t4;
|
|
23381
23206
|
}
|
|
23382
23207
|
get nextChunkOffset() {
|
|
23383
|
-
if (0 !== this.ranges.list.length)
|
|
23384
|
-
return this.ranges.list[0].length;
|
|
23208
|
+
if (0 !== this.ranges.list.length) return this.ranges.list[0].length;
|
|
23385
23209
|
}
|
|
23386
23210
|
get canReadNextChunk() {
|
|
23387
23211
|
return this.chunksRead < this.options.chunkLimit;
|
|
@@ -23405,7 +23229,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23405
23229
|
return this.chunked = true, this.size = this.input.size, super.readChunked();
|
|
23406
23230
|
}
|
|
23407
23231
|
async _readChunk(e4, t4) {
|
|
23408
|
-
let s4 = t4 ? e4 + t4 : void 0,
|
|
23232
|
+
let s4 = t4 ? e4 + t4 : void 0, i4 = this.input.slice(e4, s4), n3 = await A4(i4);
|
|
23409
23233
|
return this.set(n3, e4, true);
|
|
23410
23234
|
}
|
|
23411
23235
|
});
|
|
@@ -24068,7 +23892,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
24068
23892
|
browse: browseFiles
|
|
24069
23893
|
}) });
|
|
24070
23894
|
};
|
|
24071
|
-
[Symbol.for("uppy test: disable unused locale key warning")]() {
|
|
23895
|
+
[/* @__PURE__ */ Symbol.for("uppy test: disable unused locale key warning")]() {
|
|
24072
23896
|
this.props.i18nArray("dropPasteBoth");
|
|
24073
23897
|
this.props.i18nArray("dropPasteFiles");
|
|
24074
23898
|
this.props.i18nArray("dropPasteFolders");
|
|
@@ -24375,8 +24199,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
24375
24199
|
if (bKeys.length !== len) {
|
|
24376
24200
|
return false;
|
|
24377
24201
|
}
|
|
24378
|
-
for (let
|
|
24379
|
-
const key = aKeys[
|
|
24202
|
+
for (let i4 = 0; i4 < len; i4++) {
|
|
24203
|
+
const key = aKeys[i4];
|
|
24380
24204
|
if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
|
|
24381
24205
|
return false;
|
|
24382
24206
|
}
|
|
@@ -24769,8 +24593,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
24769
24593
|
}
|
|
24770
24594
|
let state = uploadStates.STATE_WAITING;
|
|
24771
24595
|
const fileIDs = Object.keys(files);
|
|
24772
|
-
for (let
|
|
24773
|
-
const { progress } = files[fileIDs[
|
|
24596
|
+
for (let i4 = 0; i4 < fileIDs.length; i4++) {
|
|
24597
|
+
const { progress } = files[fileIDs[i4]];
|
|
24774
24598
|
if (progress.uploadStarted && !progress.uploadComplete) {
|
|
24775
24599
|
return uploadStates.STATE_UPLOADING;
|
|
24776
24600
|
}
|
|
@@ -26717,7 +26541,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
26717
26541
|
resume() {
|
|
26718
26542
|
this.#paused = false;
|
|
26719
26543
|
clearTimeout(this.#pauseTimer);
|
|
26720
|
-
for (let
|
|
26544
|
+
for (let i4 = 0; i4 < this.limit; i4++) {
|
|
26721
26545
|
this.#queueNext();
|
|
26722
26546
|
}
|
|
26723
26547
|
}
|
|
@@ -26761,7 +26585,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
26761
26585
|
}
|
|
26762
26586
|
this.#downLimit = this.limit;
|
|
26763
26587
|
this.limit = Math.ceil((this.#upperLimit + this.#downLimit) / 2);
|
|
26764
|
-
for (let
|
|
26588
|
+
for (let i4 = this.#downLimit; i4 <= this.limit; i4++) {
|
|
26765
26589
|
this.#queueNext();
|
|
26766
26590
|
}
|
|
26767
26591
|
if (this.#upperLimit - this.#downLimit > 3) {
|
|
@@ -26774,7 +26598,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
26774
26598
|
return this.#paused;
|
|
26775
26599
|
}
|
|
26776
26600
|
};
|
|
26777
|
-
var internalRateLimitedQueue = Symbol("__queue");
|
|
26601
|
+
var internalRateLimitedQueue = /* @__PURE__ */ Symbol("__queue");
|
|
26778
26602
|
|
|
26779
26603
|
// node_modules/@uppy/utils/lib/NetworkError.js
|
|
26780
26604
|
var NetworkError = class extends Error {
|
|
@@ -26923,8 +26747,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
26923
26747
|
|
|
26924
26748
|
// node_modules/@uppy/xhr-upload/lib/index.js
|
|
26925
26749
|
function _classPrivateFieldLooseBase(e4, t4) {
|
|
26926
|
-
if (!{}.hasOwnProperty.call(e4, t4))
|
|
26927
|
-
throw new TypeError("attempted to use private field on non-instance");
|
|
26750
|
+
if (!{}.hasOwnProperty.call(e4, t4)) throw new TypeError("attempted to use private field on non-instance");
|
|
26928
26751
|
return e4;
|
|
26929
26752
|
}
|
|
26930
26753
|
var id = 0;
|
|
@@ -26936,10 +26759,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
26936
26759
|
};
|
|
26937
26760
|
function buildResponseError(xhr, err) {
|
|
26938
26761
|
let error2 = err;
|
|
26939
|
-
if (!error2)
|
|
26940
|
-
|
|
26941
|
-
if (typeof error2 === "string")
|
|
26942
|
-
error2 = new Error(error2);
|
|
26762
|
+
if (!error2) error2 = new Error("Upload error");
|
|
26763
|
+
if (typeof error2 === "string") error2 = new Error(error2);
|
|
26943
26764
|
if (!(error2 instanceof Error)) {
|
|
26944
26765
|
error2 = Object.assign(new Error("Upload error"), {
|
|
26945
26766
|
data: error2
|
|
@@ -27291,8 +27112,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27291
27112
|
const getQueue = () => this.requests;
|
|
27292
27113
|
const controller = new AbortController();
|
|
27293
27114
|
const removedHandler = (removedFile) => {
|
|
27294
|
-
if (removedFile.id === file.id)
|
|
27295
|
-
controller.abort();
|
|
27115
|
+
if (removedFile.id === file.id) controller.abort();
|
|
27296
27116
|
};
|
|
27297
27117
|
this.uppy.on("file-removed", removedHandler);
|
|
27298
27118
|
const uploadPromise = this.uppy.getRequestClientForFile(file).uploadRemoteFile(file, _classPrivateFieldLooseBase(this, _getCompanionClientArgs)[_getCompanionClientArgs](file), {
|
|
@@ -27336,17 +27156,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27336
27156
|
function isPossiblyDangerous(name, value) {
|
|
27337
27157
|
let val = value.replace(/\s+/g, "").toLowerCase();
|
|
27338
27158
|
if (["src", "href", "xlink:href"].includes(name)) {
|
|
27339
|
-
if (val.includes("javascript:") || val.includes("data:"))
|
|
27340
|
-
return true;
|
|
27159
|
+
if (val.includes("javascript:") || val.includes("data:")) return true;
|
|
27341
27160
|
}
|
|
27342
|
-
if (name.startsWith("on"))
|
|
27343
|
-
return true;
|
|
27161
|
+
if (name.startsWith("on")) return true;
|
|
27344
27162
|
}
|
|
27345
27163
|
function removePossiblyDangerousAttributes(elem) {
|
|
27346
27164
|
let atts = elem.attributes;
|
|
27347
27165
|
for (let { name, value } of atts) {
|
|
27348
|
-
if (!isPossiblyDangerous(name, value))
|
|
27349
|
-
continue;
|
|
27166
|
+
if (!isPossiblyDangerous(name, value)) continue;
|
|
27350
27167
|
elem.removeAttribute(name);
|
|
27351
27168
|
}
|
|
27352
27169
|
}
|
|
@@ -27374,8 +27191,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27374
27191
|
static outlets = ["attachment-preview", "attachment-preview-container"];
|
|
27375
27192
|
//======= Lifecycle
|
|
27376
27193
|
connect() {
|
|
27377
|
-
if (this.uppy)
|
|
27378
|
-
return;
|
|
27194
|
+
if (this.uppy) return;
|
|
27379
27195
|
this.uploadedFiles = [];
|
|
27380
27196
|
this.element.style["display"] = "none";
|
|
27381
27197
|
this.configureUppy();
|
|
@@ -27395,8 +27211,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27395
27211
|
this.#cleanupUppy();
|
|
27396
27212
|
}
|
|
27397
27213
|
#handleMorph() {
|
|
27398
|
-
if (!this.element.isConnected)
|
|
27399
|
-
return;
|
|
27214
|
+
if (!this.element.isConnected) return;
|
|
27400
27215
|
this.#cleanupUppy();
|
|
27401
27216
|
this.uploadedFiles = [];
|
|
27402
27217
|
this.element.style["display"] = "none";
|
|
@@ -27450,14 +27265,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27450
27265
|
let theme = document.documentElement.getAttribute("data-bs-theme") || "auto";
|
|
27451
27266
|
this.#dashboard.setOptions({ theme });
|
|
27452
27267
|
let file = null;
|
|
27453
|
-
while (file = this.uploadedFiles.pop())
|
|
27454
|
-
this.uppy.removeFile(file.id);
|
|
27268
|
+
while (file = this.uploadedFiles.pop()) this.uppy.removeFile(file.id);
|
|
27455
27269
|
this.#dashboard.openModal();
|
|
27456
27270
|
}
|
|
27457
27271
|
#onUploadSuccess(file, response) {
|
|
27458
27272
|
this.uploadedFiles.push(file);
|
|
27459
|
-
if (!this.multiple)
|
|
27460
|
-
this.attachmentPreviewOutlets.forEach((a4) => a4.remove());
|
|
27273
|
+
if (!this.multiple) this.attachmentPreviewOutlets.forEach((a4) => a4.remove());
|
|
27461
27274
|
const uploadedFileData = response.body["data"];
|
|
27462
27275
|
const uploadedFileUrl = response.body["url"];
|
|
27463
27276
|
this.attachmentPreviewContainerOutlet.element.appendChild(
|
|
@@ -27465,8 +27278,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27465
27278
|
);
|
|
27466
27279
|
}
|
|
27467
27280
|
#onAttachmentsChanged() {
|
|
27468
|
-
if (!this.deleteAllTrigger)
|
|
27469
|
-
return;
|
|
27281
|
+
if (!this.deleteAllTrigger) return;
|
|
27470
27282
|
const len = this.attachmentPreviewOutlets.length;
|
|
27471
27283
|
if (len > 1) {
|
|
27472
27284
|
this.deleteAllTrigger.style["display"] = "initial";
|
|
@@ -27481,10 +27293,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27481
27293
|
this.triggerContainer.className = "flex items-center gap-2";
|
|
27482
27294
|
this.element.insertAdjacentElement("afterend", this.triggerContainer);
|
|
27483
27295
|
this.#buildUploadTrigger();
|
|
27484
|
-
if (this.uploadTrigger)
|
|
27485
|
-
|
|
27486
|
-
if (this.deleteAllTrigger)
|
|
27487
|
-
this.triggerContainer.append(this.deleteAllTrigger);
|
|
27296
|
+
if (this.uploadTrigger) this.triggerContainer.append(this.uploadTrigger);
|
|
27297
|
+
if (this.deleteAllTrigger) this.triggerContainer.append(this.deleteAllTrigger);
|
|
27488
27298
|
}
|
|
27489
27299
|
#buildUploadTrigger() {
|
|
27490
27300
|
const triggerPrompt = this.multiple ? "Choose files" : "Choose file";
|
|
@@ -27507,8 +27317,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27507
27317
|
false
|
|
27508
27318
|
);
|
|
27509
27319
|
this.deleteAllTrigger.addEventListener("click", () => {
|
|
27510
|
-
if (confirm("Are you sure?"))
|
|
27511
|
-
this.attachmentPreviewContainerOutlet.clear();
|
|
27320
|
+
if (confirm("Are you sure?")) this.attachmentPreviewContainerOutlet.clear();
|
|
27512
27321
|
});
|
|
27513
27322
|
}
|
|
27514
27323
|
#buildPreview(data, url) {
|
|
@@ -27632,8 +27441,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27632
27441
|
color: "#838999",
|
|
27633
27442
|
icon: iconFile2()
|
|
27634
27443
|
};
|
|
27635
|
-
if (!fileType)
|
|
27636
|
-
return defaultChoice;
|
|
27444
|
+
if (!fileType) return defaultChoice;
|
|
27637
27445
|
const fileTypeGeneral = fileType.split("/")[0];
|
|
27638
27446
|
const fileTypeSpecific = fileType.split("/")[1];
|
|
27639
27447
|
if (fileTypeGeneral === "text") {
|
|
@@ -27684,8 +27492,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27684
27492
|
thumbnailUrl: String
|
|
27685
27493
|
};
|
|
27686
27494
|
connect() {
|
|
27687
|
-
if (!this.hasThumbnailTarget)
|
|
27688
|
-
return;
|
|
27495
|
+
if (!this.hasThumbnailTarget) return;
|
|
27689
27496
|
if (this.thumbnailUrlValue) {
|
|
27690
27497
|
this.useThumbnailPreview();
|
|
27691
27498
|
} else {
|
|
@@ -27753,12 +27560,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27753
27560
|
document.removeEventListener("turbo:render", this.afterRender);
|
|
27754
27561
|
}
|
|
27755
27562
|
beforeRender() {
|
|
27756
|
-
if (this.hasScrollTarget)
|
|
27757
|
-
savedScrollTop = this.scrollTarget.scrollTop;
|
|
27563
|
+
if (this.hasScrollTarget) savedScrollTop = this.scrollTarget.scrollTop;
|
|
27758
27564
|
}
|
|
27759
27565
|
afterRender() {
|
|
27760
|
-
if (this.hasScrollTarget)
|
|
27761
|
-
this.scrollTarget.scrollTop = savedScrollTop;
|
|
27566
|
+
if (this.hasScrollTarget) this.scrollTarget.scrollTop = savedScrollTop;
|
|
27762
27567
|
}
|
|
27763
27568
|
};
|
|
27764
27569
|
|
|
@@ -27799,8 +27604,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27799
27604
|
this.restoreBodyState();
|
|
27800
27605
|
}
|
|
27801
27606
|
restoreBodyState() {
|
|
27802
|
-
if (this.bodyStateRestored)
|
|
27803
|
-
return;
|
|
27607
|
+
if (this.bodyStateRestored) return;
|
|
27804
27608
|
this.bodyStateRestored = true;
|
|
27805
27609
|
document.body.style.overflow = this.originalOverflow || "";
|
|
27806
27610
|
window.scrollTo(0, this.originalScrollPosition);
|
|
@@ -27951,8 +27755,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27951
27755
|
return /* @__PURE__ */ new Set();
|
|
27952
27756
|
}
|
|
27953
27757
|
let intersection = new Set(this.getAllowedActionsForCheckbox(checked[0]));
|
|
27954
|
-
for (let
|
|
27955
|
-
const actions = this.getAllowedActionsForCheckbox(checked[
|
|
27758
|
+
for (let i4 = 1; i4 < checked.length; i4++) {
|
|
27759
|
+
const actions = this.getAllowedActionsForCheckbox(checked[i4]);
|
|
27956
27760
|
intersection = new Set([...intersection].filter((a4) => actions.includes(a4)));
|
|
27957
27761
|
}
|
|
27958
27762
|
return intersection;
|
|
@@ -27997,8 +27801,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27997
27801
|
this.panelTarget.setAttribute("data-open", "");
|
|
27998
27802
|
this.panelTarget.setAttribute("aria-hidden", "false");
|
|
27999
27803
|
}
|
|
28000
|
-
if (this.hasBackdropTarget)
|
|
28001
|
-
this.backdropTarget.setAttribute("data-open", "");
|
|
27804
|
+
if (this.hasBackdropTarget) this.backdropTarget.setAttribute("data-open", "");
|
|
28002
27805
|
this._lockBodyScroll();
|
|
28003
27806
|
document.addEventListener("keydown", this._onKeydown);
|
|
28004
27807
|
}
|
|
@@ -28007,8 +27810,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28007
27810
|
this.panelTarget.removeAttribute("data-open");
|
|
28008
27811
|
this.panelTarget.setAttribute("aria-hidden", "true");
|
|
28009
27812
|
}
|
|
28010
|
-
if (this.hasBackdropTarget)
|
|
28011
|
-
this.backdropTarget.removeAttribute("data-open");
|
|
27813
|
+
if (this.hasBackdropTarget) this.backdropTarget.removeAttribute("data-open");
|
|
28012
27814
|
this._unlockBodyScroll();
|
|
28013
27815
|
document.removeEventListener("keydown", this._onKeydown);
|
|
28014
27816
|
}
|
|
@@ -28016,14 +27818,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28016
27818
|
// and restore it on close. Avoids stomping a value another component
|
|
28017
27819
|
// (e.g. an open dialog) may have set.
|
|
28018
27820
|
_lockBodyScroll() {
|
|
28019
|
-
if (this._previousBodyOverflow != null)
|
|
28020
|
-
return;
|
|
27821
|
+
if (this._previousBodyOverflow != null) return;
|
|
28021
27822
|
this._previousBodyOverflow = document.body.style.overflow;
|
|
28022
27823
|
document.body.style.overflow = "hidden";
|
|
28023
27824
|
}
|
|
28024
27825
|
_unlockBodyScroll() {
|
|
28025
|
-
if (this._previousBodyOverflow == null)
|
|
28026
|
-
return;
|
|
27826
|
+
if (this._previousBodyOverflow == null) return;
|
|
28027
27827
|
document.body.style.overflow = this._previousBodyOverflow;
|
|
28028
27828
|
this._previousBodyOverflow = null;
|
|
28029
27829
|
}
|
|
@@ -28036,27 +27836,23 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28036
27836
|
} else if (input.tagName === "SELECT") {
|
|
28037
27837
|
input.selectedIndex = 0;
|
|
28038
27838
|
} else if (input.type === "hidden") {
|
|
28039
|
-
if (input.dataset.controller === "flatpickr")
|
|
28040
|
-
input.value = "";
|
|
27839
|
+
if (input.dataset.controller === "flatpickr") input.value = "";
|
|
28041
27840
|
} else {
|
|
28042
27841
|
input.value = "";
|
|
28043
27842
|
}
|
|
28044
27843
|
});
|
|
28045
27844
|
this.element.querySelectorAll('[data-controller="flatpickr"]').forEach((input) => {
|
|
28046
27845
|
const controller = this.application.getControllerForElementAndIdentifier(input, "flatpickr");
|
|
28047
|
-
if (controller?.picker)
|
|
28048
|
-
controller.picker.clear();
|
|
27846
|
+
if (controller?.picker) controller.picker.clear();
|
|
28049
27847
|
});
|
|
28050
27848
|
const form = this.element.querySelector("form");
|
|
28051
|
-
if (form)
|
|
28052
|
-
form.requestSubmit();
|
|
27849
|
+
if (form) form.requestSubmit();
|
|
28053
27850
|
}
|
|
28054
27851
|
get isOpen() {
|
|
28055
27852
|
return this.hasPanelTarget && this.panelTarget.hasAttribute("data-open");
|
|
28056
27853
|
}
|
|
28057
27854
|
_onKeydown(event) {
|
|
28058
|
-
if (event.key === "Escape")
|
|
28059
|
-
this.close();
|
|
27855
|
+
if (event.key === "Escape") this.close();
|
|
28060
27856
|
}
|
|
28061
27857
|
};
|
|
28062
27858
|
|
|
@@ -28181,23 +27977,19 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28181
27977
|
clearTimeout(this._closeTimer);
|
|
28182
27978
|
this._closeTimer = null;
|
|
28183
27979
|
}
|
|
28184
|
-
if (this._open)
|
|
28185
|
-
|
|
28186
|
-
if (!this._panel && !this.hasPanelTarget)
|
|
28187
|
-
return;
|
|
27980
|
+
if (this._open) return;
|
|
27981
|
+
if (!this._panel && !this.hasPanelTarget) return;
|
|
28188
27982
|
this._open = true;
|
|
28189
27983
|
this.element.dataset.flyoutOpen = "true";
|
|
28190
27984
|
this._portalPanel();
|
|
28191
27985
|
this._position();
|
|
28192
27986
|
}
|
|
28193
27987
|
scheduleClose() {
|
|
28194
|
-
if (this._closeTimer)
|
|
28195
|
-
clearTimeout(this._closeTimer);
|
|
27988
|
+
if (this._closeTimer) clearTimeout(this._closeTimer);
|
|
28196
27989
|
this._closeTimer = setTimeout(() => this.close(), this.closeDelayValue);
|
|
28197
27990
|
}
|
|
28198
27991
|
close() {
|
|
28199
|
-
if (!this._open)
|
|
28200
|
-
return;
|
|
27992
|
+
if (!this._open) return;
|
|
28201
27993
|
this._open = false;
|
|
28202
27994
|
delete this.element.dataset.flyoutOpen;
|
|
28203
27995
|
this._returnPanel();
|
|
@@ -28207,15 +27999,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28207
27999
|
this._open ? this.close() : this.open();
|
|
28208
28000
|
}
|
|
28209
28001
|
closeOnEsc(event) {
|
|
28210
|
-
if (event.key === "Escape")
|
|
28211
|
-
this.close();
|
|
28002
|
+
if (event.key === "Escape") this.close();
|
|
28212
28003
|
}
|
|
28213
28004
|
_portalPanel() {
|
|
28214
|
-
if (this._panel)
|
|
28215
|
-
return;
|
|
28005
|
+
if (this._panel) return;
|
|
28216
28006
|
const panel = this.panelTarget;
|
|
28217
|
-
if (!panel)
|
|
28218
|
-
return;
|
|
28007
|
+
if (!panel) return;
|
|
28219
28008
|
this._panel = panel;
|
|
28220
28009
|
this._panelHome = panel.parentElement;
|
|
28221
28010
|
panel.addEventListener("mouseenter", this._onPanelEnter);
|
|
@@ -28224,8 +28013,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28224
28013
|
panel.style.display = "block";
|
|
28225
28014
|
}
|
|
28226
28015
|
_returnPanel() {
|
|
28227
|
-
if (!this._panel)
|
|
28228
|
-
return;
|
|
28016
|
+
if (!this._panel) return;
|
|
28229
28017
|
const panel = this._panel;
|
|
28230
28018
|
panel.removeEventListener("mouseenter", this._onPanelEnter);
|
|
28231
28019
|
panel.removeEventListener("mouseleave", this._onPanelLeave);
|
|
@@ -28242,8 +28030,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28242
28030
|
this._panelHome = null;
|
|
28243
28031
|
}
|
|
28244
28032
|
_position() {
|
|
28245
|
-
if (!this._panel || !this.hasTriggerTarget)
|
|
28246
|
-
return;
|
|
28033
|
+
if (!this._panel || !this.hasTriggerTarget) return;
|
|
28247
28034
|
const panel = this._panel;
|
|
28248
28035
|
const triggerRect = this.triggerTarget.getBoundingClientRect();
|
|
28249
28036
|
panel.style.position = "fixed";
|
|
@@ -28263,12 +28050,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28263
28050
|
// src/js/controllers/table_header_controller.js
|
|
28264
28051
|
var table_header_controller_default = class extends Controller {
|
|
28265
28052
|
headerClick(event) {
|
|
28266
|
-
if (!event.shiftKey)
|
|
28267
|
-
return;
|
|
28053
|
+
if (!event.shiftKey) return;
|
|
28268
28054
|
const link2 = event.currentTarget;
|
|
28269
28055
|
const multiHref = link2.dataset.tableHeaderMultiHref;
|
|
28270
|
-
if (!multiHref)
|
|
28271
|
-
return;
|
|
28056
|
+
if (!multiHref) return;
|
|
28272
28057
|
event.preventDefault();
|
|
28273
28058
|
Turbo.visit(multiHref);
|
|
28274
28059
|
}
|
|
@@ -28288,8 +28073,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28288
28073
|
if (isNowVisible) {
|
|
28289
28074
|
document.addEventListener("click", this._onDocClick);
|
|
28290
28075
|
this._onKey = (e4) => {
|
|
28291
|
-
if (e4.key === "Escape")
|
|
28292
|
-
this._close();
|
|
28076
|
+
if (e4.key === "Escape") this._close();
|
|
28293
28077
|
};
|
|
28294
28078
|
document.addEventListener("keydown", this._onKey);
|
|
28295
28079
|
} else {
|
|
@@ -28298,8 +28082,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28298
28082
|
}
|
|
28299
28083
|
}
|
|
28300
28084
|
_close() {
|
|
28301
|
-
if (this.hasPanelTarget)
|
|
28302
|
-
this.panelTarget.classList.add("hidden");
|
|
28085
|
+
if (this.hasPanelTarget) this.panelTarget.classList.add("hidden");
|
|
28303
28086
|
this._unbind();
|
|
28304
28087
|
}
|
|
28305
28088
|
_unbind() {
|
|
@@ -28310,8 +28093,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28310
28093
|
}
|
|
28311
28094
|
}
|
|
28312
28095
|
_onDocClick(event) {
|
|
28313
|
-
if (!this.element.contains(event.target))
|
|
28314
|
-
this._close();
|
|
28096
|
+
if (!this.element.contains(event.target)) this._close();
|
|
28315
28097
|
}
|
|
28316
28098
|
};
|
|
28317
28099
|
|
|
@@ -28339,8 +28121,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28339
28121
|
static values = { cookieName: String, cookiePath: { type: String, default: "/" } };
|
|
28340
28122
|
select(event) {
|
|
28341
28123
|
const view = event.params.view;
|
|
28342
|
-
if (!view || !this.cookieNameValue)
|
|
28343
|
-
return;
|
|
28124
|
+
if (!view || !this.cookieNameValue) return;
|
|
28344
28125
|
const maxAge = 60 * 60 * 24 * 365;
|
|
28345
28126
|
const path = this.cookiePathValue || "/";
|
|
28346
28127
|
document.cookie = `${this.cookieNameValue}=${encodeURIComponent(view)}; Path=${path}; Max-Age=${maxAge}; SameSite=Lax`;
|
|
@@ -28357,12 +28138,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28357
28138
|
this._timer = null;
|
|
28358
28139
|
}
|
|
28359
28140
|
disconnect() {
|
|
28360
|
-
if (this._timer)
|
|
28361
|
-
clearTimeout(this._timer);
|
|
28141
|
+
if (this._timer) clearTimeout(this._timer);
|
|
28362
28142
|
}
|
|
28363
28143
|
submit() {
|
|
28364
|
-
if (this._timer)
|
|
28365
|
-
clearTimeout(this._timer);
|
|
28144
|
+
if (this._timer) clearTimeout(this._timer);
|
|
28366
28145
|
this._timer = setTimeout(() => {
|
|
28367
28146
|
this.element.closest("form")?.requestSubmit();
|
|
28368
28147
|
}, this.delayValue);
|
|
@@ -28412,6 +28191,23 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28412
28191
|
const url = this.getAttribute("url");
|
|
28413
28192
|
Turbo.visit(url);
|
|
28414
28193
|
};
|
|
28194
|
+
Turbo.StreamActions.close_frame = function() {
|
|
28195
|
+
const frameId = this.getAttribute("target");
|
|
28196
|
+
if (!frameId) return;
|
|
28197
|
+
const frame = document.getElementById(frameId);
|
|
28198
|
+
if (!frame) return;
|
|
28199
|
+
const dialog = frame.querySelector("dialog");
|
|
28200
|
+
if (dialog && typeof dialog.close === "function") dialog.close();
|
|
28201
|
+
frame.innerHTML = "";
|
|
28202
|
+
frame.removeAttribute("src");
|
|
28203
|
+
};
|
|
28204
|
+
Turbo.StreamActions.reload_frame = function() {
|
|
28205
|
+
const frameId = this.getAttribute("target");
|
|
28206
|
+
if (!frameId) return;
|
|
28207
|
+
const frame = document.getElementById(frameId);
|
|
28208
|
+
if (!frame || typeof frame.reload !== "function") return;
|
|
28209
|
+
frame.reload();
|
|
28210
|
+
};
|
|
28415
28211
|
|
|
28416
28212
|
// src/js/plutonium.js
|
|
28417
28213
|
var application = Application.start();
|
|
@@ -28447,7 +28243,7 @@ cropperjs/dist/cropper.js:
|
|
|
28447
28243
|
*)
|
|
28448
28244
|
|
|
28449
28245
|
dompurify/dist/purify.es.mjs:
|
|
28450
|
-
(*! @license DOMPurify 3.3
|
|
28246
|
+
(*! @license DOMPurify 3.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.3/LICENSE *)
|
|
28451
28247
|
|
|
28452
28248
|
@uppy/utils/lib/Translator.js:
|
|
28453
28249
|
(**
|