PageSourceSearch

https://innovationskonferenz-wien.at/_next/static/chunks/0ll8f21h5s01s.js

js innovationskonferenz-wien.at collected 2026-10-05 20:13:14 UTC 479,614 bytes, 8 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="933d1461-9e7c-1672-064d-68df3701313b")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,558768,e=>{"use strict";var t=e.i(956799);e.s(["useIsomorphicLayoutEffect",()=>t.default])},90074,(e,t,r)=>{try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(281629);t.exports=function(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},t.exports.__esModule=!0,t.exports.default=t.exports},174212,(e,t,r)=>{try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(340353).default;t.exports=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},t.exports.__esModule=!0,t.exports.default=t.exports},281629,(e,t,r)=>{try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(340353).default,i=e.r(174212);t.exports=function(e){var t=i(e,"string");return"symbol"==o(t)?t:t+""},t.exports.__esModule=!0,t.exports.default=t.exports},340353,(e,t,r)=>{try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function o(e){return t.exports=o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,o(e)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},350219,812121,802659,387163,919475,711379,713249,237336,377222,73923,630874,546754,151941,996425,571453,140644,221214,246208,964892,193964,990037,397455,429682,924080,169444,102402,103987,91155,e=>{"use strict";var t,r,n,o,i,s,a,l,c,d,u,h,p,f,m,g,y,w,v,b,M,x,S,k,E,_,C,O=e.i(400726),T=e.i(939139);try{var A="u">typeof window?window:e.g;A._sentryModuleMetadata=A._sentryModuleMetadata||{},A._sentryModuleMetadata[(new A.Error).stack]=Object.assign({},A._sentryModuleMetadata[(new A.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var N={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},P=Symbol.for("__remirror__"),R=((t=R||{}).PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t),D=((r=D||{}
2)[r.Critical=1e6]="Critical",r[r.Highest=1e5]="Highest",r[r.High=1e4]="High",r[r.Medium=1e3]="Medium",r[r.Default=100]="Default",r[r.Low=10]="Low",r[r.Lowest=0]="Lowest",r),I=((n=I||{})[n.None=0]="None",n[n.Create=1]="Create",n[n.EditorView=2]="EditorView",n[n.Runtime=3]="Runtime",n[n.Destroy=4]="Destroy",n),B=((o=B||{}).Undo="_|undo|_",o.Redo="_|redo|_",o.Bold="_|bold|_",o.Italic="_|italic|_",o.Underline="_|underline|_",o.Strike="_|strike|_",o.Code="_|code|_",o.Paragraph="_|paragraph|_",o.H1="_|h1|_",o.H2="_|h2|_",o.H3="_|h3|_",o.H4="_|h4|_",o.H5="_|h5|_",o.H6="_|h6|_",o.TaskList="_|task|_",o.BulletList="_|bullet|_",o.OrderedList="_|number|_",o.Quote="_|quote|_",o.Divider="_|divider|_",o.Codeblock="_|codeblock|_",o.ClearFormatting="_|clear|_",o.Superscript="_|sup|_",o.Subscript="_|sub|_",o.LeftAlignment="_|left-align|_",o.CenterAlignment="_|center-align|_",o.RightAlignment="_|right-align|_",o.JustifyAlignment="_|justify-align|_",o.InsertLink="_|link|_",o.Find="_|find|_",o.FindBackwards="_|find-backwards|_",o.FindReplace="_|find-replace|_",o.AddFootnote="_|footnote|_",o.AddComment="_|comment|_",o.ContextMenu="_|context-menu|_",o.IncreaseFontSize="_|inc-font-size|_",o.DecreaseFontSize="_|dec-font-size|_",o.IncreaseIndent="_|indent|_",o.DecreaseIndent="_|dedent|_",o.Shortcuts="_|shortcuts|_",o.Copy="_|copy|_",o.Cut="_|cut|_",o.Paste="_|paste|_",o.PastePlain="_|paste-plain|_",o.SelectAll="_|select-all|_",o.Format="_|format|_",o),L=((i=L||{}).PROD="RMR0000",i.UNKNOWN="RMR0001",i.INVALID_COMMAND_ARGUMENTS="RMR0002",i.CUSTOM="RMR0003",i.CORE_HELPERS="RMR0004",i.MUTATION="RMR0005",i.INTERNAL="RMR0006",i.MISSING_REQUIRED_EXTENSION="RMR0007",i.MANAGER_PHASE_ERROR="RMR0008",i.INVALID_GET_EXTENSION="RMR0010",i.INVALID_MANAGER_ARGUMENTS="RMR0011",i.SCHEMA="RMR0012",i.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",i.INVALID_MANAGER_EXTENSION="RMR0014",i.DUPLICATE_COMMAND_NAMES="RMR0016",i.DUPLICATE_HELPER_NAMES="RMR0017",i.NON_CHAINABLE_COMMAND="RMR0018",i.INVALID_EXTENSION="RMR0019",i.INVALID_CONTENT="RMR0021",i.INVALID_NAME="RMR0050",i.EXTENSION="RMR0100",i.EXTENSION_SPEC="RMR0101",i.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",i.INVALID_SET_EXTENSION_OPTIONS="RMR0103",i.REACT_PROVIDER_CONTEXT="RMR0200",i.REACT_GET_ROOT_PROPS="RMR0201",i.REACT_EDITOR_VIEW="RMR0202",i.REACT_CONTROLLED="RMR0203",i.REACT_NODE_VIEW="RMR0204",i.REACT_GET_CONTEXT="RMR0205",i.REACT_COMPONENTS="RMR0206",i.REACT_HOOKS="RMR0207",i.I18N_CONTEXT="RMR0300",i);e.s(["ErrorConstant",0,L,"ExtensionPriority",0,D,"ExtensionTag",0,N,"LEAF_NODE_REPLACING_CHARACTER",0,"","ManagerPhase",0,I,"NULL_CHARACTER",0,"\0","NamedShortcut",0,B,"RemirrorIdentifier",0,R,"SELECTED_NODE_CLASS_NAME",0,"ProseMirror-selectednode","STATE_OVERRIDE",0,"__state_override__","__INTERNAL_REMIRROR_IDENTIFIER_KEY__",0,P],812121);var j=e.i(12838),F=e.i(910612),V=e.i(8011),z=e.i(856348);try{var K="u">typeof window?window:e.g;K._sentryModuleMetadata=K._sentryModuleMetadata||{},K._sentryModuleMetadata[(new K.Error).stack]=Object.assign({},K._sentryModuleMetadata[(new K.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let $=/^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g,H=/\S+/g;function U(e,t){let{keepSpecialCharacters:r=!1,keep:n,prefix:o=""}=t||{},i=e.trim().normalize("NFC"),s=i.includes(" "),a=function(e,t){let r={parts:[],prefixes:[]},n=e.matchAll(t),o=0;for(let t of n){if("number"!=typeof t.index)continue;let n=t[0];r.parts.push(n);let i=e.slice(o,t.index).trim();r.prefixes.push(i),o=t.index+n.length}let i=e.slice(o).trim();return i&&(r.parts.push(""),r.prefixes.push(i)),r}(i,s?H:$);return a.parts.map((e,t)=>{let i=a.prefixes[t]||"",l=e;return(!1===r&&(n&&(l=l.normalize("NFD").replace(RegExp(`[^a-zA-Z\xd8\xDF\xf80-9${n.join("")}]`,"g"),"")),n||(l=l.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),i="")),n&&(i=i.replace(RegExp(`[^${n.join("")}]`,"g"),"")),0===t)?i+l:i||l?s&&!i&&o.match(/\s/)?" "+l:(i||o)+l:""}).filter(Boolean)}function W(e){let t=e.matchAll($).next().value,r=t?t.index:0;return e.slice(0,r+1).toUpperCase()+e.slice(r+1).toLowerCase()}function q(e,t){return U(e,t).reduce((e,t)=>
2e+W(t),"")}e.s(["camelCase",0,function(e,t){return U(e,t).reduce((e,t,r)=>0!==r&&(t[0]||"").match($)?e+W(t):e+t.toLowerCase(),"")},"capitalCase",0,function(e,t={keepSpecialCharacters:!0}){return U(e,{...t,prefix:" "}).reduce((e,t)=>e+W(t),"")},"constantCase",0,function(e,t){return U(e,{...t,prefix:"_"}).join("").toUpperCase()},"kebabCase",0,function(e,t){return U(e,{...t,prefix:"-"}).join("").toLowerCase()},"pascalCase",0,q,"pathCase",0,function(e,t={keepSpecialCharacters:!0}){return U(e,t).reduce((e,t,r)=>e+(0===r||"/"===t[0]?"":"/")+t,"")},"snakeCase",0,function(e,t){return U(e,{...t,prefix:"_"}).join("").toLowerCase()},"spaceCase",0,function(e,t={keepSpecialCharacters:!0}){return U(e,{...t,prefix:" "}).join("")}],802659);try{var J="u">typeof window?window:e.g;J._sentryModuleMetadata=J._sentryModuleMetadata||{},J._sentryModuleMetadata[(new J.Error).stack]=Object.assign({},J._sentryModuleMetadata[(new J.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function G(e,t,r,n){var o,i=!1,s=0;function a(){o&&clearTimeout(o)}function l(){for(var l=arguments.length,c=Array(l),d=0;d<l;d++)c[d]=arguments[d];var u=this,h=Date.now()-s;function p(){s=Date.now(),r.apply(u,c)}i||(n&&!o&&p(),a(),void 0===n&&h>e?p():!0!==t&&(o=setTimeout(n?function(){o=void 0}:p,void 0===n?e-h:e)))}return"boolean"!=typeof t&&(n=r,r=t,t=void 0),l.cancel=function(){a(),i=!0},l}e.s(["debounce",0,function(e,t,r){return void 0===r?G(e,t,!1):G(e,r,!1!==t)},"throttle",0,G],387163);try{var Y="u">typeof window?window:e.g;Y._sentryModuleMetadata=Y._sentryModuleMetadata||{},Y._sentryModuleMetadata[(new Y.Error).stack]=Object.assign({},Y._sentryModuleMetadata[(new Y.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function X(e){return e}function Z(e,t,r){let n=e[t];return Q(!ed(n),r),n}function Q(e,t){if(!e)throw new ee(t)}var ee=class extends T.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function et(e){return Object.entries(e)}function er(e){return Object.keys(e)}function en(e){return Object.values(e)}function eo(e,t,r){return e.includes(t,r)}function ei(e){return Object.assign(Object.create(null),e)}function es(e){return Object.prototype.toString.call(e)}function ea(e){return es(e).slice(8,-1)}function el(e,t){return r=>typeof r===e&&(!t||t(r))}function ec(e){return t=>ea(t)===e}var ed=el("undefined"),eu=el("string"),eh=el("number",e=>!Number.isNaN(e)),ep=el("function");function ef(e){if("Object"!==ea(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})}function em(e){return null===e||ed(e)}function eg(e){return!em(e)&&(ep(e)||el("object")(e))}el("symbol");var ey=ec("RegExp");function ew(e){return eg(e)&&!ec("Map")(e)&&!ec("Set")(e)&&0===Object.keys(e).length}ec("Date"),ec("Error");var ev=Array.isArray;function eb(e){return ev(e)&&0===e.length}function eM(e){return ev(e)&&e.length>0}function ex(e,t,r=e=>!!e){let n;t.lastIndex=0;let o=[],i=t.flags;i.includes("g")||(t=RegExp(t.source,`g${i}`));do(n=t.exec(e))&&o.push(n);while(r(n))return t.lastIndex=0,o}function eS(){let e=Date.now(),t=eS.last||e;return eS.last=e>t?e:t+1}function ek(e=""){return`${e}${eS().toString(36)}`}function eE(e){return(0,V.default)(e,e=>!ed(e))}eS.last=0;var e_=F.default;function eC(e,t=!1){let r=new Set(t?[...e].reverse():e);return t?[...r].reverse():[...r]}function eO(){}function eT(...e){return j.default.all(e,{isMergeableObject:ef})}function eA({min:e,max:t,value:r}){return r<e?e:r>t?t:r}function eN(e,t){return[...e].map((e,t)=>({value:e,index:t})).sort((e,r)=>t(e.value,r.value)||e.index-r.index).map(({value:e})=>e)}function eP(e,t){let r=function(e){if(!ef(e))throw Error("An invalid value was passed into this clone utility. Expected a plain object");return{...e}}(t),n=r;for(let[t,r]of e.entries()){var o;let i=t>=e.length-1,s=n[r];if(i){if(ev(n)){let e=Number.parseInt(r.toString(),10);eh(e)&&n.splice(e,1)}else Reflect.deleteProperty(n,r);break}if(null==(o=s)||/^[bns]/.test(typeof o))break;s=ev(s)?[...s]:{...s},n[r]=s,n=s}return r}function eR(e,t,r=!1){let n=[],o=new Set,i=ep(t)?t:e=>(function(e,t){try{if(eu(t)&&t in e)return e[t];ev(t)&&(t=`['${t.join("']['")}']`);let r=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w
2*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(e,t,n,o,i,s)=>(r=r[n||o||i||s],"")),void 0===r?void 0:r}catch{return}})(e,t);for(let t of r?[...e].reverse():e){let e=i(t);o.has(e)||(o.add(e),n.push(t))}return r?n.reverse():n}function eD(e,t){let r=ev(e)?e[0]:e;return eh(t)?r<=t?Array.from({length:t+1-r},(e,t)=>t+r):Array.from({length:r+1-t},(e,t)=>-1*t+r):Array.from({length:Math.abs(r)},(e,t)=>(r<0?-1:1)*t)}function eI(e){return ep(e)?e():e}var eB="https://remirror.io/docs/errors",eL={[L.UNKNOWN]:"An error occurred but we're not quite sure why. 🧐",[L.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[L.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[L.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[L.MUTATION]:"Mutation of immutable value detected.",[L.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[L.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[L.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[L.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[L.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[L.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[L.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[L.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[L.DUPLICATE_COMMAND_NAMES]:"Command method n
2ames must be unique within the editor.",[L.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[L.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[L.INVALID_EXTENSION]:"The provided extension is invalid.",[L.INVALID_CONTENT]:"The content provided to the editor is not supported.",[L.INVALID_NAME]:"An invalid name was used for the extension.",[L.EXTENSION]:"An error occurred within an extension. More details should be made available.",[L.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[L.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[L.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[L.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the `<Remirror />`.",[L.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[L.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[L.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[L.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[L.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[L.REACT_COMPONENTS]:"An error occurred within a remirror component.",[L.REACT_HOOKS]:"An error occurred within a remirror hook.",[L.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."},ej=class extends T.BaseError{constructor({code:e,message:t,disableLogging:r=!1}={}){const n=!function(e){return eu(e)&&eo(en(L),e)}(e)?L.CUSTOM:e;super(function(e,t){let r=eL[e],n=r?`${r}
3
4`:"",o=t?`${t}
5
6`:"";return`${n}${o}For more information visit ${eB}#${e.toLowerCase()}`}(n,t)),this.errorCode=n,this.url=`${eB}#${n.toLowerCase()}`,r||console.error(this.message)}static create(e={}){return new ej(e)}};function eF(e,t){if(!e)throw ej.create(t)}function eV(e,t={}){return e}e.s(["Cast",0,X,"assert",0,Q,"assertGet",0,Z,"capitalize",0,function(e){return e.charAt(0).toUpperCase()+e.slice(1)},"clamp",0,eA,"deepMerge",0,eT,"defaultImport",0,function(e){if("object"!=typeof e||null===e)return e;let t=Symbol.toStringTag in e&&"Module"===e[Symbol.toStringTag]?e.default??e:e;return t&&"object"==typeof e&&"__esModule"in t&&t.__esModule&&void 0!==t.default?t.default:t},"entries",0,et,"findMatches",0,ex,"freeze",0,eV,"getLazyArray",0,eI,"includes",0,eo,"invariant",0,eF,"isArray",0,ev,"isBoolean",0,function(e){return!0===e||!1===e},"isEmptyArray",0,eb,"isEmptyObject",0,ew,"isEqual",0,e_,"isFunction",0,ep,"isInstanceOf",0,function(e){return t=>eg(t)&&t instanceof e},"isNonEmptyArray",0,eM,"isNullOrUndefined",0,em,"isNumber",0,eh,"isObject",0,eg,"isPlainObject",0,ef,"isPromise",0,function(e){let t;return ec("Promise")(e)||!!(null!==(t=e)&&eg(t)&&ep(t.then)&&ep(t.catch))},"isRegExp",0,ey,"isString",0,eu,"isUndefined",0,ed,"keys",0,er,"last",0,function(e){return e[e.length-1]},"noop",0,eO,"object",0,ei,"omitUndefined",0,eE,"range",0,eD,"sort",0,eN,"take",0,function(e,t){return t=Math.max(Math.min(0,t),t),e.slice(0,t)},"toString",0,es,"uniqueArray",0,eC,"uniqueBy",0,eR,"uniqueId",0,ek,"unset",0,eP,"values",0,en,"within",0,function(e,...t){let r=t.filter(eh);return e>=Math.min(...r)&&e<=Math.max(...r)}],350219);try{var ez="u">typeof window?window:e.g;ez._sentryModuleMetadata=ez._sentryModuleMetadata||{},ez._sentryModuleMetadata[(new ez.Error).stack]=Object.assign({},ez._sentryModuleMetadata[(new ez.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],919475);try{var eK="u">typeof window?window:e.g;eK._sentryModuleMetadata=eK._sentryModuleMetadata||{},eK._sentryModuleMetadata[(new eK.Error).stack]=Object.assign({},eK._sentryModuleMetadata[(new eK.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function e$(e){this.content=e}e$.prototype={constructor:e$,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,r){var n=r&&r!=e?this.remove(r):this,o=n.find(e),i=n.content.slice();return -1==o?i.push(r||e,t):(i[o+1]=t,r&&(i[o]=r)),new e$(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var r=this.content.slice();return r.splice(t,2),new e$(r)},addToStart:function(e,t){return new e$([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var r=this.remove(e).content.slice();return r.push(e,t),new e$(r)},addBefore:function(e,t,r){var n=this.remove(t),o=n.content.slice(),i=n.find(e);return o.splice(-1==i?o.length:i,0,t,r),new e$(o)}
6,forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=e$.from(e)).size?new e$(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=e$.from(e)).size?new e$(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=e$.from(e);for(var r=0;r<e.content.length;r+=2)t=t.remove(e.content[r]);return t},toObject:function(){var e={};return this.forEach(function(t,r){e[t]=r}),e},get size(){return this.content.length>>1}},e$.from=function(e){if(e instanceof e$)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new e$(t)};try{var eH="u">typeof window?window:e.g;eH._sentryModuleMetadata=eH._sentryModuleMetadata||{},eH._sentryModuleMetadata[(new eH.Error).stack]=Object.assign({},eH._sentryModuleMetadata[(new eH.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}class eU{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,r,n=0,o){for(let i=0,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==r(a,n+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),r,n+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,n){let o="",i=!0;return this.nodesBetween(e,t,(s,a)=>{let l=s.isText?s.text.slice(Math.max(e,a)-a,t-a):s.isLeaf?n?"function"==typeof n?n(s):n:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&r&&(i?i=!1:o+=r),o+=l},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,n=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(n[n.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)n.push(e.content[o]);return new eU(n,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let r=[],n=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),r.push(s),n+=s.nodeSize),i=a}return new eU(r,n)}cutByIndex(e,t){return e==t?eU.empty:0==e&&t==this.content.length?this:new eU(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let n=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return n[e]=t,new eU(n,o)}addToStart(e){return new eU([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new eU(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let n=this.content[t];e(n,r,t),r+=n.nodeSize}}findDiffStart(e,t=0){return function e(t,r,n){for(let o=0;;o++){if(o==t.childCount||o==r.childCount)return t.childCount==r.childCount?null:n;let i=t.child(o),s=r.child(o);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let e=0;i.text[e]==s.text[e];e++)n++;return n}if(i.content.size||s.content.size){let t=e(i.content,s.content,n+1);if(null!=t)return t}n+=i.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return function e(t,r,n,o){for(let i=t.childCount,s=r.childCount;;){if(0==i||0==s)return i==s?null:{a:n,b:o};let a=t.child(--i),l=r.child(--s),c=a.nodeSize;if(a==l){n-=c,o-=c;continue}if(!a.sameMarkup(l))return{a:n,b:o};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,o--;return{a:n,b:o}}if(a.content.size||l.content.size){let t=e(a.content,l.content,n-1,o-1);if(t)return t}n-=c,o-=c}}(this,e,t,r)}findIndex(e){if(0==e)return eq(0,e);if(e==this.size)return eq(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let n=r+this.child(t).nodeSize;if(n>=e){if(n==e)return eq(t+1,n);return eq(t,r)}r=n}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return eU.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new eU(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return eU.empty;let t,r=0;for(let n=0;n<e.length;n++){let o=e[n];r+=o.nodeSize,n&&o.isText&&e[n-1].sameMarkup(o)?(t||(t=e.slice(0,n)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new eU(t||e,r)}static from(e){if(!e)return eU.empty;if(e instanceof eU)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new eU([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}eU.empty=new eU([],0);let eW={index:0,offset:0};function eq(e,t){return eW.index=e,eW.offset=t,eW}function eJ(e,t){if(e===t)return!0;
vendor: 6,895 bytes, line 6
6if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let r=Array.isArray(e);if(Array.isArray(t)!=r)return!1;if(r){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!eJ(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!eJ(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class eG{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let n=0;n<e.length;n++){let o=e[n];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,n));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&eJ(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw RangeError(`There is no mark type ${t.type} in this schema`);let n=r.create(t.attrs);return r.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return eG.none;if(e instanceof eG)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}eG.none=[];class eY extends Error{}class eX{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=function e(t,r,n,o){let{index:i,offset:s}=t.findIndex(r),a=t.maybeChild(i);if(s==r||a.isText)return o&&!o.canReplace(i,i,n)?null:t.cut(0,r).append(n).append(t.cut(r));let l=e(a.content,r-s-1,n,a);return l&&t.replaceChild(i,a.copy(l))}(this.content,e+this.openStart,t);return r&&new eX(r,this.openStart,this.openEnd)}removeBetween(e,t){return new eX(function e(t,r,n){let{index:o,offset:i}=t.findIndex(r),s=t.maybeChild(o),{index:a,offset:l}=t.findIndex(n);if(i==r||s.isText){if(l!=n&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,r).append(t.cut(n))}if(o!=a)throw RangeError("Removing non-flat range");return t.replaceChild(o,s.copy(e(s.content,r-i-1,n-i-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return eX.empty;let r=t.openStart||0,n=t.openEnd||0;if("number"!=typeof r||"number"!=typeof n)throw RangeError("Invalid input for Slice.fromJSON");return new eX(eU.fromJSON(e,t.content),r,n)}static maxOpen(e,t=!0){let r=0,n=0;for(let n=e.firstChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.firstChild)r++;for(let r=e.lastChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.lastChild)n++;return new eX(e,r,n)}}function eZ(e,t){if(!t.type.compatibleContent(e.type))throw new eY("Cannot join "+t.type.name+" onto "+e.type.name)}function eQ(e,t,r){let n=e.node(r);return eZ(n,t.node(r)),n}function e0(e,t){let r=t.length-1;r>=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function e1(e,t,r,n){let o=(t||e).node(r),i=0,s=t?t.index(r):o.childCount;e&&(i=e.index(r),e.depth>r?i++:e.textOffset&&(e0(e.nodeAfter,n),i++));for(let e=i;e<s;e++)e0(o.child(e),n);t&&t.depth==r&&t.textOffset&&e0(t.nodeBefore,n)}function e2(e,t){return e.type.checkContent(t),e.copy(t)}function e3(e,t,r){let n=[];return e1(null,e,r,n),e.depth>r&&e0(e2(eQ(e,t,r+1),e3(e,t,r+1)),n),e1(t,null,r,n),new eU(n)}eX.empty=new eX(eU.empty,0,0);class e9{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],n=e.child(t);return r?e.child(t).cut(r):n}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[3*t],n=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)n+=r.child(t).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return eG.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),n=e.maybeChild(t);if(!r){let e=r;r=n,n=e}let o=r.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||n&&o[i].isInSet(n.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,n=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)!1!==r[o].type.spec.inclusive||n&&r[o].isInSet(n.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new e8(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let r=[],n=0,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),s=o-i;if(r.push(t,e,n+i),!s||(t=t.child(e)).isText)break;o=s-1,n+=i+1}return new e9(t,r,o)}
6static resolveCached(e,t){let r=e6.get(e);if(r)for(let e=0;e<r.elts.length;e++){let n=r.elts[e];if(n.pos==t)return n}else e6.set(e,r=new e4);let n=r.elts[r.i]=e9.resolve(e,t);return r.i=(r.i+1)%e5,n}}class e4{constructor(){this.elts=[],this.i=0}}let e5=12,e6=new WeakMap;class e8{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let e7=Object.create(null);class te{constructor(e,t,r,n=eG.none){this.type=e,this.attrs=t,this.marks=n,this.content=r||eU.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,n=0){this.content.nodesBetween(e,t,r,n,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,n){return this.content.textBetween(e,t,r,n)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&eJ(this.attrs,t||e.defaultAttrs||e7)&&eG.sameSet(this.marks,r||eG.none)}copy(e=null){return e==this.content?this:new te(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new te(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return eX.empty;let n=this.resolve(e),o=this.resolve(t),i=r?0:n.sharedDepth(t),s=n.start(i);return new eX(n.node(i).content.cut(n.pos-s,o.pos-s),n.depth-i,o.depth-i)}replace(e,t,r){var n=this.resolve(e),o=this.resolve(t);if(r.openStart>n.depth)throw new eY("Inserted content deeper than insertion position");if(n.depth-r.openStart!=o.depth-r.openEnd)throw new eY("Inconsistent open depths");return function e(t,r,n,o){let i=t.index(o),s=t.node(o);if(i==r.index(o)&&o<t.depth-n.openStart){let a=e(t,r,n,o+1);return s.copy(s.content.replaceChild(i,a))}if(!n.content.size)return e2(s,e3(t,r,o));if(n.openStart||n.openEnd||t.depth!=o||r.depth!=o){let{start:e,end:i}=function(e,t){let r=t.depth-e.openStart,n=t.node(r).copy(e.content);for(let e=r-1;e>=0;e--)n=t.node(e).copy(eU.from(n));return{start:n.resolveNoCache(e.openStart+r),end:n.resolveNoCache(n.content.size-e.openEnd-r)}}(n,t);return e2(s,function e(t,r,n,o,i){let s=t.depth>i&&eQ(t,r,i+1),a=o.depth>i&&eQ(n,o,i+1),l=[];return e1(null,t,i,l),s&&a&&r.index(i)==n.index(i)?(eZ(s,a),e0(e2(s,e(t,r,n,o,i+1)),l)):(s&&e0(e2(s,e3(t,r,i+1)),l),e1(r,n,i,l),a&&e0(e2(a,e3(n,o,i+1)),l)),e1(o,null,i,l),new eU(l)}(t,e,i,r,o))}{let e=t.parent,o=e.content;return e2(e,o.cut(0,t.parentOffset).append(n.content).append(o.cut(r.parentOffset)))}}(n,o,r,0)}nodeAt(e){for(let t=this;;){let{index:r,offset:n}=t.content.findIndex(e);if(!(t=t.maybeChild(r)))return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let n=this.content.child(t-1);return{node:n,index:t-1,offset:r-n.nodeSize}}resolve(e){return e9.resolveCached(this,e)}resolveNoCache(e){return e9.resolve(this,e)}rangeHasMark(e,t,r){let n=!1;return t>e&&this.nodesBetween(e,t,e=>(r.isInSet(e.marks)&&(n=!0),!n)),n}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}
6toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),tr(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=eU.empty,n=0,o=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,n,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=n;e<o;e++)if(!this.type.allowsMarks(r.child(e).marks))return!1;return!0}canReplaceWith(e,t,r,n){if(n&&!this.type.allowsMarks(n))return!1;let o=this.contentMatchAt(e).matchType(r),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=eG.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!eG.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let r;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,r)}let n=eU.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,n,r);return o.type.checkAttrs(o.attrs),o}}te.prototype.text=void 0;class tt extends te{constructor(e,t,r,n){if(super(e,t,null,n),!r)throw RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tr(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new tt(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new tt(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tr(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class tn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var r;let n,o=new to(e,t);if(null==o.next)return tn.empty;let i=function e(t){let r=[];do r.push(function(t){let r=[];do r.push(function(t){let r=function(t){if(t.eat("(")){let r=e(t);return t.eat(")")||t.err("Missing closing paren"),r}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let o=[];for(let e in r){let n=r[e];n.isInGroup(t)&&o.push(n)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))r={type:"plus",expr:r};else if(t.eat("*"))r={type:"star",expr:r};else if(t.eat("?"))r={type:"opt",expr:r};else if(t.eat("{"))r=function(e,t){let r=ti(e),n=r;return e.eat(",")&&(n="}"!=e.next?ti(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}(t,r);else break;return r}(t));while(t.next&&")"!=t.next&&"|"!=t.next)return 1==r.length?r[0]:{type:"seq",exprs:r}}(t));while(t.eat("|"))return 1==r.length?r[0]:{type:"choice",exprs:r}}(o);o.next&&o.err("Unexpected trailing text");let s=(r=function(e){let t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((t,r)=>t.concat(e(r,i)),[]);if("seq"==t.type)for(let n=0;;n++){let s=e(t.exprs[n],i);if(n==t.exprs.length-1)return s;o(s,i=r())}else if("star"==t.type){let s=r();return n(i,s),o(e(t.expr,s),s),[n(s)]}else if("plus"==t.type){let s=r();return o(e(t.expr,i),s),o(e(t.expr,s),s),[n(s)]}else if("opt"==t.type)return[n(i)].concat(e(t.expr,i));else if("range"==t.type){let s=i;for(let n=0;n<t.min;n++){let n=r();o(e(t.expr,s),n),s=n}if(-1==t.max)o(e(t.expr,s),s);else for(let i=t.min;i<t.max;i++){let i=r();n(s,i),o(e(t.expr,s),i),s=i}return[n(s)]}else if("name"==t.type)return[n(i,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),r()),t;function r(){return t.push([])-1}function n(e,r,n){let o={term:n,to:r};return t[e].push(o),o}
vendor: 5,579 bytes, line 6
6function o(e,t){e.forEach(e=>e.to=t)}}(i),n=Object.create(null),function e(t){let o=[];t.forEach(e=>{r[e].forEach(({term:e,to:t})=>{let n;if(e){for(let t=0;t<o.length;t++)o[t][0]==e&&(n=o[t][1]);ta(r,t).forEach(t=>{n||o.push([e,n=[]]),-1==n.indexOf(t)&&n.push(t)})}})});let i=n[t.join(",")]=new tn(t.indexOf(r.length-1)>-1);for(let t=0;t<o.length;t++){let r=o[t][1].sort(ts);i.next.push({type:o[t][0],next:n[r.join(",")]||e(r)})}return i}(ta(r,0)));return function(e,t){for(let r=0,n=[e];r<n.length;r++){let e=n[r],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:r,next:s}=e.next[t];i.push(r.name),o&&!(r.isText||r.hasRequiredAttrs())&&(o=!1),-1==n.indexOf(s)&&n.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,o),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let n=this;for(let o=t;n&&o<r;o++)n=n.matchType(e.child(o).type);return n}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let n=[this];return function o(i,s){let a=i.matchFragment(e,r);if(a&&(!t||a.validEnd))return eU.from(s.map(e=>e.createAndFill()));for(let e=0;e<i.next.length;e++){let{type:t,next:r}=i.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==n.indexOf(r)){n.push(r);let e=o(r,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let n=r.shift(),o=n.match;if(o.matchType(e)){let e=[];for(let t=n;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||n.type&&!s.validEnd||(r.push({match:i.contentMatch,type:i,via:n}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(r){e.push(r);for(let n=0;n<r.next.length;n++)-1==e.indexOf(r.next[n].next)&&t(r.next[n].next)}(this),e.map((t,r)=>{let n=r+(t.validEnd?"*":" ")+" ";for(let r=0;r<t.next.length;r++)n+=(r?", ":"")+t.next[r].type.name+"->"+e.indexOf(t.next[r].next);return n}).join("\n")}}tn.empty=new tn(!0);class to{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function ti(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function ts(e,t){return t-e}function ta(e,t){let r=[];return function t(n){let o=e[n];if(1==o.length&&!o[0].term)return t(o[0].to);r.push(n);for(let e=0;e<o.length;e++){let{term:n,to:i}=o[e];n||-1!=r.indexOf(i)||t(i)}}(t),r.sort(ts)}function tl(e){let t=Object.create(null);for(let r in e){let n=e[r];if(!n.hasDefault)return null;t[r]=n.default}return t}function tc(e,t){let r=Object.create(null);for(let n in e){let o=t&&t[n];if(void 0===o){let t=e[n];if(t.hasDefault)o=t.default;else throw RangeError("No value supplied for attribute "+n)}r[n]=o}return r}function td(e,t,r,n){for(let n in t)if(!(n in e))throw RangeError(`Unsupported attribute ${n} for ${r} of type ${n}`);for(let r in e){let n=e[r];n.validate&&n.validate(t[r])}}function tu(e,t){let r=Object.create(null);if(t)for(let n in t)r[n]=new tp(e,n,t[n]);return r}class th{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=tu(e,r.attrs),this.defaultAttrs=tl(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==tn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:tc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new te(this,this.computeAttrs(e),eU.from(t),eG.setFrom(r))}createChecked(e=null,t,r){return t=eU.from(t),this.checkContent(t),new te(this,this.computeAttrs(e),t,eG.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),(t=eU.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let n=this.contentMatch.matchFragment(t),o=n&&n.fillBefore(eU.empty,!0);return o?new te(this,e,t.append(o),eG.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
6if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){td(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:eG.none:e}static compile(e,t){let r=Object.create(null);e.forEach((e,n)=>r[e]=new th(e,t,n));let n=t.spec.topNode||"doc";if(!r[n])throw RangeError("Schema is missing its top node type ('"+n+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}}class tp{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate="string"==typeof r.validate?function(e,t,r){let n=r.split("|");return r=>{let o=null===r?"null":typeof r;if(0>n.indexOf(o))throw RangeError(`Expected value of type ${n} for attribute ${t} on type ${e}, got ${o}`)}}(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class tf{constructor(e,t,r,n){this.name=e,this.rank=t,this.schema=r,this.spec=n,this.attrs=tu(e,n.attrs),this.excluded=null;let o=tl(this.attrs);this.instance=o?new eG(this,o):null}create(e=null){return!e&&this.instance?this.instance:new eG(this,tc(this.attrs,e))}static compile(e,t){let r=Object.create(null),n=0;return e.forEach((e,o)=>r[e]=new tf(e,n++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){td(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class tm{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=e$.from(e.nodes),t.marks=e$.from(e.marks||{}),this.nodes=th.compile(this.spec.nodes,this),this.marks=tf.compile(this.spec.marks,this);let r=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],n=t.spec.content||"",o=t.spec.marks;if(t.contentMatch=r[n]||(r[n]=tn.parse(n,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==o?null:o?tg(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],r=t.spec.excludes;t.excluded=null==r?[t]:""==r?[]:tg(this,r.split(" "))}this.nodeFromJSON=e=>te.fromJSON(this,e),this.markFromJSON=e=>eG.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,n){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof th){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,r,n)}text(e,t){let r=this.nodes.text;return new tt(r,r.defaultAttrs,e,eG.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function tg(e,t){let r=[];for(let n=0;n<t.length;n++){let o=t[n],i=e.marks[o],s=i;if(i)r.push(i);else for(let t in e.marks){let n=e.marks[t];("_"==o||n.spec.group&&n.spec.group.split(" ").indexOf(o)>-1)&&r.push(s=n)}if(!s)throw SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}class ty{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];
6t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>r.indexOf(t)&&r.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let r=e.nodes[t.node];return r.contentMatch.matchType(r)})}parse(e,t={}){let r=new tS(this,t,!1);return r.addAll(e,eG.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new tS(this,t,!0);return r.addAll(e,eG.none,t.from,t.to),eX.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){var n,o;let r=this.tags[i];if(n=e,o=r.tag,(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,o)&&(void 0===r.namespace||e.namespaceURI==r.namespace)&&(!r.context||t.matchesContext(r.context))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}matchStyle(e,t,r,n){for(let o=n?this.styles.indexOf(n)+1:0;o<this.styles.length;o++){let n=this.styles[o],i=n.style;if(0==i.indexOf(e)&&(!n.context||r.matchesContext(n.context))&&(!(i.length>e.length)||61==i.charCodeAt(e.length)&&i.slice(e.length+1)==t)){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}static schemaRules(e){let t=[];function r(e){let r=null==e.priority?50:e.priority,n=0;for(;n<t.length;n++){let e=t[n];if((null==e.priority?50:e.priority)<r)break}t.splice(n,0,e)}for(let t in e.marks){let n=e.marks[t].spec.parseDOM;n&&n.forEach(e=>{r(e=tk(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let n=e.nodes[t].spec.parseDOM;n&&n.forEach(e=>{r(e=tk(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ty(e,ty.schemaRules(e)))}}let tw={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},tv={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tb={ol:!0,ul:!0};function tM(e,t,r){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&r}class tx{constructor(e,t,r,n,o,i){this.type=e,this.attrs=t,this.marks=r,this.solid=n,this.options=i,this.content=[],this.activeMarks=eG.none,this.match=o||(4&i?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(eU.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,r;return(r=t.findWrapping(e.type))?(this.match=t,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=eU.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(eU.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!tw.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class tS{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let n=t.topNode,o,i=tM(null,t.preserveWhitespace,0)|4*!!r;o=n?new tx(n.type,n.attrs,eG.none,!0,t.topMatch||n.type.contentMatch,i):r?new tx(null,null,eG.none,!0,null,i):new tx(e.schema.topNodeType,null,eG.none,!0,null,i),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,n=this.top,o=2&n.options?"full":this.localPreserveWS||(1&n.options)>0,{schema:i}=this.parser;if("full"===o||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if("full"===o)r=r.replace(/\r\n?/g,"\n");else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let e=r.split(/\r?\n|\r/);for(let r=0;r<e.length;r++)r&&this.insertNode(i.linebreakReplacement.create(),t,!0),e[r]&&this.insertNode(i.text(e[r]),t,!/\S/.test(e[r]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let t=n.content[n.content.length-1],o=e.previousSibling;(!t||o&&"BR"==o.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(r=r.slice(1))}r&&this.insertNode(i.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let n=this.localPreserveWS,o=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i=e.nodeName.toLowerCase(),s;tb.hasOwnProperty(i)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;
vendor: 5,103 bytes, line 6
6e&&tb.hasOwnProperty(e)&&r?(r.appendChild(t),t=r):"li"==e?r=t:e&&(r=null)}}(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(a?a.ignore:tv.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let r,n=this.needsBlock;if(tw.hasOwnProperty(i))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),r=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let s=a&&a.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),r&&this.sync(o),this.needsBlock=n}else{let r=this.readStyles(e,t);r&&this.addElementByRule(e,a,r,!1===a.consuming?s:void 0)}this.localPreserveWS=n}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let n=this.parser.matchedStyles[e],o=r.getPropertyValue(n);if(o)for(let e;;){let r=this.parser.matchStyle(n,o,this,e);if(!r)break;if(r.ignore)return null;if(t=r.clearMark?t.filter(e=>!r.clearMark(e)):t.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1===r.consuming)e=r;else break}}return t}addElementByRule(e,t,r,n){let o,i;if(t.node)if((i=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(i.create(t.attrs),r,"BR"==e.nodeName)||this.leafFallback(e,r);else{let e=this.enter(i,t.attrs||null,r,t.preserveWhitespace);e&&(o=!0,r=e)}else{let e=this.parser.schema.marks[t.mark];r=r.concat(e.create(t.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(e);else if(n)this.addElement(e,r,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,r,!1));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n,r),this.findAround(e,n,!1)}o&&this.sync(s)&&this.open--}addAll(e,t,r,n){let o=r||0;for(let i=r?e.childNodes[r]:e.firstChild,s=null==n?null:e.childNodes[n];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i,t);this.findAtPoint(e,o)}findPlace(e,t,r){let n,o;for(let t=this.open,i=0;t>=0;t--){let s=this.nodes[t],a=s.findWrapping(e);if(a&&(!n||n.length>a.length+i)&&(n=a,o=s,!a.length))break;if(s.solid){if(r)break;i+=2}}if(!n)return null;this.sync(o);for(let e=0;e<n.length;e++)t=this.enterInner(n[e],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let n=this.findPlace(e,t,r);if(n){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let r=eG.none;for(let o of n.concat(e.marks))(t.type?t.type.allowsMarkType(o.type):tE(o.type,e.type))&&(r=o.addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r,n){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,n)),o}enterInner(e,t,r,n=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let s=tM(e,o,i.options);4&i.options&&0==i.content.length&&(s|=4);let a=eG.none;return r=r.filter(t=>(i.type?!i.type.allowsMarkType(t.type):!tE(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new tx(e,t,a,n,null,s)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let t=r.length-1;t>=0;t--)e+=r[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let n=0;n<this.find.length;n++)null==this.find[n].pos&&1==e.nodeType&&e.contains(this.find[n].node)&&t.compareDocumentPosition(this.find[n].node)&(r?2:4)&&(this.find[n].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,n=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+ +!n,i=(e,s)=>{for(;e>=0;e--){let a=t[e];
6if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&n?this.nodes[s].type:r&&s>=o?r.node(s-o).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function tk(e){let t={};for(let r in e)t[r]=e[r];return t}function tE(e,t){let r=t.schema.nodes;for(let n in r){let o=r[n];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let r=0;r<e.edgeCount;r++){let{type:n,next:o}=e.edge(r);if(n==t||0>i.indexOf(o)&&s(o))return!0}};if(s(o.contentMatch))return!0}}class t_{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=tO(t).createDocumentFragment());let n=r,o=[];return e.forEach(e=>{if(o.length||e.marks.length){let r=0,i=0;for(;r<o.length&&i<e.marks.length;){let t=e.marks[i];if(!this.marks[t.type.name]){i++;continue}if(!t.eq(o[r][0])||!1===t.type.spec.spanning)break;r++,i++}for(;r<o.length;)n=o.pop()[1];for(;i<e.marks.length;){let r=e.marks[i++],s=this.serializeMark(r,e.isInline,t);s&&(o.push([r,n]),n.appendChild(s.dom),n=s.contentDOM||s.dom)}}n.appendChild(this.serializeNodeInner(e,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:n}=tA(tO(t),this.nodes[e.type.name](e),null,e.attrs);if(n){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,n)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let n=e.marks.length-1;n>=0;n--){let o=this.serializeMark(e.marks[n],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let n=this.marks[e.type.name];return n&&tA(tO(r),n(e,t),null,e.attrs)}static renderSpec(e,t,r=null,n){return tA(e,t,r,n)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new t_(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=tC(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return tC(e.marks)}}function tC(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function tO(e){return e.document||window.document}let tT=new WeakMap;function tA(e,t,r,n){let o,i,s;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(n&&(void 0===(i=tT.get(n))&&tT.set(n,(s=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let r=0;r<t.length;r++)e(t[r]);else for(let r in t)e(t[r])}(n),i=s)),l=i)&&l.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=a.indexOf(" ");c>0&&(r=a.slice(0,c),a=a.slice(c+1));let d=r?e.createElementNS(r,a):e.createElement(a),u=t[1],h=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){for(let e in h=2,u)if(null!=u[e]){let t=e.indexOf(" ");t>0?d.setAttributeNS(e.slice(0,t),e.slice(t+1),u[e]):"style"==e&&d.style?d.style.cssText=u[e]:d.setAttribute(e,u[e])}}for(let i=h;i<t.length;i++){let s=t[i];if(0===s){if(i<t.length-1||i>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:d,contentDOM:d}}{let{dom:t,contentDOM:i}=tA(e,s,r,n);if(d.appendChild(t),i){if(o)throw RangeError("Multiple content holes");o=i}}}return{dom:d,contentDOM:o}}e.s(["DOMParser",0,ty,"DOMSerializer",0,t_,"Fragment",0,eU,"Mark",0,eG,"MarkType",0,tf,"Node",0,te,"NodeRange",0,e8,"NodeType",0,th,"ReplaceError",0,eY,"ResolvedPos",0,e9,"Schema",0,tm,"Slice",0,eX],711379);try{var tN="u">typeof window?window:e.g;tN._sentryModuleMetadata=tN._sentryModuleMetadata||{},tN._sentryModuleMetadata[(new tN.Error).stack]=Object.assign({},tN._sentryModuleMetadata[(new tN.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}class tP{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class tR{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&tR.empty)return tR.empty}recover(e){let t=0,r=65535&e;if(!this.inverted)for(let e=0;e<r;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*r]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let n=0,o=this.inverted?2:1,i=this.inverted?1:2;
vendor: 25,681 bytes, line 6
6for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?n:0);if(a>e)break;let l=this.ranges[s+o],c=this.ranges[s+i],d=a+l;if(e<=d){let o=l?e==a?-1:e==d?1:t:t,i=a+n+(o<0?0:c);if(r)return i;let u=e==(t<0?a:d)?null:s/3+(e-a)*65536,h=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(h|=8),new tP(i,h,u)}n+=c-l}return r?e+n:new tP(e+n,0,null)}touches(e,t){let r=0,n=65535&t,o=this.inverted?2:1,i=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?r:0);if(s>e)break;let a=this.ranges[t+o];if(e<=s+a&&t==3*n)return!0;r+=this.ranges[t+i]-a}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let n=0,o=0;n<this.ranges.length;n+=3){let i=this.ranges[n],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[n+t],c=this.ranges[n+r];e(s,s+l,a,a+c),o+=c-l}}invert(){return new tR(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?tR.empty:new tR(e<0?[0,-e,0]:[0,0,e])}}tR.empty=new tR([]);class tD{constructor(e,t,r=0,n=e?e.length:0){this.mirror=t,this.from=r,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new tD(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],null!=n&&n<t?r+n:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=n&&n>t?r-n-1:void 0)}}invert(){let e=new tD;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let n=0;for(let r=this.from;r<this.to;r++){let o=this._maps[r].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(r);if(null!=t&&t>r&&t<this.to){r=t,e=this._maps[t].recover(o.recover);continue}}n|=o.delInfo,e=o.pos}return r?e:new tP(e,n,null)}}let tI=Object.create(null);class tB{getMap(){return tR.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let r=tI[t.stepType];if(!r)throw RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in tI)throw RangeError("Duplicate use of step JSON ID "+e);return tI[e]=t,t.prototype.jsonID=e,t}}class tL{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new tL(e,null)}static fail(e){return new tL(null,e)}static fromReplace(e,t,r,n){try{return tL.ok(e.replace(t,r,n))}catch(e){if(e instanceof eY)return tL.fail(e.message);throw e}}}function tj(e,t,r){let n=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(tj(i.content,t,i))),i.isInline&&(i=t(i,r,o)),n.push(i)}return eU.fromArray(n)}class tF extends tB{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),n=r.node(r.sharedDepth(this.to)),o=new eX(tj(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,n),t.openStart,t.openEnd);return tL.fromReplace(e,this.from,this.to,o)}invert(){return new tV(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new tF(t.pos,r.pos,this.mark)}merge(e){return e instanceof tF&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new tF(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new tF(t.from,t.to,e.markFromJSON(t.mark))}}tB.jsonID("addMark",tF);class tV extends tB{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new eX(tj(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return tL.fromReplace(e,this.from,this.to,r)}invert(){return new tF(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new tV(t.pos,r.pos,this.mark)}merge(e){return e instanceof tV&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new tV(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new tV(t.from,t.to,e.markFromJSON(t.mark))}}tB.jsonID("removeMark",tV);class tz extends tB{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return tL.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return tL.fromReplace(e,this.pos,this.pos+1,new eX(eU.from(r),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(e))return new tz(this.pos,t.marks[r]);return new tz(this.pos,this.mark)}}return new tK(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new tz(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new tz(t.pos,e.markFromJSON(t.mark))}}tB.jsonID("addNodeMark",tz);class tK extends tB{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return tL.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return tL.fromReplace(e,this.pos,this.pos+1,new eX(eU.from(r),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new tz(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new tK(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new tK(t.pos,e.markFromJSON(t.mark))}}tB.jsonID("removeNodeMark",tK);class t$ extends tB{constructor(e,t,r,n=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=n}apply(e){return this.structure&&tU(e,this.from,this.to)?tL.fail("Structure replace would overwrite content"):tL.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new tR([this.from,this.to-this.from,this.slice.size])}invert(e){return new t$(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&t$.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new t$(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof t$)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?eX.empty:new eX(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t$(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?eX.empty:new eX(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t$(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new t$(t.from,t.to,eX.fromJSON(e,t.slice),!!t.structure)}}t$.MAP_BIAS=1,tB.jsonID("replace",t$);class tH extends tB{constructor(e,t,r,n,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=n,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(tU(e,this.from,this.gapFrom)||tU(e,this.gapTo,this.to)))return tL.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return tL.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?tL.fromReplace(e,this.from,this.to,r):tL.fail("Content does not fit in gap")}getMap(){return new tR([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new tH(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||n<t.pos||o>r.pos?null:new tH(t.pos,r.pos,n,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tH(t.from,t.to,t.gapFrom,t.gapTo,eX.fromJSON(e,t.slice),t.insert,!!t.structure)}}function tU(e,t,r){let n=e.resolve(t),o=r-t,i=n.depth;for(;o>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,o--;if(o>0){let e=n.node(i).maybeChild(n.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function tW(e,t,r,n=r.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<i.childCount;t++){let l=i.child(t),c=a+l.nodeSize,d=n.matchType(l.type);if(d){n=d;for(let t=0;t<l.marks.length;t++)r.allowsMarkType(l.marks[t].type)||e.step(new tV(a,c,l.marks[t]));if(o&&l.isText&&"pre"!=r.whitespace){let e,t=/\r?\n|\r/g,n;for(;e=t.exec(l.text);)n||(n=new eX(eU.from(r.schema.text(" ",r.allowedMarks(l.marks))),0,0)),s.push(new t$(a+e.index,a+e.index+e[0].length,n))}}else s.push(new t$(a,c,eX.empty));a=c}if(!n.validEnd){let t=n.fillBefore(eU.empty,!0);e.replace(a,a,new eX(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}function tq(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,n=0,o=0;;--r){let i=e.$from.node(r),s=e.$from.index(r)+n,a=e.$to.indexAfter(r)-o;if(r<e.depth&&i.canReplace(s,a,t))return r;if(0==r||i.type.spec.isolating||!((0==s||i.canReplace(s,i.childCount))&&(a==i.childCount||i.canReplace(0,a))))break;s&&(n=1),a<i.childCount&&(o=1)}return null}function tJ(e,t,r=null,n=e){let o=function(e,t){let{parent:r,startIndex:n,endIndex:o}=e,i=r.contentMatchAt(n).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return r.canReplaceWith(n,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:r,startIndex:n,endIndex:o}=e,i=r.child(n),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=n;a&&e<o;e++)a=a.matchType(r.child(e).type);return a&&a.validEnd?s:null}(n,t);return i?o.map(tG).concat({type:t,attrs:r}).concat(i.map(tG)):null}function tG(e){return{type:e,attrs:null}}function tY(e,t,r,n){t.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let o=e.mapping.slice(n).map(r+1+i+s.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function tX(e,t,r,n){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let o=e.mapping.slice(n).map(r+1+i);e.replaceWith(o,o+1,t.type.schema.text("\n"))}})}function tZ(e,t,r=1,n){let o=e.resolve(t),i=o.depth-r,s=n&&n[n.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=r-2;e>i;e--,t--){let r=o.node(e),i=o.index(e);if(r.type.spec.isolating)return!1;let s=r.content.cutByIndex(i,r.childCount),a=n&&n[t+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=n&&n[t]||r;if(!r.canReplace(i+1,r.childCount)||!l.type.validContent(s))return!1}let a=o.indexAfter(i),l=n&&n[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function tQ(e,t){let r=e.resolve(t),n=r.index();return t0(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function t0(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let r=e.contentMatchAt(e.childCount),{linebreakReplacement:n}=e.type.schema;for(let o=0;o<t.childCount;o++){let i=t.child(o),s=i.type==n?e.type.schema.nodes.text:i.type;if(!(r=r.matchType(s))||!e.type.allowsMarks(i.marks))return!1}return r.validEnd}(e,t))}function t1(e,t,r){let n=e.resolve(t);if(!r.content.size)return t;let o=r.content;for(let e=0;e<r.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==r.openStart&&r.size?2:1);e++)for(let t=n.depth;t>=0;t--){let r=t==n.depth?0:n.pos<=(n.start(t+1)+n.end(t+1))/2?-1:1,i=n.index(t)+ +(r>0),s=n.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==r?n.pos:r<0?n.before(t+1):n.after(t+1)}return null}function t2(e,t,r=t,n=eX.empty){if(t==r&&!n.size)return null;let o=e.resolve(t),i=e.resolve(r);return t3(o,i,n)?new t$(t,r,n):new t9(o,i,n).fit()}function t3(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}tB.jsonID("replaceAround",tH);class t9{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=eU.empty;for(let t=0;t<=e.depth;t++){let r=e.node(t);this.frontier.push({type:r.type,match:r.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=eU.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,n=this.close(e<0?this.$to:r.doc.resolve(e));if(!n)return null;let o=this.placed,i=r.depth,s=n.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let a=new eX(o,i,s);return e>-1?new tH(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new t$(r.pos,n.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,n=this.unplaced.openEnd;r<e;r++){let o=t.firstChild;if(t.childCount>1&&(n=0),o.type.spec.isolating&&n<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=1==t?e:this.unplaced.openStart;r>=0;r--){let e=null,n=(r?(e=t6(this.unplaced.content,r-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:i,match:s}=this.frontier[o],a,l=null;if(1==t&&(n?s.matchType(n.type)||(l=s.fillBefore(eU.from(n),!1)):e&&i.compatibleContent(e.type)))return{sliceDepth:r,frontierDepth:o,parent:e,inject:l};if(2==t&&n&&(a=s.findWrapping(n.type)))return{sliceDepth:r,frontierDepth:o,parent:e,wrap:a};if(e&&s.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,n=t6(e,t);return!!n.childCount&&!n.firstChild.isLeaf&&(this.unplaced=new eX(e,t+1,Math.max(r,n.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,n=t6(e,t);if(n.childCount<=1&&t>0){let o=e.size-t<=t+n.size;this.unplaced=new eX(t4(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new eX(t4(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:n,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let i=this.unplaced,s=r?r.content:i.content,a=i.openStart-e,l=0,c=[],{match:d,type:u}=this.frontier[t];if(n){for(let e=0;e<n.childCount;e++)c.push(n.child(e));d=d.matchFragment(n)}let h=s.size+e-(i.content.size-i.openEnd);for(;l<s.childCount;){let e=s.child(l),t=d.matchType(e.type);if(!t)break;(++l>1||0==a||e.content.size)&&(d=t,c.push(function e(t,r,n){if(r<=0)return t;let o=t.content;return r>1&&(o=o.replaceChild(0,e(o.firstChild,r-1,1==o.childCount?n-1:0))),r>0&&(o=t.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(eU.empty,!0)))),t.copy(o)}(e.mark(u.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?h:-1)))}let p=l==s.childCount;p||(h=-1),this.placed=t5(this.placed,t,eU.from(c)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<h;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?0==e?eX.empty:new eX(t4(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new eX(t4(i.content,e,l),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!t8(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:r}=this.$to,n=this.$to.after(r);for(;r>1&&n==this.$to.end(--r);)++n;return n}findCloseLevel(e){t:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:n}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=t8(e,t,n,r,o);if(i){for(let r=t-1;r>=0;r--){let{match:t,type:n}=this.frontier[r],o=t8(e,r,n,t,!0);if(!o||o.childCount)continue t}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=t5(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let t=e.node(r),n=t.type.contentMatch.fillBefore(t.content,!0,e.index(r));this.openFrontierNode(t.type,t.attrs,n)}return e}openFrontierNode(e,t=null,r){let n=this.frontier[this.depth];n.match=n.match.matchType(e),this.placed=t5(this.placed,this.depth,eU.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(eU.empty,!0);e.childCount&&(this.placed=t5(this.placed,this.frontier.length,e))}}function t4(e,t,r){return 0==t?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(t4(e.firstChild.content,t-1,r)))}function t5(e,t,r){return 0==t?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(t5(e.lastChild.content,t-1,r)))}function t6(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function t8(e,t,r,n,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!r.compatibleContent(i.type))return null;let a=n.fillBefore(i.content,!0,s);return a&&!function(e,t,r){for(let n=r;n<t.childCount;n++)if(!e.allowsMarks(t.child(n).marks))return!0;return!1}(r,i.content,s)?a:null}function t7(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let o=n;o>=0;o--){let n=e.start(o);if(n<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(n==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==n-1)&&r.push(o)}return r}class re extends tB{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return tL.fail("No node at attribute step's position");let r=Object.create(null);for(let e in t.attrs)r[e]=t.attrs[e];r[this.attr]=this.value;let n=t.type.create(r,null,t.marks);return tL.fromReplace(e,this.pos,this.pos+1,new eX(eU.from(n),0,+!t.isLeaf))}getMap(){return tR.empty}invert(e){return new re(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new re(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new re(t.pos,t.attr,t.value)}}tB.jsonID("attr",re);class rt extends tB{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return tL.ok(r)}getMap(){return tR.empty}invert(e){return new rt(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new rt(t.attr,t.value)}}tB.jsonID("docAttr",rt);let rr=class extends Error{};(rr=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r}).prototype=Object.create(Error.prototype),rr.prototype.constructor=rr,rr.prototype.name="TransformError";class rn{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new tD}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new rr(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let n=this.mapping.maps[r];r&&(e=n.map(e,1),t=n.map(t,-1)),n.forEach((r,n,o,i)=>{e=Math.min(e,o),t=Math.max(t,i)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=eX.empty){let n=t2(this.doc,e,t,r);return n&&this.step(n),this}replaceWith(e,t,r){return this.replace(e,t,new eX(eU.from(r),0,0))}delete(e,t){return this.replace(e,t,eX.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return!function(e,t,r,n){if(!n.size)return e.deleteRange(t,r);let o=e.doc.resolve(t),i=e.doc.resolve(r);if(t3(o,i,n))return e.step(new t$(t,r,n));let s=t7(o,i);0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let r=o.node(e).type.spec;if(r.defining||r.definingAsContext||r.isolating)break;s.indexOf(e)>-1?a=e:o.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],d=n.openStart;for(let e=n.content,t=0;;t++){let r=e.firstChild;if(c.push(r),t==n.openStart)break;e=r.content}for(let e=d-1;e>=0;e--){var u;let t=c[e],r=(u=t.type).spec.defining||u.spec.definingForContent;if(r&&!t.sameMarkup(o.node(Math.abs(a)-1)))d=e;else if(r||!t.type.isTextblock)break}for(let t=n.openStart;t>=0;t--){let a=(t+d+1)%(n.openStart+1),u=c[a];if(u)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],d=!0;c<0&&(d=!1,c=-c);let h=o.node(c-1),p=o.index(c-1);if(h.canReplaceWith(p,p,u.type,u.marks))return e.replace(o.before(c),d?i.after(c):r,new eX(function e(t,r,n,o,i){if(r<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(e(i.content,r+1,n,o,i)))}if(r>o){let e=i.contentMatchAt(0),r=e.fillBefore(t).append(t);t=r.append(e.matchFragment(r).fillBefore(eU.empty,!0))}return t}(n.content,0,n.openStart,a),a,n.openEnd))}}let h=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,r,n),!(e.steps.length>h));a--){let e=s[a];e<0||(t=o.before(e),r=i.after(e))}}(this,e,t,r),this}replaceRangeWith(e,t,r){var n=e,o=t;if(!r.isInline&&n==o&&this.doc.resolve(n).parent.content.size){let e=function(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(0==n.parentOffset)for(let e=n.depth-1;e>=0;e--){let t=n.index(e);if(n.node(e).canReplaceWith(t,t,r))return n.before(e+1);if(t>0)return null}if(n.parentOffset==n.parent.content.size)for(let e=n.depth-1;e>=0;e--){let t=n.indexAfter(e);if(n.node(e).canReplaceWith(t,t,r))return n.after(e+1);if(t<n.node(e).childCount)break}return null}(this.doc,n,r.type);null!=e&&(n=o=e)}return this.replaceRange(n,o,new eX(eU.from(r),0,0)),this}deleteRange(e,t){return!function(e,t,r){let n=e.doc.resolve(t),o=e.doc.resolve(r);if(n.parent.isTextblock&&o.parent.isTextblock&&n.start()!=o.start()&&0==n.parentOffset&&0==o.parentOffset){let i=n.sharedDepth(r),s=!1;for(let e=n.depth;e>i;e--)n.node(e).type.spec.isolating&&(s=!0);for(let e=o.depth;e>i;e--)o.node(e).type.spec.isolating&&(s=!0);if(!s){for(let e=n.depth;e>0&&t==n.start(e);e--)t=n.before(e);for(let e=o.depth;e>0&&r==o.start(e);e--)r=o.before(e);n=e.doc.resolve(t),o=e.doc.resolve(r)}}let i=t7(n,o);for(let t=0;t<i.length;t++){let r=i[t],s=t==i.length-1;if(s&&0==r||n.node(r).type.contentMatch.validEnd)return e.delete(n.start(r),o.end(r));if(r>0&&(s||n.node(r-1).canReplace(n.index(r-1),o.indexAfter(r-1))))return e.delete(n.before(r),o.after(r))}for(let i=1;i<=n.depth&&i<=o.depth;i++)if(t-n.start(i)==n.depth-i&&r>n.end(i)&&o.end(i)-r!=o.depth-i&&n.start(i-1)==o.start(i-1)&&n.node(i-1).canReplace(n.index(i-1),o.index(i-1)))return e.delete(n.before(i),r);e.delete(t,r)}(this,e,t),this}lift(e,t){return!function(e,t,r){let{$from:n,$to:o,depth:i}=t,s=n.before(i+1),a=o.after(i+1),l=s,c=a,d=eU.empty,u=0;for(let e=i,t=!1;e>r;e--)t||n.index(e)>
60?(t=!0,d=eU.from(n.node(e).copy(d)),u++):l--;let h=eU.empty,p=0;for(let e=i,t=!1;e>r;e--)t||o.after(e+1)<o.end(e)?(t=!0,h=eU.from(o.node(e).copy(h)),p++):c++;e.step(new tH(l,c,s,a,new eX(d.append(h),u,p),d.size-u,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,r){let n=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-r),s=i.node().type;if(o&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(o);e&&!t?n=!1:!e&&t&&(n=!0)}let a=e.steps.length;if(!1===n){let n=e.doc.resolve(t+r);tX(e,n.node(),n.before(),a)}s.inlineContent&&tW(e,t+r-1,s,i.node().contentMatchAt(i.index()),null==n);let l=e.mapping.slice(a),c=l.map(t-r);if(e.step(new t$(c,l.map(t+r,-1),eX.empty,!0)),!0===n){let t=e.doc.resolve(c);tY(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,r){let n=eU.empty;for(let e=r.length-1;e>=0;e--){if(n.size){let t=r[e].type.contentMatch.matchFragment(n);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=eU.from(r[e].type.create(r[e].attrs,n))}let o=t.start,i=t.end;e.step(new tH(o,i,o,i,new eX(n,0,0),r.length,!0))}(this,e,t),this}setBlockType(e,t=e,r,n=null){var o=this;if(!r.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let i=o.steps.length;return o.doc.nodesBetween(e,t,(e,t)=>{var s,a,l;let c,d,u="function"==typeof n?n(e):n;if(e.isTextblock&&!e.hasMarkup(r,u)&&(s=o.doc,a=o.mapping.slice(i).map(t),l=r,d=(c=s.resolve(a)).index(),c.parent.canReplaceWith(d,d+1,l))){let n=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?n=!1:!e&&t&&(n=!0)}!1===n&&tX(o,e,t,i),tW(o,o.mapping.slice(i).map(t,1),r,void 0,null===n);let s=o.mapping.slice(i),a=s.map(t,1),l=s.map(t+e.nodeSize,1);return o.step(new tH(a,l,a+1,l-1,new eX(eU.from(r.create(u,null,e.marks)),0,0),1,!0)),!0===n&&tY(o,e,t,i),!1}}),this}setNodeMarkup(e,t,r=null,n){return!function(e,t,r,n,o){let i=e.doc.nodeAt(t);if(!i)throw RangeError("No node at given position");r||(r=i.type);let s=r.create(n,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!r.validContent(i.content))throw RangeError("Invalid content for node type "+r.name);e.step(new tH(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new eX(eU.from(s),0,0),1,!0))}(this,e,t,r,n),this}setNodeAttribute(e,t,r){return this.step(new re(e,t,r)),this}setDocAttribute(e,t){return this.step(new rt(e,t)),this}addNodeMark(e,t){return this.step(new tz(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw RangeError("No node at position "+e);if(t instanceof eG)t.isInSet(r.marks)&&this.step(new tK(e,t));else{let n=r.marks,o,i=[];for(;o=t.isInSet(n);)i.push(new tK(e,o)),n=o.removeFromSet(n);for(let e=i.length-1;e>=0;e--)this.step(i[e])}return this}split(e,t=1,r){return!function(e,t,r=1,n){let o=e.doc.resolve(t),i=eU.empty,s=eU.empty;for(let e=o.depth,t=o.depth-r,a=r-1;e>t;e--,a--){i=eU.from(o.node(e).copy(i));let t=n&&n[a];s=eU.from(t?t.type.create(t.attrs,s):o.node(e).copy(s))}e.step(new t$(t,t,new eX(i.append(s),r,r),!0))}(this,e,t,r),this}addMark(e,t,r){var n;let o,i,s,a;return n=this,s=[],a=[],n.doc.nodesBetween(e,t,(n,l,c)=>{if(!n.isInline)return;let d=n.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),u=Math.min(l+n.nodeSize,t),h=r.addToSet(d);for(let e=0;e<d.length;e++)d[e].isInSet(h)||(o&&o.to==c&&o.mark.eq(d[e])?o.to=u:s.push(o=new tV(c,u,d[e])));i&&i.to==c?i.to=u:a.push(i=new tF(c,u,r))}}),s.forEach(e=>n.step(e)),a.forEach(e=>n.step(e)),this}removeMark(e,t,r){var n;let o,i;return n=this,o=[],i=0,n.doc.nodesBetween(e,t,(n,s)=>{if(!n.isInline)return;i++;let a=null;if(r instanceof tf){let e=n.marks,t;for(;t=r.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else r?r.isInSet(n.marks)&&(a=[r]):a=n.marks;if(a&&a.length){let r=Math.min(s+n.nodeSize,t);for(let t=0;t<a.length;t++){let n=a[t],l;for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&n.eq(o[e].style)&&(l=t)}l?(l.to=r,l.step=i):o.push({style:n,from:Math.max(s,e),to:r,step:i})}}}
6),o.forEach(e=>n.step(new tV(e.from,e.to,e.style))),this}clearIncompatible(e,t,r){return tW(this,e,t,r),this}}e.s(["AddMarkStep",0,tF,"Mapping",0,tD,"RemoveMarkStep",0,tV,"ReplaceAroundStep",0,tH,"ReplaceStep",0,t$,"Step",0,tB,"StepResult",0,tL,"Transform",0,rn,"canJoin",0,tQ,"canSplit",0,tZ,"dropPoint",0,t1,"findWrapping",0,tJ,"joinPoint",0,function(e,t,r=-1){let n=e.resolve(t);for(let e=n.depth;;e--){let o,i,s=n.index(e);if(e==n.depth?(o=n.nodeBefore,i=n.nodeAfter):r>0?(o=n.node(e+1),s++,i=n.node(e).maybeChild(s)):(o=n.node(e).maybeChild(s-1),i=n.node(e+1)),o&&!o.isTextblock&&t0(o,i)&&n.node(e).canReplace(s,s+1))return t;if(0==e)break;t=r<0?n.before(e):n.after(e)}},"liftTarget",0,tq,"replaceStep",0,t2],713249);try{var ro="u">typeof window?window:e.g;ro._sentryModuleMetadata=ro._sentryModuleMetadata||{},ro._sentryModuleMetadata[(new ro.Error).stack]=Object.assign({},ro._sentryModuleMetadata[(new ro.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let ri=Object.create(null);class rs{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new ra(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=eX.empty){let r=t.content.lastChild,n=null;for(let e=0;e<t.openEnd;e++)n=r,r=r.lastChild;let o=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:l}=i[s],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(l.pos),s?eX.empty:t),0==s&&ry(e,o,(r?r.isInline:n&&n.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,n=this.ranges;for(let o=0;o<n.length;o++){let{$from:i,$to:s}=n[o],a=e.mapping.slice(r),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),ry(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let n=e.parent.inlineContent?new rd(e):rg(e.node(0),e.parent,e.pos,e.index(),t,r);if(n)return n;for(let n=e.depth-1;n>=0;n--){let o=t<0?rg(e.node(0),e.node(n),e.before(n+1),e.index(n),t,r):rg(e.node(0),e.node(n),e.after(n+1),e.index(n)+1,t,r);if(o)return o}return null}
vendor: 6,659 bytes, line 6
6static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new rf(e.node(0))}static atStart(e){return rg(e,e,0,0,1)||new rf(e)}static atEnd(e){return rg(e,e,e.content.size,e.childCount,-1)||new rf(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let r=ri[t.type];if(!r)throw RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ri)throw RangeError("Duplicate use of selection JSON ID "+e);return ri[e]=t,t.prototype.jsonID=e,t}getBookmark(){return rd.between(this.$anchor,this.$head).getBookmark()}}rs.prototype.visible=!0;class ra{constructor(e,t){this.$from=e,this.$to=t}}let rl=!1;function rc(e){rl||e.parent.inlineContent||(rl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class rd extends rs{constructor(e,t=e){rc(e),rc(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return rs.near(r);let n=e.resolve(t.map(this.anchor));return new rd(n.parent.inlineContent?n:r,r)}replace(e,t=eX.empty){if(super.replace(e,t),t==eX.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof rd&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ru(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new rd(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let n=e.resolve(t);return new this(n,r==t?n:e.resolve(r))}static between(e,t,r){let n=e.pos-t.pos;if((!r||n)&&(r=n>=0?1:-1),!t.parent.inlineContent){let e=rs.findFrom(t,r,!0)||rs.findFrom(t,-r,!0);if(!e)return rs.near(t,r);t=e.$head}return e.parent.inlineContent||(0==n?e=t:(e=(rs.findFrom(e,-r,!0)||rs.findFrom(e,r,!0)).$anchor).pos<t.pos!=n<0&&(e=t)),new rd(e,t)}}rs.jsonID("text",rd);class ru{constructor(e,t){this.anchor=e,this.head=t}map(e){return new ru(e.map(this.anchor),e.map(this.head))}resolve(e){return rd.between(e.resolve(this.anchor),e.resolve(this.head))}}class rh extends rs{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:n}=t.mapResult(this.anchor),o=e.resolve(n);return r?rs.near(o):new rh(o)}content(){return new eX(eU.from(this.node),0,0)}eq(e){return e instanceof rh&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new rp(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new rh(e.resolve(t.anchor))}static create(e,t){return new rh(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}rh.prototype.visible=!1,rs.jsonID("node",rh);class rp{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new ru(r,r):new rp(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&rh.isSelectable(r)?new rh(t):rs.near(t)}}class rf extends rs{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=eX.empty){if(t==eX.empty){e.delete(0,e.doc.content.size);let t=rs.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new rf(e)}map(e){return new rf(e)}eq(e){return e instanceof rf}getBookmark(){return rm}}rs.jsonID("all",rf);let rm={map(){return this},resolve:e=>new rf(e)};function rg(e,t,r,n,o,i=!1){if(t.inlineContent)return rd.create(e,r);for(let s=n-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let n=t.child(s);if(n.isAtom){if(!i&&rh.isSelectable(n))return rh.create(e,r-(o<0?n.nodeSize:0))}else{let t=rg(e,n,r+o,o<0?n.childCount:0,o,i);if(t)return t}r+=n.nodeSize*o}return null}function ry(e,t,r){let n,o=e.steps.length-1;if(o<t)return;let i=e.steps[o];(i instanceof t$||i instanceof tH)&&(e.mapping.maps[o].forEach((e,t,r,o)=>{null==n&&(n=o)}),e.setSelection(rs.near(e.doc.resolve(n),r)))}class rw extends rn{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return eG.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||eG.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let n=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(n.text(e),!0):this.deleteSelection();{if(null==r&&(r=t),!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=r==t?e.marks():e.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,n.text(e,o)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(rs.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function rv(e,t){return t&&e?e.bind(t):e}class rb{constructor(e,t,r){this.name=e,this.init=rv(t.init,r),this.apply=rv(t.apply,r)}}let rM=[new rb("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new rb("selection",{init:(e,t)=>
6e.selection||rs.atStart(t.doc),apply:e=>e.selection}),new rb("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,r,n)=>n.selection.$cursor?e.storedMarks:null}),new rb("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class rx{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=rM.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new rb(e.key,e.spec.state,e))})}}class rS{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let t=this.config.plugins[r];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),n=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let a=n?n[i].n:0,l=n?n[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,r);if(c&&r.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!n){n=[];for(let e=0;e<this.config.plugins.length;e++)n.push(e<i?{state:r,n:t.length}:{state:this,n:0})}t.push(c),r=r.applyInner(c),o=!0}n&&(n[i]={state:r,n:t.length})}}if(!o)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new rS(this.config),r=this.config.fields;for(let n=0;n<r.length;n++){let o=r[n];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new rw(this)}static create(e){let t=new rx(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new rS(t);for(let n=0;n<t.fields.length;n++)r[t.fields[n].name]=t.fields[n].init(e,r);return r}reconfigure(e){let t=new rx(this.schema,e.plugins),r=t.fields,n=new rS(t);for(let t=0;t<r.length;t++){let o=r[t].name;n[o]=this.hasOwnProperty(o)?this[o]:r[t].init(e,n)}return n}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let r in e){if("doc"==r||"selection"==r)throw RangeError("The JSON fields `doc` and `selection` are reserved");let n=e[r],o=n.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(n,this[n.key]))}return t}static fromJSON(e,t,r){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let n=new rx(e.schema,e.plugins),o=new rS(n);return n.fields.forEach(n=>{if("doc"==n.name)o.doc=te.fromJSON(e.schema,t.doc);else if("selection"==n.name)o.selection=rs.fromJSON(o.doc,t.selection);else if("storedMarks"==n.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let i in r){let s=r[i],a=s.spec.state;if(s.key==n.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,i)){o[n.name]=a.fromJSON.call(s,e,t[i],o);return}}o[n.name]=n.init(e,o)}}),o}}class rk{constructor(e){this.spec=e,this.props={},e.props&&function e(t,r,n){for(let o in t){let i=t[o];i instanceof Function?i=i.bind(r):"handleDOMEvents"==o&&(i=e(i,r,{})),n[o]=i}return n}(e.props,this,this.props),this.key=e.key?e.key.key:r_("plugin")}getState(e){return e[this.key]}}let rE=Object.create(null);function r_(e){return e in rE?e+"$"+ ++rE[e]:(rE[e]=0,e+"$")}class rC{constructor(e="key"){this.key=r_(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}e.s(["AllSelection",0,rf,"EditorState",0,rS,"NodeSelection",0,rh,"Plugin",0,rk,"PluginKey",0,rC,"Selection",0,rs,"SelectionRange",0,ra,"TextSelection",0,rd,"Transaction",0,rw],237336);try{var rO="u">typeof window?window:e.g;rO._sentryModuleMetadata=rO._sentryModuleMetadata||{},rO._sentryModuleMetadata[(new rO.Error).stack]=Object.assign({},rO._sentryModuleMetadata[(new rO.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],377222);try{var rT="u">typeof window?window:e.g;rT._sentryModuleMetadata=rT._sentryModuleMetadata||{},rT._sentryModuleMetadata[(new rT.Error).stack]=Object.assign({},rT._sentryModuleMetadata[(new rT.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var rA="u">typeof window?window:e.g;rA._sentryModuleMetadata=rA._sentryModuleMetadata||{},rA._sentryModuleMetadata[(new rA.Error).stack]=Object.assign({},rA._sentryModuleMetadata[(new rA.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var rN="u">typeof window?window:e.g;rN._sentryModuleMetadata=rN._sentryModuleMetadata||{},rN._sentryModuleMetadata[(new rN.Error).stack]=Object.assign({},rN._sentryModuleMetadata[(new rN.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var rP="u">typeof window?window:e.g;rP._sentryModuleMetadata=rP._sentryModuleMetadata||{},rP._sentryModuleMetadata[(new rP.Error).stack]=Object.assign({},rP._sentryModuleMetadata[(new rP.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var rR="u">typeof window?window:e.g;rR._sentryModuleMetadata=rR._sentryModuleMetadata||{},rR._sentryModuleMetadata[(new rR.Error).stack]=Object.assign({},rR._sentryModuleMetadata[(new rR.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function rD(){return"u">typeof document?document:null}var rI=V;
6e.s(["omit",()=>rI.default],73923);var rI=V;try{var rB="u">typeof window?window:e.g;rB._sentryModuleMetadata=rB._sentryModuleMetadata||{},rB._sentryModuleMetadata[(new rB.Error).stack]=Object.assign({},rB._sentryModuleMetadata[(new rB.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],630874),e.i(131449);try{var rL="u">typeof window?window:e.g;rL._sentryModuleMetadata=rL._sentryModuleMetadata||{},rL._sentryModuleMetadata[(new rL.Error).stack]=Object.assign({},rL._sentryModuleMetadata[(new rL.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var rj=Object.freeze({__proto__:null,COPY_DESCRIPTION:{id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},COPY_LABEL:{id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},CUT_DESCRIPTION:{id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},CUT_LABEL:{id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},PASTE_DESCRIPTION:{id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},PASTE_LABEL:{id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},SELECT_ALL_DESCRIPTION:{id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."},SELECT_ALL_LABEL:{id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."}}),rF=Object.freeze({__proto__:null,ALT_KEY:{id:"keyboard.shortcut.alt",message:"Alt",comment:"Label for alt key in shortcuts."},ARROW_DOWN_KEY:{id:"keyboard.shortcut.arrowDown",message:"Arrow Down",comment:"Label for arrowDown key in shortcuts."},ARROW_LEFT_KEY:{id:"keyboard.shortcut.arrowLeft",message:"Arrow Left",comment:"Label for arrow left key in shortcuts."},ARROW_RIGHT_KEY:{id:"keyboard.shortcut.arrowRight",message:"Arrow Right",comment:"Label for arrow right key in shortcuts."},ARROW_UP_KEY:{id:"keyboard.shortcut.arrowUp",message:"Arrow Up",comment:"Label for arrow up key in shortcuts."},BACKSPACE_KEY:{id:"keyboard.shortcut.backspace",message:"Backspace",comment:"Label for backspace key in shortcuts."},CAPS_LOCK_KEY:{id:"keyboard.shortcut.capsLock",message:"Caps Lock",comment:"Label for caps lock key in shortcuts."},COMMAND_KEY:{id:"keyboard.shortcut.command",message:"Command",comment:"Label for command key in shortcuts."},CONTROL_KEY:{id:"keyboard.shortcut.control",message:"Control",comment:"Label for control key in shortcuts."},DELETE_KEY:{id:"keyboard.shortcut.delete",message:"Delete",comment:"Label for delete key in shortcuts."},END_KEY:{id:"keyboard.shortcut.end",message:"End",comment:"Label for end key in shortcuts."},ENTER_KEY:{id:"keyboard.shortcut.enter",message:"Enter",comment:"Label for enter key in shortcuts."},ESCAPE_KEY:{id:"keyboard.shortcut.escape",message:"Enter",comment:"Label for escape key in shortcuts."},HOME_KEY:{id:"keyboard.shortcut.home",message:"Home",comment:"Label for home key in shortcuts."},PAGE_DOWN_KEY:{id:"keyboard.shortcut.pageDown",message:"Page Down",comment:"Label for page down key in shortcuts."},PAGE_UP_KEY:{id:"keyboard.shortcut.pageUp",message:"Page Up",comment:"Label for page up key in shortcuts."},SHIFT_KEY:{id:"keyboard.shortcut.shift",message:"Shift",comment:"Label for shift key in shortcuts."},SPACE_KEY:{id:"keyboard.shortcut.space",message:"Space",comment:"Label for space key in shortcuts."},TAB_KEY:{id:"keyboard.shortcut.tab",message:"Tab",comment:"Label for tab key in shortcuts."}}),rV=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."},LABEL:{id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."}}),rz=Object.freeze({__proto__:null,REDO_DESCRIPTION:{id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."},REDO_LABEL:{id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."}
6,UNDO_DESCRIPTION:{id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},UNDO_LABEL:{id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."}}),rK=Object.freeze({__proto__:null,DESCRIPTION:{id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."},LABEL:{id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."}}),r$=Object.freeze({__proto__:null,BULLET_LIST_LABEL:{id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},ORDERED_LIST_LABEL:{id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},TASK_LIST_LABEL:{id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."}}),rH=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:{id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."},CONVERT_LABEL:{id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},INSERT_DESCRIPTION:{id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},INSERT_LABEL:{id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."}}),rU=Object.freeze({__proto__:null,NO_ITEMS_AVAILABLE:{id:"react-components.mention-atom-component.zero-items",message:"No items available",comment:"Shown when no popup items are available"}});e.s(["CoreMessages",0,rj,"CoreUtilsMessages",0,rF,"ExtensionBoldMessages",0,rV,"ExtensionHistoryMessages",0,rz,"ExtensionItalicMessages",0,rK,"ExtensionListMessages",0,r$,"ExtensionParagraphMessages",0,rH,"ReactComponentMessages",0,rU],546754);try{var rW="u">typeof window?window:e.g;rW._sentryModuleMetadata=rW._sentryModuleMetadata||{},rW._sentryModuleMetadata[(new rW.Error).stack]=Object.assign({},rW._sentryModuleMetadata[(new rW.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],151941);try{var rq="u">typeof window?window:e.g;rq._sentryModuleMetadata=rq._sentryModuleMetadata||{},rq._sentryModuleMetadata[(new rq.Error).stack]=Object.assign({},rq._sentryModuleMetadata[(new rq.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}class rJ{constructor(e,t,r={}){this.match=e,this.match=e,this.handler="string"==typeof t?function(e){return function(t,r,n,o){let i=e;if(r[1]){let e=r[0].lastIndexOf(r[1]);i+=r[0].slice(e+r[1].length);let t=(n+=e)-o;t>0&&(i=r[0].slice(e-t,e)+i,n=o)}return t.tr.insertText(i,n,o)}}(t):t,this.undoable=!1!==r.undoable,this.inCode=r.inCode||!1,this.inCodeMark=!1!==r.inCodeMark}}function rG({rules:e}){let t=new rk({state:{init:()=>null,apply(e,t){let r=e.getMeta(this);return r||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(r,n,o,i)=>rY(r,n,o,i,e,t),handleDOMEvents:{compositionend:r=>{setTimeout(()=>{let{$cursor:n}=r.state.selection;n&&rY(r,n.pos,n.pos,"",e,t)})}}},isInputRules:!0});return t}function rY(e,t,r,n,o,i){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t),l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+n;for(let c=0;c<o.length;c++){let d=o[c];if(!d.inCodeMark&&a.marks().some(e=>e.type.spec.code))continue;if(a.parent.type.spec.code){if(!d.inCode)continue}else if("only"===d.inCode)continue;let u=d.match.exec(l);if(!u||u[0].length<n.length)continue;let h=t-(u[0].length-n.length);if(!d.inCodeMark){let e=!1;if(s.doc.nodesBetween(h,a.pos,t=>{t.isInline&&t.marks.some(e=>e.type.spec.code)&&(e=!0)}),e)continue}let p=d.handler(s,u,h,r);if(p)return d.undoable&&p.setMeta(i,{transform:p,from:t,to:r,text:n}),e.dispatch(p),!0}return!1}let rX=(e,t)=>{let r=e.plugins;for(let n=0;n<r.length;n++){let o=r[n],i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){let r=e.tr,n=i.transform;
6for(let e=n.steps.length-1;e>=0;e--)r.step(n.steps[e].invert(n.docs[e]));if(i.text){let t=r.doc.resolve(i.from).marks();r.replaceWith(i.from,i.to,e.schema.text(i.text,t))}else r.delete(i.from,i.to);t(r)}return!0}}return!1};new rJ(/--$/,"—",{inCodeMark:!1}),new rJ(/\.\.\.$/,"…",{inCodeMark:!1}),new rJ(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),new rJ(/"$/,"”",{inCodeMark:!1}),new rJ(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),new rJ(/'$/,"’",{inCodeMark:!1}),e.s(["InputRule",0,rJ,"inputRules",0,rG,"undoInputRule",0,rX,"wrappingInputRule",0,function(e,t,r=null,n){return new rJ(e,(e,o,i,s)=>{let a=r instanceof Function?r(o):r,l=e.tr.delete(i,s),c=l.doc.resolve(i).blockRange(),d=c&&tJ(c,t,a);if(!d)return null;l.wrap(c,d);let u=l.doc.resolve(i-1).nodeBefore;return u&&u.type==t&&tQ(l.doc,i-1)&&(!n||n(o,u))&&l.join(i-1),l})}],996425);try{var rZ="u">typeof window?window:e.g;rZ._sentryModuleMetadata=rZ._sentryModuleMetadata||{},rZ._sentryModuleMetadata[(new rZ.Error).stack]=Object.assign({},rZ._sentryModuleMetadata[(new rZ.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],571453);try{var rQ="u">typeof window?window:e.g;rQ._sentryModuleMetadata=rQ._sentryModuleMetadata||{},rQ._sentryModuleMetadata[(new rQ.Error).stack]=Object.assign({},rQ._sentryModuleMetadata[(new rQ.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let r0=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},r1=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},r2=null,r3=function(e,t,r){let n=r2||(r2=document.createRange());return n.setEnd(e,null==r?e.nodeValue.length:r),n.setStart(e,t||0),n},r9=function(){r2=null},r4=function(e,t,r,n){return r&&(r6(e,t,r,n,-1)||r6(e,t,r,n,1))},r5=/^(img|br|input|textarea|hr)$/i;function r6(e,t,r,n,o){for(var i;;){if(e==r&&t==n)return!0;if(t==(o<0?0:r8(e))){let r=e.parentNode;if(!r||1!=r.nodeType||r7(e)||r5.test(e.nodeName)||"false"==e.contentEditable)return!1;t=r0(e)+(o<0?0:1),e=r}else{if(1!=e.nodeType)return!1;let r=e.childNodes[t+(o<0?-1:0)];if(1==r.nodeType&&"false"==r.contentEditable)if(null==(i=r.pmViewDesc)||!i.ignoreForSelection)return!1;else t+=o;else e=r,t=o<0?r8(e):0}}}function r8(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function r7(e){let t;for(let r=e;
vendor: 13,802 bytes, line 6
6r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let ne=function(e){return e.focusNode&&r4(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function nt(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}let nr="u">typeof navigator?navigator:null,nn="u">typeof document?document:null,no=nr&&nr.userAgent||"",ni=/Edge\/(\d+)/.exec(no),ns=/MSIE \d/.exec(no),na=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(no),nl=!!(ns||na||ni),nc=ns?document.documentMode:na?+na[1]:ni?+ni[1]:0,nd=!nl&&/gecko\/(\d+)/i.test(no);nd&&(/Firefox\/(\d+)/.exec(no)||[0,0])[1];let nu=!nl&&/Chrome\/(\d+)/.exec(no),nh=!!nu,np=nu?+nu[1]:0,nf=!nl&&!!nr&&/Apple Computer/.test(nr.vendor),nm=nf&&(/Mobile\/\w+/.test(no)||!!nr&&nr.maxTouchPoints>2),ng=nm||!!nr&&/Mac/.test(nr.platform),ny=!!nr&&/Win/.test(nr.platform),nw=/Android \d/.test(no),nv=!!nn&&"webkitFontSmoothing"in nn.documentElement.style,nb=nv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function nM(e,t){return"number"==typeof e?e:e[t]}function nx(e,t,r){let n=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=r||e.dom;s;){if(1!=s.nodeType){s=r1(s);continue}let e=s,r=e==i.body,a=r?function(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}(i):function(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}(e),l=0,c=0;if(t.top<a.top+nM(n,"top")?c=-(a.top-t.top+nM(o,"top")):t.bottom>a.bottom-nM(n,"bottom")&&(c=t.bottom-t.top>a.bottom-a.top?t.top+nM(o,"top")-a.top:t.bottom-a.bottom+nM(o,"bottom")),t.left<a.left+nM(n,"left")?l=-(a.left-t.left+nM(o,"left")):t.right>a.right-nM(n,"right")&&(l=t.right-a.right+nM(o,"right")),l||c)if(r)i.defaultView.scrollBy(l,c);else{let r=e.scrollLeft,n=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-r,i=e.scrollTop-n;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}let d=r?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s="absolute"==d?s.offsetParent:r1(s)}}function nS(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=r1(n));return t}function nk(e,t){for(let r=0;r<e.length;r++){let{dom:n,top:o,left:i}=e[r];n.scrollTop!=o+t&&(n.scrollTop=o+t),n.scrollLeft!=i&&(n.scrollLeft=i)}}let nE=null;function n_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function nC(e){return e.top<e.bottom||e.left<e.right}function nO(e,t){let r=e.getClientRects();if(r.length){let e=r[t<0?0:r.length-1];if(nC(e))return e}return Array.prototype.find.call(r,nC)||e.getBoundingClientRect()}let nT=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function nA(e,t,r){let{node:n,offset:o,atom:i}=e.docView.domFromPos(t,r<0?-1:1),s=nv||nd;if(3==n.nodeType)if(s&&(nT.test(n.nodeValue)||(r<0?!o:o==n.nodeValue.length))){let e=nO(r3(n,o,o),r);if(nd&&o&&/\s/.test(n.nodeValue[o-1])&&o<n.nodeValue.length){let t=nO(r3(n,o-1,o-1),-1);if(t.top==e.top){let r=nO(r3(n,o,o+1),-1);if(r.top!=e.top)return nN(r,r.left<t.left)}}return e}else{let e=o,t=o,i=r<0?1:-1;return r<0&&!o?(t++,i=-1):r>=0&&o==n.nodeValue.length?(e--,i=1):r<0?e--:t++,nN(nO(r3(n,e,t),i),i<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(r<0||o==r8(n))){let e=n.childNodes[o-1];if(1==e.nodeType)return nP(e.getBoundingClientRect(),!1)}if(null==i&&o<r8(n)){let e=n.childNodes[o];if(1==e.nodeType)return nP(e.getBoundingClientRect(),!0)}return nP(n.getBoundingClientRect(),r>=0)}if(null==i&&o&&(r<0||o==r8(n))){let e=n.childNodes[o-1],t=3==e.nodeType?r3(e,r8(e)-!s):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return nN(nO(t,1),!1)}if(null==i&&o<r8(n)){let e=n.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?r3(e,0,+!s):1==e.nodeType?e:null:null;if(t)return nN(nO(t,-1),!0)}return nN(nO(3==n.nodeType?r3(n):n,-r),r>=0)}function nN(e,t){if(0==e.width)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function nP(e,t){if(0==e.height)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function nR(e,t,r){let n=e.state,o=e.root.activeElement;n!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),o!=e.dom&&o&&o.focus()}}let nD=/[\u0590-\u08ac]/,nI=null,nB=null,nL=!1;class nj{constructor(e,t,r,n){this.parent=e,this.children=t,this.dom=r,this.contentDOM=n,this.dirty=0,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let n=this.children[t];if(n==e)return r;r+=n.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){let n;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode))if(r<0){let r,n;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&!((n=r.pmViewDesc)&&n.parent==this);)r=r.previousSibling;return r?this.posBeforeChild(n)+n.size:this.posAtStart}else{let r,n;if(e==this.contentDOM)r=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.nextSibling}for(;r&&!((n=r.pmViewDesc)&&n.parent==this);)r=r.nextSibling;return r?this.posBeforeChild(n):this.posAtEnd}if(e==this.dom&&this.contentDOM)n=t>r0(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))n=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){n=!1;break}if(t.previousSibling)break}if(null==n&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){n=!0;break}if(t.nextSibling)break}}return(null==n?r>0:n)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,n=e;n;n=n.parentNode){let o=this.getDesc(n),i;if(o&&(!t||o.node))if(!r||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;else r=!1}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,r){for(let n=e;n;n=n.parentNode){let o=this.getDesc(n);if(o)return o.localPosFromDOM(e,t,r)}return -1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let n=this.children[t],o=r+n.size;if(r==e&&o!=r){for(;!n.border&&n.children.length;)for(let e=0;e<n.children.length;e++){let t=n.children[e];if(t.size){n=t;break}}return n}if(e<o)return n.descAt(e-r-n.border);r=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,n=0;for(let t=0;r<this.children.length;r++){let o=this.children[r],i=t+o.size;if(i>e||o instanceof nU){n=e-t;break}t=i}if(n)return this.children[r].domFromPos(n-this.children[r].border,t);for(let e;r&&!(e=this.children[r-1]).size&&e instanceof nF&&e.side>=0;r--);if(t<=0){let e,n=!0;for(;(e=r?this.children[r-1]:null)&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?r0(e.dom)+1:0}}{let e,n=!0;for(;(e=r<this.children.length?this.children[r]:null)&&e.dom.parentNode!=this.contentDOM;r++,n=!1);return e&&n&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?r0(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let n=-1,o=-1;for(let i=r,s=0;;s++){let r=this.children[s],a=i+r.size;if(-1==n&&e<=a){let o=i+r.border;if(e>=o&&t<=a-r.border&&r.node&&r.contentDOM&&this.contentDOM.contains(r.contentDOM))return r.parseRange(e,t,o);e=i;for(let t=s;t>0;t--){let r=this.children[t-1];if(r.size&&r.dom.parentNode==this.contentDOM&&!r.emptyChildAt(1)){n=r0(r.dom)+1;break}e-=r.size}-1==n&&(n=0)}if(n>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let r=this.children[e];if(r.size&&r.dom.parentNode==this.contentDOM&&!r.emptyChildAt(-1)){o=r0(r.dom);break}t+=r.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=a}return{node:this.contentDOM,from:e,to:t,fromOffset:n,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(1!=t.nodeType||r==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,n=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(o>a&&i<c)return l.setSelection(e-a-l.border,t-a-l.border,r,n);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((nd||nf)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if((d=!!(t&&"\n"==e.nodeValue[t-1]))&&t==e.nodeValue.length)for(let t=e,r;t;t=t.parentNode){if(r=t.nextSibling){"BR"==r.nodeName&&(s=a={node:r.parentNode,offset:r0(r)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let r=e.childNodes[t-1];d=r&&("BR"==r.nodeName||"false"==r.contentEditable)}}if(nd&&c.focusNode&&c.focusNode!=a.node&&1==c.focusNode.nodeType){let e=c.focusNode.childNodes[c.focusOffset];e&&"false"==e.contentEditable&&(n=!0)}if(!(n||d&&nf)&&r4(s.node,s.offset,c.anchorNode,c.anchorOffset)&&r4(a.node,a.offset,c.focusNode,c.focusOffset))return;let u=!1;if((l.extend||e==t)&&!(d&&nd)){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),u=!0}catch(e){}}if(!u){if(e>t){let e=s;s=a,a=e}let r=document.createRange();r.setEnd(a.node,a.offset),r.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(r)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,n=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==i?e<=i&&t>=r:e<i&&t>r){let n=r+o.border,s=i-o.border;if(e>=n&&t<=s){this.dirty=e==r||t==i?2:1,e==n&&t==s&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=3:o.markDirty(e-n,t-n);return}o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=1==e?2:1;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class nF extends nj{constructor(e,t,r,n){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:n)),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class nV extends nj{constructor(e,t,r,n){super(e,[],t,null),this.textDOM=r,this.text=n}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class nz extends nj{constructor(e,t,r,n,o){super(e,[],r,n),this.mark=t,this.spec=o}static create(e,t,r,n){let o=n.nodeViews[t.type.name],i=o&&o(t,n,r);return i&&i.dom||(i=t_.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new nz(e,t,i.dom,i.contentDOM||i.dom,i)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,r){let n=nz.create(this.parent,this.mark,!0,r),o=this.children,i=this.size;t<i&&(o=n2(o,t,i,r)),e>0&&(o=n2(o,0,e,r));for(let e=0;e<o.length;e++)o[e].parent=n;return n.children=o,n}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class nK extends nj{constructor(e,t,r,n,o,i,s,a,l){super(e,[],o,i),this.node=t,this.outerDeco=r,this.innerDeco=n,this.nodeDOM=s}static create(e,t,r,n,o,i){let s=o.nodeViews[t.type.name],a,l=s&&s(t,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:i,r,n),c=l&&l.dom,d=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);
6else if(!c){let e=t_.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:c,contentDOM:d}=e)}d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let u=c;return(c=nX(c,r,t),l)?a=new nW(e,t,r,n,c,d||null,u,l,o,i+1):t.isText?new nH(e,t,r,n,c,u,o):new nK(e,t,r,n,c,d||null,u,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>eU.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,r){return 0==this.dirty&&e.eq(this.node)&&nZ(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let r=this.node.inlineContent,n=t,o=e.composing?this.localCompositionInfo(e,t):null,i=o&&o.pos>-1?o:null,s=o&&o.pos<0,a=new n0(this,i&&i.node,e);(function(e,t,r,n){let o=t.locals(e),i=0;if(0==o.length){for(let r=0;r<e.childCount;r++){let s=e.child(r);n(s,o,t.forChild(i,s),r),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,u,h,p;for(;s<o.length&&o[s].to==i;){let e=o[s++];e.widget&&(d?(u||(u=[d])).push(e):d=e)}if(d)if(u){u.sort(n1);for(let e=0;e<u.length;e++)r(u[e],c,!!l)}else r(d,c,!!l);if(l)p=-1,h=l,l=null;else if(c<e.childCount)p=c,h=e.child(c++);else break;for(let e=0;e<a.length;e++)a[e].to<=i&&a.splice(e--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let f=i+h.nodeSize;if(h.isText){let e=f;s<o.length&&o[s].from<e&&(e=o[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<f&&(l=h.cut(e-i),h=h.cut(0,e-i),f=e,p=-1)}else for(;s<o.length&&o[s].to<f;)s++;let m=h.isInline&&!h.isLeaf?a.filter(e=>!e.inline):a.slice();n(h,m,t.forChild(i,h),p),i=f}})(this.node,this.innerDeco,(t,o,i)=>{t.spec.marks?a.syncToMarks(t.spec.marks,r,e,o):t.type.side>=0&&!i&&a.syncToMarks(o==this.node.childCount?eG.none:this.node.child(o).marks,r,e,o),a.placeWidget(t,e,n)},(t,i,l,c)=>{let d;a.syncToMarks(t.marks,r,e,c),a.findNodeMatch(t,i,l,c)||s&&e.state.selection.from>n&&e.state.selection.to<n+t.nodeSize&&(d=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(t,i,l,d,e)||a.updateNextNode(t,i,l,e,c,n)||a.addNode(t,i,l,e,n),n+=t.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(i&&this.protectLocalComposition(e,i),function e(t,r,n){let o=t.firstChild,i=!1;for(let s=0;s<r.length;s++){let a=r[s],l=a.dom;if(l.parentNode==t){for(;l!=o;)o=nQ(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(a instanceof nz){let r=o?o.previousSibling:t.lastChild;e(a.contentDOM,a.children,n),o=r?r.nextSibling:t.firstChild}}for(;o;)o=nQ(o),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}(this.contentDOM,this.children,e),nm&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:r,to:n}=e.state.selection;if(!(e.state.selection instanceof rd)||r<t||n>t+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(!this.node.inlineContent)return{node:o,pos:-1,text:""};{let e=o.nodeValue,i=function(e,t,r,n){for(let o=0,i=0;o<e.childCount&&i<=n;){let s=e.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=r){if(i>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let e=a<n?l.lastIndexOf(t,n-a-1):-1;if(e>=0&&e+t.length+a>=r)return a+e;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return -1}(this.node.content,e,r-t,n-t);return i<0?null:{node:o,pos:i,text:e}}}protectLocalComposition(e,{node:t,pos:r,text:n}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new nV(this,o,t,n);e.input.compositionNodes.push(i),this.children=n2(this.children,r,r+n.length,e,i)}update(e,t,r,n){return 3!=this.dirty&&!!e.sameMarkup(this.node)&&(this.updateInner(e,t,r,n),!0)}updateInner(e,t,r,n){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(n,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(nZ(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,r=this.dom;this.dom=nY(this.dom,this.nodeDOM,nG(this.outerDeco,this.node,t),nG(e,this.node,t)),this.dom!=r&&(r.pmVie
6wDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function n$(e,t,r,n,o){nX(n,t,e);let i=new nK(void 0,e,t,r,n,n,n,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class nH extends nK{constructor(e,t,r,n,o,i,s){super(e,t,r,n,o,null,i,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,n){return 3!=this.dirty&&(0==this.dirty||!!this.inParent())&&!!e.sameMarkup(this.node)&&(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,n.trackWrites==this.nodeDOM&&(n.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,r){let n=this.node.cut(e,t),o=document.createTextNode(n.text);return new nH(this.parent,n,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class nU extends nj{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class nW extends nK{constructor(e,t,r,n,o,i,s,a,l,c){super(e,t,r,n,o,i,s,l,c),this.spec=a}update(e,t,r,n){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,n),o}return(!!this.contentDOM||!!e.isLeaf)&&super.update(e,t,r,n)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,n){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,n)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}let nq=function(e){e&&(this.nodeName=e)};nq.prototype=Object.create(null);let nJ=[new nq];function nG(e,t,r){if(0==e.length)return nJ;let n=r?nJ[0]:new nq,o=[n];for(let i=0;i<e.length;i++){let s=e[i].type.attrs;if(s)for(let e in s.nodeName&&o.push(n=new nq(s.nodeName)),s){let i=s[e];null!=i&&(r&&1==o.length&&o.push(n=new nq(t.isInline?"span":"div")),"class"==e?n.class=(n.class?n.class+" ":"")+i:"style"==e?n.style=(n.style?n.style+";":"")+i:"nodeName"!=e&&(n[e]=i))}}return o}function nY(e,t,r,n){if(r==nJ&&n==nJ)return t;let o=t;for(let t=0;t<n.length;t++){let i=n[t],s=r[t];if(t){let t;s&&s.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||((t=document.createElement(i.nodeName)).pmIsDeco=!0,t.appendChild(o),s=nJ[0]),o=t}!function(e,t,r){for(let n in t)"class"==n||"style"==n||"nodeName"==n||n in r||e.removeAttribute(n);for(let n in r)"class"!=n&&"style"!=n&&"nodeName"!=n&&r[n]!=t[n]&&e.setAttribute(n,r[n]);if(t.class!=r.class){let n=t.class?t.class.split(" ").filter(Boolean):[],o=r.class?r.class.split(" ").filter(Boolean):[];for(let t=0;t<n.length;t++)-1==o.indexOf(n[t])&&e.classList.remove(n[t]);for(let t=0;t<o.length;t++)-1==n.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=r.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,n;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}r.style&&(e.style.cssText+=r.style)}}(o,s||nJ[0],i)}return o}function nX(e,t,r){return nY(e,e,nJ,nG(t,r,1!=e.nodeType))}function nZ(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].type.eq(t[r].type))return!1;return!0}function nQ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class n0{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let r=t,n=r.children.length,o=e.childCount,i=new Map,s=[];r:for(;o>0;){let a;for(;;)if(n){let e=r.children[n-1];if(e instanceof nz)r=e,n=e.children.length;else{a=e,n--;break}}else if(r==t)break r;else n=r.parent.children.indexOf(r),r=r.parent;let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r,n){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&!1!==e[o].type.spec.spanning;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let o=-1,s=this.top.children.length;n<this.preMatch.index&&(s=Math.min(this.index+3,s));for(let t=this.index;t<s;t++){let r=this.top.children[t];if(r.matchesMark(e[i])&&!this.isLocked(r.dom)){o=t;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let n=nz.create(this.top,e[i],t,r);this.top.children.splice(this.index,0,n),this.top=n,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,r,n){let o=-1,i;if(n>=this.preMatch.index&&(i=this.preMatch.matches[n-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,r))o=this.top.children.indexOf(i,this.index);else for(let n=this.index,i=Math.min(this.top.children.length,n+5);n<i;n++){let i=this.top.children[n];if(i.matchesNode(e,t,r)&&!this.preMatch.matched.has(i)){o=n;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,r,n,o){let i=this.top.children[n];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,r,o)&&(this.destroyBetween(this.index,n),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return -1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return -1}e=t}}updateNextNode(e,t,r,n,o,i){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof nK){let l=this.preMatch.matched.get(a);if(null!=l&&l!=o)return!1;
6let c=a.dom,d,u=this.isLocked(c)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&nZ(t,a.outerDeco));if(!u&&a.update(e,t,r,n))return this.destroyBetween(this.index,s),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!u&&(d=this.recreateWrapper(a,e,t,r,n,i)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=2,d.updateChildren(n,i+1),d.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,n,o,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!nZ(r,e.outerDeco)||!n.eq(e.innerDeco))return null;let s=nK.create(this.top,t,r,n,o,i);if(s.contentDOM)for(let t of(s.children=e.children,e.children=[],s.children))t.parent=s;return e.destroy(),s}addNode(e,t,r,n,o){let i=nK.create(this.top,e,t,r,n,o);i.contentDOM&&i.updateChildren(n,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,r){let n=this.index<this.top.children.length?this.top.children[this.index]:null;if(n&&n.matchesWidget(e)&&(e==n.widget||!n.widget.type.toDOM.parentNode))this.index++;else{let n=new nF(this.top,e,t,r);this.top.children.splice(this.index++,0,n),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof nz;)e=(t=e).children[t.children.length-1];(!e||!(e instanceof nH)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((nf||nh)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);"IMG"==e&&(r.className="ProseMirror-separator",r.alt=""),"BR"==e&&(r.className="ProseMirror-trailingBreak");let n=new nU(this.top,[],r,null);t!=this.top?t.children.push(n):t.children.splice(this.index++,0,n),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function n1(e,t){return e.type.side-t.type.side}function n2(e,t,r,n,o){let i=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,d=a+=l.size;c>=r||d<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,n)),o&&(i.push(o),o=void 0),d>r&&i.push(l.slice(r-c,l.size,n)))}return i}function n3(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let o=e.docView.nearestDesc(r.focusNode),i=o&&0==o.size,s=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(s<0)return null;let a=n.resolve(s),l,c;if(ne(r)){for(l=s;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&rh.isSelectable(e)&&o.parent&&!(e.isInline&&function(e,t,r){for(let n=0==t,o=t==r8(e);n||o;){if(e==r)return!0;let t=r0(e);if(!(e=e.parentNode))return!1;n=n&&0==t,o=o&&t==r8(e)}}(r.focusNode,r.focusOffset,o.dom))){let e=o.posBefore;c=new rh(s==e?a:n.resolve(e))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let t=s,o=s;for(let n=0;n<r.rangeCount;n++){let i=r.getRangeAt(n);t=Math.min(t,e.docView.posFromDOM(i.startContainer,i.startOffset,1)),o=Math.max(o,e.docView.posFromDOM(i.endContainer,i.endOffset,-1))}if(t<0)return null;[l,s]=o==e.state.selection.anchor?[o,t]:[t,o],a=n.resolve(s)}else l=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(l<0)return null}let d=n.resolve(l);if(!c){let r="pointer"==t||e.state.selection.head<a.pos&&!i?1:-1;c=or(e,d,a,r)}return c}function n9(e){return e.editable?e.hasFocus():oo(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function n4(e,t=!1){let r=e.state.selection;if(oe(e,r),n9(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&nh){let t=e.domSelectionRange(),r=e.domObserver.currentSelection;if(t.anchorNode&&r.anchorNode&&r4(t.anchorNode,t.anchorOffset,r.anchorNode,r.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection();if(!t)return;let r=e.cursorWrapper.dom,n="IMG"==r.nodeName;n?t.collapse(r.parentNode,r0(r)+1):t.collapse(r,0),!n&&!e.state.selection.visible&&nl&&nc<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var n;
6let o,i,s,a,{anchor:l,head:c}=r,d,u;n5&&!(r instanceof rd)&&(r.$from.parent.inlineContent||(d=n6(e,r.from)),r.empty||r.$from.parent.inlineContent||(u=n6(e,r.to))),e.docView.setSelection(l,c,e,t),n5&&(d&&n7(d),u&&n7(u)),r.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&((o=(n=e).dom.ownerDocument).removeEventListener("selectionchange",n.input.hideSelectionGuard),s=(i=n.domSelectionRange()).anchorNode,a=i.anchorOffset,o.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(i.anchorNode!=s||i.anchorOffset!=a)&&(o.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!n9(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let n5=nf||nh&&np<63;function n6(e,t){let{node:r,offset:n}=e.docView.domFromPos(t,0),o=n<r.childNodes.length?r.childNodes[n]:null,i=n?r.childNodes[n-1]:null;if(nf&&o&&"false"==o.contentEditable)return n8(o);if((!o||"false"==o.contentEditable)&&(!i||"false"==i.contentEditable)){if(o)return n8(o);else if(i)return n8(i)}}function n8(e){return e.contentEditable="true",nf&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function n7(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function oe(e,t){if(t instanceof rh){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(ot(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else ot(e)}function ot(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function or(e,t,r,n){return e.someProp("createSelectionBetween",n=>n(e,t,r))||rd.between(t,r,n)}function on(e){return(!e.editable||!!e.hasFocus())&&oo(e)}function oo(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function oi(e,t){let{$anchor:r,$head:n}=e.selection,o=t>0?r.max(n):r.min(n),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&rs.findFrom(i,t)}function oa(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ol(e,t,r){let n=e.state.selection;if(n instanceof rd){if(r.indexOf("s")>-1){let{$head:r}=n,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let i=e.state.doc.resolve(r.pos+o.nodeSize*(t<0?-1:1));return oa(e,new rd(n.$anchor,i))}else if(!n.empty)return!1;else if(e.endOfTextblock(t>0?"forward":"backward")){let r=oi(e.state,t);return!!r&&r instanceof rh&&oa(e,r)}else if(!(ng&&r.indexOf("m")>-1)){let r=n.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter,i;if(!o||o.isText)return!1;let s=t<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(i=e.docView.descAt(s))&&!i.contentDOM)&&(rh.isSelectable(o)?oa(e,new rh(t<0?e.state.doc.resolve(r.pos-o.nodeSize):r)):!!nv&&oa(e,new rd(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}else{if(n instanceof rh&&n.node.isInline)return oa(e,new rd(t>0?n.$to:n.$from));let r=oi(e.state,t);return!!r&&oa(e,r)}}function oc(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function od(e,t){let r=e.pmViewDesc;return r&&0==r.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function ou(e,t){return t<0?function(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let o,i,s=!1;for(nd&&1==r.nodeType&&n<oc(r)&&od(r.childNodes[n],-1)&&(s=!0);;)if(n>0)if(1!=r.nodeType)break;else{let e=r.childNodes[n-1];if(od(e,-1))o=r,i=--n;else if(3==e.nodeType)n=(r=e).nodeValue.length;else break}else if(oh(r))break;else{let t=r.previousSibling;for(;t&&od(t,-1);)o=r.parentNode,i=r0(t),t=t.previousSibling;if(t)n=oc(r=t);else{if((r=r.parentNode)==e.dom)break;n=0}}s?op(e,r,n):o&&op(e,o,i)}(e):function(e){let t,r,n=e.domSelectionRange(),o=n.focusNode,i=n.focusOffset;if(!o)return;let s=oc(o);for(;;)if(i<s){if(1!=o.nodeType)break;if(od(o.childNodes[i],1))t=o,r=++i;else break}else if(oh(o))break;else{let n=o.nextSibling;for(;n&&od(n,1);)t=n.parentNode,r=r0(n)+1,n=n.nextSibling;if(n)i=0,s=oc(o=n);else{if((o=o.parentNode)==e.dom)break;i=s=0}}t&&op(e,t,r)}(e)}function oh(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function op(e,t,r){if(3!=t.nodeType){let e,n;(n=function(e,t){for(;e&&t==e.childNodes.length&&!r7(e);)t=r0(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let r=e.childNodes[t];
vendor: 4,940 bytes, line 6
6if(3==r.nodeType)return r;if(1==r.nodeType&&"false"==r.contentEditable)break;e=r,t=0}}(t,r))?(t=n,r=0):(e=function(e,t){for(;e&&!t&&!r7(e);)t=r0(e),e=e.parentNode;for(;e&&t;){let r=e.childNodes[t-1];if(3==r.nodeType)return r;if(1==r.nodeType&&"false"==r.contentEditable)break;t=(e=r).childNodes.length}}(t,r))&&(t=e,r=e.nodeValue.length)}let n=e.domSelection();if(!n)return;if(ne(n)){let e=document.createRange();e.setEnd(t,r),e.setStart(t,r),n.removeAllRanges(),n.addRange(e)}else n.extend&&n.extend(t,r);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&n4(e)},50)}function of(e,t){let r=e.state.doc.resolve(t);if(!(nh||ny)&&r.parent.inlineContent){let n=e.coordsAtPos(t);if(t>r.start()){let r=e.coordsAtPos(t-1),o=(r.top+r.bottom)/2;if(o>n.top&&o<n.bottom&&Math.abs(r.left-n.left)>1)return r.left<n.left?"ltr":"rtl"}if(t<r.end()){let r=e.coordsAtPos(t+1),o=(r.top+r.bottom)/2;if(o>n.top&&o<n.bottom&&Math.abs(r.left-n.left)>1)return r.left>n.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function om(e,t,r){let n=e.state.selection;if(n instanceof rd&&!n.empty||r.indexOf("s")>-1||ng&&r.indexOf("m")>-1)return!1;let{$from:o,$to:i}=n;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let r=oi(e.state,t);if(r&&r instanceof rh)return oa(e,r)}if(!o.parent.inlineContent){let r=t<0?o:i,s=n instanceof rf?rs.near(r,t):rs.findFrom(r,t);return!!s&&oa(e,s)}return!1}function og(e,t){if(!(e.state.selection instanceof rd))return!0;let{$head:r,$anchor:n,empty:o}=e.state.selection;if(!r.sameParent(n))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(i&&!i.isText){let n=e.state.tr;return t<0?n.delete(r.pos-i.nodeSize,r.pos):n.delete(r.pos,r.pos+i.nodeSize),e.dispatch(n),!0}return!1}function oy(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function ow(e,t){e.someProp("transformCopied",r=>{t=r(t,e)});let r=[],{content:n,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==n.childCount&&1==n.firstChild.childCount;){o--,i--;let e=n.firstChild;r.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),n=e.content}let s=e.someProp("clipboardSerializer")||t_.fromSchema(e.state.schema),a=o_(),l=a.createElement("div");l.appendChild(s.serializeFragment(n,{document:a}));let c=l.firstChild,d,u=0;for(;c&&1==c.nodeType&&(d=ok[c.nodeName.toLowerCase()]);){for(let e=d.length-1;e>=0;e--){let t=a.createElement(d[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),u++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${o} ${i}${u?` -${u}`:""} ${JSON.stringify(r)}`),{dom:l,text:e.someProp("clipboardTextSerializer",r=>r(t,e))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function ov(e,t,r,n,o){let i,s,a=o.parent.type.spec.code;if(!r&&!t)return null;let l=!!t&&(n||a||!r);if(l){if(e.someProp("transformPastedText",r=>{t=r(t,a||n,e)}),a)return s=new eX(eU.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0),e.someProp("transformPasted",t=>{s=t(s,e,!0)}),s;let r=e.someProp("clipboardTextParser",r=>r(t,o,n,e));if(r)s=r;else{let r=o.marks(),{schema:n}=e.state,s=t_.fromSchema(n);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(n.text(e,r)))})}}else e.someProp("transformPastedHTML",t=>{r=t(r,e)}),i=function(e){var t;let r,n=/^(\s*<meta [^>]*>)*/.exec(e);n&&(e=e.slice(n[0].length));let o=o_().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e),s;if((s=i&&ok[i[1].toLowerCase()])&&(e=s.map(e=>"<"+e+">").join("")+e+s.map(e=>"</"+e+">").reverse().join("")),o.innerHTML=(t=e,(r=window.trustedTypes)?(oC||(oC=r.defaultPolicy||r.createPolicy("ProseMirrorClipboard",{createHTML:e=>e})),oC.createHTML(t)):t),s)for(let e=0;e<s.length;e++)o=o.querySelector(s[e])||o;return o}(r),nv&&function(e){let t=e.querySelectorAll(nh?"span:not([class]):not([style])":"span.Apple-converted-space");for(let r=0;r<t.length;r++){let n=t[r];1==n.childNodes.length&&" "==n.textContent&&n.parentNode&&n.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),n)}}(i);let c=i&&i.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=i.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;i=e}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||ty.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||d),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||ob.test(e.parentNode.nodeName)?null:{ignore:!0}})),d)s=function(e,t){if(!e.size)return e;let r=e.content.firstChild.type.schema,n;try{n=JSON.parse(t)}catch(t){return e}let{content:o,openStart:i,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;o=eU.from(t.create(n[e+1],o)),i++,s++}
6return new eX(o,i,s)}(oS(s,+d[1],+d[2]),d[4]);else if((s=eX.maxOpen(function(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.index(r)),o,i=[];if(e.forEach(e=>{if(!i)return;let t=n.findWrapping(e.type),r;if(!t)return i=null;if(r=i.length&&o.length&&function e(t,r,n,o,i){if(i<t.length&&i<r.length&&t[i]==r[i]){let s=e(t,r,n,o.lastChild,i+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(i==t.length-1?n.type:t[i+1]))return o.copy(o.content.append(eU.from(oM(n,t,i+1))))}}(t,o,e,i[i.length-1],0))i[i.length-1]=r;else{i.length&&(i[i.length-1]=function e(t,r){if(0==r)return t;let n=t.content.replaceChild(t.childCount-1,e(t.lastChild,r-1)),o=t.contentMatchAt(t.childCount).fillBefore(eU.empty,!0);return t.copy(n.append(o))}(i[i.length-1],o.length));let r=oM(e,t);i.push(r),n=n.matchType(r.type),o=t}}),i)return eU.from(i)}return e}(s.content,o),!0)).openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=oS(s,e,t)}return e.someProp("transformPasted",t=>{s=t(s,e,l)}),s}let ob=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function oM(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,eU.from(e));return e}function ox(e,t,r,n,o,i){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(i=0),o<n-1&&(a=ox(a,t,r,n,o+1,i)),o>=r&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(eU.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function oS(e,t,r){return t<e.openStart&&(e=new eX(ox(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),r<e.openEnd&&(e=new eX(ox(e.content,1,r,e.openEnd,0,0),e.openStart,r)),e}let ok={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},oE=null;function o_(){return oE||(oE=document.implementation.createHTMLDocument("title"))}let oC=null,oO={},oT={},oA={touchstart:!0,touchmove:!0};class oN{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function oP(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function oR(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=t=>oD(e,t))})}function oD(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return!!n&&(n(e,t)||t.defaultPrevented)})}function oI(e){return{left:e.clientX,top:e.clientY}}function oB(e,t,r,n,o){if(-1==n)return!1;let i=e.state.doc.resolve(n);for(let n=i.depth+1;n>0;n--)if(e.someProp(t,t=>n>i.depth?t(e,r,i.nodeAfter,i.before(n),o,!0):t(e,r,i.node(n),i.before(n),o,!1)))return!0;return!1}function oL(e,t,r){if(e.focused||e.focus(),e.state.selection.eq(t))return;let n=e.state.tr.setSelection(t);"pointer"==r&&n.setMeta("pointer",!0),e.dispatch(n)}oT.keydown=(e,t)=>{if((e.input.shiftKey=16==t.keyCode||t.shiftKey,!oV(e,t))&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!nw||!nh||13!=t.keyCode))if(229!=t.keyCode&&e.domObserver.forceFlush(),!nm||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",r=>r(e,t))||function(e,t){let r,n=t.keyCode,o=(r="",t.ctrlKey&&(r+="c"),t.metaKey&&(r+="m"),t.altKey&&(r+="a"),t.shiftKey&&(r+="s"),r);if(8==n||ng&&72==n&&"c"==o)return og(e,-1)||ou(e,-1);if(46==n&&!t.shiftKey||ng&&68==n&&"c"==o)return og(e,1)||ou(e,1);if(13==n||27==n)return!0;
6if(37==n||ng&&66==n&&"c"==o){let t=37==n?"ltr"==of(e,e.state.selection.from)?-1:1:-1;return ol(e,t,o)||ou(e,t)}if(39==n||ng&&70==n&&"c"==o){let t=39==n?"ltr"==of(e,e.state.selection.from)?1:-1:1;return ol(e,t,o)||ou(e,t)}else if(38==n||ng&&80==n&&"c"==o)return om(e,-1,o)||ou(e,-1);else if(40==n||ng&&78==n&&"c"==o)return function(e){if(!nf||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&1==t.nodeType&&0==r&&t.firstChild&&"false"==t.firstChild.contentEditable){let r=t.firstChild;oy(e,r,"true"),setTimeout(()=>oy(e,r,"false"),20)}return!1}(e)||om(e,1,o)||ou(e,1);else if(o==(ng?"m":"c")&&(66==n||73==n||89==n||90==n))return!0;return!1}(e,t)?t.preventDefault():oP(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,nt(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},oT.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},oT.keypress=(e,t)=>{if(oV(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||ng&&t.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,t)))return void t.preventDefault();let r=e.state.selection;if(!(r instanceof rd)||!r.$from.sameParent(r.$to)){let n=String.fromCharCode(t.charCode),o=()=>e.state.tr.insertText(n).scrollIntoView();/[\r\n]/.test(n)||e.someProp("handleTextInput",t=>t(e,r.$from.pos,r.$to.pos,n,o))||e.dispatch(o()),t.preventDefault()}};let oj=ng?"metaKey":"ctrlKey";oO.mousedown=(e,t)=>{var r;let n,o;e.input.shiftKey=t.shiftKey;let i=oH(e),s=Date.now(),a="singleClick";s-e.input.lastClick.time<500&&(n=(r=e.input.lastClick).x-t.clientX)*n+(o=r.y-t.clientY)*o<100&&!t[oj]&&e.input.lastClick.button==t.button&&("singleClick"==e.input.lastClick.type?a="doubleClick":"doubleClick"==e.input.lastClick.type&&(a="tripleClick")),e.input.lastClick={time:s,x:t.clientX,y:t.clientY,type:a,button:t.button};let l=e.posAtCoords(oI(t));l&&("singleClick"==a?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new oF(e,l,t,!!i)):("doubleClick"==a?function(e,t,r,n){return oB(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",r=>r(e,t,n))}:function(e,t,r,n){return oB(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",r=>r(e,t,n))||function(e,t,r){if(0!=r.button)return!1;let n=e.state.doc;if(-1==t)return!!n.inlineContent&&(oL(e,rd.create(n,0,n.content.size),"pointer"),!0);let o=n.resolve(t);for(let t=o.depth+1;t>0;t--){let r=t>o.depth?o.nodeAfter:o.node(t),i=o.before(t);if(r.inlineContent)oL(e,rd.create(n,i+1,i+1+r.content.size),"pointer");else{if(!rh.isSelectable(r))continue;oL(e,rh.create(n,i),"pointer")}return!0}}(e,r,n)})(e,l.pos,l.inside,t)?t.preventDefault():oP(e,"pointer"))};class oF{constructor(e,t,r,n){let o,i;if(this.view=e,this.pos=t,this.event=r,this.flushed=n,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[oj],this.allowDefault=r.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let r=e.state.doc.resolve(t.pos);o=r.parent,i=r.depth?r.before():0}const s=n?null:r.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a&&1==a.nodeDOM.nodeType?a.nodeDOM:null;let{selection:l}=e.state;0==r.button&&(o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof rh&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&nd&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),oP(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>n4(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(oI(e))),this.updateAllowDefault(e),this.allowDefault||!t)oP(this.view,"pointer");else{var r,n,o,i;(r=this.view,n=t.pos,o=t.inside,i=this.selectNode,oB(r,"handleClickOn",n,o,e)||r.someProp("handleClick",t=>t(r,n,e))||(i?function(e,t){if(-1==t)return!1;let r=e.state.selection,n,o;r instanceof rh&&(n=r.node);let i=e.state.doc.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e);if(rh.isSelectable(t)){o=n&&r.$from.depth>0&&e>=r.$from.depth&&i.before(r.$from.depth+1)==r.$from.pos?i.before(r.$from.depth):i.before(e);break}}
6return null!=o&&(oL(e,rh.create(e.state.doc,o),"pointer"),!0)}(r,o):function(e,t){if(-1==t)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return!!(n&&n.isAtom&&rh.isSelectable(n))&&(oL(e,new rh(r),"pointer"),!0)}(r,o)))?e.preventDefault():0==e.button&&(this.flushed||nf&&this.mightDrag&&!this.mightDrag.node.isAtom||nh&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to)))?(oL(this.view,rs.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):oP(this.view,"pointer")}}move(e){this.updateAllowDefault(e),oP(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function oV(e,t){return!!e.composing||!!(nf&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}oO.touchstart=e=>{e.input.lastTouch=Date.now(),oH(e),oP(e,"pointer")},oO.touchmove=e=>{e.input.lastTouch=Date.now(),oP(e,"pointer")},oO.contextmenu=e=>oH(e);let oz=nw?5e3:-1;function oK(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>oH(e),t))}function o$(e){let t;for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function oH(e,t=!1){if(!nw||!(e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),o$(e),t||e.docView&&e.docView.dirty){let r=n3(e),n=e.state.selection;return r&&!r.eq(n)?e.dispatch(e.state.tr.setSelection(r)):(e.markCursor||t)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}oT.compositionstart=oT.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$to;if(t.selection instanceof rd&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)||nh&&ny&&function(e){let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(!t||1!=t.nodeType||r>=t.childNodes.length)return!1;let n=t.childNodes[r];return 1==n.nodeType&&"false"==n.contentEditable}(e)))e.markCursor=e.state.storedMarks||r.marks(),oH(e,!0),e.markCursor=null;else if(oH(e,!t.selection.empty),nd&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let t=e.domSelectionRange();for(let r=t.focusNode,n=t.focusOffset;r&&1==r.nodeType&&0!=n;){let t=n<0?r.lastChild:r.childNodes[n-1];if(!t)break;if(3==t.nodeType){let r=e.domSelection();r&&r.collapse(t,t.nodeValue.length);break}r=t,n=-1}}e.input.composing=!0}oK(e,oz)},oT.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,oK(e,20))};let oU=nl&&nc<15||nm&&nb<604;function oW(e,t,r,n,o){let i=ov(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,o,i||eX.empty)))return!0;if(!i)return!1;let s=0==i.openStart&&0==i.openEnd&&1==i.content.childCount?i.content.firstChild:null,a=s?e.state.tr.replaceSelectionWith(s,n):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function oq(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let r=e.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}oO.copy=oT.cut=(e,t)=>{let r=e.state.selection,n="cut"==t.type;if(r.empty)return;let o=oU?null:t.clipboardData,{dom:i,text:s}=ow(e,r.content());o?(t.preventDefault(),o.clearData(),o.setData("text/html",i.innerHTML),o.setData("text/plain",s)):function(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(o),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}(e,i),n&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},oT.paste=(e,t)=>
vendor: 5,331 bytes, line 6
6{if(e.composing&&!nw)return;let r=oU?null:t.clipboardData,n=e.input.shiftKey&&45!=e.input.lastKeyCode;r&&oW(e,oq(r),r.getData("text/html"),n,t)?t.preventDefault():function(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let o=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?oW(e,n.value,null,o,t):oW(e,n.textContent,n.innerHTML,o,t)},50)}(e,t)};class oJ{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}let oG=ng?"altKey":"ctrlKey";function oY(e,t){let r;return e.someProp("dragCopies",e=>{r=r||e(t)}),null!=r?!r:!t[oG]}for(let e in oO.dragstart=(e,t)=>{let r,n=e.input.mouseDown;if(n&&n.done(),!t.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(oI(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof rh?o.to-1:o.to));else if(n&&n.mightDrag)r=rh.create(e.state.doc,n.mightDrag.pos);else if(t.target&&1==t.target.nodeType){let n=e.docView.nearestDesc(t.target,!0);n&&n.node.type.spec.draggable&&n!=e.docView&&(r=rh.create(e.state.doc,n.posBefore))}let s=(r||e.state.selection).content(),{dom:a,text:l,slice:c}=ow(e,s);t.dataTransfer.files.length&&nh&&!(np>120)||t.dataTransfer.clearData(),t.dataTransfer.setData(oU?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",oU||t.dataTransfer.setData("text/plain",l),e.dragging=new oJ(c,oY(e,t),r)},oO.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},oT.dragover=oT.dragenter=(e,t)=>t.preventDefault(),oT.drop=(e,t)=>{try{!function(e,t,r){if(!t.dataTransfer)return;let n=e.posAtCoords(oI(t));if(!n)return;let o=e.state.doc.resolve(n.pos),i=r&&r.slice;i?e.someProp("transformPasted",t=>{i=t(i,e,!1)}):i=ov(e,oq(t.dataTransfer),oU?null:t.dataTransfer.getData("text/html"),!1,o);let s=!!(r&&oY(e,t));if(e.someProp("handleDrop",r=>r(e,t,i||eX.empty,s)))return t.preventDefault();if(!i)return;t.preventDefault();let a=i?t1(e.state.doc,o.pos,i):o.pos;null==a&&(a=o.pos);let l=e.state.tr;if(s){let{node:e}=r;e?e.replace(l):l.deleteSelection()}let c=l.mapping.map(a),d=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,u=l.doc;if(d?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),l.doc.eq(u))return;let h=l.doc.resolve(c);if(d&&rh.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new rh(h));else{let t=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((e,r,n,o)=>t=o),l.setSelection(or(e,h,l.doc.resolve(t)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}(e,t,e.dragging)}finally{e.dragging=null}},oO.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&n4(e)},20))},oO.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},oO.beforeinput=(e,t)=>{if(nh&&nw&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,nt(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}},oT)oO[e]=oT[e];function oX(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class oZ{constructor(e,t){this.toDOM=e,this.spec=t||o3,this.side=this.spec.side||0}map(e,t,r,n){let{pos:o,deleted:i}=e.mapResult(t.from+n,this.side<0?-1:1);return i?null:new o1(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof oZ&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&oX(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class oQ{constructor(e,t){this.attrs=e,this.spec=t||o3}map(e,t,r,n){let o=e.map(t.from+n,this.spec.inclusiveStart?-1:1)-r,i=e.map(t.to+n,this.spec.inclusiveEnd?1:-1)-r;return o>=i?null:new o1(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof oQ&&oX(this.attrs,e.attrs)&&oX(this.spec,e.spec)}static is(e){return e.type instanceof oQ}destroy(){}}class o0{constructor(e,t){this.attrs=e,this.spec=t||o3}map(e,t,r,n){let o=e.mapResult(t.from+n,1);if(o.deleted)return null;let i=e.mapResult(t.to+n,-1);return i.deleted||i.pos<=o.pos?null:new o1(o.pos-r,i.pos-r,this)}valid(e,t){let{index:r,offset:n}=e.content.findIndex(t.from),o;return n==t.from&&!(o=e.child(r)).isText&&n+o.nodeSize==t.to}eq(e){return this==e||e instanceof o0&&oX(this.attrs,e.attrs)&&oX(this.spec,e.spec)}destroy(){}}class o1{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new o1(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new o1(e,e,new oZ(t,r))}static inline(e,t,r,n){return new o1(e,t,new oQ(r,n))}
vendor: 4,417 bytes, line 6
6static node(e,t,r,n){return new o1(e,t,new o0(r,n))}get spec(){return this.type.spec}get inline(){return this.type instanceof oQ}get widget(){return this.type instanceof oZ}}let o2=[],o3={};class o9{constructor(e,t){this.local=e.length?e:o2,this.children=t.length?t:o2}static create(e,t){return t.length?ie(t,e,0,o3):o4}find(e,t,r){let n=[];return this.findInner(null==e?0:e,null==t?1e9:t,n,0,r),n}findInner(e,t,r,n,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&r.push(s.copy(s.from+n,s.to+n))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,r,n+s,o)}}map(e,t,r){return this==o4||0==e.maps.length?this:this.mapInner(e,t,0,0,r||o3)}mapInner(e,t,r,n,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,r,n);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,r,n,o,i,s){let a=e.slice();for(let e=0,t=i;e<r.maps.length;e++){let n=0;r.maps[e].forEach((e,r,o,i)=>{let s=i-o-(r-e);for(let o=0;o<a.length;o+=3){let i=a[o+1];if(i<0||e>i+t-n)continue;let l=a[o]+t-n;r>=l?a[o+1]=e<=l?-2:-1:e>=t&&s&&(a[o]+=s,a[o+1]+=s)}n+=s}),t=r.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=r.map(e[t]+i),d=c-o;if(d<0||d>=n.content.size){l=!0;continue}let u=r.map(e[t+1]+i,-1)-o,{index:h,offset:p}=n.content.findIndex(d),f=n.maybeChild(h);if(f&&p==d&&p+f.nodeSize==u){let n=a[t+2].mapInner(r,f,c+1,e[t]+i+1,s);n!=o4?(a[t]=d,a[t+1]=u,a[t+2]=n):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=ie(function(e,t,r,n,o,i,s){for(let a=0;a<e.length;a+=3)-1==e[a+1]&&function e(t,i){for(let e=0;e<t.local.length;e++){let a=t.local[e].map(n,o,i);a?r.push(a):s.onRemove&&s.onRemove(t.local[e].spec)}for(let r=0;r<t.children.length;r+=3)e(t.children[r+2],t.children[r]+i+1)}(e[a+2],t[a]+i+1);return r}(a,e,t,r,o,i,s),n,0,s);t=l.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<l.children.length;e+=3){let r=l.children[e];for(;t<a.length&&a[t]<r;)t+=3;a.splice(t,0,l.children[e],l.children[e+1],l.children[e+2])}}return new o9(t.sort(it),a)}(this.children,i||[],e,t,r,n,o):i?new o9(i.sort(it),o2):o4}add(e,t){return t.length?this==o4?o9.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let n,o=0;e.forEach((e,i)=>{let s=i+r,a;if(a=o8(t,e,s)){for(n||(n=this.children.slice());o<n.length&&n[o]<i;)o+=3;n[o]==i?n[o+2]=n[o+2].addInner(e,a,s+1):n.splice(o,0,i,i+e.nodeSize,ie(a,e,s+1,o3)),o+=3}});let i=o6(o?o7(t):t,-r);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new o9(i.length?this.local.concat(i).sort(it):this.local,n||this.children)}remove(e){return 0==e.length||this==o4?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,n=this.local;for(let n=0;n<r.length;n+=3){let o,i=r[n]+t,s=r[n+1]+t;for(let t=0,r;t<e.length;t++)(r=e[t])&&r.from>i&&r.to<s&&(e[t]=null,(o||(o=[])).push(r));if(!o)continue;r==this.children&&(r=this.children.slice());let a=r[n+2].removeInner(o,i+1);a!=o4?r[n+2]=a:(r.splice(n,3),n-=3)}if(n.length){for(let r=0,o;r<e.length;r++)if(o=e[r])for(let e=0;e<n.length;e++)n[e].eq(o,t)&&(n==this.local&&(n=this.local.slice()),n.splice(e--,1))}return r==this.children&&n==this.local?this:n.length||r.length?new o9(n,r):o4}forChild(e,t){let r,n;if(this==o4)return this;if(t.isLeaf)return o9.empty;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(r=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof oQ){let e=Math.max(o,t.from)-o,r=Math.min(i,t.to)-o;e<r&&(n||(n=[])).push(t.copy(e,r))}}if(n){let e=new o9(n.sort(it),o2);return r?new o5([e,r]):e}return r||o4}eq(e){if(this==e)return!0;if(!(e instanceof o9)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return ir(this.localsInner(e))}localsInner(e){if(this==o4)return o2;if(e.inlineContent||!this.local.some(oQ.is))return this.local;let t=[];for(let e=0;e<this.local.length;
vendor: 5,076 bytes, line 6
6e++)this.local[e].type instanceof oQ||t.push(this.local[e]);return t}forEachSet(e){e(this)}}o9.empty=new o9([],[]),o9.removeOverlap=ir;let o4=o9.empty;class o5{constructor(e){this.members=e}map(e,t){let r=this.members.map(r=>r.map(e,t,o3));return o5.from(r)}forChild(e,t){if(t.isLeaf)return o9.empty;let r=[];for(let n=0;n<this.members.length;n++){let o=this.members[n].forChild(e,t);o!=o4&&(o instanceof o5?r=r.concat(o.members):r.push(o))}return o5.from(r)}eq(e){if(!(e instanceof o5)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let n=0;n<this.members.length;n++){let o=this.members[n].localsInner(e);if(o.length)if(t){r&&(t=t.slice(),r=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?ir(r?t:t.sort(it)):o2}static from(e){switch(e.length){case 0:return o4;case 1:return e[0];default:return new o5(e.every(e=>e instanceof o9)?e:e.reduce((e,t)=>e.concat(t instanceof o9?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function o6(e,t){if(!t||!e.length)return e;let r=[];for(let n=0;n<e.length;n++){let o=e[n];r.push(new o1(o.from+t,o.to+t,o.type))}return r}function o8(e,t,r){if(t.isLeaf)return null;let n=r+t.nodeSize,o=null;for(let t=0,i;t<e.length;t++)(i=e[t])&&i.from>r&&i.to<n&&((o||(o=[])).push(i),e[t]=null);return o}function o7(e){let t=[];for(let r=0;r<e.length;r++)null!=e[r]&&t.push(e[r]);return t}function ie(e,t,r,n){let o=[],i=!1;t.forEach((t,s)=>{let a=o8(e,t,s+r);if(a){i=!0;let e=ie(a,t,r+s+1,n);e!=o4&&o.push(s,s+t.nodeSize,e)}});let s=o6(i?o7(e):e,-r).sort(it);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(n.onRemove&&n.onRemove(s[e].spec),s.splice(e--,1));return s.length||o.length?new o9(s,o):o4}function it(e,t){return e.from-t.from||e.to-t.to}function ir(e){let t=e;for(let r=0;r<t.length-1;r++){let n=t[r];if(n.from!=n.to)for(let o=r+1;o<t.length;o++){let i=t[o];if(i.from==n.from){i.to!=n.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,n.to),io(t,o+1,i.copy(n.to,i.to)));continue}i.from<n.to&&(t==e&&(t=e.slice()),t[r]=n.copy(n.from,i.from),io(t,o,n.copy(i.from,n.to)));break}}return t}function io(e,t,r){for(;t<e.length&&it(r,e[t])>0;)t++;e.splice(t,0,r)}function ii(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=o4&&t.push(n)}),e.cursorWrapper&&t.push(o9.create(e.state.doc,[e.cursorWrapper.deco])),o5.from(t)}let is={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ia=nl&&nc<=11;class il{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class ic{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new il,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);nl&&nc<=11&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():nf&&e.composing&&t.some(e=>"childList"==e.type&&"TR"==e.target.nodeName)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),ia&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,is)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(on(this.view)){if(this.suppressingSelectionUpdates)return n4(this.view);if(nl&&nc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();
6if(e.focusNode&&r4(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let r=e.focusNode;r;r=r1(r))t.add(r);for(let n=e.anchorNode;n;n=r1(n))if(t.has(n)){r=n;break}let n=r&&this.view.docView.nearestDesc(r);if(n&&n.ignoreMutation({type:"selection",target:3==r.nodeType?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){var e;let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&on(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let e=0;e<r.length;e++){let t=this.registerMutation(r[e],l);t&&(i=i<0?t.from:Math.min(t.from,i),s=s<0?t.to:Math.max(t.to,s),t.typeOver&&(a=!0))}if(l.some(e=>"BR"==e.nodeName)&&(8==t.input.lastKeyCode||46==t.input.lastKeyCode)){for(let e of l)if("BR"==e.nodeName&&e.parentNode){let t=e.nextSibling;for(;t&&1==t.nodeType;){if("false"==t.contentEditable){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(nd&&l.length){let e=l.filter(e=>"BR"==e.nodeName);if(2==e.length){let[t,r]=e;t.parentNode&&t.parentNode.parentNode==r.parentNode?r.remove():t.remove()}else{let{focusNode:r}=this.currentSelection;for(let n of e){let e=n.parentNode;e&&"LI"==e.nodeName&&(!r||function(e,t){for(let r=t.parentNode;r&&r!=e.dom;r=r.parentNode){let t=e.docView.nearestDesc(r,!0);if(t&&t.node.isBlock)return r}return null}(t,r)!=e)&&n.remove()}}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&ne(n)&&(c=n3(t))&&c.eq(rs.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,n4(t),this.currentSelection.set(n),t.scrollToSelection()):(i>-1||o)&&(i>-1&&(t.docView.markDirty(i,s),e=t,!id.has(e)&&(id.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))&&(e.requiresGeckoHackNode=nd,iu||(console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),iu=!0))),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(e,t){var r;let{focusNode:n,focusOffset:o}=e.domSelectionRange();for(let i of t)if((null==(r=i.parentNode)?void 0:r.nodeName)=="TR"){let t=i.nextSibling;for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.nextSibling;if(t){let r=t;for(;;){let e=r.firstChild;if(!e||1!=e.nodeType||"false"==e.contentEditable||/^(BR|IMG)$/.test(e.nodeName))break;r=e}r.insertBefore(i,r.firstChild),n==i&&e.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}(t,l)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||n4(t),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(r==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if("childList"==e.type){for(let r=0;r<e.addedNodes.length;r++){let n=e.addedNodes[r];t.push(n),3==n.nodeType&&(this.lastChangedTextNode=n)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let n=e.previousSibling,o=e.nextSibling;if(nl&&nc<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:r,nextSibling:i}=e.addedNodes[t];(!r||0>Array.prototype.indexOf.call(e.addedNodes,r))&&(n=r),(!i||0>Array.prototype.indexOf.call(e.addedNodes,i))&&(o=i)}let i=n&&n.parentNode==e.target?r0(n)+1:0,s=r.localPosFromDOM(e.target,i,-1),a=o&&o.parentNode==e.target?r0(o):e.target.childNodes.length;return{from:s,to:r.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:r.posAtStart-r.border,to:r.posAt
vendor: 4,740 bytes, line 6
6End+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let id=new WeakMap,iu=!1;function ih(e,t){let r=t.startContainer,n=t.startOffset,o=t.endContainer,i=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return r4(s.node,s.offset,o,i)&&([r,n,o,i]=[o,i,r,n]),{anchorNode:r,anchorOffset:n,focusNode:o,focusOffset:i}}function ip(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(nf&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}else if(e.parentNode.lastChild==e||nf&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}let im=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ig(e,t,r){return Math.max(r.anchor,r.head)>t.content.size?null:or(e,t.resolve(r.anchor),t.resolve(r.head))}function iy(e,t,r){let n=e.depth,o=t?e.end():e.pos;for(;n>0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,o++,t=!1;if(r){let t=e.node(n).maybeChild(e.indexAfter(n));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}function iw(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),r=e.charCodeAt(1);return t>=56320&&t<=57343&&r>=55296&&r<=56319}class iv{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new oN,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ik),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=ix(this),iM(this),this.nodeViews=iS(this),this.docView=n$(this.state.doc,ib(this),ii(this),this.dom,this),this.domObserver=new ic(this,(e,t,r,n)=>(function(e,t,r,n,o){let i,s,a,l=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,r=n3(e,t);if(r&&!e.state.selection.eq(r)){if(nh&&nw&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",t=>t(e,nt(13,"Enter"))))return;let n=e.state.tr.setSelection(r);"pointer"==t?n.setMeta("pointer",!0):"key"==t&&n.scrollIntoView(),l&&n.setMeta("composition",l),e.dispatch(n)}return}let c=e.state.doc.resolve(t),d=c.sharedDepth(r);t=c.before(d+1),r=e.state.doc.resolve(r).after(d+1);let u=e.state.selection,h=function(e,t,r){let n,{node:o,fromOffset:i,toOffset:s,from:a,to:l}=e.docView.parseRange(t,r),c=e.domSelectionRange(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(n=[{node:d,offset:c.anchorOffset}],ne(c)||n.push({node:c.focusNode,offset:c.focusOffset})),nh&&8===e.input.lastKeyCode)for(let e=s;e>i;e--){let t=o.childNodes[e-1],r=t.pmViewDesc;if("BR"==t.nodeName&&!r){s=e;break}if(!r||r.size)break}let u=e.state.doc,h=e.someProp("domParser")||ty.fromSchema(e.state.schema),p=u.resolve(a),f=null,m=h.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:n,ruleFromNode:ip,context:p});if(n&&null!=n[0].pos){let e=n[0].pos,t=n[1]&&n[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,r),p=e.state.doc,f=p.slice(h.from,h.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(i=e.state.selection.to,s="end"):(i=e.state.selection.from,s="start"),e.input.lastKeyCode=null;let m=function(e,t,r,n,o){let i=e.findDiffStart(t,r);if(null==i)return null;let{a:s,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if("end"==o){let e=Math.max(0,i-Math.min(s,a));n-=s+e-i}if(s<i&&e.size<t.size){let e=n<=i&&n>=s?i-n:0;(i-=e)&&i<t.size&&iw(t.textBetween(i-1,i+1))&&(i+=e?1:-1),a=i+(a-s),s=i}else if(a<i){let t=n<=i&&n>=a?i-n:0;(i-=t)&&i<e.size&&iw(e.textBetween(i-1,i+1))&&(i+=t?1:-1),s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}(f.content,h.doc.content,h.from,i,s);if(m&&e.input.domChangeCount++,(nm&&e.input.lastIOSEnter>Date.now()-225||nw)&&o.some(e=>1==e.nodeType&&!im.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",t=>t(e,nt(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(n&&u instanceof rd&&!u.empty&&u.$head.sameParent(u.$anchor)&&!e.composing&&!(h.sel&&h.sel.anchor!=h.sel.head)
vendor: 5,099 bytes, line 6
6)m={start:u.from,endA:u.to,endB:u.to};else{if(h.sel){let t=ig(e,e.state.doc,h.sel);if(t&&!t.eq(e.state.selection)){let r=e.state.tr.setSelection(t);l&&r.setMeta("composition",l),e.dispatch(r)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof rd&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=h.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),nl&&nc<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>h.from&&"  "==h.doc.textBetween(m.start-h.from-1,m.start-h.from+1)&&(m.start--,m.endA--,m.endB--);let g=h.doc.resolveNoCache(m.start-h.from),y=h.doc.resolveNoCache(m.endB-h.from),w=p.resolve(m.start),v=g.sameParent(y)&&g.parent.inlineContent&&w.end()>=m.endA;if((nm&&e.input.lastIOSEnter>Date.now()-225&&(!v||o.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!v&&g.pos<h.doc.content.size&&(!g.sameParent(y)||!g.parent.inlineContent)&&g.pos<y.pos&&!/\S/.test(h.doc.textBetween(g.pos,y.pos,"","")))&&e.someProp("handleKeyDown",t=>t(e,nt(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&function(e,t,r,n,o){if(r-t<=o.pos-n.pos||iy(n,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(!n.parent.isTextblock){let e=i.nodeAfter;return null!=e&&r==t+e.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=e.resolve(iy(i,!0,!0));return!(!s.parent.isTextblock||s.pos>r||iy(s,!0,!1)<r)&&n.parent.content.cut(n.parentOffset).eq(s.parent.content)}(p,m.start,m.endA,g,y)&&e.someProp("handleKeyDown",t=>t(e,nt(8,"Backspace")))){nw&&nh&&e.domObserver.suppressSelectionUpdates();return}nh&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),nw&&!v&&g.start()!=y.start()&&0==y.parentOffset&&g.depth==y.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==m.endA&&(m.endB-=2,y=h.doc.resolveNoCache(m.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(t){return t(e,nt(13,"Enter"))})},20));let b=m.start,M=m.endA,x=t=>{let r=t||e.state.tr.replace(b,M,h.doc.slice(m.start-h.from,m.endB-h.from));if(h.sel){let t=ig(e,r.doc,h.sel);t&&!(nh&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==b||t.head==r.mapping.map(M)-1)||nl&&t.empty&&t.head==b)&&r.setSelection(t)}return l&&r.setMeta("composition",l),r.scrollIntoView()};if(v)if(g.pos==y.pos){nl&&nc<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>n4(e),20));let t=x(e.state.tr.delete(b,M)),r=p.resolve(m.start).marksAcross(p.resolve(m.endA));r&&t.ensureMarks(r),e.dispatch(t)}else if(m.endA==m.endB&&(a=function(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,o=r,i=n,s,a,l;for(let e=0;e<n.length;e++)o=n[e].removeFromSet(o);for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);if(1==o.length&&0==i.length)a=o[0],s="add",l=e=>e.mark(a.addToSet(e.marks));else{if(0!=o.length||1!=i.length)return null;a=i[0],s="remove",l=e=>e.mark(a.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(l(t.child(e)));if(eU.from(c).eq(e))return{mark:a,type:s}}(g.parent.content.cut(g.parentOffset,y.parentOffset),w.parent.content.cut(w.parentOffset,m.endA-w.start())))){let t=x(e.state.tr);"add"==a.type?t.addMark(b,M,a.mark):t.removeMark(b,M,a.mark),e.dispatch(t)}else if(g.parent.child(g.index()).isText&&g.index()==y.index()-!y.textOffset){let t=g.parent.textBetween(g.parentOffset,y.parentOffset),r=()=>x(e.state.tr.insertText(t,b,M));e.someProp("handleTextInput",n=>n(e,b,M,t,r))||e.dispatch(r())}else e.dispatch(x());else e.dispatch(x())})(this,e,t,r,n)),this.domObserver.start(),function(e){for(let t in oO){let r=oO[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||11==r.nodeType||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||oD(e,t)||!e.editable&&t.type in oT||r(e,t)},oA[t]?{passive:!0}:void 0)}nf&&e.dom.addEventListener("input",()=>null),oR(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&oR(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ik),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let r in t.state=this.state,e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r,n,o;let i=this.state,s=!1,a=!1;e.storedMarks&&this.composing&&(o$(this),a=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=iS(this);(function(e,t){let r=0,n=0;for(let n in e){if(e[n]!=t[n])return!0;r++}for(let e in t)n++;return r!=n}
6)(e,this.nodeViews)&&(this.nodeViews=e,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&oR(this),this.editable=ix(this),iM(this);let c=ii(this),d=ib(this),u=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",h=s||!this.docView.matchesNode(e.doc,d,c);(h||!e.selection.eq(i.selection))&&(a=!0);let p="preserve"==u&&a&&null==this.dom.style.overflowAnchor&&function(e){let t,r,n=e.dom.getBoundingClientRect(),o=Math.max(0,n.top);for(let i=(n.left+n.right)/2,s=o+1;s<Math.min(innerHeight,n.bottom);s+=5){let n=e.root.elementFromPoint(i,s);if(!n||n==e.dom||!e.dom.contains(n))continue;let a=n.getBoundingClientRect();if(a.top>=o-20){t=n,r=a.top;break}}return{refDOM:t,refTop:r,stack:nS(e.dom)}}(this);if(a){let t,r,a;this.domObserver.stop();let l=h&&(nl||nh)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&(n=i.selection,o=e.selection,a=Math.min(n.$anchor.sharedDepth(n.head),o.$anchor.sharedDepth(o.head)),n.$anchor.start(a)!=o.$anchor.start(a));if(h){let t=nh?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let r=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=r8(e=e.childNodes[t-1])}else{if(!e.parentNode||r7(e))return null;t=r0(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),n=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||r7(e))return null;t=r0(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(r&&n&&r!=n){let t=n.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(r==o||n==o)return o;if(!t||!t.isText(n.nodeValue))return n;if(e.input.compositionNode==n){let e=r.pmViewDesc;if(!(!e||!e.isText(r.nodeValue)))return n}}return r||n}(this)),(s||!this.docView.update(e.doc,d,c,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=n$(e.doc,d,c,this.dom,this)),!t||this.trackWrites&&this.dom.contains(this.trackWrites)||(l=!0)}l||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(t=this.docView.domFromPos(this.state.selection.anchor,0),r=this.domSelectionRange(),r4(t.node,t.offset,r.anchorNode,r.anchorOffset)))?n4(this,l):(oe(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),(null==(r=this.dragging)?void 0:r.node)&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),"reset"==u?this.dom.scrollTop=0:"to selection"==u?this.scrollToSelection():p&&function({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;nk(r,0==n?0:n-t)}(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(1==e.nodeType?e:e.parentNode))if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof rh){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&nx(this,t.getBoundingClientRect(),e)}else nx(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,t){let r=e.node,n=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)n=r.from;else{let e=r.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==r.node&&(n=e)}this.dragging=new oJ(e.slice,e.move,n<0?void 0:rh.create(this.state.doc,n))}someProp(e,t){let r=this._props&&this._props[e],n;if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){if(nl){let e=this.root.activeElement;if(e==this.dom)return!0;
6if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(nE)return e.focus(nE);let t=nS(e);e.focus(null==nE?{get preventScroll(){return nE={preventScroll:!0},!0}}:void 0),nE||(nE=!1,nk(t,0))}(this.dom),n4(this),this.domObserver.start()}get root(){let e=this._root;if(null==e){for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return function(e,t){var r;let n,o,i=e.dom.ownerDocument,s,a=0,l=function(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:Math.min(r8(n.offsetNode),n.offset)}}catch(e){}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:Math.min(r8(n.startContainer),n.startOffset)}}}(i,t.left,t.top);l&&({node:s,offset:a}=l);let c=(e.root.elementFromPoint?e.root:i).elementFromPoint(t.left,t.top);if(!c||!e.dom.contains(1!=c.nodeType?c.parentNode:c)){let r=e.dom.getBoundingClientRect();if(!n_(t,r)||!(c=function e(t,r,n){let o=t.childNodes.length;if(o&&n.top<n.bottom)for(let i=Math.max(0,Math.min(o-1,Math.floor(o*(r.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let n=t.childNodes[s];if(1==n.nodeType){let t=n.getClientRects();for(let o=0;o<t.length;o++){let i=t[o];if(n_(r,i))return e(n,r,i)}}if((s=(s+1)%o)==i)break}return t}(e.dom,t,r)))return null}if(nf)for(let e=c;s&&e;e=r1(e))e.draggable&&(s=void 0);if(c=(n=(r=c).parentNode)&&/^li$/i.test(n.nodeName)&&t.left<r.getBoundingClientRect().left?n:r,s){let r;if(nd&&1==s.nodeType&&(a=Math.min(a,s.childNodes.length))<s.childNodes.length){let e=s.childNodes[a],r;"IMG"==e.nodeName&&(r=e.getBoundingClientRect()).right<=t.left&&r.bottom>t.top&&a++}nv&&a&&1==s.nodeType&&1==(r=s.childNodes[a-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=t.top&&a--,s==e.dom&&a==s.childNodes.length-1&&1==s.lastChild.nodeType&&t.top>s.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:(0==a||1!=s.nodeType||"BR"!=s.childNodes[a-1].nodeName)&&(o=function(e,t,r,n){let o=-1;for(let r=t,i=!1;r!=e.dom;){let t=e.docView.nearestDesc(r,!0),s;if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((s=t.dom.getBoundingClientRect()).width||s.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!i&&s.left>n.left||s.top>n.top?o=t.posBefore:(!i&&s.right<n.left||s.bottom<n.top)&&(o=t.posAfter),i=!0),!t.contentDOM&&o<0&&!t.node.isText))return(t.node.isBlock?n.top<(s.top+s.bottom)/2:n.left<(s.left+s.right)/2)?t.posBefore:t.posAfter;r=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,r,-1)}(e,s,a,t))}null==o&&(o=function(e,t,r){let{node:n,offset:o}=function e(t,r){let n,o,i,s=2e8,a,l=0,c=r.top,d=r.top;for(let e=t.firstChild,u=0;e;e=e.nextSibling,u++){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=r3(e).getClientRects()}for(let h=0;h<t.length;h++){let p=t[h];if(p.top<=c&&p.bottom>=d){c=Math.max(p.bottom,c),d=Math.min(p.top,d);let t=p.left>r.left?p.left-r.left:p.right<r.left?r.left-p.right:0;if(t<s){i=e,s=t,a=t&&3==i.nodeType?{left:p.right<r.left?p.right:p.left,top:r.top}:r,1==e.nodeType&&t&&(l=u+ +(r.left>=(p.left+p.right)/2));continue}}else p.top>r.top&&!n&&p.left<=r.left&&p.right>=r.left&&(n=e,o={left:Math.max(p.left,Math.min(p.right,r.left)),top:p.top});!i&&(r.left>=p.right&&r.top>=p.top||r.left>=p.left&&r.top>=p.bottom)&&(l=u+1)}}return(!i&&n&&(i=n,a=o,s=0),i&&3==i.nodeType)?function(e,t){let r=e.nodeValue.length,n=document.createRange(),o;for(let i=0;i<r;i++){n.setEnd(e,i+1),n.setStart(e,i);let r=nO(n,1);if(r.top!=r.bottom&&n_(t,r)){o={node:e,offset:i+ +(t.left>=(r.left+r.right)/2)};break}}return n.detach(),o||{node:e,offset:0}}(i,a):!i||s&&1==i.nodeType?{node:t,offset:l}:e(i,a)}(t,r),i=-1;if(1==n.nodeType&&!n.firstChild){let e=n.getBoundingClientRect();i=e.left!=e.right&&r.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(n,o,i)}(e,c,t));let d=e.docView.nearestDesc(c,!0);return{pos:o,inside:d?d.posAtStart-d.border:-1}}(this,e)}coordsAtPos(e,t=1){return nA(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let n=this.docView.posFromDOM(e,t,r);if(null==n)throw RangeError("DOM position not inside the editor");return n}endOfTextblock(e,t){return function(e,t,r){let n,o;return nI==t&&nB==r?nL:(nI=t,nB=r,nL="up"==r||"down"==r?(n=t.selection,o="up"==r?n.$from:n.$to,nR(e,t,()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==r?-1:1);for(;;){let r=e.docView.nearestDesc(t,!0);if(!r)break;
6if(r.node.isBlock){t=r.contentDOM||r.dom;break}t=r.dom.parentNode}let n=nA(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=r3(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==r?n.top-o.top>(o.bottom-n.top)*2:o.bottom-n.bottom>(n.bottom-o.top)*2))return!1}}return!0})):function(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let o=n.parentOffset,i=o==n.parent.content.size,s=e.domSelection();return s?nD.test(n.parent.textContent)&&s.modify?nR(e,t,()=>{let{focusNode:t,focusOffset:o,anchorNode:i,anchorOffset:a}=e.domSelectionRange(),l=s.caretBidiLevel;s.modify("move",r,"character");let c=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:d,focusOffset:u}=e.domSelectionRange(),h=d&&!c.contains(1==d.nodeType?d:d.parentNode)||t==d&&o==u;try{s.collapse(i,a),t&&(t!=i||o!=a)&&s.extend&&s.extend(t,o)}catch(e){}return null!=l&&(s.caretBidiLevel=l),h}):"left"==r||"backward"==r?!o:i:n.pos==n.start()||n.pos==n.end()}(e,t,r))}(this,t||this.state,e)}pasteHTML(e,t){return oW(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return oW(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return ow(this,e)}destroy(){if(this.docView){for(let e in this.domObserver.stop(),this.input.eventHandlers)this.dom.removeEventListener(e,this.input.eventHandlers[e]);clearTimeout(this.input.composingTimeout),clearTimeout(this.input.lastIOSEnterFallbackTimeout),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ii(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,r9()}}get isDestroyed(){return null==this.docView}dispatchEvent(e){!oD(this,e)&&oO[e.type]&&(this.editable||!(e.type in oT))&&oO[e.type](this,e)}domSelectionRange(){let e=this.domSelection();return e?nf&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){let r;if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return ih(e,r)}function n(e){e.preventDefault(),e.stopImmediatePropagation(),r=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0),r?ih(e,r):null}(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function ib(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if("function"==typeof r&&(r=r(e.state)),r)for(let e in r)"class"==e?t.class+=" "+r[e]:"style"==e?t.style=(t.style?t.style+";":"")+r[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(r[e]))}),t.translate||(t.translate="no"),[o1.node(0,e.state.doc.content.size,t)]}function iM(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:o1.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function ix(e){return!e.someProp("editable",t=>!1===t(e.state))}function iS(e){let t=Object.create(null);function r(e){for(let r in e)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=e[r])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function ik(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}iv.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},e.s(["Decoration",0,o1,"DecorationSet",0,o9,"EditorView",0,iv],140644);var iE=e.i(835138);try{var i_="u">typeof window?window:e.g;i_._sentryModuleMetadata=i_._sentryModuleMetadata||{},i_._sentryModuleMetadata[(new i_.Error).stack]=Object.assign({},i_._sentryModuleMetadata[(new i_.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var iC=((s=iC||{}).End="exit-end",s.Removed="delete",s.Split="exit-split",s.InvalidSplit="invalid-exit-split",s.MoveEnd="move-end",s.MoveStart="move-start",s.JumpForward="jump-forward-exit",s.JumpBackward="jump-backward-exit",s.SelectionOutside="selection-outside",s),iO=((a=iO||{}).Start="start",a.Text="change-character",a.SelectionInside="selection-inside",a.Move="move",a.JumpBackward="jump-backward-change",a.JumpForward="jump-forward-change",a),iT=["move-end","move-start","selection-outside","jump-forward-exit","jump-backward-exit"];function iA(e){return"invalid-exit-split"===e}var iN=["jump-backward-exit","jump-forward-exit"],iP=["jump-backward-change","jump-forward-change"];function iR(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function iD(e){return eg(e)&&e instanceof rd}function iI(e){let{match:t,changeReason:r,exitReason:n}=e;return{...t,changeReason:r,exitReason:n}}function iB(e){let{$pos:t,suggester:r}=e,{char:n,name:o,startOfLine:i,supportedCharacters:s,matchOffset:a,multiline:l,caseInsensitive:c,unicode:d}=r,u=iH({char:n,matchOffset:a,startOfLine:i,supportedCharacters:s,multiline:l,caseInsensitive:c,unicode:d});return function(e){let t,{text:r,regexp:n,$pos:o,suggester:i}=e,s=o.start();
6return ex(r,n).forEach(e=>{if(function(e,t){let{invalidPrefixCharacters:r,validPrefixCharacters:n}=t;return r?!new RegExp(i$(r)).test(e):new RegExp(i$(n)).test(e)}(e.input.slice(Math.max(0,e.index-1),e.index),i)){let r=e.index+s,n=e[0],a=e[1];if(!eu(n)||!eu(a))return;let l=r+n.length,c=Math.min(l,o.pos),d=c-r;r<o.pos&&l>=o.pos&&(t={range:{from:r,to:l,cursor:c},match:e,query:{partial:n.slice(a.length,d),full:n.slice(a.length)},text:{partial:n.slice(0,d),full:n},textAfter:o.doc.textBetween(l,o.end(),"\0","\0"),textBefore:o.doc.textBetween(s,r,"\0","\0"),suggester:i})}}),t}({suggester:r,text:t.doc.textBetween(t.before(),t.end(),"\0","\0"),regexp:u,$pos:t,char:n,name:o})}function iL(e){let{state:t,match:r}=e;try{return iB({$pos:t.doc.resolve(r.range.cursor),suggester:r.suggester})}catch{return}}function ij(e){let{prev:t,next:r,state:n}=e;return!r&&t.range.from>=n.doc.nodeSize?{exit:iI({match:t,exitReason:"delete"})}:r&&t.query.partial?t.range.to===r.range.cursor?{exit:iI({match:r,exitReason:"exit-end"})}:t.query.partial?{exit:iI({match:r,exitReason:"exit-split"})}:{}:{exit:iI({match:t,exitReason:"invalid-exit-split"})}}function iF(e,t){for(let r=e.depth;r>0;r--){let n=e.node(r);if(t.includes(n.type.name))return!0}return!1}function iV(e,t){let{$from:r,$to:n}=e;return!!iz(e,t)||eD(r.pos,n.pos).some(e=>{var n,o;let i;return n=r.doc.resolve(e),o=t,i=new Set(n.marks().map(e=>e.type.name)),o.some(e=>i.has(e))})}function iz(e,t){let{$from:r,$to:n}=e,o=new Set((r.marksAcross(n)??[]).map(e=>e.type.name));return t.some(e=>o.has(e))}function iK(e){let{suggesters:t,$pos:r,selectionEmpty:n}=e;for(let e of t)if(!e.emptySelectionsOnly||n)try{let t=iB({suggester:e,$pos:r});if(!t)continue;let n={$from:r.doc.resolve(t.range.from),$to:r.doc.resolve(t.range.to),$cursor:r};if(function(e,t){let{$cursor:r}=t,{validMarks:n,validNodes:o,invalidMarks:i,invalidNodes:s}=e;return!!(!n&&!o&&eb(i)&&eb(s))||!(n&&!iz(t,n)||o&&!iF(r,o)||!n&&iV(t,i)||!o&&iF(r,s))}(e,n)&&e.isValidPosition(n,t))return t}catch{}}function i$(e){return ey(e)?e.source:e}function iH(e){let{char:t,matchOffset:r,startOfLine:n,supportedCharacters:o,captureChar:i=!0,caseInsensitive:s=!1,multiline:a=!1,unicode:l=!1}=e,c=`g${a?"m":""}${s?"i":""}${l?"u":""}`,d=(eu(t)?new RegExp((0,iE.default)(t)):t).source;return i&&(d=`(${d})`),RegExp(`${n?"^":""}${d}(?:${i$(o)}){${r},}`,c)}var iU={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},iW="__ignore_prosemirror_suggest_update__",iq=class e{static create(t){return new e(t)}#e=!1;#t=!1;#r;#n;#o;#i=ei();view;#s=o9.empty;#a=!1;#l=!1;get decorationSet(){return this.#s}get removed(){return this.#a}get match(){return this.#n?this.#n:this.#o&&this.#i.exit?this.#o:void 0}constructor(e){const t=iJ();this.#r=e.map(t),this.#r=eN(this.#r,(e,t)=>t.priority-e.priority)}init(e){return this.view=e,this}setMarkRemoved=()=>{this.#a=!0};createProps(e){let{name:t,char:r}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:r,...e}}shouldRunExit(){return!this.#t||(this.#t=!1,!1)}findNextTextSelection=e=>{let t=e.$from.doc,r=Math.min(t.nodeSize-2,e.to+1),n=t.resolve(r),o=rs.findFrom(n,1,!0);if(iD(o))return o};updateWithNextSelection(e){let t=this.findNextTextSelection(e.selection);if(t)for(let r of this.#r){let n=this.#i.change?.suggester.name,o=this.#i.exit?.suggester.name;r.checkNextValidSelection?.(t.$from,e,{change:n,exit:o})}}changeHandler(e,t){let{change:r,exit:n}=this.#i,o=this.match;if(!r&&!n||!iR(o))return;let i=t===n?.suggester.appendTransaction&&this.shouldRunExit(),s=t===r?.suggester.appendTransaction;if(i||s){var a;if(r&&n&&(a={change:r,exit:n},eo(iN,a.exit?.exitReason)||eo(iP,a.change?.changeReason))){let t=this.createProps(n),o=this.createProps(r);n.range.from,r.range.from,i&&n.suggester.onChange(t,e),s&&r.suggester.onChange(o,e),i&&(this.#a=!1);return}r&&s&&r.suggester.onChange(this.createProps(r),e),n&&i&&(n.suggester.onChange(this.createProps(n),e),this.#a=!1,iA(n.exitReason)&&(this.#i=ei()))}}mapIgnoredDecorations(e){let t=this.#s.map(e.mapping,e.doc),r=t.find().filter(({from:e,to:t,
6spec:r})=>t-e!==(eu(r.char)?r.char.length:1));this.#s=t.remove(r)}ignoreNextExit=()=>{this.#t=!0};addIgnored=({from:e,name:t,specific:r=!1})=>{let n=this.#r.find(e=>e.name===t);if(!n)throw Error(`No suggester exists for the name provided: ${t}`);let o=eu(n.char)?n.char.length:1,i=n.ignoredClassName?{class:n.ignoredClassName}:{},s=o1.inline(e,e+o,{nodeName:n.ignoredTag,...i},{name:t,specific:r,char:n.char});this.#s=this.#s.add(this.view.state.doc,[s])};removeIgnored=({from:e,name:t})=>{let r=this.#r.find(e=>e.name===t);if(!r)throw Error(`No suggester exists for the name provided: ${t}`);let n=eu(r.char)?r.char.length:1,o=this.#s.find(e,e+n)[0];o&&o.spec.name===t&&(this.#s=this.#s.remove([o]))};clearIgnored=e=>{if(!e){this.#s=o9.empty;return}let t=this.#s.find().filter(({spec:t})=>t.name===e);this.#s=this.#s.remove(t)};shouldIgnoreMatch({range:e,suggester:{name:t}}){return this.#s.find().some(({spec:r,from:n})=>n===e.from&&(!r.specific||r.name===t))}resetState(){this.#i=ei(),this.#n=void 0,this.#a=!1,this.#l=!1}updateReasons(e){let{$pos:t,state:r}=e,n=this.#e,o=this.#r,i=r.selection.empty,s=iD(r.selection)?iK({suggesters:o,$pos:t,docChanged:n,selectionEmpty:i}):void 0;this.#n=s&&this.shouldIgnoreMatch(s)?void 0:s,this.#i=function(e){let{prev:t,next:r,state:n,$pos:o}=e,i=ei();if(!t&&!r)return i;let s={prev:t,next:r};return s.prev&&s.next&&s.prev.range.from!==s.next.range.from?function(e){let{prev:t,next:r,state:n}=e,o=ei(),i=iL({state:n,match:t}),{exit:s}=i&&i.query.full!==t.query.full?ij({prev:t,next:i,state:n}):o;return t.range.from<r.range.from?{exit:s??iI({match:t,exitReason:"jump-forward-exit"}),change:iI({match:r,changeReason:"jump-forward-change"})}:{exit:s??iI({match:t,exitReason:"jump-backward-exit"}),change:iI({match:r,changeReason:"jump-backward-change"})}}({prev:s.prev,next:s.next,state:n}):!s.prev&&s.next?{change:iI({match:s.next,changeReason:"start"})}:s.prev&&!s.next?function(e){let{match:t,state:r,$pos:n}=e,{selection:o}=r,i=iL({match:t,state:r});return i&&i.text.full===t.text.full?!o.empty&&(o.from<=t.range.from||o.to>=t.range.to)?{exit:iI({match:t,exitReason:"selection-outside"})}:n.pos>t.range.to?{exit:iI({match:t,exitReason:"move-end"})}:n.pos<=t.range.from?{exit:iI({match:t,exitReason:"move-start"})}:{}:ij({prev:t,next:i,state:r})}({$pos:o,match:s.prev,state:n}):s.prev&&s.next&&s.prev.text.full!==s.next.text.full?{change:iI({match:s.next,changeReason:"change-character"})}:s.prev&&s.next&&s.prev.range.cursor!==s.next.range.cursor?{change:iI({match:s.next,changeReason:n.selection.empty?"move":"selection-inside"})}:i}({next:this.#n,prev:this.#o,state:r,$pos:t})}findMatchAtPosition=(e,t)=>iK({suggesters:t?this.#r.filter(e=>e.name===t):this.#r,$pos:e,docChanged:!1,selectionEmpty:!0});addSuggester(e){let t=this.#r.find(t=>t.name===e.name),r=iJ();if(t)this.#r=this.#r.map(n=>n===t?r(e):n);else{let t=[...this.#r,r(e)];this.#r=eN(t,(e,t)=>t.priority-e.priority)}return()=>this.removeSuggester(e.name)}removeSuggester(e){let t=eu(e)?e:e.name;this.#r=this.#r.filter(e=>e.name!==t),this.clearIgnored(t)}toJSON(){return this.match}apply(e){let{exit:t,change:r}=this.#i;if(this.#l&&(this.#l=!1,!t?.suggester.appendTransaction&&!r?.suggester.appendTransaction))return this;let{tr:n,state:o}=e,i=n.docChanged||n.selectionSet;return!n.getMeta(iW)&&(i||this.#a)&&(this.#e=n.docChanged,this.mapIgnoredDecorations(n),t&&this.resetState(),this.#o=this.#n,this.updateReasons({$pos:n.selection.$from,state:o})),this}createDecorations(e){let t=this.match;if(!iR(t))return this.#s;let{disableDecorations:r}=t.suggester;if(ep(r)?r(e,t):r)return this.#s;let{range:n,suggester:o}=t,{name:i,suggestTag:s,suggestClassName:a}=o,{from:l,to:c}=n;return this.shouldIgnoreMatch(t)?this.#s:this.#s.add(e.doc,[o1.inline(l,c,{nodeName:s,class:i?`${a} suggest-${i}`:a},{name:i})])}setLastChangeFromAppend=()=>{this.#l=!0}};function iJ(){let e=new Set;return t=>{if(e.has(t.name))throw Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);let r={...iU,...t};return e.add(t.name),r}}var iG=new rC("suggest");function iY(e){return iG.getState(e)}function iX(e,t){return iY(e).addSuggester(t)}function iZ(e){e.setMeta(iW,!0)}function iQ(e,t){return iY(e).removeSuggester(t)}function i0(...e){let t=iq.create(e);return new rk({key:iG,view:e=>(t.init(e),{update:e=>t.changeHandler(e.state.tr,!1)}),state:{init:()=>t,apply:(e,r,n,o)=>t.apply({tr:e,state:o})},appendTransaction:(e,r,n)=>{let o=n.tr;return(t.updateWithNextSelection(o),t.changeHandler(o,!0),o.docChanged||o.steps.length>0||o.selectionSet||o.storedMarksSet)?(t.setLastChangeFromAppend(),o):null},props:{decorations:e=>t.createDecorations(e)}})}e.s(["ChangeReason",0,iO,"DEFAULT_SUGGESTER",0,iU,"addSuggester",0,iX,"createRegexFromSuggester",0,iH,"getSuggestPluginState",0,iY,"ignoreUpdateForSuggest",0,iZ,"isInvalidSplitReason",0,iA,"isRemovedReason",0,function(e){return"delete"===e},"isSelectionExitReason",0,function(e){return eo(iT,e)},"isSplitReason",0,function(e){return"exit-split"===e},"markActiveInRange",0,iV,"removeSuggester",0,iQ,"suggest",0,i0],221214);try{var i1="u">typeof window?window:e.g;i1._sentryModuleMetadata=i1._sentryModuleMetadata||{},i1._sentryModuleMetadata[(new i1.Error).stack]=Object.assign({},i1._sentryModuleMetadata[(new i1.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function i2(e,t){let r=Object.getPrototypeOf(t),n=e.selection,o=e.doc,i=e.storedMarks,s=ei();for(let[e,r]of Object.entries(t))s[e]={value:r};return Object.create(r,{...s,storedMarks:{get:()=>i},selection:{get:()=>n},doc:{get:()=>o},tr:{get:()=>(n=e.selection,o=e.doc,i=e.storedMarks,e)}})}function i3(e){return({state:t,dispatch:r,view:n,tr:o})=>e(i2(o,t),r,n)}e.s(["chainCommands",0,function(...e){return({state:t,dispatch:r,view:n,tr:o,...i})=>{for(let s of e)if(s({state:t,dispatch:r,view:n,tr:o,...i}))return!0;return!1}},"chainableEditorState",0,i2,"convertCommand",0,i3,"nonChainable",0,function(e){return t=>
6(eF(void 0===t.dispatch||t.dispatch===t.view?.dispatch,{code:L.NON_CHAINABLE_COMMAND}),e(t))}],246208);try{var i9="u">typeof window?window:e.g;i9._sentryModuleMetadata=i9._sentryModuleMetadata||{},i9._sentryModuleMetadata[(new i9.Error).stack]=Object.assign({},i9._sentryModuleMetadata[(new i9.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var i4={get isBrowser(){return!!("u">typeof window&&void 0!==window.document&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return i4.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return void 0!==O.default&&null!=O.default.versions&&null!=O.default.versions.node},get isIos(){return i4.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return i4.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return i4.isNode?"darwin"===O.default.platform:!!i4.isBrowser&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)},get isDevelopment(){return!1},get isTest(){return!1},get isProduction(){return!0}};function i5(e){return eg(e)&&eh(e.nodeType)&&eu(e.nodeName)}function i6(e){return i5(e)&&1===e.nodeType}function i8(e){let{types:t,node:r}=e;if(!r)return!1;let n=e=>e===r.type||e===r.type.name;return ev(t)?t.some(n):n(t)}function i7(e){let{predicate:t,selection:r}=e,n=sf(r)?r.selection.$from:sg(r)?r.$from:r;for(let e=n.depth;e>0;e--){let r=n.node(e),o=e>0?n.before(e):0,i=n.start(e),s=o+r.nodeSize;if(t(r,o))return{pos:o,depth:e,node:r,start:i,end:s}}}function se(e){let{depth:t}=e,r=t>0?e.before(t):0,n=e.node(t),o=e.start(t),i=r+n.nodeSize;return{pos:r,start:o,node:n,end:i,depth:t}}function st(e){let{types:t,selection:r}=e;return i7({predicate:e=>i8({types:t,node:e}),selection:r})}function sr(e){return sg(e)?e.empty:e.selection.empty}function sn(e){return!!so(e)}function so(e){let{state:t,type:r,attrs:n}=e,{selection:o,doc:i}=t,s=eu(r)?i.type.schema.nodes[r]:r;eF(s,{code:L.SCHEMA,message:`No node exists for ${r}`});let a=function(e){let{types:t,selection:r}=e;if(sw(r)&&i8({types:t,node:r.node}))return{pos:r.$from.pos,depth:r.$from.depth,start:r.$from.start(),end:r.$from.pos+r.node.nodeSize,node:r.node}}({selection:o,types:r})??i7({predicate:e=>e.type===s,selection:o});return!n||ew(n)||!a||a.node.hasMarkup(s,{...a.node.attrs,...n})?a:void 0}function si(...e){return t=>{if(!eM(e))return!1;let[r,...n]=e,o=!1,i=(...e)=>()=>{if(!eM(e))return!1;o=!0;let[,...r]=e;return si(...e)({...t,next:i(...r)})},s=i(...n),a=r({...t,next:s});return o||a?a:s()}}function ss(e){return function(e,t){let r=new Map,n=ei();for(let o of e)for(let[e,i]of et(o)){let o=[...r.get(e)??[],i],s=si(...o);r.set(e,o),n[e]=t(s)}return n}(e,e=>(t,r,n)=>e({state:t,dispatch:r,view:n,tr:t.tr,next:()=>!1}))}function sa(e,t){let r=e.attrs??{};return Object.entries(t).every(([e,t])=>r[e]===t)}function sl(e){return eg(e)}function sc(e,t){return ev(t)?eo(t,e[P]):t===e[P]}function sd(e){return eg(e)&&e instanceof tf}function su(e){return eg(e)&&e instanceof te}function sh(e){return eg(e)&&e instanceof eU}function sp(e){return eg(e)&&e instanceof eG}function sf(e){return eg(e)&&e instanceof rS}function sm(e){return eg(e)&&e instanceof rd}function sg(e){return eg(e)&&e instanceof rs}function sy(e){var t;let{trState:r,from:n,to:o,type:i,attrs:s={}}=e,{doc:a}=r,l=(t=a.type.schema,eu(i)?Z(t.marks,i):i);if(0===Object.keys(s).length)return a.rangeHasMark(n,o,l);let c=!1;return o>n&&a.nodesBetween(n,o,e=>!c&&!(c=(e.marks??[]).some(e=>e.type===l&&sa(e,s)))),c}function sw(e){return eg(e)&&e instanceof rh}function sv(e){let{trState:t,type:r,attrs:n={},from:o,to:i}=e,{selection:s,doc:a,storedMarks:l}=t;if(eF(eu(r)?a.type.schema.marks[r]:r,{code:L.SCHEMA,message:`Mark type: ${r} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)<a.nodeSize&&sy({...e,from:o,to:i})}catch{return!1}return s.empty?(l??s.$from.marks()).some(e=>e.type===r&&sa(e,n??{})):sy({...e,from:s.from,to:s.to})}function sb(e){for(let t of Object.values(e.nodes))if("doc"!==t.name&&(t.isBlock||t.isTextblock))return t;eF(!1,{code:L.SCHEMA,message:"No default block node found for the provided schema."})}function sM(e){return e.type===sb(e.type.schema)}function sx(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function sS(e,t,r){let n=e.parent.childAfter(e.parentOffset);if(!n.node)return;let o=eu(t)?t:t.name,i=n.node.marks.find(({type:e})=>e.name===o),s=e.index(),a=e.start()+n.offset,l=s+1,c=a+n.node.nodeSize;if(!i)return r&&c<r.pos?sS(e.doc.resolve(c+1),t,r):void 0;for(;s>0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,a-=e.parent.child(s).nodeSize;
6for(;l<e.parent.childCount&&i.isInSet(e.parent.child(l).marks);)c+=e.parent.child(l).nodeSize,l+=1;let d=e.doc.textBetween(a,c,"","\n\n");return{from:a,to:c,text:d,mark:i}}function sk(e,t){return 0===t.length||t.some(t=>e instanceof t)}function sE(e){return sm(e)?e.$cursor:void 0}function s_(e,t){var r;let n,o=t.nodeSize-2,i=e=>eA({min:0,max:o,value:e});if(sg(e))return e;if("all"===e)return new rf(t);if(eh(n="start"===e?0:"end"===e?o:eg(e)&&e instanceof e9?e.pos:e))return n=i(n),rd.near(t.resolve(n));if(eg(r=n)&&eh(r.anchor)&&eh(r.head)){let e=i(n.anchor),r=i(n.head);return rd.between(t.resolve(e),t.resolve(r))}let s=i(n.from),a=i(n.to);return rd.between(t.resolve(s),t.resolve(a))}function sC(e){let{content:t,schema:r,document:n,stringHandler:o,onError:i,attempts:s=0}=e;if(eF(i&&s<=3||0===s,{code:L.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),eu(t))return eF(o,{code:L.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:n,content:t,schema:r});if(sf(t))return t.doc;if(su(t))return t;try{return r.nodeFromJSON(t)}catch(a){let n=function({json:e,schema:t,...r}){let n=new Set(er(t.marks)),o=function e(t){let{json:r,validMarks:n,validNodes:o,path:i=[]}=t,s={validMarks:n,validNodes:o},a=[],{type:l,marks:c,content:d}=r,{invalidParentMark:u=!1,invalidParentNode:h=!1}=t;if(c){let e=[];for(let[t,r]of c.entries()){let o=eu(r)?r:r.type;n.has(o)||(e.unshift({name:o,path:[...i,"marks",`${t}`],type:"mark",invalidParentMark:u,invalidParentNode:h}),u=!0)}a.push(...e)}if(o.has(l)||(a.push({name:l,type:"node",path:i,invalidParentMark:u,invalidParentNode:h}),h=!0),d){let t=[];for(let[r,n]of d.entries())t.unshift(...e({...s,json:n,path:[...i,"content",`${r}`],invalidParentMark:u,invalidParentNode:h}));a.unshift(...t)}return a}({json:e,path:[],validNodes:new Set(er(t.nodes)),validMarks:n});return{json:e,invalidContent:o,transformers:sR,...r}}({schema:r,error:a,json:t}),o=null==i?void 0:i(n);return eF(o,{code:L.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(n.invalidContent,null,2)}`}),sC({...e,content:o,attempts:s+1})}}function sO(){let e=rD();if(e)return e;throw Error("Unable to retrieve the document from the global scope. \nIt seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work. \nIf you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string). \nIf you are using Next.js (or other server-side rendering frameworks), please use dynamic import with `ssr: false` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr). \nIf you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror")}function sT(e){var t;return(null==e?void 0:e.defaultView)??("u">typeof window?window:void 0)??(null==(t=rD())?void 0:t.defaultView)}function sA(e,t=sO()){let r=t.createElement("div");return r.append(function(e,t=sO()){var r;let n=(r=e.type.schema,su(e)&&(r?e.type===r.nodes.doc:"doc"===e.type.name))?e.content:eU.from(e);return t_.fromSchema(e.type.schema).serializeFragment(n,{document:t})}(e,t)),r.innerHTML}function sN(e){let{content:t,schema:r,document:n,fragment:o=!1,...i}=e,s=new(function(e){let t=sT(e)??sO().defaultView;if(t)return t;throw Error("Unable to retrieve the window from the global scope")}(n)).DOMParser().parseFromString(`<body>${t}</body>`,"text/html").body,a=ty.fromSchema(r);return o?a.parseSlice(s,{...sP,...i}).content:a.parse(s,{...sP,...i})}var sP={preserveWhitespace:!1},sR={remove(e,t){let r=e;for(let e of t)e.invalidParentNode||(r=eP(e.path,r));return r}};function sD(e){return!!(sm(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function sI(e){return!!(sm(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function sB(e){let t=rs.atStart(e.$anchor.doc);return!!(sI(e)&&t.anchor===e.anchor)}function sL(e,t={}
6,r){return function(n){let{tr:o,dispatch:i,state:s}=n,a=eu(e)?Z(s.schema.nodes,e):e,{from:l,to:c}=s_(r??o.selection,o.doc),d=o.doc.resolve(l),u=o.doc.resolve(c),h=d.blockRange(u),p=h&&tJ(h,a,t);return!!p&&!!h&&(null==i||i(o.wrap(h,p).scrollIntoView()),!0)}}function sj(e,t={},r){return n=>{let{tr:o,state:i}=n;return so({state:o,type:eu(e)?Z(i.schema.nodes,e):e,attrs:t})?function({tr:e,dispatch:t}){let{$from:r,$to:n}=e.selection,o=r.blockRange(n),i=o&&tq(o);return!!eh(i)&&!!o&&(null==t||t(e.lift(o,i).scrollIntoView()),!0)}(n):sL(e,t,r)(n)}}function sF(e,t,r,n=!0){return function(o){let i,{tr:s,dispatch:a,state:l}=o,c=eu(e)?Z(l.schema.nodes,e):e,{from:d,to:u}=s_(r??s.selection,s.doc),h=!1;return s.doc.nodesBetween(d,u,(e,r)=>{if(h)return!1;if(!e.isTextblock||e.hasMarkup(c,t))return;if(e.type===c){h=!0,i=e.attrs;return}let n=s.doc.resolve(r),o=n.index();(h=n.parent.canReplaceWith(o,o+1,c))&&(i=n.parent.attrs)}),!!h&&(null==a||a(s.setBlockType(d,u,c,{...n?i:{},...t}).scrollIntoView()),!0)}}function sV(e){return t=>{let{tr:r,state:n}=t,{type:o,attrs:i,preserveAttrs:s=!0}=e,a=so({state:r,type:o,attrs:i}),l=e.toggleType??sb(n.schema);if(a)return sF(l,{...s?a.node.attrs:{},...i})(t);let c=so({state:r,type:l,attrs:i});return sF(o,{...s?null==c?void 0:c.node.attrs:{},...i})(t)}}function sz(e){let{attrs:t={},appendText:r="",content:n="",keepSelection:o=!1,range:i}=e;return({state:s,tr:a,dispatch:l})=>{var c;let d=s.schema,u=s_(e.selection??i??a.selection,a.doc),h=u.$from.index(),{from:p,to:f,$from:m}=u,g=eu(e.type)?d.nodes[e.type]??d.marks[e.type]:e.type;if(eF(!eu(e.type)||g,{code:L.SCHEMA,message:`Schema contains no marks or nodes with name ${g}`}),eg(g)&&g instanceof th){if(!m.parent.canReplaceWith(h,h,g))return!1;a.replaceWith(p,f,g.create(t,n?d.text(n):void 0))}else eF(n,{message:"`replaceText` cannot be called without content when using a mark type"}),a.replaceWith(p,f,d.text(n,sd(g)?[g.create(t)]:void 0));return r&&a.insertText(r),o&&function(e,t){let{head:r,empty:n,anchor:o}=e;for(let e of t.steps)r=e.getMap().map(r);n?t.setSelection(rd.near(t.doc.resolve(r))):t.setSelection(rd.between(t.doc.resolve(o),t.doc.resolve(r)))}(s.selection,a),l&&(function(e=0){let t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return!!t&&Number.parseInt(Z(t,2),10)>=e}(60)&&(null==(c=document.getSelection())||c.empty()),l(a)),!0}}function sK(e){return({dispatch:t,tr:r,state:n})=>{let{type:o,expand:i=!0,range:s}=e,{from:a,to:l,$from:c,$to:d}=s_(e.selection??s??r.selection,r.doc),u=eu(o)?n.schema.marks[o]:o;null!==u&&eF(u,{code:L.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});let h=u??function e(t,r){let n=t.parent.childAfter(t.parentOffset);if(!n.node)return;let{marks:o,nodeSize:i}=n.node;if(o[0])return o[0].type;let s=t.start()+n.offset;return e(t.doc.resolve(s+i+1),r)}(c);if(!h)return!1;let p=sS(c,h,d);return i&&p&&(a=Math.max(0,Math.min(a,p.from)),l=Math.min(Math.max(l,p.to),r.doc.nodeSize-2)),null==t||t(r.removeMark(a,eh(l)?l:a,sd(u)?u:void 0)),!0}}function s$({predicate:e}){return t=>(function(e){let{node:t,predicate:r,descend:n=!0,action:o}=e;eF(su(t),{code:L.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),eF(ep(r),{code:L.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});let i=[];return t.descendants((e,t)=>{let s={node:e,pos:t};return r(s)&&(i.push(s),null==o||o(s)),n}),i})({...t,predicate:e})}function sH({captureGroup:e,fullMatch:t,end:r,start:n,rule:o,ignoreWhitespace:i,shouldSkip:s,updateCaptured:a,state:l,invalidMarks:c}){var d;if(null==t)return null;let u=(null==a?void 0:a({captureGroup:e,fullMatch:t,start:n,end:r}))??{};e=u.captureGroup??e,t=u.fullMatch??t,n=u.start??n,r=u.end??r;let h=l.doc.resolve(n),p=l.doc.resolve(r);return c&&iV({$from:h,$to:p},c)||o.invalidMarks&&iV({$from:h,$to:p},o.invalidMarks)||i&&(null==e?void 0:e.trim())===""||(null==s?void 0:s({state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"}))||(null==(d=o.shouldSkip)?void 0:d.call(o,{state:l,captureGroup:e,fullMatch:t,start:n,end:r,ruleType:"mark"}))?null:{captureGroup:e,end:r,fullMatch:t,start:n}}s$({predicate:e=>e.node.isText}
6),s$({predicate:e=>e.node.isInline}),s$({predicate:e=>e.node.isBlock}),e.s(["chainKeyBindingCommands",0,si,"composeTransactionSteps",0,function(e,t){let{tr:r}=t;return e.forEach(e=>{e.steps.forEach(e=>{r.step(e)})}),r},"containsAttributes",0,sa,"createDocumentNode",0,sC,"environment",0,i4,"findNodeAtPosition",0,se,"findParentNode",0,i7,"findParentNodeOfType",0,st,"getActiveNode",0,so,"getChangedRanges",0,function(e,t=[]){let r=[],{steps:n,mapping:o}=e,i=o.invert();return n.forEach((e,n)=>{if(!sk(e,t))return;let s=[],a=e.getMap(),l=o.slice(n);if(0===a.ranges.length&&sk(e,[tF,tH,t$,tV])){let{from:t,to:r}=e;s.push({from:t,to:r})}else a.forEach((e,t)=>{s.push({from:e,to:t})});s.forEach(e=>{let t=l.map(e.from,-1),n=l.map(e.to);r.push({from:t,to:n,prevFrom:i.map(t,-1),prevTo:i.map(n)})})}),eR(eN(r,(e,t)=>e.from-t.from),({from:e,to:t,prevFrom:r,prevTo:n})=>`${e}_${t}_${r}_${n}`).filter((e,t,r)=>!r.some((r,n)=>t!==n&&e.prevFrom>=r.prevFrom&&e.prevTo<=r.prevTo&&e.from>=r.from&&e.to<=r.to))},"getCursor",0,sE,"getDefaultBlockNode",0,sb,"getDocument",0,sO,"getMarkRange",0,sS,"getMarkRanges",0,function(e,t){let r=[],{$from:n,$to:o}=e,i=n;for(;;){let e=sS(i,t,o);if(!e)return r;if(r.push(e),e.to<o.pos){i=n.doc.resolve(e.to+1);continue}return r}},"getMatchString",0,function(e,t=0){let r=ev(e)?e[t]:e;return Q(eu(r),`No match string found for match ${e}`),r??""},"getNodeType",0,function(e,t){return eu(e)?Z(t.nodes,e):e},"getSelectedWord",0,function(e){return function(e,t){if(!sm(e.selection))return;let{from:r,to:n}=e.selection,o=(t,r)=>{var n;return(null==(n=rd.between(e.doc.resolve(t),e.doc.resolve(r)).content().content.firstChild)?void 0:n.textContent)??""};for(let e=o(r-1,r);e&&!t.test(e);e=o(--r-1,r));for(let e=o(n,n+1);e&&!t.test(e);e=o(++n,n+1));if(r===n)return;let i=e.doc.textBetween(r,n,"","\n\n");return{from:r,to:n,text:i}}(e,/\W/)},"getShortcutSymbols",0,function(e){let t=[];for(let r of e.split("-")){if(function(e){let t=["command","cmd","meta"];return i4.isMac&&t.push("mod"),t.includes(e)}(r=r.toLowerCase())){t.push({type:"modifier",symbol:"⌘",key:"command",i18n:rF.COMMAND_KEY});continue}if(function(e){let t=["control","ctrl"];return i4.isMac||t.push("mod"),t.includes(e)}(r)){t.push({type:"modifier",symbol:"⌃",key:"control",i18n:rF.CONTROL_KEY});continue}switch(r){case"shift":t.push({type:"modifier",symbol:"⇧",key:r,i18n:rF.SHIFT_KEY});continue;case"alt":t.push({type:"modifier",symbol:"⌥",key:r,i18n:rF.ALT_KEY});continue;case"\n":case"\r":case"enter":t.push({type:"named",symbol:"↵",key:r,i18n:rF.ENTER_KEY});continue;case"backspace":t.push({type:"named",symbol:"⌫",key:r,i18n:rF.BACKSPACE_KEY});continue;case"delete":t.push({type:"named",symbol:"⌦",key:r,i18n:rF.DELETE_KEY});continue;case"escape":t.push({type:"named",symbol:"␛",key:r,i18n:rF.ESCAPE_KEY});continue;case"tab":t.push({type:"named",symbol:"⇥",key:r,i18n:rF.TAB_KEY});continue;case"capslock":t.push({type:"named",symbol:"⇪",key:r,i18n:rF.CAPS_LOCK_KEY});continue;case"space":t.push({type:"named",symbol:"␣",key:r,i18n:rF.SPACE_KEY});continue;case"pageup":t.push({type:"named",symbol:"⤒",key:r,i18n:rF.PAGE_UP_KEY});continue;case"pagedown":t.push({type:"named",symbol:"⤓",key:r,i18n:rF.PAGE_DOWN_KEY});continue;case"home":t.push({type:"named",key:r,i18n:rF.HOME_KEY});continue;case"end":t.push({type:"named",key:r,i18n:rF.END_KEY});continue;case"arrowleft":t.push({type:"named",symbol:"←",key:r,i18n:rF.ARROW_LEFT_KEY});continue;case"arrowright":t.push({type:"named",symbol:"→",key:r,i18n:rF.ARROW_RIGHT_KEY});continue;case"arrowup":t.push({type:"named",symbol:"→",key:r,i18n:rF.ARROW_UP_KEY});continue;case"arrowdown":t.push({type:"named",symbol:"↓",key:r,i18n:rF.ARROW_DOWN_KEY});continue;default:t.push({type:"char",key:r});continue}}return t},"getStyle",0,function(e,t){var r,n;let o=sT(null==(n=e)?void 0:n.ownerDocument);return(null==(r=null==o?void 0:o.getComputedStyle(e))?void 0:r.getPropertyValue(t))??""},"getTextSelection",0,s_,"hasTransactionChanged",0,function(e){return e.docChanged||e.selectionSet},"htmlToProsemirrorNode",0,sN,"isAllSelection",0,function(e){return eg(e)&&e instanceof rf},"isDefaultBlockNode",0,sM,"isDefaultDocNode",0,function(e,t={}){var r;let n=(null==(r=e.type.schema.nodes.doc)?void 0:r.createAndFill())??void 0;if(!n)return!1;let{ignoreAttributes:o,ignoreDocAttributes:i}=t;return o?function e(t,r){return t===r||t.type===r.type&&eG.sameSet(t.marks,r.marks)&&function(){if(t.content===r.content)return!0;
6if(t.content.size!==r.content.size)return!1;let n=[],o=[];for(let[i,s]of(t.content.forEach(e=>n.push(e)),r.content.forEach(e=>o.push(e)),n.entries())){let t=o[i];if(!t||!e(s,t))return!1}return!0}()}(n,e):i?n.content.eq(e.content):n.eq(e)},"isDomNode",0,i5,"isElementDomNode",0,i6,"isEmptyBlockNode",0,sx,"isEndOfTextBlock",0,sD,"isIdentifierOfType",0,sc,"isMarkActive",0,sv,"isNodeActive",0,sn,"isNodeOfType",0,i8,"isNodeSelection",0,sw,"isProsemirrorFragment",0,sh,"isProsemirrorMark",0,sp,"isProsemirrorNode",0,su,"isRemirrorType",0,sl,"isSelectionEmpty",0,sr,"isStartOfDoc",0,sB,"isStartOfTextBlock",0,sI,"isTextSelection",0,sm,"markInputRule",0,function(e){let t,{regexp:r,type:n,getAttributes:o,ignoreWhitespace:i=!1,beforeDispatch:s,updateCaptured:a,shouldSkip:l,invalidMarks:c}=e,d=new rJ(r,(e,r,u,h)=>{let{tr:p,schema:f}=e;t||eF(t=eu(n)?f.marks[n]:n,{code:L.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`});let m=r[1],g=r[0],y=sH({captureGroup:m,fullMatch:g,end:h,start:u,rule:d,state:e,ignoreWhitespace:i,invalidMarks:c,shouldSkip:l,updateCaptured:a});if(!y)return null;({start:u,end:h,captureGroup:m,fullMatch:g}=y);let w=ep(o)?o(r):o,v=h,b=[];if(m){let e=g.search(/\S/),t=u+g.indexOf(m),r=t+m.length;b=p.storedMarks??[],r<h&&p.delete(r,h),t>u&&p.delete(u+e,t),v=u+e+m.length}return p.addMark(u,v,t.create(w)),p.setStoredMarks(b),null==s||s({tr:p,match:r,start:u,end:h}),p});return d},"mergeProsemirrorKeyBindings",0,ss,"nodeInputRule",0,function(e){let{regexp:t,type:r,getAttributes:n,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:s=!1,updateCaptured:a,invalidMarks:l}=e,c=new rJ(t,(e,t,d,u)=>{let h=ep(n)?n(t):n,{tr:p,schema:f}=e,m=eu(r)?f.nodes[r]:r,g=t[1],y=t[0],w=sH({captureGroup:g,fullMatch:y,end:u,start:d,rule:c,state:e,ignoreWhitespace:s,invalidMarks:l,shouldSkip:i,updateCaptured:a});if(!w)return null;({start:d,end:u,captureGroup:g,fullMatch:y}=w),eF(m,{code:L.SCHEMA,message:`No node exists for ${r} in the schema.`});let v=m.createAndFill(h);return v&&(p.replaceRangeWith(m.isBlock?p.doc.resolve(d).before():d,u,v),null==o||o({tr:p,match:[y,g??""],start:d,end:u})),p});return c},"omitExtraAttributes",0,function(e,t){let r=er(t.defaults());return(0,rI.default)({...e},r)},"plainInputRule",0,function(e){let{regexp:t,transformMatch:r,beforeDispatch:n,shouldSkip:o,ignoreWhitespace:i=!1,updateCaptured:s,invalidMarks:a}=e,l=new rJ(t,(e,t,c,d)=>{let u=r(t);if(em(u))return null;let{tr:h,schema:p}=e,f=t[1],m=t[0],g=sH({captureGroup:f,fullMatch:m,end:d,start:c,rule:l,state:e,ignoreWhitespace:i,invalidMarks:a,shouldSkip:o,updateCaptured:s});return g?({start:c,end:d,captureGroup:f,fullMatch:m}=g,""===u?h.delete(c,d):h.replaceWith(c,d,p.text(u)),null==n||n({tr:h,match:t,start:c,end:d}),h):null});return l},"prosemirrorNodeToHtml",0,sA,"removeMark",0,sK,"replaceText",0,sz,"setBlockType",0,sF,"toggleBlockItem",0,sV,"toggleWrap",0,sj,"updateMark",0,function(e){return({dispatch:t,tr:r})=>{let{type:n,attrs:o=ei(),appendText:i,range:s}=e,{$from:a,from:l,to:c}=s?rd.between(r.doc.resolve(s.from),r.doc.resolve(s.to)):r.selection,d=0===a.depth&&r.doc.type.allowsMarkType(n);return r.doc.nodesBetween(l,c,e=>{if(d)return!1;e.inlineContent&&e.type.allowsMarkType(n)&&(d=!0)}),!!d&&(null==t||t(r.addMark(l,c,n.create(o))&&i?r.insertText(i):r),!0)}},"wrapIn",0,sL],964892);var rI=V;try{var sU="u">typeof window?window:e.g;sU._sentryModuleMetadata=sU._sentryModuleMetadata||{},sU._sentryModuleMetadata[(new sU.Error).stack]=Object.assign({},sU._sentryModuleMetadata[(new sU.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var sW=function(){let e=Array.prototype.slice.call(arguments).filter(Boolean),t={},r=[];e.forEach(e=>{(e?e.split(" "):[]).forEach(e=>{if(e.startsWith("atm_")){let[,r]=e.split("_");t[r]=e}else r.push(e)})});let n=[];for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n.push(...r),n.join(" ")},sq=z;e.s(["pick",()=>sq.default],193964);var sq=z;try{var sJ="u">typeof window?window:e.g;sJ._sentryModuleMetadata=sJ._sentryModuleMetadata||{},sJ._sentryModuleMetadata[(new sJ.Error).stack]=Object.assign({},sJ._sentryModuleMetadata[(new sJ.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],990037);try{var sG="u">typeof window?window:e.g;sG._sentryModuleMetadata=sG._sentryModuleMetadata||{},sG._sentryModuleMetadata[(new sG.Error).stack]=Object.assign({},sG._sentryModuleMetadata[(new sG.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let sY=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0),sX=(e,t,r)=>{let n=function(e,t){let{$cursor:r}=e.selection;return r&&(t?t.endOfTextblock("backward",e):!(r.parentOffset>0))?r:null}(e,r);if(!n)return!1;let o=sQ(n);if(!o){let r=n.blockRange(),o=r&&tq(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(s9(e,o,t,-1))return!0;
6if(0==n.parent.content.size&&(sZ(i,"end")||rh.isSelectable(i)))for(let r=n.depth;;r--){let s=t2(e.doc,n.before(r),n.after(r),eX.empty);if(s&&s.slice.size<s.to-s.from){if(t){let r=e.tr.step(s);r.setSelection(sZ(i,"end")?rs.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):rh.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}if(1==r||n.node(r-1).childCount>1)break}return!!i.isAtom&&o.depth==n.depth-1&&(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0)};function sZ(e,t,r=!1){for(let n=e;n;n="start"==t?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&1!=n.childCount)break}return!1}function sQ(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function s0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let r=e.node(t);if(e.index(t)+1<r.childCount)return e.doc.resolve(e.after(t+1));if(r.type.spec.isolating)break}return null}function s1(e){for(let t=0;t<e.edgeCount;t++){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}let s2=(e,t)=>{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let o=r.node(-1),i=r.indexAfter(-1),s=s1(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let n=r.after(),o=e.tr.replaceWith(n,n,s.createAndFill());o.setSelection(rs.near(o.doc.resolve(n),1)),t(o.scrollIntoView())}return!0},s3=(e,t)=>{let{$from:r,to:n}=e.selection,o,i=r.sharedDepth(n);return 0!=i&&(o=r.before(i),t&&t(e.tr.setSelection(rh.create(e.doc,o))),!0)};function s9(e,t,r,n){let o,i,s,a=t.nodeBefore,l=t.nodeAfter,c,d,u=a.type.spec.isolating||l.type.spec.isolating;if(!u&&(o=t.nodeBefore,i=t.nodeAfter,s=t.index(),o&&i&&o.type.compatibleContent(i.type)&&(!o.content.size&&t.parent.canReplace(s-1,s)?(r&&r(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(s,s+1)&&!!(i.isTextblock||tQ(e.doc,t.pos))&&(r&&r(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let h=!u&&t.parent.canReplace(t.index(),t.index()+1);if(h&&(c=(d=a.contentMatchAt(a.childCount)).findWrapping(l.type))&&d.matchType(c[0]||l.type).validEnd){if(r){let n=t.pos+l.nodeSize,o=eU.empty;for(let e=c.length-1;e>=0;e--)o=eU.from(c[e].create(null,o));o=eU.from(a.copy(o));let i=e.tr.step(new tH(t.pos-1,n,t.pos,n,new eX(o,1,0),c.length,!0)),s=i.doc.resolve(n+2*c.length);s.nodeAfter&&s.nodeAfter.type==a.type&&tQ(i.doc,s.pos)&&i.join(s.pos),r(i.scrollIntoView())}return!0}let p=l.type.spec.isolating||n>0&&u?null:rs.findFrom(t,1),f=p&&p.$from.blockRange(p.$to),m=f&&tq(f);if(null!=m&&m>=t.depth)return r&&r(e.tr.lift(f,m).scrollIntoView()),!0;if(h&&sZ(l,"start",!0)&&sZ(a,"end")){let n=a,o=[];for(;o.push(n),!n.isTextblock;)n=n.lastChild;let i=l,s=1;for(;!i.isTextblock;i=i.firstChild)s++;if(n.canReplace(n.childCount,n.childCount,i.content)){if(r){let n=eU.empty;for(let e=o.length-1;e>=0;e--)n=eU.from(o[e].copy(n));r(e.tr.step(new tH(t.pos-o.length,t.pos+l.nodeSize,t.pos+s,t.pos+l.nodeSize-s,new eX(n,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function s4(e){return function(t,r){let n=t.selection,o=e<0?n.$from:n.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(r&&r(t.tr.setSelection(rd.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}let s5=s4(-1),s6=s4(1);function s8(e,t=null,r){let n=!1!==(r&&r.removeWhenPresent),o=!1!==(r&&r.enterInlineAtoms),i=!(r&&r.includeWhitespace);return function(r,s){let{empty:a,$cursor:l,ranges:c}=r.selection;if(a&&!l||!function(e,t,r,n){for(let o=0;o<t.length;o++){let{$from:i,$to:s}=t[o],a=0==i.depth&&e.inlineContent&&e.type.allowsMarkType(r);if(e.nodesBetween(i.pos,s.pos,(e,t)=>{if(a||!n&&e.isAtom&&e.isInline&&t>=i.pos&&t+e.nodeSize<=s.pos)return!1;a=e.inlineContent&&e.type.allowsMarkType(r)}),a)return!0}return!1}(r.doc,c,e,o))return!1;if(s)if(l)s(e.isInSet(r.storedMarks||l.marks())?r.tr.removeStoredMark(e):r.tr.addStoredMark(e.create(t)));else{let a,l=r.tr;o||(c=function(e){let t=[];for(let r=0;r<e.length;r++){let{$from:n,$to:o}=e[r];n.doc.nodesBetween(n.pos,o.pos,(e,r)=>{if(e.isAtom&&e.content.size&&e.isInline&&r>=n.pos&&r+e.nodeSize<=o.pos)return r+1>n.pos&&t.push(new ra(n,n.doc.resolve(r+1))),n=n.doc.resolve(r+1+e.content.size),!1}),n.pos<o.pos&&t.push(new ra(n,o))}return t}(c)),a=n?!c.some(t=>r.doc.rangeHasMark(t.$from.pos,t.$to.pos,e)):!c.every(t=>{let r=!1;return l.doc.nodesBetween(t.$from.pos,t.$to.pos,(n,o,i)=>{if(r)return!1;r=!e.isInSet(n.marks)&&!!i&&i.type.allowsMarkType(e)&&!(n.isText&&/^\s*$/.test(n.textBetween(Math.max(0,t.$from.pos-o),Math.min(n.nodeSize,t.$to.pos-o))))}),!r});for(let r=0;r<c.length;r++){let{$from:n,$to:o}=c[r];if(a){let r=n.pos,s=o.pos,a=n.nodeAfter,c=o.nodeBefore,d=i&&a&&a.isText?/^\s*/.exec(a.text)[0].length:0,u=i&&
6c&&c.isText?/\s*$/.exec(c.text)[0].length:0;r+d<s&&(r+=d,s-=u),l.addMark(r,s,e.create(t))}else l.removeMark(n.pos,o.pos,e)}s(l.scrollIntoView())}return!0}}function s7(...e){return function(t,r,n){for(let o=0;o<e.length;o++)if(e[o](t,r,n))return!0;return!1}}let ae=s7(sY,sX,(e,t,r)=>{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;i=sQ(n)}let s=i&&i.nodeBefore;return!!s&&!!rh.isSelectable(s)&&(t&&t(e.tr.setSelection(rh.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)}),at=s7(sY,(e,t,r)=>{let n=function(e,t){let{$cursor:r}=e.selection;return r&&(t?t.endOfTextblock("forward",e):!(r.parentOffset<r.parent.content.size))?r:null}(e,r);if(!n)return!1;let o=s0(n);if(!o)return!1;let i=o.nodeAfter;if(s9(e,o,t,1))return!0;if(0==n.parent.content.size&&(sZ(i,"start")||rh.isSelectable(i))){let r=t2(e.doc,n.before(),n.after(),eX.empty);if(r&&r.slice.size<r.to-r.from){if(t){let n=e.tr.step(r);n.setSelection(sZ(i,"start")?rs.findFrom(n.doc.resolve(n.mapping.map(o.pos)),1):rh.create(n.doc,n.mapping.map(o.pos))),t(n.scrollIntoView())}return!0}}return!!i.isAtom&&o.depth==n.depth-1&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},(e,t,r)=>{let{$head:n,empty:o}=e.selection,i=n;if(!o)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)return!1;i=s0(n)}let s=i&&i.nodeAfter;return!!s&&!!rh.isSelectable(s)&&(t&&t(e.tr.setSelection(rh.create(e.doc,i.pos)).scrollIntoView()),!0)}),ar={Enter:s7((e,t)=>{let{$head:r,$anchor:n}=e.selection;return!!r.parent.type.spec.code&&!!r.sameParent(n)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)},(e,t)=>{let r=e.selection,{$from:n,$to:o}=r;if(r instanceof rf||n.parent.inlineContent||o.parent.inlineContent)return!1;let i=s1(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let r=(!n.parentOffset&&o.index()<o.parent.childCount?n:o).pos,s=e.tr.insert(r,i.createAndFill());s.setSelection(rd.create(s.doc,r+1)),t(s.scrollIntoView())}return!0},(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let n=r.before();if(tZ(e.doc,n))return t&&t(e.tr.split(n).scrollIntoView()),!0}let n=r.blockRange(),o=n&&tq(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)},(e,t)=>{let{$from:r,$to:n}=e.selection;if(e.selection instanceof rh&&e.selection.node.isBlock)return!!r.parentOffset&&!!tZ(e.doc,r.pos)&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let o=[],i,s,a=!1,l=!1;for(let e=r.depth;;e--){if(r.node(e).isBlock){let t;a=r.end(e)==r.pos+(r.depth-e),l=r.start(e)==r.pos-(r.depth-e),s=s1(r.node(e-1).contentMatchAt(r.indexAfter(e-1)));o.unshift(t||(a&&s?{type:s}:null)),i=e;break}if(1==e)return!1;o.unshift(null)}let c=e.tr;(e.selection instanceof rd||e.selection instanceof rf)&&c.deleteSelection();let d=c.mapping.map(r.pos),u=tZ(c.doc,d,o.length,o);if(u||(o[0]=s?{type:s}:null,u=tZ(c.doc,d,o.length,o)),!u)return!1;if(c.split(d,o.length,o),!a&&l&&r.node(i).type!=s){let e=c.mapping.map(r.before(i)),t=c.doc.resolve(e);s&&r.node(i-1).canReplaceWith(t.index(),t.index()+1,s)&&c.setNodeMarkup(c.mapping.map(r.before(i)),s)}return t&&t(c.scrollIntoView()),!0}),"Mod-Enter":s2,Backspace:ae,"Mod-Backspace":ae,"Shift-Backspace":ae,Delete:at,"Mod-Delete":at,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new rf(e.doc))),!0)},an={"Ctrl-h":ar.Backspace,"Alt-Backspace":ar["Mod-Backspace"],"Ctrl-d":ar.Delete,"Ctrl-Alt-Backspace":ar["Mod-Delete"],"Alt-Delete":ar["Mod-Delete"],"Alt-d":ar["Mod-Delete"],"Ctrl-a":s5,"Ctrl-e":s6};for(let e in ar)an[e]=ar[e];let ao=("u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&!!os.platform&&"darwin"==os.platform())?an:ar;e.s(["baseKeymap",0,ao,"chainCommands",0,s7,"exitCode",0,s2,"joinBackward",0,sX,"selectParentNode",0,s3,"toggleMark",0,s8],397455);try{var ai="u">typeof window?window:e.g;ai._sentryModuleMetadata=ai._sentryModuleMetadata||{},ai._sentryModuleMetadata[(new ai.Error).stack]=Object.assign({},ai._sentryModuleMetadata[(new ai.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],429682);try{var as="u">typeof window?window:e.g;as._sentryModuleMetadata=as._sentryModuleMetadata||{},as._sentryModuleMetadata[(new as.Error).stack]=Object.assign({},as._sentryModuleMetadata[(new as.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var aa="u">typeof window?window:e.g;aa._sentryModuleMetadata=aa._sentryModuleMetadata||{},aa._sentryModuleMetadata[(new aa.Error).stack]=Object.assign({},aa._sentryModuleMetadata[(new aa.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}for(var al={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ac={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ad="u">typeof navigator&&/Mac/.test(navigator.platform),au="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ah=0;ah<10;ah++)al[48+ah]=al[96+ah]=String(ah);for(var ah=1;ah<=24;ah++)al[ah+111]="F"+ah;for(var ah=65;ah<=90;ah++)al[ah]=String.fromCharCode(ah+32),ac[ah]=String.fromCharCode(ah);for(var ap in al)ac.hasOwnProperty(ap)||(ac[ap]=al[ap]);function af(e){var t=!(ad&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||au&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?ac:al)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}e.s(["base",0,al,"keyName",0,af],924080);try{var am="u">typeof window?window:e.g;am._sentryModuleMetadata=am._sentryModuleMetadata||{},am._sentryModuleMetadata[(new am.Error).stack]=Object.assign({},am._sentryModuleMetadata[(new am.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let ag="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),ay="u">typeof navigator&&/Win/.test(navigator.platform);
6function aw(e,t,r=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),r&&t.shiftKey&&(e="Shift-"+e),e}function av(e){let t=function(e){let t=Object.create(null);for(let r in e)t[function(e){let t,r,n,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))n=!0;else if(/^mod$/i.test(s))ag?o=!0:r=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),r&&(s="Ctrl-"+s),o&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(r)]=e[r];return t}(e);return function(e,r){let n=af(r),o,i=t[aw(n,r)];if(i&&i(e.state,e.dispatch,e))return!0;if(1==n.length&&" "!=n){if(r.shiftKey){let o=t[aw(n,r,!1)];if(o&&o(e.state,e.dispatch,e))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(ay&&r.ctrlKey&&r.altKey)&&(o=al[r.keyCode])&&o!=n){let n=t[aw(o,r)];if(n&&n(e.state,e.dispatch,e))return!0}}return!1}}e.s(["keydownHandler",0,av],169444);try{var ab="u">typeof window?window:e.g;ab._sentryModuleMetadata=ab._sentryModuleMetadata||{},ab._sentryModuleMetadata[(new ab.Error).stack]=Object.assign({},ab._sentryModuleMetadata[(new ab.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var aM="u">typeof window?window:e.g;aM._sentryModuleMetadata=aM._sentryModuleMetadata||{},aM._sentryModuleMetadata[(new aM.Error).stack]=Object.assign({},aM._sentryModuleMetadata[(new aM.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var ax=new rC("pasteRule");function aS(e,t){return function r(n){let{fragment:o,rule:i,nodes:s}=n,{regexp:a,ignoreWhitespace:l,ignoredMarks:c,ignoredNodes:d}=i,u=!1;return o.forEach(n=>{var o;if(d?.includes(n.type.name)||(o=n).type.spec.code||o.type.spec.group?.split(" ").includes("code"))return void s.push(n);if(!n.isText){let e=r({fragment:n.content,rule:i,nodes:[]});u||=e.transformed;let t=eU.fromArray(e.nodes);n.type.validContent(t)?s.push(n.copy(t)):s.push(...e.nodes);return}if(n.marks.some(e=>{var t;return"code"===(t=e).type.name||t.type.spec.group?.split(" ").includes("code")||c?.includes(e.type.name)}))return void s.push(n);let h=n.text??"",p=0;for(let r of ex(h,a)){let o=r[1],a=r[0];if(l&&o?.trim()===""||!a)return;let c=r.index,d=c+a.length;c>p&&s.push(n.cut(p,c));let h=n.cut(c,d);if(a&&o){let e=a.search(/\S/),t=c+a.indexOf(o),r=t+o.length;e&&s.push(n.cut(c,c+e)),h=n.cut(t,r)}e({nodes:s,rule:i,textNode:h,match:r,schema:t}),u=!0,p=d}h&&p<h.length&&s.push(n.cut(p))}),{nodes:s,transformed:u}}}function ak(e){let{nodes:t,rule:r,textNode:n,match:o,schema:i}=e,{transformMatch:s,getAttributes:a,markType:l}=r,c=ep(a)?a(o,!1):a,d=n.text??"",u=l.create(c),h=s?.(o);if(""===h)return;if(!1===h)return void t.push(i.text(d,n.marks));let p=u.addToSet(n.marks);t.push(i.text(h??d,p))}function aE(e){let{nodes:t,rule:r,textNode:n,match:o,schema:i}=e,{transformMatch:s}=r,a=s?.(o);if(""===a||!1===a)return;let l=a??n.text??"";t.push(i.text(l,n.marks))}function a_(e){let{nodes:t,rule:r,textNode:n,match:o}=e,{getAttributes:i,nodeType:s,getContent:a}=r,l=ep(i)?i(o,!1):i,c=(a?a(o):n)||void 0;t.push(s.createChecked(l,c))}var aC=["mark","node","text"];try{var aO="u">typeof window?window:e.g;aO._sentryModuleMetadata=aO._sentryModuleMetadata||{},aO._sentryModuleMetadata[(new aO.Error).stack]=Object.assign({},aO._sentryModuleMetadata[(new aO.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let aT=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(e=>e(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(e=>e!==t)}});e.s(["createNanoEvents",0,aT],102402);try{var aA="u">typeof window?window:e.g;aA._sentryModuleMetadata=aA._sentryModuleMetadata||{},aA._sentryModuleMetadata[(new aA.Error).stack]=Object.assign({},aA._sentryModuleMetadata[(new aA.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let aN=function(e,t){};e.s(["default",0,aN],103987);try{var aP="u">typeof window?window:e.g;aP._sentryModuleMetadata=aP._sentryModuleMetadata||{},aP._sentryModuleMetadata[(new aP.Error).stack]=Object.assign({},aP._sentryModuleMetadata[(new aP.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var aR=Object.defineProperty,aD=Object.getOwnPropertyDescriptor,aI=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?aD(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&aR(t,r,i),i},aB=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},aL=(e,t,r)=>(aB(e,t,"read from private field"),r?r.call(e):t.get(e)),aj=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},aF=(e,t,r,n)=>(aB(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function aV(e,t){return e===t}function az(e){let{previousOptions:t,update:r,equals:n=aV}=e,o=eV({...t,...r}),i=ei();for(let e of er(t)){let r=t[e],s=o[e];if(n(r,s)){i[e]={changed:!1};continue}i[e]={changed:!0,previousValue:r,value:s}}return{changes:eV(i),options:o,pickChanged:e=>{let t=ei();for(let r of e){let e=i[r];(null==e?void 0:e.changed)&&(t[r]=e.value)}return t}}}var aK={[L.DUPLICATE_HELPER_NAMES]:"helper method",[L.DUPLICATE_COMMAND_NAMES]:"command method"};function a$(e){let{name:t,set:r,code:n}=e,o=aK[n];eF(!r.has(t),{code:n,message:`There is a naming conflict for the name: ${t} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),r.add(t)}function aH(...e){return eC(sW(...e).split(" ")).join(" ")}var aU="__IGNORE__",aW=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=ei(),this.populateMappedHandlers(),this._options=this._initialOptions=eT(e,this.constructor.defaultOptions,t??ei(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){let e=[],{customHandlerKeys:t,handlerKeys:r,staticKeys:n}=this.constructor;for(let o of er(this._options))n.includes(o)||r.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){if(i4.isProduction)return;let t=[];for(let r of er(e))this._dynamicKeys.includes(r)||t.push(r);eF(eb(t),{code:L.INVALID_SET_EXTENSION_OPTIONS,message:`Invalid properties passed into the 'setOptions()' method: ${JSON.stringify(t)}.`})}setOptions(e){var t;let r=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);let{changes:n,options:o,pickChanged:i}=az({previousOptions:r,update:e});this.updateDynamicOptions(o),null==(t=this.onSetOptions)||t.call(this,{reason:"set",changes:n,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;let{changes:t,options:r,pickChanged:n}=az({previousOptions:this.getDynamicOptions(),update:this._initialOptions});this.updateDynamicOptions(r),null==(e=this.onSetOptions)||e.call(this,{reason:"reset",options:r,changes:t,pickChanged:n,initialOptions:this._initialOptions})}getDynamicOptions(){return(0,rI.default)(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(let e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){let e=ei();for(let t of this.constructor.handlerKeys)e[t]=(...e)=>{var r;let{handlerKeyOptions:n}=this.constructor,o=null==(r=n[t])?void 0:r.reducer,i=null==o?void 0:o.getDefault(...e);for(let[,r]of this._mappedHandlers[t]){let s=r(...e);if(function(e,t,r){let{__ALL__:n}=e,o=e[r];return(!!n||!!o)&&(!!o&&o.earlyReturnValue!==aU&&(ep(o.earlyReturnValue)?!0===o.earlyReturnValue(t):t===o.earlyReturnValue)||!!n&&n.earlyReturnValue!==aU&&(ep(n.earlyReturnValue)?!0===n.earlyReturnValue(t):t===n.earlyReturnValue))}(n,i=o?o.accumulator(i,s,...e):s,t))break}return i};return e}addHandler(e,t,r=D.Default){return this._mappedHandlers[e].push([r,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,e])=>e!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=eN(this._mappedHandlers[e],([e],[t])=>t-e)}addCustomHandler(e,t){var r;return(null==(r=this.onAddCustomHandler)?void 0:r.call(this,{[e]:t}))??eO}};aW.defaultOptions={},aW.staticKeys=[],aW.handlerKeys=[],aW.handlerKeyOptions={},aW.customHandlerKeys=[];var aq=class extends aW{constructor(...e){for(const t of(super(aX,...e),this["~E"]={},this._extensions=eR(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map,this._extensions))this.extensionMap.set(t.constructor,t)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${q(this.name)}Extension`}
6get store(){return eF(this._store,{code:L.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),eV(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(r=>t.constructor===e?t:r))}createExtensions(){return[]}getExtension(e){let t=this.extensionMap.get(e);return eF(t,{code:L.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||(this._store=e)}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};aq.defaultPriority=D.Default;var aJ=class extends aq{static get[P](){return R.PlainExtensionConstructor}get[P](){return R.PlainExtension}},aG=class extends aq{static get[P](){return R.MarkExtensionConstructor}get[P](){return R.MarkExtension}get type(){return Z(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};aG.disableExtraAttributes=!1;var aY=class extends aq{static get[P](){return R.NodeExtensionConstructor}get[P](){return R.NodeExtension}get type(){return Z(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};aY.disableExtraAttributes=!1;var aX={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function aZ(e){return sl(e)&&sc(e,[R.PlainExtension,R.MarkExtension,R.NodeExtension])}function aQ(e){return sl(e)&&sc(e,R.PlainExtension)}function a0(e){return sl(e)&&sc(e,R.NodeExtension)}function a1(e){return sl(e)&&sc(e,R.MarkExtension)}function a2(e){return t=>{let{defaultOptions:r,customHandlerKeys:n,handlerKeys:o,staticKeys:i,defaultPriority:s,handlerKeyOptions:a,...l}=e,c=X(t);for(let[e,t]of(r&&(c.defaultOptions=r),s&&(c.defaultPriority=s),a&&(c.handlerKeyOptions=a),c.staticKeys=i??[],c.handlerKeys=o??[],c.customHandlerKeys=n??[],Object.entries(l)))c[e]||(c[e]=t);return X(c)}}var a3=class extends aJ{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=ei(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var e,t,r;if(this.attributeObject=ei(),null==(e=this.store.managerSettings.exclude)?void 0:e.attributes)return void this.store.setStoreKey("attributes",this.attributeObject);for(let e of(this.attributeList=[],this.store.extensions)){if(null==(t=e.options.exclude)?void 0:t.attributes)continue;let n=null==(r=e.createAttributes)?void 0:r.call(e),o={...n,class:aH(...e.classNames??[],null==n?void 0:n.class)};this.attributeList.unshift(o)}for(let e of this.attributeList)this.attributeObject={...this.attributeObject,...e,class:aH(this.attributeObject.class,e.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function a9(e={}){return(t,r,n)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[r]=e}}function a4(e={}){return(t,r,n)=>{(t.decoratedCommands??(t.decoratedCommands={}))[r]=e}}function a5(e){return(t,r,n)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[r]=e}}var a6=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let t=!0,{view:r,tr:n,dispatch:o}=e;if(!r)return!1;for(let r of this.validateHandlers)if(!r({...e,dispatch:()=>{}})){t=!1;break}return o&&t?(this.promiseCreator(e).then(e=>{this.runHandlers(this.successHandlers,{value:e,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(e=>{this.runHandlers(this.failureHandlers,{error:e,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),o(n),!0):t}}validate(e,t="push"){return this.validateHandlers[t](e),this}success(e,t="push"){return this.successHandlers[t](e),this}failure(e,t="push"){return this.failureHandlers[t](e),this}runHandlers(e,t){var r;for(let r of e)if(!r({...t,dispatch:()=>{}}))break;null==(r=t.dispatch)||r.call(t,t.tr)}};function a8(e){let{type:t,attrs:r,range:n,selection:o}=e;return e=>{let{dispatch:i,tr:s,state:a}=e,l=eu(t)?a.schema.marks[t]:t;if(eF(l,{code:L.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),n||o){let{from:e,to:a}=s_(o??n??s.selection,s.doc);return sv({trState:s,type:t,...n})?null==i||i(s.removeMark(e,a,l)):null==i||i(s.addMark(e,a,l.create(r))),!0}return i3(s8(l,r))(e)}}var a7=class extends aJ{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{let{forcedUpdates:r}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:eC([...r,...t])}),e}}get name(){return"commands"}get transaction(){let e=this.store.getState();this._transaction||(this._transaction=e.tr);let t=this._transaction.before.eq(e.doc),r=!eb(this._transaction.steps);if(!t){let t=e.tr;if(r)for(let e of this._transaction.steps)t.step(e);this._transaction=t}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;let{extensions:r,helpers:n}=this.store,o=ei(),i=new Set,s=ei(),a=t=>{var r;let n=ei(),i=()=>t??this.transaction,l=[],c=()=>l;for(let[e,t]of Object.entries(o))null!=(r=s[e])&&r.disableChaining||(n[e]=this.chainedFactory({chain:n,command:t.original,getTr:i,getChain:c}));let d=e=>{eF(e===i(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return n.run=(t={})=>{let r=l;for(let e of(l=[],r))if(!e(d)&&t.exitEarly)return;e.dispatch(i())},n.tr=()=>{let e=l;for(let t of(l=[],e))t(d);return i()},n.enabled=()=>{for(let e of l)if(!e())return!1;return!0},n.new=e=>a(e),n};for(let e of r){let r=(null==(t=e.createCommands)?void 0:t.call(e))??{},a=e.decoratedCommands??{},l={};for(let[t,o]of(s={...s,decoratedCommands:a},Object.entries(a))){let i=eu(o.shortcut)&&o.shortcut.startsWith("_|")?{shortcut:n.getNamedShortcut(o.shortcut,e.options)}:void 0;this.updateDecorated(t,{...o,name:e.name,...i}),r[t]=e[t].bind(e),o.active&&(l[t]=()=>{var t;return(null==(t=o.active)?void 0:t.call(o,e.options,this.store))??!1})}ew(r)||this.addCommands({active:l,names:i,commands:o,extensionCommands:r})}for(let[e,t]of Object.entries(a()))a[e]=t;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",a),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",a)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return eu(e)?function(e,t={}){return({tr:r,dispatch:n,state:o})=>{let i=o.schema,s=r.selection,{from:a=s.from,to:l=a??s.to,marks:c={}}=t;if(!n)return!0;r.insertText(e,a,l);let d=Z(r.steps,r.steps.length-1).getMap().map(l);for(let[e,t]of et(c))r.addMark(a,d,Z(i.marks,e).create(t));return n(r),!0}}(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(e,r,n)=>this.insertText(e,{...t,...r})(n)}).generateCommand()}selectText(e,t={}){return({tr:r,dispatch:n})=>{let o=s_(e,r.doc);return(r.selection.anchor!==o.anchor||r.selection.head!==o.head||!!t.forceUpdate)&&(null==n||n(r.setSelection(o)),!0)}}selectMark(e){return t=>{let{tr:r}=t,n=sS(r.selection.$from,e);return!!n&&this.store.commands.selectText.original({from:n.from,to:n.to})(t)}}delete(e){return({tr:t,dispatch:r})=>{let{from:n,to:o}=e??t.selection;return null==r||r(t.delete(n,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:r})=>(r&&(null==e||e(),r(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:r})=>(null==r||r(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:r,dispatch:n})=>(null==n||n(r.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return r=>{let{tr:n,dispatch:o}=r,i=this.store.manager.createState({content:e,selection:t});return!!i&&(null==o||o(n.replaceRangeWith(0,n.doc.nodeSize-2,i.doc)),!0)}}resetContent(){return e=>{let{tr:t,dispatch:r}=e,n=this.store.manager.createEmptyDoc();return n?this.setContent(n)(e):(null==r||r(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>!e.selection.empty&&(null==t||t(e.setSelection(rd.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>!!sm(t.selection)&&(null==e||e(t.insertText("\n")),!0)}insertNode(e,t={}){return({dispatch:r,tr:n,state:o})=>{var i;let{attrs:s,range:a,selection:l,replaceEmptyParentBlock:c=!1}=t,{from:d,to:u,$from:h}=s_(l??a??n.selection,n.doc);if(su(e)||sh(e)){let t=h.before(h.depth);return null==r||r(c&&d===u&&sx(h.parent)?n.replaceWith(t,t+h.parent.nodeSize,e):n.replaceWith(d,u,e)),!0}let p=eu(e)?o.schema.nodes[e]:e;
6eF(p,{code:L.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});let f=null==(i=t.marks)?void 0:i.map(e=>{if(e instanceof eG)return e;let t=eu(e)?o.schema.marks[e]:e;return eF(t,{code:L.SCHEMA,message:`The requested mark type ${e} does not exist in the schema.`}),t.create()}),m=p.createAndFill(s,eu(t.content)?o.schema.text(t.content):t.content,f);if(!m)return!1;let g=d!==u;return null==r||r(g?n.replaceRangeWith(d,u,m):n.insert(d,m)),!0}}focus(e){return t=>{let{dispatch:r,tr:n}=t,{view:o}=this.store;if(!1===e||o.hasFocus()&&(void 0===e||!0===e))return!1;if(void 0===e||!0===e){let{from:t=0,to:r=t}=n.selection;e={from:t,to:r}}return r&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{let{view:r}=this.store;return!!r.hasFocus()&&(requestAnimationFrame(()=>{r.dom.blur()}),!e||this.selectText(e)(t))}}setBlockNodeType(e,t,r,n=!0){return sF(e,t,r,n)}toggleWrappingNode(e,t,r){return sj(e,t,r)}toggleBlockNodeItem(e){return sV(e)}wrapInNode(e,t,r){return sL(e,t,r)}applyMark(e,t,r){return({tr:n,dispatch:o,state:i})=>{let s=s_(r??n.selection,n.doc),a=sE(s),l=eu(e)?i.schema.marks[e]:e;if(eF(l,{code:L.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),s.empty&&!a||!function(e,t,r){for(let{$from:n,$to:o}of r){let r=0===n.depth&&t.type.allowsMarkType(e);if(t.nodesBetween(n.pos,o.pos,t=>{if(r)return!1;r=t.inlineContent&&t.type.allowsMarkType(e)}),r)return!0}return!1}(l,n.doc,s.ranges))return!1;if(!o)return!0;if(a)return n.removeStoredMark(l),t&&n.addStoredMark(l.create(t)),o(n),!0;let c=!1;for(let{$from:e,$to:t}of s.ranges){if(c)break;c=n.doc.rangeHasMark(e.pos,t.pos,l)}for(let{$from:e,$to:r}of s.ranges)c&&n.removeMark(e.pos,r.pos,l),t&&n.addMark(e.pos,r.pos,l.create(t));return o(n),!0}}toggleMark(e){return a8(e)}removeMark(e){return sK(e)}setMeta(e,t){return({tr:r})=>(r.setMeta(e,t),!0)}selectAll(){return this.selectText("all")}copy(){return e=>!e.tr.selection.empty&&(e.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(null==(e=navigator.clipboard)?void 0:e.readText)?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(e,t,r)=>this.insertNode(sN({content:e,schema:r.state.schema}),{selection:t})(r)}).generateCommand()}cut(){return e=>!e.tr.selection.empty&&(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return sz(e)}getAllCommandOptions(){let e={};for(let[t,r]of this.decorated)ew(r)||(e[t]=r);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t)return void this.decorated.delete(e);let r=this.decorated.get(e)??{name:""};this.decorated.set(e,{...r,...t})}handleIosFocus(){i4.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){let t=e.getMeta(this.pluginKey)??{};return{...le,...t}}setCommandMeta(e,t){let r=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addCommands(e){let{extensionCommands:t,commands:r,names:n,active:o}=e;for(let[e,i]of et(t))a$({name:e,set:n,code:L.DUPLICATE_COMMAND_NAMES}),eF(!lt.has(e),{code:L.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),r[e]=this.createUnchainedCommand(i,o[e])}unchainedFactory(e){return(...t)=>{let r,{shouldDispatch:n=!0,command:o}=e,{view:i}=this.store,{state:s}=i;return n&&(r=i.dispatch),o(...t)({state:s,dispatch:r,view:i,tr:s.tr})}}createUnchainedCommand(e,t){let r=this.unchainedFactory({command:e});return r.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),r.isEnabled=r.enabled,r.original=e,r.active=t,r}chainedFactory(e){return(...t)=>{let{chain:r,command:n,getTr:o,getChain:i}=e,s=i(),{view:a}=this.store,{state:l}=a;return s.push(e=>n(...t)({state:l,dispatch:e,view:a,tr:o()})),r}}};aI([a4()],a7.prototype,"customDispatch",1),aI([a4()],a7.prototype,"insertText",1),aI([a4()],a7.prototype,"selectText",1),aI([a4()],a7.prototype,"selectMark",1),aI([a4()],a7.prototype,"delete",1),aI([a4()],a7.prototype,"emptyUpdate",1),aI([a4()],a7.prototype,"forceUpdate",1),aI([a4()],a7.prototype,"updateNodeAttributes",1),aI([a4()],a7.prototype,"setContent",1),aI([a4()],a7.prototype,"resetContent",1),aI([a4()],a7.prototype,"emptySelection",1),aI([a4()],a7.prototype,"insertNewLine",1),aI([a4()],a7.prototype,"insertN
6ode",1),aI([a4()],a7.prototype,"focus",1),aI([a4()],a7.prototype,"blur",1),aI([a4()],a7.prototype,"setBlockNodeType",1),aI([a4()],a7.prototype,"toggleWrappingNode",1),aI([a4()],a7.prototype,"toggleBlockNodeItem",1),aI([a4()],a7.prototype,"wrapInNode",1),aI([a4()],a7.prototype,"applyMark",1),aI([a4()],a7.prototype,"toggleMark",1),aI([a4()],a7.prototype,"removeMark",1),aI([a4()],a7.prototype,"setMeta",1),aI([a4({description:({t:e})=>e(rj.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(rj.SELECT_ALL_LABEL),shortcut:B.SelectAll})],a7.prototype,"selectAll",1),aI([a4({description:({t:e})=>e(rj.COPY_DESCRIPTION),label:({t:e})=>e(rj.COPY_LABEL),shortcut:B.Copy,icon:"fileCopyLine"})],a7.prototype,"copy",1),aI([a4({description:({t:e})=>e(rj.PASTE_DESCRIPTION),label:({t:e})=>e(rj.PASTE_LABEL),shortcut:B.Paste,icon:"clipboardLine"})],a7.prototype,"paste",1),aI([a4({description:({t:e})=>e(rj.CUT_DESCRIPTION),label:({t:e})=>e(rj.CUT_LABEL),shortcut:B.Cut,icon:"scissorsFill"})],a7.prototype,"cut",1),aI([a4()],a7.prototype,"replaceText",1),aI([a9()],a7.prototype,"getAllCommandOptions",1),aI([a9()],a7.prototype,"getCommandOptions",1),aI([a9()],a7.prototype,"getCommandProp",1),a7=aI([a2({defaultPriority:D.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],a7);var le={forcedUpdates:[]},lt=new Set(["run","chain","original","raw","enabled","tr","new"]),lr=class extends aJ{constructor(){super(...arguments),this.placeholders=o9.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{let t=ek(),{promise:r,placeholder:n,onFailure:o,onSuccess:i}=e;return new a6(r).validate(e=>this.addPlaceholder(t,n)(e)).success(e=>{let{state:r,tr:n,dispatch:s,view:a,value:l}=e,c=this.store.helpers.findPlaceholder(t);if(!c){let e=Error("The placeholder has been removed");return(null==o?void 0:o({error:e,state:r,tr:n,dispatch:s,view:a}))??!1}return this.removePlaceholder(t)({state:r,tr:n,view:a,dispatch:()=>{}}),i(l,c,{state:r,tr:n,dispatch:s,view:a})}).failure(e=>(this.removePlaceholder(t)({...e,dispatch:()=>{}}),(null==o?void 0:o(e))??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,r,n,o,i,s;let{added:a,clearTrackers:l,removed:c,updated:d}=this.getMeta(e);if(l){for(let[,e]of(this.placeholders=o9.empty,this.placeholderWidgets))null==(r=(t=e.spec).onDestroy)||r.call(t,this.store.view,e.spec.element);this.placeholderWidgets.clear();return}for(let[,t]of(this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:e=>{var t,r;let n=this.placeholderWidgets.get(e.id);n&&(null==(r=(t=n.spec).onDestroy)||r.call(t,this.store.view,n.spec.element))}}),this.placeholderWidgets))null==(o=(n=t.spec).onUpdate)||o.call(n,this.store.view,t.from,t.spec.element,t.spec.data);for(let t of a){if("inline"===t.type){this.addInlinePlaceholder(t,e);continue}if("node"===t.type){this.addNodePlaceholder(t,e);continue}if("widget"===t.type){this.addWidgetPlaceholder(t,e);continue}}for(let{id:t,data:r}of d){let n=this.placeholderWidgets.get(t);if(!n)continue;let o=o1.widget(n.from,n.spec.element,{...n.spec,data:r});this.placeholders=this.placeholders.remove([n]).add(e.doc,[o]),this.placeholderWidgets.set(t,o)}for(let e of c){let t=this.placeholders.find(void 0,void 0,t=>t.id===e&&t.__type===lo),r=this.placeholderWidgets.get(e);r&&(null==(s=(i=r.spec).onDestroy)||s.call(i,this.store.view,r.spec.element)),this.placeholders=this.placeholders.remove(t),this.placeholderWidgets.delete(e)}}},props:{decorations:e=>{let t=this.options.decorations(e);for(let r of(t=t.add(e.doc,this.placeholders.find()),this.store.extensions)){if(!r.createDecorations)continue;let n=r.createDecorations(e).find();t=t.add(e.doc,n)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(li,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(li,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(null==t||t(e),!0)}addPlaceholder(e,t,r){return({dispatch:n,tr:o})=>!!this.addPlaceholderTransaction(e,t,o,!n)&&(null==n||n(r?o.deleteSelection():o),!0)}updatePlaceholder(e,t){return({dispatch:r,tr:n})=>!!this.updatePlaceholderTransaction({id:e,data:t,tr:n,checkOnly:!r})&&(null==r||r(n),!0)}removePlaceholder(e){return({dispatch:t,tr:r})=>!!this.removePlaceholderTransaction({id:e,tr:r,checkOnly:!t})&&(null==t||t(r),!0)}clearPlaceholders(){return({tr:e,dispatch:t})=>!!this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})&&(null==t||t(e),!0)}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){let e=new Map;for(let t of this.placeholders.find(void 0,void 0,e=>e.__type===lo))e.set(t.spec.id,{from:t.from,to:t.to});return e}createDecorations(e){var t,r,n;let{persistentSelectionClass:o}=this.options;return!o||(null==(t=this.store.view)?void 0:t.hasFocus())||(null==(n=(r=this.store.helpers).isInteracting)?void 0:n.call(r))?o9.empty:function(e,t,r){let{selection:n,doc:o}=e;if(n.empty)return t;let{from:i,to:s}=n,a=sw(n)?o1.node(i,s,r):o1.inline(i,s,r);return t.add(o,[a])}(e,o9.empty,{class:eu(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){let{pos:r,createElement:n,onDestroy:o,onUpdate:i,className:s,nodeName:a,id:l,type:c}=e,d=(null==n?void 0:n(this.store.view,r))??document.createElement(a);d.classList.add(s);let u=o1.widget(r,d,{id:l,__type:lo,type:c,element:d,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(l,u),this.placeholders=this.placeholders.add(t.doc,[u])}addInlinePlaceholder(e,t){let r,{from:n=t.selection.from,to:o=t.selection.to,className:i,nodeName:s,id:a,type:l}=e;if(n===o){let e=document.createElement(s);e.classList.add(i),r=o1.widget(n,e,{id:a,type:l,__type:lo,widget:e})}else r=o1.inline(n,o,{nodeName:s,class:i},{id:a,__type:lo});this.placeholders=this.placeholders.add(t.doc,[r])}
6addNodePlaceholder(e,t){let{pos:r,className:n,nodeName:o,id:i}=e,s=eh(r)?t.doc.resolve(r):t.selection.$from,a=eh(r)?s.nodeAfter?{pos:r,end:s.nodeAfter.nodeSize}:void 0:se(s);if(!a)return;let l=o1.node(a.pos,a.end,{nodeName:o,class:n},{id:i,__type:lo});this.placeholders=this.placeholders.add(t.doc,[l])}withRequiredBase(e,t){let{placeholderNodeName:r,placeholderClassName:n}=this.options,{nodeName:o=r,className:i,...s}=t;return{nodeName:o,className:(i?[n,i]:[n]).join(" "),...s,id:e}}getMeta(e){let t=e.getMeta(this.pluginKey)??{};return{...ln,...t}}setMeta(e,t){let r=this.getMeta(e);e.setMeta(this.pluginKey,{...r,...t})}addPlaceholderTransaction(e,t,r,n=!1){if(this.findPlaceholder(e))return!1;if(n)return!0;let{added:o}=this.getMeta(r);return this.setMeta(r,{added:[...o,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){let{id:t,tr:r,checkOnly:n=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;let{updated:i}=this.getMeta(r);return this.setMeta(r,{updated:eC([...i,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){let{id:t,tr:r,checkOnly:n=!1}=e;if(!this.findPlaceholder(t))return!1;if(n)return!0;let{removed:o}=this.getMeta(r);return this.setMeta(r,{removed:eC([...o,t])}),!0}clearPlaceholdersTransaction(e){let{tr:t,checkOnly:r=!1}=e;return this.getPluginState()!==o9.empty&&(!!r||(this.setMeta(t,{clearTrackers:!0}),!0))}};aI([a4()],lr.prototype,"updateDecorations",1),aI([a4()],lr.prototype,"addPlaceholder",1),aI([a4()],lr.prototype,"updatePlaceholder",1),aI([a4()],lr.prototype,"removePlaceholder",1),aI([a4()],lr.prototype,"clearPlaceholders",1),aI([a9()],lr.prototype,"findPlaceholder",1),aI([a9()],lr.prototype,"findAllPlaceholders",1),lr=aI([a2({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,r)=>e.add(r.doc,t.find()),getDefault:()=>o9.empty}}},defaultPriority:D.Low})],lr);var ln={added:[],updated:[],clearTrackers:!1,removed:[]},lo="placeholderDecoration",li="persistentSelectionFocus",ls=class extends aJ{get name(){return"docChanged"}onStateUpdate(e){let{firstUpdate:t,transactions:r,tr:n}=e;!t&&(r??[n]).some(e=>null==e?void 0:e.docChanged)&&this.options.docChanged(e)}};ls=aI([a2({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:D.Lowest})],ls);var la=class extends aJ{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",sN);let t=ei(),r=ei(),n=ei(),o=new Set;for(let i of this.store.extensions){a0(i)&&(r[i.name]=e=>sn({state:this.store.getState(),type:i.type,attrs:e}),n[i.name]=e=>{var t;return null==(t=so({state:this.store.getState(),type:i.type,attrs:e}))?void 0:t.node.attrs}),a1(i)&&(r[i.name]=e=>sv({trState:this.store.getState(),type:i.type,attrs:e}),n[i.name]=e=>{let t=sS(this.store.getState().selection.$from,i.type);return t&&e?sa(t.mark,e)?t.mark.attrs:void 0:null==t?void 0:t.mark.attrs});let s=(null==(e=i.createHelpers)?void 0:e.call(i))??{};for(let e of Object.keys(i.decoratedHelpers??{}))s[e]=i[e].bind(i);if(!ew(s))for(let[e,r]of et(s))a$({name:e,set:o,code:L.DUPLICATE_HELPER_NAMES}),t[e]=r}this.store.setStoreKey("attrs",n),this.store.setStoreKey("active",r),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",n),this.store.setExtensionStore("active",r),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return sr(e)}isViewEditable(e=this.store.getState()){var t,r;return(null==(r=(t=this.store.view.props).editable)?void 0:r.call(t,e))??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return r=>{let{state:n}=r,o=sN({content:e,schema:n.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(r)}}getText({lineBreakDivider:e="\n\n",state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,"\0")}
6getTextBetween(e,t,r=this.store.getState().doc){return r.textBetween(e,t,"\n\n","\0")}getHTML(e=this.store.getState()){return sA(e.doc,this.store.document)}textToProsemirrorNode(e){let t=`<pre>${e.content}</pre>`;return this.store.stringHandlers.html({...e,content:t})}};aI([a9()],la.prototype,"isSelectionEmpty",1),aI([a9()],la.prototype,"isViewEditable",1),aI([a9()],la.prototype,"getStateJSON",1),aI([a9()],la.prototype,"getJSON",1),aI([a9()],la.prototype,"getRemirrorJSON",1),aI([a4()],la.prototype,"insertHtml",1),aI([a9()],la.prototype,"getText",1),aI([a9()],la.prototype,"getTextBetween",1),aI([a9()],la.prototype,"getHTML",1),la=aI([a2({})],la);var ll=class extends aJ{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;let r=[],n=this.store.markTags[N.ExcludeInputRules];for(let o of this.store.extensions)if((null==(e=this.store.managerSettings.exclude)||!e.inputRules)&&o.createInputRules&&(null==(t=o.options.exclude)||!t.inputRules))for(let e of o.createInputRules())e.shouldSkip=this.options.shouldSkipInputRule,e.invalidMarks=n,r.push(e);return rG({rules:r})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};ll=aI([a2({defaultPriority:D.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],ll);var lc=class extends aJ{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,r;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],null==(r=(t=this.store).rebuildKeymap)||r.call(t),()=>{var t,r;this.extraKeyBindings=this.extraKeyBindings.filter(t=>t!==e),null==(r=(t=this.store).rebuildKeymap)||r.call(t)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){let{shortcuts:e}=this.options;return eu(e)?lf[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(null==(e=this.store.managerSettings.exclude)?void 0:e.keymap)?[]:(this.setupKeydownHandler(),[new rk({props:{handleKeyDown:(e,t)=>{var r;return null==(r=this.keydownHandler)?void 0:r.call(this,e,t)}}})])}setupKeydownHandler(){let e=this.generateKeymapBindings();this.keydownHandler=av(e)}generateKeymapBindings(){var e;let t=[],r=this.shortcutMap,n=this.store.getExtension(a7),o=e=>t=>ld({shortcut:t,map:r,store:this.store,options:e.options});for(let i of this.store.extensions){let s=i.decoratedKeybindings??{};if(null==(e=i.options.exclude)||!e.keymap)for(let[e,a]of(i.createKeymap&&t.push(function(e,t){let r,n,o={};for(let[i,s]of(ev(e)?[n,r]=e:r=e,et(r)))o[lu(i,t)]=s;return ed(n)?o:[n,o]}(i.createKeymap(o(i)),r)),et(s))){if(a.isActive&&!a.isActive(i.options,this.store))continue;let o=i[e].bind(i),s=ld({shortcut:a.shortcut,map:r,options:i.options,store:this.store}),l=ep(a.priority)?a.priority(i.options,this.store):a.priority??D.Low,c=ei();for(let e of s)c[e]=o;t.push([l,c]),a.command&&n.updateDecorated(a.command,{shortcut:s})}}return ss(this.sortKeymaps([...this.extraKeyBindings,...t]))}arrowRightShortcut(e){let t=this.store.markTags[N.PreventExits],r=this.store.nodeTags[N.PreventExits];return this.exitMarkForwards(t,r)(e)}arrowLeftShortcut(e){let t=this.store.markTags[N.PreventExits],r=this.store.nodeTags[N.PreventExits];return si(this.exitNodeBackwards(r),this.exitMarkBackwards(t,r))(e)}backspace(e){let t=this.store.markTags[N.PreventExits],r=this.store.nodeTags[N.PreventExits];return si(this.exitNodeBackwards(r,!0),this.exitMarkBackwards(t,r,!0))(e)}createKeymap(){let{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:r}=this.options,n=ei();if(!r)for(let[e,t]of et(ao))n[e]=i3(t);return t&&ao.Backspace&&(n.Backspace=i3(s7(rX,ao.Backspace))),e&&(n.Escape=i3(s3)),[D.Low,n]}getNamedShortcut(e,t={}){return e.startsWith("_|")?ld({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,r;let{changes:n}=e;(n.excludeBaseKeymap.changed||n.selectParentNodeOnEscape.changed||n.undoInputRuleOnBackspace.changed)&&(null==(r=(t=this.store).rebuildKeymap)||r.call(t))}sortKeymaps(e){return eN(e.map(e=>ev(e)?e:[D.Default,e]),(e,t)=>t[0]-e[0]).map(e=>e[1])}exitMarkForwards(e,t){return r=>{let{tr:n,dispatch:o}=r;if(!sD(n.selection)||st({selection:n.selection,types:t}))return!1;let i=n.selection.$from.marks().filter(t=>!e.includes(t.type.name));if(eb(i))return!1;if(!o)return!0;for(let e of i)n.removeStoredMark(e);return o(n.insertText(" ",n.selection.from)),!0}}exitNodeBackwards(e,t=!1){return r=>{let{tr:n}=r;if(!(t?sB:sI)(n.selection))return!1;let o=n.selection.$anchor.node();return!(!sx(o)||sM(o)||e.includes(o.type.name))&&this.store.commands.toggleBlockNodeItem.original({type:o.type})(r)}}exitMarkBackwards(e,t,r=!1){return n=>
6{let{tr:o,dispatch:i}=n;if(!(r?sB:sI)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(st({selection:o.selection,types:t}))return!1;let s=[...o.storedMarks??[],...o.selection.$from.marks()].filter(t=>!e.includes(t.type.name));if(eb(s))return!1;if(!i)return!0;for(let e of s)o.removeStoredMark(e);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};function ld({shortcut:e,map:t,options:r,store:n}){return eu(e)?[lu(e,t)]:ev(e)?e.map(e=>lu(e,t)):ld({shortcut:e=e(r,n),map:t,options:r,store:n})}function lu(e,t){return eo(en(B),e)?t[e]:e}aI([a5({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],lc.prototype,"arrowRightShortcut",1),aI([a5({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],lc.prototype,"arrowLeftShortcut",1),aI([a5({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],lc.prototype,"backspace",1),aI([a9()],lc.prototype,"getNamedShortcut",1),lc=aI([a2({defaultPriority:D.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],lc);var lh={[B.Copy]:"Mod-c",[B.Cut]:"Mod-x",[B.Paste]:"Mod-v",[B.PastePlain]:"Mod-Shift-v",[B.SelectAll]:"Mod-a",[B.Undo]:"Mod-z",[B.Redo]:i4.isMac?"Shift-Mod-z":"Mod-y",[B.Bold]:"Mod-b",[B.Italic]:"Mod-i",[B.Underline]:"Mod-u",[B.Strike]:"Mod-d",[B.Code]:"Mod-`",[B.Paragraph]:"Mod-Shift-0",[B.H1]:"Mod-Shift-1",[B.H2]:"Mod-Shift-2",[B.H3]:"Mod-Shift-3",[B.H4]:"Mod-Shift-4",[B.H5]:"Mod-Shift-5",[B.H6]:"Mod-Shift-6",[B.TaskList]:"Mod-Shift-7",[B.BulletList]:"Mod-Shift-8",[B.OrderedList]:"Mod-Shift-9",[B.Quote]:"Mod->",[B.Divider]:"Mod-Shift-|",[B.Codeblock]:"Mod-Shift-~",[B.ClearFormatting]:"Mod-Shift-C",[B.Superscript]:"Mod-.",[B.Subscript]:"Mod-,",[B.LeftAlignment]:"Mod-Shift-L",[B.CenterAlignment]:"Mod-Shift-E",[B.RightAlignment]:"Mod-Shift-R",[B.JustifyAlignment]:"Mod-Shift-J",[B.InsertLink]:"Mod-k",[B.Find]:"Mod-f",[B.FindBackwards]:"Mod-Shift-f",[B.FindReplace]:"Mod-Shift-H",[B.AddFootnote]:"Mod-Alt-f",[B.AddComment]:"Mod-Alt-m",[B.ContextMenu]:"Mod-Shift-\\",[B.IncreaseFontSize]:"Mod-Shift-.",[B.DecreaseFontSize]:"Mod-Shift-,",[B.IncreaseIndent]:"Tab",[B.DecreaseIndent]:"Shift-Tab",[B.Shortcuts]:"Mod-/",[B.Format]:i4.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},lp={...lh,[B.Strike]:"Mod-Shift-S",[B.Code]:"Mod-Shift-M",[B.Paragraph]:"Mod-Alt-0",[B.H1]:"Mod-Alt-1",[B.H2]:"Mod-Alt-2",[B.H3]:"Mod-Alt-3",[B.H4]:"Mod-Alt-4",[B.H5]:"Mod-Alt-5",[B.H6]:"Mod-Alt-6",[B.OrderedList]:"Mod-Alt-7",[B.BulletList]:"Mod-Alt-8",[B.Quote]:"Mod-Alt-9",[B.ClearFormatting]:"Mod-\\",[B.IncreaseIndent]:"Mod-[",[B.DecreaseIndent]:"Mod-]"},lf={default:lh,googleDoc:lp},lm=class extends aJ{get name(){return"nodeViews"}createPlugin(){let e=[],t=ei();for(let t of this.store.extensions){if(!t.createNodeViews)continue;let r=t.createNodeViews();e.unshift(ep(r)?{[t.name]:r}:r)}for(let r of(e.unshift(this.store.managerSettings.nodeViews??{}),e))Object.assign(t,r);return{props:{nodeViews:t}}}},lg=class extends aJ{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;let r,n=[];for(let r of this.store.extensions){if((null==(e=this.store.managerSettings.exclude)?void 0:e.pasteRules)||!r.createPasteRules||(null==(t=r.options.exclude)?void 0:t.pasteRules))continue;let o=r.createPasteRules(),i=ev(o)?o:[o];n.push(...i)}let o=eN(n,(e,t)=>(t.priority??D.Low)-(e.priority??D.Low)),i=[],s=[];for(let e of o)eo(aC,e.type)?i.push(e):s.push(e);return new rk({key:ax,view:e=>(r=e,{}),props:{transformPasted:e=>{var t;let n,o=r.state.selection.$from,s=o.node().type.name,a=new Set(o.marks().map(e=>e.type.name));for(let t of i){if(t.ignoredNodes?.includes(s)||t.ignoredMarks?.some(e=>a.has(e)))continue;let n=e.content.firstChild?.textContent??"",o=!r.state.selection.empty&&1===e.content.childCount&&n,i=ex(n,t.regexp)[0];if(o&&i&&"mark"===t.type&&t.replaceSelection){let{from:e,to:n}=r.state.selection,o=r.state.doc.slice(e,n),s=o.content.textBetween(0,o.content.size);if("boolean"!=typeof t.replaceSelection?t.replaceSelection(s):t.replaceSelection){let e=[],{getAttributes:r,markType:n}=t,s=ep(r)?r(i,!0):r,a=n.create(s);return o.content.forEach(t=>{if(t.isText){let r=a.addToSet(t.marks);e.push(t.mark(r))}}),eX.maxOpen(eU.fromArray(e))}}let{nodes:l,transformed:c}=function(e,t,r){let n=[];switch(t.type){case"mark":return aS(ak,r)({fragment:e,nodes:n,rule:t});case"node":return aS(a_,r)({fragment:e,nodes:n,rule:t});default:return aS(aE,r)({fragment:e,nodes:n,rule:t})}}(e.content,t,r.state.schema);c&&(e="node"===t.type&&t.nodeType.isBlock?new eX(eU.fromArray(l),0,0):new eX(eU.fromArray(l),e.openStart,e.openEnd))}return t=e,(n=eX.maxOpen(t.content)).openStart<t.openStart||n.openEnd<t.openEnd?n:t},handleDOMEvents:{paste:(e,t)=>
6{if(!e.props.editable?.(e.state))return!1;let{clipboardData:r}=t;if(!r)return!1;let n=[...r.items].map(e=>e.getAsFile()).filter(e=>!!e);if(0===n.length)return!1;let{selection:o}=e.state;for(let{fileHandler:r,regexp:i}of s){let s=i?n.filter(e=>i.test(e.type)):n;if(0!==s.length&&r({event:t,files:s,selection:o,view:e,type:"paste"}))return t.preventDefault(),!0}return!1},drop:(e,t)=>{if(!e.props.editable?.(e.state))return!1;let{dataTransfer:r,clientX:n,clientY:o}=t;if(!r)return!1;let i=function(e){let{dataTransfer:t}=e;return t?t.files?.length>0?[...t.files]:t.items?.length?[...t.items].map(e=>e.getAsFile()).filter(e=>!!e):[]:[]}(t);if(0===i.length)return!1;let a=e.posAtCoords({left:n,top:o})?.pos??e.state.selection.anchor;for(let{fileHandler:r,regexp:n}of s){let o=n?i.filter(e=>n.test(e.type)):i;if(0!==o.length&&r({event:t,files:o,pos:a,view:e,type:"drop"}))return t.preventDefault(),!0}return!1}}}})}},ly=class extends aJ{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=ei(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{let t=this.stateGetters.get(e);return eF(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){let{setStoreKey:e,setExtensionStore:t,managerSettings:r,extensions:n}=this.store;this.updateExtensionStore();let{plugins:o=[]}=r;for(let e of(this.updatePlugins(o,this.managerPlugins),n))e.onApplyState&&this.applyStateHandlers.push(e.onApplyState.bind(e)),e.onInitState&&this.initStateHandlers.push(e.onInitState.bind(e)),e.onAppendTransaction&&this.appendTransactionHandlers.push(e.onAppendTransaction.bind(e)),this.extractExtensionPlugins(e);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),e("pluginKeys",this.pluginKeys),e("getPluginState",this.getStateByName),t("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,r)=>{let n=r.tr,o={previousState:t,tr:n,transactions:e,state:r};for(let e of this.appendTransactionHandlers)e(o);return this.options.appendTransaction(o),n.docChanged||n.steps.length>0||n.selectionSet||n.storedMarksSet?n:void 0},state:{init:(e,t)=>{for(let e of this.initStateHandlers)e(t)},apply:(e,t,r,n)=>{let o={previousState:r,state:n,tr:e};for(let e of this.applyStateHandlers)e(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,r;if(!(!e.createPlugin&&!e.createExternalPlugins)&&(null==(t=this.store.managerSettings.exclude)||!t.plugins)&&(null==(r=e.options.exclude)||!r.plugins)){if(e.createPlugin){let t=new rC(e.name);this.pluginKeys[e.name]=t;let r=this.getPluginStateCreator(t);e.pluginKey=t,e.getPluginState=r,this.stateGetters.set(e.name,r),this.stateGetters.set(e.constructor,r);let n=new rk({...e.createPlugin(),key:t});this.updatePlugins([n],e.plugin?[e.plugin]:void 0),e.plugin=n}if(e.createExternalPlugins){let t=e.createExternalPlugins();this.updatePlugins(t,e.externalPlugins),e.externalPlugins=t}}}updatePlugins(e,t){if(!t||eb(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(e=>!t.includes(e)),...e];return}let r=new Map;for(let[n,o]of e.entries())r.set(Z(t,n),o);this.plugins=this.plugins.map(e=>t.includes(e)?r.get(e):e)}updateExtensionStore(){let{setExtensionStore:e}=this.store;e("updatePlugins",this.updatePlugins.bind(this)),e("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),e("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){let t=aZ(e)?e:sl(e)&&sc(e,[R.PlainExtensionConstructor,R.MarkExtensionConstructor,R.NodeExtensionConstructor])?this.store.manager.getExtension(e):this.store.extensions.find(t=>t.name===e);eF(t,{code:L.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){eF(this.store.phase>=I.EditorView,{code:L.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});let{view:e,updateState:t}=this.store;t(e.state.reconfigure({plugins:this.plugins}))}};
6ly=aI([a2({defaultPriority:D.Highest,handlerKeys:["applyState","appendTransaction"]})],ly);var lw=class extends aJ{constructor(){super(...arguments),this.dynamicAttributes={marks:ei(),nodes:ei()}}get name(){return"schema"}onCreate(){let{managerSettings:e,tags:t,markNames:r,nodeNames:n,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:s,nodeOverride:a,markOverride:l}=e;if(e.schema){let{nodes:t,marks:r}=function(e){let t=ei(),r=ei();for(let[r,n]of Object.entries(e.nodes))t[r]=n.spec;for(let[t,n]of Object.entries(e.marks))r[t]=n.spec;return{nodes:t,marks:r}}(e.schema);this.addSchema(e.schema,t,r);return}let c=i&&t[N.Block].includes(i)?{doc:ei(),[i]:ei()}:ei(),d=ei(),u=function(e){let{settings:t,gatheredSchemaAttributes:r,nodeNames:n,markNames:o,tags:i}=e,s=ei();if(t.disableExtraAttributes)return s;for(let e of[...r,...t.extraAttributes??[]]??[])for(let t of function(e){let{identifiers:t,nodeNames:r,markNames:n,tags:o}=e;if("nodes"===t)return r;if("marks"===t)return n;if("all"===t)return[...r,...n];if(ev(t))return t;eF(ef(t)&&ev(t.tags),{code:L.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});let{tags:i=[],names:s=[],behavior:a="any",excludeNames:l,excludeTags:c,type:d}=t,u=new Set,h="mark"===d?n:"node"===d?r:[...n,...r],p=e=>h.includes(e)&&!(null==l?void 0:l.includes(e));for(let e of s)p(e)&&u.add(e);let f=new Map;for(let e of i)if(null==c||!c.includes(e))for(let t of o[e]){if(!p(t))continue;if("any"===a){u.add(t);continue}let r=f.get(t)??new Set;r.add(e),f.set(t,r)}for(let[e,t]of f)t.size===i.length&&u.add(e);return[...u]}({identifiers:e.identifiers,nodeNames:n,markNames:o,tags:i})){let r=s[t]??{};s[t]={...r,...e.attributes}}return s}({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:n,markNames:r,tags:t});for(let e of o){u[e.name]={...u[e.name],...e.options.extraAttributes};let t=!0===s||!0===e.options.disableExtraAttributes||!0===e.constructor.disableExtraAttributes;if(a0(e)){let{spec:r,dynamic:n}=lv({createExtensionSpec:(t,r)=>e.createNodeSpec(t,r),extraAttributes:Z(u,e.name),override:{...a,...e.options.nodeOverride},ignoreExtraAttributes:t,name:e.constructorName,tags:e.tags});e.spec=r,c[e.name]=r,Object.keys(n).length>0&&(this.dynamicAttributes.nodes[e.name]=n)}if(a1(e)){let{spec:r,dynamic:n}=lv({createExtensionSpec:(t,r)=>e.createMarkSpec(t,r),extraAttributes:Z(u,e.name),override:{...l,...e.options.markOverride},ignoreExtraAttributes:t,name:e.constructorName,tags:e.tags??[]});e.spec=r,d[e.name]=r,Object.keys(n).length>0&&(this.dynamicAttributes.marks[e.name]=n)}}let h=new tm({nodes:c,marks:d,topNode:"doc"});this.addSchema(h,c,d)}createPlugin(){return{appendTransaction:(e,t,r)=>{let{tr:n}=r;return e.some(e=>e.docChanged)&&(0!==Object.keys(this.dynamicAttributes.nodes).length||0!==Object.keys(this.dynamicAttributes.marks).length)?(n.doc.descendants((e,t)=>(this.checkAndUpdateDynamicNodes(e,t,n),this.checkAndUpdateDynamicMarks(e,t,n),!0)),n.steps.length>0?n:null):null}}}addSchema(e,t,r){for(let n of(this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",r),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",sb(e).name),Object.values(e.nodes)))if("doc"!==n.name&&(n.isBlock||n.isTextblock))break}checkAndUpdateDynamicNodes(e,t,r){for(let[n,o]of et(this.dynamicAttributes.nodes))if(e.type.name===n)for(let[n,i]of et(o)){if(!em(e.attrs[n]))continue;let o={...e.attrs,[n]:i(e)};r.setNodeMarkup(t,void 0,o),iZ(r)}}checkAndUpdateDynamicMarks(e,t,r){for(let[n,o]of et(this.dynamicAttributes.marks)){let i=Z(this.store.schema.marks,n),s=e.marks.find(e=>e.type.name===n);if(s)for(let[e,n]of et(o)){if(!em(s.attrs[e]))continue;let o=sS(r.doc.resolve(t),i);if(!o)continue;let{from:a,to:l}=o,c=i.create({...s.attrs,[e]:n(s)});r.removeMark(a,l,i).addMark(a,l,c),iZ(r)}}}gatherExtraAttributes(e){let t=[];for(let r of e)r.createSchemaAttributes&&t.push(...r.createSchemaAttributes());return t}};function lv(e){var t,r,n,o,i,s,a,l,c;let{createExtensionSpec:d,extraAttributes:u,ignoreExtraAttributes:h,name:p,tags:f,override:m}=e,g=ei(),y=!1,w=(r=u,n=h,o=function(){y=!0},i=function(e,t){g[e]=t},()=>{o();let e=ei();if(n)return e;for(let[t,n]of et(r)){let r=lb(n).default;ep(r)&&(i(t,r),r=null),e[t]=void 0===r?{}:{default:r}}return e}),v=d({defaults:w,parse:(s=u,a=h,e=>{let t=ei();if(a)return t;for(let[r,n]of et(s)){let{parseDOM:o,...i}=lb(n);if(i6(e)){if(em(o)){t[r]=e.getAttribute(r)??i.default;continue}if(ep(o)){t[r]=o(e)??i.default;continue}t[r]=e.getAttribute(o)??i.default}}return t}),dom:(l=u,c=h,e=>{let t=ei();if(c)return t;function r(r,n){if(r){if(eu(r)){t[n]=r;return}if(ev(r)){let[o,i]=r;t[o]=i??e.attrs[n];return}for(let[e,n]of et(r))t[e]=n}}for(let[o,i]of et(l)){let{toDOM:s,parseDOM:a}=lb(i);if(em(s)){t[eu(a)?a:o]=e.attrs[o];continue}if(ep(s)){var n;r(s(e.attrs,su(n=e)?{node:n}:sp(n)?{mark:n}:{}),o);continue}r(s,o)}return t})},m);
6return eF(h||y,{code:L.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${p}' to 'true'.`}),v.group=[...(null==(t=v.group)?void 0:t.split(" "))??[],...f].join(" ")||void 0,{spec:v,dynamic:g}}function lb(e){return eu(e)||ep(e)?{default:e}:(eF(e,{message:`${es(e)} is not supported`,code:L.EXTENSION_EXTRA_ATTRIBUTES}),e)}lw=aI([a2({defaultPriority:D.Highest})],lw);var lM=class extends aJ{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(e&&(null==(t=this.store.managerSettings.exclude)||!t.suggesters))return iX(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>iX(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>iQ(this.store.getState(),e))}createExternalPlugins(){var e,t;let r=[];for(let n of this.store.extensions){if(null==(e=this.store.managerSettings.exclude)?void 0:e.suggesters)break;if(!n.createSuggesters||(null==(t=n.options.exclude)?void 0:t.suggesters))continue;let o=n.createSuggesters(),i=ev(o)?o:[o];r.push(...i)}return[i0(...r)]}getSuggestState(e){return iY(e??this.store.getState())}getSuggestMethods(){let{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:r,ignoreNextExit:n,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:s,setLastChangeFromAppend:a}}isSuggesterActive(e){var t;return eo(ev(e)?e:[e],null==(t=this.getSuggestState().match)?void 0:t.suggester.name)}};aI([a9()],lM.prototype,"getSuggestState",1),aI([a9()],lM.prototype,"getSuggestMethods",1),aI([a9()],lM.prototype,"isSuggesterActive",1),lM=aI([a2({customHandlerKeys:["suggester"]})],lM);var lx=class extends aJ{constructor(){super(...arguments),this.allTags=ei(),this.plainTags=ei(),this.markTags=ei(),this.nodeTags=ei()}get name(){return"tags"}onCreate(){for(let e of(this.resetTags(),this.store.extensions))this.updateTagForExtension(e);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){let e=ei(),t=ei(),r=ei(),n=ei();for(let o of en(N))e[o]=[],t[o]=[],r[o]=[],n[o]=[];this.allTags=e,this.plainTags=t,this.markTags=r,this.nodeTags=n}updateTagForExtension(e){var t,r,n;let o=new Set([...e.tags??[],...(null==(t=e.createTags)?void 0:t.call(e))??[],...e.options.extraTags??[],...(null==(r=this.store.managerSettings.extraTags)?void 0:r[e.name])??[]]);for(let t of o){eF((n=t,eo(en(N),n)),{code:L.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[t].push(e.name),aQ(e)&&this.plainTags[t].push(e.name),a1(e)&&this.markTags[t].push(e.name),a0(e)&&this.nodeTags[t].push(e.name)}e.tags=[...o]}};lx=aI([a2({defaultPriority:D.Highest})],lx);var lS=new rC("remirrorFilePlaceholderPlugin"),lk=class extends aJ{get name(){return"upload"}createExternalPlugins(){let e;return[e=new rk({key:lS,state:{init:()=>({set:o9.empty,payloads:new Map}),apply(t,{set:r,payloads:n}){r=r.map(t.mapping,t.doc);let o=t.getMeta(e);if(o)if(0===o.type){let e=document.createElement("placeholder"),i=o1.widget(o.pos,e,{id:o.id});r=r.add(t.doc,[i]),n.set(o.id,o.payload)}else 1===o.type&&(r=r.remove(r.find(void 0,void 0,e=>e.id===o.id)),n.delete(o.id));return{set:r,payloads:n}}},props:{decorations(t){var r;return(null==(r=e.getState(t))?void 0:r.set)??null}}})]}},lE=class extends aJ{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),this.options.capture)for(let e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){let t=e.decoratedCommands??{},r=e.createCommands;for(let r of Object.keys(t)){let t=e[r];e[r]=(...n)=>o=>{var i;let s=t(...n)(o);return o.dispatch&&s&&this.setCommandMeta(o.tr,{type:"command",chain:o.dispatch!==(null==(i=o.view)?void 0:i.dispatch),name:r,extension:e.name,decorated:!0}),s}}r&&(e.createCommands=()=>{let t=r();for(let[r,n]of Object.entries(t))t[r]=(...t)=>o=>{var i;let s=n(...t)(o);return o.dispatch&&s&&this.setCommandMeta(o.tr,{type:"command",chain:o.dispatch!==(null==(i=o.view)?void 0:i.dispatch),name:r,extension:e.name,decorated:!1}),s};return t})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){let r=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...r,t])}};lE=aI([a2({defaultOptions:{capture:i4.isDevelopment}
6,staticKeys:["capture"],defaultPriority:D.Highest})],lE);var l_=class{constructor(e){aj(this,l,ek()),aj(this,c,void 0),aj(this,d,void 0),aj(this,u,!0),aj(this,h,aT()),aj(this,p,void 0),aj(this,f,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=e=>{var t,r;eF(!this.manager.destroyed,{code:L.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),e=(null==(r=(t=this.props).onDispatchTransaction)?void 0:r.call(t,e,this.getState()))??e;let n=this.getState(),{state:o,transactions:i}=n.applyTransaction(e);aF(this,d,n),this.updateState({state:o,tr:e,transactions:i});let s=this.manager.store.getForcedUpdates(e);eb(s)||this.updateViewProps(...s)},this.onChange=(e=ei())=>{var t,r;let n=this.eventListenerProps(e);aL(this,u)&&aF(this,u,!1),null==(r=(t=this.props).onChange)||r.call(t,n)},this.onBlur=e=>{var t,r;let n=this.eventListenerProps();null==(r=(t=this.props).onBlur)||r.call(t,n,e),aL(this,h).emit("blur",n,e)},this.onFocus=e=>{var t,r;let n=this.eventListenerProps();null==(r=(t=this.props).onFocus)||r.call(t,n,e),aL(this,h).emit("focus",n,e)},this.setContent=(e,{triggerChange:t=!1}={})=>{let{doc:r}=this.manager.createState({content:e}),n=this.getState(),{state:o}=this.getState().applyTransaction(n.tr.replaceRangeWith(0,n.doc.nodeSize-2,r));if(t)return this.updateState({state:o,triggerChange:t});this.view.updateState(o)},this.clearContent=({triggerChange:e=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:e})},this.createStateFromContent=(e,t)=>this.manager.createState({content:e,selection:t}),this.focus=e=>{this.manager.store.commands.focus(e)},this.blur=e=>{this.manager.store.commands.blur(e)};const{getProps:t,initialEditorState:r,element:n}=e;if(aF(this,c,t),aF(this,f,r),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(r,n);this.manager.addView(o)}get addHandler(){return aL(this,p)??aF(this,p,aL(this,h).on.bind(aL(this,h)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return aL(this,u)}get props(){return aL(this,c).call(this)}get previousState(){return this.previousStateOverride??aL(this,d)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return aL(this,l)}get initialEditorState(){return aL(this,f)}updateListener(e){let{state:t,tr:r}=e;return aL(this,h).emit("updated",this.eventListenerProps({state:t,tr:r}))}update(e){let{getProps:t}=e;return aF(this,c,t),this}updateViewProps(...e){let t=(0,sq.default)(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;let{attributes:r,autoFocus:n,classNames:o=[],label:i,editable:s}=this.props,a=null==(t=this.manager.store)?void 0:t.attributes,l=ep(r)?r(this.eventListenerProps()):r,c={};(n||eh(n))&&(c=e?{autoFocus:!0}:{autofocus:"true"});let d=eC(aH(e&&"Prosemirror","remirror-editor",null==a?void 0:a.class,...o).split(" ")).join(" ");return eE({...{role:"textbox",...c,"aria-multiline":"true",...!(s??!0)?{"aria-readonly":"true"}:{},"aria-label":i??"",...a,class:d},...l})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){aL(this,h).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=ei()){let{state:t,tr:r,transactions:n}=e;return{tr:r,transactions:n,internalUpdate:!r,view:this.view,firstRender:aL(this,u),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:aL(this,l),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap;var lC=class{constructor(e,t={}){aj(this,m,void 0),aj(this,g,ei()),aj(this,y,ei()),aj(this,w,void 0),aj(this,v,void 0),aj(this,b,I.None),aj(this,M,void 0),aj(this,x,!0),aj(this,S,{create:[],view:[],update:[],destroy:[]}),aj(this,k,[]),aj(this,E,aT()),aj(this,_,void 0),aj(this,C,void 0),this.get
6State=()=>{var e;return aL(this,b)>=I.EditorView?this.view.state:(eF(aL(this,_),{code:L.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),null==(e=aL(this,_))?void 0:e.initialEditorState)},this.updateState=e=>{let t=this.getState();this.view.updateState(e),this.onStateUpdate({previousState:t,state:e})};const{extensions:r,extensionMap:n}=function(e,t){let r=[],n=new WeakMap,o=new WeakMap,i=[],s={duplicateMap:o,parentExtensions:[],gatheredExtensions:i,settings:t};for(let t of e)!function e(t,r){var n;let{gatheredExtensions:o,duplicateMap:i,parentExtensions:s,settings:a}=t,{extension:l,parentExtension:c}=r,{names:d=[]}=r;eF(aZ(l),{code:L.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${l} was provided to the [[\`RemirrorManager\`]].`});let u=l.extensions;if(l.setPriority(null==(n=a.priority)?void 0:n[l.name]),o.push(l),function(e){let{duplicateMap:t,extension:r,parentExtension:n}=e,o=r.constructor,i=t.get(o),s=n?[n]:[];t.set(o,i?[...i,...s]:s)}({duplicateMap:i,extension:l,parentExtension:c}),0!==u.length){if(d.includes(l.name))return void aN(!1,`Circular dependency encountered when loading extensions: ${d.join(" > ")} > ${l.name}`);for(let r of(d=[...d,l.name],s.push(l),u))e(t,{names:d,extension:r,parentExtension:l})}}(s,{extension:t});i=eN(i,(e,t)=>t.priority-e.priority);let a=new WeakSet,l=new Set;for(let e of i){let t=e.constructor,i=e.name,s=o.get(t);eF(s,{message:`No entries were found for the ExtensionConstructor ${e.name}`,code:L.INTERNAL}),a.has(t)||l.has(i)||(a.add(t),l.add(i),r.push(e),n.set(t,e),s.forEach(r=>null==r?void 0:r.replaceChildExtension(t,e)))}let c=[];for(let e of r)!function(e){let{extension:t,found:r,missing:n}=e;if(t.requiredExtensions)for(let e of t.requiredExtensions??[])r.has(e)||n.push({Constructor:e,extension:t})}({extension:e,found:a,missing:c});return eF(eb(c),{code:L.MISSING_REQUIRED_EXTENSION,message:c.map(({Constructor:e,extension:t})=>`The extension '${t.name}' requires '${e.name} in order to run correctly.`).join("\n")}),{extensions:r,extensionMap:n}}(e,t);for(const e of(aF(this,M,t),aF(this,w,eV(r)),aF(this,v,n),aF(this,m,this.createExtensionStore()),aF(this,b,I.Create),this.setupLifecycleHandlers(),aL(this,S).create)){const t=e();t&&aL(this,k).push(t)}}static create(e,t={}){return new lC([...eI(e),...function(e={}){e={...{exitMarksOnArrowPress:lc.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:lc.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:lc.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:lc.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:lr.defaultOptions.persistentSelectionClass},...e};let t=(0,sq.default)(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=(0,sq.default)(e,["persistentSelectionClass"]);return[new lx,new lw,new a3,new ly,new ll,new lg,new lm,new lM,new a7,new la,new lc(t),new ls,new lk,new lr(r)]}(t.builtin)],t)}get[P](){return R.Manager}get destroyed(){return aL(this,b)===I.Destroy}get mounted(){return aL(this,b)>=I.EditorView&&aL(this,b)<I.Destroy}get output(){var e;return null==(e=aL(this,_))?void 0:e.frameworkOutput}get frameworkAttached(){return!!aL(this,_)}get extensions(){return aL(this,w)}get stringHandlers(){return aL(this,g)}get store(){return eV(aL(this,y))}get extensionStore(){return eV(aL(this,m))}get tr(){return this.getExtension(a7).transaction}get nodes(){return aL(this,y).nodes}get marks(){return aL(this,y).marks}get schema(){return aL(this,y).schema}get extensionTags(){return aL(this,y).tags}get view(){return aL(this,y).view}get settings(){return aL(this,M)}get document(){return aL(this,M).document??sO()}setupLifecycleHandlers(){let e=aL(this,m),t=aL(this,S),r=[],n=[],o=[];for(let i of(e.nodeNames=r,e.markNames=n,e.plainNames=o,aL(this,w)))!function(e){var t,r,n,o;let{extension:i,nodeNames:s,markNames:a,plainNames:l,store:c,handlers:d}=e;i.setStore(c);let u=null==(t=i.onCreate)?void 0:t.bind(i),h=null==(r=i.onView)?void 0:r.bind(i),p=null==(n=i.onStateUpdate)?void 0:n.bind(i),f=null==(o=i.onDestroy)?void 0:o.bind(i);u&&d.create.push(u),h&&d.view.push(h),p&&d.update.push(p),f&&d.destroy.push(f),a1(i)&&a.push(i.name),a0(i)&&"doc"!==i.name&&s.push(i.name),aQ(i)&&l.push(i.name)}({extension:i,nodeNames:r,markNames:n,plainNames:o,handlers:t,store:e})}setStringHandler(e,t){aL(this,g)[e]=t}setStoreKey(e,t){aL(this,y)[e]=t}getStoreKey(e){let t=aL(this,y)[e];return eF(!em(t),{code:L.MANAGER_PHASE_ERROR,message:"`getStoreKey` should not be called before the values are available."}),t}setExtensionStore(e,t){eF(aL(this,b)<=I.EditorView,{code:L.MANAGER_PHASE_ERROR,message:"`setExtensionStore` should only be called during the `onCreate` lifecycle hook. Make sure to only call it within the returned methods."}),aL(this,m)[e]=t}createExtensionStore(){let e,t,r=ei();return Object.defineProperties(r,{extensions:{get:()=>aL(this,w),enumerable:!0},phase:{get:()=>aL(this,b),enumerable:!0},view:{get:()=>this.view,enumerable:!0},managerSettings:{get:()=>eV(aL(this,M)),enumerable:!0},getState:{value:this.getState,enumerable:!0},updateState:{value:this.updateState,enumerable:!0},isMounted:{value:()=>this.mounted,enumerable:!0},getExtension:{value:this.getExtension.bind(this),enumerable:!0},manager:{get:()=>this,enumerable:!0},document:{get:()=>this.document,enumerable:!0},stringHandlers:{get:()=>aL(this,g),enumerable:!0},currentState:{get:()=>e??(e=this.getState()),set:t=>{e=t},enumerable:!0},previousState:{get:()=>t,set:e=>{t=e},enumerable:!0}}),r.getStoreKey=this.getStoreKey.bind(this),r.setStoreKey=this.setStoreKey.bind(this),r.setExtensionStore=this.setExtensionStore.bind(this),r.setStringHandler=this.setStringHandler.bind(this),r}addView(e){if(aL(this,b)>=I.EditorView)return this;for(let t of(aF(this,x,!0),aF(this,b,I.EditorView),aL(this,y).view=e,aL(this,S).view)){let r=t(e);r&&aL(this,k).push(r)}return this}attachFramework(e,t){var r;aL(this,_)!==e&&(aL(this,_)&&(aL(this,_).destroy(),null==(r=aL(this,C))||r.call(this)),aF(this,_,e),aF(this,C,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;let t=null==(e=this.schema.nodes.doc)?void 0:e.createAndFill();return eF(t,{code:L.INVALID_CONTENT,message:"An empty node could not be created due to an invali
6d schema."}),t}createState(e={}){let{onError:t,defaultSelection:r="end"}=this.settings,{content:n=this.createEmptyDoc(),selection:o=r,stringHandler:i=this.settings.stringHandler}=e,{schema:s,plugins:a}=this.store,l=sC({stringHandler:eu(i)?this.stringHandlers[i]:i,document:this.document,content:n,onError:t,schema:s,selection:o});return rS.create({schema:s,doc:l,plugins:a,selection:s_(o,l)})}addHandler(e,t){return aL(this,E).on(e,t)}onStateUpdate(e){let t=aL(this,x);aL(this,m).currentState=e.state,aL(this,m).previousState=e.previousState,t&&(aF(this,b,I.Runtime),aF(this,x,!1));let r={...e,firstUpdate:t};for(let e of aL(this,S).update)e(r);aL(this,E).emit("stateUpdate",r)}getExtension(e){let t=aL(this,v).get(e);return eF(t,{code:L.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!aL(this,v).get(e)}clone(){let e=aL(this,w).map(e=>e.clone(e.options)),t=lC.create(()=>e,aL(this,M));return aL(this,E).emit("clone",t),t}recreate(e=[],t={}){let r=aL(this,w).map(e=>e.clone(e.initialOptions)),n=lC.create(()=>[...r,...e],t);return aL(this,E).emit("recreate",n),n}destroy(){var e,t,r,n,o,i;for(let n of(aF(this,b,I.Destroy),(null==(e=this.view)?void 0:e.state.plugins)??[]))null==(r=null==(t=n.getState(this.view.state))?void 0:t.destroy)||r.call(t);for(let e of(null==(n=aL(this,_))||n.destroy(),null==(o=aL(this,C))||o.call(this),aL(this,k)))e();for(let e of aL(this,S).destroy)e();null==(i=this.view)||i.destroy(),aL(this,E).emit("destroy")}includes(e){let t=[],r=[];for(let e of aL(this,w))t.push(e.name,e.constructorName),r.push(e.constructor);return e.every(e=>eu(e)?eo(t,e):eo(r,e))}};m=new WeakMap,g=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,b=new WeakMap,M=new WeakMap,x=new WeakMap,S=new WeakMap,k=new WeakMap,E=new WeakMap,_=new WeakMap,C=new WeakMap,e.s(["DocChangedExtension",0,ls,"Framework",0,l_,"InputRulesExtension",0,ll,"KeymapExtension",0,lc,"MarkExtension",0,aG,"NodeExtension",0,aY,"PlainExtension",0,aJ,"PluginsExtension",0,ly,"RemirrorManager",0,lC,"SuggestExtension",0,lM,"command",0,a4,"cx",0,aH,"extension",0,a2,"helper",0,a9,"isNodeExtension",0,a0,"isRemirrorManager",0,function(e,t){return!!sl(e)&&!!sc(e,R.Manager)&&(!t||e.includes(t))},"keyBinding",0,a5,"toggleMark",0,a8],91155)},155691,e=>{"use strict";var t=e.i(350219),r=e.i(812121),n=e.i(91155),o=e.i(964892);try{var i="u">typeof window?window:e.g;i._sentryModuleMetadata=i._sentryModuleMetadata||{},i._sentryModuleMetadata[(new i.Error).stack]=Object.assign({},i._sentryModuleMetadata[(new i.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?a(t,r):t,l=e.length-1;l>=0;l--)(o=e[l])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&s(t,r,i),i},c=class extends n.PlainExtension{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(n,i)=>{let s=function(e,t){let r=t.target;if(r){let t,n=null===(t=e.docView.posFromDOM(r,0,void 0))||t<0?null:t;if(null!==n){let t=e.state.doc.resolve(n),r=+!t.node().isLeaf;return{pos:n,inside:t.start()-r}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}(n,i);if(!s)return!1;let a=[],l=[],{inside:c,pos:d}=s;if(-1===c)return!1;let u=n.state.doc.resolve(d),h=u.depth+1;for(let e of(0,t.range)(h,1))a.push({node:e>u.depth&&u.nodeAfter?u.nodeAfter:u.node(e),pos:u.before(e)});for(let{type:e}of u.marksAcross(u)??[]){let t=(0,o.getMarkRange)(u,e);t&&l.push(t)}return e(i,{view:n,nodes:a,marks:l,getMark:e=>{let o=(0,t.isString)(e)?n.state.schema.marks[e]:e;return(0,t.invariant)(o,{code:r.ErrorConstant.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),l.find(e=>e.mark.type===o)},getNode:e=>{var o;let i=(0,t.isString)(e)?n.state.schema.nodes[e]:e;(0,t.invariant)(i,{code:r.ErrorConstant.EXTENSION,message:"The node being checked does not exist"});let s=a.find(({node:e})=>e.type===i);if(s)return{...s,isRoot:!!(null==(o=a[0])?void 0:o.node.eq(s.node))}}})}}get name(){return"events"}onView(){var e,r;if(null==(e=this.store.managerSettings.exclude)||!e.clickHandler)for(let e of this.store.extensions){if(!e.createEventHandlers||(null==(r=e.options.exclude)?void 0:r.clickHandler))continue;let n=e.createEventHandlers();for(let[e,r]of(0,t.entries)(n))this.addHandler(e,r)}}createPlugin(){let e=new WeakMap,n=(n,i,s,a,l,c,d,u)=>{let h=this.store.currentState,{schema:p,doc:f}=h,m=f.resolve(a),g=e.has(d),y=function(e){let{handled:n,view:i,$pos:s,state:a}=e,l={getMark:t.noop,markRanges:[],view:i,state:a};if(n)return l;for(let{type:e}of s.marksAcross(s)??[]){let t=(0,o.getMarkRange)(s,e);t&&l.markRanges.push(t)}return l.getMark=e=>{let n=(0,t.isString)(e)?a.schema.marks[e]:e;return(0,t.invariant)(n,{code:r.ErrorConstant.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),l.markRanges.find(e=>e.mark.type===n)},l}({$pos:m,handled:g,view:s,state:h}),w=!1;g||(w=n(d,y)||w);let v={...y,pos:a,direct:u,nodeWithPosition:{node:l,pos:c},getNode:e=>{let n=(0,t.isString)(e)?p.nodes[e]:e;return(0,t.invariant)(n,{code:r.ErrorConstant.EXTENSION,message:"The node being checked does not exist"}),n===l.type?{node:l,pos:c}:void 0}};return e.set(d,!0),i(d,v)||w};return{props:{handleKeyPress:(e,t)=>this.options.keypress(t)||!1,handleKeyDown:(e,t)=>this.options.keydown(t)||!1,handleTextInput:(e,t,r,n)=>this.options.textInput({from:t,to:r,text:n})||!1,handleClickOn:(e,t,r,o,i,s)=>n(this.options.clickMark,this.options.click,e,t,r,o,i,s),handleDoubleClickOn:(e,t,r,o,i,s)=>n(this.options.doubleClickMark,this.options.doubleClick,e,t,r,o,i,s),handleTripleClickOn:(e,t,r,o,i,s)=>n(this.options.tripleClickMark,this.options.tripleClick,e,t,r,o,i,s),handleDOMEvents:{focu
6s:(e,t)=>this.options.focus(t)||!1,blur:(e,t)=>this.options.blur(t)||!1,mousedown:(e,t)=>(this.startMouseover(),this.options.mousedown(t)||!1),mouseup:(e,t)=>(this.endMouseover(),this.options.mouseup(t)||!1),mouseleave:(e,t)=>(this.mouseover=!1,this.options.mouseleave(t)||!1),mouseenter:(e,t)=>(this.mouseover=!0,this.options.mouseenter(t)||!1),keyup:(e,t)=>this.options.keyup(t)||!1,mouseout:this.createMouseEventHandler((e,t)=>{let r={...t,hovering:!1};return this.options.hover(e,r)||!1}),mouseover:this.createMouseEventHandler((e,t)=>{let r={...t,hovering:!0};return this.options.hover(e,r)||!1}),contextmenu:this.createMouseEventHandler((e,t)=>this.options.contextmenu(e,t)||!1),scroll:(e,t)=>this.options.scroll(t)||!1,copy:(e,t)=>this.options.copy(t)||!1,cut:(e,t)=>this.options.cut(t)||!1,paste:(e,t)=>this.options.paste(t)||!1}},view:e=>{let t=e.editable,r=this.options;return{update(e){let n=e.editable;n!==t&&(r.editable(n),t=n)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,this.mousedown||(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};l([(0,n.helper)()],c.prototype,"isInteracting",1),c=l([(0,n.extension)({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:r.ExtensionPriority.High})],c),e.s(["EventsExtension",0,c])},93379,785349,833965,645689,751959,96996,e=>{"use strict";var t,r,n,o,i,s,a,l,c,d,u,h,p,f,m,g,y,w,v,b,M,x,S,k=e.i(999161),E=e.i(812121),_=e.i(350219),C=e.i(91155),O=e.i(847563);e.i(121247);var T=e.i(409432),A=e.i(842685),N=e.i(155691),P=C;try{var R="u">typeof window?window:e.g;R._sentryModuleMetadata=R._sentryModuleMetadata||{},R._sentryModuleMetadata[(new R.Error).stack]=Object.assign({},R._sentryModuleMetadata[(new R.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var D=e.i(169444),I=e.i(237336),B=e.i(711379),L=e.i(140644);try{var j="u">typeof window?window:e.g;j._sentryModuleMetadata=j._sentryModuleMetadata||{},j._sentryModuleMetadata[(new j.Error).stack]=Object.assign({},j._sentryModuleMetadata[(new j.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}class F extends I.Selection{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return F.valid(r)?new F(r):I.Selection.near(r)}content(){return B.Slice.empty}eq(e){return e instanceof F&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new F(e.resolve(t.pos))}getBookmark(){return new V(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(0==r){if(n.type.spec.isolating)return!0;continue}for(let e=n.child(r-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||z(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let e=n.child(r);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||z(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let r=t.type.spec.allowGapCursor;if(null!=r)return r;let n=t.contentMatchAt(e.index()).defaultType;return n&&n.isTextblock}static findGapCursorFrom(e,t,r=!1){n:for(;;){if(!r&&F.valid(e))return e;let n=e.pos,o=null;for(let r=e.depth;;r--){let i=e.node(r);if(t>0?e.indexAfter(r)<i.childCount:e.index(r)>0){o=i.child(t>0?e.indexAfter(r):e.index(r)-1);break}if(0==r)return null;n+=t;let s=e.doc.resolve(n);if(F.valid(s))return s}for(;;){let i=t>0?o.firstChild:o.lastChild;
6if(!i){if(o.isAtom&&!o.isText&&!I.NodeSelection.isSelectable(o)){e=e.doc.resolve(n+o.nodeSize*t),r=!1;continue n}break}o=i,n+=t;let s=e.doc.resolve(n);if(F.valid(s))return s}return null}}}F.prototype.visible=!1,F.findFrom=F.findGapCursorFrom,I.Selection.jsonID("gapcursor",F);class V{constructor(e){this.pos=e}map(e){return new V(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return F.valid(t)?new F(t):I.Selection.near(t)}}function z(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let K=(0,D.keydownHandler)({ArrowLeft:$("horiz",-1),ArrowRight:$("horiz",1),ArrowUp:$("vert",-1),ArrowDown:$("vert",1)});function $(e,t){let r="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,n,o){let i=e.selection,s=t>0?i.$to:i.$from,a=i.empty;if(i instanceof I.TextSelection){if(!o.endOfTextblock(r)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=F.findGapCursorFrom(s,t,a);return!!l&&(n&&n(e.tr.setSelection(new F(l))),!0)}}function H(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!F.valid(n))return!1;let o=e.posAtCoords({left:r.clientX,top:r.clientY});return!(o&&o.inside>-1&&I.NodeSelection.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new F(n))),!0)}function U(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof F))return!1;let{$from:r}=e.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let o=B.Fragment.empty;for(let e=n.length-1;e>=0;e--)o=B.Fragment.from(n[e].createAndFill(null,o));let i=e.state.tr.replace(r.pos,r.pos,new B.Slice(o,0,0));return i.setSelection(I.TextSelection.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function W(e){if(!(e.selection instanceof F))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",L.DecorationSet.create(e.doc,[L.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}try{var q="u">typeof window?window:e.g;q._sentryModuleMetadata=q._sentryModuleMetadata||{},q._sentryModuleMetadata[(new q.Error).stack]=Object.assign({},q._sentryModuleMetadata[(new q.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var J=class extends P.PlainExtension{get name(){return"gapCursor"}createExternalPlugins(){return[new I.Plugin({props:{decorations:W,createSelectionBetween:(e,t,r)=>t.pos==r.pos&&F.valid(r)?new F(r):null,handleClick:H,handleKeyDown:K,handleDOMEvents:{beforeinput
6:U}}})]}};J=((e,t)=>{for(var r,n=t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=r(n)||n);return n})([(0,P.extension)({})],J),(0,_.isInstanceOf)(F);var G=C,Y=e.i(964892),X=e.i(246208),Z=e.i(546754);try{var Q="u">typeof window?window:e.g;Q._sentryModuleMetadata=Q._sentryModuleMetadata||{},Q._sentryModuleMetadata[(new Q.Error).stack]=Object.assign({},Q._sentryModuleMetadata[(new Q.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}e.s([],785349);try{var ee="u">typeof window?window:e.g;ee._sentryModuleMetadata=ee._sentryModuleMetadata||{},ee._sentryModuleMetadata[(new ee.Error).stack]=Object.assign({},ee._sentryModuleMetadata[(new ee.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var et=function(){};et.prototype.append=function(e){return e.length?(e=et.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},et.prototype.prepend=function(e){return e.length?et.from(e).append(this):this},et.prototype.appendInner=function(e){return new en(this,e)},et.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?et.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},et.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},et.prototype.forEach=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},et.prototype.map=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length);var n=[];return this.forEach(function(t,r){return n.push(e(t,r))},t,r),n},et.from=function(e){return e instanceof et?e:e&&e.length?new er(e):et.empty};var er=function(e){function t(t){e.call(this),this.values=t}t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,r){return 0==e&&r==this.length?this:new t(this.values.slice(e,r))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,r,n){for(var o=t;o<r;o++)if(!1===e(this.values[o],n+o))return!1},t.prototype.forEachInvertedInner=function(e,t,r,n){for(var o=t-1;o>=r;o--)if(!1===e(this.values[o],n+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t}(et);et.empty=new er([]);var en=function(e){function t(t,r){e.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,r,n){var o=this.left.length;if(t<o&&!1===this.left.forEachInner(e,t,Math.min(r,o),n)||r>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,r)-o,n+o))return!1},t.prototype.forEachInvertedInner=function(e,t,r,n){var o=this.left.length;if(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(r,o)-o,n+o)||r<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),r,n))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var r=this.left.length;return t<=r?this.left.slice(e,t):e>=r?this.right.slice(e-r,t-r):this.left.slice(e,r).append(this.right.slice(0,t-r))},t.prototype.leafAppend=function(e){var r=this.right.leafAppend(e);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(e){var r=this.left.leafPrepend(e);if(r)return new t(r,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(et),eo=e.i(713249);try{var ei="u">typeof window?window:e.g;ei._sentryModuleMetadata=ei._sentryModuleMetadata||{},ei._sentryModuleMetadata[(new ei.Error).stack]=Object.assign({},ei._sentryModuleMetadata[(new ei.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}class es{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let r,n,o,i;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(n=(r=this.remapping(s,this.items.length)).maps.length);let a=e.tr,l=[],c=[];
6return this.items.forEach((e,t)=>{if(!e.step){r||(n=(r=this.remapping(s,t+1)).maps.length),n--,c.push(e);return}if(r){c.push(new ea(e.map));let t=e.step.map(r.slice(n)),o;t&&a.maybeStep(t).doc&&(o=a.mapping.maps[a.mapping.maps.length-1],l.push(new ea(o,void 0,void 0,l.length+c.length))),n--,o&&r.appendMap(o,n)}else a.maybeStep(e.step);if(e.selection)return o=r?e.selection.map(r.slice(n)):e.selection,i=new es(this.items.slice(0,s).append(c.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:i,transform:a,selection:o}}addTransform(e,t,r,n){var o,i;let s,a=[],l=this.eventCount,c=this.items,d=!n&&c.length?c.get(c.length-1):null;for(let r=0;r<e.steps.length;r++){let o=e.steps[r].invert(e.docs[r]),i=new ea(e.mapping.maps[r],o,t),s;(s=d&&d.merge(i))&&(i=s,r?a.pop():c=c.slice(0,c.length-1)),a.push(i),t&&(l++,t=void 0),n||(d=i)}let u=l-r.depth;return u>ec&&(o=c,i=u,o.forEach((e,t)=>{if(e.selection&&0==i--)return s=t,!1}),c=o.slice(s),l-=u),new es(c.append(a),l)}remapping(e,t){let r=new eo.Mapping;return this.items.forEach((t,n)=>{let o=null!=t.mirrorOffset&&n-t.mirrorOffset>=e?r.maps.length-t.mirrorOffset:void 0;r.appendMap(t.map,o)},e,t),r}addMaps(e){return 0==this.eventCount?this:new es(this.items.append(e.map(e=>new ea(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],n=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},n);let a=t;this.items.forEach(t=>{let n=o.getMirror(--a);if(null==n)return;i=Math.min(i,n);let l=o.maps[n];if(t.step){let i=e.steps[n].invert(e.docs[n]),c=t.selection&&t.selection.map(o.slice(a+1,n));c&&s++,r.push(new ea(l,i,c))}else r.push(new ea(l))},n);let l=[];for(let e=t;e<i;e++)l.push(new ea(o.maps[e]));let c=new es(this.items.slice(0,n).append(l).append(r),s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-r.length)),c}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,n=[],o=0;return this.items.forEach((i,s)=>{if(s>=e)n.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(r)),s=e&&e.getMap();if(r--,s&&t.appendMap(s,r),e){let a=i.selection&&i.selection.map(t.slice(r));a&&o++;let l=new ea(s.invert(),e,a),c,d=n.length-1;(c=n.length&&n[d].merge(l))?n[d]=c:n.push(l)}}else i.map&&r--},this.items.length,0),new es(et.from(n.reverse()),o)}}es.empty=new es(et.empty,0);class ea{constructor(e,t,r,n){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=n}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ea(t.getMap().invert(),t,this.selection)}}}class el{constructor(e,t,r,n,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=n,this.prevComposition=o}}let ec=20;function ed(e){let t=[];for(let r=e.length-1;r>=0&&0==t.length;r--)e[r].forEach((e,r,n,o)=>t.push(n,o));return t}function eu(e,t){if(!e)return null;let r=[];for(let n=0;n<e.length;n+=2){let o=t.map(e[n],1),i=t.map(e[n+1],-1);o<=i&&r.push(o,i)}return r}let eh=!1,ep=null;function ef(e){let t=e.plugins;if(ep!=t){eh=!1,ep=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){eh=!0;break}}return eh}let em=new I.PluginKey("history"),eg=new I.PluginKey("closeHistory");function ey(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new I.Plugin({key:em,state:{init:()=>new el(es.empty,es.empty,null,0,-1),apply:(t,r,n)=>(function(e,t,r,n){let o=r.getMeta(em),i;if(o)return o.historyState;r.getMeta(eg)&&(e=new el(e.done,e.undone,null,0,-1));let s=r.getMeta("appendedTransaction");if(0==r.steps.length)return e;if(s&&s.getMeta(em))if(s.getMeta(em).redo)return new el(e.done.addTransform(r,void 0,n,ef(t)),e.undone,ed(r.mapping.maps),e.prevTime,e.prevComposition);else return new el(e.done,e.undone.addTransform(r,void 0,n,ef(t)),null,e.prevTime,e.prevComposition);if(!1===r.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))if(i=r.getMeta("rebased"))return new el(e.done.rebased(r,i),e.undone.rebased(r,i),eu(e.prevRanges,r.mapping),e.prevTime,e.prevComposition);else return new el(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),eu(e.prevRanges,r.mapping),e.prevTime,e.prevComposition);{let o=r.getMeta("composition"),i=0==e.prevTime||!s&&e.prevComposition!=o&&(e.prevTime<(r.time||0)-n.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;
6return e.mapping.maps[0].forEach((e,n)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&n>=t[o]&&(r=!0)}),r}(r,e.prevRanges)),a=s?eu(e.prevRanges,r.mapping):ed(r.mapping.maps);return new el(e.done.addTransform(r,i?t.selection.getBookmark():void 0,n,ef(t)),es.empty,a,r.time,null==o?e.prevComposition:o)}})(r,n,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,n="historyUndo"==r?ev:"historyRedo"==r?eb:null;return!!n&&!!e.editable&&(t.preventDefault(),n(e.state,e.dispatch))}}}})}function ew(e,t){return(r,n)=>{let o=em.getState(r);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(n){let i=function(e,t,r){let n=ef(t),o=em.get(t).spec.config,i=(r?e.undone:e.done).popEvent(t,n);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(r?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),o,n),l=new el(r?a:i.remaining,r?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(em,{redo:r,historyState:l})}(o,r,e);i&&n(t?i.scrollIntoView():i)}return!0}}let ev=ew(!1,!0),eb=ew(!0,!0);function eM(e){let t=em.getState(e);return t?t.done.eventCount:0}function ex(e){let t=em.getState(e);return t?t.undone.eventCount:0}ew(!1,!1),ew(!0,!1),e.s(["history",0,ey,"redo",0,eb,"redoDepth",0,ex,"undo",0,ev,"undoDepth",0,eM],833965);try{var eS="u">typeof window?window:e.g;eS._sentryModuleMetadata=eS._sentryModuleMetadata||{},eS._sentryModuleMetadata[(new eS.Error).stack]=Object.assign({},eS._sentryModuleMetadata[(new eS.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var ek=Object.defineProperty,eE=Object.getOwnPropertyDescriptor,e_=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?eE(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&ek(t,r,i),i},eC=class extends G.PlainExtension{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:r,dispatch:n,view:o})=>{let{getState:i,getDispatch:s}=this.options,a=e((0,_.isFunction)(i)?i():r,(0,_.isFunction)(s)&&n?s():n,o);return null==t||t(a),a}}get name(){return"history"}createKeymap(){return{"Mod-y":Y.environment.isMac?()=>!1:this.wrapMethod(eb,this.options.onRedo),"Mod-z":this.wrapMethod(ev,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(eb,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(ev,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(eb,this.options.onRedo)(e)}createExternalPlugins(){let{depth:e,newGroupDelay:t}=this.options;return[ey({depth:e,newGroupDelay:t})]}undo(){return(0,X.nonChainable)(this.wrapMethod(ev,this.options.onUndo))}redo(){return(0,X.nonChainable)(this.wrapMethod(eb,this.options.onRedo))}undoDepth(e=this.store.getState()){return eM(e)}redoDepth(e=this.store.getState()){return ex(e)}};e_([(0,G.keyBinding)({shortcut:E.NamedShortcut.Undo,command:"und
6o"})],eC.prototype,"undoShortcut",1),e_([(0,G.keyBinding)({shortcut:E.NamedShortcut.Redo,command:"redo"})],eC.prototype,"redoShortcut",1),e_([(0,G.command)({disableChaining:!0,description:({t:e})=>e(Z.ExtensionHistoryMessages.UNDO_DESCRIPTION),label:({t:e})=>e(Z.ExtensionHistoryMessages.UNDO_LABEL),icon:"arrowGoBackFill"})],eC.prototype,"undo",1),e_([(0,G.command)({disableChaining:!0,description:({t:e})=>e(Z.ExtensionHistoryMessages.REDO_DESCRIPTION),label:({t:e})=>e(Z.ExtensionHistoryMessages.REDO_LABEL),icon:"arrowGoForwardFill"})],eC.prototype,"redo",1),e_([(0,G.helper)()],eC.prototype,"undoDepth",1),e_([(0,G.helper)()],eC.prototype,"redoDepth",1),eC=e_([(0,G.extension)({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],eC),e.s(["HistoryExtension",0,eC],645689);var eO=C;try{var eT="u">typeof window?window:e.g;eT._sentryModuleMetadata=eT._sentryModuleMetadata||{},eT._sentryModuleMetadata[(new eT.Error).stack]=Object.assign({},eT._sentryModuleMetadata[(new eT.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var eA=Object.defineProperty,eN=Object.getOwnPropertyDescriptor,eP=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?eN(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&eA(t,r,i),i},eR=class extends eO.NodeExtension{get name(){return"paragraph"}createTags(){return[E.ExtensionTag.LastNodeCompatible,E.ExtensionTag.TextBlock,E.ExtensionTag.Block,E.ExtensionTag.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:t=>({...e.parse(t)})},...t.parseDOM??[]],toDOM:t=>["p",e.dom(t),0]}}convertParagraph(e={}){let{attrs:t,selection:r,preserveAttrs:n}=e;return this.store.commands.setBlockNodeType.original(this.type,t,r,n)}insertParagraph(e,t={}){let{selection:r,attrs:n}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:r,attrs:n})}shortcut(e){return this.convertParagraph()(e)}};eP([(0,eO.command)({icon:"paragraph",label:({t:e})=>e(Z.ExtensionParagraphMessages.CONVERT_LABEL),description:({t:e})=>e(Z.ExtensionParagraphMessages.CONVERT_DESCRIPTION)})],eR.prototype,"convertParagraph",1),eP([(0,eO.command)({icon:"paragraph",label:({t:e})=>e(Z.ExtensionParagraphMessages.INSERT_LABEL),description:({t:e})=>e(Z.ExtensionParagraphMessages.INSERT_DESCRIPTION)})],eR.prototype,"insertParagraph",1),eP([(0,eO.keyBinding)({shortcut:E.NamedShortcut.Paragraph,command:"convertParagraph"})],eR.prototype,"shortcut",1),eR=eP([(0,eO.extension)({defaultPriority:E.ExtensionPriority.Medium})],eR);var eD=e.i(102402),eI=C,eB=e.i(387163);e.i(429682);var eL=e.i(952197);try{var ej="u">typeof window?window:e.g;ej._sentryModuleMetadata=ej._sentryModuleMetadata||{},ej._sentryModuleMetadata[(new ej.Error).stack]=Object.assign({},ej._sentryModuleMetadata[(new ej.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var eF=Object.freeze({__proto__:null,ANIMATED_POPOVER:"remirror-animated-popover",BUTTON:"remirror-button",BUTTON_ACTIVE:"remirror-button-active",COLOR_PICKER:"remirror-color-picker",COLOR_PICKER_CELL:"remirror-color-picker-cell",COLOR_PICKER_CELL_SELECTED:"remirror-color-picker-cell-selected",COMPOSITE:"remirror-composite",DIALOG:"remirror-dialog",DIALOG_BACKDROP:"remirror-dialog-backdrop",EDITOR_WRAPPER:"remirror-editor-wrapper",FLEX_COLUMN:"remirror-flex-column",FLEX_ROW:"remirror-flex-row",FLOATING_POPOVER:"remirror-floating-popover",FORM:"remirror-form",FORM_GROUP:"remirror-form-group",FORM_LABEL:"remirror-form-label",FORM_MESSAGE:"remirror-form-message",GROUP:"remirror-group",INPUT:"remirror-input",MENU:"remirror-menu",MENU_BAR:"remirror-menu-bar",MENU_BUTTON:"remirror-menu-button",MENU_BUTTON_LEFT:"remirror-menu-button-left",MENU_BUTTON_NESTED_LEFT:"remirror-menu-button-nested-left",MENU_BUTTON_NESTED_RIGHT:"remirror-menu-button-nested-right",MENU_BUTTON_RIGHT:"remirror-menu-button-right",MENU_DROPDOWN_LABEL:"remirror-menu-dropdown-label",MENU_GROUP:"remirror-menu-group",MENU_ITEM:"remirror-menu-item",MENU_ITEM_CHECKBOX:"remirror-menu-item-checkbox",MENU_ITEM_COLUMN:"remirror-menu-item-column",MENU_ITEM_RADIO:"remirror-menu-item-radio",MENU_ITEM_ROW:"remirror-menu-item-row",MENU_PANE:"remirror-menu-pane",MENU_PANE_ACTIVE:"remirror-menu-pane-active",MENU_PANE_ICON:"remirror-menu-pane-icon",MENU_PANE_LABEL:"remirror-menu-pane-label",MENU_PANE_SHORTCUT:"remirror-menu-pane-shortcut",POPOVER:"remirror-popover",ROLE:"remirror-role",SEPARATOR:"remirror-separator",TAB:"remirror-tab",TABBABLE:"remirror-tabbable",TABLE_SIZE_EDITOR:"remirror-table-size-editor",TABLE_SIZE_EDITOR_BODY:"remirror-table-size-editor-body",TABLE_SIZE_EDITOR_CELL:"remirror-table-size-editor-cell",TABLE_SIZE_EDITOR_CELL_SELECTED:"remirror-table-size-editor-cell-selected",TABLE_SIZE_EDITOR_FOOTER:"remirror-table-size-editor-footer",TAB_LIST:"remirror-tab-list",TOOLBAR:"remirror-toolbar",TOOLTIP:"remirror-tooltip"}),eV=Object.freeze({__proto__:null,EMOJI_IMAGE:"remirror-emoji-image",EMOJI_POPUP_CHAR:"remirror-emoji-popup-char",EMOJI_POPUP_HIGHLIGHT:"remirror-emoji-popup-highlight",EMOJI_POPUP_HOVERED:"remirror-emoji-popup-hovered",EMOJI_POPUP_ITEM:"remirror-emoji-popup-item",EMOJI_POPUP_NAME:"remirror-emoji-popup-name",EMOJI_POPUP_WRAPPER:"remirror-emoji-popup-wrapper",EMOJI_WRAPPER:"remirror-emoji-wrapper"}),ez=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:"remirror-collapsible-list-item-button",COLLAPSIBLE_LIST_ITEM_CLOSED:"remirror-collapsible-list-item-closed",EDITOR:"remirror-editor",LIST_ITEM_CHECKBOX:"remirror-list-item-checkbox",LIST_ITEM_MARKER_CONTAINER:"remirror-list-item-marker-container",LIST_ITEM_WITH_CUSTOM_MARKER:"remirror-list-item-with-custom-mark",LIST_SPINE:"remirror-list-spine",UL_LIST_CONTENT:"remirror-ul-list-content"}),eK=Object.freeze({__proto__:null,MENTION_ATOM:"remirror-mention-atom",MENTION_ATOM_POPUP_CHAR:"remirror-mention-atom-popup-char",MENTION_ATOM_POPUP_HIGHLIGHT:"remirror-mention-atom-popup-highlight",MENTION_ATOM_POPUP_HOVERED:"remirror-mention-atom-popup-hovered",MENTION_ATOM_POPUP_ITEM:"remirror-mention-atom-popup-item",MENTION_ATOM_POPUP_NAME:"remirror-mention-atom-popup-name",MENTION_ATOM_POPUP_WRAPPER:"remirror-mention-atom-popup-wrapper",MENTION_ATOM_ZERO_ITEMS:"remirror-mention-atom-zero-items",SUGGEST_ATOM:"remirror-suggest-atom"}),e$=Object.freeze({__proto__:null,IS_EMPTY:"remirror-is-empty"}),eH=Object.freeze({__proto__:null,EDITOR:"remirror-editor",POSITIONER:"remirror-positioner",POSITIONER_WIDGET:"remirror-positioner-widget"});function eU(e){return e.replace(/([a-z])([\dA-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function eW(e){return`--rmr-${e.map(eU).join("-")}`}let eq={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},eJ="#000000",eG="#ffffff",eY=(0,eL.transparentize)(eJ,.75),eX="#7963d2",eZ="#bcd263",eQ=eq.gray[1],e0="rgba(10,31,68,0.08)",e1="rgba(10,31,68,0.10)",e2="rgba(10,31,68,0.12)",e3=(0,eL.lighten)((0,eL.transparentize)(eJ,.1),.13),e9={background:eG,border:eY,foreground:eJ,muted:eQ,primary:eX,secondary:eZ,primaryText:"#fff",secondaryText:"#fff",text:"#252103",faded:e3},e4={...e9,background:(0,eL.darken)(eG,.15),border:(0,eL.darken)(eY,.15),foreground:(0,eL.darken)(eJ,.15),muted:(0,eL.darken)(eQ,.15),primary:(0,eL.darken)(eX,.15),secondary:(0,eL.darken)(eZ,.15),get text(){return(0,eL.readableColor)(this.background)},get primaryText(){return(0,eL.readableColor)(this.primary)},get secondaryText(){return(0,eL.readableColor)(this.secondary)}},e5={...e9,background:(0,eL.darken)(eG,.075),border:(0,eL.darken)(eY,.075),foreground:(0,eL.darken)(eJ,.075),muted:(0,eL.darken)(eQ,.075),primary:(0,eL.darken)(eX,.075),secondary:(0,eL.darken)(eZ,.075),get text(){return(0,eL.readableColor)(this.background)},get primaryText(){return(0,eL.readableColor)(this.primary)},get secondaryText(){return(0,eL.readableColor)(this.secondary)}},e6={color:{...e9,active:e4,hover:e5,shadow1:e0,shadow2:e1,shadow3:e2,backdrop:(0,eL.transparentize)(eJ,.1),outline:(0,eL.transparentize)(eX,.6),table:{default:{border:(0,eL.lighten)(eJ,.8),cell:(0,eL.lighten)(eJ,.4),controller:eq.gray[3]},selected:{border:eq.blue[7],cell:eq.blue[1],controller:eq.blue[5]},preselect:{border:eq.blue[7],cell:(0,eL.lighten)(eJ,.4),controller:eq.blue[5]},predelete:{border:eq.red[7],cell:eq.red[1],controller:eq.red[5]},mark:"#91919196"}},hue:eq,radius:{border:"0.25rem",extra:"0.5rem",circle:"50%"},fontFamily:{default:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',heading:"inherit",mono:"Menlo, monospace"}
6,fontSize:{0:"12px",1:"14px",2:"16px",3:"20px",4:"24px",5:"32px",6:"48px",7:"64px",8:"96px",default:"16px"},space:{1:"4px",2:"8px",3:"16px",4:"32px",5:"64px",6:"128px",7:"256px",8:"512px"},fontWeight:{bold:"700",default:"400",heading:"700"},letterSpacing:{tight:"-1px",default:"normal",loose:"1px",wide:"3px"},lineHeight:{heading:"1.25em",default:"1.5em"},boxShadow:{1:`0 1px 1px ${e0}`,2:`0 1px 1px ${e1}`,3:`0 1px 1px ${e2}`}};e.s(["ComponentsTheme",0,eF,"ExtensionEmojiTheme",0,eV,"ExtensionListTheme",0,ez,"ExtensionMentionAtomTheme",0,eK,"ExtensionPlaceholderTheme",0,e$,"ExtensionPositionerTheme",0,eH,"THEME",0,"remirror-theme","createThemeVariables",0,function(e={}){let t=[],r={};for(let[n,o]of Object.entries(e))!function e(n,o){if("string"==typeof o||"number"==typeof o){t.push(`${eW(n)}: ${o};`),r[eW(n)]=o;return}if("object"==typeof o&&o)for(let[t,r]of Object.entries(o))e([...n,t],r)}([n],o);return{css:t.join("\n"),styles:r}},"defaultRemirrorTheme",0,e6],751959);try{var e8="u">typeof window?window:e.g;e8._sentryModuleMetadata=e8._sentryModuleMetadata||{},e8._sentryModuleMetadata[(new e8.Error).stack]=Object.assign({},e8._sentryModuleMetadata[(new e8.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var e7=Object.defineProperty,te=Object.getOwnPropertyDescriptor,tt=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?te(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&e7(t,r,i),i},tr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tn=(e,t,r)=>(tr(e,t,"read from private field"),r?r.call(e):t.get(e)),to=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ti=(e,t,r,n)=>(tr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ts=class{constructor(e){to(this,t,(0,eD.createNanoEvents)()),to(this,r,[]),to(this,n,new Map),to(this,o,[]),to(this,i,!1),to(this,s,void 0),to(this,a,void 0),to(this,l,void 0),to(this,c,void 0),this.addListener=(e,r)=>tn(this,t).on(e,r),ti(this,s,e),ti(this,a,e.getActive),ti(this,c,e.getPosition),ti(this,l,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new ts(e)}static fromPositioner(e,t){return ts.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:tn(this,a),getPosition:tn(this,c),hasChanged:this.hasChanged,events:this.events,getID:tn(this,l)}}onActiveChanged(e){this.recentUpdate=e;let s=tn(this,a).call(this,e);ti(this,r,s),ti(this,n,new Map),ti(this,i,!1),ti(this,o,[]);let l=[];for(let[t,r]of s.entries()){let n=this.getID(r,t);tn(this,o).push(n),l.push({setElement:n=>this.addProps({...e,data:r,element:n},t),id:n,data:r})}tn(this,t).emit("update",l)}getID(e,t){var r;return(null==(r=tn(this,l))?void 0:r.call(this,e,t))??t.toString()}addProps(e,s){if(tn(this,i)||(tn(this,n).set(s,e),tn(this,n).size<tn(this,r).length))return;let a=[];for(let e of tn(this,r).keys()){let t=tn(this,n).get(e);(0,_.invariant)(t,{code:E.ErrorConstant.INTERNAL,message:"Something went wrong when retrieving the parameters"});let r=tn(this,o)[e];if(!r)return;a.push({position:tn(this,c).call(this,t),element:t.element,id:r})}tn(this,t).emit("done",a)}clone(e){return ts.create({...tn(this,s),...(0,_.isFunction)(e)?e(tn(this,s)):e})}active(e){let t=(0,_.isFunction)(e)?e:()=>e;return this.clone(e=>({getActive:r=>e.getActive(r).filter(t)}))}};function ta(e){let{tr:t,state:r,previousState:n}=e;return!!(!n||t&&function(e,t=td){let{key:r}=(null==e?void 0:e.getMeta(tc))??{};return r===t}
6(t))||(t?(0,Y.hasTransactionChanged)(t):!r.doc.eq(n.doc)||!r.selection.eq(n.selection))}function tl(e,t,r={}){let n=t.getBoundingClientRect(),{accountForPadding:o=!1}=r,i=0,s=0,a=0,l=0;if((0,Y.isElementDomNode)(t)&&o){let e=Number.parseFloat((0,Y.getStyle)(t,"padding-left").replace("px","")),r=Number.parseFloat((0,Y.getStyle)(t,"padding-right").replace("px","")),n=Number.parseFloat((0,Y.getStyle)(t,"padding-top").replace("px","")),o=Number.parseFloat((0,Y.getStyle)(t,"padding-bottom").replace("px","")),c=Number.parseFloat((0,Y.getStyle)(t,"border-left").replace("px","")),d=Number.parseFloat((0,Y.getStyle)(t,"border-right").replace("px","")),u=Number.parseFloat((0,Y.getStyle)(t,"border-top").replace("px","")),h=Number.parseFloat((0,Y.getStyle)(t,"border-bottom").replace("px","")),p=t.offsetWidth-t.clientWidth,f=t.offsetHeight-t.clientHeight;i+=e+c+("rtl"===t.dir?p:0),s+=r+d+("rtl"===t.dir?0:p),a+=n+u,l+=o+h+f}let c=new DOMRect(n.left+i,n.top+a,n.width-s,n.height-l);for(let[t,r]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if((0,_.within)(t,c.top,c.bottom)&&(0,_.within)(r,c.left,c.right))return!0;return!1}t=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,ts.EMPTY=[];var tc="positionerUpdate",td="__all_positioners__",tu={y:-999999,x:-999999,width:0,height:0},th={...tu,left:-999999,top:-999999,bottom:-999999,right:-999999},tp={...tu,rect:{...th,toJSON:()=>th},visible:!1},tf=ts.create({hasChanged:ta,getActive(e){let{state:t}=e;if(!(0,Y.isSelectionEmpty)(t)||t.selection.$anchor.depth>2)return ts.EMPTY;let r=(0,Y.findParentNode)({predicate:e=>e.type.isBlock,selection:t});return r?[r]:ts.EMPTY},getPosition(e){let{view:t,data:r}=e,n=t.nodeDOM(r.pos);if(!(0,Y.isElementDomNode)(n))return tp;let o=n.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),s=o.height,a=o.width,l=t.dom.scrollLeft+o.left-i.left,c=t.dom.scrollTop+o.top-i.top,d=tl(o,t.dom);return{y:c,x:l,height:s,width:a,rect:o,visible:d}}}),tm=tf.clone(({getActive:e})=>({getActive:t=>{let[r]=e(t);return r&&(0,Y.isEmptyBlockNode)(r.node)&&r.node.type===(0,Y.getDefaultBlockNode)(t.state.schema)?[r]:ts.EMPTY}})),tg=tm.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),ty=tm.clone(({getPosition:e})=>({getPosition:t=>{let{width:r,x:n,y:o,height:i}=e(t);return{...e(t),width:1,x:r+n,rect:new DOMRect(r+n,o,1,i)}}}));function tw(e){return ts.create({hasChanged:ta,getActive:t=>{let{state:r,view:n}=t;if(!e(r)||!(0,Y.isTextSelection)(r.selection))return ts.EMPTY;try{let{head:e,anchor:t}=r.selection;return[{from:n.coordsAtPos(t),to:n.coordsAtPos(e)}]}catch{return ts.EMPTY}},getPosition(e){let{element:t,data:r,view:n}=e,{from:o,to:i}=r,s=t.offsetParent??n.dom,a=s.getBoundingClientRect(),l=Math.abs(i.bottom-o.top),c=l>o.bottom-o.top,d=Math.min(o.left,i.left),u=Math.min(o.top,i.top),h=s.scrollLeft+(c?i.left-a.left:d-a.left),p=s.scrollTop+u-a.top,f=c?1:Math.abs(o.left-i.right),m=new DOMRect(c?i.left:d,u,f,l),g=tl(m,n.dom);return{rect:m,y:p,x:h,height:l,width:f,visible:g}}})}var tv=tw(e=>!e.selection.empty),tb=tw(e=>e.selection.empty),tM=tw(()=>!0),tx=tv.clone(()=>({getActive:e=>{let{state:t,view:r}=e;if(!t.selection.empty)return ts.EMPTY;let n=(0,Y.getSelectedWord)(t);if(!n)return ts.EMPTY;try{return[{from:r.coordsAtPos(n.from),to:r.coordsAtPos(n.to)}]}catch{return ts.EMPTY}}})),tS={selection:tv,cursor:tb,always:tM,block:tf,emptyBlock:tm,emptyBlockStart:tg,emptyBlockEnd:ty,nearestWord:tx},tk=class extends eI.PlainExtension{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return"positioner"}createAttributes(){return{class:eH.EDITOR}}init(){this.onScroll=(0,eB.debounce)(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return L.DecorationSet.empty;let t=L.Decoration.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return L.DecorationSet.create(e.doc,[t])}forceUpdatePositioners(e=td){return({tr:t,dispatch:r})=>(null==r||r(t.setMeta(tc,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){let e=document.createElement("span");return e.dataset.id="remirror-positioner-widget",e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(let t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){let r=this.store.getState(),n=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:n,state:r,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};tt([(0,eI.command)()],tk.prototype,"forceUpdatePositioners",1),tt([(0,eI.helper)()],tk.prototype,"getPositionerWidget",1),tk=tt([(0,eI.extension)({defaultOptions:{scrollDebounce:100}
6,customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],tk),e.s(["PositionerExtension",0,tk,"defaultAbsolutePosition",0,tp,"getPositioner",0,function(e){return(0,_.isString)(e)?tS[e].clone():(0,_.isFunction)(e)?e().clone():e.clone()},"hasStateChanged",0,ta],96996);var tE=C;try{var t_="u">typeof window?window:e.g;t_._sentryModuleMetadata=t_._sentryModuleMetadata||{},t_._sentryModuleMetadata[(new t_.Error).stack]=Object.assign({},t_._sentryModuleMetadata[(new t_.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var tC=class extends tE.NodeExtension{get name(){return"text"}createTags(){return[E.ExtensionTag.InlineNode]}createNodeSpec(){return{}}};tC=((e,t)=>{for(var r,n=t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=r(n)||n);return n})([(0,tE.extension)({disableExtraAttributes:!0,defaultPriority:E.ExtensionPriority.Medium})],tC);try{var tO="u">typeof window?window:e.g;tO._sentryModuleMetadata=tO._sentryModuleMetadata||{},tO._sentryModuleMetadata[(new tO.Error).stack]=Object.assign({},tO._sentryModuleMetadata[(new tO.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var tT={...A.DocExtension.defaultOptions,...eR.defaultOptions,...eC.defaultOptions,excludeExtensions:[]},tA=C,tN=C;try{var tP="u">typeof window?window:e.g;tP._sentryModuleMetadata=tP._sentryModuleMetadata||{},tP._sentryModuleMetadata[(new tP.Error).stack]=Object.assign({},tP._sentryModuleMetadata[(new tP.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var tR=class extends tN.PlainExtension{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:(0,Y.isDefaultDocNode)(t.doc,{ignoreAttributes:!0})}),apply:(e,t,r,n)=>(function(e){let{pluginState:t,extension:r,tr:n,state:o}=e;return n.docChanged?{...r.options,empty:(0,Y.isDefaultDocNode)(o.doc)}:t})({pluginState:t,tr:e,extension:this,state:n})},props:{decorations:e=>(function(e){let{extension:t,state:r}=e,{empty:n}=t.pluginKey.getState(r),{emptyNodeClass:o,placeholder:i}=t.options;if(!n)return null;let s=[];return r.doc.descendants((e,t)=>{let r=L.Decoration.node(t,t+e.nodeSize,{class:o,"data-placeholder":i});s.push(r)}),L.DecorationSet.create(r.doc,s)})({state:e,extension:this})}}}onSetOptions(e){let{changes:t}=e;t.placeholder.changed&&this.store.phase>=E.ManagerPhase.EditorView&&this.store.updateAttributes()}};tR=((e,t)=>{for(var r,n=t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=r(n)||n);return n})([(0,tN.extension)({defaultOptions:{emptyNodeClass:e$.IS_EMPTY,placeholder:""}})],tR);var tD=e.i(783164),tI=C,tB=e.i(802659);e.i(630874),e.i(919475);try{var tL="u">typeof window?window:e.g;tL._sentryModuleMetadata=tL._sentryModuleMetadata||{},tL._sentryModuleMetadata[(new tL.Error).stack]=Object.assign({},tL._sentryModuleMetadata[(new tL.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var tj=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tF=(e,t,r)=>(tj(e,t,"read from private field"),r?r.call(e):t.get(e)),tV=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},tz=(e,t,r,n)=>(tj(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tK=class{constructor(){this.portals=new Map,tV(this,d,(0,eD.createNanoEvents)()),this.on=e=>tF(this,d).on("update",e),this.once=e=>{let t=tF(this,d).on("update",r=>{t(),e(r)});return t}}update(){tF(this,d).emit("update",this.portals)}render({Component:e,container:t}){let r=this.portals.get(t);this.portals.set(t,{Component:e,key:(null==r?void 0:r.key)??(0,_.uniqueId)()}),this.update()}forceUpdate(){for(let[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:(0,_.uniqueId)()})}remove(e){this.portals.delete(e),this.update()}};d=new WeakMap;var t$=e=>{let{portals:t}=e;return k.default.createElement(k.default.Fragment,null,t.map(([e,{Component:t,key:r}])=>(0,tD.createPortal)(k.default.createElement(t,null),e,r)))},tH=class{constructor({getPosition:e,node:t,portalContainer:r,view:n,ReactComponent:o,options:i}){tV(this,u,void 0),tV(this,h,[]),tV(this,p,void 0),tV(this,f,void 0),tV(this,m,void 0),tV(this,g,void 0),tV(this,y,void 0),tV(this,w,!1),tV(this,v,void 0),tV(this,b,void 0),tV(this,M,void 0),tV(this,x,e=>{e&&((0,_.invariant)(tF(this,b),{code:E.ErrorConstant.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${tF(this,u).type.name}' which doesn't support content.`}),e.append(tF(this,b)))}),this.Component=()=>{let e=tF(this,m);return(0,_.invariant)(e,{code:E.ErrorConstant.REACT_NODE_VIEW,message:`The custom react node view provided for ${tF(this,u).type.name} doesn't have a valid ReactComponent`}),k.default.createElement(e,{updateAttributes:this.updateAttributes,selected:this.selected,view:tF(this,p),getPosition:tF(this,g),node:tF(this,u),forwardRef:tF(this,x),decorations:tF(this,h)})},this.updateAttributes=e=>{if(!tF(this,p).editable)return;let t=tF(this,g).call(this);if(null==t)return;let r=tF(this,p).state.tr.setNodeMarkup(t,void 0,{...tF(this,u).attrs,...e});tF(this,p).dispatch(r)},(0,_.invariant)((0,_.isFunction)(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),tz(this,u,t),tz(this,p,n),tz(this,f,r),tz(this,m,o),tz(this,g,e),tz(this,y,i),tz(this,M,this.createDom());const{contentDOM:s,wrapper:a}=this.createContentDom()??{};tz(this,v,s??void 0),tz(this,b,a),tF(this,b)&&tF(this,M).append(tF(this,b)),this.setDomAttributes(tF(this,u),tF(this,M)),this.Component.displayName=(0,tB.pascalCase)(`${tF(this,u).type.name}NodeView`),this.renderComponent()}static create(e){let{portalContainer:t,ReactComponent:r,options:n}=e;return(e,o,i)=>new tH({options:n,node:e,view:o,getPosition:i,portalContainer:t,ReactComponent:r})}get selected(){return tF(this,w)}get contentDOM(){return tF(this,v)}get dom(){return tF(this,M)}renderComponent(){tF(this,f).render({Component:this.Component,container:tF(this,M)})}createDom(){let{defaultBlockNode:e,defaultInlineNode:t}=tF(this,y),r=tF(this,u).isInline?document.createElement(t):document.createElement(e);return r.classList.add(`${(0,tB.kebabCase)(tF(this,u).type.name)}
6-node-view-wrapper`),r}createContentDom(){var e,t;let r;if(tF(this,u).isLeaf)return;let n=null==(t=(e=tF(this,u).type.spec).toDOM)?void 0:t.call(e,tF(this,u));if(!n)return;let{contentDOM:o,dom:i}=B.DOMSerializer.renderSpec(document,n);if((0,Y.isElementDomNode)(i))return r=i,i===o&&((r=document.createElement("span")).classList.add(`${(0,tB.kebabCase)(tF(this,u).type.name)}-node-view-content-wrapper`),r.append(o)),(0,Y.isElementDomNode)(o),{wrapper:r,contentDOM:o}}update(e,t){return!!(0,Y.isNodeOfType)({types:tF(this,u).type,node:e})&&(tF(this,u)===e&&tF(this,h)===t||(tF(this,u).sameMarkup(e)||this.setDomAttributes(e,tF(this,M)),tz(this,u,e),tz(this,h,t),this.renderComponent(),!0))}setDomAttributes(e,t){let{toDOM:r}=tF(this,u).type.spec,n=e.attrs;if(r){var o;let t=r(e);if((0,_.isString)(t)||(o=t,(0,Y.isDomNode)(o)||(0,_.isPlainObject)(o)&&(0,Y.isDomNode)(o.dom)))return;(0,_.isPlainObject)(t[1])&&(n=t[1])}for(let[e,r]of(0,_.entries)(n))t.setAttribute(e,r)}selectNode(){tz(this,w,!0),tF(this,M)&&tF(this,M).classList.add(E.SELECTED_NODE_CLASS_NAME),this.renderComponent()}deselectNode(){tz(this,w,!1),tF(this,M)&&tF(this,M).classList.remove(E.SELECTED_NODE_CLASS_NAME),this.renderComponent()}destroy(){tF(this,f).remove(tF(this,M))}ignoreMutation(e){return"selection"===e.type?!tF(this,u).type.spec.selectable:!tF(this,b)||!tF(this,b).contains(e.target)}stopEvent(e){var t;if(!tF(this,M))return!1;if((0,_.isFunction)(tF(this,y).stopEvent))return tF(this,y).stopEvent({event:e});let r=e.target;if(!(tF(this,M).contains(r)&&!(null==(t=this.contentDOM)?void 0:t.contains(r))))return!1;let n="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!n)return!0;let o=!!tF(this,u).type.spec.draggable,i=I.NodeSelection.isSelectable(tF(this,u)),s="copy"===e.type,a="paste"===e.type,l="cut"===e.type,c="mousedown"===e.type,d=e.type.startsWith("drag");return!o&&i&&d&&e.preventDefault(),!d&&!n&&!s&&!a&&!l&&(!c||!i)}};u=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakMap,b=new WeakMap,M=new WeakMap,x=new WeakMap;var tU=class extends tI.PlainExtension{constructor(){super(...arguments),this.portalContainer=new tK}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){let e=(0,_.object)(),t=this.store.managerSettings.nodeViewComponents??{};for(let t of this.store.extensions)t.ReactComponent&&(0,tI.isNodeExtension)(t)&&"ssr"!==t.reactComponentEnvironment&&(e[t.name]=tH.create({options:this.options,ReactComponent:t.ReactComponent,portalContainer:this.portalContainer}));for(let[r,n]of(0,_.entries)({...this.options.nodeViewComponents,...t}))e[r]=tH.create({options:this.options,ReactComponent:n,portalContainer:this.portalContainer});return e}};tU=((e,t)=>{for(var r,n=t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=r(n)||n);return n})([(0,tI.extension)({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],tU);try{var tW="u">typeof window?window:e.g;tW._sentryModuleMetadata=tW._sentryModuleMetadata||{},tW._sentryModuleMetadata[(new tW.Error).stack]=Object.assign({},tW._sentryModuleMetadata[(new tW.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var tq={...tR.defaultOptions,...tU.defaultOptions},tJ=[...tR.staticKeys,...tU.staticKeys],tG=class extends tA.PlainExtension{get name(){return"react"}onSetOptions(e){let{pickChanged:t}=e;this.getExtension(tR).setOptions(t(["placeholder"]))}createExtensions(){let{emptyNodeClass:e,placeholder:t,defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s}=this.options;return[new tR({emptyNodeClass:e,placeholder:t,priority:E.ExtensionPriority.Low}),new tU({defaultBlockNode:r,defaultContentNode:n,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:s})]}};tG=((e,t)=>{for(var r,n=t,o=e.length-1;o>=0;o--)(r=e[o])&&(n=r(n)||n);return n})([(0,tA.extension)({defaultOptions:tq,staticKeys:tJ})],tG);var tY=e.i(215160);try{var tX="u">typeof window?window:e.g;tX._sentryModuleMetadata=tX._sentryModuleMetadata||{},tX._sentryModuleMetadata[(new tX.Error).stack]=Object.assign({},tX._sentryModuleMetadata[(new tX.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var tZ=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tQ=(e,t,r)=>(tZ(e,t,"read from private field"),r?r.call(e):t.get(e)),t0=(0,k.createContext)(null);function t1(e){let t=(0,k.useContext)(t0),r=(0,k.useRef)(function(){let[,e]=(0,k.useState)((0,_.object)());return(0,k.useCallback)(()=>{e((0,_.object)())},[])}());(0,_.invariant)(t,{code:E.ErrorConstant.REACT_PROVIDER_CONTEXT});let{addHandler:n}=t;return(0,k.useEffect)(()=>{let t=e;if(t){if((0,_.isPlainObject)(t)){let{autoUpdate:e}=t;t=e?()=>r.current():void 0}if((0,_.isFunction)(t))return n("updated",t)}},[n,e]),t}function t2(e,t,r){let n,{getExtension:o}=t1(),i=(0,k.useMemo)(()=>o(e),[e,o]);if(n=(0,_.isFunction)(t)?r?[i,...r]:[i,t]:t?[i,...Object.values(t)]:[],(0,k.useEffect)(()=>{!(0,_.isFunction)(t)&&t&&i.setOptions(t)},n),(0,k.useEffect)(()=>
6{if((0,_.isFunction)(t))return t({addHandler:i.addHandler.bind(i),addCustomHandler:i.addCustomHandler.bind(i),extension:i})},n),!t)return i}function t3(e,t,r){return t2(e,(0,k.useCallback)(({addHandler:e})=>e(t,r),[r,t]))}var[t9,t4]=(0,O.createContextState)(({props:e})=>{let t=e.locale??"en",r=e.i18n??T.i18n,n=e.supportedLocales??[t],o=r._.bind(r);return{locale:t,i18n:r,supportedLocales:n,t:o}});function t5(e,t={}){let{core:r,react:n,...o}=t;return(0,C.isRemirrorManager)(e)?e:C.RemirrorManager.create(()=>[...(0,_.getLazyArray)(e),new tG(n),...function(e={}){let{content:t,depth:r,getDispatch:n,getState:o,newGroupDelay:i,excludeExtensions:s}=e={...tT,...e},a={};for(let e of s??[])a[e]=!0;let l=[];if(!a.history){let e=new eC({depth:r,getDispatch:n,getState:o,newGroupDelay:i});l.push(e)}return a.doc||l.push(new A.DocExtension({content:t})),a.text||l.push(new tC),a.paragraph||l.push(new eR),a.positioner||l.push(new tk),a.gapCursor||l.push(new J),a.events||l.push(new N.EventsExtension),l}(r)],o)}var t6="object"==typeof tY.default&&tY.default.__esModule&&tY.default.default?tY.default.default:tY.default,t8=class extends C.Framework{constructor(e){if(super(e),((e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)})(this,S,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,t)=>{this.rootPropsConfig.called=!0;let{refKey:r="ref",ref:n,...o}=e??(0,_.object)();return{[r]:t6(n,this.onRef),key:this.uid,...o,children:t}},this.onRef=e=>{if(e){var t;this.rootPropsConfig.count+=1,(0,_.invariant)(this.rootPropsConfig.count<=1,{code:E.ErrorConstant.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),tZ(this,t=S,"write to private field"),t.set(this,e),this.onRefLoad()}},this.manager.view)return void this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});this.manager.getExtension(tR).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new L.EditorView(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){let{triggerChange:r=!0,tr:n,transactions:o}=t;if(this.props.state){let{onChange:t}=this.props;(0,_.invariant)(t,{code:E.ErrorConstant.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),(0,_.invariant)(r,{code:E.ErrorConstant.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:e,tr:n,transactions:o});return}n||o||(e=e.apply(e.tr.setMeta(E.STATE_OVERRIDE,{}))),this.view.updateState(e),r&&(null==o?void 0:o.length)!==0&&this.onChange({state:e,tr:n,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:n,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(E.STATE_OVERRIDE,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){"start"===this.props.insertPosition?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){(0,_.invariant)(tQ(this,S),{code:E.ErrorConstant.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});let{autoFocus:e}=this.props;this.addProsemirrorViewToDom(tQ(this,S),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&tQ(this,S)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}
6resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};S=new WeakMap;var t7="u">typeof document?k.useLayoutEffect:k.useEffect,re={doc:!1,selection:!1,storedMark:!1},rt=()=>k.default.createElement("div",{className:eF.EDITOR_WRAPPER,...t1().getRootProps()}),rr=e=>(e.hook(),null);e.s(["Remirror",0,function(e){let{children:t,autoRender:r,i18n:n,locale:o,supportedLocales:i,hooks:s=[],...a}=e,l=function(e){var t;let r,n,{manager:o,state:i}=e,{placeholder:s,editable:a}=e;(0,k.useRef)(!0).current&&!(0,_.isNullOrUndefined)(s)&&o.getExtension(tG).setOptions({placeholder:s}),(0,k.useEffect)(()=>{null!=s&&o.getExtension(tG).setOptions({placeholder:s})},[s,o]);let[l]=(0,k.useState)(()=>{if(i)return i;let t=o.createEmptyDoc(),[r,n]=(0,_.isArray)(e.initialContent)?e.initialContent:[e.initialContent??t];return o.createState({content:r,selection:n})}),c=(t={initialEditorState:l,getProps:()=>e},(r=(0,k.useRef)(t)).current=t,(n=(0,k.useMemo)(()=>new t8(r.current),[])).update(t),n);return(0,k.useEffect)(()=>()=>{c.destroy()},[c]),(0,k.useEffect)(()=>{c.onUpdate()},[a,c]),function(e){let t,{state:r}=e.props,n=(0,k.useRef)(!!r),o=(t=(0,k.useRef)(),t7(()=>{t.current=r}),t.current);t7(()=>{let t=r?!0===n.current:!1===n.current;(0,_.invariant)(t,{code:E.ErrorConstant.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),r&&r!==o&&e.updateControlledState(r,o??void 0)},[r,o,e])}(c),c.frameworkOutput}(a),c=function(e){let[t,r]=(0,k.useState)(()=>Array.from(e.portals.entries()));return(0,k.useEffect)(()=>e.on(e=>{r(Array.from(e.entries()))}),[e]),(0,k.useMemo)(()=>t,[t])}(l.portalContainer),d="start"===r||!0===r||!t&&(0,_.isNullOrUndefined)(r),u="end"===r;return k.default.createElement(t9,{i18n:n,locale:o,supportedLocales:i},k.default.createElement(t0.Provider,{value:l},k.default.createElement(t$,{portals:c}),s.map((e,t)=>k.default.createElement(rr,{hook:e,key:t})),d&&k.default.createElement(rt,null),t,u&&k.default.createElement(rt,null)))},"useActive",0,function(e=!0){return t1({autoUpdate:e}).active},"useAttrs",0,function(e=!1){return t1(e?{autoUpdate:!0}:void 0).attrs},"useChainedCommands",0,function(){return t1().chain.new()},"useCommands",0,function(){return t1().commands},"useCurrentSelection",0,function(){return t1({autoUpdate:!0}).getState().selection},"useEditorState",0,function(){return t1({autoUpdate:!0}).getState()},"useExtension",0,t2,"useExtensionCustomEvent",0,function(e,t,r){return t2(e,(0,k.useCallback)(({addCustomHandler:e})=>e(t,r),[r,t]))},"useExtensionEvent",0,t3,"useHasExtension",0,function(e){let{hasExtension:t}=t1();return(0,k.useMemo)(()=>t(e),[e,t])},"useHelpers",0,function(e=!1){return t1(e?{autoUpdate:!0}:void 0).helpers},"useI18n",0,t4,"useMarkRange",0,function(e){let{getState:t}=t1({autoUpdate:!0}),{$from:r,$to:n}=t().selection;return(0,Y.getMarkRange)(r,e,n)},"useRemirror",0,function(e={}){let{content:t,document:r,selection:n,extensions:o,...i}=e,s=function(e,t={}){let r=(0,k.useRef)(e),n=(0,k.useRef)(t),[o,i]=(0,k.useState)(()=>t5(e,t));return r.current=e,n.current=t,(0,k.useEffect)(()=>o.addHandler("destroy",()=>{i(()=>t5(r.current,n.current))}),[o]),o}(o??(()=>[]),i),[a,l]=(0,k.useState)(()=>s.createState({selection:n,content:t??s.createEmptyDoc()})),c=(0,k.useCallback)(({state:e})=>{l(e)},[]),d=(0,k.useCallback)(()=>s.output,[s]);return(0,k.useMemo)(()=>({state:a,setState:l,manager:s,onChange:c,getContext:d}),[d,s,c,a])},"useRemirrorContext",0,t1,"useSelectedText",0,function(){let{getState:e,helpers:t}=t1({autoUpdate:!0}),{selection:r,doc:n}=e();if(!(0,Y.isTextSelection)(r)||r.empty)return;let{from:o,to:i}=r;return t.getTextBetween(o,i,n)},"useUpdateReason",0,function(){let[e,t]=(0,k.useState)(re);return t3(C.PluginsExtension,"applyState",(0,k.useCallback)(({tr:e})=>{let r={...re};e.docChanged&&(r.doc=!0),e.selectionSet&&(r.selection=!0),e.storedMarksSet&&(r.storedMark=!0),t(r)},[])),e}],93379)},215160,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}
6Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 2===e.length?i(e[0],e[1])||null:e.slice(1).reduce(function(e,t){return i(e,t)},e[0])||null};var o=new WeakMap;function i(e,t){if(e&&t){var r=o.get(e)||new WeakMap;o.set(e,r);var n=r.get(t)||function(r){s(e,r),s(t,r)};return r.set(t,n),n}return e||t}function s(e,t){"function"==typeof e?e(t):e.current=t}},847563,409432,121247,842685,e=>{"use strict";var t=e.i(999161);try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var n=Object.defineProperty,o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,a=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))i.call(t,r)&&a(e,r,t[r]);if(o)for(var r of o(t))s.call(t,r)&&a(e,r,t[r]);return e},c="u">typeof document?t.useLayoutEffect:t.useEffect;function d(e){return t=>{if(!e.current)throw Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if("function"!=typeof t)throw TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function u(e){return t=>{if(!e.current)throw Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(e=>l(l({},e),"function"==typeof t?t(e):t))}}e.s(["createContextState",0,function(e,r){var n,o;let i;return n=n=>{let o=(0,t.useRef)(null),i=(0,t.useRef)(),s=null==r?void 0:r(n),[a,l]=(0,t.useState)(()=>e({get:d(o),set:u(i),previousContext:void 0,props:n,state:s})),c=[...Object.values(n),s];return(0,t.useEffect)(()=>{0!==c.length&&l(t=>e({get:d(o),set:u(i),previousContext:t,props:n,state:s}))},c),o.current=a,i.current=l,a},o=i=(0,t.createContext)(null),[e=>{let r=n(e);return t.default.createElement(i.Provider,{value:r},e.children)},(e,r)=>{var n;let i,s=(0,t.useContext)(o),a=(n=s,i=(0,t.useRef)(),c(()=>{i.current=n}),i.current);if(!s)throw Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return s;if("function"!=typeof e)throw TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");let l=e(s);if(!a||!r)return l;let d=e(a);return r(d,l)?d:l},i]}],847563);var h=e.i(960572);try{var p="u">typeof window?window:e.g;p._sentryModuleMetadata=p._sentryModuleMetadata||{},p._sentryModuleMetadata[(new p.Error).stack]=Object.assign({},p._sentryModuleMetadata[(new p.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}let f=new Map;function m(e){return[...Array.isArray(e)?e:[e],"en"]}function g(e,t,r){let n=m(e);return v(()=>b("date",n,r),()=>new Intl.DateTimeFormat(n,r)).format("string"==typeof t?new Date(t):t)}function y(e,t,r){let n=m(e);return v(()=>b("number",n,r),()=>new Intl.NumberFormat(n,r)).format(t)}function w(e,t,r,{offset:n=0,...o}){let i=m(e),s=t?v(()=>b("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):v(()=>b("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[r]??o[s.select(r-n)]??o.other}function v(e,t){let r=e(),n=f.get(r);return n||(n=t(),f.set(r,n)),n}function b(e,t,r){let n=t.join("-");return`${e}-${n}-${JSON.stringify(r)}`}let M=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,x="%__lingui_octothorpe__%",S=(e,t)=>t[e]??t.other;var k=Object.defineProperty;class E{constructor(){((e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?k(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r})(this,"_events",{})}on(e,t){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let r=this._getListeners(e);if(!r)return;let n=r.indexOf(t);~n&&r.splice(n,1)}emit(e,...t){let r=this._getListeners(e);r&&r.map(e=>e.apply(this,t))}_getListeners(e){let t=this._events[e];return!!Array.isArray(t)&&t}}var _=Object.defineProperty,C=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?_(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,r};
6class O extends E{constructor(e){super(),C(this,"_locale",""),C(this,"_locales"),C(this,"_localeData",{}),C(this,"_messages",{}),C(this,"_missing"),C(this,"t",this._.bind(this)),null!=e.missing&&(this._missing=e.missing),null!=e.messages&&this.load(e.messages),null!=e.localeData&&this.loadLocaleData(e.localeData),("string"==typeof e.locale||e.locales)&&this.activate(e.locale??"en",e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){let r=this._localeData[e];r?Object.assign(r,t):this._localeData[e]=t}loadLocaleData(e,t){null!=t?this._loadLocaleData(e,t):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,t){let r=this._messages[e];r?Object.assign(r,t):this._messages[e]=t}load(e,t){"string"==typeof e&&"object"==typeof t?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:r}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t,r){var n,o;let i=r?.message;e||(e=""),"string"!=typeof e&&(t=e.values||t,i=e.message,e=e.id);let s=this.messages[e],a=void 0===s,l=this._missing;if(l&&a)return"function"==typeof l?l(this._locale,e):l;a&&this.emit("missing",{id:e,locale:this._locale});let c=s||i||e;return"string"==typeof c&&M.test(c)?JSON.parse(`"${c}"`):"string"==typeof c?c:(n=this._locale,o=this._locales,(e={},t)=>{let r=((e,t,r={})=>{let n=t||e,o=e=>"object"==typeof e?e:r[e]||{style:e},i=(e,t)=>{let i=y(n,e,Object.keys(r).length?o("number"):void 0);return t.replace(RegExp(x,"g"),i)};return{plural:(e,t)=>{let{offset:r=0}=t,o=w(n,!1,e,t);return i(e-r,o)},selectordinal:(e,t)=>{let{offset:r=0}=t,o=w(n,!0,e,t);return i(e-r,o)},select:S,number:(e,t)=>y(n,e,o(t)),date:(e,t)=>g(n,e,o(t))}})(n,o,t),i=(t,n=!1)=>Array.isArray(t)?t.reduce((t,o)=>{let s;if("#"===o&&n)return t+x;if("string"==typeof o)return t+o;let[a,l,c]=o,d={};return("plural"===l||"selectordinal"===l||"select"===l?Object.entries(c).forEach(([e,t])=>{d[e]=i(t,"plural"===l||"selectordinal"===l)}):d=c,null==(s=l?(0,r[l])(e[a],d):e[a]))?t:t+s},""):t,s=i(c);return"string"==typeof s&&M.test(s)?(0,h.unraw)(s.trim()):"string"==typeof s?s.trim():s?String(s):""})(t,r?.formats)}date(e,t){return g(this._locales||this._locale,e,t)}number(e,t){return y(this._locales||this._locale,e,t)}}function T(e={}){return new O(e)}let A=T();e.s(["formats",0,{__proto__:null,date:g,defaultLocale:"en",number:y,plural:w},"i18n",0,A,"setupI18n",0,T],409432);try{var N="u">typeof window?window:e.g;N._sentryModuleMetadata=N._sentryModuleMetadata||{},N._sentryModuleMetadata[(new N.Error).stack]=Object.assign({},N._sentryModuleMetadata[(new N.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}try{var P="u">typeof window?window:e.g;P._sentryModuleMetadata=P._sentryModuleMetadata||{},P._sentryModuleMetadata[(new P.Error).stack]=Object.assign({},P._sentryModuleMetadata[(new P.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function R(e,t){return t?"other":1==e?"one":"other"}function D(e,t){return t?"other":0==e||1==e?"one":"other"}function I(e,t){var r=!String(e).split(".")[1];return t?"other":1==e&&r?"one":"other"}function B(e,t){return"other"}function L(e,t){return t?"other":1==e?"one":2==e?"two":"other"}e.s(["_in",0,B,"af",0,R,"ak",0,D,"am",0,function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},"an",0,R,"ar",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":n>=3&&n<=10?"few":n>=11&&n<=99?"many":"other"},"ars",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":n>=3&&n<=10?"few":n>=11&&n<=99?"many":"other"},"as",0,function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},"asa",0,R,"ast",0,I,"az",0,function(e,t){var r=String(e).split(".")[0],n=r.slice(-1),o=r.slice(-2),i=r.slice(-3);return t?1==n||2==n||5==n||7==n||8==n||20==o||50==o||70==o||80==o?"one":3==n||4==n||100==i||200==i||300==i||400==i||500==i||600==i||700==i||800==i||900==i?"few":0==r||6==n||40==o||
660==o||90==o?"many":"other":1==e?"one":"other"},"be",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?(2==o||3==o)&&12!=i&&13!=i?"few":"other":1==o&&11!=i?"one":o>=2&&o<=4&&(i<12||i>14)?"few":n&&0==o||o>=5&&o<=9||i>=11&&i<=14?"many":"other"},"bem",0,R,"bez",0,R,"bg",0,R,"bho",0,D,"bm",0,B,"bn",0,function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},"bo",0,B,"br",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2),s=n&&r[0].slice(-6);return t?"other":1==o&&11!=i&&71!=i&&91!=i?"one":2==o&&12!=i&&72!=i&&92!=i?"two":(3==o||4==o||9==o)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":0!=e&&n&&0==s?"many":"other"},"brx",0,R,"bs",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},"ca",0,function(e,t){var r=!String(e).split(".")[1];return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&r?"one":"other"},"ce",0,R,"ceb",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?"other":i&&(1==n||2==n||3==n)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},"cgg",0,R,"chr",0,R,"ckb",0,R,"cs",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":1==e&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"},"cy",0,function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},"da",0,function(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e;return t||1!=e&&(o||0!=n&&1!=n)?"other":"one"},"de",0,I,"dsb",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"},"dv",0,R,"dz",0,B,"ee",0,R,"el",0,R,"en",0,function(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?1==i&&11!=s?"one":2==i&&12!=s?"two":3==i&&13!=s?"few":"other":1==e&&n?"one":"other"},"eo",0,R,"es",0,R,"et",0,I,"eu",0,R,"fa",0,function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},"ff",0,function(e,t){return t?"other":e>=0&&e<2?"one":"other"},"fi",0,I,"fil",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==n||2==n||3==n)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},"fo",0,R,"fr",0,function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},"fur",0,R,"fy",0,I,"ga",0,function(e,t){var r=Number(String(e).split(".")[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},"gd",0,function(e,t){var r=Number(String(e).split(".")[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},"gl",0,I,"gsw",0,R,"gu",0,function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},"guw",0,D,"gv",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":o&&(0==s||20==s||40==s||60==s||80==s)?"few":o?"other":"many"},"ha",0,R,"haw",0,R,"he",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":1==e&&o?"one":2==n&&o?"two":o&&(e<0||e>10)&&i&&0==s?"many":"other"},"hi",0,function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},"hr",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},"hsb",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-2),a=o.slice(-2);return t?"other":i&&1==s||1==a?"one":i&&2==s||2==a?"two":i&&(3==s||4==s)||3==a||4==a?"few":"other"},"hu",0,function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},"hy",0,function(e,t){return t?1==e?"one":"other":e>
6=0&&e<2?"one":"other"},"ia",0,I,"id",0,B,"ig",0,B,"ii",0,B,"io",0,I,"is",0,function(e,t){var r=String(e).split("."),n=r[0],o=Number(r[0])==e,i=n.slice(-1),s=n.slice(-2);return t?"other":o&&1==i&&11!=s||!o?"one":"other"},"it",0,function(e,t){var r=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&r?"one":"other"},"iu",0,L,"iw",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1);return t?"other":1==e&&o?"one":2==n&&o?"two":o&&(e<0||e>10)&&i&&0==s?"many":"other"},"ja",0,B,"jbo",0,B,"jgo",0,R,"ji",0,I,"jmc",0,R,"jv",0,B,"jw",0,B,"ka",0,function(e,t){var r=String(e).split(".")[0],n=r.slice(-2);return t?1==r?"one":0==r||n>=2&&n<=20||40==n||60==n||80==n?"many":"other":1==e?"one":"other"},"kab",0,function(e,t){return t?"other":e>=0&&e<2?"one":"other"},"kaj",0,R,"kcg",0,R,"kde",0,B,"kea",0,B,"kk",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1);return t?6==o||9==o||n&&0==o&&0!=e?"many":"other":1==e?"one":"other"},"kkj",0,R,"kl",0,R,"km",0,B,"kn",0,function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},"ko",0,B,"ks",0,R,"ksb",0,R,"ksh",0,function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},"ku",0,R,"kw",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-2),i=n&&r[0].slice(-3),s=n&&r[0].slice(-5),a=n&&r[0].slice(-6);return t?n&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":5==e||5==o?"many":"other":0==e?"zero":1==e?"one":2==o||22==o||42==o||62==o||82==o||n&&0==i&&(s>=1e3&&s<=2e4||4e4==s||6e4==s||8e4==s)||0!=e&&1e5==a?"two":3==o||23==o||43==o||63==o||83==o?"few":1!=e&&(1==o||21==o||41==o||61==o||81==o)?"many":"other"},"ky",0,R,"lag",0,function(e,t){var r=String(e).split(".")[0];return t?"other":0==e?"zero":(0==r||1==r)&&0!=e?"one":"other"},"lb",0,R,"lg",0,R,"lkt",0,B,"ln",0,D,"lo",0,function(e,t){return t&&1==e?"one":"other"},"lt",0,function(e,t){var r=String(e).split("."),n=r[1]||"",o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?"other":1==i&&(s<11||s>19)?"one":i>=2&&i<=9&&(s<11||s>19)?"few":0!=n?"many":"other"},"lv",0,function(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"},"mas",0,R,"mg",0,D,"mgo",0,R,"mk",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":(7==s||8==s)&&17!=a&&18!=a?"many":"other":i&&1==s&&11!=a||1==l&&11!=c?"one":"other"},"ml",0,R,"mn",0,R,"mo",0,function(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e&&r[0].slice(-2);return t?1==e?"one":"other":1==e&&n?"one":!n||0==e||o>=2&&o<=19?"few":"other"},"mr",0,function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},"ms",0,function(e,t){return t&&1==e?"one":"other"},"mt",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-2);return t?"other":1==e?"one":0==e||n>=2&&n<=10?"few":n>=11&&n<=19?"many":"other"}
6,"my",0,B,"nah",0,R,"naq",0,L,"nb",0,R,"nd",0,R,"ne",0,function(e,t){var r=Number(String(e).split(".")[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},"nl",0,I,"nn",0,R,"nnh",0,R,"no",0,R,"nqo",0,B,"nr",0,R,"nso",0,D,"ny",0,R,"nyn",0,R,"om",0,R,"or",0,function(e,t){var r=Number(String(e).split(".")[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},"os",0,R,"osa",0,B,"pa",0,D,"pap",0,R,"pl",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":1==e&&o?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&1!=n&&(0==i||1==i)||o&&i>=5&&i<=9||o&&s>=12&&s<=14?"many":"other"},"prg",0,function(e,t){var r=String(e).split("."),n=r[1]||"",o=n.length,i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-2),c=n.slice(-1);return t?"other":i&&0==s||a>=11&&a<=19||2==o&&l>=11&&l<=19?"zero":1==s&&11!=a||2==o&&1==c&&11!=l||2!=o&&1==c?"one":"other"},"ps",0,R,"pt",0,function(e,t){var r=String(e).split(".")[0];return t?"other":0==r||1==r?"one":"other"},"pt_PT",0,I,"rm",0,R,"ro",0,function(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e&&r[0].slice(-2);return t?1==e?"one":"other":1==e&&n?"one":!n||0==e||o>=2&&o<=19?"few":"other"},"rof",0,R,"root",0,B,"ru",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-1),s=n.slice(-2);return t?"other":o&&1==i&&11!=s?"one":o&&i>=2&&i<=4&&(s<12||s>14)?"few":o&&0==i||o&&i>=5&&i<=9||o&&s>=11&&s<=14?"many":"other"},"rwk",0,R,"sah",0,B,"saq",0,R,"sc",0,function(e,t){var r=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&r?"one":"other"},"scn",0,function(e,t){var r=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&r?"one":"other"},"sd",0,R,"sdh",0,R,"se",0,L,"seh",0,R,"ses",0,B,"sg",0,B,"sh",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},"shi",0,function(e,t){var r=Number(String(e).split(".")[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},"si",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"";return t?"other":0==e||1==e||0==n&&1==o?"one":"other"},"sk",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1];return t?"other":1==e&&o?"one":n>=2&&n<=4&&o?"few":o?"other":"many"},"sl",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=n.slice(-2);return t?"other":o&&1==i?"one":o&&2==i?"two":o&&(3==i||4==i)||!o?"few":"other"},"sma",0,L,"smi",0,L,"smj",0,L,"smn",0,L,"sms",0,L,"sn",0,R,"so",0,R,"sq",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e,o=n&&r[0].slice(-1),i=n&&r[0].slice(-2);return t?1==e?"one":4==o&&14!=i?"many":"other":1==e?"one":"other"},"sr",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=n.slice(-2),l=o.slice(-1),c=o.slice(-2);return t?"other":i&&1==s&&11!=a||1==l&&11!=c?"one":i&&s>=2&&s<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},"ss",0,R,"ssy",0,R,"st",0,R,"su",0,B,"sv",0,function(e,t){var r=String(e).split("."),n=!r[1],o=Number(r[0])==e,i=o&&r[0].slice(-1),s=o&&r[0].slice(-2);return t?(1==i||2==i)&&11!=s&&12!=s?"one":"other":1==e&&n?"one":"other"},"sw",0,I,"syr",0,R,"ta",0,R,"te",0,R,"teo",0,R,"th",0,B,"ti",0,D,"tig",0,R,"tk",0,function(e,t){var r=String(e).split("."),n=Number(r[0])==e&&r[0].slice(-1);return t?6==n||9==n||10==e?"few":"other":1==e?"one":"other"},"tl",0,function(e,t){var r=String(e).split("."),n=r[0],o=r[1]||"",i=!r[1],s=n.slice(-1),a=o.slice(-1);return t?1==e?"one":"other":i&&(1==n||2==n||3==n)||i&&4!=s&&6!=s&&9!=s||!i&&4!=a&&6!=a&&9!=a?"one":"other"},"tn",0,R,"to",0,B,"tr",0,R,"ts",0,R,"tzm",0,function(e,t){var r=Number(String(e).split(".")[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},"ug",0,R,"uk",0,function(e,t){var r=String(e).split("."),n=r[0],o=!r[1],i=Number(r[0])==e,s=i&&r[0].slice(-1),a=i&&r[0].slice(-2),l=n.slice(-1),c=n.slice(-2);return t?3==s&&13!=a?"few":"other":o&&1==l&&11!=c?"one":o&&l>=2&&l<=4&&(c<12||c>14)?"few":o&&0==l||o&&l>=5&&l<=9||o&&c>=11&&c<=14?"many":"other"},"ur",0,I,"uz",0,R,"ve",0,R,"vi",0,function(e,t){return t&&1==e?"one":"other"},"vo",0,R,"vun",0,R,"wa",0,D,"wae",0,R,"wo",0,B,"xh",0,R,"xog",0,R,"yi",0,I,"yo",0,B,"yue",0,B,"zh",0,B,"zu",0,function(e,t){return t?"other":e>=0&&e<=1?"one":"other"}],727307);var j=e.i(727307);try{var F="u">typeof window?window:e.g;F._sentryModuleMetadata=F._sentryModuleMetadata||{},F._sentryModuleMetadata[(new F.Error).stack]=Object.assign({},F._sentryModuleMetadata[(new F.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var V=Object.defineProperty,z=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,$=Object.prototype.hasOwnProperty,H=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text c
6ase"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all c
6ontent within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all c
6ontent within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),U={};((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of K(t))$.call(e,o)||o===r||V(e,o,{get:()=>t[o],enumerable:!(n=z(t,o))||n.enumerable});return})(U,j,"default"),A.loadLocaleData("en",{plurals:U.en}),A.load("en",H),A.activate("en"),e.s([],121247);var W=e.i(91155),q=e.i(350219),J=e.i(812121),G=e.i(964892);e.i(377222);var Y=e.i(713249);try{var X="u">typeof window?window:e.g;X._sentryModuleMetadata=X._sentryModuleMetadata||{},X._sentryModuleMetadata[(new X.Error).stack]=Object.assign({},X._sentryModuleMetadata[(new X.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var Z=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,ee=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?Q(t,r):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&Z(t,r,i),i},et=class extends W.NodeExtension{get name(){return"doc"}createNodeSpec(e,t){let{docAttributes:r,content:n}=this.options,o=(0,q.object)();if((0,q.isPlainObject)(r))for(let[e,t]of(0,q.entries)(r))o[e]={default:t};else for(let e of r)o[e]={default:null};return{attrs:o,content:n,...t}}setDocAttributes(e){return({tr:t,dispatch:r})=>{if(r){for(let[r,n]of Object.entries(e))t.step(new eo(r,n));r(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return(0,G.isDefaultDocNode)(e.doc,t)}};ee([(0,W.command)()],et.prototype,"setDocAttributes",1),ee([(0,W.helper)()],et.prototype,"isDefaultDocNode",1),et=ee([(0,W.extension)({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:J.ExtensionPriority.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],et);var er="SetDocAttribute",en="RevertSetDocAttribute",eo=class e extends Y.Step{static fromJSON(t,r){return new e(r.key,r.value,r.stepType)}key;stepType;value;previous;constructor(e,t,r=er){super(),this.stepType=r,this.key=e,this.value=t}apply(e){this.previous=e.attrs[this.key];let t={...e.attrs,[this.key]:this.value};return Y.StepResult.ok(e.type.create(t,e.content,e.marks))}invert(){return new e(this.key,this.previous,en)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{Y.Step.jsonID(er,eo),Y.Step.jsonID(en,eo)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}e.s(["DocExtension",0,et],842685)},12838,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=function(e){var t,r,n;return!!(t=e)&&"object"==typeof t&&(r=e,"[object RegExp]"!==(n=Object.prototype.toString.call(r))&&"[object Date]"!==n&&r.$$typeof!==i)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?d(Array.isArray(e)?[]:{},e,t):e}function a(e,t,r){return e.concat(t).map(function(e){return s(e,r)})}function l(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function c(e,t){try{return t in e}catch(e){return!1}}function d(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||a,r.isMergeableObject=r.isMergeableObject||o,r.cloneUnlessOtherwiseSpecified=s;var n,i,u=Array.isArray(t);
6return u!==Array.isArray(e)?s(t,r):u?r.arrayMerge(e,t,r):(i={},(n=r).isMergeableObject(e)&&l(e).forEach(function(t){i[t]=s(e[t],n)}),l(t).forEach(function(r){c(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))||(c(e,r)&&n.isMergeableObject(t[r])?i[r]=(function(e,t){if(!t.customMerge)return d;var r=t.customMerge(e);return"function"==typeof r?r:d})(r,n)(e[r],t[r],n):i[r]=s(t[r],n))}),i)}d.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return d(e,r,t)},{})},t.exports=d},835138,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}t.exports=e=>{if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},910612,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var n,o,i,s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},521755,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(475608);function i(e){return!0===o(e)&&"[object Object]"===Object.prototype.toString.call(e)}t.exports=function(e){var t,r;return!1!==i(e)&&"function"==typeof(t=e.constructor)&&!1!==i(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")}},737467,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(521755);t.exports=function(e){return o(e)||"function"==typeof e||Array.isArray(e)}},8011,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(737467);t.exports=function(e,t,r){if(!o(e))return{};"function"==typeof t&&(r=t,t=[]),"string"==typeof t&&(t=[t]);for(var n="function"==typeof r,i=Object.keys(e),s={},a=0;a<i.length;a++){var l=i[a],c=e[l];(!t||-1===t.indexOf(l)&&(!n||r(c,l,e)))&&(s[l]=c)}return s}},475608,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}t.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},939139,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o="u">typeof Reflect?Reflect.construct:void 0,i=Object.defineProperty,s=Error.captureStackTrace;function a(e){void 0!==e&&i(this,"message",{configurable:!0,value:e,writable:!0});var t=this.constructor.name;void 0!==t&&t!==this.name&&i(this,"name",{configurable:!0,value:t,writable:!0}),s(this,this.constructor)}void 0===s&&(s=function(e){var t=Error();i(e,"stack",{configurable:!0,get:function(){var e=t.stack;return i(this,"stack",{configurable:!0,value:e,writable:!0}),e},set:function(t){i(e,"stack",{configurable:!0,value:t,writable:!0})}})}),a.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:a,writable:!0}});var l=function(){function e(e,t){return i(e,"name",{configurable:!0,value:t})}try{var t=function(){};if(e(t,"foo"),"foo"===t.name)return e}catch(e){}}();(t.exports=function(e,t){if(null==t||t===Error)t=a;else if("function"!=typeof t)throw TypeError("super_ should be a function");if("string"==typeof e)r=e,e=void 0!==o?function(){return o(t,arguments,this.constructor)}:function(){t.apply(this,arguments)},void 0!==l&&(l(e,r),r=void 0);else if("function"!=typeof e)throw TypeError("constructor should be either a string or a function");e.super_=e.super=t;var r,n={constructor:{configurable:!0,value:e,writable:!0}};return void 0!==r&&(n.name={configurable:!0,value:r,writable:!0}),e.prototype=Object.create(t.prototype,n),e}).BaseError=a},856348,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var o=e.r(475608);t.exports=function(e,t){if(!o(e)&&"function"!=typeof e)return{};var r={};if("string"==typeof t)return t in e&&(r[t]=e[t]),r;for(var n=t.length,i=-1;++i<n;){var s=t[i];s in e&&(r[s]=e[s])}return r}},131449,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function o(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;
6n.forEach(function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function i(t,i,s){var a=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(a),o+a+o}r.forEach(function(e,n){for(var o,s=0;e!=o;)if(o=e,e=e.replace(t,i),s++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e}),n=n.reverse(),r=r.map(function(t){return n.forEach(function(r){t=t.replace(RegExp("(\\"+o+r+"\\"+o+")","g"),e[0]+"$1"+e[1])}),t})});var s=RegExp("\\"+o+"([0-9]+)\\"+o);return i?r:function e(t,r,n){for(var o,i=[],a=0;o=s.exec(t);){if(a++>1e4)throw Error("Circular references in parenthesis");i.push(t.slice(0,o.index)),i.push(e(r[o[1]],r)),t=t.slice(o.index+o[0].length)}return i.push(t),i}(r[0],r)}function i(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",o=e[0];if(!o)return"";for(var i=RegExp("\\"+n+"([0-9]+)\\"+n),s=0;o!=r;){if(s++>1e4)throw Error("Circular references in "+e);r=o,o=o.replace(i,a)}return o}return e.reduce(function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r},"");function a(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function s(e,t){return Array.isArray(e)?i(e,t):o(e,t)}s.parse=o,s.stringify=i,t.exports=s},969941,e=>{"use strict";var t=e.i(999161);try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var n=e=>e instanceof Date,o=e=>null==e,i=e=>!o(e)&&!Array.isArray(e)&&"object"==typeof e&&!n(e),s=e=>i(e)&&e.target?"checkbox"===e.target.type?e.target.checked:e.target.value:e,a=(e,t)=>e.has(t.substring(0,t.search(/\.\d+(\.|$)/))||t),l="u">typeof window&&void 0!==window.HTMLElement&&"u">typeof document;function c(e){let t,r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{let n;if(!(!(l&&(e instanceof Blob||e instanceof FileList))&&(r||i(e))))return e;if(t=r?[]:{},r||i(n=e.constructor&&e.constructor.prototype)&&n.hasOwnProperty("isPrototypeOf"))for(let r in e)e.hasOwnProperty(r)&&(t[r]=c(e[r]));else t=e}return t}var d=e=>Array.isArray(e)?e.filter(Boolean):[],u=e=>void 0===e,h=(e,t,r)=>{if(!t||!i(e))return r;let n=d(t.split(/[,[\].]+?/)).reduce((e,t)=>o(e)?e:e[t],e);return u(n)||n===e?u(e[t])?r:e[t]:n};let p="blur",f="onChange",m="onSubmit",g="maxLength",y="minLength",w="pattern",v="required",b=t.default.createContext(null),M=()=>t.default.useContext(b);var x=(e,t,r,n=!0)=>{let o={defaultValues:t._defaultValues};for(let i in e)Object.defineProperty(o,i,{get:()=>("all"!==t._proxyFormState[i]&&(t._proxyFormState[i]=!n||"all"),r&&(r[i]=!0),e[i])});return o},S=e=>i(e)&&!Object.keys(e).length,k=(e,t,r,n)=>{r(e);let{name:o,...i}=e;return S(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!n||"all"))},E=e=>Array.isArray(e)?e:[e],_=(e,t,r)=>!e||!t||e===t||E(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));function C(e){let r=t.default.useRef(e);r.current=e,t.default.useEffect(()=>{let t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}var O=(e,t,r,n,o)=>"string"==typeof e?(n&&t.watch.add(e),h(r,e,o)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),h(r,e))):(n&&(t.watchAll=!0),r);function T(e){let r=M(),{control:n=r.control,name:o,defaultValue:i,disabled:s,exact:a}=e||{},l=t.default.useRef(o);l.current=o,C({disabled:s,subject:n._subjects.values,next:e=>{_(l.current,e.name,a)&&u(c(O(l.current,n._names,e.values||n._formValues,!1,i)))}});let[d,u]=t.default.useState(n._getWatch(o,i));return t.default.useEffect(()=>n._removeUnmounted()),d}var A=e=>d(e.replace(/["|']|\]/g,"").split(/\.|\[/));function N(e,t,r){let n=-1,o=/^\w*$/.test(t)?[t]:A(t),s=o.length,a=s-1;for(;++n<s;){let t=o[n],s=r;if(n!==a){let r=e[t];s=i(r)||Array.isArray(r)?r:isNaN(+o[n+1])?{}:[]}e[t]=s,e=e[t]}return e}function P(e){let r=M(),{name:n,disabled:o,control:i=r.control,shouldUnregister:l}=e,d=a(i._names.array,n),f=T({control:i,name:n,defaultValue:h(i._formValues,n,h(i._defaultValues,n,e.defaultValue)),exact:!0}),m=function(e){let r=M(),{control:n=r.control,disabled:o,name:i,exact:s}=e||{},[a,l]=t.default.useState(n._formState),c=t.default.useRef(!0),d=t.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=t.default.useRef(i);return u.current=i,C({disabled:o,next:e=>c.current&&_(u.current,e.name,s)&&k(e,d.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),t.default.useEffect(()=>
6(c.current=!0,d.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),x(a,n,d.current,!1)}({control:i,name:n}),g=t.default.useRef(i.register(n,{...e.rules,value:f}));return g.current=i.register(n,e.rules),t.default.useEffect(()=>{let e=i._options.shouldUnregister||l,t=(e,t)=>{let r=h(i._fields,e);r&&(r._f.mount=t)};if(t(n,!0),e){let e=c(h(i._options.defaultValues,n));N(i._defaultValues,n,e),u(h(i._formValues,n))&&N(i._formValues,n,e)}return()=>{(d?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,d,l]),t.default.useEffect(()=>{h(i._fields,n)&&i._updateDisabledField({disabled:o,fields:i._fields,name:n,value:h(i._fields,n)._f.value})},[o,n,i]),{field:{name:n,value:f,..."boolean"==typeof o||"boolean"==typeof m.disabled?{disabled:m.disabled||o}:{},onChange:t.default.useCallback(e=>g.current.onChange({target:{value:s(e),name:n},type:"change"}),[n]),onBlur:t.default.useCallback(()=>g.current.onBlur({target:{value:h(i._formValues,n),name:n},type:p}),[n,i]),ref:e=>{let t=h(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!h(m.errors,n)},isDirty:{enumerable:!0,get:()=>!!h(m.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!h(m.touchedFields,n)},error:{enumerable:!0,get:()=>h(m.errors,n)}})}}var R=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},D=()=>{let e="u"<typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)})},I=(e,t,r={})=>r.shouldFocus||u(r.shouldFocus)?r.focusName||`${e}.${u(r.focusIndex)?t:r.focusIndex}.`:"",B=e=>({isOnSubmit:!e||e===m,isOnBlur:"onBlur"===e,isOnChange:e===f,isOnAll:"all"===e,isOnTouch:"onTouched"===e}),L=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let j=(e,t,r,n)=>{for(let o of r||Object.keys(e)){let r=h(e,o);if(r){let{_f:e,...s}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!n)break;else if(e.ref&&t(e.ref,e.name)&&!n)break}else i(s)&&j(s,t)}}};var F=(e,t,r)=>{let n=d(h(e,r));return N(n,"root",t[r]),N(e,r,n),e}
6,V=e=>"function"==typeof e,z=e=>{if(!l)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},K=e=>"string"==typeof e;let $={value:!1,isValid:!1},H={value:!0,isValid:!0};var U=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!u(e[0].attributes.value)?u(e[0].value)||""===e[0].value?H:{value:e[0].value,isValid:!0}:H:$}return $};let W={isValid:!1,value:null};var q=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,W):W;function J(e,t,r="validate"){if(K(e)||Array.isArray(e)&&e.every(K)||"boolean"==typeof e&&!e)return{type:r,message:K(e)?e:"",ref:t}}var G=e=>!i(e)||e instanceof RegExp?{value:e,message:""}:e,Y=async(e,t,r,n,s)=>{let{ref:a,refs:l,required:c,maxLength:d,minLength:p,min:f,max:m,pattern:b,validate:M,name:x,valueAsNumber:k,mount:E,disabled:_}=e._f,C=h(t,x);if(!E||_)return{};let O=l?l[0]:a,T=e=>{n&&O.reportValidity&&(O.setCustomValidity("boolean"==typeof e?"":e||""),O.reportValidity())},A={},N="radio"===a.type,P="checkbox"===a.type,D=(k||"file"===a.type)&&u(a.value)&&u(C)||z(a)&&""===a.value||""===C||Array.isArray(C)&&!C.length,I=R.bind(null,x,r,A),B=(e,t,r,n=g,o=y)=>{let i=e?t:r;A[x]={type:e?n:o,message:i,ref:a,...I(e?n:o,i)}};if(s?!Array.isArray(C)||!C.length:c&&(!(N||P)&&(D||o(C))||"boolean"==typeof C&&!C||P&&!U(l).isValid||N&&!q(l).isValid)){let{value:e,message:t}=K(c)?{value:!!c,message:c}:G(c);if(e&&(A[x]={type:v,message:t,ref:O,...I(v,t)},!r))return T(t),A}if(!D&&(!o(f)||!o(m))){let e,t,n=G(m),i=G(f);if(o(C)||isNaN(C)){let r=a.valueAsDate||new Date(C),o=e=>new Date(new Date().toDateString()+" "+e),s="time"==a.type,l="week"==a.type;"string"==typeof n.value&&C&&(e=s?o(C)>o(n.value):l?C>n.value:r>new Date(n.value)),"string"==typeof i.value&&C&&(t=s?o(C)<o(i.value):l?C<i.value:r<new Date(i.value))}else{let r=a.valueAsNumber||(C?+C:C);o(n.value)||(e=r>n.value),o(i.value)||(t=r<i.value)}if((e||t)&&(B(!!e,n.message,i.message,"max","min"),!r))return T(A[x].message),A}if((d||p)&&!D&&("string"==typeof C||s&&Array.isArray(C))){let e=G(d),t=G(p),n=!o(e.value)&&C.length>+e.value,i=!o(t.value)&&C.length<+t.value;if((n||i)&&(B(n,e.message,t.message),!r))return T(A[x].message),A}if(b&&!D&&"string"==typeof C){let{value:e,message:t}=G(b);if(e instanceof RegExp&&!C.match(e)&&(A[x]={type:w,message:t,ref:a,...I(w,t)},!r))return T(t),A}if(M){if(V(M)){let e=J(await M(C,t),O);if(e&&(A[x]={...e,...I("validate",e.message)},!r))return T(e.message),A}else if(i(M)){let e={};for(let n in M){if(!S(e)&&!r)break;let o=J(await M[n](C,t),O,n);o&&(e={...o,...I(n,o.message)},T(o.message),r&&(A[x]=e))}if(!S(e)&&(A[x]={ref:O,...e},!r))return A}}return T(!0),A};function X(e,t){return[...e,...E(t)]}var Z=e=>Array.isArray(e)?e.map(()=>void 0):void 0;function Q(e,t,r){return[...e.slice(0,t),...E(r),...e.slice(t)]}var ee=(e,t,r)=>Array.isArray(e)?(u(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function et(e,t){return[...E(t),...E(e)]}var er=(e,t)=>u(t)?[]:function(e,t){let r=0,n=[...e];for(let e of t)n.splice(e-r,1),r++;return d(n).length?n:[]}(e,E(t).sort((e,t)=>e-t)),en=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function eo(e,t){let r=Array.isArray(t)?t:/^\w*$/.test(t)?[t]:A(t),n=1===r.length?e:function(e,t){let r=t.slice(0,-1).length,n=0;for(;n<r;)e=u(e)?n++:e[t[n++]];return e}(e,r),o=r.length-1,s=r[o];return n&&delete n[s],0!==o&&(i(n)&&S(n)||Array.isArray(n)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!u(e[t]))return!1;return!0}(n))&&eo(e,r.slice(0,-1)),e}var ei=(e,t,r)=>(e[t]=r,e);function es(){let e=[];return{get observers(){return e},next:t=>{for(let r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var ea=e=>o(e)||"object"!=typeof e;function el(e,t){if(ea(e)||ea(t))return e===t;if(n(e)&&n(t))return e.getTime()===t.getTime();let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;
6for(let s of r){let r=e[s];if(!o.includes(s))return!1;if("ref"!==s){let e=t[s];if(n(r)&&n(e)||i(r)&&i(e)||Array.isArray(r)&&Array.isArray(e)?!el(r,e):r!==e)return!1}}return!0}var ec=e=>z(e)&&e.isConnected,ed=e=>{for(let t in e)if(V(e[t]))return!0;return!1};function eu(e,t={}){let r=Array.isArray(e);if(i(e)||r)for(let r in e)Array.isArray(e[r])||i(e[r])&&!ed(e[r])?(t[r]=Array.isArray(e[r])?[]:{},eu(e[r],t[r])):o(e[r])||(t[r]=!0);return t}var eh=(e,t)=>(function e(t,r,n){let s=Array.isArray(t);if(i(t)||s)for(let s in t)Array.isArray(t[s])||i(t[s])&&!ed(t[s])?u(r)||ea(n[s])?n[s]=Array.isArray(t[s])?eu(t[s],[]):{...eu(t[s])}:e(t[s],o(r)?{}:r[s],n[s]):n[s]=!el(t[s],r[s]);return n})(e,t,eu(t)),ep=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>u(e)?e:t?""===e?NaN:e?+e:e:r&&"string"==typeof e?new Date(e):n?n(e):e;function ef(e){let t=e.ref;if(e.refs?!e.refs.every(e=>e.disabled):!t.disabled)return"file"===t.type?t.files:"radio"===t.type?q(e.refs).value:"select-multiple"===t.type?[...t.selectedOptions].map(({value:e})=>e):"checkbox"===t.type?U(e.refs).value:ep(u(t.value)?e.ref.value:t.value,e)}var em=e=>u(e)?e:e instanceof RegExp?e.source:i(e)?e.value instanceof RegExp?e.value.source:e.value:e;function eg(e,t,r){let n=h(e,r);if(n||/^\w*$/.test(r))return{error:n,name:r};let o=r.split(".");for(;o.length;){let n=o.join("."),i=h(t,n),s=h(e,n);if(i&&!Array.isArray(i)&&r!==n)break;if(s&&s.type)return{name:n,error:s};o.pop()}return{name:r}}let ey={mode:m,reValidateMode:f,shouldFocusError:!0};e.s(["Controller",0,e=>e.render(P(e)),"FormProvider",0,e=>{let{children:r,...n}=e;return t.default.createElement(b.Provider,{value:n},r)},"appendErrors",0,R,"get",0,h,"set",0,N,"useController",0,P,"useFieldArray",0,function(e){let r=M(),{control:n=r.control,name:o,keyName:i="id",shouldUnregister:s}=e,[a,l]=t.default.useState(n._getFieldArray(o)),d=t.default.useRef(n._getFieldArray(o).map(D)),u=t.default.useRef(a),p=t.default.useRef(o),f=t.default.useRef(!1);p.current=o,u.current=a,n._names.array.add(o),e.rules&&n.register(o,e.rules),C({next:({values:e,name:t})=>{if(t===p.current||!t){let t=h(e,p.current);Array.isArray(t)&&(l(t),d.current=t.map(D))}},subject:n._subjects.array});let m=t.default.useCallback(e=>{f.current=!0,n._updateFieldArray(o,e)},[n,o]);return t.default.useEffect(()=>{if(n._state.action=!1,L(o,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!B(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([o]).then(e=>{let t=h(e.errors,o),r=h(n._formState.errors,o);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?N(n._formState.errors,o,t):eo(n._formState.errors,o),n._subjects.state.next({errors:n._formState.errors}))});else{let e=h(n._fields,o);e&&e._f&&Y(e,n._formValues,"all"===n._options.criteriaMode,n._options.shouldUseNativeValidation,!0).then(e=>!S(e)&&n._subjects.state.next({errors:F(n._formState.errors,e,o)}))}n._subjects.values.next({name:o,values:{...n._formValues}}),n._names.focus&&j(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._updateValid(),f.current=!1},[a,o,n]),t.default.useEffect(()=>(h(n._formValues,o)||n._updateFieldArray(o),()=>{(n._options.shouldUnregister||s)&&n.unregister(o)}),[o,n,i,s]),{swap:t.default.useCallback((e,t)=>{let r=n._getFieldArray(o);en(r,e,t),en(d.current,e,t),m(r),l(r),n._updateFieldArray(o,r,en,{argA:e,argB:t},!1)},[m,o,n]),move:t.default.useCallback((e,t)=>{let r=n._getFieldArray(o);ee(r,e,t),ee(d.current,e,t),m(r),l(r),n._updateFieldArray(o,r,ee,{argA:e,argB:t},!1)},[m,o,n]),prepend:t.default.useCallback((e,t)=>{let r=E(c(e)),i=et(n._getFieldArray(o),r);n._names.focus=I(o,0,t),d.current=et(d.current,r.map(D)),m(i),l(i),n._updateFieldArray(o,i,et,{argA:Z(e)})},[m,o,n]),append:t.default.useCallback((e,t)=>{let r=E(c(e)),i=X(n._getFieldArray(o),r);n._names.focus=I(o,i.length-1,t),d.current=X(d.current,r.map(D)),m(i),l(i),n._updateFieldArray(o,i,X,{argA:Z(e)})},[m,o,n]),remove:t.default.useCallback(e=>{let t=er(n._getFieldArray(o),e);d.current=er(d.current,e),m(t),l(t),n._updateFieldArray(o,t,er,{argA:e})},[m,o,n]),insert:t.default.useCallback((e,t,r)=>{let i=E(c(t)),s=Q(n._getFieldArray(o),e,i);n._names.focus=I(o,e,r),d.current=Q(d.current,e,i.map(D)),m(s),l(s),n._updateFieldArray(o,s,Q,{argA:e,argB:Z(t)})},[m,o,n]),update:t.default.useCallback((e,t)=>{let r=c(t),i=ei(n._getFieldArray(o),e,r);d.current=[...i].map((t,r)=>t&&r!==e?d.current[r]:D()),m(i),l([...i]),n._updateFieldArray(o,i,ei,{argA:e,argB:r},!0,!1)},[m,o,n]),replace:t.default.useCallback(e=>{let t=E(c(e));d.current=t.map(D),m([...t]),l([...t]),n._updateFieldArray(o,[...t],e=>e,{},!0,!1)},[m,o,n]),fields:t.default.useMemo(()=>a.map((e,t)=>({...e,[i]:d.current[t]||D()})),[a,i])}},"useForm",0,function(e={}){let r=t.default.useRef(),f=t.default.useRef(),[m,g]=t.default.useState({isDirty:!1,isValidating:!1,isLoading:V(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:V(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...function(e={},t){let r,f={...ey,...e},m={submitCount:0,isDirty:!1,isLoading:V(f.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},g={},y=(i(f.defaultValues)||i(f.values))&&c(f.defaultValues||f.values)||{},w=f.shouldUnregister?{}:c(y),v={action:!1,mount:!1,watch:!1},b={mount:new Set,unMount:new Set,array:new Set,watch:new Set},M=0,x={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},k={values:es(),array:es(),state:es()},_=e.resetOptions&&e.resetOptions.keepDirtyValues,C=B(f.mode),T=B(f.reValidateMode),A="all"===f.criteriaMode,P=async e=>{if(x.isValid||e){let e=f.resolver?S((await K()).errors):await H(g,!0);e!==m.isValid&&k.state.next({isValid:e})}},R=e=>x.isValidating&&k.state.next({isValidating:e}),D=(e,t,r,n)=>{let o=h(g,e);if(o){let i=h(w,e,u(r)?h(y,e):r);u(i)||n&&n.defaultChecked||t?N(w,e,t?i:ef(o._f)):q(e,i),v.mount&&P()}},I=(e,t,r,n,o)=>{let i=!1,s=!1,a={name:e};if(!r||n){x.isDirty&&(s=m.isDirty,m.isDirty=a.isDirty=U(),i=s!==a.isDirty);let r=el(h(y,e),t);s=h(m.dirtyFields,e),r?eo(m.dirtyFields,e):N(m.dirtyFields,e,!0),a.dirtyFields=m.dirtyFields,i=i||x.dirtyFields&&!r!==s}if(r){let t=h(m.touchedFields,e);t||(N(m.touchedFields,e,r),a.touchedFields=m.touchedFields,i=i||x.touchedFields&&t!==r)}return i&&o&&k.state.next(a),i?a:{}},K=async e=>f.resolver(w,f.context,((e,t,r,n)=>{let o={};for(let r of e){let e=h(t,r);e&&N(o,r,e._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}})(e||b.mount,g,f.criteriaMode,f.shouldUseNativeValidation)),$=async e=>{let{errors:t}=await K(e);if(e)for(let r of e){let e=h(t,r);e?N(m.errors,r,e):eo(m.errors,r)}else m.errors=t;return t},H=async(e,t,r={valid:!0})=>{for(let n in e){let o=e[n];if(o){let{_f:e,...n}=o;if(e){let n=b.array.has(e.name),i=await Y(o,w,A,f.shouldUseNativeValidation&&!t,n);if(i[e.name]&&(r.valid=!1,t))break;t||(h(i,e.name)?n?F(m.errors,i,e.name):N(m.errors,e.name,i[e.name]):eo(m.errors,e.name))}n&&await H(n,t,r)}}return r.valid},U=(e,t)=>(e&&t&&N(w,e,t),!el(ee(),y)),W=(e,t,r)=>O(e,b,{...v.mount?w:u(t)?y:"string"==typeof e?{[e]:t}:t},r,t),q=(e,t,r={})=>{let n=h(g,e),i=t;if(n){let r=n._f;r&&(r.disabled||N(w,e,ep(t,r)),i=z(r.ref)&&o(t)?"":t,"select-multiple"===r.ref.type?[...r.ref.options].forEac
6h(e=>e.selected=i.includes(e.value)):r.refs?"checkbox"===r.ref.type?r.refs.length>1?r.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find(t=>t===e.value):i===e.value)):r.refs[0]&&(r.refs[0].checked=!!i):r.refs.forEach(e=>e.checked=e.value===i):"file"===r.ref.type?r.ref.value="":(r.ref.value=i,r.ref.type||k.values.next({name:e,values:{...w}})))}(r.shouldDirty||r.shouldTouch)&&I(e,i,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&Q(e)},J=(e,t,r)=>{for(let o in t){let i=t[o],s=`${e}.${o}`,a=h(g,s);!b.array.has(e)&&ea(i)&&(!a||a._f)||n(i)?q(s,i,r):J(s,i,r)}},G=(e,r,n={})=>{let i=h(g,e),s=b.array.has(e),a=c(r);N(w,e,a),s?(k.array.next({name:e,values:{...w}}),(x.isDirty||x.dirtyFields)&&n.shouldDirty&&k.state.next({name:e,dirtyFields:eh(y,w),isDirty:U(e,a)})):!i||i._f||o(a)?q(e,a,n):J(e,a,n),L(e,b)&&k.state.next({...m}),k.values.next({name:e,values:{...w}}),v.mount||t()},X=async t=>{let n=t.target,o=n.name,i=!0,a=h(g,o),l=e=>{i=Number.isNaN(e)||e===h(w,o,e)};if(a){var c,d,u,y,v;let D,B,j,F=n.type?ef(a._f):s(t),V=t.type===p||"focusout"===t.type,z=!((j=a._f).mount&&(j.required||j.min||j.max||j.maxLength||j.minLength||j.pattern||j.validate))&&!f.resolver&&!h(m.errors,o)&&!a._f.deps||(c=V,d=h(m.touchedFields,o),u=m.isSubmitted,y=T,!(v=C).isOnAll&&(!u&&v.isOnTouch?!(d||c):(u?y.isOnBlur:v.isOnBlur)?!c:(u?!y.isOnChange:!v.isOnChange)||c)),$=L(o,b,V);N(w,o,F),V?(a._f.onBlur&&a._f.onBlur(t),r&&r(0)):a._f.onChange&&a._f.onChange(t);let U=I(o,F,V,!1),W=!S(U)||$;if(V||k.values.next({name:o,type:t.type,values:{...w}}),z)return x.isValid&&P(),W&&k.state.next({name:o,...$?{}:U});if(!V&&$&&k.state.next({...m}),R(!0),f.resolver){let{errors:e}=await K([o]);if(l(F),i){let t=eg(m.errors,g,o),r=eg(e,g,t.name||o);D=r.error,o=r.name,B=S(e)}}else D=(await Y(a,w,A,f.shouldUseNativeValidation))[o],l(F),i&&(D?B=!1:x.isValid&&(B=await H(g,!0)));if(i){a._f.deps&&Q(a._f.deps);var E=o,_=B,O=D;let t=h(m.errors,E),n=x.isValid&&"boolean"==typeof _&&m.isValid!==_;if(e.delayError&&O){let t;t=()=>{N(m.errors,E,O),k.state.next({errors:m.errors})},(r=e=>{clearTimeout(M),M=setTimeout(t,e)})(e.delayError)}else clearTimeout(M),r=null,O?N(m.errors,E,O):eo(m.errors,E);if((O?!el(t,O):t)||!S(U)||n){let e={...U,...n&&"boolean"==typeof _?{isValid:_}:{},errors:m.errors,name:E};m={...m,...e},k.state.next(e)}R(!1)}}},Z=(e,t)=>{if(h(m.errors,t)&&e.focus)return e.focus(),1},Q=async(e,t={})=>{let r,n,o=E(e);if(R(!0),f.resolver){let t=await $(u(e)?e:o);r=S(t),n=e?!o.some(e=>h(t,e)):r}else e?((n=(await Promise.all(o.map(async e=>{let t=h(g,e);return await H(t&&t._f?{[e]:t}:t)}))).every(Boolean))||m.isValid)&&P():n=r=await H(g);return k.state.next({..."string"!=typeof e||x.isValid&&r!==m.isValid?{}:{name:e},...f.resolver||!e?{isValid:r}:{},errors:m.errors,isValidating:!1}),t.shouldFocus&&!n&&j(g,Z,e?o:b.mount),n},ee=e=>{let t={...y,...v.mount?w:{}};return u(e)?t:"string"==typeof e?h(t,e):e.map(e=>h(t,e))},et=(e,t)=>({invalid:!!h((t||m).errors,e),isDirty:!!h((t||m).dirtyFields,e),isTouched:!!h((t||m).touchedFields,e),error:h((t||m).errors,e)}),er=(e,t,r)=>{let n=(h(g,e,{_f:{}})._f||{}).ref;N(m.errors,e,{...t,ref:n}),k.state.next({name:e,errors:m.errors,isValid:!1}),r&&r.shouldFocus&&n&&n.focus&&n.focus()},en=(e,t={})=>{for(let r of e?E(e):b.mount)b.mount.delete(r),b.array.delete(r),t.keepValue||(eo(g,r),eo(w,r)),t.keepError||eo(m.errors,r),t.keepDirty||eo(m.dirtyFields,r),t.keepTouched||eo(m.touchedFields,r),f.shouldUnregister||t.keepDefaultValue||eo(y,r);k.values.next({values:{...w}}),k.state.next({...m,...!t.keepDirty?{}:{isDirty:U()}}),t.keepIsValid||P()},ei=({disabled:e,name:t,field:r,fields:n,value:o})=>{if("boolean"==typeof e){let i=e?void 0:u(o)?ef(r?r._f:h(n,t)._f):o;N(w,t,i),I(t,i,!1,!1,!0)}},ed=(e,t={})=>{let r=h(g,e),n="boolean"==typeof t.disabled;return N(g,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),b.mount.add(e),r?ei({field:r,disabled:t.disabled,name:e}):D(e,!0,t.value),{...n?{disabled:t.disabled}:{},...f.progressive?{required:!!t.required,min:em(t.min),max:em(t.max),minLength:em(t.minLength),maxLength:em(t.maxLength),pattern:em(t.pattern)}:{}
6,name:e,onChange:X,onBlur:X,ref:n=>{if(n){let o;ed(e,t),r=h(g,e);let i=u(n.value)&&n.querySelectorAll&&n.querySelectorAll("input,select,textarea")[0]||n,s="radio"===(o=i).type||"checkbox"===o.type,a=r._f.refs||[];(s?a.find(e=>e===i):i===r._f.ref)||(N(g,e,{_f:{...r._f,...s?{refs:[...a.filter(ec),i,...Array.isArray(h(y,e))?[{}]:[]],ref:{type:i.type,name:e}}:{ref:i}}}),D(e,!1,void 0,i))}else(r=h(g,e,{}))._f&&(r._f.mount=!1),(f.shouldUnregister||t.shouldUnregister)&&!(a(b.array,e)&&v.action)&&b.unMount.add(e)}}},eu=()=>f.shouldFocusError&&j(g,Z,b.mount),ew=(e,t)=>async r=>{r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let n=c(w);if(k.state.next({isSubmitting:!0}),f.resolver){let{errors:e,values:t}=await K();m.errors=e,n=t}else await H(g);eo(m.errors,"root"),S(m.errors)?(k.state.next({errors:{}}),await e(n,r)):(t&&await t({...m.errors},r),eu(),setTimeout(eu)),k.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:S(m.errors),submitCount:m.submitCount+1,errors:m.errors})},ev=(r,n={})=>{let o=r?c(r):y,i=c(o),s=r&&!S(r)?i:y;if(n.keepDefaultValues||(y=o),!n.keepValues){if(n.keepDirtyValues||_)for(let e of b.mount)h(m.dirtyFields,e)?N(s,e,h(w,e)):G(e,h(s,e));else{if(l&&u(r))for(let e of b.mount){let t=h(g,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(z(e)){let t=e.closest("form");if(t){t.reset();break}}}}g={}}w=e.shouldUnregister?n.keepDefaultValues?c(y):{}:c(s),k.array.next({values:{...s}}),k.values.next({values:{...s}})}b={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},v.mount||t(),v.mount=!x.isValid||!!n.keepIsValid,v.watch=!!e.shouldUnregister,k.state.next({submitCount:n.keepSubmitCount?m.submitCount:0,isDirty:n.keepDirty?m.isDirty:!!(n.keepDefaultValues&&!el(r,y)),isSubmitted:!!n.keepIsSubmitted&&m.isSubmitted,dirtyFields:n.keepDirtyValues?m.dirtyFields:n.keepDefaultValues&&r?eh(y,r):{},touchedFields:n.keepTouched?m.touchedFields:{},errors:n.keepErrors?m.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&m.isSubmitSuccessful,isSubmitting:!1})},eb=(e,t)=>ev(V(e)?e(w):e,t);return{control:{register:ed,unregister:en,getFieldState:et,handleSubmit:ew,setError:er,_executeSchema:K,_getWatch:W,_getDirty:U,_updateValid:P,_removeUnmounted:()=>{for(let e of b.unMount){let t=h(g,e);t&&(t._f.refs?t._f.refs.every(e=>!ec(e)):!ec(t._f.ref))&&en(e)}b.unMount=new Set},_updateFieldArray:(e,t=[],r,n,o=!0,i=!0)=>{if(n&&r){if(v.action=!0,i&&Array.isArray(h(g,e))){let t=r(h(g,e),n.argA,n.argB);o&&N(g,e,t)}if(i&&Array.isArray(h(m.errors,e))){let t,i=r(h(m.errors,e),n.argA,n.argB);o&&N(m.errors,e,i),d(h(t=m.errors,e)).length||eo(t,e)}if(x.touchedFields&&i&&Array.isArray(h(m.touchedFields,e))){let t=r(h(m.touchedFields,e),n.argA,n.argB);o&&N(m.touchedFields,e,t)}x.dirtyFields&&(m.dirtyFields=eh(y,w)),k.state.next({name:e,isDirty:U(e,t),dirtyFields:m.dirtyFields,errors:m.errors,isValid:m.isValid})}else N(w,e,t)},_updateDisabledField:ei,_getFieldArray:t=>d(h(v.mount?w:y,t,e.shouldUnregister?h(y,t,[]):[])),_reset:ev,_resetDefaultValues:()=>V(f.defaultValues)&&f.defaultValues().then(e=>{eb(e,f.resetOptions),k.state.next({isLoading:!1})}),_updateFormState:e=>{m={...m,...e}},_disableForm:e=>{"boolean"==typeof e&&(k.state.next({disabled:e}),j(g,t=>{t.disabled=e},0,!1))},_subjects:k,_proxyFormState:x,get _fields(){return g},get _formValues(){return w},get _state(){return v},set _state(value){v=value},get _defaultValues(){return y},get _names(){return b},set _names(value){b=value},get _formState(){return m},set _formState(value){m=value},get _options(){return f},set _options(value){f={...f,...value}}},trigger:Q,register:ed,handleSubmit:ew,watch:(e,t)=>V(e)?k.values.subscribe({next:r=>e(W(void 0,t),r)}):W(e,t,!0),setValue:G,getValues:ee,reset:eb,resetField:(e,t={})=>{h(g,e)&&(u(t.defaultValue)?G(e,h(y,e)):(G(e,t.defaultValue),N(y,e,t.defaultValue)),t.keepTouched||eo(m.touchedFields,e),t.keepDirty||(eo(m.dirtyFields,e),m.isDirty=t.defaultValue?U(e,h(y,e)):U()),!t.keepError&&(eo(m.errors,e),x.isValid&&P()),k.state.next({...m}))},clearErrors:e=>{e&&E(e).forEach(e=>eo(m.errors,e)),k.state.next({errors:e?m.errors:{}})},unregister:en,setError:er,setFocus:(e,t={})=>{let r=h(g,e),n=r&&r._f;if(n){let e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:et}}(e,()=>g(e=>({...e}))),formState:m});let y=r.current.control;return y._options=e,C({subject:y._subjects.state,next:e=>{k(e,y._proxyFormState,y._updateFormState,!0)&&g({...y._formState})}}),t.default.useEffect(()=>y._disableForm(e.disabled),[y,e.disabled]),t.default.useEffect(()=>{if(y._proxyFormState.isDirty){let e=y._getDirty();e!==m.isDirty&&y._subjects.state.next({isDirty:e})}},[y,m.isDirty]),t.default.useEffect(()=>{e.values&&!el(e.values,f.current)?(y._reset(e.values,y._options.resetOptions),f.current=e.values):y._resetDefaultValues()},[e.values,y]),t.default.useEffect(()=>
6{y._state.mount||(y._updateValid(),y._state.mount=!0),y._state.watch&&(y._state.watch=!1,y._subjects.state.next({...y._formState})),y._removeUnmounted()}),r.current.formState=x(m,y),r.current},"useFormContext",0,M,"useWatch",0,T])},46667,(e,t,r)=>{"use strict";try{var n,o,i="u">typeof window?window:e.g;i._sentryModuleMetadata=i._sentryModuleMetadata||{},i._sentryModuleMetadata[(new i.Error).stack]=Object.assign({},i._sentryModuleMetadata[(new i.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}Object.defineProperty(r,"__esModule",{value:!0}),r.errorMessages=r.ErrorType=void 0,(o=n=r.ErrorType||(r.ErrorType={})).MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING",r.errorMessages=new Map([[n.MalformedUnicode,"malformed Unicode character escape sequence"],[n.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[n.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[n.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[n.EndOfString,"malformed escape sequence at end of string"]])},960572,(e,t,r)=>{"use strict";try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}Object.defineProperty(r,"__esModule",{value:!0}),r.unraw=r.errorMessages=r.ErrorType=void 0;let o=e.r(46667);function i(e,t,r){let n=e.match(/[^a-f0-9]/i)?NaN:parseInt(e,16);if(Number.isNaN(n)||void 0!==r&&r!==e.length)throw SyntaxError(o.errorMessages.get(t));return n}function s(e,t){let r=i(e,o.ErrorType.MalformedUnicode,4);return void 0!==t?String.fromCharCode(r,i(t,o.ErrorType.MalformedUnicode,4)):String.fromCharCode(r)}Object.defineProperty(r,"ErrorType",{enumerable:!0,get:function(){return o.ErrorType}}),Object.defineProperty(r,"errorMessages",{enumerable:!0,get:function(){return o.errorMessages}});let a=new Map([["b","\b"],["f","\f"],["n","\n"],["r","\r"],["t","	"],["v","\v"],["0","\0"]]),l=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function c(e,t=!1){return e.replace(l,function(e,r,n,l,c,d,u,h,p){if(void 0!==r)return"\\";if(void 0!==n)return String.fromCharCode(i(n,o.ErrorType.MalformedHexadecimal,2));if(void 0!==l){if("{"!==l.charAt(0)||"}"!==l.charAt(l.length-1))throw SyntaxError(o.errorMessages.get(o.ErrorType.MalformedUnicode));let e=i(l.slice(1,-1),o.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(e){throw e instanceof RangeError?SyntaxError(o.errorMessages.get(o.ErrorType.CodePointLimit)):e}}if(void 0!==c)return s(c,d);if(void 0!==u)return s(u);if("0"===h)return"\0";if(void 0!==h)return function(e,t=!1){if(t)throw SyntaxError(o.errorMessages.get(o.ErrorType.OctalDeprecation));return String.fromCharCode(parseInt(e,8))}(h,!t);if(void 0!==p)return a.get(p)||p;throw SyntaxError(o.errorMessages.get(o.ErrorType.EndOfString))})}r.unraw=c,r.default=c},388132,e=>{"use strict";var t=e.i(999161);try{var r=window;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,r=t.getComputedStyle;if(!e)return[];var n=function(e){return"none"!==r(e).display&&(null===e.parentElement||n(e.parentElement))};return Array.from(e.querySelectorAll('button:not([disabled]):not([tabindex="-1"]),\n       input:not([disabled]):not([tabindex="-1"]),\n       select:not([disabled]):not([tabindex="-1"]),\n       textarea:not([disabled]):not([tabindex="-1"]),\n       a[href],\n       [tabindex]:not([tabindex="-1"])')).filter(function(e){return"hidden"!==r(e).visibility&&n(e)})},o=function(e){switch(e.dataset.focusPriority){case"low":return -1;case"high":return 1;default:return 0}},i=e.i(380447);try{var s=window;s._sentryModuleMetadata=s._sentryModuleMetadata||{},s._sentryModuleMetadata[(new s.Error).stack]=Object.assign({},s._sentryModuleMetadata[(new s.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=["children","onClose","tag","preventScroll"];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
6t%2?c(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e.s(["default",0,function(e){var r=e.children,s=e.onClose,a=e.tag,c=e.preventScroll,u=void 0!==c&&c,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,l),p=(0,t.useRef)(null);return(0,t.useLayoutEffect)(function(){var e,t=document.activeElement,r=n(p.current);if(0===r.length?null==(e=p.current)||e.focus({preventScroll:u}):r.reduce(function(e,t){return o(t)>o(e)?t:e}).focus({preventScroll:u}),t)return function(){return t.focus({preventScroll:u})}},[u]),(0,t.useEffect)(function(){var e=function(e){"Escape"===e.key&&s()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[s]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{tabIndex:0,onFocus:function(){var e,t=n(p.current);null==(e=t[t.length-1])||e.focus()}}),(0,i.jsx)(void 0===a?"div":a,d(d({ref:p,tabIndex:-1},h),{},{children:r})),(0,i.jsx)("div",{tabIndex:0,onFocus:function(){var e;null==(e=n(p.current)[0])||e.focus()}})]})}],388132)},999474,e=>{"use strict";var t=e.i(388132);e.s(["FocusTrap",()=>t.default])},747218,e=>{"use strict";var t=e.i(358040),r=e.i(380447);try{var n=window;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=["size"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){var n,i,s;n=e,i=t,s=r[t],(i=function(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[i]=s}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e.s(["LinkIcon",0,function(e){var n=e.size,o=void 0===n?"1em":n,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i);return(0,r.jsx)(t.default,a(a({},s),{},{width:o,height:o,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.9958 1.06663C15.4226 1.05296 13.907 1.65773 12.7753 2.75068L12.765 2.7608L11.045 4.4708C10.6534 4.86018 10.6515 5.49335 11.0409 5.88501C11.4303 6.27667 12.0634 6.27851 12.4551 5.88913L14.1697 4.1845C14.9236 3.45887 15.9319 3.05746 16.9784 3.06656C18.0272 3.07567 19.0304 3.49635 19.772 4.23798C20.5137 4.97961 20.9344 5.98286 20.9435 7.03165C20.9526 8.0777 20.5515 9.08557 19.8265 9.83934L16.833 12.8329L16.8328 12.833C16.4273 13.2386 15.9393 13.5523 15.4019 13.7528C14.8645 13.9533 14.2903 
614.0358 13.7181 13.9949C13.146 13.9539 12.5894 13.7903 12.0861 13.5153C11.5827 13.2403 11.1444 12.8603 10.8008 12.401C10.47 11.9587 9.84333 11.8684 9.40108 12.1992C8.95883 12.53 8.86849 13.1567 9.1993 13.5989C9.71464 14.2879 10.3721 14.858 11.1272 15.2705C11.8822 15.683 12.7171 15.9283 13.5753 15.9897C14.4334 16.0512 15.2948 15.9274 16.1009 15.6267C16.907 15.326 17.639 14.8554 18.2473 14.2469L21.2472 11.2471L21.2593 11.2347C22.3523 10.1031 22.9571 8.58745 22.9434 7.01427C22.9297 5.44109 22.2987 3.93621 21.1863 2.82377C20.0738 1.71132 18.5689 1.0803 16.9958 1.06663ZM10.4247 8.0102C9.56657 7.94874 8.70522 8.07256 7.89911 8.37326C7.09305 8.67395 6.36096 9.14458 5.75272 9.753L2.75285 12.7529L2.74067 12.7653C1.64772 13.8969 1.04295 15.4125 1.05662 16.9857C1.07029 18.5589 1.70131 20.0637 2.81376 21.1762C3.9262 22.2886 5.43108 22.9196 7.00426 22.9333C8.57744 22.947 10.0931 22.3422 11.2247 21.2493L11.2371 21.2371L12.9471 19.5271C13.3376 19.1366 13.3376 18.5034 12.9471 18.1129C12.5565 17.7223 11.9234 17.7223 11.5328 18.1129L9.82932 19.8164C9.07555 20.5414 8.06768 20.9425 7.02164 20.9334C5.97285 20.9243 4.9696 20.5036 4.22797 19.762C3.48634 19.0203 3.06566 18.0171 3.05655 16.9683C3.04746 15.9222 3.44851 14.9144 4.17355 14.1606L7.16719 11.167C7.5727 10.7613 8.06071 10.4476 8.59811 10.2471C9.13552 10.0467 9.70976 9.96412 10.2819 10.0051C10.854 10.0461 11.4106 10.2096 11.9139 10.4846C12.4173 10.7596 12.8556 11.1397 13.1992 11.599C13.53 12.0412 14.1567 12.1316 14.5989 11.8007C15.0412 11.4699 15.1315 10.8433 14.8007 10.401C14.2854 9.71205 13.6279 9.14198 12.8729 8.72948C12.1178 8.31697 11.2829 8.07166 10.4247 8.0102Z",fill:"currentColor"})}))}],747218)},914167,e=>{"use strict";var t=e.i(999161),r=e.i(883719),n=e.i(663160),o=e.i(644412),i=e.i(524),s=e.i(380447);try{var a=window;a._sentryModuleMetadata=a._sentryModuleMetadata||{},a._sentryModuleMetadata[(new a.Error).stack]=Object.assign({},a._sentryModuleMetadata[(new a.Error).stack],{"_sentryBundlerPluginAppKey:sentry-b2match-next-app":!0})}catch(e){}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=["isUnderlined","maxLines"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var u=(0,r.css)(["text-decoration:",";border:1px solid transparent;border-radius:8px;font-weight:600;color:",";&:hover{color:",";text-decoration:underline;}&:active{color:",";}&:focus{text-decoration:underline;","}&:focus:not(:focus-visible){","}","{text-decoration:none;font-size:calc(2em - 12px);margin-left:calc(12px - 0.5em);vertical-align:-0.2em;}",""],function(e){return e.$isUnderlined?"underline":"none"},function(e){return e.theme.colors.getContrast(100)},function(e){return e.theme.colors.brand},function(e){return e.theme.colors.getBrand(130)},n.focusStyle.highlight,n.focusStyle.clear,o.Icon,function(e){var t=e.$maxLines;return t&&(0,r.css)(["",""],(0,i.default)(t,"em"))}),h=r.default.a.withConfig({displayName:"A__StyledLink",componentId:"sc-1v70eeh-0"})(["",""],u),p=(0,t.forwardRef)(function(e,t){var r=e.isUnderlined,n=e.maxLines,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,c);return(0,s.jsx)(h,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEac
6h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({ref:t,$isUnderlined:void 0!==r&&r,$maxLines:n},o))});p.displayName="A",e.s(["A",0,p])}]);
7
8//# debugId=933d1461-9e7c-1672-064d-68df3701313b

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.