PageSourceSearch

https://www.trtarabi.com/_next/static/chunks/915-428f1a97ce10b088.js

js trtarabi.com collected 2026-09-24 22:48:12 UTC 398,186 bytes, 40 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[915],{20326:function(e,t,n){var r=n(28070);function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(88276)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){return"undefined"!=typeof window&&!!window.process&&"renderer"===window.process.type||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())},88276:function(e,t,n){var r;function i(e){function n(){if(n.enabled){var e=+new Date,i=e-(r||e);n.diff=i,n.prev=r,n.curr=e,r=e;for(var o=Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];o[0]=t.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(e,r){if("%%"===e)return e;l++;var i=t.formatters[r];if("function"==typeof i){var s=o[l];e=i.call(n,s),o.splice(l,1),l--}return e}),t.formatArgs.call(n,o),(n.log||t.log||console.log.bind(console)).apply(n,o)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n)|0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(RegExp("^"+e.substr(1)+"$")):t.names.push(RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(92435),t.names=[],t.skips=[],t.formatters={}},16596:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var r,i,o,s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},39706:function(e){function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(Error("Failed to load "+this.src),e)}}e.exports=function(e,n,r){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof n&&(r=n,n={}),n=n||{},r=r||function(){},o.type=n.type||"text/javascript",o.charset=n.charset||"utf8",o.async=!("async"in n)||!!n.async,o.src=e,n.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(o,n.attrs),n.text&&(o.text=""+n.text),("onload"in o?t:function(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}})(o,r),o.onload||t(o,r),i.appendChild(o)}},69577:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(30518).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},92435:function(e){function t(e,t,n){return e<t?void 0:e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}
1e.exports=function(e,n){n=n||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return 864e5*n;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===r&&!1===isNaN(e))return n.long?t(e,864e5,"day")||t(e,36e5,"hour")||t(e,6e4,"minute")||t(e,1e3,"second")||e+" ms":e>=864e5?Math.round(e/864e5)+"d":e>=36e5?Math.round(e/36e5)+"h":e>=6e4?Math.round(e/6e4)+"m":e>=1e3?Math.round(e/1e3)+"s":e+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},10193:function(e,t,n){"use strict";n.d(t,{default:function(){return i.a}});var r=n(87266),i=n.n(r)},87266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return a},getImageProps:function(){return l}});let r=n(46490),i=n(64783),o=n(26790),s=r._(n(63597));function l(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[375,430,640,750,1080,1200,1920],imageSizes:[16,32,48,64,96,128,256],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let a=o.Image},20031:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let r=n(35233);function i(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},66902:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(74023),i=n(1375);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,i.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},54269:function(e,t,n){"use strict";var r=n(24475);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i}
1;return n.PropTypes=n,n}},71783:function(e,t,n){e.exports=n(54269)()},24475:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},90341:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedStyle=void 0;let o=i(n(49504)),s=i(n(83641));t.EmbedStyle=e=>{var t=r(e,[]);return s.default.createElement("style",Object.assign({},t,{className:(0,o.default)(t.className),style:Object.assign({},t.style)}),`
2        .rsme-embed .rsme-d-none {
3          display: none;
4        }
5    
6        .rsme-embed .twitter-tweet {
7          margin: 0 !important;
8        }
9    
10        .rsme-embed blockquote {
11          margin: 0 !important;
12          padding: 0 !important;
13        }
14
15        .rsme-embed.rsme-facebook-embed .fb-post iframe {
16          width: 100% !important;
17        }
18
19        .rsme-embed.rsme-facebook-embed .fb-post span {
20          width: 100% !important;
21        }
22      `)}},24761:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FacebookEmbed=void 0;let o=i(n(49504)),s=i(n(83641)),l=n(761),a=n(24205),u=n(41739),c=n(90341),d=n(83915),h="check-script",p="load-script",f="confirm-script-loaded",m="process-embed",g="confirm-embed-success",y="retrying",v="embed-success";t.FacebookEmbed=e=>{var t,n,{url:i,width:b,height:w,linkText:x="View post on Facebook",placeholderImageUrl:k,placeholderSpinner:S,placeholderSpinnerDisabled:C=!1,placeholderProps:E,embedPlaceholder:O,placeholderDisabled:M=!1,scriptLoadDisabled:A=!1,retryDelay:T=5e3,retryDisabled:N=!1,frame:R,debug:P=!1}=e,j=r(e,["url","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled","scriptLoadDisabled","retryDelay","retryDisabled","frame","debug"]);let[I,L]=s.default.useState(h),_=s.default.useMemo(()=>I===v,[I]),$=s.default.useRef((0,u.generateUUID)()),[D,z]=s.default.useState(Date.now()),H=s.default.useMemo(()=>`${$.current}-${D}`,[D]),F=(0,l.useFrame)(R);s.default.useEffect(()=>{P&&console.log(`[${new Date().toISOString()}]: ${I}`)},[P,I]),s.default.useEffect(()=>{var e,t,n;I===h&&((null===(n=null===(t=null===(e=F.window)||void 0===e?void 0:e.FB)||void 0===t?void 0:t.XFBML)||void 0===n?void 0:n.parse)?L(m):A?console.error("Facebook embed script not found. Unable to process Facebook embed:",i):L(p))},[A,I,i,F.window]),s.default.useEffect(()=>{if(I===p&&F.document){let e=F.document.createElement("script");e.setAttribute("src","https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v16.0"),F.document.head.appendChild(e),L(f)}},[I,F.document]),s.default.useEffect(()=>{let e=new d.Subs;return I===f&&e.setInterval(()=>{var e,t,n;(null===(n=null===(t=null===(e=F.window)||void 0===e?void 0:e.FB)||void 0===t?void 0:t.XFBML)||void 0===n?void 0:n.parse)&&L(m)},1),e.createCleanup()},[I,F.window]),s.default.useEffect(()=>{var e,t,n;if(I===m){let r=null===(n=null===(t=null===(e=F.window)||void 0===e?void 0:e.FB)||void 0===t?void 0:t.XFBML)||void 0===n?void 0:n.parse;r?(r(),L(g)):console.error("Facebook embed script not found. Unable to process Facebook embed:",i)}},[I,i,F.window]),s.default.useEffect(()=>{let e=new d.Subs;return I!==g||(e.setInterval(()=>{if(F.document){let e=F.document.getElementById($.current);if(e){let t=e.getElementsByClassName("fb-post")[0];t&&t.children.length>0&&L(v)}}},1),N||e.setTimeout(()=>{L(y)},T)),e.createCleanup()},[N,T,I,F.document]),s.default.useEffect(()=>
22{I===y&&(z(Date.now()),L(m))},[I]);let B=!!(null==b?void 0:b.toString().includes("%")),U=!!(null==w?void 0:w.toString().includes("%")),V={maxWidth:B?void 0:550,width:void 0!==b?B?"100%":b:"100%",height:U?"100%":void 0!==w?w:void 0!==(null===(t=j.style)||void 0===t?void 0:t.height)||void 0!==(null===(n=j.style)||void 0===n?void 0:n.maxHeight)?"100%":372,border:"1px solid #dee2e6",borderRadius:3},W=null!=O?O:s.default.createElement(a.PlaceholderEmbed,Object.assign({url:i,imageUrl:k,linkText:x,spinner:S,spinnerDisabled:C},E,{style:Object.assign(Object.assign({},V),null==E?void 0:E.style)}));return s.default.createElement("div",Object.assign({},j,{className:(0,o.default)("rsme-embed rsme-facebook-embed",j.className),style:Object.assign({overflow:"hidden",width:null!=b?b:void 0,height:null!=w?w:void 0,borderRadius:3},j.style)}),s.default.createElement(c.EmbedStyle,null),s.default.createElement("div",{id:$.current,className:(0,o.default)(!_&&"rsme-d-none")},s.default.createElement("div",{key:H,className:"fb-post","data-href":i,"data-width":B?"100%":null!=b?b:550,style:{width:B?"100%":null!=b?b:550,height:U?"100%":null!=w?w:void 0}})),!_&&!M&&W)}},34655:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InstagramEmbed=void 0;let a=l(n(49504)),u=o(n(83641)),c=n(83915),d=n(761),h=n(24205),p=n(41739),f=n(90341),m="check-script",g="load-script",y="confirm-script-loaded",v="process-embed",b="confirm-embed-success",w="retrying";t.InstagramEmbed=e=>{var t,n,{url:r,width:i,height:o,linkText:l="View post on Instagram",captioned:x=!1,placeholderImageUrl:k,placeholderSpinner:S,placeholderSpinnerDisabled:C=!1,placeholderProps:E,embedPlaceholder:O,placeholderDisabled:M=!1,scriptLoadDisabled:A=!1,retryDelay:T=5e3,retryDisabled:N=!1,igVersion:R="14",frame:P,debug:j=!1}=e,I=s(e,["url","width","height","linkText","captioned","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled","scriptLoadDisabled","retryDelay","retryDisabled","igVersion","frame","debug"]);let[L,_]=u.useState(m),$=u.useRef((0,p.generateUUID)()),[D,z]=u.useState(Date.now()),H=u.useMemo(()=>`${$.current}-${D}`,[D]),F=(0,d.useFrame)(P);u.useEffect(()=>{j&&console.log(`[${new Date().toISOString()}]: ${L}`)},[j,L]),u.useEffect(()=>{var e,t,n;L===m&&((null===(n=null===(t=null===(e=F.window)||void 0===e?void 0:e.instgrm)||void 0===t?void 0:t.Embeds)||void 0===n?void 0:n.process)?_(v):A?console.error("Instagram embed script not found. Unable to process Instagram embed:",r):_(g))},[A,L,r,F.window]),u.useEffect(()=>{if(L===g&&F.document){let e=F.document.createElement("script");e.setAttribute("src","https://www.instagram.com/embed.js"),F.document.head.appendChild(e),_(y)}},[L,F.document]),u.useEffect(()=>{let e=new c.Subs;return L===y&&e.setInterval(()=>{var e,t,n;(null===(n=null===(t=null===(e=F.window)||void 0===e?void 0:e.instgrm)||void 0===t?void 0:t.Embeds)||void 0===n?void 0:n.process)&&_(v)},1),e.createCleanup()},[L,F.window]),u.useEffect(()=>{var e,t,n;if(L===v){let i=null===(n=null===(t=null===(e=F.window)||void 0===e?void 0:e.instgrm)||void 0===t?void 0:t.Embeds)||void 0===n?void 0:n.process;i?(i(),_(b)):console.error("Instagram embed script not found. Unable to process Instagram embed:",r)}},[L,F.window,r]),u.useEffect(()=>{let e=new c.Subs;return L!==b||(e.setInterval(()=>{F.document&&!F.document.getElementById($.current)&&_("embed-success")},1),N||e.setTimeout(()=>{_(w)},T)),e.createCleanup()},[T,N,L,F.document]),u.useEffect(()=>{L===w&&(z(Date.now()),_(v))},[L]);let B=r.split(/[?#]/)[0].replace(/\.com\/.*?\/p/,".com/p").replace(/\.com\/.*?\/reel/,".com/reel"),U=`${B}${B.endsWith("/")?"":"/"}`,V=!!(null==i?void 0:i.toString().includes("%")),W={minWidth:V?void 0:328,width:void 0!==i?V?"100%":i:"100%",height:(null==o?void 0:o.toString().includes("%"))?"100%":void 0!==o?o:void 0!==(null===(t=I.style)||void 0===t?void 0:t.height)||void 0!==(null===(n=I.style)||void 0===n?void 0:n.maxHeight)?"100%":372,border:"1px solid #dee2e6",borderRadius:3},q=null!=O?O:u.createElement(h.PlaceholderEmbed,Object.assign({url:U,imageUrl:k,linkText:l,spinner:S,spinnerDisabled:C},E,{style:Object.assign(Object.assign({},W),null==E?void 0:E.style)}));return u.createElement("div",Object.assign({},I,{className:(0,a.default)("rsme-embed rsme-instagram-embed",$.current,I.className),style:Object.assign(Object.assign({overflow:"hidden",
22width:null!=i?i:void 0,height:null!=o?o:void 0,borderRadius:3},I.style),{position:"relative"})}),u.createElement(f.EmbedStyle,null),u.createElement("blockquote",{key:H,className:"instagram-media","data-instgrm-permalink":`${U}?utm_source=ig_embed&utm_campaign=loading`,"data-instgrm-version":R,"data-instgrm-captioned":x||void 0,"data-width":V?"100%":null!=i?i:void 0,style:{width:"calc(100% - 2px)"}},!M&&q,u.createElement("div",{id:$.current,className:"instagram-media-pre-embed rsme-d-none"},"\xa0")))}},25681:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedInEmbed=void 0;let a=l(n(49504)),u=o(n(83641)),c=n(24205),d=n(90341);t.LinkedInEmbed=e=>{var t,n,{url:r,postUrl:i,width:o,height:l=500,linkText:h="View post on LinkedIn",placeholderImageUrl:p,placeholderSpinner:f,placeholderSpinnerDisabled:m=!1,placeholderProps:g,embedPlaceholder:y,placeholderDisabled:v=!1}=e,b=s(e,["url","postUrl","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled"]);let[w,x]=u.useState(!1),k={minWidth:250,maxWidth:550,width:void 0!==o?o:"100%",height:void 0!==l?l:void 0!==(null===(t=b.style)||void 0===t?void 0:t.height)||void 0!==(null===(n=b.style)||void 0===n?void 0:n.maxHeight)?"100%":550,border:"solid 1px rgba(0, 0, 0, 0.15)",borderRadius:8},S=null!=y?y:u.createElement(c.PlaceholderEmbed,Object.assign({url:null!=i?i:r,imageUrl:p,linkText:h,spinner:f,spinnerDisabled:m},g,{style:Object.assign(Object.assign({},k),null==g?void 0:g.style)}));return u.createElement("div",Object.assign({},b,{className:(0,a.default)("rsme-embed rsme-linkedin-embed",b.className),style:Object.assign({overflow:"hidden",width:null!=o?o:void 0,height:null!=l?l:void 0,borderRadius:8},b.style)}),u.createElement(d.EmbedStyle,null),u.createElement("iframe",{className:(0,a.default)("linkedin-post",!w&&"rsme-d-none"),src:r,width:"100%",height:w?l:0,frameBorder:"0",onLoad:()=>x(!0)}),!w&&!v&&S)}}
22,77482:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PinterestEmbed=void 0;let a=l(n(49504)),u=o(n(83641)),c=n(24205),d=n(90341);t.PinterestEmbed=e=>{var t,n,r,{url:i,postUrl:o,width:l,height:h=500,linkText:p="View post on Pinterest",placeholderImageUrl:f,placeholderSpinner:m,placeholderSpinnerDisabled:g=!1,placeholderProps:y,embedPlaceholder:v,placeholderDisabled:b=!1}=e,w=s(e,["url","postUrl","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled"]);let[x,k]=u.useState(!1),S={minWidth:250,maxWidth:550,width:void 0!==l?l:"100%",height:void 0!==h?h:void 0!==(null===(t=w.style)||void 0===t?void 0:t.height)||void 0!==(null===(n=w.style)||void 0===n?void 0:n.maxHeight)?"100%":550,border:"solid 1px rgba(0, 0, 0, 0.15)",borderRadius:8},C=null!=v?v:u.createElement(c.PlaceholderEmbed,Object.assign({url:null!=o?o:i,imageUrl:f,linkText:p,spinner:m,spinnerDisabled:g},y,{style:Object.assign(Object.assign({},S),null==y?void 0:y.style)})),E=null===(r=i.match(/pin\/([\w\d_-]+)/))||void 0===r?void 0:r[1];return u.createElement("div",Object.assign({},w,{className:(0,a.default)("rsme-embed rsme-pinterest-embed",w.className),style:Object.assign({overflow:"hidden",width:null!=l?l:void 0,height:null!=h?h:void 0,borderRadius:8},w.style)}),u.createElement(d.EmbedStyle,null),u.createElement("iframe",{className:(0,a.default)("pinterest-post",!x&&"rsme-d-none"),src:`https://assets.pinterest.com/ext/embed.html?id=${null!=E?E:"000000000000000000"}`,width:"100%",height:x?h:0,frameBorder:"0",scrolling:"no",onLoad:()=>k(!0)}),!x&&!b&&C)}},34527:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TikTokEmbed=void 0;let o=i(n(49504)),s=i(n(83641)),l=n(83915),a=n(761),u=n(24205),c=n(41739),d=n(90341),h="process-embed",p="confirm-embed-success",f="retrying";t.TikTokEmbed=e=>{var t,n,{url:i,width:m,height:g,linkText:y="View post on TikTok",placeholderImageUrl:v,placeholderSpinner:b,placeholderSpinnerDisabled:w=!1,placeholderProps:x,embedPlaceholder:k,placeholderDisabled:S=!1,scriptLoadDisabled:C=!1,retryDelay:E=5e3,retryDisabled:O=!1,frame:M,debug:A=!1}=e,T=r(e,["url","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled","scriptLoadDisabled","retryDelay","retryDisabled","frame","debug"]);let[N,R]=s.default.useState(h),P=s.default.useRef((0,c.generateUUID)()),[j,I]=s.default.useState(Date.now()),L=s.default.useMemo(()=>`${P.current}-${j}`,[j]),_=(0,a.useFrame)(M);s.default.useEffect(()=>{A&&console.log(`[${new Date().toISOString()}]: ${N}`)},[A,N]),s.default.useEffect(()=>{if(N===h&&_.document&&!C){let e="tiktok-embed-script",t=_.document.getElementById(e);t&&t.remove();let n=_.document.createElement("script");n.setAttribute("src",`https://www.tiktok.com/embed.js?t=${Date.now()}`),n.setAttribute("id",e),_.document.head.appendChild(n),R(p)}},[C,N,_.document]),s.default.useEffect(()=>{let e=new l.Subs;return N!==p||(e.setInterval(()=>{_.document&&!_.document.getElementById(P.current)&&R("embed-success")},1),O||e.setTimeout(()=>{R(f)},E)),e.createCleanup()},[E,O,N,_.document]),s.default.useEffect(()=>
22{N===f&&(I(Date.now()),R(h))},[N]);let $=i.replace(/[?].*$/,"").replace(/^.+\//,""),D={minWidth:325,maxWidth:480,width:void 0!==m?m:"100%",height:void 0!==g?g:void 0!==(null===(t=T.style)||void 0===t?void 0:t.height)||void 0!==(null===(n=T.style)||void 0===n?void 0:n.maxHeight)?"100%":550,border:"solid 1px rgba(22,24,35,0.12)",borderRadius:8},z=null!=k?k:s.default.createElement(u.PlaceholderEmbed,Object.assign({url:i,imageUrl:v,linkText:y,spinner:b,spinnerDisabled:w},x,{style:Object.assign(Object.assign({},D),null==x?void 0:x.style)}));return s.default.createElement("div",Object.assign({},T,{className:(0,o.default)("rsme-embed rsme-tiktok-embed",T.className),style:Object.assign({overflow:"hidden",width:null!=m?m:void 0,height:null!=g?g:void 0,borderRadius:8},T.style)}),s.default.createElement(d.EmbedStyle,null),s.default.createElement("div",{className:"tiktok-embed-container"},s.default.createElement("blockquote",{key:L,className:"tiktok-embed",cite:i,"data-video-id":$},S?s.default.createElement("div",{id:P.current,style:{display:"none"}},"\xa0"):s.default.createElement("div",{id:P.current,style:{display:"flex",justifyContent:"center"}},z))))}},776:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwitterEmbed=void 0;let r=n(92831);t.TwitterEmbed=r.XEmbed},92831:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.XEmbed=void 0;let a=l(n(49504)),u=o(n(83641)),c=n(76474),d=n(24205),h=n(90341);t.XEmbed=e=>{var t,n,{url:r,width:i,height:o,linkText:l="View post on X",placeholderImageUrl:p,placeholderSpinner:f,placeholderSpinnerDisabled:m=!1,placeholderProps:g,embedPlaceholder:y,placeholderDisabled:v,twitterTweetEmbedProps:b}=e,w=s(e,["url","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled","twitterTweetEmbedProps"]);let x=r.substring(r.lastIndexOf("/")+1).replace(/[?].*$/,""),k=!!(null==i?void 0:i.toString().includes("%")),S={minWidth:250,maxWidth:550,width:void 0!==i?k?"100%":i:"100%",height:(null==o?void 0:o.toString().includes("%"))?"100%":void 0!==o?o:void 0!==(null===(t=w.style)||void 0===t?void 0:t.height)||void 0!==(null===(n=w.style)||void 0===n?void 0:n.maxHeight)?"100%":350,border:"solid 1px #c9d4d9",borderRadius:12},C=null!=y?y:u.createElement(d.PlaceholderEmbed,Object.assign({url:r,imageUrl:p,linkText:l,spinner:f,spinnerDisabled:m},g,{style:Object.assign(Object.assign({},S),null==g?void 0:g.style)}));return u.createElement("div",Object.assign({},w,{className:(0,a.default)("rsme-embed rsme-twitter-embed",w.className),style:Object.assign({overflow:"hidden",width:null!=i?i:void 0,height:null!=o?o:void 0,borderRadius:12},w.style)}),u.createElement(h.EmbedStyle,null),u.createElement(c.TwitterTweetEmbed,Object.assign({tweetId:x,placeholder:v?void 0:C},b)))}},71355:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
22(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let a=l(n(49504)),u=o(n(83641)),c=l(n(90120)),d=n(24205),h=n(90341);t.YouTubeEmbed=e=>{var t,n,r,i,o,l,p,f,m,g,y,v,b,{url:w,width:x,height:k,linkText:S="Watch on YouTube",placeholderImageUrl:C,placeholderSpinner:E,placeholderSpinnerDisabled:O=!1,placeholderProps:M,embedPlaceholder:A,placeholderDisabled:T,youTubeProps:N}=e,R=s(e,["url","width","height","linkText","placeholderImageUrl","placeholderSpinner","placeholderSpinnerDisabled","placeholderProps","embedPlaceholder","placeholderDisabled","youTubeProps"]);let[P,j]=u.useState(!1),I=null===(t=w.match(/[?&]v=(.+?)(?:$|[&?])/))||void 0===t?void 0:t[1],L=null===(n=w.match(/https:\/\/(?:www\.)?youtube\.com\/shorts\/(.+?)(?:$|[&?])/))||void 0===n?void 0:n[1],_=null===(r=w.match(/https:\/\/youtu\.be\/(.+?)(?:$|[&?])/))||void 0===r?void 0:r[1],$=null===(i=w.match(/https:\/\/(?:www\.)youtube(-nocookie)?\.com\/embed\/(.+?)(?:$|[&?])/))||void 0===i?void 0:i[2],D=null!==(p=null!==(l=null!==(o=null!=I?I:L)&&void 0!==o?o:_)&&void 0!==l?l:$)&&void 0!==p?p:"00000000",z=+(null!==(m=null===(f=w.match(/(.+?)(?:$|[&?])start=(\d+)/))||void 0===f?void 0:f[2])&&void 0!==m?m:0),H=!!(null==x?void 0:x.toString().includes("%")),F=!!(null==k?void 0:k.toString().includes("%")),B={};z&&(B.playerVars={start:z}),void 0!==x&&(B.width=H?"100%":`${x}`),void 0!==k&&(B.height=F?"100%":`${k}`),B=Object.assign(Object.assign({},B),null==N?void 0:N.opts);let U={maxWidth:H?void 0:640,width:void 0!==x?H?"100%":x:"100%",height:F?"100%":void 0!==k?k:void 0!==(null===(g=R.style)||void 0===g?void 0:g.height)||void 0!==(null===(y=R.style)||void 0===y?void 0:y.maxHeight)?"100%":360,border:"1px solid #dee2e6",borderRadius:0},V=null!=A?A:u.createElement(d.PlaceholderEmbed,Object.assign({url:w,imageUrl:C,linkText:S,spinner:E,spinnerDisabled:O},M,{style:Object.assign(Object.assign({},U),null==M?void 0:M.style)}));return u.createElement("div",Object.assign({},R,{className:(0,a.default)("rsme-embed rsme-youtube-embed",R.className),style:Object.assign({overflow:"hidden",width:null!=x?x:void 0,height:null!=k?k:void 0,borderRadius:0},R.style)}),u.createElement(h.EmbedStyle,null),u.createElement("div",{className:(0,a.default)(!P&&"rsme-d-none")},u.createElement(c.default,Object.assign({},N,{className:null!==(v=null==N?void 0:N.className)&&void 0!==v?v:"youtube-iframe",videoId:null!==(b=null==N?void 0:N.videoId)&&void 0!==b?b:D,opts:B,onReady:e=>{j(!0),N&&N.onReady&&(null==N||N.onReady(e))}}))),!P&&!T&&V)}},761:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useFrame=void 0;let i=r(n(83641));t.useFrame=e=>i.default.useMemo(()=>e||{document:"undefined"!=typeof document?document:void 0,window:"undefined"!=typeof window?window:void 0},[e])},24205:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}
22,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PlaceholderEmbed=void 0;let o=i(n(49504)),s=i(n(83641)),l=n(90341),a=n(39565),u=n(4560),c=n(39883),d=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;t.PlaceholderEmbed=e=>{var t,{url:n,linkText:i="View post",imageUrl:h,spinner:p=s.default.createElement(a.BorderSpinner,null),allowJavaScriptUrls:f=!0,spinnerDisabled:m}=e,g=r(e,["url","linkText","imageUrl","spinner","allowJavaScriptUrls","spinnerDisabled"]);return d.test(n)&&!f?(console.warn("PlaceholderEmbed has blocked a javascript: URL as a security precaution"),null):s.default.createElement("div",Object.assign({},g,{className:(0,o.default)(g.className),style:Object.assign({overflow:"hidden",border:"1px solid #dee2e6",backgroundColor:"#ffffff",borderRadius:0,boxSizing:"border-box",position:"relative"},g.style)}),s.default.createElement(l.EmbedStyle,null),s.default.createElement("a",{href:n,style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer"},!h&&s.default.createElement("div",{style:{position:"absolute",top:0,left:0,display:"flex",justifyContent:"space-between",alignItems:"start",paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,zIndex:2,backgroundColor:"#ffffff"}},s.default.createElement(c.ProfilePlaceholder,null)),s.default.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:h?"start":"center",height:"100%",width:"100%"}},!h&&s.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",rowGap:16,zIndex:3,padding:8,backgroundColor:"#ffffff"}},!m&&p,!!i&&s.default.createElement("div",{style:{color:"#000000",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:550,lineHeight:"18px",textAlign:"center"}},i)),h&&(void 0!==(null===(t=g.style)||void 0===t?void 0:t.height)?s.default.createElement("div",{style:{width:"100%",height:"100%",background:`url("${h}")`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",marginBottom:"40"}}):s.default.createElement("div",{style:{width:"100%",marginBottom:40}},s.default.createElement("img",{src:h,style:{width:"100%"}})))),s.default.createElement("div",{style:{position:"absolute",bottom:0,left:0,height:40,width:"100%",backgroundColor:"#ffffff",zIndex:1}},!h&&s.default.createElement(u.EngagementIconsPlaceholder,{style:{marginLeft:16}}),h&&s.default.createElement("div",{style:{display:"flex",height:"100%",alignItems:"center",justifyContent:"space-between",columnGap:16}},s.default.createElement("div",{style:{color:"#0095f6",fontWeight:600,fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",whiteSpace:"nowrap",marginLeft:16}},i),!m&&s.default.createElement("div",{style:{marginRight:16}},p)))))}},39565:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BorderSpinner=void 0;let o=i(n(49504)),s=i(n(83641));t.BorderSpinner=e=>{var t=r(e,[]);return s.default.createElement(s.default.Fragment,null,s.default.createElement("style",null,`
23        .rsme-spinner {
24          border: 3px solid rgba(0,0,0,0.75);
25          border-right-color: transparent;
26          border-radius: 50%;
27          animation: rsme-spin 1s linear infinite;
28        }
29        @keyframes rsme-spin {
30          0% {
31            transform: rotate(0deg);
32          }
33          100% {
34            transform: rotate(360deg);
35          }
36        }  
37      `),s.default.createElement("div",Object.assign({},t,{className:(0,o.default)("rsme-spinner",t.className),style:Object.assign({width:10,height:10},t.style)}
37)))}},4560:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShareArrowIcon=t.ChatBubbleIcon=t.HeartIcon=t.EngagementIconsPlaceholder=void 0;let o=i(n(49504)),s=i(n(83641));t.EngagementIconsPlaceholder=e=>{var n=r(e,[]);return s.default.createElement("div",Object.assign({},n,{className:(0,o.default)(n.className),style:Object.assign({display:"flex",alignItems:"center",columnGap:14},n.style)}),s.default.createElement(t.HeartIcon,null),s.default.createElement(t.ChatBubbleIcon,null),s.default.createElement(t.ShareArrowIcon,null))},t.HeartIcon=e=>s.default.createElement("div",Object.assign({},e),s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"12.5px",width:"12.5px",transform:"translateX(0px) translateY(7px)"}}),s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",height:"12.5px",transform:"rotate(-45deg) translateX(3px) translateY(1px)",width:"12.5px",flexGrow:0,marginRight:"6px",marginLeft:"2px"}}),s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"12.5px",width:"12.5px",transform:"translateX(9px) translateY(-18px)"}})),t.ChatBubbleIcon=e=>s.default.createElement("div",Object.assign({},e),s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"20px",width:"20px"}}),s.default.createElement("div",{style:{width:0,height:0,borderTop:"2px solid transparent",borderLeft:"6px solid #f4f4f4",borderBottom:"2px solid transparent",transform:"translateX(16px) translateY(-4px) rotate(30deg)"}})),t.ShareArrowIcon=e=>s.default.createElement("div",Object.assign({},e,{style:{height:25,width:25,transform:"translateX(0px) translateY(-2px)"}}),s.default.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve"},s.default.createElement("path",{style:{fill:"#F4F4F4"},d:"M295.204,180.593C132.168,180.593,0,312.759,0,475.796\nc51.398-130.047,184.869-203.22,317.483-183.603L295.204,180.593z"}),s.default.createElement("path",{style:{fill:"#F4F4F4"},d:"M512,253L295.204,36.204v217.818C159.946,249.655,34.992,339.262,0,475.794\nc59.905-109.171,178.724-165.463,295.204-151.033v145.035L512,253z"})))},39883:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfilePlaceholder=void 0;let o=i(n(49504)),s=i(n(83641));t.ProfilePlaceholder=e=>{var t=r(e,[]);return s.default.createElement("div",Object.assign({},t,{className:(0,o.default)(t.className),style:Object.assign({},t.style)}),s.default.createElement("div",{style:{display:"flex",columnGap:14}},s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",width:40,height:40}}),s.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",rowGap:6}},s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:4,width:100,height:14}}),s.default.createElement("div",{style:{backgroundColor:"#F4F4F4",borderRadius:4,width:60,height:14}}))))}},41739:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=void 0,t.generateUUID=()=>{let e=new Date().getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let r=16*Math.random();return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),("x"===n?r:3&r|8).toString(16)})}},5067:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
37(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(24761),t),i(n(34655),t),i(n(25681),t),i(n(77482),t),i(n(34527),t),i(n(776),t),i(n(92831),t),i(n(71355),t),i(n(24205),t),i(n(39565),t)},83915:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Subs=t.Subscribe=void 0;class n{static subscribe(e){try{return e()}catch(e){console.error(e)}return()=>{}}static subscribeEvent(e,t,n){return e.addListener(t,n),()=>{e.removeListener(t,n)}}static subscribeDOMEvent(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}static setTimeout(e,t,...n){let r=setTimeout(e,t,n);return()=>clearTimeout(r)}static setInterval(e,t,...n){let r=setInterval(e,t,n);return()=>clearInterval(r)}static unsubAll(e){if(Array.isArray(e))e.forEach(e=>{try{e()}catch(e){console.error(e)}});else try{e()}catch(e){console.error(e)}}static createCleanup(e){return()=>n.unsubAll(e)}}t.Subscribe=n;class r{constructor(e=[]){this.list=e}subscribe(e){let t=n.subscribe(e);return this.push(t),t}subscribeEvent(e,t,r){let i=n.subscribeEvent(e,t,r);return this.push(i),i}subscribeDOMEvent(e,t,r){let i=n.subscribeDOMEvent(e,t,r);return this.push(i),i}setTimeout(e,t,...n){let r=setTimeout(e,t,n),i=()=>clearTimeout(r);return this.push(i),i}setInterval(e,t,...n){let r=setInterval(e,t,n),i=()=>clearInterval(r);return this.push(i),i}push(e){this.list.push(e)}unsubAll(){n.unsubAll(this.list),this.list.splice(0,this.list.length)}createCleanup(){return()=>{this.unsubAll()}}}t.Subs=r},76474:function(e,t,n){"use strict";n.r(t),n.d(t,{TwitterDMButton:function(){return w},TwitterFollowButton:function(){return c},TwitterHashtagButton:function(){return h},TwitterMentionButton:function(){return f},TwitterMomentShare:function(){return v},TwitterOnAirButton:function(){return C},TwitterShareButton:function(){return a},TwitterTimelineEmbed:function(){return s},TwitterTweetEmbed:function(){return g},TwitterVideoEmbed:function(){return k}});var r=n(83641),i="https://platform.twitter.com/widgets.js",o="createTimeline",s=function(e){var t=r.useRef(null),s=r.useState(!0),l=s[0],a=s[1],u=function(){var n,r,i=Object.assign({},e.options);return null!=e&&e.autoHeight&&(i.height=null===(n=t.current)||void 0===n?void 0:null===(r=n.parentNode)||void 0===r?void 0:r.offsetHeight),i=Object.assign({},i,{theme:null==e?void 0:e.theme,linkColor:null==e?void 0:e.linkColor,borderColor:null==e?void 0:e.borderColor,lang:null==e?void 0:e.lang,tweetLimit:null==e?void 0:e.tweetLimit,ariaPolite:null==e?void 0:e.ariaPolite})};return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[o]){console.error("Method "+o+" is not present anymore in twttr.widget api");return}var n,i=u();(n=i).chrome="",e.noHeader&&(n.chrome=n.chrome+" noheader"),e.noFooter&&(n.chrome=n.chrome+" nofooter"),e.noBorders&&(n.chrome=n.chrome+" noborders"),e.noScrollbar&&(n.chrome=n.chrome+" noscrollbar"),e.transparent&&(n.chrome=n.chrome+" transparent"),i=n,window.twttr.widgets[o]({sourceType:e.sourceType,screenName:e.screenName,userId:e.userId,ownerScreenName:e.ownerScreenName,slug:e.slug,id:e.id||e.widgetId,url:e.url},null==t?void 0:t.current,i).then(function(t){a(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,l&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},l="createShareButton",a=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],a=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[l]){console.error("Method "+l+" is not present anymore in twttr.widget api");return}window.twttr.widgets[l](e.url,null==t?void 0:t.current,e.options).then(function(t){a(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},u="createFollowButton",c=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[u]){console.error("Method "+u+" is not present anymore in twttr.widget api");return}window.twttr.widgets[u](e.screenName,null==t?void 0:t.current,e.options).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},d="createHashtagButton",h=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[d]){console.error("Method "+d+" is not present anymore in twttr.widget api");return}window.twttr.widgets[d](e.tag,null==t?void 0:t.current,e.options).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},p="createMentionButton",f=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[p]){console.error("Method "+p+" is not present anymore in twttr.widget api");return}window.twttr.widgets[p](e.screenName,null==t?void 0:t.current,e.options).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},m="createTweet",g=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[m]){console.error("Method "+m+" is not present anymore in twttr.widget api");return}window.twttr.widgets[m](e.tweetId,null==t?void 0:t.current,e.options).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},y="createMoment",v=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[y]){console.error("Method "+y+" is not present anymore in twttr.widget api");return}window.twttr.widgets[y](e.momentId,null==t?void 0:t.current,e.options).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},b="createDMButton",w=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[b]){console.error("Method "+b+" is not present anymore in twttr.widget api");return}window.twttr.widgets[b](e.id,null==t?void 0:t.current,e.options).then(function(t){r&&(l(!1),e.onLoad&&e.onLoad(t))})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},x="createVideo",k=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[x]){console.error("Method "+x+" is not present anymore in twttr.widget api");return}window.twttr.widgets[x](e.id,null==t?void 0:t.current).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))},S="createPeriscopeOnAirButton",C=function(e){var t=r.useRef(null),o=r.useState(!0),s=o[0],l=o[1];return r.useEffect(function(){var r=!0;return n(71849)(i,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(r){if(!window.twttr.widgets[S]){console.error("Method "+S+" is not present anymore in twttr.widget api");return}window.twttr.widgets[S](e.username,null==t?void 0:t.current,e.options).then(function(t){l(!1),e.onLoad&&e.onLoad(t)})}}),function(){r=!1}},[]),r.createElement(r.Fragment,null,s&&r.createElement(r.Fragment,null,e.placeholder),r.createElement("div",{ref:t}))}},90120:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return S}});var r=n(71783),i=n.n(r),o=n(83641),s=n(16596),l=n.n(s),a=n(970),u=n.n(a),c=Object.defineProperty,d=Object.defineProperties,h=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||(t={}))f.call(t,n)&&g(e,n,t[n]);if(p)for(var n of p(t))m.call(t,n)&&g(e,n,t[n]);return e},v=(e,t)=>
37d(e,h(t)),b=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{l(n.next(e))}catch(e){i(e)}},s=e=>{try{l(n.throw(e))}catch(e){i(e)}},l=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);l((n=n.apply(e,t)).next())});function w(e={}){return v(y({},e),{height:0,width:0,playerVars:v(y({},e.playerVars),{autoplay:0,start:0,end:0})})}var x={videoId:i().string,id:i().string,className:i().string,iframeClassName:i().string,style:i().object,title:i().string,loading:i().oneOf(["lazy","eager"]),opts:i().objectOf(i().any),onReady:i().func,onError:i().func,onPlay:i().func,onPause:i().func,onEnd:i().func,onStateChange:i().func,onPlaybackRateChange:i().func,onPlaybackQualityChange:i().func},k=class extends o.Component{constructor(e){super(e),this.destroyPlayerPromise=void 0,this.onPlayerReady=e=>{var t,n;return null==(n=(t=this.props).onReady)?void 0:n.call(t,e)},this.onPlayerError=e=>{var t,n;return null==(n=(t=this.props).onError)?void 0:n.call(t,e)},this.onPlayerStateChange=e=>{var t,n,r,i,o,s,l,a;switch(null==(n=(t=this.props).onStateChange)||n.call(t,e),e.data){case k.PlayerState.ENDED:null==(i=(r=this.props).onEnd)||i.call(r,e);break;case k.PlayerState.PLAYING:null==(s=(o=this.props).onPlay)||s.call(o,e);break;case k.PlayerState.PAUSED:null==(a=(l=this.props).onPause)||a.call(l,e)}},this.onPlayerPlaybackRateChange=e=>{var t,n;return null==(n=(t=this.props).onPlaybackRateChange)?void 0:n.call(t,e)},this.onPlayerPlaybackQualityChange=e=>{var t,n;return null==(n=(t=this.props).onPlaybackQualityChange)?void 0:n.call(t,e)},this.destroyPlayer=()=>this.internalPlayer?(this.destroyPlayerPromise=this.internalPlayer.destroy().then(()=>this.destroyPlayerPromise=void 0),this.destroyPlayerPromise):Promise.resolve(),this.createPlayer=()=>{if("undefined"==typeof document)return;if(this.destroyPlayerPromise){this.destroyPlayerPromise.then(this.createPlayer);return}let e=v(y({},this.props.opts),{videoId:this.props.videoId});this.internalPlayer=u()(this.container,e),this.internalPlayer.on("ready",this.onPlayerReady),this.internalPlayer.on("error",this.onPlayerError),this.internalPlayer.on("stateChange",this.onPlayerStateChange),this.internalPlayer.on("playbackRateChange",this.onPlayerPlaybackRateChange),this.internalPlayer.on("playbackQualityChange",this.onPlayerPlaybackQualityChange),(this.props.title||this.props.loading)&&this.internalPlayer.getIframe().then(e=>{this.props.title&&e.setAttribute("title",this.props.title),this.props.loading&&e.setAttribute("loading",this.props.loading)})},this.resetPlayer=()=>this.destroyPlayer().then(this.createPlayer),this.updatePlayer=()=>{var e;null==(e=this.internalPlayer)||e.getIframe().then(e=>{this.props.id?e.setAttribute("id",this.props.id):e.removeAttribute("id"),this.props.iframeClassName?e.setAttribute("class",this.props.iframeClassName):e.removeAttribute("class"),this.props.opts&&this.props.opts.width?e.setAttribute("width",this.props.opts.width.toString()):e.removeAttribute("width"),this.props.opts&&this.props.opts.height?e.setAttribute("height",this.props.opts.height.toString()):e.removeAttribute("height"),this.props.title?e.setAttribute("title",this.props.title):e.setAttribute("title","YouTube video player"),this.props.loading?e.setAttribute("loading",this.props.loading):e.removeAttribute("loading")})},this.getInternalPlayer=()=>this.internalPlayer,this.updateVideo=()=>{var e,t,n,r;if(void 0===this.props.videoId||null===this.props.videoId){null==(e=this.internalPlayer)||e.stopVideo();return}let i=!1,o={videoId:this.props.videoId};if((null==(t=this.props.opts)?void 0:t.playerVars)&&(i=1===this.props.opts.playerVars.autoplay,"start"in this.props.opts.playerVars&&(o.startSeconds=this.props.opts.playerVars.start),"end"in this.props.opts.playerVars&&(o.endSeconds=this.props.opts.playerVars.end)),i){null==(n=this.internalPlayer)||n.loadVideoById(o);return}null==(r=this.internalPlayer)||r.cueVideoById(o)},this.refContainer=e=>{this.container=e},this.container=null,this.internalPlayer=null}componentDidMount(){this.createPlayer()}componentDidUpdate(e){return b(this,null,function*(){var t,n,r,i,o,s;t=this.props,(e.id!==t.id||e.className!==t.className||(null==(n=e.opts)?void 0:n.width)!==(null==(r=t.opts)?void 0:r.width)||(null==(i=e.opts)?void 0:i.height)!==(null==(o=t.opts)?void 0:o.height)||e.iframeClassName!==t.iframeClassName||e.title!==t.title)&&this.updatePlayer(),s=this.props,e.videoId===s.videoId&&l()(w(e.opts),w(s.opts))||(yield this.resetPlayer()),function(e,t){var n,r;if(e.videoId!==t.videoId)return!0;let i=(null==(n=e.opts)?void 0:n.playerVars)||{},o=(null==(r=t.opts)?void 0:r.playerVars)||{};return i.start!==o.start||i.end!==o.end}(e,this.props)&&this.updateVideo()})}componentWillUnmount(){this.destroyPlayer()}render(){return o.createElement("div",{className:this.props.className,style:this.props.style},o.createElement("div",{id:this.props.id,className:this.props.iframeClassName,ref:this.refContainer}))}};k.propTypes=x,k.defaultProps={videoId:"",id:"",className:"",iframeClassName:"",style:{},title:"",loading:void 0,opts:{},onReady:()=>{},onError:()=>{},onPlay:()=>{},onPause:()=>{},onEnd:()=>{},onStateChange:()=>{},onPlaybackRateChange:()=>{},onPlaybackQualityChange:()=>{}},k.PlayerState={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5};var S=k},71849:function(e,t,n){var r,i;i=function(){var e,t,n=document,r=n.getElementsByTagName("head")[0],i="push",o="readyState",s="onreadystatechange",l={},a={},u={},c={};function d(e,t){for(var n=0,r=e.length;n<r;
37++n)if(!t(e[n]))return!1;return 1}function h(e,t){d(e,function(e){return t(e),1})}function p(t,n,r){t=t[i]?t:[t];var o=n&&n.call,s=o?n:r,m=o?t.join(""):n,g=t.length;function y(e){return e.call?e():l[e]}function v(){if(!--g)for(var e in l[m]=1,s&&s(),u)d(e.split("|"),y)&&!h(u[e],y)&&(u[e]=[])}return setTimeout(function(){h(t,function t(n,r){return null===n?v():(r||/^https?:\/\//.test(n)||!e||(n=-1===n.indexOf(".js")?e+n+".js":e+n),c[n])?(m&&(a[m]=1),2==c[n]?v():setTimeout(function(){t(n,!0)},0)):void(c[n]=1,m&&(a[m]=1),f(n,v))})},0),p}function f(e,i){var l,a=n.createElement("script");a.onload=a.onerror=a[s]=function(){(!a[o]||/^c|loade/.test(a[o]))&&!l&&(a.onload=a[s]=null,l=1,c[e]=2,i())},a.async=1,a.src=t?e+(-1===e.indexOf("?")?"?":"&")+t:e,r.insertBefore(a,r.lastChild)}return p.get=f,p.order=function(e,t,n){!function r(i){i=e.shift(),e.length?p(i,r):p(i,t,n)}()},p.path=function(t){e=t},p.urlArgs=function(e){t=e},p.ready=function(e,t,n){e=e[i]?e:[e];var r,o=[];return!h(e,function(e){l[e]||o[i](e)})&&d(e,function(e){return l[e]})?t():(u[r=e.join("|")]=u[r]||[],u[r][i](t),n&&n(o)),p},p.done=function(e){p([null],e)},p},e.exports?e.exports=i():void 0===(r=i.call(t,n,t,e))||(e.exports=r)},89750:function(e){"use strict";var t;t=function(){var e={},t={};return e.on=function(e,n){var r={name:e,handler:n};return t[e]=t[e]||[],t[e].unshift(r),r},e.off=function(e){var n=t[e.name].indexOf(e);-1!==n&&t[e.name].splice(n,1)},e.trigger=function(e,n){var r,i=t[e];if(i)for(r=i.length;r--;)i[r].handler(n)},e},e.exports=t},26794:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(18394))&&r.__esModule?r:{default:r};t.default={pauseVideo:{acceptableStates:[i.default.ENDED,i.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[i.default.ENDED,i.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[i.default.ENDED,i.default.PLAYING,i.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},e.exports=t.default},21020:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(20326)),i=l(n(21530)),o=l(n(39960)),s=l(n(26794));function l(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("youtube-player"),u={};u.proxyEvents=function(e){var t={},n=function(n){var r="on"+n.slice(0,1).toUpperCase()+n.slice(1);t[r]=function(t){a('event "%s"',r,t),e.trigger(n,t)}},r=!0,i=!1,s=void 0;try{for(var l,u=o.default[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var c=l.value;n(c)}}catch(e){i=!0,s=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw s}}return t},u.promisifyPlayer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={},r=function(r){t&&s.default[r]?n[r]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.then(function(e){var t=s.default[r],i=e.getPlayerState(),o=e[r].apply(e,n);return t.stateChangeRequired||Array.isArray(t.acceptableStates)&&-1===t.acceptableStates.indexOf(i)?new Promise(function(n){e.addEventListener("onStateChange",function r(){var i=e.getPlayerState(),o=void 0;"number"==typeof t.timeout&&(o=setTimeout(function(){e.removeEventListener("onStateChange",r),n()},t.timeout)),Array.isArray(t.acceptableStates)&&-1!==t.acceptableStates.indexOf(i)&&(e.removeEventListener("onStateChange",r),clearTimeout(o),n())})}).then(function(){return o}):o})}:n[r]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.then(function(e){return e[r].apply(e,n)})}},o=!0,l=!1,a=void 0;try{for(var u,c=i.default[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var d=u.value;r(d)}}catch(e){l=!0,a=e}finally{try{!o&&c.return&&c.return()}finally{if(l)throw a}}return n},t.default=u,e.exports=t.default},18394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},e.exports=t.default},39960:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],e.exports=t.default},21530:function(e,t){"use strict";
37Object.defineProperty(t,"__esModule",{value:!0}),t.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],e.exports=t.default},970:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},i=l(n(89750)),o=l(n(72906)),s=l(n(21020));function l(e){return e&&e.__esModule?e:{default:e}}var a=void 0;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=(0,i.default)();if(a||(a=(0,o.default)(l)),t.events)throw Error("Event handlers cannot be overwritten.");if("string"==typeof e&&!document.getElementById(e))throw Error('Element "'+e+'" does not exist.');t.events=s.default.proxyEvents(l);var u=new Promise(function(n){(void 0===e?"undefined":r(e))==="object"&&e.playVideo instanceof Function?n(e):a.then(function(r){var i=new r.Player(e,t);return l.on("ready",function(){n(i)}),null})}),c=s.default.promisifyPlayer(u,n);return c.on=l.on,c.off=l.off,c},e.exports=t.default},72906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(39706))&&r.__esModule?r:{default:r};t.default=function(e){return new Promise(function(t){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function){t(window.YT);return}var n="http:"===window.location.protocol?"http:":"https:";(0,i.default)(n+"//www.youtube.com/iframe_api",function(t){t&&e.trigger("error",t)});var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){r&&r(),t(window.YT)}})},e.exports=t.default},49504:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=o(t,n));return t}(n)))}return e}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0!==(n=(function(){return i}).apply(t,[]))&&(e.exports=n)}()},11300:function(e,t,n){"use strict";n.d(t,{h:function(){return m}});var r=n(83641),i=n.t(r,2),o=n(96419),s=n(20342),l=n(74023),a=Symbol.for("react.lazy"),u=i[" use ".trim().toString()];function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=Symbol("radix.slottable");function h(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===d}var p=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=function(e){let t=function(e){let t=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(c(n)&&"function"==typeof u&&(n=u(n._payload)),r.isValidElement(n)){var o;let e,l;let a=(o=n,(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?o.ref:(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?o.props.ref:o.props.ref||o.ref),u=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}
37:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props);return n.type!==r.Fragment&&(u.ref=t?(0,s.F)(t,a):a),r.cloneElement(n,u)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),n=r.forwardRef((e,n)=>{let{children:i,...o}=e;c(i)&&"function"==typeof u&&(i=u(i._payload));let s=r.Children.toArray(i),a=s.find(h);if(a){let e=a.props.children,i=s.map(t=>t!==a?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,l.jsx)(t,{...o,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,i):null})}return(0,l.jsx)(t,{...o,ref:n,children:i})});return n.displayName=`${e}.Slot`,n}(`Primitive.${t}`),i=r.forwardRef((e,r)=>{let{asChild:i,...o}=e,s=i?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(s,{...o,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),f=n(53066),m=r.forwardRef((e,t)=>{var n,i;let{container:s,...a}=e,[u,c]=r.useState(!1);(0,f.b)(()=>c(!0),[]);let d=s||u&&(null===(i=globalThis)||void 0===i?void 0:null===(n=i.document)||void 0===n?void 0:n.body);return d?o.createPortal((0,l.jsx)(p.div,{...a,ref:t}),d):null});m.displayName="Portal"},85188:function(e,t,n){"use strict";n.d(t,{DY:function(){return s}});var r=n(11996);let i="textStyle",o=/^\s*([-+*])\s$/,s=r.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(i)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
37,addInputRules(){let e=(0,r.S0)({find:o,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.S0)({find:o,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(i),editor:this.editor})),[e]}})},73305:function(e,t,n){"use strict";n.d(t,{dn:function(){return l}});var r=n(11996),i=n(21870);let o=/^```([a-z]+)?[\s\n]$/,s=/^~~~([a-z]+)?[\s\n]$/,l=r.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;return[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,r.P1)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!!o&&!!s&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type||o.parentOffset!==o.parent.nodeSize-2)return!1;let l=o.after();return void 0!==l&&(r.nodeAt(l)?e.commands.command(({tr:e})=>(e.setSelection(i.Y1.near(r.resolve(l))),!0)):e.commands.exitCode())}}}
37,addInputRules(){return[(0,r.zK)({find:o,type:this.type,getAttributes:e=>({language:e[1]})}),(0,r.zK)({find:s,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,s=null==o?void 0:o.mode;if(!n||!s)return!1;let{tr:l,schema:a}=e.state,u=a.text(n.replace(/\r\n?/g,"\n"));return l.replaceSelectionWith(this.type.create({language:s},u)),l.selection.$from.parent.type!==this.type&&l.setSelection(i.Bs.near(l.doc.resolve(Math.max(0,l.selection.from-2)))),l.setMeta("paste",!0),e.dispatch(l),!0}}})]}})},11287:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});let r=n(11996).NB.create({name:"doc",topNode:!0,content:"block+"})},48920:function(e,t,n){"use strict";n.d(t,{m:function(){return l}});var r=n(11996),i=n(21870),o=n(85562);class s{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,o=this.editorView.dom,s=o.getBoundingClientRect(),l=s.width/o.offsetWidth,a=s.height/o.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),o=e?r.bottom:r.top;e&&t&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*a;i={left:r.left,right:r.right,top:o-s,bottom:o+s}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let u=this.editorView.dom.offsetParent;if(!this.element&&(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),u&&(u!=document.body||"static"!=getComputedStyle(u).position)){let n=u.getBoundingClientRect(),r=n.width/u.offsetWidth,i=n.height/u.offsetHeight;e=n.left-u.scrollLeft*r,t=n.top-u.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/l+"px",this.element.style.top=(i.top-t)/a+"px",this.element.style.width=(i.right-i.left)/l+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,o.nj)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}let l=r.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new i.Sy({view:t=>new s(t,e)})}(this.options)]}})},7903:function(e,t,n){"use strict";n.d(t,{X:function(){return i},Z:function(){return i}});var r=n(11996);let i=r.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>
37!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.zK)({find:RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}})},58736:function(e,t,n){"use strict";n.d(t,{A:function(){return S},Z:function(){return S}});var r=n(11996),i=function(){};i.prototype.append=function(e){return e.length?(e=i.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},i.prototype.prepend=function(e){return e.length?i.from(e).append(this):this},i.prototype.appendInner=function(e){return new s(this,e)},i.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?i.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},i.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},i.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},i.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},i.from=function(e){return e instanceof i?e:e&&e.length?new o(e):i.empty};var o=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))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))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(i);i.empty=new o([]);var s=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(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,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,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}(i),l=n(85562),a=n(21870);class u{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(r=(n=this.remapping(s,this.items.length)).maps.length);let l=e.tr,a=[],d=[];
37return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(s,t+1)).maps.length),r--,d.push(e);return}if(n){d.push(new c(e.map));let t=e.step.map(n.slice(r)),i;t&&l.maybeStep(t).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new c(i,void 0,void 0,a.length+d.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,o=new u(this.items.slice(0,s).append(d.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:l,selection:i}}addTransform(e,t,n,r){var i,o;let s,l=[],a=this.eventCount,d=this.items,p=!r&&d.length?d.get(d.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),o=new c(e.mapping.maps[n],i,t),s;(s=p&&p.merge(o))&&(o=s,n?l.pop():d=d.slice(0,d.length-1)),l.push(o),t&&(a++,t=void 0),r||(p=o)}let f=a-n.depth;return f>h&&(i=d,o=f,i.forEach((e,t)=>{if(e.selection&&0==o--)return s=t,!1}),d=i.slice(s),a-=f),new u(d.append(l),a)}remapping(e,t){let n=new l.vs;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new u(this.items.append(e.map(e=>new c(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},r);let l=t;this.items.forEach(t=>{let r=i.getMirror(--l);if(null==r)return;o=Math.min(o,r);let a=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),u=t.selection&&t.selection.map(i.slice(l+1,r));u&&s++,n.push(new c(a,o,u))}else n.push(new c(a))},r);let a=[];for(let e=t;e<o;e++)a.push(new c(i.maps[e]));let d=new u(this.items.slice(0,r).append(a).append(n),s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let l=i.selection&&i.selection.map(t.slice(n));l&&o++;let a=new c(s.invert(),e,l),u,d=r.length-1;(u=r.length&&r[d].merge(a))?r[d]=u:r.push(a)}}else i.map&&n--},this.items.length,0),new u(i.from(r.reverse()),o)}}u.empty=new u(i.empty,0);class c{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new c(t.getMap().invert(),t,this.selection)}}}class d{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let h=20;function p(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function f(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let m=!1,g=null;function y(e){let t=e.plugins;if(g!=t){m=!1,g=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){m=!0;break}}return m}let v=new a.H$("history"),b=new a.H$("closeHistory");function w(e,t){return(n,r)=>{let i=v.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let o=function(e,t,n){let r=y(t),i=v.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),a=new d(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(v,{redo:n,historyState:a})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}let x=w(!1,!0),k=w(!0,!0);w(!1,!1),w(!0,!1);let S=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>x(e,t),redo:()=>({state:e,dispatch:t})=>k(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new a.Sy({key:v,state:{init:()=>new d(u.empty,u.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(v),o;if(i)return i.historyState;n.getMeta(b)&&(e=new d(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(v))return s.getMeta(v).redo?new d(e.done.addTransform(n,void 0,r,y(t)),e.undone,p(n.mapping.maps),e.prevTime,e.prevComposition):new d(e.done,e.undone.addTransform(n,void 0,r,y(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new d(e.done.rebased(n,o),e.undone.rebased(n,o),f(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new d(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),f(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),o=0==e.prevTime||!s&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;
37return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=s?f(e.prevRanges,n.mapping):p(n.mapping.maps);return new d(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,y(t)),u.empty,l,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?x:"historyRedo"==n?k:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},66530:function(e,t,n){"use strict";n.d(t,{Z:function(){return o},b:function(){return o}});var r=n(11996),i=n(21870);let o=r.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.P1)(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{let{selection:n}=t,{$from:o,$to:s}=n,l=e();return 0===o.parentOffset?l.insertContentAt({from:Math.max(o.pos-1,0),to:s.pos},{type:this.name}):(0,r.EG)(n)?l.insertContentAt(s.pos,{type:this.name}):l.insertContent({type:this.name}),l.command(({tr:e,dispatch:t})=>{var n;if(t){let{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(i.Bs.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(i.qv.create(e.doc,t.pos)):e.setSelection(i.Bs.create(e.doc,t.pos));else{let o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(i.Bs.create(e.doc,r+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.x2)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
37ype})]}})},10384:function(e,t,n){"use strict";n.d(t,{Z:function(){return i},n:function(){return i}});var r=n(11996);let i=r.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})},48394:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(11996),i=n(21870),o=n(65994);let s=r.hj.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("placeholder"),props:{decorations:({doc:e,selection:t})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,s=[];if(!n)return null;let l=this.editor.isEmpty;return e.descendants((e,t)=>{let n=i>=t&&i<=t+e.nodeSize,a=!e.isLeaf&&(0,r.bR)(e);if((n||!this.options.showOnlyCurrent)&&a){let r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);let i=o.p.node(t,t+e.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});s.push(i)}return this.options.includeChildren}),o.EH.create(e,s)}}})]}})},67339:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(11996);let i=r.vc.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],renderHTML({HTMLAttributes:e}){return["sub",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}})},71373:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(11996);let i=r.vc.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],renderHTML({HTMLAttributes:e}){return["sup",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}})},46919:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r=n(11996).hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{let t=e.style.textAlign||this.options.defaultAlignment;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(e=>e),unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}})},8136:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var r=n(11996);let i=r.vc.create({name:"textStyle",priority:101,addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>!!Object.entries((0,r.Jo)(e,this.type)).some(([,e])=>!!e)||t.unsetMark(this.name)}}})},88956:function(e,t,n){"use strict";n.d(t,{ZT:function(){return O}});var r=n(11996);let i=e=>(0,r.DS)({find:/--$/,replace:null!=e?e:"—"}),o=e=>(0,r.DS)({find:/\.\.\.$/,replace:null!=e?e:"…"}),s=e=>(0,r.DS)({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=e?e:"“"}),l=e=>(0,r.DS)({find:/"$/,replace:null!=e?e:"”"}),a=e=>(0,r.DS)({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=e?e:"‘"}),u=e=>(0,r.DS)({find:/'$/,replace:null!=e?e:"’"}),c=e=>(0,r.DS)({find:/<-$/,replace:null!=e?e:"←"}),d=e=>(0,r.DS)({find:/->$/,replace:null!=e?e:"→"}),h=e=>(0,r.DS)({find:/\(c\)$/,replace:null!=e?e:"\xa9"}),p=e=>(0,r.DS)({find:/\(tm\)$/,replace:null!=e?e:"™"}),f=e=>(0,r.DS)({find:/\(sm\)$/,replace:null!=e?e:"℠"}),m=e=>(0,r.DS)({find:/\(r\)$/,replace:null!=e?e:"\xae"}),g=e=>(0,r.DS)({find:/(?:^|\s)(1\/2)\s$/,replace:null!=e?e:"\xbd"}),y=e=>(0,r.DS)({find:/\+\/-$/,replace:null!=e?e:"\xb1"}),v=e=>(0,r.DS)({find:/!=$/,replace:null!=e?e:"≠"}),b=e=>(0,r.DS)({find:/<<$/,replace:null!=e?e:"\xab"}),w=e=>(0,r.DS)({find:/>>$/,replace:null!=e?e:"\xbb"}),x=e=>(0,r.DS)({find:/\d+\s?([*x])\s?\d+$/,replace:null!=e?e:"\xd7"}),k=e=>(0,r.DS)({find:/\^2$/,replace:null!=e?e:"\xb2"}),S=e=>(0,r.DS)({find:/\^3$/,replace:null!=e?e:"\xb3"}),C=e=>(0,r.DS)({find:/(?:^|\s)(1\/4)\s$/,replace:null!=e?e:"\xbc"}),E=e=>(0,r.DS)({find:/(?:^|\s)(3\/4)\s$/,replace:null!=e?e:"\xbe"}
37),O=r.hj.create({name:"typography",addOptions:()=>({closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"\xa9",ellipsis:"…",emDash:"—",laquo:"\xab",leftArrow:"←",multiplication:"\xd7",notEqual:"≠",oneHalf:"\xbd",oneQuarter:"\xbc",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"\xb1",raquo:"\xbb",registeredTrademark:"\xae",rightArrow:"→",servicemark:"℠",superscriptThree:"\xb3",superscriptTwo:"\xb2",threeQuarters:"\xbe",trademark:"™"}),addInputRules(){let e=[];return!1!==this.options.emDash&&e.push(i(this.options.emDash)),!1!==this.options.ellipsis&&e.push(o(this.options.ellipsis)),!1!==this.options.openDoubleQuote&&e.push(s(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&e.push(l(this.options.closeDoubleQuote)),!1!==this.options.openSingleQuote&&e.push(a(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&e.push(u(this.options.closeSingleQuote)),!1!==this.options.leftArrow&&e.push(c(this.options.leftArrow)),!1!==this.options.rightArrow&&e.push(d(this.options.rightArrow)),!1!==this.options.copyright&&e.push(h(this.options.copyright)),!1!==this.options.trademark&&e.push(p(this.options.trademark)),!1!==this.options.servicemark&&e.push(f(this.options.servicemark)),!1!==this.options.registeredTrademark&&e.push(m(this.options.registeredTrademark)),!1!==this.options.oneHalf&&e.push(g(this.options.oneHalf)),!1!==this.options.plusMinus&&e.push(y(this.options.plusMinus)),!1!==this.options.notEqual&&e.push(v(this.options.notEqual)),!1!==this.options.laquo&&e.push(b(this.options.laquo)),!1!==this.options.raquo&&e.push(w(this.options.raquo)),!1!==this.options.multiplication&&e.push(x(this.options.multiplication)),!1!==this.options.superscriptTwo&&e.push(k(this.options.superscriptTwo)),!1!==this.options.superscriptThree&&e.push(S(this.options.superscriptThree)),!1!==this.options.oneQuarter&&e.push(C(this.options.oneQuarter)),!1!==this.options.threeQuarters&&e.push(E(this.options.threeQuarters)),e}})},5162:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r=n(11996);let i=r.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})},96460:function(e,t,n){"use strict";n.d(t,{Xc:function(){return x},rU:function(){return c},e2:function(){return T},I_:function(){return A},dl:function(){return j},z2:function(){return P},VH:function(){return ea},eA:function(){return N},qK:function(){return I},WQ:function(){return U},tp:function(){return E},nA:function(){return B},JX:function(){return _},wb:function(){return D},Cr:function(){return $},G3:function(){return ef},dO:function(){return H},II:function(){return F}});var r,i,o=n(21870),s=n(54418),l=n(65994),a=n(6847),u=n(85562);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},i=(n,r)=>(10==t&&(t=0),e[t++]=n,e[t++]=r)}var c=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,o=r+1,s=i+1;for(let e=1;o<this.width&&this.map[t+e]==n;e++)o++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:i,right:o,bottom:s}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:s,right:l,top:a,bottom:u}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,a),right:Math.max(r,l),bottom:Math.max(o,u)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let o=r*this.width+i,s=this.map[o];if(!n[s]){if(n[s]=!0,i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s)continue;t.push(s)}}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(e){return r(e)||i(e,function(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.n
37ame);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),o=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);o+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(e),n=e.childCount,r=[],i=0,o=null,s=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let l=0,a=0;l<n;l++){let u=e.child(l);a++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==u.childCount)break;let c=u.child(e),{colspan:d,rowspan:h,colwidth:p}=c.attrs;for(let e=0;e<h;e++){if(e+l>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:a,n:h-e});break}let u=i+e*t;for(let e=0;e<d;e++){0==r[u+e]?r[u+e]=a:(o||(o=[])).push({type:"collision",row:l,pos:a,n:d-e});let n=p&&p[e];if(n){let r=(u+e)%t*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=d,a+=c.nodeSize}let c=(l+1)*t,d=0;for(;i<c;)0==r[i++]&&d++;d&&(o||(o=[])).push({type:"missing",row:l,n:d}),a++}(0===t||0===n)&&(o||(o=[])).push({type:"zero_sized"});let l=new c(t,n,r,o),a=!1;for(let e=0;!a&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(a=!0);return a&&function(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let o=e.map[i];if(r[o])continue;r[o]=!0;let s=n.nodeAt(o);if(!s)throw RangeError(`No cell with offset ${o} found`);let l=null,a=s.attrs;for(let n=0;n<a.colspan;n++){let r=t[(i+n)%e.width*2];null==r||a.colwidth&&a.colwidth[n]==r||((l||(l=function(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}(a)))[n]=r)}l&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:l})}}(l,s,e),l}(e))}};function d(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}var h=new o.H$("selectingCells");function p(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function f(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function m(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=p(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function g(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function y(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function v(e,t,n){let r=e.node(-1),i=c.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return null==s?null:e.node(0).resolve(o+s)}function b(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function w(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var x=class e extends o.Y1{constructor(e,t=e){let n=e.node(-1),r=c.get(n),i=e.start(-1),s=r.rectBetween(e.pos-i,t.pos-i),l=e.node(0),a=r.cellsInRect(s).filter(e=>e!=t.pos-i);a.unshift(t.pos-i);let u=a.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new o.xm(l.resolve(r),l.resolve(r+t.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(g(r)&&g(i)&&y(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return o.Bs.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=c.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){let l=[];for(let o=n*t.width+r.left,s=r.left;s<r.right;s++,o++){let n=t.map[o];if(i[n])continue;i[n]=!0;let s=t.findCell(n),a=e.nodeAt(n);if(!a)throw RangeError(`No cell with offset ${n} found`);let u=r.left-s.left,c=s.right-r.right;if(u>0||c>0){let e=a.attrs;if(u>0&&(e=b(e,0,u)),c>0&&(e=b(e,e.colspan-c,c)),s.left<r.left){if(!(a=a.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else a=a.type.create(e,a.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...a.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};a=s.top<r.top?a.type.createAndFill(e):a.type.create(e,a.content)}l.push(a)}o.push(e.child(n).copy(s.HY.from(l)))}let l=this.isColSelection()&&this.isRowSelection()?e:o;return new s.p2(s.HY.from(l),1,1)}replace(e,t=s.p2.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:l}=r[i],a=e.mapping.slice(n);e.replace(a.map(o.pos),a.map(l.pos),i?s.p2.empty:t)}let i=o.Y1.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new s.p2(s.HY.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=c.get(t),r=this.$anchorCell.start(-1),i=n.cells
37InRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=c.get(r),o=t.start(-1),s=i.findCell(t.pos-o),l=i.findCell(n.pos-o),a=t.node(0);return s.top<=l.top?(s.top>0&&(t=a.resolve(o+i.map[s.left])),l.bottom<i.height&&(n=a.resolve(o+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(o+i.map[l.left])),s.bottom<i.height&&(t=a.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=c.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=c.get(r),o=t.start(-1),s=i.findCell(t.pos-o),l=i.findCell(n.pos-o),a=t.node(0);return s.left<=l.left?(s.left>0&&(t=a.resolve(o+i.map[s.top*i.width])),l.right<i.width&&(n=a.resolve(o+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(o+i.map[l.top*i.width])),s.right<i.width&&(t=a.resolve(o+i.map[i.width*(s.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new k(this.$anchorCell.pos,this.$headCell.pos)}};x.prototype.visible=!1,o.Y1.jsonID("cell",x);var k=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&y(t,n)?new x(t,n):o.Y1.near(n,1)}};function S(e){if(!(e.selection instanceof x))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(l.p.node(n,n+e.nodeSize,{class:"selectedCell"}))}),l.EH.create(e.doc,t)}var C=new o.H$("fix-tables");function E(e,t){let n;let r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let i,o;let s=c.get(t);if(!s.problems)return r;r||(r=e.tr);let l=[];for(let e=0;e<s.height;e++)l.push(0);for(let e=0;e<s.problems.length;e++){let i=s.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let o=e.attrs;for(let e=0;e<o.rowspan;e++)l[i.row+e]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,b(o,o.colspan-i.n,i.n))}else if("missing"==i.type)l[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<l.length;e++)l[e]&&(null==i&&(i=e),o=e);for(let a=0,u=n+1;a<s.height;a++){let n=t.child(a),s=u+n.nodeSize,c=l[a];if(c>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let l=[];for(let n=0;n<c;n++){let n=d(e.schema)[t].createAndFill();n&&l.push(n)}let h=(0==a||i==a-1)&&o==a?u+1:s-1;r.insert(r.mapping.map(h),l)}u=s}return r.setMeta(C,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,i){let o=t.childCount,s=n.childCount;e:for(let l=0,a=0;l<s;l++){let s=n.child(l);for(let e=a,n=Math.min(o,l+3);e<n;e++)if(t.child(e)==s){a=e+1,r+=s.nodeSize;continue e}i(s,r),a<o&&t.child(a).sameMarkup(s)?e(t.child(a),s,r+1,i):s.nodesBetween(0,s.content.size,i,r+1),r+=s.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function O(e){let t=e.selection,n=m(e),r=n.node(-1),i=n.start(-1),o=c.get(r);return{...t instanceof x?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function M(e,{map:t,tableStart:n,table:r},i){let o=i>
370?-1:0;(function(e,t,n){let r=d(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0})(t,r,i+o)&&(o=0==i||i==t.width?null:0);for(let s=0;s<t.height;s++){let l=s*t.width+i;if(i>0&&i<t.width&&t.map[l-1]==t.map[l]){let o=t.map[l],a=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,w(a.attrs,i-t.colCount(o))),s+=a.attrs.rowspan-1}else{let a=null==o?d(r.type.schema).cell:r.nodeAt(t.map[l+o]).type,u=t.positionAt(s,i,r);e.insert(e.mapping.map(n+u),a.createAndFill())}}return e}function A(e,t){if(!f(e))return!1;if(t){let n=O(e);t(M(e.tr,n,n.left))}return!0}function T(e,t){if(!f(e))return!1;if(t){let n=O(e);t(M(e.tr,n,n.right))}return!0}function N(e,t){if(!f(e))return!1;if(t){let n=O(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;!function(e,{map:t,table:n,tableStart:r},i){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let l=s*t.width+i,a=t.map[l],u=n.nodeAt(a),c=u.attrs;if(i>0&&t.map[l-1]==a||i<t.width-1&&t.map[l+1]==a)e.setNodeMarkup(e.mapping.slice(o).map(r+a),null,b(c,i-t.colCount(a)));else{let t=e.mapping.slice(o).map(r+a);e.delete(t,t+u.nodeSize)}s+=c.rowspan}}(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=c.get(e)}t(r)}return!0}function R(e,{map:t,tableStart:n,table:r},i){var o;let s=n;for(let e=0;e<i;e++)s+=r.child(e).nodeSize;let l=[],a=i>0?-1:0;(function(e,t,n){var r;let i=d(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if((null==(r=t.nodeAt(e.map[o+n*e.width]))?void 0:r.type)!=i)return!1;return!0})(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let s=0,u=t.width*i;s<t.width;s++,u++)if(i>0&&i<t.height&&t.map[u]==t.map[u-t.width]){let i=t.map[u],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),s+=o.colspan-1}else{let e=null==a?d(r.type.schema).cell:null==(o=r.nodeAt(t.map[u+a*t.width]))?void 0:o.type,n=null==e?void 0:e.createAndFill();n&&l.push(n)}return e.insert(s,d(r.type.schema).row.create(null,l)),e}function P(e,t){if(!f(e))return!1;if(t){let n=O(e);t(R(e.tr,n,n.top))}return!0}function j(e,t){if(!f(e))return!1;if(t){let n=O(e);t(R(e.tr,n,n.bottom))}return!0}function I(e,t){if(!f(e))return!1;if(t){let n=O(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;!function(e,{map:t,table:n,tableStart:r},i){let o=0;for(let e=0;e<i;e++)o+=n.child(e).nodeSize;let s=o+n.child(i).nodeSize,l=e.mapping.maps.length;e.delete(o+r,s+r);let a=new Set;for(let o=0,s=i*t.width;o<t.width;o++,s++){let u=t.map[s];if(!a.has(u)){if(a.add(u),i>0&&u==t.map[s-t.width]){let t=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(l).map(u+r),null,{...t,rowspan:t.rowspan-1}),o+=t.colspan-1}else if(i<t.height&&u==t.map[s+t.width]){let s=n.nodeAt(u),a=s.attrs,c=s.type.create({...a,rowspan:s.attrs.rowspan-1},s.content),d=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(l).map(r+d),c),o+=a.colspan-1}}}}(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=c.get(n.table)}t(r)}return!0}function L(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function _(e,t){let n=e.selection;if(!(n instanceof x)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=O(e),{map:i}=r;if(function({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,s=(r.bottom-1)*e+r.left,l=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[l]==n[l+1])return!0;o+=e,l+=e}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[s]==n[s+e])return!0;i++,s++}return!1}(i,r))return!1;if(t){let n,o;let l=e.tr,a={},u=s.HY.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let s=i.map[e*i.width+t],c=r.table.nodeAt(s);if(!a[s]&&c){if(a[s]=!0,null==n)n=s,o=c;else{L(c)||(u=u.append(c.content));let e=l.mapping.map(s+r.tableStart);l.delete(e,e+c.nodeSize)}}}if(null==n||null==o)return!0;if(l.setNodeMarkup(n+r.tableStart,null,{...w(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),rowspan:r.bottom-r.top}),u.size){let e=n+1+o.content.size,t=L(o)?n+1:e;l.replaceWith(t+r.tableStart,e+r.tableStart,u)}l.setSelection(new x(l.doc.resolve(n+r.tableStart))),t(l)}return!0}function $(e,t){var n;let r=d(e.schema);return(n=({node:e})=>r[e.type.spec.tableRole],(e,t)=>{var r;let i,o;let s=e.selection;if(s instanceof x){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;i=s.$anchorCell.nodeAfter,o=s.$anchorCell.pos}else{if(!(i=function(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;
37if("cell"===n||"header_cell"===n)return e.node(t)}return null}(s.$from)))return!1;o=null==(r=p(s.$from))?void 0:r.pos}if(null==i||null==o||1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(t){let r,l=i.attrs,a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let c=O(e),d=e.tr;for(let e=0;e<c.right-c.left;e++)a.push(u?{...l,colwidth:u&&u[e]?[u[e]]:null}:l);for(let e=c.top;e<c.bottom;e++){let t=c.map.positionAt(e,c.left,c.table);e==c.top&&(t+=i.nodeSize);for(let o=c.left,s=0;o<c.right;o++,s++)(o!=c.left||e!=c.top)&&d.insert(r=d.mapping.map(t+c.tableStart,1),n({node:i,row:e,col:o}).createAndFill(a[s]))}d.setNodeMarkup(o,n({node:i,row:c.top,col:c.left}),a[0]),s instanceof x&&d.setSelection(new x(d.doc.resolve(s.$anchorCell.pos),r?d.doc.resolve(r):void 0)),t(d)}return!0})(e,t)}function D(e,t){return function(n,r){if(!f(n))return!1;let i=m(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let o=n.tr;n.selection instanceof x?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&o.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(o)}return!0}}function z(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function H(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t,n){if(!f(t))return!1;if(n){let r=d(t.schema),i=O(t),o=t.tr,s=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=s.map(e=>i.table.nodeAt(e));for(let e=0;e<s.length;e++)l[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[e],r.cell,l[e].attrs);if(0==o.steps.length)for(let e=0;e<s.length;e++)o.setNodeMarkup(i.tableStart+s[e],r.header_cell,l[e].attrs);n(o)}return!0}:function(t,n){if(!f(t))return!1;if(n){let r=d(t.schema),i=O(t),o=t.tr,s=z("row",i,r),l=z("column",i,r),a=("column"===e?s:"row"===e&&l)?1:0,u="column"==e?{left:0,top:a,right:1,bottom:i.map.height}:"row"==e?{left:a,top:0,right:i.map.width,bottom:1}:i,c="column"==e?l?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(u).forEach(e=>{let t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,c,n.attrs)}),n(o)}return!0}}H("row",{useDeprecatedLogic:!0}),H("column",{useDeprecatedLogic:!0});var F=H("cell",{useDeprecatedLogic:!0});function B(e){return function(t,n){if(!f(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(m(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(o.Bs.between(e,e.node(0).resolve(e.pos+e.nodeAfter.nodeSize))).scrollIntoView())}return!0}}function U(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function V(e,t){let n=e.selection;if(!(n instanceof x))return!1;if(t){let r=e.tr,i=d(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new s.p2(i,0,0))}),r.docChanged&&t(r)}return!0}function W(e,t){let n=e.createAndFill();return new u.wx(n).replace(0,n.content.size,t).doc}function q(e,t,n,r,i,o,s,l){if(0==s||s==t.height)return!1;let a=!1;for(let u=i;u<o;u++){let i=s*t.width+u,o=t.map[i];if(t.map[i-t.width]==o){a=!0;let i=n.nodeAt(o),{top:c,left:d}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(l).map(o+r),null,{...i.attrs,rowspan:s-c}),e.insert(e.mapping.slice(l).map(t.positionAt(s,d,n)),i.type.createAndFill({...i.attrs,rowspan:c+i.attrs.rowspan-s})),u+=i.attrs.colspan-1}}return a}function J(e,t,n,r,i,o,s,l){if(0==s||s==t.width)return!1;let a=!1;for(let u=i;u<o;u++){let i=u*t.width+s,o=t.map[i];if(t.map[i-1]==o){a=!0;let i=n.nodeAt(o),c=t.colCount(o),d=e.mapping.slice(l).map(o+r);e.setNodeMarkup(d,null,b(i.attrs,s-c,i.attrs.colspan-(s-c))),e.insert(d+i.nodeSize,i.type.createAndFill(b(i.attrs,0,s-c))),u+=i.attrs.rowspan-1}}return a}function Y(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw Error("No table found");let l=c.get(o),{top:a,left:u}=r,h=u+i.width,p=a+i.height,f=e.tr,m=0;function g(){if(!(o=n?f.doc.nodeAt(n-1):f.doc))throw Error("No table found");l=c.get(o),m=f.mapping.maps.length}(function(e,t,n,r,i,o,l){let a,u;let c=d(e.doc.type.schema);if(i>t.width)for(let o=0,s=0;o<t.height;o++){let l;let d=n.child(o);s+=d.nodeSize;let h=[];l=null==d.lastChild||d.lastChild.type==c.cell?a||(a=c.cell.createAndFill()):u||(u=c.header_cell.createAndFill());for(let e=t.width;e<i;e++)h.push(l);e.insert(e.mapping.slice(0).map(s-1+r),h)}if(o>t.height){let l=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==c.header_cell;l.push(i?u||(u=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}let d=c.row.create(null,s.HY.from(l)),h=[];for(let e=t.height;e<o;e++)h.push(d);e.insert(e.mapping.slice(0).map(r+n.nodeSize-2),h)}return!!(a||u)})(f,l,o,n,h,p,0)&&g(),q(f,l,o,n,u,h,a,m)&&g(),q(f,l,o,n,u,h,p,m)&&g(),J(f,l,o,n,a,p,u,m)&&g(),J(f,l,o,n,a,p,h,m)&&g();for(let e=a;
37e<p;e++){let t=l.positionAt(e,u,o),r=l.positionAt(e,h,o);f.replace(f.mapping.slice(m).map(t+n),f.mapping.slice(m).map(r+n),new s.p2(i.rows[e-a],0,0))}g(),f.setSelection(new x(f.doc.resolve(n+l.positionAt(a,u,o)),f.doc.resolve(n+l.positionAt(p-1,h-1,o)))),t(f)}var K=(0,a.$)({ArrowLeft:Q("horiz",-1),ArrowRight:Q("horiz",1),ArrowUp:Q("vert",-1),ArrowDown:Q("vert",1),"Shift-ArrowLeft":X("horiz",-1),"Shift-ArrowRight":X("horiz",1),"Shift-ArrowUp":X("vert",-1),"Shift-ArrowDown":X("vert",1),Backspace:V,"Mod-Backspace":V,Delete:V,"Mod-Delete":V});function G(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Q(e,t){return(n,r,i)=>{if(!i)return!1;let s=n.selection;if(s instanceof x)return G(n,r,o.Y1.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;let l=en(i,e,t);if(null==l)return!1;if("horiz"==e)return G(n,r,o.Y1.near(n.doc.resolve(s.head+t),t));{let i;let s=n.doc.resolve(l),a=v(s,e,t);return i=a?o.Y1.near(a,1):t<0?o.Y1.near(n.doc.resolve(s.before(-1)),-1):o.Y1.near(n.doc.resolve(s.after(-1)),1),G(n,r,i)}}}function X(e,t){return(n,r,i)=>{let o;if(!i)return!1;let s=n.selection;if(s instanceof x)o=s;else{let r=en(i,e,t);if(null==r)return!1;o=new x(n.doc.resolve(r))}let l=v(o.$headCell,e,t);return!!l&&G(n,r,new x(o.$anchorCell,l))}}function Z(e,t){let n=p(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new x(n))),!0)}function ee(e,t,n){if(!f(e.state))return!1;let r=function(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),o=i.type.spec.tableRole,l=i.type.schema,a=[];if("row"==o)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,o=e?0:Math.max(0,n-1),u=e<t.childCount-1?0:Math.max(0,r-1);(o||u)&&(i=W(d(l).row,new s.p2(i,o,u)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?W(d(l).row,new s.p2(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:o}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+o}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(s.HY.empty),n[i]<r){let o=d(e).cell.createAndFill(),l=[];for(let e=n[i];e<r;e++)l.push(o);t[i]=t[i].append(s.HY.from(l))}return{height:t.length,width:r,rows:t}}(l,a)}(n),i=e.state.selection;if(i instanceof x){r||(r={width:1,height:1,rows:[s.HY.from(W(d(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),l=c.get(t).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let o=n[e],l=[];for(let n=t[e]||0,i=0;n<r;i++){let s=o.child(i%o.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(b(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),l.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(s.HY.from(l))}n=i,e=r}if(t!=i){let e=[];for(let r=0,o=0;r<i;r++,o++){let l=[],a=n[o%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),l.push(t)}e.push(s.HY.from(l))}n=e,t=i}return{width:e,height:t,rows:n}}(r,l.right-l.left,l.bottom-l.top),Y(e.state,e.dispatch,o,l,r),!0}if(!r)return!1;{let t=m(e.state),n=t.start(-1);return Y(e.state,e.dispatch,n,c.get(t.node(-1)).findCell(t.pos-n),r),!0}}function et(e,t){var n;let r;if(t.ctrlKey||t.metaKey)return;let i=er(e,t.target);if(t.shiftKey&&e.state.selection instanceof x)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=p(e.state.selection.$anchor))&&(null==(n=ei(e,t))?void 0:n.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(t,n){let r=ei(e,n),i=null==h.getState(e.state);if(!r||!y(t,r)){if(!i)return;r=t}let o=new x(t,r);if(i||!e.state.selection.eq(o)){let n=e.state.tr.setSelection(o);i&&n.setMeta(h,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",l),null!=h.getState(e.state)&&e.dispatch(e.state.tr.setMeta(h,-1))}function l(n){let r;let l=h.getState(e.state);if(null!=l)r=e.state.doc.resolve(l);else if(er(e,n.target)!=i&&!(r=ei(e,t)))return s();r&&o(r,n)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",l)}
37function en(e,t,n){if(!(e.state.selection instanceof o.Bs))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))break;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){let o=r.before(i),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?o:null}}return null}function er(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function ei(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?p(e.state.doc.resolve(n.pos)):null}var eo=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),es(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,es(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function es(e,t,n,r,i,o){var s;let l=0,a=!0,u=t.firstChild,c=e.firstChild;if(c){for(let e=0,n=0;e<c.childCount;e++){let{colspan:s,colwidth:d}=c.child(e).attrs;for(let e=0;e<s;e++,n++){let s=i==n?o:d&&d[e],c=s?s+"px":"";if(l+=s||r,s||(a=!1),u)u.style.width!=c&&(u.style.width=c),u=u.nextSibling;else{let e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;u;){let e=u.nextSibling;null==(s=u.parentNode)||s.removeChild(u),u=e}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var el=new o.H$("tableColumnResizing");function ea({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=eo,lastColumnResizable:i=!0}={}){let s=new o.Sy({key:el,state:{init(e,t){var i,o;let l=null==(o=null==(i=s.spec)?void 0:i.props)?void 0:o.nodeViews,a=d(t.schema).table.name;return r&&l&&(l[a]=(e,t)=>new r(e,n,t)),new eu(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=el.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r){if(!e.editable)return;let i=el.getState(e.state);if(i&&!i.dragging){let o=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(o){let{left:r,right:i}=o.getBoundingClientRect();t.clientX-r<=n?s=ec(e,t,"left",n):i-t.clientX<=n&&(s=ec(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&-1!==s){let t=e.state.doc.resolve(s),n=t.node(-1),r=c.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}eh(e,s)}}}(t,n,e,i)},mouseleave:e=>{!function(e){if(!e.editable)return;let t=el.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&eh(e,-1)}(e)},mousedown:(e,r)=>{!function(e,t,n,r){var i;if(!e.editable)return;let o=null!=(i=e.dom.ownerDocument.defaultView)?i:window,s=el.getState(e.state);if(!s||-1==s.activeHandle||s.dragging)return;let l=e.state.doc.nodeAt(s.activeHandle),a=function(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let o=e.domAtPos(t),s=o.node.childNodes[o.offset].offsetWidth,l=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],l--);return s/l}(e,s.activeHandle,l.attrs);function u(t){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",d);let r=el.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),o=c.get(i),s=r.start(-1),l=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let e=0;e<o.height;e++){let t=e*o.width+l;if(e&&o.map[t]==o.map[t-o.width])continue;let r=o.map[t],u=i.nodeAt(r).attrs,c=1==u.colspan?0:l-o.colCount(r);if(u.colwidth&&u.colwidth[c]==n)continue;let d=u.colwidth?u.colwidth.slice():Array(u.colspan).fill(0);d[c]=n,a.setNodeMarkup(s+r,null,{...u,colwidth:d})}a.docChanged&&e.dispatch(a)}(e,r.activeHandle,ed(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(el,{setDragging:null})))}function d(t){if(!t.which)return u(t);let i=el.getState(e.state);if(i&&i.dragging){let o=ed(i.dragging,t,n);ep(e,i.activeHandle,o,r)}}e.dispatch(e.state.tr.setMeta(el,{setDragging:{startX:t.clientX,startWidth:a}})),ep(e,s.activeHandle,a,r),o.addEventListener("mouseup",u),o.addEventListener("mousemove",d),t.preventDefault()}(e,r,t,n)}},decorations:e=>{let t=el.getState(e);if(t&&t.activeHandle>-1)return function(e,t){var n;let r=[],i=e.doc.resolve(t),o=i.node(-1);if(!o)return l.EH.empty;let s=c.get(o),a=i.start(-1),u=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let t=0;t<s.height;t++){let i=u+t*s.width;if((u==s.width-1||s.map[i]!=s.map[i+1])&&(0==t||s.map[i]!=s.map[i-s.width])){let t=s.map[i],u=a+t+o.nodeAt(t).nodeSize-1,c=document.createElement("div");
37c.className="column-resize-handle",(null==(n=el.getState(e))?void 0:n.dragging)&&r.push(l.p.node(a+t,a+t+o.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),r.push(l.p.widget(u,c))}}return l.EH.create(e.doc,r)}(e,t.activeHandle)},nodeViews:{}}});return s}var eu=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=t.getMeta(el);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(this.activeHandle,n.setDragging);if(this.activeHandle>-1&&t.docChanged){let n=t.mapping.map(this.activeHandle,-1);return g(t.doc.resolve(n))||(n=-1),new e(n,this.dragging)}return this}};function ec(e,t,n,r){let i=e.posAtCoords({left:t.clientX+("right"==n?-r:r),top:t.clientY});if(!i)return -1;let{pos:o}=i,s=p(e.state.doc.resolve(o));if(!s)return -1;if("right"==n)return s.pos;let l=c.get(s.node(-1)),a=s.start(-1),u=l.map.indexOf(s.pos-a);return u%l.width==0?-1:a+l.map[u-1]}function ed(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function eh(e,t){e.dispatch(e.state.tr.setMeta(el,{setHandle:t}))}function ep(e,t,n,r){let i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),l=c.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,a=e.domAtPos(i.start(-1)).node;for(;a&&"TABLE"!=a.nodeName;)a=a.parentNode;a&&es(o,a.firstChild,a,r,l,n)}function ef({allowTableNodeSelection:e=!1}={}){return new o.Sy({key:h,state:{init:()=>null,apply(e,t){let n=e.getMeta(h);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:S,handleDOMEvents:{mousedown:et},createSelectionBetween:e=>null!=h.getState(e.state)?e.state.selection:null,handleTripleClick:Z,handleKeyDown:K,handlePaste:ee},appendTransaction:(t,n,r)=>(function(e,t,n){let r,i;let s=(t||e).selection,l=(t||e).doc;if(s instanceof o.qv&&(i=s.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=x.create(l,s.from);else if("row"==i){let e=l.resolve(s.from+1);r=x.rowSelection(e,e)}else if(!n){let e=c.get(s.node),t=s.from+1,n=t+e.map[e.width*e.height-1];r=x.create(l,t+1,n)}}else s instanceof o.Bs&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}(s)?r=o.Bs.create(l,s.from):s instanceof o.Bs&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(s)&&(r=o.Bs.create(l,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t})(r,E(r,n),e)})}},85925:function(e,t,n){"use strict";n.d(t,{M_:function(){return x},T5:function(){return w},fW:function(){return S},ms:function(){return b}});var r,i,o=n(83641),s=n(96419),l=n(11996),a={exports:{}},u={};a.exports=function(){if(r)return u;r=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=o.useState,n=o.useEffect,i=o.useLayoutEffect,s=o.useDebugValue;function l(t){var n=t.getSnapshot;t=t.value;try{var r=n();return!e(t,r)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,r){var o=r(),a=t({inst:{value:o,getSnapshot:r}}),u=a[0].inst,c=a[1];return i(function(){u.value=o,u.getSnapshot=r,l(u)&&c({inst:u})},[e,o,r]),n(function(){return l(u)&&c({inst:u}),e(function(){l(u)&&c({inst:u})})},[e]),s(o),o};return u.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:a,u}();var c=a.exports;let d=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},h=({contentComponent:e})=>{let t=c.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return o.createElement(o.Fragment,null,Object.values(t))};class p extends o.Component{constructor(e){var t;super(e),this.editorContentRef=o.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null===(t=e.editor)||void 0===t?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>
37t,setRenderer(n,r){t={...t,[n]:s.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;let t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){let{editor:e,innerRef:t,...n}=this.props;return o.createElement(o.Fragment,null,o.createElement("div",{ref:d(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&o.createElement(h,{contentComponent:e.contentComponent}))}}let f=(0,o.forwardRef)((e,t)=>{let n=o.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[e.editor]);return o.createElement(p,{key:n,innerRef:t,...e})});o.memo(f);var m={exports:{}},g={};m.exports=function(){if(i)return g;i=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=c.useSyncExternalStore,n=o.useRef,r=o.useEffect,s=o.useMemo,l=o.useDebugValue;return g.useSyncExternalStoreWithSelector=function(i,o,a,u,c){var d=n(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var p=t(i,(d=s(function(){function t(t){if(!i){if(i=!0,n=t,t=u(t),void 0!==c&&h.hasValue){var o=h.value;if(c(o,t))return r=o}return r=t}if(o=r,e(n,t))return o;var s=u(t);return void 0!==c&&c(o,s)?o:(n=t,r=s)}var n,r,i=!1,s=void 0===a?null:a;return[function(){return t(o())},null===s?void 0:function(){return t(s())}]},[o,a,u,c]))[0],d[1]);return r(function(){h.hasValue=!0,h.value=p},[p]),l(p),p},g}(),m.exports,"undefined"==typeof window||"undefined"!=typeof window&&window.next,(0,o.createContext)({editor:null}).Consumer;let y=(0,o.createContext)({onDragStart:void 0}),v=()=>(0,o.useContext)(y),b=e=>{let t=e.as||"div",{nodeViewContentRef:n}=v();return o.createElement(t,{...e,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},w=o.forwardRef((e,t)=>{let{onDragStart:n}=v(),r=e.as||"div";return o.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});class x{constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?(0,s.flushSync)(()=>{this.render()}):this.render()}render(){var e,t;let n=this.component,r=this.props,i=this.editor;("function"==typeof n&&n.prototype&&n.prototype.isReactComponent||"object"==typeof n&&(null===(t=n.$$typeof)||void 0===t?void 0:t.toString())==="Symbol(react.forward_ref)")&&(r.ref=e=>{this.ref=e}),this.reactElement=o.createElement(n,r),null===(e=null==i?void 0:i.contentComponent)||void 0===e||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;null===(e=null==t?void 0:t.contentComponent)||void 0===e||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}}class k extends l.DK{mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)}},n=this.component,r=o.memo(e=>o.createElement(y.Provider,{value:t},o.createElement(n,e)));r.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);let{className:s=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new x(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.n
37ame} ${s}`.trim()}),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null===(e=this.renderer.element.firstElementChild)||void 0===e?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if("number"==typeof n){if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}}update(e,t,n){let r=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=(0,l.m7)(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function S(e,t){return n=>n.editor.contentComponent?new k(e,n,t):{}}},65302:function(e,t,n){"use strict";n.d(t,{V:function(){return Y}});var r=n(11996);let i=/^\s*>\s$/,o=r.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}}
37,addInputRules(){return[(0,r.S0)({find:i,type:this.type})]}}),s=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,a=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,u=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,c=r.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.Cf)({find:s,type:this.type}),(0,r.Cf)({find:a,type:this.t
37ype})]},addPasteRules(){return[(0,r.K9)({find:l,type:this.type}),(0,r.K9)({find:u,type:this.type})]}});var d=n(85188);let h=/(^|[^`])`([^`]+)`(?!`)/,p=/(^|[^`])`([^`]+)`(?!`)/g,f=r.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.Cf)({find:h,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:p,type:this.type})]}});var m=n(73305),g=n(11287),y=n(48920),v=n(6847),b=n(21870),w=n(54418),x=n(65994);class k extends b.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return k.valid(n)?new k(n):b.Y1.near(n)}content(){return w.p2.empty}eq(e){return e instanceof k&&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 k(e.resolve(t.pos))}getBookmark(){return new S(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){t:for(;;){if(!n&&k.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(k.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!b.qv.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue t}break}i=o,r+=t;let s=e.doc.resolve(r);if(k.valid(s))return s}return null}}}k.prototype.visible=!1,k.findFrom=k.findGapCursorFrom,b.Y1.jsonID("gapcursor",k);class S{constructor(e){this.pos=e}map(e){return new S(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return k.valid(t)?new k(t):b.Y1.near(t)}}let C=(0,v.$)({ArrowLeft:E("horiz",-1),ArrowRight:E("horiz",1),ArrowUp:E("vert",-1),ArrowDown:E("vert",1)});function E(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,l=o.empty;if(o instanceof b.Bs){if(!i.endOfTextblock(n)||0==s.depth)return!1;l=!1,s=e.doc.resolve(t>0?s.after():s.before())}let a=k.findGapCursorFrom(s,t,l);return!!a&&(r&&r(e.tr.setSelection(new k(a))),!0)}}function O(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!k.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&b.qv.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new k(r))),!0)}function M(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof k))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=w.HY.empty;for(let e=r.length-1;e>=0;e--)i=w.HY.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new w.p2(i,0,0));return o.setSelection(b.Bs.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function A(e){if(!(e.selection instanceof k))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",x.EH.create(e.doc,[x.p.widget(e.selection.head,t,{key:"gapcursor"})])}let T=r.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new b.Sy({props:{decorations:A,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&k.valid(n)?new k(n):null,handleClick:O,handleKeyDown:C,handleDOMEvents:{beforeinput
37:M}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!==(t=(0,r.nU)((0,r.Nl)(e,"allowGapCursor",n)))&&void 0!==t?t:null}}}),N=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.P1)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,l=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&l&&o){let t=l.filter(e=>s.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var R=n(7903),P=n(58736),j=n(66530);let I=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,L=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,_=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,$=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,D=r.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
37,addInputRules(){return[(0,r.Cf)({find:I,type:this.type}),(0,r.Cf)({find:_,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:L,type:this.type}),(0,r.K9)({find:$,type:this.type})]}}),z=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),H="textStyle",F=/^(\d+)\.\s$/,B=r.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",(0,r.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(H)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}
37,addInputRules(){let e=(0,r.S0)({find:F,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.S0)({find:F,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(H)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}});var U=n(10384);let V=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,W=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,q=r.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
37,addInputRules(){return[(0,r.Cf)({find:V,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:W,type:this.type})]}}),J=r.NB.create({name:"text",group:"inline"}),Y=r.hj.create({name:"starterKit",addExtensions(){var e,t,n,r,i,s,l,a,u,h,p,v,b,w,x,k,S,C;let E=[];return!1!==this.options.bold&&E.push(c.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.blockquote&&E.push(o.configure(null===(t=this.options)||void 0===t?void 0:t.blockquote)),!1!==this.options.bulletList&&E.push(d.DY.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&E.push(f.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&E.push(m.dn.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&E.push(g.B.configure(null===(s=this.options)||void 0===s?void 0:s.document)),!1!==this.options.dropcursor&&E.push(y.m.configure(null===(l=this.options)||void 0===l?void 0:l.dropcursor)),!1!==this.options.gapcursor&&E.push(T.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&E.push(N.configure(null===(u=this.options)||void 0===u?void 0:u.hardBreak)),!1!==this.options.heading&&E.push(R.X.configure(null===(h=this.options)||void 0===h?void 0:h.heading)),!1!==this.options.history&&E.push(P.A.configure(null===(p=this.options)||void 0===p?void 0:p.history)),!1!==this.options.horizontalRule&&E.push(j.b.configure(null===(v=this.options)||void 0===v?void 0:v.horizontalRule)),!1!==this.options.italic&&E.push(D.configure(null===(b=this.options)||void 0===b?void 0:b.italic)),!1!==this.options.listItem&&E.push(z.configure(null===(w=this.options)||void 0===w?void 0:w.listItem)),!1!==this.options.orderedList&&E.push(B.configure(null===(x=this.options)||void 0===x?void 0:x.orderedList)),!1!==this.options.paragraph&&E.push(U.n.configure(null===(k=this.options)||void 0===k?void 0:k.paragraph)),!1!==this.options.strike&&E.push(q.configure(null===(S=this.options)||void 0===S?void 0:S.strike)),!1!==this.options.text&&E.push(J.configure(null===(C=this.options)||void 0===C?void 0:C.text)),E}})},66410:function(e,t,n){"use strict";n.d(t,{ZP:function(){return et}});let r=e=>"string"==typeof e,i=()=>{let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},o=e=>null==e?"":""+e,s=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},l=/###/g,a=e=>e&&e.indexOf("###")>-1?e.replace(l,"."):e,u=e=>!e||r(e),c=(e,t,n)=>{let i=r(t)?t.split("."):t,o=0;for(;o<i.length-1;){if(u(e))return{};let t=a(i[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return u(e)?{}:{obj:e,k:a(i[o])}},d=(e,t,n)=>{let{obj:r,k:i}=c(e,t,Object);if(void 0!==r||1===t.length){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),l=c(e,s,Object);for(;void 0===l.obj&&s.length;)o=`${s[s.length-1]}.${o}`,(l=c(e,s=s.slice(0,s.length-1),Object))&&l.obj&&void 0!==l.obj[`${l.k}.${o}`]&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},h=(e,t,n,r)=>{let{obj:i,k:o}=c(e,t,Object);i[o]=i[o]||[],i[o].push(n)},p=(e,t)=>{let{obj:n,k:r}=c(e,t);if(n)return n[r]},f=(e,t,n)=>{let r=p(e,n);return void 0!==r?r:p(t,n)},m=(e,t,n)=>{for(let i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?r(e[i])||e[i]instanceof String||r(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):m(e[i],t[i],n):e[i]=t[i]);return e},g=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let v=e=>r(e)?e.replace(/[&<>"'\/]/g,e=>y[e]):e;class b{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}let w=[" ",",","?","!",";"],x=new b(20),k=(e,t,n)=>{t=t||"",n=n||"";let r=w.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let i=x.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),o=!i.test(e);if(!o){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o},S=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let r=t.split(n),i=e;for(let e=0;e<r.length;){let t;if(!i||"object"!=typeof i)return;let o="";for(let s=e;s<r.length;++s)if(s!==e&&(o+=n),o+=r[s],void 0!==(t=i[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<r.length-1)continue;e+=s-e+1;break}i=t}return i},C=e=>e&&e.replace("_","-"),E={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class O{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||E,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(r(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new O(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new O(this.logger,e)}}var M=new O;class A{constructor(){this.observers={}}
37on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[r,i]=t;for(let t=0;t<i;t++)r.apply(r,[e,...n])})}}class T extends A{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,l=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):r(n)&&s?i.push(...n.split(s)):i.push(n)));let a=p(this.data,i);return(!a&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),!a&&l&&r(n))?S(this.data&&this.data[e]&&this.data[e][t],n,s):a}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[e,t];
37n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),d(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let i in n)(r(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let l=p(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?m(l,n,i):l={...l,...n},d(this.data,s,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var N={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))}),t}};let R={};class P extends A{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),s(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
37i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=M.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],s=n&&e.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!k(e,n,i);if(s&&!l){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r(o)?[o]:o};let s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(i)}return{key:e,namespaces:r(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],t),a=l[l.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(c){let e=t.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${e}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:s}let d=this.resolve(e,t),h=d&&d.res,p=d&&d.usedKey||s,f=d&&d.exactUsedKey||s,m=Object.prototype.toString.apply(h),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!r(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(y&&h&&v&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(m)&&!(r(g)&&Array.isArray(h))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...t,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=e,d.usedParams=this.getUsedParamsDetails(t),d):e}if(o){let e=Array.isArray(h),n=e?[]:{},r=e?f:p;for(let e in h)if(Object.prototype.hasOwnProperty.call(h,e)){let i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:l}),n[e]===i&&(n[e]=h[e])}h=n}}else if(y&&r(g)&&Array.isArray(h))(h=h.join(g))&&(h=this.extendTranslation(h,e,t,n));else{let i=!1,l=!1,c=void 0!==t.count&&!r(t.count),p=P.hasDefaultValue(t),f=c?this.pluralResolver.getSuffix(u,t.count,t):"",m=t.ordinal&&c?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=c&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),y=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${f}`]||t[`defaultValue${m}`]||t.defaultValue;!this.isValidLookup(h)&&p&&(i=!0,h=y),this.isValidLookup(h)||(l=!0,h=s);let v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&l?void 0:h,b=p&&y!==h&&this.options.updateMissing;if(l||i||b){if(this.logger.log(b?"updateKey":"missingKey",u,a,s,b?y:h),o){let e=this.resolve(s,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);let r=(e,n,r)=>{let i=p&&r!==h?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,i,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,n,i,b,t),this.emit
37("missingKey",e,a,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach(e=>{let n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>n.indexOf(`${this.options.pluralSeparator}zero`)&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],s+n,t[`defaultValue${n}`]||y)})}):r(e,s,y))}h=this.extendTranslation(h,e,t,d,n),l&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${s}`),(l||i)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${s}`:s,i?h:void 0):this.options.parseMissingKeyHandler(h))}return i?(d.res=h,d.usedParams=this.getUsedParamsDetails(t),d):h}extendTranslation(e,t,n,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){let l;n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=r(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let u=n.replace&&!r(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||i.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(s.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):s.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}let l=n.postProcess||this.options.postProcess,a=r(l)?[l]:l;return null!=e&&a&&a.length&&!1!==n.applyPostProcessor&&(e=N.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,i,o,s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let a=this.extractFromKey(e,l),u=a.key;n=u;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));let d=void 0!==l.count&&!r(l.count),h=d&&!l.ordinal&&0===l.count&&this.pluralResolver.shouldUseIntlApi(),p=void 0!==l.context&&(r(l.context)||"number"==typeof l.context)&&""!==l.context,f=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);
37c.forEach(e=>{this.isValidLookup(t)||(s=e,!R[`${f[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(R[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(n=>{let r;if(this.isValidLookup(t))return;o=n;let s=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(s,u,n,e,l);else{let e;d&&(e=this.pluralResolver.getSuffix(n,l.count,l));let t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(s.push(u+e),l.ordinal&&0===e.indexOf(r)&&s.push(u+e.replace(r,this.options.pluralSeparator)),h&&s.push(u+t)),p){let n=`${u}${this.options.contextSeparator}${l.context}`;s.push(n),d&&(s.push(n+e),l.ordinal&&0===e.indexOf(r)&&s.push(n+e.replace(r,this.options.pluralSeparator)),h&&s.push(n+t))}}for(;r=s.pop();)this.isValidLookup(t)||(i=r,t=this.getResource(n,e,r,l))}))})}),{res:t,usedKey:n,exactUsedKey:i,usedLng:o,usedNS:s}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!r(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}let j=e=>e.charAt(0).toUpperCase()+e.slice(1);class I{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=M.create("languageUtils")}getScriptPartFromCode(e){if(!(e=C(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=C(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}let t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=j(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=j(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=j(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),r(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];
37return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return r(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):r(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{0>i.indexOf(e)&&o(this.formatLanguageCode(e))}),i}}let L=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)},$=["v1","v2","v3"],D=["v4"],z={zero:0,one:1,two:2,few:3,many:4,other:5},H=()=>{let e={};return L.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:_[t.fc]}})}),e};class F{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=M.create("pluralResolver"),(!this.options.compatibilityJSON||D.includes(this.options.compatibilityJSON))&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=H(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){let n;let r=C("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{n=new Intl.PluralRules(r,{type:i})}catch(i){if(!e.match(/-|_/))return;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[o]=n,n}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};
37return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>z[e]-z[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));let i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}
37shouldUseIntlApi(){return!$.includes(this.options.compatibilityJSON)}}let B=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],s=f(e,t,n);return!s&&o&&r(n)&&void 0===(s=S(e,n,i))&&(s=S(t,n,i)),s},U=e=>e.replace(/\$/g,"$$$$");class V{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=M.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:a,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:v,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?g(i):o||"{{",this.suffix=s?g(s):l||"}}",this.formatSeparator=a||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?g(d):h||g("$t("),this.nestingSuffix=p?g(p):f||g(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,i){let s,l,a;let u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(0>e.indexOf(this.formatSeparator)){let r=B(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...t,interpolationkey:e}):r}let r=e.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(B(t,u,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...i,...t,interpolationkey:o})};this.resetRegExp();let d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>U(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?U(this.escape(e)):U(e)}].forEach(t=>{for(a=0;s=t.regex.exec(e);){let n=s[1].trim();if(void 0===(l=c(n))){if("function"==typeof d){let t=d(e,s,i);l=r(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))l="";else if(h){l=s[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),l=""}else r(l)||this.useRawValueToEscape||(l=o(l));let u=t.safeValue(l);if(e=e.replace(s[0],u),h?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t){let n,i,s,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),i=`{${r[1]}`;e=r[0];let o=(i=this.interpolate(i,s)).match(/'/g),l=i.match(/"/g);(o&&o.length%2==0&&!l||l.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let u=[];(s=(s={...l}).replace&&!r(s.replace)?s.replace:s).applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){let e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),u=e,c=!0}if((i=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&!r(i))return i;r(i)||(i=o(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}
37`),i=""),c&&(i=u.reduce((e,t)=>this.format(e,t,l.lng,{...l,interpolationkey:n[1].trim()}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}let W=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);"currency"===t&&0>i.indexOf(":")?n.currency||(n.currency=i.trim()):"relativetime"===t&&0>i.indexOf(":")?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},q=e=>{let t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});let s=r+JSON.stringify(o),l=t[s];return l||(l=e(C(r),i),t[s]=l),l(n)}};class J{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=M.create("formatter"),this.options=e,this.formats={number:q((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:q((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:q((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:q((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:q((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=q(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&0>i[0].indexOf(")")&&i.find(e=>e.indexOf(")")>-1)){let e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:o}=W(t);if(this.formats[i]){let t=e;try{let s=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[i](e,l,{...o,...r,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}}let Y=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class K extends A{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=M.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){let i={},o={},s={},l={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,r=!1,void 0===o[s]&&(o[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===l[t]&&(l[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let s={};this.queue.forEach(n=>{h(n.loaded,[i],o),Y(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}
37),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});return}this.readingCalls++;let s=(s,l)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(s&&l&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i);return}o(s,l)},l=this.backend[n].bind(this.backend);if(2===l.length){try{let n=l(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}return}return l(e,t,s)}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();r(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r(t)&&(t=[t]);let o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=n&&""!==n){if(this.backend&&this.backend.create){let l={...o,isUpdate:i},a=this.backend.create.bind(this.backend);if(a.length<6)try{let i;(i=5===a.length?a(e,t,n,r,l):a(e,t,n,r))&&"function"==typeof i.then?i.then(e=>s(null,e)).catch(s):s(null,i)}catch(e){s(e)}else a(e,t,n,r,s,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let G=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),r(e[1])&&(t.defaultValue=e[1]),r(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Q=e=>(r(e.ns)&&(e.ns=[e.ns]),r(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),X=()=>{},Z=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})};class ee extends A{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Q(e),this.services={},this.logger=M,this.modules={external:[]},Z(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(r(t.ns)?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let o=G();this.options={...o,...this.options,...Q(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);let s=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?M.init(s(this.modules.logger),this.options):M.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=J);let n=new I(this.options);this.store=new T(this.options.resources,this.options);let r=this.services;r.logger=M,r.resourceStore=this.store,r.languageUtils=n,r.pluralResolver=new F(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(r.formatter=s(t),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new V(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new K(s(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}),this.modules.languageDetector&&(r.languageDetector=s(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=s(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new P(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}
37),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=X),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let l=i(),a=()=>{let e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),l}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X,n=t,i=r(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=X),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&N.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let o=i();this.emit("languageChanging",e);let s=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},l=(e,r)=>{r?(s(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,o.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);let n=r(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||s(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{l(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),o}getFixedT(e,t,n){var i=this;let o=function(e,t){let r,s;if("object"!=typeof t){for(var l=arguments.length,a=Array(l>2?l-2:0),u=2;u<l;u++)a[u-2]=arguments[u];r=i.options.overloadTranslationOptionHandler([e,t].concat(a))}else r={...t};r.lng=r.lng||o.lng,r.lngs=r.lngs||o.lngs,r.ns=r.ns||o.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||n||o.keyPrefix);let c=i.options.keySeparator||".";return s=r.keyPrefix&&Array.isArray(e)?e.map(e=>`${r.keyPrefix}${c}${e}`):r.keyPrefix?`${r.keyPrefix}${c}${e}`:e,i.t(s,r)};return r(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
37if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let o=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!r||o(i,e)))}loadNamespaces(e,t){let n=i();return this.options.ns?(r(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=i();r(e)&&(e=[e]);let o=this.options.preload||[],s=e.filter(e=>0>o.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=o.concat(s),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf((this.services&&this.services.languageUtils||new I(G())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ee(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X,n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},i=new ee(r);return(void 0!==e.debug||void 0!==e.prefix)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new T(this.store.data,r),i.services.resourceStore=i.store),i.translator=new P(i.services,r),i.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let et=ee.createInstance();et.createInstance=ee.createInstance,et.createInstance,et.dir,et.init,et.loadResources,et.reloadResources,et.use,et.changeLanguage,et.getFixedT,et.t,et.exists,et.setDefaultNamespace,et.hasLoadedNamespace,et.loadNamespaces,et.loadLanguages},94780:function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}n.d(t,{Z:function(){return i}});var i=function e(t,n){function i(e,i,o){if("undefined"!=typeof document){"number"==typeof(o=r({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in o)o[l]&&(s+="; "+l,!0!==o[l]&&(s+="="+o[l].split(";")[0]));return document.cookie=e+"="+t.write(i,e)+s}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var l=decodeURIComponent(o[0]);if(r[l]=t.read(s,l),e===l)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){i(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
37URIComponent)}},{path:"/"})},11782:function(e,t,n){"use strict";n.d(t,{w:function(){return a}});var r=n(11996),i=n(21870);let o=r.NB.create({name:"figure",addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"block figcaption",draggable:!0,defining:!0,selectable:!0,parseHTML(){return[{tag:`figure[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:e}){return["figure",(0,r.P1)(e,{"data-type":this.name}),0]},addProseMirrorPlugins(){return[new i.Sy({props:{handleDOMEvents:{dragstart:(e,t)=>{if(!t.target)return!1;let n=e.posAtDOM(t.target,0);return e.state.doc.resolve(n).parent.type.name===this.type.name&&t.preventDefault(),!1}}}})]}}),s=r.NB.create({name:"quote",content:"paragraph+",defining:!0,marks:"",parseHTML:()=>[{tag:"blockquote"}],renderHTML:({HTMLAttributes:e})=>["blockquote",e,0],addKeyboardShortcuts:()=>({})}),l=r.NB.create({name:"quoteCaption",group:"block",content:"text*",defining:!0,isolating:!0,parseHTML:()=>[{tag:"figcaption"}],renderHTML:({HTMLAttributes:e})=>["figcaption",e,0],addKeyboardShortcuts(){return{Enter:({editor:e})=>{let{state:{selection:{$from:t,empty:n}}}=e;if(!n||t.parent.type!==this.type||t.parentOffset!==t.parent.nodeSize-2)return!1;let r=e.state.selection.$from.end();return e.chain().focus(r).insertContentAt(r,{type:"paragraph"}).run()}}}}),a=o.extend({name:"blockquoteFigure",group:"block",content:"quote quoteCaption",isolating:!0,addExtensions:()=>[s,l],renderHTML({HTMLAttributes:e}){return["figure",(0,r.P1)(e,{"data-type":this.name}),["div",{},0]]},addKeyboardShortcuts:()=>({Enter:()=>!1,Backspace:({editor:e})=>{let{state:t}=e,{selection:n}=t,{$from:r}=n,i=null,o=-1;for(let e=r.depth;e>=0;e--){let t=r.node(e);if("blockquoteFigure"===t.type.name){i=t,o=e;break}}if(!i){let t=r.pos;for(;t>0;){let n=e.state.doc.nodeAt(t);if(n&&"blockquoteFigure"===n.type.name){i=n;break}if(0===(t=e.state.doc.resolve(t).before()))break}}if(!i)return!1;let s=0===r.parentOffset,l=i.firstChild,a=i.lastChild,u=l&&(0===l.content.size||2===l.content.size&&l.firstChild?.type.n
37ame==="paragraph"&&0===l.firstChild.content.size),c=a&&0===a.content.size;if(s&&u&&c){let t=r.before(o);return e.chain().setNodeSelection(t).deleteSelection().run()}return!1}}),addAttributes(){return{...this.parent?.()}},addCommands(){return{setBlockquote:()=>({state:e,chain:t})=>{let n=e.selection.$from.start(),r=e.selection.content();return t().focus().insertContent({type:this.name,content:[{type:"quote",content:r.content.toJSON()||[{type:"paragraph",attrs:{textAlign:"left"}}]},{type:"quoteCaption"}]}).focus(n+1).run()}}}})},82576:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});let r=n(11287).B.extend({content:"(block)+"})},80780:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});var r=n(11996);let i=n(7903).Z.extend({renderHTML({node:e,HTMLAttributes:t}){let n=parseInt(e.attrs.level,10),i=this.options.levels.includes(n)?n:this.options.levels[0];return[`h${i}`,(0,r.P1)(this.options.HTMLAttributes,t),0]}})},60707:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(11996);let i=n(66530).Z.extend({renderHTML(){return["div",(0,r.P1)(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]}})},70408:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(74023);n(83641);let i=e=>{let{className:t}=e;return(0,r.jsx)("svg",{className:t,clipRule:"evenodd",fillRule:"evenodd",height:"100%",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M14 4h-13v18h20v-11h1v12h-22v-20h14v1zm10 5h-1v-6.293l-11.646 11.647-.708-.708 11.647-11.646h-6.293v-1h8v8z",fill:"none",stroke:"currentColor"})})};var o=n(85925),s=n(66410),l=n(81341),a=({className:e,...t})=>(0,r.jsx)(o.T5,{className:(0,l.cn)("react-component",e),onClick:()=>{t.editor.commands.setNodeSelection(t.getPos())},children:(0,r.jsx)(o.ms,{contentEditable:"false",className:"socialMediaContainer",children:t?.node.type.spec.draggable?(0,r.jsx)("div",{draggable:"true","data-drag-handle":"",style:{width:"100%"},children:t?.node?.attrs?.id?(0,r.jsxs)("div",{className:"flex justify-center items-center w-full  gap-x-6",children:[(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)("div",{className:"w-[32px] h-[64px] bg-blue-400"}),(0,r.jsx)("img",{src:t?.node?.attrs?.thumbnail??"",width:212,height:120,alt:"",className:"-ml-6 !w-[212px] !h-[120px] object-cover"})]}),(0,r.jsxs)("div",{className:"flex flex-col justidy-start items-start font-trt gap-y-2 ",children:[(0,r.jsx)("a",{className:"text-black dark:text-white text-lg capitalize w-full",dir:s.ZP.dir(),children:"بیشتر بخوانید"}),(0,r.jsx)("h3",{className:"text-2xl font-bold !mt-0 w-full",dir:s.ZP.dir(),children:t?.node?.attrs?.title})]})]}):(0,r.jsxs)("div",{className:"w-full bg-zinc-100 py-8 px-6 flex items-center justify-center gap-2 socialMediaCard",draggable:"true","data-drag-handle":"",children:[(0,r.jsx)(i,{className:"h-6 w-6"}),(0,r.jsx)("p",{className:"w-full flex items-center justify-start mt-0",style:{marginTop:0},children:"Add Internal Content Links"})]})}):null})})},32732:function(e,t,n){"use strict";n.d(t,{r:function(){return eB}});var r=n(11996);let i="numeric",o="ascii",s="alpha",l="asciinumeric",a="alphanumeric",u="domain",c="emoji",d="whitespace";function h(e,t,n){for(let r in t[i]&&(t[l]=!0,t[a]=!0),t[o]&&(t[l]=!0,t[s]=!0),t[l]&&(t[a]=!0),t[s]&&(t[a]=!0),t[a]&&(t[u]=!0),t[c]&&(t[u]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function p(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}p.groups={},p.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||p.groups,t&&t.j?i=t:(i=new p(t),n&&r&&h(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,o=e.length;if(!o)return i;for(let t=0;t<o-1;t++)i=i.tt(e[t]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){if(r=r||p.groups,t&&t.j)return this.j[e]=t,t;let i,o=this.go(e);return o?(Object.assign((i=new p).j,o.j),i.jr.push.apply(i.jr,o.jr),i.jd=o.jd,i.t=o.t):i=new p,t&&(r&&(i.t&&"string"==typeof i.t?h(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&h(t,n,r)),i.t=t),this.j[e]=i,i}};let f=(e,t,n,r,i)=>e.ta(t,n,r,i),m=(e,t,n,r,i)=>e.tr(t,n,r,i),g=(e,t,n,r,i)=>e.ts(t,n,r,i),y=(e,t,n,r,i)=>e.tt(t,n,r,i),v="WORD",b="UWORD",w="ASCIINUMERICAL",x="ALPHANUMERICAL",k="LOCALHOST",S="UTLD",C="SCHEME",E="SLASH_SCHEME",O="OPENBRACE",M="CLOSEBRACE",A="OPENBRACKET",T="CLOSEBRACKET",N="OPENPAREN",R="CLOSEPAREN",P="OPENANGLEBRACKET",j="CLOSEANGLEBRACKET",I="FULLWIDTHLEFTPAREN",L="FULLWIDTHRIGHTPAREN",_="LEFTCORNERBRACKET",$="RIGHTCORNERBRACKET",D="LEFTWHITECORNERBRACKET",z="RIGHTWHITECORNERBRACKET",H="FULLWIDTHLESSTHAN",F="FULLWIDTHGREATERTHAN",B="AMPERSAND",U="APOSTROPHE",V="ASTERISK",W="BACKSLASH",q="BACKTICK",J="CARET",Y="COLON",K="COMMA",G="DOLLAR",Q="EQUALS",X="EXCLAMATION",Z="HYPHEN",ee="PERCENT",et="PIPE",en="PLUS",er="POUND",ei="QUERY",eo="QUOTE",es="FULLWIDTHMIDDLEDOT",el="SEMI",ea="SLASH",eu="TILDE",ec="UNDERSCORE",ed="EMOJI";var eh=Object.freeze({__proto__:null,ALPHANUMERICAL:x,AMPERSAND:B,APOSTROPHE:U,ASCIINUMERICAL:w,ASTERISK:V,AT:"AT",BACKSLASH:W,BACKTICK:q,CARET:J,CLOSEANGLEBRACKET:j,CLOSEBRACE:M,CLOSEBRACKET:T,CLOSEPAREN:R,COLON:Y,COMMA:K,DOLLAR:G,DOT:"DOT",EMOJI:ed,EQUALS:Q,EXCLAMATION:X,FULLWIDTHGREATERTHAN:F,FULLWIDTHLEFTPAREN:I,FULLWIDTHLESSTHAN:H,FULLWIDTHMIDDLEDOT:es,FULLWIDTHRIGHTPAREN:L,HYPHEN:Z,LEFTCORNERBRACKET:_,LEFTWHITECORNERBRACKET:D,LOCALHOST:k,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:P,OPENBRACE:O,OPENBRACKET:A,OPENPAREN:N,PERCENT:ee,PIPE:et,PLUS:en,POUND:er,QUERY:ei,QUOTE:eo,RIGHTCORNERBRACKET:$,RIGHTWHITECORNERBRACKET:z,SCHEME:C,SEMI:el,SLASH:ea,SLASH_SCHEME:E,SYM:"SYM",TILDE:eu,TLD:"TLD",UNDERSCORE:ec,UTLD:S,UWORD:b,WORD:v,WS:"WS"});let ep=/[a-z]/,ef=/\p{L}/u,em=/\p{Emoji}/u,eg=/\d/,ey=/\s/,ev=null,eb=null;function ew(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,o=e.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],o=0,s=0;for(;s<r;){let l=e,a=null,u=0,c=null,d=-1,h=-1;for(;s<r&&(a=l.go(n[s]));)(l=a).accepts()?(d=0,h=0,c=l):d>=0&&(d+=n[s].length,h++),u+=n[s].length,o+=n[s].length,s++;o-=d,s-=h,u-=d,i.push({t:c.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function ex(e,t,n,r,i){let o;let s=t.length;for(let n=0;n<s-1;n++){let s=t[n];e.j[s]?o=e.j[s]:((o=new p(r)).jr=i.slice(),e.j[s]=o),e=o}return(o=new p(n)).jr=i.slice(),e.j[t[s-1]]=o,o}function ek(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let eS={defaultProtocol:"http",events:null,format:eE,formatHref:eE,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eC(e,t=null){let n=Object.assign({},eS);e&&(n=Object.assign(n,e instanceof eC?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eE(e){return e}function eO(e,t){this.t="token",this.v=e,this.tk=t}
37function eM(e,t){class n extends eO{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eC.prototype={o:eS,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eS[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eO.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eS.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),o={},s=e.get("className",t,this),l=e.get("target",t,this),a=e.get("rel",t,this),u=e.getObj("attributes",t,this),c=e.getObj("events",t,this);return o.href=n,s&&(o.class=s),l&&(o.target=l),a&&(o.rel=a),u&&Object.assign(o,u),{tagName:r,attributes:o,content:i,eventListeners:c}}};let eA=eM("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eT=eM("text"),eN=eM("nl"),eR=eM("url",{isLink:!0,toHref(e=eS.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==k&&e[1].t===Y}}),eP=e=>new p(e);function ej(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let eI="undefined"!=typeof console&&console&&console.warn||(()=>{}),eL={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e_(e,t=!1){if(eL.initialized&&eI(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
381. Must only contain digits, lowercase ASCII letters or "-"
392. Cannot start or end with "-"
403. "-" cannot repeat`);eL.customSchemes.push([e,t])}function e$(e){return eL.initialized||function(){eL.scanner=function(e=[]){let t={};p.groups=t;let n=new p;null==ev&&(ev=ek("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
40ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==eb&&(eb=ek("ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
40ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2")),y(n,"'",U),y(n,"{",O),y(n,"}",M),y(n,"[",A),y(n,"]",T),y(n,"(",N),y(n,")",R),y(n,"<",P),y(n,">",j),y(n,"(",I),y(n,")",L),y(n,"「",_),y(n,"」",$),y(n,"『",D),y(n,"』",z),y(n,"<",H),y(n,">",F),y(n,"&",B),y(n,"*",V),y(n,"@","AT"),y(n,"`",q),y(n,"^",J),y(n,":",Y),y(n,",",K),y(n,"$",G),y(n,".","DOT"),y(n,"=",Q),y(n,"!",X),y(n,"-",Z),y(n,"%",ee),y(n,"|",et),y(n,"+",en),y(n,"#",er),y(n,"?",ei),y(n,'"',eo),y(n,"/",ea),y(n,";",el),y(n,"~",eu),y(n,"_",ec),y(n,"\\",W),y(n,"・",es);let r=m(n,eg,"NUM",{[i]:!0});m(r,eg,r);let f=m(r,ep,w,{[l]:!0}),ew=m(r,ef,x,{[a]:!0}),eS=m(n,ep,v,{[o]:!0});m(eS,eg,f),m(eS,ep,eS),m(f,eg,f),m(f,ep,f);let eC=m(n,ef,b,{[s]:!0});m(eC,ep),m(eC,eg,ew),m(eC,ef,eC),m(ew,eg,ew),m(ew,ep),m(ew,ef,ew);let eE=y(n,"\n","NL",{[d]:!0}),eO=y(n,"\r","WS",{[d]:!0}),eM=m(n,ey,"WS",{[d]:!0});y(n,"",eM),y(eO,"\n",eE),y(eO,"",eM),m(eO,ey,eM),y(eM,"\r"),y(eM,"\n"),m(eM,ey,eM),y(eM,"",eM);let eA=m(n,em,ed,{[c]:!0});y(eA,"#"),m(eA,em,eA),y(eA,"️",eA);let eT=y(eA,"‍");y(eT,"#"),m(eT,em,eA);let eN=[[ep,eS],[eg,f]],eR=[[ep,null],[ef,eC],[eg,ew]];for(let e=0;e<ev.length;e++)ex(n,ev[e],"TLD",v,eN);for(let e=0;e<eb.length;e++)ex(n,eb[e],S,b,eR);h("TLD",{tld:!0,ascii:!0},t),h(S,{utld:!0,alpha:!0},t),ex(n,"file",C,v,eN),ex(n,"mailto",C,v,eN),ex(n,"http",E,v,eN),ex(n,"https",E,v,eN),ex(n,"ftp",E,v,eN),ex(n,"ftps",E,v,eN),h(C,{scheme:!0,ascii:!0},t),h(E,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],s=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?s[u]=!0:ep.test(r)?eg.test(r)?s[l]=!0:s[o]=!0:s[i]=!0,g(n,r,r,s)}return g(n,"localhost",k,{ascii:!0}),n.jd=new p("SYM"),{start:n,tokens:Object.assign({groups:t},eh)}}(eL.customSchemes);for(let e=0;e<eL.tokenQueue.length;e++)eL.tokenQueue[e][1]({scanner:eL.scanner});eL.parser=function({groups:e}){let t=e.domain.concat([B,V,"AT",W,q,J,G,Q,Z,"NUM",ee,et,en,er,ea,"SYM",eu,ec]),n=[U,Y,K,"DOT",X,ee,ei,eo,el,P,j,O,M,T,A,N,R,I,L,_,$,D,z,H,F],r=[B,U,V,W,q,J,G,Q,Z,O,M,ee,et,en,er,ei,ea,"SYM",eu,ec],i=eP(),o=y(i,eu);f(o,r,o),f(o,e.domain,o);let s=eP(),l=eP(),a=eP();f(i,e.domain,s),f(i,e.scheme,l),f(i,e.slashscheme,a),f(s,r,o),f(s,e.domain,s);let u=y(s,"AT");y(o,"AT",u),y(l,"AT",u),y(a,"AT",u);let c=y(o,"DOT");f(c,r,o),f(c,e.domain,o);let d=eP();f(u,e.domain,d),f(d,e.domain,d);let h=y(d,"DOT");f(h,e.domain,d);let p=eP(eA);f(h,e.tld,p),f(h,e.utld,p),y(u,k,p);let m=y(d,Z);y(m,Z,m),f(m,e.domain,d),f(p,e.domain,d),y(p,"DOT",h),y(p,Z,m),f(y(p,Y),e.numeric,eA);let g=y(s,Z),v=y(s,"DOT");y(g,Z,g),f(g,e.domain,s),f(v,r,o),f(v,e.domain,s);let b=eP(eR);f(v,e.tld,b),f(v,e.utld,b),f(b,e.domain,s),f(b,r,o),y(b,"DOT",v),y(b,Z,g),y(b,"AT",u);let w=y(b,Y),x=eP(eR);f(w,e.numeric,x);let S=eP(eR),C=eP();f(S,t,S),f(S,n,C),f(C,t,S),f(C,n,C),y(b,ea,S),y(x,ea,S);let E=y(l,Y),es=y(a,Y),ed=y(es,ea),ep=y(ed,ea);f(l,e.domain,s),y(l,"DOT",v),y(l,Z,g),f(a,e.domain,s),y(a,"DOT",v),y(a,Z,g),f(E,e.domain,S),y(E,ea,S),y(E,ei,S),f(ep,e.domain,S),f(ep,t,S),y(ep,ea,S);let ef=[[O,M],[A,T],[N,R],[P,j],[I,L],[_,$],[D,z],[H,F]];for(let e=0;e<ef.length;e++){let[r,i]=ef[e],o=y(S,r);y(C,r,o),y(o,i,S);let s=eP(eR);f(o,t,s);let l=eP();f(o,n),f(s,t,s),f(s,n,l),f(l,t,s),f(l,n,l),y(s,i,S),y(l,i,S)}return y(i,k,b),y(i,"NL",eN),{start:i,tokens:eh}}(eL.scanner.tokens);for(let e=0;e<eL.pluginQueue.length;e++)eL.pluginQueue[e][1]({scanner:eL.scanner,parser:eL.parser});eL.initialized=!0}(),function(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let l=e,a=null,u=null,c=0,d=null,h=-1;for(;i<r&&!(a=l.go(n[i].t));)s.push(n[i++]);for(;i<r&&(u=a||l.go(n[i].t));)a=null,(l=u).accepts()?(h=0,d=l):h>=0&&h++,i++,c++;if(h<0)(i-=c)<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(ej(eT,t,s)),s=[]),i-=h,c-=h;let e=d.t,r=n.slice(i-c,i);o.push(ej(e,t,r))}}return s.length>0&&o.push(ej(eT,t,s)),o}(eL.parser.start,e,ew(eL.scanner.start,e))}function eD(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eC(n),i=e$(e),o=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}e$.scan=ew;var ez=n(21870);
40let eH=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function eF(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(eH,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}let eB=r.vc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if("string"==typeof e){e_(e);return}e_(e.scheme,e.optionalSlashes)})},onDestroy(){p.groups={},eL.scanner=null,eL.parser=null,eL.tokenQueue=[],eL.pluginQueue=[],eL.customSchemes=[],eL.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!(t&&eF(t,this.options.protocols))&&null}}]},renderHTML({HTMLAttributes:e}){return eF(e.href,this.options.protocols)?["a",(0,r.P1)(this.options.HTMLAttributes,e),0]:["a",(0,r.P1)(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.K9)({find:e=>{let t=[];if(e){let{validate:n}=this.options,r=eD(e).filter(e=>e.isLink&&n(e.value));r.length&&r.forEach(e=>t.push({text:e.value,data:{href:e.href},index:e.start}))}return t}
40,type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let i=[];return this.options.autolink&&i.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate},new ez.Sy({key:new ez.H$("autolink"),appendTransaction:(t,n,i)=>{let o=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),s=t.some(e=>e.getMeta("preventAutolink"));if(!o||s)return;let{tr:l}=i,a=(0,r.XP)(n.doc,[...t]);if((0,r.QC)(a).forEach(({newRange:t})=>{let n,o;let s=(0,r.b5)(i.doc,t,e=>e.isTextblock);if(s.length>1?(n=s[0],o=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):s.length&&i.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(n=s[0],o=i.doc.textBetween(n.pos,t.to,void 0," ")),n&&o){let t=o.split(" ").filter(e=>""!==e);if(t.length<=0)return!1;let s=t[t.length-1],a=n.pos+o.lastIndexOf(s);if(!s)return!1;let u=e$(s).map(t=>t.toObject(e.defaultProtocol));if(!(1===u.length?u[0].isLink:3===u.length&&!!u[1].isLink&&["()","[]"].includes(u[0].value+u[2].value)))return!1;u.filter(e=>e.isLink).map(e=>({...e,from:a+e.start+1,to:a+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).forEach(t=>{(0,r.tI)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||l.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),l.steps.length)return l}}))),!0===this.options.openOnClick&&i.push((t={type:this.type},new ez.Sy({key:new ez.H$("handleClickLink"),props:{handleClick:(e,n,i)=>{var o,s;if(0!==i.button||!e.editable)return!1;let l=i.target,a=[];for(;"DIV"!==l.nodeName;)a.push(l),l=l.parentNode;if(!a.find(e=>"A"===e.nodeName))return!1;let u=(0,r.u9)(e.state,t.type.name),c=i.target,d=null!==(o=null==c?void 0:c.href)&&void 0!==o?o:u.href,h=null!==(s=null==c?void 0:c.target)&&void 0!==s?s:u.target;return!!c&&!!d&&(window.open(d,h),!0)}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type},new ez.Sy({key:new ez.H$("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let l="";r.content.forEach(e=>{l+=e.textContent});let a=eD(l,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!a&&(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}}))),i}}).extend({inclusive:!1,parseHTML:()=>[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",(0,r.P1)(this.options.HTMLAttributes,e,{class:"link"}),0]},addPasteRules:()=>[new r.hD({find:/^https:\/\/(twitter|x)\.com\/([a-zA-Z0-9_-]+)\/status\/(\d+)/g,handler:({commands:e,match:t,state:n,pasteEvent:r,chain:i})=>{let o=t?.[0];i().selectParentNode().deleteSelection().insertTwitter(o).run()}}),new r.hD({find:/^https:\/\/www\.instagram\.com\/p\/([A-Za-z0-9_-]+)/g,handler:({commands:e,match:t,state:n,pasteEvent:r,chain:i})=>{let o=t?.[0];i().selectParentNode().deleteSelection().insertInstagram(o).run()}}),new r.hD({find:/^https:\/\/www\.instagram\.com\/reel\/([A-Za-z0-9_-]+)/g,handler:({commands:e,match:t,state:n,pasteEvent:r,chain:i})=>{let o=t?.[0];i().selectParentNode().deleteSelection().insertInstagram(o).run()}}),new r.hD({find:/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube(-nocookie)?\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|live\/|v\/)?)([\w\-]+)(\S+)?/g,handler:({commands:e,match:t,state:n,pasteEvent:r,chain:i})=>{let o=t?.[0];i().selectParentNode().deleteSelection().insertYoutube(o).run()}}),new r.hD({find:/^https:\/\/(?:www\.)?facebook\.com\/[a-zA-Z0-9.]+\/(?:posts|photos|videos)\/(?:[a-zA-Z0-9.]+\/)?(\d+)/g,handler:({commands:e,match:t,state:n,pasteEvent:r,chain:i})=>{let o=t?.[0];i().selectParentNode().deleteSelection().insertFacebook(o).run()}}),new r.hD({find:/^https:\/\/(?:www\.)?tiktok\.com\/@[\w.-]+\/video\/(\d+)/g,handler:({commands:e,match:t,state:n,pasteEvent:r,chain:i})=>{let o=t?.[0];i().selectParentNode().deleteSelection().insertTiktok(o).run()}})],addProseMirrorPlugins(){let{editor:e}=this;return[...this.parent?.()||[],new ez.Sy({props:{handleKeyDown:(t,n)=>{let{selection:r}=e.state;return"Escape"===n.key&&!0!==r.empty&&e.commands.focus(r.to,{scrollIntoView:!1}),!1}}})]}})},79936:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(11996),i=n(66410);let o=r.NB.create({name:"linkPreview",group:"block",atom:!0,addAttributes:()=>({href:{default:""},title:{default:""},description:{default:""},image:{default:""}}),parseHTML:()=>[{tag:"a[data-link-preview]"}],renderHTML({node:e}){let t=e.attrs.image&&"/png/placeholder.png"!==e.attrs.image;return["a",(0,r.P1)({"data-link-preview":"",href:e.attrs.href,target:"_blank",rel:"noopener noreferrer",dir:i.ZP.dir(),class:`relative flex w-full ${t?"px-4":"pl-6 pr-4"} py-3 flex-col items-start gap-6 rounded bg-[#F1F1F1] border-l-0 transition-all duration-200 ease-in-out box-border mb-4 hover:bg-[#F9F9F9] hover:shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1),0_-4px_6px_-1px_rgba(0,0,0,0.06),4px_0_6px_-1px_rgba(0,0,0,0.06)] focus:bg-[#F9F9F9] focus:shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1),0_-4px_6px_-1px_rgba(0,0,0,0.06),4px_0_6px_-1px_rgba(0,0,0,0.06)] before:content-[""] before:absolute before:left-0 before:top-0 before:bottom-0 before:w-[3px] before:rounded-l-md before:bg-[#01ABD9]`}),["div",{class:t?"flex items-start w-full gap-3":"flex items-start w-full"},t?["img",{class:"flex justify-center items-center rounded-md !w-20 !h-20 aspect-square flex-shrink-0 sm:rounded md:rounded-md lg:!w-[84px] lg:!h-[84px] lg:rounded xl:rounded-md",src:e.attrs.image}]:"",["div",{class:"flex flex-col items-start"},["span",{class:"line-clamp-1 overflow-hidden text-[#1F2121] text-ellipsis font-[var(--font-notosans),Arial,sans-serif] text-xs font-bold leading-normal uppercase sm:text-xs sm:font-bold md:text-base md:font-medium md:leading-[15px] lg:text-base xl:text-base","data-link-preview-related":"","data-testid":"link-preview-related"},i.ZP.t("related","RELATED")],["strong",{class:"text-[#1F2121] font-[var(--font-playfair),Georgia,serif] text-base font-extrabold leading-[26px] underline decoration-solid line-clamp-2 overflow-hidden text-ellipsis sm:text-lg sm:leading-[31px] md:text-lg md:leading-[28px] lg:text-xl lg:leading-[31px] xl:text-xl"},e.attrs.title]]]]},addCommands:()=>({setLinkPreview:(e,t)=>({commands:n,state:r})=>{let i=t?.images?.[0]||"";return n.insertContent({type:"linkPreview",attrs:{href:e,title:t?.title,de
40scription:t?.description,image:i}})}})})},91414:function(e,t,n){"use strict";n.d(t,{n:function(){return i}});var r=n(11996);let i=n(10384).Z.extend({addAttributes:()=>({textAlign:{default:""},class:{default:""}}),renderHTML({node:e,HTMLAttributes:t}){return["p",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts:()=>({Backspace:({editor:e})=>{let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||"paragraph"!==r.parent.type.name)return!1;let o=0===r.parent.content.size,s=0===r.parentOffset;if(o&&s){let t=r.before();return e.chain().setNodeSelection(t).deleteSelection().run()}return!1}})})},41781:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(11996),i=n(21870),o=n(65994),s=n(55561);let l=r.NB.create({name:"tableCell",content:"block+",tableRole:"cell",isolating:!0,addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,r.P1)(this.options.HTMLAttributes,e),0]},addAttributes:()=>({colspan:{default:1,parseHTML:e=>{let t=e.getAttribute("colspan");return t?parseInt(t,10):1}},rowspan:{default:1,parseHTML:e=>{let t=e.getAttribute("rowspan");return t?parseInt(t,10):1}},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}},style:{default:null}}),addProseMirrorPlugins(){let{isEditable:e}=this.editor;return[new i.Sy({props:{decorations:t=>{if(!e)return o.EH.empty;let{doc:n,selection:r}=t,i=[],l=(0,s.yX)(0)(r);return l&&l.forEach(({pos:e},t)=>{i.push(o.p.widget(e+1,()=>{let e=(0,s.Ax)(t)(r),n="grip-row";e&&(n+=" selected"),0===t&&(n+=" first"),t===l.length-1&&(n+=" last");let i=document.createElement("a");return i.className=n,i.addEventListener("mousedown",e=>{e.preventDefault(),e.stopImmediatePropagation(),this.editor.view.dispatch((0,s.pj)(t)(this.editor.state.tr))}),i}))}),o.EH.create(n,i)}}})]}})},16843:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var r=n(11996);let i=r.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,r.P1)(this.options.HTMLAttributes,e),0]}});var o=n(21870),s=n(65994),l=n(55561);let a=i.extend({addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}},style:{default:null}}),addProseMirrorPlugins(){let{isEditable:e}=this.editor;return[new o.Sy({props:{decorations:t=>{if(!e)return s.EH.empty;let{doc:n,selection:r}=t,i=[],o=(0,l.uU)(0)(r);return o&&o.forEach(({pos:e},t)=>{i.push(s.p.widget(e+1,()=>{let e=(0,l.u)(t)(r),n="grip-column";e&&(n+=" selected"),0===t&&(n+=" first"),t===o.length-1&&(n+=" last");let i=document.createElement("a");return i.className=n,i.addEventListener("mousedown",e=>{e.preventDefault(),e.stopImmediatePropagation(),this.editor.view.dispatch((0,l.iH)(t)(this.editor.state.tr))}),i}))}),s.EH.create(n,i)}}})]}})},90007:function(e,t,n){"use strict";n.d(t,{S:function(){return i}});var r=n(11996);let i=r.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,r.P1)(this.options.HTMLAttributes,e),0]}}).extend({allowGapCursor:!1,content:"tableCell*"})},96590:function(e,t,n){"use strict";n.d(t,{i:function(){return c}});var r=n(11996),i=n(21870),o=n(96460);function s(e,t,n,r,i,o){let s=0,l=!0,a=t.firstChild,u=e.firstChild;for(let e=0,n=0;e<u.childCount;e+=1){let{colspan:c,colwidth:d}=u.child(e).attrs;for(let e=0;e<c;e+=1,n+=1){let u=i===n?o:d&&d[e],c=u?`${u}px`:"";s+=u||r,u||(l=!1),a?(a.style.width!==c&&(a.style.width=c),a=a.nextSibling):t.appendChild(document.createElement("col")).style.width=c}}for(;a;){let e=a.nextSibling;a.parentNode.removeChild(a),a=e}l?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class l{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),s(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,s(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}function a(e,t){return t?e.createChecked(null,t):e.createAndFill()}let u=({editor:e})=>{let{selection:t}=e.state;if(!(t instanceof o.Xc))return!1;let n=0,i=(0,r.qv)(t.ranges[0].$from,e=>
40"table"===e.type.name);return null==i||i.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)},c=r.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:l,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:i,tableMinWidth:o}=function(e,t,n,r){let i=0,o=!0,s=[],l=e.firstChild;if(!l)return{};for(let e=0,n=0;e<l.childCount;e+=1){let{colspan:r,colwidth:a}=l.child(e).attrs;for(let e=0;e<r;e+=1,n+=1){let r=void 0===n?void 0:a&&a[e],l=r?`${r}px`:"";i+=r||t,r||(o=!1),s.push(["col",l?{style:`width: ${l}`}:{}])}}return{colgroup:["colgroup",{},...s],tableWidth:o?`${i}px`:"",tableMinWidth:o?"":`${i}px`}}(e,this.options.cellMinWidth);return["table",(0,r.P1)(this.options.HTMLAttributes,t,{style:i?`width: ${i}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{let l=function(e,t,n,r,i){let o=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}(e),s=[],l=[];for(let e=0;e<n;e+=1){let e=a(o.cell,void 0);if(e&&l.push(e),r){let e=a(o.header_cell,void 0);e&&s.push(e)}}let u=[];for(let e=0;e<t;e+=1)u.push(o.row.createChecked(null,r&&0===e?s:l));return o.table.createChecked(null,u)}(s.schema,e,t,n);if(o){let e=r.selection.from+1;r.replaceSelectionWith(l).scrollIntoView().setSelection(i.Bs.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>(0,o.I_)(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>(0,o.e2)(e,t),deleteColumn:()=>({state:e,dispatch:t})=>(0,o.eA)(e,t),addRowBefore:()=>({state:e,dispatch:t})=>(0,o.z2)(e,t),addRowAfter:()=>({state:e,dispatch:t})=>(0,o.dl)(e,t),deleteRow:()=>({state:e,dispatch:t})=>(0,o.qK)(e,t),deleteTable:()=>({state:e,dispatch:t})=>(0,o.WQ)(e,t),mergeCells:()=>({state:e,dispatch:t})=>(0,o.JX)(e,t),splitCell:()=>({state:e,dispatch:t})=>(0,o.Cr)(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>(0,o.dO)("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>(0,o.dO)("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>(0,o.II)(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!(0,o.JX)(e,t)||(0,o.Cr)(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>(0,o.wb)(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>(0,o.nA)(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>(0,o.nA)(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&(0,o.tp)(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=o.Xc.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:u,"Mod-Backspace":u,Delete:u,"Mod-Delete":u}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[(0,o.VH)({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],(0,o.G3)({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:(0,r.nU)((0,r.Nl)(e,"tableRole",t))}}}).configure({resizable:!0,lastColumnResizable:!1,allowTableNodeSelection:!0}
40)},55561:function(e,t,n){"use strict";n.d(t,{Ax:function(){return u},iH:function(){return p},pj:function(){return f},u:function(){return a},uU:function(){return d},yX:function(){return c}});var r=n(11996),i=n(96460);let o=e=>t=>{let n=i.rU.get(t.$anchorCell.node(-1)),r=t.$anchorCell.start(-1),o=n.cellsInRect(e),s=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r));for(let e=0,t=o.length;e<t;e+=1)if(-1===s.indexOf(o[e]))return!1;return!0},s=e=>(0,r.Kk)(e=>e.type.spec.tableRole&&"table"===e.type.spec.tableRole)(e),l=e=>e instanceof i.Xc,a=e=>t=>!!l(t)&&o({left:e,right:e+1,top:0,bottom:i.rU.get(t.$anchorCell.node(-1)).height})(t),u=e=>t=>!!l(t)&&o({left:0,right:i.rU.get(t.$anchorCell.node(-1)).width,top:e,bottom:e+1})(t),c=e=>t=>{let n=s(t);if(n){let t=i.rU.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((e,r)=>{if(r>=0&&r<=t.width-1){let i=t.cellsInRect({left:r,right:r+1,top:0,bottom:t.height});return e.concat(i.map(e=>{let t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}}))}return e},[])}return null},d=e=>t=>{let n=s(t);if(n){let t=i.rU.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((e,r)=>{if(r>=0&&r<=t.height-1){let i=t.cellsInRect({left:0,right:t.width,top:r,bottom:r+1});return e.concat(i.map(e=>{let t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}}))}return e},[])}return null},h=e=>t=>n=>{let r=s(n.selection),o="row"===e;if(r){let e=i.rU.get(r.node);if(t>=0&&t<(o?e.height:e.width)){let s=o?0:t,l=o?t:0,a=o?e.width:t+1,u=o?t+1:e.height,c=e.cellsInRect({left:s,top:l,right:o?a:s+1,bottom:o?l+1:u}),d=u-l==1?c:e.cellsInRect({left:o?s:a-1,top:o?u-1:l,right:a,bottom:u}),h=r.start+c[0],p=r.start+d[d.length-1],f=n.doc.resolve(h),m=n.doc.resolve(p);return n.setSelection(new i.Xc(m,f))}}return n},p=h("column"),f=h("row")},48698:function(e,t,n){"use strict";n.d(t,{Z:function(){return nT}});var r={};n.r(r),n.d(r,{VERSION:function(){return l},after:function(){return tC},all:function(){return tV},allKeys:function(){return eg},any:function(){return tW},assign:function(){return eI},before:function(){return tE},bind:function(){return th},bindAll:function(){return tm},chain:function(){return ta},chunk:function(){return ny},clone:function(){return eD},collect:function(){return tD},compact:function(){return ns},compose:function(){return tS},constant:function(){return ee},contains:function(){return tq},countBy:function(){return t6},create:function(){return e$},debounce:function(){return tw},default:function(){return nw},defaults:function(){return eL},defer:function(){return tv},delay:function(){return ty},detect:function(){return tL},difference:function(){return na},drop:function(){return ni},each:function(){return t$},escape:function(){return e6},every:function(){return tV},extend:function(){return ej},extendOwn:function(){return eI},filter:function(){return tB},find:function(){return tL},findIndex:function(){return tT},findKey:function(){return tM},findLastIndex:function(){return tN},findWhere:function(){return t_},first:function(){return nr},flatten:function(){return nl},foldl:function(){return tH},foldr:function(){return tF}
40,forEach:function(){return t$},functions:function(){return eR},get:function(){return eU},groupBy:function(){return t4},has:function(){return eV},head:function(){return nr},identity:function(){return eW},include:function(){return tq},includes:function(){return tq},indexBy:function(){return t5},indexOf:function(){return tj},initial:function(){return nn},inject:function(){return tH},intersection:function(){return nh},invert:function(){return eN},invoke:function(){return tJ},isArguments:function(){return Q},isArray:function(){return Y},isArrayBuffer:function(){return z},isBoolean:function(){return N},isDataView:function(){return J},isDate:function(){return L},isElement:function(){return R},isEmpty:function(){return ec},isEqual:function(){return em},isError:function(){return $},isFinite:function(){return X},isFunction:function(){return B},isMap:function(){return eC},isMatch:function(){return ed},isNaN:function(){return Z},isNull:function(){return A},isNumber:function(){return I},isObject:function(){return M},isRegExp:function(){return _},isSet:function(){return eO},isString:function(){return j},isSymbol:function(){return D},isTypedArray:function(){return es},isUndefined:function(){return T},isWeakMap:function(){return eE},isWeakSet:function(){return eM},iteratee:function(){return eG},keys:function(){return eu},last:function(){return no},lastIndexOf:function(){return tI},map:function(){return tD},mapObject:function(){return eX},matcher:function(){return eq},matches:function(){return eq},max:function(){return tG},memoize:function(){return tg},methods:function(){return eR},min:function(){return tQ},mixin:function(){return nb},negate:function(){return tk},noop:function(){return eZ},now:function(){return e3},object:function(){return nm},omit:function(){return nt},once:function(){return tO},pairs:function(){return eT},partial:function(){return td},partition:function(){return t9},pick:function(){return ne},pluck:function(){return tY},property:function(){return eJ},propertyOf:function(){return e0},random:function(){return e2},range:function(){return ng},reduce:function(){return tH},reduceRight:function(){return tF},reject:function(){return tU},rest:function(){return ni},restArguments:function(){return O},result:function(){return to},sample:function(){return t0},select:function(){return tB},shuffle:function(){return t1},size:function(){return t8},some:function(){return tW},sortBy:function(){return t2},sortedIndex:function(){return tR},tail:function(){return ni},take:function(){return nr},tap:function(){return ez},template:function(){return ti},templateSettings:function(){return e8},throttle:function(){return tb},times:function(){return e1},toArray:function(){return tZ},toPath:function(){return eH},transpose:function(){return np},unescape:function(){return e9},union:function(){return nd},uniq:function(){return nc},unique:function(){return nc},uniqueId:function(){return tl},unzip:function(){return np},values:function(){return eA},where:function(){return tK},without:function(){return nu},wrap:function(){return tx},zip:function(){return nf}});var i=n(74023),o=n(83641),s=n(16336);n(29219);var l="1.13.7",a="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},u=Array.prototype,c=Object.prototype,d="undefined"!=typeof Symbol?Symbol.prototype:null,h=u.push,p=u.slice,f=c.toString,m=c.hasOwnProperty,g="undefined"!=typeof ArrayBuffer,y="undefined"!=typeof DataView,v=Array.isArray,b=Object.keys,w=Object.create,x=g&&ArrayBuffer.isView,k=isNaN,S=isFinite,C=!({toString:null}).propertyIsEnumerable("toString"),E=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function O(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}function M(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function A(e){return null===e}function T(e){return void 0===e}function N(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)}function R(e){return!!(e&&1===e.nodeType)}function P(e){var t="[object "+e+"]";return function(e){return f.call(e)===t}}var j=P("String"),I=P("Number"),L=P("Date"),_=P("RegExp"),$=P("Error"),D=P("Symbol"),z=P("ArrayBuffer"),H=P("Function"),F=a.document&&a.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof F&&(H=function(e){return"function"==typeof e});var B=H,U=P("Object"),V=y&&(!/\[native code\]/.test(String(DataView))||U(new DataView(new ArrayBuffer(8)))
vendor: 4,686 bytes, line 40
40),W="undefined"!=typeof Map&&U(new Map),q=P("DataView"),J=V?function(e){return null!=e&&B(e.getInt8)&&z(e.buffer)}:q,Y=v||P("Array");function K(e,t){return null!=e&&m.call(e,t)}var G=P("Arguments");!function(){G(arguments)||(G=function(e){return K(e,"callee")})}();var Q=G;function X(e){return!D(e)&&S(e)&&!isNaN(parseFloat(e))}function Z(e){return I(e)&&k(e)}function ee(e){return function(){return e}}function et(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=9007199254740991}}function en(e){return function(t){return null==t?void 0:t[e]}}var er=en("byteLength"),ei=et(er),eo=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,es=g?function(e){return x?x(e)&&!J(e):ei(e)&&eo.test(f.call(e))}:ee(!1),el=en("length");function ea(e,t){t=function(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(e){return!0===t[e]},push:function(n){return t[n]=!0,e.push(n)}}}(t);var n=E.length,r=e.constructor,i=B(r)&&r.prototype||c,o="constructor";for(K(e,o)&&!t.contains(o)&&t.push(o);n--;)(o=E[n])in e&&e[o]!==i[o]&&!t.contains(o)&&t.push(o)}function eu(e){if(!M(e))return[];if(b)return b(e);var t=[];for(var n in e)K(e,n)&&t.push(n);return C&&ea(e,t),t}function ec(e){if(null==e)return!0;var t=el(e);return"number"==typeof t&&(Y(e)||j(e)||Q(e))?0===t:0===el(eu(e))}function ed(e,t){var n=eu(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0}function eh(e){return e instanceof eh?e:this instanceof eh?void(this._wrapped=e):new eh(e)}function ep(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,er(e))}eh.VERSION=l,eh.prototype.value=function(){return this._wrapped},eh.prototype.valueOf=eh.prototype.toJSON=eh.prototype.value,eh.prototype.toString=function(){return String(this._wrapped)};var ef="[object DataView]";function em(e,t){return function e(t,n,r,i){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var o=typeof t;return("function"===o||"object"===o||"object"==typeof n)&&function t(n,r,i,o){n instanceof eh&&(n=n._wrapped),r instanceof eh&&(r=r._wrapped);var s=f.call(n);if(s!==f.call(r))return!1;if(V&&"[object Object]"==s&&J(n)){if(!J(r))return!1;s=ef}switch(s){case"[object RegExp]":case"[object String]":return""+n==""+r;case"[object Number]":if(+n!=+n)return+r!=+r;return 0==+n?1/+n==1/r:+n==+r;case"[object Date]":case"[object Boolean]":return+n==+r;case"[object Symbol]":return d.valueOf.call(n)===d.valueOf.call(r);case"[object ArrayBuffer]":case ef:return t(ep(n),ep(r),i,o)}var l="[object Array]"===s;if(!l&&es(n)){if(er(n)!==er(r))return!1;if(n.buffer===r.buffer&&n.byteOffset===r.byteOffset)return!0;l=!0}if(!l){if("object"!=typeof n||"object"!=typeof r)return!1;var a=n.constructor,u=r.constructor;if(a!==u&&!(B(a)&&a instanceof a&&B(u)&&u instanceof u)&&"constructor"in n&&"constructor"in r)return!1}o=o||[];for(var c=(i=i||[]).length;c--;)if(i[c]===n)return o[c]===r;if(i.push(n),o.push(r),l){if((c=n.length)!==r.length)return!1;for(;c--;)if(!e(n[c],r[c],i,o))return!1}else{var h,p=eu(n);if(c=p.length,eu(r).length!==c)return!1;for(;c--;)if(!(K(r,h=p[c])&&e(n[h],r[h],i,o)))return!1}return i.pop(),o.pop(),!0}(t,n,r,i)}(e,t)}function eg(e){if(!M(e))return[];var t=[];for(var n in e)t.push(n);return C&&ea(e,t),t}function ey(e){var t=el(e);return function(n){if(null==n||el(eg(n)))return!1;for(var r=0;r<t;r++)if(!B(n[e[r]]))return!1;return e!==ek||!B(n[ev])}}var ev="forEach",eb=["clear","delete"],ew=["get","has","set"],ex=eb.concat(ev,ew),ek=eb.concat(ew),eS=["add"].concat(eb,ev,"has"),eC=W?ey(ex):P("Map"),eE=W?ey(ek):P("WeakMap"),eO=W?ey(eS):P("Set"),eM=P("WeakSet");function eA(e){for(var t=eu(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}function eT(e){for(var t=eu(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}function eN(e){for(var t={},n=eu(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}function eR(e){var t=[];for(var n in e)B(e[n])&&t.push(n);return t.sort()}function eP(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=e(o),l=s.length,a=0;a<l;a++){var u=s[a];t&&void 0!==n[u]||(n[u]=o[u])}return n}}var ej=eP(eg),eI=eP(eu),eL=eP(eg,!0);function e_(e){if(!M(e))return{};if(w)return w(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}function e$(e,t){var n=e_(e);return t&&eI(n,t),n}function eD(e){return M(e)?Y(e)?e.slice():ej({},e):e}function ez(e,t){return t(e),e}function eH(e){return Y(e)?e:[e]}function eF(e){return eh.toPath(e)}function eB(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0}
40function eU(e,t,n){var r=eB(e,eF(t));return T(r)?n:r}function eV(e,t){for(var n=(t=eF(t)).length,r=0;r<n;r++){var i=t[r];if(!K(e,i))return!1;e=e[i]}return!!n}function eW(e){return e}function eq(e){return e=eI({},e),function(t){return ed(t,e)}}function eJ(e){return e=eF(e),function(t){return eB(t,e)}}function eY(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}function eK(e,t,n){return null==e?eW:B(e)?eY(e,t,n):M(e)&&!Y(e)?eq(e):eJ(e)}function eG(e,t){return eK(e,t,1/0)}function eQ(e,t,n){return eh.iteratee!==eG?eh.iteratee(e,t):eK(e,t,n)}function eX(e,t,n){t=eQ(t,n);for(var r=eu(e),i=r.length,o={},s=0;s<i;s++){var l=r[s];o[l]=t(e[l],l,e)}return o}function eZ(){}function e0(e){return null==e?eZ:function(t){return eU(e,t)}}function e1(e,t,n){var r=Array(Math.max(0,e));t=eY(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}function e2(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}eh.toPath=eH,eh.iteratee=eG;var e3=Date.now||function(){return new Date().getTime()};function e4(e){var t=function(t){return e[t]},n="(?:"+eu(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}}var e5={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},e6=e4(e5),e9=e4(eN(e5)),e8=eh.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},e7=/(.)^/,te={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},tt=/\\|'|\r|\n|\u2028|\u2029/g;function tn(e){return"\\"+te[e]}var tr=/^\s*(\w|\$)+\s*$/;function ti(e,t,n){!t&&n&&(t=n);var r,i=RegExp([((t=eL({},t,eh.templateSettings)).escape||e7).source,(t.interpolate||e7).source,(t.evaluate||e7).source].join("|")+"|$","g"),o=0,s="__p+='";e.replace(i,function(t,n,r,i,l){return s+=e.slice(o,l).replace(tt,tn),o=l+t.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(s+="';\n"+i+"\n__p+='"),t}),s+="';\n";var l=t.variable;if(l){if(!tr.test(l))throw Error("variable is not a bare identifier: "+l)}else s="with(obj||{}){\n"+s+"}\n",l="obj";s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{r=Function(l,"_",s)}catch(e){throw e.source=s,e}var a=function(e){return r.call(this,e,eh)};return a.source="function("+l+"){\n"+s+"}",a}function to(e,t,n){var r=(t=eF(t)).length;if(!r)return B(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=B(o)?o.call(e):o}return e}var ts=0;function tl(e){var t=++ts+"";return e?e+t:t}function ta(e){var t=eh(e);return t._chain=!0,t}function tu(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=e_(e.prototype),s=e.apply(o,i);return M(s)?s:o}var tc=O(function(e,t){var n=tc.placeholder,r=function(){for(var i=0,o=t.length,s=Array(o),l=0;l<o;l++)s[l]=t[l]===n?arguments[i++]:t[l];for(;i<arguments.length;)s.push(arguments[i++]);return tu(e,r,this,this,s)};return r});tc.placeholder=eh;var td=tc,th=O(function(e,t,n){if(!B(e))throw TypeError("Bind must be called on a function");var r=O(function(i){return tu(e,r,t,this,n.concat(i))});return r}),tp=et(el);function tf(e,t,n,r){if(r=r||[],t||0===t){if(t<=0)return r.concat(e)}else t=1/0;for(var i=r.length,o=0,s=el(e);o<s;o++){var l=e[o];if(tp(l)&&(Y(l)||Q(l))){if(t>1)tf(l,t-1,n,r),i=r.length;else for(var a=0,u=l.length;a<u;)r[i++]=l[a++]}else n||(r[i++]=l)}return r}var tm=O(function(e,t){var n=(t=tf(t,!1,!1)).length;if(n<1)throw Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=th(e[r],e)}return e});function tg(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return K(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}var ty=O(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),tv=td(ty,eh,1);function tb(e,t,n){var r,i,o,s,l=0;n||(n={});var a=function(){l=!1===n.leading?0:e3(),r=null,s=e.apply(i,o),r||(i=o=null)},u=function(){var u=e3();l||!1!==n.leading||(l=u);var c=t-(u-l);return i=this,o=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),l=u,s=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(a,c)),s};return u.cancel=function(){clearTimeout(r),l=0,r=i=o=null},u}function tw(e,t,n){var r,i,o,s,l,a=function(){var u=e3()-i;t>
40u?r=setTimeout(a,t-u):(r=null,n||(s=e.apply(l,o)),r||(o=l=null))},u=O(function(u){return l=this,o=u,i=e3(),!r&&(r=setTimeout(a,t),n&&(s=e.apply(l,o))),s});return u.cancel=function(){clearTimeout(r),r=o=l=null},u}function tx(e,t){return td(t,e)}function tk(e){return function(){return!e.apply(this,arguments)}}function tS(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function tC(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function tE(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}var tO=td(tE,2);function tM(e,t,n){t=eQ(t,n);for(var r,i=eu(e),o=0,s=i.length;o<s;o++)if(t(e[r=i[o]],r,e))return r}function tA(e){return function(t,n,r){n=eQ(n,r);for(var i=el(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return -1}}var tT=tA(1),tN=tA(-1);function tR(e,t,n,r){for(var i=(n=eQ(n,r,1))(t),o=0,s=el(e);o<s;){var l=Math.floor((o+s)/2);n(e[l])<i?o=l+1:s=l}return o}function tP(e,t,n){return function(r,i,o){var s=0,l=el(r);if("number"==typeof o)e>0?s=o>=0?o:Math.max(o+l,s):l=o>=0?Math.min(o+1,l):o+l+1;else if(n&&o&&l)return o=n(r,i),r[o]===i?o:-1;if(i!=i)return(o=t(p.call(r,s,l),Z))>=0?o+s:-1;for(o=e>0?s:l-1;o>=0&&o<l;o+=e)if(r[o]===i)return o;return -1}}var tj=tP(1,tT,tR),tI=tP(-1,tN);function tL(e,t,n){var r=(tp(e)?tT:tM)(e,t,n);if(void 0!==r&&-1!==r)return e[r]}function t_(e,t){return tL(e,eq(t))}function t$(e,t,n){if(t=eY(t,n),tp(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var r,i,o=eu(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}function tD(e,t,n){t=eQ(t,n);for(var r=!tp(e)&&eu(e),i=(r||e).length,o=Array(i),s=0;s<i;s++){var l=r?r[s]:s;o[s]=t(e[l],l,e)}return o}function tz(e){var t=function(t,n,r,i){var o=!tp(t)&&eu(t),s=(o||t).length,l=e>0?0:s-1;for(i||(r=t[o?o[l]:l],l+=e);l>=0&&l<s;l+=e){var a=o?o[l]:l;r=n(r,t[a],a,t)}return r};return function(e,n,r,i){var o=arguments.length>=3;return t(e,eY(n,i,4),r,o)}}var tH=tz(1),tF=tz(-1);function tB(e,t,n){var r=[];return t=eQ(t,n),t$(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function tU(e,t,n){return tB(e,tk(eQ(t)),n)}function tV(e,t,n){t=eQ(t,n);for(var r=!tp(e)&&eu(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0}function tW(e,t,n){t=eQ(t,n);for(var r=!tp(e)&&eu(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(t(e[s],s,e))return!0}return!1}function tq(e,t,n,r){return tp(e)||(e=eA(e)),("number"!=typeof n||r)&&(n=0),tj(e,t,n)>=0}var tJ=O(function(e,t,n){var r,i;return B(t)?i=t:(r=(t=eF(t)).slice(0,-1),t=t[t.length-1]),tD(e,function(e){var o=i;if(!o){if(r&&r.length&&(e=eB(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)})});function tY(e,t){return tD(e,eJ(t))}function tK(e,t){return tB(e,eq(t))}function tG(e,t,n){var r,i,o=-1/0,s=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=tp(e)?e:eA(e);for(var l=0,a=e.length;l<a;l++)null!=(r=e[l])&&r>o&&(o=r)}else t=eQ(t,n),t$(e,function(e,n,r){((i=t(e,n,r))>s||i===-1/0&&o===-1/0)&&(o=e,s=i)});return o}function tQ(e,t,n){var r,i,o=1/0,s=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=tp(e)?e:eA(e);for(var l=0,a=e.length;l<a;l++)null!=(r=e[l])&&r<o&&(o=r)}else t=eQ(t,n),t$(e,function(e,n,r){((i=t(e,n,r))<s||i===1/0&&o===1/0)&&(o=e,s=i)});return o}var tX=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function tZ(e){return e?Y(e)?p.call(e):j(e)?e.match(tX):tp(e)?tD(e,eW):eA(e):[]}function t0(e,t,n){if(null==t||n)return tp(e)||(e=eA(e)),e[e2(e.length-1)];var r=tZ(e),i=el(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,s=0;s<t;s++){var l=e2(s,o),a=r[s];r[s]=r[l],r[l]=a}return r.slice(0,t)}function t1(e){return t0(e,1/0)}function t2(e,t,n){var r=0;return t=eQ(t,n),tY(tD(e,function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return -1}return e.index-t.index}),"value")}function t3(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=eQ(r,i),t$(n,function(t,i){var s=r(t,i,n);e(o,t,s)}),o}}var t4=t3(function(e,t,n){K(e,n)?e[n].push(t):e[n]=[t]}),t5=t3(function(e,t,n){e[n]=t}),t6=t3(function(e,t,n){K(e,n)?e[n]++:e[n]=1}),t9=t3(function(e,t,n){e[n?0:1].push(t)},!0);function t8(e){return null==e?0:tp(e)?e.length:eu(e).length}function t7(e,t,n){return t in n}var ne=O(function(e,t){var n={},r=t[0];if(null==e)return n;B(r)?(t.length>1&&(r=eY(r,t[1])),t=eg(e)):(r=t7,t=tf(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var s=t[i],l=e[s];r(l,s,e)&&(n[s]=l)}return n}),nt=O(function(e,t){var n,r=t[0];return B(r)?(r=tk(r),t.length>1&&(n=t[1])):(t=tD(tf(t,!1,!1),String),r=function(e,n){return!tq(t,n)}),ne(e,r,n)});function nn(e,t,n){return p.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function nr(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:nn(e,e.length-t)}function ni(e,t,n){return p.call(e,null==t||n?1:t)}function no(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:ni(e,Math.max(0,e.length-t))}function ns(e){return tB(e,Boolean)}function nl(e,t){return tf(e,t,!1)}var na=O(function(e,t){return t=tf(t,!0,!0),tB(e,function(e){return!tq(t,e)})}),nu=O(function(e,t){return na(e,t)});function nc(e,t,n,r){N(t)||(r=n,n=t,t=!1),null!=n&&(n=eQ(n,r));for(var i=[],o=[],s=0,l=el(e);s<l;s++){var a=e[s],u=n?n(a,s,e):a;t&&!n?(s&&o===u||i.push(a),o=u):n?tq(o,u)||(o.push(u),i.push(a)):tq(i,a)||i.push(a)}return i}var nd=O(function(e){return nc(tf(e,!0,!0))});function nh(e){for(var t=[],n=arguments.length,r=0,i=el(e);r<i;r++){var o,s=e[r];if(!tq(t,s)){for(o=1;o<n&&tq(arguments[o],s);o++);o===n&&t.push(s)}}return t}function np(e){for(var t=e&&tG(e,el).length||0,n=Array(t),r=0;r<t;r++)n[r]=tY(e,r);return n}var nf=O(np);function nm(e,t){for(var n={},r=0,i=el(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function ng(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}function ny(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;
40)n.push(p.call(e,r,r+=t));return n}function nv(e,t){return e._chain?eh(t).chain():t}function nb(e){return t$(eR(e),function(t){var n=eh[t]=e[t];eh.prototype[t]=function(){var e=[this._wrapped];return h.apply(e,arguments),nv(this,n.apply(eh,e))}}),eh}t$(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=u[e];eh.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),("shift"===e||"splice"===e)&&0===n.length&&delete n[0]),nv(this,n)}}),t$(["concat","join","slice"],function(e){var t=u[e];eh.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),nv(this,e)}});var nw=eh,nx=nb(r);nx._=nx;let nk="qualityRequested",nS="qualitySelected",nC="playerSourcesChanged",nE="vjs-quality-changing";class nO{constructor(e,t){this._player=e,this._seekToTime=t,this._hasFinished=!1,this._keepThisInstanceWhenPlayerSourcesChange=!1,this._seekWhenSafe()}_seekWhenSafe(){3>this._player.readyState()?(this._seekFn=this._seek.bind(this),this._player.one("canplay",this._seekFn)):this._seek()}onPlayerSourcesChange(){this._keepThisInstanceWhenPlayerSourcesChange?this._keepThisInstanceWhenPlayerSourcesChange=!1:this.cancel()}onQualitySelectionChange(){this.hasFinished()||(this._keepThisInstanceWhenPlayerSourcesChange=!0)}_seek(){this._player.currentTime(this._seekToTime),this._keepThisInstanceWhenPlayerSourcesChange=!1,this._hasFinished=!0}hasFinished(){return this._hasFinished}cancel(){this._player.off("canplay",this._seekFn),this._keepThisInstanceWhenPlayerSourcesChange=!1,this._hasFinished=!0}}var nM=n(81341);let nA={controls:!0,fluid:!0,controlBar:{volumePanel:{inline:!1}}};var nT=({options:e,style:t,className:n})=>{let r=o.useRef(null),l=o.useRef(null);return o.useEffect(()=>{var t;return function(e){var t,n=e.getComponent("MenuButton"),r=(t=e.getComponent("MenuItem"),class extends t{constructor(e,t){var n=t.source;if(!nx.isObject(n))throw Error('was not provided a "source" object, but rather: '+typeof n);super(e,t=nx.extend({selectable:!0,label:n.label},t)),this.source=n}handleClick(e){super.handleClick(e),this.player().trigger(nk,this.source)}});class i extends n{constructor(e,t){super(e,t),e.on(nk,(function(t,n){this.setSelectedSource(n),e.addClass(nE),e.one("loadeddata",function(){e.removeClass(nE)})}).bind(this)),e.on(nC,(function(){this.update()}).bind(this)),e.on(nS,(function(e,t){this.setSelectedSource(t)}).bind(this)),e.one("ready",(function(){this.selectedSrc=e.src(),this.update()}).bind(this)),this.controlText("Open quality selector menu")}setSelectedSource(e){var t=e?e.src:void 0;this.selectedSrc!==t&&(this.selectedSrc=t,nx.each(this.items,function(e){e.selected(e.source.src===t)}))}createItems(){var e=this.player(),t=e.currentSources();return!t||t.length<2?[]:nx.map(t,(function(t){return new r(e,{source:t,selected:t.src===this.selectedSrc})}).bind(this))}buildWrapperCSSClass(){return"vjs-quality-selector "+super.buildWrapperCSSClass()}}e.registerComponent("QualitySelector",i)}(t=s.default),function(e){e.use("*",function(e){return{setSource:function(t,n){var r,i=e.currentSources();e._qualitySelectorSafeSeek&&e._qualitySelectorSafeSeek.onPlayerSourcesChange(),nx.isEqual(i,e._qualitySelectorPreviousSources)||(e.trigger(nC,i),e._qualitySelectorPreviousSources=i),r=nx.find(i,function(e){return!0===e.selected||"true"===e.selected||"selected"===e.selected})||t,e.trigger(nS,r),n(null,r)}}})}(t),t.hook("setup",function(e){e.on(nk,function(t,n){var r=e.currentSources(),i=e.currentTime(),o=e.playbackRate(),s=e.paused();nx.each(r,function(e){e.selected=!1}),nx.findWhere(r,{src:n.src}).selected=!0,e._qualitySelectorSafeSeek&&e._qualitySelectorSafeSeek.onQualitySelectionChange(),e.src(r),e.ready(function(){(!e._qualitySelectorSafeSeek||e._qualitySelectorSafeSeek.hasFinished())&&(e._qualitySelectorSafeSeek=new nO(e,i),e.playbackRate(o)),s||e.play()})})}),l.current=(0,s.default)(r.current,{...nA,...e}).ready(function(){this.controlBar.children().some(e=>"QualitySelector"===e.name_)||this.controlBar.addChild("QualitySelector")}),()=>{l.current&&l.current.dispose()}},[e]),(0,i.jsx)("video",{ref:r,className:(0,nM.cn)("video-js",n),style:t})}},62238:function(e,t,n){"use strict";
40n.r(t),n.d(t,{EmbedContentInlineRenderer:function(){return a}});var r=n(74023),i=n(11300),o=n(83641),s=n(37603);let l=(0,o.memo)(e=>{let{content:t,getVideoAspect:n,...l}=e;return(0,o.useEffect)(()=>{},[]),(0,r.jsx)(i.h,{...l,children:(0,s.e)(t,n)})});function a(e){let{body:t,getVideoAspect:n,prefix:i}=e,[s,a]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{a(!0)},[]),s)?(0,r.jsx)(r.Fragment,{children:t.content.filter(e=>{var t,n;return"number"==typeof(null==e?void 0:null===(t=e.attrs)||void 0===t?void 0:t["data-id"])||"string"==typeof(null==e?void 0:null===(n=e.attrs)||void 0===n?void 0:n["data-id"])}).map(e=>{let t=document.getElementById(i),o=null==t?void 0:t.querySelector("[data-id='".concat(e.attrs["data-id"],"']"));return(0,r.jsx)(l,{container:o,content:e,getVideoAspect:n},"embed-content-inline-".concat(e.attrs["data-id"],"-").concat(e.attrs.key))})}):null}},37603:function(e,t,n){"use strict";n.d(t,{e:function(){return v}});var r=n(74023),i=n(5067),o=n(83641),s=n(85925),l=n(81341),a=n(48698);function u(){let[e,t]=(0,o.useState)(""),[n,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)(!1);return{aspectRatio:e,calculateAspectRatio:(0,o.useCallback)(async(e,n,o)=>{if(i)return;s(!0);let{src:l,actualWidth:a,actualHeight:u}=e;if(a&&u){r(a<u),t(`${a} / ${u}`),s(!1);return}if("VIDEO"===n&&o){let e=await o(l);e.width&&e.height&&(r(e.width<e.height),t(`${e.width} / ${e.height}`)),s(!1);return}},[i]),isVertical:n}}var c=({className:e,getVideoAspect:t,...n})=>{let{node:i}=n,c=(0,o.useRef)(null),{src:d,poster:h,playlistUrl:p,caption:f,actualWidth:m,actualHeight:g}=i.attrs,{aspectRatio:y,calculateAspectRatio:v,isVertical:b}=u(),[w,x]=o.useState(),[k,S]=o.useState();(0,o.useEffect)(()=>{async function e(){let e=await fetch(p,{cache:"no-cache"});return await e.json()}if(p)try{e().then(e=>{x(e)}).catch(e=>{S(e)})}catch(e){S(e)}},[p]);
40let C=(0,l.cn)("left"===i.attrs.align?"ml-0":"ml-auto","right"===i.attrs.align?"mr-0":"mr-auto","center"===i.attrs.align&&"mx-auto"),E=(0,o.useMemo)(()=>void 0==w?{}:w.items.some(e=>"application/x-mpegURL"===e.type||"application/vnd.apple.mpegurl"===e.type)?{sources:w.items.filter(e=>"application/x-mpegURL"===e.type||"application/vnd.apple.mpegurl"===e.type).map(e=>({src:e.src,type:e.type,label:e.label})),poster:w.poster,preload:"auto"}:{sources:w.items.map(e=>({src:e.src,type:e.type,label:e.label})),poster:w.poster,preload:"auto"},[w]);(0,o.useEffect)(()=>{if(!w?.items?.length)return;let e=w.items.find(e=>e.src);!y&&e?.src&&v({src:e.src,actualWidth:m||e?.width,actualHeight:g||e?.height},"VIDEO",t)},[w]);let O=(0,o.useMemo)(()=>y?{aspectRatio:y,width:i.attrs.width}:{width:i.attrs.width},[y]);return(0,r.jsxs)(s.T5,{className:e,children:[(0,r.jsxs)("div",{className:(0,l.cn)(C,"main-videojs-wrapper aspect-square h-full"),...b&&{"data-vertical":b},ref:c,style:O,children:[k&&(0,r.jsx)("div",{children:k}),w&&(0,r.jsx)(a.Z,{options:E})]}),f&&w?.title&&(0,r.jsx)("div",{className:"block mx-auto text-sm text-gray-500 text-center mt-1",style:{width:i.attrs.width},children:w?.title})]})},d=({className:e,getVideoAspect:t,...n})=>{let{node:i}=n,c=(0,o.useRef)(null),{src:d,optimizedImageUrl:h,playlistUrl:p,caption:f,actualWidth:m,actualHeight:g,title:y}=i.attrs,{aspectRatio:v,calculateAspectRatio:b,isVertical:w}
40=u(),[x,k]=o.useState(),S=(0,l.cn)("left"===i.attrs.align?"ml-0":"ml-auto","right"===i.attrs.align?"mr-0":"mr-auto","center"===i.attrs.align&&"mx-auto"),C=(0,o.useMemo)(()=>({sources:p,poster:h}),[]);(0,o.useEffect)(()=>{p&&(v||b({src:"",actualWidth:m,actualHeight:g},"VIDEO",t))},[p]);let E=(0,o.useMemo)(()=>v?{aspectRatio:v,width:i.attrs.width}:{width:i.attrs.width},[v]);return(0,r.jsxs)(s.T5,{className:e,children:[(0,r.jsxs)("div",{className:(0,l.cn)(S,"main-videojs-wrapper aspect-square h-full"),...w&&{"data-vertical":w},ref:c,style:E,children:[x&&(0,r.jsx)("div",{children:x}),p&&(0,r.jsx)(a.Z,{options:C})]}),(f||y)&&(0,r.jsx)("div",{className:"block mx-auto text-sm text-gray-500 text-center mt-1",style:{width:i.attrs.width},children:y||f})]})},h=e=>e.node.attrs.playlistUrl.includes(".json")?(0,r.jsx)(c,{...e}):(0,r.jsx)(d,{...e});let p=({children:e,className:t})=>(0,r.jsx)(s.T5,{className:(0,l.cn)("react-component",t),children:(0,r.jsx)(s.ms,{contentEditable:"false",className:"socialMediaContainer",children:(0,r.jsx)("div",{style:{display:"flex",justifyContent:"center"},draggable:"false","data-drag-handle":"",children:e})})});var f=n(70408),m=n(10193);let g=({content:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:(0,l.cn)("relative object-cover",{}),style:{width:e.attrs.width||"100%"},children:(0,r.jsx)(m.default,{className:"rounded object-cover",src:e.attrs.src,alt:e.attrs.alt||e.attrs.caption,width:800,height:600})}),e.attrs?.caption?(0,r.jsx)("p",{className:(0,l.cn)("tiptap-image-caption","pt-2 font-sf text-sm font-light text-grey-7 mx-6 sm:mx-0 line-clamp-2"),children:e.attrs?.caption}):null]});function y(e){return"string"==typeof e}let v=(e,t)=>{switch(e.type){case"twitter":if(!y(e.attrs.url))return null;return(0,r.jsx)(p,{children:(0,r.jsx)(i.XEmbed,{url:e.attrs.url||"",width:325})});case"youtube":if(!y(e.attrs.url))return null;return(0,r.jsx)(p,{children:(0,r.jsx)(i.YouTubeEmbed,{url:e.attrs.url||""})});case"instagram":if(!y(e.attrs.url))return null;return(0,r.jsx)(p,{children:(0,r.jsx)(i.InstagramEmbed,{className:"max-w-[328px]",url:e.attrs.url||"",width:328,captioned:!0})});case"tiktok":if(!y(e.attrs.url))return null;return(0,r.jsx)(p,{children:(0,r.jsx)(i.TikTokEmbed,{className:"max-w-[328px]",url:e.attrs.url||"",width:328})});case"imageBlock":return(0,r.jsx)(g,{content:e});case"videoBlock":return(0,r.jsx)(h,{node:e,getVideoAspect:t});case"facebook":return(0,r.jsx)(p,{children:(0,r.jsx)(i.FacebookEmbed,{url:e.attrs.url||"",width:550})});case"linkedin":if(!y(e.attrs.url))return null;return(0,r.jsx)(p,{children:(0,r.jsx)(i.LinkedInEmbed,{url:e.attrs.url||"",width:325,height:570})});case"insideLinks":return(0,r.jsx)(f.Z,{...e});case"iframe":return(0,r.jsx)(p,{children:(0,r.jsx)("div",{className:"iframe-wrapper",children:(0,r.jsx)("iframe",{src:e?.attrs?.src??"",allowFullScreen:!0})})});default:return null}}},81341:function(e,t,n){"use strict";n.d(t,{cn:function(){return L},S3:function(){return _}});var r=n(52331),i=/^\[(.+)\]$/;function o(e,t){var n=e;return t.split("-").forEach(function(e){n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n}var s=/\s+/;function l(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){if("string"==typeof t)return t;for(var n,r="",i=0;i<t.length;i++)t[i]&&(n=e(t[i]))&&(r&&(r+=" "),r+=n);return r}(e))&&(r&&(r+=" "),r+=t);return r}function a(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var u=/^\[(?:([a-z-]+):)?(.+)\]$/i,c=/^\d+\/\d+$/,d=new Set(["px","full","screen"]),h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,f=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function m(e){return x(e)||d.has(e)||c.test(e)||g(e)}function g(e){return A(e,"length",T)}function y(e){return A(e,"size",N)}function v(e){return A(e,"position",N)}function b(e){return A(e,"url",R)}function w(e){return A(e,"number",x)}function x(e){return!Number.isNaN(Number(e))}function k(e){return e.endsWith("%")&&x(e.slice(0,-1))}function S(e){return P(e)||A(e,"number",P)}function C(e){return u.test(e)}function E(){return!0}function O(e){return h.test(e)}function M(e){return A(e,"",j)}function A(e,t,n){var r=u.exec(e);return!!r&&(r[1]?r[1]===t:n(r[2]))}function T(e){return p.test(e)}function N(){return!1}function R(e){return e.startsWith("url(")}function P(e){return Number.isInteger(Number(e))}function j(e){return f.test(e)}var I=function(){for(var e,t,n,r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];var c=function(r){var s=a[0];return t=(e=function(e){var t,n,r,s,l,a,u,c,d,h,p;return{cache:function(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function i(i,o){n.set(i,o),++t>e&&(t=0,r=n,n=new Map)}return{get:function(e){var t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(i(e,t),t):void 0},set:function(e,t){n.has(e)?n.set(e,t):i(e,t)}}}(e.cacheSize),splitModifiers:(n=1===(t=e.separator||":").length,r=t[0],s=t.length,function(e){for(var i,o=[],l=0,a=0,u=0;u<e.length;u++){var c=e[u];if(0===l){if(c===r&&(n||e.slice(u,u+s)===t)){o.push(e.slice(a,u)),a=u+s;continue}if("/"===c){i=u;continue}}"["===c?l++:"]"===c&&l--}var d=0===o.length?e:e.substring(a),h=d.startsWith("!"),p=h?d.substring(1):d;return{modifiers:o,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:i&&i>a?i-a:void 0}}),...(c=e.theme,d=e.prefix,h={nextPart:new Map,validators:[]},(p=Object.entries(e.classGroups),d?p.map(function(e){return[e[0],e[1].map(function(e){return"string"==typeof e?d+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(function(e){return[d+e[0],e[1]]})):e})]}
40):p).forEach(function(e){var t=e[0];(function e(t,n,r,i){t.forEach(function(t){if("string"==typeof t){(""===t?n:o(n,t)).classGroupId=r;return}if("function"==typeof t){if(t.isThemeGetter){e(t(i),n,r,i);return}n.validators.push({validator:t,classGroupId:r});return}Object.entries(t).forEach(function(t){var s=t[0];e(t[1],o(n,s),r,i)})})})(e[1],h,t,c)}),l=e.conflictingClassGroups,u=void 0===(a=e.conflictingClassGroupModifiers)?{}:a,{getClassGroupId:function(e){var t=e.split("-");return""===t[0]&&1!==t.length&&t.shift(),function e(t,n){if(0===t.length)return n.classGroupId;var r=t[0],i=n.nextPart.get(r),o=i?e(t.slice(1),i):void 0;if(o)return o;if(0!==n.validators.length){var s=t.join("-");return n.validators.find(function(e){return(0,e.validator)(s)})?.classGroupId}}(t,h)||function(e){if(i.test(e)){var t=i.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){var n=l[e]||[];return t&&u[e]?[].concat(n,u[e]):n}})}}(a.slice(1).reduce(function(e,t){return t(e)},s()))).cache.get,n=e.cache.set,c=d,d(r)};function d(r){var i,o,l,a,u,c=t(r);if(c)return c;var d=(o=(i=e).splitModifiers,l=i.getClassGroupId,a=i.getConflictingClassGroupIds,u=new Set,r.trim().split(s).map(function(e){var t=o(e),n=t.modifiers,r
40=t.hasImportantModifier,i=t.baseClassName,s=t.maybePostfixModifierPosition,a=l(s?i.substring(0,s):i),u=!!s;if(!a){if(!s||!(a=l(i)))return{isTailwindClass:!1,originalClassName:e};u=!1}var c=(function(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(e){"["===e[0]?(t.push.apply(t,n.sort().concat([e])),n=[]):n.push(e)}),t.push.apply(t,n.sort()),t})(n).join(":");return{isTailwindClass:!0,modifierId:r?c+"!":c,classGroupId:a,originalClassName:e,hasPostfixModifier:u}}).reverse().filter(function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,r=e.hasPostfixModifier,i=t+n;return!u.has(i)&&(u.add(i),a(n,r).forEach(function(e){return u.add(t+e)}),!0)}).reverse().map(function(e){return e.originalClassName}).join(" "));return n(r,d),d}return function(){return c(l.apply(null,arguments))}}(function(){var e=a("colors"),t=a("spacing"),n=a("blur"),r=a("brightness"),i=a("borderColor"),o=a("borderRadius"),s=a("borderSpacing"),l=a("borderWidth"),u=a("contrast"),c=a("grayscale"),d=a("hueRotate"),h=a("invert"),p=a("gap"),f=a("gradientColorStops"),A=a("gradientColorStopPositions"),T=a("inset"),N=a("margin"),R=a("opacity"),P=a("padding"),j=a("saturate"),I=a("scale"),L=a("sepia"),_=a("skew"),$=a("space"),D=a("translate"),z=function(){return["auto","contain","none"]},H=function(){return["auto","hidden","clip","visible","scroll"]},F=function(){return["auto",C,t]},B=function(){return[C,t]},U=function(){return["",m]},V=function(){return["auto",x,C]},W=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},q=function(){return["solid","dashed","dotted","double","none"]},J=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},Y=function(){return["start","end","center","between","around","evenly","stretch"]},K=function(){return["","0",C]},G=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},Q=function(){return[x,w]},X=function(){return[x,C]};return{cacheSize:500,theme:{colors:[E],spacing:[m],blur:["none","",O,C],brightness:Q(),borderColor:[e],borderRadius:["none","","full",O,C],borderSpacing:B(),borderWidth:U(),contrast:Q(),grayscale:K(),hueRotate:X(),invert:K(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[k,g],inset:F(),margin:F(),opacity:Q(),padding:B(),saturate:Q(),scale:Q(),sepia:K(),skew:X(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",C]}],container:["container"],columns:[{columns:[O]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(W(),[C])}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",S]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",C]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",S]}],"grid-cols":[{"grid-cols":[E]}],"col-start-end":[{col:["auto",{span:["full",S]},C]}],"col-start":[{"col-start":V()}
vendor: 9,117 bytes, line 40
40],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[E]}],"row-start-end":[{row:["auto",{span:[S]},C]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",C]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",C]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(Y())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(Y(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(Y(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",C,t]}],"min-w":[{"min-w":["min","max","fit",C,m]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[O]},O,C]}],h:[{h:[C,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",C,m]}],"max-h":[{"max-h":[C,t,"min","max","fit"]}],"font-size":[{text:["base",O,g]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",w]}],"font-family":[{font:[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",C]}],"line-clamp":[{"line-clamp":["none",x,w]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",C,m]}],"list-image":[{"list-image":["none",C]}],"list-style-type":[{list:["none","disc","decimal",C]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(q(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",m]}],"underline-offset":[{"underline-offset":["auto",C,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(W(),[v])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",y]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},b]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[].concat(q(),["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[""].concat(q())}],"outline-offset":[{"outline-offset":[C,m]}],"outline-w":[{outline:[m]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[m]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",O,M]}],"shadow-color":[{shadow:[E]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":J()}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",O,C]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[j]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",C]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",C]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",C]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[S,C]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",C]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
40],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[m,w]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function L(...e){return I((0,r.W)(e))}let _=(e,{chars:t})=>e.state.doc.textContent?.slice(-t)},52993:function(e,t,n){"use strict";n.d(t,{Ig:function(){return w},MI:function(){return b},N0:function(){return M},NE:function(){return s},QK:function(){return k},U9:function(){return N},X0:function(){return O},Y_:function(){return g},_M:function(){return p},al:function(){return a},cR:function(){return c},mD:function(){return E},nw:function(){return R},o:function(){return y},rr:function(){return u},uJ:function(){return j},uo:function(){return C},xb:function(){return x},ym:function(){return P}});var r=n(85562),i=n(54418),o=n(21870);let s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function l(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let a=(e,t,n)=>{let s=l(e,n);if(!s)return!1;let a=f(s);if(!a){let n=s.blockRange(),i=n&&(0,r.k9)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let u=a.nodeBefore;if(A(e,a,t,-1))return!0;if(0==s.parent.content.size&&(h(u,"end")||o.qv.isSelectable(u)))for(let n=s.depth;;n--){let l=(0,r.dR)(e.doc,s.before(n),s.after(n),i.p2.empty);if(l&&l.slice.size<l.to-l.from){if(t){let n=e.tr.step(l);n.setSelection(h(u,"end")?o.Y1.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):o.qv.create(n.doc,a.pos-u.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||s.node(n-1).childCount>1)break}return!!u.isAtom&&a.depth==s.depth-1&&(t&&t(e.tr.delete(a.pos-u.nodeSize,a.pos).scrollIntoView()),!0)},u=(e,t,n)=>{let r=l(e,n);if(!r)return!1;let i=f(r);return!!i&&d(e,i,t)},c=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=v(r);return!!i&&d(e,i,t)};function d(e,t,n){let s=t.nodeBefore,l=t.pos-1;for(;!s.isTextblock;l--){if(s.type.spec.isolating)return!1;let e=s.lastChild;if(!e)return!1;s=e}let a=t.nodeAfter,u=t.pos+1;for(;!a.isTextblock;u++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let c=(0,r.dR)(e.doc,l,u,i.p2.empty);if(!c||c.from!=l||c instanceof r.Pu&&c.slice.size>=u-l)return!1;if(n){let t=e.tr.step(c);t.setSelection(o.Bs.create(t.doc,l)),n(t.scrollIntoView())}return!0}function h(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
40if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=f(r)}let l=s&&s.nodeBefore;return!!(l&&o.qv.isSelectable(l))&&(t&&t(e.tr.setSelection(o.qv.create(e.doc,s.pos-l.nodeSize)).scrollIntoView()),!0)};function f(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 m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let s=m(e,n);if(!s)return!1;let l=v(s);if(!l)return!1;let a=l.nodeAfter;if(A(e,l,t,1))return!0;if(0==s.parent.content.size&&(h(a,"start")||o.qv.isSelectable(a))){let n=(0,r.dR)(e.doc,s.before(),s.after(),i.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(h(a,"start")?o.Y1.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):o.qv.create(r.doc,r.mapping.map(l.pos))),t(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==s.depth-1&&(t&&t(e.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=v(r)}let l=s&&s.nodeAfter;return!!(l&&o.qv.isSelectable(l))&&(t&&t(e.tr.setSelection(o.qv.create(e.doc,s.pos)).scrollIntoView()),!0)};function v(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let b=(e,t)=>{let n=e.selection,i=n instanceof o.qv,s;if(i){if(n.node.isTextblock||!(0,r.Mn)(e.doc,n.from))return!1;s=n.from}else if(null==(s=(0,r.GJ)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(s);i&&n.setSelection(o.qv.create(n.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},w=(e,t)=>{let n=e.selection,i;if(n instanceof o.qv){if(n.node.isTextblock||!(0,r.Mn)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.GJ)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},x=(e,t)=>{let{$from:n,$to:i}=e.selection,o=n.blockRange(i),s=o&&(0,r.k9)(o);return null!=s&&(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)},k=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function S(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let C=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),l=S(i.contentMatchAt(s));if(!l||!i.canReplaceWith(s,s,l))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,l.createAndFill());i.setSelection(o.Y1.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},E=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof o.C1||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=S(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=e.tr.insert(n,s.createAndFill());l.setSelection(o.Bs.create(l.doc,n+1)),t(l.scrollIntoView())}return!0},O=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.Ax)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),o=i&&(0,r.k9)(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},M=(e,t)=>{let{$from:n,to:r}=e.selection,i,s=n.sharedDepth(r);return 0!=s&&(i=n.before(s),t&&t(e.tr.setSelection(o.qv.create(e.doc,i))),!0)};function A(e,t,n,s){let l,a,u,c=t.nodeBefore,d=t.nodeAfter,p,f,m=c.type.spec.isolating||d.type.spec.isolating;if(!m&&(l=t.nodeBefore,a=t.nodeAfter,u=t.index(),l&&a&&l.type.compatibleContent(a.type)&&(!l.content.size&&t.parent.canReplace(u-1,u)?(n&&n(e.tr.delete(t.pos-l.nodeSize,t.pos).scrollIntoView()),!0):!!(t.parent.canReplace(u,u+1)&&(a.isTextblock||(0,r.Mn)(e.doc,t.pos)))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(p=(f=c.contentMatchAt(c.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(n){let o=t.pos+d.nodeSize,s=i.HY.empty;for(let e=p.length-1;e>=0;e--)s=i.HY.from(p[e].create(null,s));s=i.HY.from(c.copy(s));let l=e.tr.step(new r.FC(t.pos-1,o,t.pos,o,new i.p2(s,1,0),p.length,!0)),a=l.doc.resolve(o+2*p.length);a.nodeAfter&&a.nodeAfter.type==c.type&&(0,r.Mn)(l.doc,a.pos)&&l.join(a.pos),n(l.scrollIntoView())}return!0}let y=d.type.spec.isolating||s>0&&m?null:o.Y1.findFrom(t,1),v=y&&y.$from.blockRange(y.$to),b=v&&(0,r.k9)(v);if(null!=b&&b>=t.depth)return n&&n(e.tr.lift(v,b).scrollIntoView()),!0;if(g&&h(d,"start",!0)&&h(c,"end")){let o=c,s=[];for(;s.push(o),!o.isTextblock;)o=o.lastChild;let l=d,a=1;for(;!l.isTextblock;l=l.firstChild)a++;
40if(o.canReplace(o.childCount,o.childCount,l.content)){if(n){let o=i.HY.empty;for(let e=s.length-1;e>=0;e--)o=i.HY.from(s[e].copy(o));n(e.tr.step(new r.FC(t.pos-s.length,t.pos+d.nodeSize,t.pos+a,t.pos+d.nodeSize-a,new i.p2(o,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function T(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(n&&n(t.tr.setSelection(o.Bs.create(t.doc,e<0?i.start(s):i.end(s)))),!0)}}let N=T(-1),R=T(1);function P(e,t=null){return function(n,i){let{$from:o,$to:s}=n.selection,l=o.blockRange(s),a=l&&(0,r.nd)(l,e,t);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function j(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t))){if(r.type==e)i=!0;else{let t=n.doc.resolve(o),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,e,t)}r(i.scrollIntoView())}return!0}}function I(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let L=I(s,a,p),_=I(s,g,y),$={Enter:I(k,E,O,(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof o.qv&&e.selection.node.isBlock)return!!(n.parentOffset&&(0,r.Ax)(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let s=[],l,a,u=!1,c=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;u=n.end(e)==n.pos+(n.depth-e),c=n.start(e)==n.pos-(n.depth-e),a=S(n.node(e-1).contentMatchAt(n.indexAfter(e-1))),s.unshift(t||(u&&a?{type:a}:null)),l=e;break}if(1==e)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof o.Bs||e.selection instanceof o.C1)&&d.deleteSelection();let h=d.mapping.map(n.pos),p=(0,r.Ax)(d.doc,h,s.length,s);if(p||(s[0]=a?{type:a}:null,p=(0,r.Ax)(d.doc,h,s.length,s)),!p)return!1;if(d.split(h,s.length,s),!u&&c&&n.node(l).type!=a){let e=d.mapping.map(n.before(l)),t=d.doc.resolve(e);a&&n.node(l-1).canReplaceWith(t.index(),t.index()+1,a)&&d.setNodeMarkup(d.mapping.map(n.before(l)),a)}return t&&t(d.scrollIntoView()),!0}),"Mod-Enter":C,Backspace:L,"Mod-Backspace":L,"Shift-Backspace":L,Delete:_,"Mod-Delete":_,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new o.C1(e.doc))),!0)},D={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":N,"Ctrl-e":R};for(let e in $)D[e]=$[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},6847:function(e,t,n){"use strict";n.d(t,{$:function(){return f},h:function(){return p}});for(var r={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:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var u=n(21870);let c="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);
40function h(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new u.Sy({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))c?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=e[n];return t}(e);return function(e,n){var l;let a=("Esc"==(l=!(o&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||s&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),u,c=t[h(a,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=t[h(a,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(d&&n.ctrlKey&&n.altKey)&&(u=r[n.keyCode])&&u!=a){let r=t[h(u,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},54418:function(e,t,n){"use strict";function r(e){this.content=e}n.d(t,{aw:function(){return H},PW:function(){return K},HY:function(){return i},vc:function(){return a},ZU:function(){return $},NB:function(){return S},Ts:function(){return x},e4:function(){return u},V_:function(){return D},p2:function(){return c}}),r.prototype={constructor:r,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,n){var i=n&&n!=e?this.remove(n):this,o=i.find(e),s=i.content.slice();return -1==o?s.push(n||e,t):(s[o+1]=t,n&&(s[o]=n)),new r(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),o=i.content.slice(),s=i.find(e);return o.splice(-1==s?o.length:s,0,t,n),new r(o)},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=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class i{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,n,r=0,i){for(let o=0,s=0;s<t;o++){let l=this.content[o],a=s+l.nodeSize;if(a>e&&!1!==n(l,r+s,i||null,o)&&l.content.size){let i=s+1;l.nodesBetween(Math.max(0,e-i),Math.min(l.content.size,t-i),n,r+i)}s=a}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let a=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=a},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let s=this.content[i],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),r+=s.nodeSize),o=l}return new i(n,r)}cutByIndex(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;
40let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)}addToStart(e){return new i([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new i(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,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)r++;return r}if(o.content.size||s.content.size){let t=e(o.content,s.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let l=t.child(--o),a=n.child(--s),u=l.nodeSize;if(l==a){r-=u,i-=u;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let e=0,t=Math.min(l.text.length,a.text.length);for(;e<t&&l.text[l.text.length-e-1]==a.text[a.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let t=e(l.content,a.content,r-1,i-1);if(t)return t}r-=u,i-=u}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return s(0,e);if(e==this.size)return s(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e){if(i==e||t>0)return s(n+1,i);return s(n,r)}r=i}}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 i.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return i.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new i(t||e,n)}static from(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let o={index:0,offset:0};function s(e,t){return o.index=e,o.offset=t,o}function l(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!l(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class a{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||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&&l(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 n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;
40if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return a.none;if(e instanceof a)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}a.none=[];class u extends Error{}class c{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:s}=t.findIndex(n),l=t.maybeChild(o);if(s==n||l.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let a=e(l.content,n-s-1,r);return a&&t.replaceChild(o,l.copy(a))}(this.content,e+this.openStart,t);return n&&new c(n,this.openStart,this.openEnd)}removeBetween(e,t){return new c(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),s=t.maybeChild(i),{index:l,offset:a}=t.findIndex(r);if(o==n||s.isText){if(a!=r&&!t.child(l).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-o-1,r-o-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 c.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new c(i.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new c(e,n,r)}}function d(e,t){if(!t.type.compatibleContent(e.type))throw new u("Cannot join "+t.type.name+" onto "+e.type.name)}function h(e,t,n){let r=e.node(n);return d(r,t.node(n)),r}function p(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function f(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(p(e.nodeAfter,r),o++));for(let e=o;e<s;e++)p(i.child(e),r);t&&t.depth==n&&t.textOffset&&p(t.nodeBefore,r)}function m(e,t){return e.type.checkContent(t),e.copy(t)}function g(e,t,n){let r=[];return f(null,e,n,r),e.depth>n&&p(m(h(e,t,n+1),g(e,t,n+1)),r),f(t,null,n,r),new i(r)}c.empty=new c(i.empty,0,0);class y{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,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 n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}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 n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return a.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}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 n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new x(this,e,n);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 n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(n.push(t,e,r+o),!s||(t=t.child(e)).isText)break;
40i=s-1,r+=o+1}return new y(t,n,i)}static resolveCached(e,t){let n=w.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else w.set(e,n=new v);let r=n.elts[n.i]=y.resolve(e,t);return n.i=(n.i+1)%b,r}}class v{constructor(){this.elts=[],this.i=0}}let b=12,w=new WeakMap;class x{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}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 k=Object.create(null);class S{constructor(e,t,n,r=a.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||i.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,n,r=0){this.content.nodesBetween(e,t,n,r,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,n,r){return this.content.textBetween(e,t,n,r)}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,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||k)&&a.sameSet(this.marks,n||a.none)}copy(e=null){return e==this.content?this:new S(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new S(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,n=!1){if(e==t)return c.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o);return new c(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new u("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new u("Inconsistent open depths");return function e(t,n,r,o){let s=t.index(o),l=t.node(o);if(s==n.index(o)&&o<t.depth-r.openStart){let i=e(t,n,r,o+1);return l.copy(l.content.replaceChild(s,i))}if(!r.content.size)return m(l,g(t,n,o));if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){let{start:e,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return m(l,function e(t,n,r,o,s){let l=t.depth>s&&h(t,n,s+1),a=o.depth>s&&h(r,o,s+1),u=[];return f(null,t,s,u),l&&a&&n.index(s)==r.index(s)?(d(l,a),p(m(l,e(t,n,r,o,s+1)),u)):(l&&p(m(l,g(t,n,s+1)),u),f(n,r,s,u),a&&p(m(a,g(r,o,s+1)),u)),f(o,null,s,u),new i(u)}(t,e,s,n,o))}{let e=t.parent,i=e.content;return m(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return y.resolveCached(this,e)}resolveNoCache(e){return y.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}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}
40toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(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,n=i.empty,r=0,o=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.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=a.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!a.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 n;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");n=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,n)}let r=i.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,r,n);return o.type.checkAttrs(o.attrs),o}}S.prototype.text=void 0;class C extends S{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(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 C(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new C(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 E(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class O{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new M(e,t);if(null==i.next)return O.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(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("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=A(e),r=n;return e.eat(",")&&(r="}"!=e.next?A(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let s=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let s=e(t.exprs[r],o);if(r==t.exprs.length-1)return s;i(s,o=n())}else if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}else if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}else if("opt"==t.type)return[r(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,s),r),s=r}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=n();r(s,o),i(e(t.expr,s),o),s=o}return[r(s)]}else if("name"==t.type)return[r(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
40function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);N(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let o=r[t.join(",")]=new O(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(T);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(N(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),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,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}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 n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(s,l){let a=s.matchFragment(e,n);if(a&&(!t||a.validEnd))return i.from(l.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=o(n,l.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),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.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(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}O.empty=new O(!0);class M{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 A(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function T(e,t){return t-e}function N(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(T)}function R(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function P(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function j(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function I(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new _(e,r,t[r]);return n}class L{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=I(e,n.attrs),this.defaultAttrs=R(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==O.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:P(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new S(this,this.computeAttrs(e),i.from(t),a.setFrom(n))}createChecked(e=null,t,n){return t=i.from(t),this.checkContent(t),new S(this,this.computeAttrs(e),t,a.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(i.empty,!0);return o?new S(this,e,t.append(o),a.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
40if(!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){j(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 n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:a.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new L(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class _{constructor(e,t,n){let r;this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?(r=n.validate.split("|"),n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}):n.validate}get isRequired(){return!this.hasDefault}}class ${constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=I(e,r.attrs),this.excluded=null;let i=R(this.attrs);this.instance=i?new a(this,i):null}create(e=null){return!e&&this.instance?this.instance:new a(this,P(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new $(e,r++,t,i)),n}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){j(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class D{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=L.compile(this.spec.nodes,this),this.marks=$.compile(this.spec.marks,this);let n=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],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=O.parse(r,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="_"==i?null:i?z(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:z(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof L){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,n,r)}text(e,t){let n=this.nodes.text;return new C(n,n.defaultAttrs,e,a.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return S.fromJSON(this,e)}markFromJSON(e){return a.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function z(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class H{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
40t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new q(this,t,!1);return n.addAll(e,a.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new q(this,t,!0);return n.addAll(e,a.none,t.from,t.to),c.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){var r;let n=this.tags[i];if(r=n.tag,(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,r)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(0==o.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=J(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=J(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new H(e,H.schemaRules(e)))}}let F={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},B={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},U={ol:!0,ul:!0};function V(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class W{constructor(e,t,n,r,i,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=a.none,this.match=i||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(i.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):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=i.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(i.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&&!F.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class q{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,o=V(null,t.preserveWhitespace,0)|(n?4:0);i=r?new W(r.type,r.attrs,a.none,!0,t.topMatch||r.type.contentMatch,o):n?new W(null,null,a.none,!0,null,o):new W(e.schema.topNodeType,null,a.none,!0,null,o),this.nodes=[i],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 n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)n="full"!==i?n.replace(/\r?\n|\r/g," "):n.replace(/\r\n?/g,"\n");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;U.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&U.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));n:if(l?l.ignore:B.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(F.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break n}let s=l&&l.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?s:void 0)}this.localPreserveWS=r}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 n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,o;
40if(t.node){if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(o,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,o=0;t>=0;t--){let s=this.nodes[t],l=s.findWrapping(e);if(l&&(!r||r.length>l.length+o)&&(r=l,i=s,!l.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=a.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):Y(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=V(e,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let l=a.none;return n=n.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!Y(t.type,e))||(l=t.addToSet(l),!1)),this.nodes.push(new W(e,t,l,r,null,s)),this.open++,n}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;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 n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].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,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].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("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,s)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];
40if(t.isTextblock&&t.defaultAttrs)return t}}}function J(e){let t={};for(let n in e)t[n]=e[n];return t}function Y(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}class K{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Q(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],s=this.serializeMark(n,e.isInline,t);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Z(Q(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Z(Q(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return Z(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new K(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=G(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return G(e.marks)}}function G(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q(e){return e.document||window.document}let X=new WeakMap;function Z(e,t,n,r){let i,o,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 l=t[0],a;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=X.get(r))&&X.set(r,(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 n=0;n<t.length;n++)e(t[n])}else for(let n in t)e(t[n])}}(r),o=s)),a=o)&&a.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 u=l.indexOf(" ");u>0&&(n=l.slice(0,u),l=l.slice(u+1));let c=n?e.createElementNS(n,l):e.createElement(l),d=t[1],h=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in h=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):c.setAttribute(e,d[e])}}for(let o=h;o<t.length;o++){let s=t[o];if(0===s){if(o<t.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}{let{dom:t,contentDOM:o}=Z(e,s,n,r);if(c.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:c,contentDOM:i}}},20948:function(e,t,n){"use strict";n.d(t,{IB:function(){return s},KI:function(){return o},bw:function(){return l}});var r=n(85562),i=n(54418);function o(e,t=null){return function(n,o){let{$from:s,$to:l}=n.selection,a=s.blockRange(l);if(!a)return!1;let u=o?n.tr:null;return!!function(e,t,n,o=null){let s=!1,l=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=a.resolve(t.start-2);l=new i.Ts(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.Ts(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),s=!0}let u=(0,r.nd)(l,n,o,t);return!!u&&(e&&function(e,t,n,o,s){let l=i.HY.empty;for(let e=n.length-1;e>=0;e--)l=i.HY.from(n[e].type.create(n[e].attrs,l));e.step(new r.FC(t.start-(o?2:0),t.end,t.start,t.end,new i.p2(l,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==s&&(a=e+1);let u=n.length-a,c=t.start+n.length-(o?2:0),d=t.parent;for(let n=t.startIndex,i=t.endIndex,o=!0;n<i;n++,o=!1)!o&&(0,r.Ax)(e.doc,c,u)&&(e.split(c,u),c+=2*u),c+=d.child(n).nodeSize}(e,t,u,s,n),!0)}(u,a,e,t)&&(o&&o(u.scrollIntoView()),!0)}}function s(e){return function(t,n){let{$from:o,$to:s}=t.selection,l=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);return!!l&&(!n||(o.node(l.depth-1).type==e?function(e,t,n,o){let s=e.tr,l=o.end,a=o.$to.end(o.depth);l<a&&(s.step(new r.FC(l-1,a,l,a,new i.p2(i.HY.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new i.Ts(s.doc.resolve(o.$from.pos),s.doc.resolve(a),o.depth));let u=(0,r.k9)(o);if(null==u)return!1;s.lift(o,u);let c=s.doc.resolve(s.mapping.map(l,-1)-1);return(0,r.Mn)(s.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&s.join(c.pos),t(s.scrollIntoView()),!0}(t,n,e,l):function(e,t,n){let o=e.tr,s=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=s.child(t).nodeSize,o.delete(e-1,e+1);
40let l=o.doc.resolve(n.start),a=l.nodeAfter;if(o.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let u=0==n.startIndex,c=n.endIndex==s.childCount,d=l.node(-1),h=l.index(-1);if(!d.canReplace(h+(u?0:1),h+1,a.content.append(c?i.HY.empty:i.HY.from(s))))return!1;let p=l.pos,f=p+a.nodeSize;return o.step(new r.FC(p-(u?1:0),f+(c?1:0),p+1,f-1,new i.p2((u?i.HY.empty:i.HY.from(s.copy(i.HY.empty))).append(c?i.HY.empty:i.HY.from(s.copy(i.HY.empty))),u?0:1,c?0:1),u?0:1)),t(o.scrollIntoView()),!0}(t,n,l)))}}function l(e){return function(t,n){let{$from:o,$to:s}=t.selection,l=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let u=l.parent,c=u.child(a-1);if(c.type!=e)return!1;if(n){let o=c.lastChild&&c.lastChild.type==u.type,s=i.HY.from(o?e.create():null),a=new i.p2(i.HY.from(e.create(null,i.HY.from(u.type.create(null,s)))),o?3:1,0),d=l.start,h=l.end;n(t.tr.step(new r.FC(d-(o?3:1),h,d,h,a,1,!0)).scrollIntoView())}return!0}}},21870:function(e,t,n){"use strict";n.d(t,{Bs:function(){return c},C1:function(){return f},H$:function(){return M},Sy:function(){return C},Y1:function(){return s},qv:function(){return h},xm:function(){return l},yy:function(){return S}});var r=n(54418),i=n(85562);let o=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new l(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=r.p2.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let o=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:u}=s[l],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(u.pos),l?r.p2.empty:t),0==l&&y(e,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],l=e.mapping.slice(n),a=l.map(o.pos),u=l.map(s.pos);i?e.deleteRange(a,u):(e.replaceRangeWith(a,u,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}
40static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class l{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function u(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends s{constructor(e,t=e){u(e),u(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(e,t=r.p2.empty){if(super.replace(e,t),t==r.p2.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new d(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 c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos==r<0||(e=t)),new c(e,t)}}s.jsonID("text",c);class d{constructor(e,t){this.anchor=e,this.head=t}map(e){return new d(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class h extends s{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?s.near(i):new h(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof h&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new h(e.resolve(t.anchor))}static create(e,t){return new h(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}h.prototype.visible=!1,s.jsonID("node",h);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&h.isSelectable(n)?new h(t):s.near(t)}}class f extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.p2.empty){if(t==r.p2.empty){e.delete(0,e.doc.content.size);let t=s.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}s.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,o=!1){if(t.inlineContent)return c.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&h.isSelectable(r))return h.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r,o=e.steps.length-1;if(o<t)return;let l=e.steps[o];(l instanceof i.Pu||l instanceof i.FC)&&(e.mapping.maps[o].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(s.near(e.doc.resolve(r),n)))}class v extends i.wx{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 r.vc.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 n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(s.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 b(e,t){return t&&e?e.bind(t):e}
40class w{constructor(e,t,n){this.name=e,this.init=b(t.init,n),this.apply=b(t.apply,n)}}let x=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new w("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class k{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.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 w(e.key,e.spec.state,e))})}}class S{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 n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];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],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=r?r[o].n:0,a=r?r[o].state:this,u=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,a,n);if(u&&n.filterTransaction(u,o)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<o?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),i=!0}r&&(r[o]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new S(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new v(this)}static create(e){let t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new S(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new k(this.schema,e.plugins),n=t.fields,r=new S(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}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 n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new k(e.schema,e.plugins),o=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],l=s.spec.state;if(s.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){o[i.name]=l.fromJSON.call(s,e,t[r],o);return}}o[i.name]=i.init(e,o)}}),o}}class C{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:O("plugin")}getState(e){return e[this.key]}}let E=Object.create(null);function O(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}class M{constructor(e="key"){this.key=O(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},85562:function(e,t,n){"use strict";n.d(t,{Ax:function(){return C},FC:function(){return g},GJ:function(){return M},Mn:function(){return E},Pu:function(){return m},dR:function(){return T},k9:function(){return b},nd:function(){return w},nj:function(){return A},vs:function(){return s},wx:function(){return H}});var r=n(54418);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}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 o{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&o.empty)return o.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+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,n){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;
40for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+o],c=this.ranges[l+s],d=a+u;if(e<=d){let o=u?e==a?-1:e==d?1:t:t,s=a+r+(o<0?0:c);if(n)return s;let h=e==(t<0?a:d)?null:l/3+(e-a)*65536,p=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(p|=8),new i(s,p,h)}r+=c-u}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let l=this.ranges[t+i];if(e<=s+l&&t==3*r)return!0;n+=this.ranges[t+o]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),l=o+(this.inverted?0:i),a=this.ranges[r+t],u=this.ranges[r+n];e(s,s+a,l,l+u),i+=u-a}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?o.empty:new o(e<0?[0,-e,0]:[0,0,e])}}o.empty=new o([]);class s{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new s(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,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r: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,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new s;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let l=Object.create(null);class a{getMap(){return o.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in l)throw RangeError("Duplicate use of step JSON ID "+e);return l[e]=t,t.prototype.jsonID=e,t}}class u{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new u(e,null)}static fail(e){return new u(null,e)}static fromReplace(e,t,n,i){try{return u.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.e4)return u.fail(e.message);throw e}}}function c(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(c(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return r.HY.fromArray(i)}class d extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.p2(c(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return u.fromReplace(e,this.from,this.to,o)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(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 d(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("addMark",d);class h extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}
40apply(e){let t=e.slice(this.from,this.to),n=new r.p2(c(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return u.fromReplace(e,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new h(t.pos,n.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(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 h(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("removeMark",h);class p extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return u.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return u.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}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 n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new p(this.pos,t.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(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 p(t.pos,e.markFromJSON(t.mark))}}a.jsonID("addNodeMark",p);class f extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return u.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return u.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(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 f(t.pos,e.markFromJSON(t.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?u.fail("Structure replace would overwrite content"):u.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new m(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||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;{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(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 m(t.from,t.to,r.p2.fromJSON(e,t.slice),!!t.structure)}}a.jsonID("replace",m);class g extends a{constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return u.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return u.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?u.fromReplace(e,this.from,this.to,n):u.fail("Content does not fit in gap")}getMap(){return new o([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 g(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),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new g(t.pos,n.pos,r,i,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 g(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>
400&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function v(e,t,n,i=n.contentMatch,o=!0){let s=e.doc.nodeAt(t),l=[],a=t+1;for(let t=0;t<s.childCount;t++){let u=s.child(t),c=a+u.nodeSize,d=i.matchType(u.type);if(d){i=d;for(let t=0;t<u.marks.length;t++)n.allowsMarkType(u.marks[t].type)||e.step(new h(a,c,u.marks[t]));if(o&&u.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(u.text);)i||(i=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),l.push(new m(a+e.index,a+e.index+e[0].length,i))}}else l.push(new m(a,c,r.p2.empty));a=c}if(!i.validEnd){let t=i.fillBefore(r.HY.empty,!0);e.replace(a,a,new r.p2(t,0,0))}for(let t=l.length-1;t>=0;t--)e.step(l[t])}function b(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(o==r.childCount||r.canReplace(0,o))))break}return null}function w(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;l&&e<i;e++)l=l.matchType(n.child(e).type);return l&&l.validEnd?s:null}(r,t);return o?i.map(x).concat({type:t,attrs:n}).concat(o.map(x)):null}function x(e){return{type:e,attrs:null}}function k(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let i=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function S(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function C(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),l=r&&r[t+1];l&&(s=s.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function E(e,t){let n=e.resolve(t),r=n.index();return O(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function O(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(!(n=n.matchType(s))||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}(e,t))}function M(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,o,s=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),s++,o=r.node(e).maybeChild(s)):(i=r.node(e).maybeChild(s-1),o=r.node(e+1)),i&&!i.isTextblock&&O(i,o)&&r.node(e).canReplace(s,s+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function A(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,o=r.index(t)+(n>0?1:0),s=r.node(t),l=!1;if(1==e)l=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);l=e&&s.canReplaceWith(o,o,e[0])}if(l)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function T(e,t,n=t,i=r.p2.empty){if(t==n&&!i.size)return null;let o=e.resolve(t),s=e.resolve(n);return N(o,s,i)?new m(t,n,i):new R(o,s,i).fit()}function N(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}a.jsonID("replaceAround",g);class R{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.HY.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,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let o=this.placed,s=n.depth,l=i.depth;for(;s&&l&&1==o.childCount;)o=o.firstChild.content,s--,l--;let a=new r.p2(o,s,l);return e>-1?new g(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=I(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:s,match:l}=this.frontier[o],a,u=null;if(1==t&&(i?l.matchType(i.type)||(u=l.fillBefore(r.HY.from(i),!1)):e&&s.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:o,parent:e,inject:u};
40if(2==t&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:o,parent:e,wrap:a};if(e&&l.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=I(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.p2(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=I(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new r.p2(P(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new r.p2(P(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let s=this.unplaced,l=n?n.content:s.content,a=s.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)c.push(i.child(e));d=d.matchFragment(i)}let p=l.size+e-(s.content.size-s.openEnd);for(;u<l.childCount;){let e=l.child(u),t=d.matchType(e.type);if(!t)break;(++u>1||0==a||e.content.size)&&(d=t,c.push(function e(t,n,i){if(n<=0)return t;let o=t.content;return n>1&&(o=o.replaceChild(0,e(o.firstChild,n-1,1==o.childCount?i-1:0))),n>0&&(o=t.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),t.copy(o)}(e.mark(h.allowedMarks(e.marks)),1==u?a:0,u==l.childCount?p:-1)))}let f=u==l.childCount;f||(p=-1),this.placed=j(this.placed,t,r.HY.from(c)),this.frontier[t].match=d,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=l;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.p2.empty:new r.p2(P(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new r.p2(P(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!L(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:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){r:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=L(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=L(e,n,r,t,!0);if(!i||i.childCount)continue r}return{depth:t,fit:o,move:i?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=j(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=j(this.placed,this.depth,r.HY.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.HY.empty,!0);e.childCount&&(this.placed=j(this.placed,this.frontier.length,e))}}function P(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(P(e.firstChild.content,t-1,n)))}function j(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(j(e.lastChild.content,t-1,n)))}function I(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function L(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,s)?l:null}function _(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class $ extends a{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return u.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return u.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,t.isLeaf?0:1))}getMap(){return o.empty}invert(e){return new $(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 $(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 $(t.pos,t.attr,t.value)}}a.jsonID("attr",$);class D extends a{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return u.ok(n)}getMap(){return o.empty}invert(e){return new D(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 D(t.attr,t.value)}}a.jsonID("docAttr",D);
40let z=class extends Error{};(z=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),z.prototype.constructor=z,z.prototype.name="TransformError";class H{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new s}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new z(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}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.p2.empty){let i=T(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.p2(r.HY.from(n),0,0))}delete(e,t){return this.replace(e,t,r.p2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),s=e.doc.resolve(n);if(N(o,s,i))return e.step(new m(t,n,i));let l=_(o,e.doc.resolve(n));0==l[l.length-1]&&l.pop();let a=-(o.depth+1);l.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(e)>-1?a=e:o.before(e)==t&&l.splice(1,0,-e)}let u=l.indexOf(a),c=[],d=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==i.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var h;let t=c[e],n=(h=t.type).spec.defining||h.spec.definingForContent;if(n&&!t.sameMarkup(o.node(Math.abs(a)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let a=(t+d+1)%(i.openStart+1),h=c[a];if(h)for(let t=0;t<l.length;t++){let c=l[(t+u)%l.length],d=!0;c<0&&(d=!1,c=-c);let p=o.node(c-1),f=o.index(c-1);if(p.canReplaceWith(f,f,h.type,h.marks))return e.replace(o.before(c),d?s.after(c):n,new r.p2(function e(t,n,i,o,s){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,o,r)))}if(n>o){let e=s.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}(i.content,0,i.openStart,a),a,i.openEnd))}}let p=e.steps.length;for(let r=l.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>p));r--){let e=l[r];e<0||(t=o.before(e),n=s.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return!function(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(e.doc,t,i.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(i),0,0))}(this,e,t,n),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=_(r,i);for(let t=0;t<o.length;t++){let n=o[t],s=t==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:o,depth:s}=t,l=i.before(s+1),a=o.after(s+1),u=l,c=a,d=r.HY.empty,h=0;for(let e=s,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,d=r.HY.from(i.node(e).copy(d)),h++):u--;let p=r.HY.empty,f=0;for(let e=s,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,p=r.HY.from(o.node(e).copy(p)),f++):c++;e.step(new g(u,c,l,a,new r.p2(d.append(p),h,f),d.size-h,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:o}=e.doc.type.schema,s=e.doc.resolve(t-n),l=s.node().type;if(o&&l.inlineContent){let e="pre"==l.whitespace,t=!!l.contentMatch.matchType(o);e&&!t?i=!1:!e&&t&&(i=!0)}let a=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);S(e,r.node(),r.before(),a)}l.inlineContent&&v(e,t+n-1,l,s.node().contentMatchAt(s.index()),null==i);let u=e.mapping.slice(a),c=u.map(t-n);if(e.step(new m(c,u.map(t+n,-1),r.p2.empty,!0)),!0===i){let t=e.doc.resolve(c);k(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.HY.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[e].type.create(n[e].attrs,i))}let o=t.start,s=t.end;e.step(new g(o,s,o,s,new r.p2(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){return!function(e,t,n,i,o){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{var l,a;let u,c,d="function"==typeof o?o(t):o;if(t.isTextblock&&!t.hasMarkup(i,d)&&(l=e.doc,a=e.mapping.slice(s).map(n),c=(u=l.resolve(a)).index(),u.parent.canReplaceWith(c,c+1,i))){let o=null;if(i.schema.linebreakReplacement){let e="pre"==i.whitespace,t=!!i.contentMatch.matchType(i.schema.linebreakReplacement);e&&!t?o=!1:!e&&t&&(o=!0)}!1===o&&S(e,t,n,s),v(e,e.mapping.slice(s).map(n,1),i,void 0,null===o);let l=e.mapping.slice(s),a=l.map(n,1),u=l.map(n+t.nodeSize,1);return e.step(new g(a,u,a+1,u-1,new r.p2(r.HY.from(i.create(d,null,t.marks)),0,0),1,!0)),!0===o&&k(e,t,n,s),!1}})}(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,o){let s=e.doc.nodeAt(t);if(!s)throw RangeError("No node at given position");n||(n=s.type);let l=n.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,l);if(!n.validContent(s.content))throw RangeError("Invalid content for node type "+n.name);e.step(new g(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new r.p2(r.HY.from(l),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new $(e,t,n)),this}setDocAttribute(e,t){return this.step(new D(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}
40removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.vc)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,o=[];for(;i=t.isInSet(r);)o.push(new f(e,i)),r=i.removeFromSet(r);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let o=e.doc.resolve(t),s=r.HY.empty,l=r.HY.empty;for(let e=o.depth,t=o.depth-n,a=n-1;e>t;e--,a--){s=r.HY.from(o.node(e).copy(s));let t=i&&i[a];l=r.HY.from(t?t.type.create(t.attrs,l):o.node(e).copy(l))}e.step(new m(t,t,new r.p2(s.append(l),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,o,s,l;return r=this,s=[],l=[],r.doc.nodesBetween(e,t,(r,a,u)=>{if(!r.isInline)return;let c=r.marks;if(!n.isInSet(c)&&u.type.allowsMarkType(n.type)){let u=Math.max(a,e),p=Math.min(a+r.nodeSize,t),f=n.addToSet(c);for(let e=0;e<c.length;e++)c[e].isInSet(f)||(i&&i.to==u&&i.mark.eq(c[e])?i.to=p:s.push(i=new h(u,p,c[e])));o&&o.to==u?o.to=p:l.push(o=new d(u,p,n))}}),s.forEach(e=>r.step(e)),l.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let o,s;return i=this,o=[],s=0,i.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(n instanceof r.ZU){let e=i.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],i;for(let e=0;e<o.length;e++){let t=o[e];t.step==s-1&&r.eq(o[e].style)&&(i=t)}i?(i.to=n,i.step=s):o.push({style:r,from:Math.max(l,e),to:n,step:s})}}}),o.forEach(e=>i.step(new h(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return v(this,e,t,n),this}}}}]);

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.