dialog-survey 1.1.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.
Files changed (233) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/README.md +242 -0
  3. package/VERSION +1 -0
  4. package/dist/api/admin-templates.d.ts +15 -0
  5. package/dist/api/admin-templates.d.ts.map +1 -0
  6. package/dist/api/admin-templates.js +611 -0
  7. package/dist/api/admin-templates.js.map +1 -0
  8. package/dist/api/analysis.d.ts +8 -0
  9. package/dist/api/analysis.d.ts.map +1 -0
  10. package/dist/api/analysis.js +106 -0
  11. package/dist/api/analysis.js.map +1 -0
  12. package/dist/api/health.d.ts +6 -0
  13. package/dist/api/health.d.ts.map +1 -0
  14. package/dist/api/health.js +116 -0
  15. package/dist/api/health.js.map +1 -0
  16. package/dist/api/plans.d.ts +3 -0
  17. package/dist/api/plans.d.ts.map +1 -0
  18. package/dist/api/plans.js +184 -0
  19. package/dist/api/plans.js.map +1 -0
  20. package/dist/api/templates.d.ts +9 -0
  21. package/dist/api/templates.d.ts.map +1 -0
  22. package/dist/api/templates.js +211 -0
  23. package/dist/api/templates.js.map +1 -0
  24. package/dist/core/graph.d.ts +7 -0
  25. package/dist/core/graph.d.ts.map +1 -0
  26. package/dist/core/graph.js +31 -0
  27. package/dist/core/graph.js.map +1 -0
  28. package/dist/core/nodes/analyzing.d.ts +3 -0
  29. package/dist/core/nodes/analyzing.d.ts.map +1 -0
  30. package/dist/core/nodes/analyzing.js +38 -0
  31. package/dist/core/nodes/analyzing.js.map +1 -0
  32. package/dist/core/nodes/completed.d.ts +3 -0
  33. package/dist/core/nodes/completed.d.ts.map +1 -0
  34. package/dist/core/nodes/completed.js +8 -0
  35. package/dist/core/nodes/completed.js.map +1 -0
  36. package/dist/core/nodes/interviewing.d.ts +13 -0
  37. package/dist/core/nodes/interviewing.d.ts.map +1 -0
  38. package/dist/core/nodes/interviewing.js +130 -0
  39. package/dist/core/nodes/interviewing.js.map +1 -0
  40. package/dist/core/nodes/planning.d.ts +15 -0
  41. package/dist/core/nodes/planning.d.ts.map +1 -0
  42. package/dist/core/nodes/planning.js +40 -0
  43. package/dist/core/nodes/planning.js.map +1 -0
  44. package/dist/core/types/index.d.ts +69 -0
  45. package/dist/core/types/index.d.ts.map +1 -0
  46. package/dist/core/types/index.js +49 -0
  47. package/dist/core/types/index.js.map +1 -0
  48. package/dist/domains/interview/entities/interview.entity.d.ts +21 -0
  49. package/dist/domains/interview/entities/interview.entity.d.ts.map +1 -0
  50. package/dist/domains/interview/entities/interview.entity.js +20 -0
  51. package/dist/domains/interview/entities/interview.entity.js.map +1 -0
  52. package/dist/domains/interview/entities/message.entity.d.ts +15 -0
  53. package/dist/domains/interview/entities/message.entity.d.ts.map +1 -0
  54. package/dist/domains/interview/entities/message.entity.js +11 -0
  55. package/dist/domains/interview/entities/message.entity.js.map +1 -0
  56. package/dist/domains/interview/entities/response.entity.d.ts +17 -0
  57. package/dist/domains/interview/entities/response.entity.d.ts.map +1 -0
  58. package/dist/domains/interview/entities/response.entity.js +12 -0
  59. package/dist/domains/interview/entities/response.entity.js.map +1 -0
  60. package/dist/domains/interview/services/interview.domain.d.ts +8 -0
  61. package/dist/domains/interview/services/interview.domain.d.ts.map +1 -0
  62. package/dist/domains/interview/services/interview.domain.js +30 -0
  63. package/dist/domains/interview/services/interview.domain.js.map +1 -0
  64. package/dist/integrations/dingtalk/client.d.ts +32 -0
  65. package/dist/integrations/dingtalk/client.d.ts.map +1 -0
  66. package/dist/integrations/dingtalk/client.js +89 -0
  67. package/dist/integrations/dingtalk/client.js.map +1 -0
  68. package/dist/integrations/dingtalk/message-sender.d.ts +24 -0
  69. package/dist/integrations/dingtalk/message-sender.d.ts.map +1 -0
  70. package/dist/integrations/dingtalk/message-sender.js +81 -0
  71. package/dist/integrations/dingtalk/message-sender.js.map +1 -0
  72. package/dist/integrations/dingtalk/middleware.d.ts +4 -0
  73. package/dist/integrations/dingtalk/middleware.d.ts.map +1 -0
  74. package/dist/integrations/dingtalk/middleware.js +29 -0
  75. package/dist/integrations/dingtalk/middleware.js.map +1 -0
  76. package/dist/integrations/dingtalk/stream-client.d.ts +112 -0
  77. package/dist/integrations/dingtalk/stream-client.d.ts.map +1 -0
  78. package/dist/integrations/dingtalk/stream-client.js +305 -0
  79. package/dist/integrations/dingtalk/stream-client.js.map +1 -0
  80. package/dist/integrations/dingtalk/token-manager.d.ts +22 -0
  81. package/dist/integrations/dingtalk/token-manager.d.ts.map +1 -0
  82. package/dist/integrations/dingtalk/token-manager.js +109 -0
  83. package/dist/integrations/dingtalk/token-manager.js.map +1 -0
  84. package/dist/integrations/llm/alibaba.d.ts +10 -0
  85. package/dist/integrations/llm/alibaba.d.ts.map +1 -0
  86. package/dist/integrations/llm/alibaba.js +60 -0
  87. package/dist/integrations/llm/alibaba.js.map +1 -0
  88. package/dist/integrations/llm/base.d.ts +28 -0
  89. package/dist/integrations/llm/base.d.ts.map +1 -0
  90. package/dist/integrations/llm/base.js +2 -0
  91. package/dist/integrations/llm/base.js.map +1 -0
  92. package/dist/integrations/llm/volcengine.d.ts +12 -0
  93. package/dist/integrations/llm/volcengine.d.ts.map +1 -0
  94. package/dist/integrations/llm/volcengine.js +80 -0
  95. package/dist/integrations/llm/volcengine.js.map +1 -0
  96. package/dist/middleware/admin-auth.d.ts +3 -0
  97. package/dist/middleware/admin-auth.d.ts.map +1 -0
  98. package/dist/middleware/admin-auth.js +37 -0
  99. package/dist/middleware/admin-auth.js.map +1 -0
  100. package/dist/middleware/api-auth.d.ts +10 -0
  101. package/dist/middleware/api-auth.d.ts.map +1 -0
  102. package/dist/middleware/api-auth.js +30 -0
  103. package/dist/middleware/api-auth.js.map +1 -0
  104. package/dist/repositories/interview-state-mapper.d.ts +28 -0
  105. package/dist/repositories/interview-state-mapper.d.ts.map +1 -0
  106. package/dist/repositories/interview-state-mapper.js +32 -0
  107. package/dist/repositories/interview-state-mapper.js.map +1 -0
  108. package/dist/repositories/interview-state.repository.d.ts +34 -0
  109. package/dist/repositories/interview-state.repository.d.ts.map +1 -0
  110. package/dist/repositories/interview-state.repository.js +220 -0
  111. package/dist/repositories/interview-state.repository.js.map +1 -0
  112. package/dist/repositories/interview.repository.d.ts +29 -0
  113. package/dist/repositories/interview.repository.d.ts.map +1 -0
  114. package/dist/repositories/interview.repository.js +36 -0
  115. package/dist/repositories/interview.repository.js.map +1 -0
  116. package/dist/repositories/message.repository.d.ts +17 -0
  117. package/dist/repositories/message.repository.d.ts.map +1 -0
  118. package/dist/repositories/message.repository.js +37 -0
  119. package/dist/repositories/message.repository.js.map +1 -0
  120. package/dist/repositories/template.repository.d.ts +117 -0
  121. package/dist/repositories/template.repository.d.ts.map +1 -0
  122. package/dist/repositories/template.repository.js +280 -0
  123. package/dist/repositories/template.repository.js.map +1 -0
  124. package/dist/schemas/dimensions.d.ts +61 -0
  125. package/dist/schemas/dimensions.d.ts.map +1 -0
  126. package/dist/schemas/dimensions.js +44 -0
  127. package/dist/schemas/dimensions.js.map +1 -0
  128. package/dist/server.d.ts +10 -0
  129. package/dist/server.d.ts.map +1 -0
  130. package/dist/server.js +217 -0
  131. package/dist/server.js.map +1 -0
  132. package/dist/services/analysis.service.d.ts +81 -0
  133. package/dist/services/analysis.service.d.ts.map +1 -0
  134. package/dist/services/analysis.service.js +229 -0
  135. package/dist/services/analysis.service.js.map +1 -0
  136. package/dist/services/analytics.service.d.ts +44 -0
  137. package/dist/services/analytics.service.d.ts.map +1 -0
  138. package/dist/services/analytics.service.js +222 -0
  139. package/dist/services/analytics.service.js.map +1 -0
  140. package/dist/services/asr.service.d.ts +9 -0
  141. package/dist/services/asr.service.d.ts.map +1 -0
  142. package/dist/services/asr.service.js +41 -0
  143. package/dist/services/asr.service.js.map +1 -0
  144. package/dist/services/audit-cleanup.service.d.ts +9 -0
  145. package/dist/services/audit-cleanup.service.d.ts.map +1 -0
  146. package/dist/services/audit-cleanup.service.js +27 -0
  147. package/dist/services/audit-cleanup.service.js.map +1 -0
  148. package/dist/services/batch-aggregation.service.d.ts +34 -0
  149. package/dist/services/batch-aggregation.service.d.ts.map +1 -0
  150. package/dist/services/batch-aggregation.service.js +91 -0
  151. package/dist/services/batch-aggregation.service.js.map +1 -0
  152. package/dist/services/conversation-engine.d.ts +16 -0
  153. package/dist/services/conversation-engine.d.ts.map +1 -0
  154. package/dist/services/conversation-engine.js +49 -0
  155. package/dist/services/conversation-engine.js.map +1 -0
  156. package/dist/services/dead-letter.service.d.ts +12 -0
  157. package/dist/services/dead-letter.service.d.ts.map +1 -0
  158. package/dist/services/dead-letter.service.js +24 -0
  159. package/dist/services/dead-letter.service.js.map +1 -0
  160. package/dist/services/followup.service.d.ts +18 -0
  161. package/dist/services/followup.service.d.ts.map +1 -0
  162. package/dist/services/followup.service.js +146 -0
  163. package/dist/services/followup.service.js.map +1 -0
  164. package/dist/services/interview-plan-base.service.d.ts +226 -0
  165. package/dist/services/interview-plan-base.service.d.ts.map +1 -0
  166. package/dist/services/interview-plan-base.service.js +217 -0
  167. package/dist/services/interview-plan-base.service.js.map +1 -0
  168. package/dist/services/interview-plan-members.service.d.ts +45 -0
  169. package/dist/services/interview-plan-members.service.d.ts.map +1 -0
  170. package/dist/services/interview-plan-members.service.js +237 -0
  171. package/dist/services/interview-plan-members.service.js.map +1 -0
  172. package/dist/services/interview-plan-send.service.d.ts +27 -0
  173. package/dist/services/interview-plan-send.service.d.ts.map +1 -0
  174. package/dist/services/interview-plan-send.service.js +250 -0
  175. package/dist/services/interview-plan-send.service.js.map +1 -0
  176. package/dist/services/interview-plan.service.d.ts +8 -0
  177. package/dist/services/interview-plan.service.d.ts.map +1 -0
  178. package/dist/services/interview-plan.service.js +8 -0
  179. package/dist/services/interview-plan.service.js.map +1 -0
  180. package/dist/services/llm-clustering.d.ts +16 -0
  181. package/dist/services/llm-clustering.d.ts.map +1 -0
  182. package/dist/services/llm-clustering.js +91 -0
  183. package/dist/services/llm-clustering.js.map +1 -0
  184. package/dist/services/prompt.service.d.ts +13 -0
  185. package/dist/services/prompt.service.d.ts.map +1 -0
  186. package/dist/services/prompt.service.js +151 -0
  187. package/dist/services/prompt.service.js.map +1 -0
  188. package/dist/services/report.service.d.ts +28 -0
  189. package/dist/services/report.service.d.ts.map +1 -0
  190. package/dist/services/report.service.js +169 -0
  191. package/dist/services/report.service.js.map +1 -0
  192. package/dist/services/stream-message-utils.d.ts +31 -0
  193. package/dist/services/stream-message-utils.d.ts.map +1 -0
  194. package/dist/services/stream-message-utils.js +80 -0
  195. package/dist/services/stream-message-utils.js.map +1 -0
  196. package/dist/services/stream-message.service.d.ts +29 -0
  197. package/dist/services/stream-message.service.d.ts.map +1 -0
  198. package/dist/services/stream-message.service.js +184 -0
  199. package/dist/services/stream-message.service.js.map +1 -0
  200. package/dist/services/template-dimension.service.d.ts +21 -0
  201. package/dist/services/template-dimension.service.d.ts.map +1 -0
  202. package/dist/services/template-dimension.service.js +9 -0
  203. package/dist/services/template-dimension.service.js.map +1 -0
  204. package/dist/utils/db.d.ts +10 -0
  205. package/dist/utils/db.d.ts.map +1 -0
  206. package/dist/utils/db.js +21 -0
  207. package/dist/utils/db.js.map +1 -0
  208. package/dist/utils/logger.d.ts +8 -0
  209. package/dist/utils/logger.d.ts.map +1 -0
  210. package/dist/utils/logger.js +21 -0
  211. package/dist/utils/logger.js.map +1 -0
  212. package/dist/utils/markdown.d.ts +2 -0
  213. package/dist/utils/markdown.d.ts.map +1 -0
  214. package/dist/utils/markdown.js +39 -0
  215. package/dist/utils/markdown.js.map +1 -0
  216. package/dist/utils/pii-anonymizer.d.ts +2 -0
  217. package/dist/utils/pii-anonymizer.d.ts.map +1 -0
  218. package/dist/utils/pii-anonymizer.js +13 -0
  219. package/dist/utils/pii-anonymizer.js.map +1 -0
  220. package/dist/utils/retry.d.ts +8 -0
  221. package/dist/utils/retry.d.ts.map +1 -0
  222. package/dist/utils/retry.js +28 -0
  223. package/dist/utils/retry.js.map +1 -0
  224. package/dist/utils/security.d.ts +26 -0
  225. package/dist/utils/security.d.ts.map +1 -0
  226. package/dist/utils/security.js +99 -0
  227. package/dist/utils/security.js.map +1 -0
  228. package/package.json +80 -0
  229. package/prisma/schema.prisma +228 -0
  230. package/public/css/admin.css +73 -0
  231. package/public/js/alpine.min.js +2670 -0
  232. package/public/js/htmx.min.js +3422 -0
  233. package/scripts/cli.mjs +794 -0
