@stll/folio-vue 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ListButtons-BaILr4AO.js +3612 -0
- package/dist/ListButtons-CC7_7-e3.cjs +4 -0
- package/dist/WatermarkDialog-D-uTab0-.js +7022 -0
- package/dist/WatermarkDialog-SzyoSZmL.cjs +15 -0
- package/dist/components/DocxEditor/pagedEditorRef.d.ts +9 -4
- package/dist/components/DocxEditor/types.d.ts +25 -1
- package/dist/components/dialogs/index.d.ts +13 -9
- package/dist/components/tableStylePresets.d.ts +2 -6
- package/dist/composables/useDocxEditor.d.ts +2 -0
- package/dist/composables/useOutlineSidebar.d.ts +1 -0
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +5 -3
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1371 -1218
- package/dist/ui/folio-ui.d.ts +120 -8
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +14 -2
- package/dist/ui.js +97 -98
- package/dist/useZoom-8M2AQIMJ.cjs +1 -0
- package/dist/{useZoom-CIIRid8U.js → useZoom-BR--m9w3.js} +140 -140
- package/dist/utils/pageText.d.ts +14 -0
- package/package.json +1 -1
- package/dist/ListButtons-B498PX1d.js +0 -4256
- package/dist/ListButtons-D-zMJ7rl.cjs +0 -4
- package/dist/PageSetupDialog-CGBaBVzo.cjs +0 -15
- package/dist/PageSetupDialog-DsjAfJy0.js +0 -4873
- package/dist/TablePropertiesDialog-A-1Pm1f9.cjs +0 -1
- package/dist/TablePropertiesDialog-PyXEJC_o.js +0 -887
- package/dist/useZoom-BryUw3Cu.cjs +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);let t=require("vue"),n=require("prosemirror-state"),r=require("@stll/folio-core/i18n/messages"),i=require("@stll/folio-core/utils/units");var a=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function o(e,t){let n=t&&t.cache?t.cache:g,r=t&&t.serializer?t.serializer:m;return(t&&t.strategy?t.strategy:d)(e,{cache:n,serializer:r})}function s(e){return e==null||typeof e==`number`||typeof e==`boolean`}function c(e,t,n,r){let i=s(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function l(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function u(e,t,n,r,i){return n.bind(t,e,r,i)}function d(e,t){let n=e.length===1?c:l;return u(e,this,n,t.cache.create(),t.serializer)}function f(e,t){return u(e,this,l,t.cache.create(),t.serializer)}function p(e,t){return u(e,this,c,t.cache.create(),t.serializer)}var m=function(){return JSON.stringify(arguments)},h=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},g={create:function(){return new h}},_={variadic:f,monadic:p},v=class extends Error{constructor(e,t){let n=e;t&&(n+=`: `+t),super(n),this.code=e,t&&(this.originalMessage=t)}},y=function(e){return e.MISSING_MESSAGE=`MISSING_MESSAGE`,e.MISSING_FORMAT=`MISSING_FORMAT`,e.ENVIRONMENT_FALLBACK=`ENVIRONMENT_FALLBACK`,e.INSUFFICIENT_PATH=`INSUFFICIENT_PATH`,e.INVALID_MESSAGE=`INVALID_MESSAGE`,e.INVALID_KEY=`INVALID_KEY`,e.FORMATTING_ERROR=`FORMATTING_ERROR`,e}(y||{});function b(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function x(e,t){return o(e,{cache:(n=t,{create:()=>({get:e=>n[e],set(e,t){n[e]=t}})}),strategy:_.variadic});var n}function S(e,t){return x(((...t)=>new e(...t)),t)}function C(e){return{getDateTimeFormat:S(Intl.DateTimeFormat,e.dateTime),getNumberFormat:S(Intl.NumberFormat,e.number),getPluralRules:S(Intl.PluralRules,e.pluralRules),getRelativeTimeFormat:S(Intl.RelativeTimeFormat,e.relativeTime),getListFormat:S(Intl.ListFormat,e.list),getDisplayNames:S(Intl.DisplayNames,e.displayNames)}}var w=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),T=e(((e,t)=>{process.env.NODE_ENV!==`production`&&(function(){function n(e,t){Object.defineProperty(a.prototype,e,{get:function(){console.warn(`%s(...) is deprecated in plain JavaScript React classes. %s`,t[0],t[1])}})}function r(e){return typeof e!=`object`||!e?null:(e=B&&e[B]||e[`@@iterator`],typeof e==`function`?e:null)}function i(e,t){e=(e=e.constructor)&&(e.displayName||e.name)||`ReactClass`;var n=e+`.`+t;ce[n]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),ce[n]=!0)}function a(e,t,n){this.props=e,this.context=t,this.refs=U,this.updater=n||V}function o(){}function s(e,t,n){this.props=e,this.context=t,this.refs=U,this.updater=n||V}function c(){}function l(e){return``+e}function u(e){try{l(e);var t=!1}catch{t=!0}if(t){t=console;var n=t.error,r=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return n.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,r),l(e)}}function d(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case F:return`Fragment`;case I:return`Profiler`;case ne:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case P:return`Portal`;case re:return e.displayName||`Context`;case L:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case R:return t=e.displayName||null,t===null?d(e.type)||`Memo`:t;case z:t=e._payload,e=e._init;try{return d(e(t))}catch{}}return null}function f(e){if(e===F)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===z)return`<...>`;try{var t=d(e);return t?`<`+t+`>`:`<...>`}catch{return`<...>`}}function p(){var e=K.A;return e===null?null:e.getOwner()}function m(){return Error(`react-stack-top-frame`)}function h(e){if(q.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function g(e,t){function n(){J||(J=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function _(){var e=d(this.type);return fe[e]||(fe[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function v(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:N,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:_}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function y(e,t){return t=v(e.type,t,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(t._store.validated=e._store.validated),t}function b(e){x(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===z&&(e._payload.status===`fulfilled`?x(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function x(e){return typeof e==`object`&&!!e&&e.$$typeof===N}function S(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}function C(e,t){return typeof e==`object`&&e&&e.key!=null?(u(e.key),S(``+e.key)):t.toString(36)}function w(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(c,c):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function T(e,t,n,i,a){var o=typeof e;(o===`undefined`||o===`boolean`)&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case`bigint`:case`string`:case`number`:s=!0;break;case`object`:switch(e.$$typeof){case N:case P:s=!0;break;case z:return s=e._init,T(s(e._payload),t,n,i,a)}}if(s){s=e,a=a(s);var c=i===``?`.`+C(s,0):i;return G(a)?(n=``,c!=null&&(n=c.replace(ge,`$&/`)+`/`),T(a,t,n,``,function(e){return e})):a!=null&&(x(a)&&(a.key!=null&&(s&&s.key===a.key||u(a.key)),n=y(a,n+(a.key==null||s&&s.key===a.key?``:(``+a.key).replace(ge,`$&/`)+`/`)+c),i!==``&&s!=null&&x(s)&&s.key==null&&s._store&&!s._store.validated&&(n._store.validated=2),a=n),t.push(a)),1}if(s=0,c=i===``?`.`:i+`:`,G(e))for(var l=0;l<e.length;l++)i=e[l],o=c+C(i,l),s+=T(i,t,n,o,a);else if(l=r(e),typeof l==`function`)for(l===e.entries&&(he||console.warn(`Using Maps as children is not supported. Use an array of keyed ReactElements instead.`),he=!0),e=l.call(e),l=0;!(i=e.next()).done;)i=i.value,o=c+C(i,l++),s+=T(i,t,n,o,a);else if(o===`object`){if(typeof e.then==`function`)return T(w(e),t,n,i,a);throw t=String(e),Error(`Objects are not valid as a React child (found: `+(t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t)+`). If you meant to render a collection of children, use an array instead.`)}return s}function E(e,t,n){if(e==null)return e;var r=[],i=0;return T(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._ioInfo;t!=null&&(t.start=t.end=performance.now()),t=e._result;var n=t();if(n.then(function(t){if(e._status===0||e._status===-1){e._status=1,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now()),n.status===void 0&&(n.status=`fulfilled`,n.value=t)}},function(t){if(e._status===0||e._status===-1){e._status=2,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now()),n.status===void 0&&(n.status=`rejected`,n.reason=t)}}),t=e._ioInfo,t!=null){t.value=n;var r=n.displayName;typeof r==`string`&&(t.name=r)}e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return t=e._result,t===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
-
|
|
3
|
-
Your code should look like:
|
|
4
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
-
|
|
6
|
-
Did you accidentally put curly braces around the import?`,t),`default`in t||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
-
|
|
8
|
-
Your code should look like:
|
|
9
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,t),t.default;throw e._result}function D(){var e=K.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
-
2. You might be breaking the Rules of Hooks
|
|
12
|
-
3. You might have more than one copy of React in the same app
|
|
13
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function te(){K.asyncTransitions--}function O(e){if(Y===null)try{var n=(`require`+Math.random()).slice(0,7);Y=(t&&t[n]).call(t,`timers`).setImmediate}catch{Y=function(e){!1===ve&&(ve=!0,typeof MessageChannel>`u`&&console.error(`This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.`));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}return Y(e)}function k(e){return 1<e.length&&typeof AggregateError==`function`?AggregateError(e):e[0]}function A(e,t){t!==X-1&&console.error(`You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. `),X=t}function j(e,t,n){var r=K.actQueue;if(r!==null)if(r.length!==0)try{M(r),O(function(){return j(e,t,n)});return}catch(e){K.thrownErrors.push(e)}else K.actQueue=null;0<K.thrownErrors.length?(r=k(K.thrownErrors),K.thrownErrors.length=0,n(r)):t(e)}function M(e){if(!ye){ye=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{K.didUsePromise=!1;var r=n(!1);if(r!==null){if(K.didUsePromise){e[t]=n,e.splice(0,t);return}n=r}else break}while(1)}e.length=0}catch(n){e.splice(0,t+1),K.thrownErrors.push(n)}finally{ye=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var N=Symbol.for(`react.transitional.element`),P=Symbol.for(`react.portal`),F=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),I=Symbol.for(`react.profiler`),L=Symbol.for(`react.consumer`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),R=Symbol.for(`react.memo`),z=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),B=Symbol.iterator,ce={},V={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,`forceUpdate`)},enqueueReplaceState:function(e){i(e,`replaceState`)},enqueueSetState:function(e){i(e,`setState`)}},H=Object.assign,U={};Object.freeze(U),a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};var W={isMounted:[`isMounted`,`Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.`],replaceState:[`replaceState`,`Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).`]};for(Q in W)W.hasOwnProperty(Q)&&n(Q,W[Q]);o.prototype=a.prototype,W=s.prototype=new o,W.constructor=s,H(W,a.prototype),W.isPureReactComponent=!0;var G=Array.isArray,le=Symbol.for(`react.client.reference`),K={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},q=Object.prototype.hasOwnProperty,ue=console.createTask?console.createTask:function(){return null};W={react_stack_bottom_frame:function(e){return e()}};var J,de,fe={},pe=W.react_stack_bottom_frame.bind(W,m)(),me=ue(f(m)),he=!1,ge=/\/+/g,_e=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ve=!1,Y=null,X=0,Z=!1,ye=!1,be=typeof queueMicrotask==`function`?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:O;W=Object.freeze({__proto__:null,c:function(e){return D().useMemoCache(e)}});var Q={map:E,forEach:function(e,t,n){E(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return E(e,function(){t++}),t},toArray:function(e){return E(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=se,e.Children=Q,e.Component=a,e.Fragment=F,e.Profiler=I,e.PureComponent=s,e.StrictMode=ne,e.Suspense=ae,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,e.__COMPILER_RUNTIME=W,e.act=function(e){var t=K.actQueue,n=X;X++;var r=K.actQueue=t===null?[]:t,i=!1;try{var a=e()}catch(e){K.thrownErrors.push(e)}if(0<K.thrownErrors.length)throw A(t,n),e=k(K.thrownErrors),K.thrownErrors.length=0,e;if(typeof a==`object`&&a&&typeof a.then==`function`){var o=a;return be(function(){i||Z||(Z=!0,console.error(`You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);`))}),{then:function(e,a){i=!0,o.then(function(i){if(A(t,n),n===0){try{M(r),O(function(){return j(i,e,a)})}catch(e){K.thrownErrors.push(e)}if(0<K.thrownErrors.length){var o=k(K.thrownErrors);K.thrownErrors.length=0,a(o)}}else e(i)},function(e){A(t,n),0<K.thrownErrors.length?(e=k(K.thrownErrors),K.thrownErrors.length=0,a(e)):a(e)})}}}var s=a;if(A(t,n),n===0&&(M(r),r.length!==0&&be(function(){i||Z||(Z=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),K.actQueue=null),0<K.thrownErrors.length)throw e=k(K.thrownErrors),K.thrownErrors.length=0,e;return{then:function(e,t){i=!0,n===0?(K.actQueue=r,O(function(){return j(s,e,t)})):e(s)}}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.captureOwnerStack=function(){var e=K.getCurrentStack;return e===null?null:e()},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=H({},e.props),i=e.key,a=e._owner;if(t!=null){var o;a:{if(q.call(t,`ref`)&&(o=Object.getOwnPropertyDescriptor(t,`ref`).get)&&o.isReactWarning){o=!1;break a}o=t.ref!==void 0}for(s in o&&(a=p()),h(t)&&(u(t.key),i=``+t.key),t)!q.call(t,s)||s===`key`||s===`__self`||s===`__source`||s===`ref`&&t.ref===void 0||(r[s]=t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){o=Array(s);for(var c=0;c<s;c++)o[c]=arguments[c+2];r.children=o}for(r=v(e.type,i,r,a,e._debugStack,e._debugTask),i=2;i<arguments.length;i++)b(arguments[i]);return r},e.createContext=function(e){return e={$$typeof:re,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:L,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},e.createElement=function(e,t,n){for(var r=2;r<arguments.length;r++)b(arguments[r]);r={};var i=null;if(t!=null)for(c in de||!(`__self`in t)||`key`in t||(de=!0,console.warn(`Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform`)),h(t)&&(u(t.key),i=``+t.key),t)q.call(t,c)&&c!==`key`&&c!==`__self`&&c!==`__source`&&(r[c]=t[c]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];Object.freeze&&Object.freeze(o),r.children=o}if(e&&e.defaultProps)for(c in a=e.defaultProps,a)r[c]===void 0&&(r[c]=a[c]);i&&g(r,typeof e==`function`?e.displayName||e.name||`Unknown`:e);var c=1e4>K.recentlyCreatedOwnerStacks++;return v(e,i,r,p(),c?Error(`react-stack-top-frame`):pe,c?ue(f(e)):me)},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){e!=null&&e.$$typeof===R?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e==`function`?e.length!==0&&e.length!==2&&console.error(`forwardRef render functions accept exactly two parameters: props and ref. %s`,e.length===1?`Did you forget to use the ref parameter?`:`Any additional parameter will be undefined.`):console.error(`forwardRef requires a render function but was given %s.`,e===null?`null`:typeof e),e!=null&&e.defaultProps!=null&&console.error(`forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?`);var t={$$typeof:ie,render:e},n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.isValidElement=x,e.lazy=function(e){e={_status:-1,_result:e};var t={$$typeof:z,_payload:e,_init:ee},n={name:`lazy`,start:-1,end:-1,value:null,owner:null,debugStack:Error(`react-stack-top-frame`),debugTask:console.createTask?console.createTask(`lazy()`):null};return e._ioInfo=n,t._debugInfo=[{awaited:n}],t},e.memo=function(e,t){e??console.error(`memo: The first argument must be a component. Instead received: %s`,e===null?`null`:typeof e),t={$$typeof:R,type:e,compare:t===void 0?null:t};var n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.startTransition=function(e){var t=K.T,n={};n._updatedFibers=new Set,K.T=n;try{var r=e(),i=K.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&(K.asyncTransitions++,r.then(te,te),r.then(c,_e))}catch(e){_e(e)}finally{t===null&&n._updatedFibers&&(e=n._updatedFibers.size,n._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`)),t!==null&&n.types!==null&&(t.types!==null&&t.types!==n.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),t.types=n.types),K.T=t}},e.unstable_useCacheRefresh=function(){return D().useCacheRefresh()},e.use=function(e){return D().use(e)},e.useActionState=function(e,t,n){return D().useActionState(e,t,n)},e.useCallback=function(e,t){return D().useCallback(e,t)},e.useContext=function(e){var t=D();return e.$$typeof===L&&console.error(`Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?`),t.useContext(e)},e.useDebugValue=function(e,t){return D().useDebugValue(e,t)},e.useDeferredValue=function(e,t){return D().useDeferredValue(e,t)},e.useEffect=function(e,t){return e??console.warn(`React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?`),D().useEffect(e,t)},e.useEffectEvent=function(e){return D().useEffectEvent(e)},e.useId=function(){return D().useId()},e.useImperativeHandle=function(e,t,n){return D().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return e??console.warn(`React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?`),D().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return e??console.warn(`React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?`),D().useLayoutEffect(e,t)},e.useMemo=function(e,t){return D().useMemo(e,t)},e.useOptimistic=function(e,t){return D().useOptimistic(e,t)},e.useReducer=function(e,t,n){return D().useReducer(e,t,n)},e.useRef=function(e){return D().useRef(e)},e.useState=function(e){return D().useState(e)},e.useSyncExternalStore=function(e,t,n){return D().useSyncExternalStore(e,t,n)},e.useTransition=function(){return D().useTransition()},e.version=`19.2.7`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),E=e(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=w():t.exports=T()}))(),ee=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function D(e){let t={};return e.replace(ee,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var te=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function O(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(te).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function k(e){return e.replace(/^(.*?)-/,``)}var A=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,j=/^(@+)?(\+|#+)?[rs]?$/g,M=/(\*)(0+)|(#+)(0+)|(0+)/g,N=/^(0+)$/;function P(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(j,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function F(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function ne(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!N.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function I(e){return F(e)||{}}function L(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=k(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...I(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...I(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(M,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(N.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(A.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(A,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...P(e)});continue}if(j.test(n.stem)){t={...t,...P(n.stem)};continue}let e=F(n.stem);e&&(t={...t,...e});let r=ne(n.stem);r&&(t={...t,...r})}return t}var re=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function ie(e){return e.type===0}function ae(e){return e.type===1}function oe(e){return e.type===2}function R(e){return e.type===3}function z(e){return e.type===4}function se(e){return e.type===5}function B(e){return e.type===6}function ce(e){return e.type===7}function V(e){return e.type===8}function H(e){return!!(e&&typeof e==`object`&&e.type===0)}function U(e){return!!(e&&typeof e==`object`&&e.type===1)}var W=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,G={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function le(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=K(t);for((c==`H`||c==`k`)&&(s=0);s-- >0;)n+=`a`;for(;o-- >0;)n=c+n}else i===`J`?n+=`H`:n+=i}return n}function K(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(G[r||``]||G[n||``]||G[`${n}-001`]||G[`001`])[0]}var q=RegExp(`^${W.source}*`),ue=RegExp(`${W.source}*$`);function J(e,t){return{start:e,end:t}}var de=!!Object.fromEntries,fe=!!String.prototype.trimStart,pe=!!String.prototype.trimEnd,me=de?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},he=fe?function(e){return e.trimStart()}:function(e){return e.replace(q,``)},ge=pe?function(e){return e.trimEnd()}:function(e){return e.replace(ue,``)},_e=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function ve(e,t){return _e.lastIndex=t,_e.exec(e)[1]??``}function Y(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){let i=e.charCodeAt(r);switch(i){case 35:case 39:case 60:case 123:case 125:return null}if(i===10)t++,n=1,r++;else if(n++,i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);r+=t>=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var X=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=Y(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:J(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:J(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,J(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Z(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:J(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!Z(this.char()))return this.error(23,J(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:J(n,this.clonePosition())},err:null}:this.error(23,J(o,this.clonePosition()))):this.error(26,J(e,this.clonePosition()))}else return this.error(27,J(n,this.clonePosition()))}else return this.error(23,J(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&be(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=J(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ye(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,J(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,J(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,J(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,J(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:J(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,J(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,J(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=ve(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:J(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,J(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=ge(n.val);if(r.length===0)return this.error(6,J(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:J(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=J(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=he(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}else{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=le(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?D(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,J(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,J(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=J(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:me(c.val),location:u},err:null}:{val:{type:6,value:n,options:me(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,J(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,J(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,J(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump();break}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=O(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?L(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=J(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,J(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:J(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,J(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,J(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=J(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Q(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function Z(e){return e>=97&&e<=122||e>=65&&e<=90}function ye(e){return Z(e)||e===47}function be(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Q(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function xe(e){e.forEach(e=>{if(delete e.location,se(e)||B(e))for(let t in e.options)delete e.options[t].location,xe(e.options[t].value);else oe(e)&&H(e.style)||(R(e)||z(e))&&U(e.style)?delete e.style.location:V(e)&&xe(e.children)})}function Se(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new X(e,t).parse();if(n.err){let e=SyntaxError(re[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||xe(n.val),n.val}var Ce=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},we=class extends Ce{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},Te=class extends Ce{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},Ee=class extends Ce{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function De(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function Oe(e){return typeof e==`function`}function ke(e,t,n,r,i,a,o){if(e.length===1&&ie(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(ie(c)){s.push({type:0,value:c.value});continue}if(ce(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new Ee(e,o);let l=i[e];if(ae(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(R(c)){let e=typeof c.style==`string`?r.date[c.style]:U(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(z(c)){let e=typeof c.style==`string`?r.time[c.style]:U(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(oe(c)){let e=typeof c.style==`string`?r.number[c.style]:H(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(V(c)){let{children:e,value:l}=c,u=i[l];if(!Oe(u))throw new Te(l,`function`,o);let d=u(ke(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(se(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new we(c.value,l,Object.keys(c.options),o);s.push(...ke(a.value,t,n,r,i));continue}if(B(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new Ce(`Intl.PluralRules is not available in this environment.
|
|
14
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
15
|
-
`,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new we(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...ke(a.value,t,n,r,i,u-(c.offset||0)));continue}}return De(s)}function Ae(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function je(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=Ae(e[r],t[r]),n),{...e}):e}function Me(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function Ne(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:o((...e)=>new Intl.NumberFormat(...e),{cache:Me(e.number),strategy:_.variadic}),getDateTimeFormat:o((...e)=>new Intl.DateTimeFormat(...e),{cache:Me(e.dateTime),strategy:_.variadic}),getPluralRules:o((...e)=>new Intl.PluralRules(...e),{cache:Me(e.pluralRules),strategy:_.variadic})}}var Pe=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>ke(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=je(e.formats,r),this.formatters=i&&i.formatters||Ne(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}}static{this.__parse=Se}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}}}};function Fe(...[e,t,n,r]){if(Array.isArray(t))throw new v(y.INVALID_MESSAGE,void 0);if(typeof t==`object`)throw new v(y.INSUFFICIENT_PATH,void 0);if(typeof t==`string`){let e=function(e,t){return t||/'[{}]/.test(e)?void 0:e}(t,n);if(e)return e}let{cache:i,formats:a,formatters:o,globalFormats:s,locale:c,timeZone:l}=r,u;o.getMessageFormat||=function(e,t){return x(((...e)=>new Pe(e[0],e[1],e[2],{formatters:t,...e[3]})),e.message)}(i,o);try{u=o.getMessageFormat(t,c,function(e,t,n){let r=Pe.formats.date,i=Pe.formats.time,a={...e?.dateTime,...t?.dateTime},o={date:{...r,...a},time:{...i,...a},number:{...e?.number,...t?.number}};return n&&[`date`,`time`].forEach((e=>{let t=o[e];for(let[e,r]of Object.entries(t))t[e]={timeZone:n,...r}})),o}(s,a,l),{formatters:{...o,getDateTimeFormat:(e,t)=>o.getDateTimeFormat(e,{...t,timeZone:t?.timeZone??l})}})}catch{throw new v(y.INVALID_MESSAGE,void 0)}let d=u.format(n);return(0,E.isValidElement)(d)||Array.isArray(d)||typeof d==`string`?d:String(d)}Fe.raw=!0;function Ie(...e){return e.filter(Boolean).join(`.`)}function Le(e){return Ie(e.namespace,e.key)}function Re(e){console.error(e)}function ze(e,t,n,r){let i=Ie(r,n);if(!t)throw Error(i);let a=t;return n.split(`.`).forEach((t=>{let n=a[t];if(t==null||n==null)throw Error(i+` (${e})`);a=n})),a}function Be(e){let t=function(e,t,n){try{if(!t)throw Error(void 0);let r=n?ze(e,t,n):t;if(!r)throw Error(n);return r}catch(e){return new v(y.MISSING_MESSAGE,e.message)}}(e.locale,e.messages,e.namespace);return function({cache:e,formats:t,formatters:n,getMessageFallback:r=Le,locale:i,messagesOrError:a,namespace:o,onError:s,timeZone:c}){let l=a instanceof v;function u(e,t,n,i){let a=new v(t,n);return s(a),i??r({error:a,key:e,namespace:o})}function d(d,f,p,m){let h=m,g;if(l){if(!h)return s(a),r({error:a,key:d,namespace:o});g=h}else{let e=a;try{g=ze(i,e,d,o)}catch(e){if(!h)return u(d,y.MISSING_MESSAGE,e.message,h);g=h}}try{return Fe(Ie(o,d),g,f&&function(e){let t={};return Object.keys(e).forEach((n=>{let r=0,i=e[n],a;a=typeof i==`function`?e=>{let t=i(e);return(0,E.isValidElement)(t)?(0,E.cloneElement)(t,{key:n+ r++}):t}:i,t[n]=a})),t}(f),{cache:e,formatters:n,globalFormats:t,formats:p,locale:i,timeZone:c})}catch(e){let t,n;return e instanceof v?(t=e.code,n=e.originalMessage):(t=y.FORMATTING_ERROR,n=e.message),u(d,t,n,h)}}function f(e,t,n,r){let i=d(e,t,n,r);return typeof i==`string`?i:u(e,y.INVALID_MESSAGE,void 0)}return f.rich=d,f.markup=(e,t,n,r)=>d(e,t,n,r),f.raw=e=>{if(l)return s(a),r({error:a,key:e,namespace:o});let t=a;try{return ze(i,t,e,o)}catch(t){return u(e,y.MISSING_MESSAGE,t.message)}},f.has=e=>{if(l)return!1;try{return ze(i,a,e,o),!0}catch{return!1}},f}({...e,messagesOrError:t})}function Ve(e,t){return e===t?void 0:e.slice((t+`.`).length)}var He=86400;7*He,365*He;function Ue({_cache:e=b(),_formatters:t=C(e),getMessageFallback:n=Le,messages:r,namespace:i,onError:a=Re,...o}){return function({messages:e,namespace:t,...n},r){return e=e[r],t=Ve(t,r),Be({...n,messages:e,namespace:t})}({...o,onError:a,cache:e,formatters:t,getMessageFallback:n,messages:{"!":r},namespace:i?`!.${i}`:`!`},`!`)}var We=`en`,Ge=e=>Ue({locale:e,messages:(0,r.getFolioMessages)(e),namespace:`folio`}),Ke=Symbol(`folioTranslator`),qe=(0,t.computed)(()=>Ge(`en`)),Je=(e=`en`)=>{(0,t.provide)(Ke,(0,t.computed)(()=>Ge((0,t.toValue)(e))))},$=()=>{let e=(0,t.inject)(Ke,qe);return{t:(t,n)=>e.value(t,n)}},Ye={install(e,n=`en`){e.provide(Ke,(0,t.computed)(()=>Ge((0,t.toValue)(n))))}},Xe={class:`find-replace-dialog__header`},Ze={class:`find-replace-dialog__title`},Qe=[`title`],$e={class:`find-replace-dialog__body`},et={class:`find-replace-dialog__row`},tt=[`placeholder`,`aria-label`],nt={class:`find-replace-dialog__count`},rt=[`title`],it=[`title`],at={class:`find-replace-dialog__options`},ot=[`title`],st={key:0,class:`find-replace-dialog__row`},ct=[`placeholder`,`aria-label`,`onKeydown`],lt=[`title`],ut=[`title`],dt=a((0,t.defineComponent)({__name:`FindReplaceDialog`,props:{isOpen:{type:Boolean},view:{},scrollVisiblePositionIntoView:{type:Function}},emits:[`close`],setup(e,{emit:r}){let{t:i}=$(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(``),l=(0,t.ref)(``),u=(0,t.ref)(!1),d=(0,t.ref)(!1),f=(0,t.ref)(!1),p=(0,t.ref)([]),m=(0,t.ref)(-1),h=(0,t.computed)(()=>c.value.trim()?p.value.length===0?i(`findReplace.noResults`):m.value<0?i(`dialogs.findReplace.matchesFound`,{total:p.value.length}):i(`findReplace.matchCounter`,{current:m.value+1,total:p.value.length}):``);(0,t.watch)(()=>a.isOpen,async e=>{e?(await(0,t.nextTick)(),s.value?.focus(),s.value?.select(),_()):C()});function g(){C(),o(`close`)}function _(){p.value=[],m.value=-1;let e=a.view;if(!e||!c.value.trim()){C();return}let t=e.state.doc,n=c.value,r=!u.value,i=[];t.descendants((e,a)=>{if(!e.isTextblock)return!0;let o=t.textBetween(a+1,a+e.nodeSize-1,``,``);if(!o)return!1;let s=r?n.toLowerCase():n,c=r?o.toLowerCase():o,l=0;for(;l<c.length;){let e;if(d.value){let t=s.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),n=r?`gi`:`g`,i=RegExp(`\\b${t}\\b`,n);i.lastIndex=l;let a=i.exec(c);if(!a)break;e=a.index}else if(e=c.indexOf(s,l),e===-1)break;let t=a+1+e,o=t+n.length;i.push({from:t,to:o}),l=e+Math.max(1,n.length)}return!1}),p.value=i,i.length>0&&(m.value=0,v(0))}function v(e){let t=a.view;if(!t||p.value.length===0)return;let r=p.value.at(e);if(!r)return;m.value=e;let{from:i,to:o}=r;try{let e=t.state.doc.resolve(i),r=t.state.doc.resolve(o),s=n.TextSelection.between(e,r);t.dispatch(t.state.tr.setSelection(s)),a.scrollVisiblePositionIntoView?.(i)}catch{}}function y(){if(p.value.length===0){_();return}v((m.value+1)%p.value.length)}function b(){p.value.length!==0&&v((m.value-1+p.value.length)%p.value.length)}function x(){let e=a.view;if(!e||m.value<0||p.value.length===0)return;let t=p.value.at(m.value);if(t){try{let n=l.value?e.state.tr.replaceWith(t.from,t.to,e.state.schema.text(l.value)):e.state.tr.delete(t.from,t.to);e.dispatch(n)}catch{}_()}}function S(){let e=a.view;if(!e||p.value.length===0)return;let t=[...p.value].sort((e,t)=>t.from-e.from),n=e.state.tr;for(let r of t)try{n=l.value?n.replaceWith(r.from,r.to,e.state.schema.text(l.value)):n.delete(r.from,r.to)}catch{}e.dispatch(n),_()}function C(){p.value=[],m.value=-1}function w(e){e.key===`Enter`?(e.preventDefault(),e.shiftKey?b():y()):e.key===`Escape`&&g()}return(n,r)=>e.isOpen?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`find-replace-dialog`,onMousedown:r[5]||=(0,t.withModifiers)(()=>{},[`stop`]),onKeydown:r[6]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,Xe,[(0,t.createElementVNode)(`span`,Ze,(0,t.toDisplayString)(f.value?(0,t.unref)(i)(`findReplace.findAndReplace`):(0,t.unref)(i)(`findReplace.find`)),1),(0,t.createElementVNode)(`button`,{class:`find-replace-dialog__close`,onClick:g,title:(0,t.unref)(i)(`findReplace.close`)},` ✕ `,8,Qe)]),(0,t.createElementVNode)(`div`,$e,[(0,t.createElementVNode)(`div`,et,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{ref_key:`searchInputRef`,ref:s,"onUpdate:modelValue":r[0]||=e=>c.value=e,class:`find-replace-dialog__input`,placeholder:(0,t.unref)(i)(`findReplace.findPlaceholder`),"aria-label":(0,t.unref)(i)(`findReplace.findText`),onKeydown:w,onInput:_},null,40,tt),[[t.vModelText,c.value]]),(0,t.createElementVNode)(`span`,nt,(0,t.toDisplayString)(h.value),1),(0,t.createElementVNode)(`button`,{title:(0,t.unref)(i)(`findReplace.previous`),onMousedown:(0,t.withModifiers)(b,[`prevent`])},`▲`,40,rt),(0,t.createElementVNode)(`button`,{title:(0,t.unref)(i)(`findReplace.next`),onMousedown:(0,t.withModifiers)(y,[`prevent`])},`▼`,40,it)]),(0,t.createElementVNode)(`div`,at,[(0,t.createElementVNode)(`label`,null,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{type:`checkbox`,"onUpdate:modelValue":r[1]||=e=>u.value=e,onChange:_},null,544),[[t.vModelCheckbox,u.value]]),(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(i)(`findReplace.matchCase`)),1)]),(0,t.createElementVNode)(`label`,null,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{type:`checkbox`,"onUpdate:modelValue":r[2]||=e=>d.value=e,onChange:_},null,544),[[t.vModelCheckbox,d.value]]),(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(i)(`findReplace.wholeWords`)),1)]),(0,t.createElementVNode)(`button`,{class:(0,t.normalizeClass)([`find-replace-dialog__toggle`,{active:f.value}]),onMousedown:r[3]||=(0,t.withModifiers)(e=>f.value=!f.value,[`prevent`]),title:(0,t.unref)(i)(`dialogs.findReplace.toggleReplace`)},` ↔ `+(0,t.toDisplayString)((0,t.unref)(i)(`dialogs.findReplace.replaceButton`)),43,ot)]),f.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,st,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":r[4]||=e=>l.value=e,class:`find-replace-dialog__input`,placeholder:(0,t.unref)(i)(`findReplace.replacePlaceholder`),"aria-label":(0,t.unref)(i)(`findReplace.replaceText`),onKeydown:(0,t.withKeys)((0,t.withModifiers)(x,[`prevent`]),[`enter`])},null,40,ct),[[t.vModelText,l.value]]),(0,t.createElementVNode)(`button`,{title:(0,t.unref)(i)(`findReplace.replaceCurrent`),onMousedown:(0,t.withModifiers)(x,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(i)(`dialogs.findReplace.replaceButton`)),41,lt),(0,t.createElementVNode)(`button`,{title:(0,t.unref)(i)(`findReplace.replaceAll`),onMousedown:(0,t.withModifiers)(S,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(i)(`findReplace.replaceAll`)),41,ut)])):(0,t.createCommentVNode)(``,!0)])],32)):(0,t.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-def26526`]]),ft={class:`dialog__header`},pt={class:`dialog__title`},mt=[`aria-label`],ht={class:`dialog__body`},gt={key:0,class:`link-tabs`,role:`tablist`},_t=[`aria-selected`],vt=[`aria-selected`],yt={key:1,class:`field`},bt={class:`field__label`},xt=[`placeholder`,`aria-invalid`,`onKeydown`],St={key:0,class:`field__error`},Ct={key:1,class:`field__hint`},wt={key:2,class:`field`},Tt={class:`field__label`},Et=[`onKeydown`],Dt={value:``},Ot=[`value`],kt={class:`field`},At={class:`field__label`},jt=[`placeholder`],Mt={class:`field__hint`},Nt={class:`field`},Pt={class:`field__label`},Ft=[`placeholder`],It={class:`dialog__actions`},Lt=[`disabled`],Rt=a((0,t.defineComponent)({__name:`HyperlinkDialog`,props:{isOpen:{type:Boolean},view:{},bookmarks:{}},emits:[`close`,`submit`,`remove`],setup(e,{emit:n}){let{t:r}=$(),i=e,a=n,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)(`url`),l=(0,t.ref)(``),u=(0,t.ref)(``),d=(0,t.ref)(``),f=(0,t.ref)(``),p=(0,t.ref)(!1),m=(0,t.ref)(``),h=(0,t.ref)(!1),g=(0,t.computed)(()=>i.bookmarks??[]),_=(0,t.computed)(()=>c.value===`bookmark`?!!u.value:!!l.value.trim()&&!m.value);(0,t.watch)(l,()=>{m.value&&=``});function v(e){let t=e.trim();if(!t)return!1;if(/^(mailto:|tel:)/i.test(t))return t.replace(/^(mailto:|tel:)/i,``).length>0;if(/^ftp:\/\//i.test(t))return t.length>6;try{let e=new URL(/^https?:\/\//i.test(t)?t:`https://${t}`);return e.protocol===`http:`||e.protocol===`https:`}catch{return!1}}function y(e){let t=e.trim();return/^(https?:\/\/|mailto:|tel:|ftp:\/\/)/i.test(t)?t:`https://${t}`}(0,t.watch)(()=>i.isOpen,async e=>{if(e){let e=i.view;if(e){let{$from:t,empty:n,from:r,to:i}=e.state.selection,a=(e.state.storedMarks||t.marks()).find(e=>e.type.name===`hyperlink`);if(a){let e=a.attrs.href||``;e.startsWith(`#`)?(c.value=`bookmark`,u.value=e.slice(1),l.value=``):(c.value=`url`,l.value=e,u.value=``),f.value=a.attrs.tooltip||``,p.value=!0}else c.value=`url`,l.value=``,u.value=``,f.value=``,p.value=!1;n?d.value=``:d.value=e.state.doc.textBetween(r,i)}await(0,t.nextTick)(),c.value===`bookmark`?s.value?.focus():o.value?.focus()}else h.value=!1,m.value=``});function b(){a(`close`)}function x(){if(c.value===`bookmark`){if(!u.value)return;a(`submit`,{bookmark:u.value,displayText:d.value,tooltip:f.value}),b();return}if(h.value=!0,!v(l.value)){m.value=l.value.trim()?r(`dialogs.hyperlink.invalidUrl`):r(`dialogs.hyperlink.urlRequired`);return}a(`submit`,{url:y(l.value),displayText:d.value,tooltip:f.value}),b()}function S(){if(c.value===`url`){if(h.value=!0,!l.value.trim()){m.value=``;return}m.value=v(l.value)?``:r(`dialogs.hyperlink.invalidUrl`)}}function C(){a(`remove`),b()}return(n,i)=>e.isOpen?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`dialog-overlay`,onMousedown:(0,t.withModifiers)(b,[`self`])},[(0,t.createElementVNode)(`div`,{class:`dialog`,onMousedown:i[6]||=(0,t.withModifiers)(()=>{},[`stop`]),onKeydown:i[7]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,ft,[(0,t.createElementVNode)(`span`,pt,(0,t.toDisplayString)(p.value?(0,t.unref)(r)(`dialogs.hyperlink.titleEdit`):(0,t.unref)(r)(`dialogs.hyperlink.titleInsert`)),1),(0,t.createElementVNode)(`button`,{class:`dialog__close`,"aria-label":(0,t.unref)(r)(`common.closeDialog`),onClick:b},` ✕ `,8,mt)]),(0,t.createElementVNode)(`div`,ht,[g.value.length>0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,gt,[(0,t.createElementVNode)(`button`,{class:(0,t.normalizeClass)([`link-tab`,{active:c.value===`url`}]),role:`tab`,"aria-selected":c.value===`url`,onMousedown:i[0]||=(0,t.withModifiers)(e=>c.value=`url`,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.tabWebAddress`)),43,_t),(0,t.createElementVNode)(`button`,{class:(0,t.normalizeClass)([`link-tab`,{active:c.value===`bookmark`}]),role:`tab`,"aria-selected":c.value===`bookmark`,onMousedown:i[1]||=(0,t.withModifiers)(e=>c.value=`bookmark`,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.tabBookmark`)),43,vt)])):(0,t.createCommentVNode)(``,!0),c.value===`url`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yt,[(0,t.createElementVNode)(`label`,bt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.urlLabel`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{ref_key:`urlInputRef`,ref:o,"onUpdate:modelValue":i[2]||=e=>l.value=e,class:(0,t.normalizeClass)([`field__input`,{"field__input--error":h.value&&!!m.value}]),placeholder:(0,t.unref)(r)(`dialogs.hyperlink.urlPlaceholder`),"aria-invalid":h.value&&!!m.value,onKeydown:(0,t.withKeys)((0,t.withModifiers)(x,[`prevent`]),[`enter`]),onBlur:S},null,42,xt),[[t.vModelText,l.value]]),h.value&&m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,St,(0,t.toDisplayString)(m.value),1)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ct,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.urlHint`)),1))])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,wt,[(0,t.createElementVNode)(`label`,Tt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.bookmarkLabel`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`select`,{ref_key:`bookmarkSelectRef`,ref:s,"onUpdate:modelValue":i[3]||=e=>u.value=e,class:`field__input`,onKeydown:(0,t.withKeys)((0,t.withModifiers)(x,[`prevent`]),[`enter`])},[(0,t.createElementVNode)(`option`,Dt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.bookmarkPlaceholder`)),1),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(g.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:e.name,value:e.name},(0,t.toDisplayString)(e.label||e.name),9,Ot))),128))],40,Et),[[t.vModelSelect,u.value]])])),(0,t.createElementVNode)(`div`,kt,[(0,t.createElementVNode)(`label`,At,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.displayTextLabel`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":i[4]||=e=>d.value=e,class:`field__input`,placeholder:(0,t.unref)(r)(`dialogs.hyperlink.displayTextPlaceholder`)},null,8,jt),[[t.vModelText,d.value]]),(0,t.createElementVNode)(`div`,Mt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.displayTextHint`)),1)]),(0,t.createElementVNode)(`div`,Nt,[(0,t.createElementVNode)(`label`,Pt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.tooltipLabel`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":i[5]||=e=>f.value=e,class:`field__input`,placeholder:(0,t.unref)(r)(`dialogs.hyperlink.tooltipPlaceholder`)},null,8,Ft),[[t.vModelText,f.value]])]),(0,t.createElementVNode)(`div`,It,[p.value?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:0,class:`dialog__btn dialog__btn--danger`,onMousedown:(0,t.withModifiers)(C,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.hyperlink.removeLink`)),33)):(0,t.createCommentVNode)(``,!0),i[8]||=(0,t.createElementVNode)(`div`,{style:{flex:`1`}},null,-1),(0,t.createElementVNode)(`button`,{class:`dialog__btn`,onClick:b},(0,t.toDisplayString)((0,t.unref)(r)(`common.cancel`)),1),(0,t.createElementVNode)(`button`,{class:`dialog__btn dialog__btn--primary`,onMousedown:(0,t.withModifiers)(x,[`prevent`]),disabled:!_.value},(0,t.toDisplayString)(p.value?(0,t.unref)(r)(`common.update`):(0,t.unref)(r)(`common.insert`)),41,Lt)])])],32)],32)):(0,t.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-933171e9`]]),zt={class:`dialog__header`},Bt={class:`dialog__title`},Vt=[`aria-label`],Ht={class:`dialog__body`},Ut={class:`field`},Wt={class:`field__label`},Gt=[`placeholder`],Kt={class:`field`},qt={class:`field__label`},Jt={value:`inline`},Yt={value:`wrapRight`},Xt={value:`wrapLeft`},Zt={value:`topAndBottom`},Qt={value:`behind`},$t={value:`inFront`},en={class:`field`},tn={class:`field__label`},nn={class:`field-row`},rn={value:`solid`},an={value:`dashed`},on={value:`dotted`},sn={value:`double`},cn={class:`field`},ln={class:`field__label`},un={class:`field-row`},dn=[`value`],fn=[`value`],pn={class:`field__checkbox`},mn={class:`dialog__actions`},hn=a((0,t.defineComponent)({__name:`ImagePropertiesDialog`,props:{isOpen:{type:Boolean},view:{},pmPos:{}},emits:[`close`],setup(e,{emit:n}){let{t:r}=$(),i=e,a=n,o=(0,t.ref)(``),s=(0,t.ref)(`inline`),c=(0,t.ref)(0),l=(0,t.ref)(`solid`),u=(0,t.ref)(`#000000`),d=(0,t.ref)(200),f=(0,t.ref)(150),p=(0,t.ref)(!0),m=1;(0,t.watch)(()=>i.isOpen,e=>{if(!(!e||!i.view||i.pmPos===null))try{let e=i.view.state.doc.nodeAt(i.pmPos);if(e&&e.type.name===`image`){let t=e.attrs;o.value=t.alt||``,c.value=t.borderWidth||0,l.value=t.borderStyle||`solid`,u.value=t.borderColor||`#000000`,d.value=t.width||200,f.value=t.height||150,m=d.value/(f.value||1),p.value=!0;let n=t.displayMode,r=t.cssFloat,i=t.wrapType;n===`float`&&r===`left`?s.value=`wrapRight`:n===`float`&&r===`right`?s.value=`wrapLeft`:n===`block`?s.value=`topAndBottom`:i===`behind`?s.value=`behind`:i===`inFront`?s.value=`inFront`:s.value=`inline`}}catch{}});function h(e){if(!(e.target instanceof HTMLInputElement))return;let t=Number(e.target.value);isNaN(t)||t<1||(d.value=t,p.value&&m>0&&(f.value=Math.round(t/m)))}function g(e){if(!(e.target instanceof HTMLInputElement))return;let t=Number(e.target.value);isNaN(t)||t<1||(f.value=t,p.value&&m>0&&(d.value=Math.round(t*m)))}function _(){a(`close`)}function v(){let e=i.view;if(!(!e||i.pmPos===null)){try{let t=e.state.doc.nodeAt(i.pmPos);if(!t||t.type.name!==`image`)return;let n=`inline`,r=null,a=`inline`;switch(s.value){case`wrapRight`:n=`float`,r=`left`,a=`square`;break;case`wrapLeft`:n=`float`,r=`right`,a=`square`;break;case`topAndBottom`:n=`block`,a=`topAndBottom`;break;case`behind`:n=`float`,r=`none`,a=`behind`;break;case`inFront`:n=`float`,r=`none`,a=`inFront`;break;default:n=`inline`,a=`inline`;break}let p=e.state.tr.setNodeMarkup(i.pmPos,void 0,{...t.attrs,alt:o.value,width:d.value,height:f.value,borderWidth:c.value||void 0,borderStyle:c.value>0?l.value:void 0,borderColor:c.value>0?u.value:void 0,displayMode:n,cssFloat:r,wrapType:a});e.dispatch(p)}catch{}_()}}return(n,i)=>e.isOpen?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`dialog-overlay`,onMousedown:(0,t.withModifiers)(_,[`self`])},[(0,t.createElementVNode)(`div`,{class:`dialog`,onMousedown:i[6]||=(0,t.withModifiers)(()=>{},[`stop`]),onKeydown:i[7]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,zt,[(0,t.createElementVNode)(`span`,Bt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.title`)),1),(0,t.createElementVNode)(`button`,{class:`dialog__close`,"aria-label":(0,t.unref)(r)(`common.closeDialog`),onClick:_},` ✕ `,8,Vt)]),(0,t.createElementVNode)(`div`,Ht,[(0,t.createElementVNode)(`div`,Ut,[(0,t.createElementVNode)(`label`,Wt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.altText`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`textarea`,{"onUpdate:modelValue":i[0]||=e=>o.value=e,class:`field__textarea`,placeholder:(0,t.unref)(r)(`dialogs.imageProperties.altTextPlaceholder`),rows:`2`},null,8,Gt),[[t.vModelText,o.value]])]),(0,t.createElementVNode)(`div`,Kt,[(0,t.createElementVNode)(`label`,qt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.textWrapping`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`select`,{"onUpdate:modelValue":i[1]||=e=>s.value=e,class:`field__select`},[(0,t.createElementVNode)(`option`,Jt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.wrapOptions.inline`)),1),(0,t.createElementVNode)(`option`,Yt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.wrapOptions.wrapRight`)),1),(0,t.createElementVNode)(`option`,Xt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.wrapOptions.wrapLeft`)),1),(0,t.createElementVNode)(`option`,Zt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.wrapOptions.topAndBottom`)),1),(0,t.createElementVNode)(`option`,Qt,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.wrapOptions.behind`)),1),(0,t.createElementVNode)(`option`,$t,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.wrapOptions.inFront`)),1)],512),[[t.vModelSelect,s.value]])]),(0,t.createElementVNode)(`div`,en,[(0,t.createElementVNode)(`label`,tn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.border`)),1),(0,t.createElementVNode)(`div`,nn,[(0,t.createElementVNode)(`label`,null,[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.width`))+`: `,1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":i[2]||=e=>c.value=e,type:`number`,min:`0`,max:`20`,step:`0.5`,class:`field__input--small`},null,512),[[t.vModelText,c.value,void 0,{number:!0}]]),(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`common.px`)),1)]),(0,t.createElementVNode)(`label`,null,[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.style`))+`: `,1),(0,t.withDirectives)((0,t.createElementVNode)(`select`,{"onUpdate:modelValue":i[3]||=e=>l.value=e,class:`field__select--small`},[(0,t.createElementVNode)(`option`,rn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.borderStyles.solid`)),1),(0,t.createElementVNode)(`option`,an,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.borderStyles.dashed`)),1),(0,t.createElementVNode)(`option`,on,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.borderStyles.dotted`)),1),(0,t.createElementVNode)(`option`,sn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.borderStyles.double`)),1)],512),[[t.vModelSelect,l.value]])]),(0,t.createElementVNode)(`label`,null,[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.color`))+`: `,1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":i[4]||=e=>u.value=e,type:`color`,class:`field__color`},null,512),[[t.vModelText,u.value]])])])]),(0,t.createElementVNode)(`div`,cn,[(0,t.createElementVNode)(`label`,ln,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.dimensions`)),1),(0,t.createElementVNode)(`div`,un,[(0,t.createElementVNode)(`label`,null,[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.widthLabel`))+` `,1),(0,t.createElementVNode)(`input`,{value:d.value,type:`number`,min:`1`,max:`2000`,class:`field__input--small`,onInput:h},null,40,dn),(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`common.px`)),1)]),(0,t.createElementVNode)(`label`,null,[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.heightLabel`))+` `,1),(0,t.createElementVNode)(`input`,{value:f.value,type:`number`,min:`1`,max:`2000`,class:`field__input--small`,onInput:g},null,40,fn),(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(r)(`common.px`)),1)])]),(0,t.createElementVNode)(`label`,pn,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{"onUpdate:modelValue":i[5]||=e=>p.value=e,type:`checkbox`},null,512),[[t.vModelCheckbox,p.value]]),(0,t.createTextVNode)(` `+(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.imageProperties.lockAspectRatio`)),1)])]),(0,t.createElementVNode)(`div`,mn,[(0,t.createElementVNode)(`button`,{class:`dialog__btn`,onClick:_},(0,t.toDisplayString)((0,t.unref)(r)(`common.cancel`)),1),(0,t.createElementVNode)(`button`,{class:`dialog__btn dialog__btn--primary`,onMousedown:(0,t.withModifiers)(v,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(r)(`common.apply`)),33)])])],32)],32)):(0,t.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-344c90fe`]]),gn={class:`dialog__header`},_n={class:`dialog__title`},vn=[`title`],yn={class:`dialog__body`},bn=[`placeholder`],xn={key:0,class:`symbol-tabs`},Sn=[`onMousedown`],Cn={class:`symbol-grid`},wn=[`title`,`onClick`,`onDblclick`],Tn={key:0,class:`symbol-empty`},En={key:1,class:`symbol-preview`},Dn={class:`symbol-preview__char`},On={class:`symbol-preview__info`},kn={key:2,class:`symbol-recent`},An={class:`symbol-recent__label`},jn=[`onDblclick`,`onClick`],Mn={class:`dialog__actions`},Nn=[`disabled`],Pn=a((0,t.defineComponent)({__name:`InsertSymbolDialog`,props:{isOpen:{type:Boolean}},emits:[`close`,`insert`],setup(e,{emit:n}){let{t:r}=$(),i=e,a=n,o=(0,t.ref)(null),s=(0,t.ref)(``),c=(0,t.ref)(`Common`),l=(0,t.ref)(``),u=(0,t.ref)([]),d=[{name:`Common`,nameKey:`dialogs.insertSymbol.categories.common`,symbols:[{char:`©`,name:`Copyright`},{char:`®`,name:`Registered`},{char:`™`,name:`Trademark`},{char:`•`,name:`Bullet`},{char:`…`,name:`Ellipsis`},{char:`—`,name:`Em dash`},{char:`–`,name:`En dash`},{char:`±`,name:`Plus-minus`},{char:`×`,name:`Multiply`},{char:`÷`,name:`Divide`},{char:`≠`,name:`Not equal`},{char:`≈`,name:`Approximately`},{char:`≤`,name:`Less or equal`},{char:`≥`,name:`Greater or equal`},{char:`°`,name:`Degree`},{char:`µ`,name:`Micro`},{char:`¶`,name:`Pilcrow`},{char:`§`,name:`Section`},{char:`†`,name:`Dagger`},{char:`‡`,name:`Double dagger`},{char:`¿`,name:`Inverted question`},{char:`¡`,name:`Inverted exclamation`},{char:`‰`,name:`Per mille`},{char:`∞`,name:`Infinity`}]},{name:`Arrows`,nameKey:`dialogs.insertSymbol.categories.arrows`,symbols:[{char:`←`,name:`Left`},{char:`→`,name:`Right`},{char:`↑`,name:`Up`},{char:`↓`,name:`Down`},{char:`↔`,name:`Left-right`},{char:`↕`,name:`Up-down`},{char:`⇐`,name:`Double left`},{char:`⇒`,name:`Double right`},{char:`⇑`,name:`Double up`},{char:`⇓`,name:`Double down`},{char:`⇔`,name:`Double left-right`},{char:`➡`,name:`Heavy right`},{char:`↩`,name:`Return`},{char:`↪`,name:`Curved right`},{char:`↻`,name:`Clockwise`},{char:`↺`,name:`Counter-clockwise`}]},{name:`Math`,nameKey:`dialogs.insertSymbol.categories.math`,symbols:[{char:`∑`,name:`Summation`},{char:`∏`,name:`Product`},{char:`∫`,name:`Integral`},{char:`√`,name:`Square root`},{char:`∂`,name:`Partial diff`},{char:`∇`,name:`Nabla`},{char:`∈`,name:`Element of`},{char:`∉`,name:`Not element`},{char:`⊂`,name:`Subset`},{char:`⊃`,name:`Superset`},{char:`∪`,name:`Union`},{char:`∩`,name:`Intersection`},{char:`∧`,name:`And`},{char:`∨`,name:`Or`},{char:`¬`,name:`Not`},{char:`∀`,name:`For all`},{char:`∃`,name:`Exists`},{char:`∅`,name:`Empty set`},{char:`∝`,name:`Proportional`},{char:`∠`,name:`Angle`}]},{name:`Greek`,nameKey:`dialogs.insertSymbol.categories.greek`,symbols:[{char:`α`,name:`alpha`},{char:`β`,name:`beta`},{char:`γ`,name:`gamma`},{char:`δ`,name:`delta`},{char:`ε`,name:`epsilon`},{char:`ζ`,name:`zeta`},{char:`η`,name:`eta`},{char:`θ`,name:`theta`},{char:`λ`,name:`lambda`},{char:`μ`,name:`mu`},{char:`π`,name:`pi`},{char:`ρ`,name:`rho`},{char:`σ`,name:`sigma`},{char:`τ`,name:`tau`},{char:`φ`,name:`phi`},{char:`ψ`,name:`psi`},{char:`ω`,name:`omega`},{char:`Δ`,name:`Delta`},{char:`Σ`,name:`Sigma`},{char:`Ω`,name:`Omega`},{char:`Π`,name:`Pi`},{char:`Φ`,name:`Phi`},{char:`Ψ`,name:`Psi`},{char:`Θ`,name:`Theta`}]},{name:`Currency`,nameKey:`dialogs.insertSymbol.categories.currency`,symbols:[{char:`$`,name:`Dollar`},{char:`€`,name:`Euro`},{char:`£`,name:`Pound`},{char:`¥`,name:`Yen`},{char:`₹`,name:`Rupee`},{char:`₽`,name:`Ruble`},{char:`₩`,name:`Won`},{char:`₿`,name:`Bitcoin`},{char:`¢`,name:`Cent`},{char:`₫`,name:`Dong`},{char:`₺`,name:`Lira`},{char:`₴`,name:`Hryvnia`}]},{name:`Shapes`,nameKey:`dialogs.insertSymbol.categories.shapes`,symbols:[{char:`■`,name:`Black square`},{char:`□`,name:`White square`},{char:`▲`,name:`Up triangle`},{char:`▼`,name:`Down triangle`},{char:`●`,name:`Black circle`},{char:`○`,name:`White circle`},{char:`◆`,name:`Black diamond`},{char:`◇`,name:`White diamond`},{char:`★`,name:`Black star`},{char:`☆`,name:`White star`},{char:`♠`,name:`Spade`},{char:`♥`,name:`Heart`},{char:`♦`,name:`Diamond`},{char:`♣`,name:`Club`},{char:`✓`,name:`Check mark`},{char:`✗`,name:`Ballot X`},{char:`✦`,name:`Four pointed star`},{char:`◌`,name:`Dotted circle`}]}],f=(0,t.computed)(()=>{let e=[];for(let t of d)for(let n of t.symbols)e.push({...n,category:t.name});return e}),p=(0,t.computed)(()=>{if(s.value){let e=s.value.toLowerCase();return f.value.filter(t=>t.name.toLowerCase().includes(e)||t.char===e)}let e=d.find(e=>e.name===c.value);return e?e.symbols.map(t=>({...t,category:e.name})):[]});(0,t.watch)(()=>i.isOpen,async e=>{e&&(await(0,t.nextTick)(),o.value?.focus())});function m(){a(`close`)}function h(e){e&&(u.value=[e,...u.value.filter(t=>t!==e)].slice(0,10),a(`insert`,e))}return(n,i)=>e.isOpen?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`dialog-overlay`,onMousedown:(0,t.withModifiers)(m,[`self`])},[(0,t.createElementVNode)(`div`,{class:`dialog symbol-dialog`,onMousedown:i[2]||=(0,t.withModifiers)(()=>{},[`stop`]),onKeydown:i[3]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,gn,[(0,t.createElementVNode)(`span`,_n,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.insertSymbol.title`)),1),(0,t.createElementVNode)(`button`,{class:`dialog__close`,title:(0,t.unref)(r)(`common.closeDialog`),onClick:m},`✕`,8,vn)]),(0,t.createElementVNode)(`div`,yn,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{ref_key:`searchRef`,ref:o,"onUpdate:modelValue":i[0]||=e=>s.value=e,class:`symbol-search`,placeholder:(0,t.unref)(r)(`dialogs.insertSymbol.searchPlaceholder`),onKeydown:(0,t.withKeys)(m,[`escape`])},null,40,bn),[[t.vModelText,s.value]]),s.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,xn,[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d,e=>(0,t.createElementVNode)(`button`,{key:e.name,class:(0,t.normalizeClass)([`symbol-tab`,{active:c.value===e.name}]),onMousedown:(0,t.withModifiers)(t=>c.value=e.name,[`prevent`])},(0,t.toDisplayString)((0,t.unref)(r)(e.nameKey)),43,Sn)),64))])),(0,t.createElementVNode)(`div`,Cn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(p.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:e.char,class:(0,t.normalizeClass)([`symbol-cell`,{selected:l.value===e.char}]),title:e.name,onClick:t=>l.value=e.char,onDblclick:t=>h(e.char)},(0,t.toDisplayString)(e.char),43,wn))),128)),p.value.length===0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Tn,(0,t.toDisplayString)(s.value?(0,t.unref)(r)(`dialogs.insertSymbol.noResults`,{query:s.value}):(0,t.unref)(r)(`dialogs.insertSymbol.noResultsEmpty`)),1)):(0,t.createCommentVNode)(``,!0)]),l.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,En,[(0,t.createElementVNode)(`span`,Dn,(0,t.toDisplayString)(l.value),1),(0,t.createElementVNode)(`span`,On,`U+`+(0,t.toDisplayString)(l.value.codePointAt(0)?.toString(16).toUpperCase().padStart(4,`0`)),1)])):(0,t.createCommentVNode)(``,!0),u.value.length>0&&!s.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kn,[(0,t.createElementVNode)(`div`,An,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.insertSymbol.recent`)),1),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(u.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:e,class:`symbol-cell symbol-cell--small`,onDblclick:t=>h(e),onClick:t=>l.value=e},(0,t.toDisplayString)(e),41,jn))),128))])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Mn,[(0,t.createElementVNode)(`button`,{class:`dialog__btn`,onClick:m},(0,t.toDisplayString)((0,t.unref)(r)(`common.cancel`)),1),(0,t.createElementVNode)(`button`,{class:`dialog__btn dialog__btn--primary`,onMousedown:i[1]||=(0,t.withModifiers)(e=>h(l.value),[`prevent`]),disabled:!l.value},(0,t.toDisplayString)((0,t.unref)(r)(`common.insert`)),41,Nn)])])],32)],32)):(0,t.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-227ee4aa`]]),Fn=[`aria-label`],In={class:`ps-header`},Ln={class:`ps-body`},Rn={class:`ps-section-label`},zn={class:`ps-row`},Bn={class:`ps-label`},Vn=[`value`],Hn=[`value`],Un={key:0,value:-1},Wn={class:`ps-row`},Gn={class:`ps-label`},Kn=[`value`],qn={value:`portrait`},Jn={value:`landscape`},Yn={class:`ps-section-label ps-section-label--spaced`},Xn={class:`ps-row`},Zn={class:`ps-label`},Qn={class:`ps-row`},$n={class:`ps-label`},er={class:`ps-row`},tr={class:`ps-label`},nr={class:`ps-row`},rr={class:`ps-label`},ir={class:`ps-footer`},ar=12240,or=15840,sr=1440,cr=a((0,t.defineComponent)({__name:`PageSetupDialog`,props:{isOpen:{type:Boolean},sectionProperties:{}},emits:[`close`,`apply`],setup(e,{emit:n}){let{t:r}=$(),a=[{labelKey:`dialogs.pageSetup.pageSizes.letter`,width:12240,height:15840},{labelKey:`dialogs.pageSetup.pageSizes.a4`,width:11906,height:16838},{labelKey:`dialogs.pageSetup.pageSizes.legal`,width:12240,height:20160},{labelKey:`dialogs.pageSetup.pageSizes.a3`,width:16838,height:23811},{labelKey:`dialogs.pageSetup.pageSizes.a5`,width:8391,height:11906},{labelKey:`dialogs.pageSetup.pageSizes.b5`,width:9979,height:14175},{labelKey:`dialogs.pageSetup.pageSizes.executive`,width:10440,height:15120}],o=e,s=n,c=(0,t.ref)(ar),l=(0,t.ref)(or),u=(0,t.ref)(`portrait`),d=(0,t.ref)(1),f=(0,t.ref)(1),p=(0,t.ref)(1),m=(0,t.ref)(1);function h(e){return Math.round(e/i.TWIPS_PER_INCH*100)/100}function g(e){return Math.round((Number(e)||0)*i.TWIPS_PER_INCH)}let _=(0,t.computed)(()=>{let e=Math.min(c.value,l.value),t=Math.max(c.value,l.value);return a.findIndex(n=>Math.abs(n.width-e)<20&&Math.abs(n.height-t)<20)});(0,t.watch)(()=>o.isOpen,e=>{if(!e)return;let t=o.sectionProperties,n=t?.pageWidth||ar,r=t?.pageHeight||or;c.value=n,l.value=r,u.value=t?.orientation||(n>r?`landscape`:`portrait`),d.value=h(t?.marginTop??sr),f.value=h(t?.marginBottom??sr),p.value=h(t?.marginLeft??sr),m.value=h(t?.marginRight??sr)},{immediate:!0});function v(e){if(!(e.target instanceof HTMLSelectElement))return;let t=Number(e.target.value),n=a.at(t);t<0||!n||(u.value===`landscape`?(c.value=n.height,l.value=n.width):(c.value=n.width,l.value=n.height))}function y(e){if(!(e.target instanceof HTMLSelectElement))return;let t=e.target.value===`landscape`?`landscape`:`portrait`;if(t===u.value)return;u.value=t;let n=c.value;c.value=l.value,l.value=n}function b(){s(`close`)}function x(){s(`apply`,{pageWidth:c.value,pageHeight:l.value,orientation:u.value,marginTop:g(d.value),marginBottom:g(f.value),marginLeft:g(p.value),marginRight:g(m.value)}),b()}function S(e){e.key===`Escape`&&b(),e.key===`Enter`&&x()}return(n,i)=>e.isOpen?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`ps-overlay`,onMousedown:(0,t.withModifiers)(b,[`self`]),onKeydown:S},[(0,t.createElementVNode)(`div`,{class:`ps-dialog`,role:`dialog`,"aria-label":(0,t.unref)(r)(`dialogs.pageSetup.title`),onMousedown:i[4]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,In,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.title`)),1),(0,t.createElementVNode)(`div`,Ln,[(0,t.createElementVNode)(`div`,Rn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.pageSize`)),1),(0,t.createElementVNode)(`div`,zn,[(0,t.createElementVNode)(`label`,Bn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.sizeLabel`)),1),(0,t.createElementVNode)(`select`,{class:`ps-input`,value:_.value,onChange:v},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a,(e,n)=>(0,t.createElementVNode)(`option`,{key:e.labelKey,value:n},(0,t.toDisplayString)((0,t.unref)(r)(e.labelKey)),9,Hn)),64)),_.value<0?((0,t.openBlock)(),(0,t.createElementBlock)(`option`,Un,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.custom`)),1)):(0,t.createCommentVNode)(``,!0)],40,Vn)]),(0,t.createElementVNode)(`div`,Wn,[(0,t.createElementVNode)(`label`,Gn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.orientation`)),1),(0,t.createElementVNode)(`select`,{class:`ps-input`,value:u.value,onChange:y},[(0,t.createElementVNode)(`option`,qn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.portrait`)),1),(0,t.createElementVNode)(`option`,Jn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.landscape`)),1)],40,Kn)]),(0,t.createElementVNode)(`div`,Yn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.margins`)),1),(0,t.createElementVNode)(`div`,Xn,[(0,t.createElementVNode)(`label`,Zn,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.top`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{class:`ps-input`,type:`number`,min:`0`,max:`10`,step:`0.1`,"onUpdate:modelValue":i[0]||=e=>d.value=e},null,512),[[t.vModelText,d.value,void 0,{number:!0}]]),i[5]||=(0,t.createElementVNode)(`span`,{class:`ps-unit`},`in`,-1)]),(0,t.createElementVNode)(`div`,Qn,[(0,t.createElementVNode)(`label`,$n,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.bottom`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{class:`ps-input`,type:`number`,min:`0`,max:`10`,step:`0.1`,"onUpdate:modelValue":i[1]||=e=>f.value=e},null,512),[[t.vModelText,f.value,void 0,{number:!0}]]),i[6]||=(0,t.createElementVNode)(`span`,{class:`ps-unit`},`in`,-1)]),(0,t.createElementVNode)(`div`,er,[(0,t.createElementVNode)(`label`,tr,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.left`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{class:`ps-input`,type:`number`,min:`0`,max:`10`,step:`0.1`,"onUpdate:modelValue":i[2]||=e=>p.value=e},null,512),[[t.vModelText,p.value,void 0,{number:!0}]]),i[7]||=(0,t.createElementVNode)(`span`,{class:`ps-unit`},`in`,-1)]),(0,t.createElementVNode)(`div`,nr,[(0,t.createElementVNode)(`label`,rr,(0,t.toDisplayString)((0,t.unref)(r)(`dialogs.pageSetup.right`)),1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{class:`ps-input`,type:`number`,min:`0`,max:`10`,step:`0.1`,"onUpdate:modelValue":i[3]||=e=>m.value=e},null,512),[[t.vModelText,m.value,void 0,{number:!0}]]),i[8]||=(0,t.createElementVNode)(`span`,{class:`ps-unit`},`in`,-1)])]),(0,t.createElementVNode)(`div`,ir,[(0,t.createElementVNode)(`button`,{type:`button`,class:`ps-btn`,onClick:b},(0,t.toDisplayString)((0,t.unref)(r)(`common.cancel`)),1),(0,t.createElementVNode)(`button`,{type:`button`,class:`ps-btn ps-btn--primary`,onClick:x},(0,t.toDisplayString)((0,t.unref)(r)(`common.apply`)),1)])],40,Fn)],32)):(0,t.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-72f7da99`]]);Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Pn}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return hn}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return cr}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
|