changeset 22 | 8c2e4d02f4ef |
parent 21 | 48c4eec2b7e6 |
21:48c4eec2b7e6 | 22:8c2e4d02f4ef |
---|---|
1 /******/ (() => { // webpackBootstrap |
1 /******/ (() => { // webpackBootstrap |
2 /******/ var __webpack_modules__ = ({ |
2 /******/ "use strict"; |
3 |
3 /******/ var __webpack_modules__ = ({}); |
4 /***/ 6007: |
|
5 /***/ ((module) => { |
|
6 |
|
7 // The scores are arranged so that a continuous match of characters will |
|
8 // result in a total score of 1. |
|
9 // |
|
10 // The best case, this character is a match, and either this is the start |
|
11 // of the string, or the previous character was also a match. |
|
12 var SCORE_CONTINUE_MATCH = 1, |
|
13 |
|
14 // A new match at the start of a word scores better than a new match |
|
15 // elsewhere as it's more likely that the user will type the starts |
|
16 // of fragments. |
|
17 // (Our notion of word includes CamelCase and hypen-separated, etc.) |
|
18 SCORE_WORD_JUMP = 0.9, |
|
19 |
|
20 // Any other match isn't ideal, but we include it for completeness. |
|
21 SCORE_CHARACTER_JUMP = 0.3, |
|
22 |
|
23 // If the user transposed two letters, it should be signficantly penalized. |
|
24 // |
|
25 // i.e. "ouch" is more likely than "curtain" when "uc" is typed. |
|
26 SCORE_TRANSPOSITION = 0.1, |
|
27 |
|
28 // If the user jumped to half-way through a subsequent word, it should be |
|
29 // very significantly penalized. |
|
30 // |
|
31 // i.e. "loes" is very unlikely to match "loch ness". |
|
32 // NOTE: this is set to 0 for superhuman right now, but we may want to revisit. |
|
33 SCORE_LONG_JUMP = 0, |
|
34 |
|
35 // The goodness of a match should decay slightly with each missing |
|
36 // character. |
|
37 // |
|
38 // i.e. "bad" is more likely than "bard" when "bd" is typed. |
|
39 // |
|
40 // This will not change the order of suggestions based on SCORE_* until |
|
41 // 100 characters are inserted between matches. |
|
42 PENALTY_SKIPPED = 0.999, |
|
43 |
|
44 // The goodness of an exact-case match should be higher than a |
|
45 // case-insensitive match by a small amount. |
|
46 // |
|
47 // i.e. "HTML" is more likely than "haml" when "HM" is typed. |
|
48 // |
|
49 // This will not change the order of suggestions based on SCORE_* until |
|
50 // 1000 characters are inserted between matches. |
|
51 PENALTY_CASE_MISMATCH = 0.9999, |
|
52 |
|
53 // If the word has more characters than the user typed, it should |
|
54 // be penalised slightly. |
|
55 // |
|
56 // i.e. "html" is more likely than "html5" if I type "html". |
|
57 // |
|
58 // However, it may well be the case that there's a sensible secondary |
|
59 // ordering (like alphabetical) that it makes sense to rely on when |
|
60 // there are many prefix matches, so we don't make the penalty increase |
|
61 // with the number of tokens. |
|
62 PENALTY_NOT_COMPLETE = 0.99; |
|
63 |
|
64 var IS_GAP_REGEXP = /[\\\/\-_+.# \t"@\[\(\{&]/, |
|
65 COUNT_GAPS_REGEXP = /[\\\/\-_+.# \t"@\[\(\{&]/g; |
|
66 |
|
67 function commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex) { |
|
68 |
|
69 if (abbreviationIndex === abbreviation.length) { |
|
70 if (stringIndex === string.length) { |
|
71 return SCORE_CONTINUE_MATCH; |
|
72 |
|
73 } |
|
74 return PENALTY_NOT_COMPLETE; |
|
75 } |
|
76 |
|
77 var abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex); |
|
78 var index = lowerString.indexOf(abbreviationChar, stringIndex); |
|
79 var highScore = 0; |
|
80 |
|
81 var score, transposedScore, wordBreaks; |
|
82 |
|
83 while (index >= 0) { |
|
84 |
|
85 score = commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, index + 1, abbreviationIndex + 1); |
|
86 if (score > highScore) { |
|
87 if (index === stringIndex) { |
|
88 score *= SCORE_CONTINUE_MATCH; |
|
89 } else if (IS_GAP_REGEXP.test(string.charAt(index - 1))) { |
|
90 score *= SCORE_WORD_JUMP; |
|
91 wordBreaks = string.slice(stringIndex, index - 1).match(COUNT_GAPS_REGEXP); |
|
92 if (wordBreaks && stringIndex > 0) { |
|
93 score *= Math.pow(PENALTY_SKIPPED, wordBreaks.length); |
|
94 } |
|
95 } else if (IS_GAP_REGEXP.test(string.slice(stringIndex, index - 1))) { |
|
96 score *= SCORE_LONG_JUMP; |
|
97 if (stringIndex > 0) { |
|
98 score *= Math.pow(PENALTY_SKIPPED, index - stringIndex); |
|
99 } |
|
100 } else { |
|
101 score *= SCORE_CHARACTER_JUMP; |
|
102 if (stringIndex > 0) { |
|
103 score *= Math.pow(PENALTY_SKIPPED, index - stringIndex); |
|
104 } |
|
105 } |
|
106 |
|
107 if (string.charAt(index) !== abbreviation.charAt(abbreviationIndex)) { |
|
108 score *= PENALTY_CASE_MISMATCH; |
|
109 } |
|
110 |
|
111 } |
|
112 |
|
113 if (score < SCORE_TRANSPOSITION && |
|
114 lowerString.charAt(index - 1) === lowerAbbreviation.charAt(abbreviationIndex + 1) && |
|
115 lowerString.charAt(index - 1) !== lowerAbbreviation.charAt(abbreviationIndex)) { |
|
116 transposedScore = commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, index + 1, abbreviationIndex + 2); |
|
117 |
|
118 if (transposedScore * SCORE_TRANSPOSITION > score) { |
|
119 score = transposedScore * SCORE_TRANSPOSITION; |
|
120 } |
|
121 } |
|
122 |
|
123 if (score > highScore) { |
|
124 highScore = score; |
|
125 } |
|
126 |
|
127 index = lowerString.indexOf(abbreviationChar, index + 1); |
|
128 } |
|
129 |
|
130 return highScore; |
|
131 } |
|
132 |
|
133 function commandScore(string, abbreviation) { |
|
134 /* NOTE: |
|
135 * in the original, we used to do the lower-casing on each recursive call, but this meant that toLowerCase() |
|
136 * was the dominating cost in the algorithm, passing both is a little ugly, but considerably faster. |
|
137 */ |
|
138 return commandScoreInner(string, abbreviation, string.toLowerCase(), abbreviation.toLowerCase(), 0, 0); |
|
139 } |
|
140 |
|
141 module.exports = commandScore; |
|
142 |
|
143 |
|
144 /***/ }) |
|
145 |
|
146 /******/ }); |
|
147 /************************************************************************/ |
4 /************************************************************************/ |
148 /******/ // The module cache |
5 /******/ // The module cache |
149 /******/ var __webpack_module_cache__ = {}; |
6 /******/ var __webpack_module_cache__ = {}; |
150 /******/ |
7 /******/ |
151 /******/ // The require function |
8 /******/ // The require function |
168 /******/ // Return the exports of the module |
25 /******/ // Return the exports of the module |
169 /******/ return module.exports; |
26 /******/ return module.exports; |
170 /******/ } |
27 /******/ } |
171 /******/ |
28 /******/ |
172 /************************************************************************/ |
29 /************************************************************************/ |
173 /******/ /* webpack/runtime/compat get default export */ |
30 /******/ /* webpack/runtime/create fake namespace object */ |
174 /******/ (() => { |
31 /******/ (() => { |
175 /******/ // getDefaultExport function for compatibility with non-harmony modules |
32 /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); |
176 /******/ __webpack_require__.n = (module) => { |
33 /******/ var leafPrototypes; |
177 /******/ var getter = module && module.__esModule ? |
34 /******/ // create a fake namespace object |
178 /******/ () => (module['default']) : |
35 /******/ // mode & 1: value is a module id, require it |
179 /******/ () => (module); |
36 /******/ // mode & 2: merge all properties of value into the ns |
180 /******/ __webpack_require__.d(getter, { a: getter }); |
37 /******/ // mode & 4: return value when already ns object |
181 /******/ return getter; |
38 /******/ // mode & 16: return value when it's Promise-like |
39 /******/ // mode & 8|1: behave like require |
|
40 /******/ __webpack_require__.t = function(value, mode) { |
|
41 /******/ if(mode & 1) value = this(value); |
|
42 /******/ if(mode & 8) return value; |
|
43 /******/ if(typeof value === 'object' && value) { |
|
44 /******/ if((mode & 4) && value.__esModule) return value; |
|
45 /******/ if((mode & 16) && typeof value.then === 'function') return value; |
|
46 /******/ } |
|
47 /******/ var ns = Object.create(null); |
|
48 /******/ __webpack_require__.r(ns); |
|
49 /******/ var def = {}; |
|
50 /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; |
|
51 /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { |
|
52 /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); |
|
53 /******/ } |
|
54 /******/ def['default'] = () => (value); |
|
55 /******/ __webpack_require__.d(ns, def); |
|
56 /******/ return ns; |
|
182 /******/ }; |
57 /******/ }; |
183 /******/ })(); |
58 /******/ })(); |
184 /******/ |
59 /******/ |
185 /******/ /* webpack/runtime/define property getters */ |
60 /******/ /* webpack/runtime/define property getters */ |
186 /******/ (() => { |
61 /******/ (() => { |
215 /******/ __webpack_require__.nc = undefined; |
90 /******/ __webpack_require__.nc = undefined; |
216 /******/ })(); |
91 /******/ })(); |
217 /******/ |
92 /******/ |
218 /************************************************************************/ |
93 /************************************************************************/ |
219 var __webpack_exports__ = {}; |
94 var __webpack_exports__ = {}; |
220 // This entry need to be wrapped in an IIFE because it need to be in strict mode. |
|
221 (() => { |
|
222 "use strict"; |
|
223 // ESM COMPAT FLAG |
95 // ESM COMPAT FLAG |
224 __webpack_require__.r(__webpack_exports__); |
96 __webpack_require__.r(__webpack_exports__); |
225 |
97 |
226 // EXPORTS |
98 // EXPORTS |
227 __webpack_require__.d(__webpack_exports__, { |
99 __webpack_require__.d(__webpack_exports__, { |
259 __webpack_require__.r(private_actions_namespaceObject); |
131 __webpack_require__.r(private_actions_namespaceObject); |
260 __webpack_require__.d(private_actions_namespaceObject, { |
132 __webpack_require__.d(private_actions_namespaceObject, { |
261 setContext: () => (setContext) |
133 setContext: () => (setContext) |
262 }); |
134 }); |
263 |
135 |
264 ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
136 ;// ./node_modules/cmdk/dist/chunk-NZJY6EH4.mjs |
137 var U=1,Y=.9,H=.8,J=.17,p=.1,u=.999,$=.9999;var k=.99,m=/[\\\/_+.#"@\[\(\{&]/,B=/[\\\/_+.#"@\[\(\{&]/g,K=/[\s-]/,X=/[\s-]/g;function G(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U:k;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U:m.test(_.charAt(c-1))?(E*=H,R=_.slice(A,c-1).match(B),R&&A>0&&(E*=Math.pow(u,R.length))):K.test(_.charAt(c-1))?(E*=Y,M=_.slice(A,c-1).match(X),M&&A>0&&(E*=Math.pow(u,M.length))):(E*=J,A>0&&(E*=Math.pow(u,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$)),(E<p&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G(_,C,h,P,c+1,f+2,O),N*p>E&&(E=N*p)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X," ")}function W(_,C,h){return _=h&&h.length>0?`${_+" "+h.join(" ")}`:_,G(_,C,D(_),D(C),0,0,{})} |
|
138 |
|
139 ;// ./node_modules/@babel/runtime/helpers/esm/extends.js |
|
265 function _extends() { |
140 function _extends() { |
266 _extends = Object.assign ? Object.assign.bind() : function (target) { |
141 return _extends = Object.assign ? Object.assign.bind() : function (n) { |
267 for (var i = 1; i < arguments.length; i++) { |
142 for (var e = 1; e < arguments.length; e++) { |
268 var source = arguments[i]; |
143 var t = arguments[e]; |
269 for (var key in source) { |
144 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); |
270 if (Object.prototype.hasOwnProperty.call(source, key)) { |
|
271 target[key] = source[key]; |
|
272 } |
|
273 } |
|
274 } |
145 } |
275 return target; |
146 return n; |
276 }; |
147 }, _extends.apply(null, arguments); |
277 return _extends.apply(this, arguments); |
148 } |
278 } |
149 |
279 ;// CONCATENATED MODULE: external "React" |
150 ;// external "React" |
280 const external_React_namespaceObject = window["React"]; |
151 const external_React_namespaceObject = window["React"]; |
281 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/primitive/dist/index.module.js |
152 var external_React_namespaceObject_0 = /*#__PURE__*/__webpack_require__.t(external_React_namespaceObject, 2); |
153 ;// ./node_modules/@radix-ui/primitive/dist/index.mjs |
|
282 function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) { |
154 function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) { |
283 return function handleEvent(event) { |
155 return function handleEvent(event) { |
284 originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event); |
156 originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event); |
285 if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event); |
157 if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event); |
286 }; |
158 }; |
288 |
160 |
289 |
161 |
290 |
162 |
291 |
163 |
292 |
164 |
293 |
165 ;// ./node_modules/@radix-ui/react-compose-refs/dist/index.mjs |
294 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-compose-refs/dist/index.module.js |
|
295 |
166 |
296 |
167 |
297 |
168 |
298 /** |
169 /** |
299 * Set a given ref to a given value |
170 * Set a given ref to a given value |
320 |
191 |
321 |
192 |
322 |
193 |
323 |
194 |
324 |
195 |
325 |
196 ;// ./node_modules/@radix-ui/react-context/dist/index.mjs |
326 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-context/dist/index.module.js |
|
327 |
197 |
328 |
198 |
329 |
199 |
330 function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) { |
200 function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) { |
331 const Context = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext); |
201 const Context = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext); |
449 |
319 |
450 |
320 |
451 |
321 |
452 |
322 |
453 |
323 |
454 |
324 ;// ./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs |
455 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js |
|
456 |
325 |
457 |
326 |
458 |
327 |
459 /** |
328 /** |
460 * On the server, React emits a warning when calling `useLayoutEffect`. |
329 * On the server, React emits a warning when calling `useLayoutEffect`. |
466 |
335 |
467 |
336 |
468 |
337 |
469 |
338 |
470 |
339 |
471 |
340 ;// ./node_modules/@radix-ui/react-id/dist/index.mjs |
472 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-id/dist/index.module.js |
341 |
473 |
342 |
474 |
343 |
475 |
344 |
476 |
345 |
477 |
346 const $1746a345f3d73bb7$var$useReactId = external_React_namespaceObject_0['useId'.toString()] || (()=>undefined |
478 const $1746a345f3d73bb7$var$useReactId = external_React_namespaceObject['useId'.toString()] || (()=>undefined |
|
479 ); |
347 ); |
480 let $1746a345f3d73bb7$var$count = 0; |
348 let $1746a345f3d73bb7$var$count = 0; |
481 function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) { |
349 function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) { |
482 const [id, setId] = external_React_namespaceObject.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only. |
350 const [id, setId] = external_React_namespaceObject.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only. |
483 $9f79659886946c16$export$e5c5a5f917a5871c(()=>{ |
351 $9f79659886946c16$export$e5c5a5f917a5871c(()=>{ |
491 |
359 |
492 |
360 |
493 |
361 |
494 |
362 |
495 |
363 |
496 |
364 ;// ./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs |
497 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js |
|
498 |
365 |
499 |
366 |
500 |
367 |
501 /** |
368 /** |
502 * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a |
369 * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a |
515 |
382 |
516 |
383 |
517 |
384 |
518 |
385 |
519 |
386 |
520 |
387 ;// ./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs |
521 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js |
|
522 |
388 |
523 |
389 |
524 |
390 |
525 |
391 |
526 |
392 |
569 |
435 |
570 |
436 |
571 |
437 |
572 |
438 |
573 |
439 |
574 |
440 ;// external "ReactDOM" |
575 ;// CONCATENATED MODULE: external "ReactDOM" |
|
576 const external_ReactDOM_namespaceObject = window["ReactDOM"]; |
441 const external_ReactDOM_namespaceObject = window["ReactDOM"]; |
577 var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_namespaceObject); |
442 ;// ./node_modules/@radix-ui/react-slot/dist/index.mjs |
578 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.module.js |
|
579 |
443 |
580 |
444 |
581 |
445 |
582 |
446 |
583 |
447 |
613 * SlotClone |
477 * SlotClone |
614 * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
478 * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
615 const { children: children , ...slotProps } = props; |
479 const { children: children , ...slotProps } = props; |
616 if (/*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(children)) return /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(children, { |
480 if (/*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(children)) return /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(children, { |
617 ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props), |
481 ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props), |
618 ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) |
482 ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref |
619 }); |
483 }); |
620 return external_React_namespaceObject.Children.count(children) > 1 ? external_React_namespaceObject.Children.only(null) : null; |
484 return external_React_namespaceObject.Children.count(children) > 1 ? external_React_namespaceObject.Children.only(null) : null; |
621 }); |
485 }); |
622 $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone'; |
486 $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone'; |
623 /* ------------------------------------------------------------------------------------------------- |
487 /* ------------------------------------------------------------------------------------------------- |
634 ...childProps |
498 ...childProps |
635 }; |
499 }; |
636 for(const propName in childProps){ |
500 for(const propName in childProps){ |
637 const slotPropValue = slotProps[propName]; |
501 const slotPropValue = slotProps[propName]; |
638 const childPropValue = childProps[propName]; |
502 const childPropValue = childProps[propName]; |
639 const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler |
503 const isHandler = /^on[A-Z]/.test(propName); |
640 if (isHandler) overrideProps[propName] = (...args)=>{ |
504 if (isHandler) { |
641 childPropValue === null || childPropValue === void 0 || childPropValue(...args); |
505 // if the handler exists on both, we compose them |
642 slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args); |
506 if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{ |
643 }; |
507 childPropValue(...args); |
644 else if (propName === 'style') overrideProps[propName] = { |
508 slotPropValue(...args); |
509 }; |
|
510 else if (slotPropValue) overrideProps[propName] = slotPropValue; |
|
511 } else if (propName === 'style') overrideProps[propName] = { |
|
645 ...slotPropValue, |
512 ...slotPropValue, |
646 ...childPropValue |
513 ...childPropValue |
647 }; |
514 }; |
648 else if (propName === 'className') overrideProps[propName] = [ |
515 else if (propName === 'className') overrideProps[propName] = [ |
649 slotPropValue, |
516 slotPropValue, |
659 |
526 |
660 |
527 |
661 |
528 |
662 |
529 |
663 |
530 |
664 |
531 ;// ./node_modules/@radix-ui/react-primitive/dist/index.mjs |
665 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.module.js |
|
666 |
532 |
667 |
533 |
668 |
534 |
669 |
535 |
670 |
536 |
674 |
540 |
675 const $8927f6f2acc4f386$var$NODES = [ |
541 const $8927f6f2acc4f386$var$NODES = [ |
676 'a', |
542 'a', |
677 'button', |
543 'button', |
678 'div', |
544 'div', |
545 'form', |
|
679 'h2', |
546 'h2', |
680 'h3', |
547 'h3', |
681 'img', |
548 'img', |
549 'input', |
|
550 'label', |
|
682 'li', |
551 'li', |
683 'nav', |
552 'nav', |
684 'ol', |
553 'ol', |
685 'p', |
554 'p', |
686 'span', |
555 'span', |
753 |
622 |
754 |
623 |
755 |
624 |
756 |
625 |
757 |
626 |
758 |
627 ;// ./node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs |
759 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js |
|
760 |
628 |
761 |
629 |
762 |
630 |
763 |
631 |
764 |
632 |
765 /** |
633 /** |
766 * Listens for when the escape key is down |
634 * Listens for when the escape key is down |
767 */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp) { |
635 */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { |
768 const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp); |
636 const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp); |
769 (0,external_React_namespaceObject.useEffect)(()=>{ |
637 (0,external_React_namespaceObject.useEffect)(()=>{ |
770 const handleKeyDown = (event)=>{ |
638 const handleKeyDown = (event)=>{ |
771 if (event.key === 'Escape') onEscapeKeyDown(event); |
639 if (event.key === 'Escape') onEscapeKeyDown(event); |
772 }; |
640 }; |
773 document.addEventListener('keydown', handleKeyDown); |
641 ownerDocument.addEventListener('keydown', handleKeyDown); |
774 return ()=>document.removeEventListener('keydown', handleKeyDown) |
642 return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown) |
775 ; |
643 ; |
776 }, [ |
644 }, [ |
777 onEscapeKeyDown |
645 onEscapeKeyDown, |
646 ownerDocument |
|
778 ]); |
647 ]); |
779 } |
648 } |
780 |
649 |
781 |
650 |
782 |
651 |
783 |
652 |
784 |
653 |
785 |
654 ;// ./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs |
786 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js |
|
787 |
655 |
788 |
656 |
789 |
657 |
790 |
658 |
791 |
659 |
810 layers: new Set(), |
678 layers: new Set(), |
811 layersWithOutsidePointerEventsDisabled: new Set(), |
679 layersWithOutsidePointerEventsDisabled: new Set(), |
812 branches: new Set() |
680 branches: new Set() |
813 }); |
681 }); |
814 const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
682 const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
683 var _node$ownerDocument; |
|
815 const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props; |
684 const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props; |
816 const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext); |
685 const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext); |
817 const [node1, setNode] = (0,external_React_namespaceObject.useState)(null); |
686 const [node1, setNode] = (0,external_React_namespaceObject.useState)(null); |
687 const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document; |
|
818 const [, force] = (0,external_React_namespaceObject.useState)({}); |
688 const [, force] = (0,external_React_namespaceObject.useState)({}); |
819 const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node) |
689 const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node) |
820 ); |
690 ); |
821 const layers = Array.from(context.layers); |
691 const layers = Array.from(context.layers); |
822 const [highestLayerWithOutsidePointerEventsDisabled] = [ |
692 const [highestLayerWithOutsidePointerEventsDisabled] = [ |
834 ); |
704 ); |
835 if (!isPointerEventsEnabled || isPointerDownOnBranch) return; |
705 if (!isPointerEventsEnabled || isPointerDownOnBranch) return; |
836 onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event); |
706 onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event); |
837 onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event); |
707 onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event); |
838 if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss(); |
708 if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss(); |
839 }); |
709 }, ownerDocument); |
840 const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{ |
710 const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{ |
841 const target = event.target; |
711 const target = event.target; |
842 const isFocusInBranch = [ |
712 const isFocusInBranch = [ |
843 ...context.branches |
713 ...context.branches |
844 ].some((branch)=>branch.contains(target) |
714 ].some((branch)=>branch.contains(target) |
845 ); |
715 ); |
846 if (isFocusInBranch) return; |
716 if (isFocusInBranch) return; |
847 onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event); |
717 onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event); |
848 onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event); |
718 onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event); |
849 if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss(); |
719 if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss(); |
850 }); |
720 }, ownerDocument); |
851 $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{ |
721 $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{ |
852 const isHighestLayer = index === context.layers.size - 1; |
722 const isHighestLayer = index === context.layers.size - 1; |
853 if (!isHighestLayer) return; |
723 if (!isHighestLayer) return; |
854 onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event); |
724 onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event); |
855 if (!event.defaultPrevented && onDismiss) { |
725 if (!event.defaultPrevented && onDismiss) { |
856 event.preventDefault(); |
726 event.preventDefault(); |
857 onDismiss(); |
727 onDismiss(); |
858 } |
728 } |
859 }); |
729 }, ownerDocument); |
860 (0,external_React_namespaceObject.useEffect)(()=>{ |
730 (0,external_React_namespaceObject.useEffect)(()=>{ |
861 if (!node1) return; |
731 if (!node1) return; |
862 if (disableOutsidePointerEvents) { |
732 if (disableOutsidePointerEvents) { |
863 if (context.layersWithOutsidePointerEventsDisabled.size === 0) { |
733 if (context.layersWithOutsidePointerEventsDisabled.size === 0) { |
864 $5cb92bef7577960e$var$originalBodyPointerEvents = document.body.style.pointerEvents; |
734 $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents; |
865 document.body.style.pointerEvents = 'none'; |
735 ownerDocument.body.style.pointerEvents = 'none'; |
866 } |
736 } |
867 context.layersWithOutsidePointerEventsDisabled.add(node1); |
737 context.layersWithOutsidePointerEventsDisabled.add(node1); |
868 } |
738 } |
869 context.layers.add(node1); |
739 context.layers.add(node1); |
870 $5cb92bef7577960e$var$dispatchUpdate(); |
740 $5cb92bef7577960e$var$dispatchUpdate(); |
871 return ()=>{ |
741 return ()=>{ |
872 if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) document.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents; |
742 if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents; |
873 }; |
743 }; |
874 }, [ |
744 }, [ |
875 node1, |
745 node1, |
746 ownerDocument, |
|
876 disableOutsidePointerEvents, |
747 disableOutsidePointerEvents, |
877 context |
748 context |
878 ]); |
749 ]); |
879 /** |
750 /** |
880 * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect |
751 * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect |
940 }); |
811 }); |
941 /* -----------------------------------------------------------------------------------------------*/ /** |
812 /* -----------------------------------------------------------------------------------------------*/ /** |
942 * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup` |
813 * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup` |
943 * to mimic layer dismissing behaviour present in OS. |
814 * to mimic layer dismissing behaviour present in OS. |
944 * Returns props to pass to the node we want to check for outside events. |
815 * Returns props to pass to the node we want to check for outside events. |
945 */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) { |
816 */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { |
946 const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside); |
817 const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside); |
947 const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false); |
818 const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false); |
948 const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{}); |
819 const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{}); |
949 (0,external_React_namespaceObject.useEffect)(()=>{ |
820 (0,external_React_namespaceObject.useEffect)(()=>{ |
950 const handlePointerDown = (event)=>{ |
821 const handlePointerDown = (event)=>{ |
967 * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc. |
838 * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc. |
968 * |
839 * |
969 * This is why we also continuously remove the previous listener, because we cannot be |
840 * This is why we also continuously remove the previous listener, because we cannot be |
970 * certain that it was raised, and therefore cleaned-up. |
841 * certain that it was raised, and therefore cleaned-up. |
971 */ if (event.pointerType === 'touch') { |
842 */ if (event.pointerType === 'touch') { |
972 document.removeEventListener('click', handleClickRef.current); |
843 ownerDocument.removeEventListener('click', handleClickRef.current); |
973 handleClickRef.current = handleAndDispatchPointerDownOutsideEvent; |
844 handleClickRef.current = handleAndDispatchPointerDownOutsideEvent; |
974 document.addEventListener('click', handleClickRef.current, { |
845 ownerDocument.addEventListener('click', handleClickRef.current, { |
975 once: true |
846 once: true |
976 }); |
847 }); |
977 } else handleAndDispatchPointerDownOutsideEvent(); |
848 } else handleAndDispatchPointerDownOutsideEvent(); |
978 } |
849 } else // We need to remove the event listener in case the outside click has been canceled. |
850 // See: https://github.com/radix-ui/primitives/issues/2171 |
|
851 ownerDocument.removeEventListener('click', handleClickRef.current); |
|
979 isPointerInsideReactTreeRef.current = false; |
852 isPointerInsideReactTreeRef.current = false; |
980 }; |
853 }; |
981 /** |
854 /** |
982 * if this hook executes in a component that mounts via a `pointerdown` event, the event |
855 * if this hook executes in a component that mounts via a `pointerdown` event, the event |
983 * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid |
856 * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid |
989 * document.addEventListener('pointerdown', () => { |
862 * document.addEventListener('pointerdown', () => { |
990 * console.log('I will also log'); |
863 * console.log('I will also log'); |
991 * }) |
864 * }) |
992 * }); |
865 * }); |
993 */ const timerId = window.setTimeout(()=>{ |
866 */ const timerId = window.setTimeout(()=>{ |
994 document.addEventListener('pointerdown', handlePointerDown); |
867 ownerDocument.addEventListener('pointerdown', handlePointerDown); |
995 }, 0); |
868 }, 0); |
996 return ()=>{ |
869 return ()=>{ |
997 window.clearTimeout(timerId); |
870 window.clearTimeout(timerId); |
998 document.removeEventListener('pointerdown', handlePointerDown); |
871 ownerDocument.removeEventListener('pointerdown', handlePointerDown); |
999 document.removeEventListener('click', handleClickRef.current); |
872 ownerDocument.removeEventListener('click', handleClickRef.current); |
1000 }; |
873 }; |
1001 }, [ |
874 }, [ |
875 ownerDocument, |
|
1002 handlePointerDownOutside |
876 handlePointerDownOutside |
1003 ]); |
877 ]); |
1004 return { |
878 return { |
1005 // ensures we check React component tree (not just DOM tree) |
879 // ensures we check React component tree (not just DOM tree) |
1006 onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true |
880 onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true |
1007 }; |
881 }; |
1008 } |
882 } |
1009 /** |
883 /** |
1010 * Listens for when focus happens outside a react subtree. |
884 * Listens for when focus happens outside a react subtree. |
1011 * Returns props to pass to the root (node) of the subtree we want to check. |
885 * Returns props to pass to the root (node) of the subtree we want to check. |
1012 */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside) { |
886 */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) { |
1013 const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside); |
887 const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside); |
1014 const isFocusInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false); |
888 const isFocusInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false); |
1015 (0,external_React_namespaceObject.useEffect)(()=>{ |
889 (0,external_React_namespaceObject.useEffect)(()=>{ |
1016 const handleFocus = (event)=>{ |
890 const handleFocus = (event)=>{ |
1017 if (event.target && !isFocusInsideReactTreeRef.current) { |
891 if (event.target && !isFocusInsideReactTreeRef.current) { |
1021 $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { |
895 $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { |
1022 discrete: false |
896 discrete: false |
1023 }); |
897 }); |
1024 } |
898 } |
1025 }; |
899 }; |
1026 document.addEventListener('focusin', handleFocus); |
900 ownerDocument.addEventListener('focusin', handleFocus); |
1027 return ()=>document.removeEventListener('focusin', handleFocus) |
901 return ()=>ownerDocument.removeEventListener('focusin', handleFocus) |
1028 ; |
902 ; |
1029 }, [ |
903 }, [ |
904 ownerDocument, |
|
1030 handleFocusOutside |
905 handleFocusOutside |
1031 ]); |
906 ]); |
1032 return { |
907 return { |
1033 onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true |
908 onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true |
1034 , |
909 , |
1057 |
932 |
1058 |
933 |
1059 |
934 |
1060 |
935 |
1061 |
936 |
1062 |
937 ;// ./node_modules/@radix-ui/react-focus-scope/dist/index.mjs |
1063 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.module.js |
|
1064 |
938 |
1065 |
939 |
1066 |
940 |
1067 |
941 |
1068 |
942 |
1108 select: true |
982 select: true |
1109 }); |
983 }); |
1110 } |
984 } |
1111 function handleFocusOut(event) { |
985 function handleFocusOut(event) { |
1112 if (focusScope.paused || !container1) return; |
986 if (focusScope.paused || !container1) return; |
1113 if (!container1.contains(event.relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, { |
987 const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases: |
988 // |
|
989 // 1. When the user switches app/tabs/windows/the browser itself loses focus. |
|
990 // 2. In Google Chrome, when the focused element is removed from the DOM. |
|
991 // |
|
992 // We let the browser do its thing here because: |
|
993 // |
|
994 // 1. The browser already keeps a memory of what's focused for when the page gets refocused. |
|
995 // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it |
|
996 // throws the CPU to 100%, so we avoid doing anything for this reason here too. |
|
997 if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`) |
|
998 // that is outside the container, we move focus to the last valid focused element inside. |
|
999 if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, { |
|
1114 select: true |
1000 select: true |
1115 }); |
1001 }); |
1002 } // When the focused element gets removed from the DOM, browsers move focus |
|
1003 // back to the document.body. In this case, we move focus to the container |
|
1004 // to keep focus trapped correctly. |
|
1005 function handleMutations(mutations) { |
|
1006 const focusedElement = document.activeElement; |
|
1007 if (focusedElement !== document.body) return; |
|
1008 for (const mutation of mutations)if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1); |
|
1116 } |
1009 } |
1117 document.addEventListener('focusin', handleFocusIn); |
1010 document.addEventListener('focusin', handleFocusIn); |
1118 document.addEventListener('focusout', handleFocusOut); |
1011 document.addEventListener('focusout', handleFocusOut); |
1012 const mutationObserver = new MutationObserver(handleMutations); |
|
1013 if (container1) mutationObserver.observe(container1, { |
|
1014 childList: true, |
|
1015 subtree: true |
|
1016 }); |
|
1119 return ()=>{ |
1017 return ()=>{ |
1120 document.removeEventListener('focusin', handleFocusIn); |
1018 document.removeEventListener('focusin', handleFocusIn); |
1121 document.removeEventListener('focusout', handleFocusOut); |
1019 document.removeEventListener('focusout', handleFocusOut); |
1020 mutationObserver.disconnect(); |
|
1122 }; |
1021 }; |
1123 } |
1022 } |
1124 }, [ |
1023 }, [ |
1125 trapped, |
1024 trapped, |
1126 container1, |
1025 container1, |
1325 |
1224 |
1326 |
1225 |
1327 |
1226 |
1328 |
1227 |
1329 |
1228 |
1330 |
1229 ;// ./node_modules/@radix-ui/react-portal/dist/index.mjs |
1331 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.module.js |
|
1332 |
1230 |
1333 |
1231 |
1334 |
1232 |
1335 |
1233 |
1336 |
1234 |
1342 * Portal |
1240 * Portal |
1343 * -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$var$PORTAL_NAME = 'Portal'; |
1241 * -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$var$PORTAL_NAME = 'Portal'; |
1344 const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
1242 const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
1345 var _globalThis$document; |
1243 var _globalThis$document; |
1346 const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props; |
1244 const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props; |
1347 return container ? /*#__PURE__*/ external_ReactDOM_default().createPortal(/*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, { |
1245 return container ? /*#__PURE__*/ external_ReactDOM_namespaceObject.createPortal(/*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, { |
1348 ref: forwardedRef |
1246 ref: forwardedRef |
1349 })), container) : null; |
1247 })), container) : null; |
1350 }); |
1248 }); |
1351 /*#__PURE__*/ Object.assign($f1701beae083dbae$export$602eac185826482c, { |
1249 /*#__PURE__*/ Object.assign($f1701beae083dbae$export$602eac185826482c, { |
1352 displayName: $f1701beae083dbae$var$PORTAL_NAME |
1250 displayName: $f1701beae083dbae$var$PORTAL_NAME |
1355 |
1253 |
1356 |
1254 |
1357 |
1255 |
1358 |
1256 |
1359 |
1257 |
1360 |
1258 ;// ./node_modules/@radix-ui/react-presence/dist/index.mjs |
1361 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-presence/dist/index.module.js |
|
1362 |
1259 |
1363 |
1260 |
1364 |
1261 |
1365 |
1262 |
1366 |
1263 |
1495 |
1392 |
1496 |
1393 |
1497 |
1394 |
1498 |
1395 |
1499 |
1396 |
1500 |
1397 ;// ./node_modules/@radix-ui/react-focus-guards/dist/index.mjs |
1501 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-focus-guards/dist/index.module.js |
|
1502 |
1398 |
1503 |
1399 |
1504 |
1400 |
1505 /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0; |
1401 /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0; |
1506 function $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) { |
1402 function $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) { |
1535 |
1431 |
1536 |
1432 |
1537 |
1433 |
1538 |
1434 |
1539 |
1435 |
1540 |
1436 ;// ./node_modules/tslib/tslib.es6.mjs |
1541 ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs |
|
1542 /****************************************************************************** |
1437 /****************************************************************************** |
1543 Copyright (c) Microsoft Corporation. |
1438 Copyright (c) Microsoft Corporation. |
1544 |
1439 |
1545 Permission to use, copy, modify, and/or distribute this software for any |
1440 Permission to use, copy, modify, and/or distribute this software for any |
1546 purpose with or without fee is hereby granted. |
1441 purpose with or without fee is hereby granted. |
1551 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
1446 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
1552 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
1447 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
1553 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
1448 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
1554 PERFORMANCE OF THIS SOFTWARE. |
1449 PERFORMANCE OF THIS SOFTWARE. |
1555 ***************************************************************************** */ |
1450 ***************************************************************************** */ |
1556 /* global Reflect, Promise, SuppressedError, Symbol */ |
1451 /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ |
1557 |
1452 |
1558 var extendStatics = function(d, b) { |
1453 var extendStatics = function(d, b) { |
1559 extendStatics = Object.setPrototypeOf || |
1454 extendStatics = Object.setPrototypeOf || |
1560 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
1455 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
1561 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
1456 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
1662 step((generator = generator.apply(thisArg, _arguments || [])).next()); |
1557 step((generator = generator.apply(thisArg, _arguments || [])).next()); |
1663 }); |
1558 }); |
1664 } |
1559 } |
1665 |
1560 |
1666 function __generator(thisArg, body) { |
1561 function __generator(thisArg, body) { |
1667 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; |
1562 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); |
1668 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
1563 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
1669 function verb(n) { return function (v) { return step([n, v]); }; } |
1564 function verb(n) { return function (v) { return step([n, v]); }; } |
1670 function step(op) { |
1565 function step(op) { |
1671 if (f) throw new TypeError("Generator is already executing."); |
1566 if (f) throw new TypeError("Generator is already executing."); |
1672 while (g && (g = 0, op[0] && (_ = 0)), _) try { |
1567 while (g && (g = 0, op[0] && (_ = 0)), _) try { |
1673 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
1568 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
1767 } |
1662 } |
1768 |
1663 |
1769 function __asyncGenerator(thisArg, _arguments, generator) { |
1664 function __asyncGenerator(thisArg, _arguments, generator) { |
1770 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
1665 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
1771 var g = generator.apply(thisArg, _arguments || []), i, q = []; |
1666 var g = generator.apply(thisArg, _arguments || []), i, q = []; |
1772 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |
1667 return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; |
1773 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } |
1668 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } |
1669 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } |
|
1774 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
1670 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
1775 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
1671 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
1776 function fulfill(value) { resume("next", value); } |
1672 function fulfill(value) { resume("next", value); } |
1777 function reject(value) { resume("throw", value); } |
1673 function reject(value) { resume("throw", value); } |
1778 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
1674 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
1801 Object.defineProperty(o, "default", { enumerable: true, value: v }); |
1697 Object.defineProperty(o, "default", { enumerable: true, value: v }); |
1802 }) : function(o, v) { |
1698 }) : function(o, v) { |
1803 o["default"] = v; |
1699 o["default"] = v; |
1804 }; |
1700 }; |
1805 |
1701 |
1702 var ownKeys = function(o) { |
|
1703 ownKeys = Object.getOwnPropertyNames || function (o) { |
|
1704 var ar = []; |
|
1705 for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; |
|
1706 return ar; |
|
1707 }; |
|
1708 return ownKeys(o); |
|
1709 }; |
|
1710 |
|
1806 function __importStar(mod) { |
1711 function __importStar(mod) { |
1807 if (mod && mod.__esModule) return mod; |
1712 if (mod && mod.__esModule) return mod; |
1808 var result = {}; |
1713 var result = {}; |
1809 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); |
1714 if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); |
1810 __setModuleDefault(result, mod); |
1715 __setModuleDefault(result, mod); |
1811 return result; |
1716 return result; |
1812 } |
1717 } |
1813 |
1718 |
1814 function __importDefault(mod) { |
1719 function __importDefault(mod) { |
1834 } |
1739 } |
1835 |
1740 |
1836 function __addDisposableResource(env, value, async) { |
1741 function __addDisposableResource(env, value, async) { |
1837 if (value !== null && value !== void 0) { |
1742 if (value !== null && value !== void 0) { |
1838 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); |
1743 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); |
1839 var dispose; |
1744 var dispose, inner; |
1840 if (async) { |
1745 if (async) { |
1841 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); |
1746 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); |
1842 dispose = value[Symbol.asyncDispose]; |
1747 dispose = value[Symbol.asyncDispose]; |
1843 } |
1748 } |
1844 if (dispose === void 0) { |
1749 if (dispose === void 0) { |
1845 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); |
1750 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); |
1846 dispose = value[Symbol.dispose]; |
1751 dispose = value[Symbol.dispose]; |
1752 if (async) inner = dispose; |
|
1847 } |
1753 } |
1848 if (typeof dispose !== "function") throw new TypeError("Object not disposable."); |
1754 if (typeof dispose !== "function") throw new TypeError("Object not disposable."); |
1755 if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; |
|
1849 env.stack.push({ value: value, dispose: dispose, async: async }); |
1756 env.stack.push({ value: value, dispose: dispose, async: async }); |
1850 } |
1757 } |
1851 else if (async) { |
1758 else if (async) { |
1852 env.stack.push({ async: true }); |
1759 env.stack.push({ async: true }); |
1853 } |
1760 } |
1862 function __disposeResources(env) { |
1769 function __disposeResources(env) { |
1863 function fail(e) { |
1770 function fail(e) { |
1864 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; |
1771 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; |
1865 env.hasError = true; |
1772 env.hasError = true; |
1866 } |
1773 } |
1774 var r, s = 0; |
|
1867 function next() { |
1775 function next() { |
1868 while (env.stack.length) { |
1776 while (r = env.stack.pop()) { |
1869 var rec = env.stack.pop(); |
|
1870 try { |
1777 try { |
1871 var result = rec.dispose && rec.dispose.call(rec.value); |
1778 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); |
1872 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); |
1779 if (r.dispose) { |
1780 var result = r.dispose.call(r.value); |
|
1781 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); |
|
1782 } |
|
1783 else s |= 1; |
|
1873 } |
1784 } |
1874 catch (e) { |
1785 catch (e) { |
1875 fail(e); |
1786 fail(e); |
1876 } |
1787 } |
1877 } |
1788 } |
1789 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); |
|
1878 if (env.hasError) throw env.error; |
1790 if (env.hasError) throw env.error; |
1879 } |
1791 } |
1880 return next(); |
1792 return next(); |
1793 } |
|
1794 |
|
1795 function __rewriteRelativeImportExtension(path, preserveJsx) { |
|
1796 if (typeof path === "string" && /^\.\.?\//.test(path)) { |
|
1797 return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { |
|
1798 return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); |
|
1799 }); |
|
1800 } |
|
1801 return path; |
|
1881 } |
1802 } |
1882 |
1803 |
1883 /* harmony default export */ const tslib_es6 = ({ |
1804 /* harmony default export */ const tslib_es6 = ({ |
1884 __extends, |
1805 __extends, |
1885 __assign, |
1806 __assign, |
1886 __rest, |
1807 __rest, |
1887 __decorate, |
1808 __decorate, |
1888 __param, |
1809 __param, |
1810 __esDecorate, |
|
1811 __runInitializers, |
|
1812 __propKey, |
|
1813 __setFunctionName, |
|
1889 __metadata, |
1814 __metadata, |
1890 __awaiter, |
1815 __awaiter, |
1891 __generator, |
1816 __generator, |
1892 __createBinding, |
1817 __createBinding, |
1893 __exportStar, |
1818 __exportStar, |
1906 __classPrivateFieldGet, |
1831 __classPrivateFieldGet, |
1907 __classPrivateFieldSet, |
1832 __classPrivateFieldSet, |
1908 __classPrivateFieldIn, |
1833 __classPrivateFieldIn, |
1909 __addDisposableResource, |
1834 __addDisposableResource, |
1910 __disposeResources, |
1835 __disposeResources, |
1911 }); |
1836 __rewriteRelativeImportExtension, |
1912 |
1837 }); |
1913 ;// CONCATENATED MODULE: ./node_modules/react-remove-scroll-bar/dist/es2015/constants.js |
1838 |
1839 ;// ./node_modules/react-remove-scroll-bar/dist/es2015/constants.js |
|
1914 var zeroRightClassName = 'right-scroll-bar-position'; |
1840 var zeroRightClassName = 'right-scroll-bar-position'; |
1915 var fullWidthClassName = 'width-before-scroll-bar'; |
1841 var fullWidthClassName = 'width-before-scroll-bar'; |
1916 var noScrollbarsClassName = 'with-scroll-bars-hidden'; |
1842 var noScrollbarsClassName = 'with-scroll-bars-hidden'; |
1917 /** |
1843 /** |
1918 * Name of a CSS variable containing the amount of "hidden" scrollbar |
1844 * Name of a CSS variable containing the amount of "hidden" scrollbar |
1919 * ! might be undefined ! use will fallback! |
1845 * ! might be undefined ! use will fallback! |
1920 */ |
1846 */ |
1921 var removedBarSizeVariable = '--removed-body-scroll-bar-size'; |
1847 var removedBarSizeVariable = '--removed-body-scroll-bar-size'; |
1922 |
1848 |
1923 ;// CONCATENATED MODULE: ./node_modules/use-callback-ref/dist/es2015/assignRef.js |
1849 ;// ./node_modules/use-callback-ref/dist/es2015/assignRef.js |
1924 /** |
1850 /** |
1925 * Assigns a value for a given ref, no matter of the ref format |
1851 * Assigns a value for a given ref, no matter of the ref format |
1926 * @param {RefObject} ref - a callback function or ref object |
1852 * @param {RefObject} ref - a callback function or ref object |
1927 * @param value - a new value |
1853 * @param value - a new value |
1928 * |
1854 * |
1942 ref.current = value; |
1868 ref.current = value; |
1943 } |
1869 } |
1944 return ref; |
1870 return ref; |
1945 } |
1871 } |
1946 |
1872 |
1947 ;// CONCATENATED MODULE: ./node_modules/use-callback-ref/dist/es2015/useRef.js |
1873 ;// ./node_modules/use-callback-ref/dist/es2015/useRef.js |
1948 |
1874 |
1949 /** |
1875 /** |
1950 * creates a MutableRef with ref change callback |
1876 * creates a MutableRef with ref change callback |
1951 * @param initialValue - initial ref value |
1877 * @param initialValue - initial ref value |
1952 * @param {Function} callback - a callback to run when value changes |
1878 * @param {Function} callback - a callback to run when value changes |
1983 // update callback |
1909 // update callback |
1984 ref.callback = callback; |
1910 ref.callback = callback; |
1985 return ref.facade; |
1911 return ref.facade; |
1986 } |
1912 } |
1987 |
1913 |
1988 ;// CONCATENATED MODULE: ./node_modules/use-callback-ref/dist/es2015/useMergeRef.js |
1914 ;// ./node_modules/use-callback-ref/dist/es2015/useMergeRef.js |
1989 |
1915 |
1990 |
1916 |
1917 |
|
1918 var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_React_namespaceObject.useLayoutEffect : external_React_namespaceObject.useEffect; |
|
1919 var currentValues = new WeakMap(); |
|
1991 /** |
1920 /** |
1992 * Merges two or more refs together providing a single interface to set their value |
1921 * Merges two or more refs together providing a single interface to set their value |
1993 * @param {RefObject|Ref} refs |
1922 * @param {RefObject|Ref} refs |
1994 * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} |
1923 * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} |
1995 * |
1924 * |
2001 * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together |
1930 * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together |
2002 * return <div ref={domRef}>...</div> |
1931 * return <div ref={domRef}>...</div> |
2003 * } |
1932 * } |
2004 */ |
1933 */ |
2005 function useMergeRefs(refs, defaultValue) { |
1934 function useMergeRefs(refs, defaultValue) { |
2006 return useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); }); |
1935 var callbackRef = useCallbackRef(defaultValue || null, function (newValue) { |
2007 } |
1936 return refs.forEach(function (ref) { return assignRef(ref, newValue); }); |
2008 |
1937 }); |
2009 ;// CONCATENATED MODULE: ./node_modules/use-sidecar/dist/es2015/medium.js |
1938 // handle refs changes - added or removed |
1939 useIsomorphicLayoutEffect(function () { |
|
1940 var oldValue = currentValues.get(callbackRef); |
|
1941 if (oldValue) { |
|
1942 var prevRefs_1 = new Set(oldValue); |
|
1943 var nextRefs_1 = new Set(refs); |
|
1944 var current_1 = callbackRef.current; |
|
1945 prevRefs_1.forEach(function (ref) { |
|
1946 if (!nextRefs_1.has(ref)) { |
|
1947 assignRef(ref, null); |
|
1948 } |
|
1949 }); |
|
1950 nextRefs_1.forEach(function (ref) { |
|
1951 if (!prevRefs_1.has(ref)) { |
|
1952 assignRef(ref, current_1); |
|
1953 } |
|
1954 }); |
|
1955 } |
|
1956 currentValues.set(callbackRef, refs); |
|
1957 }, [refs]); |
|
1958 return callbackRef; |
|
1959 } |
|
1960 |
|
1961 ;// ./node_modules/use-sidecar/dist/es2015/medium.js |
|
2010 |
1962 |
2011 function ItoI(a) { |
1963 function ItoI(a) { |
2012 return a; |
1964 return a; |
2013 } |
1965 } |
2014 function innerCreateMedium(defaults, middleware) { |
1966 function innerCreateMedium(defaults, middleware) { |
2084 var medium = innerCreateMedium(null); |
2036 var medium = innerCreateMedium(null); |
2085 medium.options = __assign({ async: true, ssr: false }, options); |
2037 medium.options = __assign({ async: true, ssr: false }, options); |
2086 return medium; |
2038 return medium; |
2087 } |
2039 } |
2088 |
2040 |
2089 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/medium.js |
2041 ;// ./node_modules/react-remove-scroll/dist/es2015/medium.js |
2090 |
2042 |
2091 var effectCar = createSidecarMedium(); |
2043 var effectCar = createSidecarMedium(); |
2092 |
2044 |
2093 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js |
2045 ;// ./node_modules/react-remove-scroll/dist/es2015/UI.js |
2094 |
2046 |
2095 |
2047 |
2096 |
2048 |
2097 |
2049 |
2098 |
2050 |
2126 fullWidth: fullWidthClassName, |
2078 fullWidth: fullWidthClassName, |
2127 zeroRight: zeroRightClassName, |
2079 zeroRight: zeroRightClassName, |
2128 }; |
2080 }; |
2129 |
2081 |
2130 |
2082 |
2131 ;// CONCATENATED MODULE: ./node_modules/use-sidecar/dist/es2015/exports.js |
2083 ;// ./node_modules/use-sidecar/dist/es2015/exports.js |
2132 |
2084 |
2133 |
2085 |
2134 var SideCar = function (_a) { |
2086 var SideCar = function (_a) { |
2135 var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]); |
2087 var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]); |
2136 if (!sideCar) { |
2088 if (!sideCar) { |
2146 function exportSidecar(medium, exported) { |
2098 function exportSidecar(medium, exported) { |
2147 medium.useMedium(exported); |
2099 medium.useMedium(exported); |
2148 return SideCar; |
2100 return SideCar; |
2149 } |
2101 } |
2150 |
2102 |
2151 ;// CONCATENATED MODULE: ./node_modules/get-nonce/dist/es2015/index.js |
2103 ;// ./node_modules/get-nonce/dist/es2015/index.js |
2152 var currentNonce; |
2104 var currentNonce; |
2153 var setNonce = function (nonce) { |
2105 var setNonce = function (nonce) { |
2154 currentNonce = nonce; |
2106 currentNonce = nonce; |
2155 }; |
2107 }; |
2156 var getNonce = function () { |
2108 var getNonce = function () { |
2161 return __webpack_require__.nc; |
2113 return __webpack_require__.nc; |
2162 } |
2114 } |
2163 return undefined; |
2115 return undefined; |
2164 }; |
2116 }; |
2165 |
2117 |
2166 ;// CONCATENATED MODULE: ./node_modules/react-style-singleton/dist/es2015/singleton.js |
2118 ;// ./node_modules/react-style-singleton/dist/es2015/singleton.js |
2167 |
2119 |
2168 function makeStyleTag() { |
2120 function makeStyleTag() { |
2169 if (!document) |
2121 if (!document) |
2170 return null; |
2122 return null; |
2171 var tag = document.createElement('style'); |
2123 var tag = document.createElement('style'); |
2211 } |
2163 } |
2212 }, |
2164 }, |
2213 }; |
2165 }; |
2214 }; |
2166 }; |
2215 |
2167 |
2216 ;// CONCATENATED MODULE: ./node_modules/react-style-singleton/dist/es2015/hook.js |
2168 ;// ./node_modules/react-style-singleton/dist/es2015/hook.js |
2217 |
2169 |
2218 |
2170 |
2219 /** |
2171 /** |
2220 * creates a hook to control style singleton |
2172 * creates a hook to control style singleton |
2221 * @see {@link styleSingleton} for a safer component version |
2173 * @see {@link styleSingleton} for a safer component version |
2235 }; |
2187 }; |
2236 }, [styles && isDynamic]); |
2188 }, [styles && isDynamic]); |
2237 }; |
2189 }; |
2238 }; |
2190 }; |
2239 |
2191 |
2240 ;// CONCATENATED MODULE: ./node_modules/react-style-singleton/dist/es2015/component.js |
2192 ;// ./node_modules/react-style-singleton/dist/es2015/component.js |
2241 |
2193 |
2242 /** |
2194 /** |
2243 * create a Component to add styles on demand |
2195 * create a Component to add styles on demand |
2244 * - styles are added when first instance is mounted |
2196 * - styles are added when first instance is mounted |
2245 * - styles are removed when the last instance is unmounted |
2197 * - styles are removed when the last instance is unmounted |
2253 return null; |
2205 return null; |
2254 }; |
2206 }; |
2255 return Sheet; |
2207 return Sheet; |
2256 }; |
2208 }; |
2257 |
2209 |
2258 ;// CONCATENATED MODULE: ./node_modules/react-style-singleton/dist/es2015/index.js |
2210 ;// ./node_modules/react-style-singleton/dist/es2015/index.js |
2259 |
2211 |
2260 |
2212 |
2261 |
2213 |
2262 |
2214 |
2263 ;// CONCATENATED MODULE: ./node_modules/react-remove-scroll-bar/dist/es2015/utils.js |
2215 ;// ./node_modules/react-remove-scroll-bar/dist/es2015/utils.js |
2264 var zeroGap = { |
2216 var zeroGap = { |
2265 left: 0, |
2217 left: 0, |
2266 top: 0, |
2218 top: 0, |
2267 right: 0, |
2219 right: 0, |
2268 gap: 0, |
2220 gap: 0, |
2289 right: offsets[2], |
2241 right: offsets[2], |
2290 gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]), |
2242 gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]), |
2291 }; |
2243 }; |
2292 }; |
2244 }; |
2293 |
2245 |
2294 ;// CONCATENATED MODULE: ./node_modules/react-remove-scroll-bar/dist/es2015/component.js |
2246 ;// ./node_modules/react-remove-scroll-bar/dist/es2015/component.js |
2295 |
2247 |
2296 |
2248 |
2297 |
2249 |
2298 |
2250 |
2299 var Style = styleSingleton(); |
2251 var Style = styleSingleton(); |
2252 var lockAttribute = 'data-scroll-locked'; |
|
2300 // important tip - once we measure scrollBar width and remove them |
2253 // important tip - once we measure scrollBar width and remove them |
2301 // we could not repeat this operation |
2254 // we could not repeat this operation |
2302 // thus we are using style-singleton - only the first "yet correct" style will be applied. |
2255 // thus we are using style-singleton - only the first "yet correct" style will be applied. |
2303 var getStyles = function (_a, allowRelative, gapMode, important) { |
2256 var getStyles = function (_a, allowRelative, gapMode, important) { |
2304 var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap; |
2257 var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap; |
2305 if (gapMode === void 0) { gapMode = 'margin'; } |
2258 if (gapMode === void 0) { gapMode = 'margin'; } |
2306 return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([ |
2259 return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([ |
2307 allowRelative && "position: relative ".concat(important, ";"), |
2260 allowRelative && "position: relative ".concat(important, ";"), |
2308 gapMode === 'margin' && |
2261 gapMode === 'margin' && |
2309 "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), |
2262 "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), |
2310 gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"), |
2263 gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"), |
2311 ] |
2264 ] |
2312 .filter(Boolean) |
2265 .filter(Boolean) |
2313 .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); |
2266 .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); |
2267 }; |
|
2268 var getCurrentUseCounter = function () { |
|
2269 var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10); |
|
2270 return isFinite(counter) ? counter : 0; |
|
2271 }; |
|
2272 var useLockAttribute = function () { |
|
2273 external_React_namespaceObject.useEffect(function () { |
|
2274 document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString()); |
|
2275 return function () { |
|
2276 var newCounter = getCurrentUseCounter() - 1; |
|
2277 if (newCounter <= 0) { |
|
2278 document.body.removeAttribute(lockAttribute); |
|
2279 } |
|
2280 else { |
|
2281 document.body.setAttribute(lockAttribute, newCounter.toString()); |
|
2282 } |
|
2283 }; |
|
2284 }, []); |
|
2314 }; |
2285 }; |
2315 /** |
2286 /** |
2316 * Removes page scrollbar and blocks page scroll when mounted |
2287 * Removes page scrollbar and blocks page scroll when mounted |
2317 */ |
2288 */ |
2318 var RemoveScrollBar = function (props) { |
2289 var RemoveScrollBar = function (_a) { |
2319 var noRelative = props.noRelative, noImportant = props.noImportant, _a = props.gapMode, gapMode = _a === void 0 ? 'margin' : _a; |
2290 var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b; |
2291 useLockAttribute(); |
|
2320 /* |
2292 /* |
2321 gap will be measured on every component mount |
2293 gap will be measured on every component mount |
2322 however it will be used only by the "first" invocation |
2294 however it will be used only by the "first" invocation |
2323 due to singleton nature of <Style |
2295 due to singleton nature of <Style |
2324 */ |
2296 */ |
2325 var gap = external_React_namespaceObject.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]); |
2297 var gap = external_React_namespaceObject.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]); |
2326 return external_React_namespaceObject.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') }); |
2298 return external_React_namespaceObject.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') }); |
2327 }; |
2299 }; |
2328 |
2300 |
2329 ;// CONCATENATED MODULE: ./node_modules/react-remove-scroll-bar/dist/es2015/index.js |
2301 ;// ./node_modules/react-remove-scroll-bar/dist/es2015/index.js |
2330 |
2302 |
2331 |
2303 |
2332 |
2304 |
2333 |
2305 |
2334 |
2306 |
2335 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js |
2307 ;// ./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js |
2336 var passiveSupported = false; |
2308 var passiveSupported = false; |
2337 if (typeof window !== 'undefined') { |
2309 if (typeof window !== 'undefined') { |
2338 try { |
2310 try { |
2339 var options = Object.defineProperty({}, 'passive', { |
2311 var options = Object.defineProperty({}, 'passive', { |
2340 get: function () { |
2312 get: function () { |
2351 passiveSupported = false; |
2323 passiveSupported = false; |
2352 } |
2324 } |
2353 } |
2325 } |
2354 var nonPassive = passiveSupported ? { passive: false } : false; |
2326 var nonPassive = passiveSupported ? { passive: false } : false; |
2355 |
2327 |
2356 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js |
2328 ;// ./node_modules/react-remove-scroll/dist/es2015/handleScroll.js |
2357 var elementCouldBeVScrolled = function (node) { |
2329 var alwaysContainsScroll = function (node) { |
2330 // textarea will always _contain_ scroll inside self. It only can be hidden |
|
2331 return node.tagName === 'TEXTAREA'; |
|
2332 }; |
|
2333 var elementCanBeScrolled = function (node, overflow) { |
|
2358 var styles = window.getComputedStyle(node); |
2334 var styles = window.getComputedStyle(node); |
2359 return (styles.overflowY !== 'hidden' && // not-not-scrollable |
2335 return ( |
2360 !(styles.overflowY === styles.overflowX && styles.overflowY === 'visible') // scrollable |
2336 // not-not-scrollable |
2361 ); |
2337 styles[overflow] !== 'hidden' && |
2362 }; |
2338 // contains scroll inside self |
2363 var elementCouldBeHScrolled = function (node) { |
2339 !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')); |
2364 var styles = window.getComputedStyle(node); |
2340 }; |
2365 return (styles.overflowX !== 'hidden' && // not-not-scrollable |
2341 var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); }; |
2366 !(styles.overflowY === styles.overflowX && styles.overflowX === 'visible') // scrollable |
2342 var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); }; |
2367 ); |
|
2368 }; |
|
2369 var locationCouldBeScrolled = function (axis, node) { |
2343 var locationCouldBeScrolled = function (axis, node) { |
2370 var current = node; |
2344 var current = node; |
2371 do { |
2345 do { |
2372 // Skip over shadow root |
2346 // Skip over shadow root |
2373 if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) { |
2347 if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) { |
2447 shouldCancelScroll = true; |
2421 shouldCancelScroll = true; |
2448 } |
2422 } |
2449 return shouldCancelScroll; |
2423 return shouldCancelScroll; |
2450 }; |
2424 }; |
2451 |
2425 |
2452 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js |
2426 ;// ./node_modules/react-remove-scroll/dist/es2015/SideEffect.js |
2453 |
2427 |
2454 |
2428 |
2455 |
2429 |
2456 |
2430 |
2457 |
2431 |
2536 } |
2510 } |
2537 var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event); |
2511 var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event); |
2538 var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0]; |
2512 var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0]; |
2539 // self event, and should be canceled |
2513 // self event, and should be canceled |
2540 if (sourceEvent && sourceEvent.should) { |
2514 if (sourceEvent && sourceEvent.should) { |
2541 event.preventDefault(); |
2515 if (event.cancelable) { |
2516 event.preventDefault(); |
|
2517 } |
|
2542 return; |
2518 return; |
2543 } |
2519 } |
2544 // outside or shard event |
2520 // outside or shard event |
2545 if (!sourceEvent) { |
2521 if (!sourceEvent) { |
2546 var shardNodes = (lastProps.current.shards || []) |
2522 var shardNodes = (lastProps.current.shards || []) |
2547 .map(extractRef) |
2523 .map(extractRef) |
2548 .filter(Boolean) |
2524 .filter(Boolean) |
2549 .filter(function (node) { return node.contains(event.target); }); |
2525 .filter(function (node) { return node.contains(event.target); }); |
2550 var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; |
2526 var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; |
2551 if (shouldStop) { |
2527 if (shouldStop) { |
2552 event.preventDefault(); |
2528 if (event.cancelable) { |
2529 event.preventDefault(); |
|
2530 } |
|
2553 } |
2531 } |
2554 } |
2532 } |
2555 }, []); |
2533 }, []); |
2556 var shouldCancel = external_React_namespaceObject.useCallback(function (name, delta, target, should) { |
2534 var shouldCancel = external_React_namespaceObject.useCallback(function (name, delta, target, should) { |
2557 var event = { name: name, delta: delta, target: target, should: should }; |
2535 var event = { name: name, delta: delta, target: target, should: should }; |
2591 return (external_React_namespaceObject.createElement(external_React_namespaceObject.Fragment, null, |
2569 return (external_React_namespaceObject.createElement(external_React_namespaceObject.Fragment, null, |
2592 inert ? external_React_namespaceObject.createElement(Style, { styles: generateStyle(id) }) : null, |
2570 inert ? external_React_namespaceObject.createElement(Style, { styles: generateStyle(id) }) : null, |
2593 removeScrollBar ? external_React_namespaceObject.createElement(RemoveScrollBar, { gapMode: "margin" }) : null)); |
2571 removeScrollBar ? external_React_namespaceObject.createElement(RemoveScrollBar, { gapMode: "margin" }) : null)); |
2594 } |
2572 } |
2595 |
2573 |
2596 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js |
2574 ;// ./node_modules/react-remove-scroll/dist/es2015/sidecar.js |
2597 |
2575 |
2598 |
2576 |
2599 |
2577 |
2600 /* harmony default export */ const sidecar = (exportSidecar(effectCar, RemoveScrollSideCar)); |
2578 /* harmony default export */ const sidecar = (exportSidecar(effectCar, RemoveScrollSideCar)); |
2601 |
2579 |
2602 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js |
2580 ;// ./node_modules/react-remove-scroll/dist/es2015/Combination.js |
2603 |
2581 |
2604 |
2582 |
2605 |
2583 |
2606 |
2584 |
2607 var ReactRemoveScroll = external_React_namespaceObject.forwardRef(function (props, ref) { return (external_React_namespaceObject.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: sidecar }))); }); |
2585 var ReactRemoveScroll = external_React_namespaceObject.forwardRef(function (props, ref) { return (external_React_namespaceObject.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: sidecar }))); }); |
2608 ReactRemoveScroll.classNames = RemoveScroll.classNames; |
2586 ReactRemoveScroll.classNames = RemoveScroll.classNames; |
2609 /* harmony default export */ const Combination = (ReactRemoveScroll); |
2587 /* harmony default export */ const Combination = (ReactRemoveScroll); |
2610 |
2588 |
2611 ;// CONCATENATED MODULE: ./node_modules/aria-hidden/dist/es2015/index.js |
2589 ;// ./node_modules/aria-hidden/dist/es2015/index.js |
2612 var getDefaultParent = function (originalTarget) { |
2590 var getDefaultParent = function (originalTarget) { |
2613 if (typeof document === 'undefined') { |
2591 if (typeof document === 'undefined') { |
2614 return null; |
2592 return null; |
2615 } |
2593 } |
2616 var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget; |
2594 var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget; |
2670 Array.prototype.forEach.call(parent.children, function (node) { |
2648 Array.prototype.forEach.call(parent.children, function (node) { |
2671 if (elementsToKeep.has(node)) { |
2649 if (elementsToKeep.has(node)) { |
2672 deep(node); |
2650 deep(node); |
2673 } |
2651 } |
2674 else { |
2652 else { |
2675 var attr = node.getAttribute(controlAttribute); |
2653 try { |
2676 var alreadyHidden = attr !== null && attr !== 'false'; |
2654 var attr = node.getAttribute(controlAttribute); |
2677 var counterValue = (counterMap.get(node) || 0) + 1; |
2655 var alreadyHidden = attr !== null && attr !== 'false'; |
2678 var markerValue = (markerCounter.get(node) || 0) + 1; |
2656 var counterValue = (counterMap.get(node) || 0) + 1; |
2679 counterMap.set(node, counterValue); |
2657 var markerValue = (markerCounter.get(node) || 0) + 1; |
2680 markerCounter.set(node, markerValue); |
2658 counterMap.set(node, counterValue); |
2681 hiddenNodes.push(node); |
2659 markerCounter.set(node, markerValue); |
2682 if (counterValue === 1 && alreadyHidden) { |
2660 hiddenNodes.push(node); |
2683 uncontrolledNodes.set(node, true); |
2661 if (counterValue === 1 && alreadyHidden) { |
2662 uncontrolledNodes.set(node, true); |
|
2663 } |
|
2664 if (markerValue === 1) { |
|
2665 node.setAttribute(markerName, 'true'); |
|
2666 } |
|
2667 if (!alreadyHidden) { |
|
2668 node.setAttribute(controlAttribute, 'true'); |
|
2669 } |
|
2684 } |
2670 } |
2685 if (markerValue === 1) { |
2671 catch (e) { |
2686 node.setAttribute(markerName, 'true'); |
2672 console.error('aria-hidden: cannot operate on ', node, e); |
2687 } |
|
2688 if (!alreadyHidden) { |
|
2689 node.setAttribute(controlAttribute, 'true'); |
|
2690 } |
2673 } |
2691 } |
2674 } |
2692 }); |
2675 }); |
2693 }; |
2676 }; |
2694 deep(parentNode); |
2677 deep(parentNode); |
2769 var suppressOthers = function (originalTarget, parentNode, markerName) { |
2752 var suppressOthers = function (originalTarget, parentNode, markerName) { |
2770 if (markerName === void 0) { markerName = 'data-suppressed'; } |
2753 if (markerName === void 0) { markerName = 'data-suppressed'; } |
2771 return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName); |
2754 return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName); |
2772 }; |
2755 }; |
2773 |
2756 |
2774 ;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/dist/index.module.js |
2757 ;// ./node_modules/@radix-ui/react-dialog/dist/index.mjs |
2775 |
2758 |
2776 |
2759 |
2777 |
2760 |
2778 |
2761 |
2779 |
2762 |
2970 })); |
2953 })); |
2971 }); |
2954 }); |
2972 /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
2955 /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
2973 const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog); |
2956 const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog); |
2974 const hasInteractedOutsideRef = (0,external_React_namespaceObject.useRef)(false); |
2957 const hasInteractedOutsideRef = (0,external_React_namespaceObject.useRef)(false); |
2958 const hasPointerDownOutsideRef = (0,external_React_namespaceObject.useRef)(false); |
|
2975 return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, { |
2959 return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, { |
2976 ref: forwardedRef, |
2960 ref: forwardedRef, |
2977 trapFocus: false, |
2961 trapFocus: false, |
2978 disableOutsidePointerEvents: false, |
2962 disableOutsidePointerEvents: false, |
2979 onCloseAutoFocus: (event)=>{ |
2963 onCloseAutoFocus: (event)=>{ |
2983 var _context$triggerRef$c2; |
2967 var _context$triggerRef$c2; |
2984 if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus |
2968 if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus |
2985 event.preventDefault(); |
2969 event.preventDefault(); |
2986 } |
2970 } |
2987 hasInteractedOutsideRef.current = false; |
2971 hasInteractedOutsideRef.current = false; |
2972 hasPointerDownOutsideRef.current = false; |
|
2988 }, |
2973 }, |
2989 onInteractOutside: (event)=>{ |
2974 onInteractOutside: (event)=>{ |
2990 var _props$onInteractOuts, _context$triggerRef$c3; |
2975 var _props$onInteractOuts, _context$triggerRef$c3; |
2991 (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event); |
2976 (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event); |
2992 if (!event.defaultPrevented) hasInteractedOutsideRef.current = true; // Prevent dismissing when clicking the trigger. |
2977 if (!event.defaultPrevented) { |
2978 hasInteractedOutsideRef.current = true; |
|
2979 if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true; |
|
2980 } // Prevent dismissing when clicking the trigger. |
|
2993 // As the trigger is already setup to close, without doing so would |
2981 // As the trigger is already setup to close, without doing so would |
2994 // cause it to close and immediately open. |
2982 // cause it to close and immediately open. |
2995 // |
|
2996 // We use `onInteractOutside` as some browsers also |
|
2997 // focus on pointer down, creating the same issue. |
|
2998 const target = event.target; |
2983 const target = event.target; |
2999 const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target); |
2984 const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target); |
3000 if (targetIsTrigger) event.preventDefault(); |
2985 if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked |
2986 // we will get the pointer down outside event on the trigger, but then a subsequent |
|
2987 // focus outside event on the container, we ignore any focus outside event when we've |
|
2988 // already had a pointer down outside event. |
|
2989 if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault(); |
|
3001 } |
2990 } |
3002 })); |
2991 })); |
3003 }); |
2992 }); |
3004 /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
2993 /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{ |
3005 const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props; |
2994 const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props; |
3128 |
3117 |
3129 |
3118 |
3130 |
3119 |
3131 |
3120 |
3132 |
3121 |
3133 |
3122 ;// ./node_modules/cmdk/dist/index.mjs |
3134 // EXTERNAL MODULE: ./node_modules/command-score/index.js |
3123 var V='[cmdk-group=""]',dist_X='[cmdk-group-items=""]',ge='[cmdk-group-heading=""]',dist_Y='[cmdk-item=""]',le=`${dist_Y}:not([aria-disabled="true"])`,Q="cmdk-item-select",M="data-value",Re=(r,o,n)=>W(r,o,n),ue=external_React_namespaceObject.createContext(void 0),dist_G=()=>external_React_namespaceObject.useContext(ue),de=external_React_namespaceObject.createContext(void 0),Z=()=>external_React_namespaceObject.useContext(de),fe=external_React_namespaceObject.createContext(void 0),me=external_React_namespaceObject.forwardRef((r,o)=>{let n=dist_k(()=>{var e,s;return{search:"",value:(s=(e=r.value)!=null?e:r.defaultValue)!=null?s:"",filtered:{count:0,items:new Map,groups:new Set}}}),u=dist_k(()=>new Set),c=dist_k(()=>new Map),d=dist_k(()=>new Map),f=dist_k(()=>new Set),p=pe(r),{label:v,children:b,value:l,onValueChange:y,filter:S,shouldFilter:C,loop:L,disablePointerSelection:ee=!1,vimBindings:j=!0,...H}=r,te=external_React_namespaceObject.useId(),$=external_React_namespaceObject.useId(),K=external_React_namespaceObject.useId(),x=external_React_namespaceObject.useRef(null),g=Me();T(()=>{if(l!==void 0){let e=l.trim();n.current.value=e,h.emit()}},[l]),T(()=>{g(6,re)},[]);let h=external_React_namespaceObject.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,s,i)=>{var a,m,R;if(!Object.is(n.current[e],s)){if(n.current[e]=s,e==="search")z(),q(),g(1,U);else if(e==="value"&&(i||g(5,re),((a=p.current)==null?void 0:a.value)!==void 0)){let E=s!=null?s:"";(R=(m=p.current).onValueChange)==null||R.call(m,E);return}h.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),B=external_React_namespaceObject.useMemo(()=>({value:(e,s,i)=>{var a;s!==((a=d.current.get(e))==null?void 0:a.value)&&(d.current.set(e,{value:s,keywords:i}),n.current.filtered.items.set(e,ne(s,i)),g(2,()=>{q(),h.emit()}))},item:(e,s)=>(u.current.add(e),s&&(c.current.has(s)?c.current.get(s).add(e):c.current.set(s,new Set([e]))),g(3,()=>{z(),q(),n.current.value||U(),h.emit()}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let i=O();g(4,()=>{z(),(i==null?void 0:i.getAttribute("id"))===e&&U(),h.emit()})}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e)}),filter:()=>p.current.shouldFilter,label:v||r["aria-label"],disablePointerSelection:ee,listId:te,inputId:K,labelId:$,listInnerRef:x}),[]);function ne(e,s){var a,m;let i=(m=(a=p.current)==null?void 0:a.filter)!=null?m:Re;return e?i(e,n.current.search,s):0}function q(){if(!n.current.search||p.current.shouldFilter===!1)return;let e=n.current.filtered.items,s=[];n.current.filtered.groups.forEach(a=>{let m=c.current.get(a),R=0;m.forEach(E=>{let P=e.get(E);R=Math.max(P,R)}),s.push([a,R])});let i=x.current;A().sort((a,m)=>{var P,_;let R=a.getAttribute("id"),E=m.getAttribute("id");return((P=e.get(E))!=null?P:0)-((_=e.get(R))!=null?_:0)}).forEach(a=>{let m=a.closest(dist_X);m?m.appendChild(a.parentElement===m?a:a.closest(`${dist_X} > *`)):i.appendChild(a.parentElement===i?a:a.closest(`${dist_X} > *`))}),s.sort((a,m)=>m[1]-a[1]).forEach(a=>{let m=x.current.querySelector(`${V}[${M}="${encodeURIComponent(a[0])}"]`);m==null||m.parentElement.appendChild(m)})}function U(){let e=A().find(i=>i.getAttribute("aria-disabled")!=="true"),s=e==null?void 0:e.getAttribute(M);h.setState("value",s||void 0)}function z(){var s,i,a,m;if(!n.current.search||p.current.shouldFilter===!1){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let R of u.current){let E=(i=(s=d.current.get(R))==null?void 0:s.value)!=null?i:"",P=(m=(a=d.current.get(R))==null?void 0:a.keywords)!=null?m:[],_=ne(E,P);n.current.filtered.items.set(R,_),_>0&&e++}for(let[R,E]of c.current)for(let P of E)if(n.current.filtered.items.get(P)>0){n.current.filtered.groups.add(R);break}n.current.filtered.count=e}function re(){var s,i,a;let e=O();e&&(((s=e.parentElement)==null?void 0:s.firstChild)===e&&((a=(i=e.closest(V))==null?void 0:i.querySelector(ge))==null||a.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}))}function O(){var e;return(e=x.current)==null?void 0:e.querySelector(`${dist_Y}[aria-selected="true"]`)}function A(){var e;return Array.from((e=x.current)==null?void 0:e.querySelectorAll(le))}function W(e){let i=A()[e];i&&h.setState("value",i.getAttribute(M))}function J(e){var R;let s=O(),i=A(),a=i.findIndex(E=>E===s),m=i[a+e];(R=p.current)!=null&&R.loop&&(m=a+e<0?i[i.length-1]:a+e===i.length?i[0]:i[a+e]),m&&h.setState("value",m.getAttribute(M))}function oe(e){let s=O(),i=s==null?void 0:s.closest(V),a;for(;i&&!a;)i=e>0?we(i,V):Ie(i,V),a=i==null?void 0:i.querySelector(le);a?h.setState("value",a.getAttribute(M)):J(e)}let ie=()=>W(A().length-1),ae=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?oe(1):J(1)},se=e=>{e.preventDefault(),e.metaKey?W(0):e.altKey?oe(-1):J(-1)};return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,tabIndex:-1,...H,"cmdk-root":"",onKeyDown:e=>{var s;if((s=H.onKeyDown)==null||s.call(H,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{j&&e.ctrlKey&&ae(e);break}case"ArrowDown":{ae(e);break}case"p":case"k":{j&&e.ctrlKey&&se(e);break}case"ArrowUp":{se(e);break}case"Home":{e.preventDefault(),W(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":if(!e.nativeEvent.isComposing&&e.keyCode!==229){e.preventDefault();let i=O();if(i){let a=new Event(Q);i.dispatchEvent(a)}}}}},external_React_namespaceObject.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:De},v),F(r,e=>external_React_namespaceObject.createElement(de.Provider,{value:h},external_React_namespaceObject.createElement(ue.Provider,{value:B},e))))}),be=external_React_namespaceObject.forwardRef((r,o)=>{var K,x;let n=external_React_namespaceObject.useId(),u=external_React_namespaceObject.useRef(null),c=external_React_namespaceObject.useContext(fe),d=dist_G(),f=pe(r),p=(x=(K=f.current)==null?void 0:K.forceMount)!=null?x:c==null?void 0:c.forceMount;T(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let v=ve(n,u,[r.value,r.children,u],r.keywords),b=Z(),l=dist_D(g=>g.value&&g.value===v.current),y=dist_D(g=>p||d.filter()===!1?!0:g.search?g.filtered.items.get(n)>0:!0);external_React_namespaceObject.useEffect(()=>{let g=u.current;if(!(!g||r.disabled))return g.addEventListener(Q,S),()=>g.removeEventListener(Q,S)},[y,r.onSelect,r.disabled]);function S(){var g,h;C(),(h=(g=f.current).onSelect)==null||h.call(g,v.current)}function C(){b.setState("value",v.current,!0)}if(!y)return null;let{disabled:L,value:ee,onSelect:j,forceMount:H,keywords:te,...$}=r;return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([u,o]),...$,id:n,"cmdk-item":"",role:"option","aria-disabled":!!L,"aria-selected":!!l,"data-disabled":!!L,"data-selected":!!l,onPointerMove:L||d.disablePointerSelection?void 0:C,onClick:L?void 0:S},r.children)}),he=external_React_namespaceObject.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=external_React_namespaceObject.useId(),p=external_React_namespaceObject.useRef(null),v=external_React_namespaceObject.useRef(null),b=external_React_namespaceObject.useId(),l=dist_G(),y=dist_D(C=>c||l.filter()===!1?!0:C.search?C.filtered.groups.has(f):!0);T(()=>l.group(f),[]),ve(f,p,[r.value,r.heading,v]);let S=external_React_namespaceObject.useMemo(()=>({id:f,forceMount:c}),[c]);return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([p,o]),...d,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&external_React_namespaceObject.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:b},n),F(r,C=>external_React_namespaceObject.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?b:void 0},external_React_namespaceObject.createElement(fe.Provider,{value:S},C))))}),ye=external_React_namespaceObject.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=external_React_namespaceObject.useRef(null),d=dist_D(f=>!f.search);return!n&&!d?null:external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([c,o]),...u,"cmdk-separator":"",role:"separator"})}),Ee=external_React_namespaceObject.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=Z(),f=dist_D(l=>l.search),p=dist_D(l=>l.value),v=dist_G(),b=external_React_namespaceObject.useMemo(()=>{var y;let l=(y=v.listInnerRef.current)==null?void 0:y.querySelector(`${dist_Y}[${M}="${encodeURIComponent(p)}"]`);return l==null?void 0:l.getAttribute("id")},[]);return external_React_namespaceObject.useEffect(()=>{r.value!=null&&d.setState("search",r.value)},[r.value]),external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":b,id:v.inputId,type:"text",value:c?r.value:f,onChange:l=>{c||d.setState("search",l.target.value),n==null||n(l.target.value)}})}),Se=external_React_namespaceObject.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=external_React_namespaceObject.useRef(null),f=external_React_namespaceObject.useRef(null),p=dist_G();return external_React_namespaceObject.useEffect(()=>{if(f.current&&d.current){let v=f.current,b=d.current,l,y=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let S=v.offsetHeight;b.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return y.observe(v),()=>{cancelAnimationFrame(l),y.unobserve(v)}}},[]),external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([d,o]),...c,"cmdk-list":"",role:"listbox","aria-label":u,id:p.listId},F(r,v=>external_React_namespaceObject.createElement("div",{ref:N([f,p.listInnerRef]),"cmdk-list-sizer":""},v)))}),Ce=external_React_namespaceObject.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:n,onOpenChange:u},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:f},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":"",className:c}),external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":r.label,"cmdk-dialog":"",className:d},external_React_namespaceObject.createElement(me,{ref:o,...p}))))}),xe=external_React_namespaceObject.forwardRef((r,o)=>dist_D(u=>u.filtered.count===0)?external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=external_React_namespaceObject.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},F(r,f=>external_React_namespaceObject.createElement("div",{"aria-hidden":!0},f)))}),He=Object.assign(me,{List:Se,Item:be,Input:Ee,Group:he,Separator:ye,Dialog:Ce,Empty:xe,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling}}function Ie(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling}}function pe(r){let o=external_React_namespaceObject.useRef(r);return T(()=>{o.current=r}),o}var T=typeof window=="undefined"?external_React_namespaceObject.useEffect:external_React_namespaceObject.useLayoutEffect;function dist_k(r){let o=external_React_namespaceObject.useRef();return o.current===void 0&&(o.current=r()),o}function N(r){return o=>{r.forEach(n=>{typeof n=="function"?n(o):n!=null&&(n.current=o)})}}function dist_D(r){let o=Z(),n=()=>r(o.snapshot());return external_React_namespaceObject.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=external_React_namespaceObject.useRef(),d=dist_G();return T(()=>{var v;let f=(()=>{var b;for(let l of n){if(typeof l=="string")return l.trim();if(typeof l=="object"&&"current"in l)return l.current?(b=l.current.textContent)==null?void 0:b.trim():c.current}})(),p=u.map(b=>b.trim());d.value(r,f,p),(v=o.current)==null||v.setAttribute(M,f),c.current=f}),c}var Me=()=>{let[r,o]=external_React_namespaceObject.useState(),n=dist_k(()=>new Map);return T(()=>{n.current.forEach(u=>u()),n.current=new Map},[r]),(u,c)=>{n.current.set(u,c),o({})}};function Te(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function F({asChild:r,children:o},n){return r&&external_React_namespaceObject.isValidElement(o)?external_React_namespaceObject.cloneElement(Te(o),{ref:o.ref},n(o.props.children)):n(o)}var De={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}; |
3135 var command_score = __webpack_require__(6007); |
3124 |
3136 ;// CONCATENATED MODULE: ./node_modules/cmdk/dist/index.mjs |
3125 ;// ./node_modules/clsx/dist/clsx.mjs |
3137 var ue='[cmdk-list-sizer=""]',M='[cmdk-group=""]',N='[cmdk-group-items=""]',de='[cmdk-group-heading=""]',ee='[cmdk-item=""]',Z=`${ee}:not([aria-disabled="true"])`,z="cmdk-item-select",S="data-value",fe=(n,a)=>command_score(n,a),te=external_React_namespaceObject.createContext(void 0),k=()=>external_React_namespaceObject.useContext(te),re=external_React_namespaceObject.createContext(void 0),U=()=>external_React_namespaceObject.useContext(re),ne=external_React_namespaceObject.createContext(void 0),oe=external_React_namespaceObject.forwardRef((n,a)=>{let r=external_React_namespaceObject.useRef(null),o=x(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),u=x(()=>new Set),l=x(()=>new Map),p=x(()=>new Map),f=x(()=>new Set),d=ae(n),{label:v,children:E,value:R,onValueChange:w,filter:O,shouldFilter:ie,...D}=n,F=external_React_namespaceObject.useId(),g=external_React_namespaceObject.useId(),A=external_React_namespaceObject.useId(),y=ye();L(()=>{if(R!==void 0){let e=R.trim().toLowerCase();o.current.value=e,y(6,W),h.emit()}},[R]);let h=external_React_namespaceObject.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>o.current,setState:(e,c,i)=>{var s,m,b;if(!Object.is(o.current[e],c)){if(o.current[e]=c,e==="search")j(),G(),y(1,V);else if(e==="value")if(((s=d.current)==null?void 0:s.value)!==void 0){(b=(m=d.current).onValueChange)==null||b.call(m,c);return}else i||y(5,W);h.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),K=external_React_namespaceObject.useMemo(()=>({value:(e,c)=>{c!==p.current.get(e)&&(p.current.set(e,c),o.current.filtered.items.set(e,B(c)),y(2,()=>{G(),h.emit()}))},item:(e,c)=>(u.current.add(e),c&&(l.current.has(c)?l.current.get(c).add(e):l.current.set(c,new Set([e]))),y(3,()=>{j(),G(),o.current.value||V(),h.emit()}),()=>{p.current.delete(e),u.current.delete(e),o.current.filtered.items.delete(e),y(4,()=>{j(),V(),h.emit()})}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{p.current.delete(e),l.current.delete(e)}),filter:()=>d.current.shouldFilter,label:v||n["aria-label"],listId:F,inputId:A,labelId:g}),[]);function B(e){var i;let c=((i=d.current)==null?void 0:i.filter)??fe;return e?c(e,o.current.search):0}function G(){if(!r.current||!o.current.search||d.current.shouldFilter===!1)return;let e=o.current.filtered.items,c=[];o.current.filtered.groups.forEach(s=>{let m=l.current.get(s),b=0;m.forEach(P=>{let ce=e.get(P);b=Math.max(ce,b)}),c.push([s,b])});let i=r.current.querySelector(ue);I().sort((s,m)=>{let b=s.getAttribute(S),P=m.getAttribute(S);return(e.get(P)??0)-(e.get(b)??0)}).forEach(s=>{let m=s.closest(N);m?m.appendChild(s.parentElement===m?s:s.closest(`${N} > *`)):i.appendChild(s.parentElement===i?s:s.closest(`${N} > *`))}),c.sort((s,m)=>m[1]-s[1]).forEach(s=>{let m=r.current.querySelector(`${M}[${S}="${s[0]}"]`);m==null||m.parentElement.appendChild(m)})}function V(){let e=I().find(i=>!i.ariaDisabled),c=e==null?void 0:e.getAttribute(S);h.setState("value",c||void 0)}function j(){if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=u.current.size;return}o.current.filtered.groups=new Set;let e=0;for(let c of u.current){let i=p.current.get(c),s=B(i);o.current.filtered.items.set(c,s),s>0&&e++}for(let[c,i]of l.current)for(let s of i)if(o.current.filtered.items.get(s)>0){o.current.filtered.groups.add(c);break}o.current.filtered.count=e}function W(){var c,i,s;let e=_();e&&(((c=e.parentElement)==null?void 0:c.firstChild)===e&&((s=(i=e.closest(M))==null?void 0:i.querySelector(de))==null||s.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}))}function _(){return r.current.querySelector(`${ee}[aria-selected="true"]`)}function I(){return Array.from(r.current.querySelectorAll(Z))}function q(e){let i=I()[e];i&&h.setState("value",i.getAttribute(S))}function $(e){var b;let c=_(),i=I(),s=i.findIndex(P=>P===c),m=i[s+e];(b=d.current)!=null&&b.loop&&(m=s+e<0?i[i.length-1]:s+e===i.length?i[0]:i[s+e]),m&&h.setState("value",m.getAttribute(S))}function J(e){let c=_(),i=c==null?void 0:c.closest(M),s;for(;i&&!s;)i=e>0?Se(i,M):Ce(i,M),s=i==null?void 0:i.querySelector(Z);s?h.setState("value",s.getAttribute(S)):$(e)}let Q=()=>q(I().length-1),X=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?J(1):$(1)},Y=e=>{e.preventDefault(),e.metaKey?q(0):e.altKey?J(-1):$(-1)};return external_React_namespaceObject.createElement("div",{ref:H([r,a]),...D,"cmdk-root":"",onKeyDown:e=>{var c;if((c=D.onKeyDown)==null||c.call(D,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{e.ctrlKey&&X(e);break}case"ArrowDown":{X(e);break}case"p":case"k":{e.ctrlKey&&Y(e);break}case"ArrowUp":{Y(e);break}case"Home":{e.preventDefault(),q(0);break}case"End":{e.preventDefault(),Q();break}case"Enter":{e.preventDefault();let i=_();if(i){let s=new Event(z);i.dispatchEvent(s)}}}}},external_React_namespaceObject.createElement("label",{"cmdk-label":"",htmlFor:K.inputId,id:K.labelId,style:xe},v),external_React_namespaceObject.createElement(re.Provider,{value:h},external_React_namespaceObject.createElement(te.Provider,{value:K},E)))}),me=external_React_namespaceObject.forwardRef((n,a)=>{let r=external_React_namespaceObject.useId(),o=external_React_namespaceObject.useRef(null),u=external_React_namespaceObject.useContext(ne),l=k(),p=ae(n);L(()=>l.item(r,u),[]);let f=se(r,o,[n.value,n.children,o]),d=U(),v=T(g=>g.value&&g.value===f.current),E=T(g=>l.filter()===!1?!0:g.search?g.filtered.items.get(r)>0:!0);external_React_namespaceObject.useEffect(()=>{let g=o.current;if(!(!g||n.disabled))return g.addEventListener(z,R),()=>g.removeEventListener(z,R)},[E,n.onSelect,n.disabled]);function R(){var g,A;(A=(g=p.current).onSelect)==null||A.call(g,f.current)}function w(){d.setState("value",f.current,!0)}if(!E)return null;let{disabled:O,value:ie,onSelect:D,...F}=n;return external_React_namespaceObject.createElement("div",{ref:H([o,a]),...F,"cmdk-item":"",role:"option","aria-disabled":O||void 0,"aria-selected":v||void 0,"data-selected":v||void 0,onPointerMove:O?void 0:w,onClick:O?void 0:R},n.children)}),pe=external_React_namespaceObject.forwardRef((n,a)=>{let{heading:r,children:o,...u}=n,l=external_React_namespaceObject.useId(),p=external_React_namespaceObject.useRef(null),f=external_React_namespaceObject.useRef(null),d=external_React_namespaceObject.useId(),v=k(),E=T(w=>v.filter()===!1?!0:w.search?w.filtered.groups.has(l):!0);L(()=>v.group(l),[]),se(l,p,[n.value,n.heading,f]);let R=external_React_namespaceObject.createElement(ne.Provider,{value:l},o);return external_React_namespaceObject.createElement("div",{ref:H([p,a]),...u,"cmdk-group":"",role:"presentation",hidden:E?void 0:!0},r&&external_React_namespaceObject.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),external_React_namespaceObject.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},R))}),ge=external_React_namespaceObject.forwardRef((n,a)=>{let{alwaysRender:r,...o}=n,u=external_React_namespaceObject.useRef(null),l=T(p=>!p.search);return!r&&!l?null:external_React_namespaceObject.createElement("div",{ref:H([u,a]),...o,"cmdk-separator":"",role:"separator"})}),ve=external_React_namespaceObject.forwardRef((n,a)=>{let{onValueChange:r,...o}=n,u=n.value!=null,l=U(),p=T(d=>d.search),f=k();return external_React_namespaceObject.useEffect(()=>{n.value!=null&&l.setState("search",n.value)},[n.value]),external_React_namespaceObject.createElement("input",{ref:a,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,id:f.inputId,type:"text",value:u?n.value:p,onChange:d=>{u||l.setState("search",d.target.value),r==null||r(d.target.value)}})}),Re=external_React_namespaceObject.forwardRef((n,a)=>{let{children:r,...o}=n,u=external_React_namespaceObject.useRef(null),l=external_React_namespaceObject.useRef(null),p=k();return external_React_namespaceObject.useEffect(()=>{if(l.current&&u.current){let f=l.current,d=u.current,v,E=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let R=f.getBoundingClientRect().height;d.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return E.observe(f),()=>{cancelAnimationFrame(v),E.unobserve(f)}}},[]),external_React_namespaceObject.createElement("div",{ref:H([u,a]),...o,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:p.listId,"aria-labelledby":p.inputId},external_React_namespaceObject.createElement("div",{ref:l,"cmdk-list-sizer":""},r))}),be=external_React_namespaceObject.forwardRef((n,a)=>{let{open:r,onOpenChange:o,container:u,...l}=n;return external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:r,onOpenChange:o},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:u},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":""}),external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":n.label,"cmdk-dialog":""},external_React_namespaceObject.createElement(oe,{ref:a,...l}))))}),he=external_React_namespaceObject.forwardRef((n,a)=>{let r=external_React_namespaceObject.useRef(!0),o=T(u=>u.filtered.count===0);return external_React_namespaceObject.useEffect(()=>{r.current=!1},[]),r.current||!o?null:external_React_namespaceObject.createElement("div",{ref:a,...n,"cmdk-empty":"",role:"presentation"})}),Ee=external_React_namespaceObject.forwardRef((n,a)=>{let{progress:r,children:o,...u}=n;return external_React_namespaceObject.createElement("div",{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},external_React_namespaceObject.createElement("div",{"aria-hidden":!0},o))}),Le=Object.assign(oe,{List:Re,Item:me,Input:ve,Group:pe,Separator:ge,Dialog:be,Empty:he,Loading:Ee});function Se(n,a){let r=n.nextElementSibling;for(;r;){if(r.matches(a))return r;r=r.nextElementSibling}}function Ce(n,a){let r=n.previousElementSibling;for(;r;){if(r.matches(a))return r;r=r.previousElementSibling}}function ae(n){let a=external_React_namespaceObject.useRef(n);return L(()=>{a.current=n}),a}var L=typeof window>"u"?external_React_namespaceObject.useEffect:external_React_namespaceObject.useLayoutEffect;function x(n){let a=external_React_namespaceObject.useRef();return a.current===void 0&&(a.current=n()),a}function H(n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}function T(n){let a=U(),r=()=>n(a.snapshot());return external_React_namespaceObject.useSyncExternalStore(a.subscribe,r,r)}function se(n,a,r){let o=external_React_namespaceObject.useRef(),u=k();return L(()=>{var p;let l=(()=>{var f;for(let d of r){if(typeof d=="string")return d.trim().toLowerCase();if(typeof d=="object"&&"current"in d&&d.current)return(f=d.current.textContent)==null?void 0:f.trim().toLowerCase()}})();u.value(n,l),(p=a.current)==null||p.setAttribute(S,l),o.current=l}),o}var ye=()=>{let[n,a]=external_React_namespaceObject.useState(),r=x(()=>new Map);return L(()=>{r.current.forEach(o=>o()),r.current=new Map},[n]),(o,u)=>{r.current.set(o,u),a({})}},xe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}; |
|
3138 |
|
3139 ;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs |
|
3140 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); |
3126 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx); |
3141 ;// CONCATENATED MODULE: external ["wp","data"] |
3127 ;// external ["wp","data"] |
3142 const external_wp_data_namespaceObject = window["wp"]["data"]; |
3128 const external_wp_data_namespaceObject = window["wp"]["data"]; |
3143 ;// CONCATENATED MODULE: external ["wp","element"] |
3129 ;// external ["wp","element"] |
3144 const external_wp_element_namespaceObject = window["wp"]["element"]; |
3130 const external_wp_element_namespaceObject = window["wp"]["element"]; |
3145 ;// CONCATENATED MODULE: external ["wp","i18n"] |
3131 ;// external ["wp","i18n"] |
3146 const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
3132 const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; |
3147 ;// CONCATENATED MODULE: external ["wp","components"] |
3133 ;// external ["wp","components"] |
3148 const external_wp_components_namespaceObject = window["wp"]["components"]; |
3134 const external_wp_components_namespaceObject = window["wp"]["components"]; |
3149 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"] |
3135 ;// external ["wp","keyboardShortcuts"] |
3150 const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"]; |
3136 const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"]; |
3151 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js |
3137 ;// ./node_modules/@wordpress/icons/build-module/icon/index.js |
3152 /** |
3138 /** |
3153 * WordPress dependencies |
3139 * WordPress dependencies |
3154 */ |
3140 */ |
3155 |
3141 |
3156 |
3142 |
3158 |
3144 |
3159 /** |
3145 /** |
3160 * Return an SVG icon. |
3146 * Return an SVG icon. |
3161 * |
3147 * |
3162 * @param {IconProps} props icon is the SVG component to render |
3148 * @param {IconProps} props icon is the SVG component to render |
3163 * size is a number specifiying the icon size in pixels |
3149 * size is a number specifying the icon size in pixels |
3164 * Other props will be passed to wrapped SVG component |
3150 * Other props will be passed to wrapped SVG component |
3165 * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. |
3151 * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. |
3166 * |
3152 * |
3167 * @return {JSX.Element} Icon component |
3153 * @return {JSX.Element} Icon component |
3168 */ |
3154 */ |
3178 ref |
3164 ref |
3179 }); |
3165 }); |
3180 } |
3166 } |
3181 /* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon)); |
3167 /* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon)); |
3182 |
3168 |
3183 ;// CONCATENATED MODULE: external ["wp","primitives"] |
3169 ;// external ["wp","primitives"] |
3184 const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
3170 const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
3185 ;// CONCATENATED MODULE: external "ReactJSXRuntime" |
3171 ;// external "ReactJSXRuntime" |
3186 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
3172 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; |
3187 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js |
3173 ;// ./node_modules/@wordpress/icons/build-module/library/search.js |
3188 /** |
3174 /** |
3189 * WordPress dependencies |
3175 * WordPress dependencies |
3190 */ |
3176 */ |
3191 |
3177 |
3192 |
3178 |
3197 d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" |
3183 d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" |
3198 }) |
3184 }) |
3199 }); |
3185 }); |
3200 /* harmony default export */ const library_search = (search); |
3186 /* harmony default export */ const library_search = (search); |
3201 |
3187 |
3202 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/store/reducer.js |
3188 ;// ./node_modules/@wordpress/commands/build-module/store/reducer.js |
3203 /** |
3189 /** |
3204 * WordPress dependencies |
3190 * WordPress dependencies |
3205 */ |
3191 */ |
3206 |
3192 |
3207 |
3193 |
3309 isOpen, |
3295 isOpen, |
3310 context |
3296 context |
3311 }); |
3297 }); |
3312 /* harmony default export */ const store_reducer = (reducer); |
3298 /* harmony default export */ const store_reducer = (reducer); |
3313 |
3299 |
3314 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/store/actions.js |
3300 ;// ./node_modules/@wordpress/commands/build-module/store/actions.js |
3315 /** @typedef {import('@wordpress/keycodes').WPKeycodeModifier} WPKeycodeModifier */ |
3301 /** @typedef {import('@wordpress/keycodes').WPKeycodeModifier} WPKeycodeModifier */ |
3316 |
3302 |
3317 /** |
3303 /** |
3318 * Configuration of a registered keyboard shortcut. |
3304 * Configuration of a registered keyboard shortcut. |
3319 * |
3305 * |
3419 return { |
3405 return { |
3420 type: 'CLOSE' |
3406 type: 'CLOSE' |
3421 }; |
3407 }; |
3422 } |
3408 } |
3423 |
3409 |
3424 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/store/selectors.js |
3410 ;// ./node_modules/@wordpress/commands/build-module/store/selectors.js |
3425 /** |
3411 /** |
3426 * WordPress dependencies |
3412 * WordPress dependencies |
3427 */ |
3413 */ |
3428 |
3414 |
3429 |
3415 |
3473 */ |
3459 */ |
3474 function getContext(state) { |
3460 function getContext(state) { |
3475 return state.context; |
3461 return state.context; |
3476 } |
3462 } |
3477 |
3463 |
3478 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/store/private-actions.js |
3464 ;// ./node_modules/@wordpress/commands/build-module/store/private-actions.js |
3479 /** |
3465 /** |
3480 * Sets the active context. |
3466 * Sets the active context. |
3481 * |
3467 * |
3482 * @param {string} context Context. |
3468 * @param {string} context Context. |
3483 * |
3469 * |
3488 type: 'SET_CONTEXT', |
3474 type: 'SET_CONTEXT', |
3489 context |
3475 context |
3490 }; |
3476 }; |
3491 } |
3477 } |
3492 |
3478 |
3493 ;// CONCATENATED MODULE: external ["wp","privateApis"] |
3479 ;// external ["wp","privateApis"] |
3494 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; |
3480 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; |
3495 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/lock-unlock.js |
3481 ;// ./node_modules/@wordpress/commands/build-module/lock-unlock.js |
3496 /** |
3482 /** |
3497 * WordPress dependencies |
3483 * WordPress dependencies |
3498 */ |
3484 */ |
3499 |
3485 |
3500 const { |
3486 const { |
3501 lock, |
3487 lock, |
3502 unlock |
3488 unlock |
3503 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/commands'); |
3489 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/commands'); |
3504 |
3490 |
3505 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/store/index.js |
3491 ;// ./node_modules/@wordpress/commands/build-module/store/index.js |
3506 /** |
3492 /** |
3507 * WordPress dependencies |
3493 * WordPress dependencies |
3508 */ |
3494 */ |
3509 |
3495 |
3510 |
3496 |
3539 selectors: selectors_namespaceObject |
3525 selectors: selectors_namespaceObject |
3540 }); |
3526 }); |
3541 (0,external_wp_data_namespaceObject.register)(store); |
3527 (0,external_wp_data_namespaceObject.register)(store); |
3542 unlock(store).registerPrivateActions(private_actions_namespaceObject); |
3528 unlock(store).registerPrivateActions(private_actions_namespaceObject); |
3543 |
3529 |
3544 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/components/command-menu.js |
3530 ;// ./node_modules/@wordpress/commands/build-module/components/command-menu.js |
3545 /** |
3531 /** |
3546 * External dependencies |
3532 * External dependencies |
3547 */ |
3533 */ |
3548 |
3534 |
3549 |
3535 |
3559 |
3545 |
3560 |
3546 |
3561 /** |
3547 /** |
3562 * Internal dependencies |
3548 * Internal dependencies |
3563 */ |
3549 */ |
3564 |
|
3565 |
|
3566 |
3550 |
3567 |
3551 |
3568 const inputLabel = (0,external_wp_i18n_namespaceObject.__)('Search commands and settings'); |
3552 const inputLabel = (0,external_wp_i18n_namespaceObject.__)('Search commands and settings'); |
3569 function CommandMenuLoader({ |
3553 function CommandMenuLoader({ |
3570 name, |
3554 name, |
3587 return null; |
3571 return null; |
3588 } |
3572 } |
3589 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
3573 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { |
3590 children: commands.map(command => { |
3574 children: commands.map(command => { |
3591 var _command$searchLabel; |
3575 var _command$searchLabel; |
3592 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Le.Item, { |
3576 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Item, { |
3593 value: (_command$searchLabel = command.searchLabel) !== null && _command$searchLabel !== void 0 ? _command$searchLabel : command.label, |
3577 value: (_command$searchLabel = command.searchLabel) !== null && _command$searchLabel !== void 0 ? _command$searchLabel : command.label, |
3594 onSelect: () => command.callback({ |
3578 onSelect: () => command.callback({ |
3595 close |
3579 close |
3596 }), |
3580 }), |
3597 id: command.name, |
3581 id: command.name, |
3622 // The "hook" prop is actually a custom React hook |
3606 // The "hook" prop is actually a custom React hook |
3623 // so to avoid breaking the rules of hooks |
3607 // so to avoid breaking the rules of hooks |
3624 // the CommandMenuLoaderWrapper component need to be |
3608 // the CommandMenuLoaderWrapper component need to be |
3625 // remounted on each hook prop change |
3609 // remounted on each hook prop change |
3626 // We use the key state to make sure we do that properly. |
3610 // We use the key state to make sure we do that properly. |
3627 const currentLoader = (0,external_wp_element_namespaceObject.useRef)(hook); |
3611 const currentLoaderRef = (0,external_wp_element_namespaceObject.useRef)(hook); |
3628 const [key, setKey] = (0,external_wp_element_namespaceObject.useState)(0); |
3612 const [key, setKey] = (0,external_wp_element_namespaceObject.useState)(0); |
3629 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3613 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3630 if (currentLoader.current !== hook) { |
3614 if (currentLoaderRef.current !== hook) { |
3631 currentLoader.current = hook; |
3615 currentLoaderRef.current = hook; |
3632 setKey(prevKey => prevKey + 1); |
3616 setKey(prevKey => prevKey + 1); |
3633 } |
3617 } |
3634 }, [hook]); |
3618 }, [hook]); |
3635 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuLoader, { |
3619 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuLoader, { |
3636 hook: currentLoader.current, |
3620 hook: currentLoaderRef.current, |
3637 search: search, |
3621 search: search, |
3638 setLoader: setLoader, |
3622 setLoader: setLoader, |
3639 close: close |
3623 close: close |
3640 }, key); |
3624 }, key); |
3641 } |
3625 } |
3659 }; |
3643 }; |
3660 }, [isContextual]); |
3644 }, [isContextual]); |
3661 if (!commands.length && !loaders.length) { |
3645 if (!commands.length && !loaders.length) { |
3662 return null; |
3646 return null; |
3663 } |
3647 } |
3664 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Le.Group, { |
3648 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(He.Group, { |
3665 children: [commands.map(command => { |
3649 children: [commands.map(command => { |
3666 var _command$searchLabel2; |
3650 var _command$searchLabel2; |
3667 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Le.Item, { |
3651 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Item, { |
3668 value: (_command$searchLabel2 = command.searchLabel) !== null && _command$searchLabel2 !== void 0 ? _command$searchLabel2 : command.label, |
3652 value: (_command$searchLabel2 = command.searchLabel) !== null && _command$searchLabel2 !== void 0 ? _command$searchLabel2 : command.label, |
3669 onSelect: () => command.callback({ |
3653 onSelect: () => command.callback({ |
3670 close |
3654 close |
3671 }), |
3655 }), |
3672 id: command.name, |
3656 id: command.name, |
3697 isOpen, |
3681 isOpen, |
3698 search, |
3682 search, |
3699 setSearch |
3683 setSearch |
3700 }) { |
3684 }) { |
3701 const commandMenuInput = (0,external_wp_element_namespaceObject.useRef)(); |
3685 const commandMenuInput = (0,external_wp_element_namespaceObject.useRef)(); |
3702 const _value = T(state => state.value); |
3686 const _value = dist_D(state => state.value); |
3703 const selectedItemId = (0,external_wp_element_namespaceObject.useMemo)(() => { |
3687 const selectedItemId = (0,external_wp_element_namespaceObject.useMemo)(() => { |
3704 const item = document.querySelector(`[cmdk-item=""][data-value="${_value}"]`); |
3688 const item = document.querySelector(`[cmdk-item=""][data-value="${_value}"]`); |
3705 return item?.getAttribute('id'); |
3689 return item?.getAttribute('id'); |
3706 }, [_value]); |
3690 }, [_value]); |
3707 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3691 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3708 // Focus the command palette input when mounting the modal. |
3692 // Focus the command palette input when mounting the modal. |
3709 if (isOpen) { |
3693 if (isOpen) { |
3710 commandMenuInput.current.focus(); |
3694 commandMenuInput.current.focus(); |
3711 } |
3695 } |
3712 }, [isOpen]); |
3696 }, [isOpen]); |
3713 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Le.Input, { |
3697 return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Input, { |
3714 ref: commandMenuInput, |
3698 ref: commandMenuInput, |
3715 value: search, |
3699 value: search, |
3716 onValueChange: setSearch, |
3700 onValueChange: setSearch, |
3717 placeholder: inputLabel, |
3701 placeholder: inputLabel, |
3718 "aria-activedescendant": selectedItemId, |
3702 "aria-activedescendant": selectedItemId, |
3732 const { |
3716 const { |
3733 open, |
3717 open, |
3734 close |
3718 close |
3735 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
3719 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
3736 const [loaders, setLoaders] = (0,external_wp_element_namespaceObject.useState)({}); |
3720 const [loaders, setLoaders] = (0,external_wp_element_namespaceObject.useState)({}); |
3737 const commandListRef = (0,external_wp_element_namespaceObject.useRef)(); |
|
3738 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3721 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3739 registerShortcut({ |
3722 registerShortcut({ |
3740 name: 'core/commands', |
3723 name: 'core/commands', |
3741 category: 'global', |
3724 category: 'global', |
3742 description: (0,external_wp_i18n_namespaceObject.__)('Open the command palette.'), |
3725 description: (0,external_wp_i18n_namespaceObject.__)('Open the command palette.'), |
3744 modifier: 'primary', |
3727 modifier: 'primary', |
3745 character: 'k' |
3728 character: 'k' |
3746 } |
3729 } |
3747 }); |
3730 }); |
3748 }, [registerShortcut]); |
3731 }, [registerShortcut]); |
3749 |
|
3750 // Temporary fix for the suggestions Listbox labeling. |
|
3751 // See https://github.com/pacocoursey/cmdk/issues/196 |
|
3752 (0,external_wp_element_namespaceObject.useEffect)(() => { |
|
3753 commandListRef.current?.removeAttribute('aria-labelledby'); |
|
3754 commandListRef.current?.setAttribute('aria-label', (0,external_wp_i18n_namespaceObject.__)('Command suggestions')); |
|
3755 }, [commandListRef.current]); |
|
3756 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/commands', /** @type {import('react').KeyboardEventHandler} */ |
3732 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/commands', /** @type {import('react').KeyboardEventHandler} */ |
3757 event => { |
3733 event => { |
3758 // Bails to avoid obscuring the effect of the preceding handler(s). |
3734 // Bails to avoid obscuring the effect of the preceding handler(s). |
3759 if (event.defaultPrevented) { |
3735 if (event.defaultPrevented) { |
3760 return; |
3736 return; |
3797 onRequestClose: closeAndReset, |
3773 onRequestClose: closeAndReset, |
3798 __experimentalHideHeader: true, |
3774 __experimentalHideHeader: true, |
3799 contentLabel: (0,external_wp_i18n_namespaceObject.__)('Command palette'), |
3775 contentLabel: (0,external_wp_i18n_namespaceObject.__)('Command palette'), |
3800 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
3776 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { |
3801 className: "commands-command-menu__container", |
3777 className: "commands-command-menu__container", |
3802 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Le, { |
3778 children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(He, { |
3803 label: inputLabel, |
3779 label: inputLabel, |
3804 onKeyDown: onKeyDown, |
3780 onKeyDown: onKeyDown, |
3805 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
3781 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { |
3806 className: "commands-command-menu__header", |
3782 className: "commands-command-menu__header", |
3807 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandInput, { |
3783 children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandInput, { |
3809 setSearch: setSearch, |
3785 setSearch: setSearch, |
3810 isOpen: isOpen |
3786 isOpen: isOpen |
3811 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { |
3787 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, { |
3812 icon: library_search |
3788 icon: library_search |
3813 })] |
3789 })] |
3814 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Le.List, { |
3790 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(He.List, { |
3815 ref: commandListRef, |
3791 label: (0,external_wp_i18n_namespaceObject.__)('Command suggestions'), |
3816 children: [search && !isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Le.Empty, { |
3792 children: [search && !isLoading && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Empty, { |
3817 children: (0,external_wp_i18n_namespaceObject.__)('No results found.') |
3793 children: (0,external_wp_i18n_namespaceObject.__)('No results found.') |
3818 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuGroup, { |
3794 }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CommandMenuGroup, { |
3819 search: search, |
3795 search: search, |
3820 setLoader: setLoader, |
3796 setLoader: setLoader, |
3821 close: closeAndReset, |
3797 close: closeAndReset, |
3829 }) |
3805 }) |
3830 }) |
3806 }) |
3831 }); |
3807 }); |
3832 } |
3808 } |
3833 |
3809 |
3834 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/hooks/use-command-context.js |
3810 ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command-context.js |
3835 /** |
3811 /** |
3836 * WordPress dependencies |
3812 * WordPress dependencies |
3837 */ |
3813 */ |
3838 |
3814 |
3839 |
3815 |
3867 const initialContextRef = initialContext.current; |
3843 const initialContextRef = initialContext.current; |
3868 return () => setContext(initialContextRef); |
3844 return () => setContext(initialContextRef); |
3869 }, [setContext]); |
3845 }, [setContext]); |
3870 } |
3846 } |
3871 |
3847 |
3872 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/private-apis.js |
3848 ;// ./node_modules/@wordpress/commands/build-module/private-apis.js |
3873 /** |
3849 /** |
3874 * Internal dependencies |
3850 * Internal dependencies |
3875 */ |
3851 */ |
3876 |
3852 |
3877 |
3853 |
3882 const privateApis = {}; |
3858 const privateApis = {}; |
3883 lock(privateApis, { |
3859 lock(privateApis, { |
3884 useCommandContext: useCommandContext |
3860 useCommandContext: useCommandContext |
3885 }); |
3861 }); |
3886 |
3862 |
3887 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/hooks/use-command.js |
3863 ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command.js |
3888 /** |
3864 /** |
3889 * WordPress dependencies |
3865 * WordPress dependencies |
3890 */ |
3866 */ |
3891 |
3867 |
3892 |
3868 |
3920 function useCommand(command) { |
3896 function useCommand(command) { |
3921 const { |
3897 const { |
3922 registerCommand, |
3898 registerCommand, |
3923 unregisterCommand |
3899 unregisterCommand |
3924 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
3900 } = (0,external_wp_data_namespaceObject.useDispatch)(store); |
3925 const currentCallback = (0,external_wp_element_namespaceObject.useRef)(command.callback); |
3901 const currentCallbackRef = (0,external_wp_element_namespaceObject.useRef)(command.callback); |
3926 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3902 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3927 currentCallback.current = command.callback; |
3903 currentCallbackRef.current = command.callback; |
3928 }, [command.callback]); |
3904 }, [command.callback]); |
3929 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3905 (0,external_wp_element_namespaceObject.useEffect)(() => { |
3930 if (command.disabled) { |
3906 if (command.disabled) { |
3931 return; |
3907 return; |
3932 } |
3908 } |
3934 name: command.name, |
3910 name: command.name, |
3935 context: command.context, |
3911 context: command.context, |
3936 label: command.label, |
3912 label: command.label, |
3937 searchLabel: command.searchLabel, |
3913 searchLabel: command.searchLabel, |
3938 icon: command.icon, |
3914 icon: command.icon, |
3939 callback: (...args) => currentCallback.current(...args) |
3915 callback: (...args) => currentCallbackRef.current(...args) |
3940 }); |
3916 }); |
3941 return () => { |
3917 return () => { |
3942 unregisterCommand(command.name); |
3918 unregisterCommand(command.name); |
3943 }; |
3919 }; |
3944 }, [command.name, command.label, command.searchLabel, command.icon, command.context, command.disabled, registerCommand, unregisterCommand]); |
3920 }, [command.name, command.label, command.searchLabel, command.icon, command.context, command.disabled, registerCommand, unregisterCommand]); |
3945 } |
3921 } |
3946 |
3922 |
3947 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/hooks/use-command-loader.js |
3923 ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command-loader.js |
3948 /** |
3924 /** |
3949 * WordPress dependencies |
3925 * WordPress dependencies |
3950 */ |
3926 */ |
3951 |
3927 |
3952 |
3928 |
4043 unregisterCommandLoader(loader.name); |
4019 unregisterCommandLoader(loader.name); |
4044 }; |
4020 }; |
4045 }, [loader.name, loader.hook, loader.context, loader.disabled, registerCommandLoader, unregisterCommandLoader]); |
4021 }, [loader.name, loader.hook, loader.context, loader.disabled, registerCommandLoader, unregisterCommandLoader]); |
4046 } |
4022 } |
4047 |
4023 |
4048 ;// CONCATENATED MODULE: ./node_modules/@wordpress/commands/build-module/index.js |
4024 ;// ./node_modules/@wordpress/commands/build-module/index.js |
4049 |
4025 |
4050 |
4026 |
4051 |
4027 |
4052 |
4028 |
4053 |
4029 |
4054 |
|
4055 })(); |
|
4056 |
4030 |
4057 (window.wp = window.wp || {}).commands = __webpack_exports__; |
4031 (window.wp = window.wp || {}).commands = __webpack_exports__; |
4058 /******/ })() |
4032 /******/ })() |
4059 ; |
4033 ; |