@@ -0,0 +1,3422 @@
1
+ var htmx = (function () {
2
+ 'use strict';
3
+ const Q = {
4
+ onLoad: null,
5
+ process: null,
6
+ on: null,
7
+ off: null,
8
+ trigger: null,
9
+ ajax: null,
10
+ find: null,
11
+ findAll: null,
12
+ closest: null,
13
+ values: function (e, t) {
14
+ const n = cn(e, t || 'post');
15
+ return n.values;
16
+ },
17
+ remove: null,
18
+ addClass: null,
19
+ removeClass: null,
20
+ toggleClass: null,
21
+ takeClass: null,
22
+ swap: null,
23
+ defineExtension: null,
24
+ removeExtension: null,
25
+ logAll: null,
26
+ logNone: null,
27
+ logger: null,
28
+ config: {
29
+ historyEnabled: true,
30
+ historyCacheSize: 10,
31
+ refreshOnHistoryMiss: false,
32
+ defaultSwapStyle: 'innerHTML',
33
+ defaultSwapDelay: 0,
34
+ defaultSettleDelay: 20,
35
+ includeIndicatorStyles: true,
36
+ indicatorClass: 'htmx-indicator',
37
+ requestClass: 'htmx-request',
38
+ addedClass: 'htmx-added',
39
+ settlingClass: 'htmx-settling',
40
+ swappingClass: 'htmx-swapping',
41
+ allowEval: true,
42
+ allowScriptTags: true,
43
+ inlineScriptNonce: '',
44
+ inlineStyleNonce: '',
45
+ attributesToSettle: ['class', 'style', 'width', 'height'],
46
+ withCredentials: false,
47
+ timeout: 0,
48
+ wsReconnectDelay: 'full-jitter',
49
+ wsBinaryType: 'blob',
50
+ disableSelector: '[hx-disable], [data-hx-disable]',
51
+ scrollBehavior: 'instant',
52
+ defaultFocusScroll: false,
53
+ getCacheBusterParam: false,
54
+ globalViewTransitions: false,
55
+ methodsThatUseUrlParams: ['get', 'delete'],
56
+ selfRequestsOnly: true,
57
+ ignoreTitle: false,
58
+ scrollIntoViewOnBoost: true,
59
+ triggerSpecsCache: null,
60
+ disableInheritance: false,
61
+ responseHandling: [
62
+ { code: '204', swap: false },
63
+ { code: '[23]..', swap: true },
64
+ { code: '[45]..', swap: false, error: true },
65
+ ],
66
+ allowNestedOobSwaps: true,
67
+ },
68
+ parseInterval: null,
69
+ _: null,
70
+ version: '2.0.4',
71
+ };
72
+ Q.onLoad = j;
73
+ Q.process = kt;
74
+ Q.on = ye;
75
+ Q.off = be;
76
+ Q.trigger = he;
77
+ Q.ajax = Rn;
78
+ Q.find = u;
79
+ Q.findAll = x;
80
+ Q.closest = g;
81
+ Q.remove = z;
82
+ Q.addClass = K;
83
+ Q.removeClass = G;
84
+ Q.toggleClass = W;
85
+ Q.takeClass = Z;
86
+ Q.swap = $e;
87
+ Q.defineExtension = Fn;
88
+ Q.removeExtension = Bn;
89
+ Q.logAll = V;
90
+ Q.logNone = _;
91
+ Q.parseInterval = d;
92
+ Q._ = e;
93
+ const n = {
94
+ addTriggerHandler: St,
95
+ bodyContains: le,
96
+ canAccessLocalStorage: B,
97
+ findThisElement: Se,
98
+ filterValues: hn,
99
+ swap: $e,
100
+ hasAttribute: s,
101
+ getAttributeValue: te,
102
+ getClosestAttributeValue: re,
103
+ getClosestMatch: o,
104
+ getExpressionVars: En,
105
+ getHeaders: fn,
106
+ getInputValues: cn,
107
+ getInternalData: ie,
108
+ getSwapSpecification: gn,
109
+ getTriggerSpecs: st,
110
+ getTarget: Ee,
111
+ makeFragment: P,
112
+ mergeObjects: ce,
113
+ makeSettleInfo: xn,
114
+ oobSwap: He,
115
+ querySelectorExt: ae,
116
+ settleImmediately: Kt,
117
+ shouldCancel: ht,
118
+ triggerEvent: he,
119
+ triggerErrorEvent: fe,
120
+ withExtensions: Ft,
121
+ };
122
+ const r = ['get', 'post', 'put', 'delete', 'patch'];
123
+ const H = r
124
+ .map(function (e) {
125
+ return '[hx-' + e + '], [data-hx-' + e + ']';
126
+ })
127
+ .join(', ');
128
+ function d(e) {
129
+ if (e == undefined) {
130
+ return undefined;
131
+ }
132
+ let t = NaN;
133
+ if (e.slice(-2) == 'ms') {
134
+ t = parseFloat(e.slice(0, -2));
135
+ } else if (e.slice(-1) == 's') {
136
+ t = parseFloat(e.slice(0, -1)) * 1e3;
137
+ } else if (e.slice(-1) == 'm') {
138
+ t = parseFloat(e.slice(0, -1)) * 1e3 * 60;
139
+ } else {
140
+ t = parseFloat(e);
141
+ }
142
+ return isNaN(t) ? undefined : t;
143
+ }
144
+ function ee(e, t) {
145
+ return e instanceof Element && e.getAttribute(t);
146
+ }
147
+ function s(e, t) {
148
+ return !!e.hasAttribute && (e.hasAttribute(t) || e.hasAttribute('data-' + t));
149
+ }
150
+ function te(e, t) {
151
+ return ee(e, t) || ee(e, 'data-' + t);
152
+ }
153
+ function c(e) {
154
+ const t = e.parentElement;
155
+ if (!t && e.parentNode instanceof ShadowRoot) return e.parentNode;
156
+ return t;
157
+ }
158
+ function ne() {
159
+ return document;
160
+ }
161
+ function m(e, t) {
162
+ return e.getRootNode ? e.getRootNode({ composed: t }) : ne();
163
+ }
164
+ function o(e, t) {
165
+ while (e && !t(e)) {
166
+ e = c(e);
167
+ }
168
+ return e || null;
169
+ }
170
+ function i(e, t, n) {
171
+ const r = te(t, n);
172
+ const o = te(t, 'hx-disinherit');
173
+ var i = te(t, 'hx-inherit');
174
+ if (e !== t) {
175
+ if (Q.config.disableInheritance) {
176
+ if (i && (i === '*' || i.split(' ').indexOf(n) >= 0)) {
177
+ return r;
178
+ } else {
179
+ return null;
180
+ }
181
+ }
182
+ if (o && (o === '*' || o.split(' ').indexOf(n) >= 0)) {
183
+ return 'unset';
184
+ }
185
+ }
186
+ return r;
187
+ }
188
+ function re(t, n) {
189
+ let r = null;
190
+ o(t, function (e) {
191
+ return !!(r = i(t, ue(e), n));
192
+ });
193
+ if (r !== 'unset') {
194
+ return r;
195
+ }
196
+ }
197
+ function h(e, t) {
198
+ const n =
199
+ e instanceof Element &&
200
+ (e.matches ||
201
+ e.matchesSelector ||
202
+ e.msMatchesSelector ||
203
+ e.mozMatchesSelector ||
204
+ e.webkitMatchesSelector ||
205
+ e.oMatchesSelector);
206
+ return !!n && n.call(e, t);
207
+ }
208
+ function T(e) {
209
+ const t = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
210
+ const n = t.exec(e);
211
+ if (n) {
212
+ return n[1].toLowerCase();
213
+ } else {
214
+ return '';
215
+ }
216
+ }
217
+ function q(e) {
218
+ const t = new DOMParser();
219
+ return t.parseFromString(e, 'text/html');
220
+ }
221
+ function L(e, t) {
222
+ while (t.childNodes.length > 0) {
223
+ e.append(t.childNodes[0]);
224
+ }
225
+ }
226
+ function A(e) {
227
+ const t = ne().createElement('script');
228
+ se(e.attributes, function (e) {
229
+ t.setAttribute(e.name, e.value);
230
+ });
231
+ t.textContent = e.textContent;
232
+ t.async = false;
233
+ if (Q.config.inlineScriptNonce) {
234
+ t.nonce = Q.config.inlineScriptNonce;
235
+ }
236
+ return t;
237
+ }
238
+ function N(e) {
239
+ return (
240
+ e.matches('script') && (e.type === 'text/javascript' || e.type === 'module' || e.type === '')
241
+ );
242
+ }
243
+ function I(e) {
244
+ Array.from(e.querySelectorAll('script')).forEach((e) => {
245
+ if (N(e)) {
246
+ const t = A(e);
247
+ const n = e.parentNode;
248
+ try {
249
+ n.insertBefore(t, e);
250
+ } catch (e) {
251
+ O(e);
252
+ } finally {
253
+ e.remove();
254
+ }
255
+ }
256
+ });
257
+ }
258
+ function P(e) {
259
+ const t = e.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i, '');
260
+ const n = T(t);
261
+ let r;
262
+ if (n === 'html') {
263
+ r = new DocumentFragment();
264
+ const i = q(e);
265
+ L(r, i.body);
266
+ r.title = i.title;
267
+ } else if (n === 'body') {
268
+ r = new DocumentFragment();
269
+ const i = q(t);
270
+ L(r, i.body);
271
+ r.title = i.title;
272
+ } else {
273
+ const i = q('<body><template class="internal-htmx-wrapper">' + t + '</template></body>');
274
+ r = i.querySelector('template').content;
275
+ r.title = i.title;
276
+ var o = r.querySelector('title');
277
+ if (o && o.parentNode === r) {
278
+ o.remove();
279
+ r.title = o.innerText;
280
+ }
281
+ }
282
+ if (r) {
283
+ if (Q.config.allowScriptTags) {
284
+ I(r);
285
+ } else {
286
+ r.querySelectorAll('script').forEach((e) => e.remove());
287
+ }
288
+ }
289
+ return r;
290
+ }
291
+ function oe(e) {
292
+ if (e) {
293
+ e();
294
+ }
295
+ }
296
+ function t(e, t) {
297
+ return Object.prototype.toString.call(e) === '[object ' + t + ']';
298
+ }
299
+ function k(e) {
300
+ return typeof e === 'function';
301
+ }
302
+ function D(e) {
303
+ return t(e, 'Object');
304
+ }
305
+ function ie(e) {
306
+ const t = 'htmx-internal-data';
307
+ let n = e[t];
308
+ if (!n) {
309
+ n = e[t] = {};
310
+ }
311
+ return n;
312
+ }
313
+ function M(t) {
314
+ const n = [];
315
+ if (t) {
316
+ for (let e = 0; e < t.length; e++) {
317
+ n.push(t[e]);
318
+ }
319
+ }
320
+ return n;
321
+ }
322
+ function se(t, n) {
323
+ if (t) {
324
+ for (let e = 0; e < t.length; e++) {
325
+ n(t[e]);
326
+ }
327
+ }
328
+ }
329
+ function X(e) {
330
+ const t = e.getBoundingClientRect();
331
+ const n = t.top;
332
+ const r = t.bottom;
333
+ return n < window.innerHeight && r >= 0;
334
+ }
335
+ function le(e) {
336
+ return e.getRootNode({ composed: true }) === document;
337
+ }
338
+ function F(e) {
339
+ return e.trim().split(/\s+/);
340
+ }
341
+ function ce(e, t) {
342
+ for (const n in t) {
343
+ if (t.hasOwnProperty(n)) {
344
+ e[n] = t[n];
345
+ }
346
+ }
347
+ return e;
348
+ }
349
+ function S(e) {
350
+ try {
351
+ return JSON.parse(e);
352
+ } catch (e) {
353
+ O(e);
354
+ return null;
355
+ }
356
+ }
357
+ function B() {
358
+ const e = 'htmx:localStorageTest';
359
+ try {
360
+ localStorage.setItem(e, e);
361
+ localStorage.removeItem(e);
362
+ return true;
363
+ } catch (e) {
364
+ return false;
365
+ }
366
+ }
367
+ function U(t) {
368
+ try {
369
+ const e = new URL(t);
370
+ if (e) {
371
+ t = e.pathname + e.search;
372
+ }
373
+ if (!/^\/$/.test(t)) {
374
+ t = t.replace(/\/+$/, '');
375
+ }
376
+ return t;
377
+ } catch (e) {
378
+ return t;
379
+ }
380
+ }
381
+ function e(e) {
382
+ return vn(ne().body, function () {
383
+ return eval(e);
384
+ });
385
+ }
386
+ function j(t) {
387
+ const e = Q.on('htmx:load', function (e) {
388
+ t(e.detail.elt);
389
+ });
390
+ return e;
391
+ }
392
+ function V() {
393
+ Q.logger = function (e, t, n) {
394
+ if (console) {
395
+ console.log(t, e, n);
396
+ }
397
+ };
398
+ }
399
+ function _() {
400
+ Q.logger = null;
401
+ }
402
+ function u(e, t) {
403
+ if (typeof e !== 'string') {
404
+ return e.querySelector(t);
405
+ } else {
406
+ return u(ne(), e);
407
+ }
408
+ }
409
+ function x(e, t) {
410
+ if (typeof e !== 'string') {
411
+ return e.querySelectorAll(t);
412
+ } else {
413
+ return x(ne(), e);
414
+ }
415
+ }
416
+ function E() {
417
+ return window;
418
+ }
419
+ function z(e, t) {
420
+ e = y(e);
421
+ if (t) {
422
+ E().setTimeout(function () {
423
+ z(e);
424
+ e = null;
425
+ }, t);
426
+ } else {
427
+ c(e).removeChild(e);
428
+ }
429
+ }
430
+ function ue(e) {
431
+ return e instanceof Element ? e : null;
432
+ }
433
+ function $(e) {
434
+ return e instanceof HTMLElement ? e : null;
435
+ }
436
+ function J(e) {
437
+ return typeof e === 'string' ? e : null;
438
+ }
439
+ function f(e) {
440
+ return e instanceof Element || e instanceof Document || e instanceof DocumentFragment
441
+ ? e
442
+ : null;
443
+ }
444
+ function K(e, t, n) {
445
+ e = ue(y(e));
446
+ if (!e) {
447
+ return;
448
+ }
449
+ if (n) {
450
+ E().setTimeout(function () {
451
+ K(e, t);
452
+ e = null;
453
+ }, n);
454
+ } else {
455
+ e.classList && e.classList.add(t);
456
+ }
457
+ }
458
+ function G(e, t, n) {
459
+ let r = ue(y(e));
460
+ if (!r) {
461
+ return;
462
+ }
463
+ if (n) {
464
+ E().setTimeout(function () {
465
+ G(r, t);
466
+ r = null;
467
+ }, n);
468
+ } else {
469
+ if (r.classList) {
470
+ r.classList.remove(t);
471
+ if (r.classList.length === 0) {
472
+ r.removeAttribute('class');
473
+ }
474
+ }
475
+ }
476
+ }
477
+ function W(e, t) {
478
+ e = y(e);
479
+ e.classList.toggle(t);
480
+ }
481
+ function Z(e, t) {
482
+ e = y(e);
483
+ se(e.parentElement.children, function (e) {
484
+ G(e, t);
485
+ });
486
+ K(ue(e), t);
487
+ }
488
+ function g(e, t) {
489
+ e = ue(y(e));
490
+ if (e && e.closest) {
491
+ return e.closest(t);
492
+ } else {
493
+ do {
494
+ if (e == null || h(e, t)) {
495
+ return e;
496
+ }
497
+ } while ((e = e && ue(c(e))));
498
+ return null;
499
+ }
500
+ }
501
+ function l(e, t) {
502
+ return e.substring(0, t.length) === t;
503
+ }
504
+ function Y(e, t) {
505
+ return e.substring(e.length - t.length) === t;
506
+ }
507
+ function ge(e) {
508
+ const t = e.trim();
509
+ if (l(t, '<') && Y(t, '/>')) {
510
+ return t.substring(1, t.length - 2);
511
+ } else {
512
+ return t;
513
+ }
514
+ }
515
+ function p(t, r, n) {
516
+ if (r.indexOf('global ') === 0) {
517
+ return p(t, r.slice(7), true);
518
+ }
519
+ t = y(t);
520
+ const o = [];
521
+ {
522
+ let t = 0;
523
+ let n = 0;
524
+ for (let e = 0; e < r.length; e++) {
525
+ const l = r[e];
526
+ if (l === ',' && t === 0) {
527
+ o.push(r.substring(n, e));
528
+ n = e + 1;
529
+ continue;
530
+ }
531
+ if (l === '<') {
532
+ t++;
533
+ } else if (l === '/' && e < r.length - 1 && r[e + 1] === '>') {
534
+ t--;
535
+ }
536
+ }
537
+ if (n < r.length) {
538
+ o.push(r.substring(n));
539
+ }
540
+ }
541
+ const i = [];
542
+ const s = [];
543
+ while (o.length > 0) {
544
+ const r = ge(o.shift());
545
+ let e;
546
+ if (r.indexOf('closest ') === 0) {
547
+ e = g(ue(t), ge(r.substr(8)));
548
+ } else if (r.indexOf('find ') === 0) {
549
+ e = u(f(t), ge(r.substr(5)));
550
+ } else if (r === 'next' || r === 'nextElementSibling') {
551
+ e = ue(t).nextElementSibling;
552
+ } else if (r.indexOf('next ') === 0) {
553
+ e = pe(t, ge(r.substr(5)), !!n);
554
+ } else if (r === 'previous' || r === 'previousElementSibling') {
555
+ e = ue(t).previousElementSibling;
556
+ } else if (r.indexOf('previous ') === 0) {
557
+ e = me(t, ge(r.substr(9)), !!n);
558
+ } else if (r === 'document') {
559
+ e = document;
560
+ } else if (r === 'window') {
561
+ e = window;
562
+ } else if (r === 'body') {
563
+ e = document.body;
564
+ } else if (r === 'root') {
565
+ e = m(t, !!n);
566
+ } else if (r === 'host') {
567
+ e = t.getRootNode().host;
568
+ } else {
569
+ s.push(r);
570
+ }
571
+ if (e) {
572
+ i.push(e);
573
+ }
574
+ }
575
+ if (s.length > 0) {
576
+ const e = s.join(',');
577
+ const c = f(m(t, !!n));
578
+ i.push(...M(c.querySelectorAll(e)));
579
+ }
580
+ return i;
581
+ }
582
+ var pe = function (t, e, n) {
583
+ const r = f(m(t, n)).querySelectorAll(e);
584
+ for (let e = 0; e < r.length; e++) {
585
+ const o = r[e];
586
+ if (o.compareDocumentPosition(t) === Node.DOCUMENT_POSITION_PRECEDING) {
587
+ return o;
588
+ }
589
+ }
590
+ };
591
+ var me = function (t, e, n) {
592
+ const r = f(m(t, n)).querySelectorAll(e);
593
+ for (let e = r.length - 1; e >= 0; e--) {
594
+ const o = r[e];
595
+ if (o.compareDocumentPosition(t) === Node.DOCUMENT_POSITION_FOLLOWING) {
596
+ return o;
597
+ }
598
+ }
599
+ };
600
+ function ae(e, t) {
601
+ if (typeof e !== 'string') {
602
+ return p(e, t)[0];
603
+ } else {
604
+ return p(ne().body, e)[0];
605
+ }
606
+ }
607
+ function y(e, t) {
608
+ if (typeof e === 'string') {
609
+ return u(f(t) || document, e);
610
+ } else {
611
+ return e;
612
+ }
613
+ }
614
+ function xe(e, t, n, r) {
615
+ if (k(t)) {
616
+ return { target: ne().body, event: J(e), listener: t, options: n };
617
+ } else {
618
+ return { target: y(e), event: J(t), listener: n, options: r };
619
+ }
620
+ }
621
+ function ye(t, n, r, o) {
622
+ Vn(function () {
623
+ const e = xe(t, n, r, o);
624
+ e.target.addEventListener(e.event, e.listener, e.options);
625
+ });
626
+ const e = k(n);
627
+ return e ? n : r;
628
+ }
629
+ function be(t, n, r) {
630
+ Vn(function () {
631
+ const e = xe(t, n, r);
632
+ e.target.removeEventListener(e.event, e.listener);
633
+ });
634
+ return k(n) ? n : r;
635
+ }
636
+ const ve = ne().createElement('output');
637
+ function we(e, t) {
638
+ const n = re(e, t);
639
+ if (n) {
640
+ if (n === 'this') {
641
+ return [Se(e, t)];
642
+ } else {
643
+ const r = p(e, n);
644
+ if (r.length === 0) {
645
+ O('The selector "' + n + '" on ' + t + ' returned no matches!');
646
+ return [ve];
647
+ } else {
648
+ return r;
649
+ }
650
+ }
651
+ }
652
+ }
653
+ function Se(e, t) {
654
+ return ue(
655
+ o(e, function (e) {
656
+ return te(ue(e), t) != null;
657
+ })
658
+ );
659
+ }
660
+ function Ee(e) {
661
+ const t = re(e, 'hx-target');
662
+ if (t) {
663
+ if (t === 'this') {
664
+ return Se(e, 'hx-target');
665
+ } else {
666
+ return ae(e, t);
667
+ }
668
+ } else {
669
+ const n = ie(e);
670
+ if (n.boosted) {
671
+ return ne().body;
672
+ } else {
673
+ return e;
674
+ }
675
+ }
676
+ }
677
+ function Ce(t) {
678
+ const n = Q.config.attributesToSettle;
679
+ for (let e = 0; e < n.length; e++) {
680
+ if (t === n[e]) {
681
+ return true;
682
+ }
683
+ }
684
+ return false;
685
+ }
686
+ function Oe(t, n) {
687
+ se(t.attributes, function (e) {
688
+ if (!n.hasAttribute(e.name) && Ce(e.name)) {
689
+ t.removeAttribute(e.name);
690
+ }
691
+ });
692
+ se(n.attributes, function (e) {
693
+ if (Ce(e.name)) {
694
+ t.setAttribute(e.name, e.value);
695
+ }
696
+ });
697
+ }
698
+ function Re(t, e) {
699
+ const n = Un(e);
700
+ for (let e = 0; e < n.length; e++) {
701
+ const r = n[e];
702
+ try {
703
+ if (r.isInlineSwap(t)) {
704
+ return true;
705
+ }
706
+ } catch (e) {
707
+ O(e);
708
+ }
709
+ }
710
+ return t === 'outerHTML';
711
+ }
712
+ function He(e, o, i, t) {
713
+ t = t || ne();
714
+ let n = '#' + ee(o, 'id');
715
+ let s = 'outerHTML';
716
+ if (e === 'true') {
717
+ } else if (e.indexOf(':') > 0) {
718
+ s = e.substring(0, e.indexOf(':'));
719
+ n = e.substring(e.indexOf(':') + 1);
720
+ } else {
721
+ s = e;
722
+ }
723
+ o.removeAttribute('hx-swap-oob');
724
+ o.removeAttribute('data-hx-swap-oob');
725
+ const r = p(t, n, false);
726
+ if (r) {
727
+ se(r, function (e) {
728
+ let t;
729
+ const n = o.cloneNode(true);
730
+ t = ne().createDocumentFragment();
731
+ t.appendChild(n);
732
+ if (!Re(s, e)) {
733
+ t = f(n);
734
+ }
735
+ const r = { shouldSwap: true, target: e, fragment: t };
736
+ if (!he(e, 'htmx:oobBeforeSwap', r)) return;
737
+ e = r.target;
738
+ if (r.shouldSwap) {
739
+ qe(t);
740
+ _e(s, e, e, t, i);
741
+ Te();
742
+ }
743
+ se(i.elts, function (e) {
744
+ he(e, 'htmx:oobAfterSwap', r);
745
+ });
746
+ });
747
+ o.parentNode.removeChild(o);
748
+ } else {
749
+ o.parentNode.removeChild(o);
750
+ fe(ne().body, 'htmx:oobErrorNoTarget', { content: o });
751
+ }
752
+ return e;
753
+ }
754
+ function Te() {
755
+ const e = u('#--htmx-preserve-pantry--');
756
+ if (e) {
757
+ for (const t of [...e.children]) {
758
+ const n = u('#' + t.id);
759
+ n.parentNode.moveBefore(t, n);
760
+ n.remove();
761
+ }
762
+ e.remove();
763
+ }
764
+ }
765
+ function qe(e) {
766
+ se(x(e, '[hx-preserve], [data-hx-preserve]'), function (e) {
767
+ const t = te(e, 'id');
768
+ const n = ne().getElementById(t);
769
+ if (n != null) {
770
+ if (e.moveBefore) {
771
+ let e = u('#--htmx-preserve-pantry--');
772
+ if (e == null) {
773
+ ne().body.insertAdjacentHTML('afterend', "<div id='--htmx-preserve-pantry--'></div>");
774
+ e = u('#--htmx-preserve-pantry--');
775
+ }
776
+ e.moveBefore(n, null);
777
+ } else {
778
+ e.parentNode.replaceChild(n, e);
779
+ }
780
+ }
781
+ });
782
+ }
783
+ function Le(l, e, c) {
784
+ se(e.querySelectorAll('[id]'), function (t) {
785
+ const n = ee(t, 'id');
786
+ if (n && n.length > 0) {
787
+ const r = n.replace("'", "\\'");
788
+ const o = t.tagName.replace(':', '\\:');
789
+ const e = f(l);
790
+ const i = e && e.querySelector(o + "[id='" + r + "']");
791
+ if (i && i !== e) {
792
+ const s = t.cloneNode();
793
+ Oe(t, i);
794
+ c.tasks.push(function () {
795
+ Oe(t, s);
796
+ });
797
+ }
798
+ }
799
+ });
800
+ }
801
+ function Ae(e) {
802
+ return function () {
803
+ G(e, Q.config.addedClass);
804
+ kt(ue(e));
805
+ Ne(f(e));
806
+ he(e, 'htmx:load');
807
+ };
808
+ }
809
+ function Ne(e) {
810
+ const t = '[autofocus]';
811
+ const n = $(h(e, t) ? e : e.querySelector(t));
812
+ if (n != null) {
813
+ n.focus();
814
+ }
815
+ }
816
+ function a(e, t, n, r) {
817
+ Le(e, n, r);
818
+ while (n.childNodes.length > 0) {
819
+ const o = n.firstChild;
820
+ K(ue(o), Q.config.addedClass);
821
+ e.insertBefore(o, t);
822
+ if (o.nodeType !== Node.TEXT_NODE && o.nodeType !== Node.COMMENT_NODE) {
823
+ r.tasks.push(Ae(o));
824
+ }
825
+ }
826
+ }
827
+ function Ie(e, t) {
828
+ let n = 0;
829
+ while (n < e.length) {
830
+ t = ((t << 5) - t + e.charCodeAt(n++)) | 0;
831
+ }
832
+ return t;
833
+ }
834
+ function Pe(t) {
835
+ let n = 0;
836
+ if (t.attributes) {
837
+ for (let e = 0; e < t.attributes.length; e++) {
838
+ const r = t.attributes[e];
839
+ if (r.value) {
840
+ n = Ie(r.name, n);
841
+ n = Ie(r.value, n);
842
+ }
843
+ }
844
+ }
845
+ return n;
846
+ }
847
+ function ke(t) {
848
+ const n = ie(t);
849
+ if (n.onHandlers) {
850
+ for (let e = 0; e < n.onHandlers.length; e++) {
851
+ const r = n.onHandlers[e];
852
+ be(t, r.event, r.listener);
853
+ }
854
+ delete n.onHandlers;
855
+ }
856
+ }
857
+ function De(e) {
858
+ const t = ie(e);
859
+ if (t.timeout) {
860
+ clearTimeout(t.timeout);
861
+ }
862
+ if (t.listenerInfos) {
863
+ se(t.listenerInfos, function (e) {
864
+ if (e.on) {
865
+ be(e.on, e.trigger, e.listener);
866
+ }
867
+ });
868
+ }
869
+ ke(e);
870
+ se(Object.keys(t), function (e) {
871
+ if (e !== 'firstInitCompleted') delete t[e];
872
+ });
873
+ }
874
+ function b(e) {
875
+ he(e, 'htmx:beforeCleanupElement');
876
+ De(e);
877
+ if (e.children) {
878
+ se(e.children, function (e) {
879
+ b(e);
880
+ });
881
+ }
882
+ }
883
+ function Me(t, e, n) {
884
+ if (t instanceof Element && t.tagName === 'BODY') {
885
+ return Ve(t, e, n);
886
+ }
887
+ let r;
888
+ const o = t.previousSibling;
889
+ const i = c(t);
890
+ if (!i) {
891
+ return;
892
+ }
893
+ a(i, t, e, n);
894
+ if (o == null) {
895
+ r = i.firstChild;
896
+ } else {
897
+ r = o.nextSibling;
898
+ }
899
+ n.elts = n.elts.filter(function (e) {
900
+ return e !== t;
901
+ });
902
+ while (r && r !== t) {
903
+ if (r instanceof Element) {
904
+ n.elts.push(r);
905
+ }
906
+ r = r.nextSibling;
907
+ }
908
+ b(t);
909
+ if (t instanceof Element) {
910
+ t.remove();
911
+ } else {
912
+ t.parentNode.removeChild(t);
913
+ }
914
+ }
915
+ function Xe(e, t, n) {
916
+ return a(e, e.firstChild, t, n);
917
+ }
918
+ function Fe(e, t, n) {
919
+ return a(c(e), e, t, n);
920
+ }
921
+ function Be(e, t, n) {
922
+ return a(e, null, t, n);
923
+ }
924
+ function Ue(e, t, n) {
925
+ return a(c(e), e.nextSibling, t, n);
926
+ }
927
+ function je(e) {
928
+ b(e);
929
+ const t = c(e);
930
+ if (t) {
931
+ return t.removeChild(e);
932
+ }
933
+ }
934
+ function Ve(e, t, n) {
935
+ const r = e.firstChild;
936
+ a(e, r, t, n);
937
+ if (r) {
938
+ while (r.nextSibling) {
939
+ b(r.nextSibling);
940
+ e.removeChild(r.nextSibling);
941
+ }
942
+ b(r);
943
+ e.removeChild(r);
944
+ }
945
+ }
946
+ function _e(t, e, n, r, o) {
947
+ switch (t) {
948
+ case 'none':
949
+ return;
950
+ case 'outerHTML':
951
+ Me(n, r, o);
952
+ return;
953
+ case 'afterbegin':
954
+ Xe(n, r, o);
955
+ return;
956
+ case 'beforebegin':
957
+ Fe(n, r, o);
958
+ return;
959
+ case 'beforeend':
960
+ Be(n, r, o);
961
+ return;
962
+ case 'afterend':
963
+ Ue(n, r, o);
964
+ return;
965
+ case 'delete':
966
+ je(n);
967
+ return;
968
+ default:
969
+ var i = Un(e);
970
+ for (let e = 0; e < i.length; e++) {
971
+ const s = i[e];
972
+ try {
973
+ const l = s.handleSwap(t, n, r, o);
974
+ if (l) {
975
+ if (Array.isArray(l)) {
976
+ for (let e = 0; e < l.length; e++) {
977
+ const c = l[e];
978
+ if (c.nodeType !== Node.TEXT_NODE && c.nodeType !== Node.COMMENT_NODE) {
979
+ o.tasks.push(Ae(c));
980
+ }
981
+ }
982
+ }
983
+ return;
984
+ }
985
+ } catch (e) {
986
+ O(e);
987
+ }
988
+ }
989
+ if (t === 'innerHTML') {
990
+ Ve(n, r, o);
991
+ } else {
992
+ _e(Q.config.defaultSwapStyle, e, n, r, o);
993
+ }
994
+ }
995
+ }
996
+ function ze(e, n, r) {
997
+ var t = x(e, '[hx-swap-oob], [data-hx-swap-oob]');
998
+ se(t, function (e) {
999
+ if (Q.config.allowNestedOobSwaps || e.parentElement === null) {
1000
+ const t = te(e, 'hx-swap-oob');
1001
+ if (t != null) {
1002
+ He(t, e, n, r);
1003
+ }
1004
+ } else {
1005
+ e.removeAttribute('hx-swap-oob');
1006
+ e.removeAttribute('data-hx-swap-oob');
1007
+ }
1008
+ });
1009
+ return t.length > 0;
1010
+ }
1011
+ function $e(e, t, r, o) {
1012
+ if (!o) {
1013
+ o = {};
1014
+ }
1015
+ e = y(e);
1016
+ const i = o.contextElement ? m(o.contextElement, false) : ne();
1017
+ const n = document.activeElement;
1018
+ let s = {};
1019
+ try {
1020
+ s = { elt: n, start: n ? n.selectionStart : null, end: n ? n.selectionEnd : null };
1021
+ } catch (e) {}
1022
+ const l = xn(e);
1023
+ if (r.swapStyle === 'textContent') {
1024
+ e.textContent = t;
1025
+ } else {
1026
+ let n = P(t);
1027
+ l.title = n.title;
1028
+ if (o.selectOOB) {
1029
+ const u = o.selectOOB.split(',');
1030
+ for (let t = 0; t < u.length; t++) {
1031
+ const a = u[t].split(':', 2);
1032
+ let e = a[0].trim();
1033
+ if (e.indexOf('#') === 0) {
1034
+ e = e.substring(1);
1035
+ }
1036
+ const f = a[1] || 'true';
1037
+ const h = n.querySelector('#' + e);
1038
+ if (h) {
1039
+ He(f, h, l, i);
1040
+ }
1041
+ }
1042
+ }
1043
+ ze(n, l, i);
1044
+ se(x(n, 'template'), function (e) {
1045
+ if (e.content && ze(e.content, l, i)) {
1046
+ e.remove();
1047
+ }
1048
+ });
1049
+ if (o.select) {
1050
+ const d = ne().createDocumentFragment();
1051
+ se(n.querySelectorAll(o.select), function (e) {
1052
+ d.appendChild(e);
1053
+ });
1054
+ n = d;
1055
+ }
1056
+ qe(n);
1057
+ _e(r.swapStyle, o.contextElement, e, n, l);
1058
+ Te();
1059
+ }
1060
+ if (s.elt && !le(s.elt) && ee(s.elt, 'id')) {
1061
+ const g = document.getElementById(ee(s.elt, 'id'));
1062
+ const p = {
1063
+ preventScroll: r.focusScroll !== undefined ? !r.focusScroll : !Q.config.defaultFocusScroll,
1064
+ };
1065
+ if (g) {
1066
+ if (s.start && g.setSelectionRange) {
1067
+ try {
1068
+ g.setSelectionRange(s.start, s.end);
1069
+ } catch (e) {}
1070
+ }
1071
+ g.focus(p);
1072
+ }
1073
+ }
1074
+ e.classList.remove(Q.config.swappingClass);
1075
+ se(l.elts, function (e) {
1076
+ if (e.classList) {
1077
+ e.classList.add(Q.config.settlingClass);
1078
+ }
1079
+ he(e, 'htmx:afterSwap', o.eventInfo);
1080
+ });
1081
+ if (o.afterSwapCallback) {
1082
+ o.afterSwapCallback();
1083
+ }
1084
+ if (!r.ignoreTitle) {
1085
+ kn(l.title);
1086
+ }
1087
+ const c = function () {
1088
+ se(l.tasks, function (e) {
1089
+ e.call();
1090
+ });
1091
+ se(l.elts, function (e) {
1092
+ if (e.classList) {
1093
+ e.classList.remove(Q.config.settlingClass);
1094
+ }
1095
+ he(e, 'htmx:afterSettle', o.eventInfo);
1096
+ });
1097
+ if (o.anchor) {
1098
+ const e = ue(y('#' + o.anchor));
1099
+ if (e) {
1100
+ e.scrollIntoView({ block: 'start', behavior: 'auto' });
1101
+ }
1102
+ }
1103
+ yn(l.elts, r);
1104
+ if (o.afterSettleCallback) {
1105
+ o.afterSettleCallback();
1106
+ }
1107
+ };
1108
+ if (r.settleDelay > 0) {
1109
+ E().setTimeout(c, r.settleDelay);
1110
+ } else {
1111
+ c();
1112
+ }
1113
+ }
1114
+ function Je(e, t, n) {
1115
+ const r = e.getResponseHeader(t);
1116
+ if (r.indexOf('{') === 0) {
1117
+ const o = S(r);
1118
+ for (const i in o) {
1119
+ if (o.hasOwnProperty(i)) {
1120
+ let e = o[i];
1121
+ if (D(e)) {
1122
+ n = e.target !== undefined ? e.target : n;
1123
+ } else {
1124
+ e = { value: e };
1125
+ }
1126
+ he(n, i, e);
1127
+ }
1128
+ }
1129
+ } else {
1130
+ const s = r.split(',');
1131
+ for (let e = 0; e < s.length; e++) {
1132
+ he(n, s[e].trim(), []);
1133
+ }
1134
+ }
1135
+ }
1136
+ const Ke = /\s/;
1137
+ const v = /[\s,]/;
1138
+ const Ge = /[_$a-zA-Z]/;
1139
+ const We = /[_$a-zA-Z0-9]/;
1140
+ const Ze = ['"', "'", '/'];
1141
+ const w = /[^\s]/;
1142
+ const Ye = /[{(]/;
1143
+ const Qe = /[})]/;
1144
+ function et(e) {
1145
+ const t = [];
1146
+ let n = 0;
1147
+ while (n < e.length) {
1148
+ if (Ge.exec(e.charAt(n))) {
1149
+ var r = n;
1150
+ while (We.exec(e.charAt(n + 1))) {
1151
+ n++;
1152
+ }
1153
+ t.push(e.substring(r, n + 1));
1154
+ } else if (Ze.indexOf(e.charAt(n)) !== -1) {
1155
+ const o = e.charAt(n);
1156
+ var r = n;
1157
+ n++;
1158
+ while (n < e.length && e.charAt(n) !== o) {
1159
+ if (e.charAt(n) === '\\') {
1160
+ n++;
1161
+ }
1162
+ n++;
1163
+ }
1164
+ t.push(e.substring(r, n + 1));
1165
+ } else {
1166
+ const i = e.charAt(n);
1167
+ t.push(i);
1168
+ }
1169
+ n++;
1170
+ }
1171
+ return t;
1172
+ }
1173
+ function tt(e, t, n) {
1174
+ return (
1175
+ Ge.exec(e.charAt(0)) && e !== 'true' && e !== 'false' && e !== 'this' && e !== n && t !== '.'
1176
+ );
1177
+ }
1178
+ function nt(r, o, i) {
1179
+ if (o[0] === '[') {
1180
+ o.shift();
1181
+ let e = 1;
1182
+ let t = ' return (function(' + i + '){ return (';
1183
+ let n = null;
1184
+ while (o.length > 0) {
1185
+ const s = o[0];
1186
+ if (s === ']') {
1187
+ e--;
1188
+ if (e === 0) {
1189
+ if (n === null) {
1190
+ t = t + 'true';
1191
+ }
1192
+ o.shift();
1193
+ t += ')})';
1194
+ try {
1195
+ const l = vn(
1196
+ r,
1197
+ function () {
1198
+ return Function(t)();
1199
+ },
1200
+ function () {
1201
+ return true;
1202
+ }
1203
+ );
1204
+ l.source = t;
1205
+ return l;
1206
+ } catch (e) {
1207
+ fe(ne().body, 'htmx:syntax:error', { error: e, source: t });
1208
+ return null;
1209
+ }
1210
+ }
1211
+ } else if (s === '[') {
1212
+ e++;
1213
+ }
1214
+ if (tt(s, n, i)) {
1215
+ t += '((' + i + '.' + s + ') ? (' + i + '.' + s + ') : (window.' + s + '))';
1216
+ } else {
1217
+ t = t + s;
1218
+ }
1219
+ n = o.shift();
1220
+ }
1221
+ }
1222
+ }
1223
+ function C(e, t) {
1224
+ let n = '';
1225
+ while (e.length > 0 && !t.test(e[0])) {
1226
+ n += e.shift();
1227
+ }
1228
+ return n;
1229
+ }
1230
+ function rt(e) {
1231
+ let t;
1232
+ if (e.length > 0 && Ye.test(e[0])) {
1233
+ e.shift();
1234
+ t = C(e, Qe).trim();
1235
+ e.shift();
1236
+ } else {
1237
+ t = C(e, v);
1238
+ }
1239
+ return t;
1240
+ }
1241
+ const ot = 'input, textarea, select';
1242
+ function it(e, t, n) {
1243
+ const r = [];
1244
+ const o = et(t);
1245
+ do {
1246
+ C(o, w);
1247
+ const l = o.length;
1248
+ const c = C(o, /[,\[\s]/);
1249
+ if (c !== '') {
1250
+ if (c === 'every') {
1251
+ const u = { trigger: 'every' };
1252
+ C(o, w);
1253
+ u.pollInterval = d(C(o, /[,\[\s]/));
1254
+ C(o, w);
1255
+ var i = nt(e, o, 'event');
1256
+ if (i) {
1257
+ u.eventFilter = i;
1258
+ }
1259
+ r.push(u);
1260
+ } else {
1261
+ const a = { trigger: c };
1262
+ var i = nt(e, o, 'event');
1263
+ if (i) {
1264
+ a.eventFilter = i;
1265
+ }
1266
+ C(o, w);
1267
+ while (o.length > 0 && o[0] !== ',') {
1268
+ const f = o.shift();
1269
+ if (f === 'changed') {
1270
+ a.changed = true;
1271
+ } else if (f === 'once') {
1272
+ a.once = true;
1273
+ } else if (f === 'consume') {
1274
+ a.consume = true;
1275
+ } else if (f === 'delay' && o[0] === ':') {
1276
+ o.shift();
1277
+ a.delay = d(C(o, v));
1278
+ } else if (f === 'from' && o[0] === ':') {
1279
+ o.shift();
1280
+ if (Ye.test(o[0])) {
1281
+ var s = rt(o);
1282
+ } else {
1283
+ var s = C(o, v);
1284
+ if (s === 'closest' || s === 'find' || s === 'next' || s === 'previous') {
1285
+ o.shift();
1286
+ const h = rt(o);
1287
+ if (h.length > 0) {
1288
+ s += ' ' + h;
1289
+ }
1290
+ }
1291
+ }
1292
+ a.from = s;
1293
+ } else if (f === 'target' && o[0] === ':') {
1294
+ o.shift();
1295
+ a.target = rt(o);
1296
+ } else if (f === 'throttle' && o[0] === ':') {
1297
+ o.shift();
1298
+ a.throttle = d(C(o, v));
1299
+ } else if (f === 'queue' && o[0] === ':') {
1300
+ o.shift();
1301
+ a.queue = C(o, v);
1302
+ } else if (f === 'root' && o[0] === ':') {
1303
+ o.shift();
1304
+ a[f] = rt(o);
1305
+ } else if (f === 'threshold' && o[0] === ':') {
1306
+ o.shift();
1307
+ a[f] = C(o, v);
1308
+ } else {
1309
+ fe(e, 'htmx:syntax:error', { token: o.shift() });
1310
+ }
1311
+ C(o, w);
1312
+ }
1313
+ r.push(a);
1314
+ }
1315
+ }
1316
+ if (o.length === l) {
1317
+ fe(e, 'htmx:syntax:error', { token: o.shift() });
1318
+ }
1319
+ C(o, w);
1320
+ } while (o[0] === ',' && o.shift());
1321
+ if (n) {
1322
+ n[t] = r;
1323
+ }
1324
+ return r;
1325
+ }
1326
+ function st(e) {
1327
+ const t = te(e, 'hx-trigger');
1328
+ let n = [];
1329
+ if (t) {
1330
+ const r = Q.config.triggerSpecsCache;
1331
+ n = (r && r[t]) || it(e, t, r);
1332
+ }
1333
+ if (n.length > 0) {
1334
+ return n;
1335
+ } else if (h(e, 'form')) {
1336
+ return [{ trigger: 'submit' }];
1337
+ } else if (h(e, 'input[type="button"], input[type="submit"]')) {
1338
+ return [{ trigger: 'click' }];
1339
+ } else if (h(e, ot)) {
1340
+ return [{ trigger: 'change' }];
1341
+ } else {
1342
+ return [{ trigger: 'click' }];
1343
+ }
1344
+ }
1345
+ function lt(e) {
1346
+ ie(e).cancelled = true;
1347
+ }
1348
+ function ct(e, t, n) {
1349
+ const r = ie(e);
1350
+ r.timeout = E().setTimeout(function () {
1351
+ if (le(e) && r.cancelled !== true) {
1352
+ if (!gt(n, e, Mt('hx:poll:trigger', { triggerSpec: n, target: e }))) {
1353
+ t(e);
1354
+ }
1355
+ ct(e, t, n);
1356
+ }
1357
+ }, n.pollInterval);
1358
+ }
1359
+ function ut(e) {
1360
+ return location.hostname === e.hostname && ee(e, 'href') && ee(e, 'href').indexOf('#') !== 0;
1361
+ }
1362
+ function at(e) {
1363
+ return g(e, Q.config.disableSelector);
1364
+ }
1365
+ function ft(t, n, e) {
1366
+ if (
1367
+ (t instanceof HTMLAnchorElement && ut(t) && (t.target === '' || t.target === '_self')) ||
1368
+ (t.tagName === 'FORM' && String(ee(t, 'method')).toLowerCase() !== 'dialog')
1369
+ ) {
1370
+ n.boosted = true;
1371
+ let r, o;
1372
+ if (t.tagName === 'A') {
1373
+ r = 'get';
1374
+ o = ee(t, 'href');
1375
+ } else {
1376
+ const i = ee(t, 'method');
1377
+ r = i ? i.toLowerCase() : 'get';
1378
+ o = ee(t, 'action');
1379
+ if (o == null || o === '') {
1380
+ o = ne().location.href;
1381
+ }
1382
+ if (r === 'get' && o.includes('?')) {
1383
+ o = o.replace(/\?[^#]+/, '');
1384
+ }
1385
+ }
1386
+ e.forEach(function (e) {
1387
+ pt(
1388
+ t,
1389
+ function (e, t) {
1390
+ const n = ue(e);
1391
+ if (at(n)) {
1392
+ b(n);
1393
+ return;
1394
+ }
1395
+ de(r, o, n, t);
1396
+ },
1397
+ n,
1398
+ e,
1399
+ true
1400
+ );
1401
+ });
1402
+ }
1403
+ }
1404
+ function ht(e, t) {
1405
+ const n = ue(t);
1406
+ if (!n) {
1407
+ return false;
1408
+ }
1409
+ if (e.type === 'submit' || e.type === 'click') {
1410
+ if (n.tagName === 'FORM') {
1411
+ return true;
1412
+ }
1413
+ if (h(n, 'input[type="submit"], button') && (h(n, '[form]') || g(n, 'form') !== null)) {
1414
+ return true;
1415
+ }
1416
+ if (
1417
+ n instanceof HTMLAnchorElement &&
1418
+ n.href &&
1419
+ (n.getAttribute('href') === '#' || n.getAttribute('href').indexOf('#') !== 0)
1420
+ ) {
1421
+ return true;
1422
+ }
1423
+ }
1424
+ return false;
1425
+ }
1426
+ function dt(e, t) {
1427
+ return (
1428
+ ie(e).boosted &&
1429
+ e instanceof HTMLAnchorElement &&
1430
+ t.type === 'click' &&
1431
+ (t.ctrlKey || t.metaKey)
1432
+ );
1433
+ }
1434
+ function gt(e, t, n) {
1435
+ const r = e.eventFilter;
1436
+ if (r) {
1437
+ try {
1438
+ return r.call(t, n) !== true;
1439
+ } catch (e) {
1440
+ const o = r.source;
1441
+ fe(ne().body, 'htmx:eventFilter:error', { error: e, source: o });
1442
+ return true;
1443
+ }
1444
+ }
1445
+ return false;
1446
+ }
1447
+ function pt(l, c, e, u, a) {
1448
+ const f = ie(l);
1449
+ let t;
1450
+ if (u.from) {
1451
+ t = p(l, u.from);
1452
+ } else {
1453
+ t = [l];
1454
+ }
1455
+ if (u.changed) {
1456
+ if (!('lastValue' in f)) {
1457
+ f.lastValue = new WeakMap();
1458
+ }
1459
+ t.forEach(function (e) {
1460
+ if (!f.lastValue.has(u)) {
1461
+ f.lastValue.set(u, new WeakMap());
1462
+ }
1463
+ f.lastValue.get(u).set(e, e.value);
1464
+ });
1465
+ }
1466
+ se(t, function (i) {
1467
+ const s = function (e) {
1468
+ if (!le(l)) {
1469
+ i.removeEventListener(u.trigger, s);
1470
+ return;
1471
+ }
1472
+ if (dt(l, e)) {
1473
+ return;
1474
+ }
1475
+ if (a || ht(e, l)) {
1476
+ e.preventDefault();
1477
+ }
1478
+ if (gt(u, l, e)) {
1479
+ return;
1480
+ }
1481
+ const t = ie(e);
1482
+ t.triggerSpec = u;
1483
+ if (t.handledFor == null) {
1484
+ t.handledFor = [];
1485
+ }
1486
+ if (t.handledFor.indexOf(l) < 0) {
1487
+ t.handledFor.push(l);
1488
+ if (u.consume) {
1489
+ e.stopPropagation();
1490
+ }
1491
+ if (u.target && e.target) {
1492
+ if (!h(ue(e.target), u.target)) {
1493
+ return;
1494
+ }
1495
+ }
1496
+ if (u.once) {
1497
+ if (f.triggeredOnce) {
1498
+ return;
1499
+ } else {
1500
+ f.triggeredOnce = true;
1501
+ }
1502
+ }
1503
+ if (u.changed) {
1504
+ const n = event.target;
1505
+ const r = n.value;
1506
+ const o = f.lastValue.get(u);
1507
+ if (o.has(n) && o.get(n) === r) {
1508
+ return;
1509
+ }
1510
+ o.set(n, r);
1511
+ }
1512
+ if (f.delayed) {
1513
+ clearTimeout(f.delayed);
1514
+ }
1515
+ if (f.throttle) {
1516
+ return;
1517
+ }
1518
+ if (u.throttle > 0) {
1519
+ if (!f.throttle) {
1520
+ he(l, 'htmx:trigger');
1521
+ c(l, e);
1522
+ f.throttle = E().setTimeout(function () {
1523
+ f.throttle = null;
1524
+ }, u.throttle);
1525
+ }
1526
+ } else if (u.delay > 0) {
1527
+ f.delayed = E().setTimeout(function () {
1528
+ he(l, 'htmx:trigger');
1529
+ c(l, e);
1530
+ }, u.delay);
1531
+ } else {
1532
+ he(l, 'htmx:trigger');
1533
+ c(l, e);
1534
+ }
1535
+ }
1536
+ };
1537
+ if (e.listenerInfos == null) {
1538
+ e.listenerInfos = [];
1539
+ }
1540
+ e.listenerInfos.push({ trigger: u.trigger, listener: s, on: i });
1541
+ i.addEventListener(u.trigger, s);
1542
+ });
1543
+ }
1544
+ let mt = false;
1545
+ let xt = null;
1546
+ function yt() {
1547
+ if (!xt) {
1548
+ xt = function () {
1549
+ mt = true;
1550
+ };
1551
+ window.addEventListener('scroll', xt);
1552
+ window.addEventListener('resize', xt);
1553
+ setInterval(function () {
1554
+ if (mt) {
1555
+ mt = false;
1556
+ se(
1557
+ ne().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),
1558
+ function (e) {
1559
+ bt(e);
1560
+ }
1561
+ );
1562
+ }
1563
+ }, 200);
1564
+ }
1565
+ }
1566
+ function bt(e) {
1567
+ if (!s(e, 'data-hx-revealed') && X(e)) {
1568
+ e.setAttribute('data-hx-revealed', 'true');
1569
+ const t = ie(e);
1570
+ if (t.initHash) {
1571
+ he(e, 'revealed');
1572
+ } else {
1573
+ e.addEventListener(
1574
+ 'htmx:afterProcessNode',
1575
+ function () {
1576
+ he(e, 'revealed');
1577
+ },
1578
+ { once: true }
1579
+ );
1580
+ }
1581
+ }
1582
+ }
1583
+ function vt(e, t, n, r) {
1584
+ const o = function () {
1585
+ if (!n.loaded) {
1586
+ n.loaded = true;
1587
+ he(e, 'htmx:trigger');
1588
+ t(e);
1589
+ }
1590
+ };
1591
+ if (r > 0) {
1592
+ E().setTimeout(o, r);
1593
+ } else {
1594
+ o();
1595
+ }
1596
+ }
1597
+ function wt(t, n, e) {
1598
+ let i = false;
1599
+ se(r, function (r) {
1600
+ if (s(t, 'hx-' + r)) {
1601
+ const o = te(t, 'hx-' + r);
1602
+ i = true;
1603
+ n.path = o;
1604
+ n.verb = r;
1605
+ e.forEach(function (e) {
1606
+ St(t, e, n, function (e, t) {
1607
+ const n = ue(e);
1608
+ if (g(n, Q.config.disableSelector)) {
1609
+ b(n);
1610
+ return;
1611
+ }
1612
+ de(r, o, n, t);
1613
+ });
1614
+ });
1615
+ }
1616
+ });
1617
+ return i;
1618
+ }
1619
+ function St(r, e, t, n) {
1620
+ if (e.trigger === 'revealed') {
1621
+ yt();
1622
+ pt(r, n, t, e);
1623
+ bt(ue(r));
1624
+ } else if (e.trigger === 'intersect') {
1625
+ const o = {};
1626
+ if (e.root) {
1627
+ o.root = ae(r, e.root);
1628
+ }
1629
+ if (e.threshold) {
1630
+ o.threshold = parseFloat(e.threshold);
1631
+ }
1632
+ const i = new IntersectionObserver(function (t) {
1633
+ for (let e = 0; e < t.length; e++) {
1634
+ const n = t[e];
1635
+ if (n.isIntersecting) {
1636
+ he(r, 'intersect');
1637
+ break;
1638
+ }
1639
+ }
1640
+ }, o);
1641
+ i.observe(ue(r));
1642
+ pt(ue(r), n, t, e);
1643
+ } else if (!t.firstInitCompleted && e.trigger === 'load') {
1644
+ if (!gt(e, r, Mt('load', { elt: r }))) {
1645
+ vt(ue(r), n, t, e.delay);
1646
+ }
1647
+ } else if (e.pollInterval > 0) {
1648
+ t.polling = true;
1649
+ ct(ue(r), n, e);
1650
+ } else {
1651
+ pt(r, n, t, e);
1652
+ }
1653
+ }
1654
+ function Et(e) {
1655
+ const t = ue(e);
1656
+ if (!t) {
1657
+ return false;
1658
+ }
1659
+ const n = t.attributes;
1660
+ for (let e = 0; e < n.length; e++) {
1661
+ const r = n[e].name;
1662
+ if (l(r, 'hx-on:') || l(r, 'data-hx-on:') || l(r, 'hx-on-') || l(r, 'data-hx-on-')) {
1663
+ return true;
1664
+ }
1665
+ }
1666
+ return false;
1667
+ }
1668
+ const Ct = new XPathEvaluator().createExpression(
1669
+ './/*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' +
1670
+ ' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]'
1671
+ );
1672
+ function Ot(e, t) {
1673
+ if (Et(e)) {
1674
+ t.push(ue(e));
1675
+ }
1676
+ const n = Ct.evaluate(e);
1677
+ let r = null;
1678
+ while ((r = n.iterateNext())) t.push(ue(r));
1679
+ }
1680
+ function Rt(e) {
1681
+ const t = [];
1682
+ if (e instanceof DocumentFragment) {
1683
+ for (const n of e.childNodes) {
1684
+ Ot(n, t);
1685
+ }
1686
+ } else {
1687
+ Ot(e, t);
1688
+ }
1689
+ return t;
1690
+ }
1691
+ function Ht(e) {
1692
+ if (e.querySelectorAll) {
1693
+ const n = ', [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]';
1694
+ const r = [];
1695
+ for (const i in Mn) {
1696
+ const s = Mn[i];
1697
+ if (s.getSelectors) {
1698
+ var t = s.getSelectors();
1699
+ if (t) {
1700
+ r.push(t);
1701
+ }
1702
+ }
1703
+ }
1704
+ const o = e.querySelectorAll(
1705
+ H +
1706
+ n +
1707
+ ", form, [type='submit']," +
1708
+ ' [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]' +
1709
+ r
1710
+ .flat()
1711
+ .map((e) => ', ' + e)
1712
+ .join('')
1713
+ );
1714
+ return o;
1715
+ } else {
1716
+ return [];
1717
+ }
1718
+ }
1719
+ function Tt(e) {
1720
+ const t = g(ue(e.target), "button, input[type='submit']");
1721
+ const n = Lt(e);
1722
+ if (n) {
1723
+ n.lastButtonClicked = t;
1724
+ }
1725
+ }
1726
+ function qt(e) {
1727
+ const t = Lt(e);
1728
+ if (t) {
1729
+ t.lastButtonClicked = null;
1730
+ }
1731
+ }
1732
+ function Lt(e) {
1733
+ const t = g(ue(e.target), "button, input[type='submit']");
1734
+ if (!t) {
1735
+ return;
1736
+ }
1737
+ const n = y('#' + ee(t, 'form'), t.getRootNode()) || g(t, 'form');
1738
+ if (!n) {
1739
+ return;
1740
+ }
1741
+ return ie(n);
1742
+ }
1743
+ function At(e) {
1744
+ e.addEventListener('click', Tt);
1745
+ e.addEventListener('focusin', Tt);
1746
+ e.addEventListener('focusout', qt);
1747
+ }
1748
+ function Nt(t, e, n) {
1749
+ const r = ie(t);
1750
+ if (!Array.isArray(r.onHandlers)) {
1751
+ r.onHandlers = [];
1752
+ }
1753
+ let o;
1754
+ const i = function (e) {
1755
+ vn(t, function () {
1756
+ if (at(t)) {
1757
+ return;
1758
+ }
1759
+ if (!o) {
1760
+ o = new Function('event', n);
1761
+ }
1762
+ o.call(t, e);
1763
+ });
1764
+ };
1765
+ t.addEventListener(e, i);
1766
+ r.onHandlers.push({ event: e, listener: i });
1767
+ }
1768
+ function It(t) {
1769
+ ke(t);
1770
+ for (let e = 0; e < t.attributes.length; e++) {
1771
+ const n = t.attributes[e].name;
1772
+ const r = t.attributes[e].value;
1773
+ if (l(n, 'hx-on') || l(n, 'data-hx-on')) {
1774
+ const o = n.indexOf('-on') + 3;
1775
+ const i = n.slice(o, o + 1);
1776
+ if (i === '-' || i === ':') {
1777
+ let e = n.slice(o + 1);
1778
+ if (l(e, ':')) {
1779
+ e = 'htmx' + e;
1780
+ } else if (l(e, '-')) {
1781
+ e = 'htmx:' + e.slice(1);
1782
+ } else if (l(e, 'htmx-')) {
1783
+ e = 'htmx:' + e.slice(5);
1784
+ }
1785
+ Nt(t, e, r);
1786
+ }
1787
+ }
1788
+ }
1789
+ }
1790
+ function Pt(t) {
1791
+ if (g(t, Q.config.disableSelector)) {
1792
+ b(t);
1793
+ return;
1794
+ }
1795
+ const n = ie(t);
1796
+ const e = Pe(t);
1797
+ if (n.initHash !== e) {
1798
+ De(t);
1799
+ n.initHash = e;
1800
+ he(t, 'htmx:beforeProcessNode');
1801
+ const r = st(t);
1802
+ const o = wt(t, n, r);
1803
+ if (!o) {
1804
+ if (re(t, 'hx-boost') === 'true') {
1805
+ ft(t, n, r);
1806
+ } else if (s(t, 'hx-trigger')) {
1807
+ r.forEach(function (e) {
1808
+ St(t, e, n, function () {});
1809
+ });
1810
+ }
1811
+ }
1812
+ if (t.tagName === 'FORM' || (ee(t, 'type') === 'submit' && s(t, 'form'))) {
1813
+ At(t);
1814
+ }
1815
+ n.firstInitCompleted = true;
1816
+ he(t, 'htmx:afterProcessNode');
1817
+ }
1818
+ }
1819
+ function kt(e) {
1820
+ e = y(e);
1821
+ if (g(e, Q.config.disableSelector)) {
1822
+ b(e);
1823
+ return;
1824
+ }
1825
+ Pt(e);
1826
+ se(Ht(e), function (e) {
1827
+ Pt(e);
1828
+ });
1829
+ se(Rt(e), It);
1830
+ }
1831
+ function Dt(e) {
1832
+ return e.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
1833
+ }
1834
+ function Mt(e, t) {
1835
+ let n;
1836
+ if (window.CustomEvent && typeof window.CustomEvent === 'function') {
1837
+ n = new CustomEvent(e, { bubbles: true, cancelable: true, composed: true, detail: t });
1838
+ } else {
1839
+ n = ne().createEvent('CustomEvent');
1840
+ n.initCustomEvent(e, true, true, t);
1841
+ }
1842
+ return n;
1843
+ }
1844
+ function fe(e, t, n) {
1845
+ he(e, t, ce({ error: t }, n));
1846
+ }
1847
+ function Xt(e) {
1848
+ return e === 'htmx:afterProcessNode';
1849
+ }
1850
+ function Ft(e, t) {
1851
+ se(Un(e), function (e) {
1852
+ try {
1853
+ t(e);
1854
+ } catch (e) {
1855
+ O(e);
1856
+ }
1857
+ });
1858
+ }
1859
+ function O(e) {
1860
+ if (console.error) {
1861
+ console.error(e);
1862
+ } else if (console.log) {
1863
+ console.log('ERROR: ', e);
1864
+ }
1865
+ }
1866
+ function he(e, t, n) {
1867
+ e = y(e);
1868
+ if (n == null) {
1869
+ n = {};
1870
+ }
1871
+ n.elt = e;
1872
+ const r = Mt(t, n);
1873
+ if (Q.logger && !Xt(t)) {
1874
+ Q.logger(e, t, n);
1875
+ }
1876
+ if (n.error) {
1877
+ O(n.error);
1878
+ he(e, 'htmx:error', { errorInfo: n });
1879
+ }
1880
+ let o = e.dispatchEvent(r);
1881
+ const i = Dt(t);
1882
+ if (o && i !== t) {
1883
+ const s = Mt(i, r.detail);
1884
+ o = o && e.dispatchEvent(s);
1885
+ }
1886
+ Ft(ue(e), function (e) {
1887
+ o = o && e.onEvent(t, r) !== false && !r.defaultPrevented;
1888
+ });
1889
+ return o;
1890
+ }
1891
+ let Bt = location.pathname + location.search;
1892
+ function Ut() {
1893
+ const e = ne().querySelector('[hx-history-elt],[data-hx-history-elt]');
1894
+ return e || ne().body;
1895
+ }
1896
+ function jt(t, e) {
1897
+ if (!B()) {
1898
+ return;
1899
+ }
1900
+ const n = _t(e);
1901
+ const r = ne().title;
1902
+ const o = window.scrollY;
1903
+ if (Q.config.historyCacheSize <= 0) {
1904
+ localStorage.removeItem('htmx-history-cache');
1905
+ return;
1906
+ }
1907
+ t = U(t);
1908
+ const i = S(localStorage.getItem('htmx-history-cache')) || [];
1909
+ for (let e = 0; e < i.length; e++) {
1910
+ if (i[e].url === t) {
1911
+ i.splice(e, 1);
1912
+ break;
1913
+ }
1914
+ }
1915
+ const s = { url: t, content: n, title: r, scroll: o };
1916
+ he(ne().body, 'htmx:historyItemCreated', { item: s, cache: i });
1917
+ i.push(s);
1918
+ while (i.length > Q.config.historyCacheSize) {
1919
+ i.shift();
1920
+ }
1921
+ while (i.length > 0) {
1922
+ try {
1923
+ localStorage.setItem('htmx-history-cache', JSON.stringify(i));
1924
+ break;
1925
+ } catch (e) {
1926
+ fe(ne().body, 'htmx:historyCacheError', { cause: e, cache: i });
1927
+ i.shift();
1928
+ }
1929
+ }
1930
+ }
1931
+ function Vt(t) {
1932
+ if (!B()) {
1933
+ return null;
1934
+ }
1935
+ t = U(t);
1936
+ const n = S(localStorage.getItem('htmx-history-cache')) || [];
1937
+ for (let e = 0; e < n.length; e++) {
1938
+ if (n[e].url === t) {
1939
+ return n[e];
1940
+ }
1941
+ }
1942
+ return null;
1943
+ }
1944
+ function _t(e) {
1945
+ const t = Q.config.requestClass;
1946
+ const n = e.cloneNode(true);
1947
+ se(x(n, '.' + t), function (e) {
1948
+ G(e, t);
1949
+ });
1950
+ se(x(n, '[data-disabled-by-htmx]'), function (e) {
1951
+ e.removeAttribute('disabled');
1952
+ });
1953
+ return n.innerHTML;
1954
+ }
1955
+ function zt() {
1956
+ const e = Ut();
1957
+ const t = Bt || location.pathname + location.search;
1958
+ let n;
1959
+ try {
1960
+ n = ne().querySelector('[hx-history="false" i],[data-hx-history="false" i]');
1961
+ } catch (e) {
1962
+ n = ne().querySelector('[hx-history="false"],[data-hx-history="false"]');
1963
+ }
1964
+ if (!n) {
1965
+ he(ne().body, 'htmx:beforeHistorySave', { path: t, historyElt: e });
1966
+ jt(t, e);
1967
+ }
1968
+ if (Q.config.historyEnabled)
1969
+ history.replaceState({ htmx: true }, ne().title, window.location.href);
1970
+ }
1971
+ function $t(e) {
1972
+ if (Q.config.getCacheBusterParam) {
1973
+ e = e.replace(/org\.htmx\.cache-buster=[^&]*&?/, '');
1974
+ if (Y(e, '&') || Y(e, '?')) {
1975
+ e = e.slice(0, -1);
1976
+ }
1977
+ }
1978
+ if (Q.config.historyEnabled) {
1979
+ history.pushState({ htmx: true }, '', e);
1980
+ }
1981
+ Bt = e;
1982
+ }
1983
+ function Jt(e) {
1984
+ if (Q.config.historyEnabled) history.replaceState({ htmx: true }, '', e);
1985
+ Bt = e;
1986
+ }
1987
+ function Kt(e) {
1988
+ se(e, function (e) {
1989
+ e.call(undefined);
1990
+ });
1991
+ }
1992
+ function Gt(o) {
1993
+ const e = new XMLHttpRequest();
1994
+ const i = { path: o, xhr: e };
1995
+ he(ne().body, 'htmx:historyCacheMiss', i);
1996
+ e.open('GET', o, true);
1997
+ e.setRequestHeader('HX-Request', 'true');
1998
+ e.setRequestHeader('HX-History-Restore-Request', 'true');
1999
+ e.setRequestHeader('HX-Current-URL', ne().location.href);
2000
+ e.onload = function () {
2001
+ if (this.status >= 200 && this.status < 400) {
2002
+ he(ne().body, 'htmx:historyCacheMissLoad', i);
2003
+ const e = P(this.response);
2004
+ const t = e.querySelector('[hx-history-elt],[data-hx-history-elt]') || e;
2005
+ const n = Ut();
2006
+ const r = xn(n);
2007
+ kn(e.title);
2008
+ qe(e);
2009
+ Ve(n, t, r);
2010
+ Te();
2011
+ Kt(r.tasks);
2012
+ Bt = o;
2013
+ he(ne().body, 'htmx:historyRestore', {
2014
+ path: o,
2015
+ cacheMiss: true,
2016
+ serverResponse: this.response,
2017
+ });
2018
+ } else {
2019
+ fe(ne().body, 'htmx:historyCacheMissLoadError', i);
2020
+ }
2021
+ };
2022
+ e.send();
2023
+ }
2024
+ function Wt(e) {
2025
+ zt();
2026
+ e = e || location.pathname + location.search;
2027
+ const t = Vt(e);
2028
+ if (t) {
2029
+ const n = P(t.content);
2030
+ const r = Ut();
2031
+ const o = xn(r);
2032
+ kn(t.title);
2033
+ qe(n);
2034
+ Ve(r, n, o);
2035
+ Te();
2036
+ Kt(o.tasks);
2037
+ E().setTimeout(function () {
2038
+ window.scrollTo(0, t.scroll);
2039
+ }, 0);
2040
+ Bt = e;
2041
+ he(ne().body, 'htmx:historyRestore', { path: e, item: t });
2042
+ } else {
2043
+ if (Q.config.refreshOnHistoryMiss) {
2044
+ window.location.reload(true);
2045
+ } else {
2046
+ Gt(e);
2047
+ }
2048
+ }
2049
+ }
2050
+ function Zt(e) {
2051
+ let t = we(e, 'hx-indicator');
2052
+ if (t == null) {
2053
+ t = [e];
2054
+ }
2055
+ se(t, function (e) {
2056
+ const t = ie(e);
2057
+ t.requestCount = (t.requestCount || 0) + 1;
2058
+ e.classList.add.call(e.classList, Q.config.requestClass);
2059
+ });
2060
+ return t;
2061
+ }
2062
+ function Yt(e) {
2063
+ let t = we(e, 'hx-disabled-elt');
2064
+ if (t == null) {
2065
+ t = [];
2066
+ }
2067
+ se(t, function (e) {
2068
+ const t = ie(e);
2069
+ t.requestCount = (t.requestCount || 0) + 1;
2070
+ e.setAttribute('disabled', '');
2071
+ e.setAttribute('data-disabled-by-htmx', '');
2072
+ });
2073
+ return t;
2074
+ }
2075
+ function Qt(e, t) {
2076
+ se(e.concat(t), function (e) {
2077
+ const t = ie(e);
2078
+ t.requestCount = (t.requestCount || 1) - 1;
2079
+ });
2080
+ se(e, function (e) {
2081
+ const t = ie(e);
2082
+ if (t.requestCount === 0) {
2083
+ e.classList.remove.call(e.classList, Q.config.requestClass);
2084
+ }
2085
+ });
2086
+ se(t, function (e) {
2087
+ const t = ie(e);
2088
+ if (t.requestCount === 0) {
2089
+ e.removeAttribute('disabled');
2090
+ e.removeAttribute('data-disabled-by-htmx');
2091
+ }
2092
+ });
2093
+ }
2094
+ function en(t, n) {
2095
+ for (let e = 0; e < t.length; e++) {
2096
+ const r = t[e];
2097
+ if (r.isSameNode(n)) {
2098
+ return true;
2099
+ }
2100
+ }
2101
+ return false;
2102
+ }
2103
+ function tn(e) {
2104
+ const t = e;
2105
+ if (t.name === '' || t.name == null || t.disabled || g(t, 'fieldset[disabled]')) {
2106
+ return false;
2107
+ }
2108
+ if (
2109
+ t.type === 'button' ||
2110
+ t.type === 'submit' ||
2111
+ t.tagName === 'image' ||
2112
+ t.tagName === 'reset' ||
2113
+ t.tagName === 'file'
2114
+ ) {
2115
+ return false;
2116
+ }
2117
+ if (t.type === 'checkbox' || t.type === 'radio') {
2118
+ return t.checked;
2119
+ }
2120
+ return true;
2121
+ }
2122
+ function nn(t, e, n) {
2123
+ if (t != null && e != null) {
2124
+ if (Array.isArray(e)) {
2125
+ e.forEach(function (e) {
2126
+ n.append(t, e);
2127
+ });
2128
+ } else {
2129
+ n.append(t, e);
2130
+ }
2131
+ }
2132
+ }
2133
+ function rn(t, n, r) {
2134
+ if (t != null && n != null) {
2135
+ let e = r.getAll(t);
2136
+ if (Array.isArray(n)) {
2137
+ e = e.filter((e) => n.indexOf(e) < 0);
2138
+ } else {
2139
+ e = e.filter((e) => e !== n);
2140
+ }
2141
+ r.delete(t);
2142
+ se(e, (e) => r.append(t, e));
2143
+ }
2144
+ }
2145
+ function on(t, n, r, o, i) {
2146
+ if (o == null || en(t, o)) {
2147
+ return;
2148
+ } else {
2149
+ t.push(o);
2150
+ }
2151
+ if (tn(o)) {
2152
+ const s = ee(o, 'name');
2153
+ let e = o.value;
2154
+ if (o instanceof HTMLSelectElement && o.multiple) {
2155
+ e = M(o.querySelectorAll('option:checked')).map(function (e) {
2156
+ return e.value;
2157
+ });
2158
+ }
2159
+ if (o instanceof HTMLInputElement && o.files) {
2160
+ e = M(o.files);
2161
+ }
2162
+ nn(s, e, n);
2163
+ if (i) {
2164
+ sn(o, r);
2165
+ }
2166
+ }
2167
+ if (o instanceof HTMLFormElement) {
2168
+ se(o.elements, function (e) {
2169
+ if (t.indexOf(e) >= 0) {
2170
+ rn(e.name, e.value, n);
2171
+ } else {
2172
+ t.push(e);
2173
+ }
2174
+ if (i) {
2175
+ sn(e, r);
2176
+ }
2177
+ });
2178
+ new FormData(o).forEach(function (e, t) {
2179
+ if (e instanceof File && e.name === '') {
2180
+ return;
2181
+ }
2182
+ nn(t, e, n);
2183
+ });
2184
+ }
2185
+ }
2186
+ function sn(e, t) {
2187
+ const n = e;
2188
+ if (n.willValidate) {
2189
+ he(n, 'htmx:validation:validate');
2190
+ if (!n.checkValidity()) {
2191
+ t.push({ elt: n, message: n.validationMessage, validity: n.validity });
2192
+ he(n, 'htmx:validation:failed', { message: n.validationMessage, validity: n.validity });
2193
+ }
2194
+ }
2195
+ }
2196
+ function ln(n, e) {
2197
+ for (const t of e.keys()) {
2198
+ n.delete(t);
2199
+ }
2200
+ e.forEach(function (e, t) {
2201
+ n.append(t, e);
2202
+ });
2203
+ return n;
2204
+ }
2205
+ function cn(e, t) {
2206
+ const n = [];
2207
+ const r = new FormData();
2208
+ const o = new FormData();
2209
+ const i = [];
2210
+ const s = ie(e);
2211
+ if (s.lastButtonClicked && !le(s.lastButtonClicked)) {
2212
+ s.lastButtonClicked = null;
2213
+ }
2214
+ let l =
2215
+ (e instanceof HTMLFormElement && e.noValidate !== true) || te(e, 'hx-validate') === 'true';
2216
+ if (s.lastButtonClicked) {
2217
+ l = l && s.lastButtonClicked.formNoValidate !== true;
2218
+ }
2219
+ if (t !== 'get') {
2220
+ on(n, o, i, g(e, 'form'), l);
2221
+ }
2222
+ on(n, r, i, e, l);
2223
+ if (
2224
+ s.lastButtonClicked ||
2225
+ e.tagName === 'BUTTON' ||
2226
+ (e.tagName === 'INPUT' && ee(e, 'type') === 'submit')
2227
+ ) {
2228
+ const u = s.lastButtonClicked || e;
2229
+ const a = ee(u, 'name');
2230
+ nn(a, u.value, o);
2231
+ }
2232
+ const c = we(e, 'hx-include');
2233
+ se(c, function (e) {
2234
+ on(n, r, i, ue(e), l);
2235
+ if (!h(e, 'form')) {
2236
+ se(f(e).querySelectorAll(ot), function (e) {
2237
+ on(n, r, i, e, l);
2238
+ });
2239
+ }
2240
+ });
2241
+ ln(r, o);
2242
+ return { errors: i, formData: r, values: An(r) };
2243
+ }
2244
+ function un(e, t, n) {
2245
+ if (e !== '') {
2246
+ e += '&';
2247
+ }
2248
+ if (String(n) === '[object Object]') {
2249
+ n = JSON.stringify(n);
2250
+ }
2251
+ const r = encodeURIComponent(n);
2252
+ e += encodeURIComponent(t) + '=' + r;
2253
+ return e;
2254
+ }
2255
+ function an(e) {
2256
+ e = qn(e);
2257
+ let n = '';
2258
+ e.forEach(function (e, t) {
2259
+ n = un(n, t, e);
2260
+ });
2261
+ return n;
2262
+ }
2263
+ function fn(e, t, n) {
2264
+ const r = {
2265
+ 'HX-Request': 'true',
2266
+ 'HX-Trigger': ee(e, 'id'),
2267
+ 'HX-Trigger-Name': ee(e, 'name'),
2268
+ 'HX-Target': te(t, 'id'),
2269
+ 'HX-Current-URL': ne().location.href,
2270
+ };
2271
+ bn(e, 'hx-headers', false, r);
2272
+ if (n !== undefined) {
2273
+ r['HX-Prompt'] = n;
2274
+ }
2275
+ if (ie(e).boosted) {
2276
+ r['HX-Boosted'] = 'true';
2277
+ }
2278
+ return r;
2279
+ }
2280
+ function hn(n, e) {
2281
+ const t = re(e, 'hx-params');
2282
+ if (t) {
2283
+ if (t === 'none') {
2284
+ return new FormData();
2285
+ } else if (t === '*') {
2286
+ return n;
2287
+ } else if (t.indexOf('not ') === 0) {
2288
+ se(t.slice(4).split(','), function (e) {
2289
+ e = e.trim();
2290
+ n.delete(e);
2291
+ });
2292
+ return n;
2293
+ } else {
2294
+ const r = new FormData();
2295
+ se(t.split(','), function (t) {
2296
+ t = t.trim();
2297
+ if (n.has(t)) {
2298
+ n.getAll(t).forEach(function (e) {
2299
+ r.append(t, e);
2300
+ });
2301
+ }
2302
+ });
2303
+ return r;
2304
+ }
2305
+ } else {
2306
+ return n;
2307
+ }
2308
+ }
2309
+ function dn(e) {
2310
+ return !!ee(e, 'href') && ee(e, 'href').indexOf('#') >= 0;
2311
+ }
2312
+ function gn(e, t) {
2313
+ const n = t || re(e, 'hx-swap');
2314
+ const r = {
2315
+ swapStyle: ie(e).boosted ? 'innerHTML' : Q.config.defaultSwapStyle,
2316
+ swapDelay: Q.config.defaultSwapDelay,
2317
+ settleDelay: Q.config.defaultSettleDelay,
2318
+ };
2319
+ if (Q.config.scrollIntoViewOnBoost && ie(e).boosted && !dn(e)) {
2320
+ r.show = 'top';
2321
+ }
2322
+ if (n) {
2323
+ const s = F(n);
2324
+ if (s.length > 0) {
2325
+ for (let e = 0; e < s.length; e++) {
2326
+ const l = s[e];
2327
+ if (l.indexOf('swap:') === 0) {
2328
+ r.swapDelay = d(l.slice(5));
2329
+ } else if (l.indexOf('settle:') === 0) {
2330
+ r.settleDelay = d(l.slice(7));
2331
+ } else if (l.indexOf('transition:') === 0) {
2332
+ r.transition = l.slice(11) === 'true';
2333
+ } else if (l.indexOf('ignoreTitle:') === 0) {
2334
+ r.ignoreTitle = l.slice(12) === 'true';
2335
+ } else if (l.indexOf('scroll:') === 0) {
2336
+ const c = l.slice(7);
2337
+ var o = c.split(':');
2338
+ const u = o.pop();
2339
+ var i = o.length > 0 ? o.join(':') : null;
2340
+ r.scroll = u;
2341
+ r.scrollTarget = i;
2342
+ } else if (l.indexOf('show:') === 0) {
2343
+ const a = l.slice(5);
2344
+ var o = a.split(':');
2345
+ const f = o.pop();
2346
+ var i = o.length > 0 ? o.join(':') : null;
2347
+ r.show = f;
2348
+ r.showTarget = i;
2349
+ } else if (l.indexOf('focus-scroll:') === 0) {
2350
+ const h = l.slice('focus-scroll:'.length);
2351
+ r.focusScroll = h == 'true';
2352
+ } else if (e == 0) {
2353
+ r.swapStyle = l;
2354
+ } else {
2355
+ O('Unknown modifier in hx-swap: ' + l);
2356
+ }
2357
+ }
2358
+ }
2359
+ }
2360
+ return r;
2361
+ }
2362
+ function pn(e) {
2363
+ return (
2364
+ re(e, 'hx-encoding') === 'multipart/form-data' ||
2365
+ (h(e, 'form') && ee(e, 'enctype') === 'multipart/form-data')
2366
+ );
2367
+ }
2368
+ function mn(t, n, r) {
2369
+ let o = null;
2370
+ Ft(n, function (e) {
2371
+ if (o == null) {
2372
+ o = e.encodeParameters(t, r, n);
2373
+ }
2374
+ });
2375
+ if (o != null) {
2376
+ return o;
2377
+ } else {
2378
+ if (pn(n)) {
2379
+ return ln(new FormData(), qn(r));
2380
+ } else {
2381
+ return an(r);
2382
+ }
2383
+ }
2384
+ }
2385
+ function xn(e) {
2386
+ return { tasks: [], elts: [e] };
2387
+ }
2388
+ function yn(e, t) {
2389
+ const n = e[0];
2390
+ const r = e[e.length - 1];
2391
+ if (t.scroll) {
2392
+ var o = null;
2393
+ if (t.scrollTarget) {
2394
+ o = ue(ae(n, t.scrollTarget));
2395
+ }
2396
+ if (t.scroll === 'top' && (n || o)) {
2397
+ o = o || n;
2398
+ o.scrollTop = 0;
2399
+ }
2400
+ if (t.scroll === 'bottom' && (r || o)) {
2401
+ o = o || r;
2402
+ o.scrollTop = o.scrollHeight;
2403
+ }
2404
+ }
2405
+ if (t.show) {
2406
+ var o = null;
2407
+ if (t.showTarget) {
2408
+ let e = t.showTarget;
2409
+ if (t.showTarget === 'window') {
2410
+ e = 'body';
2411
+ }
2412
+ o = ue(ae(n, e));
2413
+ }
2414
+ if (t.show === 'top' && (n || o)) {
2415
+ o = o || n;
2416
+ o.scrollIntoView({ block: 'start', behavior: Q.config.scrollBehavior });
2417
+ }
2418
+ if (t.show === 'bottom' && (r || o)) {
2419
+ o = o || r;
2420
+ o.scrollIntoView({ block: 'end', behavior: Q.config.scrollBehavior });
2421
+ }
2422
+ }
2423
+ }
2424
+ function bn(r, e, o, i) {
2425
+ if (i == null) {
2426
+ i = {};
2427
+ }
2428
+ if (r == null) {
2429
+ return i;
2430
+ }
2431
+ const s = te(r, e);
2432
+ if (s) {
2433
+ let e = s.trim();
2434
+ let t = o;
2435
+ if (e === 'unset') {
2436
+ return null;
2437
+ }
2438
+ if (e.indexOf('javascript:') === 0) {
2439
+ e = e.slice(11);
2440
+ t = true;
2441
+ } else if (e.indexOf('js:') === 0) {
2442
+ e = e.slice(3);
2443
+ t = true;
2444
+ }
2445
+ if (e.indexOf('{') !== 0) {
2446
+ e = '{' + e + '}';
2447
+ }
2448
+ let n;
2449
+ if (t) {
2450
+ n = vn(
2451
+ r,
2452
+ function () {
2453
+ return Function('return (' + e + ')')();
2454
+ },
2455
+ {}
2456
+ );
2457
+ } else {
2458
+ n = S(e);
2459
+ }
2460
+ for (const l in n) {
2461
+ if (n.hasOwnProperty(l)) {
2462
+ if (i[l] == null) {
2463
+ i[l] = n[l];
2464
+ }
2465
+ }
2466
+ }
2467
+ }
2468
+ return bn(ue(c(r)), e, o, i);
2469
+ }
2470
+ function vn(e, t, n) {
2471
+ if (Q.config.allowEval) {
2472
+ return t();
2473
+ } else {
2474
+ fe(e, 'htmx:evalDisallowedError');
2475
+ return n;
2476
+ }
2477
+ }
2478
+ function wn(e, t) {
2479
+ return bn(e, 'hx-vars', true, t);
2480
+ }
2481
+ function Sn(e, t) {
2482
+ return bn(e, 'hx-vals', false, t);
2483
+ }
2484
+ function En(e) {
2485
+ return ce(wn(e), Sn(e));
2486
+ }
2487
+ function Cn(t, n, r) {
2488
+ if (r !== null) {
2489
+ try {
2490
+ t.setRequestHeader(n, r);
2491
+ } catch (e) {
2492
+ t.setRequestHeader(n, encodeURIComponent(r));
2493
+ t.setRequestHeader(n + '-URI-AutoEncoded', 'true');
2494
+ }
2495
+ }
2496
+ }
2497
+ function On(t) {
2498
+ if (t.responseURL && typeof URL !== 'undefined') {
2499
+ try {
2500
+ const e = new URL(t.responseURL);
2501
+ return e.pathname + e.search;
2502
+ } catch (e) {
2503
+ fe(ne().body, 'htmx:badResponseUrl', { url: t.responseURL });
2504
+ }
2505
+ }
2506
+ }
2507
+ function R(e, t) {
2508
+ return t.test(e.getAllResponseHeaders());
2509
+ }
2510
+ function Rn(t, n, r) {
2511
+ t = t.toLowerCase();
2512
+ if (r) {
2513
+ if (r instanceof Element || typeof r === 'string') {
2514
+ return de(t, n, null, null, { targetOverride: y(r) || ve, returnPromise: true });
2515
+ } else {
2516
+ let e = y(r.target);
2517
+ if ((r.target && !e) || (r.source && !e && !y(r.source))) {
2518
+ e = ve;
2519
+ }
2520
+ return de(t, n, y(r.source), r.event, {
2521
+ handler: r.handler,
2522
+ headers: r.headers,
2523
+ values: r.values,
2524
+ targetOverride: e,
2525
+ swapOverride: r.swap,
2526
+ select: r.select,
2527
+ returnPromise: true,
2528
+ });
2529
+ }
2530
+ } else {
2531
+ return de(t, n, null, null, { returnPromise: true });
2532
+ }
2533
+ }
2534
+ function Hn(e) {
2535
+ const t = [];
2536
+ while (e) {
2537
+ t.push(e);
2538
+ e = e.parentElement;
2539
+ }
2540
+ return t;
2541
+ }
2542
+ function Tn(e, t, n) {
2543
+ let r;
2544
+ let o;
2545
+ if (typeof URL === 'function') {
2546
+ o = new URL(t, document.location.href);
2547
+ const i = document.location.origin;
2548
+ r = i === o.origin;
2549
+ } else {
2550
+ o = t;
2551
+ r = l(t, document.location.origin);
2552
+ }
2553
+ if (Q.config.selfRequestsOnly) {
2554
+ if (!r) {
2555
+ return false;
2556
+ }
2557
+ }
2558
+ return he(e, 'htmx:validateUrl', ce({ url: o, sameHost: r }, n));
2559
+ }
2560
+ function qn(e) {
2561
+ if (e instanceof FormData) return e;
2562
+ const t = new FormData();
2563
+ for (const n in e) {
2564
+ if (e.hasOwnProperty(n)) {
2565
+ if (e[n] && typeof e[n].forEach === 'function') {
2566
+ e[n].forEach(function (e) {
2567
+ t.append(n, e);
2568
+ });
2569
+ } else if (typeof e[n] === 'object' && !(e[n] instanceof Blob)) {
2570
+ t.append(n, JSON.stringify(e[n]));
2571
+ } else {
2572
+ t.append(n, e[n]);
2573
+ }
2574
+ }
2575
+ }
2576
+ return t;
2577
+ }
2578
+ function Ln(r, o, e) {
2579
+ return new Proxy(e, {
2580
+ get: function (t, e) {
2581
+ if (typeof e === 'number') return t[e];
2582
+ if (e === 'length') return t.length;
2583
+ if (e === 'push') {
2584
+ return function (e) {
2585
+ t.push(e);
2586
+ r.append(o, e);
2587
+ };
2588
+ }
2589
+ if (typeof t[e] === 'function') {
2590
+ return function () {
2591
+ t[e].apply(t, arguments);
2592
+ r.delete(o);
2593
+ t.forEach(function (e) {
2594
+ r.append(o, e);
2595
+ });
2596
+ };
2597
+ }
2598
+ if (t[e] && t[e].length === 1) {
2599
+ return t[e][0];
2600
+ } else {
2601
+ return t[e];
2602
+ }
2603
+ },
2604
+ set: function (e, t, n) {
2605
+ e[t] = n;
2606
+ r.delete(o);
2607
+ e.forEach(function (e) {
2608
+ r.append(o, e);
2609
+ });
2610
+ return true;
2611
+ },
2612
+ });
2613
+ }
2614
+ function An(o) {
2615
+ return new Proxy(o, {
2616
+ get: function (e, t) {
2617
+ if (typeof t === 'symbol') {
2618
+ const r = Reflect.get(e, t);
2619
+ if (typeof r === 'function') {
2620
+ return function () {
2621
+ return r.apply(o, arguments);
2622
+ };
2623
+ } else {
2624
+ return r;
2625
+ }
2626
+ }
2627
+ if (t === 'toJSON') {
2628
+ return () => Object.fromEntries(o);
2629
+ }
2630
+ if (t in e) {
2631
+ if (typeof e[t] === 'function') {
2632
+ return function () {
2633
+ return o[t].apply(o, arguments);
2634
+ };
2635
+ } else {
2636
+ return e[t];
2637
+ }
2638
+ }
2639
+ const n = o.getAll(t);
2640
+ if (n.length === 0) {
2641
+ return undefined;
2642
+ } else if (n.length === 1) {
2643
+ return n[0];
2644
+ } else {
2645
+ return Ln(e, t, n);
2646
+ }
2647
+ },
2648
+ set: function (t, n, e) {
2649
+ if (typeof n !== 'string') {
2650
+ return false;
2651
+ }
2652
+ t.delete(n);
2653
+ if (e && typeof e.forEach === 'function') {
2654
+ e.forEach(function (e) {
2655
+ t.append(n, e);
2656
+ });
2657
+ } else if (typeof e === 'object' && !(e instanceof Blob)) {
2658
+ t.append(n, JSON.stringify(e));
2659
+ } else {
2660
+ t.append(n, e);
2661
+ }
2662
+ return true;
2663
+ },
2664
+ deleteProperty: function (e, t) {
2665
+ if (typeof t === 'string') {
2666
+ e.delete(t);
2667
+ }
2668
+ return true;
2669
+ },
2670
+ ownKeys: function (e) {
2671
+ return Reflect.ownKeys(Object.fromEntries(e));
2672
+ },
2673
+ getOwnPropertyDescriptor: function (e, t) {
2674
+ return Reflect.getOwnPropertyDescriptor(Object.fromEntries(e), t);
2675
+ },
2676
+ });
2677
+ }
2678
+ function de(t, n, r, o, i, D) {
2679
+ let s = null;
2680
+ let l = null;
2681
+ i = i != null ? i : {};
2682
+ if (i.returnPromise && typeof Promise !== 'undefined') {
2683
+ var e = new Promise(function (e, t) {
2684
+ s = e;
2685
+ l = t;
2686
+ });
2687
+ }
2688
+ if (r == null) {
2689
+ r = ne().body;
2690
+ }
2691
+ const M = i.handler || Dn;
2692
+ const X = i.select || null;
2693
+ if (!le(r)) {
2694
+ oe(s);
2695
+ return e;
2696
+ }
2697
+ const c = i.targetOverride || ue(Ee(r));
2698
+ if (c == null || c == ve) {
2699
+ fe(r, 'htmx:targetError', { target: te(r, 'hx-target') });
2700
+ oe(l);
2701
+ return e;
2702
+ }
2703
+ let u = ie(r);
2704
+ const a = u.lastButtonClicked;
2705
+ if (a) {
2706
+ const L = ee(a, 'formaction');
2707
+ if (L != null) {
2708
+ n = L;
2709
+ }
2710
+ const A = ee(a, 'formmethod');
2711
+ if (A != null) {
2712
+ if (A.toLowerCase() !== 'dialog') {
2713
+ t = A;
2714
+ }
2715
+ }
2716
+ }
2717
+ const f = re(r, 'hx-confirm');
2718
+ if (D === undefined) {
2719
+ const K = function (e) {
2720
+ return de(t, n, r, o, i, !!e);
2721
+ };
2722
+ const G = {
2723
+ target: c,
2724
+ elt: r,
2725
+ path: n,
2726
+ verb: t,
2727
+ triggeringEvent: o,
2728
+ etc: i,
2729
+ issueRequest: K,
2730
+ question: f,
2731
+ };
2732
+ if (he(r, 'htmx:confirm', G) === false) {
2733
+ oe(s);
2734
+ return e;
2735
+ }
2736
+ }
2737
+ let h = r;
2738
+ let d = re(r, 'hx-sync');
2739
+ let g = null;
2740
+ let F = false;
2741
+ if (d) {
2742
+ const N = d.split(':');
2743
+ const I = N[0].trim();
2744
+ if (I === 'this') {
2745
+ h = Se(r, 'hx-sync');
2746
+ } else {
2747
+ h = ue(ae(r, I));
2748
+ }
2749
+ d = (N[1] || 'drop').trim();
2750
+ u = ie(h);
2751
+ if (d === 'drop' && u.xhr && u.abortable !== true) {
2752
+ oe(s);
2753
+ return e;
2754
+ } else if (d === 'abort') {
2755
+ if (u.xhr) {
2756
+ oe(s);
2757
+ return e;
2758
+ } else {
2759
+ F = true;
2760
+ }
2761
+ } else if (d === 'replace') {
2762
+ he(h, 'htmx:abort');
2763
+ } else if (d.indexOf('queue') === 0) {
2764
+ const W = d.split(' ');
2765
+ g = (W[1] || 'last').trim();
2766
+ }
2767
+ }
2768
+ if (u.xhr) {
2769
+ if (u.abortable) {
2770
+ he(h, 'htmx:abort');
2771
+ } else {
2772
+ if (g == null) {
2773
+ if (o) {
2774
+ const P = ie(o);
2775
+ if (P && P.triggerSpec && P.triggerSpec.queue) {
2776
+ g = P.triggerSpec.queue;
2777
+ }
2778
+ }
2779
+ if (g == null) {
2780
+ g = 'last';
2781
+ }
2782
+ }
2783
+ if (u.queuedRequests == null) {
2784
+ u.queuedRequests = [];
2785
+ }
2786
+ if (g === 'first' && u.queuedRequests.length === 0) {
2787
+ u.queuedRequests.push(function () {
2788
+ de(t, n, r, o, i);
2789
+ });
2790
+ } else if (g === 'all') {
2791
+ u.queuedRequests.push(function () {
2792
+ de(t, n, r, o, i);
2793
+ });
2794
+ } else if (g === 'last') {
2795
+ u.queuedRequests = [];
2796
+ u.queuedRequests.push(function () {
2797
+ de(t, n, r, o, i);
2798
+ });
2799
+ }
2800
+ oe(s);
2801
+ return e;
2802
+ }
2803
+ }
2804
+ const p = new XMLHttpRequest();
2805
+ u.xhr = p;
2806
+ u.abortable = F;
2807
+ const m = function () {
2808
+ u.xhr = null;
2809
+ u.abortable = false;
2810
+ if (u.queuedRequests != null && u.queuedRequests.length > 0) {
2811
+ const e = u.queuedRequests.shift();
2812
+ e();
2813
+ }
2814
+ };
2815
+ const B = re(r, 'hx-prompt');
2816
+ if (B) {
2817
+ var x = prompt(B);
2818
+ if (x === null || !he(r, 'htmx:prompt', { prompt: x, target: c })) {
2819
+ oe(s);
2820
+ m();
2821
+ return e;
2822
+ }
2823
+ }
2824
+ if (f && !D) {
2825
+ if (!confirm(f)) {
2826
+ oe(s);
2827
+ m();
2828
+ return e;
2829
+ }
2830
+ }
2831
+ let y = fn(r, c, x);
2832
+ if (t !== 'get' && !pn(r)) {
2833
+ y['Content-Type'] = 'application/x-www-form-urlencoded';
2834
+ }
2835
+ if (i.headers) {
2836
+ y = ce(y, i.headers);
2837
+ }
2838
+ const U = cn(r, t);
2839
+ let b = U.errors;
2840
+ const j = U.formData;
2841
+ if (i.values) {
2842
+ ln(j, qn(i.values));
2843
+ }
2844
+ const V = qn(En(r));
2845
+ const v = ln(j, V);
2846
+ let w = hn(v, r);
2847
+ if (Q.config.getCacheBusterParam && t === 'get') {
2848
+ w.set('org.htmx.cache-buster', ee(c, 'id') || 'true');
2849
+ }
2850
+ if (n == null || n === '') {
2851
+ n = ne().location.href;
2852
+ }
2853
+ const S = bn(r, 'hx-request');
2854
+ const _ = ie(r).boosted;
2855
+ let E = Q.config.methodsThatUseUrlParams.indexOf(t) >= 0;
2856
+ const C = {
2857
+ boosted: _,
2858
+ useUrlParams: E,
2859
+ formData: w,
2860
+ parameters: An(w),
2861
+ unfilteredFormData: v,
2862
+ unfilteredParameters: An(v),
2863
+ headers: y,
2864
+ target: c,
2865
+ verb: t,
2866
+ errors: b,
2867
+ withCredentials: i.credentials || S.credentials || Q.config.withCredentials,
2868
+ timeout: i.timeout || S.timeout || Q.config.timeout,
2869
+ path: n,
2870
+ triggeringEvent: o,
2871
+ };
2872
+ if (!he(r, 'htmx:configRequest', C)) {
2873
+ oe(s);
2874
+ m();
2875
+ return e;
2876
+ }
2877
+ n = C.path;
2878
+ t = C.verb;
2879
+ y = C.headers;
2880
+ w = qn(C.parameters);
2881
+ b = C.errors;
2882
+ E = C.useUrlParams;
2883
+ if (b && b.length > 0) {
2884
+ he(r, 'htmx:validation:halted', C);
2885
+ oe(s);
2886
+ m();
2887
+ return e;
2888
+ }
2889
+ const z = n.split('#');
2890
+ const $ = z[0];
2891
+ const O = z[1];
2892
+ let R = n;
2893
+ if (E) {
2894
+ R = $;
2895
+ const Z = !w.keys().next().done;
2896
+ if (Z) {
2897
+ if (R.indexOf('?') < 0) {
2898
+ R += '?';
2899
+ } else {
2900
+ R += '&';
2901
+ }
2902
+ R += an(w);
2903
+ if (O) {
2904
+ R += '#' + O;
2905
+ }
2906
+ }
2907
+ }
2908
+ if (!Tn(r, R, C)) {
2909
+ fe(r, 'htmx:invalidPath', C);
2910
+ oe(l);
2911
+ return e;
2912
+ }
2913
+ p.open(t.toUpperCase(), R, true);
2914
+ p.overrideMimeType('text/html');
2915
+ p.withCredentials = C.withCredentials;
2916
+ p.timeout = C.timeout;
2917
+ if (S.noHeaders) {
2918
+ } else {
2919
+ for (const k in y) {
2920
+ if (y.hasOwnProperty(k)) {
2921
+ const Y = y[k];
2922
+ Cn(p, k, Y);
2923
+ }
2924
+ }
2925
+ }
2926
+ const H = {
2927
+ xhr: p,
2928
+ target: c,
2929
+ requestConfig: C,
2930
+ etc: i,
2931
+ boosted: _,
2932
+ select: X,
2933
+ pathInfo: { requestPath: n, finalRequestPath: R, responsePath: null, anchor: O },
2934
+ };
2935
+ p.onload = function () {
2936
+ try {
2937
+ const t = Hn(r);
2938
+ H.pathInfo.responsePath = On(p);
2939
+ M(r, H);
2940
+ if (H.keepIndicators !== true) {
2941
+ Qt(T, q);
2942
+ }
2943
+ he(r, 'htmx:afterRequest', H);
2944
+ he(r, 'htmx:afterOnLoad', H);
2945
+ if (!le(r)) {
2946
+ let e = null;
2947
+ while (t.length > 0 && e == null) {
2948
+ const n = t.shift();
2949
+ if (le(n)) {
2950
+ e = n;
2951
+ }
2952
+ }
2953
+ if (e) {
2954
+ he(e, 'htmx:afterRequest', H);
2955
+ he(e, 'htmx:afterOnLoad', H);
2956
+ }
2957
+ }
2958
+ oe(s);
2959
+ m();
2960
+ } catch (e) {
2961
+ fe(r, 'htmx:onLoadError', ce({ error: e }, H));
2962
+ throw e;
2963
+ }
2964
+ };
2965
+ p.onerror = function () {
2966
+ Qt(T, q);
2967
+ fe(r, 'htmx:afterRequest', H);
2968
+ fe(r, 'htmx:sendError', H);
2969
+ oe(l);
2970
+ m();
2971
+ };
2972
+ p.onabort = function () {
2973
+ Qt(T, q);
2974
+ fe(r, 'htmx:afterRequest', H);
2975
+ fe(r, 'htmx:sendAbort', H);
2976
+ oe(l);
2977
+ m();
2978
+ };
2979
+ p.ontimeout = function () {
2980
+ Qt(T, q);
2981
+ fe(r, 'htmx:afterRequest', H);
2982
+ fe(r, 'htmx:timeout', H);
2983
+ oe(l);
2984
+ m();
2985
+ };
2986
+ if (!he(r, 'htmx:beforeRequest', H)) {
2987
+ oe(s);
2988
+ m();
2989
+ return e;
2990
+ }
2991
+ var T = Zt(r);
2992
+ var q = Yt(r);
2993
+ se(['loadstart', 'loadend', 'progress', 'abort'], function (t) {
2994
+ se([p, p.upload], function (e) {
2995
+ e.addEventListener(t, function (e) {
2996
+ he(r, 'htmx:xhr:' + t, {
2997
+ lengthComputable: e.lengthComputable,
2998
+ loaded: e.loaded,
2999
+ total: e.total,
3000
+ });
3001
+ });
3002
+ });
3003
+ });
3004
+ he(r, 'htmx:beforeSend', H);
3005
+ const J = E ? null : mn(p, r, w);
3006
+ p.send(J);
3007
+ return e;
3008
+ }
3009
+ function Nn(e, t) {
3010
+ const n = t.xhr;
3011
+ let r = null;
3012
+ let o = null;
3013
+ if (R(n, /HX-Push:/i)) {
3014
+ r = n.getResponseHeader('HX-Push');
3015
+ o = 'push';
3016
+ } else if (R(n, /HX-Push-Url:/i)) {
3017
+ r = n.getResponseHeader('HX-Push-Url');
3018
+ o = 'push';
3019
+ } else if (R(n, /HX-Replace-Url:/i)) {
3020
+ r = n.getResponseHeader('HX-Replace-Url');
3021
+ o = 'replace';
3022
+ }
3023
+ if (r) {
3024
+ if (r === 'false') {
3025
+ return {};
3026
+ } else {
3027
+ return { type: o, path: r };
3028
+ }
3029
+ }
3030
+ const i = t.pathInfo.finalRequestPath;
3031
+ const s = t.pathInfo.responsePath;
3032
+ const l = re(e, 'hx-push-url');
3033
+ const c = re(e, 'hx-replace-url');
3034
+ const u = ie(e).boosted;
3035
+ let a = null;
3036
+ let f = null;
3037
+ if (l) {
3038
+ a = 'push';
3039
+ f = l;
3040
+ } else if (c) {
3041
+ a = 'replace';
3042
+ f = c;
3043
+ } else if (u) {
3044
+ a = 'push';
3045
+ f = s || i;
3046
+ }
3047
+ if (f) {
3048
+ if (f === 'false') {
3049
+ return {};
3050
+ }
3051
+ if (f === 'true') {
3052
+ f = s || i;
3053
+ }
3054
+ if (t.pathInfo.anchor && f.indexOf('#') === -1) {
3055
+ f = f + '#' + t.pathInfo.anchor;
3056
+ }
3057
+ return { type: a, path: f };
3058
+ } else {
3059
+ return {};
3060
+ }
3061
+ }
3062
+ function In(e, t) {
3063
+ var n = new RegExp(e.code);
3064
+ return n.test(t.toString(10));
3065
+ }
3066
+ function Pn(e) {
3067
+ for (var t = 0; t < Q.config.responseHandling.length; t++) {
3068
+ var n = Q.config.responseHandling[t];
3069
+ if (In(n, e.status)) {
3070
+ return n;
3071
+ }
3072
+ }
3073
+ return { swap: false };
3074
+ }
3075
+ function kn(e) {
3076
+ if (e) {
3077
+ const t = u('title');
3078
+ if (t) {
3079
+ t.innerHTML = e;
3080
+ } else {
3081
+ window.document.title = e;
3082
+ }
3083
+ }
3084
+ }
3085
+ function Dn(o, i) {
3086
+ const s = i.xhr;
3087
+ let l = i.target;
3088
+ const e = i.etc;
3089
+ const c = i.select;
3090
+ if (!he(o, 'htmx:beforeOnLoad', i)) return;
3091
+ if (R(s, /HX-Trigger:/i)) {
3092
+ Je(s, 'HX-Trigger', o);
3093
+ }
3094
+ if (R(s, /HX-Location:/i)) {
3095
+ zt();
3096
+ let e = s.getResponseHeader('HX-Location');
3097
+ var t;
3098
+ if (e.indexOf('{') === 0) {
3099
+ t = S(e);
3100
+ e = t.path;
3101
+ delete t.path;
3102
+ }
3103
+ Rn('get', e, t).then(function () {
3104
+ $t(e);
3105
+ });
3106
+ return;
3107
+ }
3108
+ const n = R(s, /HX-Refresh:/i) && s.getResponseHeader('HX-Refresh') === 'true';
3109
+ if (R(s, /HX-Redirect:/i)) {
3110
+ i.keepIndicators = true;
3111
+ location.href = s.getResponseHeader('HX-Redirect');
3112
+ n && location.reload();
3113
+ return;
3114
+ }
3115
+ if (n) {
3116
+ i.keepIndicators = true;
3117
+ location.reload();
3118
+ return;
3119
+ }
3120
+ if (R(s, /HX-Retarget:/i)) {
3121
+ if (s.getResponseHeader('HX-Retarget') === 'this') {
3122
+ i.target = o;
3123
+ } else {
3124
+ i.target = ue(ae(o, s.getResponseHeader('HX-Retarget')));
3125
+ }
3126
+ }
3127
+ const u = Nn(o, i);
3128
+ const r = Pn(s);
3129
+ const a = r.swap;
3130
+ let f = !!r.error;
3131
+ let h = Q.config.ignoreTitle || r.ignoreTitle;
3132
+ let d = r.select;
3133
+ if (r.target) {
3134
+ i.target = ue(ae(o, r.target));
3135
+ }
3136
+ var g = e.swapOverride;
3137
+ if (g == null && r.swapOverride) {
3138
+ g = r.swapOverride;
3139
+ }
3140
+ if (R(s, /HX-Retarget:/i)) {
3141
+ if (s.getResponseHeader('HX-Retarget') === 'this') {
3142
+ i.target = o;
3143
+ } else {
3144
+ i.target = ue(ae(o, s.getResponseHeader('HX-Retarget')));
3145
+ }
3146
+ }
3147
+ if (R(s, /HX-Reswap:/i)) {
3148
+ g = s.getResponseHeader('HX-Reswap');
3149
+ }
3150
+ var p = s.response;
3151
+ var m = ce(
3152
+ {
3153
+ shouldSwap: a,
3154
+ serverResponse: p,
3155
+ isError: f,
3156
+ ignoreTitle: h,
3157
+ selectOverride: d,
3158
+ swapOverride: g,
3159
+ },
3160
+ i
3161
+ );
3162
+ if (r.event && !he(l, r.event, m)) return;
3163
+ if (!he(l, 'htmx:beforeSwap', m)) return;
3164
+ l = m.target;
3165
+ p = m.serverResponse;
3166
+ f = m.isError;
3167
+ h = m.ignoreTitle;
3168
+ d = m.selectOverride;
3169
+ g = m.swapOverride;
3170
+ i.target = l;
3171
+ i.failed = f;
3172
+ i.successful = !f;
3173
+ if (m.shouldSwap) {
3174
+ if (s.status === 286) {
3175
+ lt(o);
3176
+ }
3177
+ Ft(o, function (e) {
3178
+ p = e.transformResponse(p, s, o);
3179
+ });
3180
+ if (u.type) {
3181
+ zt();
3182
+ }
3183
+ var x = gn(o, g);
3184
+ if (!x.hasOwnProperty('ignoreTitle')) {
3185
+ x.ignoreTitle = h;
3186
+ }
3187
+ l.classList.add(Q.config.swappingClass);
3188
+ let n = null;
3189
+ let r = null;
3190
+ if (c) {
3191
+ d = c;
3192
+ }
3193
+ if (R(s, /HX-Reselect:/i)) {
3194
+ d = s.getResponseHeader('HX-Reselect');
3195
+ }
3196
+ const y = re(o, 'hx-select-oob');
3197
+ const b = re(o, 'hx-select');
3198
+ let e = function () {
3199
+ try {
3200
+ if (u.type) {
3201
+ he(ne().body, 'htmx:beforeHistoryUpdate', ce({ history: u }, i));
3202
+ if (u.type === 'push') {
3203
+ $t(u.path);
3204
+ he(ne().body, 'htmx:pushedIntoHistory', { path: u.path });
3205
+ } else {
3206
+ Jt(u.path);
3207
+ he(ne().body, 'htmx:replacedInHistory', { path: u.path });
3208
+ }
3209
+ }
3210
+ $e(l, p, x, {
3211
+ select: d || b,
3212
+ selectOOB: y,
3213
+ eventInfo: i,
3214
+ anchor: i.pathInfo.anchor,
3215
+ contextElement: o,
3216
+ afterSwapCallback: function () {
3217
+ if (R(s, /HX-Trigger-After-Swap:/i)) {
3218
+ let e = o;
3219
+ if (!le(o)) {
3220
+ e = ne().body;
3221
+ }
3222
+ Je(s, 'HX-Trigger-After-Swap', e);
3223
+ }
3224
+ },
3225
+ afterSettleCallback: function () {
3226
+ if (R(s, /HX-Trigger-After-Settle:/i)) {
3227
+ let e = o;
3228
+ if (!le(o)) {
3229
+ e = ne().body;
3230
+ }
3231
+ Je(s, 'HX-Trigger-After-Settle', e);
3232
+ }
3233
+ oe(n);
3234
+ },
3235
+ });
3236
+ } catch (e) {
3237
+ fe(o, 'htmx:swapError', i);
3238
+ oe(r);
3239
+ throw e;
3240
+ }
3241
+ };
3242
+ let t = Q.config.globalViewTransitions;
3243
+ if (x.hasOwnProperty('transition')) {
3244
+ t = x.transition;
3245
+ }
3246
+ if (
3247
+ t &&
3248
+ he(o, 'htmx:beforeTransition', i) &&
3249
+ typeof Promise !== 'undefined' &&
3250
+ document.startViewTransition
3251
+ ) {
3252
+ const v = new Promise(function (e, t) {
3253
+ n = e;
3254
+ r = t;
3255
+ });
3256
+ const w = e;
3257
+ e = function () {
3258
+ document.startViewTransition(function () {
3259
+ w();
3260
+ return v;
3261
+ });
3262
+ };
3263
+ }
3264
+ if (x.swapDelay > 0) {
3265
+ E().setTimeout(e, x.swapDelay);
3266
+ } else {
3267
+ e();
3268
+ }
3269
+ }
3270
+ if (f) {
3271
+ fe(
3272
+ o,
3273
+ 'htmx:responseError',
3274
+ ce(
3275
+ { error: 'Response Status Error Code ' + s.status + ' from ' + i.pathInfo.requestPath },
3276
+ i
3277
+ )
3278
+ );
3279
+ }
3280
+ }
3281
+ const Mn = {};
3282
+ function Xn() {
3283
+ return {
3284
+ init: function (e) {
3285
+ return null;
3286
+ },
3287
+ getSelectors: function () {
3288
+ return null;
3289
+ },
3290
+ onEvent: function (e, t) {
3291
+ return true;
3292
+ },
3293
+ transformResponse: function (e, t, n) {
3294
+ return e;
3295
+ },
3296
+ isInlineSwap: function (e) {
3297
+ return false;
3298
+ },
3299
+ handleSwap: function (e, t, n, r) {
3300
+ return false;
3301
+ },
3302
+ encodeParameters: function (e, t, n) {
3303
+ return null;
3304
+ },
3305
+ };
3306
+ }
3307
+ function Fn(e, t) {
3308
+ if (t.init) {
3309
+ t.init(n);
3310
+ }
3311
+ Mn[e] = ce(Xn(), t);
3312
+ }
3313
+ function Bn(e) {
3314
+ delete Mn[e];
3315
+ }
3316
+ function Un(e, n, r) {
3317
+ if (n == undefined) {
3318
+ n = [];
3319
+ }
3320
+ if (e == undefined) {
3321
+ return n;
3322
+ }
3323
+ if (r == undefined) {
3324
+ r = [];
3325
+ }
3326
+ const t = te(e, 'hx-ext');
3327
+ if (t) {
3328
+ se(t.split(','), function (e) {
3329
+ e = e.replace(/ /g, '');
3330
+ if (e.slice(0, 7) == 'ignore:') {
3331
+ r.push(e.slice(7));
3332
+ return;
3333
+ }
3334
+ if (r.indexOf(e) < 0) {
3335
+ const t = Mn[e];
3336
+ if (t && n.indexOf(t) < 0) {
3337
+ n.push(t);
3338
+ }
3339
+ }
3340
+ });
3341
+ }
3342
+ return Un(ue(c(e)), n, r);
3343
+ }
3344
+ var jn = false;
3345
+ ne().addEventListener('DOMContentLoaded', function () {
3346
+ jn = true;
3347
+ });
3348
+ function Vn(e) {
3349
+ if (jn || ne().readyState === 'complete') {
3350
+ e();
3351
+ } else {
3352
+ ne().addEventListener('DOMContentLoaded', e);
3353
+ }
3354
+ }
3355
+ function _n() {
3356
+ if (Q.config.includeIndicatorStyles !== false) {
3357
+ const e = Q.config.inlineStyleNonce ? ` nonce="${Q.config.inlineStyleNonce}"` : '';
3358
+ ne().head.insertAdjacentHTML(
3359
+ 'beforeend',
3360
+ '<style' +
3361
+ e +
3362
+ '> .' +
3363
+ Q.config.indicatorClass +
3364
+ '{opacity:0} .' +
3365
+ Q.config.requestClass +
3366
+ ' .' +
3367
+ Q.config.indicatorClass +
3368
+ '{opacity:1; transition: opacity 200ms ease-in;} .' +
3369
+ Q.config.requestClass +
3370
+ '.' +
3371
+ Q.config.indicatorClass +
3372
+ '{opacity:1; transition: opacity 200ms ease-in;} </style>'
3373
+ );
3374
+ }
3375
+ }
3376
+ function zn() {
3377
+ const e = ne().querySelector('meta[name="htmx-config"]');
3378
+ if (e) {
3379
+ return S(e.content);
3380
+ } else {
3381
+ return null;
3382
+ }
3383
+ }
3384
+ function $n() {
3385
+ const e = zn();
3386
+ if (e) {
3387
+ Q.config = ce(Q.config, e);
3388
+ }
3389
+ }
3390
+ Vn(function () {
3391
+ $n();
3392
+ _n();
3393
+ let e = ne().body;
3394
+ kt(e);
3395
+ const t = ne().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");
3396
+ e.addEventListener('htmx:abort', function (e) {
3397
+ const t = e.target;
3398
+ const n = ie(t);
3399
+ if (n && n.xhr) {
3400
+ n.xhr.abort();
3401
+ }
3402
+ });
3403
+ const n = window.onpopstate ? window.onpopstate.bind(window) : null;
3404
+ window.onpopstate = function (e) {
3405
+ if (e.state && e.state.htmx) {
3406
+ Wt();
3407
+ se(t, function (e) {
3408
+ he(e, 'htmx:restored', { document: ne(), triggerEvent: he });
3409
+ });
3410
+ } else {
3411
+ if (n) {
3412
+ n(e);
3413
+ }
3414
+ }
3415
+ };
3416
+ E().setTimeout(function () {
3417
+ he(e, 'htmx:load', {});
3418
+ e = null;
3419
+ }, 0);
3420
+ });
3421
+ return Q;
3422
+ })();