@demos-europe/demosplan-ui 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -2
- package/dist/demosplan-ui.umd.js +1 -1
- package/jest/setup.js +18 -0
- package/jest/shallowMountWithGlobalMocks.js +41 -0
- package/jest.config.js +47 -17
- package/package.json +4 -2
- package/src/components/DpAutocomplete/DpAutocomplete.stories.mdx +34 -0
- package/src/components/DpButtonRow/DpButtonRow.vue +4 -3
- package/src/components/DpCheckboxGroup/DpCheckboxGroup.vue +2 -2
- package/src/components/DpDataTable/DpDataTable.vue +1 -1
- package/src/components/DpDataTable/DpDataTableExtended.vue +3 -3
- package/src/components/DpDataTable/DpSelectPageItemCount.vue +1 -1
- package/src/components/DpDataTable/DpTableRow.vue +3 -3
- package/src/components/DpDetails/DpDetails.vue +1 -1
- package/src/components/DpFlyout/DpFlyout.vue +1 -1
- package/src/components/DpInlineNotification/DpInlineNotification.vue +2 -2
- package/src/components/DpLabel/DpLabel.vue +2 -2
- package/src/components/DpMultiselect/DpMultiselect.vue +1 -1
- package/src/components/DpPager/DpPager.vue +4 -4
- package/src/components/DpSearchField/DpSearchField.vue +3 -3
- package/src/components/DpTimePicker/DpTimePicker.vue +1 -1
- package/src/components/DpTreeList/DpTreeListNode.vue +1 -1
- package/src/components/core/DpAnonymizeText.vue +1 -1
- package/src/components/core/DpBulkEditHeader.vue +1 -1
- package/src/components/core/DpEditor/DpEditor.vue +6 -6
- package/src/components/core/DpSwitcher.vue +2 -2
- package/src/components/core/DpTableCardList/DpTableCardListHeader.vue +1 -1
- package/src/components/core/DpUpload/DpUploadedFile.vue +1 -1
- package/src/components/core/index.js +0 -4
- package/src/components/core/notify/DpNotifyMessage.vue +2 -2
- package/src/components/index.js +0 -4
- package/src/index.js +2 -4
- package/src/lib/DpApi.js +16 -1
- package/src/lib/index.js +2 -1
- package/tests/DataTableSearch.spec.js +33 -0
- package/tests/DpContextualHelp.spec.js +23 -0
- package/tests/DpLabel.spec.js +28 -0
- package/tests/DpNotifyMessage.spec.js +131 -0
- package/tests/DpTreeListCheckbox.spec.js +73 -0
- package/tests/DpUpload/DpUploadFiles.spec.js +76 -0
- package/tests/Modal.spec.js +31 -0
- package/tests/Obscure.spec.js +38 -0
- package/tests/Tiptap/__snapshots__/handleWordPaste.spec.js.snap +7 -0
- package/tests/Tiptap/handleWordPaste.spec.js +8 -0
- package/tests/__mocks__/wordContentSnippets.mock.js +5 -0
- package/tests/__snapshots__/DpContextualHelp.spec.js.snap +3 -0
- package/tests/__snapshots__/DpNotifyMessage.spec.js.snap +23 -0
- package/tests/form/DpCheckbox.spec.js +46 -0
- package/tests/form/DpInput.spec.js +46 -0
- package/tests/form/DpSelect.spec.js +67 -0
- package/tests/form/shared/Attributes.js +56 -0
- package/tests/form/shared/Label.js +20 -0
- package/tests/prefixClass.spec.js +22 -0
- package/{src/tests → tests}/utils/date.test.js +2 -2
- package/{src/tests → tests}/utils/debounce.test.js +2 -2
- package/{src/tests → tests}/utils/deepMerge.test.js +1 -1
- package/{src/tests → tests}/utils/formatBytes.test.js +2 -2
- package/{src/tests → tests}/utils/hasOwnProp.test.js +1 -1
- package/{src/tests → tests}/utils/hasPermission.test.js +1 -1
- package/{src/tests → tests}/utils/sortAlphabetically.test.js +5 -5
- package/{src/tests → tests}/utils/uniqueArrayByObjectKey.test.js +2 -2
- package/tokens/scss/_boxShadow.scss +1 -1
- package/tokens/scss/_color.brand.scss +1 -1
- package/tokens/scss/_color.data.scss +1 -1
- package/tokens/scss/_color.palette.scss +1 -1
- package/tokens/scss/_color.ui.scss +1 -1
- package/tokens/scss/_fontSize.scss +1 -1
- package/tokens/scss/_rounded.scss +1 -1
- package/tokens/scss/_space.scss +1 -1
- package/src/components/core/DpChangeStateAtDate.stories.mdx +0 -18
- package/src/components/core/DpChangeStateAtDate.vue +0 -195
- package/src/components/core/DpCopyPasteButton.vue +0 -29
package/dist/demosplan-ui.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see demosplan-ui.umd.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.__demos_europe_demosplan_ui=t():e.__demos_europe_demosplan_ui=t()}(self,(()=>(()=>{var e,t,n,r,i={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(4372),s=n(5327),a=n(4097),l=n(4109),c=n(7985),d=n(7874),u=n(2648),p=n(644),h=n(205);e.exports=function(e){return new Promise((function(t,n){var f,m=e.data,g=e.headers,y=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(w+":"+x)}var S=a(e.baseURL,e.url);function C(){if(b){var r="getAllResponseHeaders"in b?l(b.getAllResponseHeaders()):null,o={data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};i((function(e){t(e),v()}),(function(e){n(e),v()}),o),b=null}}if(b.open(e.method.toUpperCase(),s(S,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=C:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(C)},b.onabort=function(){b&&(n(new u("Request aborted",u.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new u(t,r.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var k=(e.withCredentials||c(S))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;k&&(g[e.xsrfHeaderName]=k)}"setRequestHeader"in b&&r.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),y&&"json"!==y&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){b&&(n(!e||e&&e.type?new p:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),m||(m=null);var _=h(S);_&&-1===["http","https","file"].indexOf(_)?n(new u("Unsupported protocol "+_+":",u.ERR_BAD_REQUEST,e)):b.send(m)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),s=n(7185),a=function e(t){var n=new o(t),a=i(o.prototype.request,n);return r.extend(a,o.prototype,n),r.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(5546));a.Axios=o,a.CanceledError=n(644),a.CancelToken=n(4972),a.isCancel=n(6502),a.VERSION=n(7288).version,a.toFormData=n(7675),a.AxiosError=n(2648),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=n(8713),a.isAxiosError=n(6268),e.exports=a,e.exports.default=a},4972:(e,t,n)=>{"use strict";var r=n(644);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},644:(e,t,n)=>{"use strict";var r=n(2648);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(4867).inherits(i,r,{__CANCEL__:!0}),e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),s=n(3572),a=n(7185),l=n(4097),c=n(4875),d=c.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var u=[s,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(l),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var p=t;r.length;){var h=r.shift(),f=r.shift();try{p=h(p)}catch(e){f(e);break}}try{o=s(p)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},u.prototype.getUri=function(e){e=a(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(a(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}u.prototype[e]=t(),u.prototype[e+"Form"]=t(!0)})),e.exports=u},2648:(e,t,n)=>{"use strict";var r=n(4867);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(i,s),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,n,s,a,l){var c=Object.create(o);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),i.call(c,e.message,t,n,s,a),c.name=e.name,l&&Object.assign(c,l),c},e.exports=i},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),s=n(5546),a=n(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(2648);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5546);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},5546:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),o=n(2648),s=n(7874),a=n(7675),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d,u={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(d=n(5448)),d),transformRequest:[function(e,t){if(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,o=r.isObject(e),s=t&&t["Content-Type"];if((n=r.isFileList(e))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,l&&new l)}return o||"application/json"===s?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(l)})),e.exports=u},7874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},1623:e=>{e.exports=null},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},205:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,s){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+s);n.push(o),r.forEach(o,(function(n,o){if(!r.isUndefined(n)){var a,l=s?s+"."+o:o;if(n&&!s&&"object"==typeof n)if(r.endsWith(o,"{}"))n=JSON.stringify(n);else if(r.endsWith(o,"[]")&&(a=r.toArray(n)))return void a.forEach((function(e){!r.isUndefined(e)&&t.append(l,i(e))}));e(n,l)}})),n.pop()}else t.append(s,i(o))}(e),t}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i=n(2648),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new i(o(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var s=r[o],a=t[s];if(a){var l=e[s],c=void 0===l||a(l,s,e);if(!0!==c)throw new i("option "+s+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+s,i.ERR_BAD_OPTION)}},validators:o}},4867:(e,t,n)=>{"use strict";var r,i=n(1849),o=Object.prototype.toString,s=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var d=a("ArrayBuffer");function u(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),f=a("File"),m=a("Blob"),g=a("FileList");function y(e){return"[object Function]"===o.call(e)}var v=a("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var w,x=(w="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return w&&e instanceof w});e.exports={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||y(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:p,isUndefined:c,isDate:h,isFile:f,isBlob:m,isFunction:y,isStream:function(e){return u(e)&&y(e.pipe)},isURLSearchParams:v,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,s={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)s[o=r[i]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:x,isFileList:g}},1924:(e,t,n)=>{"use strict";var r=n(210),i=n(5559),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),i=n(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(s,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(r,s,arguments);return l&&c&&l(t,"length").configurable&&c(t,"length",{value:1+d(0,e.length-(arguments.length-1))}),t};var u=function(){return a(r,o,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u},285:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},a=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},u={A:[i,function(e){this.afternoon=d(e,!1)}],a:[i,function(e){this.afternoon=d(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:l,ZZ:l};function p(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,l=0;l<a;l+=1){var c=s[l],d=u[c],p=d&&d[0],h=d&&d[1];s[l]=h?{regex:p,parser:h}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,l=i.parser,c=e.slice(r),d=o.exec(c)[0];l.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var l=!0===s[2],c=!0===s[3],d=l||c,u=s[2];c&&(u=s[2]),o=this.$locale(),!l&&u&&(o=n.Ls[u]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=p(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,l=r.minutes,c=r.seconds,d=r.milliseconds,u=r.zone,h=new Date,f=s||(i||o?1:h.getDate()),m=i||h.getFullYear(),g=0;i&&!o||(g=o>0?o-1:h.getMonth());var y=a||0,v=l||0,b=c||0,w=d||0;return u?new Date(Date.UTC(m,g,f,y,v,b,w+60*u.offset*1e3)):n?new Date(Date.UTC(m,g,f,y,v,b,w)):new Date(m,g,f,y,v,b,w)}catch(e){return new Date("")}}(t,a,r),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var h=a.length,f=1;f<=h;f+=1){s[1]=a[f-1];var m=n.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}f===h&&(this.$d=new Date(""))}else i.call(this,e)}}}()},1102:(e,t,n)=>{"use strict";var r=n(6291),i=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=i,i.eval=o(EvalError),i.range=o(RangeError),i.reference=o(ReferenceError),i.syntax=o(SyntaxError),i.type=o(TypeError),i.uri=o(URIError),i.create=o},6291:e=>{!function(){var t;function n(e){for(var t,n,r,i,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",d=!1,u=!1,p=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],d)switch(d=!1,"."==t?(u=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(u=!0,t=e[a+=2]):u=!0,i=h(),t){case"b":c+=parseInt(p(),10).toString(2);break;case"c":c+="string"==typeof(n=p())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(p(),10);break;case"f":r=String(parseFloat(p()).toFixed(i||6)),c+=u?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(p());break;case"o":c+="0"+parseInt(p(),10).toString(8);break;case"s":c+=p();break;case"x":c+="0x"+parseInt(p(),10).toString(16);break;case"X":c+="0x"+parseInt(p(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?d=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},7648:e=>{"use strict";var t=Array.prototype.slice,n=Object.prototype.toString;e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==n.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var i,o=t.call(arguments,1),s=Math.max(0,r.length-o.length),a=[],l=0;l<s;l++)a.push("$"+l);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var n=r.apply(this,o.concat(t.call(arguments)));return Object(n)===n?n:this}return r.apply(e,o.concat(t.call(arguments)))})),r.prototype){var c=function(){};c.prototype=r.prototype,i.prototype=new c,c.prototype=null}return i}},8612:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new s},d=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,u=n(1405)(),p=Object.getPrototypeOf||function(e){return e.__proto__},h={},f="undefined"==typeof Uint8Array?r:p(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":u?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?p(p([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?p((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?p((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?p(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":d,"%TypedArray%":f,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=p(i.prototype))}return m[t]=n,n},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(8612),b=n(7642),w=v.call(Function.call,Array.prototype.concat),x=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),C=v.call(Function.call,String.prototype.slice),k=v.call(Function.call,RegExp.prototype.exec),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,E=function(e,t){var n,r=e;if(b(y,r)&&(r="%"+(n=y[r])[0]+"%"),b(m,r)){var o=m[r];if(o===h&&(o=g(r)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=C(e,0,1),n=C(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return S(e,_,(function(e,t,n,i){r[r.length]=n?S(i,A,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=E("%"+r+"%",t),a=o.name,c=o.value,d=!1,u=o.alias;u&&(r=u[0],x(n,w([0,1],u)));for(var p=1,h=!0;p<n.length;p+=1){var f=n[p],g=C(f,0,1),y=C(f,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==f&&h||(d=!0),b(m,a="%"+(r+="."+f)+"%"))c=m[a];else if(null!=c){if(!(f in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&p+1>=n.length){var v=l(c,f);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[f]}else h=b(c,f),c=c[f];h&&!d&&(m[a]=c)}}return c}},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7642:(e,t,n)=>{"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},7802:e=>{function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];"object"!=typeof r||Object.isFrozen(r)||t(r)})),e}var n=t,r=t;n.default=r;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const a=e=>!!e.kind;class l{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!a(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){a(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{c._collapse(e)})))}}class d extends c{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function u(e){return e?"string"==typeof e?e:e.source:null}const p=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,h="[a-zA-Z]\\w*",f="[a-zA-Z_]\\w*",m="\\b\\d+(\\.\\d+)?",g="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",y="\\b(0b[01]+)",v={begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[v]},w={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[v]},x={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},S=function(e,t,n={}){const r=s({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(x),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},C=S("//","$"),k=S("/\\*","\\*/"),_=S("#","$"),A={className:"number",begin:m,relevance:0},E={className:"number",begin:g,relevance:0},O={className:"number",begin:y,relevance:0},T={className:"number",begin:m+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},D={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]}]},M={className:"title",begin:h,relevance:0},N={className:"title",begin:f,relevance:0},I={begin:"\\.\\s*"+f,relevance:0};var P=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:h,UNDERSCORE_IDENT_RE:f,NUMBER_RE:m,C_NUMBER_RE:g,BINARY_NUMBER_RE:y,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>u(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),s({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:v,APOS_STRING_MODE:b,QUOTE_STRING_MODE:w,PHRASAL_WORDS_MODE:x,COMMENT:S,C_LINE_COMMENT_MODE:C,C_BLOCK_COMMENT_MODE:k,HASH_COMMENT_MODE:_,NUMBER_MODE:A,C_NUMBER_MODE:E,BINARY_NUMBER_MODE:O,CSS_NUMBER_MODE:T,REGEXP_MODE:D,TITLE_MODE:M,UNDERSCORE_TITLE_MODE:N,METHOD_GUARD:I,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function $(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function R(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=$,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function q(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>u(e))).join("|")+")"}(...e.illegal))}function B(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const L=["of","and","for","in","not","or","if","then","parent","list","value"],V="keyword";function j(e,t,n=V){const r={};return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,j(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,z(n[0],n[1])]}))}}function z(e,t){return t?Number(t):function(e){return L.includes(e.toLowerCase())}(e)?0:1}function H(e,{plugins:t}){function n(t,n){return new RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=u(e),i="";for(;r.length>0;){const e=p.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=s(e.classNameAliases||{}),function t(r,o){const a=r;if(r.isCompiled)return a;[B].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[R,q,F].forEach((e=>e(r,o))),r.isCompiled=!0;let l=null;if("object"==typeof r.keywords&&(l=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=j(r.keywords,e.case_insensitive)),r.lexemes&&l)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l=l||r.lexemes||/\w+/,a.keywordPatternRe=n(l,!0),o&&(r.begin||(r.begin=/\B|\b/),a.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(a.endRe=n(r.end)),a.terminatorEnd=u(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(a.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return s(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:U(e)?s(e,{starts:e.starts?s(e.starts):null}):Object.isFrozen(e)?s(e):e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,a)})),r.starts&&t(r.starts,o),a.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function U(e){return!!e&&(e.endsWithParent||U(e.starts))}function W(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,o(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const Z={"after:highlightElement":({el:e,result:t,text:n})=>{const r=J(e);if(!r.length)return;const i=document.createElement("div");i.innerHTML=t.value,t.value=function(e,t,n){let r=0,i="";const s=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function l(e){i+="<"+K(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+o(e.value)+'"'})).join("")+">"}function c(e){i+="</"+K(e)+">"}function d(e){("start"===e.event?l:c)(e.node)}for(;e.length||t.length;){let t=a();if(i+=o(n.substring(r,t[0].offset)),r=t[0].offset,t===e){s.reverse().forEach(c);do{d(t.splice(0,1)[0]),t=a()}while(t===e&&t.length&&t[0].offset===r);s.reverse().forEach(l)}else"start"===t[0].event?s.push(t[0].node):s.pop(),d(t.splice(0,1)[0])}return i+o(n.substr(r))}(r,J(i),n)}};function K(e){return e.nodeName.toLowerCase()}function J(e){const t=[];return function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),K(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}const G={},Y=e=>{console.error(e)},X=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Q=(e,t)=>{G[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),G[`${e}/${t}`]=!0)},ee=o,te=s,ne=Symbol("nomatch");var re=function(e){const t=Object.create(null),r=Object.create(null),o=[];let s=!0;const a=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:d};function p(e){return u.noHighlightRe.test(e)}function h(e,t,n,r){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language,r=void 0):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t);const s={code:i,language:o};A("before:highlight",s);const a=s.result?s.result:f(s.language,s.code,n,r);return a.code=s.code,A("after:highlight",a),a}function f(e,n,r,a){function c(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){null!=k.subLanguage?function(){if(""===E)return;let e=null;if("string"==typeof k.subLanguage){if(!t[k.subLanguage])return void A.addText(E);e=f(k.subLanguage,E,!0,_[k.subLanguage]),_[k.subLanguage]=e.top}else e=m(E,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(O+=e.relevance),A.addSublanguage(e.emitter,e.language)}():function(){if(!k.keywords)return void A.addText(E);let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(E),n="";for(;t;){n+=E.substring(e,t.index);const r=c(k,t);if(r){const[e,i]=r;if(A.addText(n),n="",O+=i,e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;A.addKeyword(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(E)}n+=E.substr(e),A.addText(n)}(),E=""}function p(e){return e.className&&A.openNode(w.classNameAliases[e.className]||e.className),k=Object.create(e,{parent:{value:k}}),k}function h(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return h(e.parent,t,n)}function g(e){return 0===k.matcher.regexIndex?(E+=e[0],1):(M=!0,0)}function y(e){const t=e[0],r=n.substr(e.index),i=h(k,e,r);if(!i)return ne;const o=k;o.skip?E+=t:(o.returnEnd||o.excludeEnd||(E+=t),d(),o.excludeEnd&&(E=t));do{k.className&&A.closeNode(),k.skip||k.subLanguage||(O+=k.relevance),k=k.parent}while(k!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),p(i.starts)),o.returnEnd?0:t.length}let v={};function b(t,o){const a=o&&o[0];if(E+=t,null==a)return d(),0;if("begin"===v.type&&"end"===o.type&&v.index===o.index&&""===a){if(E+=n.slice(o.index,o.index+1),!s){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new i(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return g(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?E+=t:(n.excludeBegin&&(E+=t),d(),n.returnBegin||n.excludeBegin||(E=t)),p(n),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(k.className||"<unnamed>")+'"');throw e.mode=k,e}if("end"===o.type){const e=y(o);if(e!==ne)return e}if("illegal"===o.type&&""===a)return 1;if(D>1e5&&D>3*o.index)throw new Error("potential infinite loop, way more iterations than matches");return E+=a,a.length}const w=C(e);if(!w)throw Y(l.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=H(w,{plugins:o});let S="",k=a||x;const _={},A=new u.__emitter(u);!function(){const e=[];for(let t=k;t!==w;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>A.openNode(e)))}();let E="",O=0,T=0,D=0,M=!1;try{for(k.matcher.considerAll();;){D++,M?M=!1:k.matcher.considerAll(),k.matcher.lastIndex=T;const e=k.matcher.exec(n);if(!e)break;const t=b(n.substring(T,e.index),e);T=e.index+t}return b(n.substr(T)),A.closeAllNodes(),A.finalize(),S=A.toHTML(),{relevance:Math.floor(O),value:S,language:e,illegal:!1,emitter:A,top:k}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(T-100,T+100),mode:t.mode},sofar:S,relevance:0,value:ee(n),emitter:A};if(s)return{illegal:!1,relevance:0,value:ee(n),emitter:A,language:e,top:k,errorRaised:t};throw t}}function m(e,n){n=n||u.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new u.__emitter(u),value:ee(e),illegal:!1,top:c};return t.emitter.addText(e),t}(e),i=n.filter(C).filter(_).map((t=>f(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(C(e.language).supersetOf===t.language)return 1;if(C(t.language).supersetOf===e.language)return-1}return 0})),[s,a]=o,l=s;return l.second_best=a,l}const g={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"<br>"))}},y=/^(<[^>]+>|\t)+/gm,v={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(y,(e=>e.replace(/\t/g,u.tabReplace))))}};function b(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=C(n[1]);return t||(X(l.replace("{}",n[1])),X("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>p(e)||C(e)))}(e);if(p(n))return;A("before:highlightElement",{el:e,language:n}),t=e;const i=t.textContent,o=n?h(i,{language:n,ignoreIllegals:!0}):m(i);A("after:highlightElement",{el:e,result:o,text:i}),e.innerHTML=o.value,function(e,t,n){const i=t?r[t]:n;e.classList.add("hljs"),i&&e.classList.add(i)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}const w=()=>{w.called||(w.called=!0,Q("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(b))};let x=!1;function S(){"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(b):x=!0}function C(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]}function k(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function _(e){const t=C(e);return t&&!t.disableAutodetect}function A(e,t){const n=e;o.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){x&&S()}),!1),Object.assign(e,{highlight:h,highlightAuto:m,highlightAll:S,fixMarkup:function(e){return Q("10.2.0","fixMarkup will be removed entirely in v11.0"),Q("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,u.tabReplace||u.useBR?t.replace(a,(e=>"\n"===e?u.useBR?"<br>":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e)):t;var t},highlightElement:b,highlightBlock:function(e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),b(e)},configure:function(e){e.useBR&&(Q("10.3.0","'useBR' will be removed entirely in v11.0"),Q("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=te(u,e)},initHighlighting:w,initHighlightingOnLoad:function(){Q("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),x=!0},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(Y("Language definition for '{}' could not be registered.".replace("{}",n)),!s)throw e;Y(e),i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&k(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(t)},getLanguage:C,registerAliases:k,requireLanguage:function(e){Q("10.4.0","requireLanguage will be removed entirely in v11."),Q("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=C(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:_,inherit:te,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},vuePlugin:W(e).VuePlugin}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString="10.7.3";for(const e in P)"object"==typeof P[e]&&n(P[e]);return Object.assign(e,P),e.addPlugin(g),e.addPlugin(Z),e.addPlugin(v),e}({});e.exports=re},6470:(e,t,n)=>{"use strict";n(7802),n(1102);r.prototype.addText=function(e){var t,n,r=this.stack;""!==e&&((n=(t=r[r.length-1]).children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e}))},r.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},r.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],i=e.rootNode.children,o=t?{type:"element",tagName:"span",properties:{className:[t]},children:i}:i;r.children=r.children.concat(o)},r.prototype.openNode=function(e){var t=this.stack,n={type:"element",tagName:"span",properties:{className:[this.options.classPrefix+e]},children:[]};t[t.length-1].children.push(n),t.push(n)},r.prototype.closeNode=function(){this.stack.pop()},r.prototype.closeAllNodes=i,r.prototype.finalize=i,r.prototype.toHTML=function(){return""};function r(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function i(){}},631:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&l&&"function"==typeof l.get?l.get:null,d=a&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,C=Array.prototype.concat,k=Array.prototype.join,_=Array.prototype.slice,A=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function P(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var i=String(r),o=v.call(t,i.length+1);return b.call(i,n,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var $=n(4654),R=$.custom,q=j(R)?R:null;function B(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return b.call(String(e),/"/g,""")}function L(e){return!("[object Array]"!==U(e)||M&&"object"==typeof e&&M in e)}function V(e){return!("[object RegExp]"!==U(e)||M&&"object"==typeof e&&M in e)}function j(e){if(D)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,i){var a=n||{};if(H(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!H(a,"customInspect")||a.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Z(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?P(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return m?P(t,S):S}var A=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=A&&A>0&&"object"==typeof t)return L(t)?"[Array]":"[Object]";var O,R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(a,r);if(void 0===i)i=[];else if(W(i,t)>=0)return"[Circular]";function z(t,n,o){if(n&&(i=_.call(i)).push(n),o){var s={depth:a.depth};return H(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,i)}return e(t,a,r+1,i)}if("function"==typeof t&&!V(t)){var K=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Q(t,z);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+k.call(ee,", ")+" }":"")}if(j(t)){var te=D?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||D?te:J(te)}if((O=t)&&"object"==typeof O&&("undefined"!=typeof HTMLElement&&O instanceof HTMLElement||"string"==typeof O.nodeName&&"function"==typeof O.getAttribute)){for(var ne="<"+x.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+B(F(re[ie].value),"double",a);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+x.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var oe=Q(t,z);return R&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(oe)?"["+X(oe,R)+"]":"[ "+k.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==U(e)||M&&"object"==typeof e&&M in e)}(t)){var se=Q(t,z);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(se,", ")+" }":"{ ["+String(t)+"] "+k.call(C.call("[cause]: "+z(t.cause),se),", ")+" }"}if("object"==typeof t&&l){if(q&&"function"==typeof t[q]&&$)return $(t,{depth:A-r});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s.call(t,(function(e,n){ae.push(z(n,t,!0)+" => "+z(e,t))})),Y("Map",o.call(t),ae,R)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return d.call(t,(function(e){le.push(z(e,t))})),Y("Set",c.call(t),le,R)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return G("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return G("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return G("WeakRef");if(function(e){return!("[object Number]"!==U(e)||M&&"object"==typeof e&&M in e)}(t))return J(z(Number(t)));if(function(e){if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}(t))return J(z(E.call(t)));if(function(e){return!("[object Boolean]"!==U(e)||M&&"object"==typeof e&&M in e)}(t))return J(f.call(t));if(function(e){return!("[object String]"!==U(e)||M&&"object"==typeof e&&M in e)}(t))return J(z(String(t)));if(!function(e){return!("[object Date]"!==U(e)||M&&"object"==typeof e&&M in e)}(t)&&!V(t)){var ce=Q(t,z),de=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",pe=!de&&M&&Object(t)===t&&M in t?v.call(U(t),8,-1):ue?"Object":"",he=(de||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||ue?"["+k.call(C.call([],pe||[],ue||[]),": ")+"] ":"");return 0===ce.length?he+"{}":R?he+"{"+X(ce,R)+"}":he+"{ "+k.call(ce,", ")+" }"}return String(t)};var z=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return z.call(e,t)}function U(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Z(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Z(v.call(e,0,t.maxStringLength),t)+r}return B(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Y(e,t,n,r){return e+" ("+t+") {"+(r?X(n,r):k.call(n,", "))+"}"}function X(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function Q(e,t){var n=L(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=H(e,i)?t(e[i],e):""}var o,s="function"==typeof O?O(e):[];if(D){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in e)H(e,l)&&(n&&String(Number(l))===l&&l<e.length||D&&o["$"+l]instanceof Symbol||(S.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof O)for(var c=0;c<s.length;c++)N.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}},5798:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},129:(e,t,n)=>{"use strict";var r=n(8261),i=n(5235),o=n(5798);e.exports={formats:o,parse:i,stringify:r}},5235:(e,t,n)=>{"use strict";var r=n(2769),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,d=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;d.push(c)}for(var u=0;n.depth>0&&null!==(a=s.exec(o))&&u<n.depth;){if(u+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(a[1])}return a&&d.push("["+o.slice(a.index)+"]"),function(e,t,n,r){for(var i=r?t:l(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,d=parseInt(c,10);n.parseArrays||""!==c?!isNaN(d)&&a!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[])[d]=i:"__proto__"!==c&&(s[c]=i):s={0:i}}i=s}return i}(d,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var d="string"==typeof e?function(e,t){var n,c={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,u),h=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n<p.length;++n)0===p[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[n]?f="utf-8":"utf8=%26%2310003%3B"===p[n]&&(f="iso-8859-1"),h=n,n=p.length);for(n=0;n<p.length;++n)if(n!==h){var m,g,y=p[n],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(m=t.decoder(y,s.decoder,f,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(y.slice(0,b),s.decoder,f,"key"),g=r.maybeMap(l(y.slice(b+1),t),(function(e){return t.decoder(e,s.decoder,f,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=a(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=r.combine(c[m],g):c[m]=g}return c}(e,n):e,u=n.plainObjects?Object.create(null):{},p=Object.keys(d),h=0;h<p.length;++h){var f=p[h],m=c(f,d[f],n,"string"==typeof e);u=r.merge(u,m,n)}return!0===n.allowSparse?u:r.compact(u)}},8261:(e,t,n)=>{"use strict";var r=n(7478),i=n(2769),o=n(5798),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,d=function(e,t){c.apply(e,l(t)?t:[t])},u=Date.prototype.toISOString,p=o.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,o,s,a,c,u,p,m,g,y,v,b,w,x,S){for(var C,k=t,_=S,A=0,E=!1;void 0!==(_=_.get(f))&&!E;){var O=_.get(t);if(A+=1,void 0!==O){if(O===A)throw new RangeError("Cyclic object value");E=!0}void 0===_.get(f)&&(A=0)}if("function"==typeof p?k=p(n,k):k instanceof Date?k=y(k):"comma"===o&&l(k)&&(k=i.maybeMap(k,(function(e){return e instanceof Date?y(e):e}))),null===k){if(a)return u&&!w?u(n,h.encoder,x,"key",v):n;k=""}if("string"==typeof(C=k)||"number"==typeof C||"boolean"==typeof C||"symbol"==typeof C||"bigint"==typeof C||i.isBuffer(k))return u?[b(w?n:u(n,h.encoder,x,"key",v))+"="+b(u(k,h.encoder,x,"value",v))]:[b(n)+"="+b(String(k))];var T,D=[];if(void 0===k)return D;if("comma"===o&&l(k))w&&u&&(k=i.maybeMap(k,u)),T=[{value:k.length>0?k.join(",")||null:void 0}];else if(l(p))T=p;else{var M=Object.keys(k);T=m?M.sort(m):M}for(var N=s&&l(k)&&1===k.length?n+"[]":n,I=0;I<T.length;++I){var P=T[I],$="object"==typeof P&&void 0!==P.value?P.value:k[P];if(!c||null!==$){var R=l(k)?"function"==typeof o?o(N,P):N:N+(g?"."+P:"["+P+"]");S.set(t,A);var q=r();q.set(f,S),d(D,e($,R,o,s,a,c,"comma"===o&&w&&l(k)?null:u,p,m,g,y,v,b,w,x,q))}}return D};e.exports=function(e,t){var n,i=e,c=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!s.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=h.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):l(c.filter)&&(n=c.filter);var u,p=[];if("object"!=typeof i||null===i)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[u];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var y=r(),v=0;v<n.length;++v){var b=n[v];c.skipNulls&&null===i[b]||d(p,m(i[b],b,f,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,y))}var w=p.join(c.delimiter),x=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),w.length>0?x+w:""}},2769:(e,t,n)=>{"use strict";var r=n(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],d=s[c];"object"==typeof d&&null!==d&&-1===n.indexOf(d)&&(t.push({obj:s,prop:c}),n.push(d))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<a.length;++c){var d=a.charCodeAt(c);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===r.RFC1738&&(40===d||41===d)?l+=a.charAt(c):d<128?l+=s[d]:d<2048?l+=s[192|d>>6]+s[128|63&d]:d<55296||d>=57344?l+=s[224|d>>12]+s[128|d>>6&63]+s[128|63&d]:(c+=1,d=65536+((1023&d)<<10|1023&a.charCodeAt(c)),l+=s[240|d>>18]+s[128|d>>12&63]+s[128|d>>6&63]+s[128|63&d])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return o(t)&&!o(n)&&(s=a(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var s=t[o];s&&"object"==typeof s&&n&&"object"==typeof n?t[o]=e(s,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var s=n[o];return i.call(t,o)?t[o]=e(t[o],s,r):t[o]=s,t}),s)}}},7478:(e,t,n)=>{"use strict";var r=n(210),i=n(1924),o=n(631),s=r("%TypeError%"),a=r("%WeakMap%",!0),l=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),d=i("WeakMap.prototype.set",!0),u=i("WeakMap.prototype.has",!0),p=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),f=i("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+o(e))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return p(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(l){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,i){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),d(e,r,i)):l?(t||(t=new l),h(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},2649:(e,t)=>{function n(e){return"function"==typeof e.value||(console.warn("[Vue-click-outside:] provided expression",e.expression,"is not a function."),!1)}function r(e){return void 0!==e.componentInstance&&e.componentInstance.$isServer}e.exports={bind:function(e,t,i){if(!n(t))return;function o(t){if(i.context){var n=t.path||t.composedPath&&t.composedPath();n&&n.length>0&&n.unshift(t.target),e.contains(t.target)||function(e,t){if(!e||!t)return!1;for(var n=0,r=t.length;n<r;n++)try{if(e.contains(t[n]))return!0;if(t[n].contains(e))return!1}catch(e){return!1}return!1}(i.context.popupItem,n)||e.__vueClickOutside__.callback(t)}}e.__vueClickOutside__={handler:o,callback:t.value};const s="ontouchstart"in document.documentElement?"touchstart":"click";!r(i)&&document.addEventListener(s,o)},update:function(e,t){n(t)&&(e.__vueClickOutside__.callback=t.value)},unbind:function(e,t,n){const i="ontouchstart"in document.documentElement?"touchstart":"click";!r(n)&&e.__vueClickOutside__&&document.removeEventListener(i,e.__vueClickOutside__.handler),delete e.__vueClickOutside__}}},3275:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2333),i=n(7789),o=n(2771);const s={name:"DpLabel",directives:{cleanhtml:r.J7,tooltip:r.u},mixins:[o.gH],props:{bold:{type:Boolean,required:!1,default:!0},for:{type:String,required:!0},hint:{type:[String,Array],required:!1,default:()=>[]},text:{type:String,required:!0},tooltip:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1}},computed:{ariaLabel:()=>i.de.contextualHelp,hints(){return this.hint?this.wrapItemIntoArray(this.hint):[]},labelFor(){return this.for}},methods:{wrapItemIntoArray:e=>Array.isArray(e)?e:[e]}},a=(0,n(1900).Z)(s,(function(){var e=this,t=e._self._c;return t("label",{class:e.prefixClass(["o-form__label flex",e.bold?"weight--bold":"weight--normal",e.hints.length>0?"has-hint":""]),attrs:{for:e.labelFor}},[t("span",[t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.text,expression:"text"}]}),e.required?t("span",[e._v("*")]):e._e(),e._v(" "),e.hints.length>0?t("span",{class:e.prefixClass("display--block font-size-small weight--normal")},e._l(e.hints,(function(n,r){return t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:n,expression:"h"}],key:r,class:e.prefixClass(["display--inline-block"])})})),0):e._e()]),e._v(" "),""!==e.tooltip?t("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.tooltip,expression:"tooltip"}],class:e.prefixClass("fa fa-question-circle u-mt-0_125 ml-auto"),attrs:{"aria-label":e.ariaLabel}}):e._e()])}),[],!1,null,null,null).exports},1900:(e,t,n)=>{"use strict";function r(e,t,n,r,i,o,s,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}n.d(t,{Z:()=>r})},6781:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e){e.exports=JSON.parse('{"componentClass":"c-sliding-pagination","list":"c-sliding-pagination__list","element":"c-sliding-pagination__list-element","elementDisabled":"c-sliding-pagination__list-element--disabled","elementActive":"c-sliding-pagination__list-element--active","page":"c-sliding-pagination__page"}')},function(e,t,n){"use strict";n.r(t),n.d(t,"range",(function(){return o}));var r={name:"SlidingPaginationDefaultPage",props:{ariaPageLabel:{type:String,required:!0},isCurrent:{type:Boolean,required:!0},page:{type:Number,required:!0},pageClass:{type:String,required:!0}},computed:{pageClasses:function(){var e=this.pageClass;return this.isCurrent&&(e+=" c-sliding-pagination__page--current"),e}},methods:{goToPage:function(e){e.preventDefault(),e.stopPropagation(),this.$emit("page-click",this.page)}},render:function(e){return e("a",{class:this.pageClasses,attrs:{href:"#","aria-label":this.ariaPageLabel},on:{click:this.goToPage}},this.page)}},i=n(0);function o(e,t){var n=[];if("number"!=typeof e||"number"!=typeof t)return n;if(e>t){var r=e;e=t,t=r}for(var i=e;i<=t;i++)n.push(i);return n}var s=function(e,t,n,r,i,o,s,a){var l,c="function"==typeof e?e.options:e;if(l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}({name:"SlidingPagination",props:{ariaPaginationLabel:{type:String,required:!1,default:"Pagination Navigation"},ariaGotoPageLabel:{type:String,required:!1,default:"Go to page %page% of %total%"},ariaPreviousPageLabel:{type:String,required:!1,default:"Go to previous page"},ariaNextPageLabel:{type:String,required:!1,default:"Go to next page"},ariaCurrentPageLabel:{type:String,required:!1,default:"Page %page% of %total%, current page"},classMap:{type:Object,required:!1,default:function(){return i}},current:{required:!0,type:Number},total:{required:!0,type:Number},slidingEndingSize:{required:!1,type:Number,default:2},slidingWindowSize:{required:!1,type:Number,default:3},nonSlidingSize:{required:!1,type:Number,default:9},pageComponent:{required:!1,type:Object,default:function(){return r}}},components:{SlidingPaginationDefaultPage:r},computed:{isSliding:function(){return this.total>this.nonSlidingSize},hasBeginningGap:function(){return!!this.isSliding&&this.lastBeginningPage+1!==this.firstWindowPage},hasEndingGap:function(){return!!this.isSliding&&this.lastWindowPage+1!==this.firstEndingPage},beginningPages:function(){return o(1,this.isSliding?this.slidingEndingSize:this.total)},lastBeginningPage:function(){return this.beginningPages[this.beginningPages.length-1]},endingPages:function(){return this.isSliding?o(this.total-this.slidingEndingSize+1,this.total):[]},firstEndingPage:function(){return this.endingPages[0]},slidingWindowHalf:function(){var e=this.slidingWindowSize/2;return this.slidingWindowSize%2==1&&(e-=.5),e},slidingWindowPages:function(){if(!this.isSliding)return[];var e=this.lastBeginningPage+this.slidingWindowHalf,t=this.firstEndingPage-this.slidingWindowHalf;if(this.current<=e)return o(this.lastBeginningPage+1,this.lastBeginningPage+this.slidingWindowSize);if(this.current>e&&this.current<t){var n=this.slidingWindowHalf;return this.slidingWindowSize%2==0&&(n/=2),o(-this.slidingWindowHalf+this.current,n+this.current)}return o(this.firstEndingPage-this.slidingWindowSize,this.firstEndingPage-1)},firstWindowPage:function(){return this.slidingWindowPages[0]},lastWindowPage:function(){return this.slidingWindowPages[this.slidingWindowPages.length-1]},showPreviousPageAction:function(){return this.total>this.nonSlidingSize},showNextPageAction:function(){return this.total>this.nonSlidingSize}},methods:{replaceLabelVars:function(e,t){return e.replace("%total%",this.total).replace("%page%",t)},isCurrentPage:function(e){return this.current===e},currentPageLabel:function(e){return this.replaceLabelVars(this.ariaCurrentPageLabel,e)},goToPage:function(e){this.$emit("page-change",e)},goToNextPage:function(){this.goToPage(this.current+1)},goToPreviousPage:function(){this.goToPage(this.current-1)},goToPageLabel:function(e){return this.replaceLabelVars(this.ariaGotoPageLabel,e)},pageLabel:function(e){return this.isCurrentPage(e)?this.currentPageLabel(e):this.goToPageLabel(e)},slotOrDefault:function(e,t){return this.$slots[e]?this.$slots[e]:t},navigationElement:function(e,t,n,r,i){return e("li",{class:[this.classMap.element,this.current===t?this.classMap.elementDisabled:""],key:t},[e("a",{class:this.classMap.page,attrs:{href:"#","aria-label":r,disabled:1===this.current},on:{click:t===this.total?this.goToNextPage:this.goToPreviousPage}},i)])},pageListPage:function(e,t){return e("li",{class:[this.classMap.element,this.isCurrentPage(t)?this.classMap.elementActive:""]},[e(this.pageComponent,{props:{isCurrent:this.isCurrentPage(t),ariaPageLabel:this.pageLabel(t),page:t,pageClass:this.classMap.page},on:{"page-click":this.goToPage}})])},gap:function(e,t){return e("li",{class:[this.classMap.element,this.classMap.elementDisabled],attrs:{"aria-hidden":!0}},[e("a",{class:this.classMap.page,attrs:{href:"#",disabled:!0}},t)])}},render:function(e){var t=this,n=[];return this.showPreviousPageAction&&n.push(this.navigationElement(e,1,-1,this.ariaPreviousPageLabel,this.slotOrDefault("previousPage","«"))),n=n.concat(this.beginningPages.map((function(n){return t.pageListPage(e,n)}))),this.hasBeginningGap&&n.push(this.gap(e,this.slotOrDefault("gapLeft","…"))),n=n.concat(this.slidingWindowPages.map((function(n){return t.pageListPage(e,n)}))),this.hasEndingGap&&n.push(this.gap(e,this.slotOrDefault("gapRight","…"))),n=n.concat(this.endingPages.map((function(n){return t.pageListPage(e,n)}))),this.showNextPageAction&&n.push(this.navigationElement(e,this.total,1,this.ariaNextPageLabel,this.slotOrDefault("nextPage","»"))),e("nav",{class:this.classMap.component,attrs:{"aria-label":this.ariaPaginationLabel}},[e("ul",{class:this.classMap.list},n)])}});s.options.__file="src/SlidingPagination.vue",t.default=s.exports}])},7789:(e,t,n)=>{"use strict";n.d(t,{de:()=>r});const r={contextualHelp:"Kontexthilfe",loadingData:"Daten werden geladen..."}},9909:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var r=n(1320),i=n.n(r);i().addHook("afterSanitizeAttributes",(function(e){"target"in e&&"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener")}));const o=(e,t)=>{const{content:n,options:r={}}=(e=>{const t=typeof e;return"string"===t?{content:e}:"object"===t?e:void 0})(t.value),o={...r,ADD_ATTR:["target"]};e.innerHTML=i().sanitize(n,o)},s={bind:function(e,t){o(e,t)},update:function(e,t){t.value!==t.oldValue&&o(e,t)}}},2333:(e,t,n)=>{"use strict";n.d(t,{J7:()=>r.J,u:()=>s,Kr:()=>i.VPopover});var r=n(9909);const i=require("v-tooltip"),o={defaultHtml:!0,defaultBoundariesElement:"scrollParent",defaultDelay:{show:300,hide:100},defaultOffset:12,defaultTemplate:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>',popover:{defaultPlacement:"top",defaultBaseClass:"tooltip",defaultInnerClass:"tooltip__inner",defaultArrowClass:"tooltip__arrow",defaultDelay:{show:300,hide:100},defaultTrigger:"hover"}};i.VTooltip.options={...i.VTooltip.options,...o},i.VPopover.options={...i.VPopover.options,...o};const s=i.VTooltip},9436:(e,t,n)=>{"use strict";n.d(t,{W:()=>l,g:()=>c});var r=n(5647),i=n(3656),o=n(702),s=n(3178),a=n(8767);function l(e){(0,r.e7)(e).forEach((e=>{c(e)}))}function c(e){let t,n,l;const c=(0,r.kv)(e),d=(e,t)=>{e.hasAttribute("data-dp-validate-if")&&e.getAttribute("data-dp-validate-if").split(",").forEach((n=>{const r=n.indexOf("!==")>-1?"isNotEqual":"isEqual",i=n.split("isNotEqual"===r?"!==":"==="),o=e.closest("[data-dp-validate]");try{const e=o.querySelector(i[0]);"radio"===e.type?Array.from(o.querySelectorAll(`input[name="${e.name}"]:not([value="${e.value}"]`)).forEach((e=>e.addEventListener("input",t))):(e.addEventListener("input",t),e.addEventListener("change",t),e.addEventListener("select",t))}catch(e){}}))};switch(c){case"tiptap":(0,r.CH)('div[contenteditable="true"]',e.parentNode).then((()=>{const t=e.parentNode.querySelector('div[contenteditable="true"]');t.addEventListener("blur",(()=>(0,a.Z)(e))),t.addEventListener("focus",(()=>{t.classList.contains(r.YQ)&&t.classList.remove(r.YQ)})),d(e,(()=>(0,a.Z)(e)))}));break;case"fieldset":t=Array.from(e.querySelectorAll('input[type="checkbox"]')),n=Array.from(e.querySelectorAll('input[type="radio"]')),l=t.length>0?t:n.length>0?n:[],l.forEach((t=>t.addEventListener("blur",(()=>(0,o.Z)(e))))),l.forEach((t=>t.addEventListener("change",(()=>(0,o.Z)(e))))),d(e,(()=>(0,o.Z)(e)));break;case"datepicker":e.addEventListener("focus",(()=>{e.classList.contains(r.YQ)&&e.classList.remove(r.YQ)})),e.addEventListener("blur",(()=>(0,i.Z)(e))),d(e,(()=>(0,i.Z)(e)));break;case"input":e.addEventListener("focus",(()=>{e.classList.contains(r.YQ)&&e.classList.remove(r.YQ)})),e.addEventListener("blur",(()=>(0,s.Z)(e))),d(e,(()=>(0,s.Z)(e)))}}},5647:(e,t,n)=>{"use strict";n.d(t,{CH:()=>c,KG:()=>d,YQ:()=>a,e7:()=>i,kv:()=>s,ph:()=>o,s3:()=>l});var r=n(6951);function i(e){return Array.from(e.querySelectorAll('[pattern], [required], input[type="email"], .tiptap__input--hidden.is-required, .multiselect.is-required, fieldset.is-required, [minlength], [maxlength], [data-dp-validate-maxlength], [data-dp-validate-should-equal]'))}function o(e){const t=e.hasAttribute("required")||e.classList.contains("is-required");return e.hasAttribute("data-dp-validate-if")&&!1===function(e){return e.getAttribute("data-dp-validate-if").split(",").some((t=>{const n=t.indexOf("!==")>-1?"isNotEqual":"isEqual",r=t.split("isNotEqual"===n?"!==":"==="),i=e.closest("[data-dp-validate]");try{const e=i.querySelector(r[0]);return"checkbox"===e.type||"radio"===e.type?"isNotEqual"===n?!e.checked:e.checked:!!e.value&&("isNotEqual"===n?e.value!==r[1]:e.value===r[1])}catch(e){return!1}}))}(e)?(l(e,!1),!1):!!(t||e.hasAttribute("pattern")||"email"===e.getAttribute("type")||e.hasAttribute("minlength")||e.hasAttribute("maxlength")||e.hasAttribute("data-dp-validate-maxlength")||e.hasAttribute("data-dp-validate-should-equal"))}function s(e){let t="input";return e.classList.contains("multiselect")?t="multiselect":e.classList.contains("tiptap__input--hidden")?t="tiptap":"FIELDSET"===e.tagName?t="fieldset":e.classList.contains("a1-input")&&(t="datepicker"),t}const a=(0,n(6317).Z)("is-invalid");function l(e,t){"tiptap"===s(e)&&(e=e.parentNode.querySelector('div[contenteditable="true"]')),"hidden"===e.type&&e.name.startsWith("uploadedFiles")&&(e=e.parentNode.querySelector(".uppy-Root")),t?e.classList.add(a):e.classList.contains(a)&&e.classList.remove(a)}function c(e,t){return new Promise((n=>{const r=t.querySelector(e);r&&n(r),new MutationObserver(((r,i)=>{Array.from(t.querySelectorAll(e)).forEach((e=>{n(e),i.disconnect()}))})).observe(document,{childList:!0,subtree:!0})}))}function d(e){const t=u(e);if(!1===function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(t)){const e=t.getBoundingClientRect().top+(0,r.Z)();window.scrollTo({behavior:"smooth",top:e-50})}}function u(e){return null==e.offsetParent?u(e.parentElement):e}},3656:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){let t=!0;return(""===e.value||!1===/^(?:(?:31(.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(.)(?:0?[13-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/.test(e.value))&&(t=!1),(0,r.s3)(e,!t),t}},4299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o,k:()=>i});const r=(e,t)=>"string"==typeof t&&t.length<=320&&e.test(t)&&"\n"!==t.slice(-1)&&encodeURIComponent(t).replace(/%../g,"x").length<=320,i=/^(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E\p{L}\p{N}]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F\p{L}\p{N}]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E\p{L}\p{N}]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F\p{L}\p{N}]|(?:\x5C[\x00-\x7F]))*\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\.){1,126})+(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\]))$/i;function o(e){return r(i,e)}},702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){let t=!0;const n=Array.from(e.querySelectorAll('input[type="checkbox"]')),i=Array.from(e.querySelectorAll('input[type="radio"]'));let o=null;return n.length>0?o=n:i.length>0&&(o=i),null===o||(!1===o.some((e=>!0===e.checked))?(t=!1,o.forEach((e=>(0,r.s3)(e,!0)))):o.forEach((e=>(0,r.s3)(e,!1))),t)}},405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(5647),i=n(3656),o=n(702),s=n(3178),a=n(5322),l=n(8767);function c(e){let t=!0;const n=(0,r.e7)(e),c=[];return n.forEach((e=>{let n=!0;switch((0,r.kv)(e)){case"multiselect":n=(0,a.Z)(e);break;case"tiptap":n=(0,l.Z)(e);break;case"fieldset":n=(0,o.Z)(e);break;case"datepicker":n=(0,i.Z)(e);break;default:n=(0,s.Z)(e)}!1===n&&(c.push(e),t=!1)})),{valid:t,invalidFields:c}}},3178:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5647),i=n(4299);function o(e){if(!1===(0,r.ph)(e))return!0;const t=e.getAttribute("data-dp-validate-error")||!1;let n=!0,o=e.getAttribute("pattern"),s=new RegExp(o);if("email"===e.getAttribute("type")&&(o="email",s=i.k),e.getAttribute("minlength")&&n&&(o=null,n=e.value.length>=parseInt(e.getAttribute("minlength"))),e.getAttribute("maxlength")&&n&&(o=null,n=e.value.length<=parseInt(e.getAttribute("maxlength"))),o&&n&&(n=!1===e.hasAttribute("required")&&""===e.value||s.test(e.value)),e.getAttribute("data-dp-validate-should-equal")&&n&&(n=e.value===document.querySelector(e.getAttribute("data-dp-validate-should-equal")).value),e.hasAttribute("required")&&n&&(n="checkbox"===e.type?!0===e.checked:""!==e.value),!0===n){try{e.setCustomValidity("")}catch(e){}return e.hasAttribute("aria-invalid")&&e.removeAttribute("aria-invalid"),(0,r.s3)(e,!1),!0}e.setAttribute("aria-invalid",!0),(0,r.s3)(e,!0);try{if(t)e.setCustomValidity(Translator.trans(t));else if(o)switch(o){case"^[0-9]{5}$":e.setCustomValidity(Translator.trans("validation.error.zipcode"));break;case"[A-Za-zÄäÜüÖöß ]+":e.setCustomValidity(Translator.trans("validation.error.city"));break;case"email":e.setCustomValidity(Translator.trans("validation.error.email"));break;default:e.setCustomValidity(Translator.trans("validation.error.default"))}else e.setCustomValidity(Translator.trans("validation.error.default"))}catch(e){}return!1}},5322:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){if(!1===(0,r.ph)(e))return!0;const t="true"===e.getAttribute("data-dp-validate-is-valid");return(0,r.s3)(e,!t),t}},8767:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){if(!1===(0,r.ph)(e))return!0;let t=!0;if(e.classList.contains("is-required")&&""===e.value||e.hasAttribute("data-dp-validate-maxlength")&&0!==e.getAttribute("data-dp-validate-maxlength")&&e.value.length>e.getAttribute("data-dp-validate-maxlength")){t=!1;const n=e.parentNode.querySelector('div[contenteditable="true"]');if(!1===n.classList.contains(r.YQ)){(0,r.s3)(n,!0);const e=()=>{(0,r.s3)(n,!1),n.removeEventListener("focus",e)};n.addEventListener("focus",e)}}return t}},2771:(e,t,n)=>{"use strict";n.d(t,{fE:()=>o,cR:()=>d,gH:()=>i,Be:()=>p});var r=n(9609);const i={methods:{prefixClass:e=>(0,r.o4)(e)}},o={data:()=>({allSelected:!1,itemSelections:{}}),methods:{dpToggleAll(e,t){this.allSelected=e,this.itemSelections=this.setItemSelections(t,this.allSelected)},dpToggleOne(e){this.itemSelections[e]&&this.allSelected&&(this.allSelected=!1);const t=!!this.itemSelections[e];this.itemSelections={...this.itemSelections,[e]:!t}},setItemSelections:(e,t)=>Object.keys(e).reduce(((e,n)=>({...e,[n]:t})),{})}};var s=n(5647),a=n(9436),l=n(6777),c=n(405);const d={data:()=>({dpValidate:{}}),methods:{dpValidateAction(e,t,n=!0){const r=this.$el.hasAttribute("data-dp-validate")&&this.$el.getAttribute("data-dp-validate")===e?this.$el:this.$el.querySelector(`[data-dp-validate=${e}]`),i=(0,c.Z)(r),o={...this.dpValidate,[e]:i.valid};if(this.dpValidate=o,!1===(0,l.Z)(this.dpValidate,"invalidFields")&&(this.dpValidate.invalidFields={}),this.dpValidate.invalidFields[e]=i.invalidFields,!1===this.dpValidate[e]){const t=this.dpValidate.invalidFields[e].filter((e=>e.hasAttribute("data-dp-validate-error"))).map((e=>e.dataset.dpValidateError));t.forEach((e=>dplan.notify.notify("error",Translator.trans(e)))),0===t.length&&dplan.notify.notify("error",Translator.trans("error.mandatoryfields.no_asterisk"));const n=r.querySelector("."+s.YQ);(0,s.KG)(n)}if(!1===this.dpValidate[e]&&n||this.dpValidate[e])return t()}},mounted(){let e=[];this.$el.hasAttribute("data-dp-validate")?(this.isComponentForm=!0,e.push(this.$el)):(this.isComponentForm=!1,e=Array.from(this.$el.querySelectorAll("[data-dp-validate]"))),this.dpValidateForms=e,this.dpValidateForms.forEach((e=>{const t=e.getAttribute("data-dp-validate");this.dpValidate[t]=!0,(0,a.W)(e)}))},updated(){this.$nextTick((()=>{if(!1===this.isComponentForm){const e=Array.from(this.$el.querySelectorAll("[data-dp-validate]"));e.concat(this.dpValidateForms).forEach((t=>{if(this.dpValidateForms.includes(t)&&!1===e.includes(t)){const e=this.dpValidateForms.findIndex((e=>e===t));delete this.dpValidateForms[e]}else if(!1===this.dpValidateForms.includes(t)&&e.includes(t)){this.dpValidateForms.push(t);const e=t.getAttribute("data-dp-validate");this.dpValidate[e]=!0,(0,a.W)(t)}else(0,a.W)(t)}))}else this.dpValidateForms.forEach((e=>{(0,a.W)(e)}))}))}};var u=n(3882);const p={data:()=>({allItemsCount:null,allSelectedVisually:!1,toggledItems:[],trackDeselected:!1}),computed:{currentlySelectedItems(){const e=this.toggledItems.map((e=>e.id));let t;return!1===this.trackDeselected?t=this.toggledItems:!0===this.trackDeselected&&(t=0===this.toggledItems.length?this.items:this.items.filter((t=>!e.includes(t.id)))),t.reduce(((e,t)=>({...e,[t.id]:!0})),{})},selectedItemsCount(){return this.trackDeselected?this.allSelectedVisually?this.allItemsCount:this.allItemsCount-this.toggledItems.length:this.toggledItems.length}},methods:{handleSelectAll(e){this.trackDeselected=e,this.allSelectedVisually=!0===e,this.toggledItems=[]},handleToggleItem(e,t){const n=e.map((e=>e.id));(!0===t&&!this.trackDeselected||!1===t&&this.trackDeselected)&&(this.toggledItems=(0,u.Z)(this.toggledItems.concat(e),"id")),(!1===t&&!this.trackDeselected||!0===t&&this.trackDeselected)&&(this.toggledItems=this.toggledItems.filter((e=>!1===n.includes(e.id)))),!1===t&&(this.allSelectedVisually=!1)},resetSelection(){this.allSelectedVisually=!1,this.trackDeselected=!1,this.toggledItems=[]}}}},6951:(e,t,n)=>{"use strict";function r(){return Math.abs(parseInt(window.scrollY||window.scrollTop||document.getElementsByTagName("html")[0].scrollTop,10))}n.d(t,{Z:()=>r})},6777:(e,t,n)=>{"use strict";function r(e,t){return"object"!=typeof e?(console.warn("Cannot check for property on a non-object, got type: "+typeof e),!1):null!==e&&Object.prototype.hasOwnProperty.call(e,t)}n.d(t,{Z:()=>r})},9609:(e,t,n)=>{"use strict";n.d(t,{OC:()=>o,KQ:()=>S,Ds:()=>_,RH:()=>E,f5:()=>l,td:()=>O,p6:()=>s,c8:()=>T,cx:()=>D.Z,wP:()=>h,ec:()=>p,Q$:()=>M.Z,Fs:()=>u,ts:()=>k,T8:()=>c,C4:()=>d,o4:()=>N.Z,a:()=>I,P2:()=>P,ZU:()=>a,V9:()=>x,Wz:()=>C,GD:()=>$.Z});var r=n(1635),i=n.n(r);const o="DD.MM.YYYY, HH:mm [Uhr]",s=function(e,t="DD.MM.YYYY"){let n;return"long"===t&&(t=o),"number"==typeof e&&(n=e.toString().length>10?i()(e):i().unix(e)),("string"==typeof e||e instanceof Date)&&(n=i()(e)),null==n?i()().format(t):n.format(t)},a=function(e,t="DD.MM.YYYY"){return i()(e,t).toDate()},l=(e,t)=>{const n=Number(t);return n?Translator.trans("input.text.exactlength.short",{requiredlength:t,count:e,class:e===n?"color-status-progress-text":"color-status-failed-text"}):""},c=(e,t)=>{const n=t>50?15:3,r=Number(t);return r?Translator.trans("input.text.maxlength.short",{max:r,count:r-e,class:r-e>n?"color-status-progress-text":"color-status-failed-text"}):""},d=(e,t)=>{const n=Number(t);return n?Translator.trans("input.text.minlength.short",{min:n,count:n-e,class:n<=e?"color-status-progress-text":"color-status-failed-text"}):""};function u(e){return!!dplan.permissions[e]}function p(e){if(!1===Array.isArray(e))throw new Error('Typeof "permissions" is not an Array');return e.some((e=>!!dplan.permissions[e]))}function h(e){if(!1===Array.isArray(e))throw new Error('Typeof "permissions" is not an Array');return e.every((e=>!!dplan.permissions[e]))}var f={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},m=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],g=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],y=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],v="undefined"!=typeof window&&void 0!==window.document?window.document:{},b="fullscreenEnabled"in v&&Object.keys(f)||m[0]in v&&m||g[0]in v&&g||y[0]in v&&y||[];const w={requestFullscreen:function(e){return e[b[f.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[b[f.requestFullscreen]]},get exitFullscreen(){return v[b[f.exitFullscreen]].bind(v)},get fullscreenPseudoClass(){return":"+b[f.fullscreen]},addEventListener:function(e,t,n){return v.addEventListener(b[f[e]],t,n)},removeEventListener:function(e,t,n){return v.removeEventListener(b[f[e]],t,n)},get fullscreenEnabled(){return Boolean(v[b[f.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return v[b[f.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return v[("on"+b[f.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return v[("on"+b[f.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return v[("on"+b[f.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return v[("on"+b[f.fullscreenerror]).toLowerCase()]=e}},x=function(e){return!!w.fullscreenEnabled&&(null===w.fullscreenElement?(w.requestFullscreen(e),!0):(w.exitFullscreen(),!1))},S=function(e){w.addEventListener("fullscreenchange",e)},C=function(e){w.removeEventListener("fullscreenchange",e)},k=function(){return w.fullscreenEnabled&&null!==w.fullscreenElement};function _(e,t,n){let r;return function(){const i=this,o=arguments,s=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(i,o)}),t),s&&e.apply(i,o)}}const A=(e,t)=>{const n=e=>e&&"object"==typeof e;return n(e)&&n(t)?(Object.keys(t).forEach((r=>{const i=e[r],o=t[r];Array.isArray(i)&&Array.isArray(o)?e[r]=i.concat(o):n(i)&&n(o)?e[r]=A(Object.assign({},i),o):e[r]=o})),e):t},E=A;function O(e,t){if(0===e)return"0 Bytes";const n=t<=0?0:t||2,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}function T(){const e=document.createElement("fakeelement"),t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};let n;for(n in t)if(void 0!==e.style[n])return t[n];return!1}var D=n(6951),M=n(6777),N=n(6317);function I(e,t,n="asc"){const r=e;return"string"==typeof r[0]?r.sort(((e,t)=>e.localeCompare(t,"de",{sensitivity:"base"}))):"object"==typeof e[0]&&(0,M.Z)(e[0],t)&&r.sort(((e,n)=>{const r=t.split(".");let i=e,o=n;for(const e of r)(0,M.Z)(i,e)&&(0,M.Z)(o,e)&&(i=i[e],o=o[e]);return i.localeCompare(o,"de",{sensitivity:"base"})})),"desc"===n&&r.reverse(),r}function P(e,t){let n;return function(){const r=arguments;n||(e.apply(this,r),n=!0,setTimeout((()=>{n=!1}),t))}}var $=n(3882)},6317:(e,t,n)=>{"use strict";function r(e=""){let t="";"undefined"!=typeof dplan&&dplan.settings&&dplan.settings.publicCSSClassPrefix&&(t=dplan.settings.publicCSSClassPrefix);let n="";if(""===t)return e;if("string"!=typeof e)throw new Error("classList is an"+typeof e+". should be String.",e);return n=/[.#[]/gi.test(e)?e.replace(/(\.)(\S+)/gi,((e,n,r)=>`.${t}${r}`)):e.replace(/(\S+)/gi,(e=>`${t}${e}`)),n}n.d(t,{Z:()=>r})},3882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6777);function i(e,t){const n=e.concat();if(n&&(0,r.Z)(n[0],t))for(let e=0;e<n.length;++e)for(let r=e+1;r<n.length;++r)n[e][t]===n[r][t]&&n.splice(r--,1);return n}},1635:e=>{"use strict";e.exports=require("dayjs")},1320:e=>{"use strict";e.exports=require("dompurify")},4654:()=>{}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e].call(n.exports,n,n.exports,s),n.exports}s.m=i,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);s.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>n[e]));return o.default=()=>n,s.d(i,o),i},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".demosplan-ui.umd.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="__demos_europe_demosplan_ui:",s.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+i){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+i),a.src=e),n[e]=[t];var p=(t,r)=>{a.onerror=a.onload=null,clearTimeout(h);var i=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="",(()=>{var e={179:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var o=s.p+s.u(t),a=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);l&&l(s)}for(t&&t(n);c<o.length;c++)i=o[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackChunk_demos_europe_demosplan_ui=self.webpackChunk_demos_europe_demosplan_ui||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a={};return(()=>{"use strict";s.d(a,{default:()=>wk});const e=()=>({type:[Boolean,String],required:!1,default:!1,validator:e=>!0!==e&&Number(e)%1==0}),t=e=>{const t={textarea:["cols","rows"]};return{type:Array,required:!1,default:()=>[],validator:n=>{const r=n.filter((n=>{const r=n.split("=");return t[e].includes(r[0])&&2===r.length}));if(0===n.length||r.length===n.length)return!0;console.error(`A Vue form component of type "${e}" is used with the "attributes" prop containing a disallowed attr.`)}}};var n=s(2333),r=s(9609);function i(e,t,n){let r=t;if(e.length>0){const i=/(\[|\]|\\|\^|\$|\.|\||\?|\*|\+|\(|\)|\.)/gi;let o=e.replace(i,"\\$1");o=o.replace(/\s+/gi,"\\s+");const s=new RegExp(o,"ig");r=t.filter((e=>n.filter((t=>{const n=t.split(".");let r=e[n[0]],i=!!r,o=1;for(;i&&o<n.length;)r=r[n[o]],i=!!r,o++;return"string"==typeof r&&r.match(s)})).length>0))}return r}const o={name:"DpTransitionExpand",functional:!0,render:(e,t)=>e("transition",{props:{name:"expand"},on:{afterEnter(e){e.style.height="auto"},enter(e){e.style.width=getComputedStyle(e).width,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";const t=getComputedStyle(e).height;e.style.width=null,e.style.position=null,e.style.visibility=null,e.style.height=0,getComputedStyle(e).height,requestAnimationFrame((()=>{e.style.height=t}))},leave(e){e.style.height=getComputedStyle(e).height,getComputedStyle(e).height,requestAnimationFrame((()=>{e.style.height=0}))}}},t.children)};var l=s(1900);const c=(0,l.Z)(o,void 0,void 0,!1,null,null,null).exports,d={name:"DpAccordion",components:{DpTransitionExpand:c},props:{fontWeight:{type:String,required:!1,default:"bold",validate:e=>["normal","bold"].includes(e)},compressed:{type:Boolean,default:!1},isOpen:{type:Boolean,required:!1,default:!1},title:{type:String,required:!1,default:""}},data(){return{isVisible:this.isOpen}},watch:{isOpen(){this.isVisible=this.isOpen}},methods:{toggle(e){this.isVisible=void 0===e?!this.isVisible:e,this.$emit("item:toggle",this.isVisible)}}},u=(0,l.Z)(d,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"o-accordion"},[""!==e.title?t("button",{staticClass:"btn--blank o-link--default",class:"bold"===e.fontWeight?"weight--bold":"weight--normal",attrs:{type:"button","aria-expanded":e.isVisible.toString(),"data-cy":"accordionToggle"},on:{click:()=>e.toggle()}},[t("i",{staticClass:"width-s fa",class:{"fa-caret-right":!e.isVisible,"fa-caret-down":e.isVisible},attrs:{"aria-hidden":"true"}}),e._v(" "),t("span",{class:e.compressed?"font-size-medium":"o-accordion--title"},[e._v(e._s(e.title))])]):e._e(),e._v(" "),t("dp-transition-expand",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.isVisible,expression:"isVisible"}]},[e._t("default")],2)])],1)}),[],!1,null,null,null).exports;var p=s(9669),h=s.n(p),f=s(6777),m=s(129);const g=require("uuid");let y=null,v=null;"undefined"!=typeof dplan&&((0,f.Z)(dplan,"procedureId")&&(y=dplan.procedureId),(0,f.Z)(dplan,"jwtToken")&&(v=dplan.jwtToken));const b={"X-JWT-Authorization":"Bearer "+v},w={Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","X-JWT-Authorization":"Bearer "+v},x=function(e){const t=e.url.includes("api/2.0/")?{...w,...e.headers}:{...b,...e.headers};return null!==y&&(t["X-Demosplan-Procedure-Id"]=y),t},S=e=>h()({data:{},...e,headers:x(e)}),C=S;C.post=(e,t={},n={},r={})=>S({method:"post",url:e,data:n,params:t,options:r}),C.get=(e,t={},n={})=>{if(!0===n.serialize){const r={paramsSerializer:e=>(0,m.stringify)(e,{encodeValuesOnly:!0,arrayFormat:"brackets"}),headers:x({...t,url:e})};return delete n.serialize,h().create(r).request({method:"get",data:{},url:e,params:t,...n})}return S({method:"get",url:e,data:{},params:t,options:n})},C.put=(e,t={},n={},r={})=>S({method:"put",url:e,data:n,params:t,options:r}),C.patch=(e,t={},n={},r={})=>S({method:"patch",url:e,data:n,params:t,options:r}),C.delete=(e,t={},n={},r={})=>S({method:"delete",url:e,params:t,options:r});const k=function(e){if((0,f.Z)(e,"messages"))for(const t in e.messages)for(const n in e.messages[t])dplan.notify.notify(t,Translator.trans(e.messages[t][n]))},_=function(e,t){return new Promise(((n,r)=>{(0,f.Z)(e,"data")&&e.data&&(0,f.Z)(e.data,"meta")?k(e.data.meta):void 0!==dplan&&dplan.debug&&(0,f.Z)(e,"errors")&&(0,f.Z)(e,"meta")&&(0,f.Z)(e.meta,"messages")?k(e.meta):t&&(0,f.Z)(t,e.status)&&dplan.notify.notify(t[e.status].type,Translator.trans(t[e.status].text)),e.status>=400?r(e.data):200===e.status?n(e.data):n(null)}))},A={antragx:[".antragx"],pdf:[".pdf"],"pdf-img":[".pdf","image/*"],"pdf-img-zip":[".pdf","image/*",".zip"],"pdf-zip":[".pdf",".zip"],img:["image/*"],import:[".docx"],all:[".jpg",".png",".bmp",".jpeg",".zip",".docx",".pdf",".bin",".txt",".tiff",".tif"],zip:[".zip"],csv:[".csv"],"pdf-video":[".pdf","video/*"],"pdf-zip-video":[".pdf","video/*",".zip"],xls:[".xls",".xlsx",".ods"]},E={"text/plain":"txt","text/html":"html","text/css":"css","application/javascript":"js","application/json":"json","application/xml":"xml","application/x-shockwave-flash":"swf","application/octet-stream":"binary","video/x-flv":"flv","image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/bmp":"bmp","image/vnd.microsoft.icon":"ico","image/tiff":"tiff","image/svg+xml":"svg","application/zip":"zip","application/x-rar-compressed":"rar","application/x-msdownload":"exe","application/vnd.ms-cab-compressed":"cab","audio/mpeg":"mp3","video/quicktime":"mov","application/pdf":"pdf","application/x-pdf":"pdf","application/x-download":"pdf","image/vnd.adobe.photoshop":"psd","application/postscript":"ps","application/msword":"doc","application/vnd.openxmlformats-officedocument.wo:processingml.document":"docx","application/rtf":"rtf","application/vnd.ms-excel":"xls","application/vnd.ms-powerpoint":"ppt","application/vnd.oasis.opendocument.text":"odt","application/vnd.oasis.opendocument.spreadsheet":"ods"},O=function(e,t){let n;switch(e){case"KB":n=t/1024;break;case"MB":n=t/1048576;break;case"GB":n=t/1073741824;break;case"TB":n=t/1099511627776;break;default:n=t}return Math.round(n)+" "+e},T=function(e){return(0,f.Z)(A,e)?A[e]:e};var D=s(6317);class M{constructor(e){this.el=e,this.trigger=this.el.querySelector("[aria-haspopup]"),this.menu=this.el.querySelector('[role="menu"]'),this.menuItems=this.menu.querySelectorAll("[data-actionmenu-menuitem]"),this.hasCurrent=this.menu.querySelectorAll("[data-actionmenu-current]").length>0,this.currentlySelectedIndex=0,this.openMenu=this.openMenu.bind(this),this.closeMenu=this.closeMenu.bind(this),this.highlightCurrent=this.highlightCurrent.bind(this),this.handleTriggerKeydown=this.handleTriggerKeydown.bind(this),this.handleTriggerFocus=this.handleTriggerFocus.bind(this),this.handleMenuItemKeydown=this.handleMenuItemKeydown.bind(this),this.el.addEventListener("mouseover",this.openMenu),this.el.addEventListener("mouseleave",this.closeMenu),this.trigger.addEventListener("focus",this.handleTriggerFocus),this.trigger.addEventListener("keydown",this.handleTriggerKeydown);for(let e=0;e<this.menuItems.length;e++){const t=this.menuItems[e];t.addEventListener("click",this.highlightCurrent),t.addEventListener("keydown",this.handleMenuItemKeydown)}}handleTriggerKeydown(e){switch(e.keyCode){case 40:e.preventDefault(),this.openMenu(),this.menu.classList.remove((0,D.Z)("has-focused-trigger")),this.menuItems[this.currentlySelectedIndex].focus();break;case 38:case 9:this.closeMenu();break;case 27:this.closeMenu(),this.trigger.focus()}}handleTriggerFocus(){this.openMenu()}handleMenuItemKeydown(e){switch(e.keyCode){case 40:e.preventDefault(),this.currentlySelectedIndex<this.menuItems.length-1?this.currentlySelectedIndex++:this.currentlySelectedIndex=0,this.menuItems[this.currentlySelectedIndex].focus();break;case 38:e.preventDefault(),0===this.currentlySelectedIndex?this.currentlySelectedIndex=this.menuItems.length-1:this.currentlySelectedIndex--,this.menuItems[this.currentlySelectedIndex].focus();break;case 9:case 27:this.trigger.focus(),this.closeMenu()}}openMenu(){this.trigger.setAttribute("aria-expanded","true"),this.menu.classList.add("has-focused-trigger"),this.el.classList.add("is-expanded")}closeMenu(){this.trigger.setAttribute("aria-expanded","false"),this.menu.classList.remove("has-focused-trigger"),this.el.classList.remove("is-expanded"),this.currentlySelectedIndex=0}highlightCurrent(e){this.hasCurrent&&(this.menu.querySelector("[data-actionmenu-current]").removeAttribute("data-actionmenu-current"),e.target.setAttribute("data-actionmenu-current",!0))}}const N=class{constructor(e){if(!e)throw new Error("Missing required argument. new Detabinator needs an element reference");this._inert=!1,this._focusableElementsString="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]",this._focusableElements=Array.from(e.querySelectorAll(this._focusableElementsString))}get inert(){return this._inert}set inert(e){this._inert!==e&&(this._inert=e,this._focusableElements.forEach((t=>{if(e)t.hasAttribute("tabindex")&&(t.__savedTabindex=t.tabIndex),t.setAttribute("tabindex",-1);else{if(0===t.__savedTabindex||t.__savedTabindex)return t.setAttribute("tabindex",t.__savedTabindex);t.removeAttribute("tabindex")}})))}},I=class{constructor(){this.breakpointToNumber={palm:0,"lap-up":1,"desk-up":2,wide:3}}getCurrentBreakpoint(){return window.getComputedStyle(document.querySelector("body"),":before").getPropertyValue("content").replace(/'/g,"").replace(/"/g,"")}is(e){return this.getCurrentBreakpoint()===e}greater(e){return this.breakpointToNumber[this.getCurrentBreakpoint()]>this.breakpointToNumber[e]}less(e){return this.breakpointToNumber[this.getCurrentBreakpoint()]<this.breakpointToNumber[e]}},P=class{constructor(){if(!document.querySelector("[data-slidebar]"))return;this.showButtonElements=Array.from(document.querySelectorAll("[data-slidebar-show]")),this.hideButtonElements=Array.from(document.querySelectorAll("[data-slidebar-hide]")),this.sideNavEl=document.querySelector("[data-slidebar]"),this.sideNavContainerEl=document.querySelector("[data-slidebar-container]"),this.orientation=this.sideNavEl.getAttribute("data-slidebar"),this.sideNavClassVisible="is-visible",this.sideNavClassAnimatable="is-animatable",this.detabinator=new N(this.sideNavContainerEl),this.detabinator.inert=!0,this.showSideNav=this.showSideNav.bind(this),this.hideSideNav=this.hideSideNav.bind(this),this.blockClicks=this.blockClicks.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTransitionEnd=this.onTransitionEnd.bind(this),this.update=this.update.bind(this);const e=document,t=e.documentElement,n=e.getElementsByTagName("body")[0];this.innerWidth=window.innerWidth||t.clientWidth||n.clientWidth,this.initialTranslateX=this.getTranslateX(this.sideNavContainerEl),this.startX="right"===this.orientation?this.innerWidth:0,this.currentX="right"===this.orientation?this.innerWidth:0,this.touchingSideNav=!1,this.transitionEndProperty=null,this.transitionEndTime=0,this.supportsPassive=void 0,this.addEventListeners()}applyPassive(){if(void 0!==this.supportsPassive)return!!this.supportsPassive&&{passive:!0};let e=!1;try{document.addEventListener("test",null,{get passive(){e=!0}})}catch(e){}return this.supportsPassive=e,this.applyPassive()}addEventListeners(){this.showButtonElements.forEach((e=>{e.addEventListener("click",this.showSideNav)})),this.hideButtonElements.forEach((e=>{e.addEventListener("click",this.hideSideNav)})),this.sideNavEl.addEventListener("click",this.hideSideNav),this.sideNavContainerEl.addEventListener("click",this.blockClicks),this.sideNavEl.addEventListener("touchstart",this.onTouchStart,this.applyPassive()),this.sideNavEl.addEventListener("touchmove",this.onTouchMove,this.applyPassive()),this.sideNavEl.addEventListener("touchend",this.onTouchEnd)}onTouchStart(e){this.sideNavEl.classList.contains(this.sideNavClassVisible)&&(this.startX=e.touches[0].pageX,this.currentX=this.startX,this.touchingSideNav=!0,requestAnimationFrame(this.update))}onTouchMove(e){this.touchingSideNav&&(this.currentX=e.touches[0].pageX)}onTouchEnd(e){if(!this.touchingSideNav)return;const t="right"===this.orientation?this.initialTranslateX:0;this.touchingSideNav=!1,this.sideNavContainerEl.style.transform="",this.updateTranslateX()<t&&this.hideSideNav()}update(){this.touchingSideNav&&(requestAnimationFrame(this.update),this.sideNavContainerEl.style.transform=`translateX(${this.updateTranslateX()}px)`)}blockClicks(e){e.stopPropagation()}onTransitionEnd(e){e.propertyName!==this.transitionEndProperty&&e.elapsedTime!==this.transitionEndTime||(this.transitionEndProperty=null,this.transitionEndTime=0,this.sideNavEl.classList.remove(this.sideNavClassAnimatable),this.sideNavEl.removeEventListener("transitionend",this.onTransitionEnd))}showSideNav(){this.sideNavEl.classList.add(this.sideNavClassAnimatable),this.sideNavEl.classList.add(this.sideNavClassVisible),this.detabinator.inert=!1,this.transitionEndProperty="transform",this.transitionEndTime=.33,this.sideNavEl.addEventListener("transitionend",this.onTransitionEnd)}hideSideNav(){this.sideNavEl.classList.add(this.sideNavClassAnimatable),this.sideNavEl.classList.remove(this.sideNavClassVisible),this.detabinator.inert=!0,this.transitionEndProperty="transform",this.transitionEndTime=.13,this.sideNavEl.addEventListener("transitionend",this.onTransitionEnd)}getTranslateX(e){if(!window.getComputedStyle)return;const t=[],n=getComputedStyle(e),r=n.transform||n.mozTransform||n.msTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[13]):(i=r.match(/^matrix\((.+)\)$/),i?t.push(parseFloat(i[1].split(", ")[4])):t.push(0),i?t.push(parseFloat(i[1].split(", ")[5])):t.push(0),t[0])}updateTranslateX(){return"right"===this.orientation?Math.max(0,this.currentX-this.startX):Math.min(0,this.currentX-this.startX)}};var $=s(6951);const R=class{constructor(e,t,n=0,r="top",i="palm",o=null,s=!0){this.element=e,this.context=t||this.element.offsetParent,this.container=o||this.element.offsetParent,this.elementOffset=n,this.stickToDirection=r,this.stickFromBreakpoint=i,this.observeContext=s,this.className={top:"is-top",bottom:"is-bottom",fixed:"is-fixed",bound:"is-bound"},this.currentBreakpoint=new I,this.isParentContext=this._isParentContext(),this._savePositions(),this._wrapElement(),this.observeContext&&(this.contextResizeObserver=new ResizeObserver(this._handleContextChange.bind(this)),this.contextResizeObserver.observe(this.context),this.contextMutationObserver=new MutationObserver(this._handleContextChange.bind(this)),this.contextMutationObserver.observe(this.context,{childList:!0,subtree:!0})),this.elementResizeObserver=new ResizeObserver(this._handleElementChange.bind(this)),this.elementResizeObserver.observe(this.element),document.addEventListener("scroll",this._handleScroll.bind(this),{passive:!0})}destroy(){this.observeContext&&(this.contextResizeObserver.disconnect(),this.contextMutationObserver.disconnect()),this.elementResizeObserver.disconnect(),document.removeEventListener("scroll",this._handleScroll),this.wrapped.remove()}_wrapElement(){const e=document.createElement("div");this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),this.wrapped=e,this._setMinHeight(this.wrapped)}_handleContextChange(){this._unsetContainerHeight(),this._unsetPosition(),!0===this._StickFromBreakpoint()&&this._savePositions(),this._stickier()}_handleElementChange(){window.requestAnimationFrame((()=>this._updateElementWrapper()))}_updateElementWrapper(){const e=this.stored.element.top;this._savePositions(),this.stored.element.top=e,this.stored.element.bottom=e+this.stored.element.height,this._setMinHeight(this.wrapped)}_handleScroll(){window.requestAnimationFrame(this._stickier.bind(this))}_stickier(){if(!1===this._StickFromBreakpoint())return;const e=this.stored,t=!1===e.fitsViewport,n=e.context,r=e.element,i=e.viewport,o={top:(0,$.Z)()+this.elementOffset,bottom:(0,$.Z)()+this.elementOffset+i.height},s=e.fitsViewport?0:this._getElementScroll(o.top);this._log((()=>this._isInitial()),this._isInitial(),this._is("top"),this._is("bottom")),this._isInitial()?o.top>=n.bottom?(this._log("element context above viewport - initial position is bottom of context"),this._bindBottom()):o.top>r.top&&(r.height+o.top-s>=n.bottom?(this._log("element ends below context - initial position is bottom of context"),this._bindBottom()):(this._log("element ends above context - initial position is fixed to top"),this._fixTop())):this._is("fixed")?this._is("top")?o.top<=r.top?(this._log("fixed element reached top of container"),this._unsetPosition()):r.height+o.top-s>=n.bottom?(this._log("fixed element reached bottom of container"),this._bindBottom()):t&&(this._log("syncing large element wit scrollPosition"),this._setElementScroll(s),this.stored.scroll=o.top,this.stored.elementScroll=s):this._is("bottom")&&(o.bottom-r.height<=r.top?(this._log("bottom fixed rail has reached top of container"),this._unsetPosition()):o.bottom>=n.bottom?(this._log("bottom fixed rail has reached bottom of container"),this._bindBottom()):t&&(this._log("syncing large element wit scrollPosition"),this._setElementScroll(s),this.stored.scroll=o.top,this.stored.elementScroll=s)):this._is("bottom")&&(o.top<=r.top?(this._log("Jumped from bottom fixed to top fixed"),this._unsetPosition()):this._is("bound")&&o.top<=n.bottom-r.height&&(this._log("Fixing bottom attached element to top of browser."),this._fixTop()))}_fixTop(){this._setElementWidth(),this._setElementOffset(),this.element.classList.remove(this.className.bottom),this.element.classList.remove(this.className.bound),this.element.classList.add(this.className.top),this.element.classList.add(this.className.fixed)}_bindBottom(){this.element.style.top=null,this._unsetElementOffset(),this._setElementWidth(),this._setRail(),this.element.classList.remove(this.className.top),this.element.classList.remove(this.className.fixed),this.element.classList.add(this.className.bottom),this.element.classList.add(this.className.bound)}_unFix(){this._unsetElementStyles(),this.element.classList.remove(this.className.top),this.element.classList.remove(this.className.bottom),this.element.classList.remove(this.className.fixed)}_unBind(){this._unsetElementStyles(),this.element.classList.remove(this.className.top),this.element.classList.remove(this.className.bottom),this.element.classList.remove(this.className.bound)}_unsetPosition(){this._unFix(),this._unBind()}_unsetElementStyles(){this._unsetElementOffset(),this._unsetRail(),this.element.style[this.stickToDirection]=null,this.element.style.width=null}_setContainerHeight(){this.isParentContext||!this.container||this._isHidden(this.container)||(this.container.style["min-height"]=Math.ceil(this.stored.context.height)+"px")}_unsetContainerHeight(){this.container&&!this._isHidden(this.container)&&(this.container.style["min-height"]=null)}_setElementWidth(){this.element.style.width=this.wrapped.offsetWidth+"px"}_setRail(){this.wrapped.style["min-height"]=Math.ceil(this.stored.context.height)+"px",this.wrapped.style.position="relative"}_unsetRail(){this.wrapped.style["min-height"]=Math.ceil(this.stored.element.height)+"px",this.wrapped.style.position=null}_setElementOffset(){this.element.style[`margin-${this.stickToDirection}`]=this.elementOffset+"px"}_unsetElementOffset(){this.element.style[`margin-${this.stickToDirection}`]=null}_setMinHeight(e){e.style["min-height"]=Math.ceil(this.stored.element.height)+"px"}_StickFromBreakpoint(){return this.currentBreakpoint.is(this.stickFromBreakpoint)||this.currentBreakpoint.greater(this.stickFromBreakpoint)}_savePositions(){const e={height:this._getHeight(this.element),top:this._getOffsetTop(this.element)},t={height:this._getHeight(this.context),top:this._getOffsetTop(this.context)},n={height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)};this.stored={fitsViewport:e.height+this.elementOffset<=n.height,scroll:null,elementScroll:null,element:{top:e.top,height:e.height,bottom:e.top+e.height},context:{top:t.top,height:t.height,bottom:t.top+t.height},viewport:{height:n.height}},this._setContainerHeight()}_setElementScroll(e){this.stored.scroll!==e&&(this._is("top")&&(this.element.style.top=`-${e}px`,this.element.style.bottom=null),this._is("bottom")&&(this.element.style.bottom=`-${e}px`,this.element.style.top=null))}_getElementScroll(e){e=e||(0,$.Z)();const t=this.stored.element,n=this.stored.viewport.height,r=this.stored.scroll?e-this.stored.scroll:0,i=t.height-n+this.elementOffset;let o=this._getCurrentElementScroll();const s=o+r;return o=this.stored.fitsViewport||s<0?0:s>i?i:s,o}_getOffsetTop(e){let t=0;do{t+=e.offsetTop||0,e=e.offsetParent}while(e);return t}_getHeight(e){return Math.max(e.offsetHeight,e.clientHeight)}_getCurrentElementScroll(){return this.stored.elementScroll?this.stored.elementScroll:Math.abs(parseInt(this._is("top")?this.element.style.top:this.element.style.bottom,10))||0}_is(e){return this.element.classList.contains(this.className[e])}_isInitial(){return!1===this._is("fixed")&&!1===this._is("bound")}_isParentContext(){let e=this.element;do{if(e=e.parentNode,this.context===e)return!0}while(e);return!1}_isHidden(e){return"none"===window.getComputedStyle(e).display}_log(){let e=()=>!0,t="",n=0;if("function"==typeof arguments[0]&&(e=arguments[0],n=1),e()){for(;n<arguments.length;n++)t+=arguments[n]+" ";return t}}},q=(e,t)=>{const n=e.getAttribute(`data-sticky-${t}`)||null;return n?document.getElementById(n):null},B=function(e,t){e.parentNode.insertBefore(t,e),t.appendChild(e)},F=function(e){const t=document.createElement("div");return t.classList.add(e),t},L=function(e,t){return Array.from(e).filter((e=>e.tagName===t.toUpperCase()))};var V=s(2771),j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==s.g?s.g:"undefined"!=typeof self?self:{};function z(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var H=function(e){return e&&e.Math==Math&&e},U=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof j&&j)||Function("return this")(),W=function(e){try{return!!e()}catch(e){return!0}},Z=!W((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),K={}.propertyIsEnumerable,J=Object.getOwnPropertyDescriptor,G={f:J&&!K.call({1:2},1)?function(e){var t=J(this,e);return!!t&&t.enumerable}:K},Y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},X={}.toString,Q=function(e){return X.call(e).slice(8,-1)},ee="".split,te=W((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==Q(e)?ee.call(e,""):Object(e)}:Object,ne=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},re=function(e){return te(ne(e))},ie=function(e){return"object"==typeof e?null!==e:"function"==typeof e},oe=function(e,t){if(!ie(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ie(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ie(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ie(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},se={}.hasOwnProperty,ae=function(e,t){return se.call(e,t)},le=U.document,ce=ie(le)&&ie(le.createElement),de=function(e){return ce?le.createElement(e):{}},ue=!Z&&!W((function(){return 7!=Object.defineProperty(de("div"),"a",{get:function(){return 7}}).a})),pe=Object.getOwnPropertyDescriptor,he={f:Z?pe:function(e,t){if(e=re(e),t=oe(t,!0),ue)try{return pe(e,t)}catch(e){}if(ae(e,t))return Y(!G.f.call(e,t),e[t])}},fe=function(e){if(!ie(e))throw TypeError(String(e)+" is not an object");return e},me=Object.defineProperty,ge={f:Z?me:function(e,t,n){if(fe(e),t=oe(t,!0),fe(n),ue)try{return me(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},ye=Z?function(e,t,n){return ge.f(e,t,Y(1,n))}:function(e,t,n){return e[t]=n,e},ve=function(e,t){try{ye(U,e,t)}catch(n){U[e]=t}return t},be=U["__core-js_shared__"]||ve("__core-js_shared__",{}),we=Function.toString;"function"!=typeof be.inspectSource&&(be.inspectSource=function(e){return we.call(e)});var xe,Se,Ce,ke=be.inspectSource,_e=U.WeakMap,Ae="function"==typeof _e&&/native code/.test(ke(_e)),Ee=z((function(e){(e.exports=function(e,t){return be[e]||(be[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Oe=0,Te=Math.random(),De=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Oe+Te).toString(36)},Me=Ee("keys"),Ne=function(e){return Me[e]||(Me[e]=De(e))},Ie={},Pe=U.WeakMap;if(Ae){var $e=new Pe,Re=$e.get,qe=$e.has,Be=$e.set;xe=function(e,t){return Be.call($e,e,t),t},Se=function(e){return Re.call($e,e)||{}},Ce=function(e){return qe.call($e,e)}}else{var Fe=Ne("state");Ie[Fe]=!0,xe=function(e,t){return ye(e,Fe,t),t},Se=function(e){return ae(e,Fe)?e[Fe]:{}},Ce=function(e){return ae(e,Fe)}}var Le,Ve,je={set:xe,get:Se,has:Ce,enforce:function(e){return Ce(e)?Se(e):xe(e,{})},getterFor:function(e){return function(t){var n;if(!ie(t)||(n=Se(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ze=z((function(e){var t=je.get,n=je.enforce,r=String(String).split("String");(e.exports=function(e,t,i,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||ae(i,"name")||ye(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==U?(s?!l&&e[t]&&(a=!0):delete e[t],a?e[t]=i:ye(e,t,i)):a?e[t]=i:ve(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||ke(this)}))})),He=U,Ue=function(e){return"function"==typeof e?e:void 0},We=function(e,t){return arguments.length<2?Ue(He[e])||Ue(U[e]):He[e]&&He[e][t]||U[e]&&U[e][t]},Ze=Math.ceil,Ke=Math.floor,Je=function(e){return isNaN(e=+e)?0:(e>0?Ke:Ze)(e)},Ge=Math.min,Ye=function(e){return e>0?Ge(Je(e),9007199254740991):0},Xe=Math.max,Qe=Math.min,et=function(e,t){var n=Je(e);return n<0?Xe(n+t,0):Qe(n,t)},tt=function(e){return function(t,n,r){var i,o=re(t),s=Ye(o.length),a=et(r,s);if(e&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},nt=(tt(!0),tt(!1)),rt=function(e,t){var n,r=re(e),i=0,o=[];for(n in r)!ae(Ie,n)&&ae(r,n)&&o.push(n);for(;t.length>i;)ae(r,n=t[i++])&&(~nt(o,n)||o.push(n));return o},it=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ot=it.concat("length","prototype"),st={f:Object.getOwnPropertyNames||function(e){return rt(e,ot)}},at={f:Object.getOwnPropertySymbols},lt=We("Reflect","ownKeys")||function(e){var t=st.f(fe(e)),n=at.f;return n?t.concat(n(e)):t},ct=function(e,t){for(var n=lt(t),r=ge.f,i=he.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r(e,s,i(t,s))}},dt=/#|\.prototype\./,ut=function(e,t){var n=ht[pt(e)];return n==mt||n!=ft&&("function"==typeof t?W(t):!!t)},pt=ut.normalize=function(e){return String(e).replace(dt,".").toLowerCase()},ht=ut.data={},ft=ut.NATIVE="N",mt=ut.POLYFILL="P",gt=ut,yt=he.f,vt=function(e,t){var n,r,i,o,s,a=e.target,l=e.global,c=e.stat;if(n=l?U:c?U[a]||ve(a,{}):(U[a]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(s=yt(n,r))&&s.value:n[r],!gt(l?r:a+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;ct(o,i)}(e.sham||i&&i.sham)&&ye(o,"sham",!0),ze(n,r,o,e)}},bt=Array.isArray||function(e){return"Array"==Q(e)},wt=function(e){return Object(ne(e))},xt=function(e,t,n){var r=oe(t);r in e?ge.f(e,r,Y(0,n)):e[r]=n},St=!!Object.getOwnPropertySymbols&&!W((function(){return!String(Symbol())})),Ct=St&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=Ee("wks"),_t=U.Symbol,At=Ct?_t:_t&&_t.withoutSetter||De,Et=function(e){return ae(kt,e)||(St&&ae(_t,e)?kt[e]=_t[e]:kt[e]=At("Symbol."+e)),kt[e]},Ot=Et("species"),Tt=function(e,t){var n;return bt(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!bt(n.prototype)?ie(n)&&null===(n=n[Ot])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},Dt=We("navigator","userAgent")||"",Mt=U.process,Nt=Mt&&Mt.versions,It=Nt&&Nt.v8;It?Ve=(Le=It.split("."))[0]+Le[1]:Dt&&(!(Le=Dt.match(/Edge\/(\d+)/))||Le[1]>=74)&&(Le=Dt.match(/Chrome\/(\d+)/))&&(Ve=Le[1]);var Pt=Ve&&+Ve,$t=Et("species"),Rt=function(e){return Pt>=51||!W((function(){var t=[];return(t.constructor={})[$t]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},qt=Et("isConcatSpreadable"),Bt=Pt>=51||!W((function(){var e=[];return e[qt]=!1,e.concat()[0]!==e})),Ft=Rt("concat"),Lt=function(e){if(!ie(e))return!1;var t=e[qt];return void 0!==t?!!t:bt(e)};vt({target:"Array",proto:!0,forced:!Bt||!Ft},{concat:function(e){var t,n,r,i,o,s=arguments,a=wt(this),l=Tt(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Lt(o=-1===t?a:s[t])){if(c+(i=Ye(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,c++)n in o&&xt(l,c,o[n])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");xt(l,c++,o)}return l.length=c,l}});var Vt=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},jt=[].push,zt=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,s=5==e||o;return function(a,l,c,d){for(var u,p,h=wt(a),f=te(h),m=function(e,t,n){return Vt(e),void 0===t?e:function(n,r,i){return e.call(t,n,r,i)}}(l,c),g=Ye(f.length),y=0,v=d||Tt,b=t?v(a,g):n?v(a,0):void 0;g>y;y++)if((s||y in f)&&(p=m(u=f[y],y,h),e))if(t)b[y]=p;else if(p)switch(e){case 3:return!0;case 5:return u;case 6:return y;case 2:jt.call(b,u)}else if(i)return!1;return o?-1:r||i?i:b}},Ht={forEach:zt(0),map:zt(1),filter:zt(2),some:zt(3),every:zt(4),find:zt(5),findIndex:zt(6)},Ut=Object.defineProperty,Wt={},Zt=function(e){throw e},Kt=function(e,t){if(ae(Wt,e))return Wt[e];t||(t={});var n=[][e],r=!!ae(t,"ACCESSORS")&&t.ACCESSORS,i=ae(t,0)?t[0]:Zt,o=ae(t,1)?t[1]:void 0;return Wt[e]=!!n&&!W((function(){if(r&&!Z)return!0;var e={length:-1};r?Ut(e,1,{enumerable:!0,get:Zt}):e[1]=1,n.call(e,i,o)}))},Jt=Ht.filter,Gt=Rt("filter"),Yt=Kt("filter");vt({target:"Array",proto:!0,forced:!Gt||!Yt},{filter:function(e){return Jt(this,e,arguments.length>1?arguments[1]:void 0)}});var Xt=function(e,t){var n=[][e];return!!n&&W((function(){n.call(null,t||function(){throw 1},1)}))},Qt=Ht.forEach,en=Xt("forEach"),tn=Kt("forEach"),nn=en&&tn?[].forEach:function(e){return Qt(this,e,arguments.length>1?arguments[1]:void 0)};vt({target:"Array",proto:!0,forced:[].forEach!=nn},{forEach:nn});var rn=function(e){return function(t,n,r,i){Vt(n);var o=wt(t),s=te(o),a=Ye(o.length),l=e?a-1:0,c=e?-1:1;if(r<2)for(;;){if(l in s){i=s[l],l+=c;break}if(l+=c,e?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:a>l;l+=c)l in s&&(i=n(i,s[l],l,o));return i}},on=[rn(!1),rn(!0)][0],sn=Xt("reduce"),an=Kt("reduce",{1:0});vt({target:"Array",proto:!0,forced:!sn||!an},{reduce:function(e){return on(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var ln=Rt("slice"),cn=Kt("slice",{ACCESSORS:!0,0:0,1:2}),dn=Et("species"),un=[].slice,pn=Math.max;vt({target:"Array",proto:!0,forced:!ln||!cn},{slice:function(e,t){var n,r,i,o=re(this),s=Ye(o.length),a=et(e,s),l=et(void 0===t?s:t,s);if(bt(o)&&("function"!=typeof(n=o.constructor)||n!==Array&&!bt(n.prototype)?ie(n)&&null===(n=n[dn])&&(n=void 0):n=void 0,n===Array||void 0===n))return un.call(o,a,l);for(r=new(void 0===n?Array:n)(pn(l-a,0)),i=0;a<l;a++,i++)a in o&&xt(r,i,o[a]);return r.length=i,r}});var hn,fn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return fe(n),function(e){if(!ie(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),mn=function(e,t,n){var r,i;return fn&&"function"==typeof(r=t.constructor)&&r!==n&&ie(i=r.prototype)&&i!==n.prototype&&fn(e,i),e},gn=Object.keys||function(e){return rt(e,it)},yn=Z?Object.defineProperties:function(e,t){fe(e);for(var n,r=gn(t),i=r.length,o=0;i>o;)ge.f(e,n=r[o++],t[n]);return e},vn=We("document","documentElement"),bn=Ne("IE_PROTO"),wn=function(){},xn=function(e){return"<script>"+e+"<\/script>"},Sn=function(){try{hn=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Sn=hn?function(e){e.write(xn("")),e.close();var t=e.parentWindow.Object;return e=null,t}(hn):((t=de("iframe")).style.display="none",vn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(xn("document.F=Object")),e.close(),e.F);for(var n=it.length;n--;)delete Sn.prototype[it[n]];return Sn()};Ie[bn]=!0;var Cn=Object.create||function(e,t){var n;return null!==e?(wn.prototype=fe(e),n=new wn,wn.prototype=null,n[bn]=e):n=Sn(),void 0===t?n:yn(n,t)},kn="[\t\n\v\f\r \u2028\u2029\ufeff]",_n=RegExp("^"+kn+kn+"*"),An=RegExp(kn+kn+"*$"),En=function(e){return function(t){var n=String(ne(t));return 1&e&&(n=n.replace(_n,"")),2&e&&(n=n.replace(An,"")),n}},On={start:En(1),end:En(2),trim:En(3)},Tn=st.f,Dn=he.f,Mn=ge.f,Nn=On.trim,In=U.Number,Pn=In.prototype,$n="Number"==Q(Cn(Pn)),Rn=function(e){var t,n,r,i,o,s,a,l,c=oe(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=Nn(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(s=(o=c.slice(2)).length,a=0;a<s;a++)if((l=o.charCodeAt(a))<48||l>i)return NaN;return parseInt(o,r)}return+c};if(gt("Number",!In(" 0o1")||!In("0b1")||In("+0x1"))){for(var qn,Bn=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof Bn&&($n?W((function(){Pn.valueOf.call(n)})):"Number"!=Q(n))?mn(new In(Rn(t)),n,Bn):Rn(t)},Fn=Z?Tn(In):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Ln=0;Fn.length>Ln;Ln++)ae(In,qn=Fn[Ln])&&!ae(Bn,qn)&&Mn(Bn,qn,Dn(In,qn));Bn.prototype=Pn,Pn.constructor=Bn,ze(U,"Number",Bn)}var Vn=Et("match"),jn=function(){var e=fe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function zn(e,t){return RegExp(e,t)}var Hn={UNSUPPORTED_Y:W((function(){var e=zn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:W((function(){var e=zn("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Un=Et("species"),Wn=ge.f,Zn=st.f,Kn=je.set,Jn=Et("match"),Gn=U.RegExp,Yn=Gn.prototype,Xn=/a/g,Qn=/a/g,er=new Gn(Xn)!==Xn,tr=Hn.UNSUPPORTED_Y;if(Z&>("RegExp",!er||tr||W((function(){return Qn[Jn]=!1,Gn(Xn)!=Xn||Gn(Qn)==Qn||"/a/i"!=Gn(Xn,"i")})))){for(var nr=function(e,t){var n,r,i,o=this instanceof nr,s=ie(n=e)&&(void 0!==(r=n[Vn])?!!r:"RegExp"==Q(n)),a=void 0===t;if(!o&&s&&e.constructor===nr&&a)return e;er?s&&!a&&(e=e.source):e instanceof nr&&(a&&(t=jn.call(e)),e=e.source),tr&&(i=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var l=mn(er?new Gn(e,t):Gn(e,t),o?this:Yn,nr);return tr&&i&&Kn(l,{sticky:i}),l},rr=function(e){e in nr||Wn(nr,e,{configurable:!0,get:function(){return Gn[e]},set:function(t){Gn[e]=t}})},ir=Zn(Gn),or=0;ir.length>or;)rr(ir[or++]);Yn.constructor=nr,nr.prototype=Yn,ze(U,"RegExp",nr)}!function(e){var t=We("RegExp"),n=ge.f;Z&&t&&!t[Un]&&n(t,Un,{configurable:!0,get:function(){return this}})}();var sr=RegExp.prototype.exec,ar=String.prototype.replace,lr=sr,cr=function(){var e=/a/,t=/b*/g;return sr.call(e,"a"),sr.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),dr=Hn.UNSUPPORTED_Y||Hn.BROKEN_CARET,ur=void 0!==/()??/.exec("")[1];(cr||ur||dr)&&(lr=function(e){var t,n,r,i,o=this,s=dr&&o.sticky,a=jn.call(o),l=o.source,c=0,d=e;return s&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),d=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(l="(?: "+l+")",d=" "+d,c++),n=new RegExp("^(?:"+l+")",a)),ur&&(n=new RegExp("^"+l+"$(?!\\s)",a)),cr&&(t=o.lastIndex),r=sr.call(s?n:o,d),s?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:cr&&r&&(o.lastIndex=o.global?r.index+r[0].length:t),ur&&r&&r.length>1&&ar.call(r[0],n,(function(){var e=arguments;for(i=1;i<arguments.length-2;i++)void 0===e[i]&&(r[i]=void 0)})),r});var pr=lr;vt({target:"RegExp",proto:!0,forced:/./.exec!==pr},{exec:pr});var hr=RegExp.prototype,fr=hr.toString,mr=W((function(){return"/a/b"!=fr.call({source:"a",flags:"b"})})),gr="toString"!=fr.name;(mr||gr)&&ze(RegExp.prototype,"toString",(function(){var e=fe(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in hr)?jn.call(e):n)}),{unsafe:!0});var yr=Et("species"),vr=!W((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),br="$0"==="a".replace(/./,"$0"),wr=Et("replace"),xr=!!/./[wr]&&""===/./[wr]("a","$0"),Sr=!W((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Cr=function(e,t,n,r){var i=Et(e),o=!W((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=o&&!W((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[yr]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!s||"replace"===e&&(!vr||!br||xr)||"split"===e&&!Sr){var a=/./[i],l=n(i,""[e],(function(e,t,n,r,i){return t.exec===pr?o&&!i?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:br,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:xr}),c=l[0],d=l[1];ze(String.prototype,e,c),ze(RegExp.prototype,i,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)})}r&&ye(RegExp.prototype[i],"sham",!0)},kr=function(e){return function(t,n){var r,i,o=String(ne(t)),s=Je(n),a=o.length;return s<0||s>=a?e?"":void 0:(r=o.charCodeAt(s))<55296||r>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?e?o.charAt(s):r:e?o.slice(s,s+2):i-56320+(r-55296<<10)+65536}},_r=(kr(!1),kr(!0)),Ar=function(e,t,n){return t+(n?_r(e,t).length:1)},Er=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Q(e))throw TypeError("RegExp#exec called on incompatible receiver");return pr.call(e,t)};Cr("match",1,(function(e,t,n){return[function(t){var n=ne(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=fe(e),o=String(this);if(!i.global)return Er(i,o);var s=i.unicode;i.lastIndex=0;for(var a,l=[],c=0;null!==(a=Er(i,o));){var d=String(a[0]);l[c]=d,""===d&&(i.lastIndex=Ar(o,Ye(i.lastIndex),s)),c++}return 0===c?null:l}]}));var Or=Math.max,Tr=Math.min,Dr=Math.floor,Mr=/\$([$&'`]|\d\d?|<[^>]*>)/g,Nr=/\$([$&'`]|\d\d?)/g;for(var Ir in Cr("replace",2,(function(e,t,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=r.REPLACE_KEEPS_$0,s=i?"$":"$0";return[function(n,r){var i=ne(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!i&&o||"string"==typeof r&&-1===r.indexOf(s)){var l=n(t,e,this,r);if(l.done)return l.value}var c=fe(e),d=String(this),u="function"==typeof r;u||(r=String(r));var p=c.global;if(p){var h=c.unicode;c.lastIndex=0}for(var f=[];;){var m=Er(c,d);if(null===m)break;if(f.push(m),!p)break;""===String(m[0])&&(c.lastIndex=Ar(d,Ye(c.lastIndex),h))}for(var g,y="",v=0,b=0;b<f.length;b++){m=f[b];for(var w=String(m[0]),x=Or(Tr(Je(m.index),d.length),0),S=[],C=1;C<m.length;C++)S.push(void 0===(g=m[C])?g:String(g));var k=m.groups;if(u){var _=[w].concat(S,x,d);void 0!==k&&_.push(k);var A=String(r.apply(void 0,_))}else A=a(w,d,x,S,k,r);x>=v&&(y+=d.slice(v,x)+A,v=x+w.length)}return y+d.slice(v)}];function a(e,n,r,i,o,s){var a=r+e.length,l=i.length,c=Nr;return void 0!==o&&(o=wt(o),c=Mr),t.call(s,c,(function(t,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":c=o[s.slice(1,-1)];break;default:var d=+s;if(0===d)return t;if(d>l){var u=Dr(d/10);return 0===u?t:u<=l?void 0===i[u-1]?s.charAt(1):i[u-1]+s.charAt(1):t}c=i[d-1]}return void 0===c?"":c}))}})),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Pr=U[Ir],$r=Pr&&Pr.prototype;if($r&&$r.forEach!==nn)try{ye($r,"forEach",nn)}catch(j){$r.forEach=nn}}var Rr,qr={props:{borderColor:{type:String,required:!1,default:function(){return"lightgray"}},boxHeight:{type:String,required:!1,default:function(){return"28px"}},closeOnSelect:{type:Boolean,required:!1,default:function(){return!0}},disableSearch:{type:Boolean,required:!1,default:function(){return!1}},focusColor:{type:String,required:!1,default:function(){return"navy"}},label:{type:String,required:!1,default:function(){return"label"}},minChars:{type:Number,required:!1,default:function(){return 3}},options:{type:Array,required:!1,default:function(){return[]}},placeholder:{type:String,required:!1,default:function(){return"Search..."}},showList:{type:Boolean,required:!1,default:function(){return!0}},tabCompletion:{type:Boolean,required:!1,default:function(){return!0}},value:{type:String,required:!1,default:function(){return""}}},data:function(){return{currentSearch:this.value,listPosition:-1,isOpenList:!0,isInputFocused:!1}},computed:{borderColorStyle:function(){return"border-color: ".concat(this.borderColor)},focusStyle:function(){return"border-color: ".concat(this.focusColor,"; box-shadow: 0 0 0 1px ").concat(this.focusColor,";")},boxHeightNumber:function(){return parseInt(this.boxHeight.replace("px",""))},boxHeightStyle:function(){return"height: ".concat(this.boxHeight,"; line-height: ").concat(this.boxHeightNumber-8,"px;")},completion:function(){var e=this,t=new RegExp("^(".concat(this.currentSearch,")(.+)"),"i");return this.options.reduce((function(n,r){var i=r[e.label].match(t);return""===e.currentSearch?"":""==n&&i||i&&r.length<n.length?i[2]:n}),"")},filteredOptions:function(){var e=this,t=new RegExp("^".concat(this.currentSearch),"i"),n=this.options.filter((function(n){return n[e.label].match(t)}));return this.disableSearch?this.options:n},isOptionsListVisible:function(){return this.currentSearch.length>=this.minChars&&this.showList&&this.isOpenList&&this.filteredOptions.length>0&&this.isInputFocused},isPlaceholderVisible:function(){return!this.isInputFocused&&0===this.currentSearch.length}},watch:{value:function(){this.currentSearch!==this.value&&(this.currentSearch=this.value,this.setTextContent(this.value),this.focusInput())}},methods:{focusInput:function(){var e=this;this.isInputFocused=!0;var t=this.$refs.input;this.$nextTick((function(){if(""!==e.currentSearch){var n=document.createRange(),r=window.getSelection(),i=t.childNodes[0];n.setStart(i,i.textContent.length),n.collapse(!0),r.removeAllRanges(),r.addRange(n)}t.focus()}))},getTextContent:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$refs.input).textContent},runSpecialKeys:function(e){var t=e.key;"Tab"===t&&this.tabCompletion&&""!==this.completion?(e.preventDefault(),this.currentSearch+=this.completion,this.setTextContent(this.currentSearch),this.focusInput()):"ArrowDown"===t||"Down"===t?(e.preventDefault(),this.listPosition<this.filteredOptions.length-1&&(this.listPosition+=1)):"ArrowUp"===t||"Up"===t?(e.preventDefault(),this.listPosition>-1&&(this.listPosition-=1)):"Enter"===t&&(e.preventDefault(),this.listPosition>-1?this.selectCurrentOption():this.triggerSearch())},selectCurrentOption:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.filteredOptions[this.listPosition];this.currentSearch=e[this.label],this.setTextContent(this.currentSearch),this.listPosition=-1,this.$emit("selected",e),this.isOpenList=!this.closeOnSelect,this.focusInput()},setTextContent:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$refs.input).textContent=e},triggerSearch:function(){this.$emit("searched",this.currentSearch),this.isOpenList=!this.closeOnSelect},updateValue:function(e){var t=this.getTextContent();t!==this.currentSearch&&(this.currentSearch=t,this.isOpenList=!0,this.$emit("input",this.currentSearch))}},mounted:function(){var e=this;new MutationObserver((function(t){t.forEach((function(t){var n=0===Array.prototype.slice.call(t.addedNodes).filter((function(e){return 3!==e.nodeType})).length,r=0===Array.prototype.slice.call(t.removedNodes).filter((function(e){return 3!==e.nodeType})).length;("characterData"===t.type||n&&r)&&e.updateValue()}))})).observe(this.$refs.input,{childList:!0,characterData:!0,subtree:!0})}},Br="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()),Fr={},Lr=qr,Vr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"om-root",style:e.boxHeightStyle},[n("div",{staticClass:"om-search-container",class:{"om-has-focus":e.isInputFocused},style:e.isInputFocused?e.focusStyle:e.borderColorStyle,on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)}}},[n("label",{class:{"om-placeholder":e.isPlaceholderVisible,"om-visually-hidden":!e.isPlaceholderVisible},attrs:{for:"input-box"},on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)}}},[e._v(e._s(e.placeholder))]),e._v(" "),n("div",{ref:"input",staticClass:"om-input single-line",class:{"om-visually-hidden":e.isPlaceholderVisible,"om-width--auto":e.isInputFocused,"om-width--full":!e.isInputFocused},style:e.boxHeightStyle,attrs:{id:"input-box",role:"textbox",contenteditable:"true"},on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)},keydown:function(t){return t.stopPropagation(),e.runSpecialKeys(t)},focusout:function(t){e.isInputFocused=!1}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isInputFocused,expression:"isInputFocused"}],staticClass:"om-completion",style:e.boxHeightStyle,on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)}}},[e._v(e._s(e.completion))])]),e._v(" "),n("div",{staticClass:"om-list-container"},[e.isOptionsListVisible?n("div",{staticClass:"om-list",style:"border-color: "+e.borderColor+";"},e._l(e.filteredOptions,(function(t,r){return n("div",{key:t[e.label]+r,staticClass:"om-list-item",class:{"om-highlight":r===e.listPosition},on:{mousedown:function(n){return n.stopPropagation(),n.preventDefault(),e.selectCurrentOption(t)}}},[e._t("option",[e._v("\n "+e._s(t[e.label])+"\n ")],{option:t})],2)})),0):e._e()])])};Vr._withStripped=!0;var jr=function(e,t,n,r,i,o,s,a,l,c){"boolean"!=typeof s&&(a,a=s,s=!1);var d,u="function"==typeof n?n.options:n;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),r&&(u._scopeId=r),t&&(d=s?function(e){t.call(this,undefined(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),d)if(u.functional){var p=u.render;u.render=function(e,t){return d.call(t),p(e,t)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,d):[d]}return n}({render:Vr,staticRenderFns:[]},(function(e){e&&e("data-v-2b4e60fc_0",{source:'\n*[data-v-2b4e60fc] {\n box-sizing: border-box;\n}\n.om-root[data-v-2b4e60fc] {\n position: relative;\n}\n.om-input[data-v-2b4e60fc] {\n padding-top: 4px;\n padding-bottom: 4px;\n padding-left: 8px;\n height: 100%;\n}\n.om-input[data-v-2b4e60fc]:focus {\n border: none;\n outline: none;\n}\n\n/* This is needed because in firefox the caret position is not vertically centered when the span is empty */\n.om-input[data-v-2b4e60fc]:before {\n content: \' \'\n}\n.om-completion[data-v-2b4e60fc] {\n height: 100%;\n width: auto;\n max-width: 100%;\n padding-top: 4px;\n padding-bottom: 4px;\n color: lightgray;\n overflow: hidden;\n white-space: pre;\n display: flex;\n align-items: center;\n}\n[contenteditable="true"].single-line[data-v-2b4e60fc] {\n white-space: pre;\n overflow: hidden;\n}\n[contenteditable="true"].single-line br[data-v-2b4e60fc] {\n display:none;\n}\n[contenteditable="true"].single-line *[data-v-2b4e60fc] {\n display:inline;\n white-space:nowrap;\n}\n.om-width--auto[data-v-2b4e60fc] {\n width: auto;\n min-width: 10px;\n}\n.om-width--full[data-v-2b4e60fc] {\n width: 100%;\n}\n.om-placeholder[data-v-2b4e60fc] {\n display: block;\n height: 100%;\n width: 100%;\n float: left;\n color: darkgray;\n display: flex;\n align-items: center;\n margin: 0;\n padding: 4px 8px;\n}\n.om-list-container[data-v-2b4e60fc] {\n position: relative;\n}\n.om-list[data-v-2b4e60fc] {\n position: absolute;\n width: 100%;\n border-left: 1px solid lightgray;\n border-right: 1px solid lightgray;\n border-bottom: 1px solid lightgray;\n padding: 4px 8px;\n background-color: white;\n z-index: 1001;\n}\n.om-highlight[data-v-2b4e60fc] {\n background-color: lightgrey;\n}\n.om-list-item[data-v-2b4e60fc] {\n font-weight: 500;\n cursor: pointer;\n}\n.om-list-item[data-v-2b4e60fc]:hover {\n background-color: lightgray;\n}\n.om-search-container[data-v-2b4e60fc] {\n border: 1px solid lightgray;\n display: flex;\n padding: 0;\n border-radius: 3px;\n height: 100%;\n padding-right: 8px;\n}\n.om-visually-hidden[data-v-2b4e60fc]:not(:focus):not(:active) {\n position: absolute !important;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px); /* IE6, IE7 */\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap; /* added line */\n}\n',map:{version:3,sources:["/home/mathis/Development/vue-omnibox/src/Omnibox.vue"],names:[],mappings:";AA8PA;EACA,sBAAA;AACA;AACA;EACA,kBAAA;AACA;AAEA;EACA,gBAAA;EACA,mBAAA;EACA,iBAAA;EACA,YAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;AACA;;AAEA,2GAAA;AACA;EACA;AACA;AAEA;EACA,YAAA;EACA,WAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,gBAAA;EACA,gBAAA;EACA,aAAA;EACA,mBAAA;AACA;AACA;EACA,gBAAA;EACA,gBAAA;AACA;AACA;EACA,YAAA;AAEA;AACA;EACA,cAAA;EACA,kBAAA;AACA;AAEA;EACA,WAAA;EACA,eAAA;AACA;AAEA;EACA,WAAA;AACA;AAEA;EACA,cAAA;EACA,YAAA;EACA,WAAA;EACA,WAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,SAAA;EACA,gBAAA;AACA;AACA;EACA,kBAAA;AACA;AACA;EACA,kBAAA;EACA,WAAA;EACA,gCAAA;EACA,iCAAA;EACA,kCAAA;EACA,gBAAA;EACA,uBAAA;EACA,aAAA;AACA;AACA;EACA,2BAAA;AACA;AACA;EACA,gBAAA;EACA,eAAA;AACA;AAEA;EACA,2BAAA;AACA;AAEA;EACA,2BAAA;EACA,aAAA;EACA,UAAA;EACA,kBAAA;EACA,YAAA;EACA,kBAAA;AACA;AAEA;EACA,6BAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,2BAAA,EAAA,aAAA;EACA,8BAAA;EACA,mBAAA,EAAA,eAAA;AACA",file:"Omnibox.vue",sourcesContent:['<template>\n <div class="om-root" :style="boxHeightStyle">\n <div\n class="om-search-container"\n @mousedown.stop.prevent="focusInput"\n :class="{ \'om-has-focus\': isInputFocused }"\n :style="isInputFocused ? focusStyle : borderColorStyle">\n <label\n for="input-box"\n @mousedown.stop.prevent="focusInput"\n :class="{ \'om-placeholder\': isPlaceholderVisible, \'om-visually-hidden\': !isPlaceholderVisible}">{{ placeholder }}</label>\n <div\n id="input-box"\n role="textbox"\n ref="input"\n class="om-input single-line"\n :class="{\n \'om-visually-hidden\': isPlaceholderVisible,\n \'om-width--auto\': isInputFocused,\n \'om-width--full\': !isInputFocused }"\n contenteditable="true"\n :style="boxHeightStyle"\n @mousedown.stop.prevent="focusInput"\n @keydown.stop="runSpecialKeys"\n @focusout="isInputFocused = false">\n </div>\n <div\n v-show="isInputFocused"\n class="om-completion"\n :style="boxHeightStyle"\n @mousedown.stop.prevent="focusInput">{{ completion }}</div>\n </div>\n <div class="om-list-container">\n <div\n class="om-list"\n :style="`border-color: ${borderColor};`"\n v-if="isOptionsListVisible">\n <div\n v-for="(option, idx) in filteredOptions"\n class="om-list-item"\n :class="{ \'om-highlight\': idx === listPosition }"\n :key="option[label] + idx"\n @mousedown.stop.prevent="selectCurrentOption(option)">\n <slot name="option" v-bind:option="option">\n {{ option[label] }}\n </slot>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nexport default {\n props: {\n borderColor: {\n type: String,\n required: false,\n default: () => \'lightgray\'\n },\n boxHeight: {\n type: String,\n required: false,\n default: () => \'28px\'\n },\n closeOnSelect: {\n type: Boolean,\n required: false,\n default: () => true\n },\n disableSearch: {\n type: Boolean,\n required: false,\n default: () => false\n },\n focusColor: {\n type: String,\n required: false,\n default: () => \'navy\'\n },\n label: {\n type: String,\n required: false,\n default: () => \'label\'\n },\n minChars: {\n type: Number,\n required: false,\n default: () => 3\n },\n options: {\n type: Array,\n required: false,\n default: () => ([])\n },\n placeholder: {\n type: String,\n required: false,\n default: () => \'Search...\'\n },\n showList: {\n type: Boolean,\n required: false,\n default: () => true\n },\n tabCompletion: {\n type: Boolean,\n required: false,\n default: () => true\n },\n value: {\n type: String,\n required: false,\n default: () => \'\'\n }\n },\n data () {\n return {\n currentSearch: this.value,\n listPosition: -1,\n isOpenList: true,\n isInputFocused: false\n }\n },\n computed: {\n borderColorStyle () {\n return `border-color: ${this.borderColor}`\n },\n focusStyle () {\n return `border-color: ${this.focusColor}; box-shadow: 0 0 0 1px ${this.focusColor};`\n },\n boxHeightNumber () {\n return parseInt(this.boxHeight.replace(\'px\', \'\'))\n },\n boxHeightStyle () {\n return `height: ${this.boxHeight}; line-height: ${this.boxHeightNumber - 8}px;`\n },\n completion () {\n const reg = new RegExp(`^(${this.currentSearch})(.+)`, \'i\')\n return this.options.reduce((acc, val) => {\n const isMatching = val[this.label].match(reg)\n if (this.currentSearch === \'\') return \'\'\n if (acc == \'\' && isMatching) return isMatching[2]\n if (isMatching && val.length < acc.length) return isMatching[2]\n return acc\n }, \'\')\n },\n filteredOptions () {\n const reg = new RegExp(`^${this.currentSearch}`, \'i\')\n const filtered = this.options.filter(o => o[this.label].match(reg))\n return this.disableSearch ? this.options : filtered\n },\n isOptionsListVisible () {\n return this.currentSearch.length >= this.minChars && this.showList && this.isOpenList && this.filteredOptions.length > 0 && this.isInputFocused\n },\n isPlaceholderVisible () {\n return (!this.isInputFocused && this.currentSearch.length === 0)\n }\n },\n watch: {\n value () {\n if (this.currentSearch !== this.value) {\n this.currentSearch = this.value\n this.setTextContent(this.value)\n this.focusInput()\n }\n }\n },\n methods: {\n focusInput () {\n this.isInputFocused = true\n const el = this.$refs.input\n this.$nextTick(() => {\n if (this.currentSearch !== \'\') {\n let range = document.createRange()\n let sel = window.getSelection()\n let node = el.childNodes[0]\n range.setStart(node, node.textContent.length)\n range.collapse(true)\n sel.removeAllRanges()\n sel.addRange(range)\n }\n el.focus()\n })\n },\n getTextContent (el = this.$refs.input) {\n return el.textContent\n },\n runSpecialKeys (e) {\n const key = e.key\n if (key === \'Tab\' && this.tabCompletion && this.completion !== \'\') {\n e.preventDefault()\n this.currentSearch += this.completion\n this.setTextContent(this.currentSearch)\n this.focusInput()\n } else if (key === \'ArrowDown\' || key === \'Down\') {\n e.preventDefault()\n if (this.listPosition < this.filteredOptions.length - 1) {\n this.listPosition += 1\n }\n } else if (key === "ArrowUp" || key === \'Up\') {\n e.preventDefault()\n if (this.listPosition > -1) {\n this.listPosition -= 1\n }\n } else if (key === \'Enter\') {\n e.preventDefault()\n if (this.listPosition > -1) {\n this.selectCurrentOption()\n } else {\n this.triggerSearch()\n }\n }\n },\n selectCurrentOption (option = this.filteredOptions[this.listPosition]) {\n this.currentSearch = option[this.label]\n this.setTextContent(this.currentSearch)\n this.listPosition = -1\n this.$emit(\'selected\', option)\n this.isOpenList = !this.closeOnSelect\n this.focusInput()\n },\n setTextContent (value, el = this.$refs.input) {\n el.textContent = value\n },\n triggerSearch () {\n this.$emit(\'searched\', this.currentSearch)\n this.isOpenList = !this.closeOnSelect\n },\n updateValue (e) {\n const content = this.getTextContent()\n if (content !== this.currentSearch) {\n this.currentSearch = content\n this.isOpenList = true\n this.$emit(\'input\', this.currentSearch)\n }\n }\n },\n mounted () {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n const onlyTextAdded = Array.prototype.slice.call(mutation.addedNodes).filter(n => n.nodeType !== 3).length === 0\n const onlyTextRemoved = Array.prototype.slice.call(mutation.removedNodes).filter(n => n.nodeType !== 3).length === 0\n const isTextInput = mutation.type === \'characterData\' || (onlyTextAdded && onlyTextRemoved)\n if (isTextInput) {\n this.updateValue()\n }\n });\n });\n\n observer.observe(this.$refs.input, { childList: true, characterData: true, subtree: true })\n }\n}\n<\/script>\n<style scoped>\n * {\n box-sizing: border-box;\n }\n .om-root {\n position: relative;\n }\n\n .om-input {\n padding-top: 4px;\n padding-bottom: 4px;\n padding-left: 8px;\n height: 100%;\n }\n .om-input:focus {\n border: none;\n outline: none;\n }\n\n /* This is needed because in firefox the caret position is not vertically centered when the span is empty */\n .om-input:before {\n content: \' \'\n }\n\n .om-completion {\n height: 100%;\n width: auto;\n max-width: 100%;\n padding-top: 4px;\n padding-bottom: 4px;\n color: lightgray;\n overflow: hidden;\n white-space: pre;\n display: flex;\n align-items: center;\n }\n [contenteditable="true"].single-line {\n white-space: pre;\n overflow: hidden;\n }\n [contenteditable="true"].single-line br {\n display:none;\n\n }\n [contenteditable="true"].single-line * {\n display:inline;\n white-space:nowrap;\n }\n\n .om-width--auto {\n width: auto;\n min-width: 10px;\n }\n\n .om-width--full {\n width: 100%;\n }\n\n .om-placeholder {\n display: block;\n height: 100%;\n width: 100%;\n float: left;\n color: darkgray;\n display: flex;\n align-items: center;\n margin: 0;\n padding: 4px 8px;\n }\n .om-list-container {\n position: relative;\n }\n .om-list {\n position: absolute;\n width: 100%;\n border-left: 1px solid lightgray;\n border-right: 1px solid lightgray;\n border-bottom: 1px solid lightgray;\n padding: 4px 8px;\n background-color: white;\n z-index: 1001;\n }\n .om-highlight {\n background-color: lightgrey;\n }\n .om-list-item {\n font-weight: 500;\n cursor: pointer;\n }\n\n .om-list-item:hover {\n background-color: lightgray;\n }\n\n .om-search-container {\n border: 1px solid lightgray;\n display: flex;\n padding: 0;\n border-radius: 3px;\n height: 100%;\n padding-right: 8px;\n }\n\n .om-visually-hidden:not(:focus):not(:active) {\n position: absolute !important;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px); /* IE6, IE7 */\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap; /* added line */\n }\n</style>\n']},media:void 0})}),Lr,"data-v-2b4e60fc",0,0,!1,(function(e){return function(e,t){return function(e,t){var n=Br?t.media||"default":e,r=Fr[n]||(Fr[n]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);var i=t.source;if(t.map&&(i+="\n/*# sourceURL="+t.map.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",t.media&&r.element.setAttribute("media",t.media),void 0===Rr&&(Rr=document.head||document.getElementsByTagName("head")[0]),Rr.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(i),r.element.styleSheet.cssText=r.styles.filter(Boolean).join("\n");else{var o=r.ids.size-1,s=document.createTextNode(i),a=r.element.childNodes;a[o]&&r.element.removeChild(a[o]),a.length?r.element.insertBefore(s,a[o]):r.element.appendChild(s)}}}(e,t)}})),zr={install:function e(t){e.installed||(e.installed=!0,t.component("Omnibox",component))}},Hr=null;"undefined"!=typeof window?Hr=window.Vue:void 0!==s.g&&(Hr=s.g.Vue),Hr&&Hr.use(zr);const Ur={name:"DpAutocomplete",components:{VueOmnibox:jr},mixins:[V.gH],props:{height:{type:String,required:!1,default:"28px"},label:{type:String,required:!1,default:()=>"label"},options:{type:Array,required:!1,default:()=>[]},placeholder:{type:String,required:!1,default:()=>Translator.trans("search")},routeGenerator:{type:Function,required:!0},value:{type:String,required:!1,default:""}},data(){return{currentQuery:this.value,isLoading:!1}},watch:{value(){this.currentQuery!==this.value&&(this.currentQuery=this.value)}},methods:{emit(e,t){this.$emit(t,e)},emitAndFetch(e){this.emit(e,"input"),this.currentQuerry=e,e.length>=3&&this.fetchOptions(e)},async fetchOptions(e){this.isLoading=!0;try{const t=this.routeGenerator(e),n=await C.get(t);this.currentQuerry===e&&this.$emit("search-changed",n),this.isLoading=!1}catch(e){console.log(e)}}}},Wr=Ur,Zr=(0,l.Z)(Wr,(function(){var e=this;return(0,e._self._c)("vue-omnibox",{attrs:{"box-height":e.height,"disable-search":!0,label:e.label,options:e.options,placeholder:e.placeholder,value:e.currentQuery},on:{input:e.emitAndFetch,searched:function(t){return e.emit(t,"searched")},selected:function(t){return e.emit(t,"selected")}},scopedSlots:e._u([e._l(e.$scopedSlots,(function(t,n){return{key:n,fn:function(t){return[e._t(n,null,null,t)]}}}))],null,!0)})}),[],!1,null,null,null).exports,Kr=function(e,t){const n={},r={},i=[];let o={};Object.keys(t).forEach((r=>{n[r]=e[t[r]]})),o={...e,...n};for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&i.push(e);i.sort();for(const e of i)r[e]=o[e];return r}({ai:{phosphorName:"robot",path:"M200 48h-64V16a8 8 0 0 0-16 0v32H56a32 32 0 0 0-32 32v112a32 32 0 0 0 32 32h144a32 32 0 0 0 32-32V80a32 32 0 0 0-32-32Zm16 144a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V80a16 16 0 0 1 16-16h144a16 16 0 0 1 16 16Zm-52-56H92a28 28 0 0 0 0 56h72a28 28 0 0 0 0-56Zm-28 16v24h-16v-24Zm-56 12a12 12 0 0 1 12-12h12v24H92a12 12 0 0 1-12-12Zm84 12h-12v-24h12a12 12 0 0 1 0 24Zm-92-68a12 12 0 1 1 12 12 12 12 0 0 1-12-12Zm88 0a12 12 0 1 1 12 12 12 12 0 0 1-12-12Z"},"arrow-left":{path:"M224 128a8 8 0 0 1-8 8H59.31l58.35 58.34a8 8 0 0 1-11.32 11.32l-72-72a8 8 0 0 1 0-11.32l72-72a8 8 0 0 1 11.32 11.32L59.31 120H216a8 8 0 0 1 8 8Z",proportions:"landscape"},"arrow-right":{path:"m221.66 133.66-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32Z",proportions:"landscape"},check:{phosphorName:"check",weight:"bold",path:"m232.49 80.49-128 128a12 12 0 0 1-17 0l-56-56a12 12 0 1 1 17-17L96 183 215.51 63.51a12 12 0 0 1 17 17Z",proportions:"landscape"},"chevron-down":{phosphorName:"caret-down",path:"m213.66 101.66-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z",proportions:"landscape"},"chevron-up":{phosphorName:"caret-up",path:"M213.66 165.66a8 8 0 0 1-11.32 0L128 91.31l-74.34 74.35a8 8 0 0 1-11.32-11.32l80-80a8 8 0 0 1 11.32 0l80 80a8 8 0 0 1 0 11.32Z",proportions:"landscape"},"chevron-left":{phosphorName:"caret-left",path:"M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z",proportions:"portrait"},"chevron-right":{phosphorName:"caret-right",path:"m181.66 133.66-80 80a8 8 0 0 1-11.32-11.32L164.69 128 90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32Z",proportions:"portrait"},clock:{path:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm64-88a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8V72a8 8 0 0 1 16 0v48h48a8 8 0 0 1 8 8Z"},compress:{path:"M152 96V48a8 8 0 0 1 16 0v40h40a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8Zm-56 56H48a8 8 0 0 0 0 16h40v40a8 8 0 0 0 16 0v-48a8 8 0 0 0-8-8Zm112 0h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 16 0v-40h40a8 8 0 0 0 0-16ZM96 40a8 8 0 0 0-8 8v40H48a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z"},copy:{path:"M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8Zm-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z"},delete:{path:"M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16ZM96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Z"},download:{phosphorName:"download-simple",weight:"fill",path:"M82.34 117.66A8 8 0 0 1 88 104h32V40a8 8 0 0 1 16 0v64h32a8 8 0 0 1 5.66 13.66l-40 40a8 8 0 0 1-11.32 0ZM216 144a8 8 0 0 0-8 8v56H48v-56a8 8 0 0 0-16 0v56a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16v-56a8 8 0 0 0-8-8Z"},"drag-handle":{path:"M108 60a16 16 0 1 1-16-16 16 16 0 0 1 16 16Zm56 16a16 16 0 1 0-16-16 16 16 0 0 0 16 16Zm-72 36a16 16 0 1 0 16 16 16 16 0 0 0-16-16Zm72 0a16 16 0 1 0 16 16 16 16 0 0 0-16-16Zm-72 68a16 16 0 1 0 16 16 16 16 0 0 0-16-16Zm72 0a16 16 0 1 0 16 16 16 16 0 0 0-16-16Z",proportions:"portrait"},edit:{phosphorName:"pencil-simple",path:"m227.31 73.37-44.68-44.69a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h44.69a15.86 15.86 0 0 0 11.31-4.69L227.31 96a16 16 0 0 0 0-22.63ZM92.69 208H48v-44.69l88-88L180.69 120ZM192 108.68 147.31 64l24-24L216 84.68Z"},expand:{path:"M216 48v40a8 8 0 0 1-16 0V56h-32a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8ZM88 200H56v-32a8 8 0 0 0-16 0v40a8 8 0 0 0 8 8h40a8 8 0 0 0 0-16Zm120-40a8 8 0 0 0-8 8v32h-32a8 8 0 0 0 0 16h40a8 8 0 0 0 8-8v-40a8 8 0 0 0-8-8ZM88 40H48a8 8 0 0 0-8 8v40a8 8 0 0 0 16 0V56h32a8 8 0 0 0 0-16Z"},file:{path:"m213.66 82.34-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66ZM160 51.31 188.69 80H160ZM200 216H56V40h88v48a8 8 0 0 0 8 8h48v120Z"},highlighter:{path:"m227.32 73.37-44.69-44.68a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h168a8 8 0 0 0 0-16H115.32l112-112a16 16 0 0 0 0-22.63ZM136 75.31 152.69 92 68 176.69 51.31 160ZM48 208v-28.69L76.69 208Zm48-3.31L79.32 188 164 103.31 180.69 120Zm96-96L147.32 64l24-24L216 84.69Z"},history:{path:"M136 80v43.47l36.12 21.67a8 8 0 0 1-8.24 13.72l-40-24A8 8 0 0 1 120 128V80a8 8 0 0 1 16 0Zm-8-48a95.44 95.44 0 0 0-67.92 28.15C52.81 67.51 46.35 74.59 40 82V64a8 8 0 0 0-16 0v40a8 8 0 0 0 8 8h40a8 8 0 0 0 0-16H49c7.15-8.42 14.27-16.35 22.39-24.57a80 80 0 1 1 1.66 114.75 8 8 0 1 0-11 11.64A96 96 0 1 0 128 32Z"},hourglass:{path:"M200 75.64V40a16 16 0 0 0-16-16H72a16 16 0 0 0-16 16v36a16.07 16.07 0 0 0 6.4 12.8l52.27 39.2-52.27 39.2A16.07 16.07 0 0 0 56 180v36a16 16 0 0 0 16 16h112a16 16 0 0 0 16-16v-35.64a16.09 16.09 0 0 0-6.35-12.77L141.27 128l52.38-39.59A16.09 16.09 0 0 0 200 75.64Zm-16 104.72V216H72v-36l48-36v24a8 8 0 0 0 16 0v-23.92Zm0-104.72L178.23 80H77.33L72 76V40h112Z",proportions:"portrait"},info:{path:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm16-40a8 8 0 0 1-8 8 16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16 16 16 0 0 1 16 16v40a8 8 0 0 1 8 8Zm-32-92a12 12 0 1 1 12 12 12 12 0 0 1-12-12Z"},lock:{path:"M208 80h-32V56a48 48 0 0 0-96 0v24H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16ZM96 56a32 32 0 0 1 64 0v24H96Zm112 152H48V96h160v112Z"},mail:{path:"M224 48H32a8 8 0 0 0-8 8v136a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a8 8 0 0 0-8-8Zm-20.57 16L128 133.15 52.57 64ZM216 192H40V74.19l82.59 75.71a8 8 0 0 0 10.82 0L216 74.19V192Z",proportions:"landscape"},refresh:{phosphorName:"arrows-clockwise",path:"M197.67 186.37a8 8 0 0 1 0 11.29C196.58 198.73 170.82 224 128 224c-37.39 0-64.53-22.4-80-39.85V208a8 8 0 0 1-16 0v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16H55.44C67.76 183.35 93 208 128 208c36 0 58.14-21.46 58.36-21.68a8 8 0 0 1 11.31.05ZM216 40a8 8 0 0 0-8 8v23.85C192.53 54.4 165.39 32 128 32c-42.82 0-68.58 25.27-69.66 26.34a8 8 0 0 0 11.3 11.34C69.86 69.46 92 48 128 48c35 0 60.24 24.65 72.56 40H168a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z"},search:{path:"m229.66 218.34-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32ZM40 112a72 72 0 1 1 72 72 72.08 72.08 0 0 1-72-72Z"},settings:{path:"M237.94 107.21a8 8 0 0 0-3.89-5.4l-29.83-17-.12-33.62a8 8 0 0 0-2.83-6.08 111.91 111.91 0 0 0-36.72-20.67 8 8 0 0 0-6.46.59L128 41.85 97.88 25a8 8 0 0 0-6.47-.6 111.92 111.92 0 0 0-36.68 20.75 8 8 0 0 0-2.83 6.07l-.15 33.65-29.83 17a8 8 0 0 0-3.89 5.4 106.47 106.47 0 0 0 0 41.56 8 8 0 0 0 3.89 5.4l29.83 17 .12 33.63a8 8 0 0 0 2.83 6.08 111.91 111.91 0 0 0 36.72 20.67 8 8 0 0 0 6.46-.59L128 214.15 158.12 231a7.91 7.91 0 0 0 3.9 1 8.09 8.09 0 0 0 2.57-.42 112.1 112.1 0 0 0 36.68-20.73 8 8 0 0 0 2.83-6.07l.15-33.65 29.83-17a8 8 0 0 0 3.89-5.4 106.47 106.47 0 0 0-.03-41.52ZM128 168a40 40 0 1 1 40-40 40 40 0 0 1-40 40Z"},success:{path:"M173.66 98.34a8 8 0 0 1 0 11.32l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 0ZM232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104Zm-16 0a88 88 0 1 0-88 88 88.1 88.1 0 0 0 88-88Z"},tag:{path:"M243.31 136 144 36.69A15.86 15.86 0 0 0 132.69 32H40a8 8 0 0 0-8 8v92.69A15.86 15.86 0 0 0 36.69 144L136 243.31a16 16 0 0 0 22.63 0l84.68-84.68a16 16 0 0 0 0-22.63Zm-96 96L48 132.69V48h84.69L232 147.31ZM96 84a12 12 0 1 1-12-12 12 12 0 0 1 12 12Z"},unlock:{path:"M208 80H96V56a32 32 0 0 1 32-32c15.37 0 29.2 11 32.16 25.59a8 8 0 0 0 15.68-3.18C171.32 24.15 151.2 8 128 8a48.05 48.05 0 0 0-48 48v24H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16Zm0 128H48V96h160v112Z"},user:{path:"M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 13.85-8ZM72 96a56 56 0 1 1 56 56 56.06 56.06 0 0 1-56-56Z"},userSolid:{path:"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8Z"},xmark:{path:"M208.49 191.51a12 12 0 0 1-17 17L128 145l-63.51 63.49a12 12 0 0 1-17-17L111 128 47.51 64.49a12 12 0 0 1 17-17L128 111l63.51-63.52a12 12 0 0 1 17 17L145 128Z"}},{cancel:"xmark",close:"xmark",remove:"xmark"}),Jr={small:16,medium:20,large:28},Gr={name:"DpIcon",props:{icon:{type:String,required:!0},size:{type:String,required:!1,default:"medium",validator:e=>Object.keys(Jr).includes(e)}},computed:{pxSize(){return Jr[this.size]},path(){return Kr[this.icon].path},proportionClass(){return Kr[this.icon]?.proportions||"square"}}},Yr=(0,l.Z)(Gr,(function(){var e=this,t=e._self._c;return t("svg",{staticClass:"c-icon",class:e.proportionClass,attrs:{height:e.pxSize,width:e.pxSize,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:e.path}})])}),[],!1,null,null,null).exports,Xr=require("@braintree/sanitize-url"),Qr={name:"DpButton",components:{DpIcon:Yr},directives:{tooltip:n.u},props:{busy:{required:!1,type:Boolean,default:!1},color:{required:!1,type:String,default:"primary",validator:e=>["primary","secondary","warning"].includes(e)},hideText:{required:!1,type:Boolean,default:!1},href:{required:!1,type:String,default:"#"},icon:{required:!1,type:String,default:""},iconAfter:{required:!1,type:String,default:""},text:{required:!1,type:String,default:"save"},type:{required:!1,type:String,default:"button",validator:e=>["button","submit"].includes(e)},variant:{required:!1,type:String,default:"solid",validator:e=>["solid","outline","subtle"].includes(e)}},computed:{classes(){return["btn inline-flex items-center space-inline-xs",this.busy&&"is-busy pointer-events-none",this.iconOnly&&"icon-only",["primary","secondary","warning"].includes(this.color)&&ei.color[this.color],["solid","outline","subtle"].includes(this.variant)&&ei.variant[this.variant]]},element(){return this.isButtonElement?"button":"a"},iconOnly(){return(this.icon||this.iconAfter)&&this.hideText},isButtonElement(){return"#"===this.href},sanitizedHref(){return(0,Xr.sanitizeUrl)(this.href)}},mounted(){this.icon||this.iconAfter||!this.hideText||console.error("A DpButton instance is used without icon or visible text. Consider showing something to users.")}},ei={color:{primary:"btn--primary",secondary:"btn--secondary",warning:"btn--warning"},variant:{solid:"btn--solid",outline:"btn--outline",subtle:"btn--subtle"}},ti=Qr,ni=(0,l.Z)(ti,(function(){var e=this,t=e._self._c;return t(e.element,e._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:e.iconOnly?e.text:null,expression:"iconOnly ? text : null"}],tag:"component",class:e.classes,attrs:{type:e.isButtonElement&&e.type,href:!e.isButtonElement&&e.sanitizedHref,"aria-hidden":e.busy}},e.$listeners),[e.icon?t("dp-icon",{attrs:{"aria-hidden":"true",icon:e.icon,size:"small"}}):e._e(),e._v(" "),t("span",{class:{"hide-visually":e.hideText},domProps:{textContent:e._s(e.text)}}),e._v(" "),e.iconAfter?t("dp-icon",{attrs:{"aria-hidden":"true",icon:e.iconAfter,size:"small"}}):e._e()],1)}),[],!1,null,null,null).exports,ri={name:"DpButtonIcon",props:{icon:{type:String,required:!0},text:{type:String,required:!0}},directives:{tooltip:n.u},computed:{translatedText(){return Translator.trans(this.text)}}},ii=(0,l.Z)(ri,(function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.translatedText,delay:{show:1e3,hide:200}},expression:"{\n content: translatedText,\n delay: { show: 1000, hide: 200 }\n }"}],staticClass:"btn--icon",on:{click:function(t){return e.$emit("click")}}},[t("i",{class:`fa ${e.icon}`,attrs:{"aria-hidden":"true"}}),e._v(" "),t("span",{staticClass:"hide-visually"},[e._v(e._s(e.translatedText))])])}),[],!1,null,null,null).exports,oi={name:"DpButtonRow",components:{DpButton:ni},props:{align:{type:String,required:!1,default:"right"},busy:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},href:{type:String,required:!1,default:"#"},primary:{type:Boolean,required:!1,default:!1},primaryText:{type:String,required:!1,default:()=>Translator.trans("save")},secondary:{type:Boolean,required:!1,default:!1},secondaryText:{type:String,required:!1,default:()=>Translator.trans("abort")},variant:{required:!1,type:String,default:""}}},si=(0,l.Z)(oi,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"space-inline-s",class:[`text--${e.align}`,e.$attrs.class]},[e.primary?t("dp-button",{attrs:{busy:e.busy,disabled:e.disabled,text:e.primaryText,variant:e.variant,"data-cy":"saveButton"},on:{click:function(t){return t.preventDefault(),e.$emit("primary-action")}}}):e._e(),e._v(" "),e.secondary?t("dp-button",{attrs:{color:"secondary",href:e.href,text:e.secondaryText,variant:e.variant},on:{click:function(t){return t.preventDefault(),e.$emit("secondary-action")}}}):e._e(),e._v(" "),e._t("default")],2)}),[],!1,null,null,null).exports,ai={name:"DpContextualHelp",props:{text:{type:String,required:!0}},directives:{tooltip:n.u}},li=(0,l.Z)(ai,(function(){var e=this;return(0,e._self._c)("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.text,expression:"text"}],staticClass:"fa fa-question-circle",attrs:{"aria-label":e.Translator.trans("contextual.help")}})}),[],!1,null,null,null).exports,ci={name:"DpCard",components:{DpContextualHelp:li},props:{heading:{type:String,required:!1,default:""},headingTooltip:{type:String,required:!1,default:""}}},di=(0,l.Z)(ci,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"box-shadow-1 space-inset-m"},[""!==e.heading?t("h4",{staticClass:"u-mb-0 space-inline-xs"},[t("span",[e._v("\n "+e._s(e.heading)+"\n ")]),e._v(" "),""!==e.headingTooltip?t("dp-contextual-help",{attrs:{text:e.headingTooltip}}):e._e()],1):e._e(),e._t("default")],2)}),[],!1,null,null,null).exports;var ui=s(3275);const pi={name:"DpCheckbox",components:{DpLabel:ui.default},mixins:[V.gH],model:{prop:"checked",event:"change"},props:{checked:{type:Boolean,required:!1,default:!1},dataCy:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},label:{type:Object,default:()=>({}),validator:e=>Object.keys(e).every((e=>["bold","hint","text","tooltip"].includes(e)))},name:{type:String,required:!1,default:""},readonly:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},valueToSend:{type:String,required:!1,default:"1"}}},hi=pi,fi=(0,l.Z)(hi,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("o-form__element--checkbox")},[t("input",{class:e.prefixClass("o-form__control-input"),attrs:{id:e.id,name:""!==e.name&&e.name,type:"checkbox",required:e.required,disabled:e.disabled,readonly:e.readonly,autocomplete:"off","data-cy":""!==e.dataCy&&e.dataCy,"true-value":"1","false-value":"0"},domProps:{checked:e.checked,value:e.valueToSend},on:{change:function(t){return e.$emit("change",t.target.checked)}}}),e._v(" "),""!==e.label.text?t("dp-label",e._b({class:e.prefixClass("o-form__label")},"dp-label",{bold:!1,text:"",for:e.id,required:e.required,...e.label},!1)):e._e()],1)}),[],!1,null,null,null).exports,mi={name:"DpCheckboxGroup",components:{DpCheckbox:fi},directives:{cleanhtml:n.J7},props:{options:{type:Array,required:!0},label:{type:String,required:!1,default:""},inline:{type:Boolean,default:!1},selectedOptions:{type:Object,default:()=>({})}},data:()=>({selected:{}}),watch:{selectedOptions(){this.selected=this.selectedOptions}},methods:{setSelected(){this.options.forEach((e=>{Vue.set(this.selected,e.id,!1)}))}},mounted(){this.setSelected()}},gi=(0,l.Z)(mi,(function(){var e=this,t=e._self._c;return t("fieldset",{staticClass:"u-pb-0"},[""!==e.label?t("legend",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.label,expression:"label"}],staticClass:"font-size-medium is-label",class:e.inline?"float--left":"u-mb-0_25"}):e._e(),e._v(" "),e._l(e.options,(function(n,r){return t("dp-checkbox",{key:`option_${r}`,class:e.inline?"display--inline-block u-ml":"",attrs:{id:n.id,label:{text:n.label},name:n.name||""},on:{change:function(t){return e.$emit("update",e.selected)}},model:{value:e.selected[n.id],callback:function(t){e.$set(e.selected,n.id,t)},expression:"selected[option.id]"}})}))],2)}),[],!1,null,null,null).exports;var yi=s(2649),vi=s.n(yi);const bi={name:"DpFlyout",directives:{ClickOutside:vi()},props:{align:{required:!1,type:String,default:"right",validator:e=>["left","right"].includes(e)},disabled:{required:!1,type:Boolean,default:!1},hasMenu:{required:!1,type:Boolean,default:!0},padded:{required:!1,type:Boolean,default:!0}},data:()=>({isExpanded:!1}),methods:{close(){!0===this.isExpanded&&(this.$emit("close"),this.isExpanded=!1)},toggle(){this.isExpanded=!this.isExpanded,this.isExpanded?this.$emit("open"):this.$emit("close")}},mounted(){this.popupItem=this.$el}},wi=(0,l.Z)(bi,(function(){var e=this,t=e._self._c;return t("span",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.close,expression:"close"}],staticClass:"o-flyout",class:{"o-flyout--left":"left"===e.align,"o-flyout--right":"right"===e.align,"o-flyout--padded":e.padded,"is-expanded":e.isExpanded,"o-flyout--menu":e.hasMenu},attrs:{"data-cy":"flyoutTrigger"}},[t("button",{staticClass:"o-flyout__trigger btn--blank o-link--default u-ph-0_25 line-height--2 whitespace--nowrap",attrs:{disabled:e.disabled,type:"button","aria-haspopup":"true"},on:{click:e.toggle}},[e._t("trigger",(function(){return[t("i",{staticClass:"fa fa-ellipsis-h"})]}),{isExpanded:e.isExpanded})],2),e._v(" "),t("div",{staticClass:"o-flyout__content box-shadow-1",attrs:{"data-cy":"flyout"}},[e._t("default")],2)])}),[],!1,null,null,null).exports,xi={name:"DpColumnSelector",components:{DpCheckbox:fi,DpFlyout:wi},props:{selectableColumns:{type:Array,required:!1,default:()=>[]},initialSelection:{type:Array,required:!1,default:()=>[]},localStorageKey:{type:String,required:!1,default:""},useLocalStorage:{type:Boolean,required:!1,default:!1}},data:()=>({selectedColumns:new Set}),methods:{broadcastSelection(e,t=null){!0===t?this.selectedColumns.add(e):!1===t&&this.selectedColumns.delete(e);const n=this.selectableColumns.filter((([e,t])=>this.selectedColumns.has(e))).map((([e,t])=>e));this.$emit("selection-changed",n),this.useLocalStorage&&window.localStorage.setItem(this.localStorageKey,JSON.stringify(n))},initializeColumnSelection(){if(this.useLocalStorage){if(""===this.localStorageKey)throw new Error(`${this.$options.name} should use localStorage but no localStorageKey was set.`);const e=window.localStorage.getItem(this.localStorageKey);this.selectedColumns=e?new Set(JSON.parse(e)):new Set(this.initialSelection),this.broadcastSelection()}else this.selectedColumns=new Set(this.initialSelection)},trackSelection(){(0,r.Q$)(window,"_paq")&&window._paq.push(["trackEvent","Column Selection",`View: ${this.localStorageKey}`,`Selected: ${this.selectedColumns.join(", ")}`])}},mounted(){this.initializeColumnSelection()}},Si=(0,l.Z)(xi,(function(){var e=this,t=e._self._c;return t("dp-flyout",{attrs:{"has-menu":!1},on:{close:e.trackSelection},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("span",[e._v(e._s(e.Translator.trans("table.cols.select")))]),e._v(" "),t("i",{staticClass:"fa fa-caret-down u-ml-0_25",attrs:{"aria-hidden":"true"}})]},proxy:!0}])},[e._v(" "),t("div",{staticClass:"space-stack-xs u-pv-0_25"},e._l(e.selectableColumns,(function([n,r]){return t("dp-checkbox",{key:n,attrs:{id:`columnSelector:${n}`,checked:e.selectedColumns.has(n),label:{text:r}},on:{change:function(t){e.broadcastSelection(n,!e.selectedColumns.has(n))}}})})),1)])}),[],!1,null,null,null).exports;var Ci=s(9909),ki=s(1320),_i=s.n(ki);const Ai=require("vuedraggable"),Ei={name:"DpDraggable",components:{draggable:s.n(Ai)()},model:{prop:"contentData",event:"data:change"},props:{contentData:{type:Array,required:!0},dragAcrossBranches:{type:Boolean,required:!1,default:!0},isDraggable:{type:Boolean,required:!1,default:!0},draggableTag:{type:String,required:!1,default:"div"},groupId:{type:String,required:!1,default:"noIdGiven"},handleChange:{type:Function,required:!1,default:()=>{}},handleDrag:{type:Function,required:!1,default:()=>{}},nodeId:{type:String,required:!1,default:null},onMove:{type:Function,required:!1,default:()=>!0},opts:{type:Object,required:!1,default:()=>({})}},computed:{content:{get(){return this.contentData},set(e){this.$emit("data:change",{nodeId:this.nodeId,newOrder:e})}}}},Oi=(0,l.Z)(Ei,(function(){var e=this;return(0,e._self._c)("draggable",e._g(e._b({attrs:{disabled:!1===e.isDraggable,group:e.dragAcrossBranches?"treelistgroup":e.groupId,move:e.onMove,tag:e.draggableTag},on:{change:t=>e.handleChange(t,e.nodeId),end:function(t){return e.handleDrag("end")},start:function(t){return e.handleDrag("start")}},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}},"draggable",e.opts,!1),e.$listeners),[e._t("default")],2)}),[],!1,null,null,null).exports;var Ti=s(7789);const Di={name:"DpLoading",props:{hideLabel:{required:!1,type:Boolean,default:!1},overlay:{type:Boolean,required:!1,default:!1}},data:()=>({label:Ti.de.loadingData})},Mi=(0,l.Z)(Di,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-loading",class:{"c-loading--overlay":e.overlay,"flex items-center space-inline-xs":!e.overlay},on:{click:function(e){e.preventDefault()}}},[e.overlay?t("div",{staticClass:"c-loading__inner flex items-center space-inline-xs"},[t("span",{staticClass:"c-loading__spinner"}),e._v(" "),e.hideLabel?e._e():t("span",{staticClass:"c-loading__text",domProps:{textContent:e._s(e.label)}})]):[t("span",{staticClass:"c-loading__spinner"}),e._v(" "),e.hideLabel?e._e():t("span",{staticClass:"c-loading__text",domProps:{textContent:e._s(e.label)}})]],2)}),[],!1,null,null,null).exports,Ni={name:"DpWrapTrigger",components:{DpIcon:Yr},props:{expanded:{type:Boolean,required:!1,default:!1}},computed:{ariaLabel(){return Translator.trans(this.expanded?"aria.collapse":"aria.expand")},icon(){return this.expanded?"chevron-up":"chevron-down"}}},Ii=(0,l.Z)(Ni,(function(){var e=this,t=e._self._c;return t("button",{staticClass:"c-data-table__wrap-trigger o-link--default btn--blank"},[t("dp-icon",{attrs:{"aria-hidden":"true","aria-label":e.ariaLabel,icon:e.icon,size:"small"}})],1)}),[],!1,null,null,null).exports,Pi={name:"ResizeHandle",props:{displayIcon:{required:!1,type:Boolean,default:!0}}};var $i=(0,l.Z)(Pi,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-data-table__resize-handle",on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),(t=>e.$emit("mousedown",t)).apply(null,arguments)}}},[e.displayIcon?[t("i",{staticClass:"fa fa-angle-left resize-handle__icon",attrs:{"aria-hidden":"true"}}),e._v(" "),t("i",{staticClass:"fa fa-angle-right resize-handle__icon",attrs:{"aria-hidden":"true"}})]:e._e()],2)}),[],!1,null,null,null);const Ri={name:"DpResizableColumn",components:{DpResizeHandle:$i.exports},props:{idx:{required:!0,type:Number},headerField:{type:Object,required:!0},isLast:{type:Boolean,required:!1,default:!1}},data:()=>({namedFunc:"",currentHandle:"",nextEl:"",cursorStart:0,dragStart:!1,resize:"",resizeWidth:"",nextWidth:""}),computed:{isResizableColumn(){return!(0,r.Q$)(this.headerField,"resizeable")||this.headerField.resizeable}},methods:{initResize(e,t){this.resize=this.$refs.resizableColumn,this.currentHandle=this.resize.getElementsByClassName("c-data-table__resize-handle")[0],this.currentHandle.classList.add("is-active"),this.nextEl=document.querySelector(`th[data-col-idx='${t+1}']`),this.dragStart=!0,this.cursorStart=e.pageX;const n=this.resize.getBoundingClientRect();this.resizeWidth=n.width;const r=this.nextEl.getBoundingClientRect();this.nextWidth=r.width,this.namedFunc=e=>this.resizeEl(e,t);const i=document.getElementsByTagName("body")[0];i.classList.add("resizing"),i.addEventListener("mousemove",this.namedFunc),i.addEventListener("mouseup",this.stopResize)},resizeEl(e,t){if(this.dragStart){const t=e.pageX-this.cursorStart,n=this.resizeWidth+t,r=this.nextWidth-t;n>25&&r>25&&(this.resize.style.width=n+"px",this.nextEl.style.width=r+"px")}},stopResize(e){this.currentHandle.classList.remove("is-active"),this.dragStart=!1,document.querySelector("body").removeEventListener("mousemove",this.namedFunc),document.querySelector("body").removeEventListener("mouseup",this.stopResize),document.querySelector("body").classList.remove("resizing")}}},qi=Ri;var Bi=(0,l.Z)(qi,(function(){var e=this,t=e._self._c;return t("th",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.headerField.tooltip||e.headerField.label,expression:"headerField.tooltip || headerField.label"}],ref:"resizableColumn",staticClass:"c-data-table__resizable",class:{"u-pr-0":e.isLast},attrs:{"data-col-idx":e.idx}},[e._t("default"),e._v(" "),e.isLast?e._e():t("dp-resize-handle",{attrs:{"display-icon":e.isResizableColumn},on:{mousedown:t=>e.initResize(t,e.idx)}})],2)}),[],!1,null,null,null);const Fi={name:"DpTableHeader",components:{DpIcon:Yr,DpResizableColumn:Bi.exports,DpWrapTrigger:Ii},props:{checked:{type:Boolean,required:!0},hasFlyout:{type:Boolean,required:!0},headerFields:{type:Array,required:!0},indeterminate:{type:Boolean,required:!1,default:!1},isDraggable:{type:Boolean,required:!1,default:!1},isExpandable:{type:Boolean,required:!1,default:!1},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!0},isSticky:{type:Boolean,required:!1,default:!1},isTruncatable:{type:Boolean,required:!1,default:!1},translations:{type:Object,required:!0}},watch:{indeterminate(){this.setIndeterminate()}},methods:{setIndeterminate(){this.isSelectable&&(this.$refs.selectAll.indeterminate=this.indeterminate)},toggleExpandAll(){this.$emit("toggle-expand-all")},toggleSelectAll(){this.$emit("toggle-select-all")},toggleWrapAll(){this.$emit("toggle-wrap-all")}},beforeUpdate(){this.setIndeterminate()}},Li=(0,l.Z)(Fi,(function(){var e=this,t=e._self._c;return t("tr",{ref:"tableHeader",class:{"c-data-table__sticky-header":e.isSticky}},[e.isDraggable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"}},[t("dp-icon",{staticClass:"c-data-table__drag-handle",attrs:{icon:"drag-handle"}})],1):e._e(),e._v(" "),e.isSelectable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"}},[t("input",{ref:"selectAll",attrs:{"aria-label":e.translations.headerSelectHint,title:e.translations.headerSelectHint,type:"checkbox","data-cy":"selectAll"},domProps:{checked:e.checked},on:{click:function(t){return e.toggleSelectAll()}}})]):e._e(),e._v(" "),e._l(e.headerFields,(function(n,r){return[e.isResizable?t("dp-resizable-column",{attrs:{"is-last":e.headerFields.length===r,"header-field":n,idx:r}},[e._t(`header-${n.field}`,(function(){return[n.label?t("span",{domProps:{textContent:e._s(n.label)}}):e._e()]}))],2):t("th",{attrs:{scope:"col"}},[e._t(`header-${n.field}`,(function(){return[n.label?t("span",{domProps:{textContent:e._s(n.label)}}):e._e()]}))],2)]})),e._v(" "),e.hasFlyout?t("th",{attrs:{scope:"col"}}):e._e(),e._v(" "),e.isExpandable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"},on:{click:function(t){return e.toggleExpandAll()}}},[t("dp-wrap-trigger",{attrs:{title:e.translations.headerExpandHint}})],1):e._e(),e._v(" "),e.isTruncatable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"},on:{click:function(t){return e.toggleWrapAll()}}},[t("dp-wrap-trigger",{attrs:{title:e.translations.headerExpandHint}})],1):e._e()],2)}),[],!1,null,null,null).exports,Vi={name:"DpTableRow",components:{DpIcon:Yr,DpWrapTrigger:Ii},props:{checked:{type:Boolean,required:!0},expanded:{type:Boolean,required:!1,default:!1},hasFlyout:{type:Boolean,required:!0},headerFields:{type:Array,required:!0},fields:{type:Array,required:!0},item:{type:Object,required:!0},isDraggable:{type:Boolean,required:!1,default:!1},isExpandable:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},isLocked:{type:Boolean,required:!1,default:!1},isLockedMessage:{type:String,required:!1,default:null},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!0},isSelectableName:{type:String,required:!1,default:null},isTruncatable:{type:Boolean,required:!1,default:!1},searchTerm:{type:RegExp,required:!0},trackBy:{type:String,required:!0},wrapped:{type:Boolean,required:!1,default:!1}},computed:{highlighted(){return e=>{let t=this.item[e];return t=_i().sanitize(t),t.replace(this.searchTerm,'<span style="background-color: yellow;">$&</span>')}},elementStyle(){return e=>{const t=this.headerFields.find((t=>t.field===e));let n="";return this.wrapped||void 0===t.initialWidth||(n+=`width: ${t.initialWidth}px;`),this.wrapped||void 0===t.initialMaxWidth||(n+=`max-width: ${t.initialMaxWidth}px;`),this.wrapped||void 0===t.initialMinWidth||(n+=`min-width: ${t.initialMinWidth}px;`),n}}},methods:{toggleSelect(e){this.$emit("toggle-select",e)},toggleWrap(e){this.$emit("toggle-wrap",e)},toggleExpand(e){this.$emit("toggle-expand",e)}}},ji=Vi,zi={name:"DpDataTable",components:{DpTableRow:(0,l.Z)(ji,(function(){var e=this,t=e._self._c;return t("tr",{staticClass:"row",class:[{"opacity-7":e.isLoading},{"is-expanded-row":e.expanded}]},[e.isDraggable?t("td",{staticClass:"c-data-table__cell--narrow"},[t("dp-icon",{staticClass:"c-data-table__drag-handle",attrs:{icon:"drag-handle"}})],1):e._e(),e._v(" "),e.isSelectable?t("td",{staticClass:"c-data-table__cell--narrow"},[e.isLocked?t("dp-icon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.isLockedMessage,expression:"isLockedMessage"}],staticClass:"u-valign--middle color--grey-light",attrs:{icon:"lock"}}):t("input",{staticClass:"u-m-0 u-valign--middle",attrs:{type:"checkbox","data-cy":"selectItem",name:e.isSelectableName||null},domProps:{value:e.isSelectableName?e.item[e.trackBy]:null,checked:e.checked},on:{click:function(t){return e.toggleSelect(e.item[e.trackBy])}}})],1):e._e(),e._v(" "),e._l(e.fields,(function(n,r){return t("td",{key:`${n}:${r}`,class:{"c-data-table__resizable":e.isTruncatable},attrs:{"data-col-idx":`${r}`}},[e.isTruncatable?t("div",{staticClass:"break-words",class:e.wrapped?"c-data-table__resizable--wrapped":"c-data-table__resizable--truncated",style:e.elementStyle(n)},[e._t(n,(function(){return[e.searchTerm&&e.item[n]?t("span",{domProps:{innerHTML:e._s(e.highlighted(n))}}):t("span",{domProps:{textContent:e._s(e.item[n])}})]}),null,e.item)],2):[e._t(n,(function(){return[e.searchTerm&&e.item[n]?t("span",{domProps:{innerHTML:e._s(e.highlighted(n))}}):t("span",{domProps:{textContent:e._s(e.item[n])}})]}),null,e.item)]],2)})),e._v(" "),e.hasFlyout?t("td",{staticClass:"overflow-visible"},[e._t("flyout",null,null,e.item)],2):e._e(),e._v(" "),e.isExpandable?t("td",{staticClass:"c-data-table__cell--narrow",class:{"is-open":e.expanded},attrs:{title:e.Translator.trans(e.expanded?"aria.collapse":"aria.expand")},on:{click:function(t){return e.toggleExpand(e.item[e.trackBy])}}},[t("dp-wrap-trigger",{attrs:{expanded:e.expanded}})],1):e._e(),e._v(" "),e.isTruncatable?t("td",{staticClass:"c-data-table__cell--narrow",class:{"is-open":e.wrapped},attrs:{title:e.Translator.trans(e.wrapped?"aria.collapse":"aria.expand")},on:{click:function(t){return e.toggleWrap(e.item[e.trackBy])}}},[t("dp-wrap-trigger",{attrs:{expanded:e.wrapped}})],1):e._e()],2)}),[],!1,null,null,null).exports,DpTableHeader:Li,DpLoading:Mi,DpDraggable:Oi},directives:{cleanhtml:Ci.J},props:{hasFlyout:{type:Boolean,required:!1,default:!1},hasStickyHeader:{type:Boolean,required:!1,default:!1},headerFields:{type:Array,required:!0},initSelectedItems:{type:Array,required:!1,default:()=>[]},isDraggable:{type:Boolean,required:!1,default:!1},isExpandable:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!1,default:!1},isSelectableName:{type:String,required:!1,default:null},isTruncatable:{type:Boolean,required:!1,default:!1},items:{type:Array,required:!0},multiPageAllSelected:{type:Boolean,required:!1,default:!1},lockCheckboxBy:{type:String,required:!1,default:null},multiPageSelectionItemsToggled:{type:Number,required:!1,default:0},multiPageSelectionItemsTotal:{type:Number,required:!1,default:0},searchString:{type:[String,null],required:!1,default:null},shouldBeSelectedItems:{type:Object,required:!1,default:()=>({})},tableClass:{type:String,required:!1,default:"c-data-table"},tableDescription:{type:String,required:!1,default:""},trackBy:{type:String,required:!0},translations:{type:Object,required:!1,default:()=>({})}},data(){return{allExpanded:!1,allWrapped:!1,defaultTranslations:{footerSelectedElement:Translator.trans("entry.selected"),footerSelectedElements:Translator.trans("entries.selected"),headerExpandHint:Translator.trans("aria.expand.all"),headerSelectHint:Translator.trans("aria.select.all"),lockedForSelection:Translator.trans("item.lockedForSelection"),searchNoResults:e=>Translator.trans("search.no.results",{searchterm:e}),tableLoadingData:Translator.trans("loading.data"),tableNoElements:Translator.trans("explanation.noentries")},elementSelections:{},expandedElements:{},headerCellCount:0,mergedTranslations:{},selectedElements:[],tableEl:void 0,tableProps:[this.isDraggable,this.isSelectable,this.hasFlyout,this.isExpandable,this.isTruncatable],wrappedElements:{}}},computed:{allSelected(){return this.multiPageSelectionItemsTotal>0?this.multiPageSelectionItemsToggled===this.multiPageSelectionItemsTotal||this.multiPageAllSelected:this.items.filter((e=>this.elementSelections[e[this.trackBy]])).length===this.items.length},colCount(){let e=0;return this.tableProps.map((t=>{e+=t?1:0})),this.headerCellCount+e},fields(){return this.headerFields.map((e=>e.field))},headerTranslations(){return this.extractTranslations(["headerSelectHint"])},indeterminate(){if(!1!==this.isSelectable)return this.multiPageSelectionItemsTotal>0?this.multiPageSelectionItemsToggled>0&&!this.allSelected:this.selectedElements.length>0&&!this.allSelected},noResults(){return this.mergedTranslations.searchNoResults(_i().sanitize('"'+this.searchString+'"'))},searchTerm(){if(null===this.searchString||this.searchString.length<1)return new RegExp;const e=this.searchString.replace(/\s*/gi,"\\s*");return new RegExp(e,"ig")},searchTermSet(){return"(?:)"!==this.searchTerm.source}},watch:{shouldBeSelectedItems(){this.forceElementSelections(this.shouldBeSelectedItems)}},methods:{addHoveredClass(e){return this.$refs.tableRows[e].$el.classList.add("is-hovered-content")},extractTranslations(e){return e.reduce(((e,t)=>({...e,...this.mergedTranslations[t]?{[t]:this.mergedTranslations[t]}:{}})),{})},filterElementSelections(){return Object.entries(this.elementSelections).filter((e=>e[1])).map((e=>e[0]))},forceElementSelections(e){this.elementSelections=e,this.selectedElements=this.filterElementSelections()},removeHoveredClass(e){return this.$refs.tableRows[e].$el.classList.remove("is-hovered-content")},resetSelection(){this.toggleSelectAll(!1)},setElementSelections(e,t){return e.reduce(((e,n)=>({...e,[n[this.trackBy]]:t})),this.elementSelections)},toggleExpand(e){this.expandedElements={...this.expandedElements,[e]:!this.expandedElements[e]}},toggleExpandAll(e=!1===this.allExpanded){this.expandedElements=this.items.reduce(((t,n)=>({...t,[n[this.trackBy]]:e})),{}),this.allExpanded=e},toggleSelect(e){this.elementSelections={...this.elementSelections,[e]:!this.elementSelections[e]},this.selectedElements=this.filterElementSelections(),this.$emit("items-selected",this.selectedElements),this.$emit("items-toggled",[{id:e}],this.elementSelections[e])},toggleSelectAll(e=!1===this.allSelected){this.elementSelections=this.setElementSelections(this.items,e),this.selectedElements=this.filterElementSelections(),this.$emit("items-selected",this.selectedElements),this.$emit("items-toggled",this.items.map((e=>({id:e[this.trackBy]}))),e),this.$emit("select-all",e)},toggleWrap(e){this.wrappedElements={...this.wrappedElements,[e]:!this.wrappedElements[e]}},toggleWrapAll(e=!1===this.allWrapped){this.wrappedElements=this.items.reduce(((t,n)=>({...t,[n[this.trackBy]]:e})),{}),this.allWrapped=e}},created(){this.elementSelections=this.setElementSelections(this.initSelectedItems,!0);let e={...this.translations};const t=this.translations.searchNoResults?{searchNoResults:()=>this.translations.searchNoResults}:{};e={...e,...t},this.mergedTranslations={...this.defaultTranslations,...e}},beforeUpdate(){this.headerCellCount=this.headerFields.length},mounted(){if(this.tableEl=this.$refs.tableEl,this.isResizable||this.isTruncatable){const e=this.tableEl.firstChild;Array.prototype.slice.call(e.childNodes).forEach((e=>{if(1===e.nodeType){const t=e.getBoundingClientRect().width;e.style.width=t+"px"}})),this.tableEl.style.tableLayout="fixed",this.tableEl.classList.add("is-fixed"),this.isResizable&&Array.from(this.tableEl.children[1].children).forEach((e=>{Array.from(e.children).forEach((e=>{e.firstChild.style.width=null,e.firstChild.style.maxWidth=null,e.firstChild.style.minWidth=null}))}))}this.isExpandable&&this.isTruncatable&&console.error("`isExpandable` and `isTruncatable` should not be activated at the same time when using DpDataTable."),this.forceElementSelections(this.shouldBeSelectedItems)}},Hi=zi;var Ui=(0,l.Z)(Hi,(function(){var e=this,t=e._self._c;return t("div",[t("table",{ref:"tableEl",class:e.tableClass},[t("caption",{staticClass:"hide-visually",domProps:{textContent:e._s(e.tableDescription)}}),e._v(" "),e.headerFields.filter((e=>e.colClass)).length>0?t("colgroup",[e.isDraggable?t("col"):e._e(),e._v(" "),e.isSelectable?t("col"):e._e(),e._v(" "),e._l(e.headerFields,(function(e){return t("col",{class:e.colClass})})),e._v(" "),e.hasFlyout?t("col"):e._e(),e._v(" "),e.isExpandable?t("col"):e._e(),e._v(" "),e.isTruncatable?t("col"):e._e()],2):e._e(),e._v(" "),t("thead",[t("dp-table-header",{attrs:{checked:e.allSelected,"has-flyout":e.hasFlyout,"header-fields":e.headerFields,indeterminate:e.indeterminate,"is-draggable":e.isDraggable,"is-expandable":e.isExpandable,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-sticky":e.hasStickyHeader,"is-truncatable":e.isTruncatable,translations:e.headerTranslations},on:{"toggle-expand-all":e.toggleExpandAll,"toggle-select-all":e.toggleSelectAll,"toggle-wrap-all":e.toggleWrapAll},scopedSlots:e._u([e._l(e.fields,(function(t){return{key:`header-${t}`,fn:function(){return[e._t(`header-${t}`)]},proxy:!0}}))],null,!0)})],1),e._v(" "),e.isDraggable||e.isLoading?e._e():t("tbody",[e._l(e.items,(function(n,r){return[t("dp-table-row",{ref:"tableRows",refInFor:!0,attrs:{index:r,checked:e.elementSelections[n[e.trackBy]]||!1,fields:e.fields,"has-flyout":e.hasFlyout,"header-fields":e.headerFields,"is-draggable":e.isDraggable,"is-expandable":e.isExpandable,"is-locked":!!e.lockCheckboxBy&&n[e.lockCheckboxBy],"is-locked-message":e.mergedTranslations.lockedForSelection,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-selectable-name":e.isSelectableName,"is-truncatable":e.isTruncatable,item:n,"search-term":e.searchTerm,"track-by":e.trackBy,wrapped:e.wrappedElements[n[e.trackBy]]||!1},on:{"toggle-expand":e.toggleExpand,"toggle-select":e.toggleSelect,"toggle-wrap":e.toggleWrap},scopedSlots:e._u([e._l(e.fields,(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}})),{key:"flyout",fn:function(t){return[e._t("flyout",null,null,t)]}}],null,!0)}),e._v(" "),e.expandedElements[n[e.trackBy]]?t("tr",{class:{"is-expanded-content":e.expandedElements[n[e.trackBy]]}},[t("td",{class:{"opacity-7":e.isLoading},attrs:{colspan:e.colCount},on:{mouseenter:function(t){return e.addHoveredClass(r)},mouseleave:function(t){return e.removeHoveredClass(r)}}},[e._t("expandedContent",null,null,n)],2)]):e._e()]}))],2),e._v(" "),e.isDraggable&&!e.isLoading?t("dp-draggable",{attrs:{"draggable-tag":"tbody","content-data":e.items,handle:"c-data-table__drag-handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen"},on:{change:t=>e.$emit("changed-order",t)}},[e._l(e.items,(function(n,r){return[t("dp-table-row",{attrs:{checked:e.elementSelections[n[e.trackBy]]||!1,expanded:e.expandedElements[n[e.trackBy]]||!1,fields:e.fields,"has-flyout":e.hasFlyout,"header-fields":e.headerFields,index:r,"is-draggable":e.isDraggable,"is-expandable":e.isExpandable,"is-loading":e.isLoading,"is-locked":!!e.lockCheckboxBy&&n[e.lockCheckboxBy],"is-locked-message":e.mergedTranslations.lockedForSelection,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-selectable-name":e.isSelectableName,"is-truncatable":e.isTruncatable,item:n,"search-term":e.searchTerm,"track-by":e.trackBy,wrapped:e.wrappedElements[n[e.trackBy]]||!1},on:{"toggle-expand":e.toggleExpand,"toggle-select":e.toggleSelect,"toggle-wrap":e.toggleWrap},scopedSlots:e._u([e._l(e.fields,(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}})),{key:"flyout",fn:function(t){return[e._t("flyout",null,null,t)]}}],null,!0)})]}))],2):e._e(),e._v(" "),0===e.items.length?t("tr",[e.searchTermSet?t("td",{staticClass:"u-pt",attrs:{colspan:e.colCount},domProps:{innerHTML:e._s(e.noResults)}}):t("td",{staticClass:"u-pt",attrs:{colspan:e.colCount}},[e.isLoading?t("dp-loading",{staticClass:"u-mt",attrs:{"is-loading":"",colspan:e.colCount}}):[e._v("\n "+e._s(e.mergedTranslations.tableNoElements)+"\n ")]],2)]):e._e()],1)])}),[],!1,null,null,null);const Wi=Ui.exports,Zi={name:"DpSelectPageItemCount",props:{currentItemCount:{type:Number,required:!0},labelText:{type:String,required:!0},pageCountOptions:{type:Array,required:!0}},data:()=>({selectId:(0,g.v4)()})};var Ki=(0,l.Z)(Zi,(function(){var e=this,t=e._self._c;return t("div",[t("select",{staticClass:"o-form__control-select width-auto u-mr-0_25",attrs:{id:e.selectId},on:{change:t=>e.$emit("changed-count",parseInt(t.target.value))}},e._l(e.pageCountOptions,(function(n){return t("option",{domProps:{value:n,selected:n===e.currentItemCount}},[e._v("\n "+e._s(n)+"\n ")])})),0),e._v(" "),t("label",{staticClass:"display--inline u-mb-0",attrs:{for:e.selectId}},[e._v("\n "+e._s(e.labelText)+"\n ")])])}),[],!1,null,null,null);const Ji=Ki.exports;var Gi=s(6781);const Yi={name:"DpSlidingPagination",components:{SlidingPagination:s.n(Gi)()},props:{current:{type:Number,required:!0},total:{type:Number,required:!0}},methods:{prefixClass:e=>(0,r.o4)(e)}},Xi=(0,l.Z)(Yi,(function(){var e=this;return(0,e._self._c)("sliding-pagination",{attrs:{"aria-pagination-label":e.Translator.trans("pager.label"),"aria-goto-page-label":e.Translator.trans("pager.goto.page.from.pages",{page:e.current,total:e.total}),"aria-previous-page-label":e.Translator.trans("pager.previous"),"aria-next-page-label":e.Translator.trans("pager.next"),"aria-current-page-label":e.Translator.trans("pager.page.from.pages.current.page",{page:e.current,total:e.total}),"class-map":{componentClass:e.prefixClass("c-sliding-pagination"),list:e.prefixClass("c-sliding-pagination__list"),element:e.prefixClass("c-sliding-pagination__list-element"),elementDisabled:e.prefixClass("c-sliding-pagination__list-element--disabled"),elementActive:e.prefixClass("c-sliding-pagination__list-element--active"),page:e.prefixClass("c-sliding-pagination__page")},current:e.current,total:e.total},on:{"page-change":t=>e.$emit("page-change",t)}})}),[],!1,null,null,null).exports,Qi={name:"DpStickyElement",props:{applyZIndex:{required:!1,type:Boolean,default:!0},border:{required:!1,type:Boolean,default:!1},context:{type:HTMLElement,required:!1,default:void 0},direction:{required:!1,type:String,default:"top"},observeContext:{required:!1,type:Boolean,default:!0},offset:{required:!1,type:Number,default:0}},mounted(){this.stickyElement=new R(this.$el,this.context,this.offset,this.direction,"palm",!1,this.observeContext)}},eo=(0,l.Z)(Qi,(function(){var e=this;return(0,e._self._c)("div",{staticClass:"o-sticky bg-color--white",class:{"o-sticky--border":e.border,"u-z-fixed":e.applyZIndex}},[e._t("default")],2)}),[],!1,null,null,null).exports,to={name:"DpDataTableExtended",components:{DpDataTable:Wi,DpSelectPageItemCount:Ji,DpSlidingPagination:Xi,DpStickyElement:eo},mixins:[V.Be],props:{defaultSortOrder:{type:[Object,null],required:!1,default:null,validator:e=>"object"==typeof e&&null!==e?(0,r.Q$)(e,"key")&&(0,r.Q$)(e,"direction"):null===e},hasFlyout:{type:Boolean,required:!1,default:!1},headerFields:{type:Array,required:!0,default:()=>[]},initItemsPerPage:{type:Number,required:!1,default:50},isExpandable:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!1,default:!1},isSortable:{type:Boolean,required:!1,default:!1},isTruncatable:{type:Boolean,required:!1,default:!1},itemsPerPageOptions:{type:Array,required:!1,default:()=>[10,50,100,200]},tableItems:{type:Array,required:!1,default:()=>[]},trackBy:{type:String,required:!1,default:"id"}},data(){return{currentPage:1,filteredItems:[],filters:this.headerFields.reduce(((e,t)=>(e[t.field]=!0,e)),{}),isHighlighted:"",itemsPerPage:this.initItemsPerPage,searchString:"",sortOrder:null!==this.defaultSortOrder?this.defaultSortOrder:this.headerFields.length>0?{key:this.headerFields[0].field,direction:-1}:null}},computed:{filteredFields(){const e=this.headerFields.filter((e=>this.filters[e.field]));return this.$emit("updated:filteredItems",e),e},onPageItems(){let e=this.currentPage*this.itemsPerPage;const t=e-this.itemsPerPage;e=e<=this.filteredItems.length?e:this.filteredItems.length;const n=this.filteredItems.slice(t,e);return this.$emit("updated:onPageItems",n),n},sortableFilteredFields(){return this.isSortable?this.filteredFields:[]},totalPages(){return this.filteredItems.length>0?Math.ceil(this.filteredItems.length/this.itemsPerPage):1}},watch:{tableItems(){this.updateFields()}},methods:{emitSelectedItems(e){this.$emit("items-selected",e)},handlePageChange(e){this.currentPage=e,this.updateFields()},highlightText(e){let t=_i().sanitize(e.replace("<br>","__br__")).replace("__br__","<br>");if(this.searchString.length){const n=new RegExp(this.searchString,"ig");t=e.replace(n,'<span style="background-color: yellow;">$&</span>')}return t},setOrder(e){e===this.sortOrder.key?this.sortOrder.direction=-1*this.sortOrder.direction:this.sortOrder={key:e,direction:1},this.updateFields(),this.$emit("updated:sortOrder",this.sortOrder)},setPageItemCount(e){this.itemsPerPage=e,this.currentPage=this.currentPage>this.totalPages?this.totalPages:this.currentPage,this.updateFields()},sortIconClass(e){const t=e===this.sortOrder.key,n=this.sortOrder.direction<0?"fa-sort-up":"fa-sort-down";return t?`${n} color-highlight`:"fa-sort color--grey"},updateFields(e=null){let t=e||this.tableItems;this.sortOrder&&t.sort(((e,t)=>null===e[this.sortOrder.key]||void 0===e[this.sortOrder.key]?1*this.sortOrder.direction:null===t[this.sortOrder.key]||void 0===t[this.sortOrder.key]?-1*this.sortOrder.direction:e[this.sortOrder.key].localeCompare(t[this.sortOrder.key],"de",{sensitivity:"base"})*this.sortOrder.direction)),this.searchString.length>0&&(t=i(this.searchString,t,this.headerFields.map((e=>e.field)))),this.filteredItems=t}},mounted(){this.updateFields()}},no=to;var ro=(0,l.Z)(no,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"u-mt-0_5"},[t("dp-sticky-element",[t("div",{staticClass:"layout u-pv-0_5"},[t("div",{staticClass:"layout__item u-10-of-12"},[t("label",{staticClass:"display--inline",attrs:{for:"search"}},[e._v("\n "+e._s(e.Translator.trans("search"))+"\n ")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.searchString,expression:"searchString"}],staticClass:"o-form__control-input",attrs:{type:"text",id:"search",name:"search"},domProps:{value:e.searchString},on:{input:[function(t){t.target.composing||(e.searchString=t.target.value)},function(t){return e.updateFields(null)}]}}),e._v(" "),e.totalPages>1?t("dp-sliding-pagination",{staticClass:"display--inline-block u-ml-0_5 u-mt-0_125",attrs:{current:e.currentPage,total:e.totalPages},on:{"page-change":e.handlePageChange}}):e._e(),e._v(" "),t("dp-select-page-item-count",{staticClass:"display--inline-block u-mt-0_125 u-ml-0_5",attrs:{"page-count-options":e.itemsPerPageOptions,"current-item-count":e.itemsPerPage,"label-text":e.Translator.trans("pager.per.page")},on:{"changed-count":e.setPageItemCount}})],1)])]),e._v(" "),t("dp-data-table",{attrs:{"has-flyout":e.hasFlyout,"header-fields":e.headerFields,"is-expandable":e.isExpandable,"is-loading":e.isLoading,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-truncatable":e.isTruncatable,items:e.onPageItems,"search-string":e.searchString,"should-be-selected-items":e.currentlySelectedItems,"track-by":e.trackBy},on:{"items-selected":e.emitSelectedItems},scopedSlots:e._u([e._l(e.sortableFilteredFields,(function(n){return{key:`header-${n.field}`,fn:function(n){return[e._t(`header-${n.field}`,(function(){return[t("div",{key:n.field,staticClass:"o-hellip--nowrap relative u-pr-0_75"},[t("button",{staticClass:"btn--blank u-top-0 u-right-0 absolute",attrs:{"aria-label":e.Translator.trans("table.cols.sort")+": "+n.label,title:e.Translator.trans("table.cols.sort")+": "+n.label,type:"button"},on:{click:function(t){return e.setOrder(n.field)}}},[t("i",{staticClass:"fa",class:e.sortIconClass(n.field),attrs:{"aria-hidden":"true"}})]),e._v("\n "+e._s(n.label)+"\n ")])]}),null,n)]}}})),e._l(e.filteredFields,(function(t,n){return{key:e.filteredFields[n].field,fn:function(t){return[e._t(e.filteredFields[n].field,null,null,t)]}}})),{key:"expandedContent",fn:function(t){return[e._t("expandedContent",null,null,t)]}},{key:"flyout",fn:function(t){return[e._t("flyout",null,null,t)]}}],null,!0)}),e._v(" "),t("dp-sticky-element",{attrs:{direction:"bottom"}},[e._t("footer")],2)],1)}),[],!1,null,null,null);const io=ro.exports;function oo(e,t){var n=new Date(e.getTime());return n.setHours(0,0,0,0),n.setDate(1),n.setMonth(n.getMonth()+t),n}function so(e,t){var n=new Date(e.getTime());return new Date(n.setDate(n.getDate()+t))}function ao(e){return new Date(e[0],e[1],e[2])}function lo(e,t,n){return n||(n=[]),n.push(e),e<t&&lo(e+1,t,n)||n}function co(e,t){var n=e.split(t);return n.forEach((function(e,t){e.indexOf("d")>-1&&(n[t]="day"),e.indexOf("m")>-1&&(n[t]="month"),e.indexOf("y")>-1&&(n[t]="year")})),n}function uo(e){return function(t,n){return t[e.indexOf(n)]}}function po(e){return ho(e,".")||ho(e,"-")||ho(e,"/")}function ho(e,t){return e.indexOf(t)>-1?t:null}function fo(e,t){var n=po(t),r=co(t,n),i=e.split(n),o=uo(r);return new Date(o(i,"year"),o(i,"month")-1,o(i,"day"))}function mo(e,t){var n=po(t),r=t.split(n),i=e.getFullYear(),o=e.getMonth()+1,s=e.getDate();return r.map((function(e){return e.match(/d/i)?go(s,e):e.match(/m/i)?go(o,e):e.match(/y/i)?go(i,e):void 0})).join(n)}function go(e,t){var n=(t+"").length-(e+"").length;if(0===n)return e;if(n>0)return function(e,t){for(var n=e+"",r=0;r<t;r++)n=0+n;return n}(e,n);if(n<0)throw new Error("Invalid date format")}function yo(e){return ao(e.value.split("$").map((function(e){return parseInt(e)})))}function vo(e,t){if(0===t.length)return e;if(e.classList)for(var n=t.split(" "),r=0;r<n.length;)e.classList.add(n[r]),r+=1;else{var i=e.getAttribute("class");i=i+" "+t,e.setAttribute("class",i)}return e}function bo(e,t){var n=e.tagName.toLowerCase();vo(e,t+n)}function wo(e,t){for(var n=Array.prototype.slice.call(e.getElementsByTagName("*")),r=0;r<n.length;)bo(n[r],t),r+=1}function xo(e){return e.focus(),!0}function So(){return document.activeElement}function Co(e){return document.querySelector('[data-ad-id="'+e+'"]')}function ko(e){return Co(""+e.getDate()+e.getMonth()+e.getFullYear())}function _o(e,t,n){return t.addEventListener(e,n,!0),function(){t.removeEventListener(e,n,!0)}}function Ao(e){return e.hasAttribute("data-day")}function Eo(e,t){var n;"function"==typeof Event?n=new Event(t,{bubbles:!0,cancelable:!0}):(n=document.createEvent("Event")).initEvent(t,!0,!0),e.dispatchEvent(n)}function Oo(e,t,n){var r=document.createElement("th"),i=document.createElement("button");i.type="button",i.value=t+"$"+n;var o="-1"===e?'<svg data-ad-id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 16" width="6" height="16"><path data-ad-id="icon" fill-rule="evenodd" d="M6 2L0 8l6 6V2z"></path></svg>':'<svg data-ad-id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 16" width="6" height="16"><path data-ad-id="icon" fill-rule="evenodd" d="M0 14l6-6-6-6v12z"></path></svg>';return i.setAttribute("data-ad-id",e),i.setAttribute("data-direction",!0),i.innerHTML=o,i.addEventListener("mousedown",(function e(t){t.preventDefault(),t.stopPropagation(),i.removeEventListener("mousedown",e),Eo(i,"mousedown")})),r.appendChild(i),r}function To(e,t,n){for(var r=document.createElement("tr"),i=e,o=0;o<7;o++)r.appendChild(t(i,n.weekdays[o])),i+=1;return{el:r,day:i}}function Do(e){for(var t=document.createDocumentFragment(),n=0;n<e;n++)t.appendChild(document.createElement("td"));return t}function Mo(e){return e instanceof Date&&!isNaN(e)}function No(e,t,n,r){var i=t&&(Mo(t)&&t||fo(t,r)),o=n&&(Mo(n)&&n||fo(n,r)),s=Mo(e)&&e||fo(e,r);return(!i||i<=s)&&(!o||o>=s)}function Io(e,t,n){var r=lo(n.monthsBeforeCurrent,n.monthsAfterCurrent).length,i=t<0?-1*r:r,o=i<0?0:r-1,s=i<0?r-1:0;return{date:oo(e,i),before:-1*o,after:s}}var Po={Up:-7,ArrowUp:-7,Down:7,ArrowDown:7,Left:-1,ArrowLeft:-1,Right:1,ArrowRight:1};function $o(e,t,n,r,i){(function(e,t,n,r,i){var o=Co(n.id+"group-container"),s=Co(n.id+"group");s=s&&o&&o.removeChild(s),o=o||document.createElement("div"),s=function(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}(s=s||document.createElement("div"));var a=lo(r,i);a.forEach((function(e,r){var i=void 0===a[r-1],o=void 0===a[r+1],l=oo(t,e);s.appendChild(function(e,t,n,r){var i,o,s,a,l,c=e.getFullYear(),d=e.getMonth(),u=e.toLocaleDateString(r.locale,{month:"long"}),p=function(e,t){return function e(t,n){return n||(n=[]),7===n.length?n:(n.push(t),e(6===t?0:t+1,n))}(t).indexOf(e.getDay())}(e,r.weekStartsOn),h=ao([c,d+1,0]).getDate(),f=function(e,t,n,r){return function(i,o){var s=document.createElement("td"),a=ao([t,e,i]),l=a.setHours(0,0,0,0)==(new Date).setHours(0,0,0,0);return s.appendChild(function(e,t,n,r,i,o,s){var a=document.createElement("button"),l=document.createTextNode(e);return a.value=n+"$"+t+"$"+e,a.type="button",a.setAttribute("data-day",!0),a.setAttribute("data-ad-id",""+e+t+n),a.setAttribute("aria-label",i+" "+e+" "+r+" "+n),a.setAttribute("aria-disabled",!o),s&&a.classList.add("a1-is-today"),a.appendChild(l),a}(i,e,t,n,o,r(a),l)),s}}(d,c,u,(i=r.minDate,o=r.maxDate,s=r.dateFormat,function(e){return No(e,i,o,s)})),m=document.createElement("table"),g=document.createElement("thead"),y=document.createElement("tbody");g.appendChild(function(e,t,n,r,i){var o=document.createElement("tr"),s=document.createElement("th"),a=(r&&i?5:(r||i)&&6)||7;if(s.colSpan=a,s.appendChild(document.createTextNode(n+" "+e)),r){var l=Oo("-1",e,t);o.appendChild(l)}if(o.appendChild(s),i){var c=Oo("1",e,t);o.appendChild(c)}return o}(c,d,u,t,n)),g.appendChild((a=r.weekdays,l=document.createElement("tr"),a.forEach((function(e){var t=document.createTextNode(e),n=document.createElement("th");n.appendChild(t),l.appendChild(n)})),l)),m.appendChild(g);var v=function(e,t,n){var r=e,i=document.createElement("tr"),o=1,s=Do(7-(7-e));i.appendChild(s);for(var a=r;a<7;a++)i.appendChild(t(o,n.weekdays[o])),o+=1;return{el:i,end:o}}(p,f,r);return y.appendChild(v.el),y.appendChild(function(e,t,n,r){for(var i=Math.floor((t-e+1)/7),o=e,s=document.createDocumentFragment(),a=1,l=0;l<i;l++){var c=To(o,n,r);s.appendChild(c.el),o=c.day,a+=1}var d=document.createElement("tr"),u=0;for(l=o;l<=t;l++)d.appendChild(n(o,r.weekdays[u])),o+=1,u+=1;a+=1;var p=Do(7-u);for(d.appendChild(p),s.appendChild(d);a<6;){var h=document.createElement("tr");h.appendChild(Do(7)),s.appendChild(h),a+=1}return s}(v.end,h,f,r)),m.appendChild(y),m}(l,i,o,n))})),s.setAttribute("data-ad-id",n.id+"group"),s.setAttribute("data-ad-selector","datepicker-container"),o.setAttribute("data-ad-selector","group-container"),o.setAttribute("data-ad-id",n.id+"group-container"),o.appendChild(s),e.appendChild(o)})(e,t,n,r=isNaN(r)?n.monthsBeforeCurrent:r,i=isNaN(i)?n.monthsAfterCurrent:i),wo(e,n.classPrefix)}function Ro(e,t){var n=Co(t+"group-container");n&&e.removeChild(n)}function qo(e,t,n,r){var i=fo(n,r);max=mo(i,"yyyy-mm-dd"),e.setAttribute(t,i)}function Bo(e){return{shouldCloseOnFocusOut:function(t){var n=t.relatedTarget;return!n||!n.getAttribute("data-ad-id")||"INPUT"===n.tagName&&n.getAttribute("data-ad-id")!==e.id+"input"}}}function Fo(e,t,n){var r=new Bo(e);function i(e){e.target.hasAttribute("data-direction")&&e.preventDefault()}function o(e){t(e.target.value,!1,!0)}function s(t){r.shouldCloseOnFocusOut(t)&&Ro(t.currentTarget.parentNode,e.id)}function a(t){if((""===t.target.value||"click"===t.type)&&!Co(e.id+"group")){$o(t.target.parentNode,n()||e.initialDate&&fo(e.initialDate,e.dateFormat)||new Date,e);var r=Co(e.id+"group");if(r.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)){var i=t.target.getBoundingClientRect().height;r.setAttribute("style","bottom: "+i+"px;")}e.onAfterOpen(r)}}function l(n){var r=n.target,i=Co(e.id+"input");Ao(r)&&function(n,r){var i=yo(n);t(i)&&(Ro(r.parentNode,e.id),r.focus(),Eo(r,"input"))}(r,i),function(e){var t=e.getAttribute("data-ad-id");return"1"===t||"-1"===t}(r)&&function(t){var n=t.currentTarget,r=parseInt(t.target.getAttribute("data-ad-id")),i=t.target.value.split("$"),o=Io(i=ao([i[0],i[1],1]),r,e);$o(n,o.date,e,o.before,o.after)}(n)}function c(t){var r=Ao(So()),i=t.key,o=Po[i];!t.shiftKey||"Down"!==i&&"ArrowDown"!==i?o&&r?function(e,t,n){var r=yo(So()),i=so(r,e),o=ko(i);o&&xo(o)||function(e,t,n,r){var i=Io(n,t>0?1:-1,r);return $o(e,i.date,r,i.before,i.after),!0}(t,e,r,n)&&xo(ko(i))}(o,t.currentTarget,e):"Esc"===i||"Escape"===i?(xo(Co(e.id+"input")),Ro(t.currentTarget,e.id)):"Enter"!==i&&" "!==i||!r||(t.preventDefault(),l(t)):function(e,t,n){var r=n||t.initialDate&&fo(t.initialDate,t.dateFormat)||new Date;$o(e,r,t),xo(ko(r))}(t.currentTarget,e,n())}this.activeListeners=[],this.setListeners=function(e,t){this.activeListeners.push(_o("focus",t,a)),this.activeListeners.push(_o("mousedown",e,l)),this.activeListeners.push(_o("keydown",e,c)),this.activeListeners.push(_o("input",t,o)),this.activeListeners.push(_o("click",t,a)),this.activeListeners.push(_o("focusout",t,s)),this.activeListeners.push(_o("mousedown",e,i))}}function Lo(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function Vo(e,t,n){return function(){var r=e.selectedDate,i=r||"";return n&&""!==i?mo(r,t):i}}var jo={locale:"en-EN",weekDayFormat:"short",minDate:null,maxDate:null,initialDate:null,monthsBeforeCurrent:0,monthsAfterCurrent:0,weekStartsOn:1,id:"a1-",dateFormat:"yyyy-mm-dd",inputName:"datepicker-input",inputClass:"",rootClass:"",classPrefix:"a1-",translations:{description:"This is a datepicker. You can type in a date using the keyboard. Use the required date format. It should be:yyyy-mm-dd. You can also use the datepicker to select a date. Press shift and arrow down to focus the datepicker. Press left arrow to move one day back. Press right arrow to move one day ahead. Press arrow up to move one week back. Press arrow down to move one week ahead Press Space to select a date. Press Escape to close the datepicker.",notInRange:"The date is not within the intended date range.",nextGroups:"Show next months.",prevGroups:"Show previous months."},required:!1,disabled:!1,onAfterOpen:function(e){}};function zo(e){var t={selectedDate:null,config:jo,listeners:null};return function e(n){(function(e){var n,r;t.config=(n=e||{},r=Lo({},t.config),r=Lo(r,n));var i,o=t.config.monthsBeforeCurrent;t.config.monthsBeforeCurrent=o<0?o:-1*o,t.config.weekdays=function e(t,n,r,i){return i||(i=[]),7===i.length?i:(i.push(t.toLocaleDateString(n,{weekday:r})),e(so(t,1),n,r,i))}((i=t.config.weekStartsOn,so(ao([2014,10,9]),i)),t.config.locale,t.config.weekDayFormat)})(n),document.getElementById(t.config.id).innerHTML="",t.listeners&&function(e){for(var t=0;t<e.length;)e[t](),t++}(t.listeners.activeListeners);var r=function(e){var n,r,i,o=document.getElementById(e.id);if(vo(o,e.rootClass),wo(o,e.classPrefix),navigator.userAgent.match(/mobi/gi))!function(e,t){var n=document.createElement("input");n.type="date",t.maxDate&&qo(n,"max",t.maxDate,t.dateFormat),t.minDate&&qo(n,"min",t.minDate,t.dateFormat),e.appendChild(n)}(o,e);else{var s=function(e,t){var n=document.createElement("p");n.appendChild(document.createTextNode(t.translations.description)),n.classList.add("visuallyhidden"),n.id=t.id+"description",e.appendChild(n);var r=document.createElement("input");return r.setAttribute("aria-describedby",t.id+"description"),r.type="text",r.setAttribute("data-ad-id",t.id+"input"),r.setAttribute("name",t.inputName),r.setAttribute("autocomplete","off"),t.disabled&&r.setAttribute("disabled",t.disabled),!t.disabled&&t.required&&r.setAttribute("required","true"),r=vo(r,t.inputClass),e.appendChild(r),wo(e,t.classPrefix),r}(o,e);n=function(e,t,n){var r=n.dateFormat;return function(i,o,s){var a=Mo(i)&&i||function(e,t){var n=po(t),r=uo(co(t,n)),i=e.split(n);return!(3!==(i=i.map((function(e){return parseInt(e)}))).length||r(i,"month")>12||r(i,"month")<1||!Mo(new Date(r(i,"year"),r(i,"month")-1,r(i,"day"))))}(i,r)&&fo(i,r);return a&&(No(a,n.minDate,n.maxDate,r)||o)?(s||(t.value=mo(a,r)),t.setCustomValidity(""),e.selectedDate=a,!0):(e.selectedDate=null,(""!==i||n.required&&!o)&&t.setCustomValidity("invalid date"),!1)}}(t,s,e),r=Vo(t,e.dateFormat),i=Vo(t,e.dateFormat,!0),t.listeners=new Fo(e,n,r),t.listeners.setListeners(o,s)}return{getConfig:function(){return t.config},setDate:n,getDate:r,getDateAsString:i}}(t.config);return t.selectedDate&&r.setDate(t.selectedDate,!0),r.updateDatepicker=e,r}(e)}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.a1-div[data-ad-selector="datepicker-container"] {\n position: absolute;\n display: flex;\n flex-direction: row;\n z-index: 1001;\n}\n\n.a1-div[data-ad-selector="group-container"] {\n position: relative;\n}\n\n.a1-p.visuallyhidden:not(:focus):not(:active) {\n position: absolute;\n \n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n \n white-space: nowrap;\n \n clip-path: inset(100%);\n clip: rect(0 0 0 0);\n overflow: hidden;\n}\n\n.a1-td:empty::after {\n content: "\\00a0";\n }');const Ho={name:"DpDatepicker",props:{calendarsAfter:{type:Number,required:!1,default:0},calendarsBefore:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},maxDate:{type:String,required:!1,default:""},minDate:{type:String,required:!1,default:""},name:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""}},data(){return{datepicker:null,localConfig:{theme:"light",locale:"DE-de",dateFormat:"dd.mm.yyyy",id:this.id,inputClass:"o-form__control-input width-100p"}}},watch:{value:function(){if(null!==this.value){const e=document.getElementById(this.id).getElementsByTagName("input")[0].value!==this.value;this.datepicker&&e&&this.datepicker.setDate(this.value,!0)}},maxDate:function(){if(this.datepicker.getDate()){const e=this.datepicker.getDateAsString();this.datepicker=this.datepicker.updateDatepicker({maxDate:this.maxDate}),this.datepicker.setDate(e,!0)}else this.datepicker=this.datepicker.updateDatepicker({maxDate:this.maxDate})},minDate:function(){if(this.datepicker.getDate()){const e=this.datepicker.getDateAsString();this.datepicker=this.datepicker.updateDatepicker({minDate:this.minDate}),this.datepicker.setDate(e,!0)}else this.datepicker=this.datepicker.updateDatepicker({minDate:this.minDate})},required:function(){this.datepicker=this.datepicker.updateDatepicker({required:this.required})},disabled:function(){this.datepicker=this.datepicker.updateDatepicker({disabled:this.disabled})}},methods:{emitUpdate(e){const t=e.target.value,n=this.datepicker.getDateAsString(),r=n===t?n:t;this.$emit("input",r),this.$root.$emit("dp-datepicker",{id:this.id,value:r})}},mounted(){const e={...this.calendarsAfter>0?{monthsAfterCurrent:this.calendarsAfter}:{},...this.calendarsBefore>0?{monthsBeforeCurrent:this.calendarsBefore}:{},...""!==this.maxDate?{maxDate:this.maxDate}:{},...""!==this.minDate?{minDate:this.minDate}:{},...""!==this.name?{inputName:this.name}:{},required:this.required,disabled:this.disabled,...this.localConfig};this.datepicker=zo(e),""!==this.value&&this.datepicker.setDate(this.value)}},Uo=Ho,Wo=(0,l.Z)(Uo,(function(){var e=this;return(0,e._self._c)("div",{attrs:{id:e.id,"data-cy":"datepicker"},on:{input:function(t){return t.stopPropagation(),t.preventDefault(),e.emitUpdate.apply(null,arguments)}}})}),[],!1,null,null,null).exports,Zo={name:"DpDateRangePicker",components:{DpDatepicker:Wo},props:{calendarsAfter:{type:Number,required:!1,default:0},calendarsBefore:{type:Number,required:!1,default:0},endDisabled:{type:Boolean,required:!1,default:!1},endId:{type:String,required:!0},endName:{type:String,required:!1,default:""},endValue:{type:String,required:!1,default:""},enforcePlausibleDates:{type:Boolean,required:!1,default:!1},maxDate:{type:String,required:!1,default:""},minDate:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},startDisabled:{type:Boolean,required:!1,default:!1},startId:{type:String,required:!0},startName:{type:String,required:!1,default:""},startValue:{type:String,required:!1,default:""}},data(){return{endDate:this.endValue,maxStartDate:this.enforcePlausibleDates?this.endValue:"",minEndDate:this.enforcePlausibleDates?this.startValue:""}},computed:{currentDate:()=>(0,r.p6)()},watch:{startValue(e){this.minEndDate=this.enforcePlausibleDates?e:""},endValue(e){this.maxStartDate=this.enforcePlausibleDates?e:""}},methods:{handleInputEndDate(e){this.updateMaxStartDate(e),this.$emit("input:end-date",e)},handleInputStartDate(e){this.updateMinEndDate(e),this.$emit("input:start-date",e)},updateMaxStartDate(e){this.endDate=e,this.maxStartDate=this.enforcePlausibleDates&&e?e:""},updateMinEndDate(e){this.minEndDate=this.enforcePlausibleDates&&e?e:""}}},Ko=(0,l.Z)(Zo,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex items-center"},[t("dp-datepicker",{attrs:{id:e.startId,name:e.startName,"min-date":e.minDate,"max-date":e.maxStartDate,"calendars-after":e.calendarsAfter,"calendars-before":e.calendarsBefore,disabled:e.startDisabled,value:e.startValue,required:e.required||""!==e.endDate&&e.endDate<e.currentDate,"data-cy":"startDateDescription"},on:{input:e.handleInputStartDate}}),e._v(" "),t("span",[e._v("-")]),e._v(" "),t("dp-datepicker",{attrs:{id:e.endId,name:e.endName,"min-date":e.minEndDate,"max-date":e.maxDate,"calendars-after":e.calendarsAfter,"calendars-before":e.calendarsBefore,disabled:e.endDisabled,value:e.endValue,required:e.required,"data-cy":"endDateDescription"},on:{input:e.handleInputEndDate}})],1)}),[],!1,null,null,null).exports;var Jo=s(285),Go=s.n(Jo),Yo=s(1635),Xo=s.n(Yo);const Qo={name:"DpInput",components:{DpLabel:ui.default},mixins:[V.gH],props:{ariaLabelledby:{type:[String,Boolean],required:!1,default:!1},autocomplete:{type:String,required:!1,default:""},dataCounter:{type:String,required:!1,default:""},dataCy:{type:String,required:!1,default:""},dataDpValidateError:{type:String,required:!1,default:""},dataDpValidateIf:{type:String,required:!1,default:""},dataDpValidateShouldEqual:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},hasIcon:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},label:{type:Object,default:()=>({bold:!0,hint:"",text:"",tooltip:""}),validator:e=>Object.keys(e).every((e=>["bold","hint","text","tooltip"].includes(e)))},maxlength:e,minlength:e,name:{type:String,required:!1,default:""},pattern:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},preventDefaultOnEnter:{type:Boolean,required:!1,default:!0},readonly:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},size:{type:[Number,null],required:!1,default:null},type:{type:String,required:!1,default:"text"},value:{type:String,required:!1,default:""},width:{type:String,default:"u-1-of-1"}},data(){return{currentValue:this.value}},computed:{classes(){let e=[];return e=this.size>0?[]:[...e,"u-1-of-1"],e=this.readonly||this.disabled?[...e,"bg-color--grey-light-2"]:e,e="search"!==this.type?[...e,"o-form__control-input"]:[...e,"o-form__control-search"],e=this.hasIcon?[...e,"u-pr"]:e,e.join(" ")},containerWidth(){return"auto"===this.width||this.size>0?"":this.width},labelHint(){const e=void 0!==this.label.hint&&""!==this.label.hint?[this.label.hint]:[];return this.maxlength&&!this.minlength?e.push((0,r.T8)(this.currentValue.length,this.maxlength)):this.minlength&&!this.maxlength?e.push((0,r.C4)(this.currentValue.length,this.minlength)):this.maxlength&&this.minlength&&(this.maxlength===this.minlength?e.push((0,r.f5)(this.currentValue.length,this.maxlength)):(e.push((0,r.T8)(this.currentValue.length,this.maxlength)),e.push((0,r.C4)(this.currentValue.length,this.minlength)))),e}},watch:{value:function(){this.currentValue=this.value}},methods:{handleEnter(e){!0===this.preventDefaultOnEnter&&e.preventDefault(),this.$emit("enter")}}},es=Qo,ts=(0,l.Z)(es,(function(){var e=this,t=e._self._c;return t("div",{class:""!==e.containerWidth&&e.prefixClass(e.containerWidth)},[""!==e.label.text?t("dp-label",e._b({},"dp-label",{...e.label,for:e.id,hint:e.labelHint,required:e.required},!1)):e._e(),"checkbox"===e.type?t("input",{directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],class:e.prefixClass(e.classes),attrs:{id:e.id,name:""!==e.name?e.name:null,"data-counter":""!==e.dataCounter?e.dataCounter:null,"data-dp-validate-error":e.dataDpValidateError||null,"data-dp-validate-if":""!==e.dataDpValidateIf?e.dataDpValidateIf:null,"data-dp-validate-should-equal":""!==e.dataDpValidateShouldEqual?e.dataDpValidateShouldEqual:null,"data-cy":""!==e.dataCy&&e.dataCy,"aria-labelledby":e.ariaLabelledby,maxlength:""!==e.maxlength?e.maxlength:null,minlength:""!==e.minlength?e.minlength:null,pattern:""!==e.pattern?e.pattern:null,placeholder:""!==e.placeholder?e.placeholder:null,disabled:e.disabled,readonly:e.readonly,required:e.required,autocomplete:""!==e.autocomplete?e.autocomplete:null,size:e.size&&e.size>0?e.size:null,type:"checkbox"},domProps:{checked:Array.isArray(e.currentValue)?e._i(e.currentValue,null)>-1:e.currentValue},on:{focus:function(t){return e.$emit("focus")},input:function(t){return e.$emit("input",e.currentValue)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleEnter.apply(null,arguments)},change:function(t){var n=e.currentValue,r=t.target,i=!!r.checked;if(Array.isArray(n)){var o=e._i(n,null);r.checked?o<0&&(e.currentValue=n.concat([null])):o>-1&&(e.currentValue=n.slice(0,o).concat(n.slice(o+1)))}else e.currentValue=i}}}):"radio"===e.type?t("input",{directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],class:e.prefixClass(e.classes),attrs:{id:e.id,name:""!==e.name?e.name:null,"data-counter":""!==e.dataCounter?e.dataCounter:null,"data-dp-validate-error":e.dataDpValidateError||null,"data-dp-validate-if":""!==e.dataDpValidateIf?e.dataDpValidateIf:null,"data-dp-validate-should-equal":""!==e.dataDpValidateShouldEqual?e.dataDpValidateShouldEqual:null,"data-cy":""!==e.dataCy&&e.dataCy,"aria-labelledby":e.ariaLabelledby,maxlength:""!==e.maxlength?e.maxlength:null,minlength:""!==e.minlength?e.minlength:null,pattern:""!==e.pattern?e.pattern:null,placeholder:""!==e.placeholder?e.placeholder:null,disabled:e.disabled,readonly:e.readonly,required:e.required,autocomplete:""!==e.autocomplete?e.autocomplete:null,size:e.size&&e.size>0?e.size:null,type:"radio"},domProps:{checked:e._q(e.currentValue,null)},on:{focus:function(t){return e.$emit("focus")},input:function(t){return e.$emit("input",e.currentValue)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleEnter.apply(null,arguments)},change:function(t){e.currentValue=null}}}):t("input",{directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],class:e.prefixClass(e.classes),attrs:{id:e.id,name:""!==e.name?e.name:null,"data-counter":""!==e.dataCounter?e.dataCounter:null,"data-dp-validate-error":e.dataDpValidateError||null,"data-dp-validate-if":""!==e.dataDpValidateIf?e.dataDpValidateIf:null,"data-dp-validate-should-equal":""!==e.dataDpValidateShouldEqual?e.dataDpValidateShouldEqual:null,"data-cy":""!==e.dataCy&&e.dataCy,"aria-labelledby":e.ariaLabelledby,maxlength:""!==e.maxlength?e.maxlength:null,minlength:""!==e.minlength?e.minlength:null,pattern:""!==e.pattern?e.pattern:null,placeholder:""!==e.placeholder?e.placeholder:null,disabled:e.disabled,readonly:e.readonly,required:e.required,autocomplete:""!==e.autocomplete?e.autocomplete:null,size:e.size&&e.size>0?e.size:null,type:e.type},domProps:{value:e.currentValue},on:{focus:function(t){return e.$emit("focus")},input:[function(t){t.target.composing||(e.currentValue=t.target.value)},function(t){return e.$emit("input",e.currentValue)}],keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleEnter.apply(null,arguments)}}})],1)}),[],!1,null,null,null).exports,ns={name:"DpResettableInput",components:{DpIcon:Yr,DpInput:ts},props:{dataCy:{type:String,required:!1,default:""},buttonVariant:{type:String,required:!1,default:"medium",validator:e=>["small","medium"].includes(e)},defaultValue:{type:String,required:!1,default:""},id:{type:String,required:!0},inputAttributes:{type:Object,required:!1,default:()=>({})},pattern:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""}},data(){return{currentValue:this.value}},computed:{buttonClass(){return"small"===this.buttonVariant?"o-form__control-search-reset--small":"o-form__control-search-reset"},iconSize(){return this.buttonVariant}},watch:{value:function(){this.currentValue=this.value}},methods:{resetValue(){this.$emit("reset")}}},rs=(0,l.Z)(ns,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"relative"},[t("dp-input",e._b({attrs:{id:e.id,"data-cy":e.dataCy,"has-icon":"",required:e.required,pattern:e.pattern},on:{blur:function(t){return e.$emit("blur",e.currentValue)},input:function(t){return e.$emit("input",e.currentValue)},enter:function(t){return e.$emit("enter",e.currentValue)},focus:function(t){return e.$emit("focus")}},model:{value:e.currentValue,callback:function(t){e.currentValue=t},expression:"currentValue"}},"dp-input",e.inputAttributes,!1)),e._v(" "),e.inputAttributes.disabled?e._e():t("button",{staticClass:"btn--blank o-link--default",class:e.buttonClass,attrs:{disabled:e.currentValue===e.defaultValue},on:{click:e.resetValue}},[t("dp-icon",{attrs:{icon:"xmark",size:e.iconSize}})],1)],1)}),[],!1,null,null,null).exports;var is=/iPhone/i,ss=/iPod/i,as=/iPad/i,ls=/\biOS-universal(?:.+)Mac\b/i,cs=/\bAndroid(?:.+)Mobile\b/i,ds=/Android/i,us=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ps=/Silk/i,hs=/Windows Phone/i,fs=/\bWindows(?:.+)ARM\b/i,ms=/BlackBerry/i,gs=/BB10/i,ys=/Opera Mini/i,vs=/\b(CriOS|Chrome)(?:.+)Mobile/i,bs=/Mobile(?:.+)Firefox\b/i,ws=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};const xs="00:00",Ss={name:"DpTimePicker",components:{DpInput:ts,DpLabel:ui.default,DpResettableInput:rs},directives:{ClickOutside:vi()},props:{disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},label:{type:String,required:!1,default:""},minuteSteps:{type:Number,required:!1,default:15},minValue:{type:String,required:!1,default:""},value:{type:String,required:!1,default:xs}},data:()=>({currentHour:"00",currentMinutes:"00",isInputFocused:!1,showFlyout:!1}),computed:{availableHours(){if(""!==this.minValue){const e=this.minValue.split(":")[0];return this.hours.filter((t=>this.availableMinutes.length?t>=e:t>e))}return this.hours},availableMinutes(){if(""!==this.minValue){const e=this.minValue.split(":"),t=e[0],n=e[1];return this.currentHour===t?this.minutes.filter((e=>e>=n)):this.minutes}return this.minutes},currentTime(){return`${this.currentHour}:${this.currentMinutes}`},hours(){let e=Array.from({length:24},((e,t)=>t));return e=e.map((e=>e.toString().padStart(2,"0"))),e},isHour:()=>e=>e.target.id.includes("hour"),isMinute:()=>e=>e.target.id.includes("minute"),isMobileDevice:()=>function(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=t.userAgent,r=n.split("[FBAN");void 0!==r[1]&&(n=r[0]),void 0!==(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(e){return function(t){return t.test(e)}}(n),o={apple:{phone:i(is)&&!i(hs),ipod:i(ss),tablet:!i(is)&&(i(as)||ws(t))&&!i(hs),universal:i(ls),device:(i(is)||i(ss)||i(as)||i(ls)||ws(t))&&!i(hs)},amazon:{phone:i(us),tablet:!i(us)&&i(ps),device:i(us)||i(ps)},android:{phone:!i(hs)&&i(us)||!i(hs)&&i(cs),tablet:!i(hs)&&!i(us)&&!i(cs)&&(i(ps)||i(ds)),device:!i(hs)&&(i(us)||i(ps)||i(cs)||i(ds))||i(/\bokhttp\b/i)},windows:{phone:i(hs),tablet:i(fs),device:i(hs)||i(fs)},other:{blackberry:i(ms),blackberry10:i(gs),opera:i(ys),firefox:i(bs),chrome:i(vs),device:i(ms)||i(gs)||i(ys)||i(bs)||i(vs)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator).any,inputAttributes(){return this.isMobileDevice?{disabled:this.disabled,autocomplete:"off",type:"time"}:{disabled:this.disabled,autocomplete:"off"}},minutes(){let e=Array.from({length:60},((e,t)=>t));return e=e.filter((e=>!(e%this.minuteSteps))),e=e.map((e=>e.toString().padStart(2,"0"))),e}},watch:{isInputFocused(){const e=this.$refs[`timeInput:${this.id}`].$el;this.isInputFocused?e.addEventListener("keydown",this.handleShiftDown):e.removeEventListener("keydown",this.handleShiftDown)},showFlyout(){this.showFlyout?document.body.addEventListener("keydown",this.handleKeyDown):document.body.removeEventListener("keydown",this.handleKeyDown)},value(){this.updateTime(this.value)}},methods:{closeFlyout(){this.showFlyout&&this.toggleFlyout()},focusHour(){const e=`hour:${this.currentHour}`;document.getElementById(e).focus()},handleBlur(){this.isInputFocused&&this.toggleInputFocus()},handleCurrentMinutesUnavailable(e,t){return""!==this.minValue&&(e!==this.minValue.split(":")[0]||this.availableMinutes.includes(t)||(t=this.availableMinutes[0])),t},handleEnter(e){e.target?(this.isHour(e)&&this.handleInput(this.currentMinutes,"minute"),this.isMinute(e)&&this.handleInput(this.currentHour,"hour")):this.handleInput(e),this.showFlyout&&this.toggleFlyout()},handleFocus(){this.showFlyout||this.toggleFlyout(),this.isInputFocused||this.toggleInputFocus()},handleInput(e,t=""){""===t&&this.updateTime(e),"hour"===t&&this.setHour(e),"minute"===t&&this.setMinutes(e),this.$emit("input",this.currentTime)},handleKeyDown(e){"Escape"===e.key&&this.toggleFlyout()," "===e.key&&(e.preventDefault(),this.handleEnter())},handleReset(){this.handleInput(xs)},handleShiftDown(e){!e.shiftKey||"Down"!==e.key&&"ArrowDown"!==e.key||this.focusHour()},setHour(e){this.currentHour=e},setMinutes(e){this.currentMinutes=e},toggleFlyout(){this.showFlyout=!this.showFlyout},toggleInputFocus(){this.isInputFocused=!this.isInputFocused},updateTime(e){const t=e.split(":"),n=t[0],r=this.handleCurrentMinutesUnavailable(n,t[1]);this.setHour(n),this.setMinutes(r)}}},Cs=Ss;var ks=(0,l.Z)(Cs,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeFlyout,expression:"closeFlyout"}],staticClass:"c-timepicker display--inline-block",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeFlyout.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t=>e.handleEnter(t)).apply(null,arguments)}]}},[""!==e.label?t("dp-label",{attrs:{for:"timeInput",text:e.label}}):e._e(),e._v(" "),e.isMobileDevice?t("dp-input",{staticClass:"width-100",attrs:{id:`timeInput:${e.id}`,type:"time",pattern:"([01]?[0-9]|2[0-3]):[0-5][0-9]",value:e.currentTime,autocomplete:"off"},on:{input:t=>e.handleInput(t)}}):t("dp-resettable-input",{ref:`timeInput:${e.id}`,staticClass:"width-100",attrs:{id:`timeInput:${e.id}`,"button-variant":"small","default-value":"00:00","input-attributes":{disabled:e.disabled,autocomplete:"off"},pattern:"([01]?[0-9]|2[0-3]):[0-5][0-9]",value:e.currentTime},on:{reset:e.handleReset,enter:t=>e.handleEnter(t),focus:e.handleFocus,blur:e.handleBlur,input:t=>e.handleInput(t)}}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showFlyout,expression:"showFlyout"}],ref:"flyout",staticClass:"flex items-start justify-evenly c-timepicker__flyout font-size-small",attrs:{tabindex:"0"}},[t("ul",{staticClass:"u-m-0_25 u-mr-0 u-pr-0_25 overflow-y-scroll height-130"},e._l(e.availableHours,(function(n){return t("li",{key:`${e.id}:hour:${n}`,staticClass:"c-timepicker__flyout-item",class:{"is-selected":e.currentHour===n}},[t("button",{staticClass:"btn--blank u-ph-0_125 u-pv-0_125",attrs:{tabindex:"0",value:n,id:`${e.id}:hour:${n}`},on:{click:function(t){return t.preventDefault(),e.handleInput(n,"hour")}}},[e._v("\n "+e._s(n)+"\n ")])])})),0),e._v(" "),t("ul",{staticClass:"u-m-0_25 height-130",class:e.minutes.length>5?"overflow-y-scroll":""},e._l(e.availableMinutes,(function(n){return t("li",{key:`${e.id}:minute:${n}`,staticClass:"c-timepicker__flyout-item",class:{"is-selected":e.currentMinutes===n}},[t("button",{staticClass:"btn--blank u-ph-0_125 u-pv-0_125",attrs:{tabindex:"0",value:n,id:`${e.id}:minute:${n}`},on:{click:function(t){return t.preventDefault(),e.handleInput(n,"minute")}}},[e._v("\n "+e._s(n)+"\n ")])])})),0)])],1)}),[],!1,null,null,null);const _s=ks.exports;Xo().extend(Go());const As={name:"DpDatetimePicker",components:{DpDatepicker:Wo,DpLabel:async()=>await Promise.resolve().then(s.bind(s,3275)),DpTimePicker:_s},props:{disabled:{type:Boolean,required:!1,default:!1},hiddenInput:{type:Boolean,required:!1,default:!1},hint:{type:String,required:!1,default:""},id:{type:String,required:!0},label:{type:String,required:!1,default:""},maxDate:{type:String,required:!1,default:""},minDate:{type:String,required:!1,default:""},name:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!0}},data:()=>({date:"",time:"00:00"}),computed:{currentDatetime(){const e=Xo()(`${this.date} ${this.time}`,"DD.MM.YYYY HH:mm");return e.isValid()?e.format():""},isCurrentDateSelected(){return""!==this.minDate&&this.date===this.minDate},minTime(){return this.isCurrentDateSelected?(new Date).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"}):""}},watch:{value:function(e){this.setDatetime(e)}},methods:{setDatetime(e){const t=Xo()(e);t.isValid()&&(this.date=t.format("DD.MM.YYYY"),this.time=t.format("HH:mm"))}},mounted(){this.setDatetime(this.value)}},Es=(0,l.Z)(As,(function(){var e=this,t=e._self._c;return t("div",[""!==e.label?t("dp-label",{attrs:{for:`datePicker:${e.id}`,hint:e.hint,required:e.required,text:e.label}}):e._e(),e._v(" "),t("div",{staticClass:"o-form__control-wrapper o-form__group"},[t("dp-datepicker",{staticClass:"o-form__group-item shrink",attrs:{"calendars-after":2,disabled:e.disabled,id:`datePicker:${e.id}`,"max-date":e.maxDate,"min-date":e.minDate,required:e.required},on:{input:function(t){return e.$emit("input",e.currentDatetime)}},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}}),e._v(" "),t("dp-time-picker",{staticClass:"o-form__group-item",attrs:{disabled:e.disabled,id:`timePicker:${e.id}`,"min-value":e.minTime},on:{input:function(t){return e.$emit("input",e.currentDatetime)}},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}}),e._v(" "),e.hiddenInput&&e.name?t("input",{attrs:{type:"hidden",disabled:e.disabled,name:e.name},domProps:{value:e.currentDatetime}}):e._e()],1)],1)}),[],!1,null,null,null).exports,Os={name:"DpDetails",directives:{cleanhtml:Ci.J},props:{summary:{type:String,required:!1,default:""}},data:()=>({isOpen:!1})},Ts=(0,l.Z)(Os,(function(){var e=this,t=e._self._c;return t("details",{staticClass:"o-details space-stack-xs",attrs:{role:"group"}},[t("summary",{staticClass:"o-details__trigger o-link--default cursor-pointer display--inline-block",attrs:{"aria-expanded":e.isOpen,role:"button"},on:{click:function(t){e.isOpen=!e.isOpen}}},[t("i",{staticClass:"fa width-s text--center",class:{"fa-caret-down":e.isOpen,"fa-caret-right":!e.isOpen},attrs:{"aria-hidden":"true"}}),e._v(" "),t("strong",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.summary,expression:"summary"}]})]),e._v(" "),t("div",[e._t("default")],2)])}),[],!1,null,null,null).exports,Ds={name:"DpFormRow",data:()=>({elementCount:0,isFullRow:!0}),computed:{elementsWidths(){return this.$children.map((e=>e.$props.width||"u-1-of-1"))||[]}},methods:{determineRowWidth(){if(this.elementsWidths.length>0){const e=this.elementsWidths.map((e=>parseInt(e.match(/\d+/)))).reduce(((e,t)=>e+parseInt(t))),t=parseInt(this.elementsWidths[0].match(/\d+$/)[0]);this.isFullRow=t===e}},setPadding(){this.$children.forEach((e=>{const t=this.$children.indexOf(e);(t<this.elementCount-1||t===this.elementCount-1&&!1===this.isFullRow)&&e.$el.classList.add("u-pr")}))}},mounted(){this.elementCount=this.$children.length,this.determineRowWidth(),this.setPadding()}},Ms=(0,l.Z)(Ds,(function(){return(0,this._self._c)("div",{staticClass:"u-mb-0_75"},[this._t("default")],2)}),[],!1,null,null,null).exports,Ns={name:"DpTextWrapper",functional:!0,props:{text:{type:String,default:""},data:{type:Object,default:()=>({})}},render(e,t){const n={template:`<div class='text-wrapper width-fit-content' data-cy='textWrapper'>${t.props.text}</div>`,data:()=>t.props.data};return t.props.text?e(n):e(Mi,{props:{isLoading:!0}})}},Is=Ns,Ps=(0,l.Z)(Is,void 0,void 0,!1,null,null,null).exports,$s={name:"DpHeightLimit",components:{DpTextWrapper:Ps},props:{shortText:{type:String,required:!0},fullText:{type:String,required:!0},noEvent:{type:Boolean,required:!1,default:!1},element:{type:String,required:!0},isShortened:{type:Boolean,required:!1,default:!1}},data:()=>({isExpanded:!1}),computed:{currentText(){return this.isExpanded?this.fullText:this.shortText}},methods:{toggle(){this.noEvent?this.isExpanded=!this.isExpanded:this.$emit("heightLimit:toggle",(()=>{this.isExpanded=!this.isExpanded}))}}},Rs=(0,l.Z)($s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"break-words overflow-x-auto"},[t("dp-text-wrapper",{attrs:{text:""!==e.currentText?e.currentText:" "}}),e._v(" "),e.isShortened?t("button",{staticClass:"btn--blank o-link--default",attrs:{type:"button","aria-label":e.Translator.trans("aria.toggle")},on:{click:function(t){return t.stopPropagation(),e.toggle.apply(null,arguments)}}},[e._v("\n "+e._s(e.Translator.trans(e.isExpanded?"show.less":"show.more"))+"\n ")]):e._e()],1)}),[],!1,null,null,null).exports,qs=require("lscache");var Bs=s.n(qs);const Fs={name:"DpInlineNotification",components:{DpIcon:Yr},props:{dismissible:{type:Boolean,required:!1,default:!1},dismissibleKey:{type:String,required:!1,default:null},message:{type:String,required:!1,default:null},type:{type:String,required:!1,default:"error"}},data:()=>({iconClasses:{confirm:"fa-check",error:"fa-exclamation-circle",info:"fa-info-circle",warning:"fa-exclamation-triangle"},isDismissed:!0}),methods:{dismiss(){this.isDismissed=!0,this.dismissibleKey&&Bs().set(this.dismissibleKey,Date.now())},show(){this.isDismissed=!1,this.dismissibleKey&&Bs().remove(this.dismissibleKey)}},mounted(){this.isDismissed=!(!this.dismissible||!this.dismissibleKey||!Bs().get(this.dismissibleKey))}},Ls=(0,l.Z)(Fs,(function(){var e=this,t=e._self._c;return!1===e.isDismissed?t("div",{class:`flash flash-${e.type} flex`},[t("i",{staticClass:"fa u-pr-0_25 line-height--1_4",class:e.iconClasses[e.type],attrs:{"aria-hidden":"true"}}),e._v(" "),t("div",{staticClass:"space-stack-xs"},[e.message?t("div",{domProps:{innerHTML:e._s(e.message)}}):e._e(),e._v(" "),e._t("default"),e._v(" "),e.dismissible?t("button",{staticClass:"btn--blank o-link--default weight--bold",domProps:{textContent:e._s(e.Translator.trans("hint.dismiss"))},on:{click:e.dismiss}}):e._e()],2)]):t("div",{staticClass:"cf"},[t("button",{staticClass:"btn--blank color--grey float--right",attrs:{"aria-label":e.Translator.trans("hint.show")},on:{click:e.show}},[t("dp-icon",{attrs:{icon:"info","aria-hidden":"true"}})],1)])}),[],!1,null,null,null).exports,Vs={name:"DpModal",components:{DpIcon:Yr},mixins:[V.gH],props:{ariaLabel:{required:!1,type:String,default:""},contentBodyClasses:{required:!1,type:String,default:""},contentClasses:{required:!1,type:String,default:""},contentHeaderClasses:{required:!1,type:String,default:""},modalId:{required:!1,type:String,default:""}},data:()=>({isOpenModal:!1,lastFocusedElement:"",focusableElements:[]}),computed:{hasHeader(){return void 0!==this.$slots.header}},methods:{getFocusableElements(){const e=this.$el.querySelectorAll('a, button:not([disabled]), input, textarea, select, details, [tabindex]:not([tabindex="-1"])');e.length<=0?this.focusableElements=[]:this.focusableElements=[...e].filter((e=>this.isElementVisible(e)))},isElementVisible(e){const t=null!==e.offsetParent,n=window.getComputedStyle(e),r="none"!==n.display&&"0"!==n.opacity;return t&&r},toggleByEvent(e){void 0!==e&&this.modalId===e&&this.toggle()},toggle(){this.isOpenModal=!1===this.isOpenModal,this.$emit("modal:toggled",this.isOpenModal),!0===this.isOpenModal?(this.lastFocusedElement=document.activeElement,this.$nextTick((()=>{this.getFocusableElements(),this.focusableElements.length>0&&this.focusableElements[0].focus({preventScroll:!0})}))):this.lastFocusedElement.focus()},preventScroll(e){const t=document.querySelector("html"),n=document.querySelector("body");e?(t.style.overflow="hidden",n.style.overflowY="scroll"):(t.style.overflow=null,n.style.overflowY=null)},checkKeyEvent(e){if("Escape"===e.key)this.toggle();else if("Tab"===e.key){e.preventDefault();const t=this.focusableElements.findIndex((t=>t===e.target)),n=this.focusableElements.length-1;if(this.focusableElements.length<2);else if(!1===e.shiftKey&&e.target===this.focusableElements[n])this.focusableElements[0].focus();else if(!0===e.shiftKey&&e.target===this.focusableElements[0])this.focusableElements[n].focus();else{const n=e.shiftKey?t-1:t+1;this.focusableElements[n].focus()}}}},mounted(){this.$root.$on("modal:toggle",(e=>this.toggleByEvent(e)))},updated(){this.$nextTick((()=>this.getFocusableElements()))}},js=Vs,zs=(0,l.Z)(js,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("o-modal"),on:{keydown:e.checkKeyEvent}},[t("transition",{attrs:{name:"content",appear:""},on:{enter:e.preventScroll}},[e.isOpenModal?t("aside",{class:e.prefixClass("o-modal__content "+e.contentClasses),attrs:{"aria-label":e.ariaLabel,role:"dialog"}},[t("button",{class:e.prefixClass("btn--blank o-link--default absolute u-right-0"),attrs:{"aria-label":e.Translator.trans("close.window"),title:e.Translator.trans("close.window")},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggle()}}},[t("dp-icon",{attrs:{icon:"close",size:"large"}})],1),e._v(" "),t("div",{class:e.prefixClass("o-modal__body "+e.contentBodyClasses)},[e.hasHeader?t("h2",{class:e.prefixClass("font-size-h1 border--bottom u-pb-0_25 "+e.contentHeaderClasses)},[e._t("header")],2):e._e(),e._v(" "),e._t("default")],2)]):e._e()]),e._v(" "),t("transition",{attrs:{name:"backdrop",appear:""},on:{"after-leave":function(t){return e.preventScroll(!1)}}},[e.isOpenModal?t("div",{class:e.prefixClass("o-modal__backdrop"),on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggle()}}}):e._e()])],1)}),[],!1,null,null,null).exports,Hs=require("vue-multiselect"),Us={name:"DpMultiselect",components:{VueMultiselect:s.n(Hs)()},props:{closeOnSelect:{type:Boolean,required:!1,default:!0},customLabel:{type:Function,required:!1,default:void 0},dataCy:{type:String,required:!1,default:"multiselect"},deselectLabel:{type:String,required:!1,default:""},deselectGroupLabel:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:""},groupSelect:{type:Boolean,required:!1,default:!1},groupValues:{type:String,required:!1,default:""},id:{type:String,required:!1,default:""},label:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!1},maxHeight:{type:Number,required:!1,default:300},multiple:{required:!1,type:Boolean,default:!1},name:{type:String,required:!1,default:""},options:{type:Array,required:!0},placeholder:{type:String,required:!1,default:()=>Translator.trans("choose")},required:{required:!1,type:Boolean,default:!1},searchable:{required:!1,type:Boolean,default:!0},selectionControls:{required:!1,type:Boolean,default:!1},selectGroupLabel:{type:String,required:!1,default:""},selectLabel:{type:String,required:!1,default:""},selectedLabel:{type:String,required:!1,default:""},tagPlaceholder:{type:String,required:!1,default:()=>Translator.trans("tag.create")},trackBy:{type:[String,null],required:!1,default:null},value:{type:[String,Number,Array,Object],required:!1,default:""}}};var Ws=(0,l.Z)(Us,(function(){var e=this,t=e._self._c;return t("div",[t("vue-multiselect",e._b({directives:[{name:"dp-validate-multiselect",rawName:"v-dp-validate-multiselect",value:e.required,expression:"required"}],on:{close:t=>e.$emit("close",t),input:t=>e.$emit("input",t),open:t=>e.$emit("open",t),remove:t=>e.$emit("remove",t),"search-change":t=>e.$emit("search-change",t),select:t=>e.$emit("select",t),tag:t=>e.$emit("tag",t)},scopedSlots:e._u([{key:"noResult",fn:function(){return[e._v("\n "+e._s(e.Translator.trans("autocomplete.noResults"))+"\n ")]},proxy:!0},{key:"noOptions",fn:function(){return[e._v("\n "+e._s(e.Translator.trans("explanation.noentries"))+"\n ")]},proxy:!0},{key:"option",fn:function(t){return[e._t("option",null,{props:t})]}},{key:"tag",fn:function(t){return[e._t("tag",null,{props:t})]}},e.selectionControls?{key:"beforeList",fn:function(n){return[t("div",{staticClass:"border-bottom"},[t("button",{staticClass:"btn--blank weight--bold u-ph-0_5 u-pv-0_25",attrs:{disabled:e.value.length===e.options.length===0,type:"button"},domProps:{textContent:e._s(e.Translator.trans("select.all"))},on:{click:function(t){return e.$emit("select-all")}}}),e._v(" "),t("button",{staticClass:"btn--blank weight--bold u-ph-0_5 u-pv-0_25",attrs:{disabled:0===e.value.length,type:"button"},domProps:{textContent:e._s(e.Translator.trans("unselect.all"))},on:{click:function(t){return e.$emit("unselect-all")}}})])]}}:null],null,!0)},"vue-multiselect",{closeOnSelect:e.closeOnSelect,customLabel:e.customLabel,dataCy:e.dataCy,deselectGroupLabel:e.deselectGroupLabel,deselectLabel:e.deselectLabel,disabled:e.disabled,groupLabel:e.groupLabel,groupSelect:e.groupSelect,groupValues:e.groupValues,id:e.id,label:e.label,loading:e.loading,maxHeight:e.maxHeight,multiple:e.multiple,name:e.name,options:e.options,placeholder:e.placeholder,searchable:e.searchable,selectGroupLabel:e.selectGroupLabel,selectLabel:e.selectLabel,selectedLabel:e.selectedLabel,tagPlaceholder:e.tagPlaceholder,trackBy:e.trackBy,value:e.value},!1))],1)}),[],!1,null,null,null);const Zs=Ws.exports,Ks={name:"DpMultistepNav",mixins:[V.gH],props:{activeStep:{type:Number,required:!1,default:0},steps:{type:Array,required:!0}},methods:{changeStep(e){this.$emit("change-step",e)}}},Js=(0,l.Z)(Ks,(function(){var e=this,t=e._self._c;return t("nav",{class:e.prefixClass("c-multistep")},e._l(e.steps,(function(n,r){return t("button",{key:`step_${r}`,staticClass:"btn--blank",class:[e.prefixClass("c-multistep__step"),r===e.activeStep?e.prefixClass("is-active"):"",r>e.activeStep?e.prefixClass("is-disabled"):""],attrs:{disabled:r>e.activeStep,"aria-label":n.title?e.Translator.trans(n.title):e.Translator.trans(n.label)},on:{click:function(t){return e.changeStep(r)}}},[t("span",[n.icon?t("i",{class:[e.prefixClass(n.icon),e.prefixClass("fa u-mr-0_25")],attrs:{"aria-hidden":"true"}}):e._e(),e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])])})),0)}),[],!1,null,null,null).exports,Gs={name:"DpPager",components:{DpSlidingPagination:Xi,DpMultiselect:Zs},props:{currentPage:{required:!1,type:Number,default:1},totalItems:{required:!1,type:Number,default:1},totalPages:{required:!1,type:Number,default:1},perPage:{required:!1,type:Number,default:1},limits:{required:!1,type:Array,default:()=>[]}},data(){return{itemsPerPage:this.perPage<=this.totalItems?this.perPage:this.totalItems}},computed:{filteredLimits(){const e=this.limits.filter((e=>e<=this.totalItems));return e.length<this.limits.length&&this.totalItems>e[e.length-1]&&e.push(this.totalItems),!1===e.includes(this.itemsPerPage)&&e.push(this.itemsPerPage),e.sort(((e,t)=>e-t)),e}},methods:{handlePageChange(e){this.$emit("page-change",e)},handleSizeChange(e){this.$emit("size-change",parseInt(e))}}},Ys=Gs,Xs=(0,l.Z)(Ys,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-pager__dropdown"},[t("label",{staticClass:"c-pager__dropdown-label u-m-0 u-p-0 weight--normal display--inline-block",attrs:{"aria-label":e.Translator.trans("pager.amount.multiple.label",{results:e.totalItems,items:e.Translator.trans("pager.amount.multiple.items")})}},[e.totalItems>Math.min(...e.limits)?t("dp-sliding-pagination",{staticClass:"display--inline-block",attrs:{current:e.currentPage,nonSlidingSize:3,slidingEndingSize:1,slidingWindowSize:1,total:e.totalPages||1},on:{"page-change":e.handlePageChange}}):e._e(),e._v(" "),e.totalItems>Math.min(...e.limits)?t("div",{staticClass:"display--inline-block"},[t("dp-multiselect",{staticClass:"display--inline-block",attrs:{options:e.filteredLimits,searchable:!1,"selected-label":""},on:{select:e.handleSizeChange},model:{value:e.itemsPerPage,callback:function(t){e.itemsPerPage=t},expression:"itemsPerPage"}})],1):t("span",[e._v(e._s(e.totalItems))]),e._v(" "),t("span",{attrs:{"aria-hidden":"true"}},[e._v("\n "+e._s(e.Translator.trans("pager.amount.multiple.of"))+"\n "),t("span",{attrs:{"data-cy":"totalItems"}},[e._v(e._s(e.totalItems))]),e._v("\n "+e._s(e.Translator.trans("pager.amount.multiple.items"))+"\n ")])],1)])}),[],!1,null,null,null).exports,Qs={name:"DpProgressBar",props:{indeterminate:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:""},percentage:{type:Number,required:!1,default:0}},computed:{style(){return"width: "+this.percentage+"%;"}}},ea=(0,l.Z)(Qs,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-progress-bar"},[e.indeterminate?[t("div",{staticClass:"u-mb-0_25 weight--bold"},[e._v("\n "+e._s(e.label)+"\n ")]),e._v(" "),t("div",{staticClass:"c-progress-bar__line is-animated"})]:[t("div",{staticClass:"u-mb-0_25 weight--bold"},[e._v("\n "+e._s(e.label)+"\n ")]),e._v(" "),t("div",{staticClass:"bg-color--grey-light-2"},[t("div",{staticClass:"u-mb-0_25 c-progress-bar__line",style:e.style})]),e._v(" "),t("span",[e._v("\n "+e._s(e.percentage)+"%\n ")])]],2)}),[],!1,null,null,null).exports,ta={name:"DpRadio",components:{DpLabel:ui.default},mixins:[V.gH],model:{prop:"checked",event:"change"},props:{bold:{type:Boolean,required:!1,default:!0},checked:{type:Boolean,required:!1,default:!1},dataCy:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},hint:{type:String,required:!1,default:""},id:{type:String,required:!0},label:{type:Object,default:()=>({}),validator:e=>Object.keys(e).every((e=>["bold","hint","text"].includes(e)))},name:{type:String,required:!1,default:""},readonly:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:"1"}}},na=ta,ra=(0,l.Z)(na,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("o-form__element--radio")},[t("input",{class:e.prefixClass("o-form__control-input"),attrs:{id:e.id,name:""!==e.name&&e.name,type:"radio",required:e.required,disabled:e.disabled,readonly:e.readonly,autocomplete:"off","data-cy":""!==e.dataCy&&e.dataCy},domProps:{checked:e.checked,value:e.value},on:{change:function(t){return e.$emit("change",t.target.checked)}}}),e.label.text?t("dp-label",e._b({class:e.prefixClass("o-form__label")},"dp-label",{bold:!1,text:"",for:e.id,required:e.required,...e.label},!1)):e._e()],1)}),[],!1,null,null,null).exports,ia={name:"DpSearchField",components:{DpButton:ni,DpResettableInput:rs},props:{initSearchTerm:{type:String,required:!1,default:""},inputWidth:{type:String,default:""},placeholder:{type:String,required:!1,default:"search"}},data(){return{searchTerm:this.initSearchTerm,searchTermApplied:""}},computed:{cssClasses(){return""!==this.inputWidth?`display--inline-block u-mr-0_5 ${this.inputWidth}`:"display--inline-block u-mr-0_5"}},methods:{handleReset(){this.searchTerm="",this.searchTermApplied!==this.searchTerm&&(this.$emit("reset",""),this.searchTermApplied="")},handleSearch(){this.searchTermApplied!==this.searchTerm&&(this.searchTermApplied=this.searchTerm,this.$emit("search",this.searchTerm))},reset(){this.searchTermApplied="",this.searchTerm=""}},mounted(){this.searchTermApplied=this.searchTerm}},oa=(0,l.Z)(ia,(function(){var e=this,t=e._self._c;return t("span",{class:{"display--inline-block width-100p":""!==e.inputWidth}},[t("dp-resettable-input",{class:e.cssClasses,attrs:{id:"searchField","data-cy":"searchField","input-attributes":{placeholder:e.Translator.trans("search"),type:"search"}},on:{reset:e.handleReset,enter:e.handleSearch},model:{value:e.searchTerm,callback:function(t){e.searchTerm=t},expression:"searchTerm"}}),t("dp-button",{staticClass:"u-valign--top",attrs:{"data-cy":"handleSearch",text:e.Translator.trans("searching")},on:{click:e.handleSearch}})],1)}),[],!1,null,null,null).exports,sa={name:"DpSelect",components:{DpLabel:ui.default},mixins:[V.gH],model:{prop:"selected",event:"select"},props:{classes:{type:[Array,String],required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1,default:()=>""},label:{type:Object,required:!1,default:()=>({}),validator:e=>Object.keys(e).every((e=>["bold","hint","text","tooltip"].includes(e)))},name:{type:String,required:!1,default:""},options:{required:!0,type:Array},placeholder:{type:String,required:!1,default:"warning.select.entry"},required:{type:Boolean,required:!1,default:!1},showPlaceholder:{type:Boolean,required:!1,default:!0},selected:{type:String,required:!1,default:""}},computed:{nameOrId(){return""===this.id?this.name:this.id}},methods:{update(e){this.$emit("select",e.target.value)}}},aa=sa,la=(0,l.Z)(aa,(function(){var e=this,t=e._self._c;return t("div",[e.label.text?t("dp-label",e._b({},"dp-label",{...e.label,for:e.nameOrId,required:e.required},!1)):e._e(),t("select",{staticClass:"o-form__control-select",class:[e.disabled?" bg-color--grey-light-2":"",e.classes],attrs:{id:e.nameOrId,required:e.required,name:""!==e.name&&e.name,disabled:e.disabled},on:{change:e.update}},[e.showPlaceholder?t("option",{attrs:{"data-id":"placeholder",disabled:"",value:""},domProps:{selected:""===e.selected}},[e._v("\n "+e._s(e.Translator.trans(e.placeholder))+"\n ")]):e._e(),e._v(" "),e._l(e.options,(function(n,r){return t("option",{key:r,domProps:{selected:n.value===e.selected,value:n.value}},[e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])}))],2)],1)}),[],!1,null,null,null).exports,ca={name:"DpSkeletonBox",props:{height:{type:String,default:"1em"},width:{type:String,default:"100%"}}},da=(0,l.Z)(ca,(function(){var e=this;return(0,e._self._c)("span",{staticClass:"c-skeleton-box",style:{height:e.height,width:e.width}})}),[],!1,null,null,null).exports,ua={name:"DpSlidebar",components:{DpIcon:Yr},data:()=>({sideNav:{}}),methods:{hideSlideBar(){(0,r.Q$)(this.sideNav,"hideSideNav")&&(this.sideNav.hideSideNav(),this.$emit("close"))},showSlideBar(){(0,r.Q$)(this.sideNav,"showSideNav")&&this.sideNav.showSideNav()}},mounted(){this.sideNav=new P,this.$root.$on("hide-slidebar",(()=>{this.hideSlideBar()})),this.$root.$on("show-slidebar",(()=>{this.showSlideBar()}))}},pa=(0,l.Z)(ua,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-slidebar u-pr-0",attrs:{"data-slidebar":"right"}},[t("div",{staticClass:"c-slidebar__container",attrs:{"data-slidebar-container":"","data-cy":"sidebarModal"}},[t("div",{staticClass:"u-ml-1_5"},[t("button",{staticClass:"btn--blank o-link--default u-mt-0_5 u-n-ml u-mb",attrs:{type:"button","data-slidebar-hide":""},on:{click:function(t){return e.$emit("close")}}},[t("dp-icon",{attrs:{icon:"close",size:"large"}})],1),e._v(" "),e._t("default")],2)])])}),[],!1,null,null,null).exports,ha={name:"DpSplitButton",directives:{ClickOutside:vi()},data:()=>({isOpen:!1,hasDropdownContent:!1}),methods:{close(){this.isOpen=!1},toggleDropdown(){this.isOpen=!1===this.isOpen}},mounted(){this.popupItem=this.$el,this.hasDropdownContent=void 0!==this.$slots.dropdown}},fa=(0,l.Z)(ha,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.close,expression:"close"}],staticClass:"c-splitbutton"},[e._t("default",(function(){return[t("button",{staticClass:"btn btn--primary",attrs:{type:"button"}},[e._v("\n Primary Action Button\n ")])]})),e.hasDropdownContent?t("button",{staticClass:"c-splitbutton__trigger",class:{"is-open":e.isOpen},attrs:{type:"button","aria-haspopup":"true","aria-expanded":e.isOpen},on:{click:e.toggleDropdown,keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;t.preventDefault(),e.isOpen&&(e.isOpen=!e.isOpen)}}},[t("i",{staticClass:"fa fa-caret-down c-splitbutton__trigger-icon"}),e._v(" "),t("span",{staticClass:"hide-visually"},[e._v(e._s(e.Translator.trans(e.isOpen?"dropdown.close":"dropdown.open")))])]):e._e(),e._v(" "),e.hasDropdownContent?t("div",{staticClass:"c-splitbutton__dropdown",class:{"is-open":e.isOpen},attrs:{role:"menu"}},[e._t("dropdown",(function(){return[e._v("\n Dropdown Actions\n ")]}))],2):e._e()],2)}),[],!1,null,null,null).exports,ma={name:"DpTab",props:{id:{type:String,required:!0},label:{type:String,required:!0},suffix:{type:String,required:!1,default:null}},data:()=>({isActive:!1})},ga=(0,l.Z)(ma,(function(){var e=this;return(0,e._self._c)("section",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],attrs:{id:e.id,role:"tabpanel"}},[e._t("default")],2)}),[],!1,null,null,null).exports,ya={name:"DpTabs",directives:{cleanhtml:n.J7},model:{prop:"activeId",event:"change"},props:{activeId:{type:String,required:!1,default:null},tabSize:{type:String,required:!1,default:"large",validator:e=>["medium","large"].includes(e)},useUrlFragment:{type:Boolean,required:!1,default:!1}},data:()=>({tabs:[]}),computed:{tabIds(){return this.tabs.map((e=>e.id))}},methods:{handleHashChange(){const e=window.location.hash.slice(1);this.isTabId(e)&&this.setActiveTab(e)},handleTabClick(e){this.$emit("change",e),this.setActiveTab(e),this.useUrlFragment&&history.pushState(null,null,`#${e}`)},isTabId(e){return this.tabs.map((e=>e.id)).includes(e)},setActiveTab(e){this.tabs.forEach((t=>{t.isActive=t.id===e}))},setInitialTab(){const e=window.location.hash.slice(1);this.useUrlFragment&&this.isTabId(e)?this.setActiveTab(e):this.activeId?this.setActiveTab(this.activeId):this.tabs[0].isActive=!0}},created(){this.tabs=this.$children},mounted(){this.setInitialTab(),this.useUrlFragment&&window.addEventListener("hashchange",this.handleHashChange)},beforeDestroy(){this.useUrlFragment&&window.removeEventListener("hashchange",this.handleHashChange)}},va=(0,l.Z)(ya,(function(){var e=this,t=e._self._c;return t("div",[t("ul",{staticClass:"flex space-inline-m list-style-none border--bottom",attrs:{role:"tablist"}},e._l(e.tabs,(function(n,r){return t("li",{key:`tab:${r}`,class:{"is-active":n.isActive},staticStyle:{"margin-bottom":"-1px"}},[t("button",{staticClass:"btn--blank o-link--default u-pb-0_5 border--bottom",class:[n.isActive?"color-interactive border-interactive":"border--none color-text-muted","large"===e.tabSize?"font-size-larger":"font-size-large"],attrs:{role:"tab","aria-selected":n.isActive,"aria-controls":n.id,"data-cy":n.id},on:{click:function(t){return t.preventDefault(),e.handleTabClick(n.id)}}},[e._v("\n "+e._s(n.label)+"\n "),n.suffix?t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:n.suffix,expression:"tab.suffix"}]}):e._e()])])})),0),e._v(" "),t("div",[e._t("default")],2)])}),[],!1,null,null,null).exports,ba={name:"DpTextArea",components:{DpLabel:async()=>await Promise.resolve().then(s.bind(s,3275))},props:{attributes:t("textarea"),dataDpValidateIf:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},growToParent:{type:Boolean,required:!1,default:!1},hint:{type:String,required:!1,default:""},id:{type:String,required:!1,default:""},label:{type:String,required:!1,default:""},maxlength:e,name:{type:String,required:!1,default:""},reducedHeight:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""}},data(){return{currentValue:this.value}},computed:{allowedAttributes(){const e={};return this.attributes.forEach((t=>{t=t.split("="),e[t[0]]=t[1]})),e},labelProps(){return{for:this.id,hint:this.maxlength?[this.hint,(0,r.T8)(this.currentValue.length,this.maxlength)]:this.hint,required:this.required,text:this.label,tooltip:this.tooltip}}},watch:{value(){this.currentValue=this.value}}},wa=ba,xa=(0,l.Z)(wa,(function(){var e=this,t=e._self._c;return t("div",{class:{"flex flex-col":e.growToParent}},[""!==e.label?t("dp-label",e._b({},"dp-label",e.labelProps,!1)):e._e(),t("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],staticClass:"o-form__control-textarea",class:{grow:e.growToParent,"height-60":e.reducedHeight},attrs:{name:e.name,id:e.id,"data-dp-validate-if":e.dataDpValidateIf,disabled:e.disabled,maxlength:e.maxlength,required:e.required},domProps:{value:e.currentValue},on:{input:[function(t){t.target.composing||(e.currentValue=t.target.value)},function(t){return e.$emit("input",e.currentValue)}]}},"textarea",e.allowedAttributes,!1))],1)}),[],!1,null,null,null).exports,Sa={name:"DpToggle",props:{value:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1}},computed:{backgroundStyles(){return{backgroundColor:this.value?"#3490dc":"#dae1e7"}},indicatorStyles(){return{transform:this.value?"translateX(1rem)":"translateX(0)"}}},methods:{toggle(){!1===this.disabled&&this.$emit("input",!this.value)}}},Ca=(0,l.Z)(Sa,(function(){var e=this,t=e._self._c;return t("span",{staticClass:"toggle-wrapper",attrs:{role:"checkbox","aria-checked":e.value.toString(),"aria-disabled":e.disabled,tabindex:"0"},on:{click:e.toggle,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.toggle.apply(null,arguments))}}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.disabled,expression:"disabled"}],staticClass:"toggle-disabled"}),e._v(" "),t("span",{staticClass:"toggle-background",style:e.backgroundStyles}),e._v(" "),t("span",{staticClass:"toggle-indicator",style:e.indicatorStyles})])}),[],!1,null,null,null).exports,ka={name:"DpToggleForm",components:{DpAccordion:u,DpButtonRow:si},mixins:[V.cR],props:{formId:{type:String,default:""},title:{type:String,default:""}},methods:{abort(){""!==this.formId?document.querySelector(`form#${this.formId}`).reset():this.$emit("form-abort"),this.$refs.accordion.toggle()},save(){""!==this.formId?document.querySelector(`form#${this.formId}`).submit():this.$emit("form-save")}}},_a=(0,l.Z)(ka,(function(){var e=this,t=e._self._c;return t("dp-accordion",{ref:"accordion",attrs:{title:e.title}},[e._t("default"),e._v(" "),e._t("buttons",(function(){return[t("dp-button-row",{attrs:{primary:"",secondary:""},on:{"primary-action":function(t){return e.dpValidateAction(e.formId,e.save,!1)},"secondary-action":e.abort}})]}))],2)}),[],!1,null,null,null).exports,Aa={name:"DpTooltipIcon",directives:{tooltip:n.u},props:{icon:{required:!0,type:String},text:{required:!0,type:String},large:{required:!1,type:Boolean,default:!1}}},Ea=(0,l.Z)(Aa,(function(){var e=this;return(0,e._self._c)("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.text,expression:"text"}],staticClass:"fa",class:[e.icon,e.large?"fa-lg":""]})}),[],!1,null,null,null).exports;var Oa=Object.freeze({}),Ta=Array.isArray;function Da(e){return null==e}function Ma(e){return null!=e}function Na(e){return!0===e}function Ia(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function Pa(e){return"function"==typeof e}function $a(e){return null!==e&&"object"==typeof e}var Ra=Object.prototype.toString;function qa(e){return"[object Object]"===Ra.call(e)}function Ba(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function Fa(e){return Ma(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function La(e){return null==e?"":Array.isArray(e)||qa(e)&&e.toString===Ra?JSON.stringify(e,null,2):String(e)}function Va(e){var t=parseFloat(e);return isNaN(t)?e:t}function ja(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}ja("slot,component",!0);var za=ja("key,ref,slot,slot-scope,is");function Ha(e,t){var n=e.length;if(n){if(t===e[n-1])return void(e.length=n-1);var r=e.indexOf(t);if(r>-1)return e.splice(r,1)}}var Ua=Object.prototype.hasOwnProperty;function Wa(e,t){return Ua.call(e,t)}function Za(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var Ka=/-(\w)/g,Ja=Za((function(e){return e.replace(Ka,(function(e,t){return t?t.toUpperCase():""}))})),Ga=Za((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),Ya=/\B([A-Z])/g,Xa=Za((function(e){return e.replace(Ya,"-$1").toLowerCase()})),Qa=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function el(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function tl(e,t){for(var n in t)e[n]=t[n];return e}function nl(e){for(var t={},n=0;n<e.length;n++)e[n]&&tl(t,e[n]);return t}function rl(e,t,n){}var il=function(e,t,n){return!1},ol=function(e){return e};function sl(e,t){if(e===t)return!0;var n=$a(e),r=$a(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return sl(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var s=Object.keys(e),a=Object.keys(t);return s.length===a.length&&s.every((function(n){return sl(e[n],t[n])}))}catch(e){return!1}}function al(e,t){for(var n=0;n<e.length;n++)if(sl(e[n],t))return n;return-1}function ll(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var cl="data-server-rendered",dl=["component","directive","filter"],ul=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],pl={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:il,isReservedAttr:il,isUnknownElement:il,getTagNamespace:rl,parsePlatformTagName:ol,mustUseProp:il,async:!0,_lifecycleHooks:ul};function hl(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function fl(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var ml=new RegExp("[^".concat(/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/.source,".$_\\d]")),gl="__proto__"in{},yl="undefined"!=typeof window,vl=yl&&window.navigator.userAgent.toLowerCase(),bl=vl&&/msie|trident/.test(vl),wl=vl&&vl.indexOf("msie 9.0")>0,xl=vl&&vl.indexOf("edge/")>0;vl&&vl.indexOf("android");var Sl=vl&&/iphone|ipad|ipod|ios/.test(vl);vl&&/chrome\/\d+/.test(vl),vl&&/phantomjs/.test(vl);var Cl,kl=vl&&vl.match(/firefox\/(\d+)/),_l={}.watch,Al=!1;if(yl)try{var El={};Object.defineProperty(El,"passive",{get:function(){Al=!0}}),window.addEventListener("test-passive",null,El)}catch(z){}var Ol=function(){return void 0===Cl&&(Cl=!yl&&void 0!==s.g&&s.g.process&&"server"===s.g.process.env.VUE_ENV),Cl},Tl=yl&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function Dl(e){return"function"==typeof e&&/native code/.test(e.toString())}var Ml,Nl="undefined"!=typeof Symbol&&Dl(Symbol)&&"undefined"!=typeof Reflect&&Dl(Reflect.ownKeys);Ml="undefined"!=typeof Set&&Dl(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Il=null;function Pl(e){void 0===e&&(e=null),e||Il&&Il._scope.off(),Il=e,e&&e._scope.on()}var $l=function(){function e(e,t,n,r,i,o,s,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),Rl=function(e){void 0===e&&(e="");var t=new $l;return t.text=e,t.isComment=!0,t};function ql(e){return new $l(void 0,void 0,void 0,String(e))}function Bl(e){var t=new $l(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var Fl=0,Ll=[],Vl=function(){for(var e=0;e<Ll.length;e++){var t=Ll[e];t.subs=t.subs.filter((function(e){return e})),t._pending=!1}Ll.length=0},jl=function(){function e(){this._pending=!1,this.id=Fl++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){this.subs[this.subs.indexOf(e)]=null,this._pending||(this._pending=!0,Ll.push(this))},e.prototype.depend=function(t){e.target&&e.target.addDep(this)},e.prototype.notify=function(e){for(var t=this.subs.filter((function(e){return e})),n=0,r=t.length;n<r;n++)t[n].update()},e}();jl.target=null;var zl=[];function Hl(e){zl.push(e),jl.target=e}function Ul(){zl.pop(),jl.target=zl[zl.length-1]}var Wl=Array.prototype,Zl=Object.create(Wl);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=Wl[e];fl(Zl,e,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o=t.apply(this,n),s=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&s.observeArray(i),s.dep.notify(),o}))}));var Kl=Object.getOwnPropertyNames(Zl),Jl={},Gl=!0;function Yl(e){Gl=e}var Xl={notify:rl,depend:rl,addSub:rl,removeSub:rl},Ql=function(){function e(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this.value=e,this.shallow=t,this.mock=n,this.dep=n?Xl:new jl,this.vmCount=0,fl(e,"__ob__",this),Ta(e)){if(!n)if(gl)e.__proto__=Zl;else for(var r=0,i=Kl.length;r<i;r++)fl(e,s=Kl[r],Zl[s]);t||this.observeArray(e)}else{var o=Object.keys(e);for(r=0;r<o.length;r++){var s;tc(e,s=o[r],Jl,void 0,t,n)}}}return e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)ec(e[t],!1,this.mock)},e}();function ec(e,t,n){return e&&Wa(e,"__ob__")&&e.__ob__ instanceof Ql?e.__ob__:!Gl||!n&&Ol()||!Ta(e)&&!qa(e)||!Object.isExtensible(e)||e.__v_skip||ac(e)||e instanceof $l?void 0:new Ql(e,t,n)}function tc(e,t,n,r,i,o){var s=new jl,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var l=a&&a.get,c=a&&a.set;l&&!c||n!==Jl&&2!==arguments.length||(n=e[t]);var d=!i&&ec(n,!1,o);return Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=l?l.call(e):n;return jl.target&&(s.depend(),d&&(d.dep.depend(),Ta(t)&&ic(t))),ac(t)&&!i?t.value:t},set:function(t){var r=l?l.call(e):n;if(function(e,t){return e===t?0===e&&1/e!=1/t:e==e||t==t}(r,t)){if(c)c.call(e,t);else{if(l)return;if(!i&&ac(r)&&!ac(t))return void(r.value=t);n=t}d=!i&&ec(t,!1,o),s.notify()}}}),s}}function nc(e,t,n){if(!sc(e)){var r=e.__ob__;return Ta(e)&&Ba(t)?(e.length=Math.max(e.length,t),e.splice(t,1,n),r&&!r.shallow&&r.mock&&ec(n,!1,!0),n):t in e&&!(t in Object.prototype)?(e[t]=n,n):e._isVue||r&&r.vmCount?n:r?(tc(r.value,t,n,void 0,r.shallow,r.mock),r.dep.notify(),n):(e[t]=n,n)}}function rc(e,t){if(Ta(e)&&Ba(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||sc(e)||Wa(e,t)&&(delete e[t],n&&n.dep.notify())}}function ic(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Ta(t)&&ic(t)}function oc(e){return function(e,t){sc(e)||ec(e,t,Ol())}(e,!0),fl(e,"__v_isShallow",!0),e}function sc(e){return!(!e||!e.__v_isReadonly)}function ac(e){return!(!e||!0!==e.__v_isRef)}function lc(e,t,n){Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var e=t[n];if(ac(e))return e.value;var r=e&&e.__ob__;return r&&r.dep.depend(),e},set:function(e){var r=t[n];ac(r)&&!ac(e)?r.value=e:t[n]=e}})}var cc,dc="watcher";"".concat(dc," callback"),"".concat(dc," getter"),"".concat(dc," cleanup");var uc=function(){function e(e){void 0===e&&(e=!1),this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=cc,!e&&cc&&(this.index=(cc.scopes||(cc.scopes=[])).push(this)-1)}return e.prototype.run=function(e){if(this.active){var t=cc;try{return cc=this,e()}finally{cc=t}}},e.prototype.on=function(){cc=this},e.prototype.off=function(){cc=this.parent},e.prototype.stop=function(e){if(this.active){var t=void 0,n=void 0;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].teardown();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},e}();var pc=Za((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function hc(e,t){function n(){var e=n.fns;if(!Ta(e))return Xc(e,null,arguments,t,"v-on handler");for(var r=e.slice(),i=0;i<r.length;i++)Xc(r[i],null,arguments,t,"v-on handler")}return n.fns=e,n}function fc(e,t,n,r,i,o){var s,a,l,c;for(s in e)a=e[s],l=t[s],c=pc(s),Da(a)||(Da(l)?(Da(a.fns)&&(a=e[s]=hc(a,o)),Na(c.once)&&(a=e[s]=i(c.name,a,c.capture)),n(c.name,a,c.capture,c.passive,c.params)):a!==l&&(l.fns=a,e[s]=l));for(s in t)Da(e[s])&&r((c=pc(s)).name,t[s],c.capture)}function mc(e,t,n){var r;e instanceof $l&&(e=e.data.hook||(e.data.hook={}));var i=e[t];function o(){n.apply(this,arguments),Ha(r.fns,o)}Da(i)?r=hc([o]):Ma(i.fns)&&Na(i.merged)?(r=i).fns.push(o):r=hc([i,o]),r.merged=!0,e[t]=r}function gc(e,t,n,r,i){if(Ma(t)){if(Wa(t,n))return e[n]=t[n],i||delete t[n],!0;if(Wa(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function yc(e){return Ia(e)?[ql(e)]:Ta(e)?bc(e):void 0}function vc(e){return Ma(e)&&Ma(e.text)&&function(e){return!1===e}(e.isComment)}function bc(e,t){var n,r,i,o,s=[];for(n=0;n<e.length;n++)Da(r=e[n])||"boolean"==typeof r||(o=s[i=s.length-1],Ta(r)?r.length>0&&(vc((r=bc(r,"".concat(t||"","_").concat(n)))[0])&&vc(o)&&(s[i]=ql(o.text+r[0].text),r.shift()),s.push.apply(s,r)):Ia(r)?vc(o)?s[i]=ql(o.text+r):""!==r&&s.push(ql(r)):vc(r)&&vc(o)?s[i]=ql(o.text+r.text):(Na(e._isVList)&&Ma(r.tag)&&Da(r.key)&&Ma(t)&&(r.key="__vlist".concat(t,"_").concat(n,"__")),s.push(r)));return s}function wc(e,t){var n,r,i,o,s=null;if(Ta(e)||"string"==typeof e)for(s=new Array(e.length),n=0,r=e.length;n<r;n++)s[n]=t(e[n],n);else if("number"==typeof e)for(s=new Array(e),n=0;n<e;n++)s[n]=t(n+1,n);else if($a(e))if(Nl&&e[Symbol.iterator]){s=[];for(var a=e[Symbol.iterator](),l=a.next();!l.done;)s.push(t(l.value,s.length)),l=a.next()}else for(i=Object.keys(e),s=new Array(i.length),n=0,r=i.length;n<r;n++)o=i[n],s[n]=t(e[o],o,n);return Ma(s)||(s=[]),s._isVList=!0,s}function xc(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=tl(tl({},r),n)),i=o(n)||(Pa(t)?t():t)):i=this.$slots[e]||(Pa(t)?t():t);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function Sc(e){return nu(this.$options,"filters",e)||ol}function Cc(e,t){return Ta(e)?-1===e.indexOf(t):e!==t}function kc(e,t,n,r,i){var o=pl.keyCodes[t]||n;return i&&r&&!pl.keyCodes[t]?Cc(i,r):o?Cc(o,e):r?Xa(r)!==t:void 0===e}function _c(e,t,n,r,i){if(n&&$a(n)){Ta(n)&&(n=nl(n));var o=void 0,s=function(s){if("class"===s||"style"===s||za(s))o=e;else{var a=e.attrs&&e.attrs.type;o=r||pl.mustUseProp(t,a,s)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=Ja(s),c=Xa(s);l in o||c in o||(o[s]=n[s],i&&((e.on||(e.on={}))["update:".concat(s)]=function(e){n[s]=e}))};for(var a in n)s(a)}return e}function Ac(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Oc(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,this._c,this),"__static__".concat(e),!1),r}function Ec(e,t,n){return Oc(e,"__once__".concat(t).concat(n?"_".concat(n):""),!0),e}function Oc(e,t,n){if(Ta(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Tc(e[r],"".concat(t,"_").concat(r),n);else Tc(e,t,n)}function Tc(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Dc(e,t){if(t&&qa(t)){var n=e.on=e.on?tl({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}return e}function Mc(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Ta(o)?Mc(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function Nc(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Ic(e,t){return"string"==typeof e?t+e:e}function Pc(e){e._o=Ec,e._n=Va,e._s=La,e._l=wc,e._t=xc,e._q=sl,e._i=al,e._m=Ac,e._f=Sc,e._k=kc,e._b=_c,e._v=ql,e._e=Rl,e._u=Mc,e._g=Dc,e._d=Nc,e._p=Ic}function $c(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],s=o.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,o.context!==t&&o.fnContext!==t||!s||null==s.slot)(n.default||(n.default=[])).push(o);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var c in n)n[c].every(Rc)&&delete n[c];return n}function Rc(e){return e.isComment&&!e.asyncFactory||" "===e.text}function qc(e){return e.isComment&&e.asyncFactory}function Bc(e,t,n,r){var i,o=Object.keys(n).length>0,s=t?!!t.$stable:!o,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&r&&r!==Oa&&a===r.$key&&!o&&!r.$hasNormal)return r;for(var l in i={},t)t[l]&&"$"!==l[0]&&(i[l]=Fc(e,n,l,t[l]))}else i={};for(var c in n)c in i||(i[c]=Lc(n,c));return t&&Object.isExtensible(t)&&(t._normalized=i),fl(i,"$stable",s),fl(i,"$key",a),fl(i,"$hasNormal",o),i}function Fc(e,t,n,r){var i=function(){var t=Il;Pl(e);var n=arguments.length?r.apply(null,arguments):r({}),i=(n=n&&"object"==typeof n&&!Ta(n)?[n]:yc(n))&&n[0];return Pl(t),n&&(!i||1===n.length&&i.isComment&&!qc(i))?void 0:n};return r.proxy&&Object.defineProperty(t,n,{get:i,enumerable:!0,configurable:!0}),i}function Lc(e,t){return function(){return e[t]}}function Vc(e,t,n,r,i){var o=!1;for(var s in t)s in e?t[s]!==n[s]&&(o=!0):(o=!0,jc(e,s,r,i));for(var s in e)s in t||(o=!0,delete e[s]);return o}function jc(e,t,n,r){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return n[r][t]}})}function zc(e,t){for(var n in t)e[n]=t[n];for(var n in e)n in t||delete e[n]}var Hc=null;function Uc(e,t){return(e.__esModule||Nl&&"Module"===e[Symbol.toStringTag])&&(e=e.default),$a(e)?t.extend(e):e}function Wc(e){if(Ta(e))for(var t=0;t<e.length;t++){var n=e[t];if(Ma(n)&&(Ma(n.componentOptions)||qc(n)))return n}}var Zc=1,Kc=2;function Jc(e,t,n,r,i,o){return(Ta(n)||Ia(n))&&(i=r,r=n,n=void 0),Na(o)&&(i=Kc),function(e,t,n,r,i){if(Ma(n)&&Ma(n.__ob__))return Rl();if(Ma(n)&&Ma(n.is)&&(t=n.is),!t)return Rl();var o,s;if(Ta(r)&&Pa(r[0])&&((n=n||{}).scopedSlots={default:r[0]},r.length=0),i===Kc?r=yc(r):i===Zc&&(r=function(e){for(var t=0;t<e.length;t++)if(Ta(e[t]))return Array.prototype.concat.apply([],e);return e}(r)),"string"==typeof t){var a=void 0;s=e.$vnode&&e.$vnode.ns||pl.getTagNamespace(t),o=pl.isReservedTag(t)?new $l(pl.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!Ma(a=nu(e.$options,"components",t))?new $l(t,n,r,void 0,void 0,e):Wd(a,n,e,r,t)}else o=Wd(t,n,e,r);return Ta(o)?o:Ma(o)?(Ma(s)&&Gc(o,s),Ma(n)&&function(e){$a(e.style)&&hd(e.style),$a(e.class)&&hd(e.class)}(n),o):Rl()}(e,t,n,r,i)}function Gc(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),Ma(e.children))for(var r=0,i=e.children.length;r<i;r++){var o=e.children[r];Ma(o.tag)&&(Da(o.ns)||Na(n)&&"svg"!==o.tag)&&Gc(o,t,n)}}function Yc(e,t,n){Hl();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Qc(e,r,"errorCaptured hook")}}Qc(e,t,n)}finally{Ul()}}function Xc(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&Fa(o)&&!o._handled&&(o.catch((function(e){return Yc(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(e){Yc(e,r,i)}return o}function Qc(e,t,n){if(pl.errorHandler)try{return pl.errorHandler.call(null,e,t,n)}catch(t){t!==e&&ed(t)}ed(e)}function ed(e,t,n){if(!yl||"undefined"==typeof console)throw e;console.error(e)}var td,nd=!1,rd=[],id=!1;function od(){id=!1;var e=rd.slice(0);rd.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&Dl(Promise)){var sd=Promise.resolve();td=function(){sd.then(od),Sl&&setTimeout(rl)},nd=!0}else if(bl||"undefined"==typeof MutationObserver||!Dl(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())td="undefined"!=typeof setImmediate&&Dl(setImmediate)?function(){setImmediate(od)}:function(){setTimeout(od,0)};else{var ad=1,ld=new MutationObserver(od),cd=document.createTextNode(String(ad));ld.observe(cd,{characterData:!0}),td=function(){ad=(ad+1)%2,cd.data=String(ad)},nd=!0}function dd(e,t){var n;if(rd.push((function(){if(e)try{e.call(t)}catch(e){Yc(e,t,"nextTick")}else n&&n(t)})),id||(id=!0,td()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}function ud(e){return function(t,n){if(void 0===n&&(n=Il),n)return function(e,t,n){var r=e.$options;r[t]=Xd(r[t],n)}(n,e,t)}}ud("beforeMount"),ud("mounted"),ud("beforeUpdate"),ud("updated"),ud("beforeDestroy"),ud("destroyed"),ud("activated"),ud("deactivated"),ud("serverPrefetch"),ud("renderTracked"),ud("renderTriggered"),ud("errorCaptured");var pd=new Ml;function hd(e){return fd(e,pd),pd.clear(),e}function fd(e,t){var n,r,i=Ta(e);if(!(!i&&!$a(e)||e.__v_skip||Object.isFrozen(e)||e instanceof $l)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(i)for(n=e.length;n--;)fd(e[n],t);else if(ac(e))fd(e.value,t);else for(n=(r=Object.keys(e)).length;n--;)fd(e[r[n]],t)}}var md,gd=0,yd=function(){function e(e,t,n,r,i){var o;void 0===(o=cc&&!cc._vm?cc:e?e._scope:void 0)&&(o=cc),o&&o.active&&o.effects.push(this),(this.vm=e)&&i&&(e._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++gd,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Ml,this.newDepIds=new Ml,this.expression="",Pa(t)?this.getter=t:(this.getter=function(e){if(!ml.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=rl)),this.value=this.lazy?void 0:this.get()}return e.prototype.get=function(){var e;Hl(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Yc(e,t,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&hd(e),Ul(),this.cleanupDeps()}return e},e.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},e.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},e.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==Dd[t]&&(e!==jl.target||!e.noRecurse)){if(Dd[t]=!0,Nd){for(var n=Od.length-1;n>Id&&Od[n].id>e.id;)n--;Od.splice(n+1,0,e)}else Od.push(e);Md||(Md=!0,dd(Bd))}}(this)},e.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||$a(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'.concat(this.expression,'"');Xc(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},e.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},e.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},e.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&Ha(this.vm._scope.effects,this),this.active){for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},e}();function vd(e,t){md.$on(e,t)}function bd(e,t){md.$off(e,t)}function wd(e,t){var n=md;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function xd(e,t,n){md=e,fc(t,n||{},vd,bd,wd,e),md=void 0}var Sd=null;function Cd(e){var t=Sd;return Sd=e,function(){Sd=t}}function kd(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function _d(e,t){if(t){if(e._directInactive=!1,kd(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)_d(e.$children[n]);Ed(e,"activated")}}function Ad(e,t){if(!(t&&(e._directInactive=!0,kd(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)Ad(e.$children[n]);Ed(e,"deactivated")}}function Ed(e,t,n,r){void 0===r&&(r=!0),Hl();var i=Il;r&&Pl(e);var o=e.$options[t],s="".concat(t," hook");if(o)for(var a=0,l=o.length;a<l;a++)Xc(o[a],e,n||null,e,s);e._hasHookEvent&&e.$emit("hook:"+t),r&&Pl(i),Ul()}var Od=[],Td=[],Dd={},Md=!1,Nd=!1,Id=0,Pd=0,$d=Date.now;if(yl&&!bl){var Rd=window.performance;Rd&&"function"==typeof Rd.now&&$d()>document.createEvent("Event").timeStamp&&($d=function(){return Rd.now()})}var qd=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function Bd(){var e,t;for(Pd=$d(),Nd=!0,Od.sort(qd),Id=0;Id<Od.length;Id++)(e=Od[Id]).before&&e.before(),t=e.id,Dd[t]=null,e.run();var n=Td.slice(),r=Od.slice();Id=Od.length=Td.length=0,Dd={},Md=Nd=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,_d(e[t],!0)}(n),function(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ed(r,"updated")}}(r),Vl(),Tl&&pl.devtools&&Tl.emit("flush")}function Fd(e,t){if(e){for(var n=Object.create(null),r=Nl?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){var s=e[o].from;if(s in t._provided)n[o]=t._provided[s];else if("default"in e[o]){var a=e[o].default;n[o]=Pa(a)?a.call(t):a}}}return n}}function Ld(e,t,n,r,i){var o,s=this,a=i.options;Wa(r,"_uid")?(o=Object.create(r))._original=r:(o=r,r=r._original);var l=Na(a._compiled),c=!l;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||Oa,this.injections=Fd(a.inject,r),this.slots=function(){return s.$slots||Bc(r,e.scopedSlots,s.$slots=$c(n,r)),s.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Bc(r,e.scopedSlots,this.slots())}}),l&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=Bc(r,e.scopedSlots,this.$slots)),a._scopeId?this._c=function(e,t,n,i){var s=Jc(o,e,t,n,i,c);return s&&!Ta(s)&&(s.fnScopeId=a._scopeId,s.fnContext=r),s}:this._c=function(e,t,n,r){return Jc(o,e,t,n,r,c)}}function Vd(e,t,n,r,i){var o=Bl(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function jd(e,t){for(var n in t)e[Ja(n)]=t[n]}function zd(e){return e.name||e.__name||e._componentTag}Pc(Ld.prototype);var Hd={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Hd.prepatch(n,n)}else(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;return Ma(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new e.componentOptions.Ctor(n)}(e,Sd)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,i){var o=r.data.scopedSlots,s=e.$scopedSlots,a=!!(o&&!o.$stable||s!==Oa&&!s.$stable||o&&e.$scopedSlots.$key!==o.$key||!o&&e.$scopedSlots.$key),l=!!(i||e.$options._renderChildren||a),c=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i;var d=r.data.attrs||Oa;e._attrsProxy&&Vc(e._attrsProxy,d,c.data&&c.data.attrs||Oa,e,"$attrs")&&(l=!0),e.$attrs=d,n=n||Oa;var u=e.$options._parentListeners;if(e._listenersProxy&&Vc(e._listenersProxy,n,u||Oa,e,"$listeners"),e.$listeners=e.$options._parentListeners=n,xd(e,n,u),t&&e.$options.props){Yl(!1);for(var p=e._props,h=e.$options._propKeys||[],f=0;f<h.length;f++){var m=h[f],g=e.$options.props;p[m]=ru(m,g,t,e)}Yl(!0),e.$options.propsData=t}l&&(e.$slots=$c(i,r.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Ed(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,Td.push(t)):_d(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?Ad(t,!0):t.$destroy())}},Ud=Object.keys(Hd);function Wd(e,t,n,r,i){if(!Da(e)){var o=n.$options._base;if($a(e)&&(e=o.extend(e)),"function"==typeof e){var s;if(Da(e.cid)&&(e=function(e,t){if(Na(e.error)&&Ma(e.errorComp))return e.errorComp;if(Ma(e.resolved))return e.resolved;var n=Hc;if(n&&Ma(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),Na(e.loading)&&Ma(e.loadingComp))return e.loadingComp;if(n&&!Ma(e.owners)){var r=e.owners=[n],i=!0,o=null,s=null;n.$on("hook:destroyed",(function(){return Ha(r,n)}));var a=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==o&&(clearTimeout(o),o=null),null!==s&&(clearTimeout(s),s=null))},l=ll((function(n){e.resolved=Uc(n,t),i?r.length=0:a(!0)})),c=ll((function(t){Ma(e.errorComp)&&(e.error=!0,a(!0))})),d=e(l,c);return $a(d)&&(Fa(d)?Da(e.resolved)&&d.then(l,c):Fa(d.component)&&(d.component.then(l,c),Ma(d.error)&&(e.errorComp=Uc(d.error,t)),Ma(d.loading)&&(e.loadingComp=Uc(d.loading,t),0===d.delay?e.loading=!0:o=setTimeout((function(){o=null,Da(e.resolved)&&Da(e.error)&&(e.loading=!0,a(!1))}),d.delay||200)),Ma(d.timeout)&&(s=setTimeout((function(){s=null,Da(e.resolved)&&c(null)}),d.timeout)))),i=!1,e.loading?e.loadingComp:e.resolved}}(s=e,o),void 0===e))return function(e,t,n,r,i){var o=Rl();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(s,t,n,r,i);t=t||{},yu(e),Ma(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var i=t.on||(t.on={}),o=i[r],s=t.model.callback;Ma(o)?(Ta(o)?-1===o.indexOf(s):o!==s)&&(i[r]=[s].concat(o)):i[r]=s}(e.options,t);var a=function(e,t,n){var r=t.options.props;if(!Da(r)){var i={},o=e.attrs,s=e.props;if(Ma(o)||Ma(s))for(var a in r){var l=Xa(a);gc(i,s,a,l,!0)||gc(i,o,a,l,!1)}return i}}(t,e);if(Na(e.options.functional))return function(e,t,n,r,i){var o=e.options,s={},a=o.props;if(Ma(a))for(var l in a)s[l]=ru(l,a,t||Oa);else Ma(n.attrs)&&jd(s,n.attrs),Ma(n.props)&&jd(s,n.props);var c=new Ld(n,s,i,r,e),d=o.render.call(null,c._c,c);if(d instanceof $l)return Vd(d,n,c.parent,o);if(Ta(d)){for(var u=yc(d)||[],p=new Array(u.length),h=0;h<u.length;h++)p[h]=Vd(u[h],n,c.parent,o);return p}}(e,a,t,n,r);var l=t.on;if(t.on=t.nativeOn,Na(e.options.abstract)){var c=t.slot;t={},c&&(t.slot=c)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Ud.length;n++){var r=Ud[n],i=t[r],o=Hd[r];i===o||i&&i._merged||(t[r]=i?Zd(o,i):o)}}(t);var d=zd(e.options)||i;return new $l("vue-component-".concat(e.cid).concat(d?"-".concat(d):""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:a,listeners:l,tag:i,children:r},s)}}}function Zd(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var Kd=rl,Jd=pl.optionMergeStrategies;function Gd(e,t,n){if(void 0===n&&(n=!0),!t)return e;for(var r,i,o,s=Nl?Reflect.ownKeys(t):Object.keys(t),a=0;a<s.length;a++)"__ob__"!==(r=s[a])&&(i=e[r],o=t[r],n&&Wa(e,r)?i!==o&&qa(i)&&qa(o)&&Gd(i,o):nc(e,r,o));return e}function Yd(e,t,n){return n?function(){var r=Pa(t)?t.call(n,n):t,i=Pa(e)?e.call(n,n):e;return r?Gd(r,i):i}:t?e?function(){return Gd(Pa(t)?t.call(this,this):t,Pa(e)?e.call(this,this):e)}:t:e}function Xd(e,t){var n=t?e?e.concat(t):Ta(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Qd(e,t,n,r){var i=Object.create(e||null);return t?tl(i,t):i}Jd.data=function(e,t,n){return n?Yd(e,t,n):t&&"function"!=typeof t?e:Yd(e,t)},ul.forEach((function(e){Jd[e]=Xd})),dl.forEach((function(e){Jd[e+"s"]=Qd})),Jd.watch=function(e,t,n,r){if(e===_l&&(e=void 0),t===_l&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in tl(i,e),t){var s=i[o],a=t[o];s&&!Ta(s)&&(s=[s]),i[o]=s?s.concat(a):Ta(a)?a:[a]}return i},Jd.props=Jd.methods=Jd.inject=Jd.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return tl(i,e),t&&tl(i,t),i},Jd.provide=function(e,t){return e?function(){var n=Object.create(null);return Gd(n,Pa(e)?e.call(this):e),t&&Gd(n,Pa(t)?t.call(this):t,!1),n}:t};var eu=function(e,t){return void 0===t?e:t};function tu(e,t,n){if(Pa(t)&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Ta(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[Ja(i)]={type:null});else if(qa(n))for(var s in n)i=n[s],o[Ja(s)]=qa(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Ta(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(qa(n))for(var o in n){var s=n[o];r[o]=qa(s)?tl({from:o},s):{from:s}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];Pa(r)&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=tu(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=tu(e,t.mixins[r],n);var o,s={};for(o in e)a(o);for(o in t)Wa(e,o)||a(o);function a(r){var i=Jd[r]||eu;s[r]=i(e[r],t[r],n,r)}return s}function nu(e,t,n,r){if("string"==typeof n){var i=e[t];if(Wa(i,n))return i[n];var o=Ja(n);if(Wa(i,o))return i[o];var s=Ga(o);return Wa(i,s)?i[s]:i[n]||i[o]||i[s]}}function ru(e,t,n,r){var i=t[e],o=!Wa(n,e),s=n[e],a=au(Boolean,i.type);if(a>-1)if(o&&!Wa(i,"default"))s=!1;else if(""===s||s===Xa(e)){var l=au(String,i.type);(l<0||a<l)&&(s=!0)}if(void 0===s){s=function(e,t,n){if(Wa(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:Pa(r)&&"Function"!==ou(t.type)?r.call(e):r}}(r,i,e);var c=Gl;Yl(!0),ec(s),Yl(c)}return s}var iu=/^\s*function (\w+)/;function ou(e){var t=e&&e.toString().match(iu);return t?t[1]:""}function su(e,t){return ou(e)===ou(t)}function au(e,t){if(!Ta(t))return su(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(su(t[n],e))return n;return-1}var lu={enumerable:!0,configurable:!0,get:rl,set:rl};function cu(e,t,n){lu.get=function(){return this[t][n]},lu.set=function(e){this[t][n]=e},Object.defineProperty(e,n,lu)}function du(e){var t=e.$options;if(t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props=oc({}),i=e.$options._propKeys=[];!e.$parent||Yl(!1);var o=function(o){i.push(o);var s=ru(o,t,n,e);tc(r,o,s),o in e||cu(e,"_props",o)};for(var s in t)o(s);Yl(!0)}(e,t.props),function(e){var t=e.$options,n=t.setup;if(n){var r=e._setupContext=function(e){return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};fl(t,"_v_attr_proxy",!0),Vc(t,e.$attrs,Oa,e,"$attrs")}return e._attrsProxy},get listeners(){return e._listenersProxy||Vc(e._listenersProxy={},e.$listeners,Oa,e,"$listeners"),e._listenersProxy},get slots(){return function(e){return e._slotsProxy||zc(e._slotsProxy={},e.$scopedSlots),e._slotsProxy}(e)},emit:Qa(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return lc(e,t,n)}))}}}(e);Pl(e),Hl();var i=Xc(n,null,[e._props||oc({}),r],e,"setup");if(Ul(),Pl(),Pa(i))t.render=i;else if($a(i))if(e._setupState=i,i.__sfc){var o=e._setupProxy={};for(var s in i)"__sfc"!==s&&lc(o,i,s)}else for(var s in i)hl(s)||lc(e,i,s)}}(e),t.methods&&function(e,t){for(var n in e.$options.props,t)e[n]="function"!=typeof t[n]?rl:Qa(t[n],e)}(e,t.methods),t.data)!function(e){var t=e.$options.data;t=e._data=Pa(t)?function(e,t){Hl();try{return e.call(t,t)}catch(e){return Yc(e,t,"data()"),{}}finally{Ul()}}(t,e):t||{},qa(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);i--;){var o=n[i];r&&Wa(r,o)||hl(o)||cu(e,"_data",o)}var s=ec(t);s&&s.vmCount++}(e);else{var n=ec(e._data={});n&&n.vmCount++}t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Ol();for(var i in t){var o=t[i],s=Pa(o)?o:o.get;r||(n[i]=new yd(e,s||rl,rl,uu)),i in e||pu(e,i,o)}}(e,t.computed),t.watch&&t.watch!==_l&&function(e,t){for(var n in t){var r=t[n];if(Ta(r))for(var i=0;i<r.length;i++)mu(e,n,r[i]);else mu(e,n,r)}}(e,t.watch)}var uu={lazy:!0};function pu(e,t,n){var r=!Ol();Pa(n)?(lu.get=r?hu(t):fu(n),lu.set=rl):(lu.get=n.get?r&&!1!==n.cache?hu(t):fu(n.get):rl,lu.set=n.set||rl),Object.defineProperty(e,t,lu)}function hu(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),jl.target&&t.depend(),t.value}}function fu(e){return function(){return e.call(this,this)}}function mu(e,t,n,r){return qa(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var gu=0;function yu(e){var t=e.options;if(e.super){var n=yu(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&tl(e.extendOptions,r),(t=e.options=tu(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function vu(e){this._init(e)}function bu(e){return e&&(zd(e.Ctor.options)||e.tag)}function wu(e,t){return Ta(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!function(e){return"[object RegExp]"===Ra.call(e)}(e)&&e.test(t)}function xu(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var s=n[o];if(s){var a=s.name;a&&!t(a)&&Su(n,o,r,i)}}}function Su(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,Ha(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=gu++,t._isVue=!0,t.__v_skip=!0,t._scope=new uc(!0),t._scope._vm=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=tu(yu(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._provided=n?n._provided:Object.create(null),e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&xd(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=$c(t._renderChildren,r),e.$scopedSlots=n?Bc(e.$parent,n.data.scopedSlots,e.$slots):Oa,e._c=function(t,n,r,i){return Jc(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Jc(e,t,n,r,i,!0)};var i=n&&n.data;tc(e,"$attrs",i&&i.attrs||Oa,null,!0),tc(e,"$listeners",t._parentListeners||Oa,null,!0)}(t),Ed(t,"beforeCreate",void 0,!1),function(e){var t=Fd(e.$options.inject,e);t&&(Yl(!1),Object.keys(t).forEach((function(n){tc(e,n,t[n])})),Yl(!0))}(t),du(t),function(e){var t=e.$options.provide;if(t){var n=Pa(t)?t.call(e):t;if(!$a(n))return;for(var r=function(e){var t=e._provided,n=e.$parent&&e.$parent._provided;return n===t?e._provided=Object.create(n):t}(e),i=Nl?Reflect.ownKeys(n):Object.keys(n),o=0;o<i.length;o++){var s=i[o];Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(n,s))}}}(t),Ed(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(vu),function(e){Object.defineProperty(e.prototype,"$data",{get:function(){return this._data}}),Object.defineProperty(e.prototype,"$props",{get:function(){return this._props}}),e.prototype.$set=nc,e.prototype.$delete=rc,e.prototype.$watch=function(e,t,n){var r=this;if(qa(t))return mu(r,e,t,n);(n=n||{}).user=!0;var i=new yd(r,e,t,n);if(n.immediate){var o='callback for immediate watcher "'.concat(i.expression,'"');Hl(),Xc(t,r,[i.value],r,o),Ul()}return function(){i.teardown()}}}(vu),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Ta(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Ta(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,s=n._events[e];if(!s)return n;if(!t)return n._events[e]=null,n;for(var a=s.length;a--;)if((o=s[a])===t||o.fn===t){s.splice(a,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?el(n):n;for(var r=el(arguments,1),i='event handler for "'.concat(e,'"'),o=0,s=n.length;o<s;o++)Xc(n[o],t,r,t,i)}return t}}(vu),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Cd(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var s=n;s&&s.$vnode&&s.$parent&&s.$vnode===s.$parent._vnode;)s.$parent.$el=s.$el,s=s.$parent},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Ed(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||Ha(t.$children,e),e._scope.stop(),e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Ed(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(vu),function(e){Pc(e.prototype),e.prototype.$nextTick=function(e){return dd(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&t._isMounted&&(t.$scopedSlots=Bc(t.$parent,i.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&zc(t._slotsProxy,t.$scopedSlots)),t.$vnode=i;try{Pl(t),Hc=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){Yc(n,t,"render"),e=t._vnode}finally{Hc=null,Pl()}return Ta(e)&&1===e.length&&(e=e[0]),e instanceof $l||(e=Rl()),e.parent=i,e}}(vu);var Cu=[String,RegExp,Array],ku={name:"keep-alive",abstract:!0,props:{include:Cu,exclude:Cu,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,n=e.keys,r=e.vnodeToCache,i=e.keyToCache;if(r){var o=r.tag,s=r.componentInstance,a=r.componentOptions;t[i]={name:bu(a),tag:o,componentInstance:s},n.push(i),this.max&&n.length>parseInt(this.max)&&Su(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Su(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){xu(e,(function(e){return wu(t,e)}))})),this.$watch("exclude",(function(t){xu(e,(function(e){return!wu(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=Wc(e),n=t&&t.componentOptions;if(n){var r=bu(n),i=this.include,o=this.exclude;if(i&&(!r||!wu(i,r))||o&&r&&wu(o,r))return t;var s=this.cache,a=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,Ha(a,l),a.push(l)):(this.vnodeToCache=t,this.keyToCache=l),t.data.keepAlive=!0}return t||e&&e[0]}},_u={KeepAlive:ku};!function(e){var t={get:function(){return pl}};Object.defineProperty(e,"config",t),e.util={warn:Kd,extend:tl,mergeOptions:tu,defineReactive:tc},e.set=nc,e.delete=rc,e.nextTick=dd,e.observable=function(e){return ec(e),e},e.options=Object.create(null),dl.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,tl(e.options.components,_u),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=el(arguments,1);return n.unshift(this),Pa(e.install)?e.install.apply(e,n):Pa(e)&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=tu(this.options,e),this}}(e),function(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=zd(e)||zd(n.options),s=function(e){this._init(e)};return(s.prototype=Object.create(n.prototype)).constructor=s,s.cid=t++,s.options=tu(n.options,e),s.super=n,s.options.props&&function(e){var t=e.options.props;for(var n in t)cu(e.prototype,"_props",n)}(s),s.options.computed&&function(e){var t=e.options.computed;for(var n in t)pu(e.prototype,n,t[n])}(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,dl.forEach((function(e){s[e]=n[e]})),o&&(s.options.components[o]=s),s.superOptions=n.options,s.extendOptions=e,s.sealedOptions=tl({},s.options),i[r]=s,s}}(e),function(e){dl.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&qa(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&Pa(n)&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(vu),Object.defineProperty(vu.prototype,"$isServer",{get:Ol}),Object.defineProperty(vu.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(vu,"FunctionalRenderContext",{value:Ld}),vu.version="2.7.14";var Au=ja("style,class"),Eu=ja("input,textarea,option,select,progress"),Ou=ja("contenteditable,draggable,spellcheck"),Tu=ja("events,caret,typing,plaintext-only"),Du=function(e,t){return $u(t)||"false"===t?"false":"contenteditable"===e&&Tu(t)?t:"true"},Mu=ja("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Nu="http://www.w3.org/1999/xlink",Iu=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Pu=function(e){return Iu(e)?e.slice(6,e.length):""},$u=function(e){return null==e||!1===e};function Ru(e,t){return{staticClass:qu(e.staticClass,t.staticClass),class:Ma(e.class)?[e.class,t.class]:t.class}}function qu(e,t){return e?t?e+" "+t:e:t||""}function Bu(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)Ma(t=Bu(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):$a(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Fu={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Lu=ja("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Vu=ja("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),ju=function(e){return Lu(e)||Vu(e)},zu=Object.create(null),Hu=ja("text,number,password,search,email,tel,url"),Uu=Object.freeze({__proto__:null,createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Fu[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Wu={create:function(e,t){Zu(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Zu(e,!0),Zu(t))},destroy:function(e){Zu(e,!0)}};function Zu(e,t){var n=e.data.ref;if(Ma(n)){var r=e.context,i=e.componentInstance||e.elm,o=t?null:i,s=t?void 0:i;if(Pa(n))Xc(n,r,[o],r,"template ref function");else{var a=e.data.refInFor,l="string"==typeof n||"number"==typeof n,c=ac(n),d=r.$refs;if(l||c)if(a){var u=l?d[n]:n.value;t?Ta(u)&&Ha(u,i):Ta(u)?u.includes(i)||u.push(i):l?(d[n]=[i],Ku(r,n,d[n])):n.value=[i]}else if(l){if(t&&d[n]!==i)return;d[n]=s,Ku(r,n,o)}else if(c){if(t&&n.value!==i)return;n.value=o}}}}function Ku(e,t,n){var r=e._setupState;r&&Wa(r,t)&&(ac(r[t])?r[t].value=n:r[t]=n)}var Ju=new $l("",{},[]),Gu=["create","activate","update","remove","destroy"];function Yu(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&Ma(e.data)===Ma(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=Ma(n=e.data)&&Ma(n=n.attrs)&&n.type,i=Ma(n=t.data)&&Ma(n=n.attrs)&&n.type;return r===i||Hu(r)&&Hu(i)}(e,t)||Na(e.isAsyncPlaceholder)&&Da(t.asyncFactory.error))}function Xu(e,t,n){var r,i,o={};for(r=t;r<=n;++r)Ma(i=e[r].key)&&(o[i]=r);return o}var Qu={create:ep,update:ep,destroy:function(e){ep(e,Ju)}};function ep(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===Ju,s=t===Ju,a=np(e.data.directives,e.context),l=np(t.data.directives,t.context),c=[],d=[];for(n in l)r=a[n],i=l[n],r?(i.oldValue=r.value,i.oldArg=r.arg,ip(i,"update",t,e),i.def&&i.def.componentUpdated&&d.push(i)):(ip(i,"bind",t,e),i.def&&i.def.inserted&&c.push(i));if(c.length){var u=function(){for(var n=0;n<c.length;n++)ip(c[n],"inserted",t,e)};o?mc(t,"insert",u):u()}if(d.length&&mc(t,"postpatch",(function(){for(var n=0;n<d.length;n++)ip(d[n],"componentUpdated",t,e)})),!o)for(n in a)l[n]||ip(a[n],"unbind",e,e,s)}(e,t)}var tp=Object.create(null);function np(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++){if((r=e[n]).modifiers||(r.modifiers=tp),i[rp(r)]=r,t._setupState&&t._setupState.__sfc){var o=r.def||nu(t,"_setupState","v-"+r.name);r.def="function"==typeof o?{bind:o,update:o}:o}r.def=r.def||nu(t.$options,"directives",r.name)}return i}function rp(e){return e.rawName||"".concat(e.name,".").concat(Object.keys(e.modifiers||{}).join("."))}function ip(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){Yc(r,n.context,"directive ".concat(e.name," ").concat(t," hook"))}}var op=[Wu,Qu];function sp(e,t){var n=t.componentOptions;if(!(Ma(n)&&!1===n.Ctor.options.inheritAttrs||Da(e.data.attrs)&&Da(t.data.attrs))){var r,i,o=t.elm,s=e.data.attrs||{},a=t.data.attrs||{};for(r in(Ma(a.__ob__)||Na(a._v_attr_proxy))&&(a=t.data.attrs=tl({},a)),a)i=a[r],s[r]!==i&&ap(o,r,i,t.data.pre);for(r in(bl||xl)&&a.value!==s.value&&ap(o,"value",a.value),s)Da(a[r])&&(Iu(r)?o.removeAttributeNS(Nu,Pu(r)):Ou(r)||o.removeAttribute(r))}}function ap(e,t,n,r){r||e.tagName.indexOf("-")>-1?lp(e,t,n):Mu(t)?$u(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Ou(t)?e.setAttribute(t,Du(t,n)):Iu(t)?$u(n)?e.removeAttributeNS(Nu,Pu(t)):e.setAttributeNS(Nu,t,n):lp(e,t,n)}function lp(e,t,n){if($u(n))e.removeAttribute(t);else{if(bl&&!wl&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var cp={create:sp,update:sp};function dp(e,t){var n=t.elm,r=t.data,i=e.data;if(!(Da(r.staticClass)&&Da(r.class)&&(Da(i)||Da(i.staticClass)&&Da(i.class)))){var o=function(e){for(var t=e.data,n=e,r=e;Ma(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Ru(r.data,t));for(;Ma(n=n.parent);)n&&n.data&&(t=Ru(t,n.data));return i=t.staticClass,o=t.class,Ma(i)||Ma(o)?qu(i,Bu(o)):"";var i,o}(t),s=n._transitionClasses;Ma(s)&&(o=qu(o,Bu(s))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var up,pp={create:dp,update:dp},hp="__r",fp="__c";function mp(e,t,n){var r=up;return function i(){null!==t.apply(null,arguments)&&vp(e,i,n,r)}}var gp=nd&&!(kl&&Number(kl[1])<=53);function yp(e,t,n,r){if(gp){var i=Pd,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}up.addEventListener(e,t,Al?{capture:n,passive:r}:n)}function vp(e,t,n,r){(r||up).removeEventListener(e,t._wrapper||t,n)}function bp(e,t){if(!Da(e.data.on)||!Da(t.data.on)){var n=t.data.on||{},r=e.data.on||{};up=t.elm||e.elm,function(e){if(Ma(e[hp])){var t=bl?"change":"input";e[t]=[].concat(e[hp],e[t]||[]),delete e[hp]}Ma(e[fp])&&(e.change=[].concat(e[fp],e.change||[]),delete e[fp])}(n),fc(n,r,yp,vp,mp,t.context),up=void 0}}var wp,xp={create:bp,update:bp,destroy:function(e){return bp(e,Ju)}};function Sp(e,t){if(!Da(e.data.domProps)||!Da(t.data.domProps)){var n,r,i=t.elm,o=e.data.domProps||{},s=t.data.domProps||{};for(n in(Ma(s.__ob__)||Na(s._v_attr_proxy))&&(s=t.data.domProps=tl({},s)),o)n in s||(i[n]="");for(n in s){if(r=s[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===o[n])continue;1===i.childNodes.length&&i.removeChild(i.childNodes[0])}if("value"===n&&"PROGRESS"!==i.tagName){i._value=r;var a=Da(r)?"":String(r);Cp(i,a)&&(i.value=a)}else if("innerHTML"===n&&Vu(i.tagName)&&Da(i.innerHTML)){(wp=wp||document.createElement("div")).innerHTML="<svg>".concat(r,"</svg>");for(var l=wp.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;l.firstChild;)i.appendChild(l.firstChild)}else if(r!==o[n])try{i[n]=r}catch(e){}}}}function Cp(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(Ma(r)){if(r.number)return Va(n)!==Va(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var kp={create:Sp,update:Sp},_p=Za((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Ap(e){var t=Ep(e.style);return e.staticStyle?tl(e.staticStyle,t):t}function Ep(e){return Array.isArray(e)?nl(e):"string"==typeof e?_p(e):e}var Op,Tp=/^--/,Dp=/\s*!important$/,Mp=function(e,t,n){if(Tp.test(t))e.style.setProperty(t,n);else if(Dp.test(n))e.style.setProperty(Xa(t),n.replace(Dp,""),"important");else{var r=Ip(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Np=["Webkit","Moz","ms"],Ip=Za((function(e){if(Op=Op||document.createElement("div").style,"filter"!==(e=Ja(e))&&e in Op)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Np.length;n++){var r=Np[n]+t;if(r in Op)return r}}));function Pp(e,t){var n=t.data,r=e.data;if(!(Da(n.staticStyle)&&Da(n.style)&&Da(r.staticStyle)&&Da(r.style))){var i,o,s=t.elm,a=r.staticStyle,l=r.normalizedStyle||r.style||{},c=a||l,d=Ep(t.data.style)||{};t.data.normalizedStyle=Ma(d.__ob__)?tl({},d):d;var u=function(e,t){for(var n,r={},i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=Ap(i.data))&&tl(r,n);(n=Ap(e.data))&&tl(r,n);for(var o=e;o=o.parent;)o.data&&(n=Ap(o.data))&&tl(r,n);return r}(t);for(o in c)Da(u[o])&&Mp(s,o,"");for(o in u)(i=u[o])!==c[o]&&Mp(s,o,null==i?"":i)}}var $p={create:Pp,update:Pp},Rp=/\s+/;function qp(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Rp).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" ".concat(e.getAttribute("class")||""," ");n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Bp(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Rp).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" ".concat(e.getAttribute("class")||""," "),r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Fp(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&tl(t,Lp(e.name||"v")),tl(t,e),t}return"string"==typeof e?Lp(e):void 0}}var Lp=Za((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),Vp=yl&&!wl,jp="transition",zp="animation",Hp="transition",Up="transitionend",Wp="animation",Zp="animationend";Vp&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Hp="WebkitTransition",Up="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Wp="WebkitAnimation",Zp="webkitAnimationEnd"));var Kp=yl?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Jp(e){Kp((function(){Kp(e)}))}function Gp(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),qp(e,t))}function Yp(e,t){e._transitionClasses&&Ha(e._transitionClasses,t),Bp(e,t)}function Xp(e,t,n){var r=eh(e,t),i=r.type,o=r.timeout,s=r.propCount;if(!i)return n();var a=i===jp?Up:Zp,l=0,c=function(){e.removeEventListener(a,d),n()},d=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),o+1),e.addEventListener(a,d)}var Qp=/\b(transform|all)(,|$)/;function eh(e,t){var n,r=window.getComputedStyle(e),i=(r[Hp+"Delay"]||"").split(", "),o=(r[Hp+"Duration"]||"").split(", "),s=th(i,o),a=(r[Wp+"Delay"]||"").split(", "),l=(r[Wp+"Duration"]||"").split(", "),c=th(a,l),d=0,u=0;return t===jp?s>0&&(n=jp,d=s,u=o.length):t===zp?c>0&&(n=zp,d=c,u=l.length):u=(n=(d=Math.max(s,c))>0?s>c?jp:zp:null)?n===jp?o.length:l.length:0,{type:n,timeout:d,propCount:u,hasTransform:n===jp&&Qp.test(r[Hp+"Property"])}}function th(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return nh(t)+nh(e[n])})))}function nh(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function rh(e,t){var n=e.elm;Ma(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=Fp(e.data.transition);if(!Da(r)&&!Ma(n._enterCb)&&1===n.nodeType){for(var i=r.css,o=r.type,s=r.enterClass,a=r.enterToClass,l=r.enterActiveClass,c=r.appearClass,d=r.appearToClass,u=r.appearActiveClass,p=r.beforeEnter,h=r.enter,f=r.afterEnter,m=r.enterCancelled,g=r.beforeAppear,y=r.appear,v=r.afterAppear,b=r.appearCancelled,w=r.duration,x=Sd,S=Sd.$vnode;S&&S.parent;)x=S.context,S=S.parent;var C=!x._isMounted||!e.isRootInsert;if(!C||y||""===y){var k=C&&c?c:s,_=C&&u?u:l,A=C&&d?d:a,E=C&&g||p,O=C&&Pa(y)?y:h,T=C&&v||f,D=C&&b||m,M=Va($a(w)?w.enter:w),N=!1!==i&&!wl,I=sh(O),P=n._enterCb=ll((function(){N&&(Yp(n,A),Yp(n,_)),P.cancelled?(N&&Yp(n,k),D&&D(n)):T&&T(n),n._enterCb=null}));e.data.show||mc(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,P)})),E&&E(n),N&&(Gp(n,k),Gp(n,_),Jp((function(){Yp(n,k),P.cancelled||(Gp(n,A),I||(oh(M)?setTimeout(P,M):Xp(n,o,P)))}))),e.data.show&&(t&&t(),O&&O(n,P)),N||I||P()}}}function ih(e,t){var n=e.elm;Ma(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=Fp(e.data.transition);if(Da(r)||1!==n.nodeType)return t();if(!Ma(n._leaveCb)){var i=r.css,o=r.type,s=r.leaveClass,a=r.leaveToClass,l=r.leaveActiveClass,c=r.beforeLeave,d=r.leave,u=r.afterLeave,p=r.leaveCancelled,h=r.delayLeave,f=r.duration,m=!1!==i&&!wl,g=sh(d),y=Va($a(f)?f.leave:f),v=n._leaveCb=ll((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),m&&(Yp(n,a),Yp(n,l)),v.cancelled?(m&&Yp(n,s),p&&p(n)):(t(),u&&u(n)),n._leaveCb=null}));h?h(b):b()}function b(){v.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),c&&c(n),m&&(Gp(n,s),Gp(n,l),Jp((function(){Yp(n,s),v.cancelled||(Gp(n,a),g||(oh(y)?setTimeout(v,y):Xp(n,o,v)))}))),d&&d(n,v),m||g||v())}}function oh(e){return"number"==typeof e&&!isNaN(e)}function sh(e){if(Da(e))return!1;var t=e.fns;return Ma(t)?sh(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function ah(e,t){!0!==t.data.show&&rh(t)}var lh=yl?{create:ah,activate:ah,remove:function(e,t){!0!==e.data.show?ih(e,t):t()}}:{},ch=function(e){var t,n,r={},i=e.modules,o=e.nodeOps;for(t=0;t<Gu.length;++t)for(r[Gu[t]]=[],n=0;n<i.length;++n)Ma(i[n][Gu[t]])&&r[Gu[t]].push(i[n][Gu[t]]);function s(e){var t=o.parentNode(e);Ma(t)&&o.removeChild(t,e)}function a(e,t,n,i,s,a,u){if(Ma(e.elm)&&Ma(a)&&(e=a[u]=Bl(e)),e.isRootInsert=!s,!function(e,t,n,i){var o=e.data;if(Ma(o)){var s=Ma(e.componentInstance)&&o.keepAlive;if(Ma(o=o.hook)&&Ma(o=o.init)&&o(e,!1),Ma(e.componentInstance))return l(e,t),c(n,e.elm,i),Na(s)&&function(e,t,n,i){for(var o,s=e;s.componentInstance;)if(Ma(o=(s=s.componentInstance._vnode).data)&&Ma(o=o.transition)){for(o=0;o<r.activate.length;++o)r.activate[o](Ju,s);t.push(s);break}c(n,e.elm,i)}(e,t,n,i),!0}}(e,t,n,i)){var f=e.data,m=e.children,g=e.tag;Ma(g)?(e.elm=e.ns?o.createElementNS(e.ns,g):o.createElement(g,e),h(e),d(e,m,t),Ma(f)&&p(e,t),c(n,e.elm,i)):Na(e.isComment)?(e.elm=o.createComment(e.text),c(n,e.elm,i)):(e.elm=o.createTextNode(e.text),c(n,e.elm,i))}}function l(e,t){Ma(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,u(e)?(p(e,t),h(e)):(Zu(e),t.push(e))}function c(e,t,n){Ma(e)&&(Ma(n)?o.parentNode(n)===e&&o.insertBefore(e,t,n):o.appendChild(e,t))}function d(e,t,n){if(Ta(t))for(var r=0;r<t.length;++r)a(t[r],n,e.elm,null,!0,t,r);else Ia(e.text)&&o.appendChild(e.elm,o.createTextNode(String(e.text)))}function u(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return Ma(e.tag)}function p(e,n){for(var i=0;i<r.create.length;++i)r.create[i](Ju,e);Ma(t=e.data.hook)&&(Ma(t.create)&&t.create(Ju,e),Ma(t.insert)&&n.push(e))}function h(e){var t;if(Ma(t=e.fnScopeId))o.setStyleScope(e.elm,t);else for(var n=e;n;)Ma(t=n.context)&&Ma(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t),n=n.parent;Ma(t=Sd)&&t!==e.context&&t!==e.fnContext&&Ma(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t)}function f(e,t,n,r,i,o){for(;r<=i;++r)a(n[r],o,e,t,!1,n,r)}function m(e){var t,n,i=e.data;if(Ma(i))for(Ma(t=i.hook)&&Ma(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(Ma(t=e.children))for(n=0;n<e.children.length;++n)m(e.children[n])}function g(e,t,n){for(;t<=n;++t){var r=e[t];Ma(r)&&(Ma(r.tag)?(y(r),m(r)):s(r.elm))}}function y(e,t){if(Ma(t)||Ma(e.data)){var n,i=r.remove.length+1;for(Ma(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}(e.elm,i),Ma(n=e.componentInstance)&&Ma(n=n._vnode)&&Ma(n.data)&&y(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);Ma(n=e.data.hook)&&Ma(n=n.remove)?n(e,t):t()}else s(e.elm)}function v(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];if(Ma(o)&&Yu(e,o))return i}}function b(e,t,n,i,s,l){if(e!==t){Ma(t.elm)&&Ma(i)&&(t=i[s]=Bl(t));var c=t.elm=e.elm;if(Na(e.isAsyncPlaceholder))Ma(t.asyncFactory.resolved)?S(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(Na(t.isStatic)&&Na(e.isStatic)&&t.key===e.key&&(Na(t.isCloned)||Na(t.isOnce)))t.componentInstance=e.componentInstance;else{var d,p=t.data;Ma(p)&&Ma(d=p.hook)&&Ma(d=d.prepatch)&&d(e,t);var h=e.children,m=t.children;if(Ma(p)&&u(t)){for(d=0;d<r.update.length;++d)r.update[d](e,t);Ma(d=p.hook)&&Ma(d=d.update)&&d(e,t)}Da(t.text)?Ma(h)&&Ma(m)?h!==m&&function(e,t,n,r,i){for(var s,l,c,d=0,u=0,p=t.length-1,h=t[0],m=t[p],y=n.length-1,w=n[0],x=n[y],S=!i;d<=p&&u<=y;)Da(h)?h=t[++d]:Da(m)?m=t[--p]:Yu(h,w)?(b(h,w,r,n,u),h=t[++d],w=n[++u]):Yu(m,x)?(b(m,x,r,n,y),m=t[--p],x=n[--y]):Yu(h,x)?(b(h,x,r,n,y),S&&o.insertBefore(e,h.elm,o.nextSibling(m.elm)),h=t[++d],x=n[--y]):Yu(m,w)?(b(m,w,r,n,u),S&&o.insertBefore(e,m.elm,h.elm),m=t[--p],w=n[++u]):(Da(s)&&(s=Xu(t,d,p)),Da(l=Ma(w.key)?s[w.key]:v(w,t,d,p))?a(w,r,e,h.elm,!1,n,u):Yu(c=t[l],w)?(b(c,w,r,n,u),t[l]=void 0,S&&o.insertBefore(e,c.elm,h.elm)):a(w,r,e,h.elm,!1,n,u),w=n[++u]);d>p?f(e,Da(n[y+1])?null:n[y+1].elm,n,u,y,r):u>y&&g(t,d,p)}(c,h,m,n,l):Ma(m)?(Ma(e.text)&&o.setTextContent(c,""),f(c,null,m,0,m.length-1,n)):Ma(h)?g(h,0,h.length-1):Ma(e.text)&&o.setTextContent(c,""):e.text!==t.text&&o.setTextContent(c,t.text),Ma(p)&&Ma(d=p.hook)&&Ma(d=d.postpatch)&&d(e,t)}}}function w(e,t,n){if(Na(n)&&Ma(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var x=ja("attrs,class,staticClass,staticStyle,key");function S(e,t,n,r){var i,o=t.tag,s=t.data,a=t.children;if(r=r||s&&s.pre,t.elm=e,Na(t.isComment)&&Ma(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(Ma(s)&&(Ma(i=s.hook)&&Ma(i=i.init)&&i(t,!0),Ma(i=t.componentInstance)))return l(t,n),!0;if(Ma(o)){if(Ma(a))if(e.hasChildNodes())if(Ma(i=s)&&Ma(i=i.domProps)&&Ma(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var c=!0,u=e.firstChild,h=0;h<a.length;h++){if(!u||!S(u,a[h],n,r)){c=!1;break}u=u.nextSibling}if(!c||u)return!1}else d(t,a,n);if(Ma(s)){var f=!1;for(var m in s)if(!x(m)){f=!0,p(t,n);break}!f&&s.class&&hd(s.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,i){if(!Da(t)){var s,l=!1,c=[];if(Da(e))l=!0,a(t,c);else{var d=Ma(e.nodeType);if(!d&&Yu(e,t))b(e,t,c,null,null,i);else{if(d){if(1===e.nodeType&&e.hasAttribute(cl)&&(e.removeAttribute(cl),n=!0),Na(n)&&S(e,t,c))return w(t,c,!0),e;s=e,e=new $l(o.tagName(s).toLowerCase(),{},[],void 0,s)}var p=e.elm,h=o.parentNode(p);if(a(t,c,p._leaveCb?null:h,o.nextSibling(p)),Ma(t.parent))for(var f=t.parent,y=u(t);f;){for(var v=0;v<r.destroy.length;++v)r.destroy[v](f);if(f.elm=t.elm,y){for(var x=0;x<r.create.length;++x)r.create[x](Ju,f);var C=f.data.hook.insert;if(C.merged)for(var k=1;k<C.fns.length;k++)C.fns[k]()}else Zu(f);f=f.parent}Ma(h)?g([e],0,0):Ma(e.tag)&&m(e)}}return w(t,c,l),t.elm}Ma(e)&&m(e)}}({nodeOps:Uu,modules:[cp,pp,xp,kp,$p,lh].concat(op)});wl&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&yh(e,"input")}));var dh={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?mc(n,"postpatch",(function(){dh.componentUpdated(e,t,n)})):uh(e,t,n.context),e._vOptions=[].map.call(e.options,fh)):("textarea"===n.tag||Hu(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",mh),e.addEventListener("compositionend",gh),e.addEventListener("change",gh),wl&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){uh(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,fh);if(i.some((function(e,t){return!sl(e,r[t])}))){var o=e.multiple?t.value.some((function(e){return hh(e,i)})):t.value!==t.oldValue&&hh(t.value,i);o&&yh(e,"change")}}}};function uh(e,t,n){ph(e,t),(bl||xl)&&setTimeout((function(){ph(e,t)}),0)}function ph(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,s,a=0,l=e.options.length;a<l;a++)if(s=e.options[a],i)o=al(r,fh(s))>-1,s.selected!==o&&(s.selected=o);else if(sl(fh(s),r))return void(e.selectedIndex!==a&&(e.selectedIndex=a));i||(e.selectedIndex=-1)}}function hh(e,t){return t.every((function(t){return!sl(t,e)}))}function fh(e){return"_value"in e?e._value:e.value}function mh(e){e.target.composing=!0}function gh(e){e.target.composing&&(e.target.composing=!1,yh(e.target,"input"))}function yh(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function vh(e){return!e.componentInstance||e.data&&e.data.transition?e:vh(e.componentInstance._vnode)}var bh={bind:function(e,t,n){var r=t.value,i=(n=vh(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,rh(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=vh(n)).data&&n.data.transition?(n.data.show=!0,r?rh(n,(function(){e.style.display=e.__vOriginalDisplay})):ih(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},wh={model:dh,show:bh},xh={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Sh(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Sh(Wc(t.children)):e}function Ch(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var r in i)t[Ja(r)]=i[r];return t}function kh(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var _h=function(e){return e.tag||qc(e)},Ah=function(e){return"show"===e.name},Eh={name:"transition",props:xh,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(_h)).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=Sh(i);if(!o)return i;if(this._leaving)return kh(e,i);var s="__transition-".concat(this._uid,"-");o.key=null==o.key?o.isComment?s+"comment":s+o.tag:Ia(o.key)?0===String(o.key).indexOf(s)?o.key:s+o.key:o.key;var a=(o.data||(o.data={})).transition=Ch(this),l=this._vnode,c=Sh(l);if(o.data.directives&&o.data.directives.some(Ah)&&(o.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,c)&&!qc(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var d=c.data.transition=tl({},a);if("out-in"===r)return this._leaving=!0,mc(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),kh(e,i);if("in-out"===r){if(qc(o))return l;var u,p=function(){u()};mc(a,"afterEnter",p),mc(a,"enterCancelled",p),mc(d,"delayLeave",(function(e){u=e}))}}return i}}},Oh=tl({tag:String,moveClass:String},xh);delete Oh.mode;var Th={props:Oh,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Cd(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],s=Ch(this),a=0;a<i.length;a++)(d=i[a]).tag&&null!=d.key&&0!==String(d.key).indexOf("__vlist")&&(o.push(d),n[d.key]=d,(d.data||(d.data={})).transition=s);if(r){var l=[],c=[];for(a=0;a<r.length;a++){var d;(d=r[a]).data.transition=s,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?l.push(d):c.push(d)}this.kept=e(t,null,l),this.removed=c}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Dh),e.forEach(Mh),e.forEach(Nh),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Gp(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Up,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Up,e),n._moveCb=null,Yp(n,t))})}})))},methods:{hasMove:function(e,t){if(!Vp)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){Bp(n,e)})),qp(n,t),n.style.display="none",this.$el.appendChild(n);var r=eh(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function Dh(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Mh(e){e.data.newPos=e.elm.getBoundingClientRect()}function Nh(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate(".concat(r,"px,").concat(i,"px)"),o.transitionDuration="0s"}}var Ih={Transition:Eh,TransitionGroup:Th};vu.config.mustUseProp=function(e,t,n){return"value"===n&&Eu(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},vu.config.isReservedTag=ju,vu.config.isReservedAttr=Au,vu.config.getTagNamespace=function(e){return Vu(e)?"svg":"math"===e?"math":void 0},vu.config.isUnknownElement=function(e){if(!yl)return!0;if(ju(e))return!1;if(e=e.toLowerCase(),null!=zu[e])return zu[e];var t=document.createElement(e);return e.indexOf("-")>-1?zu[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:zu[e]=/HTMLUnknownElement/.test(t.toString())},tl(vu.options.directives,wh),tl(vu.options.components,Ih),vu.prototype.__patch__=yl?ch:rl,vu.prototype.$mount=function(e,t){return function(e,t,n){var r;e.$el=t,e.$options.render||(e.$options.render=Rl),Ed(e,"beforeMount"),r=function(){e._update(e._render(),n)},new yd(e,r,rl,{before:function(){e._isMounted&&!e._isDestroyed&&Ed(e,"beforeUpdate")}},!0),n=!1;var i=e._preWatchers;if(i)for(var o=0;o<i.length;o++)i[o].run();return null==e.$vnode&&(e._isMounted=!0,Ed(e,"mounted")),e}(this,e=e&&yl?function(e){return"string"==typeof e?document.querySelector(e)||document.createElement("div"):e}(e):void 0,t)},yl&&setTimeout((function(){pl.devtools&&Tl&&Tl.emit("init",vu)}),0);const Ph=new vu,$h={name:"DpTreeListCheckbox",model:{prop:"checked",event:"check"},props:{checked:{type:Boolean,required:!1,default:!1},checkAll:{type:Boolean,required:!1,default:!1},name:{type:String,required:!0},stringValue:{type:String,required:!1,default:"on"}},computed:{label(){return this.checkAll?this.toggleCheckedStatus("aria.deselect_all","aria.select.all"):this.toggleCheckedStatus("aria.deselect","aria.select")}},methods:{check(){this.$emit("check",!this.checked)},toggleCheckedStatus(e,t){return Translator.trans(this.checked?e:t)}}},Rh=(0,l.Z)($h,(function(){var e=this,t=e._self._c;return t("label",{staticClass:"u-mb-0"},[t("input",{staticClass:"u-m-0_5 u-ml-0_25",attrs:{type:"checkbox",name:e.name,id:e.name},domProps:{checked:e.checked,value:e.stringValue},on:{click:e.check}}),e._v(" "),t("span",{staticClass:"hide-visually"},[e._v(e._s(e.label))])])}),[],!1,null,null,null).exports,qh={name:"DpTreeListToggle",props:{value:{type:Boolean,required:!1,default:!1},iconClassProp:{type:String,required:!1,default:""},toggleAll:{type:Boolean,required:!1,default:!1}},computed:{iconClass(){return""!==this.iconClassProp?this.iconClassProp:"font-size-large line-height--1 u-p-0_25 fa "+(this.value?"fa-angle-up":"fa-angle-down")},label(){return this.toggleAll?Translator.trans(this.value?"aria.collapse.all":"aria.expand.all"):Translator.trans(this.value?"aria.collapse":"aria.expand")}},methods:{toggle(){this.$emit("input",!this.value)}}},Bh=(0,l.Z)(qh,(function(){var e=this,t=e._self._c;return t("button",{staticClass:"o-link--default btn--blank",attrs:{type:"button","aria-label":e.label},on:{click:e.toggle}},[t("i",{class:e.iconClass,attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null).exports,Fh={name:"DpTreeListNode",components:{DpDraggable:Oi,DpIcon:Yr,DpTreeListCheckbox:Rh,DpTreeListToggle:Bh},directives:{tooltip:n.u},props:{checkBranch:{type:Function,required:!0},children:{type:Array,required:!0},draggable:{type:Boolean,required:!1,default:!0},handleChange:{type:Function,required:!0},handleDrag:{type:Function,required:!0},level:{type:Number,required:!0},node:{type:Object,required:!0},nodeId:{type:String,required:!0},onMove:{type:Function,required:!0},options:{type:Object,required:!1,default:()=>({})},parentId:{type:String,required:!1,default:""},parentSelected:{type:Boolean,required:!1,default:!1}},data:()=>({isExpanded:!1,isSelected:!1}),computed:{checkboxIdentifier(){return(this.isBranch?this.options.checkboxIdentifier.branch:this.options.checkboxIdentifier.leaf)+":"+this.nodeId},dragHandle(){const e=this.options.draggable.handle;return e.substring(1,e.length)},hasDraggableChildren(){return this.isBranch&&(this.options.dragLeaves||this.options.dragBranches)&&this.draggable},hasToggle(){return this.isBranch&&this.children.length>0},iconClassFolder(){let e;return e=this.children.length>0?this.isExpanded?"fa-folder-open":"fa-folder":"fa-folder-o","fa "+e},indentationStyle(){let e=25*this.level;return(this.isBranch&&!this.options.dragBranches&&this.options.dragLeaves||this.isLeaf&&this.options.dragBranches&&!this.options.dragLeaves)&&(e+=22),(this.isBranch&&!this.options.branchesSelectable&&this.options.leavesSelectable||this.isLeaf&&this.options.branchesSelectable&&!this.options.leavesSelectable)&&(e+=30),`margin-left: ${e}px;`},isBranch(){return this.checkBranch({node:this.node,children:this.children,id:this.nodeId})},isDraggable(){return this.isDraggableLeaf||this.isDraggableBranch},isDraggableBranch(){return this.options.dragBranches&&this.isBranch},isDraggableLeaf(){return this.options.dragLeaves&&this.isLeaf},isLeaf(){return!1===this.isBranch},isSelectable(){return this.isBranch&&this.options.branchesSelectable||this.isLeaf&&this.options.leavesSelectable||!1},tree:{get(){return this.children},set(e){this.$emit("tree:change",e)}}},watch:{parentSelected(e){this.options.selectOn.parentSelect&&!0===e&&!1===this.isSelected&&this.setSelectionState({selectionState:e,fromParent:!0}),this.options.deselectOn.parentDeselect&&!1===e&&!0===this.isSelected&&this.setSelectionState({selectionState:e,fromParent:!0})}},methods:{bubbleChangeEvent(e){this.$emit("tree:change",e)},bubbleDraggableChange(e){this.$emit("draggable:change",e)},handleChildSelectionChange(e){const t=e[e.length-1].selectionState;this.options.deselectOn.childDeselect&&!1===t&&!0===this.isSelected||this.options.selectOn.childSelect&&!0===t&&!1===this.isSelected?this.setSelectionState({selectionState:t,selections:e}):this.$emit("node-selected",e)},setSelectionState({selectionState:e,selections:t=[],fromParent:n=!1}){const r=[...t];this.isSelected=e,r.push({nodeId:this.nodeId,nodeType:!0===this.isBranch?"branch":"leaf",selectionState:e}),Ph.$emit("checked",r),!1===n&&this.$emit("node-selected",r)}},mounted(){this.$root.$on("treelist:toggle-all",(e=>this.isExpanded=e))}},Lh={name:"DpTreeList",components:{DpDraggable:Oi,DpTreeListCheckbox:Rh,DpTreeListNode:(0,l.Z)(Fh,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"border--top relative",attrs:{"data-cy":"treeListNode"}},[t("div",{staticClass:"c-treelist__node flex"},[e.isDraggable?t("div",{staticClass:"display--inline-block u-p-0_25 u-pr-0 u-mt-0_125",class:e.dragHandle},[t("dp-icon",{staticClass:"c-treelist__drag-handle-icon",attrs:{icon:"drag-handle"}})],1):e._e(),e._v(" "),e.isSelectable?t("dp-tree-list-checkbox",{attrs:{checked:e.isSelected,name:e.checkboxIdentifier,"string-value":e.nodeId},on:{check:function(t){return e.setSelectionState({selectionState:!e.isSelected})}}}):e._e(),e._v(" "),t("div",{staticClass:"flex grow items-start",style:e.indentationStyle},[e.isBranch?t("dp-tree-list-toggle",{staticClass:"c-treelist__folder text--left u-pv-0_25",class:{"pointer-events-none":0===e.children.length},attrs:{"icon-class-prop":e.iconClassFolder},model:{value:e.isExpanded,callback:function(t){e.isExpanded=t},expression:"isExpanded"}}):e._e(),e._v(" "),t("div",{staticClass:"grow u-pl-0 u-p-0_25"},[e.isBranch?e._t("branch",null,{nodeElement:e.node,nodeChildren:e.children,nodeId:e.nodeId,parentId:e.parentId}):e._e(),e._v(" "),e.isLeaf?e._t("leaf",null,{nodeElement:e.node,nodeId:e.nodeId,parentId:e.parentId}):e._e()],2)],1),e._v(" "),e.isBranch?t("dp-tree-list-toggle",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans(e.hasToggle?"":"no.elements.existing"),expression:"Translator.trans(!hasToggle ? 'no.elements.existing' : '')"}],staticClass:"self-start",attrs:{"data-cy":"treeListToggle",disabled:!e.hasToggle},model:{value:e.isExpanded,callback:function(t){e.isExpanded=t},expression:"isExpanded"}}):t("div",{staticClass:"min-width-25"})],1),e._v(" "),t(e.draggable?"dp-draggable":"div",{tag:"component",staticClass:"list-style-none u-mb-0 u-1-of-1",attrs:{"drag-across-branches":e.options.dragAcrossBranches,"draggable-tag":"ul","group-id":e.nodeId,"handle-change":e.handleChange,"handle-drag":e.handleDrag,"is-draggable":e.hasDraggableChildren,"node-id":e.nodeId,"on-move":e.onMove,opts:e.options.draggable},model:{value:e.tree,callback:function(t){e.tree=t},expression:"tree"}},e._l(e.children,(function(n){return t("dp-tree-list-node",{directives:[{name:"show",rawName:"v-show",value:!0===e.isExpanded,expression:"true === isExpanded"}],key:n.id,ref:`node_${n.id}`,refInFor:!0,attrs:{"check-branch":e.checkBranch,children:n.children||[],"handle-change":e.handleChange,"handle-drag":e.handleDrag,level:e.level+1,node:n,"node-id":n.id,"on-move":e.onMove,options:e.options,"parent-id":e.nodeId,"parent-selected":e.isSelected},on:{"draggable:change":e.bubbleDraggableChange,end:function(t){return e.handleDrag("end")},"node-selected":e.handleChildSelectionChange,start:function(t){return e.handleDrag("start")},"tree:change":e.bubbleChangeEvent},scopedSlots:e._u([e._l(Object.keys(e.$scopedSlots),(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}}))],null,!0)})})),1)],1)}),[],!1,null,null,null).exports,DpTreeListToggle:Bh},props:{branchIdentifier:{type:Function,required:!0},draggable:{type:Boolean,required:!1,default:!0},onMove:{type:Function,required:!1,default:()=>!0},options:{type:Object,required:!1,default:()=>({})},treeData:{type:Array,required:!0}},data:()=>({allElementsExpanded:!1,allElementsSelected:!1,dragging:!1,opts:{},selectedNodesObject:{}}),computed:{checkAll(){return this.opts.branchesSelectable||this.opts.leavesSelectable},checkboxIndentationStyle(){return`margin-left: ${this.opts.dragBranches||this.opts.dragLeaves?22:0}px;`},selectedNodes(){return Object.keys(this.selectedNodesObject).map((e=>this.selectedNodesObject[e]))},tree:{get(){return this.treeData},set(e){this.$emit("tree:change",e)}}},methods:{bubbleChangeEvent(e){this.$emit("tree:change",e)},bubbleDraggableChange(e){this.$emit("draggable:change",e)},destroyFixedControls(){this.stickyHeader.destroy(),this.stickyFooter.destroy()},filterSelectableNodes(e){return this.opts.branchesSelectable&&this.opts.leavesSelectable?e:e.filter((({nodeType:e})=>{let t=!1;return(this.opts.branchesSelectable&&"branch"===e||this.opts.leavesSelectable&&"leaf"===e)&&(t=!0),t}))},handleChange(e,t){if((0,r.Q$)(e,"added")||(0,r.Q$)(e,"moved")){const{element:n,newIndex:i}=(0,r.Q$)(e,"moved")?e.moved:e.added,o={elementId:n.id,newIndex:i,parentId:t};this.$emit("draggable:change",o)}},handleDrag(e){this.$emit(e),this.dragging="start"===e},handleSelectEvent(e){this.filterSelectableNodes(e).forEach((e=>this.setSelectionState(e))),this.$emit("node-selection-change",this.selectedNodes)},initFixedControls(){this.stickyHeader=new R(this.$refs.header,this.$refs.treeList.$el,0),this.$slots.footer&&(this.stickyFooter=new R(this.$refs.footer,this.$refs.treeList.$el,0,"bottom"))},setSelectionState(e){if(!0===e.selectionState&&(this.selectedNodesObject={...this.selectedNodesObject,[e.nodeId]:e}),!1===e.selectionState){const t={...this.selectedNodesObject};delete t[e.nodeId],this.selectedNodesObject=t}},toggleAll(){this.$root.$emit("treelist:toggle-all",!this.allElementsExpanded),this.allElementsExpanded=!this.allElementsExpanded},unselectAll(){this.selectedNodes.forEach((e=>{this.$refs["node_"+e.id]&&this.$refs["node_"+e.id][0].setSelectionState(!1)})),this.selectedNodesObject={},this.allElementsSelected=!1,this.$emit("node-selection-change",this.selectedNodes)}},mounted(){this.opts=(0,r.RH)({branchesSelectable:!1,leavesSelectable:!1,rootDraggable:!1,dragAcrossBranches:!1,dragBranches:!1,dragLeaves:!1,draggable:{handle:".c-treelist__drag-handle",ghostClass:"c-treelist__node-ghost",chosenClass:"c-treelist__node-chosen"},checkboxIdentifier:{branch:"nodeSelected",leaf:"nodeSelected"},selectOn:{childSelect:!1,parentSelect:!1},deselectOn:{childDeselect:!1,parentDeselect:!1}},this.options),this.initFixedControls(),Ph.$on("checked",this.handleSelectEvent)}},Vh=(0,l.Z)(Lh,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-treelist",class:{"is-dragging":e.dragging}},[t("div",{ref:"header",staticClass:"c-treelist__header o-sticky line-height--2",class:{"has-checkbox":e.checkAll}},[t("div",{staticClass:"flex bg-color--white"},[e.checkAll?t("dp-tree-list-checkbox",{style:e.checkboxIndentationStyle,attrs:{name:"checkAll","check-all":""},model:{value:e.allElementsSelected,callback:function(t){e.allElementsSelected=t},expression:"allElementsSelected"}}):e._e(),e._v(" "),t("div",{staticClass:"grow color--grey"},[e._t("header")],2),e._v(" "),t("dp-tree-list-toggle",{staticClass:"color--grey",attrs:{value:e.allElementsExpanded,"toggle-all":""},on:{input:e.toggleAll}})],1)]),e._v(" "),t(e.draggable?"dp-draggable":"div",{ref:"treeList",tag:"component",staticClass:"list-style-none u-mb-0 u-1-of-1",attrs:{"drag-across-branches":e.opts.dragAcrossBranches,"draggable-tag":"ul","handle-change":e.handleChange,"handle-drag":e.handleDrag,"is-draggable":e.draggable,"on-move":e.onMove,opts:e.opts.draggable},model:{value:e.tree,callback:function(t){e.tree=t},expression:"tree"}},e._l(e.treeData,(function(n){return t("dp-tree-list-node",{key:n.id,ref:`node_${n.id}`,refInFor:!0,attrs:{"check-branch":e.branchIdentifier,children:n.children||[],draggable:e.draggable,"handle-change":e.handleChange,"handle-drag":e.handleDrag,level:0,node:n,"node-id":n.id,"on-move":e.onMove,options:e.opts,"parent-selected":e.allElementsSelected},on:{"draggable:change":e.bubbleDraggableChange,end:function(t){return e.handleDrag("end")},"node-selected":e.handleSelectEvent,start:function(t){return e.handleDrag("start")},"tree:change":e.bubbleChangeEvent},scopedSlots:e._u([e._l(Object.keys(e.$scopedSlots),(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}}))],null,!0)})})),1),e._v(" "),e.$slots.footer?t("div",{ref:"footer",staticClass:"c-treelist__footer o-sticky"},[t("div",{staticClass:"u-p-0_5 bg-color--white"},[e._t("footer")],2)]):e._e()],1)}),[],!1,null,null,null).exports;function jh(e){this.content=e}jh.prototype={constructor:jh,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 r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return-1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new jh(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new jh(n)},addToStart:function(e,t){return new jh([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new jh(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new jh(i)},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=jh.from(e)).size?new jh(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=jh.from(e)).size?new jh(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=jh.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}},jh.from=function(e){if(e instanceof jh)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new jh(t)};const zh=jh;function Hh(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let e=0;i.text[e]==o.text[e];e++)n++;return n}if(i.content.size||o.content.size){let e=Hh(i.content,o.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function Uh(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e<t&&s.text[s.text.length-e-1]==a.text[a.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let e=Uh(s.content,a.content,n-1,r-1);if(e)return e}n-=l,r-=l}else n-=l,r-=l}}class Wh{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 a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(i+=s.text.slice(Math.max(e,a)-a,t-a),o=!n):s.isLeaf?(r?i+="function"==typeof r?r(s):r:s.type.spec.leafText&&(i+=s.type.spec.leafText(s)),o=!n):!o&&s.isBlock&&(i+=n,o=!0)}),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(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new Wh(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],a=o+s.nodeSize;a>e&&((o<e||a>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=a}return new Wh(n,r)}cutByIndex(e,t){return e==t?Wh.empty:0==e&&t==this.content.length?this:new Wh(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new Wh(r,i)}addToStart(e){return new Wh([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Wh(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 new 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 Hh(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Uh(this,e,t,n)}findIndex(e,t=-1){if(0==e)return Kh(0,e);if(e==this.size)return Kh(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?Kh(n+1,i):Kh(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 Wh.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Wh(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Wh.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 Wh(t||e,n)}static from(e){if(!e)return Wh.empty;if(e instanceof Wh)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Wh([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Wh.empty=new Wh([],0);const Zh={index:0,offset:0};function Kh(e,t){return Zh.index=e,Zh.offset=t,Zh}function Jh(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(!Jh(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Jh(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class Gh{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&&Jh(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 new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(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 Gh.none;if(e instanceof Gh)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}Gh.none=[];class Yh extends Error{}class Xh{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=ef(this.content,e+this.openStart,t);return n&&new Xh(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Xh(Qh(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 Xh.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Xh(Wh.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 Xh(e,n,r)}}function Qh(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(Qh(o.content,t-i-1,n-i-1)))}function ef(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ef(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function tf(e,t,n){if(n.openStart>e.depth)throw new Yh("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Yh("Inconsistent open depths");return nf(e,t,n,0)}function nf(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=nf(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:i,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(Wh.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return lf(o,cf(e,i,s,t,r))}{let r=e.parent,i=r.content;return lf(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}}return lf(o,df(e,t,r))}function rf(e,t){if(!t.type.compatibleContent(e.type))throw new Yh("Cannot join "+t.type.name+" onto "+e.type.name)}function of(e,t,n){let r=e.node(n);return rf(r,t.node(n)),r}function sf(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 af(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&&(sf(e.nodeAfter,r),o++));for(let e=o;e<s;e++)sf(i.child(e),r);t&&t.depth==n&&t.textOffset&&sf(t.nodeBefore,r)}function lf(e,t){return e.type.checkContent(t),e.copy(t)}function cf(e,t,n,r,i){let o=e.depth>i&&of(e,t,i+1),s=r.depth>i&&of(n,r,i+1),a=[];return af(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(rf(o,s),sf(lf(o,cf(e,t,n,r,i+1)),a)):(o&&sf(lf(o,df(e,t,i+1)),a),af(t,n,i,a),s&&sf(lf(s,df(n,r,i+1)),a)),af(r,null,i,a),new Wh(a)}function df(e,t,n){let r=[];return af(null,e,n,r),e.depth>n&&sf(lf(of(e,t,n+1),df(e,t,n+1)),r),af(t,null,n,r),new Wh(r)}Xh.empty=new Xh(Wh.empty,0,0);class uf{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 new 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 new 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 Gh.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 mf(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 new 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)break;if(t=t.child(e),t.isText)break;i=s-1,r+=o+1}return new uf(t,n,i)}static resolveCached(e,t){for(let n=0;n<pf.length;n++){let r=pf[n];if(r.pos==t&&r.doc==e)return r}let n=pf[hf]=uf.resolve(e,t);return hf=(hf+1)%ff,n}}let pf=[],hf=0,ff=12;class mf{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)}}const gf=Object.create(null);class yf{constructor(e,t,n,r=Gh.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Wh.empty}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&&Jh(this.attrs,t||e.defaultAttrs||gf)&&Gh.sameSet(this.marks,n||Gh.none)}copy(e=null){return e==this.content?this:new yf(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new yf(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 Xh.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new Xh(a,r.depth-o,i.depth-o)}replace(e,t,n){return tf(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),!t)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 uf.resolveCached(this,e)}resolveNoCache(e){return uf.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}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bf(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Wh.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<i;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);let e=Gh.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Gh.sameSet(e,this.marks))throw new 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){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=Wh.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}yf.prototype.text=void 0;class vf extends yf{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bf(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 vf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new vf(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 bf(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class wf{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new xf(e,t);if(null==n.next)return wf.empty;let r=Sf(n);n.next&&n.err("Unexpected trailing text");let i=function(e){let t=Object.create(null);return function n(r){let i=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Of(e,n).forEach((e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let o=t[r.join(",")]=new wf(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Ef);o.next.push({type:i[e][0],next:t[r.join(",")]||n(r)})}return o}(Of(e,0))}(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){if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(o)].concat(e(t.expr,o));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)]}if("name"==t.type)return[r(o,void 0,t.value)];throw new Error("Unknown expr 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())}}(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}function i(e,t){e.forEach((e=>e.to=t))}}(r));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)")}}(i,n),i}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 i(o,s){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return Wh.from(s.map((e=>e.createAndFill())));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=i(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),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 new 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")}}wf.empty=new wf(!0);class xf{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 new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Sf(e){let t=[];do{t.push(Cf(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Cf(e){let t=[];do{t.push(kf(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function kf(e){let t=function(e){if(e.eat("(")){let t=Sf(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=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.groups.indexOf(t)>-1&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=Af(e,t)}return t}function _f(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Af(e,t){let n=_f(e),r=n;return e.eat(",")&&(r="}"!=e.next?_f(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Ef(e,t){return t-e}function Of(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(Ef)}function Tf(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 Df(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)throw new RangeError("No value supplied for attribute "+r);i=t.default}n[r]=i}return n}function Mf(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new If(e[n]);return t}class Nf{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=Mf(n.attrs),this.defaultAttrs=Tf(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==wf.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:Df(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yf(this,this.computeAttrs(e),Wh.from(t),Gh.setFrom(n))}createChecked(e=null,t,n){return t=Wh.from(t),this.checkContent(t),new yf(this,this.computeAttrs(e),t,Gh.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=Wh.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(Wh.empty,!0);return i?new yf(this,e,t.append(i),Gh.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!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 new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}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){if(null==this.markSet)return e;let t;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:Gh.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new Nf(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class If{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Pf{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Mf(r.attrs),this.excluded=null;let i=Tf(this.attrs);this.instance=i?new Gh(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Gh(this,Df(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,i)=>n[e]=new Pf(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]}excludes(e){return this.excluded.indexOf(e)>-1}}class $f{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=zh.from(e.nodes),t.marks=zh.from(e.marks||{}),this.nodes=Nf.compile(this.spec.nodes,this),this.marks=Pf.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;t.contentMatch=n[r]||(n[r]=wf.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==i?null:i?Rf(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?[]:Rf(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 Nf))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new vf(n,n.defaultAttrs,e,Gh.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return yf.fromJSON(this,e)}markFromJSON(e){return Gh.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Rf(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 new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class qf{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&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 Wf(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Wf(this,t,!0);return n.addAll(e,t.from,t.to),Xh.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Zf(e,n.tag)&&(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=Kf(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=Kf(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new qf(e,qf.schemaRules(e)))}}const Bf={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},Ff={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Lf={ol:!0,ul:!0},Vf=1,jf=2,zf=4;function Hf(e,t,n){return null!=t?(t?Vf:0)|("full"===t?jf:0):e&&"pre"==e.whitespace?Vf|jf:n&~zf}class Uf{constructor(e,t,n,r,i,o,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=Gh.none,this.stashMarks=[],this.match=o||(s&zf?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Wh.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Vf)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=Wh.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Wh.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):Jf(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Bf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Wf{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,i=t.topNode,o=Hf(null,t.preserveWhitespace,0)|(n?zf:0);r=i?new Uf(i.type,i.attrs,Gh.none,Gh.none,!0,t.topMatch||i.type.contentMatch,o):new Uf(n?null:e.schema.topNodeType,null,Gh.none,Gh.none,!0,null,o),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(n.options&jf||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(n.options&Vf)t=n.options&jf?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=e.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();Lf.hasOwnProperty(r)&&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&&Lf.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(i?i.ignore:Ff.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let t,n=this.top,o=this.needsBlock;if(Bf.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=o}else this.addElementByRule(e,i,!1===i.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Gh.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let i=this.parser.matchStyle(e[n],e[n+1],this,r);if(!i)continue e;if(i.ignore)return null;if(t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),!1!==i.consuming)break;r=i}return t}addElementByRule(e,t,n){let r,i,o;t.node?(i=this.parser.schema.nodes[t.node],i.isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):r=this.enter(i,t.attrs||null,t.preserveWhitespace)):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let s=this.top;if(i&&i.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,o&&this.removePendingMark(o,s)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let o=Hf(e,r,i.options);i.options&zf&&0==i.content.length&&(o|=zf),this.nodes.push(new Uf(e,t,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}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;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 a=t[e];if(""==a){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!=a&&-1==e.groups.indexOf(a))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];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function Zf(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Kf(e){let t={};for(let n in e)t[n]=e[n];return t}function Jf(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)return!0;if(o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}class Gf{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Xf(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]){if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}else 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}=Gf.renderSpec(Xf(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new 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&&Gf.renderSpec(Xf(n),r(e,t))}static renderSpec(e,t,n=null){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 r,i=t[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s=n?e.createElementNS(n,i):e.createElement(i),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let i=l;i<t.length;i++){let o=t[i];if(0===o){if(i<t.length-1||i>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:i}=Gf.renderSpec(e,o,n);if(s.appendChild(t),i){if(r)throw new RangeError("Multiple content holes");r=i}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Gf(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Yf(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Yf(e.marks)}}function Yf(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Xf(e){return e.document||window.document}const Qf=Math.pow(2,16);function em(e,t){return e+t*Qf}function tm(e){return 65535&e}class nm{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 rm{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&rm.empty)return rm.empty}recover(e){let t=0,n=tm(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+function(e){return(e-(65535&e))/Qf}(e)}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,i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+i],c=this.ranges[s+o],d=a+l;if(e<=d){let i=a+r+((l?e==a?-1:e==d?1:t:t)<0?0:c);if(n)return i;let o=e==(t<0?a:d)?null:em(s/3,e-a),u=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(u|=8),new nm(i,u,o)}r+=c-l}return n?e+r:new nm(e+r,0,null)}touches(e,t){let n=0,r=tm(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 a=this.ranges[t+i];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+o]-a}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),a=o+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),i+=c-l}}invert(){return new rm(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?rm.empty:new rm(e<0?[0,-e,0]:[0,0,e])}}rm.empty=new rm([]);class im{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new im(this.maps,this.mirror,e,t)}copy(){return new im(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){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 im;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 nm(e,r,null)}}const om=Object.create(null);class sm{getMap(){return rm.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=om[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in om)throw new RangeError("Duplicate use of step JSON ID "+e);return om[e]=t,t.prototype.jsonID=e,t}}class am{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new am(e,null)}static fail(e){return new am(null,e)}static fromReplace(e,t,n,r){try{return am.ok(e.replace(t,n,r))}catch(e){if(e instanceof Yh)return am.fail(e.message);throw e}}}function lm(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(lm(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Wh.fromArray(r)}class cm extends sm{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),r=n.node(n.sharedDepth(this.to)),i=new Xh(lm(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return am.fromReplace(e,this.from,this.to,i)}invert(){return new dm(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 cm(t.pos,n.pos,this.mark)}merge(e){return e instanceof cm&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new cm(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 new RangeError("Invalid input for AddMarkStep.fromJSON");return new cm(t.from,t.to,e.markFromJSON(t.mark))}}sm.jsonID("addMark",cm);class dm extends sm{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=new Xh(lm(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return am.fromReplace(e,this.from,this.to,n)}invert(){return new cm(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 dm(t.pos,n.pos,this.mark)}merge(e){return e instanceof dm&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dm(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 new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new dm(t.from,t.to,e.markFromJSON(t.mark))}}sm.jsonID("removeMark",dm);class um extends sm{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return am.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return am.fromReplace(e,this.pos,this.pos+1,new Xh(Wh.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 um(this.pos,t.marks[n]);return new um(this.pos,this.mark)}}return new pm(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new um(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 new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new um(t.pos,e.markFromJSON(t.mark))}}sm.jsonID("addNodeMark",um);class pm extends sm{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return am.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return am.fromReplace(e,this.pos,this.pos+1,new Xh(Wh.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new um(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new pm(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 new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new pm(t.pos,e.markFromJSON(t.mark))}}sm.jsonID("removeNodeMark",pm);class hm extends sm{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&mm(e,this.from,this.to)?am.fail("Structure replace would overwrite content"):am.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new rm([this.from,this.to-this.from,this.slice.size])}invert(e){return new hm(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 hm(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof hm)||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?Xh.empty:new Xh(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new hm(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?Xh.empty:new Xh(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new hm(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 new RangeError("Invalid input for ReplaceStep.fromJSON");return new hm(t.from,t.to,Xh.fromJSON(e,t.slice),!!t.structure)}}sm.jsonID("replace",hm);class fm extends sm{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&&(mm(e,this.from,this.gapFrom)||mm(e,this.gapTo,this.to)))return am.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return am.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?am.fromReplace(e,this.from,this.to,n):am.fail("Content does not fit in gap")}getMap(){return new rm([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 fm(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=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new fm(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 new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new fm(t.from,t.to,t.gapFrom,t.gapTo,Xh.fromJSON(e,t.slice),t.insert,!!t.structure)}}function mm(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&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 gm(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ym(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||!gm(r,i,o))break}return null}function vm(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 a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return o?i.map(bm).concat({type:t,attrs:n}).concat(o.map(bm)):null}function bm(e){return{type:e,attrs:null}}function wm(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),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function xm(e,t){let n=e.resolve(t),r=n.index();return function(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Sm(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),a=!1;if(1==e)a=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(o,o,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function Cm(e,t,n=t,r=Xh.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return km(i,o,r)?new hm(t,n,r):new _m(i,o,r).fit()}function km(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}sm.jsonID("replaceAround",fm);class _m{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Wh.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=Wh.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,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let a=new Xh(i,o,s);return e>-1?new fm(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new hm(n.pos,r.pos,a):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=Om(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let i=n.firstChild;for(let n=this.depth;n>=0;n--){let o,{type:s,match:a}=this.frontier[n],l=null;if(1==e&&(i?a.matchType(i.type)||(l=a.fillBefore(Wh.from(i),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:l};if(2==e&&i&&(o=a.findWrapping(i.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:o};if(r&&a.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Om(e,t);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new Xh(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Om(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new Xh(Am(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Xh(Am(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let o=this.unplaced,s=n?n.content:o.content,a=o.openStart-e,l=0,c=[],{match:d,type:u}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));d=d.matchFragment(r)}let p=s.size+e-(o.content.size-o.openEnd);for(;l<s.childCount;){let e=s.child(l),t=d.matchType(e.type);if(!t)break;l++,(l>1||0==a||e.content.size)&&(d=t,c.push(Tm(e.mark(u.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?p:-1)))}let h=l==s.childCount;h||(p=-1),this.placed=Em(this.placed,t,Wh.from(c)),this.frontier[t].match=d,h&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=h?0==e?Xh.empty:new Xh(Am(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new Xh(Am(o.content,e,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Dm(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.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){e: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=Dm(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=Dm(e,n,r,t,!0);if(!i||i.childCount)continue e}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=Em(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 r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Em(this.placed,this.depth,Wh.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Wh.empty,!0);e.childCount&&(this.placed=Em(this.placed,this.frontier.length,e))}}function Am(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Am(e.firstChild.content,t-1,n)))}function Em(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Em(e.lastChild.content,t-1,n)))}function Om(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Tm(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Tm(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Wh.empty,!0)))),e.copy(r)}function Dm(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 a=r.fillBefore(o.content,!0,s);return a&&!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)?a:null}function Mm(e){return e.spec.defining||e.spec.definingForContent}function Nm(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(Nm(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Wh.empty,!0))}return e}function Im(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(i<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}class Pm extends sm{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 am.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 r=t.type.create(n,null,t.marks);return am.fromReplace(e,this.pos,this.pos+1,new Xh(Wh.from(r),0,t.isLeaf?0:1))}getMap(){return rm.empty}invert(e){return new Pm(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 Pm(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 new RangeError("Invalid input for AttrStep.fromJSON");return new Pm(t.pos,t.attr,t.value)}}sm.jsonID("attr",Pm);let $m=class extends Error{};$m=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},($m.prototype=Object.create(Error.prototype)).constructor=$m,$m.prototype.name="TransformError";class Rm{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new im}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new $m(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=Xh.empty){let r=Cm(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new Xh(Wh.from(n),0,0))}delete(e,t){return this.replace(e,t,Xh.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(km(i,o,r))return e.step(new hm(t,n,r));let s=Im(i,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:i.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],d=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){let t=c[e].type,n=Mm(t);if(n&&i.node(l).type!=t)d=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let a=(t+d+1)%(r.openStart+1),u=c[a];if(u)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],d=!0;c<0&&(d=!1,c=-c);let p=i.node(c-1),h=i.index(c-1);if(p.canReplaceWith(h,h,u.type,u.marks))return e.replace(i.before(c),d?o.after(c):n,new Xh(Nm(r.content,0,r.openStart,a),a,r.openEnd))}}let u=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,n,r),!(e.steps.length>u));a--){let e=s[a];e<0||(t=i.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=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)return null}return null}(e.doc,t,r.type);null!=i&&(t=n=i)}e.replaceRange(t,n,new Xh(Wh.from(r),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=Im(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)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:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),l=s,c=a,d=Wh.empty,u=0;for(let e=o,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,d=Wh.from(r.node(e).copy(d)),u++):l--;let p=Wh.empty,h=0;for(let e=o,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,p=Wh.from(i.node(e).copy(p)),h++):c++;e.step(new fm(l,c,s,a,new Xh(d.append(p),u,h),d.size-u,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new hm(t-n,t+n,Xh.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=Wh.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Wh.from(n[e].type.create(n[e].attrs,r))}let i=t.start,o=t.end;e.step(new fm(i,o,i,o,new Xh(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,i)&&function(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(e.doc,e.mapping.slice(o).map(n),r)){e.clearIncompatible(e.mapping.slice(o).map(n,1),r);let s=e.mapping.slice(o),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new fm(a,l,a+1,l-1,new Xh(Wh.from(r.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new fm(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Xh(Wh.from(s),0,0),1,!0))}(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Pm(e,t,n)),this}addNodeMark(e,t){return this.step(new um(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Gh)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new pm(e,t)),this}split(e,t=1,n){return function(e,t,n=1,r){let i=e.doc.resolve(t),o=Wh.empty,s=Wh.empty;for(let e=i.depth,t=i.depth-n,a=n-1;e>t;e--,a--){o=Wh.from(i.node(e).copy(o));let t=r&&r[a];s=Wh.from(t?t.type.create(t.attrs,s):i.node(e).copy(s))}e.step(new hm(t,t,new Xh(o.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let i,o,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let d=e.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),u=Math.min(l+e.nodeSize,n),p=r.addToSet(d);for(let e=0;e<d.length;e++)d[e].isInSet(p)||(i&&i.to==c&&i.mark.eq(d[e])?i.to=u:s.push(i=new dm(c,u,d[e])));o&&o.to==c?o.to=u:a.push(o=new cm(c,u,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;o++;let a=null;if(r instanceof Pf){let t,n=e.marks;for(;t=r.isInSet(n);)(a||(a=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;e<a.length;e++){let n,l=a[e];for(let e=0;e<i.length;e++){let t=i[e];t.step==o-1&&l.eq(i[e].style)&&(n=t)}n?(n.to=r,n.step=o):i.push({style:l,from:Math.max(s,t),to:r,step:o})}}})),i.forEach((t=>e.step(new dm(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let i=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<i.childCount;t++){let a=i.child(t),l=s+a.nodeSize,c=r.matchType(a.type);if(c){r=c;for(let t=0;t<a.marks.length;t++)n.allowsMarkType(a.marks[t].type)||e.step(new dm(s,l,a.marks[t]))}else o.push(new hm(s,l,Xh.empty));s=l}if(!r.validEnd){let t=r.fillBefore(Wh.empty,!0);e.replace(s,s,new Xh(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}(this,e,t,n),this}}const qm=Object.create(null);class Bm{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Fm(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=Xh.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],c=e.mapping.slice(i);e.replaceRange(c.map(a.pos),c.map(l.pos),s?Xh.empty:t),0==s&&Jm(e,i,(n?n.isInline:r&&r.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],a=e.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),Jm(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new jm(e):Km(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?Km(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Km(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Wm(e.node(0))}static atStart(e){return Km(e,e,0,0,1)||new Wm(e)}static atEnd(e){return Km(e,e,e.content.size,e.childCount,-1)||new Wm(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=qm[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in qm)throw new RangeError("Duplicate use of selection JSON ID "+e);return qm[e]=t,t.prototype.jsonID=e,t}getBookmark(){return jm.between(this.$anchor,this.$head).getBookmark()}}Bm.prototype.visible=!0;class Fm{constructor(e,t){this.$from=e,this.$to=t}}let Lm=!1;function Vm(e){Lm||e.parent.inlineContent||(Lm=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class jm extends Bm{constructor(e,t=e){Vm(e),Vm(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 Bm.near(n);let r=e.resolve(t.map(this.anchor));return new jm(r.parent.inlineContent?r:n,n)}replace(e,t=Xh.empty){if(super.replace(e,t),t==Xh.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof jm&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new zm(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 new RangeError("Invalid input for TextSelection.fromJSON");return new jm(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=Bm.findFrom(t,n,!0)||Bm.findFrom(t,-n,!0);if(!e)return Bm.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(Bm.findFrom(e,-n,!0)||Bm.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new jm(e,t)}}Bm.jsonID("text",jm);class zm{constructor(e,t){this.anchor=e,this.head=t}map(e){return new zm(e.map(this.anchor),e.map(this.head))}resolve(e){return jm.between(e.resolve(this.anchor),e.resolve(this.head))}}class Hm extends Bm{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?Bm.near(i):new Hm(i)}content(){return new Xh(Wh.from(this.node),0,0)}eq(e){return e instanceof Hm&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Um(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Hm(e.resolve(t.anchor))}static create(e,t){return new Hm(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Hm.prototype.visible=!1,Bm.jsonID("node",Hm);class Um{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new zm(n,n):new Um(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Hm.isSelectable(n)?new Hm(t):Bm.near(t)}}class Wm extends Bm{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Xh.empty){if(t==Xh.empty){e.delete(0,e.doc.content.size);let t=Bm.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wm(e)}map(e){return new Wm(e)}eq(e){return e instanceof Wm}getBookmark(){return Zm}}Bm.jsonID("all",Wm);const Zm={map(){return this},resolve:e=>new Wm(e)};function Km(e,t,n,r,i,o=!1){if(t.inlineContent)return jm.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&&Hm.isSelectable(r))return Hm.create(e,n-(i<0?r.nodeSize:0))}else{let t=Km(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function Jm(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof hm||o instanceof fm)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==i&&(i=r)})),e.setSelection(Bm.near(e.doc.resolve(i),n)))}class Gm extends Rm{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 new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return Gh.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)||Gh.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(Bm.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 Ym(e,t){return t&&e?e.bind(t):e}class Xm{constructor(e,t,n){this.name=e,this.init=Ym(t.init,n),this.apply=Ym(t.apply,n)}}const Qm=[new Xm("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Xm("selection",{init:(e,t)=>e.selection||Bm.atStart(t.doc),apply:e=>e.selection}),new Xm("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Xm("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class eg{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Qm.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new 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 Xm(e.key,e.spec.state,e))}))}}class tg{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 a=r?r[o].n:0,l=r?r[o].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,o)){if(c.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(c),n=n.applyInner(c),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 new RangeError("Applying a mismatched transaction");let t=new tg(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 Gm(this)}static create(e){let t=new eg(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new tg(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 eg(this.schema,e.plugins),n=t.fields,r=new tg(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 new 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 new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new eg(e.schema,e.plugins),i=new tg(r);return r.fields.forEach((r=>{if("doc"==r.name)i.doc=yf.fromJSON(e.schema,t.doc);else if("selection"==r.name)i.selection=Bm.fromJSON(i.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let o in n){let s=n[o],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,o))return void(i[r.name]=a.fromJSON.call(s,e,t[o],i))}i[r.name]=r.init(e,i)}})),i}}function ng(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=ng(i,t,{})),n[r]=i}return n}class rg{constructor(e){this.spec=e,this.props={},e.props&&ng(e.props,this,this.props),this.key=e.key?e.key.key:og("plugin")}getState(e){return e[this.key]}}const ig=Object.create(null);function og(e){return e in ig?e+"$"+ ++ig[e]:(ig[e]=0,e+"$")}class sg{constructor(e="key"){this.key=og(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ag=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},lg=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let cg=null;const dg=function(e,t,n){let r=cg||(cg=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},ug=function(e,t,n,r){return n&&(hg(e,t,n,r,-1)||hg(e,t,n,r,1))},pg=/^(img|br|input|textarea|hr)$/i;function hg(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:fg(e))){let n=e.parentNode;if(!n||1!=n.nodeType||mg(e)||pg.test(e.nodeName)||"false"==e.contentEditable)return!1;t=ag(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?fg(e):0}}}function fg(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function mg(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const gg=function(e){return e.focusNode&&ug(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function yg(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const vg="undefined"!=typeof navigator?navigator:null,bg="undefined"!=typeof document?document:null,wg=vg&&vg.userAgent||"",xg=/Edge\/(\d+)/.exec(wg),Sg=/MSIE \d/.exec(wg),Cg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(wg),kg=!!(Sg||Cg||xg),_g=Sg?document.documentMode:Cg?+Cg[1]:xg?+xg[1]:0,Ag=!kg&&/gecko\/(\d+)/i.test(wg);Ag&&(/Firefox\/(\d+)/.exec(wg)||[0,0])[1];const Eg=!kg&&/Chrome\/(\d+)/.exec(wg),Og=!!Eg,Tg=Eg?+Eg[1]:0,Dg=!kg&&!!vg&&/Apple Computer/.test(vg.vendor),Mg=Dg&&(/Mobile\/\w+/.test(wg)||!!vg&&vg.maxTouchPoints>2),Ng=Mg||!!vg&&/Mac/.test(vg.platform),Ig=/Android \d/.test(wg),Pg=!!bg&&"webkitFontSmoothing"in bg.documentElement.style,$g=Pg?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Rg(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function qg(e,t){return"number"==typeof e?e:e[t]}function Bg(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Fg(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=lg(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?Rg(o):Bg(e),l=0,c=0;if(t.top<a.top+qg(r,"top")?c=-(a.top-t.top+qg(i,"top")):t.bottom>a.bottom-qg(r,"bottom")&&(c=t.bottom-a.bottom+qg(i,"bottom")),t.left<a.left+qg(r,"left")?l=-(a.left-t.left+qg(i,"left")):t.right>a.right-qg(r,"right")&&(l=t.right-a.right+qg(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function Lg(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=lg(r));return t}function Vg(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let jg=null;function zg(e,t){let n,r,i=2e8,o=0,s=t.top,a=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=dg(l).getClientRects()}for(let d=0;d<e.length;d++){let u=e[d];if(u.top<=s&&u.bottom>=a){s=Math.max(u.bottom,s),a=Math.min(u.top,a);let e=u.left>t.left?u.left-t.left:u.right<t.left?t.left-u.right:0;if(e<i){n=l,i=e,r=e&&3==n.nodeType?{left:u.right<t.left?u.right:u.left,top:t.top}:t,1==l.nodeType&&e&&(o=c+(t.left>=(u.left+u.right)/2?1:0));continue}}!n&&(t.left>=u.right&&t.top>=u.top||t.left>=u.left&&t.top>=u.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let n=Zg(r,1);if(n.top!=n.bottom&&Hg(t,n))return{node:e,offset:i+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:zg(n,r)}function Hg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Ug(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=e.childNodes[o];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(Hg(t,i))return Ug(n,t,i)}}if((o=(o+1)%r)==i)break}return e}function Wg(e,t){let n,r=e.dom.ownerDocument,i=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:i}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:i}=e)}let o,s=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!s||!e.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=e.dom.getBoundingClientRect();if(!Hg(t,n))return null;if(s=Ug(e.dom,t,n),!s)return null}if(Dg)for(let e=s;n&&e;e=lg(e))e.draggable&&(n=void 0);if(s=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(s,t),n){if(Ag&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let e,r=n.childNodes[i];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=function(e,t,n,r){let i=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;i=t.posAfter}}n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,1)}(e,n,i,t))}null==o&&(o=function(e,t,n){let{node:r,offset:i}=zg(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:o,inside:a?a.posAtStart-a.border:-1}}function Zg(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const Kg=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Jg(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=Pg||Ag;if(3==r.nodeType){if(!s||!Kg.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,Gg(Zg(dg(r,e,t),1),o<0)}{let e=Zg(dg(r,i,i),n);if(Ag&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Zg(dg(r,i-1,i-1),-1);if(t.top==e.top){let n=Zg(dg(r,i,i+1),-1);if(n.top!=e.top)return Gg(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==fg(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return Yg(e.getBoundingClientRect(),!1)}if(null==o&&i<fg(r)){let e=r.childNodes[i];if(1==e.nodeType)return Yg(e.getBoundingClientRect(),!0)}return Yg(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==fg(r))){let e=r.childNodes[i-1],t=3==e.nodeType?dg(e,fg(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return Gg(Zg(t,1),!1)}if(null==o&&i<fg(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?dg(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return Gg(Zg(t,-1),!0)}return Gg(Zg(3==r.nodeType?dg(r):r,-n),n>=0)}function Gg(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Yg(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Xg(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const Qg=/[\u0590-\u08ac]/;let ey=null,ty=null,ny=!1;class ry{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>ag(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],o=t+i.size;if(o>e||i instanceof dy){r=e-t;break}t=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof iy&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?ag(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?ag(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&e<=a){let i=o+n.border;if(e>=i&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=ag(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=ag(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((Ag||Dg)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(s=a={node:t.parentNode,offset:ag(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(Ag&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&Dg)&&ug(s.node,s.offset,l.anchorNode,l.anchorOffset)&&ug(a.node,a.offset,l.focusNode,l.focusOffset))return;let d=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),d=!0}catch(e){}}if(!d){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s)return this.dirty=e==n||t==o?2:1,void(e!=r||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class iy extends ry{constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class oy extends ry{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class sy extends ry{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],o=i&&i(t,r,n);return o&&o.dom||(o=Gf.renderSpec(document,t.type.spec.toDOM(t,n))),new sy(e,t,o.dom,o.contentDOM||o.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=sy.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;t<o&&(i=Cy(i,t,o,n)),e>0&&(i=Cy(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}}class ay extends ry{constructor(e,t,n,r,i,o,s,a,l){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,o&&this.updateChildren(a,l)}static create(e,t,n,r,i,o){let s,a=i.nodeViews[t.type.name],l=a&&a(t,i,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:o),n,r),c=l&&l.dom,d=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:d}=Gf.renderSpec(document,t.type.spec.toDOM(t)));d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let u=c;return c=vy(c,n,t),l?s=new uy(e,t,n,r,c,d||null,u,l,i,o+1):t.isText?new cy(e,t,n,r,c,u,i):new ay(e,t,n,r,c,d||null,u,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Wh.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&by(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new xy(this,o&&o.node,e);!function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<i.length&&i[s].to==o){let e,t=i[s++];for(;s<i.length&&i[s].to==o;)(e||(e=[t])).push(i[s++]);if(e){e.sort(Sy);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let d,u;if(l)u=-1,d=l,l=null;else{if(!(c<e.childCount))break;u=c,d=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=o&&a.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let p=o+d.nodeSize;if(d.isText){let e=p;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=d.cut(e-o),d=d.cut(0,e-o),p=e,u=-1)}let h=d.isInline&&!d.isLeaf?a.filter((e=>!e.inline)):a.slice();r(d,h,t.forChild(o,d),u),o=p}}(this.node,this.innerDeco,((t,i,o)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Gh.none:this.node.child(i).marks,n,e),a.placeWidget(t,e,r)}),((t,o,l,c)=>{let d;a.syncToMarks(t.marks,n,e),a.findNodeMatch(t,o,l,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(d=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(t,o,l,d,e)||a.updateNextNode(t,o,l,e,c)||a.addNode(t,o,l,e,r),r+=t.nodeSize})),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(e,o),py(this.contentDOM,this.children,e),Mg&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof jm)||n<t||r>t+this.node.content.size)return null;let i=e.domSelectionRange(),o=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=fg(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,i=function(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;l+=t.text}if(o>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new oy(this,i,t,r);e.input.compositionNodes.push(o),this.children=Cy(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(by(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=gy(this.dom,this.nodeDOM,my(this.outerDeco,this.node,t),my(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ly(e,t,n,r,i){return vy(r,t,e),new ay(void 0,e,t,n,r,r,r,i,0)}class cy extends ay{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new cy(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class dy extends ry{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class uy extends ay{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function py(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=wy(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof sy){let t=r?r.previousSibling:e.lastChild;py(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=wy(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const hy=function(e){e&&(this.nodeName=e)};hy.prototype=Object.create(null);const fy=[new hy];function my(e,t,n){if(0==e.length)return fy;let r=n?fy[0]:new hy,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new hy(s.nodeName));for(let e in s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new hy(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}}return i}function gy(e,t,n,r){if(n==fy&&r==fy)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||(t=document.createElement(o.nodeName),t.pmIsDeco=!0,t.appendChild(i),s=fy[0]),i=t}yy(i,s||fy[0],o)}return i}function yy(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function vy(e,t,n){return gy(e,e,fy,my(t,n,1!=e.nodeType))}function by(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function wy(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class xy{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof sy)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[i])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=sy.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(e,t,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0||(this.destroyBetween(this.index,o),this.index++,0))}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,i){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof ay){let a=this.preMatch.matched.get(s);if(null!=a&&a!=i)return!1;let l=s.dom;if((!this.lock||!(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))||e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&3!=s.dirty&&by(t,s.outerDeco))&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,i){this.top.children.splice(this.index++,0,ay.create(this.top,e,t,n,r,i)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new iy(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof sy;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof cy)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Dg||Og)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new dy(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function Sy(e,t){return e.type.side-t.type.side}function Cy(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,d=a+=l.size;c>=n||d<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function ky(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(gg(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&Hm.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==fg(e);r||i;){if(e==n)return!0;let t=ag(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==fg(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Hm(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}return l||(l=Iy(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!o?1:-1)),l}function _y(e){return e.editable?e.hasFocus():$y(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ay(e,t=!1){let n=e.state.selection;if(My(e,n),_y(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Og){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&ug(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,ag(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&kg&&_g<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,{anchor:o,head:s}=n;!Ey||n instanceof jm||(n.$from.parent.inlineContent||(r=Oy(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Oy(e,n.to))),e.docView.setSelection(o,s,e.root,t),Ey&&(r&&Dy(r),i&&Dy(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{_y(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ey=Dg||Og&&Tg<63;function Oy(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Dg&&i&&"false"==i.contentEditable)return Ty(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return Ty(i);if(o)return Ty(o)}}function Ty(e){return e.contentEditable="true",Dg&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Dy(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function My(e,t){if(t instanceof Hm){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ny(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ny(e)}function Ny(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Iy(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||jm.between(t,n,r)}function Py(e){return!(e.editable&&!e.hasFocus())&&$y(e)}function $y(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Ry(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Bm.findFrom(o,t)}function qy(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function By(e,t,n){let r=e.state.selection;if(!(r instanceof jm)){if(r instanceof Hm&&r.node.isInline)return qy(e,new jm(t>0?r.$to:r.$from));{let n=Ry(e.state,t);return!!n&&qy(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Ry(e.state,t);return!!(n&&n instanceof Hm)&&qy(e,n)}if(!(Ng&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Hm.isSelectable(o)?qy(e,new Hm(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!Pg&&qy(e,new jm(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function Fy(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ly(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Vy(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ag&&1==n.nodeType&&r<Fy(n)&&Ly(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Ly(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(zy(n))break;{let t=n.previousSibling;for(;t&&Ly(t);)i=n.parentNode,o=ag(t),t=t.previousSibling;if(t)n=t,r=Fy(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Hy(e,n,r):i&&Hy(e,i,o)}function jy(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=Fy(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Ly(n.childNodes[r]))break;i=n,o=++r}else{if(zy(n))break;{let t=n.nextSibling;for(;t&&Ly(t);)i=t.parentNode,o=ag(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=Fy(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&Hy(e,i,o)}function zy(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Hy(e,t,n){let r=e.domSelection();if(gg(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&Ay(e)}),50)}function Uy(e,t,n){let r=e.state.selection;if(r instanceof jm&&!r.empty||n.indexOf("s")>-1)return!1;if(Ng&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Ry(e.state,t);if(n&&n instanceof Hm)return qy(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof Wm?Bm.near(n,t):Bm.findFrom(n,t);return!!s&&qy(e,s)}return!1}function Wy(e,t){if(!(e.state.selection instanceof jm))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function Zy(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ky(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Gf.fromSchema(e.state.schema),a=iv(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,d=l.firstChild,u=0;for(;d&&1==d.nodeType&&(c=nv[d.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),u++}d=l.firstChild}d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${i} ${o}${u?` -${u}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:l,text:p}}function Jy(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(n=>{t=n(t,a||r,e)})),a)return t?new Xh(Wh.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Xh.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,i,r,e)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Gf.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),o=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=iv().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);if((n=i&&nv[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),Pg&&function(e){let t=e.querySelectorAll(Og?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=o.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;o=e}if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||qf.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!d),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Gy.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(d)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=Wh.from(t.create(n[e+1],i)),o++,s++}return new Xh(i,o,s)}(tv(s,+d[1],+d[2]),d[4]);else if(s=Xh.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&Xy(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=Qy(o[o.length-1],r.length));let t=Yy(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return Wh.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=tv(s,e,t)}return e.someProp("transformPasted",(t=>{s=t(s,e)})),s}const Gy=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Yy(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Wh.from(e));return e}function Xy(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=Xy(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Wh.from(Yy(n,e,i+1))))}}function Qy(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,Qy(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Wh.empty,!0);return e.copy(n.append(r))}function ev(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=ev(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Wh.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function tv(e,t,n){return t<e.openStart&&(e=new Xh(ev(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Xh(ev(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const nv={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let rv=null;function iv(){return rv||(rv=document.implementation.createHTMLDocument("title"))}const ov={},sv={},av={touchstart:!0,touchmove:!0};class lv{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function cv(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function dv(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>uv(e,t))}))}function uv(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function pv(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function hv(e){return{left:e.clientX,top:e.clientY}}function fv(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function mv(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function gv(e,t,n,r){return fv(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function yv(e,t,n,r){return fv(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(mv(e,jm.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),o=i.before(t);if(n.inlineContent)mv(e,jm.create(r,o+1,o+1+n.content.size),"pointer");else{if(!Hm.isSelectable(n))continue;mv(e,Hm.create(r,o),"pointer")}return!0}}(e,n,r)}function vv(e){return _v(e)}sv.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!xv(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Ig||!Og||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Mg||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||function(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Ng&&72==n&&"c"==r?Wy(e,-1)||Vy(e):46==n||Ng&&68==n&&"c"==r?Wy(e,1)||jy(e):13==n||27==n||(37==n||Ng&&66==n&&"c"==r?By(e,-1,r)||Vy(e):39==n||Ng&&70==n&&"c"==r?By(e,1,r)||jy(e):38==n||Ng&&80==n&&"c"==r?Uy(e,-1,r)||Vy(e):40==n||Ng&&78==n&&"c"==r?function(e){if(!Dg||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Zy(e,n,"true"),setTimeout((()=>Zy(e,n,"false")),20)}return!1}(e)||Uy(e,1,r)||jy(e):r==(Ng?"m":"c")&&(66==n||73==n||89==n||90==n))}(e,n)?n.preventDefault():cv(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,yg(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},sv.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},sv.keypress=(e,t)=>{let n=t;if(xv(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ng&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof jm&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const bv=Ng?"metaKey":"ctrlKey";ov.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=vv(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[bv]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(hv(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new wv(e,s,n,!!r)):("doubleClick"==o?gv:yv)(e,s.pos,s.inside,n)?n.preventDefault():cv(e,"pointer"))};class wv{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[bv],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Hm&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ag||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),cv(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Ay(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(hv(e))),this.updateAllowDefault(e),this.allowDefault||!t?cv(this.view,"pointer"):function(e,t,n,r,i){return fv(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof Hm&&(n=i.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(Hm.isSelectable(t)){r=n&&i.$from.depth>0&&e>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(e);break}}return null!=r&&(mv(e,Hm.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Hm.isSelectable(r))&&(mv(e,new Hm(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Dg&&this.mightDrag&&!this.mightDrag.node.isAtom||Og&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(mv(this.view,Bm.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):cv(this.view,"pointer")}move(e){this.updateAllowDefault(e),cv(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function xv(e,t){return!!e.composing||!!(Dg&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ov.touchstart=e=>{e.input.lastTouch=Date.now(),vv(e),cv(e,"pointer")},ov.touchmove=e=>{e.input.lastTouch=Date.now(),cv(e,"pointer")},ov.contextmenu=e=>vv(e);const Sv=Ig?5e3:-1;function Cv(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>_v(e)),t))}function kv(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function _v(e,t=!1){if(!(Ig&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),kv(e),t||e.docView&&e.docView.dirty){let t=ky(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}sv.compositionstart=sv.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),_v(e,!0),e.markCursor=null;else if(_v(e),Ag&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}Cv(e,Sv)},sv.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Cv(e,20))};const Av=kg&&_g<15||Mg&&$g<604;function Ev(e,t,n,r){let i=Jy(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||Xh.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ov.copy=sv.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=Av?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Ky(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},sv.paste=(e,t)=>{let n=t;if(e.composing&&!Ig)return;let r=Av?null:n.clipboardData;r&&Ev(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ev(e,r.value,null,t):Ev(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Ov{constructor(e,t){this.slice=e,this.move=t}}const Tv=Ng?"altKey":"ctrlKey";ov.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(hv(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof Hm?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Hm.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Hm.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=Ky(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Av?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Av||n.dataTransfer.setData("text/plain",l),e.dragging=new Ov(s,!n[Tv])},ov.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},sv.dragover=sv.dragenter=(e,t)=>t.preventDefault(),sv.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(hv(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",(t=>{s=t(s,e)})):s=Jy(e,n.dataTransfer.getData(Av?"Text":"text/plain"),Av?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[Tv]);if(e.someProp("handleDrop",(t=>t(e,n,s||Xh.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?Sm(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let d=c.mapping.map(l),u=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(u?c.replaceRangeWith(d,d,s.content.firstChild):c.replaceRange(d,d,s),c.doc.eq(p))return;let h=c.doc.resolve(d);if(u&&Hm.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Hm(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(Iy(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},ov.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ay(e)}),20))},ov.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ov.beforeinput=(e,t)=>{if(Og&&Ig&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,yg(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in sv)ov[e]=sv[e];function Dv(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Mv{constructor(e,t){this.toDOM=e,this.spec=t||Rv,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new Pv(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Mv&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Dv(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Nv{constructor(e,t){this.attrs=e,this.spec=t||Rv}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Pv(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Nv&&Dv(this.attrs,e.attrs)&&Dv(this.spec,e.spec)}static is(e){return e.type instanceof Nv}destroy(){}}class Iv{constructor(e,t){this.attrs=e,this.spec=t||Rv}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Pv(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof Iv&&Dv(this.attrs,e.attrs)&&Dv(this.spec,e.spec)}destroy(){}}class Pv{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Pv(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Pv(e,e,new Mv(t,n))}static inline(e,t,n,r){return new Pv(e,t,new Nv(n,r))}static node(e,t,n,r){return new Pv(e,t,new Iv(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Nv}}const $v=[],Rv={};class qv{constructor(e,t){this.local=e.length?e:$v,this.children=t.length?t:$v}static create(e,t){return t.length?zv(t,e,0,Rv):Bv}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==Bv||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Rv)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,o,s)=>{let l=s-o-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let d=a[s]+t-r;n>=d?a[s+1]=e<=d?-2:-1:o>=i&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+o),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let u=n.map(e[t+1]+o,-1)-i,{index:p,offset:h}=r.content.findIndex(d),f=r.maybeChild(p);if(f&&h==d&&h+f.nodeSize==u){let r=a[t+2].mapInner(n,f,c+1,e[t]+o+1,s);r!=Bv?(a[t]=d,a[t+1]=u,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+o+1);return n}(a,e,t,n,i,o,s),c=zv(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new qv(t.sort(Hv),a)}(this.children,o||[],e,t,n,r,i):o?new qv(o.sort(Hv),$v):Bv}add(e,t){return t.length?this==Bv?qv.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=Vv(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,zv(s,e,a+1,Rv)),i+=3}}));let o=Lv(i?jv(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new qv(o.length?this.local.concat(o).sort(Hv):this.local,r||this.children)}remove(e){return 0==e.length||this==Bv?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=Bv?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new qv(r,n):Bv}forChild(e,t){if(this==Bv)return this;if(t.isLeaf)return qv.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof Nv){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new qv(r.sort(Hv),$v);return n?new Fv([e,n]):e}return n||Bv}eq(e){if(this==e)return!0;if(!(e instanceof qv)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Uv(this.localsInner(e))}localsInner(e){if(this==Bv)return $v;if(e.inlineContent||!this.local.some(Nv.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Nv||t.push(this.local[e]);return t}}qv.empty=new qv([],[]),qv.removeOverlap=Uv;const Bv=qv.empty;class Fv{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,Rv)));return Fv.from(n)}forChild(e,t){if(t.isLeaf)return qv.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=Bv&&(i instanceof Fv?n=n.concat(i.members):n.push(i))}return Fv.from(n)}eq(e){if(!(e instanceof Fv)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?Uv(n?t:t.sort(Hv)):$v}static from(e){switch(e.length){case 0:return Bv;case 1:return e[0];default:return new Fv(e.every((e=>e instanceof qv))?e:e.reduce(((e,t)=>e.concat(t instanceof qv?t:t.members)),[]))}}}function Lv(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Pv(i.from+t,i.to+t,i.type))}return n}function Vv(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}function jv(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function zv(e,t,n,r){let i=[],o=!1;t.forEach(((t,s)=>{let a=Vv(e,t,s+n);if(a){o=!0;let e=zv(a,t,n+s+1,r);e!=Bv&&i.push(s,s+t.nodeSize,e)}}));let s=Lv(o?jv(e):e,-n).sort(Hv);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new qv(s,i):Bv}function Hv(e,t){return e.from-t.from||e.to-t.to}function Uv(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),Wv(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),Wv(t,i+1,o.copy(r.to,o.to)))}}return t}function Wv(e,t,n){for(;t<e.length&&Hv(n,e[t])>0;)t++;e.splice(t,0,n)}function Zv(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=Bv&&t.push(r)})),e.cursorWrapper&&t.push(qv.create(e.state.doc,[e.cursorWrapper.deco])),Fv.from(t)}const Kv={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Jv=kg&&_g<=11;class Gv{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Yv{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Gv,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);kg&&_g<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Jv&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Kv)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Py(this.view)){if(this.suppressingSelectionUpdates)return Ay(this.view);if(kg&&_g<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ug(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let t=e.focusNode;t;t=lg(t))n.add(t);for(let r=e.anchorNode;r;r=lg(r))if(n.has(r)){t=r;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Py(e)&&!this.ignoreSelectionChange(n),i=-1,o=-1,s=!1,a=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],a);n&&(i=i<0?n.from:Math.min(n.from,i),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(s=!0))}if(Ag&&a.length>1){let e=a.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let l=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch<Date.now()-300&&gg(n)&&(l=ky(e))&&l.eq(Bm.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ay(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,o),function(e){if(!Xv.has(e)&&(Xv.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=Ag,Qv)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Qv=!0}}(e)),this.handleDOMChange(i,o,s,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ay(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(kg&&_g<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:o}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(e.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==e.target?ag(r)+1:0,s=n.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?ag(i):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let Xv=new WeakMap,Qv=!1;function eb(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Dg&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||Dg&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function tb(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Iy(e,t.resolve(n.anchor),t.resolve(n.head))}function nb(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}class rb{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new lv,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(lb),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=sb(this),ob(this),this.nodeViews=ab(this),this.docView=ly(this.state.doc,ib(this),Zv(this),this.dom,this),this.domObserver=new Yv(this,((e,t,n,r)=>function(e,t,n,r,i){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=ky(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a,l,c=e.state.selection,d=function(e,t,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelectionRange(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],gg(c)||r.push({node:c.focusNode,offset:c.focusOffset})),Og&&8===e.input.lastKeyCode)for(let e=s;e>o;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let u=e.state.doc,p=e.someProp("domParser")||qf.fromSchema(e.state.schema),h=u.resolve(a),f=null,m=p.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:eb,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,n),u=e.state.doc,p=u.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(a=e.state.selection.to,l="end"):(a=e.state.selection.from,l="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==i&&(r-=s+Math.max(0,o-Math.min(s,a))-o),s<o&&e.size<t.size?(o-=r<=o&&r>=s?o-r:0,a=o+(a-s),s=o):a<o&&(o-=r<=o&&r>=a?o-r:0,s=o+(s-a),a=o),{start:o,endA:s,endB:a}}(p.content,d.doc.content,d.from,a,l);if((Mg&&e.input.lastIOSEnter>Date.now()-225||Ig)&&i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName||"LI"==e.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,yg(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&c instanceof jm&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let t=tb(e,e.state.doc,d.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}h={start:c.from,endA:c.to,endB:c.to}}if(Og&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from&&d.sel.head==d.sel.anchor){let e=h.endB-h.start;d.sel={anchor:d.sel.anchor+e,head:d.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof jm&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),kg&&_g<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>d.from&&" "==d.doc.textBetween(h.start-d.from-1,h.start-d.from+1)&&(h.start--,h.endA--,h.endB--);let f,m=d.doc.resolveNoCache(h.start-d.from),g=d.doc.resolveNoCache(h.endB-d.from),y=u.resolve(h.start),v=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=h.endA;if((Mg&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!v&&m.pos<d.doc.content.size&&(f=Bm.findFrom(d.doc.resolve(m.pos+1),1,!0))&&f.head==g.pos)&&e.someProp("handleKeyDown",(t=>t(e,yg(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||nb(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(nb(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||nb(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(u,h.start,h.endA,m,g)&&e.someProp("handleKeyDown",(t=>t(e,yg(8,"Backspace")))))return void(Ig&&Og&&e.domObserver.suppressSelectionUpdates());Og&&Ig&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),Ig&&!v&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==h.endA&&(h.endB-=2,g=d.doc.resolveNoCache(h.endB-d.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,yg(13,"Enter"))}))}),20));let b,w,x,S=h.start,C=h.endA;if(v)if(m.pos==g.pos)kg&&_g<=11&&0==m.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ay(e)),20)),b=e.state.tr.delete(S,C),w=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&(x=function(e,t){let n,r,i,o=e.firstChild.marks,s=t.firstChild.marks,a=o,l=s;for(let e=0;e<s.length;e++)a=s[e].removeFromSet(a);for(let e=0;e<o.length;e++)l=o[e].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(i(t.child(e)));if(Wh.from(c).eq(e))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))b=e.state.tr,"add"==x.type?b.addMark(S,C,x.mark):b.removeMark(S,C,x.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let t=m.parent.textBetween(m.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,S,C,t))))return;b=e.state.tr.insertText(t,S,C)}if(b||(b=e.state.tr.replace(S,C,d.doc.slice(h.start-d.from,h.endB-d.from))),d.sel){let t=tb(e,b.doc,d.sel);t&&!(Og&&Ig&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==S||t.head==b.mapping.map(C)-1)||kg&&t.empty&&t.head==S)&&b.setSelection(t)}w&&b.ensureMarks(w),e.dispatch(b.scrollIntoView())}(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in ov){let n=ov[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!pv(e,t)||uv(e,t)||!e.editable&&t.type in sv||n(e,t)},av[t]?{passive:!0}:void 0)}Dg&&e.dom.addEventListener("input",(()=>null)),dv(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&dv(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(lb),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(kv(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=ab(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&dv(this),this.editable=sb(this),ob(this);let s=Zv(this),a=ib(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(i=!0);let d="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:Lg(e.dom)}}(this);if(i){this.domObserver.stop();let t=c&&(kg||Og)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=Og?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(e.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ly(e.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return ug(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Ay(this,t):(My(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Vg(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof Hm){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&Fg(this,t.getBoundingClientRect(),e)}else Fg(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[e];if(null!=i&&(n=t?t(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[e];if(null!=o&&(n=t?t(o):o))return n}}hasFocus(){if(kg){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(jg)return e.focus(jg);let t=Lg(e);e.focus(null==jg?{get preventScroll(){return jg={preventScroll:!0},!0}}:void 0),jg||(jg=!1,Vg(t,0))}(this.dom),Ay(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return Wg(this,e)}coordsAtPos(e,t=1){return Jg(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return ey==t&&ty==n?ny:(ey=t,ty=n,ny="up"==n||"down"==n?function(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return Xg(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=Jg(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=dg(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return Qg.test(r.parent.textContent)&&a.modify?Xg(e,t,(()=>{let{focusNode:t,focusOffset:i,anchorNode:o,anchorOffset:s}=e.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:d,focusOffset:u}=e.domSelectionRange(),p=d&&!c.contains(1==d.nodeType?d:d.parentNode)||t==d&&i==u;try{a.collapse(o,s),t&&(t!=o||i!=s)&&a.extend&&a.extend(t,i)}catch(e){}return null!=l&&(a.caretBidiLevel=l),p})):"left"==n||"backward"==n?o:s}(e,t,n))}(this,t||this.state,e)}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Zv(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){uv(e,t)||!ov[t.type]||!e.editable&&t.type in sv||ov[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return Dg&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function(e){let t;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return ug(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function ib(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[Pv.node(0,e.state.doc.content.size,t)]}function ob(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Pv.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function sb(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function ab(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function lb(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}function cb(e={}){return new rg({view:t=>new db(t,e)})}class db{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=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=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(t){let i=t.getBoundingClientRect(),o=n?i.bottom:i.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:i.left,right:i.right,top:o-this.width/2,bottom:o+this.width/2}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!i||i==document.body&&"static"==getComputedStyle(i).position)n=-pageXOffset,r=-pageYOffset;else{let e=i.getBoundingClientRect();n=e.left-i.scrollLeft,r=e.top-i.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"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&&(e=Sm(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}for(var ub={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:"'"},pb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},hb="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),fb=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),mb="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),gb=fb||hb&&+hb[1]<57,yb=0;yb<10;yb++)ub[48+yb]=ub[96+yb]=String(yb);for(yb=1;yb<=24;yb++)ub[yb+111]="F"+yb;for(yb=65;yb<=90;yb++)ub[yb]=String.fromCharCode(yb+32),pb[yb]=String.fromCharCode(yb);for(var vb in ub)pb.hasOwnProperty(vb)||(pb[vb]=ub[vb]);const bb="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function wb(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))throw new Error("Unrecognized modifier name: "+s);bb?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function xb(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function Sb(e){return new rg({props:{handleKeyDown:Cb(e)}})}function Cb(e){let t=function(e){let t=Object.create(null);for(let n in e)t[wb(n)]=e[n];return t}(e);return function(e,n){let r,i=function(e){var t=!(gb&&(e.ctrlKey||e.altKey||e.metaKey)||mb&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?pb:ub)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),o=1==i.length&&" "!=i,s=t[xb(i,n,!o)];if(s&&s(e.state,e.dispatch,e))return!0;if(o&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=ub[n.keyCode])&&r!=i){let i=t[xb(r,n,!0)];if(i&&i(e.state,e.dispatch,e))return!0}else if(o&&n.shiftKey){let r=t[xb(i,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}class kb extends Bm{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return kb.valid(n)?new kb(n):Bm.near(n)}content(){return Xh.empty}eq(e){return e instanceof kb&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new kb(e.resolve(t.pos))}getBookmark(){return new _b(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)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}else if(r.type.spec.isolating)return!0}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)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}else if(r.type.spec.isolating)return!0}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){e:for(;;){if(!n&&kb.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(kb.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!Hm.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(kb.valid(s))return s}return null}}}kb.prototype.visible=!1,kb.findFrom=kb.findGapCursorFrom,Bm.jsonID("gapcursor",kb);class _b{constructor(e){this.pos=e}map(e){return new _b(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return kb.valid(t)?new kb(t):Bm.near(t)}}const Ab=Cb({ArrowLeft:Eb("horiz",-1),ArrowRight:Eb("horiz",1),ArrowUp:Eb("vert",-1),ArrowDown:Eb("vert",1)});function Eb(e,t){const 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,a=o.empty;if(o instanceof jm){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=kb.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new kb(l))),!0)}}function Ob(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!kb.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&Hm.isSelectable(e.state.doc.nodeAt(i.inside))||(e.dispatch(e.state.tr.setSelection(new kb(r))),0))}function Tb(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof kb))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=Wh.empty;for(let e=r.length-1;e>=0;e--)i=Wh.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Xh(i,0,0));return o.setSelection(jm.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function Db(e){if(!(e.selection instanceof kb))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",qv.create(e.doc,[Pv.widget(e.selection.head,t,{key:"gapcursor"})])}const Mb=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Nb(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function Ib(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 Pb(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}function $b(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Rb=(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),o=n.indexAfter(-1),s=$b(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(Bm.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0};function qb(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!i.isTextblock&&!xm(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=t.pos+s.nodeSize,a=Wh.empty;for(let e=r.length-1;e>=0;e--)a=Wh.from(r[e].create(null,a));a=Wh.from(o.copy(a));let l=e.tr.step(new fm(t.pos-1,i,t.pos,i,new Xh(a,1,0),r.length,!0)),c=i+2*r.length;xm(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=Bm.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),d=c&&ym(c);if(null!=d&&d>=t.depth)return n&&n(e.tr.lift(c,d).scrollIntoView()),!0;if(a&&Nb(s,"start",!0)&&Nb(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=Wh.empty;for(let e=i.length-1;e>=0;e--)r=Wh.from(i[e].copy(r));n(e.tr.step(new fm(t.pos-i.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new Xh(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Bb(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(jm.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const Fb=Bb(-1),Lb=Bb(1);function Vb(e,t=null){return function(n,r){let{from:i,to:o}=n.selection,s=!1;return n.doc.nodesBetween(i,o,((r,i)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(i),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,o,e,t).scrollIntoView()),!0)}}function jb(e,t=null){return function(n,r){let{empty:i,$cursor:o,ranges:s}=n.selection;if(i&&!o||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:i,$to:o}=t[r],s=0==i.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,o.pos,(e=>{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(o)e.isInSet(n.storedMarks||o.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let i=!1,o=n.tr;for(let t=0;!i&&t<s.length;t++){let{$from:r,$to:o}=s[t];i=n.doc.rangeHasMark(r.pos,o.pos,e)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(i)o.removeMark(r.pos,a.pos,e);else{let n=r.pos,i=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,d=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<i&&(n+=c,i-=d),o.addMark(n,i,e.create(t))}}r(o.scrollIntoView())}return!0}}function zb(...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 Hb=zb(Mb,((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=Ib(r);if(!i){let n=r.blockRange(),i=n&&ym(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&qb(e,i,t))return!0;if(0==r.parent.content.size&&(Nb(o,"end")||Hm.isSelectable(o))){let n=Cm(e.doc,r.before(),r.after(),Xh.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Nb(o,"end")?Bm.findFrom(r.doc.resolve(r.mapping.map(i.pos,-1)),-1):Hm.create(r.doc,i.pos-o.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),0))}),((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=Ib(r)}let s=o&&o.nodeBefore;return!(!s||!Hm.isSelectable(s)||(t&&t(e.tr.setSelection(Hm.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),0))})),Ub=zb(Mb,((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let i=Pb(r);if(!i)return!1;let o=i.nodeAfter;if(qb(e,i,t))return!0;if(0==r.parent.content.size&&(Nb(o,"start")||Hm.isSelectable(o))){let n=Cm(e.doc,r.before(),r.after(),Xh.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Nb(o,"start")?Bm.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Hm.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),0))}),((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=Pb(r)}let s=o&&o.nodeAfter;return!(!s||!Hm.isSelectable(s)||(t&&t(e.tr.setSelection(Hm.create(e.doc,o.pos)).scrollIntoView()),0))}));const Wb={Enter:zb(((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))}),((e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Wm||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=$b(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(n,o.createAndFill());s.setSelection(jm.create(s.doc,n+1)),t(s.scrollIntoView())}return!0}),((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 r=n.before();if(wm(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&ym(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)}),((e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof Hm&&e.selection.node.isBlock)return!(!n.parentOffset||!wm(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let i=r.parentOffset==r.parent.content.size,o=e.tr;(e.selection instanceof jm||e.selection instanceof Wm)&&o.deleteSelection();let s=0==n.depth?null:$b(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=wm(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!wm(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let e=o.mapping.map(n.before()),t=o.doc.resolve(e);s&&n.node(-1).canReplaceWith(t.index(),t.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}t(o.scrollIntoView())}return!0})),"Mod-Enter":Rb,Backspace:Hb,"Mod-Backspace":Hb,"Shift-Backspace":Hb,Delete:Ub,"Mod-Delete":Ub,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new Wm(e.doc))),!0)},Zb={"Ctrl-h":Wb.Backspace,"Alt-Backspace":Wb["Mod-Backspace"],"Ctrl-d":Wb.Delete,"Ctrl-Alt-Backspace":Wb["Mod-Delete"],"Alt-Delete":Wb["Mod-Delete"],"Alt-d":Wb["Mod-Delete"],"Ctrl-a":Fb,"Ctrl-e":Lb};for(let e in Wb)Zb[e]=Wb[e];const Kb=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?Zb:Wb;class Jb{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,i){let o=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);o+=t[0].slice(e+t[1].length);let n=(r+=e)-i;n>0&&(o=t[0].slice(e-n,e)+o,r=i)}return e.tr.insertText(o,r,i)}):t}}const Gb=500;function Yb({rules:e}){let t=new rg({state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,i,o)=>Xb(n,r,i,o,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&Xb(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function Xb(e,t,n,r,i,o){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-Gb),a.parentOffset,null,"")+r;for(let a=0;a<i.length;a++){let c=i[a].match.exec(l),d=c&&i[a].handler(s,c,t-(c[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(o,{transform:d,from:t,to:n,text:r})),!0}return!1}const Qb=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i,o=n[r];if(o.spec.isInputRules&&(i=o.getState(e))){if(t){let n=e.tr,r=i.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(i.text){let t=n.doc.resolve(i.from).marks();n.replaceWith(i.from,i.to,e.schema.text(i.text,t))}else n.delete(i.from,i.to);t(n)}return!0}}return!1};function ew(e,t,n=null,r){return new Jb(e,((e,i,o,s)=>{let a=n instanceof Function?n(i):n,l=e.tr.delete(o,s),c=l.doc.resolve(o).blockRange(),d=c&&vm(c,t,a);if(!d)return null;l.wrap(c,d);let u=l.doc.resolve(o-1).nodeBefore;return u&&u.type==t&&xm(l.doc,o-1)&&(!r||r(i,u))&&l.join(o-1),l}))}function tw(e,t){return t?e.createChecked(null,t):e.createAndFill()}function nw(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function rw(e,t){const{from:n,to:r}=e.selection;let i=[];e.doc.nodesBetween(n,r,(e=>{i=[...i,...e.marks]}));const o=i.find((e=>e.type.name===t.name));return o?o.attrs:{}}function iw(e=null,t=null){if(!e||!t)return!1;const n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;const r=n.node.marks.find((e=>e.type===t));if(!r)return!1;let i=e.index(),o=e.start()+n.offset,s=i+1,a=o+n.node.nodeSize;for(;i>0&&r.isInSet(e.parent.child(i-1).marks);)i-=1,o-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&r.isInSet(e.parent.child(s).marks);)a+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:a}}function ow(e,t){const{from:n,to:r}=e.selection;let i=[];e.doc.nodesBetween(n,r,(e=>{i=[...i,e]}));const o=i.reverse().find((e=>e.type.name===t.name));return o?o.attrs:{}}function sw(e,t,n={}){const r=(i=t,function(e){if(function(e){return e instanceof Hm}(e)){const{node:t}=e,{$from:n}=e;if(function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e}(i,t))return{node:t,pos:n.pos,depth:n.depth}}})(e.selection)||nw((e=>e.type===t))(e.selection);var i;return Object.keys(n).length&&r?r.node.hasMarkup(t,{...r.node.attrs,...n}):!!r}new Jb(/--$/,"—"),new Jb(/\.\.\.$/,"…"),new Jb(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Jb(/"$/,"”"),new Jb(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new Jb(/'$/,"’");class aw{constructor(e,{editor:t,extension:n,parent:r,node:i,view:o,decorations:s,getPos:a}){this.component=e,this.editor=t,this.extension=n,this.parent=r,this.node=i,this.view=o,this.decorations=s,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:a,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}createDOM(){const e=vu.extend(this.component),t={editor:this.editor,node:this.node,view:this.view,getPos:()=>this.getPos(),decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:e=>this.updateAttrs(e)};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"==typeof this.extension.update&&(this.update=this.extension.update),this.vm=new e({parent:this.parent,propsData:t}).$mount(),this.vm.$el}update(e,t){return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.updateComponentProps({node:e,decorations:t})),!0)}updateComponentProps(e){if(!this.vm._props)return;const t=vu.config.silent;vu.config.silent=!0,Object.entries(e).forEach((([e,t])=>{this.vm._props[e]=t})),vu.config.silent=t}updateAttrs(e){if(!this.view.editable)return;const{state:t}=this.view,{type:n}=this.node,r=this.getPos(),i={...this.node.attrs,...e},o=this.isMark?t.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(i)):t.tr.setNodeMarkup(r,null,i);this.view.dispatch(o)}ignoreMutation(e){return!("selection"===e.type||this.contentDOM&&this.contentDOM.contains(e.target))}stopEvent(e){if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);const t=!!this.extension.schema.draggable;if(t&&"mousedown"===e.type){const t=e.target.closest&&e.target.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.captureEvents=!1,document.addEventListener("dragend",(()=>{this.captureEvents=!0}),{once:!0}))}const n="copy"===e.type,r="paste"===e.type,i="cut"===e.type,o=e.type.startsWith("drag")||"drop"===e.type;return!(t&&o||n||r||i)&&this.captureEvents}selectNode(){this.updateComponentProps({selected:!0})}deselectNode(){this.updateComponentProps({selected:!1})}getMarkPos(){const e=this.view.posAtDOM(this.dom);return iw(this.view.state.doc.resolve(e),this.node.type)}destroy(){this.vm.$destroy()}}class lw{on(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}emit(e,...t){this._callbacks=this._callbacks||{};const n=this._callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){if(arguments.length){const n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter((e=>e!==t)):delete this._callbacks[e])}else this._callbacks={};return this}}class cw{constructor(e={}){this.options={...this.defaultOptions,...e}}init(){return null}bindEditor(e=null){this.editor=e}get name(){return null}get type(){return"extension"}get defaultOptions(){return{}}get plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class dw{constructor(e=[],t){e.forEach((e=>{e.bindEditor(t),e.init()})),this.extensions=e}get nodes(){return this.extensions.filter((e=>"node"===e.type)).reduce(((e,{name:t,schema:n})=>({...e,[t]:n})),{})}get options(){const{view:e}=this;return this.extensions.reduce(((t,n)=>({...t,[n.name]:new Proxy(n.options,{set(t,n,r){const i=t[n]!==r;return Object.assign(t,{[n]:r}),i&&e.updateState(e.state),!0}})})),{})}get marks(){return this.extensions.filter((e=>"mark"===e.type)).reduce(((e,{name:t,schema:n})=>({...e,[t]:n})),{})}get plugins(){return this.extensions.filter((e=>e.plugins)).reduce(((e,{plugins:t})=>[...e,...t]),[])}keymaps({schema:e}){return[...this.extensions.filter((e=>["extension"].includes(e.type))).filter((e=>e.keys)).map((t=>t.keys({schema:e}))),...this.extensions.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.keys)).map((t=>t.keys({type:e[`${t.type}s`][t.name],schema:e})))].map((e=>Sb(e)))}inputRules({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions;return[...n.filter((e=>["extension"].includes(e.type))).filter((e=>e.inputRules)).map((t=>t.inputRules({schema:e}))),...n.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.inputRules)).map((t=>t.inputRules({type:e[`${t.type}s`][t.name],schema:e})))].reduce(((e,t)=>[...e,...t]),[])}pasteRules({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions;return[...n.filter((e=>["extension"].includes(e.type))).filter((e=>e.pasteRules)).map((t=>t.pasteRules({schema:e}))),...n.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.pasteRules)).map((t=>t.pasteRules({type:e[`${t.type}s`][t.name],schema:e})))].reduce(((e,t)=>[...e,...t]),[])}commands({schema:e,view:t}){return this.extensions.filter((e=>e.commands)).reduce(((n,r)=>{const{name:i,type:o}=r,s={},a=r.commands({schema:e,...["node","mark"].includes(o)?{type:e[`${o}s`][i]}:{}}),l=(e,n)=>!!t.editable&&(t.focus(),e(n)(t.state,t.dispatch,t)),c=(e,t)=>{Array.isArray(t)?s[e]=e=>t.forEach((t=>l(t,e))):"function"==typeof t&&(s[e]=e=>l(t,e))};return"object"==typeof a?Object.entries(a).forEach((([e,t])=>{c(e,t)})):c(i,a),{...n,...s}}),{})}}class uw extends cw{constructor(e={}){super(e)}get type(){return"mark"}get view(){return null}get schema(){return null}command(){return()=>{}}}function pw(e=0,t=0,n=0){return Math.min(Math.max(parseInt(e,10),t),n)}class hw extends cw{constructor(e={}){super(e)}get type(){return"node"}get view(){return null}get schema(){return null}command(){return()=>{}}}class fw extends hw{get name(){return"doc"}get schema(){return{content:"block+"}}}class mw extends hw{get name(){return"paragraph"}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}commands({type:e}){return()=>Vb(e)}}class gw extends hw{get name(){return"text"}get schema(){return{group:"inline"}}}class yw extends lw{constructor(e={}){super(),this.defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},enableDropCursor:!0,enableGapCursor:!0,parseOptions:{},injectCSS:!0,onInit:()=>{},onTransaction:()=>{},onUpdate:()=>{},onFocus:()=>{},onBlur:()=>{},onPaste:()=>{},onDrop:()=>{}},this.events=["init","transaction","update","focus","blur","paste","drop"],this.init(e)}init(e={}){this.setOptions({...this.defaultOptions,...e}),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&function(e){{const e=document.createElement("style");e.type="text/css",e.textContent='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n';const{head:t}=document,{firstChild:n}=t;n?t.insertBefore(e,n):t.appendChild(e)}}(),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((e=>{var t;this.on(e,this.options[(t=`on ${e}`,t.replace(/(?:^\w|[A-Z]|\b\w)/g,((e,t)=>0===t?e.toLowerCase():e.toUpperCase())).replace(/\s+/g,""))]||(()=>{}))})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}setOptions(e){this.options={...this.options,...e},this.view&&this.state&&this.view.updateState(this.state)}get builtInExtensions(){return this.options.useBuiltInExtensions?[new fw,new gw,new mw]:[]}get state(){return this.view?this.view.state:null}createExtensions(){return new dw([...this.builtInExtensions,...this.options.extensions],this)}createPlugins(){return this.extensions.plugins}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createNodes(){return this.extensions.nodes}createMarks(){return this.extensions.marks}createSchema(){return new $f({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return tg.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,Yb({rules:this.inputRules}),...this.pasteRules,...this.keymaps,Sb({Backspace:Qb}),Sb(Kb),...this.options.enableDropCursor?[cb(this.options.dropCursor)]:[],...this.options.enableGapCursor?[new rg({props:{decorations:Db,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&kb.valid(n)?new kb(n):null,handleClick:Ob,handleKeyDown:Ab,handleDOMEvents:{beforeinput:Tb}}})]:[],new rg({key:new sg("editable"),props:{editable:()=>this.options.editable}}),new rg({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,t)=>{this.focused=!0,this.emit("focus",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!0);this.view.dispatch(n)},blur:(e,t)=>{this.focused=!1,this.emit("blur",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!1);this.view.dispatch(n)}}}}),new rg({props:this.options.editorProps})]})}createDocument(e,t=this.options.parseOptions){if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof e)try{return this.schema.nodeFromJSON(e)}catch(t){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",t),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof e){const n=`<div>${e}</div>`,r=(new window.DOMParser).parseFromString(n,"text/html").body.firstElementChild;return qf.fromSchema(this.schema).parse(r,t)}return!1}createView(){return new rb(this.element,{state:this.createState(),handlePaste:(...e)=>{this.emit("paste",...e)},handleDrop:(...e)=>{this.emit("drop",...e)},dispatchTransaction:this.dispatchTransaction.bind(this)})}setParentComponent(e=null){e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[...this.builtInExtensions,...this.options.extensions]})})}initNodeViews({parent:e,extensions:t}){return t.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.view)).reduce(((t,n)=>({...t,[n.name]:(t,r,i,o)=>{const s=n.view;return new aw(s,{editor:this,extension:n,parent:e,node:t,view:r,getPos:i,decorations:o})}})),{})}dispatchTransaction(e){const t=this.state.apply(e);this.view.updateState(t),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emitUpdate(e)}emitUpdate(e){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e})}resolveSelection(e=null){if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){const{doc:e}=this.state;return{from:e.content.size,to:e.content.size}}return{from:e,to:e}}focus(e=null){if(this.view.focused&&null===e||!1===e)return;const{from:t,to:n}=this.resolveSelection(e);this.setSelection(t,n),setTimeout((()=>this.view.focus()),10)}setSelection(e=0,t=0){const{doc:n,tr:r}=this.state,i=pw(e,0,n.content.size),o=pw(t,0,n.content.size),s=jm.create(n,i,o),a=r.setSelection(s);this.view.dispatch(a)}blur(){this.view.dom.blur()}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}getHTML(){const e=document.createElement("div"),t=Gf.fromSchema(this.schema).serializeFragment(this.state.doc.content);return e.appendChild(t),e.innerHTML}getJSON(){return this.state.doc.toJSON()}setContent(e={},t=!1,n){const{doc:r,tr:i}=this.state,o=this.createDocument(e,n),s=jm.create(r,0,r.content.size),a=i.setSelection(s).replaceSelectionWith(o,!1).setMeta("preventUpdate",!t);this.view.dispatch(a)}clearContent(e=!1){this.setContent(this.options.emptyDocument,e)}setActiveNodesAndMarks(){this.activeMarks=Object.entries(this.schema.marks).reduce(((e,[t,n])=>({...e,[t]:(e={})=>function(e,t){const{from:n,$from:r,to:i,empty:o}=e.selection;return o?!!t.isInSet(e.storedMarks||r.marks()):!!e.doc.rangeHasMark(n,i,t)}(this.state,n)})),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce(((e,[t,n])=>({...e,[t]:rw(this.state,n)})),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce(((e,[t,n])=>({...e,[t]:(e={})=>sw(this.state,n,e)})),{})}getMarkAttrs(e=null){return this.activeMarkAttrs[e]}getNodeAttrs(e=null){return{...ow(this.state,this.schema.nodes[e])}}get isActive(){return Object.entries({...this.activeMarks,...this.activeNodes}).reduce(((e,[t,n])=>({...e,[t]:(e={})=>n(e)})),{})}registerPlugin(e=null,t){const n="function"==typeof t?t(e,this.state.plugins):[e,...this.state.plugins],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e=null){if(!e||!this.view.docView)return;const t=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(`${e}$`)))});this.view.updateState(t)}destroy(){this.view&&this.view.destroy()}}var vw={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(e){e&&e.element&&this.$nextTick((()=>{this.$el.appendChild(e.element.firstChild),e.setParentComponent(this)}))}}},render:e=>e("div"),beforeDestroy(){this.editor.element=this.$el}};class bw{constructor({options:e}){this.options=e,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.blurHandler=()=>{this.preventHide?this.preventHide=!1:this.options.editor.emit("menubar:focusUpdate",!1)},this.options.editor.on("blur",this.blurHandler)}handleClick(){this.preventHide=!0}destroy(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("blur",this.blurHandler)}}var ww={props:{editor:{default:null,type:Object}},data:()=>({focused:!1}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick((()=>{var t;e.registerPlugin((t={editor:e,element:this.$el},new rg({key:new sg("menu_bar"),view:e=>new bw({editorView:e,options:t})}))),this.focused=e.focused,e.on("focus",(()=>{this.focused=!0})),e.on("menubar:focusUpdate",(e=>{this.focused=e}))}))}}},render(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor)}):null}};function xw(e,t,n){const r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,Math.max(t,0)),r}function Sw(e,t){const n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function Cw(e,t,n=!1){const{node:r,offset:i}=e.docView.domFromPos(t);let o,s;if(3===r.nodeType)n&&i<r.nodeValue.length?(s=Sw(xw(r,i-1,i),-1),o="right"):i<r.nodeValue.length&&(s=Sw(xw(r,i,i+1),-1),o="left");else if(r.firstChild){if(i<r.childNodes.length){const e=r.childNodes[i];s=Sw(3===e.nodeType?xw(e):e,-1),o="left"}if((!s||s.top===s.bottom)&&i){const e=r.childNodes[i-1];s=Sw(3===e.nodeType?xw(e):e,1),o="right"}}else s=r.getBoundingClientRect(),o="left";const a=s[o];return{top:s.top,bottom:s.bottom,left:a,right:a}}class kw{constructor({options:e,editorView:t}){this.options={element:null,keepInBounds:!0,onUpdate:()=>!1,...e},this.editorView=t,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler)}handleClick(){this.preventHide=!0}update(e,t){const{state:n}=e;if(e.composing)return;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(n.selection.empty)return void this.hide();const{from:r,to:i}=n.selection,o=Cw(e,r),s=Cw(e,i,!0),a=this.options.element.offsetParent;if(!a)return void this.hide();const l=a.getBoundingClientRect(),c=this.options.element.getBoundingClientRect(),d=(o.left+s.left)/2-l.left;this.left=Math.round(this.options.keepInBounds?Math.min(l.width-c.width/2,Math.max(d,c.width/2)):d),this.bottom=Math.round(l.bottom-o.top),this.top=Math.round(s.bottom-l.top),this.isActive=!0,this.sendUpdate()}sendUpdate(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}hide(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}destroy(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}var _w={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:()=>({menu:{isActive:!1,left:0,bottom:0}}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick((()=>{var t;e.registerPlugin((t={editor:e,element:this.$el,keepInBounds:this.keepInBounds,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}},new rg({key:new sg("menu_bubble"),view:e=>new kw({editorView:e,options:t})})))}))}}},render(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy(){this.editor.unregisterPlugin("menu_bubble")}};function Aw(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));return!!o&&(!n||(r.node(o.depth-1).type==e?function(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new fm(o-1,s,o,s,new Xh(Wh.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new mf(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=ym(r);if(null==a)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;return xm(i.doc,l)&&i.join(l),t(i.scrollIntoView()),!0}(t,n,e,o):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,o=n.startIndex;t>o;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),d=o.index(-1);if(!c.canReplace(d+(a?0:1),d+1,s.content.append(l?Wh.empty:Wh.from(i))))return!1;let u=o.pos,p=u+s.nodeSize;return r.step(new fm(u-(a?1:0),p+(l?1:0),u+1,p-1,new Xh((a?Wh.empty:Wh.from(i.copy(Wh.empty))).append(l?Wh.empty:Wh.from(i.copy(Wh.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,o)))}}function Ew(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let r=l.lastChild&&l.lastChild.type==a.type,i=Wh.from(r?e.create():null),s=new Xh(Wh.from(e.create(null,Wh.from(a.type.create(null,i)))),r?3:1,0),c=o.start,d=o.end;n(t.tr.step(new fm(c-(r?3:1),d,c,d,s,1,!0)).scrollIntoView())}return!0}}function Ow(e,t,n){return new Jb(e,((e,r,i,o)=>{const s=n instanceof Function?n(r):n,{tr:a}=e,l=r.length-1;let c=o,d=i;if(r[l]){const n=i+r[0].indexOf(r[l-1]),s=n+r[l-1].length-1,u=n+r[l-1].lastIndexOf(r[l]),p=u+r[l].length,h=function(e,t,n){let r=[];return n.doc.nodesBetween(e,t,((e,t)=>{r=[...r,...e.marks.map((n=>({start:t,end:t+e.nodeSize,mark:n})))]})),r}(i,o,e).filter((e=>{const{excluded:n}=e.mark.type;return n.find((e=>e.name===t.name))})).filter((e=>e.end>n));if(h.length)return!1;p<s&&a.delete(p,s),u>n&&a.delete(n,u),d=n,c=d+r[l].length}return a.addMark(d,c,t.create(s)),a.removeStoredMark(t),a}))}function Tw(e,t,n){return new Jb(e,((e,r,i,o)=>{const s=n instanceof Function?n(r):n,{tr:a}=e;return r[0]&&a.replaceWith(i-1,o,t.create(s)),a}))}function Dw(e,t,n){const r=i=>{const o=[];return i.forEach((i=>{if(i.isText){const{text:r}=i;let s,a=0;do{if(s=e.exec(r),s){const e=s.index,r=e+s[0].length,l=n instanceof Function?n(s[0]):n;e>0&&o.push(i.cut(a,e)),o.push(i.cut(e,r).mark(t.create(l).addToSet(i.marks))),a=r}}while(s);a<r.length&&o.push(i.cut(a))}else o.push(i.copy(r(i.content)))})),Wh.fromArray(o)};return new rg({props:{transformPasted:e=>new Xh(r(e.content),e.openStart,e.openEnd)}})}function Mw(e,t,n){const r=(i,o)=>{const s=[];return i.forEach((i=>{if(i.isText){const{text:r,marks:a}=i;let l,c=0;const d=!!a.filter((e=>"link"===e.type.name))[0];for(;!d&&null!==(l=e.exec(r));)if(o&&o.type.allowsMarkType(t)&&l[1]){const e=l.index,r=e+l[0].length,o=e+l[0].indexOf(l[1]),a=o+l[1].length,d=n instanceof Function?n(l):n;e>0&&s.push(i.cut(c,e)),s.push(i.cut(o,a).mark(t.create(d).addToSet(i.marks))),c=r}c<r.length&&s.push(i.cut(c))}else s.push(i.copy(r(i.content,i)))})),Wh.fromArray(s)};return new rg({props:{transformPasted:e=>new Xh(r(e.content),e.openStart,e.openEnd)}})}function Nw(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list||e.type===t.nodes.todo_list}function Iw(e,t){return(n,r,i)=>{const{schema:o,selection:s}=n,{$from:a,$to:l}=s,c=a.blockRange(l);if(!c)return!1;const d=nw((e=>Nw(e,o)))(s);if(c.depth>=1&&d&&c.depth-d.depth<=1){if(d.node.type===e)return Aw(t)(n,r,i);if(Nw(d.node,o)&&e.validContent(d.node.content)){const{tr:t}=n;return t.setNodeMarkup(d.pos,e),r&&r(t),!1}}return function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new mf(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new mf(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=vm(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,i){let o=Wh.empty;for(let e=n.length-1;e>=0;e--)o=Wh.from(n[e].type.create(n[e].attrs,o));e.step(new fm(t.start-(r?2:0),t.end,t.start,t.end,new Xh(o,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==i&&(s=e+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&wm(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}(e)(n,r,i)}}let Pw,$w;if(s(6470),"undefined"!=typeof WeakMap){let e=new WeakMap;Pw=t=>e.get(t),$w=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;Pw=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},$w=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}class Rw{constructor(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r}}class qw{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 new Rw(r,i,o,s)}throw new 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 new 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:a,top:l,bottom:c}=this.findCell(t);return new Rw(Math.min(n,s),Math.min(i,l),Math.max(r,a),Math.max(o,c))}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];n[s]||(n[s]=!0,i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s||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 Pw(e)||$w(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);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 a=0,l=0;a<n;a++){let c=e.child(a);l++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==c.childCount)break;let d=c.child(e),{colspan:u,rowspan:p,colwidth:h}=d.attrs;for(let e=0;e<p;e++){if(e+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:p-e});break}let c=i+e*t;for(let e=0;e<u;e++){0==r[c+e]?r[c+e]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:u-e});let n=h&&h[e];if(n){let r=(c+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+=u,l+=d.nodeSize}let d=(a+1)*t,u=0;for(;i<d;)0==r[i++]&&u++;u&&(o||(o=[])).push({type:"missing",row:a,n:u}),l++}let a=new qw(t,n,r,o),l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);for(let r=0,i={};r<e.map.length;r++){let o=e.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o),a=null;for(let n=0;n<s.attrs.colspan;n++){let i=t[(r+n)%e.width*2];null==i||s.attrs.colwidth&&s.attrs.colwidth[n]==i||((a||(a=Bw(s.attrs)))[n]=i)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,e),a}(e))}}function Bw(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Fw(e,t){let n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,i=Number(e.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(let n in t){let r=t[n].getFromDOM,i=r&&r(e);null!=i&&(o[n]=i)}return o}function Lw(e,t){let n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(let r in t){let i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function Vw(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}const jw=new sg("selectingCells");function zw(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 Hw(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 Uw(e){let t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:zw(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)}function Ww(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Zw(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Kw(e,t,n){let r=e.start(-1),i=qw.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==i?null:e.node(0).resolve(r+i)}function Jw(e,t,n){let r={};for(let t in e)r[t]=e[t];return r[t]=n,r}function Gw(e,t,n=1){let r=Jw(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 Yw(e,t,n=1){let r=Jw(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}class Xw extends Bm{constructor(e,t=e){let n=e.node(-1),r=qw.get(n),i=e.start(-1),o=r.rectBetween(e.pos-i,t.pos-i),s=e.node(0),a=r.cellsInRect(o).filter((e=>e!=t.pos-i));a.unshift(t.pos-i);let l=a.map((e=>{let t=n.nodeAt(e),r=e+i+1;return new Fm(s.resolve(r),s.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){let n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Ww(n)&&Ww(r)&&Zw(n,r)){let e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?Xw.rowSelection(n,r):e&&this.isColSelection()?Xw.colSelection(n,r):new Xw(n,r)}return jm.between(n,r)}content(){let e=this.$anchorCell.node(-1),t=qw.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 s=[];for(let o=n*t.width+r.left,a=r.left;a<r.right;a++,o++){let n=t.map[o];if(!i[n]){i[n]=!0;let o=t.findCell(n),a=e.nodeAt(n),l=r.left-o.left,c=o.right-r.right;if(l>0||c>0){let e=a.attrs;l>0&&(e=Gw(e,0,l)),c>0&&(e=Gw(e,e.colspan-c,c)),a=o.left<r.left?a.type.createAndFill(e):a.type.create(e,a.content)}if(o.top<r.top||o.bottom>r.bottom){let e=Jw(a.attrs,"rowspan",Math.min(o.bottom,r.bottom)-Math.max(o.top,r.top));a=o.top<r.top?a.type.createAndFill(e):a.type.create(e,a.content)}s.push(a)}}o.push(e.child(n).copy(Wh.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:o;return new Xh(Wh.from(s),1,1)}replace(e,t=Xh.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=e.mapping.slice(n);e.replace(a.map(o.pos),a.map(s.pos),i?Xh.empty:t)}let i=Bm.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new Xh(Wh.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=qw.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(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);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){let n=qw.get(e.node(-1)),r=e.start(-1),i=n.findCell(e.pos-r),o=n.findCell(t.pos-r),s=e.node(0);return i.top<=o.top?(i.top>0&&(e=s.resolve(r+n.map[i.left])),o.bottom<n.height&&(t=s.resolve(r+n.map[n.width*(n.height-1)+o.right-1]))):(o.top>0&&(t=s.resolve(r+n.map[o.left])),i.bottom<n.height&&(e=s.resolve(r+n.map[n.width*(n.height-1)+i.right-1]))),new Xw(e,t)}isRowSelection(){let e=qw.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;let i=n+this.$anchorCell.nodeAfter.attrs.colspan,o=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,o)==e.width}eq(e){return e instanceof Xw&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){let n=qw.get(e.node(-1)),r=e.start(-1),i=n.findCell(e.pos-r),o=n.findCell(t.pos-r),s=e.node(0);return i.left<=o.left?(i.left>0&&(e=s.resolve(r+n.map[i.top*n.width])),o.right<n.width&&(t=s.resolve(r+n.map[n.width*(o.top+1)-1]))):(o.left>0&&(t=s.resolve(r+n.map[o.top*n.width])),i.right<n.width&&(e=s.resolve(r+n.map[n.width*(i.top+1)-1]))),new Xw(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Xw(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new Xw(e.resolve(t),e.resolve(n))}getBookmark(){return new Qw(this.$anchorCell.pos,this.$headCell.pos)}}Xw.prototype.visible=!1,Bm.jsonID("cell",Xw);class Qw{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Qw(e.map(this.anchor),e.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&&Zw(t,n)?new Xw(t,n):Bm.near(n,1)}}function ex(e){if(!(e.selection instanceof Xw))return null;let t=[];return e.selection.forEachCell(((e,n)=>{t.push(Pv.node(n,n+e.nodeSize,{class:"selectedCell"}))})),qv.create(e.doc,t)}function tx(e,t){let n=e.createAndFill();return new Rm(n).replace(0,n.content.size,t).doc}function nx(e,t,n,r,i,o,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=i;c<o;c++){let i=s*t.width+c,o=t.map[i];if(t.map[i-t.width]==o){l=!0;let i=n.nodeAt(o),{top:d,left:u}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(a).map(o+r),null,Jw(i.attrs,"rowspan",s-d)),e.insert(e.mapping.slice(a).map(t.positionAt(s,u,n)),i.type.createAndFill(Jw(i.attrs,"rowspan",d+i.attrs.rowspan-s))),c+=i.attrs.colspan-1}}return l}function rx(e,t,n,r,i,o,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=i;c<o;c++){let i=c*t.width+s,o=t.map[i];if(t.map[i-1]==o){l=!0;let i=n.nodeAt(o),d=t.colCount(o),u=e.mapping.slice(a).map(o+r);e.setNodeMarkup(u,null,Gw(i.attrs,s-d,i.attrs.colspan-(s-d))),e.insert(u+i.nodeSize,i.type.createAndFill(Gw(i.attrs,0,s-d))),c+=i.attrs.rowspan-1}}return l}function ix(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc,s=qw.get(o),{top:a,left:l}=r,c=l+i.width,d=a+i.height,u=e.tr,p=0;function h(){o=n?u.doc.nodeAt(n-1):u.doc,s=qw.get(o),p=u.mapping.maps.length}(function(e,t,n,r,i,o,s){let a,l,c=Vw(e.doc.type.schema);if(i>t.width)for(let o=0,d=0;o<t.height;o++){let u=n.child(o);d+=u.nodeSize;let p,h=[];p=null==u.lastChild||u.lastChild.type==c.cell?a||(a=c.cell.createAndFill()):l||(l=c.header_cell.createAndFill());for(let e=t.width;e<i;e++)h.push(p);e.insert(e.mapping.slice(s).map(d-1+r),h)}if(o>t.height){let d=[];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;d.push(i?l||(l=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}let u=c.row.create(null,Wh.from(d)),p=[];for(let e=t.height;e<o;e++)p.push(u);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!(!a&&!l)})(u,s,o,n,c,d,p)&&h(),nx(u,s,o,n,l,c,a,p)&&h(),nx(u,s,o,n,l,c,d,p)&&h(),rx(u,s,o,n,a,d,l,p)&&h(),rx(u,s,o,n,a,d,c,p)&&h();for(let e=a;e<d;e++){let t=s.positionAt(e,l,o),r=s.positionAt(e,c,o);u.replace(u.mapping.slice(p).map(t+n),u.mapping.slice(p).map(r+n),new Xh(i.rows[e-a],0,0))}h(),u.setSelection(new Xw(u.doc.resolve(n+s.positionAt(a,l,o)),u.doc.resolve(n+s.positionAt(d-1,c-1,o)))),t(u)}const ox=Cb({ArrowLeft:ax("horiz",-1),ArrowRight:ax("horiz",1),ArrowUp:ax("vert",-1),ArrowDown:ax("vert",1),"Shift-ArrowLeft":lx("horiz",-1),"Shift-ArrowRight":lx("horiz",1),"Shift-ArrowUp":lx("vert",-1),"Shift-ArrowDown":lx("vert",1),Backspace:cx,"Mod-Backspace":cx,Delete:cx,"Mod-Delete":cx});function sx(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ax(e,t){return(n,r,i)=>{let o=n.selection;if(o instanceof Xw)return sx(n,r,Bm.near(o.$headCell,t));if("horiz"!=e&&!o.empty)return!1;let s=hx(i,e,t);if(null==s)return!1;if("horiz"==e)return sx(n,r,Bm.near(n.doc.resolve(o.head+t),t));{let i,o=n.doc.resolve(s),a=Kw(o,e,t);return i=a?Bm.near(a,1):t<0?Bm.near(n.doc.resolve(o.before(-1)),-1):Bm.near(n.doc.resolve(o.after(-1)),1),sx(n,r,i)}}}function lx(e,t){return(n,r,i)=>{let o=n.selection;if(!(o instanceof Xw)){let r=hx(i,e,t);if(null==r)return!1;o=new Xw(n.doc.resolve(r))}let s=Kw(o.$headCell,e,t);return!!s&&sx(n,r,new Xw(o.$anchorCell,s))}}function cx(e,t){let n=e.selection;if(!(n instanceof Xw))return!1;if(t){let r=e.tr,i=Vw(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 Xh(i,0,0))})),r.docChanged&&t(r)}return!0}function dx(e,t){let n=zw(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new Xw(n))),!0)}function ux(e,t,n){if(!Hw(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.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;let i=t.firstChild,o=i.type.spec.tableRole,s=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),l=e<t.childCount-1?0:Math.max(0,r-1);(o||l)&&(i=tx(Vw(s).row,new Xh(i,o,l)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?tx(Vw(s).row,new Xh(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(Wh.empty),n[i]<r){let o=Vw(e).cell.createAndFill(),s=[];for(let e=n[i];e<r;e++)s.push(o);t[i]=t[i].append(Wh.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}(n),i=e.state.selection;if(i instanceof Xw){r||(r={width:1,height:1,rows:[Wh.from(tx(Vw(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=qw.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],s=[];for(let n=t[e]||0,i=0;n<r;i++){let a=o.child(i%o.childCount);n+a.attrs.colspan>r&&(a=a.type.create(Gw(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}i.push(Wh.from(s))}n=i,e=r}if(t!=i){let e=[];for(let r=0,o=0;r<i;r++,o++){let s=[],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(Jw(t.attrs,"rowspan",Math.max(1,i-t.attrs.rowspan)),t.content)),s.push(t)}e.push(Wh.from(s))}n=e,t=i}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),ix(e.state,e.dispatch,o,s,r),!0}if(r){let t=Uw(e.state),n=t.start(-1);return ix(e.state,e.dispatch,n,qw.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function px(e,t){if(t.ctrlKey||t.metaKey)return;let n,r=fx(e,t.target);if(t.shiftKey&&e.state.selection instanceof Xw)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=zw(e.state.selection.$anchor))&&mx(e,t).pos!=n.pos)i(n,t),t.preventDefault();else if(!r)return;function i(t,n){let r=mx(e,n),i=null==jw.getState(e.state);if(!r||!Zw(t,r)){if(!i)return;r=t}let o=new Xw(t,r);if(i||!e.state.selection.eq(o)){let n=e.state.tr.setSelection(o);i&&n.setMeta(jw,t.pos),e.dispatch(n)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",s),null!=jw.getState(e.state)&&e.dispatch(e.state.tr.setMeta(jw,-1))}function s(n){let s,a=jw.getState(e.state);if(null!=a)s=e.state.doc.resolve(a);else if(fx(e,n.target)!=r&&(s=mx(e,t),!s))return o();s&&i(s,n)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",s)}function hx(e,t,n){if(!(e.state.selection instanceof jm))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))return null;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 fx(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function mx(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?zw(e.state.doc.resolve(n.pos)):null}const gx=new sg("fix-tables");function yx(e,t,n,r){let i=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){let o=t.child(s);for(let t=a,r=Math.min(i,s+3);t<r;t++)if(e.child(t)==o){a=t+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?yx(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function vx(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let i=qw.get(t);if(!i.problems)return r;r||(r=e.tr);let o,s,a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if("collision"==o.type){let e=t.nodeAt(o.pos);for(let t=0;t<e.attrs.rowspan;t++)a[o.row+t]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Gw(e.attrs,e.attrs.colspan-o.n,o.n))}else if("missing"==o.type)a[o.row]+=o.n;else if("overlong_rowspan"==o.type){let e=t.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Jw(e.attrs,"rowspan",e.attrs.rowspan-o.n))}else if("colwidth mismatch"==o.type){let e=t.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Jw(e.attrs,"colwidth",o.colwidth))}}for(let e=0;e<a.length;e++)a[e]&&(null==o&&(o=e),s=e);for(let l=0,c=n+1;l<i.height;l++){let n=t.child(l),i=c+n.nodeSize,d=a[l];if(d>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<d;n++)a.push(Vw(e.schema)[t].createAndFill());let u=0!=l&&o!=l-1||s!=l?i-1:c+1;r.insert(r.mapping.map(u),a)}c=i}return r.setMeta(gx,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&yx(t.doc,e.doc,0,r):e.doc.descendants(r),n}function bx(e){let t,n=e.selection,r=Uw(e),i=r.node(-1),o=r.start(-1),s=qw.get(i);return t=n instanceof Xw?s.rectBetween(n.$anchorCell.pos-o,n.$headCell.pos-o):s.findCell(r.pos-o),t.tableStart=o,t.map=s,t.table=i,t}function wx(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;(function(e,t,n){let r=Vw(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 a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){let o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,Yw(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{let l=null==o?Vw(r.type.schema).cell:r.nodeAt(t.map[a+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function xx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(wx(e.tr,n,n.left))}return!0}function Sx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(wx(e.tr,n,n.right))}return!0}function Cx(e,{map:t,table:n,tableStart:r},i){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let a=s*t.width+i,l=t.map[a],c=n.nodeAt(l);if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(r+l),null,Gw(c.attrs,i-t.colCount(l)));else{let t=e.mapping.slice(o).map(r+l);e.delete(t,t+c.nodeSize)}s+=c.attrs.rowspan}}function kx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;Cx(r,n,e),e!=n.left;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=qw.get(n.table);t(r)}return!0}function _x(e,{map:t,tableStart:n,table:r},i){let o=n;for(let e=0;e<i;e++)o+=r.child(e).nodeSize;let s=[],a=i>0?-1:0;(function(e,t,n){let r=Vw(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width]).type!=r)return!1;return!0})(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let o=0,l=t.width*i;o<t.width;o++,l++)if(i>0&&i<t.height&&t.map[l]==t.map[l-t.width]){let i=t.map[l],s=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,Jw(s,"rowspan",s.rowspan+1)),o+=s.colspan-1}else{let e=null==a?Vw(r.type.schema).cell:r.nodeAt(t.map[l+a*t.width]).type;s.push(e.createAndFill())}return e.insert(o,Vw(r.type.schema).row.create(null,s)),e}function Ax(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(_x(e.tr,n,n.top))}return!0}function Ex(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(_x(e.tr,n,n.bottom))}return!0}function Ox(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,a=e.mapping.maps.length;e.delete(o+r,s+r);for(let o=0,s=i*t.width;o<t.width;o++,s++){let l=t.map[s];if(i>0&&l==t.map[s-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(a).map(l+r),null,Jw(t,"rowspan",t.rowspan-1)),o+=t.colspan-1}else if(i<t.width&&l==t.map[s+t.width]){let s=n.nodeAt(l),c=s.type.create(Jw(s.attrs,"rowspan",s.attrs.rowspan-1),s.content),d=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(a).map(r+d),c),o+=s.attrs.colspan-1}}}function Tx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Ox(r,n,e),e!=n.top;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=qw.get(n.table);t(r)}return!0}function Dx(e){let t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function Mx(e,t){let n=e.selection;if(!(n instanceof Xw)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=bx(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,a=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[a]==n[a+1])return!0;o+=e,a+=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,s=e.tr,a={},l=Wh.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let c=i.map[e*i.width+t],d=r.table.nodeAt(c);if(!a[c])if(a[c]=!0,null==n)n=c,o=d;else{Dx(d)||(l=l.append(d.content));let e=s.mapping.map(c+r.tableStart);s.delete(e,e+d.nodeSize)}}if(s.setNodeMarkup(n+r.tableStart,null,Jw(Yw(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),"rowspan",r.bottom-r.top)),l.size){let e=n+1+o.content.size,t=Dx(o)?n+1:e;s.replaceWith(t+r.tableStart,e+r.tableStart,l)}s.setSelection(new Xw(s.doc.resolve(n+r.tableStart))),t(s)}return!0}function Nx(e,t){const n=Vw(e.schema);return(r=({node:e})=>n[e.type.spec.tableRole],(e,t)=>{let n,i,o=e.selection;if(o instanceof Xw){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;n=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(n=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from),!n)return!1;i=zw(o.$from).pos}if(1==n.attrs.colspan&&1==n.attrs.rowspan)return!1;if(t){let s=n.attrs,a=[],l=s.colwidth;s.rowspan>1&&(s=Jw(s,"rowspan",1)),s.colspan>1&&(s=Jw(s,"colspan",1));let c,d=bx(e),u=e.tr;for(let e=0;e<d.right-d.left;e++)a.push(l?Jw(s,"colwidth",l&&l[e]?[l[e]]:null):s);for(let e=d.top;e<d.bottom;e++){let t=d.map.positionAt(e,d.left,d.table);e==d.top&&(t+=n.nodeSize);for(let i=d.left,o=0;i<d.right;i++,o++)i==d.left&&e==d.top||u.insert(c=u.mapping.map(t+d.tableStart,1),r({node:n,row:e,col:i}).createAndFill(a[o]))}u.setNodeMarkup(i,r({node:n,row:d.top,col:d.left}),a[0]),o instanceof Xw&&u.setSelection(new Xw(u.doc.resolve(o.$anchorCell.pos),c&&u.doc.resolve(c))),t(u)}return!0})(e,t);var r}function Ix(e,t,n){const 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++){const i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function Px(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!Hw(t))return!1;if(n){let r=Vw(t.schema),i=bx(t),o=t.tr,s=i.map.cellsInRect("column"==e?new Rw(i.left,0,i.right,i.map.height):"row"==e?new Rw(0,i.top,i.map.width,i.bottom):i),a=s.map((e=>i.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[e],r.cell,a[e].attrs);if(0==o.steps.length)for(let e=0;e<s.length;e++)o.setNodeMarkup(i.tableStart+s[e],r.header_cell,a[e].attrs);n(o)}return!0}}(e):function(t,n){if(!Hw(t))return!1;if(n){let r=Vw(t.schema),i=bx(t),o=t.tr,s=Ix("row",i,r),a=Ix("column",i,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?new Rw(0,l,1,i.map.height):"row"==e?new Rw(l,0,i.map.width,1):i,d="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(c).forEach((e=>{const t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,d,n.attrs)})),n(o)}return!0}}let $x=Px("row",{useDeprecatedLogic:!0}),Rx=Px("column",{useDeprecatedLogic:!0}),qx=Px("cell",{useDeprecatedLogic:!0});function Bx(e){return function(t,n){if(!Hw(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);if(r.childCount)return n-1-r.lastChild.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}}}(Uw(t),e);if(null!=r){if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(jm.between(e,(i=e,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}}function Fx(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}class Lx{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")),Vx(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,Vx(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}}function Vx(e,t,n,r,i,o){let s=0,a=!0,l=t.firstChild,c=e.firstChild;for(let e=0,n=0;e<c.childCount;e++){let{colspan:d,colwidth:u}=c.child(e).attrs;for(let e=0;e<d;e++,n++){let c=i==n?o:u&&u[e],d=c?c+"px":"";s+=c||r,c||(a=!1),l?(l.style.width!=d&&(l.style.width=d),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=d}}for(;l;){let e=l.nextSibling;l.parentNode.removeChild(l),l=e}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}const jx=new sg("tableColumnResizing");function zx({handleWidth:e=5,cellMinWidth:t=25,View:n=Lx,lastColumnResizable:r=!0}={}){let i=new rg({key:jx,state:{init(e,r){return this.spec.props.nodeViews[Vw(r.schema).table.name]=(e,r)=>new n(e,t,r),new Hx(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>jx.getState(e).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(t,n){!function(e,t,n,r,i){let o=jx.getState(e.state);if(!o.dragging){let r=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(r){let{left:i,right:o}=r.getBoundingClientRect();t.clientX-i<=n?s=Ux(e,t,"left"):o-t.clientX<=n&&(s=Ux(e,t,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){let t=e.state.doc.resolve(s),n=t.node(-1),r=qw.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Zx(e,s)}}}(t,n,e,0,r)},mouseleave(e){!function(e){let t=jx.getState(e.state);t.activeHandle>-1&&!t.dragging&&Zx(e,-1)}(e)},mousedown(e,n){!function(e,t,n){let r=jx.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;let i=e.state.doc.nodeAt(r.activeHandle),o=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,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],a--);return s/a}(e,r.activeHandle,i.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);let r=jx.getState(e.state);r.dragging&&(function(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),o=qw.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<o.height;e++){let t=e*o.width+a;if(e&&o.map[t]==o.map[t-o.width])continue;let r=o.map[t],{attrs:c}=i.nodeAt(r),d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let u=c.colwidth?c.colwidth.slice():Kx(c.colspan);u[d]=n,l.setNodeMarkup(s+r,null,Jw(c,"colwidth",u))}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Wx(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(jx,{setDragging:null})))}function a(t){if(!t.which)return s(t);let r=jx.getState(e.state),i=Wx(r.dragging,t,n);!function(e,t,n,r){let i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),a=qw.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=e.domAtPos(i.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;Vx(o,l.firstChild,l,r,a,n)}(e,r.activeHandle,i,n)}e.dispatch(e.state.tr.setMeta(jx,{setDragging:{startX:t.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,n,t)}},decorations(e){let t=jx.getState(e);if(t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return qv.empty;let o=qw.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let e=0;e<o.height;e++){let t=a+e*o.width-1;if(!(a!=o.width&&o.map[t]==o.map[t+1]||0!=e&&o.map[t-1]==o.map[t-1-o.width])){let e=o.map[t],r=s+e+i.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(Pv.widget(r,a))}}return qv.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return i}class Hx{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){let t=this,n=e.getMeta(jx);if(n&&null!=n.setHandle)return new Hx(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Hx(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);Ww(e.doc.resolve(n))||(n=null),t=new Hx(n,t.dragging)}return t}}function Ux(e,t,n){let r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;let{pos:i}=r,o=zw(e.state.doc.resolve(i));if(!o)return-1;if("right"==n)return o.pos;let s=qw.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Wx(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Zx(e,t){e.dispatch(e.state.tr.setMeta(jx,{setHandle:t}))}function Kx(e){let t=[];for(let n=0;n<e;n++)t.push(0);return t}function Jx({allowTableNodeSelection:e=!1}={}){return new rg({key:jw,state:{init:()=>null,apply(e,t){let n=e.getMeta(jw);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:ex,handleDOMEvents:{mousedown:px},createSelectionBetween(e){if(null!=jw.getState(e.state))return e.state.selection},handleTripleClick:dx,handleKeyDown:ox,handlePaste:ux},appendTransaction:(t,n,r)=>function(e,t,n){let r,i,o=(t||e).selection,s=(t||e).doc;if(o instanceof Hm&&(i=o.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=Xw.create(s,o.from);else if("row"==i){let e=s.resolve(o.from+1);r=Xw.rowSelection(e,e)}else if(!n){let e=qw.get(o.node),t=o.from+1,n=t+e.map[e.width*e.height-1];r=Xw.create(s,t+1,n)}}else o instanceof jm&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.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)}(o)?r=jm.create(s,o.from):o instanceof jm&&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}(o)&&(r=jm.create(s,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,vx(r,n),e)})}var Gx=200,Yx=function(){};Yx.prototype.append=function(e){return e.length?(e=Yx.from(e),!this.length&&e||e.length<Gx&&this.leafAppend(e)||this.length<Gx&&e.leafPrepend(this)||this.appendInner(e)):this},Yx.prototype.prepend=function(e){return e.length?Yx.from(e).append(this):this},Yx.prototype.appendInner=function(e){return new Qx(this,e)},Yx.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Yx.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Yx.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Yx.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)},Yx.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},Yx.from=function(e){return e instanceof Yx?e:e&&e.length?new Xx(e):Yx.empty};var Xx=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<=Gx)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Gx)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}(Yx);Yx.empty=new Xx([]);var Qx=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;return!(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))&&void 0},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(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))&&void 0},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}(Yx);const eS=Yx;class tS{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new nS(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new nS(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new tS(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),d=new nS(e.mapping.maps[n],c,t);(l=a&&a.merge(d))&&(d=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(d),t&&(o++,t=void 0),r||(a=d)}let l=o-n.depth;return l>iS&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new tS(s.append(i),o)}remapping(e,t){let n=new im;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 tS(this.items.append(e.map((e=>new nS(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 a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new nS(l,o,c))}else n.push(new nS(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new nS(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),d=new tS(c,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=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new nS(s.invert(),e,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new tS(eS.from(r.reverse()),i)}}tS.empty=new tS(eS.empty,0);class nS{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 nS(t.getMap().invert(),t,this.selection)}}}class rS{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const iS=20;function oS(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function sS(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}function aS(e,t,n,r){let i=dS(t),o=uS.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new rS(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(uS,{redo:r,historyState:c}).scrollIntoView())}let lS=!1,cS=null;function dS(e){let t=e.plugins;if(cS!=t){lS=!1,cS=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){lS=!0;break}}return lS}const uS=new sg("history"),pS=new sg("closeHistory");function hS(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new rg({key:uS,state:{init:()=>new rS(tS.empty,tS.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(uS);if(o)return o.historyState;n.getMeta(pS)&&(e=new rS(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(uS))return s.getMeta(uS).redo?new rS(e.done.addTransform(n,void 0,r,dS(t)),e.undone,oS(n.mapping.maps[n.steps.length-1]),e.prevTime):new rS(e.done,e.undone.addTransform(n,void 0,r,dS(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new rS(e.done.rebased(n,i),e.undone.rebased(n,i),sS(e.prevRanges,n.mapping),e.prevTime):new rS(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),sS(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return 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)),o=s?sS(e.prevRanges,n.mapping):oS(n.mapping.maps[n.steps.length-1]);return new rS(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,dS(t)),tS.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?fS:"historyRedo"==n?mS:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const fS=(e,t)=>{let n=uS.getState(e);return!(!n||0==n.done.eventCount||(t&&aS(n,e,t,!1),0))},mS=(e,t)=>{let n=uS.getState(e);return!(!n||0==n.undone.eventCount||(t&&aS(n,e,t,!0),0))};function gS(e){let t=uS.getState(e);return t?t.done.eventCount:0}function yS(e){let t=uS.getState(e);return t?t.undone.eventCount:0}class vS extends hw{get name(){return"bullet_list"}get schema(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}commands({type:e,schema:t}){return()=>Iw(e,t.nodes.list_item)}keys({type:e,schema:t}){return{"Shift-Ctrl-8":Iw(e,t.nodes.list_item)}}inputRules({type:e}){return[ew(/^\s*([-+*])\s$/,e)]}}class bS extends hw{get name(){return"hard_break"}get schema(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}commands({type:e}){return()=>zb(Rb,((t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)))}keys({type:e}){const t=zb(Rb,((t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)));return{"Mod-Enter":t,"Shift-Enter":t}}}class wS extends hw{get name(){return"heading"}get defaultOptions(){return{levels:[1,2,3,4,5,6]}}get schema(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}}))),toDOM:e=>[`h${e.attrs.level}`,0]}}commands({type:e,schema:t}){return n=>function(e,t,n={}){return(r,i,o)=>sw(r,e,n)?Vb(t)(r,i,o):Vb(e,n)(r,i,o)}(e,t.nodes.paragraph,n)}keys({type:e}){return this.options.levels.reduce(((t,n)=>({...t,[`Shift-Ctrl-${n}`]:Vb(e,{level:n})})),{})}inputRules({type:e}){return this.options.levels.map((t=>function(e,t,n=null){return new Jb(e,((e,r,i,o)=>{let s=e.doc.resolve(i),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(i,o).setBlockType(i,i,t,a):null}))}(new RegExp(`^(#{1,${t}})\\s$`),e,(()=>({level:t})))))}}class xS extends hw{get name(){return"list_item"}get schema(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}keys({type:e}){return{Enter:(t=e,function(e,n){let{$from:r,$to:i,node:o}=e.selection;if(o&&o.isBlock||r.depth<2||!r.sameParent(i))return!1;let s=r.node(-1);if(s.type!=t)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=t||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let i=Wh.empty,o=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-o;e>=r.depth-3;e--)i=Wh.from(r.node(e).copy(i));let s=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;i=i.append(Wh.from(t.createAndFill()));let a=r.before(r.depth-(o-1)),l=e.tr.replace(a,r.after(-s),new Xh(i,4-o,0)),c=-1;l.doc.nodesBetween(a,l.doc.content.size,((e,t)=>{if(c>-1)return!1;e.isTextblock&&0==e.content.size&&(c=t+1)})),c>-1&&l.setSelection(Bm.near(l.doc.resolve(c))),n(l.scrollIntoView())}return!0}let a=i.pos==r.end()?s.contentMatchAt(0).defaultType:null,l=e.tr.delete(r.pos,i.pos),c=a?[null,{type:a}]:void 0;return!!wm(l.doc,r.pos,2,c)&&(n&&n(l.split(r.pos,2,c).scrollIntoView()),!0)}),Tab:Ew(e),"Shift-Tab":Aw(e)};var t}}function SS({matcher:e={char:"@",allowSpaces:!1,startOfLine:!1},appendText:t=null,suggestionClass:n="suggestion",command:r=(()=>!1),items:i=[],onEnter:o=(()=>!1),onChange:s=(()=>!1),onExit:a=(()=>!1),onKeyDown:l=(()=>!1),onFilter:c=((e,t)=>t?e.filter((e=>JSON.stringify(e).toLowerCase().includes(t.toLowerCase()))):e)}){return new rg({key:new sg("suggestions"),view(){return{update:async(e,n)=>{const l=this.key.getState(n),d=this.key.getState(e.state),u=l.active&&d.active&&l.range.from!==d.range.from,p=!l.active&&d.active,h=l.active&&!d.active,f=p||u,m=!p&&!h&&l.query!==d.query&&!u,g=h||u;if(!f&&!m&&!g)return;const y=g?l:d,v=document.querySelector(`[data-decoration-id="${y.decorationId}"]`),b=v?{getBoundingClientRect:()=>v.getBoundingClientRect(),clientWidth:v.clientWidth,clientHeight:v.clientHeight}:null,w={view:e,range:y.range,query:y.query,text:y.text,decorationNode:v,virtualNode:b,items:m||f?await c(Array.isArray(i)?i:await i(),y.query):[],command:({range:n,attrs:i})=>{r({range:n,attrs:i,schema:e.state.schema})(e.state,e.dispatch,e),t&&function(e=""){return(t,n)=>{const{$from:r}=t.selection,{pos:i}=r.pos;return n(t.tr.insertText(e,i)),!0}}(t)(e.state,e.dispatch,e)}};g&&a(w),m&&s(w),f&&o(w)}}},state:{init:()=>({active:!1,range:{},query:null,text:null}),apply(t,n){const{selection:r}=t,i={...n};if(r.from===r.to){(r.from<n.range.from||r.from>n.range.to)&&(i.active=!1);const t=r.$from,o=function({char:e="@",allowSpaces:t=!1,startOfLine:n=!1}){return r=>{if(r.depth<=0)return!1;const i=`\\${e}`,o=new RegExp(`\\s${i}$`),s=n?"^":"",a=t?new RegExp(`${s}${i}.*?(?=\\s${i}|$)`,"gm"):new RegExp(`${s}(?:^)?${i}[^\\s${i}]*`,"gm"),l=r.before(),c=r.end(),d=function(e,t,n,r,i,o="\0"){let s="",a=!0,l=null;return e.content.nodesBetween(t,n,((e,c)=>{if(e.isText){if(l)return void(l=null);s+=e.text.slice(Math.max(t,c)-c,n-c),a=!r}else e.isLeaf&&o?(s+=o,a=!r):e.isInline&&!e.isLeaf?(s+=i,e.textContent&&(s+=e.textContent,l=e),s+=i,a=!a):!a&&e.isBlock&&(s+=r,a=!0)}),0),s}(r.doc,l,c,"\0","\0");let u,p=a.exec(d);for(;null!==p;){const n=p.input.slice(Math.max(0,p.index-1),p.index);if(/^[\s\0]?$/.test(n)){const n=p.index+r.start();let i=n+p[0].length;t&&o.test(d.slice(i-1,i+1))&&(p[0]+=" ",i+=1),n<r.pos&&i>=r.pos&&(u={range:{from:n,to:i},query:p[0].slice(e.length),text:p[0]})}p=a.exec(d)}return u}}(e)(t),s=(Math.random()+1).toString(36).substr(2,5);o?(i.active=!0,i.decorationId=n.decorationId?n.decorationId:s,i.range=o.range,i.query=o.query,i.text=o.text):i.active=!1}else i.active=!1;return i.active||(i.decorationId=null,i.range={},i.query=null,i.text=null),i}},props:{handleKeyDown(e,t){const{active:n,range:r}=this.getState(e.state);return!!n&&l({view:e,event:t,range:r})},decorations(e){const{active:t,range:r,decorationId:i}=this.getState(e);return t?qv.create(e.doc,[Pv.inline(r.from,r.to,{nodeName:"span",class:n,"data-decoration-id":i})]):null}}})}class CS extends hw{get name(){return"mention"}get defaultOptions(){return{matcher:{char:"@",allowSpaces:!1,startOfLine:!1},mentionClass:"mention",suggestionClass:"mention-suggestion"}}getLabel(e){return e.innerText.split(this.options.matcher.char).join("")}createFragment(e,t){return Wh.fromJSON(e,[{type:"text",text:`${this.options.matcher.char}${t}`}])}insertMention(e,t,n){return function(e=null,t,n={},r=Wh.empty){return(i,o)=>{const{$from:s,$to:a}=i.selection,l=s.index(),c=e?e.from:s.pos,d=e?e.to:a.pos;return!!s.parent.canReplaceWith(l,l,t)&&(o&&o(i.tr.replaceWith(c,d,t.create(n,r))),!0)}}(e,n.nodes[this.name],t,this.createFragment(n,t.label))}get schema(){return{attrs:{id:{},label:{}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:e=>["span",{class:this.options.mentionClass,"data-mention-id":e.attrs.id},`${this.options.matcher.char}${e.attrs.label}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.getAttribute("data-mention-id"),label:this.getLabel(e)}),getContent:(e,t)=>{const n=this.getLabel(e);return this.createFragment(t,n)}}]}}commands({schema:e}){return t=>this.insertMention(null,t,e)}get plugins(){return[SS({command:({range:e,attrs:t,schema:n})=>this.insertMention(e,t,n),appendText:" ",matcher:this.options.matcher,items:this.options.items,onEnter:this.options.onEnter,onChange:this.options.onChange,onExit:this.options.onExit,onKeyDown:this.options.onKeyDown,onFilter:this.options.onFilter,suggestionClass:this.options.suggestionClass})]}}class kS extends hw{get name(){return"ordered_list"}get schema(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}commands({type:e,schema:t}){return()=>Iw(e,t.nodes.list_item)}keys({type:e,schema:t}){return{"Shift-Ctrl-9":Iw(e,t.nodes.list_item)}}inputRules({type:e}){return[ew(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1]))]}}var _S=function(e){let t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(let e in t)n[e]={default:t[e].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>Fw(e,t)}],toDOM:e=>["td",Lw(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>Fw(e,t)}],toDOM:e=>["th",Lw(e,t),0]}}}({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:e=>e.style.backgroundColor||null,setDOMAttr(e,t){if(e){const n={style:`${t.style||""}background-color: ${e};`};Object.assign(t,n)}}}}});class AS extends hw{get name(){return"table"}get defaultOptions(){return{resizable:!1}}get schema(){return _S.table}commands({schema:e}){return{createTable:({rowsCount:t,colsCount:n,withHeaderRow:r})=>(i,o)=>{const s=i.tr.selection.anchor+1,a=function(e,t,n,r,i){const o=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach((n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),s=[],a=[];for(let e=0;e<n;e+=1){const e=tw(o.cell,i);if(e&&a.push(e),r){const e=tw(o.header_cell,i);e&&s.push(e)}}const l=[];for(let e=0;e<t;e+=1)l.push(o.row.createChecked(null,r&&0===e?s:a));return o.table.createChecked(null,l)}(e,t,n,r),l=i.tr.replaceSelectionWith(a).scrollIntoView(),c=l.doc.resolve(s);l.setSelection(jm.near(c)),o(l)},addColumnBefore:()=>xx,addColumnAfter:()=>Sx,deleteColumn:()=>kx,addRowBefore:()=>Ax,addRowAfter:()=>Ex,deleteRow:()=>Tx,deleteTable:()=>Fx,toggleCellMerge:()=>(e,t)=>{Mx(e,t)||Nx(e,t)},mergeCells:()=>Mx,splitCell:()=>Nx,toggleHeaderColumn:()=>Rx,toggleHeaderRow:()=>$x,toggleHeaderCell:()=>qx,setCellAttr:({name:e,value:t})=>function(e,t){return function(n,r){if(!Hw(n))return!1;let i=Uw(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let o=n.tr;n.selection instanceof Xw?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&o.setNodeMarkup(r,null,Jw(n.attrs,e,t))})):o.setNodeMarkup(i.pos,null,Jw(i.nodeAfter.attrs,e,t)),r(o)}return!0}}(e,t),fixTables:()=>vx}}keys(){return{Tab:Bx(1),"Shift-Tab":Bx(-1)}}get plugins(){return[...this.options.resizable?[zx()]:[],Jx()]}}class ES extends hw{get name(){return"table_header"}get schema(){return _S.table_header}}class OS extends hw{get name(){return"table_cell"}get schema(){return _S.table_cell}}class TS extends hw{get name(){return"table_row"}get schema(){return _S.table_row}}class DS extends uw{get name(){return"bold"}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]}}keys({type:e}){return{"Mod-b":jb(e)}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,e)]}pasteRules({type:e}){return[Mw(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,e)]}}class MS extends uw{get name(){return"italic"}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}keys({type:e}){return{"Mod-i":jb(e)}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:^|[^_])(_([^_]+)_)$/,e),Ow(/(?:^|[^*])(\*([^*]+)\*)$/,e)]}pasteRules({type:e}){return[Mw(/_([^_]+)_/g,e),Mw(/\*([^*]+)\*/g,e)]}}class NS extends uw{get name(){return"link"}get defaultOptions(){return{openOnClick:!0,target:null}}get schema(){return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target")})}],toDOM:e=>["a",{...e.attrs,rel:"noopener noreferrer nofollow",target:e.attrs.target||this.options.target},0]}}commands({type:e}){return t=>t.href?function(e,t){return(n,r)=>{const{tr:i,selection:o,doc:s}=n,{ranges:a,empty:l}=o;if(l){const{from:n,to:r}=iw(o.$from,e);s.rangeHasMark(n,r,e)&&i.removeMark(n,r,e),i.addMark(n,r,e.create(t))}else a.forEach((n=>{const{$to:r,$from:o}=n;s.rangeHasMark(o.pos,r.pos,e)&&i.removeMark(o.pos,r.pos,e),i.addMark(o.pos,r.pos,e.create(t))}));return r(i)}}(e,t):function(e){return(t,n)=>{const{tr:r,selection:i}=t;let{from:o,to:s}=i;const{$from:a,empty:l}=i;if(l){const t=iw(a,e);o=t.from,s=t.to}return r.removeMark(o,s,e),n(r)}}(e)}pasteRules({type:e}){return[Dw(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,e,(e=>({href:e})))]}get plugins(){return this.options.openOnClick?[new rg({props:{handleClick:(e,t,n)=>{const{schema:r}=e.state,i=rw(e.state,r.marks.link);i.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(i.href,i.target))}}})]:[]}}class IS extends uw{get name(){return"strike"}get schema(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e}],toDOM:()=>["s",0]}}keys({type:e}){return{"Mod-d":jb(e)}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/~([^~]+)~$/,e)]}pasteRules({type:e}){return[Mw(/~([^~]+)~/g,e)]}}class PS extends uw{get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e}],toDOM:()=>["u",0]}}keys({type:e}){return{"Mod-u":jb(e)}}commands({type:e}){return()=>jb(e)}}class $S extends cw{get name(){return"history"}get defaultOptions(){return{depth:"",newGroupDelay:""}}keys(){return{"Mod-z":fS,"Mod-y":mS,"Shift-Mod-z":mS,"Mod-я":fS,"Shift-Mod-я":mS}}get plugins(){return[hS({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}commands(){return{undo:()=>fS,redo:()=>mS,undoDepth:()=>gS,redoDepth:()=>yS}}}class RS extends uw{get name(){return"anonymize"}get schema(){return{attrs:{title:{default:null}},spanning:!1,parseDOM:[{tag:".anonymize-me",getAttrs:e=>({title:e.getAttribute("title")})}],toDOM:e=>["span",{...e.attrs,class:"anonymize-me"},0]}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:<o>)([^<o>]+)(?:<o>)$/,e)]}pasteRules({type:e}){return[Mw(/(?:<o>)([^<o>]+)(?:<o>)/g,e)]}}class qS extends uw{get name(){return"obscure"}get schema(){return{parseDOM:[{tag:".u-obscure"},{tag:"dp-obscure"}],toDOM:()=>["span",{class:"u-obscure"},0]}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:<o>)([^<o>]+)(?:<o>)$/,e)]}pasteRules({type:e}){return[Mw(/(?:<o>)([^<o>]+)(?:<o>)/g,e)]}}class BS extends uw{get name(){return"unanonymize"}get schema(){return{parseDOM:[{tag:".unanonymized"}],toDOM:()=>["span",{class:"unanonymized"},0]}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:<o>)([^<o>]+)(?:<o>)$/,e)]}pasteRules({type:e}){return[Mw(/(?:<o>)([^<o>]+)(?:<o>)/g,e)]}}class FS extends cw{get name(){return"PreventDrop"}get plugins(){return[new rg({props:{handleDOMEvents:{drop:(e,t)=>(t.preventDefault(),!0)}}})]}}class LS extends cw{get name(){return"PreventDrop"}get plugins(){return[new rg({props:{handleKeyDown:(e,t)=>!0,handleTextInput:(e,t)=>!0}})]}}const VS={name:"DpAnonymizeText",components:{EditorContent:vw,EditorMenuBubble:_w},props:{value:{type:String,required:!0}},data:()=>({editor:null}),methods:{setValue(){let e=this.editor.getHTML();e=e.replace(/<span[^>]*?title="(.*?)"([^>]*?)class="anonymize-me"([^>]*?)>([^<]*?)<span class="unanonymized">([^<]*?)<\/span>([^<]*?)<\/span>/gm,((e,t)=>t.replaceAll(""",'"'))),e=e.replace(/<span class="unanonymized">(.*?)<\/span>/gm,"$1"),e=e.replace(/<span class="anonymize-me">(.*?)<\/span>/gm,((e,t)=>'<span title="'+t.replaceAll('"',""")+'" class="anonymize-me">***</span>')),this.editor.setContent(e),this.$emit("change",e)}},mounted(){this.editor=new yw({content:this.value,editable:!0,disableInputRules:!0,disablePasteRules:!0,extensions:[new RS,new BS,new qS,new LS,new FS,new DS,new MS,new vS,new kS,new xS,new PS,new $S,new bS],onUpdate:()=>{this.setValue()},editorProps:{handleTextInput:()=>!0}})}},jS=(0,l.Z)(VS,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"border u-mb u-p-0_25"},[t("editor-menu-bubble",{staticClass:"editor-menububble__wrapper",attrs:{editor:e.editor,"keep-in-bounds":!0},scopedSlots:e._u([{key:"default",fn:function({commands:n,isActive:r,menu:i}){return[t("div",{class:{"is-active":i.isActive},style:`left: ${i.left}px; bottom: ${i.bottom}px;`},[r.anonymize()?t("a",{staticClass:"editor-menububble__button is-active",on:{click:n.unanonymize}},[e._v("\n "+e._s(e.Translator.trans("statement.anonymize.unmark"))+"\n ")]):t("a",{staticClass:"editor-menububble__button",on:{click:n.anonymize}},[e._v("\n "+e._s(e.Translator.trans("statement.anonymize.mark"))+"\n ")])])]}}])}),e._v(" "),t("editor-content",{ref:"editorContent",staticClass:"editor-content",attrs:{autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",editor:e.editor}})],1)}),[],!1,null,null,null).exports,zS={name:"DpBulkEditHeader",props:{selectedItemsCount:{type:Number,required:!1,default:0},selectionText:{type:String,required:!1,default:""}},computed:{selectedItemsText(){return this.selectedItemsCount+" "+this.selectionText}}},HS=(0,l.Z)(zS,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"layout__item u-12-of-12 u-p-0_5 bg-color-selection line-height--1_6",attrs:{role:"menu"}},[t("span",{staticClass:"u-mr"},[e._v("\n "+e._s(e.selectedItemsText)+"\n ")]),e._v(" "),e._t("default",null,{selectedItemsCount:e.selectedItemsCount}),e._v(" "),t("button",{staticClass:"btn btn--secondary float--right",attrs:{type:"button"},on:{click:function(t){return e.$emit("reset-selection")}}},[e._v("\n "+e._s(e.Translator.trans("unselect"))+"\n ")])],2)}),[],!1,null,null,null).exports,US={name:"DpChangeStateAtDate",components:{DpDatepicker:Wo,DpLabel:ui.default,DpSelect:la},props:{dateId:{required:!0,type:String},delayedSwitchDropdownId:{required:!0,type:String},checkSwitchId:{required:!1,type:String,default:"change_state_delay_toggle"},activeDelay:{required:!1,type:Boolean,default:!1},defaultNewState:{required:!1,type:String,default:""},defaultCurrentState:{required:!1,type:String,default:""},regularDropdownId:{required:!0,type:String},label:{required:!1,type:String,default:""},initDate:{required:!1,type:String,default:null},initStatus:{required:!1,type:String,default:null},statusOptions:{required:!0,type:Array}},data(){return{active:this.activeDelay,changeDate:"",actualStatus:this.defaultCurrentState,futureStatus:this.defaultNewState,disabledDates:{to:(0,r.p6)(this.getTomorrowDate())}}},computed:{initLabel(){const e=this.statusOptions.find((e=>e.value===this.initStatus)).label;return Translator.trans(e)}},methods:{dateChanged(){this.$emit("date:changed",(0,r.ZU)(this.changeDate))},getTomorrowDate(){const e=new Date;return e.setDate(e.getDate()+1),e},statusChanged(){this.$emit("status:changed",this.newStatus)},toggleCheckbox(){this.active=!1===this.active}},mounted(){""!==this.initDate&&null!==this.initDate?this.changeDate=this.initDate:this.changeDate=(0,r.p6)()}},WS=(0,l.Z)(US,(function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"layout u-mb-0_75"},[t("dp-select",{staticClass:"layout__item u-4-of-12",attrs:{"data-cy":e.label,label:{text:e.Translator.trans(e.label)},name:e.regularDropdownId,options:e.statusOptions},model:{value:e.actualStatus,callback:function(t){e.actualStatus=t},expression:"actualStatus"}})],1),e._v(" "),t("div",{staticClass:"layout"},[t("div",{staticClass:"layout__item u-5-of-12 u-12-of-12-lap-down u-mt-0_125"},[t("span",[t("input",{attrs:{id:e.checkSwitchId,name:e.checkSwitchId,value:"1",type:"checkbox"},domProps:{checked:e.active},on:{click:e.toggleCheckbox}}),e._v(" "),t("label",{staticClass:"o-form__label display--inline-block",attrs:{for:e.checkSwitchId}},[e._v("\n "+e._s(e.Translator.trans("change.state.at.date"))+"\n ")])])]),e.active?t("div",{staticClass:"u-mt-0_125"},[t("div",{staticClass:"layout__item u-2-of-12 u-6-of-12-lap-down",class:{"color--grey":!1===e.active}},[t("dp-label",{attrs:{required:"",text:e.Translator.trans("on"),for:e.dateId}}),e._v(" "),t("dp-datepicker",{staticClass:"o-form__control-wrapper",attrs:{required:"",id:e.dateId,name:e.dateId,"min-date":e.disabledDates.to,disabled:!1===e.active,"calendars-after":2},on:{change:e.dateChanged},model:{value:e.changeDate,callback:function(t){e.changeDate=t},expression:"changeDate"}})],1),t("dp-select",{staticClass:"layout__item u-5-of-12 u-6-of-12-lap-down",attrs:{label:{text:e.Translator.trans("change.state.to")},name:e.delayedSwitchDropdownId,options:e.statusOptions},model:{value:e.futureStatus,callback:function(t){e.futureStatus=t},expression:"futureStatus"}})],1):e._e()])])}),[],!1,null,null,null).exports,ZS={name:"DpCopyPasteButton",props:{copyContent:{required:!0,type:String},buttonLabel:{required:!1,type:String,default:"copy"}}},KS=(0,l.Z)(ZS,(function(){var e=this,t=e._self._c;return t("a",{attrs:{href:""},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.$emit("set-text",e.copyContent)}}},[t("i",{staticClass:"fa fa-files-o",attrs:{"aria-hidden":"true"}}),e._v("\n "+e._s(e.Translator.trans(e.buttonLabel))+"\n")])}),[],!1,null,null,null).exports,JS={name:"DpDashboardTaskCard",components:{DpButton:ni,DpCard:di},directives:{cleanhtml:n.J7},props:{currentUserId:{type:String,required:!0},procedureId:{type:String,required:!0}},data:()=>({assignedSegmentCount:0,userHash:""}),computed:{userFilteredSegmentUrl(){return Routing.generate("dplan_segments_list",{procedureId:this.procedureId})+"/"+this.userHash}},mounted(){const e={[this.currentUserId]:{condition:{path:"assignee",value:this.currentUserId}},sameProcedure:{condition:{path:"parentStatement.procedure.id",value:this.procedureId}}},t=Routing.generate("api_resource_list",{resourceType:"StatementSegment"});C.get(t,{filter:e},{serialize:!0}).then((e=>{this.assignedSegmentCount=e.data.data.length})),C.get(Routing.generate("dplan_segments_list",{procedureId:this.procedureId})).then((t=>{const n=t.request.responseURL.split("/"),r=n[n.length-1],i={filter:{...e},searchPhrase:""},o=Routing.generate("dplan_rpc_segment_list_query_update",{queryHash:r});C.patch(o,{},i).then((e=>_(e))).then((e=>{e&&(this.userHash=e)}))}))}},GS=(0,l.Z)(JS,(function(){var e=this,t=e._self._c;return t("dp-card",{attrs:{heading:e.Translator.trans("tasks.my")}},[t("div",{staticClass:"u-mt"},[t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.Translator.trans("segments.assigned.now",{count:e.assignedSegmentCount}),expression:"Translator.trans('segments.assigned.now', { count: assignedSegmentCount })"}]})]),e._v(" "),0!==e.assignedSegmentCount?t("div",{staticClass:"text--right u-mt"},[t("dp-button",{attrs:{href:e.userFilteredSegmentUrl,text:e.Translator.trans("tasks.view")}})],1):e._e()])}),[],!1,null,null,null).exports,YS={name:"DpEditableList",props:{entries:{required:!0,type:[Array,Object],default:()=>[]},translationKeys:{required:!1,type:Object,default:()=>({new:Translator.trans("new"),add:Translator.trans("add"),abort:Translator.trans("abort"),update:Translator.trans("update"),noEntries:Translator.trans("none"),delete:Translator.trans("delete")})},hasPermissionToEdit:{required:!1,type:Boolean,default:!0}},data:()=>({isFormVisible:!1,currentlyUpdating:""}),methods:{toggleFormVisibility(e){this.isFormVisible=e},showNewForm(){this.toggleFormVisibility(!0),this.currentlyUpdating="",this.$emit("reset")},saveEntry(){const e=""!==this.currentlyUpdating?this.currentlyUpdating:"new";this.$emit("saveEntry",e)},resetForm(){this.toggleFormVisibility(!1),this.currentlyUpdating="",this.$emit("reset")},showUpdateForm(e){this.toggleFormVisibility(!0),this.currentlyUpdating=e,this.$parent.$emit("showUpdateForm",e)},deleteEntry(e){this.toggleFormVisibility(!1),this.currentlyUpdating="",this.$parent.$emit("delete",e)}}},XS=YS;var QS=(0,l.Z)(XS,(function(){var e=this,t=e._self._c;return t("div",[e.entries.length>0||Object.keys(e.entries).length>0?t("ul",{staticClass:"u-mb-0_75"},e._l(e.entries,(function(n,r){return t("li",{key:r,attrs:{"data-cy":"entryItem"}},[e._t("list",null,{entry:n,index:r},n),e._v(" "),!0===e.hasPermissionToEdit?t("span",[t("button",{staticClass:"btn-icns u-m-0 u-ml-0_5",attrs:{"aria-label":e.translationKeys.update,"data-cy":"updateEntry"},on:{click:function(t){return t.preventDefault(),e.showUpdateForm(r)}}},[t("i",{staticClass:"fa fa-pencil",attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{staticClass:"btn-icns u-m-0 u-pl-0",attrs:{"aria-label":e.translationKeys.delete,"data-cy":"deleteEntry"},on:{click:function(t){return t.preventDefault(),e.deleteEntry(r)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"aria-hidden":"true"}})])]):e._e()],2)})),0):t("div",{staticClass:"color--grey u-mb-0_5"},[e._v("\n "+e._s(e.translationKeys.noEntries)+"\n ")]),e._v(" "),!0===e.isFormVisible&&!0===e.hasPermissionToEdit?t("div",[t("div",{staticClass:"u-mb-0_5"},[e._t("form")],2),e._v(" "),t("button",{staticClass:"btn btn--primary",attrs:{"data-cy":""!==e.currentlyUpdating?"saveEntry":"addEntry"},on:{click:function(t){return t.preventDefault(),e.saveEntry.apply(null,arguments)}}},[e._v("\n "+e._s(""!==e.currentlyUpdating?e.translationKeys.update:e.translationKeys.add)+"\n ")]),e._v(" "),t("button",{staticClass:"btn btn--secondary u-ml-0_5",on:{click:function(t){return t.preventDefault(),e.resetForm.apply(null,arguments)}}},[e._v("\n "+e._s(e.translationKeys.abort)+"\n ")])]):e._e(),e._v(" "),!1===e.isFormVisible&&!0===e.hasPermissionToEdit?t("button",{staticClass:"btn btn--primary",attrs:{"data-cy":"showInput"},on:{click:function(t){return t.preventDefault(),e.showNewForm()}}},[e._v("\n "+e._s(e.translationKeys.new)+"\n ")]):e._e()])}),[],!1,null,null,null);const eC=QS.exports,tC=require("tippy.js");var nC=s.n(tC);function rC(e){const t=document.querySelector('[data-suggestion-id="suggestion-popup"]');t&&t.childNodes.forEach(((t,n)=>n===e?t.classList.add("suggestion__list-item--is-active"):t.classList.remove("suggestion__list-item--is-active")))}function iC(e){const t=document.createElement("ul");t.setAttribute("data-suggestion-id","suggestion-popup"),t.setAttribute("class","o-list suggestion__popup");for(let n=0;n<e.length;n++){const r=document.createElement("li");r.setAttribute("class","o-list__item suggestion__list-item u-ph-0_5 u-pv-0_25"),r.setAttribute("data-suggestion-item",`${n}`);const i=document.createElement("button");i.setAttribute("class","btn--blank"),i.appendChild(document.createTextNode(e[n].name)),r.appendChild(i),t.appendChild(r)}if(0===e.length){const e=document.createElement("li");e.appendChild(document.createTextNode("Keine passenden Platzhalter gefunden")),t.appendChild(e)}return t}const oC={name:"DpLinkModal",components:{DpButtonRow:si,DpCheckbox:fi,DpInput:ts,DpModal:zs},mixins:[V.cR],data:()=>({initUrl:"",isVisible:!1,newTab:!1,text:"",url:""}),computed:{hasLink(){return""!==this.initUrl}},methods:{emitAndClose(e){this.$emit("insert","insert"===e?this.url:null,this.newTab,this.text),this.toggleModal()},setVisible(e){this.isVisible=e},toggleModal(e,t,n){this.$refs.linkModal.toggle(),this.isVisible?(this.initUrl=e,this.url=e,this.text=t,this.newTab="_blank"===n):(this.url="",this.text="",this.newTab=!1)}}},sC=(0,l.Z)(oC,(function(){var e=this,t=e._self._c;return t("dp-modal",{ref:"linkModal",attrs:{"content-classes":"u-1-of-3","data-dp-validate":"linkModal"},on:{"modal:toggled":e.setVisible}},[[t("h3",[e._v("\n "+e._s(e.Translator.trans(e.hasLink?"editor.link.edit":"editor.link.insert"))+"\n ")]),e._v(" "),t("div",{staticClass:"space-stack-m"},[t("dp-input",{attrs:{id:"link_text",label:{text:e.Translator.trans("link.text")},required:e.isVisible},model:{value:e.text,callback:function(t){e.text=t},expression:"text"}}),e._v(" "),t("dp-input",{attrs:{id:"link_url",label:{hint:e.Translator.trans("editor.link.url.formatHint"),text:e.Translator.trans("url")},pattern:!0===e.isVisible?"(^https?://.*|^//.*)":null,required:e.isVisible,type:"url"},model:{value:e.url,callback:function(t){e.url=t},expression:"url"}}),e._v(" "),t("dp-checkbox",{attrs:{id:"newTab",label:{text:e.Translator.trans("open.in.new.tab")}},model:{value:e.newTab,callback:function(t){e.newTab=t},expression:"newTab"}}),e._v(" "),t("dp-button-row",{staticClass:"u-mt",attrs:{primary:"","primary-text":e.Translator.trans("insert"),secondary:"","secondary-text":e.Translator.trans("remove")},on:{"primary-action":function(t){e.dpValidateAction("linkModal",(()=>e.emitAndClose("insert")),!1)},"secondary-action":function(t){return e.emitAndClose("remove")}}})],1)]],2)}),[],!1,null,null,null).exports,aC=require("@uppy/drag-drop");var lC=s.n(aC);const cC=require("@uppy/progress-bar");var dC=s.n(cC);const uC=require("@uppy/tus");var pC=s.n(uC);const hC=require("@uppy/core");var fC=s.n(hC);const mC={name:"DpUpload",props:{allowedFileTypes:{type:[Array,String],required:!1,default:"pdf"},allowedFileTypesWarning:{type:String,default:"warning.filetype"},allowMultipleUploads:{type:Boolean,default:!1},chunkSize:{type:Number,default:1/0,required:!1},maxFileSize:{type:Number,default:1e7},maxNumberOfFiles:{type:Number,required:!1,default:1},translations:{type:Object,required:!1,default:()=>({})}},data:()=>({currentFileHash:"",currentFileId:"",uppy:null}),computed:{allowedFileTypeArray(){return T(this.allowedFileTypes)}},methods:{getCookieValue(e){const t=document.cookie.match("(^|[^;]+)\\s*"+e+"\\s*=\\s*([^;]+)");return t?t.pop():""},handleOnBeforeFileAdded(e,t){let n=e.name;const r=["?","#","&","'",'"',"/",":","\\"];for(let e=0;e<r.length;e++)n.includes(r[e])&&(n=n.replace(r[e],"_"));return n!==e.name?{...e,name:n,meta:{...e.meta,name:n}}:e},initialize(){const e={strings:{dropHereOr:Translator.trans("form.button.upload.pdf",{browse:"{browse}",maxUploadSize:O("GB",window.dplan.settings.maxUploadSize)}),failedToUpload:Translator.trans("form.button.upload.failed",{file:"{file}"}),browse:Translator.trans("form.button.upload.search"),...this.translations}};this.uppy=new(fC())({disabled:!0,autoProceed:!0,allowMultipleUploads:this.allowMultipleUploads,restrictions:{allowedFileTypes:this.allowedFileTypeArray,maxFileSize:this.maxFileSize,maxNumberOfFiles:this.maxNumberOfFiles},onBeforeFileAdded:this.handleOnBeforeFileAdded,locale:e}),this.uppy.use(lC(),{target:this.$refs.fileInput,width:"100%",note:null,locale:e}),this.uppy.use(dC(),{target:this.$refs.fileInput,fixed:!1,hideAfterFinish:!1});let t=null;"undefined"!=typeof dplan&&(0,r.Q$)(dplan,"procedureId")&&(t=dplan.procedureId);const n={};null!==t&&"0"!==t&&(n["X-Demosplan-Procedure-Id"]=t),""!==dplan.settings.basicAuth&&(n.Authorization=dplan.settings.basicAuth),this.uppy.use(pC(),{endpoint:dplan.paths.uploadPost,chunkSize:819200,limit:5,onAfterResponse:(e,t)=>{this.currentFileHash=t.getHeader("X-Demosplan-File-Hash"),this.currentFileId=t.getHeader("X-Demosplan-File-Id")},removeFingerprintOnSuccess:!0,headers:n})}},mounted(){this.initialize(),this.uppy.on("complete",(e=>{setTimeout((()=>{this.uppy.cancelAll()}),2e3),this.$emit("uploads-completed",e)})),this.uppy.on("upload-error",((e,t,n)=>{console.error(t),dplan.notify.error(Translator.trans("error.fileupload")),this.$emit("file-error",{file:e,error:t,response:n})})),this.uppy.on("file-added",(e=>{this.$emit("file-added",e)})),this.uppy.on("upload",(e=>{this.$emit("upload",e)})),this.uppy.on("restriction-failed",(()=>{dplan.notify.warning(Translator.trans(this.allowedFileTypesWarning))})),this.uppy.on("upload-success",(e=>{const{name:t,size:n,type:r}=e.data,i={name:t,hash:this.currentFileHash,size:n,type:r,id:e.id,fileId:this.currentFileId};this.currentFileHash="",this.currentFileId="",this.$emit("upload-success",i)}))},beforeDestroy(){this.uppy&&this.uppy.close()}},gC=mC,yC=(0,l.Z)(gC,(function(){return(0,this._self._c)("div",{ref:"fileInput"})}),[],!1,null,null,null).exports,vC={name:"DpUploadedFile",inject:["getFileByHash"],mixins:[V.gH],props:{file:{type:Object,required:!0}},computed:{fileIcon(){const e="txt"===this.file.mimeType?"fa-file-text-o":"fa-folder-o";return this.prefixClass("fa "+e)},fileSize(){return O("KB",this.file.size)},isImage(){return void 0!==["png","jpg","gif","bmp","ico","tiff","svg"].find((e=>e===this.file.mimeType))}},methods:{removeFile(){this.$emit("file-remove",this.file)}}},bC={name:"DpUploadedFileList",components:{DpUploadedFile:(0,l.Z)(vC,(function(){var e=this,t=e._self._c;return t("li",["txt"===e.file.mimeType?t("span",{attrs:{"aria-hidden":"true"}},[t("i",{class:e.fileIcon})]):e._e(),e._v(" "),e.isImage?t("span",[t("img",{attrs:{src:e.getFileByHash(e.file.hash),"aria-label":e.Translator.trans("image.preview"),width:"50px"}})]):e._e(),e._v(" "),t("span",{class:e.prefixClass("display--inline-block u-pl-0_5"),staticStyle:{width:"calc(100% - 62px)"}},[t("span",{staticClass:"break-words"},[e._v("\n "+e._s(e.file.name)+"\n ")]),e._v("\n ("+e._s(e.fileSize)+")\n "),t("button",{class:e.prefixClass("btn-icns u-m-0"),attrs:{type:"button","aria-label":e.Translator.trans("file.remove")},on:{click:e.removeFile}},[t("i",{class:e.prefixClass("fa fa-trash"),attrs:{"aria-hidden":"true"}})])])])}),[],!1,null,null,null).exports},mixins:[V.gH],props:{files:{type:Array,required:!1,default:()=>[]}}},wC=(0,l.Z)(bC,(function(){var e=this,t=e._self._c;return t("div",[t("h4",{class:e.prefixClass("u-mb-0_25")},[e._v("\n "+e._s(e.Translator.trans("uploaded.files"))+"\n ")]),e._v(" "),t("ul",{class:e.prefixClass("o-list space-stack-xs")},e._l(e.files,(function(n,r){return t("dp-uploaded-file",{key:r,attrs:{file:n},on:{"file-remove":t=>e.$emit("file-remove",t)}})})),1)])}),[],!1,null,null,null).exports,xC={name:"DpUploadFiles",components:{DpLabel:ui.default,DpUpload:yC,DpUploadedFileList:wC},mixins:[V.gH],provide(){return{getFileByHash:this.getFileByHash}},props:{allowedFileTypes:{type:[Array,String],required:!0,default:"pdf"},chunkSize:{type:Number,default:1/0,required:!1},dataDpValidateIf:{type:[Boolean,String],required:!1,default:!1},getFileByHash:{type:Function,required:!0},id:{type:String,required:!1,default:""},label:{type:Object,default:()=>({}),validator:e=>Object.keys(e).every((e=>["hint","text","tooltip"].includes(e)))},maxFileSize:{type:Number,required:!1,default:1e7},maxNumberOfFiles:{type:Number,required:!1,default:1},name:{type:String,required:!1,default:"uploadedFiles"},needsHiddenInput:{type:Boolean,default:!1},required:{type:Boolean,required:!1,default:!1},translations:{type:Object,required:!1,default:()=>({})},sideBySide:{type:Boolean,required:!1,default:!1},storageName:{type:String,required:!1,default:""}},data:()=>({fileHashes:[],uploadedFiles:[]}),watch:{storageName(){this.storageName&&this.updateSessionStorage()}},methods:{addFile(e){this.maxNumberOfFiles<=this.uploadedFiles.length&&(this.fileHashes.shift(),this.uploadedFiles.shift()),this.needsHiddenInput&&this.fileHashes.push(e.hash),this.uploadedFiles.push(e),this.storageName&&this.updateSessionStorage()},clearFilesList(){this.uploadedFiles.forEach((e=>{this.removeFile(e)}))},handleRemove(e){this.removeFile(e),this.$emit("file-remove",e)},handleUpload(e){this.addFile(e),this.$emit("upload-success",e),document.dispatchEvent(new CustomEvent("uploadSuccess",{detail:{file:e,fieldName:this.name}}))},removeFile(e){this.needsHiddenInput&&(this.fileHashes=this.fileHashes.filter((t=>t!==e.hash))),this.uploadedFiles=this.uploadedFiles.filter((t=>t.hash!==e.hash)),this.storageName&&this.updateSessionStorage()},updateSessionStorage(){sessionStorage.setItem(this.storageName,JSON.stringify(this.uploadedFiles))}},mounted(){this.storageName&&(this.uploadedFiles=JSON.parse(sessionStorage.getItem(this.storageName))||[])}},SC=xC,CC=(0,l.Z)(SC,(function(){var e=this,t=e._self._c;return t("fieldset",{class:e.prefixClass("layout")},[t("legend",{staticClass:"hide-visually",domProps:{textContent:e._s(e.Translator.trans("upload.files"))}}),e._v(" "),e.label.text?t("dp-label",e._b({staticClass:"layout__item"},"dp-label",{for:e.id,required:e.required,...e.label},!1)):e._e(),e._v(" "),t("dp-upload",{class:[e.prefixClass("layout__item u-1-of-1-palm"),e.prefixClass(e.sideBySide?"u-1-of-2":"u-1-of-1")],attrs:{"allowed-file-types":e.allowedFileTypes,"chunk-size":e.chunkSize,"max-number-of-files":e.maxNumberOfFiles,"max-file-size":e.maxFileSize,translations:e.translations},on:{"upload-success":e.handleUpload}}),e.uploadedFiles.length>0?t("dp-uploaded-file-list",{class:[e.prefixClass("layout__item u-1-of-1-palm"),e.prefixClass(e.sideBySide?"u-1-of-2":"u-1-of-1 u-mt")],attrs:{files:e.uploadedFiles},on:{"file-remove":e.handleRemove}}):e._e(),e._v(" "),e.needsHiddenInput?t("input",{attrs:{type:"hidden",name:"uploadedFiles"!==e.name?`uploadedFiles[${e.name}]`:"uploadedFiles",required:e.required,"data-dp-validate-if":e.dataDpValidateIf},domProps:{value:e.fileHashes}}):e._e()],1)}),[],!1,null,null,null).exports,kC={name:"DpUploadModal",components:{DpInput:ts,DpModal:zs,DpUploadFiles:CC},props:{getFileByHash:{type:Function,required:!0}},data:()=>({fileUrl:"",altText:"",editAltTextOnly:!1}),methods:{emitAndClose(){this.editAltTextOnly?this.$emit("add-alt",this.altText):this.fileUrl&&this.$emit("insert-image",this.fileUrl,this.altText),this.resetAndClose()},resetAndClose(){this.altText="",this.fileUrl="",this.editAltTextOnly=!1,this.$emit("close"),this.toggleModal()},setFile({hash:e}){this.fileUrl=this.getFileByHash(e),this.$forceUpdate()},toggleModal(e){!0===this.$refs.uploadModal.isOpenModal?this.$refs.uploader.clearFilesList():e&&(this.editAltTextOnly=e.editAltOnly,this.altText=e.currentAlt),this.$refs.uploadModal.toggle()}}},_C=(0,l.Z)(kC,(function(){var e=this,t=e._self._c;return t("dp-modal",{ref:"uploadModal",attrs:{"content-classes":"u-2-of-3-lap-up u-1-of-2-desk-up"}},[[e.editAltTextOnly?t("h3",{staticClass:"u-mb"},[e._v("\n "+e._s(e.Translator.trans("image.edit"))+"\n ")]):t("h3",{staticClass:"u-mb"},[e._v("\n "+e._s(e.Translator.trans("image.insert"))+"\n ")]),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!1===e.editAltTextOnly,expression:"editAltTextOnly === false"}]},[t("dp-upload-files",{ref:"uploader",attrs:{"allowed-file-types":"img",id:"imageFile","get-file-by-hash":e.getFileByHash,"max-file-size":20971520,"max-number-of-files":1,translations:{dropHereOr:e.Translator.trans("form.button.upload.image",{browse:"{browse}",maxUploadSize:"20MB"})}},on:{"upload-success":e.setFile}})],1),e._v(" "),t("dp-input",{staticClass:"u-mb",attrs:{id:"altText",label:{hint:e.Translator.trans("image.alt.explanation"),text:e.Translator.trans("alternative.text")}},model:{value:e.altText,callback:function(t){e.altText=t},expression:"altText"}}),e._v(" "),t("div",{staticClass:"u-mt text--right width-100p space-inline-s"},[t("button",{staticClass:"btn btn--primary",attrs:{type:"button"},on:{click:function(t){return e.emitAndClose()}}},[e._v("\n "+e._s(e.Translator.trans("insert"))+"\n ")]),e._v(" "),t("button",{staticClass:"btn btn--secondary",attrs:{type:"button"},on:{click:function(t){return e.resetAndClose()}}},[e._v("\n "+e._s(e.Translator.trans("abort"))+"\n ")])])]],2)}),[],!1,null,null,null).exports;class AC extends uw{get name(){return"delete"}get schema(){return{parseDOM:[{tag:"del"}],toDOM:()=>["del",{title:Translator.trans("text.deleted")},0]}}commands({type:e}){return()=>jb(e)}}const EC={name:"DpResizableImage",props:{getPos:{type:Function,required:!1,default:()=>({})},node:{type:Object,required:!1,default:()=>({})},options:{type:Object,required:!1,default:()=>({})},selected:{type:Boolean,required:!1,default:!1},updateAttrs:{type:Function,required:!1,default:()=>({})},view:{type:Object,required:!1,default:()=>({})}},data:()=>({id:(0,g.v4)(),imageTitle:Translator.trans("image.alt.edit.hint"),observer:null,ratioFactor:1}),methods:{updateImageDimensions(e){e>0&&this.$nextTick((()=>{this.updateAttrs({height:e/this.ratioFactor,width:e})}))},setRatio(e=!1){const t=new Image;t.onload=()=>{if(this.ratioFactor=t.width/t.height,e){const e=this.$parent.$el.clientWidth-40,n=t.width<e?t.width:e;this.updateImageDimensions(n)}},t.src=this.node.attrs.src}},mounted(){this.observer=new ResizeObserver((e=>this.updateImageDimensions(e[0].target.offsetWidth))),this.observer.observe(this.$refs.imagewrapper),this.$root.$on("update-image:"+this.id,(e=>{this.updateAttrs(e)}));const e=this.node.attrs.height>0==0||this.node.attrs.height===1/0;this.setRatio(e)}},OC=EC,TC=(0,l.Z)(OC,(function(){var e=this,t=e._self._c;return t("span",{ref:"imagewrapper",staticClass:"resizable-image",style:`height: ${e.node.attrs.height}px; width: ${e.node.attrs.width}px`,attrs:{tabindex:"1"},on:{mouseup:()=>e.updateImageDimensions(e.node.attrs.width)}},[t("img",{ref:"image",attrs:{alt:e.node.attrs.alt,src:e.node.attrs.src,title:e.imageTitle,width:e.node.attrs.width},on:{click:function(t){return t.ctrlKey?e.$root.$emit("open-image-alt-modal",t,e.id):null}}})])}),[],!1,null,null,null).exports,DC=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/;class MC extends hw{get name(){return"image"}get schema(){return{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt"),width:e.getAttribute("width"),height:e.getAttribute("height")})}],toDOM:e=>["img",{...e.attrs,unselectable:"on"}]}}commands({type:e}){return{insertImage:t=>(n,r)=>{const{selection:i}=n,o=i.$cursor?i.$cursor.pos:i.$to.pos,s=e.create(t);r(n.tr.insert(o,s))}}}inputRules({type:e}){return[Tw(DC,e,(e=>{const[,t,n,r,i,o]=e;return{src:n,alt:t,title:r,width:i,height:o}}))]}get view(){return TC}}class NC extends uw{get name(){return"insert"}get schema(){return{parseDOM:[{tag:"ins"}],toDOM:()=>["ins",{title:Translator.trans("text.inserted")},0]}}commands({type:e}){return()=>jb(e)}}class IC extends NS{get defaultOptions(){return{openOnClick:!1,target:null}}get schema(){return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target")})}],toDOM:e=>["a",{...e.attrs,rel:"noopener noreferrer nofollow"},0]}}}class PC extends uw{get name(){return"mark"}get schema(){return{parseDOM:[{tag:"mark"}],toDOM:()=>["mark",{title:Translator.trans("text.mark")},0]}}commands({type:e}){return()=>jb(e)}}class $C extends hw{get name(){return"insertHTML"}get schema(){return{inline:!1,attrs:{},group:"block",draggable:!0,parseDOM:[]}}commands({type:e}){return{insertHTML:e=>(t,n)=>{const{selection:r}=t,i=document.createElement("div");i.innerHTML=e.trim();const o=qf.fromSchema(t.schema).parseSlice(i);n(t.tr.insert(r.anchor,o.content))}}}}function RC(e){const t=[e[0].type];let n=`<${e[0].type}>`;for(let r=0;r<e.length;r++){const i=e[r];n+=`<li>${i.content}`;const o=r+1<e.length&&e[r+1].indent>i.indent,s=r+1<e.length&&e[r+1].indent<i.indent,a=r+1===e.length;if(o?(n+=`<${e[r+1].type}>`,t.unshift(e[r+1].type)):n+="</li>",s){let o=0;for(;e[r+1].indent+o<i.indent;)n+=`</${t[0]}></li>`,t.shift(),o++}if(a)for(let e=i.indent;e>1;e--)n+=`</${t[0]}></li>`,t.shift()}return n+=`</${e[0].type}>`,n}const qC={name:"DpEditor",components:{DpIcon:Yr,EditorMenuBar:ww,EditorContent:vw,DpLinkModal:sC,DpUploadModal:_C},directives:{cleanhtml:n.J7,tooltip:n.u},mixins:[V.gH],props:{editorId:{type:String,required:!1,default:""},hiddenInput:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},toolbarItems:{required:!1,type:Object,default:()=>({})},maxlength:{type:[Number,null],default:null},obscure:{type:Boolean,required:!1,default:!1},readonly:{required:!1,default:!1,type:Boolean},routes:{type:Object,required:!1,default:()=>({}),validator:e=>Object.keys(e).every((e=>["getFileByHash"].includes(e)))},suggestions:{type:Array,validator:e=>{const t="@|$|#",n=!0,r=!0,i=[{id:"a unique id",name:"a string that should be displayed when inserting the suggestion"}];return Array.isArray(e)&&e.filter((e=>{let o=e.matcher&&e.suggestions;return o=o&&typeof e.matcher.char==typeof t,o=o&&typeof e.matcher.allowSpaces==typeof n,o=o&&typeof e.matcher.startOfLine==typeof r,o=o&&e.suggestions.filter((e=>typeof e.id==typeof i[0].id&&typeof e.name==typeof i[0].name)).length===e.suggestions.length,o})).length===e.length},required:!1,default:()=>[]},value:{type:String,required:!0},dataDpValidateIf:{type:String,default:"",required:!1}},data(){return{currentValue:"",diffMenu:{isOpen:!1,buttons:[]},editingImage:null,editor:null,editorHeight:"",isDiffMenuOpen:!1,isFullscreen:!1,isTableMenuOpen:!1,linkUrl:"",manuallyResetForm:!0,tableMenu:{isOpen:!1,buttons:[{label:"editor.table.create",command:e=>e.createTable({rowsCount:3,colsCount:3,withHeaderRow:!1}),name:"createTable"},{label:"editor.table.delete",command:e=>e.deleteTable(),name:"deleteTable"},{label:"editor.table.addColumnBefore",command:e=>e.addColumnBefore(),name:"addColumnBefore"},{label:"editor.table.addColumnAfter",command:e=>e.addColumnAfter(),name:"addColumnAfter"},{label:"editor.table.deleteColumn",command:e=>e.deleteColumn(),name:"deleteColumn"},{label:"editor.table.addRowBefore",command:e=>e.addRowBefore(),name:"addRowBefore"},{label:"editor.table.addRowAfter",command:e=>e.addRowAfter(),name:"addRowAfter"},{label:"editor.table.deleteRow",command:e=>e.deleteRow(),name:"deleteRow"},{label:"editor.table.toggleCellMerge",command:e=>e.toggleCellMerge(),name:"toggleCellMerge"}]},toolbar:Object.assign({headings:[],imageButton:!1,insertAndDelete:!1,fullscreenButton:!0,linkButton:!1,listButtons:!0,mark:!1,obscure:this.obscure,strikethrough:!1,table:!1,textDecoration:!0},this.toolbarItems)}},computed:{counterText(){return(0,r.T8)(this.hiddenInputValue.length,this.maxlength)},hiddenInputValue(){return""===this.currentValue.replace("<p></p>","")?"":this.currentValue},obscureEnabled(){return this.toolbar.obscure}},watch:{value(e){this.editor.focused||(this.currentValue=e,this.editor.setContent(e,!1))},readonly(){this.editor.setOptions({editable:!this.readonly})}},methods:{addAltTextToImage(e){this.$root.$emit("update-image:"+this.editingImage,{alt:e}),this.resetEditingImage(),this.setValue()},appendText(e){let t;const n=this.startsWithTag(this.currentValue,"p")||this.startsWithTag(e,"p");"k.A."===this.currentValue||""===this.currentValue?t=e:"k.A"!==this.currentValue&&""!==this.currentValue&&n?t=this.currentValue+e:"k.A"!==this.currentValue&&""!==this.currentValue&&(t=this.currentValue+"<br>"+e),this.editor.setContent(t),this.currentValue=t,this.$emit("input",this.currentValue)},cut(){document.execCommand("cut")},fullscreen(e){const t=e.target.parentElement.parentElement.parentElement.querySelector(".tiptap .editor__content");!1===this.isFullscreen&&t.hasAttribute("style")&&(this.editorHeight=t.getAttribute("style"),t.removeAttribute("style")),this.isFullscreen=!this.isFullscreen,!1===this.isFullscreen&&""!==this.editorHeight&&t.setAttribute("style",this.editorHeight)},handleInsertText(e){e=e.replace(/\n/g,"<br>"),0===this.editor.view.input.lastClick.x&&0===this.editor.view.input.lastClick.y?this.appendText(e):this.insertTextAtCursorPos(e)},insertTextAtCursorPos(e){this.startsWithTag(e,"p")&&(e=e.slice(3,-4)),this.editor.commands.insertHTML(e),this.currentValue=this.editor.getHTML()},startsWithTag(e,t){const n=document.createElement("div");return n.innerHTML=e,(n.firstChild&&n.firstChild.nodeName)===t.toUpperCase()},insertImage(e,t){this.editor.commands.insertImage({src:e,alt:t})},insertUrl(e,t,n){if(null!==e){if(""!==e&&""!==n){const r=this.editor.schema.text(n,[this.editor.schema.marks.link.create({href:e,...t&&{target:"_blank"}})]);this.editor.view.dispatch(this.editor.state.tr.replaceSelectionWith(r,!1))}}else this.editor.commands.link({href:null,...t&&{target:"_blank"}})},getLinkMark:e=>e.marks&&e.marks.find((e=>"link"===e.type.name)),openUploadModal(e){this.$refs.uploadModal.toggleModal(e)},prepareInitText(){this.currentValue=this.replaceLinebreaks(this.currentValue),this.currentValue=this.replacePlaceholdersWithImages(this.currentValue)},replaceLinebreaks(e){let t=e;return t=t.replace(/<\/p>[\n|\r|\s|\\n|\\r]*?<p>/g,"</p><p>"),t=t.replace(/<ul>[\n|\r|\s|\\n|\\r]*?<li>/g,"<ul><li>"),t.replace(/<\/li>[\n|\r|\s|\\n|\\r]*?<li>/g,"</li><li>")},replacePlaceholdersWithImages(e=this.currentValue){const t=Translator.trans("image.placeholder"),n=t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t,r=new RegExp(`(\\[${n}\\].*?--\x3e)`,"gm");try{return e.replace(r,((e,t)=>{const n=t.match(/{([^}]*?)}/)[1]===Translator.trans("image.alt.placeholder")?"":t.match(/{([^}]*?)}/)[1],r=t.match(/<!-- (.*?) -->/)[1],i=r.substr(7,36),o=r.match(/width=(\d*?)&/)[1],s=r.match(/height=(\d*?)$/)[1];return`<img src="${this.routes.getFileByHash(i)}" width="${o}" height="${s}" alt="${n}">`}))}catch(t){return e}},resetEditingImage(){this.editingImage=null},resizeVertically(e){const t=e.target.parentElement.querySelector(".tiptap .editor__content");e.preventDefault();const n=parseFloat(getComputedStyle(t,null).getPropertyValue("height").replace("px","")),r=e.pageY;function i(e){const i=n+(e.pageY-r);t.style.height=i+"px"}window.addEventListener("mousemove",i),window.addEventListener("mouseup",(function(){window.removeEventListener("mousemove",i)}))},resetEditor(){this.editor.setContent("")},setValue(){this.currentValue=this.editor.getHTML();const e=new RegExp('<span class="'+this.prefixClass("u-obscure")+'">(.*?)<\\/span>',"g");this.currentValue=this.currentValue.replace(e,"<dp-obscure>$1</dp-obscure>");const t=""===this.currentValue.split("<p>").join("").split("</p>").join("").trim();this.$emit("input",t?"":this.currentValue)},setSelectionByEditor(e,t,n){const r=this.editor.view.state.tr;if(e){const t=this.getLinkMark(e);t&&t.attrs.href===n.href&&this.editor.setSelection(r.selection.anchor-r.selection.$anchor.nodeBefore.nodeSize,r.selection.anchor)}if(t){const e=this.getLinkMark(t);e&&e.attrs.href===n.href&&this.editor.setSelection(r.selection.anchor,r.selection.anchor+r.selection.$anchor.nodeAfter.nodeSize)}},showLinkPrompt(e,t){this.linkUrl=t.href?t.href:"";const n=this.editor.view.state.tr.selection;if(t.href){const e=n.anchor>n.head,r=e?"$anchor":"$head",i=n[e?"$head":"$anchor"].nodeBefore,o=n[r].nodeAfter;this.setSelectionByEditor(i,o,t)}const r=this.editor.state.doc.textBetween(this.editor.view.state.tr.selection.from,this.editor.view.state.tr.selection.to," ");this.$refs.linkModal.toggleModal(this.linkUrl,r,t.target)},executeSubMenuButtonAction(e,t,n=!1){n?this[t].buttons.forEach((t=>{(this.editor.isActive[t.name]()||t===e)&&t.command(this.editor.commands)})):e.command(this.editor.commands),this[t].isOpen=!1},toggleSubMenu(e,t){if(this[e].isOpen=t,!0===t){this["tableMenu"===e?"diffMenu":"tableMenu"].isOpen=!1;const t=()=>{this[e].isOpen=!1,document.removeEventListener("click",t)};document.addEventListener("click",t)}}},created(){this.currentValue=this.value,this.prepareInitText()},mounted(){const e=[new $S,new bS,new wS({levels:this.toolbar.headings})];e.push(new $C),this.suggestions.length>0&&this.suggestions.forEach((t=>{e.push(function({matcher:e,suggestions:t},n){const r=t.map((e=>({id:e.id,name:e.name+" "})));let i=null,o=0,s=r,a=(...e)=>({args:e}),l=null;function c(e){let t=e.target;"BUTTON"===t.tagName&&(t=t.parentElement);const i=parseInt(t.getAttribute("data-suggestion-item"));u(r[i]),n.editor.focus()}function d(e,t,n){const r=n.getBoundingClientRect(),{x:o,y:s}=r;0===o&&0===s||(i?i[0].setContent(iC(e)):i=nC()("#mainContent",{getReferenceClientRect:()=>r,appendTo:()=>document.body,interactive:!0,sticky:!0,plugins:[tC.sticky],content:iC(e),trigger:"manual",showOnCreate:!0,theme:"dark",placement:"top-start",inertia:!0,duration:[400,200]}),rC(t),function(...e){const t=document.querySelector('[data-suggestion-id="suggestion-popup"]');e.forEach((({eventType:e,handler:n})=>function(e,t,n){e&&(e.removeEventListener(t,n),e.addEventListener(t,n))}(t,e,n)))}({eventType:"click",handler:c}))}function u(e){a({range:l,attrs:{id:e.id,label:e.name}})}return new CS({items:r,matcher:e,mentionClass:"suggestion__node",onEnter:({items:e,range:t,command:n,virtualNode:r})=>{s=e,l=t,o=0,d(s,o,r),a=n},onChange:({items:e,range:t,virtualNode:n})=>{s=e,l=t,o=0,d(s,o,n)},onExit:()=>{s=[],l=null,o=0,i&&(i[0].destroy(),i=null)},onKeyDown:({event:e})=>"ArrowUp"===e.key?(o>0&&(o-=1,rC(o)),!0):"ArrowDown"===e.key?(o<r.length-1&&(o+=1,rC(o)),!0):"Enter"===e.key?(u(r[o]),!0):" "===e.key&&(1===r.length&&u(r[0]),!0)})}(t,this))})),this.toolbar.headings.length>0&&e.push(new wS({levels:this.toolbar.headings})),this.toolbar.imageButton&&e.push(new MC),this.toolbar.linkButton&&(e.push(new NS),e.push(new IC)),this.toolbar.obscure&&e.push(new qS),this.toolbar.listButtons&&(e.push(new vS),e.push(new kS),e.push(new xS)),this.toolbar.table&&(e.push(new AS({resizable:!0})),e.push(new ES),e.push(new OS),e.push(new TS)),this.toolbar.insertAndDelete&&(e.push(new AC),e.push(new NC),this.diffMenu.buttons=[{label:"editor.diff.insert",command:e=>e.insert(),name:"insert"},{label:"editor.diff.delete",command:e=>e.delete(),name:"delete"}]),this.toolbar.mark&&(e.push(new PC),this.diffMenu.buttons.unshift({label:"editor.mark",command:e=>e.mark(),name:"mark"})),this.toolbar.textDecoration&&(e.push(new DS),e.push(new MS),e.push(new PS)),this.toolbar.strikethrough&&e.push(new IS),this.editor=new yw({editable:!this.readonly,extensions:e,content:this.currentValue,disableInputRules:!0,disablePasteRules:!0,onUpdate:()=>{this.setValue()},editorProps:{handleDrop:(e,t,n,r)=>{if(!r)return!0},handleClick:(e,t,n)=>{if("img"===n.target.tagName.toLowerCase()&&n.ctrlKey){const e=n.target;this.openUploadModal({editAltOnly:!0,currentAlt:e.getAttribute("alt")})}},transformPastedHTML:e=>{e=function(e){const t=/class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|office:wo/i.test(e),n=/class="OutlineElement/.test(e);if(!1===(t||n))return e;e=e.replace(/<meta[^>]*>/im,""),t&&(e=function(e){return e.replace(/( |\r|\n)/gim," ").replace(/<head>(.|\n|\r)*?<\/head>/im,"").replace(/<(\/)?(html|o:p)[^>]*>/gim,"").replace(/<!\[if !(.*?)\]>(.*?)<span(.*?)style='mso-list:Ignore'>(.*?)<!\[endif\]>/gim,((e,t,n,r,i)=>`<span data-val-${t}="${i.replace(/<span[^>]*>/gim,"").replace(/<\/span>/gim,"").replace(/( |\s|\\r|\\n|\r|\n)/gim,"")}" />`))}(e));const r=(new DOMParser).parseFromString(e,"text/html"),i=function(e,t){let n={};return(t?e.querySelectorAll("[class^=MsoList]"):e.querySelectorAll("li")).forEach((e=>{const r=t?function(e){const t=e.getAttribute("style").match(/mso-list:([^'|^"|^;]*)/i)[0],n=parseInt(t.match(/level\d+/i)[0].slice(5)),r=t.match(/lfo\d+/i)[0]||"",i=e.querySelector("[data-val-supportLists]")?.getAttribute("data-val-supportLists")||"";return{listId:r,indent:n,type:"ul",content:e.innerHTML,listStyleType:i}}(e):function(e){const t=parseInt(e.getAttribute("data-aria-level"));return{listId:parseInt(e.getAttribute("data-listid")),indent:t,type:e.parentElement.nodeName,content:e.innerHTML.replace(/ /gim," ")}}(e);!1===Object.keys(n).includes(r.listId.toString())&&(n[r.listId]=[]),e.setAttribute("data-list-indicator",r.listId),n[r.listId].push(r)})),t&&(n=function(e){return Object.values(e).forEach((t=>{let n=(0,g.v4)();const r=[n],i=[n];let o=0;e[t[0].listId].forEach(((e,s)=>{s>0&&t[s-1].indent<t[s].indent&&(n=(0,g.v4)(),o++,r[o]=n,i.push(n)),s>0&&t[s-1].indent>t[s].indent&&o--,e.sublistId=r[o],e.idx=s})),i.forEach((n=>{const r=t.filter((e=>e.sublistId===n));r.length>1&&r.map((e=>({...e,type:r[0].listStyleType===r[1].listStyleType?"ul":"ol"}))).forEach((n=>{e[t[0].listId][n.idx]=n})),1===r.length&&/(\d+|\w+)/i.test(r[0].listStyleType)&&"o"!==r[0].listStyleType&&(e[t[0].listId][r[0].idx].type="ol")}))})),e}(n)),n}(r,t);return Object.keys(i).forEach((e=>{const t=r.querySelector('[data-list-indicator="'+e+'"]');"ul"===t.parentElement.nodeName.toLowerCase()||"ol"===t.parentElement.nodeName.toLowerCase()?t.parentElement.before(RC(i[e])):t.before(RC(i[e])),r.querySelectorAll('[data-list-indicator="'+e+'"]').forEach((e=>{"ul"===e.parentElement.nodeName.toLowerCase()||"ol"===e.parentElement.nodeName.toLowerCase()?e.parentElement.remove():e.remove()}))})),r.documentElement.outerHTML.replace(/>/gim,">").replace(/</gim,"<").replace(/<div[^>]*?class="ListContainerWrapper[^>]*?><ul[^>]*?><\/ul><\/div>/gm,"").replace(/<ul[^>]*?><\/ul>/gm,"")}(e);const t=this.prefixClass("u-obscure"),n=function(e){const t=document.getElementsByTagName("body")[0],n=document.createElement("div");n.className=e,n.id="tmpIdToGetColor",t.appendChild(n);const r=document.getElementById("tmpIdToGetColor"),i=window.getComputedStyle(r).getPropertyValue("color");return t.removeChild(r),i}(t);let r=e;return e.includes(`span style="color: ${n}`)&&(r=e.replace(/(?:<meta [^>]*>\s*<span [^>]*>\s*)([^<]*?)(?:\s*<\/span>)/g,"$1"),r='<span class="'+t+'">'+r+"</span>"),!1===this.linkButton&&(r=r.replace(/<a[^>]*>(.*?)<\/a>/g,"$1")),r=r.replace(/<img.*?>/g,""),r}},onInit:({state:e,view:t})=>{t._props.handleScrollToSelection=VC}}),this.$root.$on("open-image-alt-modal",((e,t)=>{this.editingImage=t,this.openUploadModal({editAltOnly:!0,currentAlt:e.target.getAttribute("alt")})})),this.manuallyResetForm=""!==this.hiddenInput&&null!==this.$el.closest("form"),this.manuallyResetForm&&this.$el.closest("form").addEventListener("reset",this.resetEditor)},beforeDestroy(){this.editor&&(this.editor.destroy(),this.manuallyResetForm&&this.$el.closest("form").removeEventListener("reset",this.resetEditor))}};function BC(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function FC(e,t){return"number"==typeof e?e:e[t]}const LC=function(e){const t=e.parentNode;return t&&11===t.nodeType?t.host:t};function VC(e,t=e.coordsAtPos(e.state.selection.head),n=e.docView.dom){const r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument.defaultView;for(let s=n||e.dom;s;s=LC(s)){if(1!==s.nodeType)continue;const e=window.getComputedStyle(s,null),n="auto"===e["overflow-y"]||"scroll"===e["overflow-y"]||1!==s.nodeType,a=n?BC(o):s.getBoundingClientRect();let l=0,c=0;if(t.top<a.top+FC(r,"top")?c=-(a.top-t.top+FC(i,"top")):t.bottom>a.bottom-FC(r,"bottom")&&(c=t.bottom-a.bottom+FC(i,"bottom")),t.left<a.left+FC(r,"left")?l=-(a.left-t.left+FC(i,"left")):t.right>a.right-FC(r,"right")&&(l=t.right-a.right+FC(i,"right")),(l||c)&&(c&&(s.scrollTop+=c),l&&(s.scrollLeft+=l)),n)break}}const jC=qC;var zC=(0,l.Z)(jC,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"o-form__control-tiptap"},[0!==e.maxlength?t("div",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.counterText,expression:"counterText"}],class:e.prefixClass("lbl__hint")}):e._e(),e._v(" "),e.toolbar.linkButton?t("dp-link-modal",{ref:"linkModal",on:{insert:e.insertUrl}}):e._e(),e._v(" "),e.toolbar.imageButton?t("dp-upload-modal",{ref:"uploadModal",attrs:{"get-file-by-hash":e.routes.getFileByHash},on:{"insert-image":e.insertImage,"add-alt":e.addAltTextToImage,close:e.resetEditingImage}}):e._e(),e._v(" "),e._t("modal",null,{appendText:e.appendText,handleInsertText:e.handleInsertText}),e._v(" "),t("div",{class:e.prefixClass("row tiptap")},[t("div",{class:e.prefixClass("col")},[t("div",{class:[e.isFullscreen?"fullscreen":"",e.prefixClass("editor")]},[t("editor-menu-bar",{attrs:{editor:e.editor},scopedSlots:e._u([{key:"default",fn:function({commands:n,isActive:r,getMarkAttrs:i}){return t("div",{class:[e.readonly?e.prefixClass("readonly"):"",e.prefixClass("menubar")]},[t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.cut"),expression:"Translator.trans('editor.cut')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button","aria-label":e.Translator.trans("editor.cut"),disabled:e.readonly},on:{click:e.cut}},[t("i",{class:e.prefixClass("fa fa-scissors"),attrs:{"aria-hidden":"true"}})]),e._v("\n ❘\n "),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.undo"),expression:"Translator.trans('editor.undo')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button","aria-label":e.Translator.trans("editor.undo"),disabled:e.readonly},on:{click:n.undo}},[t("i",{class:e.prefixClass("fa fa-reply"),attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.redo"),expression:"Translator.trans('editor.redo')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button","aria-label":e.Translator.trans("editor.redo"),disabled:e.readonly},on:{click:n.redo}},[t("i",{class:e.prefixClass("fa fa-share"),attrs:{"aria-hidden":"true"}})]),e._v(" "),e.toolbar.textDecoration?[e._v("\n ❘\n "),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.bold"),expression:"Translator.trans('editor.bold')"}],class:[r.bold()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.bold"),disabled:e.readonly},on:{click:n.bold}},[t("i",{class:e.prefixClass("fa fa-bold"),attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.italic"),expression:"Translator.trans('editor.italic')"}],class:[r.italic()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.italic"),disabled:e.readonly},on:{click:n.italic}},[t("i",{class:e.prefixClass("fa fa-italic"),attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.underline"),expression:"Translator.trans('editor.underline')"}],class:[r.underline()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.underline"),disabled:e.readonly},on:{click:n.underline}},[t("i",{class:e.prefixClass("fa fa-underline"),attrs:{"aria-hidden":"true"}})])]:e._e(),e._v(" "),e.toolbar.strikethrough?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.strikethrough"),expression:"Translator.trans('editor.strikethrough')"}],class:[r.strike()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.strikethrough"),disabled:e.readonly},on:{click:n.strike}},[t("i",{class:e.prefixClass("fa fa-strikethrough"),attrs:{"aria-hidden":"true"}})]):e._e(),e._v(" "),e.toolbar.insertAndDelete?t("div",{class:e.prefixClass("display--inline-block relative")},[t("button",{class:[r.insert()||r.delete()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:function(t){return t.stopPropagation(),e.toggleSubMenu("diffMenu",!e.diffMenu.isOpen)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.toggleSubMenu("diffMenu",!1):null}}},[t("dp-icon",{staticClass:"u-valign--text-top",attrs:{icon:"highlighter"}}),e._v(" "),t("i",{class:e.prefixClass("fa fa-caret-down")})],1),e._v(" "),e.diffMenu.isOpen?t("div",{class:e.prefixClass("button_submenu")},e._l(e.diffMenu.buttons,(function(n,i){return t("button",{key:`diffMenu_${i}`,class:{"is-active":r[n.name]()},attrs:{type:"button",disabled:e.readonly},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(()=>{i===e.diffMenu.buttons.length-1&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(()=>{0===i&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments):null}],click:function(t){return t.stopPropagation(),e.executeSubMenuButtonAction(n,"diffMenu",!0)}}},[e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])})),0):e._e(),e._v("\n ❘\n ")]):e.toolbar.mark?t("div",{class:e.prefixClass("display--inline-block relative")},e._l(e.diffMenu.buttons,(function(n,i){return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans(n.label),expression:"Translator.trans(button.label)"}],key:`diffMenu_${i}`,class:[r[n.name]()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly,"aria-label":e.Translator.trans(n.label)},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(()=>{i===e.diffMenu.buttons.length-1&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(()=>{0===i&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments):null}],click:function(t){return t.stopPropagation(),e.executeSubMenuButtonAction(n,"diffMenu",!0)}}},[t("dp-icon",{staticClass:"u-valign--text-top",attrs:{icon:"highlighter"}})],1)})),0):e._e(),e._v(" "),e.toolbar.listButtons?[t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.unordered.list"),expression:"Translator.trans('editor.unordered.list')"}],class:[r.bullet_list()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.unordered.list"),disabled:e.readonly},on:{click:n.bullet_list}},[t("i",{class:e.prefixClass("fa fa-list-ul")})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.ordered.list"),expression:"Translator.trans('editor.ordered.list')"}],class:[r.ordered_list()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.ordered.list"),disabled:e.readonly},on:{click:n.ordered_list}},[t("i",{class:e.prefixClass("fa fa-list-ol")})]),e._v("\n ❘\n ")]:e._e(),e._v(" "),e.toolbar.headings.length>0?[e._l(e.toolbar.headings,(function(i){return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.heading.level",{level:i}),expression:"Translator.trans('editor.heading.level', {level: heading})"}],key:"heading_"+i,class:[r.heading({level:i})?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:function(e){return n.heading({level:i})}}},[e._v("\n "+e._s(`H${i}`)+"\n ")])})),e._v("\n ❘\n ")]:e._e(),e._v(" "),e.obscureEnabled?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("obscure.title"),expression:"Translator.trans('obscure.title')"}],class:[r.obscure()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:n.obscure}},[t("i",{class:e.prefixClass("fa fa-pencil-square"),attrs:{"aria-hidden":"true"}})]):e._e(),e._v(" "),e.toolbar.linkButton?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.link.edit.insert"),expression:"Translator.trans('editor.link.edit.insert')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button"},on:{click:function(t){t.stopPropagation(),e.showLinkPrompt(n.link,i("link"))}}},[t("i",{class:e.prefixClass("fa fa-link")})]):e._e(),e._v(" "),e.toolbar.imageButton?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("image.insert"),expression:"Translator.trans('image.insert')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button",disabled:e.readonly},on:{click:function(t){return t.stopPropagation(),e.openUploadModal(null)}}},[t("i",{class:e.prefixClass("fa fa-picture-o")})]):e._e(),e._v(" "),e.toolbar.table?t("div",{class:e.prefixClass("display--inline-block relative")},[t("button",{class:[e.tableMenu.isOpen?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:function(t){return t.stopPropagation(),e.toggleSubMenu("tableMenu",!e.tableMenu.isOpen)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.toggleSubMenu("tableMenu",!1):null}}},[t("i",{class:e.prefixClass("fa fa-table")}),e._v(" "),t("i",{class:e.prefixClass("fa fa-caret-down")})]),e._v(" "),e.tableMenu.isOpen?t("div",{class:e.prefixClass("button_submenu")},e._l(e.tableMenu.buttons,(function(n,r){return t("button",{key:`tableMenu_${r}`,attrs:{type:"button",disabled:e.readonly},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(()=>{r===e.tableMenu.buttons.length-1&&e.toggleSubMenu("tableMenu",!1)}).apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(()=>{0===r&&e.toggleSubMenu("tableMenu",!1)}).apply(null,arguments):null}],click:function(t){return t.stopPropagation(),e.executeSubMenuButtonAction(n,"tableMenu")}}},[e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])})),0):e._e()]):e._e(),e._v(" "),e.toolbar.fullscreenButton?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.fullscreen"),expression:"Translator.trans('editor.fullscreen')"}],class:[e.isFullscreen?e.prefixClass("is-active"):"",e.prefixClass("menubar__button float--right")],attrs:{type:"button","aria-label":e.Translator.trans("editor.fullscreen")},on:{click:e.fullscreen}},[t("i",{class:e.prefixClass("fa fa-arrows-alt"),attrs:{"aria-hidden":"true"}})]):e._e(),e._v(" "),e._t("button")],2)}}],null,!0)}),e._v(" "),e.editor?t("editor-content",{class:e.prefixClass("editor__content overflow-hidden"),attrs:{"data-cy":`editor${e.editorId}`,editor:e.editor}}):e._e(),e._v(" "),""!==e.hiddenInput?t("input",{class:[e.required?e.prefixClass("is-required"):"",e.prefixClass("tiptap__input--hidden")],attrs:{"data-dp-validate-if":e.dataDpValidateIf||!1,type:"hidden",id:e.hiddenInput,name:e.hiddenInput,"data-dp-validate-maxlength":e.maxlength},domProps:{value:e.hiddenInputValue}}):e._e(),e._v(" "),e.isFullscreen?e._e():t("i",{class:e.prefixClass("fa fa-angle-down resizeVertical"),attrs:{"aria-hidden":"true",draggable:"true"},on:{mousedown:e.resizeVertically}})],1)])])],2)}),[],!1,null,null,null);const HC=zC.exports,UC=require("vuex"),WC={name:"DpNotifyMessage",mixins:[V.gH],props:{message:{type:Object,required:!0},hideTimer:{type:Number,required:!1,default:2e4}},data:()=>({messageId:"",icons:{info:"fa-info-circle",warning:"fa-exclamation-triangle",error:"fa-exclamation-circle",confirm:"fa-check-circle",dev:"fa-info-circle"}}),computed:{messageClass(){return"c-notify__message--"+this.message.type},messageIcon(){return this.icons[this.message.type]}},methods:{hide(){this.$emit("dp-notify-remove",this.message)}},mounted(){"error"!==this.message.type&&setTimeout((()=>{this.hide()}),this.hideTimer)}},ZC=(0,l.Z)(WC,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("c-notify__message "+e.messageClass)},[t("i",{class:e.prefixClass("c-notify__icon c-notify__closer fa fa-times-circle cursor-pointer"),attrs:{"aria-hidden":"true"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.hide.apply(null,arguments)}}}),e._v(" "),t("div",{class:e.prefixClass("cf")},[t("i",{class:e.prefixClass("c-notify__icon fa u-mt-0_125 u-mr-0_25 float--left "+e.messageIcon)}),e._v(" "),t("div",{class:e.prefixClass("u-ml")},[e._v("\n "+e._s(e.message.text)+"\n "),e.message.linkUrl?t("a",{class:e.prefixClass("c-notify__link u-mt-0_25"),attrs:{href:e.message.linkUrl,"data-cy":"messageLink"}},[e._v("\n "+e._s(e.message.linkText||e.message.linkUrl)+"\n ")]):e._e()])])])}),[],!1,null,null,null).exports,KC={name:"DpNotifyContainer",components:{DpNotifyMessage:ZC},mixins:[V.gH],props:{notifications:{type:[Object,Array],required:!1,default:()=>[]}},data:()=>({isVisible:!1}),computed:{...(0,UC.mapState)("notify",["messages"]),liveState(){return this.isVisible?"polite":"off"},messageRole(){return this.isVisible?"message":"none"}},methods:{...(0,UC.mapMutations)("notify",["add","remove"]),init(){for(const e in this.notifications)if((0,r.Q$)(this.notifications,e)){const t=this.notifications[e];let n=0;const r=t.length;let i;for(;n<r;n++)i=t[n],"string"==typeof i&&(i={message:i}),this.add({type:e,text:i.message||"",linkUrl:i.linkUrl||"",linkText:i.linkText||""})}document.addEventListener("visibilitychange",(()=>{this.isVisible=!document.hidden}))},removeMessage(e){this.remove(e)}},created(){this.init()}},JC=KC,GC=(0,l.Z)(JC,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("c-notify"),attrs:{"aria-live":e.liveState}},[t("transition-group",{attrs:{name:"transition-slide-up"}},e._l(e.messages,(function(n){return t("dp-notify-message",{key:n.uid,attrs:{message:n,role:e.messageRole},on:{"dp-notify-remove":e.removeMessage}})})),1)],1)}),[],!1,null,null,null).exports,YC=(0,l.Z)({name:"DpObscure"},(function(){var e=this;return(0,e._self._c)("span",{staticClass:"u-obscure",attrs:{title:e.Translator.trans("obscure.title")}},[e._t("default")],2)}),[],!1,null,null,null).exports,XC={name:"DpSwitcher",props:{active:{required:!1,type:Boolean,default:!0},inputId:{required:!0,type:String}},methods:{toggle(){this.$emit("input",!1===this.active)}}},QC=(0,l.Z)(XC,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"o-switcher"},[t("input",{attrs:{type:"checkbox",id:e.inputId},on:{change:e.toggle}}),e._v(" "),t("label",{attrs:{for:e.inputId}},[t("span",{staticClass:"o-switcher__option float--left",class:{"o-switcher__option--checked":e.active}},[e._t("option1")],2),e._v(" "),t("span",{staticClass:"o-switcher__option float--right",class:{"o-switcher__option--checked":!e.active},attrs:{"data-cy":"fragmentTab"}},[e._t("option2")],2)])])}),[],!1,null,null,null).exports,ek={name:"DpTableCard",props:{open:{type:Boolean,required:!1,default:!1}},data(){return{isOpen:this.open}},watch:{open(e){this.isOpen=e}},methods:{toggle(e){this.isOpen=void 0!==e?e:!1===this.isOpen}}},tk=(0,l.Z)(ek,(function(){var e=this,t=e._self._c;return t("li",{class:{"is-expanded":e.isOpen}},[t("div",{attrs:{"data-add-animation":""}},[e._t("header")],2),e._v(" "),t("transition",{attrs:{name:"fading"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"u-p-0_5"},[e._t("default")],2)])],1)}),[],!1,null,null,null).exports,nk={name:"DpTableCardListHeader",components:{DpCheckbox:fi,DpSearchField:oa,DpStickyElement:eo},props:{items:{type:Array,required:!0},searchable:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:""},selectable:{type:Boolean,default:!1}}},rk=(0,l.Z)(nk,(function(){var e=this,t=e._self._c;return t("dp-sticky-element",[e.searchable?t("dp-search-field",{staticClass:"layout__item u-1-of-2 u-mb-0_5",attrs:{placeholder:e.searchPlaceholder},on:{reset:function(t){return e.$emit("reset-search")},search:t=>e.$emit("search",t)}}):e._e(),e._t("header-buttons"),e._v(" "),t("div",{staticClass:"layout__item border--bottom"},[e.selectable?t("dp-checkbox",{staticClass:"display--inline-block width-20 u-pv-0_25",attrs:{id:"selectAll"},on:{change:t=>e.$emit("select-all",t)}}):e._e(),e._l(e.items,(function(n,r){return t("div",{key:r,staticClass:"layout__item weight--bold u-pv-0_5",class:[n.classes?n.classes:"",n.width?n.width:""]},[e._v("\n "+e._s(n.label)+"\n ")])}))],2)],2)}),[],!1,null,null,null).exports,ik={name:"DpVideoPlayer",props:{ariaLabelledby:{type:[String,Boolean],required:!1,default:!1},iconUrl:{type:String,required:!0},id:{type:String,required:!0},poster:{type:String,required:!1,default:""},sources:{required:!1,validator:e=>Array.isArray(e)&&e.filter((e=>e.src&&e.type)).length===e.length,default:()=>[]},tracks:{required:!1,validator:e=>Array.isArray(e)&&e.filter((e=>e.kind&&e.srclang&&e.label&&e.src)).length===e.length,default:()=>[]}},data:()=>({player:{}}),created(){this.player=s.e(642).then(s.t.bind(s,1642,23))},mounted(){this.player.then((e=>{this.player=new e.default("#"+this.id,{iconUrl:this.iconUrl,controls:["play-large","play","progress","duration","mute","volume","captions","settings","download","fullscreen"]})}))}},ok=(0,l.Z)(ik,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"relative"},[t("video",{attrs:{"aria-labelledby":e.ariaLabelledby,id:e.id,playsinline:"","data-poster":e.poster}},[e._l(e.sources,(function(e){return t("source",{key:e.src,attrs:{src:e.src,type:e.type}})})),e._v(" "),e._l(e.tracks,(function(e){return t("track",{key:e.src,attrs:{src:e.src,srclang:e.srclang,label:e.label,kind:e.kind,default:!!e.default}})}))],2)])}),[],!1,null,null,null).exports;var sk=s(5647),ak=s(405);const lk=(e,t)=>{document.dispatchEvent(new CustomEvent("customValidationPassed",{detail:{form:e}})),"function"==typeof e.submit&&(t&&function(e,t,n){const r=document.createElement("input"),i={type:"hidden",name:t,value:n,"data-form-actions-added":"1"};Object.keys(i).forEach((e=>{r.setAttribute(e,i[e])})),e.appendChild(r)}(e,t,t),e.submit())};function ck(e,t){e.addEventListener("click",(n=>{const r=e.dataset.dpValidateCallback?e.dataset.dpValidateCallback:"",i=e.dataset.dpValidateTranskey?e.dataset.dpValidateTranskey:"",o=e.getAttribute("name"),s=e.hasAttribute("data-dp-validate-capture-click"),a=(0,ak.Z)(t);if(n.preventDefault(),!1===a.valid){s&&n.stopImmediatePropagation();const e=a.invalidFields.filter((e=>e.dataset.dpValidateError));e.forEach((e=>{dplan.notify.notify("error",Translator.trans(e.validationMessage))})),(0===e.length||e.length<a.invalidFields)&&dplan.notify.notify("error",Translator.trans("error.mandatoryfields.no_asterisk")),(0,sk.KG)(a.invalidFields[0]),document.dispatchEvent(new CustomEvent("customValidationFailed",{detail:{form:t}}))}else"dpconfirm"===r&&!1===window.dpconfirm(i,!0)?n.preventDefault():lk(t,o)}))}var dk=s(9436);function uk(e){const t=e;new MutationObserver((e=>{e.forEach((e=>{switch(e.type){case"childList":if(e.addedNodes.length>0){const t=Array.from(e.addedNodes).filter((e=>1===e.nodeType))[0];if(!t)return!1;(0,sk.ph)(t)?(0,dk.g)(t):t.children.length>0&&(0,sk.e7)(t).length>0&&(0,sk.e7)(t).forEach((e=>{(0,dk.g)(e)}))}break;case"attributes":if(!("INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||"required"!==e.attributeName&&"pattern"!==e.attributeName))if(null===e.oldValue)(0,dk.g)(e.target);else if(function(e){let t=!1;const n=e.target;return"required"===e.attributeName?t="required"===e.oldValue&&!1===n.hasAttribute("required"):"pattern"===e.attributeName&&(t=e.oldValue&&(!1===n.hasAttribute("pattern")||n.getAttribute("pattern")===e.oldValue)),t}(e)){const t=e.target.cloneNode();t.classList.remove(sk.YQ),t.setCustomValidity(""),e.target.parentNode.replaceChild(t,e.target)}}}))})).observe(t,{attributes:!0,attributeOldValue:!0,childList:!0,subtree:!0})}var pk=s(5322);const hk={inserted(e,t,n){if(!t.value)return;const r=n.componentInstance,i=r.groupValues?r.options.some((e=>e[r.groupValues].length>0)):r.options.length>0;e.setAttribute("data-dp-validate-is-valid",!i),e.addEventListener("mouseup",(t=>{t.stopPropagation();const n=t=>{document.removeEventListener("mouseup",n),(0,pk.Z)(e)};document.addEventListener("mouseup",n)}))},componentUpdated(e,t,n){if(!t.value)return;const r=n.componentInstance,i=r.groupValues?r.options.some((e=>e[r.groupValues].length>0)):r.options.length>0;let o=function(e){if(!e)return!1;let t;return Array.isArray(e)?t=0!==e.length&&(1!==e.length||("object"==typeof e[0]?""!==e[0].id:""!==e[0])):"object"==typeof e?t=null!==e&&Object.keys(e).length>0&&""!==e.id:"string"==typeof e&&(t=""!==e),t}(r.value);!1===i&&(o=!0),e.setAttribute("data-dp-validate-is-valid",o)}},fk=hk;var mk=s(3656),gk=s(4299),yk=s(702),vk=s(3178),bk=s(8767);const wk={ActionMenu:function(){const e=document.querySelectorAll("[data-actionmenu]"),t=[];for(let n=0;n<e.length;n++)t.push(new M(e[n]))},assignHandlerForTrigger:ck,assignHandlersForInputs:dk.W,assignObserver:uk,attributes:t,Confirm:function(){window.dpconfirm=function(e,t){return void 0!==t&&t&&(e=decodeURI(e)),confirm(e)}},convertSize:O,checkResponse:_,dataTableSearch:i,DATE_FORMAT_LONG:r.OC,debounce:r.Ds,deepMerge:r.RH,Detabinator:N,formatDate:r.p6,formatBytes:r.td,toggleFullscreen:r.V9,bindFullScreenChange:r.KQ,isActiveFullScreen:r.ts,getAnimationEventName:r.c8,getCssVariable:function(e){return getComputedStyle(document.documentElement).getPropertyValue(e)},getFileInfo:function(e="",t={}){const n={sizeScale:"KB",separator:":",...t},r=e.split(n.separator);let i={};var o;return i=r.length>0?{name:r[0],hash:r[1],size:O(n.sizeScale,r[2]),mimeType:(o=r[3],(0,f.Z)(E,o)?E[o]:o),id:r[1]||""}:{name:r[0],hash:r[0],size:r[0],mimeType:r[0],id:r[0]},i},getFileTypes:T,getScrollTop:r.cx,handleResponseMessages:k,highlightActiveLinks:function(e){const t=document.querySelectorAll(e);window.addEventListener("hashchange",(function(){for(let e=0;e<t.length;e++)t[e].href.match(/(#.*)/)[1]===window.location.hash?t[e].className=(0,D.Z)("o-link--active"):t[e].className=(0,D.Z)("o-link--default")}));const n=new CustomEvent("hashchangeevent");window.dispatchEvent(n)},hasOwnProp:r.Q$,hasPermission:r.Fs,hasAllPermissions:r.wP,hasAnyPermissions:r.ec,sortAlphabetically:r.a,throttle:r.P2,uniqueArrayByObjectKey:r.GD,toDate:r.ZU,length:e,dpApi:C,dpRpc:function(e,t,n=null){const r={jsonrpc:"2.0",method:e,id:null===n?(0,g.v4)():n,params:t};return S({method:"post",url:Routing.generate("rpc_generic_post"),data:r})},dpValidate:function(e){let t=[];e?t.push(document.querySelector(`[data-dp-validate=${e}]`)):t=Array.from(document.querySelectorAll("[data-dp-validate]")),t.length>0&&t.forEach((e=>{(0,dk.W)(e),uk(e);const t=e.querySelector('[type="submit"]:not([data-skip-validation])')?Array.from(e.querySelectorAll('[type="submit"]:not([data-skip-validation])')):Array.from(e.querySelectorAll(".submit:not([data-skip-validation])"));t.length>0&&t.forEach((t=>ck(t,e)))}))},dpValidateMultiselectDirective:fk,DpButton:ni,DpDetails:Ts,DpIcon:Yr,DpInput:ts,DpLabel:ui.default,DpLoading:Mi,DpAccordion:u,DpAnonymizeText:jS,DpAutocomplete:Zr,DpBulkEditHeader:HS,DpButtonIcon:ii,DpButtonRow:si,DpCard:di,DpChangeStateAtDate:WS,DpCheckbox:fi,DpCheckboxGroup:gi,DpColumnSelector:Si,DpContextualHelp:li,DpCopyPasteButton:KS,DpDashboardTaskCard:GS,DpDataTable:Wi,DpDataTableExtended:io,DpDatepicker:Wo,DpDateRangePicker:Ko,DpDatetimePicker:Es,DpDraggable:Oi,DpEditableList:eC,DpEditor:HC,DpFlyout:wi,DpFormRow:Ms,DpHeightLimit:Rs,DpInlineNotification:Ls,DpModal:zs,DpMultiselect:Zs,DpMultistepNav:Js,DpNotifyContainer:GC,DpNotifyMessage:ZC,DpObscure:YC,DpPager:Xs,DpProgressBar:ea,DpRadio:ra,DpResettableInput:rs,DpSearchField:oa,DpSelect:la,DpSelectPageItemCount:Ji,DpSkeletonBox:da,DpSlidebar:pa,DpSlidingPagination:Xi,DpSplitButton:fa,DpStickyElement:eo,DpSwitcher:QC,DpTab:ga,DpTableCard:tk,DpTableCardListHeader:rk,DpTabs:va,DpTextArea:xa,DpTextWrapper:Ps,DpTimePicker:_s,DpToggle:Ca,DpToggleForm:_a,DpTooltipIcon:Ea,DpTransitionExpand:c,DpTreeList:Vh,DpUploadFiles:CC,DpVideoPlayer:ok,getFileIdsByHash:function(e,t){return C.get(t,{filter:{hasHash:{condition:{operator:"IN",path:"hash",value:e}}}},{serialize:!0}).then((({data:e})=>e.data.map((e=>e.id))))},CleanHtml:n.J7,prefixClassMixin:V.gH,dpSelectAllMixin:V.fE,dpValidateMixin:V.cR,tableSelectAllItems:V.Be,Tooltip:n.u,VPopover:n.Kr,exactlengthHint:r.f5,makeFormPost:function(e,t){const n=new FormData;for(const[t,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>n.append(t+"[]",e))):n.append(t,r);return C({method:"post",url:t,data:n,headers:{"Content-Type":"multipart/form-data"}})},MatchMedia:I,maxlengthHint:r.T8,minlengthHint:r.C4,mimeTypes:E,SideNav:P,Stickier:R,Sticky:function(){const e=document.querySelectorAll("[data-sticky]");e.length>0&&console.warn("Found usage of deprecated stickier implementation, use <DpStickyElement> instead");const t=[];return Array.from(e).forEach((e=>{const n=q(e,"context"),r=q(e,"container"),i=parseInt(e.getAttribute("data-sticky-offset")||0),o=e.getAttribute("data-sticky")||null;t.push(new R(e,n,i,"top",o,r))})),t},TableWrapper:function(){const e=document.querySelectorAll("[data-table-wrapper]");for(let t=0;t<e.length;t++){const n=e[t],r=(0,D.Z)(n.dataset.tableWrapper);L(n.children,"table").forEach((e=>{const t=F(r);B(e,t)}))}},prefixClass:r.o4,unbindFullScreenChange:r.Wz,validateDatepicker:mk.Z,validateEmail:gk.Z,validateFieldset:yk.Z,validateForm:ak.Z,validateInput:vk.Z,validateMultiselect:pk.Z,validateTiptap:bk.Z}})(),a.default})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.__demos_europe_demosplan_ui=t():e.__demos_europe_demosplan_ui=t()}(self,(()=>(()=>{var e,t,n,r,i={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(4372),s=n(5327),a=n(4097),l=n(4109),c=n(7985),d=n(7874),u=n(2648),p=n(644),h=n(205);e.exports=function(e){return new Promise((function(t,n){var f,m=e.data,g=e.headers,y=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(w+":"+x)}var S=a(e.baseURL,e.url);function k(){if(b){var r="getAllResponseHeaders"in b?l(b.getAllResponseHeaders()):null,o={data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};i((function(e){t(e),v()}),(function(e){n(e),v()}),o),b=null}}if(b.open(e.method.toUpperCase(),s(S,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=k:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(k)},b.onabort=function(){b&&(n(new u("Request aborted",u.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new u(t,r.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(S))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;C&&(g[e.xsrfHeaderName]=C)}"setRequestHeader"in b&&r.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),y&&"json"!==y&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){b&&(n(!e||e&&e.type?new p:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),m||(m=null);var _=h(S);_&&-1===["http","https","file"].indexOf(_)?n(new u("Unsupported protocol "+_+":",u.ERR_BAD_REQUEST,e)):b.send(m)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),s=n(7185),a=function e(t){var n=new o(t),a=i(o.prototype.request,n);return r.extend(a,o.prototype,n),r.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(5546));a.Axios=o,a.CanceledError=n(644),a.CancelToken=n(4972),a.isCancel=n(6502),a.VERSION=n(7288).version,a.toFormData=n(7675),a.AxiosError=n(2648),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=n(8713),a.isAxiosError=n(6268),e.exports=a,e.exports.default=a},4972:(e,t,n)=>{"use strict";var r=n(644);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},644:(e,t,n)=>{"use strict";var r=n(2648);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(4867).inherits(i,r,{__CANCEL__:!0}),e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),s=n(3572),a=n(7185),l=n(4097),c=n(4875),d=c.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var u=[s,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(l),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var p=t;r.length;){var h=r.shift(),f=r.shift();try{p=h(p)}catch(e){f(e);break}}try{o=s(p)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},u.prototype.getUri=function(e){e=a(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(a(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}u.prototype[e]=t(),u.prototype[e+"Form"]=t(!0)})),e.exports=u},2648:(e,t,n)=>{"use strict";var r=n(4867);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(i,s),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,n,s,a,l){var c=Object.create(o);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),i.call(c,e.message,t,n,s,a),c.name=e.name,l&&Object.assign(c,l),c},e.exports=i},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),s=n(5546),a=n(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(2648);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5546);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},5546:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),o=n(2648),s=n(7874),a=n(7675),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d,u={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(d=n(5448)),d),transformRequest:[function(e,t){if(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,o=r.isObject(e),s=t&&t["Content-Type"];if((n=r.isFileList(e))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,l&&new l)}return o||"application/json"===s?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(l)})),e.exports=u},7874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},1623:e=>{e.exports=null},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},205:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,s){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+s);n.push(o),r.forEach(o,(function(n,o){if(!r.isUndefined(n)){var a,l=s?s+"."+o:o;if(n&&!s&&"object"==typeof n)if(r.endsWith(o,"{}"))n=JSON.stringify(n);else if(r.endsWith(o,"[]")&&(a=r.toArray(n)))return void a.forEach((function(e){!r.isUndefined(e)&&t.append(l,i(e))}));e(n,l)}})),n.pop()}else t.append(s,i(o))}(e),t}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i=n(2648),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new i(o(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var s=r[o],a=t[s];if(a){var l=e[s],c=void 0===l||a(l,s,e);if(!0!==c)throw new i("option "+s+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+s,i.ERR_BAD_OPTION)}},validators:o}},4867:(e,t,n)=>{"use strict";var r,i=n(1849),o=Object.prototype.toString,s=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var d=a("ArrayBuffer");function u(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),f=a("File"),m=a("Blob"),g=a("FileList");function y(e){return"[object Function]"===o.call(e)}var v=a("URLSearchParams");function b(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var w,x=(w="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return w&&e instanceof w});e.exports={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||y(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:p,isUndefined:c,isDate:h,isFile:f,isBlob:m,isFunction:y,isStream:function(e){return u(e)&&y(e.pipe)},isURLSearchParams:v,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,s={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)s[o=r[i]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:x,isFileList:g}},1924:(e,t,n)=>{"use strict";var r=n(210),i=n(5559),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),i=n(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(s,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(r,s,arguments);return l&&c&&l(t,"length").configurable&&c(t,"length",{value:1+d(0,e.length-(arguments.length-1))}),t};var u=function(){return a(r,o,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u},285:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},a=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},u={A:[i,function(e){this.afternoon=d(e,!1)}],a:[i,function(e){this.afternoon=d(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:l,ZZ:l};function p(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,l=0;l<a;l+=1){var c=s[l],d=u[c],p=d&&d[0],h=d&&d[1];s[l]=h?{regex:p,parser:h}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,l=i.parser,c=e.slice(r),d=o.exec(c)[0];l.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var l=!0===s[2],c=!0===s[3],d=l||c,u=s[2];c&&(u=s[2]),o=this.$locale(),!l&&u&&(o=n.Ls[u]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=p(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,l=r.minutes,c=r.seconds,d=r.milliseconds,u=r.zone,h=new Date,f=s||(i||o?1:h.getDate()),m=i||h.getFullYear(),g=0;i&&!o||(g=o>0?o-1:h.getMonth());var y=a||0,v=l||0,b=c||0,w=d||0;return u?new Date(Date.UTC(m,g,f,y,v,b,w+60*u.offset*1e3)):n?new Date(Date.UTC(m,g,f,y,v,b,w)):new Date(m,g,f,y,v,b,w)}catch(e){return new Date("")}}(t,a,r),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var h=a.length,f=1;f<=h;f+=1){s[1]=a[f-1];var m=n.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}f===h&&(this.$d=new Date(""))}else i.call(this,e)}}}()},1102:(e,t,n)=>{"use strict";var r=n(6291),i=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=i,i.eval=o(EvalError),i.range=o(RangeError),i.reference=o(ReferenceError),i.syntax=o(SyntaxError),i.type=o(TypeError),i.uri=o(URIError),i.create=o},6291:e=>{!function(){var t;function n(e){for(var t,n,r,i,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",d=!1,u=!1,p=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],d)switch(d=!1,"."==t?(u=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(u=!0,t=e[a+=2]):u=!0,i=h(),t){case"b":c+=parseInt(p(),10).toString(2);break;case"c":c+="string"==typeof(n=p())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(p(),10);break;case"f":r=String(parseFloat(p()).toFixed(i||6)),c+=u?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(p());break;case"o":c+="0"+parseInt(p(),10).toString(8);break;case"s":c+=p();break;case"x":c+="0x"+parseInt(p(),10).toString(16);break;case"X":c+="0x"+parseInt(p(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?d=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},7648:e=>{"use strict";var t=Array.prototype.slice,n=Object.prototype.toString;e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==n.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var i,o=t.call(arguments,1),s=Math.max(0,r.length-o.length),a=[],l=0;l<s;l++)a.push("$"+l);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var n=r.apply(this,o.concat(t.call(arguments)));return Object(n)===n?n:this}return r.apply(e,o.concat(t.call(arguments)))})),r.prototype){var c=function(){};c.prototype=r.prototype,i.prototype=new c,c.prototype=null}return i}},8612:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new s},d=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,u=n(1405)(),p=Object.getPrototypeOf||function(e){return e.__proto__},h={},f="undefined"==typeof Uint8Array?r:p(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":u?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?p(p([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?p((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?p((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?p(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":d,"%TypedArray%":f,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=p(i.prototype))}return m[t]=n,n},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(8612),b=n(7642),w=v.call(Function.call,Array.prototype.concat),x=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),k=v.call(Function.call,String.prototype.slice),C=v.call(Function.call,RegExp.prototype.exec),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,E=function(e,t){var n,r=e;if(b(y,r)&&(r="%"+(n=y[r])[0]+"%"),b(m,r)){var o=m[r];if(o===h&&(o=g(r)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=k(e,0,1),n=k(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return S(e,_,(function(e,t,n,i){r[r.length]=n?S(i,A,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=E("%"+r+"%",t),a=o.name,c=o.value,d=!1,u=o.alias;u&&(r=u[0],x(n,w([0,1],u)));for(var p=1,h=!0;p<n.length;p+=1){var f=n[p],g=k(f,0,1),y=k(f,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==f&&h||(d=!0),b(m,a="%"+(r+="."+f)+"%"))c=m[a];else if(null!=c){if(!(f in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&p+1>=n.length){var v=l(c,f);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[f]}else h=b(c,f),c=c[f];h&&!d&&(m[a]=c)}}return c}},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7642:(e,t,n)=>{"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},7802:e=>{function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];"object"!=typeof r||Object.isFrozen(r)||t(r)})),e}var n=t,r=t;n.default=r;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const a=e=>!!e.kind;class l{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!a(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){a(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{c._collapse(e)})))}}class d extends c{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function u(e){return e?"string"==typeof e?e:e.source:null}const p=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,h="[a-zA-Z]\\w*",f="[a-zA-Z_]\\w*",m="\\b\\d+(\\.\\d+)?",g="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",y="\\b(0b[01]+)",v={begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[v]},w={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[v]},x={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},S=function(e,t,n={}){const r=s({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(x),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},k=S("//","$"),C=S("/\\*","\\*/"),_=S("#","$"),A={className:"number",begin:m,relevance:0},E={className:"number",begin:g,relevance:0},O={className:"number",begin:y,relevance:0},T={className:"number",begin:m+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},D={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]}]},M={className:"title",begin:h,relevance:0},N={className:"title",begin:f,relevance:0},I={begin:"\\.\\s*"+f,relevance:0};var P=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:h,UNDERSCORE_IDENT_RE:f,NUMBER_RE:m,C_NUMBER_RE:g,BINARY_NUMBER_RE:y,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>u(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),s({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:v,APOS_STRING_MODE:b,QUOTE_STRING_MODE:w,PHRASAL_WORDS_MODE:x,COMMENT:S,C_LINE_COMMENT_MODE:k,C_BLOCK_COMMENT_MODE:C,HASH_COMMENT_MODE:_,NUMBER_MODE:A,C_NUMBER_MODE:E,BINARY_NUMBER_MODE:O,CSS_NUMBER_MODE:T,REGEXP_MODE:D,TITLE_MODE:M,UNDERSCORE_TITLE_MODE:N,METHOD_GUARD:I,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function $(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function R(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=$,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function B(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>u(e))).join("|")+")"}(...e.illegal))}function q(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const L=["of","and","for","in","not","or","if","then","parent","list","value"],V="keyword";function j(e,t,n=V){const r={};return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,j(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,z(n[0],n[1])]}))}}function z(e,t){return t?Number(t):function(e){return L.includes(e.toLowerCase())}(e)?0:1}function H(e,{plugins:t}){function n(t,n){return new RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=u(e),i="";for(;r.length>0;){const e=p.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=s(e.classNameAliases||{}),function t(r,o){const a=r;if(r.isCompiled)return a;[q].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[R,B,F].forEach((e=>e(r,o))),r.isCompiled=!0;let l=null;if("object"==typeof r.keywords&&(l=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=j(r.keywords,e.case_insensitive)),r.lexemes&&l)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l=l||r.lexemes||/\w+/,a.keywordPatternRe=n(l,!0),o&&(r.begin||(r.begin=/\B|\b/),a.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(a.endRe=n(r.end)),a.terminatorEnd=u(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(a.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return s(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:U(e)?s(e,{starts:e.starts?s(e.starts):null}):Object.isFrozen(e)?s(e):e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,a)})),r.starts&&t(r.starts,o),a.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function U(e){return!!e&&(e.endsWithParent||U(e.starts))}function W(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,o(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const Z={"after:highlightElement":({el:e,result:t,text:n})=>{const r=J(e);if(!r.length)return;const i=document.createElement("div");i.innerHTML=t.value,t.value=function(e,t,n){let r=0,i="";const s=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function l(e){i+="<"+K(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+o(e.value)+'"'})).join("")+">"}function c(e){i+="</"+K(e)+">"}function d(e){("start"===e.event?l:c)(e.node)}for(;e.length||t.length;){let t=a();if(i+=o(n.substring(r,t[0].offset)),r=t[0].offset,t===e){s.reverse().forEach(c);do{d(t.splice(0,1)[0]),t=a()}while(t===e&&t.length&&t[0].offset===r);s.reverse().forEach(l)}else"start"===t[0].event?s.push(t[0].node):s.pop(),d(t.splice(0,1)[0])}return i+o(n.substr(r))}(r,J(i),n)}};function K(e){return e.nodeName.toLowerCase()}function J(e){const t=[];return function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),K(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}const G={},Y=e=>{console.error(e)},X=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Q=(e,t)=>{G[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),G[`${e}/${t}`]=!0)},ee=o,te=s,ne=Symbol("nomatch");var re=function(e){const t=Object.create(null),r=Object.create(null),o=[];let s=!0;const a=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:d};function p(e){return u.noHighlightRe.test(e)}function h(e,t,n,r){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language,r=void 0):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t);const s={code:i,language:o};A("before:highlight",s);const a=s.result?s.result:f(s.language,s.code,n,r);return a.code=s.code,A("after:highlight",a),a}function f(e,n,r,a){function c(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){null!=C.subLanguage?function(){if(""===E)return;let e=null;if("string"==typeof C.subLanguage){if(!t[C.subLanguage])return void A.addText(E);e=f(C.subLanguage,E,!0,_[C.subLanguage]),_[C.subLanguage]=e.top}else e=m(E,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=e.relevance),A.addSublanguage(e.emitter,e.language)}():function(){if(!C.keywords)return void A.addText(E);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(E),n="";for(;t;){n+=E.substring(e,t.index);const r=c(C,t);if(r){const[e,i]=r;if(A.addText(n),n="",O+=i,e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;A.addKeyword(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(E)}n+=E.substr(e),A.addText(n)}(),E=""}function p(e){return e.className&&A.openNode(w.classNameAliases[e.className]||e.className),C=Object.create(e,{parent:{value:C}}),C}function h(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return h(e.parent,t,n)}function g(e){return 0===C.matcher.regexIndex?(E+=e[0],1):(M=!0,0)}function y(e){const t=e[0],r=n.substr(e.index),i=h(C,e,r);if(!i)return ne;const o=C;o.skip?E+=t:(o.returnEnd||o.excludeEnd||(E+=t),d(),o.excludeEnd&&(E=t));do{C.className&&A.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),p(i.starts)),o.returnEnd?0:t.length}let v={};function b(t,o){const a=o&&o[0];if(E+=t,null==a)return d(),0;if("begin"===v.type&&"end"===o.type&&v.index===o.index&&""===a){if(E+=n.slice(o.index,o.index+1),!s){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new i(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return g(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?E+=t:(n.excludeBegin&&(E+=t),d(),n.returnBegin||n.excludeBegin||(E=t)),p(n),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(C.className||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=y(o);if(e!==ne)return e}if("illegal"===o.type&&""===a)return 1;if(D>1e5&&D>3*o.index)throw new Error("potential infinite loop, way more iterations than matches");return E+=a,a.length}const w=k(e);if(!w)throw Y(l.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=H(w,{plugins:o});let S="",C=a||x;const _={},A=new u.__emitter(u);!function(){const e=[];for(let t=C;t!==w;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>A.openNode(e)))}();let E="",O=0,T=0,D=0,M=!1;try{for(C.matcher.considerAll();;){D++,M?M=!1:C.matcher.considerAll(),C.matcher.lastIndex=T;const e=C.matcher.exec(n);if(!e)break;const t=b(n.substring(T,e.index),e);T=e.index+t}return b(n.substr(T)),A.closeAllNodes(),A.finalize(),S=A.toHTML(),{relevance:Math.floor(O),value:S,language:e,illegal:!1,emitter:A,top:C}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(T-100,T+100),mode:t.mode},sofar:S,relevance:0,value:ee(n),emitter:A};if(s)return{illegal:!1,relevance:0,value:ee(n),emitter:A,language:e,top:C,errorRaised:t};throw t}}function m(e,n){n=n||u.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new u.__emitter(u),value:ee(e),illegal:!1,top:c};return t.emitter.addText(e),t}(e),i=n.filter(k).filter(_).map((t=>f(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(k(e.language).supersetOf===t.language)return 1;if(k(t.language).supersetOf===e.language)return-1}return 0})),[s,a]=o,l=s;return l.second_best=a,l}const g={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"<br>"))}},y=/^(<[^>]+>|\t)+/gm,v={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(y,(e=>e.replace(/\t/g,u.tabReplace))))}};function b(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=k(n[1]);return t||(X(l.replace("{}",n[1])),X("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>p(e)||k(e)))}(e);if(p(n))return;A("before:highlightElement",{el:e,language:n}),t=e;const i=t.textContent,o=n?h(i,{language:n,ignoreIllegals:!0}):m(i);A("after:highlightElement",{el:e,result:o,text:i}),e.innerHTML=o.value,function(e,t,n){const i=t?r[t]:n;e.classList.add("hljs"),i&&e.classList.add(i)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}const w=()=>{w.called||(w.called=!0,Q("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(b))};let x=!1;function S(){"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(b):x=!0}function k(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]}function C(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function _(e){const t=k(e);return t&&!t.disableAutodetect}function A(e,t){const n=e;o.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){x&&S()}),!1),Object.assign(e,{highlight:h,highlightAuto:m,highlightAll:S,fixMarkup:function(e){return Q("10.2.0","fixMarkup will be removed entirely in v11.0"),Q("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,u.tabReplace||u.useBR?t.replace(a,(e=>"\n"===e?u.useBR?"<br>":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e)):t;var t},highlightElement:b,highlightBlock:function(e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),b(e)},configure:function(e){e.useBR&&(Q("10.3.0","'useBR' will be removed entirely in v11.0"),Q("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=te(u,e)},initHighlighting:w,initHighlightingOnLoad:function(){Q("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),x=!0},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(Y("Language definition for '{}' could not be registered.".replace("{}",n)),!s)throw e;Y(e),i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&C(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(t)},getLanguage:k,registerAliases:C,requireLanguage:function(e){Q("10.4.0","requireLanguage will be removed entirely in v11."),Q("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=k(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:_,inherit:te,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},vuePlugin:W(e).VuePlugin}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString="10.7.3";for(const e in P)"object"==typeof P[e]&&n(P[e]);return Object.assign(e,P),e.addPlugin(g),e.addPlugin(Z),e.addPlugin(v),e}({});e.exports=re},6470:(e,t,n)=>{"use strict";n(7802),n(1102);r.prototype.addText=function(e){var t,n,r=this.stack;""!==e&&((n=(t=r[r.length-1]).children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e}))},r.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},r.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],i=e.rootNode.children,o=t?{type:"element",tagName:"span",properties:{className:[t]},children:i}:i;r.children=r.children.concat(o)},r.prototype.openNode=function(e){var t=this.stack,n={type:"element",tagName:"span",properties:{className:[this.options.classPrefix+e]},children:[]};t[t.length-1].children.push(n),t.push(n)},r.prototype.closeNode=function(){this.stack.pop()},r.prototype.closeAllNodes=i,r.prototype.finalize=i,r.prototype.toHTML=function(){return""};function r(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function i(){}},631:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&l&&"function"==typeof l.get?l.get:null,d=a&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,_=Array.prototype.slice,A=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function P(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var i=String(r),o=v.call(t,i.length+1);return b.call(i,n,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var $=n(4654),R=$.custom,B=j(R)?R:null;function q(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return b.call(String(e),/"/g,""")}function L(e){return!("[object Array]"!==U(e)||M&&"object"==typeof e&&M in e)}function V(e){return!("[object RegExp]"!==U(e)||M&&"object"==typeof e&&M in e)}function j(e){if(D)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,i){var a=n||{};if(H(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!H(a,"customInspect")||a.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Z(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?P(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return m?P(t,S):S}var A=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=A&&A>0&&"object"==typeof t)return L(t)?"[Array]":"[Object]";var O,R=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=C.call(Array(e.indent+1)," ")}return{base:n,prev:C.call(Array(t+1),n)}}(a,r);if(void 0===i)i=[];else if(W(i,t)>=0)return"[Circular]";function z(t,n,o){if(n&&(i=_.call(i)).push(n),o){var s={depth:a.depth};return H(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,i)}return e(t,a,r+1,i)}if("function"==typeof t&&!V(t)){var K=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Q(t,z);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+C.call(ee,", ")+" }":"")}if(j(t)){var te=D?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||D?te:J(te)}if((O=t)&&"object"==typeof O&&("undefined"!=typeof HTMLElement&&O instanceof HTMLElement||"string"==typeof O.nodeName&&"function"==typeof O.getAttribute)){for(var ne="<"+x.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+q(F(re[ie].value),"double",a);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+x.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var oe=Q(t,z);return R&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(oe)?"["+X(oe,R)+"]":"[ "+C.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==U(e)||M&&"object"==typeof e&&M in e)}(t)){var se=Q(t,z);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+C.call(se,", ")+" }":"{ ["+String(t)+"] "+C.call(k.call("[cause]: "+z(t.cause),se),", ")+" }"}if("object"==typeof t&&l){if(B&&"function"==typeof t[B]&&$)return $(t,{depth:A-r});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s.call(t,(function(e,n){ae.push(z(n,t,!0)+" => "+z(e,t))})),Y("Map",o.call(t),ae,R)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return d.call(t,(function(e){le.push(z(e,t))})),Y("Set",c.call(t),le,R)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return G("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return G("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return G("WeakRef");if(function(e){return!("[object Number]"!==U(e)||M&&"object"==typeof e&&M in e)}(t))return J(z(Number(t)));if(function(e){if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}(t))return J(z(E.call(t)));if(function(e){return!("[object Boolean]"!==U(e)||M&&"object"==typeof e&&M in e)}(t))return J(f.call(t));if(function(e){return!("[object String]"!==U(e)||M&&"object"==typeof e&&M in e)}(t))return J(z(String(t)));if(!function(e){return!("[object Date]"!==U(e)||M&&"object"==typeof e&&M in e)}(t)&&!V(t)){var ce=Q(t,z),de=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",pe=!de&&M&&Object(t)===t&&M in t?v.call(U(t),8,-1):ue?"Object":"",he=(de||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||ue?"["+C.call(k.call([],pe||[],ue||[]),": ")+"] ":"");return 0===ce.length?he+"{}":R?he+"{"+X(ce,R)+"}":he+"{ "+C.call(ce,", ")+" }"}return String(t)};var z=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return z.call(e,t)}function U(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Z(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Z(v.call(e,0,t.maxStringLength),t)+r}return q(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Y(e,t,n,r){return e+" ("+t+") {"+(r?X(n,r):C.call(n,", "))+"}"}function X(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+C.call(e,","+n)+"\n"+t.prev}function Q(e,t){var n=L(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=H(e,i)?t(e[i],e):""}var o,s="function"==typeof O?O(e):[];if(D){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in e)H(e,l)&&(n&&String(Number(l))===l&&l<e.length||D&&o["$"+l]instanceof Symbol||(S.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof O)for(var c=0;c<s.length;c++)N.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}},5798:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},129:(e,t,n)=>{"use strict";var r=n(8261),i=n(5235),o=n(5798);e.exports={formats:o,parse:i,stringify:r}},5235:(e,t,n)=>{"use strict";var r=n(2769),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,d=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;d.push(c)}for(var u=0;n.depth>0&&null!==(a=s.exec(o))&&u<n.depth;){if(u+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(a[1])}return a&&d.push("["+o.slice(a.index)+"]"),function(e,t,n,r){for(var i=r?t:l(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,d=parseInt(c,10);n.parseArrays||""!==c?!isNaN(d)&&a!==c&&String(d)===c&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(s=[])[d]=i:"__proto__"!==c&&(s[c]=i):s={0:i}}i=s}return i}(d,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var d="string"==typeof e?function(e,t){var n,c={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,u),h=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n<p.length;++n)0===p[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[n]?f="utf-8":"utf8=%26%2310003%3B"===p[n]&&(f="iso-8859-1"),h=n,n=p.length);for(n=0;n<p.length;++n)if(n!==h){var m,g,y=p[n],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(m=t.decoder(y,s.decoder,f,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(y.slice(0,b),s.decoder,f,"key"),g=r.maybeMap(l(y.slice(b+1),t),(function(e){return t.decoder(e,s.decoder,f,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=a(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=r.combine(c[m],g):c[m]=g}return c}(e,n):e,u=n.plainObjects?Object.create(null):{},p=Object.keys(d),h=0;h<p.length;++h){var f=p[h],m=c(f,d[f],n,"string"==typeof e);u=r.merge(u,m,n)}return!0===n.allowSparse?u:r.compact(u)}},8261:(e,t,n)=>{"use strict";var r=n(7478),i=n(2769),o=n(5798),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,d=function(e,t){c.apply(e,l(t)?t:[t])},u=Date.prototype.toISOString,p=o.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,o,s,a,c,u,p,m,g,y,v,b,w,x,S){for(var k,C=t,_=S,A=0,E=!1;void 0!==(_=_.get(f))&&!E;){var O=_.get(t);if(A+=1,void 0!==O){if(O===A)throw new RangeError("Cyclic object value");E=!0}void 0===_.get(f)&&(A=0)}if("function"==typeof p?C=p(n,C):C instanceof Date?C=y(C):"comma"===o&&l(C)&&(C=i.maybeMap(C,(function(e){return e instanceof Date?y(e):e}))),null===C){if(a)return u&&!w?u(n,h.encoder,x,"key",v):n;C=""}if("string"==typeof(k=C)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||i.isBuffer(C))return u?[b(w?n:u(n,h.encoder,x,"key",v))+"="+b(u(C,h.encoder,x,"value",v))]:[b(n)+"="+b(String(C))];var T,D=[];if(void 0===C)return D;if("comma"===o&&l(C))w&&u&&(C=i.maybeMap(C,u)),T=[{value:C.length>0?C.join(",")||null:void 0}];else if(l(p))T=p;else{var M=Object.keys(C);T=m?M.sort(m):M}for(var N=s&&l(C)&&1===C.length?n+"[]":n,I=0;I<T.length;++I){var P=T[I],$="object"==typeof P&&void 0!==P.value?P.value:C[P];if(!c||null!==$){var R=l(C)?"function"==typeof o?o(N,P):N:N+(g?"."+P:"["+P+"]");S.set(t,A);var B=r();B.set(f,S),d(D,e($,R,o,s,a,c,"comma"===o&&w&&l(C)?null:u,p,m,g,y,v,b,w,x,B))}}return D};e.exports=function(e,t){var n,i=e,c=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!s.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=h.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):l(c.filter)&&(n=c.filter);var u,p=[];if("object"!=typeof i||null===i)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[u];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var y=r(),v=0;v<n.length;++v){var b=n[v];c.skipNulls&&null===i[b]||d(p,m(i[b],b,f,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,y))}var w=p.join(c.delimiter),x=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),w.length>0?x+w:""}},2769:(e,t,n)=>{"use strict";var r=n(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],d=s[c];"object"==typeof d&&null!==d&&-1===n.indexOf(d)&&(t.push({obj:s,prop:c}),n.push(d))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<a.length;++c){var d=a.charCodeAt(c);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===r.RFC1738&&(40===d||41===d)?l+=a.charAt(c):d<128?l+=s[d]:d<2048?l+=s[192|d>>6]+s[128|63&d]:d<55296||d>=57344?l+=s[224|d>>12]+s[128|d>>6&63]+s[128|63&d]:(c+=1,d=65536+((1023&d)<<10|1023&a.charCodeAt(c)),l+=s[240|d>>18]+s[128|d>>12&63]+s[128|d>>6&63]+s[128|63&d])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return o(t)&&!o(n)&&(s=a(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var s=t[o];s&&"object"==typeof s&&n&&"object"==typeof n?t[o]=e(s,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var s=n[o];return i.call(t,o)?t[o]=e(t[o],s,r):t[o]=s,t}),s)}}},7478:(e,t,n)=>{"use strict";var r=n(210),i=n(1924),o=n(631),s=r("%TypeError%"),a=r("%WeakMap%",!0),l=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),d=i("WeakMap.prototype.set",!0),u=i("WeakMap.prototype.has",!0),p=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),f=i("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+o(e))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return p(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(l){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,i){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),d(e,r,i)):l?(t||(t=new l),h(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},2649:(e,t)=>{function n(e){return"function"==typeof e.value||(console.warn("[Vue-click-outside:] provided expression",e.expression,"is not a function."),!1)}function r(e){return void 0!==e.componentInstance&&e.componentInstance.$isServer}e.exports={bind:function(e,t,i){if(!n(t))return;function o(t){if(i.context){var n=t.path||t.composedPath&&t.composedPath();n&&n.length>0&&n.unshift(t.target),e.contains(t.target)||function(e,t){if(!e||!t)return!1;for(var n=0,r=t.length;n<r;n++)try{if(e.contains(t[n]))return!0;if(t[n].contains(e))return!1}catch(e){return!1}return!1}(i.context.popupItem,n)||e.__vueClickOutside__.callback(t)}}e.__vueClickOutside__={handler:o,callback:t.value};const s="ontouchstart"in document.documentElement?"touchstart":"click";!r(i)&&document.addEventListener(s,o)},update:function(e,t){n(t)&&(e.__vueClickOutside__.callback=t.value)},unbind:function(e,t,n){const i="ontouchstart"in document.documentElement?"touchstart":"click";!r(n)&&e.__vueClickOutside__&&document.removeEventListener(i,e.__vueClickOutside__.handler),delete e.__vueClickOutside__}}},4570:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2333),i=n(7789),o=n(2771);const s={name:"DpLabel",directives:{cleanhtml:r.J7,tooltip:r.u},mixins:[o.gH],props:{bold:{type:Boolean,required:!1,default:!0},for:{type:String,required:!0},hint:{type:[String,Array],required:!1,default:()=>[]},text:{type:String,required:!0},tooltip:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1}},computed:{ariaLabel:()=>i.de.contextualHelp,hints(){return this.hint?this.wrapItemIntoArray(this.hint):[]},labelFor(){return this.for}},methods:{wrapItemIntoArray:e=>Array.isArray(e)?e:[e]}},a=(0,n(1900).Z)(s,(function(){var e=this,t=e._self._c;return t("label",{class:e.prefixClass(["o-form__label flex",e.bold?"weight--bold":"weight--normal",e.hints.length>0?"has-hint":""]),attrs:{for:e.labelFor}},[t("span",[t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.text,expression:"text"}]}),e.required?t("span",[e._v("*")]):e._e(),e._v(" "),e.hints.length>0?t("span",{class:e.prefixClass("block font-size-small weight--normal")},e._l(e.hints,(function(n,r){return t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:n,expression:"h"}],key:r,class:e.prefixClass(["inline-block"])})})),0):e._e()]),e._v(" "),""!==e.tooltip?t("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.tooltip,expression:"tooltip"}],class:e.prefixClass("fa fa-question-circle u-mt-0_125 ml-auto"),attrs:{"aria-label":e.ariaLabel}}):e._e()])}),[],!1,null,null,null).exports},1900:(e,t,n)=>{"use strict";function r(e,t,n,r,i,o,s,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}n.d(t,{Z:()=>r})},6781:e=>{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e){e.exports=JSON.parse('{"componentClass":"c-sliding-pagination","list":"c-sliding-pagination__list","element":"c-sliding-pagination__list-element","elementDisabled":"c-sliding-pagination__list-element--disabled","elementActive":"c-sliding-pagination__list-element--active","page":"c-sliding-pagination__page"}')},function(e,t,n){"use strict";n.r(t),n.d(t,"range",(function(){return o}));var r={name:"SlidingPaginationDefaultPage",props:{ariaPageLabel:{type:String,required:!0},isCurrent:{type:Boolean,required:!0},page:{type:Number,required:!0},pageClass:{type:String,required:!0}},computed:{pageClasses:function(){var e=this.pageClass;return this.isCurrent&&(e+=" c-sliding-pagination__page--current"),e}},methods:{goToPage:function(e){e.preventDefault(),e.stopPropagation(),this.$emit("page-click",this.page)}},render:function(e){return e("a",{class:this.pageClasses,attrs:{href:"#","aria-label":this.ariaPageLabel},on:{click:this.goToPage}},this.page)}},i=n(0);function o(e,t){var n=[];if("number"!=typeof e||"number"!=typeof t)return n;if(e>t){var r=e;e=t,t=r}for(var i=e;i<=t;i++)n.push(i);return n}var s=function(e,t,n,r,i,o,s,a){var l,c="function"==typeof e?e.options:e;if(l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}({name:"SlidingPagination",props:{ariaPaginationLabel:{type:String,required:!1,default:"Pagination Navigation"},ariaGotoPageLabel:{type:String,required:!1,default:"Go to page %page% of %total%"},ariaPreviousPageLabel:{type:String,required:!1,default:"Go to previous page"},ariaNextPageLabel:{type:String,required:!1,default:"Go to next page"},ariaCurrentPageLabel:{type:String,required:!1,default:"Page %page% of %total%, current page"},classMap:{type:Object,required:!1,default:function(){return i}},current:{required:!0,type:Number},total:{required:!0,type:Number},slidingEndingSize:{required:!1,type:Number,default:2},slidingWindowSize:{required:!1,type:Number,default:3},nonSlidingSize:{required:!1,type:Number,default:9},pageComponent:{required:!1,type:Object,default:function(){return r}}},components:{SlidingPaginationDefaultPage:r},computed:{isSliding:function(){return this.total>this.nonSlidingSize},hasBeginningGap:function(){return!!this.isSliding&&this.lastBeginningPage+1!==this.firstWindowPage},hasEndingGap:function(){return!!this.isSliding&&this.lastWindowPage+1!==this.firstEndingPage},beginningPages:function(){return o(1,this.isSliding?this.slidingEndingSize:this.total)},lastBeginningPage:function(){return this.beginningPages[this.beginningPages.length-1]},endingPages:function(){return this.isSliding?o(this.total-this.slidingEndingSize+1,this.total):[]},firstEndingPage:function(){return this.endingPages[0]},slidingWindowHalf:function(){var e=this.slidingWindowSize/2;return this.slidingWindowSize%2==1&&(e-=.5),e},slidingWindowPages:function(){if(!this.isSliding)return[];var e=this.lastBeginningPage+this.slidingWindowHalf,t=this.firstEndingPage-this.slidingWindowHalf;if(this.current<=e)return o(this.lastBeginningPage+1,this.lastBeginningPage+this.slidingWindowSize);if(this.current>e&&this.current<t){var n=this.slidingWindowHalf;return this.slidingWindowSize%2==0&&(n/=2),o(-this.slidingWindowHalf+this.current,n+this.current)}return o(this.firstEndingPage-this.slidingWindowSize,this.firstEndingPage-1)},firstWindowPage:function(){return this.slidingWindowPages[0]},lastWindowPage:function(){return this.slidingWindowPages[this.slidingWindowPages.length-1]},showPreviousPageAction:function(){return this.total>this.nonSlidingSize},showNextPageAction:function(){return this.total>this.nonSlidingSize}},methods:{replaceLabelVars:function(e,t){return e.replace("%total%",this.total).replace("%page%",t)},isCurrentPage:function(e){return this.current===e},currentPageLabel:function(e){return this.replaceLabelVars(this.ariaCurrentPageLabel,e)},goToPage:function(e){this.$emit("page-change",e)},goToNextPage:function(){this.goToPage(this.current+1)},goToPreviousPage:function(){this.goToPage(this.current-1)},goToPageLabel:function(e){return this.replaceLabelVars(this.ariaGotoPageLabel,e)},pageLabel:function(e){return this.isCurrentPage(e)?this.currentPageLabel(e):this.goToPageLabel(e)},slotOrDefault:function(e,t){return this.$slots[e]?this.$slots[e]:t},navigationElement:function(e,t,n,r,i){return e("li",{class:[this.classMap.element,this.current===t?this.classMap.elementDisabled:""],key:t},[e("a",{class:this.classMap.page,attrs:{href:"#","aria-label":r,disabled:1===this.current},on:{click:t===this.total?this.goToNextPage:this.goToPreviousPage}},i)])},pageListPage:function(e,t){return e("li",{class:[this.classMap.element,this.isCurrentPage(t)?this.classMap.elementActive:""]},[e(this.pageComponent,{props:{isCurrent:this.isCurrentPage(t),ariaPageLabel:this.pageLabel(t),page:t,pageClass:this.classMap.page},on:{"page-click":this.goToPage}})])},gap:function(e,t){return e("li",{class:[this.classMap.element,this.classMap.elementDisabled],attrs:{"aria-hidden":!0}},[e("a",{class:this.classMap.page,attrs:{href:"#",disabled:!0}},t)])}},render:function(e){var t=this,n=[];return this.showPreviousPageAction&&n.push(this.navigationElement(e,1,-1,this.ariaPreviousPageLabel,this.slotOrDefault("previousPage","«"))),n=n.concat(this.beginningPages.map((function(n){return t.pageListPage(e,n)}))),this.hasBeginningGap&&n.push(this.gap(e,this.slotOrDefault("gapLeft","…"))),n=n.concat(this.slidingWindowPages.map((function(n){return t.pageListPage(e,n)}))),this.hasEndingGap&&n.push(this.gap(e,this.slotOrDefault("gapRight","…"))),n=n.concat(this.endingPages.map((function(n){return t.pageListPage(e,n)}))),this.showNextPageAction&&n.push(this.navigationElement(e,this.total,1,this.ariaNextPageLabel,this.slotOrDefault("nextPage","»"))),e("nav",{class:this.classMap.component,attrs:{"aria-label":this.ariaPaginationLabel}},[e("ul",{class:this.classMap.list},n)])}});s.options.__file="src/SlidingPagination.vue",t.default=s.exports}])},7789:(e,t,n)=>{"use strict";n.d(t,{de:()=>r});const r={contextualHelp:"Kontexthilfe",loadingData:"Daten werden geladen..."}},9909:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var r=n(1320),i=n.n(r);i().addHook("afterSanitizeAttributes",(function(e){"target"in e&&"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener")}));const o=(e,t)=>{const{content:n,options:r={}}=(e=>{const t=typeof e;return"string"===t?{content:e}:"object"===t?e:void 0})(t.value),o={...r,ADD_ATTR:["target"]};e.innerHTML=i().sanitize(n,o)},s={bind:function(e,t){o(e,t)},update:function(e,t){t.value!==t.oldValue&&o(e,t)}}},2333:(e,t,n)=>{"use strict";n.d(t,{J7:()=>r.J,u:()=>s,Kr:()=>i.VPopover});var r=n(9909);const i=require("v-tooltip"),o={defaultHtml:!0,defaultBoundariesElement:"scrollParent",defaultDelay:{show:300,hide:100},defaultOffset:12,defaultTemplate:'<div class="tooltip" role="tooltip"><div class="tooltip__arrow"></div><div class="tooltip__inner"></div></div>',popover:{defaultPlacement:"top",defaultBaseClass:"tooltip",defaultInnerClass:"tooltip__inner",defaultArrowClass:"tooltip__arrow",defaultDelay:{show:300,hide:100},defaultTrigger:"hover"}};i.VTooltip.options={...i.VTooltip.options,...o},i.VPopover.options={...i.VPopover.options,...o};const s=i.VTooltip},9436:(e,t,n)=>{"use strict";n.d(t,{W:()=>l,g:()=>c});var r=n(5647),i=n(3656),o=n(702),s=n(3178),a=n(8767);function l(e){(0,r.e7)(e).forEach((e=>{c(e)}))}function c(e){let t,n,l;const c=(0,r.kv)(e),d=(e,t)=>{e.hasAttribute("data-dp-validate-if")&&e.getAttribute("data-dp-validate-if").split(",").forEach((n=>{const r=n.indexOf("!==")>-1?"isNotEqual":"isEqual",i=n.split("isNotEqual"===r?"!==":"==="),o=e.closest("[data-dp-validate]");try{const e=o.querySelector(i[0]);"radio"===e.type?Array.from(o.querySelectorAll(`input[name="${e.name}"]:not([value="${e.value}"]`)).forEach((e=>e.addEventListener("input",t))):(e.addEventListener("input",t),e.addEventListener("change",t),e.addEventListener("select",t))}catch(e){}}))};switch(c){case"tiptap":(0,r.CH)('div[contenteditable="true"]',e.parentNode).then((()=>{const t=e.parentNode.querySelector('div[contenteditable="true"]');t.addEventListener("blur",(()=>(0,a.Z)(e))),t.addEventListener("focus",(()=>{t.classList.contains(r.YQ)&&t.classList.remove(r.YQ)})),d(e,(()=>(0,a.Z)(e)))}));break;case"fieldset":t=Array.from(e.querySelectorAll('input[type="checkbox"]')),n=Array.from(e.querySelectorAll('input[type="radio"]')),l=t.length>0?t:n.length>0?n:[],l.forEach((t=>t.addEventListener("blur",(()=>(0,o.Z)(e))))),l.forEach((t=>t.addEventListener("change",(()=>(0,o.Z)(e))))),d(e,(()=>(0,o.Z)(e)));break;case"datepicker":e.addEventListener("focus",(()=>{e.classList.contains(r.YQ)&&e.classList.remove(r.YQ)})),e.addEventListener("blur",(()=>(0,i.Z)(e))),d(e,(()=>(0,i.Z)(e)));break;case"input":e.addEventListener("focus",(()=>{e.classList.contains(r.YQ)&&e.classList.remove(r.YQ)})),e.addEventListener("blur",(()=>(0,s.Z)(e))),d(e,(()=>(0,s.Z)(e)))}}},5647:(e,t,n)=>{"use strict";n.d(t,{CH:()=>c,KG:()=>d,YQ:()=>a,e7:()=>i,kv:()=>s,ph:()=>o,s3:()=>l});var r=n(6951);function i(e){return Array.from(e.querySelectorAll('[pattern], [required], input[type="email"], .tiptap__input--hidden.is-required, .multiselect.is-required, fieldset.is-required, [minlength], [maxlength], [data-dp-validate-maxlength], [data-dp-validate-should-equal]'))}function o(e){const t=e.hasAttribute("required")||e.classList.contains("is-required");return e.hasAttribute("data-dp-validate-if")&&!1===function(e){return e.getAttribute("data-dp-validate-if").split(",").some((t=>{const n=t.indexOf("!==")>-1?"isNotEqual":"isEqual",r=t.split("isNotEqual"===n?"!==":"==="),i=e.closest("[data-dp-validate]");try{const e=i.querySelector(r[0]);return"checkbox"===e.type||"radio"===e.type?"isNotEqual"===n?!e.checked:e.checked:!!e.value&&("isNotEqual"===n?e.value!==r[1]:e.value===r[1])}catch(e){return!1}}))}(e)?(l(e,!1),!1):!!(t||e.hasAttribute("pattern")||"email"===e.getAttribute("type")||e.hasAttribute("minlength")||e.hasAttribute("maxlength")||e.hasAttribute("data-dp-validate-maxlength")||e.hasAttribute("data-dp-validate-should-equal"))}function s(e){let t="input";return e.classList.contains("multiselect")?t="multiselect":e.classList.contains("tiptap__input--hidden")?t="tiptap":"FIELDSET"===e.tagName?t="fieldset":e.classList.contains("a1-input")&&(t="datepicker"),t}const a=(0,n(6317).Z)("is-invalid");function l(e,t){"tiptap"===s(e)&&(e=e.parentNode.querySelector('div[contenteditable="true"]')),"hidden"===e.type&&e.name.startsWith("uploadedFiles")&&(e=e.parentNode.querySelector(".uppy-Root")),t?e.classList.add(a):e.classList.contains(a)&&e.classList.remove(a)}function c(e,t){return new Promise((n=>{const r=t.querySelector(e);r&&n(r),new MutationObserver(((r,i)=>{Array.from(t.querySelectorAll(e)).forEach((e=>{n(e),i.disconnect()}))})).observe(document,{childList:!0,subtree:!0})}))}function d(e){const t=u(e);if(!1===function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(t)){const e=t.getBoundingClientRect().top+(0,r.Z)();window.scrollTo({behavior:"smooth",top:e-50})}}function u(e){return null==e.offsetParent?u(e.parentElement):e}},3656:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){let t=!0;return(""===e.value||!1===/^(?:(?:31(.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(.)(?:0?[13-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/.test(e.value))&&(t=!1),(0,r.s3)(e,!t),t}},4299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o,k:()=>i});const r=(e,t)=>"string"==typeof t&&t.length<=320&&e.test(t)&&"\n"!==t.slice(-1)&&encodeURIComponent(t).replace(/%../g,"x").length<=320,i=/^(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E\p{L}\p{N}]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F\p{L}\p{N}]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E\p{L}\p{N}]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F\p{L}\p{N}]|(?:\x5C[\x00-\x7F]))*\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\.){1,126})+(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\]))$/i;function o(e){return r(i,e)}},702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){let t=!0;const n=Array.from(e.querySelectorAll('input[type="checkbox"]')),i=Array.from(e.querySelectorAll('input[type="radio"]'));let o=null;return n.length>0?o=n:i.length>0&&(o=i),null===o||(!1===o.some((e=>!0===e.checked))?(t=!1,o.forEach((e=>(0,r.s3)(e,!0)))):o.forEach((e=>(0,r.s3)(e,!1))),t)}},405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(5647),i=n(3656),o=n(702),s=n(3178),a=n(5322),l=n(8767);function c(e){let t=!0;const n=(0,r.e7)(e),c=[];return n.forEach((e=>{let n=!0;switch((0,r.kv)(e)){case"multiselect":n=(0,a.Z)(e);break;case"tiptap":n=(0,l.Z)(e);break;case"fieldset":n=(0,o.Z)(e);break;case"datepicker":n=(0,i.Z)(e);break;default:n=(0,s.Z)(e)}!1===n&&(c.push(e),t=!1)})),{valid:t,invalidFields:c}}},3178:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5647),i=n(4299);function o(e){if(!1===(0,r.ph)(e))return!0;const t=e.getAttribute("data-dp-validate-error")||!1;let n=!0,o=e.getAttribute("pattern"),s=new RegExp(o);if("email"===e.getAttribute("type")&&(o="email",s=i.k),e.getAttribute("minlength")&&n&&(o=null,n=e.value.length>=parseInt(e.getAttribute("minlength"))),e.getAttribute("maxlength")&&n&&(o=null,n=e.value.length<=parseInt(e.getAttribute("maxlength"))),o&&n&&(n=!1===e.hasAttribute("required")&&""===e.value||s.test(e.value)),e.getAttribute("data-dp-validate-should-equal")&&n&&(n=e.value===document.querySelector(e.getAttribute("data-dp-validate-should-equal")).value),e.hasAttribute("required")&&n&&(n="checkbox"===e.type?!0===e.checked:""!==e.value),!0===n){try{e.setCustomValidity("")}catch(e){}return e.hasAttribute("aria-invalid")&&e.removeAttribute("aria-invalid"),(0,r.s3)(e,!1),!0}e.setAttribute("aria-invalid",!0),(0,r.s3)(e,!0);try{if(t)e.setCustomValidity(Translator.trans(t));else if(o)switch(o){case"^[0-9]{5}$":e.setCustomValidity(Translator.trans("validation.error.zipcode"));break;case"[A-Za-zÄäÜüÖöß ]+":e.setCustomValidity(Translator.trans("validation.error.city"));break;case"email":e.setCustomValidity(Translator.trans("validation.error.email"));break;default:e.setCustomValidity(Translator.trans("validation.error.default"))}else e.setCustomValidity(Translator.trans("validation.error.default"))}catch(e){}return!1}},5322:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){if(!1===(0,r.ph)(e))return!0;const t="true"===e.getAttribute("data-dp-validate-is-valid");return(0,r.s3)(e,!t),t}},8767:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5647);function i(e){if(!1===(0,r.ph)(e))return!0;let t=!0;if(e.classList.contains("is-required")&&""===e.value||e.hasAttribute("data-dp-validate-maxlength")&&0!==e.getAttribute("data-dp-validate-maxlength")&&e.value.length>e.getAttribute("data-dp-validate-maxlength")){t=!1;const n=e.parentNode.querySelector('div[contenteditable="true"]');if(!1===n.classList.contains(r.YQ)){(0,r.s3)(n,!0);const e=()=>{(0,r.s3)(n,!1),n.removeEventListener("focus",e)};n.addEventListener("focus",e)}}return t}},2771:(e,t,n)=>{"use strict";n.d(t,{fE:()=>o,cR:()=>d,gH:()=>i,Be:()=>p});var r=n(9609);const i={methods:{prefixClass:e=>(0,r.o4)(e)}},o={data:()=>({allSelected:!1,itemSelections:{}}),methods:{dpToggleAll(e,t){this.allSelected=e,this.itemSelections=this.setItemSelections(t,this.allSelected)},dpToggleOne(e){this.itemSelections[e]&&this.allSelected&&(this.allSelected=!1);const t=!!this.itemSelections[e];this.itemSelections={...this.itemSelections,[e]:!t}},setItemSelections:(e,t)=>Object.keys(e).reduce(((e,n)=>({...e,[n]:t})),{})}};var s=n(5647),a=n(9436),l=n(6777),c=n(405);const d={data:()=>({dpValidate:{}}),methods:{dpValidateAction(e,t,n=!0){const r=this.$el.hasAttribute("data-dp-validate")&&this.$el.getAttribute("data-dp-validate")===e?this.$el:this.$el.querySelector(`[data-dp-validate=${e}]`),i=(0,c.Z)(r),o={...this.dpValidate,[e]:i.valid};if(this.dpValidate=o,!1===(0,l.Z)(this.dpValidate,"invalidFields")&&(this.dpValidate.invalidFields={}),this.dpValidate.invalidFields[e]=i.invalidFields,!1===this.dpValidate[e]){const t=this.dpValidate.invalidFields[e].filter((e=>e.hasAttribute("data-dp-validate-error"))).map((e=>e.dataset.dpValidateError));t.forEach((e=>dplan.notify.notify("error",Translator.trans(e)))),0===t.length&&dplan.notify.notify("error",Translator.trans("error.mandatoryfields.no_asterisk"));const n=r.querySelector("."+s.YQ);(0,s.KG)(n)}if(!1===this.dpValidate[e]&&n||this.dpValidate[e])return t()}},mounted(){let e=[];this.$el.hasAttribute("data-dp-validate")?(this.isComponentForm=!0,e.push(this.$el)):(this.isComponentForm=!1,e=Array.from(this.$el.querySelectorAll("[data-dp-validate]"))),this.dpValidateForms=e,this.dpValidateForms.forEach((e=>{const t=e.getAttribute("data-dp-validate");this.dpValidate[t]=!0,(0,a.W)(e)}))},updated(){this.$nextTick((()=>{if(!1===this.isComponentForm){const e=Array.from(this.$el.querySelectorAll("[data-dp-validate]"));e.concat(this.dpValidateForms).forEach((t=>{if(this.dpValidateForms.includes(t)&&!1===e.includes(t)){const e=this.dpValidateForms.findIndex((e=>e===t));delete this.dpValidateForms[e]}else if(!1===this.dpValidateForms.includes(t)&&e.includes(t)){this.dpValidateForms.push(t);const e=t.getAttribute("data-dp-validate");this.dpValidate[e]=!0,(0,a.W)(t)}else(0,a.W)(t)}))}else this.dpValidateForms.forEach((e=>{(0,a.W)(e)}))}))}};var u=n(3882);const p={data:()=>({allItemsCount:null,allSelectedVisually:!1,toggledItems:[],trackDeselected:!1}),computed:{currentlySelectedItems(){const e=this.toggledItems.map((e=>e.id));let t;return!1===this.trackDeselected?t=this.toggledItems:!0===this.trackDeselected&&(t=0===this.toggledItems.length?this.items:this.items.filter((t=>!e.includes(t.id)))),t.reduce(((e,t)=>({...e,[t.id]:!0})),{})},selectedItemsCount(){return this.trackDeselected?this.allSelectedVisually?this.allItemsCount:this.allItemsCount-this.toggledItems.length:this.toggledItems.length}},methods:{handleSelectAll(e){this.trackDeselected=e,this.allSelectedVisually=!0===e,this.toggledItems=[]},handleToggleItem(e,t){const n=e.map((e=>e.id));(!0===t&&!this.trackDeselected||!1===t&&this.trackDeselected)&&(this.toggledItems=(0,u.Z)(this.toggledItems.concat(e),"id")),(!1===t&&!this.trackDeselected||!0===t&&this.trackDeselected)&&(this.toggledItems=this.toggledItems.filter((e=>!1===n.includes(e.id)))),!1===t&&(this.allSelectedVisually=!1)},resetSelection(){this.allSelectedVisually=!1,this.trackDeselected=!1,this.toggledItems=[]}}}},6951:(e,t,n)=>{"use strict";function r(){return Math.abs(parseInt(window.scrollY||window.scrollTop||document.getElementsByTagName("html")[0].scrollTop,10))}n.d(t,{Z:()=>r})},6777:(e,t,n)=>{"use strict";function r(e,t){return"object"!=typeof e?(console.warn("Cannot check for property on a non-object, got type: "+typeof e),!1):null!==e&&Object.prototype.hasOwnProperty.call(e,t)}n.d(t,{Z:()=>r})},9609:(e,t,n)=>{"use strict";n.d(t,{OC:()=>o,KQ:()=>S,Ds:()=>_,RH:()=>E,f5:()=>l,td:()=>O,p6:()=>s,c8:()=>T,cx:()=>D.Z,wP:()=>h,ec:()=>p,Q$:()=>M.Z,Fs:()=>u,ts:()=>C,T8:()=>c,C4:()=>d,o4:()=>N.Z,a:()=>I,P2:()=>P,ZU:()=>a,V9:()=>x,Wz:()=>k,GD:()=>$.Z});var r=n(1635),i=n.n(r);const o="DD.MM.YYYY, HH:mm [Uhr]",s=function(e,t="DD.MM.YYYY"){let n;return"long"===t&&(t=o),"number"==typeof e&&(n=e.toString().length>10?i()(e):i().unix(e)),("string"==typeof e||e instanceof Date)&&(n=i()(e)),null==n?i()().format(t):n.format(t)},a=function(e,t="DD.MM.YYYY"){return i()(e,t).toDate()},l=(e,t)=>{const n=Number(t);return n?Translator.trans("input.text.exactlength.short",{requiredlength:t,count:e,class:e===n?"color-status-progress-text":"color-status-failed-text"}):""},c=(e,t)=>{const n=t>50?15:3,r=Number(t);return r?Translator.trans("input.text.maxlength.short",{max:r,count:r-e,class:r-e>n?"color-status-progress-text":"color-status-failed-text"}):""},d=(e,t)=>{const n=Number(t);return n?Translator.trans("input.text.minlength.short",{min:n,count:n-e,class:n<=e?"color-status-progress-text":"color-status-failed-text"}):""};function u(e){return!!dplan.permissions[e]}function p(e){if(!1===Array.isArray(e))throw new Error('Typeof "permissions" is not an Array');return e.some((e=>!!dplan.permissions[e]))}function h(e){if(!1===Array.isArray(e))throw new Error('Typeof "permissions" is not an Array');return e.every((e=>!!dplan.permissions[e]))}var f={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},m=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],g=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],y=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],v="undefined"!=typeof window&&void 0!==window.document?window.document:{},b="fullscreenEnabled"in v&&Object.keys(f)||m[0]in v&&m||g[0]in v&&g||y[0]in v&&y||[];const w={requestFullscreen:function(e){return e[b[f.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[b[f.requestFullscreen]]},get exitFullscreen(){return v[b[f.exitFullscreen]].bind(v)},get fullscreenPseudoClass(){return":"+b[f.fullscreen]},addEventListener:function(e,t,n){return v.addEventListener(b[f[e]],t,n)},removeEventListener:function(e,t,n){return v.removeEventListener(b[f[e]],t,n)},get fullscreenEnabled(){return Boolean(v[b[f.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return v[b[f.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return v[("on"+b[f.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return v[("on"+b[f.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return v[("on"+b[f.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return v[("on"+b[f.fullscreenerror]).toLowerCase()]=e}},x=function(e){return!!w.fullscreenEnabled&&(null===w.fullscreenElement?(w.requestFullscreen(e),!0):(w.exitFullscreen(),!1))},S=function(e){w.addEventListener("fullscreenchange",e)},k=function(e){w.removeEventListener("fullscreenchange",e)},C=function(){return w.fullscreenEnabled&&null!==w.fullscreenElement};function _(e,t,n){let r;return function(){const i=this,o=arguments,s=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(i,o)}),t),s&&e.apply(i,o)}}const A=(e,t)=>{const n=e=>e&&"object"==typeof e;return n(e)&&n(t)?(Object.keys(t).forEach((r=>{const i=e[r],o=t[r];Array.isArray(i)&&Array.isArray(o)?e[r]=i.concat(o):n(i)&&n(o)?e[r]=A(Object.assign({},i),o):e[r]=o})),e):t},E=A;function O(e,t){if(0===e)return"0 Bytes";const n=t<=0?0:t||2,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}function T(){const e=document.createElement("fakeelement"),t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};let n;for(n in t)if(void 0!==e.style[n])return t[n];return!1}var D=n(6951),M=n(6777),N=n(6317);function I(e,t,n="asc"){const r=e;return"string"==typeof r[0]?r.sort(((e,t)=>e.localeCompare(t,"de",{sensitivity:"base"}))):"object"==typeof e[0]&&(0,M.Z)(e[0],t)&&r.sort(((e,n)=>{const r=t.split(".");let i=e,o=n;for(const e of r)(0,M.Z)(i,e)&&(0,M.Z)(o,e)&&(i=i[e],o=o[e]);return i.localeCompare(o,"de",{sensitivity:"base"})})),"desc"===n&&r.reverse(),r}function P(e,t){let n;return function(){const r=arguments;n||(e.apply(this,r),n=!0,setTimeout((()=>{n=!1}),t))}}var $=n(3882)},6317:(e,t,n)=>{"use strict";function r(e=""){let t="";"undefined"!=typeof dplan&&dplan.settings&&dplan.settings.publicCSSClassPrefix&&(t=dplan.settings.publicCSSClassPrefix);let n="";if(""===t)return e;if("string"!=typeof e)throw new Error("classList is an"+typeof e+". should be String.",e);return n=/[.#[]/gi.test(e)?e.replace(/(\.)(\S+)/gi,((e,n,r)=>`.${t}${r}`)):e.replace(/(\S+)/gi,(e=>`${t}${e}`)),n}n.d(t,{Z:()=>r})},3882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6777);function i(e,t){const n=e.concat();if(n&&(0,r.Z)(n[0],t))for(let e=0;e<n.length;++e)for(let r=e+1;r<n.length;++r)n[e][t]===n[r][t]&&n.splice(r--,1);return n}},1635:e=>{"use strict";e.exports=require("dayjs")},1320:e=>{"use strict";e.exports=require("dompurify")},4654:()=>{}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e].call(n.exports,n,n.exports,s),n.exports}s.m=i,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);s.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>n[e]));return o.default=()=>n,s.d(i,o),i},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".demosplan-ui.umd.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="__demos_europe_demosplan_ui:",s.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+i){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+i),a.src=e),n[e]=[t];var p=(t,r)=>{a.onerror=a.onload=null,clearTimeout(h);var i=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="",(()=>{var e={179:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=i);var o=s.p+s.u(t),a=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);l&&l(s)}for(t&&t(n);c<o.length;c++)i=o[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackChunk_demos_europe_demosplan_ui=self.webpackChunk_demos_europe_demosplan_ui||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a={};return(()=>{"use strict";s.d(a,{default:()=>gC});const e=()=>({type:[Boolean,String],required:!1,default:!1,validator:e=>!0!==e&&Number(e)%1==0}),t=e=>{const t={textarea:["cols","rows"]};return{type:Array,required:!1,default:()=>[],validator:n=>{const r=n.filter((n=>{const r=n.split("=");return t[e].includes(r[0])&&2===r.length}));if(0===n.length||r.length===n.length)return!0;console.error(`A Vue form component of type "${e}" is used with the "attributes" prop containing a disallowed attr.`)}}};var n=s(2333),r=s(9609);function i(e,t,n){let r=t;if(e.length>0){const i=/(\[|\]|\\|\^|\$|\.|\||\?|\*|\+|\(|\)|\.)/gi;let o=e.replace(i,"\\$1");o=o.replace(/\s+/gi,"\\s+");const s=new RegExp(o,"ig");r=t.filter((e=>n.filter((t=>{const n=t.split(".");let r=e[n[0]],i=!!r,o=1;for(;i&&o<n.length;)r=r[n[o]],i=!!r,o++;return"string"==typeof r&&r.match(s)})).length>0))}return r}const o={name:"DpTransitionExpand",functional:!0,render:(e,t)=>e("transition",{props:{name:"expand"},on:{afterEnter(e){e.style.height="auto"},enter(e){e.style.width=getComputedStyle(e).width,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";const t=getComputedStyle(e).height;e.style.width=null,e.style.position=null,e.style.visibility=null,e.style.height=0,getComputedStyle(e).height,requestAnimationFrame((()=>{e.style.height=t}))},leave(e){e.style.height=getComputedStyle(e).height,getComputedStyle(e).height,requestAnimationFrame((()=>{e.style.height=0}))}}},t.children)};var l=s(1900);const c=(0,l.Z)(o,void 0,void 0,!1,null,null,null).exports,d={name:"DpAccordion",components:{DpTransitionExpand:c},props:{fontWeight:{type:String,required:!1,default:"bold",validate:e=>["normal","bold"].includes(e)},compressed:{type:Boolean,default:!1},isOpen:{type:Boolean,required:!1,default:!1},title:{type:String,required:!1,default:""}},data(){return{isVisible:this.isOpen}},watch:{isOpen(){this.isVisible=this.isOpen}},methods:{toggle(e){this.isVisible=void 0===e?!this.isVisible:e,this.$emit("item:toggle",this.isVisible)}}},u=(0,l.Z)(d,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"o-accordion"},[""!==e.title?t("button",{staticClass:"btn--blank o-link--default",class:"bold"===e.fontWeight?"weight--bold":"weight--normal",attrs:{type:"button","aria-expanded":e.isVisible.toString(),"data-cy":"accordionToggle"},on:{click:()=>e.toggle()}},[t("i",{staticClass:"width-s fa",class:{"fa-caret-right":!e.isVisible,"fa-caret-down":e.isVisible},attrs:{"aria-hidden":"true"}}),e._v(" "),t("span",{class:e.compressed?"font-size-medium":"o-accordion--title"},[e._v(e._s(e.title))])]):e._e(),e._v(" "),t("dp-transition-expand",[t("div",{directives:[{name:"show",rawName:"v-show",value:e.isVisible,expression:"isVisible"}]},[e._t("default")],2)])],1)}),[],!1,null,null,null).exports;var p=s(9669),h=s.n(p),f=s(6777),m=s(129);const g=require("uuid");let y=null,v=null;"undefined"!=typeof dplan&&((0,f.Z)(dplan,"procedureId")&&(y=dplan.procedureId),(0,f.Z)(dplan,"jwtToken")&&(v=dplan.jwtToken));const b={"X-JWT-Authorization":"Bearer "+v},w={Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json","X-JWT-Authorization":"Bearer "+v},x=function(e){const t=e.url.includes("api/2.0/")?{...w,...e.headers}:{...b,...e.headers};return null!==y&&(t["X-Demosplan-Procedure-Id"]=y),t},S=e=>h()({data:{},...e,headers:x(e)}),k=S;k.post=(e,t={},n={},r={})=>S({method:"post",url:e,data:n,params:t,options:r}),k.get=(e,t={},n={})=>{if(!0===n.serialize){const r={paramsSerializer:e=>(0,m.stringify)(e,{encodeValuesOnly:!0,arrayFormat:"brackets"}),headers:x({...t,url:e})};return delete n.serialize,h().create(r).request({method:"get",data:{},url:e,params:t,...n})}return S({method:"get",url:e,data:{},params:t,options:n})},k.put=(e,t={},n={},r={})=>S({method:"put",url:e,data:n,params:t,options:r}),k.patch=(e,t={},n={},r={})=>S({method:"patch",url:e,data:n,params:t,options:r}),k.delete=(e,t={},n={},r={})=>S({method:"delete",url:e,params:t,options:r});const C=function(e){if((0,f.Z)(e,"messages"))for(const t in e.messages)for(const n in e.messages[t])dplan.notify.notify(t,Translator.trans(e.messages[t][n]))},_=function(e,t){return new Promise(((n,r)=>{(0,f.Z)(e,"data")&&e.data&&(0,f.Z)(e.data,"meta")?C(e.data.meta):void 0!==dplan&&dplan.debug&&(0,f.Z)(e,"errors")&&(0,f.Z)(e,"meta")&&(0,f.Z)(e.meta,"messages")?C(e.meta):t&&(0,f.Z)(t,e.status)&&dplan.notify.notify(t[e.status].type,Translator.trans(t[e.status].text)),e.status>=400?r(e.data):200===e.status?n(e.data):n(null)}))},A={antragx:[".antragx"],pdf:[".pdf"],"pdf-img":[".pdf","image/*"],"pdf-img-zip":[".pdf","image/*",".zip"],"pdf-zip":[".pdf",".zip"],img:["image/*"],import:[".docx"],all:[".jpg",".png",".bmp",".jpeg",".zip",".docx",".pdf",".bin",".txt",".tiff",".tif"],zip:[".zip"],csv:[".csv"],"pdf-video":[".pdf","video/*"],"pdf-zip-video":[".pdf","video/*",".zip"],xls:[".xls",".xlsx",".ods"]},E={"text/plain":"txt","text/html":"html","text/css":"css","application/javascript":"js","application/json":"json","application/xml":"xml","application/x-shockwave-flash":"swf","application/octet-stream":"binary","video/x-flv":"flv","image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/bmp":"bmp","image/vnd.microsoft.icon":"ico","image/tiff":"tiff","image/svg+xml":"svg","application/zip":"zip","application/x-rar-compressed":"rar","application/x-msdownload":"exe","application/vnd.ms-cab-compressed":"cab","audio/mpeg":"mp3","video/quicktime":"mov","application/pdf":"pdf","application/x-pdf":"pdf","application/x-download":"pdf","image/vnd.adobe.photoshop":"psd","application/postscript":"ps","application/msword":"doc","application/vnd.openxmlformats-officedocument.wo:processingml.document":"docx","application/rtf":"rtf","application/vnd.ms-excel":"xls","application/vnd.ms-powerpoint":"ppt","application/vnd.oasis.opendocument.text":"odt","application/vnd.oasis.opendocument.spreadsheet":"ods"},O=function(e,t){let n;switch(e){case"KB":n=t/1024;break;case"MB":n=t/1048576;break;case"GB":n=t/1073741824;break;case"TB":n=t/1099511627776;break;default:n=t}return Math.round(n)+" "+e},T=function(e){return(0,f.Z)(A,e)?A[e]:e};var D=s(6317);class M{constructor(e){this.el=e,this.trigger=this.el.querySelector("[aria-haspopup]"),this.menu=this.el.querySelector('[role="menu"]'),this.menuItems=this.menu.querySelectorAll("[data-actionmenu-menuitem]"),this.hasCurrent=this.menu.querySelectorAll("[data-actionmenu-current]").length>0,this.currentlySelectedIndex=0,this.openMenu=this.openMenu.bind(this),this.closeMenu=this.closeMenu.bind(this),this.highlightCurrent=this.highlightCurrent.bind(this),this.handleTriggerKeydown=this.handleTriggerKeydown.bind(this),this.handleTriggerFocus=this.handleTriggerFocus.bind(this),this.handleMenuItemKeydown=this.handleMenuItemKeydown.bind(this),this.el.addEventListener("mouseover",this.openMenu),this.el.addEventListener("mouseleave",this.closeMenu),this.trigger.addEventListener("focus",this.handleTriggerFocus),this.trigger.addEventListener("keydown",this.handleTriggerKeydown);for(let e=0;e<this.menuItems.length;e++){const t=this.menuItems[e];t.addEventListener("click",this.highlightCurrent),t.addEventListener("keydown",this.handleMenuItemKeydown)}}handleTriggerKeydown(e){switch(e.keyCode){case 40:e.preventDefault(),this.openMenu(),this.menu.classList.remove((0,D.Z)("has-focused-trigger")),this.menuItems[this.currentlySelectedIndex].focus();break;case 38:case 9:this.closeMenu();break;case 27:this.closeMenu(),this.trigger.focus()}}handleTriggerFocus(){this.openMenu()}handleMenuItemKeydown(e){switch(e.keyCode){case 40:e.preventDefault(),this.currentlySelectedIndex<this.menuItems.length-1?this.currentlySelectedIndex++:this.currentlySelectedIndex=0,this.menuItems[this.currentlySelectedIndex].focus();break;case 38:e.preventDefault(),0===this.currentlySelectedIndex?this.currentlySelectedIndex=this.menuItems.length-1:this.currentlySelectedIndex--,this.menuItems[this.currentlySelectedIndex].focus();break;case 9:case 27:this.trigger.focus(),this.closeMenu()}}openMenu(){this.trigger.setAttribute("aria-expanded","true"),this.menu.classList.add("has-focused-trigger"),this.el.classList.add("is-expanded")}closeMenu(){this.trigger.setAttribute("aria-expanded","false"),this.menu.classList.remove("has-focused-trigger"),this.el.classList.remove("is-expanded"),this.currentlySelectedIndex=0}highlightCurrent(e){this.hasCurrent&&(this.menu.querySelector("[data-actionmenu-current]").removeAttribute("data-actionmenu-current"),e.target.setAttribute("data-actionmenu-current",!0))}}const N=class{constructor(e){if(!e)throw new Error("Missing required argument. new Detabinator needs an element reference");this._inert=!1,this._focusableElementsString="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]",this._focusableElements=Array.from(e.querySelectorAll(this._focusableElementsString))}get inert(){return this._inert}set inert(e){this._inert!==e&&(this._inert=e,this._focusableElements.forEach((t=>{if(e)t.hasAttribute("tabindex")&&(t.__savedTabindex=t.tabIndex),t.setAttribute("tabindex",-1);else{if(0===t.__savedTabindex||t.__savedTabindex)return t.setAttribute("tabindex",t.__savedTabindex);t.removeAttribute("tabindex")}})))}},I=class{constructor(){this.breakpointToNumber={palm:0,"lap-up":1,"desk-up":2,wide:3}}getCurrentBreakpoint(){return window.getComputedStyle(document.querySelector("body"),":before").getPropertyValue("content").replace(/'/g,"").replace(/"/g,"")}is(e){return this.getCurrentBreakpoint()===e}greater(e){return this.breakpointToNumber[this.getCurrentBreakpoint()]>this.breakpointToNumber[e]}less(e){return this.breakpointToNumber[this.getCurrentBreakpoint()]<this.breakpointToNumber[e]}},P=class{constructor(){if(!document.querySelector("[data-slidebar]"))return;this.showButtonElements=Array.from(document.querySelectorAll("[data-slidebar-show]")),this.hideButtonElements=Array.from(document.querySelectorAll("[data-slidebar-hide]")),this.sideNavEl=document.querySelector("[data-slidebar]"),this.sideNavContainerEl=document.querySelector("[data-slidebar-container]"),this.orientation=this.sideNavEl.getAttribute("data-slidebar"),this.sideNavClassVisible="is-visible",this.sideNavClassAnimatable="is-animatable",this.detabinator=new N(this.sideNavContainerEl),this.detabinator.inert=!0,this.showSideNav=this.showSideNav.bind(this),this.hideSideNav=this.hideSideNav.bind(this),this.blockClicks=this.blockClicks.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTransitionEnd=this.onTransitionEnd.bind(this),this.update=this.update.bind(this);const e=document,t=e.documentElement,n=e.getElementsByTagName("body")[0];this.innerWidth=window.innerWidth||t.clientWidth||n.clientWidth,this.initialTranslateX=this.getTranslateX(this.sideNavContainerEl),this.startX="right"===this.orientation?this.innerWidth:0,this.currentX="right"===this.orientation?this.innerWidth:0,this.touchingSideNav=!1,this.transitionEndProperty=null,this.transitionEndTime=0,this.supportsPassive=void 0,this.addEventListeners()}applyPassive(){if(void 0!==this.supportsPassive)return!!this.supportsPassive&&{passive:!0};let e=!1;try{document.addEventListener("test",null,{get passive(){e=!0}})}catch(e){}return this.supportsPassive=e,this.applyPassive()}addEventListeners(){this.showButtonElements.forEach((e=>{e.addEventListener("click",this.showSideNav)})),this.hideButtonElements.forEach((e=>{e.addEventListener("click",this.hideSideNav)})),this.sideNavEl.addEventListener("click",this.hideSideNav),this.sideNavContainerEl.addEventListener("click",this.blockClicks),this.sideNavEl.addEventListener("touchstart",this.onTouchStart,this.applyPassive()),this.sideNavEl.addEventListener("touchmove",this.onTouchMove,this.applyPassive()),this.sideNavEl.addEventListener("touchend",this.onTouchEnd)}onTouchStart(e){this.sideNavEl.classList.contains(this.sideNavClassVisible)&&(this.startX=e.touches[0].pageX,this.currentX=this.startX,this.touchingSideNav=!0,requestAnimationFrame(this.update))}onTouchMove(e){this.touchingSideNav&&(this.currentX=e.touches[0].pageX)}onTouchEnd(e){if(!this.touchingSideNav)return;const t="right"===this.orientation?this.initialTranslateX:0;this.touchingSideNav=!1,this.sideNavContainerEl.style.transform="",this.updateTranslateX()<t&&this.hideSideNav()}update(){this.touchingSideNav&&(requestAnimationFrame(this.update),this.sideNavContainerEl.style.transform=`translateX(${this.updateTranslateX()}px)`)}blockClicks(e){e.stopPropagation()}onTransitionEnd(e){e.propertyName!==this.transitionEndProperty&&e.elapsedTime!==this.transitionEndTime||(this.transitionEndProperty=null,this.transitionEndTime=0,this.sideNavEl.classList.remove(this.sideNavClassAnimatable),this.sideNavEl.removeEventListener("transitionend",this.onTransitionEnd))}showSideNav(){this.sideNavEl.classList.add(this.sideNavClassAnimatable),this.sideNavEl.classList.add(this.sideNavClassVisible),this.detabinator.inert=!1,this.transitionEndProperty="transform",this.transitionEndTime=.33,this.sideNavEl.addEventListener("transitionend",this.onTransitionEnd)}hideSideNav(){this.sideNavEl.classList.add(this.sideNavClassAnimatable),this.sideNavEl.classList.remove(this.sideNavClassVisible),this.detabinator.inert=!0,this.transitionEndProperty="transform",this.transitionEndTime=.13,this.sideNavEl.addEventListener("transitionend",this.onTransitionEnd)}getTranslateX(e){if(!window.getComputedStyle)return;const t=[],n=getComputedStyle(e),r=n.transform||n.mozTransform||n.msTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[13]):(i=r.match(/^matrix\((.+)\)$/),i?t.push(parseFloat(i[1].split(", ")[4])):t.push(0),i?t.push(parseFloat(i[1].split(", ")[5])):t.push(0),t[0])}updateTranslateX(){return"right"===this.orientation?Math.max(0,this.currentX-this.startX):Math.min(0,this.currentX-this.startX)}};var $=s(6951);const R=class{constructor(e,t,n=0,r="top",i="palm",o=null,s=!0){this.element=e,this.context=t||this.element.offsetParent,this.container=o||this.element.offsetParent,this.elementOffset=n,this.stickToDirection=r,this.stickFromBreakpoint=i,this.observeContext=s,this.className={top:"is-top",bottom:"is-bottom",fixed:"is-fixed",bound:"is-bound"},this.currentBreakpoint=new I,this.isParentContext=this._isParentContext(),this._savePositions(),this._wrapElement(),this.observeContext&&(this.contextResizeObserver=new ResizeObserver(this._handleContextChange.bind(this)),this.contextResizeObserver.observe(this.context),this.contextMutationObserver=new MutationObserver(this._handleContextChange.bind(this)),this.contextMutationObserver.observe(this.context,{childList:!0,subtree:!0})),this.elementResizeObserver=new ResizeObserver(this._handleElementChange.bind(this)),this.elementResizeObserver.observe(this.element),document.addEventListener("scroll",this._handleScroll.bind(this),{passive:!0})}destroy(){this.observeContext&&(this.contextResizeObserver.disconnect(),this.contextMutationObserver.disconnect()),this.elementResizeObserver.disconnect(),document.removeEventListener("scroll",this._handleScroll),this.wrapped.remove()}_wrapElement(){const e=document.createElement("div");this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),this.wrapped=e,this._setMinHeight(this.wrapped)}_handleContextChange(){this._unsetContainerHeight(),this._unsetPosition(),!0===this._StickFromBreakpoint()&&this._savePositions(),this._stickier()}_handleElementChange(){window.requestAnimationFrame((()=>this._updateElementWrapper()))}_updateElementWrapper(){const e=this.stored.element.top;this._savePositions(),this.stored.element.top=e,this.stored.element.bottom=e+this.stored.element.height,this._setMinHeight(this.wrapped)}_handleScroll(){window.requestAnimationFrame(this._stickier.bind(this))}_stickier(){if(!1===this._StickFromBreakpoint())return;const e=this.stored,t=!1===e.fitsViewport,n=e.context,r=e.element,i=e.viewport,o={top:(0,$.Z)()+this.elementOffset,bottom:(0,$.Z)()+this.elementOffset+i.height},s=e.fitsViewport?0:this._getElementScroll(o.top);this._log((()=>this._isInitial()),this._isInitial(),this._is("top"),this._is("bottom")),this._isInitial()?o.top>=n.bottom?(this._log("element context above viewport - initial position is bottom of context"),this._bindBottom()):o.top>r.top&&(r.height+o.top-s>=n.bottom?(this._log("element ends below context - initial position is bottom of context"),this._bindBottom()):(this._log("element ends above context - initial position is fixed to top"),this._fixTop())):this._is("fixed")?this._is("top")?o.top<=r.top?(this._log("fixed element reached top of container"),this._unsetPosition()):r.height+o.top-s>=n.bottom?(this._log("fixed element reached bottom of container"),this._bindBottom()):t&&(this._log("syncing large element wit scrollPosition"),this._setElementScroll(s),this.stored.scroll=o.top,this.stored.elementScroll=s):this._is("bottom")&&(o.bottom-r.height<=r.top?(this._log("bottom fixed rail has reached top of container"),this._unsetPosition()):o.bottom>=n.bottom?(this._log("bottom fixed rail has reached bottom of container"),this._bindBottom()):t&&(this._log("syncing large element wit scrollPosition"),this._setElementScroll(s),this.stored.scroll=o.top,this.stored.elementScroll=s)):this._is("bottom")&&(o.top<=r.top?(this._log("Jumped from bottom fixed to top fixed"),this._unsetPosition()):this._is("bound")&&o.top<=n.bottom-r.height&&(this._log("Fixing bottom attached element to top of browser."),this._fixTop()))}_fixTop(){this._setElementWidth(),this._setElementOffset(),this.element.classList.remove(this.className.bottom),this.element.classList.remove(this.className.bound),this.element.classList.add(this.className.top),this.element.classList.add(this.className.fixed)}_bindBottom(){this.element.style.top=null,this._unsetElementOffset(),this._setElementWidth(),this._setRail(),this.element.classList.remove(this.className.top),this.element.classList.remove(this.className.fixed),this.element.classList.add(this.className.bottom),this.element.classList.add(this.className.bound)}_unFix(){this._unsetElementStyles(),this.element.classList.remove(this.className.top),this.element.classList.remove(this.className.bottom),this.element.classList.remove(this.className.fixed)}_unBind(){this._unsetElementStyles(),this.element.classList.remove(this.className.top),this.element.classList.remove(this.className.bottom),this.element.classList.remove(this.className.bound)}_unsetPosition(){this._unFix(),this._unBind()}_unsetElementStyles(){this._unsetElementOffset(),this._unsetRail(),this.element.style[this.stickToDirection]=null,this.element.style.width=null}_setContainerHeight(){this.isParentContext||!this.container||this._isHidden(this.container)||(this.container.style["min-height"]=Math.ceil(this.stored.context.height)+"px")}_unsetContainerHeight(){this.container&&!this._isHidden(this.container)&&(this.container.style["min-height"]=null)}_setElementWidth(){this.element.style.width=this.wrapped.offsetWidth+"px"}_setRail(){this.wrapped.style["min-height"]=Math.ceil(this.stored.context.height)+"px",this.wrapped.style.position="relative"}_unsetRail(){this.wrapped.style["min-height"]=Math.ceil(this.stored.element.height)+"px",this.wrapped.style.position=null}_setElementOffset(){this.element.style[`margin-${this.stickToDirection}`]=this.elementOffset+"px"}_unsetElementOffset(){this.element.style[`margin-${this.stickToDirection}`]=null}_setMinHeight(e){e.style["min-height"]=Math.ceil(this.stored.element.height)+"px"}_StickFromBreakpoint(){return this.currentBreakpoint.is(this.stickFromBreakpoint)||this.currentBreakpoint.greater(this.stickFromBreakpoint)}_savePositions(){const e={height:this._getHeight(this.element),top:this._getOffsetTop(this.element)},t={height:this._getHeight(this.context),top:this._getOffsetTop(this.context)},n={height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)};this.stored={fitsViewport:e.height+this.elementOffset<=n.height,scroll:null,elementScroll:null,element:{top:e.top,height:e.height,bottom:e.top+e.height},context:{top:t.top,height:t.height,bottom:t.top+t.height},viewport:{height:n.height}},this._setContainerHeight()}_setElementScroll(e){this.stored.scroll!==e&&(this._is("top")&&(this.element.style.top=`-${e}px`,this.element.style.bottom=null),this._is("bottom")&&(this.element.style.bottom=`-${e}px`,this.element.style.top=null))}_getElementScroll(e){e=e||(0,$.Z)();const t=this.stored.element,n=this.stored.viewport.height,r=this.stored.scroll?e-this.stored.scroll:0,i=t.height-n+this.elementOffset;let o=this._getCurrentElementScroll();const s=o+r;return o=this.stored.fitsViewport||s<0?0:s>i?i:s,o}_getOffsetTop(e){let t=0;do{t+=e.offsetTop||0,e=e.offsetParent}while(e);return t}_getHeight(e){return Math.max(e.offsetHeight,e.clientHeight)}_getCurrentElementScroll(){return this.stored.elementScroll?this.stored.elementScroll:Math.abs(parseInt(this._is("top")?this.element.style.top:this.element.style.bottom,10))||0}_is(e){return this.element.classList.contains(this.className[e])}_isInitial(){return!1===this._is("fixed")&&!1===this._is("bound")}_isParentContext(){let e=this.element;do{if(e=e.parentNode,this.context===e)return!0}while(e);return!1}_isHidden(e){return"none"===window.getComputedStyle(e).display}_log(){let e=()=>!0,t="",n=0;if("function"==typeof arguments[0]&&(e=arguments[0],n=1),e()){for(;n<arguments.length;n++)t+=arguments[n]+" ";return t}}},B=(e,t)=>{const n=e.getAttribute(`data-sticky-${t}`)||null;return n?document.getElementById(n):null},q=function(e,t){e.parentNode.insertBefore(t,e),t.appendChild(e)},F=function(e){const t=document.createElement("div");return t.classList.add(e),t},L=function(e,t){return Array.from(e).filter((e=>e.tagName===t.toUpperCase()))};var V=s(2771),j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==s.g?s.g:"undefined"!=typeof self?self:{};function z(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var H=function(e){return e&&e.Math==Math&&e},U=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof j&&j)||Function("return this")(),W=function(e){try{return!!e()}catch(e){return!0}},Z=!W((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),K={}.propertyIsEnumerable,J=Object.getOwnPropertyDescriptor,G={f:J&&!K.call({1:2},1)?function(e){var t=J(this,e);return!!t&&t.enumerable}:K},Y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},X={}.toString,Q=function(e){return X.call(e).slice(8,-1)},ee="".split,te=W((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==Q(e)?ee.call(e,""):Object(e)}:Object,ne=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},re=function(e){return te(ne(e))},ie=function(e){return"object"==typeof e?null!==e:"function"==typeof e},oe=function(e,t){if(!ie(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ie(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ie(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ie(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},se={}.hasOwnProperty,ae=function(e,t){return se.call(e,t)},le=U.document,ce=ie(le)&&ie(le.createElement),de=function(e){return ce?le.createElement(e):{}},ue=!Z&&!W((function(){return 7!=Object.defineProperty(de("div"),"a",{get:function(){return 7}}).a})),pe=Object.getOwnPropertyDescriptor,he={f:Z?pe:function(e,t){if(e=re(e),t=oe(t,!0),ue)try{return pe(e,t)}catch(e){}if(ae(e,t))return Y(!G.f.call(e,t),e[t])}},fe=function(e){if(!ie(e))throw TypeError(String(e)+" is not an object");return e},me=Object.defineProperty,ge={f:Z?me:function(e,t,n){if(fe(e),t=oe(t,!0),fe(n),ue)try{return me(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},ye=Z?function(e,t,n){return ge.f(e,t,Y(1,n))}:function(e,t,n){return e[t]=n,e},ve=function(e,t){try{ye(U,e,t)}catch(n){U[e]=t}return t},be=U["__core-js_shared__"]||ve("__core-js_shared__",{}),we=Function.toString;"function"!=typeof be.inspectSource&&(be.inspectSource=function(e){return we.call(e)});var xe,Se,ke,Ce=be.inspectSource,_e=U.WeakMap,Ae="function"==typeof _e&&/native code/.test(Ce(_e)),Ee=z((function(e){(e.exports=function(e,t){return be[e]||(be[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Oe=0,Te=Math.random(),De=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Oe+Te).toString(36)},Me=Ee("keys"),Ne=function(e){return Me[e]||(Me[e]=De(e))},Ie={},Pe=U.WeakMap;if(Ae){var $e=new Pe,Re=$e.get,Be=$e.has,qe=$e.set;xe=function(e,t){return qe.call($e,e,t),t},Se=function(e){return Re.call($e,e)||{}},ke=function(e){return Be.call($e,e)}}else{var Fe=Ne("state");Ie[Fe]=!0,xe=function(e,t){return ye(e,Fe,t),t},Se=function(e){return ae(e,Fe)?e[Fe]:{}},ke=function(e){return ae(e,Fe)}}var Le,Ve,je={set:xe,get:Se,has:ke,enforce:function(e){return ke(e)?Se(e):xe(e,{})},getterFor:function(e){return function(t){var n;if(!ie(t)||(n=Se(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ze=z((function(e){var t=je.get,n=je.enforce,r=String(String).split("String");(e.exports=function(e,t,i,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||ae(i,"name")||ye(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==U?(s?!l&&e[t]&&(a=!0):delete e[t],a?e[t]=i:ye(e,t,i)):a?e[t]=i:ve(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||Ce(this)}))})),He=U,Ue=function(e){return"function"==typeof e?e:void 0},We=function(e,t){return arguments.length<2?Ue(He[e])||Ue(U[e]):He[e]&&He[e][t]||U[e]&&U[e][t]},Ze=Math.ceil,Ke=Math.floor,Je=function(e){return isNaN(e=+e)?0:(e>0?Ke:Ze)(e)},Ge=Math.min,Ye=function(e){return e>0?Ge(Je(e),9007199254740991):0},Xe=Math.max,Qe=Math.min,et=function(e,t){var n=Je(e);return n<0?Xe(n+t,0):Qe(n,t)},tt=function(e){return function(t,n,r){var i,o=re(t),s=Ye(o.length),a=et(r,s);if(e&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},nt=(tt(!0),tt(!1)),rt=function(e,t){var n,r=re(e),i=0,o=[];for(n in r)!ae(Ie,n)&&ae(r,n)&&o.push(n);for(;t.length>i;)ae(r,n=t[i++])&&(~nt(o,n)||o.push(n));return o},it=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ot=it.concat("length","prototype"),st={f:Object.getOwnPropertyNames||function(e){return rt(e,ot)}},at={f:Object.getOwnPropertySymbols},lt=We("Reflect","ownKeys")||function(e){var t=st.f(fe(e)),n=at.f;return n?t.concat(n(e)):t},ct=function(e,t){for(var n=lt(t),r=ge.f,i=he.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r(e,s,i(t,s))}},dt=/#|\.prototype\./,ut=function(e,t){var n=ht[pt(e)];return n==mt||n!=ft&&("function"==typeof t?W(t):!!t)},pt=ut.normalize=function(e){return String(e).replace(dt,".").toLowerCase()},ht=ut.data={},ft=ut.NATIVE="N",mt=ut.POLYFILL="P",gt=ut,yt=he.f,vt=function(e,t){var n,r,i,o,s,a=e.target,l=e.global,c=e.stat;if(n=l?U:c?U[a]||ve(a,{}):(U[a]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(s=yt(n,r))&&s.value:n[r],!gt(l?r:a+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;ct(o,i)}(e.sham||i&&i.sham)&&ye(o,"sham",!0),ze(n,r,o,e)}},bt=Array.isArray||function(e){return"Array"==Q(e)},wt=function(e){return Object(ne(e))},xt=function(e,t,n){var r=oe(t);r in e?ge.f(e,r,Y(0,n)):e[r]=n},St=!!Object.getOwnPropertySymbols&&!W((function(){return!String(Symbol())})),kt=St&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ct=Ee("wks"),_t=U.Symbol,At=kt?_t:_t&&_t.withoutSetter||De,Et=function(e){return ae(Ct,e)||(St&&ae(_t,e)?Ct[e]=_t[e]:Ct[e]=At("Symbol."+e)),Ct[e]},Ot=Et("species"),Tt=function(e,t){var n;return bt(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!bt(n.prototype)?ie(n)&&null===(n=n[Ot])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},Dt=We("navigator","userAgent")||"",Mt=U.process,Nt=Mt&&Mt.versions,It=Nt&&Nt.v8;It?Ve=(Le=It.split("."))[0]+Le[1]:Dt&&(!(Le=Dt.match(/Edge\/(\d+)/))||Le[1]>=74)&&(Le=Dt.match(/Chrome\/(\d+)/))&&(Ve=Le[1]);var Pt=Ve&&+Ve,$t=Et("species"),Rt=function(e){return Pt>=51||!W((function(){var t=[];return(t.constructor={})[$t]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Bt=Et("isConcatSpreadable"),qt=Pt>=51||!W((function(){var e=[];return e[Bt]=!1,e.concat()[0]!==e})),Ft=Rt("concat"),Lt=function(e){if(!ie(e))return!1;var t=e[Bt];return void 0!==t?!!t:bt(e)};vt({target:"Array",proto:!0,forced:!qt||!Ft},{concat:function(e){var t,n,r,i,o,s=arguments,a=wt(this),l=Tt(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Lt(o=-1===t?a:s[t])){if(c+(i=Ye(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,c++)n in o&&xt(l,c,o[n])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");xt(l,c++,o)}return l.length=c,l}});var Vt=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},jt=[].push,zt=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,s=5==e||o;return function(a,l,c,d){for(var u,p,h=wt(a),f=te(h),m=function(e,t,n){return Vt(e),void 0===t?e:function(n,r,i){return e.call(t,n,r,i)}}(l,c),g=Ye(f.length),y=0,v=d||Tt,b=t?v(a,g):n?v(a,0):void 0;g>y;y++)if((s||y in f)&&(p=m(u=f[y],y,h),e))if(t)b[y]=p;else if(p)switch(e){case 3:return!0;case 5:return u;case 6:return y;case 2:jt.call(b,u)}else if(i)return!1;return o?-1:r||i?i:b}},Ht={forEach:zt(0),map:zt(1),filter:zt(2),some:zt(3),every:zt(4),find:zt(5),findIndex:zt(6)},Ut=Object.defineProperty,Wt={},Zt=function(e){throw e},Kt=function(e,t){if(ae(Wt,e))return Wt[e];t||(t={});var n=[][e],r=!!ae(t,"ACCESSORS")&&t.ACCESSORS,i=ae(t,0)?t[0]:Zt,o=ae(t,1)?t[1]:void 0;return Wt[e]=!!n&&!W((function(){if(r&&!Z)return!0;var e={length:-1};r?Ut(e,1,{enumerable:!0,get:Zt}):e[1]=1,n.call(e,i,o)}))},Jt=Ht.filter,Gt=Rt("filter"),Yt=Kt("filter");vt({target:"Array",proto:!0,forced:!Gt||!Yt},{filter:function(e){return Jt(this,e,arguments.length>1?arguments[1]:void 0)}});var Xt=function(e,t){var n=[][e];return!!n&&W((function(){n.call(null,t||function(){throw 1},1)}))},Qt=Ht.forEach,en=Xt("forEach"),tn=Kt("forEach"),nn=en&&tn?[].forEach:function(e){return Qt(this,e,arguments.length>1?arguments[1]:void 0)};vt({target:"Array",proto:!0,forced:[].forEach!=nn},{forEach:nn});var rn=function(e){return function(t,n,r,i){Vt(n);var o=wt(t),s=te(o),a=Ye(o.length),l=e?a-1:0,c=e?-1:1;if(r<2)for(;;){if(l in s){i=s[l],l+=c;break}if(l+=c,e?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:a>l;l+=c)l in s&&(i=n(i,s[l],l,o));return i}},on=[rn(!1),rn(!0)][0],sn=Xt("reduce"),an=Kt("reduce",{1:0});vt({target:"Array",proto:!0,forced:!sn||!an},{reduce:function(e){return on(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var ln=Rt("slice"),cn=Kt("slice",{ACCESSORS:!0,0:0,1:2}),dn=Et("species"),un=[].slice,pn=Math.max;vt({target:"Array",proto:!0,forced:!ln||!cn},{slice:function(e,t){var n,r,i,o=re(this),s=Ye(o.length),a=et(e,s),l=et(void 0===t?s:t,s);if(bt(o)&&("function"!=typeof(n=o.constructor)||n!==Array&&!bt(n.prototype)?ie(n)&&null===(n=n[dn])&&(n=void 0):n=void 0,n===Array||void 0===n))return un.call(o,a,l);for(r=new(void 0===n?Array:n)(pn(l-a,0)),i=0;a<l;a++,i++)a in o&&xt(r,i,o[a]);return r.length=i,r}});var hn,fn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return fe(n),function(e){if(!ie(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),mn=function(e,t,n){var r,i;return fn&&"function"==typeof(r=t.constructor)&&r!==n&&ie(i=r.prototype)&&i!==n.prototype&&fn(e,i),e},gn=Object.keys||function(e){return rt(e,it)},yn=Z?Object.defineProperties:function(e,t){fe(e);for(var n,r=gn(t),i=r.length,o=0;i>o;)ge.f(e,n=r[o++],t[n]);return e},vn=We("document","documentElement"),bn=Ne("IE_PROTO"),wn=function(){},xn=function(e){return"<script>"+e+"<\/script>"},Sn=function(){try{hn=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Sn=hn?function(e){e.write(xn("")),e.close();var t=e.parentWindow.Object;return e=null,t}(hn):((t=de("iframe")).style.display="none",vn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(xn("document.F=Object")),e.close(),e.F);for(var n=it.length;n--;)delete Sn.prototype[it[n]];return Sn()};Ie[bn]=!0;var kn=Object.create||function(e,t){var n;return null!==e?(wn.prototype=fe(e),n=new wn,wn.prototype=null,n[bn]=e):n=Sn(),void 0===t?n:yn(n,t)},Cn="[\t\n\v\f\r \u2028\u2029\ufeff]",_n=RegExp("^"+Cn+Cn+"*"),An=RegExp(Cn+Cn+"*$"),En=function(e){return function(t){var n=String(ne(t));return 1&e&&(n=n.replace(_n,"")),2&e&&(n=n.replace(An,"")),n}},On={start:En(1),end:En(2),trim:En(3)},Tn=st.f,Dn=he.f,Mn=ge.f,Nn=On.trim,In=U.Number,Pn=In.prototype,$n="Number"==Q(kn(Pn)),Rn=function(e){var t,n,r,i,o,s,a,l,c=oe(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=Nn(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(s=(o=c.slice(2)).length,a=0;a<s;a++)if((l=o.charCodeAt(a))<48||l>i)return NaN;return parseInt(o,r)}return+c};if(gt("Number",!In(" 0o1")||!In("0b1")||In("+0x1"))){for(var Bn,qn=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof qn&&($n?W((function(){Pn.valueOf.call(n)})):"Number"!=Q(n))?mn(new In(Rn(t)),n,qn):Rn(t)},Fn=Z?Tn(In):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Ln=0;Fn.length>Ln;Ln++)ae(In,Bn=Fn[Ln])&&!ae(qn,Bn)&&Mn(qn,Bn,Dn(In,Bn));qn.prototype=Pn,Pn.constructor=qn,ze(U,"Number",qn)}var Vn=Et("match"),jn=function(){var e=fe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function zn(e,t){return RegExp(e,t)}var Hn={UNSUPPORTED_Y:W((function(){var e=zn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:W((function(){var e=zn("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Un=Et("species"),Wn=ge.f,Zn=st.f,Kn=je.set,Jn=Et("match"),Gn=U.RegExp,Yn=Gn.prototype,Xn=/a/g,Qn=/a/g,er=new Gn(Xn)!==Xn,tr=Hn.UNSUPPORTED_Y;if(Z&>("RegExp",!er||tr||W((function(){return Qn[Jn]=!1,Gn(Xn)!=Xn||Gn(Qn)==Qn||"/a/i"!=Gn(Xn,"i")})))){for(var nr=function(e,t){var n,r,i,o=this instanceof nr,s=ie(n=e)&&(void 0!==(r=n[Vn])?!!r:"RegExp"==Q(n)),a=void 0===t;if(!o&&s&&e.constructor===nr&&a)return e;er?s&&!a&&(e=e.source):e instanceof nr&&(a&&(t=jn.call(e)),e=e.source),tr&&(i=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var l=mn(er?new Gn(e,t):Gn(e,t),o?this:Yn,nr);return tr&&i&&Kn(l,{sticky:i}),l},rr=function(e){e in nr||Wn(nr,e,{configurable:!0,get:function(){return Gn[e]},set:function(t){Gn[e]=t}})},ir=Zn(Gn),or=0;ir.length>or;)rr(ir[or++]);Yn.constructor=nr,nr.prototype=Yn,ze(U,"RegExp",nr)}!function(e){var t=We("RegExp"),n=ge.f;Z&&t&&!t[Un]&&n(t,Un,{configurable:!0,get:function(){return this}})}();var sr=RegExp.prototype.exec,ar=String.prototype.replace,lr=sr,cr=function(){var e=/a/,t=/b*/g;return sr.call(e,"a"),sr.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),dr=Hn.UNSUPPORTED_Y||Hn.BROKEN_CARET,ur=void 0!==/()??/.exec("")[1];(cr||ur||dr)&&(lr=function(e){var t,n,r,i,o=this,s=dr&&o.sticky,a=jn.call(o),l=o.source,c=0,d=e;return s&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),d=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(l="(?: "+l+")",d=" "+d,c++),n=new RegExp("^(?:"+l+")",a)),ur&&(n=new RegExp("^"+l+"$(?!\\s)",a)),cr&&(t=o.lastIndex),r=sr.call(s?n:o,d),s?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:cr&&r&&(o.lastIndex=o.global?r.index+r[0].length:t),ur&&r&&r.length>1&&ar.call(r[0],n,(function(){var e=arguments;for(i=1;i<arguments.length-2;i++)void 0===e[i]&&(r[i]=void 0)})),r});var pr=lr;vt({target:"RegExp",proto:!0,forced:/./.exec!==pr},{exec:pr});var hr=RegExp.prototype,fr=hr.toString,mr=W((function(){return"/a/b"!=fr.call({source:"a",flags:"b"})})),gr="toString"!=fr.name;(mr||gr)&&ze(RegExp.prototype,"toString",(function(){var e=fe(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in hr)?jn.call(e):n)}),{unsafe:!0});var yr=Et("species"),vr=!W((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),br="$0"==="a".replace(/./,"$0"),wr=Et("replace"),xr=!!/./[wr]&&""===/./[wr]("a","$0"),Sr=!W((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),kr=function(e,t,n,r){var i=Et(e),o=!W((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=o&&!W((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[yr]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!s||"replace"===e&&(!vr||!br||xr)||"split"===e&&!Sr){var a=/./[i],l=n(i,""[e],(function(e,t,n,r,i){return t.exec===pr?o&&!i?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:br,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:xr}),c=l[0],d=l[1];ze(String.prototype,e,c),ze(RegExp.prototype,i,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)})}r&&ye(RegExp.prototype[i],"sham",!0)},Cr=function(e){return function(t,n){var r,i,o=String(ne(t)),s=Je(n),a=o.length;return s<0||s>=a?e?"":void 0:(r=o.charCodeAt(s))<55296||r>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?e?o.charAt(s):r:e?o.slice(s,s+2):i-56320+(r-55296<<10)+65536}},_r=(Cr(!1),Cr(!0)),Ar=function(e,t,n){return t+(n?_r(e,t).length:1)},Er=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Q(e))throw TypeError("RegExp#exec called on incompatible receiver");return pr.call(e,t)};kr("match",1,(function(e,t,n){return[function(t){var n=ne(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=fe(e),o=String(this);if(!i.global)return Er(i,o);var s=i.unicode;i.lastIndex=0;for(var a,l=[],c=0;null!==(a=Er(i,o));){var d=String(a[0]);l[c]=d,""===d&&(i.lastIndex=Ar(o,Ye(i.lastIndex),s)),c++}return 0===c?null:l}]}));var Or=Math.max,Tr=Math.min,Dr=Math.floor,Mr=/\$([$&'`]|\d\d?|<[^>]*>)/g,Nr=/\$([$&'`]|\d\d?)/g;for(var Ir in kr("replace",2,(function(e,t,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=r.REPLACE_KEEPS_$0,s=i?"$":"$0";return[function(n,r){var i=ne(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!i&&o||"string"==typeof r&&-1===r.indexOf(s)){var l=n(t,e,this,r);if(l.done)return l.value}var c=fe(e),d=String(this),u="function"==typeof r;u||(r=String(r));var p=c.global;if(p){var h=c.unicode;c.lastIndex=0}for(var f=[];;){var m=Er(c,d);if(null===m)break;if(f.push(m),!p)break;""===String(m[0])&&(c.lastIndex=Ar(d,Ye(c.lastIndex),h))}for(var g,y="",v=0,b=0;b<f.length;b++){m=f[b];for(var w=String(m[0]),x=Or(Tr(Je(m.index),d.length),0),S=[],k=1;k<m.length;k++)S.push(void 0===(g=m[k])?g:String(g));var C=m.groups;if(u){var _=[w].concat(S,x,d);void 0!==C&&_.push(C);var A=String(r.apply(void 0,_))}else A=a(w,d,x,S,C,r);x>=v&&(y+=d.slice(v,x)+A,v=x+w.length)}return y+d.slice(v)}];function a(e,n,r,i,o,s){var a=r+e.length,l=i.length,c=Nr;return void 0!==o&&(o=wt(o),c=Mr),t.call(s,c,(function(t,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":c=o[s.slice(1,-1)];break;default:var d=+s;if(0===d)return t;if(d>l){var u=Dr(d/10);return 0===u?t:u<=l?void 0===i[u-1]?s.charAt(1):i[u-1]+s.charAt(1):t}c=i[d-1]}return void 0===c?"":c}))}})),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Pr=U[Ir],$r=Pr&&Pr.prototype;if($r&&$r.forEach!==nn)try{ye($r,"forEach",nn)}catch(j){$r.forEach=nn}}var Rr,Br={props:{borderColor:{type:String,required:!1,default:function(){return"lightgray"}},boxHeight:{type:String,required:!1,default:function(){return"28px"}},closeOnSelect:{type:Boolean,required:!1,default:function(){return!0}},disableSearch:{type:Boolean,required:!1,default:function(){return!1}},focusColor:{type:String,required:!1,default:function(){return"navy"}},label:{type:String,required:!1,default:function(){return"label"}},minChars:{type:Number,required:!1,default:function(){return 3}},options:{type:Array,required:!1,default:function(){return[]}},placeholder:{type:String,required:!1,default:function(){return"Search..."}},showList:{type:Boolean,required:!1,default:function(){return!0}},tabCompletion:{type:Boolean,required:!1,default:function(){return!0}},value:{type:String,required:!1,default:function(){return""}}},data:function(){return{currentSearch:this.value,listPosition:-1,isOpenList:!0,isInputFocused:!1}},computed:{borderColorStyle:function(){return"border-color: ".concat(this.borderColor)},focusStyle:function(){return"border-color: ".concat(this.focusColor,"; box-shadow: 0 0 0 1px ").concat(this.focusColor,";")},boxHeightNumber:function(){return parseInt(this.boxHeight.replace("px",""))},boxHeightStyle:function(){return"height: ".concat(this.boxHeight,"; line-height: ").concat(this.boxHeightNumber-8,"px;")},completion:function(){var e=this,t=new RegExp("^(".concat(this.currentSearch,")(.+)"),"i");return this.options.reduce((function(n,r){var i=r[e.label].match(t);return""===e.currentSearch?"":""==n&&i||i&&r.length<n.length?i[2]:n}),"")},filteredOptions:function(){var e=this,t=new RegExp("^".concat(this.currentSearch),"i"),n=this.options.filter((function(n){return n[e.label].match(t)}));return this.disableSearch?this.options:n},isOptionsListVisible:function(){return this.currentSearch.length>=this.minChars&&this.showList&&this.isOpenList&&this.filteredOptions.length>0&&this.isInputFocused},isPlaceholderVisible:function(){return!this.isInputFocused&&0===this.currentSearch.length}},watch:{value:function(){this.currentSearch!==this.value&&(this.currentSearch=this.value,this.setTextContent(this.value),this.focusInput())}},methods:{focusInput:function(){var e=this;this.isInputFocused=!0;var t=this.$refs.input;this.$nextTick((function(){if(""!==e.currentSearch){var n=document.createRange(),r=window.getSelection(),i=t.childNodes[0];n.setStart(i,i.textContent.length),n.collapse(!0),r.removeAllRanges(),r.addRange(n)}t.focus()}))},getTextContent:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$refs.input).textContent},runSpecialKeys:function(e){var t=e.key;"Tab"===t&&this.tabCompletion&&""!==this.completion?(e.preventDefault(),this.currentSearch+=this.completion,this.setTextContent(this.currentSearch),this.focusInput()):"ArrowDown"===t||"Down"===t?(e.preventDefault(),this.listPosition<this.filteredOptions.length-1&&(this.listPosition+=1)):"ArrowUp"===t||"Up"===t?(e.preventDefault(),this.listPosition>-1&&(this.listPosition-=1)):"Enter"===t&&(e.preventDefault(),this.listPosition>-1?this.selectCurrentOption():this.triggerSearch())},selectCurrentOption:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.filteredOptions[this.listPosition];this.currentSearch=e[this.label],this.setTextContent(this.currentSearch),this.listPosition=-1,this.$emit("selected",e),this.isOpenList=!this.closeOnSelect,this.focusInput()},setTextContent:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$refs.input).textContent=e},triggerSearch:function(){this.$emit("searched",this.currentSearch),this.isOpenList=!this.closeOnSelect},updateValue:function(e){var t=this.getTextContent();t!==this.currentSearch&&(this.currentSearch=t,this.isOpenList=!0,this.$emit("input",this.currentSearch))}},mounted:function(){var e=this;new MutationObserver((function(t){t.forEach((function(t){var n=0===Array.prototype.slice.call(t.addedNodes).filter((function(e){return 3!==e.nodeType})).length,r=0===Array.prototype.slice.call(t.removedNodes).filter((function(e){return 3!==e.nodeType})).length;("characterData"===t.type||n&&r)&&e.updateValue()}))})).observe(this.$refs.input,{childList:!0,characterData:!0,subtree:!0})}},qr="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()),Fr={},Lr=Br,Vr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"om-root",style:e.boxHeightStyle},[n("div",{staticClass:"om-search-container",class:{"om-has-focus":e.isInputFocused},style:e.isInputFocused?e.focusStyle:e.borderColorStyle,on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)}}},[n("label",{class:{"om-placeholder":e.isPlaceholderVisible,"om-visually-hidden":!e.isPlaceholderVisible},attrs:{for:"input-box"},on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)}}},[e._v(e._s(e.placeholder))]),e._v(" "),n("div",{ref:"input",staticClass:"om-input single-line",class:{"om-visually-hidden":e.isPlaceholderVisible,"om-width--auto":e.isInputFocused,"om-width--full":!e.isInputFocused},style:e.boxHeightStyle,attrs:{id:"input-box",role:"textbox",contenteditable:"true"},on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)},keydown:function(t){return t.stopPropagation(),e.runSpecialKeys(t)},focusout:function(t){e.isInputFocused=!1}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isInputFocused,expression:"isInputFocused"}],staticClass:"om-completion",style:e.boxHeightStyle,on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),e.focusInput(t)}}},[e._v(e._s(e.completion))])]),e._v(" "),n("div",{staticClass:"om-list-container"},[e.isOptionsListVisible?n("div",{staticClass:"om-list",style:"border-color: "+e.borderColor+";"},e._l(e.filteredOptions,(function(t,r){return n("div",{key:t[e.label]+r,staticClass:"om-list-item",class:{"om-highlight":r===e.listPosition},on:{mousedown:function(n){return n.stopPropagation(),n.preventDefault(),e.selectCurrentOption(t)}}},[e._t("option",[e._v("\n "+e._s(t[e.label])+"\n ")],{option:t})],2)})),0):e._e()])])};Vr._withStripped=!0;var jr=function(e,t,n,r,i,o,s,a,l,c){"boolean"!=typeof s&&(a,a=s,s=!1);var d,u="function"==typeof n?n.options:n;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),r&&(u._scopeId=r),t&&(d=s?function(e){t.call(this,undefined(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),d)if(u.functional){var p=u.render;u.render=function(e,t){return d.call(t),p(e,t)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,d):[d]}return n}({render:Vr,staticRenderFns:[]},(function(e){e&&e("data-v-2b4e60fc_0",{source:'\n*[data-v-2b4e60fc] {\n box-sizing: border-box;\n}\n.om-root[data-v-2b4e60fc] {\n position: relative;\n}\n.om-input[data-v-2b4e60fc] {\n padding-top: 4px;\n padding-bottom: 4px;\n padding-left: 8px;\n height: 100%;\n}\n.om-input[data-v-2b4e60fc]:focus {\n border: none;\n outline: none;\n}\n\n/* This is needed because in firefox the caret position is not vertically centered when the span is empty */\n.om-input[data-v-2b4e60fc]:before {\n content: \' \'\n}\n.om-completion[data-v-2b4e60fc] {\n height: 100%;\n width: auto;\n max-width: 100%;\n padding-top: 4px;\n padding-bottom: 4px;\n color: lightgray;\n overflow: hidden;\n white-space: pre;\n display: flex;\n align-items: center;\n}\n[contenteditable="true"].single-line[data-v-2b4e60fc] {\n white-space: pre;\n overflow: hidden;\n}\n[contenteditable="true"].single-line br[data-v-2b4e60fc] {\n display:none;\n}\n[contenteditable="true"].single-line *[data-v-2b4e60fc] {\n display:inline;\n white-space:nowrap;\n}\n.om-width--auto[data-v-2b4e60fc] {\n width: auto;\n min-width: 10px;\n}\n.om-width--full[data-v-2b4e60fc] {\n width: 100%;\n}\n.om-placeholder[data-v-2b4e60fc] {\n display: block;\n height: 100%;\n width: 100%;\n float: left;\n color: darkgray;\n display: flex;\n align-items: center;\n margin: 0;\n padding: 4px 8px;\n}\n.om-list-container[data-v-2b4e60fc] {\n position: relative;\n}\n.om-list[data-v-2b4e60fc] {\n position: absolute;\n width: 100%;\n border-left: 1px solid lightgray;\n border-right: 1px solid lightgray;\n border-bottom: 1px solid lightgray;\n padding: 4px 8px;\n background-color: white;\n z-index: 1001;\n}\n.om-highlight[data-v-2b4e60fc] {\n background-color: lightgrey;\n}\n.om-list-item[data-v-2b4e60fc] {\n font-weight: 500;\n cursor: pointer;\n}\n.om-list-item[data-v-2b4e60fc]:hover {\n background-color: lightgray;\n}\n.om-search-container[data-v-2b4e60fc] {\n border: 1px solid lightgray;\n display: flex;\n padding: 0;\n border-radius: 3px;\n height: 100%;\n padding-right: 8px;\n}\n.om-visually-hidden[data-v-2b4e60fc]:not(:focus):not(:active) {\n position: absolute !important;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px); /* IE6, IE7 */\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap; /* added line */\n}\n',map:{version:3,sources:["/home/mathis/Development/vue-omnibox/src/Omnibox.vue"],names:[],mappings:";AA8PA;EACA,sBAAA;AACA;AACA;EACA,kBAAA;AACA;AAEA;EACA,gBAAA;EACA,mBAAA;EACA,iBAAA;EACA,YAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;AACA;;AAEA,2GAAA;AACA;EACA;AACA;AAEA;EACA,YAAA;EACA,WAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,gBAAA;EACA,gBAAA;EACA,aAAA;EACA,mBAAA;AACA;AACA;EACA,gBAAA;EACA,gBAAA;AACA;AACA;EACA,YAAA;AAEA;AACA;EACA,cAAA;EACA,kBAAA;AACA;AAEA;EACA,WAAA;EACA,eAAA;AACA;AAEA;EACA,WAAA;AACA;AAEA;EACA,cAAA;EACA,YAAA;EACA,WAAA;EACA,WAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,SAAA;EACA,gBAAA;AACA;AACA;EACA,kBAAA;AACA;AACA;EACA,kBAAA;EACA,WAAA;EACA,gCAAA;EACA,iCAAA;EACA,kCAAA;EACA,gBAAA;EACA,uBAAA;EACA,aAAA;AACA;AACA;EACA,2BAAA;AACA;AACA;EACA,gBAAA;EACA,eAAA;AACA;AAEA;EACA,2BAAA;AACA;AAEA;EACA,2BAAA;EACA,aAAA;EACA,UAAA;EACA,kBAAA;EACA,YAAA;EACA,kBAAA;AACA;AAEA;EACA,6BAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,2BAAA,EAAA,aAAA;EACA,8BAAA;EACA,mBAAA,EAAA,eAAA;AACA",file:"Omnibox.vue",sourcesContent:['<template>\n <div class="om-root" :style="boxHeightStyle">\n <div\n class="om-search-container"\n @mousedown.stop.prevent="focusInput"\n :class="{ \'om-has-focus\': isInputFocused }"\n :style="isInputFocused ? focusStyle : borderColorStyle">\n <label\n for="input-box"\n @mousedown.stop.prevent="focusInput"\n :class="{ \'om-placeholder\': isPlaceholderVisible, \'om-visually-hidden\': !isPlaceholderVisible}">{{ placeholder }}</label>\n <div\n id="input-box"\n role="textbox"\n ref="input"\n class="om-input single-line"\n :class="{\n \'om-visually-hidden\': isPlaceholderVisible,\n \'om-width--auto\': isInputFocused,\n \'om-width--full\': !isInputFocused }"\n contenteditable="true"\n :style="boxHeightStyle"\n @mousedown.stop.prevent="focusInput"\n @keydown.stop="runSpecialKeys"\n @focusout="isInputFocused = false">\n </div>\n <div\n v-show="isInputFocused"\n class="om-completion"\n :style="boxHeightStyle"\n @mousedown.stop.prevent="focusInput">{{ completion }}</div>\n </div>\n <div class="om-list-container">\n <div\n class="om-list"\n :style="`border-color: ${borderColor};`"\n v-if="isOptionsListVisible">\n <div\n v-for="(option, idx) in filteredOptions"\n class="om-list-item"\n :class="{ \'om-highlight\': idx === listPosition }"\n :key="option[label] + idx"\n @mousedown.stop.prevent="selectCurrentOption(option)">\n <slot name="option" v-bind:option="option">\n {{ option[label] }}\n </slot>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nexport default {\n props: {\n borderColor: {\n type: String,\n required: false,\n default: () => \'lightgray\'\n },\n boxHeight: {\n type: String,\n required: false,\n default: () => \'28px\'\n },\n closeOnSelect: {\n type: Boolean,\n required: false,\n default: () => true\n },\n disableSearch: {\n type: Boolean,\n required: false,\n default: () => false\n },\n focusColor: {\n type: String,\n required: false,\n default: () => \'navy\'\n },\n label: {\n type: String,\n required: false,\n default: () => \'label\'\n },\n minChars: {\n type: Number,\n required: false,\n default: () => 3\n },\n options: {\n type: Array,\n required: false,\n default: () => ([])\n },\n placeholder: {\n type: String,\n required: false,\n default: () => \'Search...\'\n },\n showList: {\n type: Boolean,\n required: false,\n default: () => true\n },\n tabCompletion: {\n type: Boolean,\n required: false,\n default: () => true\n },\n value: {\n type: String,\n required: false,\n default: () => \'\'\n }\n },\n data () {\n return {\n currentSearch: this.value,\n listPosition: -1,\n isOpenList: true,\n isInputFocused: false\n }\n },\n computed: {\n borderColorStyle () {\n return `border-color: ${this.borderColor}`\n },\n focusStyle () {\n return `border-color: ${this.focusColor}; box-shadow: 0 0 0 1px ${this.focusColor};`\n },\n boxHeightNumber () {\n return parseInt(this.boxHeight.replace(\'px\', \'\'))\n },\n boxHeightStyle () {\n return `height: ${this.boxHeight}; line-height: ${this.boxHeightNumber - 8}px;`\n },\n completion () {\n const reg = new RegExp(`^(${this.currentSearch})(.+)`, \'i\')\n return this.options.reduce((acc, val) => {\n const isMatching = val[this.label].match(reg)\n if (this.currentSearch === \'\') return \'\'\n if (acc == \'\' && isMatching) return isMatching[2]\n if (isMatching && val.length < acc.length) return isMatching[2]\n return acc\n }, \'\')\n },\n filteredOptions () {\n const reg = new RegExp(`^${this.currentSearch}`, \'i\')\n const filtered = this.options.filter(o => o[this.label].match(reg))\n return this.disableSearch ? this.options : filtered\n },\n isOptionsListVisible () {\n return this.currentSearch.length >= this.minChars && this.showList && this.isOpenList && this.filteredOptions.length > 0 && this.isInputFocused\n },\n isPlaceholderVisible () {\n return (!this.isInputFocused && this.currentSearch.length === 0)\n }\n },\n watch: {\n value () {\n if (this.currentSearch !== this.value) {\n this.currentSearch = this.value\n this.setTextContent(this.value)\n this.focusInput()\n }\n }\n },\n methods: {\n focusInput () {\n this.isInputFocused = true\n const el = this.$refs.input\n this.$nextTick(() => {\n if (this.currentSearch !== \'\') {\n let range = document.createRange()\n let sel = window.getSelection()\n let node = el.childNodes[0]\n range.setStart(node, node.textContent.length)\n range.collapse(true)\n sel.removeAllRanges()\n sel.addRange(range)\n }\n el.focus()\n })\n },\n getTextContent (el = this.$refs.input) {\n return el.textContent\n },\n runSpecialKeys (e) {\n const key = e.key\n if (key === \'Tab\' && this.tabCompletion && this.completion !== \'\') {\n e.preventDefault()\n this.currentSearch += this.completion\n this.setTextContent(this.currentSearch)\n this.focusInput()\n } else if (key === \'ArrowDown\' || key === \'Down\') {\n e.preventDefault()\n if (this.listPosition < this.filteredOptions.length - 1) {\n this.listPosition += 1\n }\n } else if (key === "ArrowUp" || key === \'Up\') {\n e.preventDefault()\n if (this.listPosition > -1) {\n this.listPosition -= 1\n }\n } else if (key === \'Enter\') {\n e.preventDefault()\n if (this.listPosition > -1) {\n this.selectCurrentOption()\n } else {\n this.triggerSearch()\n }\n }\n },\n selectCurrentOption (option = this.filteredOptions[this.listPosition]) {\n this.currentSearch = option[this.label]\n this.setTextContent(this.currentSearch)\n this.listPosition = -1\n this.$emit(\'selected\', option)\n this.isOpenList = !this.closeOnSelect\n this.focusInput()\n },\n setTextContent (value, el = this.$refs.input) {\n el.textContent = value\n },\n triggerSearch () {\n this.$emit(\'searched\', this.currentSearch)\n this.isOpenList = !this.closeOnSelect\n },\n updateValue (e) {\n const content = this.getTextContent()\n if (content !== this.currentSearch) {\n this.currentSearch = content\n this.isOpenList = true\n this.$emit(\'input\', this.currentSearch)\n }\n }\n },\n mounted () {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n const onlyTextAdded = Array.prototype.slice.call(mutation.addedNodes).filter(n => n.nodeType !== 3).length === 0\n const onlyTextRemoved = Array.prototype.slice.call(mutation.removedNodes).filter(n => n.nodeType !== 3).length === 0\n const isTextInput = mutation.type === \'characterData\' || (onlyTextAdded && onlyTextRemoved)\n if (isTextInput) {\n this.updateValue()\n }\n });\n });\n\n observer.observe(this.$refs.input, { childList: true, characterData: true, subtree: true })\n }\n}\n<\/script>\n<style scoped>\n * {\n box-sizing: border-box;\n }\n .om-root {\n position: relative;\n }\n\n .om-input {\n padding-top: 4px;\n padding-bottom: 4px;\n padding-left: 8px;\n height: 100%;\n }\n .om-input:focus {\n border: none;\n outline: none;\n }\n\n /* This is needed because in firefox the caret position is not vertically centered when the span is empty */\n .om-input:before {\n content: \' \'\n }\n\n .om-completion {\n height: 100%;\n width: auto;\n max-width: 100%;\n padding-top: 4px;\n padding-bottom: 4px;\n color: lightgray;\n overflow: hidden;\n white-space: pre;\n display: flex;\n align-items: center;\n }\n [contenteditable="true"].single-line {\n white-space: pre;\n overflow: hidden;\n }\n [contenteditable="true"].single-line br {\n display:none;\n\n }\n [contenteditable="true"].single-line * {\n display:inline;\n white-space:nowrap;\n }\n\n .om-width--auto {\n width: auto;\n min-width: 10px;\n }\n\n .om-width--full {\n width: 100%;\n }\n\n .om-placeholder {\n display: block;\n height: 100%;\n width: 100%;\n float: left;\n color: darkgray;\n display: flex;\n align-items: center;\n margin: 0;\n padding: 4px 8px;\n }\n .om-list-container {\n position: relative;\n }\n .om-list {\n position: absolute;\n width: 100%;\n border-left: 1px solid lightgray;\n border-right: 1px solid lightgray;\n border-bottom: 1px solid lightgray;\n padding: 4px 8px;\n background-color: white;\n z-index: 1001;\n }\n .om-highlight {\n background-color: lightgrey;\n }\n .om-list-item {\n font-weight: 500;\n cursor: pointer;\n }\n\n .om-list-item:hover {\n background-color: lightgray;\n }\n\n .om-search-container {\n border: 1px solid lightgray;\n display: flex;\n padding: 0;\n border-radius: 3px;\n height: 100%;\n padding-right: 8px;\n }\n\n .om-visually-hidden:not(:focus):not(:active) {\n position: absolute !important;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px); /* IE6, IE7 */\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap; /* added line */\n }\n</style>\n']},media:void 0})}),Lr,"data-v-2b4e60fc",0,0,!1,(function(e){return function(e,t){return function(e,t){var n=qr?t.media||"default":e,r=Fr[n]||(Fr[n]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);var i=t.source;if(t.map&&(i+="\n/*# sourceURL="+t.map.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",t.media&&r.element.setAttribute("media",t.media),void 0===Rr&&(Rr=document.head||document.getElementsByTagName("head")[0]),Rr.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(i),r.element.styleSheet.cssText=r.styles.filter(Boolean).join("\n");else{var o=r.ids.size-1,s=document.createTextNode(i),a=r.element.childNodes;a[o]&&r.element.removeChild(a[o]),a.length?r.element.insertBefore(s,a[o]):r.element.appendChild(s)}}}(e,t)}})),zr={install:function e(t){e.installed||(e.installed=!0,t.component("Omnibox",component))}},Hr=null;"undefined"!=typeof window?Hr=window.Vue:void 0!==s.g&&(Hr=s.g.Vue),Hr&&Hr.use(zr);const Ur={name:"DpAutocomplete",components:{VueOmnibox:jr},mixins:[V.gH],props:{height:{type:String,required:!1,default:"28px"},label:{type:String,required:!1,default:()=>"label"},options:{type:Array,required:!1,default:()=>[]},placeholder:{type:String,required:!1,default:()=>Translator.trans("search")},routeGenerator:{type:Function,required:!0},value:{type:String,required:!1,default:""}},data(){return{currentQuery:this.value,isLoading:!1}},watch:{value(){this.currentQuery!==this.value&&(this.currentQuery=this.value)}},methods:{emit(e,t){this.$emit(t,e)},emitAndFetch(e){this.emit(e,"input"),this.currentQuerry=e,e.length>=3&&this.fetchOptions(e)},async fetchOptions(e){this.isLoading=!0;try{const t=this.routeGenerator(e),n=await k.get(t);this.currentQuerry===e&&this.$emit("search-changed",n),this.isLoading=!1}catch(e){console.log(e)}}}},Wr=Ur,Zr=(0,l.Z)(Wr,(function(){var e=this;return(0,e._self._c)("vue-omnibox",{attrs:{"box-height":e.height,"disable-search":!0,label:e.label,options:e.options,placeholder:e.placeholder,value:e.currentQuery},on:{input:e.emitAndFetch,searched:function(t){return e.emit(t,"searched")},selected:function(t){return e.emit(t,"selected")}},scopedSlots:e._u([e._l(e.$scopedSlots,(function(t,n){return{key:n,fn:function(t){return[e._t(n,null,null,t)]}}}))],null,!0)})}),[],!1,null,null,null).exports,Kr=function(e,t){const n={},r={},i=[];let o={};Object.keys(t).forEach((r=>{n[r]=e[t[r]]})),o={...e,...n};for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&i.push(e);i.sort();for(const e of i)r[e]=o[e];return r}({ai:{phosphorName:"robot",path:"M200 48h-64V16a8 8 0 0 0-16 0v32H56a32 32 0 0 0-32 32v112a32 32 0 0 0 32 32h144a32 32 0 0 0 32-32V80a32 32 0 0 0-32-32Zm16 144a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V80a16 16 0 0 1 16-16h144a16 16 0 0 1 16 16Zm-52-56H92a28 28 0 0 0 0 56h72a28 28 0 0 0 0-56Zm-28 16v24h-16v-24Zm-56 12a12 12 0 0 1 12-12h12v24H92a12 12 0 0 1-12-12Zm84 12h-12v-24h12a12 12 0 0 1 0 24Zm-92-68a12 12 0 1 1 12 12 12 12 0 0 1-12-12Zm88 0a12 12 0 1 1 12 12 12 12 0 0 1-12-12Z"},"arrow-left":{path:"M224 128a8 8 0 0 1-8 8H59.31l58.35 58.34a8 8 0 0 1-11.32 11.32l-72-72a8 8 0 0 1 0-11.32l72-72a8 8 0 0 1 11.32 11.32L59.31 120H216a8 8 0 0 1 8 8Z",proportions:"landscape"},"arrow-right":{path:"m221.66 133.66-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32Z",proportions:"landscape"},check:{phosphorName:"check",weight:"bold",path:"m232.49 80.49-128 128a12 12 0 0 1-17 0l-56-56a12 12 0 1 1 17-17L96 183 215.51 63.51a12 12 0 0 1 17 17Z",proportions:"landscape"},"chevron-down":{phosphorName:"caret-down",path:"m213.66 101.66-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z",proportions:"landscape"},"chevron-up":{phosphorName:"caret-up",path:"M213.66 165.66a8 8 0 0 1-11.32 0L128 91.31l-74.34 74.35a8 8 0 0 1-11.32-11.32l80-80a8 8 0 0 1 11.32 0l80 80a8 8 0 0 1 0 11.32Z",proportions:"landscape"},"chevron-left":{phosphorName:"caret-left",path:"M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z",proportions:"portrait"},"chevron-right":{phosphorName:"caret-right",path:"m181.66 133.66-80 80a8 8 0 0 1-11.32-11.32L164.69 128 90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32Z",proportions:"portrait"},clock:{path:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm64-88a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8V72a8 8 0 0 1 16 0v48h48a8 8 0 0 1 8 8Z"},compress:{path:"M152 96V48a8 8 0 0 1 16 0v40h40a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8Zm-56 56H48a8 8 0 0 0 0 16h40v40a8 8 0 0 0 16 0v-48a8 8 0 0 0-8-8Zm112 0h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 16 0v-40h40a8 8 0 0 0 0-16ZM96 40a8 8 0 0 0-8 8v40H48a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z"},copy:{path:"M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8Zm-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z"},delete:{path:"M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16ZM96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Z"},download:{phosphorName:"download-simple",weight:"fill",path:"M82.34 117.66A8 8 0 0 1 88 104h32V40a8 8 0 0 1 16 0v64h32a8 8 0 0 1 5.66 13.66l-40 40a8 8 0 0 1-11.32 0ZM216 144a8 8 0 0 0-8 8v56H48v-56a8 8 0 0 0-16 0v56a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16v-56a8 8 0 0 0-8-8Z"},"drag-handle":{path:"M108 60a16 16 0 1 1-16-16 16 16 0 0 1 16 16Zm56 16a16 16 0 1 0-16-16 16 16 0 0 0 16 16Zm-72 36a16 16 0 1 0 16 16 16 16 0 0 0-16-16Zm72 0a16 16 0 1 0 16 16 16 16 0 0 0-16-16Zm-72 68a16 16 0 1 0 16 16 16 16 0 0 0-16-16Zm72 0a16 16 0 1 0 16 16 16 16 0 0 0-16-16Z",proportions:"portrait"},edit:{phosphorName:"pencil-simple",path:"m227.31 73.37-44.68-44.69a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h44.69a15.86 15.86 0 0 0 11.31-4.69L227.31 96a16 16 0 0 0 0-22.63ZM92.69 208H48v-44.69l88-88L180.69 120ZM192 108.68 147.31 64l24-24L216 84.68Z"},expand:{path:"M216 48v40a8 8 0 0 1-16 0V56h-32a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8ZM88 200H56v-32a8 8 0 0 0-16 0v40a8 8 0 0 0 8 8h40a8 8 0 0 0 0-16Zm120-40a8 8 0 0 0-8 8v32h-32a8 8 0 0 0 0 16h40a8 8 0 0 0 8-8v-40a8 8 0 0 0-8-8ZM88 40H48a8 8 0 0 0-8 8v40a8 8 0 0 0 16 0V56h32a8 8 0 0 0 0-16Z"},file:{path:"m213.66 82.34-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66ZM160 51.31 188.69 80H160ZM200 216H56V40h88v48a8 8 0 0 0 8 8h48v120Z"},highlighter:{path:"m227.32 73.37-44.69-44.68a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h168a8 8 0 0 0 0-16H115.32l112-112a16 16 0 0 0 0-22.63ZM136 75.31 152.69 92 68 176.69 51.31 160ZM48 208v-28.69L76.69 208Zm48-3.31L79.32 188 164 103.31 180.69 120Zm96-96L147.32 64l24-24L216 84.69Z"},history:{path:"M136 80v43.47l36.12 21.67a8 8 0 0 1-8.24 13.72l-40-24A8 8 0 0 1 120 128V80a8 8 0 0 1 16 0Zm-8-48a95.44 95.44 0 0 0-67.92 28.15C52.81 67.51 46.35 74.59 40 82V64a8 8 0 0 0-16 0v40a8 8 0 0 0 8 8h40a8 8 0 0 0 0-16H49c7.15-8.42 14.27-16.35 22.39-24.57a80 80 0 1 1 1.66 114.75 8 8 0 1 0-11 11.64A96 96 0 1 0 128 32Z"},hourglass:{path:"M200 75.64V40a16 16 0 0 0-16-16H72a16 16 0 0 0-16 16v36a16.07 16.07 0 0 0 6.4 12.8l52.27 39.2-52.27 39.2A16.07 16.07 0 0 0 56 180v36a16 16 0 0 0 16 16h112a16 16 0 0 0 16-16v-35.64a16.09 16.09 0 0 0-6.35-12.77L141.27 128l52.38-39.59A16.09 16.09 0 0 0 200 75.64Zm-16 104.72V216H72v-36l48-36v24a8 8 0 0 0 16 0v-23.92Zm0-104.72L178.23 80H77.33L72 76V40h112Z",proportions:"portrait"},info:{path:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm16-40a8 8 0 0 1-8 8 16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16 16 16 0 0 1 16 16v40a8 8 0 0 1 8 8Zm-32-92a12 12 0 1 1 12 12 12 12 0 0 1-12-12Z"},lock:{path:"M208 80h-32V56a48 48 0 0 0-96 0v24H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16ZM96 56a32 32 0 0 1 64 0v24H96Zm112 152H48V96h160v112Z"},mail:{path:"M224 48H32a8 8 0 0 0-8 8v136a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a8 8 0 0 0-8-8Zm-20.57 16L128 133.15 52.57 64ZM216 192H40V74.19l82.59 75.71a8 8 0 0 0 10.82 0L216 74.19V192Z",proportions:"landscape"},refresh:{phosphorName:"arrows-clockwise",path:"M197.67 186.37a8 8 0 0 1 0 11.29C196.58 198.73 170.82 224 128 224c-37.39 0-64.53-22.4-80-39.85V208a8 8 0 0 1-16 0v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16H55.44C67.76 183.35 93 208 128 208c36 0 58.14-21.46 58.36-21.68a8 8 0 0 1 11.31.05ZM216 40a8 8 0 0 0-8 8v23.85C192.53 54.4 165.39 32 128 32c-42.82 0-68.58 25.27-69.66 26.34a8 8 0 0 0 11.3 11.34C69.86 69.46 92 48 128 48c35 0 60.24 24.65 72.56 40H168a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z"},search:{path:"m229.66 218.34-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32ZM40 112a72 72 0 1 1 72 72 72.08 72.08 0 0 1-72-72Z"},settings:{path:"M237.94 107.21a8 8 0 0 0-3.89-5.4l-29.83-17-.12-33.62a8 8 0 0 0-2.83-6.08 111.91 111.91 0 0 0-36.72-20.67 8 8 0 0 0-6.46.59L128 41.85 97.88 25a8 8 0 0 0-6.47-.6 111.92 111.92 0 0 0-36.68 20.75 8 8 0 0 0-2.83 6.07l-.15 33.65-29.83 17a8 8 0 0 0-3.89 5.4 106.47 106.47 0 0 0 0 41.56 8 8 0 0 0 3.89 5.4l29.83 17 .12 33.63a8 8 0 0 0 2.83 6.08 111.91 111.91 0 0 0 36.72 20.67 8 8 0 0 0 6.46-.59L128 214.15 158.12 231a7.91 7.91 0 0 0 3.9 1 8.09 8.09 0 0 0 2.57-.42 112.1 112.1 0 0 0 36.68-20.73 8 8 0 0 0 2.83-6.07l.15-33.65 29.83-17a8 8 0 0 0 3.89-5.4 106.47 106.47 0 0 0-.03-41.52ZM128 168a40 40 0 1 1 40-40 40 40 0 0 1-40 40Z"},success:{path:"M173.66 98.34a8 8 0 0 1 0 11.32l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 0ZM232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104Zm-16 0a88 88 0 1 0-88 88 88.1 88.1 0 0 0 88-88Z"},tag:{path:"M243.31 136 144 36.69A15.86 15.86 0 0 0 132.69 32H40a8 8 0 0 0-8 8v92.69A15.86 15.86 0 0 0 36.69 144L136 243.31a16 16 0 0 0 22.63 0l84.68-84.68a16 16 0 0 0 0-22.63Zm-96 96L48 132.69V48h84.69L232 147.31ZM96 84a12 12 0 1 1-12-12 12 12 0 0 1 12 12Z"},unlock:{path:"M208 80H96V56a32 32 0 0 1 32-32c15.37 0 29.2 11 32.16 25.59a8 8 0 0 0 15.68-3.18C171.32 24.15 151.2 8 128 8a48.05 48.05 0 0 0-48 48v24H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16Zm0 128H48V96h160v112Z"},user:{path:"M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 13.85-8ZM72 96a56 56 0 1 1 56 56 56.06 56.06 0 0 1-56-56Z"},userSolid:{path:"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8Z"},xmark:{path:"M208.49 191.51a12 12 0 0 1-17 17L128 145l-63.51 63.49a12 12 0 0 1-17-17L111 128 47.51 64.49a12 12 0 0 1 17-17L128 111l63.51-63.52a12 12 0 0 1 17 17L145 128Z"}},{cancel:"xmark",close:"xmark",remove:"xmark"}),Jr={small:16,medium:20,large:28},Gr={name:"DpIcon",props:{icon:{type:String,required:!0},size:{type:String,required:!1,default:"medium",validator:e=>Object.keys(Jr).includes(e)}},computed:{pxSize(){return Jr[this.size]},path(){return Kr[this.icon].path},proportionClass(){return Kr[this.icon]?.proportions||"square"}}},Yr=(0,l.Z)(Gr,(function(){var e=this,t=e._self._c;return t("svg",{staticClass:"c-icon",class:e.proportionClass,attrs:{height:e.pxSize,width:e.pxSize,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:e.path}})])}),[],!1,null,null,null).exports,Xr=require("@braintree/sanitize-url"),Qr={name:"DpButton",components:{DpIcon:Yr},directives:{tooltip:n.u},props:{busy:{required:!1,type:Boolean,default:!1},color:{required:!1,type:String,default:"primary",validator:e=>["primary","secondary","warning"].includes(e)},hideText:{required:!1,type:Boolean,default:!1},href:{required:!1,type:String,default:"#"},icon:{required:!1,type:String,default:""},iconAfter:{required:!1,type:String,default:""},text:{required:!1,type:String,default:"save"},type:{required:!1,type:String,default:"button",validator:e=>["button","submit"].includes(e)},variant:{required:!1,type:String,default:"solid",validator:e=>["solid","outline","subtle"].includes(e)}},computed:{classes(){return["btn inline-flex items-center space-inline-xs",this.busy&&"is-busy pointer-events-none",this.iconOnly&&"icon-only",["primary","secondary","warning"].includes(this.color)&&ei.color[this.color],["solid","outline","subtle"].includes(this.variant)&&ei.variant[this.variant]]},element(){return this.isButtonElement?"button":"a"},iconOnly(){return(this.icon||this.iconAfter)&&this.hideText},isButtonElement(){return"#"===this.href},sanitizedHref(){return(0,Xr.sanitizeUrl)(this.href)}},mounted(){this.icon||this.iconAfter||!this.hideText||console.error("A DpButton instance is used without icon or visible text. Consider showing something to users.")}},ei={color:{primary:"btn--primary",secondary:"btn--secondary",warning:"btn--warning"},variant:{solid:"btn--solid",outline:"btn--outline",subtle:"btn--subtle"}},ti=Qr,ni=(0,l.Z)(ti,(function(){var e=this,t=e._self._c;return t(e.element,e._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:e.iconOnly?e.text:null,expression:"iconOnly ? text : null"}],tag:"component",class:e.classes,attrs:{type:e.isButtonElement&&e.type,href:!e.isButtonElement&&e.sanitizedHref,"aria-hidden":e.busy}},e.$listeners),[e.icon?t("dp-icon",{attrs:{"aria-hidden":"true",icon:e.icon,size:"small"}}):e._e(),e._v(" "),t("span",{class:{"hide-visually":e.hideText},domProps:{textContent:e._s(e.text)}}),e._v(" "),e.iconAfter?t("dp-icon",{attrs:{"aria-hidden":"true",icon:e.iconAfter,size:"small"}}):e._e()],1)}),[],!1,null,null,null).exports,ri={name:"DpButtonIcon",props:{icon:{type:String,required:!0},text:{type:String,required:!0}},directives:{tooltip:n.u},computed:{translatedText(){return Translator.trans(this.text)}}},ii=(0,l.Z)(ri,(function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.translatedText,delay:{show:1e3,hide:200}},expression:"{\n content: translatedText,\n delay: { show: 1000, hide: 200 }\n }"}],staticClass:"btn--icon",on:{click:function(t){return e.$emit("click")}}},[t("i",{class:`fa ${e.icon}`,attrs:{"aria-hidden":"true"}}),e._v(" "),t("span",{staticClass:"hide-visually"},[e._v(e._s(e.translatedText))])])}),[],!1,null,null,null).exports,oi={name:"DpButtonRow",components:{DpButton:ni},props:{align:{type:String,required:!1,default:"right"},busy:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},href:{type:String,required:!1,default:"#"},primary:{type:Boolean,required:!1,default:!1},primaryText:{type:String,required:!1,default:()=>Translator.trans("save")},secondary:{type:Boolean,required:!1,default:!1},secondaryText:{type:String,required:!1,default:()=>Translator.trans("abort")},variant:{required:!1,type:String,default:"solid",validator:e=>["solid","outline","subtle"].includes(e)}}},si=(0,l.Z)(oi,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"space-inline-s",class:[`text--${e.align}`,e.$attrs.class]},[e.primary?t("dp-button",{attrs:{busy:e.busy,disabled:e.disabled,text:e.primaryText,variant:e.variant,"data-cy":"saveButton"},on:{click:function(t){return t.preventDefault(),e.$emit("primary-action")}}}):e._e(),e._v(" "),e.secondary?t("dp-button",{attrs:{color:"secondary",href:e.href,text:e.secondaryText,variant:e.variant},on:{click:function(t){return t.preventDefault(),e.$emit("secondary-action")}}}):e._e(),e._v(" "),e._t("default")],2)}),[],!1,null,null,null).exports,ai={name:"DpContextualHelp",props:{text:{type:String,required:!0}},directives:{tooltip:n.u}},li=(0,l.Z)(ai,(function(){var e=this;return(0,e._self._c)("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.text,expression:"text"}],staticClass:"fa fa-question-circle",attrs:{"aria-label":e.Translator.trans("contextual.help")}})}),[],!1,null,null,null).exports,ci={name:"DpCard",components:{DpContextualHelp:li},props:{heading:{type:String,required:!1,default:""},headingTooltip:{type:String,required:!1,default:""}}},di=(0,l.Z)(ci,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"box-shadow-1 space-inset-m"},[""!==e.heading?t("h4",{staticClass:"u-mb-0 space-inline-xs"},[t("span",[e._v("\n "+e._s(e.heading)+"\n ")]),e._v(" "),""!==e.headingTooltip?t("dp-contextual-help",{attrs:{text:e.headingTooltip}}):e._e()],1):e._e(),e._t("default")],2)}),[],!1,null,null,null).exports;var ui=s(4570);const pi={name:"DpCheckbox",components:{DpLabel:ui.default},mixins:[V.gH],model:{prop:"checked",event:"change"},props:{checked:{type:Boolean,required:!1,default:!1},dataCy:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},label:{type:Object,default:()=>({}),validator:e=>Object.keys(e).every((e=>["bold","hint","text","tooltip"].includes(e)))},name:{type:String,required:!1,default:""},readonly:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},valueToSend:{type:String,required:!1,default:"1"}}},hi=pi,fi=(0,l.Z)(hi,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("o-form__element--checkbox")},[t("input",{class:e.prefixClass("o-form__control-input"),attrs:{id:e.id,name:""!==e.name&&e.name,type:"checkbox",required:e.required,disabled:e.disabled,readonly:e.readonly,autocomplete:"off","data-cy":""!==e.dataCy&&e.dataCy,"true-value":"1","false-value":"0"},domProps:{checked:e.checked,value:e.valueToSend},on:{change:function(t){return e.$emit("change",t.target.checked)}}}),e._v(" "),""!==e.label.text?t("dp-label",e._b({class:e.prefixClass("o-form__label")},"dp-label",{bold:!1,text:"",for:e.id,required:e.required,...e.label},!1)):e._e()],1)}),[],!1,null,null,null).exports,mi={name:"DpCheckboxGroup",components:{DpCheckbox:fi},directives:{cleanhtml:n.J7},props:{options:{type:Array,required:!0},label:{type:String,required:!1,default:""},inline:{type:Boolean,default:!1},selectedOptions:{type:Object,default:()=>({})}},data:()=>({selected:{}}),watch:{selectedOptions(){this.selected=this.selectedOptions}},methods:{setSelected(){this.options.forEach((e=>{Vue.set(this.selected,e.id,!1)}))}},mounted(){this.setSelected()}},gi=(0,l.Z)(mi,(function(){var e=this,t=e._self._c;return t("fieldset",{staticClass:"u-pb-0"},[""!==e.label?t("legend",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.label,expression:"label"}],staticClass:"font-size-medium is-label",class:e.inline?"float-left":"u-mb-0_25"}):e._e(),e._v(" "),e._l(e.options,(function(n,r){return t("dp-checkbox",{key:`option_${r}`,class:e.inline?"inline-block u-ml":"",attrs:{id:n.id,label:{text:n.label},name:n.name||""},on:{change:function(t){return e.$emit("update",e.selected)}},model:{value:e.selected[n.id],callback:function(t){e.$set(e.selected,n.id,t)},expression:"selected[option.id]"}})}))],2)}),[],!1,null,null,null).exports;var yi=s(2649),vi=s.n(yi);const bi={name:"DpFlyout",directives:{ClickOutside:vi()},props:{align:{required:!1,type:String,default:"right",validator:e=>["left","right"].includes(e)},disabled:{required:!1,type:Boolean,default:!1},hasMenu:{required:!1,type:Boolean,default:!0},padded:{required:!1,type:Boolean,default:!0}},data:()=>({isExpanded:!1}),methods:{close(){!0===this.isExpanded&&(this.$emit("close"),this.isExpanded=!1)},toggle(){this.isExpanded=!this.isExpanded,this.isExpanded?this.$emit("open"):this.$emit("close")}},mounted(){this.popupItem=this.$el}},wi=(0,l.Z)(bi,(function(){var e=this,t=e._self._c;return t("span",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.close,expression:"close"}],staticClass:"o-flyout",class:{"o-flyout--left":"left"===e.align,"o-flyout--right":"right"===e.align,"o-flyout--padded":e.padded,"is-expanded":e.isExpanded,"o-flyout--menu":e.hasMenu},attrs:{"data-cy":"flyoutTrigger"}},[t("button",{staticClass:"o-flyout__trigger btn--blank o-link--default u-ph-0_25 line-height--2 whitespace-nowrap",attrs:{disabled:e.disabled,type:"button","aria-haspopup":"true"},on:{click:e.toggle}},[e._t("trigger",(function(){return[t("i",{staticClass:"fa fa-ellipsis-h"})]}),{isExpanded:e.isExpanded})],2),e._v(" "),t("div",{staticClass:"o-flyout__content box-shadow-1",attrs:{"data-cy":"flyout"}},[e._t("default")],2)])}),[],!1,null,null,null).exports,xi={name:"DpColumnSelector",components:{DpCheckbox:fi,DpFlyout:wi},props:{selectableColumns:{type:Array,required:!1,default:()=>[]},initialSelection:{type:Array,required:!1,default:()=>[]},localStorageKey:{type:String,required:!1,default:""},useLocalStorage:{type:Boolean,required:!1,default:!1}},data:()=>({selectedColumns:new Set}),methods:{broadcastSelection(e,t=null){!0===t?this.selectedColumns.add(e):!1===t&&this.selectedColumns.delete(e);const n=this.selectableColumns.filter((([e,t])=>this.selectedColumns.has(e))).map((([e,t])=>e));this.$emit("selection-changed",n),this.useLocalStorage&&window.localStorage.setItem(this.localStorageKey,JSON.stringify(n))},initializeColumnSelection(){if(this.useLocalStorage){if(""===this.localStorageKey)throw new Error(`${this.$options.name} should use localStorage but no localStorageKey was set.`);const e=window.localStorage.getItem(this.localStorageKey);this.selectedColumns=e?new Set(JSON.parse(e)):new Set(this.initialSelection),this.broadcastSelection()}else this.selectedColumns=new Set(this.initialSelection)},trackSelection(){(0,r.Q$)(window,"_paq")&&window._paq.push(["trackEvent","Column Selection",`View: ${this.localStorageKey}`,`Selected: ${this.selectedColumns.join(", ")}`])}},mounted(){this.initializeColumnSelection()}},Si=(0,l.Z)(xi,(function(){var e=this,t=e._self._c;return t("dp-flyout",{attrs:{"has-menu":!1},on:{close:e.trackSelection},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("span",[e._v(e._s(e.Translator.trans("table.cols.select")))]),e._v(" "),t("i",{staticClass:"fa fa-caret-down u-ml-0_25",attrs:{"aria-hidden":"true"}})]},proxy:!0}])},[e._v(" "),t("div",{staticClass:"space-stack-xs u-pv-0_25"},e._l(e.selectableColumns,(function([n,r]){return t("dp-checkbox",{key:n,attrs:{id:`columnSelector:${n}`,checked:e.selectedColumns.has(n),label:{text:r}},on:{change:function(t){e.broadcastSelection(n,!e.selectedColumns.has(n))}}})})),1)])}),[],!1,null,null,null).exports;var ki=s(9909),Ci=s(1320),_i=s.n(Ci);const Ai=require("vuedraggable"),Ei={name:"DpDraggable",components:{draggable:s.n(Ai)()},model:{prop:"contentData",event:"data:change"},props:{contentData:{type:Array,required:!0},dragAcrossBranches:{type:Boolean,required:!1,default:!0},isDraggable:{type:Boolean,required:!1,default:!0},draggableTag:{type:String,required:!1,default:"div"},groupId:{type:String,required:!1,default:"noIdGiven"},handleChange:{type:Function,required:!1,default:()=>{}},handleDrag:{type:Function,required:!1,default:()=>{}},nodeId:{type:String,required:!1,default:null},onMove:{type:Function,required:!1,default:()=>!0},opts:{type:Object,required:!1,default:()=>({})}},computed:{content:{get(){return this.contentData},set(e){this.$emit("data:change",{nodeId:this.nodeId,newOrder:e})}}}},Oi=(0,l.Z)(Ei,(function(){var e=this;return(0,e._self._c)("draggable",e._g(e._b({attrs:{disabled:!1===e.isDraggable,group:e.dragAcrossBranches?"treelistgroup":e.groupId,move:e.onMove,tag:e.draggableTag},on:{change:t=>e.handleChange(t,e.nodeId),end:function(t){return e.handleDrag("end")},start:function(t){return e.handleDrag("start")}},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}},"draggable",e.opts,!1),e.$listeners),[e._t("default")],2)}),[],!1,null,null,null).exports;var Ti=s(7789);const Di={name:"DpLoading",props:{hideLabel:{required:!1,type:Boolean,default:!1},overlay:{type:Boolean,required:!1,default:!1}},data:()=>({label:Ti.de.loadingData})},Mi=(0,l.Z)(Di,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-loading",class:{"c-loading--overlay":e.overlay,"flex items-center space-inline-xs":!e.overlay},on:{click:function(e){e.preventDefault()}}},[e.overlay?t("div",{staticClass:"c-loading__inner flex items-center space-inline-xs"},[t("span",{staticClass:"c-loading__spinner"}),e._v(" "),e.hideLabel?e._e():t("span",{staticClass:"c-loading__text",domProps:{textContent:e._s(e.label)}})]):[t("span",{staticClass:"c-loading__spinner"}),e._v(" "),e.hideLabel?e._e():t("span",{staticClass:"c-loading__text",domProps:{textContent:e._s(e.label)}})]],2)}),[],!1,null,null,null).exports,Ni={name:"DpWrapTrigger",components:{DpIcon:Yr},props:{expanded:{type:Boolean,required:!1,default:!1}},computed:{ariaLabel(){return Translator.trans(this.expanded?"aria.collapse":"aria.expand")},icon(){return this.expanded?"chevron-up":"chevron-down"}}},Ii=(0,l.Z)(Ni,(function(){var e=this,t=e._self._c;return t("button",{staticClass:"c-data-table__wrap-trigger o-link--default btn--blank"},[t("dp-icon",{attrs:{"aria-hidden":"true","aria-label":e.ariaLabel,icon:e.icon,size:"small"}})],1)}),[],!1,null,null,null).exports,Pi={name:"ResizeHandle",props:{displayIcon:{required:!1,type:Boolean,default:!0}}};var $i=(0,l.Z)(Pi,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-data-table__resize-handle",on:{mousedown:function(t){return t.stopPropagation(),t.preventDefault(),(t=>e.$emit("mousedown",t)).apply(null,arguments)}}},[e.displayIcon?[t("i",{staticClass:"fa fa-angle-left resize-handle__icon",attrs:{"aria-hidden":"true"}}),e._v(" "),t("i",{staticClass:"fa fa-angle-right resize-handle__icon",attrs:{"aria-hidden":"true"}})]:e._e()],2)}),[],!1,null,null,null);const Ri={name:"DpResizableColumn",components:{DpResizeHandle:$i.exports},props:{idx:{required:!0,type:Number},headerField:{type:Object,required:!0},isLast:{type:Boolean,required:!1,default:!1}},data:()=>({namedFunc:"",currentHandle:"",nextEl:"",cursorStart:0,dragStart:!1,resize:"",resizeWidth:"",nextWidth:""}),computed:{isResizableColumn(){return!(0,r.Q$)(this.headerField,"resizeable")||this.headerField.resizeable}},methods:{initResize(e,t){this.resize=this.$refs.resizableColumn,this.currentHandle=this.resize.getElementsByClassName("c-data-table__resize-handle")[0],this.currentHandle.classList.add("is-active"),this.nextEl=document.querySelector(`th[data-col-idx='${t+1}']`),this.dragStart=!0,this.cursorStart=e.pageX;const n=this.resize.getBoundingClientRect();this.resizeWidth=n.width;const r=this.nextEl.getBoundingClientRect();this.nextWidth=r.width,this.namedFunc=e=>this.resizeEl(e,t);const i=document.getElementsByTagName("body")[0];i.classList.add("resizing"),i.addEventListener("mousemove",this.namedFunc),i.addEventListener("mouseup",this.stopResize)},resizeEl(e,t){if(this.dragStart){const t=e.pageX-this.cursorStart,n=this.resizeWidth+t,r=this.nextWidth-t;n>25&&r>25&&(this.resize.style.width=n+"px",this.nextEl.style.width=r+"px")}},stopResize(e){this.currentHandle.classList.remove("is-active"),this.dragStart=!1,document.querySelector("body").removeEventListener("mousemove",this.namedFunc),document.querySelector("body").removeEventListener("mouseup",this.stopResize),document.querySelector("body").classList.remove("resizing")}}},Bi=Ri;var qi=(0,l.Z)(Bi,(function(){var e=this,t=e._self._c;return t("th",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.headerField.tooltip||e.headerField.label,expression:"headerField.tooltip || headerField.label"}],ref:"resizableColumn",staticClass:"c-data-table__resizable",class:{"u-pr-0":e.isLast},attrs:{"data-col-idx":e.idx}},[e._t("default"),e._v(" "),e.isLast?e._e():t("dp-resize-handle",{attrs:{"display-icon":e.isResizableColumn},on:{mousedown:t=>e.initResize(t,e.idx)}})],2)}),[],!1,null,null,null);const Fi={name:"DpTableHeader",components:{DpIcon:Yr,DpResizableColumn:qi.exports,DpWrapTrigger:Ii},props:{checked:{type:Boolean,required:!0},hasFlyout:{type:Boolean,required:!0},headerFields:{type:Array,required:!0},indeterminate:{type:Boolean,required:!1,default:!1},isDraggable:{type:Boolean,required:!1,default:!1},isExpandable:{type:Boolean,required:!1,default:!1},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!0},isSticky:{type:Boolean,required:!1,default:!1},isTruncatable:{type:Boolean,required:!1,default:!1},translations:{type:Object,required:!0}},watch:{indeterminate(){this.setIndeterminate()}},methods:{setIndeterminate(){this.isSelectable&&(this.$refs.selectAll.indeterminate=this.indeterminate)},toggleExpandAll(){this.$emit("toggle-expand-all")},toggleSelectAll(){this.$emit("toggle-select-all")},toggleWrapAll(){this.$emit("toggle-wrap-all")}},beforeUpdate(){this.setIndeterminate()}},Li=(0,l.Z)(Fi,(function(){var e=this,t=e._self._c;return t("tr",{ref:"tableHeader",class:{"c-data-table__sticky-header":e.isSticky}},[e.isDraggable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"}},[t("dp-icon",{staticClass:"c-data-table__drag-handle",attrs:{icon:"drag-handle"}})],1):e._e(),e._v(" "),e.isSelectable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"}},[t("input",{ref:"selectAll",attrs:{"aria-label":e.translations.headerSelectHint,title:e.translations.headerSelectHint,type:"checkbox","data-cy":"selectAll"},domProps:{checked:e.checked},on:{click:function(t){return e.toggleSelectAll()}}})]):e._e(),e._v(" "),e._l(e.headerFields,(function(n,r){return[e.isResizable?t("dp-resizable-column",{attrs:{"is-last":e.headerFields.length===r,"header-field":n,idx:r}},[e._t(`header-${n.field}`,(function(){return[n.label?t("span",{domProps:{textContent:e._s(n.label)}}):e._e()]}))],2):t("th",{attrs:{scope:"col"}},[e._t(`header-${n.field}`,(function(){return[n.label?t("span",{domProps:{textContent:e._s(n.label)}}):e._e()]}))],2)]})),e._v(" "),e.hasFlyout?t("th",{attrs:{scope:"col"}}):e._e(),e._v(" "),e.isExpandable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"},on:{click:function(t){return e.toggleExpandAll()}}},[t("dp-wrap-trigger",{attrs:{title:e.translations.headerExpandHint}})],1):e._e(),e._v(" "),e.isTruncatable?t("th",{staticClass:"c-data-table__cell--narrow",attrs:{scope:"col"},on:{click:function(t){return e.toggleWrapAll()}}},[t("dp-wrap-trigger",{attrs:{title:e.translations.headerExpandHint}})],1):e._e()],2)}),[],!1,null,null,null).exports,Vi={name:"DpTableRow",components:{DpIcon:Yr,DpWrapTrigger:Ii},props:{checked:{type:Boolean,required:!0},expanded:{type:Boolean,required:!1,default:!1},hasFlyout:{type:Boolean,required:!0},headerFields:{type:Array,required:!0},fields:{type:Array,required:!0},item:{type:Object,required:!0},isDraggable:{type:Boolean,required:!1,default:!1},isExpandable:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},isLocked:{type:Boolean,required:!1,default:!1},isLockedMessage:{type:String,required:!1,default:null},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!0},isSelectableName:{type:String,required:!1,default:null},isTruncatable:{type:Boolean,required:!1,default:!1},searchTerm:{type:RegExp,required:!0},trackBy:{type:String,required:!0},wrapped:{type:Boolean,required:!1,default:!1}},computed:{highlighted(){return e=>{let t=this.item[e];return t=_i().sanitize(t),t.replace(this.searchTerm,'<span style="background-color: yellow;">$&</span>')}},elementStyle(){return e=>{const t=this.headerFields.find((t=>t.field===e));let n="";return this.wrapped||void 0===t.initialWidth||(n+=`width: ${t.initialWidth}px;`),this.wrapped||void 0===t.initialMaxWidth||(n+=`max-width: ${t.initialMaxWidth}px;`),this.wrapped||void 0===t.initialMinWidth||(n+=`min-width: ${t.initialMinWidth}px;`),n}}},methods:{toggleSelect(e){this.$emit("toggle-select",e)},toggleWrap(e){this.$emit("toggle-wrap",e)},toggleExpand(e){this.$emit("toggle-expand",e)}}},ji=Vi,zi={name:"DpDataTable",components:{DpTableRow:(0,l.Z)(ji,(function(){var e=this,t=e._self._c;return t("tr",{staticClass:"row",class:[{"opacity-70":e.isLoading},{"is-expanded-row":e.expanded}]},[e.isDraggable?t("td",{staticClass:"c-data-table__cell--narrow"},[t("dp-icon",{staticClass:"c-data-table__drag-handle",attrs:{icon:"drag-handle"}})],1):e._e(),e._v(" "),e.isSelectable?t("td",{staticClass:"c-data-table__cell--narrow"},[e.isLocked?t("dp-icon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.isLockedMessage,expression:"isLockedMessage"}],staticClass:"align-middle color--grey-light",attrs:{icon:"lock"}}):t("input",{staticClass:"u-m-0 align-middle",attrs:{type:"checkbox","data-cy":"selectItem",name:e.isSelectableName||null},domProps:{value:e.isSelectableName?e.item[e.trackBy]:null,checked:e.checked},on:{click:function(t){return e.toggleSelect(e.item[e.trackBy])}}})],1):e._e(),e._v(" "),e._l(e.fields,(function(n,r){return t("td",{key:`${n}:${r}`,class:{"c-data-table__resizable":e.isTruncatable},attrs:{"data-col-idx":`${r}`}},[e.isTruncatable?t("div",{staticClass:"break-words",class:e.wrapped?"c-data-table__resizable--wrapped":"c-data-table__resizable--truncated",style:e.elementStyle(n)},[e._t(n,(function(){return[e.searchTerm&&e.item[n]?t("span",{domProps:{innerHTML:e._s(e.highlighted(n))}}):t("span",{domProps:{textContent:e._s(e.item[n])}})]}),null,e.item)],2):[e._t(n,(function(){return[e.searchTerm&&e.item[n]?t("span",{domProps:{innerHTML:e._s(e.highlighted(n))}}):t("span",{domProps:{textContent:e._s(e.item[n])}})]}),null,e.item)]],2)})),e._v(" "),e.hasFlyout?t("td",{staticClass:"overflow-visible"},[e._t("flyout",null,null,e.item)],2):e._e(),e._v(" "),e.isExpandable?t("td",{staticClass:"c-data-table__cell--narrow",class:{"is-open":e.expanded},attrs:{title:e.Translator.trans(e.expanded?"aria.collapse":"aria.expand")},on:{click:function(t){return e.toggleExpand(e.item[e.trackBy])}}},[t("dp-wrap-trigger",{attrs:{expanded:e.expanded}})],1):e._e(),e._v(" "),e.isTruncatable?t("td",{staticClass:"c-data-table__cell--narrow",class:{"is-open":e.wrapped},attrs:{title:e.Translator.trans(e.wrapped?"aria.collapse":"aria.expand")},on:{click:function(t){return e.toggleWrap(e.item[e.trackBy])}}},[t("dp-wrap-trigger",{attrs:{expanded:e.wrapped}})],1):e._e()],2)}),[],!1,null,null,null).exports,DpTableHeader:Li,DpLoading:Mi,DpDraggable:Oi},directives:{cleanhtml:ki.J},props:{hasFlyout:{type:Boolean,required:!1,default:!1},hasStickyHeader:{type:Boolean,required:!1,default:!1},headerFields:{type:Array,required:!0},initSelectedItems:{type:Array,required:!1,default:()=>[]},isDraggable:{type:Boolean,required:!1,default:!1},isExpandable:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!1,default:!1},isSelectableName:{type:String,required:!1,default:null},isTruncatable:{type:Boolean,required:!1,default:!1},items:{type:Array,required:!0},multiPageAllSelected:{type:Boolean,required:!1,default:!1},lockCheckboxBy:{type:String,required:!1,default:null},multiPageSelectionItemsToggled:{type:Number,required:!1,default:0},multiPageSelectionItemsTotal:{type:Number,required:!1,default:0},searchString:{type:[String,null],required:!1,default:null},shouldBeSelectedItems:{type:Object,required:!1,default:()=>({})},tableClass:{type:String,required:!1,default:"c-data-table"},tableDescription:{type:String,required:!1,default:""},trackBy:{type:String,required:!0},translations:{type:Object,required:!1,default:()=>({})}},data(){return{allExpanded:!1,allWrapped:!1,defaultTranslations:{footerSelectedElement:Translator.trans("entry.selected"),footerSelectedElements:Translator.trans("entries.selected"),headerExpandHint:Translator.trans("aria.expand.all"),headerSelectHint:Translator.trans("aria.select.all"),lockedForSelection:Translator.trans("item.lockedForSelection"),searchNoResults:e=>Translator.trans("search.no.results",{searchterm:e}),tableLoadingData:Translator.trans("loading.data"),tableNoElements:Translator.trans("explanation.noentries")},elementSelections:{},expandedElements:{},headerCellCount:0,mergedTranslations:{},selectedElements:[],tableEl:void 0,tableProps:[this.isDraggable,this.isSelectable,this.hasFlyout,this.isExpandable,this.isTruncatable],wrappedElements:{}}},computed:{allSelected(){return this.multiPageSelectionItemsTotal>0?this.multiPageSelectionItemsToggled===this.multiPageSelectionItemsTotal||this.multiPageAllSelected:this.items.filter((e=>this.elementSelections[e[this.trackBy]])).length===this.items.length},colCount(){let e=0;return this.tableProps.map((t=>{e+=t?1:0})),this.headerCellCount+e},fields(){return this.headerFields.map((e=>e.field))},headerTranslations(){return this.extractTranslations(["headerSelectHint"])},indeterminate(){if(!1!==this.isSelectable)return this.multiPageSelectionItemsTotal>0?this.multiPageSelectionItemsToggled>0&&!this.allSelected:this.selectedElements.length>0&&!this.allSelected},noResults(){return this.mergedTranslations.searchNoResults(_i().sanitize('"'+this.searchString+'"'))},searchTerm(){if(null===this.searchString||this.searchString.length<1)return new RegExp;const e=this.searchString.replace(/\s*/gi,"\\s*");return new RegExp(e,"ig")},searchTermSet(){return"(?:)"!==this.searchTerm.source}},watch:{shouldBeSelectedItems(){this.forceElementSelections(this.shouldBeSelectedItems)}},methods:{addHoveredClass(e){return this.$refs.tableRows[e].$el.classList.add("is-hovered-content")},extractTranslations(e){return e.reduce(((e,t)=>({...e,...this.mergedTranslations[t]?{[t]:this.mergedTranslations[t]}:{}})),{})},filterElementSelections(){return Object.entries(this.elementSelections).filter((e=>e[1])).map((e=>e[0]))},forceElementSelections(e){this.elementSelections=e,this.selectedElements=this.filterElementSelections()},removeHoveredClass(e){return this.$refs.tableRows[e].$el.classList.remove("is-hovered-content")},resetSelection(){this.toggleSelectAll(!1)},setElementSelections(e,t){return e.reduce(((e,n)=>({...e,[n[this.trackBy]]:t})),this.elementSelections)},toggleExpand(e){this.expandedElements={...this.expandedElements,[e]:!this.expandedElements[e]}},toggleExpandAll(e=!1===this.allExpanded){this.expandedElements=this.items.reduce(((t,n)=>({...t,[n[this.trackBy]]:e})),{}),this.allExpanded=e},toggleSelect(e){this.elementSelections={...this.elementSelections,[e]:!this.elementSelections[e]},this.selectedElements=this.filterElementSelections(),this.$emit("items-selected",this.selectedElements),this.$emit("items-toggled",[{id:e}],this.elementSelections[e])},toggleSelectAll(e=!1===this.allSelected){this.elementSelections=this.setElementSelections(this.items,e),this.selectedElements=this.filterElementSelections(),this.$emit("items-selected",this.selectedElements),this.$emit("items-toggled",this.items.map((e=>({id:e[this.trackBy]}))),e),this.$emit("select-all",e)},toggleWrap(e){this.wrappedElements={...this.wrappedElements,[e]:!this.wrappedElements[e]}},toggleWrapAll(e=!1===this.allWrapped){this.wrappedElements=this.items.reduce(((t,n)=>({...t,[n[this.trackBy]]:e})),{}),this.allWrapped=e}},created(){this.elementSelections=this.setElementSelections(this.initSelectedItems,!0);let e={...this.translations};const t=this.translations.searchNoResults?{searchNoResults:()=>this.translations.searchNoResults}:{};e={...e,...t},this.mergedTranslations={...this.defaultTranslations,...e}},beforeUpdate(){this.headerCellCount=this.headerFields.length},mounted(){if(this.tableEl=this.$refs.tableEl,this.isResizable||this.isTruncatable){const e=this.tableEl.firstChild;Array.prototype.slice.call(e.childNodes).forEach((e=>{if(1===e.nodeType){const t=e.getBoundingClientRect().width;e.style.width=t+"px"}})),this.tableEl.style.tableLayout="fixed",this.tableEl.classList.add("is-fixed"),this.isResizable&&Array.from(this.tableEl.children[1].children).forEach((e=>{Array.from(e.children).forEach((e=>{e.firstChild.style.width=null,e.firstChild.style.maxWidth=null,e.firstChild.style.minWidth=null}))}))}this.isExpandable&&this.isTruncatable&&console.error("`isExpandable` and `isTruncatable` should not be activated at the same time when using DpDataTable."),this.forceElementSelections(this.shouldBeSelectedItems)}},Hi=zi;var Ui=(0,l.Z)(Hi,(function(){var e=this,t=e._self._c;return t("div",[t("table",{ref:"tableEl",class:e.tableClass},[t("caption",{staticClass:"hide-visually",domProps:{textContent:e._s(e.tableDescription)}}),e._v(" "),e.headerFields.filter((e=>e.colClass)).length>0?t("colgroup",[e.isDraggable?t("col"):e._e(),e._v(" "),e.isSelectable?t("col"):e._e(),e._v(" "),e._l(e.headerFields,(function(e){return t("col",{class:e.colClass})})),e._v(" "),e.hasFlyout?t("col"):e._e(),e._v(" "),e.isExpandable?t("col"):e._e(),e._v(" "),e.isTruncatable?t("col"):e._e()],2):e._e(),e._v(" "),t("thead",[t("dp-table-header",{attrs:{checked:e.allSelected,"has-flyout":e.hasFlyout,"header-fields":e.headerFields,indeterminate:e.indeterminate,"is-draggable":e.isDraggable,"is-expandable":e.isExpandable,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-sticky":e.hasStickyHeader,"is-truncatable":e.isTruncatable,translations:e.headerTranslations},on:{"toggle-expand-all":e.toggleExpandAll,"toggle-select-all":e.toggleSelectAll,"toggle-wrap-all":e.toggleWrapAll},scopedSlots:e._u([e._l(e.fields,(function(t){return{key:`header-${t}`,fn:function(){return[e._t(`header-${t}`)]},proxy:!0}}))],null,!0)})],1),e._v(" "),e.isDraggable||e.isLoading?e._e():t("tbody",[e._l(e.items,(function(n,r){return[t("dp-table-row",{ref:"tableRows",refInFor:!0,attrs:{index:r,checked:e.elementSelections[n[e.trackBy]]||!1,fields:e.fields,"has-flyout":e.hasFlyout,"header-fields":e.headerFields,"is-draggable":e.isDraggable,"is-expandable":e.isExpandable,"is-locked":!!e.lockCheckboxBy&&n[e.lockCheckboxBy],"is-locked-message":e.mergedTranslations.lockedForSelection,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-selectable-name":e.isSelectableName,"is-truncatable":e.isTruncatable,item:n,"search-term":e.searchTerm,"track-by":e.trackBy,wrapped:e.wrappedElements[n[e.trackBy]]||!1},on:{"toggle-expand":e.toggleExpand,"toggle-select":e.toggleSelect,"toggle-wrap":e.toggleWrap},scopedSlots:e._u([e._l(e.fields,(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}})),{key:"flyout",fn:function(t){return[e._t("flyout",null,null,t)]}}],null,!0)}),e._v(" "),e.expandedElements[n[e.trackBy]]?t("tr",{class:{"is-expanded-content":e.expandedElements[n[e.trackBy]]}},[t("td",{class:{"opacity-70":e.isLoading},attrs:{colspan:e.colCount},on:{mouseenter:function(t){return e.addHoveredClass(r)},mouseleave:function(t){return e.removeHoveredClass(r)}}},[e._t("expandedContent",null,null,n)],2)]):e._e()]}))],2),e._v(" "),e.isDraggable&&!e.isLoading?t("dp-draggable",{attrs:{"draggable-tag":"tbody","content-data":e.items,handle:"c-data-table__drag-handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen"},on:{change:t=>e.$emit("changed-order",t)}},[e._l(e.items,(function(n,r){return[t("dp-table-row",{attrs:{checked:e.elementSelections[n[e.trackBy]]||!1,expanded:e.expandedElements[n[e.trackBy]]||!1,fields:e.fields,"has-flyout":e.hasFlyout,"header-fields":e.headerFields,index:r,"is-draggable":e.isDraggable,"is-expandable":e.isExpandable,"is-loading":e.isLoading,"is-locked":!!e.lockCheckboxBy&&n[e.lockCheckboxBy],"is-locked-message":e.mergedTranslations.lockedForSelection,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-selectable-name":e.isSelectableName,"is-truncatable":e.isTruncatable,item:n,"search-term":e.searchTerm,"track-by":e.trackBy,wrapped:e.wrappedElements[n[e.trackBy]]||!1},on:{"toggle-expand":e.toggleExpand,"toggle-select":e.toggleSelect,"toggle-wrap":e.toggleWrap},scopedSlots:e._u([e._l(e.fields,(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}})),{key:"flyout",fn:function(t){return[e._t("flyout",null,null,t)]}}],null,!0)})]}))],2):e._e(),e._v(" "),0===e.items.length?t("tr",[e.searchTermSet?t("td",{staticClass:"u-pt",attrs:{colspan:e.colCount},domProps:{innerHTML:e._s(e.noResults)}}):t("td",{staticClass:"u-pt",attrs:{colspan:e.colCount}},[e.isLoading?t("dp-loading",{staticClass:"u-mt",attrs:{"is-loading":"",colspan:e.colCount}}):[e._v("\n "+e._s(e.mergedTranslations.tableNoElements)+"\n ")]],2)]):e._e()],1)])}),[],!1,null,null,null);const Wi=Ui.exports,Zi={name:"DpSelectPageItemCount",props:{currentItemCount:{type:Number,required:!0},labelText:{type:String,required:!0},pageCountOptions:{type:Array,required:!0}},data:()=>({selectId:(0,g.v4)()})};var Ki=(0,l.Z)(Zi,(function(){var e=this,t=e._self._c;return t("div",[t("select",{staticClass:"o-form__control-select width-auto u-mr-0_25",attrs:{id:e.selectId},on:{change:t=>e.$emit("changed-count",parseInt(t.target.value))}},e._l(e.pageCountOptions,(function(n){return t("option",{domProps:{value:n,selected:n===e.currentItemCount}},[e._v("\n "+e._s(n)+"\n ")])})),0),e._v(" "),t("label",{staticClass:"inline u-mb-0",attrs:{for:e.selectId}},[e._v("\n "+e._s(e.labelText)+"\n ")])])}),[],!1,null,null,null);const Ji=Ki.exports;var Gi=s(6781);const Yi={name:"DpSlidingPagination",components:{SlidingPagination:s.n(Gi)()},props:{current:{type:Number,required:!0},total:{type:Number,required:!0}},methods:{prefixClass:e=>(0,r.o4)(e)}},Xi=(0,l.Z)(Yi,(function(){var e=this;return(0,e._self._c)("sliding-pagination",{attrs:{"aria-pagination-label":e.Translator.trans("pager.label"),"aria-goto-page-label":e.Translator.trans("pager.goto.page.from.pages",{page:e.current,total:e.total}),"aria-previous-page-label":e.Translator.trans("pager.previous"),"aria-next-page-label":e.Translator.trans("pager.next"),"aria-current-page-label":e.Translator.trans("pager.page.from.pages.current.page",{page:e.current,total:e.total}),"class-map":{componentClass:e.prefixClass("c-sliding-pagination"),list:e.prefixClass("c-sliding-pagination__list"),element:e.prefixClass("c-sliding-pagination__list-element"),elementDisabled:e.prefixClass("c-sliding-pagination__list-element--disabled"),elementActive:e.prefixClass("c-sliding-pagination__list-element--active"),page:e.prefixClass("c-sliding-pagination__page")},current:e.current,total:e.total},on:{"page-change":t=>e.$emit("page-change",t)}})}),[],!1,null,null,null).exports,Qi={name:"DpStickyElement",props:{applyZIndex:{required:!1,type:Boolean,default:!0},border:{required:!1,type:Boolean,default:!1},context:{type:HTMLElement,required:!1,default:void 0},direction:{required:!1,type:String,default:"top"},observeContext:{required:!1,type:Boolean,default:!0},offset:{required:!1,type:Number,default:0}},mounted(){this.stickyElement=new R(this.$el,this.context,this.offset,this.direction,"palm",!1,this.observeContext)}},eo=(0,l.Z)(Qi,(function(){var e=this;return(0,e._self._c)("div",{staticClass:"o-sticky bg-color--white",class:{"o-sticky--border":e.border,"u-z-fixed":e.applyZIndex}},[e._t("default")],2)}),[],!1,null,null,null).exports,to={name:"DpDataTableExtended",components:{DpDataTable:Wi,DpSelectPageItemCount:Ji,DpSlidingPagination:Xi,DpStickyElement:eo},mixins:[V.Be],props:{defaultSortOrder:{type:[Object,null],required:!1,default:null,validator:e=>"object"==typeof e&&null!==e?(0,r.Q$)(e,"key")&&(0,r.Q$)(e,"direction"):null===e},hasFlyout:{type:Boolean,required:!1,default:!1},headerFields:{type:Array,required:!0,default:()=>[]},initItemsPerPage:{type:Number,required:!1,default:50},isExpandable:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},isResizable:{type:Boolean,required:!1,default:!1},isSelectable:{type:Boolean,required:!1,default:!1},isSortable:{type:Boolean,required:!1,default:!1},isTruncatable:{type:Boolean,required:!1,default:!1},itemsPerPageOptions:{type:Array,required:!1,default:()=>[10,50,100,200]},tableItems:{type:Array,required:!1,default:()=>[]},trackBy:{type:String,required:!1,default:"id"}},data(){return{currentPage:1,filteredItems:[],filters:this.headerFields.reduce(((e,t)=>(e[t.field]=!0,e)),{}),isHighlighted:"",itemsPerPage:this.initItemsPerPage,searchString:"",sortOrder:null!==this.defaultSortOrder?this.defaultSortOrder:this.headerFields.length>0?{key:this.headerFields[0].field,direction:-1}:null}},computed:{filteredFields(){const e=this.headerFields.filter((e=>this.filters[e.field]));return this.$emit("updated:filteredItems",e),e},onPageItems(){let e=this.currentPage*this.itemsPerPage;const t=e-this.itemsPerPage;e=e<=this.filteredItems.length?e:this.filteredItems.length;const n=this.filteredItems.slice(t,e);return this.$emit("updated:onPageItems",n),n},sortableFilteredFields(){return this.isSortable?this.filteredFields:[]},totalPages(){return this.filteredItems.length>0?Math.ceil(this.filteredItems.length/this.itemsPerPage):1}},watch:{tableItems(){this.updateFields()}},methods:{emitSelectedItems(e){this.$emit("items-selected",e)},handlePageChange(e){this.currentPage=e,this.updateFields()},highlightText(e){let t=_i().sanitize(e.replace("<br>","__br__")).replace("__br__","<br>");if(this.searchString.length){const n=new RegExp(this.searchString,"ig");t=e.replace(n,'<span style="background-color: yellow;">$&</span>')}return t},setOrder(e){e===this.sortOrder.key?this.sortOrder.direction=-1*this.sortOrder.direction:this.sortOrder={key:e,direction:1},this.updateFields(),this.$emit("updated:sortOrder",this.sortOrder)},setPageItemCount(e){this.itemsPerPage=e,this.currentPage=this.currentPage>this.totalPages?this.totalPages:this.currentPage,this.updateFields()},sortIconClass(e){const t=e===this.sortOrder.key,n=this.sortOrder.direction<0?"fa-sort-up":"fa-sort-down";return t?`${n} color-highlight`:"fa-sort color--grey"},updateFields(e=null){let t=e||this.tableItems;this.sortOrder&&t.sort(((e,t)=>null===e[this.sortOrder.key]||void 0===e[this.sortOrder.key]?1*this.sortOrder.direction:null===t[this.sortOrder.key]||void 0===t[this.sortOrder.key]?-1*this.sortOrder.direction:e[this.sortOrder.key].localeCompare(t[this.sortOrder.key],"de",{sensitivity:"base"})*this.sortOrder.direction)),this.searchString.length>0&&(t=i(this.searchString,t,this.headerFields.map((e=>e.field)))),this.filteredItems=t}},mounted(){this.updateFields()}},no=to;var ro=(0,l.Z)(no,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"u-mt-0_5"},[t("dp-sticky-element",[t("div",{staticClass:"layout u-pv-0_5"},[t("div",{staticClass:"layout__item u-10-of-12"},[t("label",{staticClass:"inline",attrs:{for:"search"}},[e._v("\n "+e._s(e.Translator.trans("search"))+"\n ")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.searchString,expression:"searchString"}],staticClass:"o-form__control-input",attrs:{type:"text",id:"search",name:"search"},domProps:{value:e.searchString},on:{input:[function(t){t.target.composing||(e.searchString=t.target.value)},function(t){return e.updateFields(null)}]}}),e._v(" "),e.totalPages>1?t("dp-sliding-pagination",{staticClass:"inline-block u-ml-0_5 u-mt-0_125",attrs:{current:e.currentPage,total:e.totalPages},on:{"page-change":e.handlePageChange}}):e._e(),e._v(" "),t("dp-select-page-item-count",{staticClass:"inline-block u-mt-0_125 u-ml-0_5",attrs:{"page-count-options":e.itemsPerPageOptions,"current-item-count":e.itemsPerPage,"label-text":e.Translator.trans("pager.per.page")},on:{"changed-count":e.setPageItemCount}})],1)])]),e._v(" "),t("dp-data-table",{attrs:{"has-flyout":e.hasFlyout,"header-fields":e.headerFields,"is-expandable":e.isExpandable,"is-loading":e.isLoading,"is-resizable":e.isResizable,"is-selectable":e.isSelectable,"is-truncatable":e.isTruncatable,items:e.onPageItems,"search-string":e.searchString,"should-be-selected-items":e.currentlySelectedItems,"track-by":e.trackBy},on:{"items-selected":e.emitSelectedItems},scopedSlots:e._u([e._l(e.sortableFilteredFields,(function(n){return{key:`header-${n.field}`,fn:function(n){return[e._t(`header-${n.field}`,(function(){return[t("div",{key:n.field,staticClass:"o-hellip--nowrap relative u-pr-0_75"},[t("button",{staticClass:"btn--blank u-top-0 u-right-0 absolute",attrs:{"aria-label":e.Translator.trans("table.cols.sort")+": "+n.label,title:e.Translator.trans("table.cols.sort")+": "+n.label,type:"button"},on:{click:function(t){return e.setOrder(n.field)}}},[t("i",{staticClass:"fa",class:e.sortIconClass(n.field),attrs:{"aria-hidden":"true"}})]),e._v("\n "+e._s(n.label)+"\n ")])]}),null,n)]}}})),e._l(e.filteredFields,(function(t,n){return{key:e.filteredFields[n].field,fn:function(t){return[e._t(e.filteredFields[n].field,null,null,t)]}}})),{key:"expandedContent",fn:function(t){return[e._t("expandedContent",null,null,t)]}},{key:"flyout",fn:function(t){return[e._t("flyout",null,null,t)]}}],null,!0)}),e._v(" "),t("dp-sticky-element",{attrs:{direction:"bottom"}},[e._t("footer")],2)],1)}),[],!1,null,null,null);const io=ro.exports;function oo(e,t){var n=new Date(e.getTime());return n.setHours(0,0,0,0),n.setDate(1),n.setMonth(n.getMonth()+t),n}function so(e,t){var n=new Date(e.getTime());return new Date(n.setDate(n.getDate()+t))}function ao(e){return new Date(e[0],e[1],e[2])}function lo(e,t,n){return n||(n=[]),n.push(e),e<t&&lo(e+1,t,n)||n}function co(e,t){var n=e.split(t);return n.forEach((function(e,t){e.indexOf("d")>-1&&(n[t]="day"),e.indexOf("m")>-1&&(n[t]="month"),e.indexOf("y")>-1&&(n[t]="year")})),n}function uo(e){return function(t,n){return t[e.indexOf(n)]}}function po(e){return ho(e,".")||ho(e,"-")||ho(e,"/")}function ho(e,t){return e.indexOf(t)>-1?t:null}function fo(e,t){var n=po(t),r=co(t,n),i=e.split(n),o=uo(r);return new Date(o(i,"year"),o(i,"month")-1,o(i,"day"))}function mo(e,t){var n=po(t),r=t.split(n),i=e.getFullYear(),o=e.getMonth()+1,s=e.getDate();return r.map((function(e){return e.match(/d/i)?go(s,e):e.match(/m/i)?go(o,e):e.match(/y/i)?go(i,e):void 0})).join(n)}function go(e,t){var n=(t+"").length-(e+"").length;if(0===n)return e;if(n>0)return function(e,t){for(var n=e+"",r=0;r<t;r++)n=0+n;return n}(e,n);if(n<0)throw new Error("Invalid date format")}function yo(e){return ao(e.value.split("$").map((function(e){return parseInt(e)})))}function vo(e,t){if(0===t.length)return e;if(e.classList)for(var n=t.split(" "),r=0;r<n.length;)e.classList.add(n[r]),r+=1;else{var i=e.getAttribute("class");i=i+" "+t,e.setAttribute("class",i)}return e}function bo(e,t){var n=e.tagName.toLowerCase();vo(e,t+n)}function wo(e,t){for(var n=Array.prototype.slice.call(e.getElementsByTagName("*")),r=0;r<n.length;)bo(n[r],t),r+=1}function xo(e){return e.focus(),!0}function So(){return document.activeElement}function ko(e){return document.querySelector('[data-ad-id="'+e+'"]')}function Co(e){return ko(""+e.getDate()+e.getMonth()+e.getFullYear())}function _o(e,t,n){return t.addEventListener(e,n,!0),function(){t.removeEventListener(e,n,!0)}}function Ao(e){return e.hasAttribute("data-day")}function Eo(e,t){var n;"function"==typeof Event?n=new Event(t,{bubbles:!0,cancelable:!0}):(n=document.createEvent("Event")).initEvent(t,!0,!0),e.dispatchEvent(n)}function Oo(e,t,n){var r=document.createElement("th"),i=document.createElement("button");i.type="button",i.value=t+"$"+n;var o="-1"===e?'<svg data-ad-id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 16" width="6" height="16"><path data-ad-id="icon" fill-rule="evenodd" d="M6 2L0 8l6 6V2z"></path></svg>':'<svg data-ad-id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 16" width="6" height="16"><path data-ad-id="icon" fill-rule="evenodd" d="M0 14l6-6-6-6v12z"></path></svg>';return i.setAttribute("data-ad-id",e),i.setAttribute("data-direction",!0),i.innerHTML=o,i.addEventListener("mousedown",(function e(t){t.preventDefault(),t.stopPropagation(),i.removeEventListener("mousedown",e),Eo(i,"mousedown")})),r.appendChild(i),r}function To(e,t,n){for(var r=document.createElement("tr"),i=e,o=0;o<7;o++)r.appendChild(t(i,n.weekdays[o])),i+=1;return{el:r,day:i}}function Do(e){for(var t=document.createDocumentFragment(),n=0;n<e;n++)t.appendChild(document.createElement("td"));return t}function Mo(e){return e instanceof Date&&!isNaN(e)}function No(e,t,n,r){var i=t&&(Mo(t)&&t||fo(t,r)),o=n&&(Mo(n)&&n||fo(n,r)),s=Mo(e)&&e||fo(e,r);return(!i||i<=s)&&(!o||o>=s)}function Io(e,t,n){var r=lo(n.monthsBeforeCurrent,n.monthsAfterCurrent).length,i=t<0?-1*r:r,o=i<0?0:r-1,s=i<0?r-1:0;return{date:oo(e,i),before:-1*o,after:s}}var Po={Up:-7,ArrowUp:-7,Down:7,ArrowDown:7,Left:-1,ArrowLeft:-1,Right:1,ArrowRight:1};function $o(e,t,n,r,i){(function(e,t,n,r,i){var o=ko(n.id+"group-container"),s=ko(n.id+"group");s=s&&o&&o.removeChild(s),o=o||document.createElement("div"),s=function(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}(s=s||document.createElement("div"));var a=lo(r,i);a.forEach((function(e,r){var i=void 0===a[r-1],o=void 0===a[r+1],l=oo(t,e);s.appendChild(function(e,t,n,r){var i,o,s,a,l,c=e.getFullYear(),d=e.getMonth(),u=e.toLocaleDateString(r.locale,{month:"long"}),p=function(e,t){return function e(t,n){return n||(n=[]),7===n.length?n:(n.push(t),e(6===t?0:t+1,n))}(t).indexOf(e.getDay())}(e,r.weekStartsOn),h=ao([c,d+1,0]).getDate(),f=function(e,t,n,r){return function(i,o){var s=document.createElement("td"),a=ao([t,e,i]),l=a.setHours(0,0,0,0)==(new Date).setHours(0,0,0,0);return s.appendChild(function(e,t,n,r,i,o,s){var a=document.createElement("button"),l=document.createTextNode(e);return a.value=n+"$"+t+"$"+e,a.type="button",a.setAttribute("data-day",!0),a.setAttribute("data-ad-id",""+e+t+n),a.setAttribute("aria-label",i+" "+e+" "+r+" "+n),a.setAttribute("aria-disabled",!o),s&&a.classList.add("a1-is-today"),a.appendChild(l),a}(i,e,t,n,o,r(a),l)),s}}(d,c,u,(i=r.minDate,o=r.maxDate,s=r.dateFormat,function(e){return No(e,i,o,s)})),m=document.createElement("table"),g=document.createElement("thead"),y=document.createElement("tbody");g.appendChild(function(e,t,n,r,i){var o=document.createElement("tr"),s=document.createElement("th"),a=(r&&i?5:(r||i)&&6)||7;if(s.colSpan=a,s.appendChild(document.createTextNode(n+" "+e)),r){var l=Oo("-1",e,t);o.appendChild(l)}if(o.appendChild(s),i){var c=Oo("1",e,t);o.appendChild(c)}return o}(c,d,u,t,n)),g.appendChild((a=r.weekdays,l=document.createElement("tr"),a.forEach((function(e){var t=document.createTextNode(e),n=document.createElement("th");n.appendChild(t),l.appendChild(n)})),l)),m.appendChild(g);var v=function(e,t,n){var r=e,i=document.createElement("tr"),o=1,s=Do(7-(7-e));i.appendChild(s);for(var a=r;a<7;a++)i.appendChild(t(o,n.weekdays[o])),o+=1;return{el:i,end:o}}(p,f,r);return y.appendChild(v.el),y.appendChild(function(e,t,n,r){for(var i=Math.floor((t-e+1)/7),o=e,s=document.createDocumentFragment(),a=1,l=0;l<i;l++){var c=To(o,n,r);s.appendChild(c.el),o=c.day,a+=1}var d=document.createElement("tr"),u=0;for(l=o;l<=t;l++)d.appendChild(n(o,r.weekdays[u])),o+=1,u+=1;a+=1;var p=Do(7-u);for(d.appendChild(p),s.appendChild(d);a<6;){var h=document.createElement("tr");h.appendChild(Do(7)),s.appendChild(h),a+=1}return s}(v.end,h,f,r)),m.appendChild(y),m}(l,i,o,n))})),s.setAttribute("data-ad-id",n.id+"group"),s.setAttribute("data-ad-selector","datepicker-container"),o.setAttribute("data-ad-selector","group-container"),o.setAttribute("data-ad-id",n.id+"group-container"),o.appendChild(s),e.appendChild(o)})(e,t,n,r=isNaN(r)?n.monthsBeforeCurrent:r,i=isNaN(i)?n.monthsAfterCurrent:i),wo(e,n.classPrefix)}function Ro(e,t){var n=ko(t+"group-container");n&&e.removeChild(n)}function Bo(e,t,n,r){var i=fo(n,r);max=mo(i,"yyyy-mm-dd"),e.setAttribute(t,i)}function qo(e){return{shouldCloseOnFocusOut:function(t){var n=t.relatedTarget;return!n||!n.getAttribute("data-ad-id")||"INPUT"===n.tagName&&n.getAttribute("data-ad-id")!==e.id+"input"}}}function Fo(e,t,n){var r=new qo(e);function i(e){e.target.hasAttribute("data-direction")&&e.preventDefault()}function o(e){t(e.target.value,!1,!0)}function s(t){r.shouldCloseOnFocusOut(t)&&Ro(t.currentTarget.parentNode,e.id)}function a(t){if((""===t.target.value||"click"===t.type)&&!ko(e.id+"group")){$o(t.target.parentNode,n()||e.initialDate&&fo(e.initialDate,e.dateFormat)||new Date,e);var r=ko(e.id+"group");if(r.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)){var i=t.target.getBoundingClientRect().height;r.setAttribute("style","bottom: "+i+"px;")}e.onAfterOpen(r)}}function l(n){var r=n.target,i=ko(e.id+"input");Ao(r)&&function(n,r){var i=yo(n);t(i)&&(Ro(r.parentNode,e.id),r.focus(),Eo(r,"input"))}(r,i),function(e){var t=e.getAttribute("data-ad-id");return"1"===t||"-1"===t}(r)&&function(t){var n=t.currentTarget,r=parseInt(t.target.getAttribute("data-ad-id")),i=t.target.value.split("$"),o=Io(i=ao([i[0],i[1],1]),r,e);$o(n,o.date,e,o.before,o.after)}(n)}function c(t){var r=Ao(So()),i=t.key,o=Po[i];!t.shiftKey||"Down"!==i&&"ArrowDown"!==i?o&&r?function(e,t,n){var r=yo(So()),i=so(r,e),o=Co(i);o&&xo(o)||function(e,t,n,r){var i=Io(n,t>0?1:-1,r);return $o(e,i.date,r,i.before,i.after),!0}(t,e,r,n)&&xo(Co(i))}(o,t.currentTarget,e):"Esc"===i||"Escape"===i?(xo(ko(e.id+"input")),Ro(t.currentTarget,e.id)):"Enter"!==i&&" "!==i||!r||(t.preventDefault(),l(t)):function(e,t,n){var r=n||t.initialDate&&fo(t.initialDate,t.dateFormat)||new Date;$o(e,r,t),xo(Co(r))}(t.currentTarget,e,n())}this.activeListeners=[],this.setListeners=function(e,t){this.activeListeners.push(_o("focus",t,a)),this.activeListeners.push(_o("mousedown",e,l)),this.activeListeners.push(_o("keydown",e,c)),this.activeListeners.push(_o("input",t,o)),this.activeListeners.push(_o("click",t,a)),this.activeListeners.push(_o("focusout",t,s)),this.activeListeners.push(_o("mousedown",e,i))}}function Lo(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function Vo(e,t,n){return function(){var r=e.selectedDate,i=r||"";return n&&""!==i?mo(r,t):i}}var jo={locale:"en-EN",weekDayFormat:"short",minDate:null,maxDate:null,initialDate:null,monthsBeforeCurrent:0,monthsAfterCurrent:0,weekStartsOn:1,id:"a1-",dateFormat:"yyyy-mm-dd",inputName:"datepicker-input",inputClass:"",rootClass:"",classPrefix:"a1-",translations:{description:"This is a datepicker. You can type in a date using the keyboard. Use the required date format. It should be:yyyy-mm-dd. You can also use the datepicker to select a date. Press shift and arrow down to focus the datepicker. Press left arrow to move one day back. Press right arrow to move one day ahead. Press arrow up to move one week back. Press arrow down to move one week ahead Press Space to select a date. Press Escape to close the datepicker.",notInRange:"The date is not within the intended date range.",nextGroups:"Show next months.",prevGroups:"Show previous months."},required:!1,disabled:!1,onAfterOpen:function(e){}};function zo(e){var t={selectedDate:null,config:jo,listeners:null};return function e(n){(function(e){var n,r;t.config=(n=e||{},r=Lo({},t.config),r=Lo(r,n));var i,o=t.config.monthsBeforeCurrent;t.config.monthsBeforeCurrent=o<0?o:-1*o,t.config.weekdays=function e(t,n,r,i){return i||(i=[]),7===i.length?i:(i.push(t.toLocaleDateString(n,{weekday:r})),e(so(t,1),n,r,i))}((i=t.config.weekStartsOn,so(ao([2014,10,9]),i)),t.config.locale,t.config.weekDayFormat)})(n),document.getElementById(t.config.id).innerHTML="",t.listeners&&function(e){for(var t=0;t<e.length;)e[t](),t++}(t.listeners.activeListeners);var r=function(e){var n,r,i,o=document.getElementById(e.id);if(vo(o,e.rootClass),wo(o,e.classPrefix),navigator.userAgent.match(/mobi/gi))!function(e,t){var n=document.createElement("input");n.type="date",t.maxDate&&Bo(n,"max",t.maxDate,t.dateFormat),t.minDate&&Bo(n,"min",t.minDate,t.dateFormat),e.appendChild(n)}(o,e);else{var s=function(e,t){var n=document.createElement("p");n.appendChild(document.createTextNode(t.translations.description)),n.classList.add("visuallyhidden"),n.id=t.id+"description",e.appendChild(n);var r=document.createElement("input");return r.setAttribute("aria-describedby",t.id+"description"),r.type="text",r.setAttribute("data-ad-id",t.id+"input"),r.setAttribute("name",t.inputName),r.setAttribute("autocomplete","off"),t.disabled&&r.setAttribute("disabled",t.disabled),!t.disabled&&t.required&&r.setAttribute("required","true"),r=vo(r,t.inputClass),e.appendChild(r),wo(e,t.classPrefix),r}(o,e);n=function(e,t,n){var r=n.dateFormat;return function(i,o,s){var a=Mo(i)&&i||function(e,t){var n=po(t),r=uo(co(t,n)),i=e.split(n);return!(3!==(i=i.map((function(e){return parseInt(e)}))).length||r(i,"month")>12||r(i,"month")<1||!Mo(new Date(r(i,"year"),r(i,"month")-1,r(i,"day"))))}(i,r)&&fo(i,r);return a&&(No(a,n.minDate,n.maxDate,r)||o)?(s||(t.value=mo(a,r)),t.setCustomValidity(""),e.selectedDate=a,!0):(e.selectedDate=null,(""!==i||n.required&&!o)&&t.setCustomValidity("invalid date"),!1)}}(t,s,e),r=Vo(t,e.dateFormat),i=Vo(t,e.dateFormat,!0),t.listeners=new Fo(e,n,r),t.listeners.setListeners(o,s)}return{getConfig:function(){return t.config},setDate:n,getDate:r,getDateAsString:i}}(t.config);return t.selectedDate&&r.setDate(t.selectedDate,!0),r.updateDatepicker=e,r}(e)}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.a1-div[data-ad-selector="datepicker-container"] {\n position: absolute;\n display: flex;\n flex-direction: row;\n z-index: 1001;\n}\n\n.a1-div[data-ad-selector="group-container"] {\n position: relative;\n}\n\n.a1-p.visuallyhidden:not(:focus):not(:active) {\n position: absolute;\n \n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n \n white-space: nowrap;\n \n clip-path: inset(100%);\n clip: rect(0 0 0 0);\n overflow: hidden;\n}\n\n.a1-td:empty::after {\n content: "\\00a0";\n }');const Ho={name:"DpDatepicker",props:{calendarsAfter:{type:Number,required:!1,default:0},calendarsBefore:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},maxDate:{type:String,required:!1,default:""},minDate:{type:String,required:!1,default:""},name:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""}},data(){return{datepicker:null,localConfig:{theme:"light",locale:"DE-de",dateFormat:"dd.mm.yyyy",id:this.id,inputClass:"o-form__control-input width-100p"}}},watch:{value:function(){if(null!==this.value){const e=document.getElementById(this.id).getElementsByTagName("input")[0].value!==this.value;this.datepicker&&e&&this.datepicker.setDate(this.value,!0)}},maxDate:function(){if(this.datepicker.getDate()){const e=this.datepicker.getDateAsString();this.datepicker=this.datepicker.updateDatepicker({maxDate:this.maxDate}),this.datepicker.setDate(e,!0)}else this.datepicker=this.datepicker.updateDatepicker({maxDate:this.maxDate})},minDate:function(){if(this.datepicker.getDate()){const e=this.datepicker.getDateAsString();this.datepicker=this.datepicker.updateDatepicker({minDate:this.minDate}),this.datepicker.setDate(e,!0)}else this.datepicker=this.datepicker.updateDatepicker({minDate:this.minDate})},required:function(){this.datepicker=this.datepicker.updateDatepicker({required:this.required})},disabled:function(){this.datepicker=this.datepicker.updateDatepicker({disabled:this.disabled})}},methods:{emitUpdate(e){const t=e.target.value,n=this.datepicker.getDateAsString(),r=n===t?n:t;this.$emit("input",r),this.$root.$emit("dp-datepicker",{id:this.id,value:r})}},mounted(){const e={...this.calendarsAfter>0?{monthsAfterCurrent:this.calendarsAfter}:{},...this.calendarsBefore>0?{monthsBeforeCurrent:this.calendarsBefore}:{},...""!==this.maxDate?{maxDate:this.maxDate}:{},...""!==this.minDate?{minDate:this.minDate}:{},...""!==this.name?{inputName:this.name}:{},required:this.required,disabled:this.disabled,...this.localConfig};this.datepicker=zo(e),""!==this.value&&this.datepicker.setDate(this.value)}},Uo=Ho,Wo=(0,l.Z)(Uo,(function(){var e=this;return(0,e._self._c)("div",{attrs:{id:e.id,"data-cy":"datepicker"},on:{input:function(t){return t.stopPropagation(),t.preventDefault(),e.emitUpdate.apply(null,arguments)}}})}),[],!1,null,null,null).exports,Zo={name:"DpDateRangePicker",components:{DpDatepicker:Wo},props:{calendarsAfter:{type:Number,required:!1,default:0},calendarsBefore:{type:Number,required:!1,default:0},endDisabled:{type:Boolean,required:!1,default:!1},endId:{type:String,required:!0},endName:{type:String,required:!1,default:""},endValue:{type:String,required:!1,default:""},enforcePlausibleDates:{type:Boolean,required:!1,default:!1},maxDate:{type:String,required:!1,default:""},minDate:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},startDisabled:{type:Boolean,required:!1,default:!1},startId:{type:String,required:!0},startName:{type:String,required:!1,default:""},startValue:{type:String,required:!1,default:""}},data(){return{endDate:this.endValue,maxStartDate:this.enforcePlausibleDates?this.endValue:"",minEndDate:this.enforcePlausibleDates?this.startValue:""}},computed:{currentDate:()=>(0,r.p6)()},watch:{startValue(e){this.minEndDate=this.enforcePlausibleDates?e:""},endValue(e){this.maxStartDate=this.enforcePlausibleDates?e:""}},methods:{handleInputEndDate(e){this.updateMaxStartDate(e),this.$emit("input:end-date",e)},handleInputStartDate(e){this.updateMinEndDate(e),this.$emit("input:start-date",e)},updateMaxStartDate(e){this.endDate=e,this.maxStartDate=this.enforcePlausibleDates&&e?e:""},updateMinEndDate(e){this.minEndDate=this.enforcePlausibleDates&&e?e:""}}},Ko=(0,l.Z)(Zo,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex items-center"},[t("dp-datepicker",{attrs:{id:e.startId,name:e.startName,"min-date":e.minDate,"max-date":e.maxStartDate,"calendars-after":e.calendarsAfter,"calendars-before":e.calendarsBefore,disabled:e.startDisabled,value:e.startValue,required:e.required||""!==e.endDate&&e.endDate<e.currentDate,"data-cy":"startDateDescription"},on:{input:e.handleInputStartDate}}),e._v(" "),t("span",[e._v("-")]),e._v(" "),t("dp-datepicker",{attrs:{id:e.endId,name:e.endName,"min-date":e.minEndDate,"max-date":e.maxDate,"calendars-after":e.calendarsAfter,"calendars-before":e.calendarsBefore,disabled:e.endDisabled,value:e.endValue,required:e.required,"data-cy":"endDateDescription"},on:{input:e.handleInputEndDate}})],1)}),[],!1,null,null,null).exports;var Jo=s(285),Go=s.n(Jo),Yo=s(1635),Xo=s.n(Yo);const Qo={name:"DpInput",components:{DpLabel:ui.default},mixins:[V.gH],props:{ariaLabelledby:{type:[String,Boolean],required:!1,default:!1},autocomplete:{type:String,required:!1,default:""},dataCounter:{type:String,required:!1,default:""},dataCy:{type:String,required:!1,default:""},dataDpValidateError:{type:String,required:!1,default:""},dataDpValidateIf:{type:String,required:!1,default:""},dataDpValidateShouldEqual:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},hasIcon:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},label:{type:Object,default:()=>({bold:!0,hint:"",text:"",tooltip:""}),validator:e=>Object.keys(e).every((e=>["bold","hint","text","tooltip"].includes(e)))},maxlength:e,minlength:e,name:{type:String,required:!1,default:""},pattern:{type:String,required:!1,default:""},placeholder:{type:String,required:!1,default:""},preventDefaultOnEnter:{type:Boolean,required:!1,default:!0},readonly:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},size:{type:[Number,null],required:!1,default:null},type:{type:String,required:!1,default:"text"},value:{type:String,required:!1,default:""},width:{type:String,default:"u-1-of-1"}},data(){return{currentValue:this.value}},computed:{classes(){let e=[];return e=this.size>0?[]:[...e,"u-1-of-1"],e=this.readonly||this.disabled?[...e,"bg-color--grey-light-2"]:e,e="search"!==this.type?[...e,"o-form__control-input"]:[...e,"o-form__control-search"],e=this.hasIcon?[...e,"u-pr"]:e,e.join(" ")},containerWidth(){return"auto"===this.width||this.size>0?"":this.width},labelHint(){const e=void 0!==this.label.hint&&""!==this.label.hint?[this.label.hint]:[];return this.maxlength&&!this.minlength?e.push((0,r.T8)(this.currentValue.length,this.maxlength)):this.minlength&&!this.maxlength?e.push((0,r.C4)(this.currentValue.length,this.minlength)):this.maxlength&&this.minlength&&(this.maxlength===this.minlength?e.push((0,r.f5)(this.currentValue.length,this.maxlength)):(e.push((0,r.T8)(this.currentValue.length,this.maxlength)),e.push((0,r.C4)(this.currentValue.length,this.minlength)))),e}},watch:{value:function(){this.currentValue=this.value}},methods:{handleEnter(e){!0===this.preventDefaultOnEnter&&e.preventDefault(),this.$emit("enter")}}},es=Qo,ts=(0,l.Z)(es,(function(){var e=this,t=e._self._c;return t("div",{class:""!==e.containerWidth&&e.prefixClass(e.containerWidth)},[""!==e.label.text?t("dp-label",e._b({},"dp-label",{...e.label,for:e.id,hint:e.labelHint,required:e.required},!1)):e._e(),"checkbox"===e.type?t("input",{directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],class:e.prefixClass(e.classes),attrs:{id:e.id,name:""!==e.name?e.name:null,"data-counter":""!==e.dataCounter?e.dataCounter:null,"data-dp-validate-error":e.dataDpValidateError||null,"data-dp-validate-if":""!==e.dataDpValidateIf?e.dataDpValidateIf:null,"data-dp-validate-should-equal":""!==e.dataDpValidateShouldEqual?e.dataDpValidateShouldEqual:null,"data-cy":""!==e.dataCy&&e.dataCy,"aria-labelledby":e.ariaLabelledby,maxlength:""!==e.maxlength?e.maxlength:null,minlength:""!==e.minlength?e.minlength:null,pattern:""!==e.pattern?e.pattern:null,placeholder:""!==e.placeholder?e.placeholder:null,disabled:e.disabled,readonly:e.readonly,required:e.required,autocomplete:""!==e.autocomplete?e.autocomplete:null,size:e.size&&e.size>0?e.size:null,type:"checkbox"},domProps:{checked:Array.isArray(e.currentValue)?e._i(e.currentValue,null)>-1:e.currentValue},on:{focus:function(t){return e.$emit("focus")},input:function(t){return e.$emit("input",e.currentValue)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleEnter.apply(null,arguments)},change:function(t){var n=e.currentValue,r=t.target,i=!!r.checked;if(Array.isArray(n)){var o=e._i(n,null);r.checked?o<0&&(e.currentValue=n.concat([null])):o>-1&&(e.currentValue=n.slice(0,o).concat(n.slice(o+1)))}else e.currentValue=i}}}):"radio"===e.type?t("input",{directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],class:e.prefixClass(e.classes),attrs:{id:e.id,name:""!==e.name?e.name:null,"data-counter":""!==e.dataCounter?e.dataCounter:null,"data-dp-validate-error":e.dataDpValidateError||null,"data-dp-validate-if":""!==e.dataDpValidateIf?e.dataDpValidateIf:null,"data-dp-validate-should-equal":""!==e.dataDpValidateShouldEqual?e.dataDpValidateShouldEqual:null,"data-cy":""!==e.dataCy&&e.dataCy,"aria-labelledby":e.ariaLabelledby,maxlength:""!==e.maxlength?e.maxlength:null,minlength:""!==e.minlength?e.minlength:null,pattern:""!==e.pattern?e.pattern:null,placeholder:""!==e.placeholder?e.placeholder:null,disabled:e.disabled,readonly:e.readonly,required:e.required,autocomplete:""!==e.autocomplete?e.autocomplete:null,size:e.size&&e.size>0?e.size:null,type:"radio"},domProps:{checked:e._q(e.currentValue,null)},on:{focus:function(t){return e.$emit("focus")},input:function(t){return e.$emit("input",e.currentValue)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleEnter.apply(null,arguments)},change:function(t){e.currentValue=null}}}):t("input",{directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],class:e.prefixClass(e.classes),attrs:{id:e.id,name:""!==e.name?e.name:null,"data-counter":""!==e.dataCounter?e.dataCounter:null,"data-dp-validate-error":e.dataDpValidateError||null,"data-dp-validate-if":""!==e.dataDpValidateIf?e.dataDpValidateIf:null,"data-dp-validate-should-equal":""!==e.dataDpValidateShouldEqual?e.dataDpValidateShouldEqual:null,"data-cy":""!==e.dataCy&&e.dataCy,"aria-labelledby":e.ariaLabelledby,maxlength:""!==e.maxlength?e.maxlength:null,minlength:""!==e.minlength?e.minlength:null,pattern:""!==e.pattern?e.pattern:null,placeholder:""!==e.placeholder?e.placeholder:null,disabled:e.disabled,readonly:e.readonly,required:e.required,autocomplete:""!==e.autocomplete?e.autocomplete:null,size:e.size&&e.size>0?e.size:null,type:e.type},domProps:{value:e.currentValue},on:{focus:function(t){return e.$emit("focus")},input:[function(t){t.target.composing||(e.currentValue=t.target.value)},function(t){return e.$emit("input",e.currentValue)}],keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleEnter.apply(null,arguments)}}})],1)}),[],!1,null,null,null).exports,ns={name:"DpResettableInput",components:{DpIcon:Yr,DpInput:ts},props:{dataCy:{type:String,required:!1,default:""},buttonVariant:{type:String,required:!1,default:"medium",validator:e=>["small","medium"].includes(e)},defaultValue:{type:String,required:!1,default:""},id:{type:String,required:!0},inputAttributes:{type:Object,required:!1,default:()=>({})},pattern:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""}},data(){return{currentValue:this.value}},computed:{buttonClass(){return"small"===this.buttonVariant?"o-form__control-search-reset--small":"o-form__control-search-reset"},iconSize(){return this.buttonVariant}},watch:{value:function(){this.currentValue=this.value}},methods:{resetValue(){this.$emit("reset")}}},rs=(0,l.Z)(ns,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"relative"},[t("dp-input",e._b({attrs:{id:e.id,"data-cy":e.dataCy,"has-icon":"",required:e.required,pattern:e.pattern},on:{blur:function(t){return e.$emit("blur",e.currentValue)},input:function(t){return e.$emit("input",e.currentValue)},enter:function(t){return e.$emit("enter",e.currentValue)},focus:function(t){return e.$emit("focus")}},model:{value:e.currentValue,callback:function(t){e.currentValue=t},expression:"currentValue"}},"dp-input",e.inputAttributes,!1)),e._v(" "),e.inputAttributes.disabled?e._e():t("button",{staticClass:"btn--blank o-link--default",class:e.buttonClass,attrs:{disabled:e.currentValue===e.defaultValue},on:{click:e.resetValue}},[t("dp-icon",{attrs:{icon:"xmark",size:e.iconSize}})],1)],1)}),[],!1,null,null,null).exports;var is=/iPhone/i,ss=/iPod/i,as=/iPad/i,ls=/\biOS-universal(?:.+)Mac\b/i,cs=/\bAndroid(?:.+)Mobile\b/i,ds=/Android/i,us=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ps=/Silk/i,hs=/Windows Phone/i,fs=/\bWindows(?:.+)ARM\b/i,ms=/BlackBerry/i,gs=/BB10/i,ys=/Opera Mini/i,vs=/\b(CriOS|Chrome)(?:.+)Mobile/i,bs=/Mobile(?:.+)Firefox\b/i,ws=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};const xs="00:00",Ss={name:"DpTimePicker",components:{DpInput:ts,DpLabel:ui.default,DpResettableInput:rs},directives:{ClickOutside:vi()},props:{disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!0},label:{type:String,required:!1,default:""},minuteSteps:{type:Number,required:!1,default:15},minValue:{type:String,required:!1,default:""},value:{type:String,required:!1,default:xs}},data:()=>({currentHour:"00",currentMinutes:"00",isInputFocused:!1,showFlyout:!1}),computed:{availableHours(){if(""!==this.minValue){const e=this.minValue.split(":")[0];return this.hours.filter((t=>this.availableMinutes.length?t>=e:t>e))}return this.hours},availableMinutes(){if(""!==this.minValue){const e=this.minValue.split(":"),t=e[0],n=e[1];return this.currentHour===t?this.minutes.filter((e=>e>=n)):this.minutes}return this.minutes},currentTime(){return`${this.currentHour}:${this.currentMinutes}`},hours(){let e=Array.from({length:24},((e,t)=>t));return e=e.map((e=>e.toString().padStart(2,"0"))),e},isHour:()=>e=>e.target.id.includes("hour"),isMinute:()=>e=>e.target.id.includes("minute"),isMobileDevice:()=>function(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=t.userAgent,r=n.split("[FBAN");void 0!==r[1]&&(n=r[0]),void 0!==(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(e){return function(t){return t.test(e)}}(n),o={apple:{phone:i(is)&&!i(hs),ipod:i(ss),tablet:!i(is)&&(i(as)||ws(t))&&!i(hs),universal:i(ls),device:(i(is)||i(ss)||i(as)||i(ls)||ws(t))&&!i(hs)},amazon:{phone:i(us),tablet:!i(us)&&i(ps),device:i(us)||i(ps)},android:{phone:!i(hs)&&i(us)||!i(hs)&&i(cs),tablet:!i(hs)&&!i(us)&&!i(cs)&&(i(ps)||i(ds)),device:!i(hs)&&(i(us)||i(ps)||i(cs)||i(ds))||i(/\bokhttp\b/i)},windows:{phone:i(hs),tablet:i(fs),device:i(hs)||i(fs)},other:{blackberry:i(ms),blackberry10:i(gs),opera:i(ys),firefox:i(bs),chrome:i(vs),device:i(ms)||i(gs)||i(ys)||i(bs)||i(vs)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator).any,inputAttributes(){return this.isMobileDevice?{disabled:this.disabled,autocomplete:"off",type:"time"}:{disabled:this.disabled,autocomplete:"off"}},minutes(){let e=Array.from({length:60},((e,t)=>t));return e=e.filter((e=>!(e%this.minuteSteps))),e=e.map((e=>e.toString().padStart(2,"0"))),e}},watch:{isInputFocused(){const e=this.$refs[`timeInput:${this.id}`].$el;this.isInputFocused?e.addEventListener("keydown",this.handleShiftDown):e.removeEventListener("keydown",this.handleShiftDown)},showFlyout(){this.showFlyout?document.body.addEventListener("keydown",this.handleKeyDown):document.body.removeEventListener("keydown",this.handleKeyDown)},value(){this.updateTime(this.value)}},methods:{closeFlyout(){this.showFlyout&&this.toggleFlyout()},focusHour(){const e=`hour:${this.currentHour}`;document.getElementById(e).focus()},handleBlur(){this.isInputFocused&&this.toggleInputFocus()},handleCurrentMinutesUnavailable(e,t){return""!==this.minValue&&(e!==this.minValue.split(":")[0]||this.availableMinutes.includes(t)||(t=this.availableMinutes[0])),t},handleEnter(e){e.target?(this.isHour(e)&&this.handleInput(this.currentMinutes,"minute"),this.isMinute(e)&&this.handleInput(this.currentHour,"hour")):this.handleInput(e),this.showFlyout&&this.toggleFlyout()},handleFocus(){this.showFlyout||this.toggleFlyout(),this.isInputFocused||this.toggleInputFocus()},handleInput(e,t=""){""===t&&this.updateTime(e),"hour"===t&&this.setHour(e),"minute"===t&&this.setMinutes(e),this.$emit("input",this.currentTime)},handleKeyDown(e){"Escape"===e.key&&this.toggleFlyout()," "===e.key&&(e.preventDefault(),this.handleEnter())},handleReset(){this.handleInput(xs)},handleShiftDown(e){!e.shiftKey||"Down"!==e.key&&"ArrowDown"!==e.key||this.focusHour()},setHour(e){this.currentHour=e},setMinutes(e){this.currentMinutes=e},toggleFlyout(){this.showFlyout=!this.showFlyout},toggleInputFocus(){this.isInputFocused=!this.isInputFocused},updateTime(e){const t=e.split(":"),n=t[0],r=this.handleCurrentMinutesUnavailable(n,t[1]);this.setHour(n),this.setMinutes(r)}}},ks=Ss;var Cs=(0,l.Z)(ks,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeFlyout,expression:"closeFlyout"}],staticClass:"c-timepicker inline-block",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeFlyout.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t=>e.handleEnter(t)).apply(null,arguments)}]}},[""!==e.label?t("dp-label",{attrs:{for:"timeInput",text:e.label}}):e._e(),e._v(" "),e.isMobileDevice?t("dp-input",{staticClass:"width-100",attrs:{id:`timeInput:${e.id}`,type:"time",pattern:"([01]?[0-9]|2[0-3]):[0-5][0-9]",value:e.currentTime,autocomplete:"off"},on:{input:t=>e.handleInput(t)}}):t("dp-resettable-input",{ref:`timeInput:${e.id}`,staticClass:"width-100",attrs:{id:`timeInput:${e.id}`,"button-variant":"small","default-value":"00:00","input-attributes":{disabled:e.disabled,autocomplete:"off"},pattern:"([01]?[0-9]|2[0-3]):[0-5][0-9]",value:e.currentTime},on:{reset:e.handleReset,enter:t=>e.handleEnter(t),focus:e.handleFocus,blur:e.handleBlur,input:t=>e.handleInput(t)}}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showFlyout,expression:"showFlyout"}],ref:"flyout",staticClass:"flex items-start justify-evenly c-timepicker__flyout font-size-small",attrs:{tabindex:"0"}},[t("ul",{staticClass:"u-m-0_25 u-mr-0 u-pr-0_25 overflow-y-scroll height-130"},e._l(e.availableHours,(function(n){return t("li",{key:`${e.id}:hour:${n}`,staticClass:"c-timepicker__flyout-item",class:{"is-selected":e.currentHour===n}},[t("button",{staticClass:"btn--blank u-ph-0_125 u-pv-0_125",attrs:{tabindex:"0",value:n,id:`${e.id}:hour:${n}`},on:{click:function(t){return t.preventDefault(),e.handleInput(n,"hour")}}},[e._v("\n "+e._s(n)+"\n ")])])})),0),e._v(" "),t("ul",{staticClass:"u-m-0_25 height-130",class:e.minutes.length>5?"overflow-y-scroll":""},e._l(e.availableMinutes,(function(n){return t("li",{key:`${e.id}:minute:${n}`,staticClass:"c-timepicker__flyout-item",class:{"is-selected":e.currentMinutes===n}},[t("button",{staticClass:"btn--blank u-ph-0_125 u-pv-0_125",attrs:{tabindex:"0",value:n,id:`${e.id}:minute:${n}`},on:{click:function(t){return t.preventDefault(),e.handleInput(n,"minute")}}},[e._v("\n "+e._s(n)+"\n ")])])})),0)])],1)}),[],!1,null,null,null);const _s=Cs.exports;Xo().extend(Go());const As={name:"DpDatetimePicker",components:{DpDatepicker:Wo,DpLabel:async()=>await Promise.resolve().then(s.bind(s,4570)),DpTimePicker:_s},props:{disabled:{type:Boolean,required:!1,default:!1},hiddenInput:{type:Boolean,required:!1,default:!1},hint:{type:String,required:!1,default:""},id:{type:String,required:!0},label:{type:String,required:!1,default:""},maxDate:{type:String,required:!1,default:""},minDate:{type:String,required:!1,default:""},name:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!0}},data:()=>({date:"",time:"00:00"}),computed:{currentDatetime(){const e=Xo()(`${this.date} ${this.time}`,"DD.MM.YYYY HH:mm");return e.isValid()?e.format():""},isCurrentDateSelected(){return""!==this.minDate&&this.date===this.minDate},minTime(){return this.isCurrentDateSelected?(new Date).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"}):""}},watch:{value:function(e){this.setDatetime(e)}},methods:{setDatetime(e){const t=Xo()(e);t.isValid()&&(this.date=t.format("DD.MM.YYYY"),this.time=t.format("HH:mm"))}},mounted(){this.setDatetime(this.value)}},Es=(0,l.Z)(As,(function(){var e=this,t=e._self._c;return t("div",[""!==e.label?t("dp-label",{attrs:{for:`datePicker:${e.id}`,hint:e.hint,required:e.required,text:e.label}}):e._e(),e._v(" "),t("div",{staticClass:"o-form__control-wrapper o-form__group"},[t("dp-datepicker",{staticClass:"o-form__group-item shrink",attrs:{"calendars-after":2,disabled:e.disabled,id:`datePicker:${e.id}`,"max-date":e.maxDate,"min-date":e.minDate,required:e.required},on:{input:function(t){return e.$emit("input",e.currentDatetime)}},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}}),e._v(" "),t("dp-time-picker",{staticClass:"o-form__group-item",attrs:{disabled:e.disabled,id:`timePicker:${e.id}`,"min-value":e.minTime},on:{input:function(t){return e.$emit("input",e.currentDatetime)}},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}}),e._v(" "),e.hiddenInput&&e.name?t("input",{attrs:{type:"hidden",disabled:e.disabled,name:e.name},domProps:{value:e.currentDatetime}}):e._e()],1)],1)}),[],!1,null,null,null).exports,Os={name:"DpDetails",directives:{cleanhtml:ki.J},props:{summary:{type:String,required:!1,default:""}},data:()=>({isOpen:!1})},Ts=(0,l.Z)(Os,(function(){var e=this,t=e._self._c;return t("details",{staticClass:"o-details space-stack-xs",attrs:{role:"group"}},[t("summary",{staticClass:"o-details__trigger o-link--default cursor-pointer inline-block",attrs:{"aria-expanded":e.isOpen,role:"button"},on:{click:function(t){e.isOpen=!e.isOpen}}},[t("i",{staticClass:"fa width-s text--center",class:{"fa-caret-down":e.isOpen,"fa-caret-right":!e.isOpen},attrs:{"aria-hidden":"true"}}),e._v(" "),t("strong",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.summary,expression:"summary"}]})]),e._v(" "),t("div",[e._t("default")],2)])}),[],!1,null,null,null).exports,Ds={name:"DpFormRow",data:()=>({elementCount:0,isFullRow:!0}),computed:{elementsWidths(){return this.$children.map((e=>e.$props.width||"u-1-of-1"))||[]}},methods:{determineRowWidth(){if(this.elementsWidths.length>0){const e=this.elementsWidths.map((e=>parseInt(e.match(/\d+/)))).reduce(((e,t)=>e+parseInt(t))),t=parseInt(this.elementsWidths[0].match(/\d+$/)[0]);this.isFullRow=t===e}},setPadding(){this.$children.forEach((e=>{const t=this.$children.indexOf(e);(t<this.elementCount-1||t===this.elementCount-1&&!1===this.isFullRow)&&e.$el.classList.add("u-pr")}))}},mounted(){this.elementCount=this.$children.length,this.determineRowWidth(),this.setPadding()}},Ms=(0,l.Z)(Ds,(function(){return(0,this._self._c)("div",{staticClass:"u-mb-0_75"},[this._t("default")],2)}),[],!1,null,null,null).exports,Ns={name:"DpTextWrapper",functional:!0,props:{text:{type:String,default:""},data:{type:Object,default:()=>({})}},render(e,t){const n={template:`<div class='text-wrapper width-fit-content' data-cy='textWrapper'>${t.props.text}</div>`,data:()=>t.props.data};return t.props.text?e(n):e(Mi,{props:{isLoading:!0}})}},Is=Ns,Ps=(0,l.Z)(Is,void 0,void 0,!1,null,null,null).exports,$s={name:"DpHeightLimit",components:{DpTextWrapper:Ps},props:{shortText:{type:String,required:!0},fullText:{type:String,required:!0},noEvent:{type:Boolean,required:!1,default:!1},element:{type:String,required:!0},isShortened:{type:Boolean,required:!1,default:!1}},data:()=>({isExpanded:!1}),computed:{currentText(){return this.isExpanded?this.fullText:this.shortText}},methods:{toggle(){this.noEvent?this.isExpanded=!this.isExpanded:this.$emit("heightLimit:toggle",(()=>{this.isExpanded=!this.isExpanded}))}}},Rs=(0,l.Z)($s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"break-words overflow-x-auto"},[t("dp-text-wrapper",{attrs:{text:""!==e.currentText?e.currentText:" "}}),e._v(" "),e.isShortened?t("button",{staticClass:"btn--blank o-link--default",attrs:{type:"button","aria-label":e.Translator.trans("aria.toggle")},on:{click:function(t){return t.stopPropagation(),e.toggle.apply(null,arguments)}}},[e._v("\n "+e._s(e.Translator.trans(e.isExpanded?"show.less":"show.more"))+"\n ")]):e._e()],1)}),[],!1,null,null,null).exports,Bs=require("lscache");var qs=s.n(Bs);const Fs={name:"DpInlineNotification",components:{DpIcon:Yr},props:{dismissible:{type:Boolean,required:!1,default:!1},dismissibleKey:{type:String,required:!1,default:null},message:{type:String,required:!1,default:null},type:{type:String,required:!1,default:"error"}},data:()=>({iconClasses:{confirm:"fa-check",error:"fa-exclamation-circle",info:"fa-info-circle",warning:"fa-exclamation-triangle"},isDismissed:!0}),methods:{dismiss(){this.isDismissed=!0,this.dismissibleKey&&qs().set(this.dismissibleKey,Date.now())},show(){this.isDismissed=!1,this.dismissibleKey&&qs().remove(this.dismissibleKey)}},mounted(){this.isDismissed=!(!this.dismissible||!this.dismissibleKey||!qs().get(this.dismissibleKey))}},Ls=(0,l.Z)(Fs,(function(){var e=this,t=e._self._c;return!1===e.isDismissed?t("div",{class:`flash flash-${e.type} flex`},[t("i",{staticClass:"fa u-pr-0_25 line-height--1_4",class:e.iconClasses[e.type],attrs:{"aria-hidden":"true"}}),e._v(" "),t("div",{staticClass:"space-stack-xs"},[e.message?t("div",{domProps:{innerHTML:e._s(e.message)}}):e._e(),e._v(" "),e._t("default"),e._v(" "),e.dismissible?t("button",{staticClass:"btn--blank o-link--default weight--bold",domProps:{textContent:e._s(e.Translator.trans("hint.dismiss"))},on:{click:e.dismiss}}):e._e()],2)]):t("div",{staticClass:"flow-root"},[t("button",{staticClass:"btn--blank color--grey float-right",attrs:{"aria-label":e.Translator.trans("hint.show")},on:{click:e.show}},[t("dp-icon",{attrs:{icon:"info","aria-hidden":"true"}})],1)])}),[],!1,null,null,null).exports,Vs={name:"DpModal",components:{DpIcon:Yr},mixins:[V.gH],props:{ariaLabel:{required:!1,type:String,default:""},contentBodyClasses:{required:!1,type:String,default:""},contentClasses:{required:!1,type:String,default:""},contentHeaderClasses:{required:!1,type:String,default:""},modalId:{required:!1,type:String,default:""}},data:()=>({isOpenModal:!1,lastFocusedElement:"",focusableElements:[]}),computed:{hasHeader(){return void 0!==this.$slots.header}},methods:{getFocusableElements(){const e=this.$el.querySelectorAll('a, button:not([disabled]), input, textarea, select, details, [tabindex]:not([tabindex="-1"])');e.length<=0?this.focusableElements=[]:this.focusableElements=[...e].filter((e=>this.isElementVisible(e)))},isElementVisible(e){const t=null!==e.offsetParent,n=window.getComputedStyle(e),r="none"!==n.display&&"0"!==n.opacity;return t&&r},toggleByEvent(e){void 0!==e&&this.modalId===e&&this.toggle()},toggle(){this.isOpenModal=!1===this.isOpenModal,this.$emit("modal:toggled",this.isOpenModal),!0===this.isOpenModal?(this.lastFocusedElement=document.activeElement,this.$nextTick((()=>{this.getFocusableElements(),this.focusableElements.length>0&&this.focusableElements[0].focus({preventScroll:!0})}))):this.lastFocusedElement.focus()},preventScroll(e){const t=document.querySelector("html"),n=document.querySelector("body");e?(t.style.overflow="hidden",n.style.overflowY="scroll"):(t.style.overflow=null,n.style.overflowY=null)},checkKeyEvent(e){if("Escape"===e.key)this.toggle();else if("Tab"===e.key){e.preventDefault();const t=this.focusableElements.findIndex((t=>t===e.target)),n=this.focusableElements.length-1;if(this.focusableElements.length<2);else if(!1===e.shiftKey&&e.target===this.focusableElements[n])this.focusableElements[0].focus();else if(!0===e.shiftKey&&e.target===this.focusableElements[0])this.focusableElements[n].focus();else{const n=e.shiftKey?t-1:t+1;this.focusableElements[n].focus()}}}},mounted(){this.$root.$on("modal:toggle",(e=>this.toggleByEvent(e)))},updated(){this.$nextTick((()=>this.getFocusableElements()))}},js=Vs,zs=(0,l.Z)(js,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("o-modal"),on:{keydown:e.checkKeyEvent}},[t("transition",{attrs:{name:"content",appear:""},on:{enter:e.preventScroll}},[e.isOpenModal?t("aside",{class:e.prefixClass("o-modal__content "+e.contentClasses),attrs:{"aria-label":e.ariaLabel,role:"dialog"}},[t("button",{class:e.prefixClass("btn--blank o-link--default absolute u-right-0"),attrs:{"aria-label":e.Translator.trans("close.window"),title:e.Translator.trans("close.window")},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggle()}}},[t("dp-icon",{attrs:{icon:"close",size:"large"}})],1),e._v(" "),t("div",{class:e.prefixClass("o-modal__body "+e.contentBodyClasses)},[e.hasHeader?t("h2",{class:e.prefixClass("font-size-h1 border--bottom u-pb-0_25 "+e.contentHeaderClasses)},[e._t("header")],2):e._e(),e._v(" "),e._t("default")],2)]):e._e()]),e._v(" "),t("transition",{attrs:{name:"backdrop",appear:""},on:{"after-leave":function(t){return e.preventScroll(!1)}}},[e.isOpenModal?t("div",{class:e.prefixClass("o-modal__backdrop"),on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggle()}}}):e._e()])],1)}),[],!1,null,null,null).exports,Hs=require("vue-multiselect"),Us={name:"DpMultiselect",components:{VueMultiselect:s.n(Hs)()},props:{closeOnSelect:{type:Boolean,required:!1,default:!0},customLabel:{type:Function,required:!1,default:void 0},dataCy:{type:String,required:!1,default:"multiselect"},deselectLabel:{type:String,required:!1,default:""},deselectGroupLabel:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:""},groupSelect:{type:Boolean,required:!1,default:!1},groupValues:{type:String,required:!1,default:""},id:{type:String,required:!1,default:""},label:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!1},maxHeight:{type:Number,required:!1,default:300},multiple:{required:!1,type:Boolean,default:!1},name:{type:String,required:!1,default:""},options:{type:Array,required:!0},placeholder:{type:String,required:!1,default:()=>Translator.trans("choose")},required:{required:!1,type:Boolean,default:!1},searchable:{required:!1,type:Boolean,default:!0},selectionControls:{required:!1,type:Boolean,default:!1},selectGroupLabel:{type:String,required:!1,default:""},selectLabel:{type:String,required:!1,default:""},selectedLabel:{type:String,required:!1,default:""},tagPlaceholder:{type:String,required:!1,default:()=>Translator.trans("tag.create")},trackBy:{type:[String,null],required:!1,default:null},value:{type:[String,Number,Array,Object],required:!1,default:""}}};var Ws=(0,l.Z)(Us,(function(){var e=this,t=e._self._c;return t("div",[t("vue-multiselect",e._b({directives:[{name:"dp-validate-multiselect",rawName:"v-dp-validate-multiselect",value:e.required,expression:"required"}],attrs:{"data-cy":e.dataCy},on:{close:t=>e.$emit("close",t),input:t=>e.$emit("input",t),open:t=>e.$emit("open",t),remove:t=>e.$emit("remove",t),"search-change":t=>e.$emit("search-change",t),select:t=>e.$emit("select",t),tag:t=>e.$emit("tag",t)},scopedSlots:e._u([{key:"noResult",fn:function(){return[e._v("\n "+e._s(e.Translator.trans("autocomplete.noResults"))+"\n ")]},proxy:!0},{key:"noOptions",fn:function(){return[e._v("\n "+e._s(e.Translator.trans("explanation.noentries"))+"\n ")]},proxy:!0},{key:"option",fn:function(t){return[e._t("option",null,{props:t})]}},{key:"tag",fn:function(t){return[e._t("tag",null,{props:t})]}},e.selectionControls?{key:"beforeList",fn:function(n){return[t("div",{staticClass:"border-bottom"},[t("button",{staticClass:"btn--blank weight--bold u-ph-0_5 u-pv-0_25",attrs:{disabled:e.value.length===e.options.length===0,type:"button"},domProps:{textContent:e._s(e.Translator.trans("select.all"))},on:{click:function(t){return e.$emit("select-all")}}}),e._v(" "),t("button",{staticClass:"btn--blank weight--bold u-ph-0_5 u-pv-0_25",attrs:{disabled:0===e.value.length,type:"button"},domProps:{textContent:e._s(e.Translator.trans("unselect.all"))},on:{click:function(t){return e.$emit("unselect-all")}}})])]}}:null],null,!0)},"vue-multiselect",{closeOnSelect:e.closeOnSelect,customLabel:e.customLabel,deselectGroupLabel:e.deselectGroupLabel,deselectLabel:e.deselectLabel,disabled:e.disabled,groupLabel:e.groupLabel,groupSelect:e.groupSelect,groupValues:e.groupValues,id:e.id,label:e.label,loading:e.loading,maxHeight:e.maxHeight,multiple:e.multiple,name:e.name,options:e.options,placeholder:e.placeholder,searchable:e.searchable,selectGroupLabel:e.selectGroupLabel,selectLabel:e.selectLabel,selectedLabel:e.selectedLabel,tagPlaceholder:e.tagPlaceholder,trackBy:e.trackBy,value:e.value},!1))],1)}),[],!1,null,null,null);const Zs=Ws.exports,Ks={name:"DpMultistepNav",mixins:[V.gH],props:{activeStep:{type:Number,required:!1,default:0},steps:{type:Array,required:!0}},methods:{changeStep(e){this.$emit("change-step",e)}}},Js=(0,l.Z)(Ks,(function(){var e=this,t=e._self._c;return t("nav",{class:e.prefixClass("c-multistep")},e._l(e.steps,(function(n,r){return t("button",{key:`step_${r}`,staticClass:"btn--blank",class:[e.prefixClass("c-multistep__step"),r===e.activeStep?e.prefixClass("is-active"):"",r>e.activeStep?e.prefixClass("is-disabled"):""],attrs:{disabled:r>e.activeStep,"aria-label":n.title?e.Translator.trans(n.title):e.Translator.trans(n.label)},on:{click:function(t){return e.changeStep(r)}}},[t("span",[n.icon?t("i",{class:[e.prefixClass(n.icon),e.prefixClass("fa u-mr-0_25")],attrs:{"aria-hidden":"true"}}):e._e(),e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])])})),0)}),[],!1,null,null,null).exports,Gs={name:"DpPager",components:{DpSlidingPagination:Xi,DpMultiselect:Zs},props:{currentPage:{required:!1,type:Number,default:1},totalItems:{required:!1,type:Number,default:1},totalPages:{required:!1,type:Number,default:1},perPage:{required:!1,type:Number,default:1},limits:{required:!1,type:Array,default:()=>[]}},data(){return{itemsPerPage:this.perPage<=this.totalItems?this.perPage:this.totalItems}},computed:{filteredLimits(){const e=this.limits.filter((e=>e<=this.totalItems));return e.length<this.limits.length&&this.totalItems>e[e.length-1]&&e.push(this.totalItems),!1===e.includes(this.itemsPerPage)&&e.push(this.itemsPerPage),e.sort(((e,t)=>e-t)),e}},methods:{handlePageChange(e){this.$emit("page-change",e)},handleSizeChange(e){this.$emit("size-change",parseInt(e))}}},Ys=Gs,Xs=(0,l.Z)(Ys,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-pager__dropdown"},[t("label",{staticClass:"c-pager__dropdown-label u-m-0 u-p-0 weight--normal inline-block",attrs:{"aria-label":e.Translator.trans("pager.amount.multiple.label",{results:e.totalItems,items:e.Translator.trans("pager.amount.multiple.items")})}},[e.totalItems>Math.min(...e.limits)?t("dp-sliding-pagination",{staticClass:"inline-block",attrs:{current:e.currentPage,nonSlidingSize:3,slidingEndingSize:1,slidingWindowSize:1,total:e.totalPages||1},on:{"page-change":e.handlePageChange}}):e._e(),e._v(" "),e.totalItems>Math.min(...e.limits)?t("div",{staticClass:"inline-block"},[t("dp-multiselect",{staticClass:"inline-block",attrs:{options:e.filteredLimits,searchable:!1,"selected-label":""},on:{select:e.handleSizeChange},model:{value:e.itemsPerPage,callback:function(t){e.itemsPerPage=t},expression:"itemsPerPage"}})],1):t("span",[e._v(e._s(e.totalItems))]),e._v(" "),t("span",{attrs:{"aria-hidden":"true"}},[e._v("\n "+e._s(e.Translator.trans("pager.amount.multiple.of"))+"\n "),t("span",{attrs:{"data-cy":"totalItems"}},[e._v(e._s(e.totalItems))]),e._v("\n "+e._s(e.Translator.trans("pager.amount.multiple.items"))+"\n ")])],1)])}),[],!1,null,null,null).exports,Qs={name:"DpProgressBar",props:{indeterminate:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:""},percentage:{type:Number,required:!1,default:0}},computed:{style(){return"width: "+this.percentage+"%;"}}},ea=(0,l.Z)(Qs,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-progress-bar"},[e.indeterminate?[t("div",{staticClass:"u-mb-0_25 weight--bold"},[e._v("\n "+e._s(e.label)+"\n ")]),e._v(" "),t("div",{staticClass:"c-progress-bar__line is-animated"})]:[t("div",{staticClass:"u-mb-0_25 weight--bold"},[e._v("\n "+e._s(e.label)+"\n ")]),e._v(" "),t("div",{staticClass:"bg-color--grey-light-2"},[t("div",{staticClass:"u-mb-0_25 c-progress-bar__line",style:e.style})]),e._v(" "),t("span",[e._v("\n "+e._s(e.percentage)+"%\n ")])]],2)}),[],!1,null,null,null).exports,ta={name:"DpRadio",components:{DpLabel:ui.default},mixins:[V.gH],model:{prop:"checked",event:"change"},props:{bold:{type:Boolean,required:!1,default:!0},checked:{type:Boolean,required:!1,default:!1},dataCy:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},hint:{type:String,required:!1,default:""},id:{type:String,required:!0},label:{type:Object,default:()=>({}),validator:e=>Object.keys(e).every((e=>["bold","hint","text"].includes(e)))},name:{type:String,required:!1,default:""},readonly:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:"1"}}},na=ta,ra=(0,l.Z)(na,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("o-form__element--radio")},[t("input",{class:e.prefixClass("o-form__control-input"),attrs:{id:e.id,name:""!==e.name&&e.name,type:"radio",required:e.required,disabled:e.disabled,readonly:e.readonly,autocomplete:"off","data-cy":""!==e.dataCy&&e.dataCy},domProps:{checked:e.checked,value:e.value},on:{change:function(t){return e.$emit("change",t.target.checked)}}}),e.label.text?t("dp-label",e._b({class:e.prefixClass("o-form__label")},"dp-label",{bold:!1,text:"",for:e.id,required:e.required,...e.label},!1)):e._e()],1)}),[],!1,null,null,null).exports,ia={name:"DpSearchField",components:{DpButton:ni,DpResettableInput:rs},props:{initSearchTerm:{type:String,required:!1,default:""},inputWidth:{type:String,default:""},placeholder:{type:String,required:!1,default:"search"}},data(){return{searchTerm:this.initSearchTerm,searchTermApplied:""}},computed:{cssClasses(){return""!==this.inputWidth?`inline-block u-mr-0_5 ${this.inputWidth}`:"inline-block u-mr-0_5"}},methods:{handleReset(){this.searchTerm="",this.searchTermApplied!==this.searchTerm&&(this.$emit("reset",""),this.searchTermApplied="")},handleSearch(){this.searchTermApplied!==this.searchTerm&&(this.searchTermApplied=this.searchTerm,this.$emit("search",this.searchTerm))},reset(){this.searchTermApplied="",this.searchTerm=""}},mounted(){this.searchTermApplied=this.searchTerm}},oa=(0,l.Z)(ia,(function(){var e=this,t=e._self._c;return t("span",{class:{"inline-block width-100p":""!==e.inputWidth}},[t("dp-resettable-input",{class:e.cssClasses,attrs:{id:"searchField","data-cy":"searchField","input-attributes":{placeholder:e.Translator.trans("search"),type:"search"}},on:{reset:e.handleReset,enter:e.handleSearch},model:{value:e.searchTerm,callback:function(t){e.searchTerm=t},expression:"searchTerm"}}),t("dp-button",{staticClass:"align-top",attrs:{"data-cy":"handleSearch",text:e.Translator.trans("searching")},on:{click:e.handleSearch}})],1)}),[],!1,null,null,null).exports,sa={name:"DpSelect",components:{DpLabel:ui.default},mixins:[V.gH],model:{prop:"selected",event:"select"},props:{classes:{type:[Array,String],required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1,default:()=>""},label:{type:Object,required:!1,default:()=>({}),validator:e=>Object.keys(e).every((e=>["bold","hint","text","tooltip"].includes(e)))},name:{type:String,required:!1,default:""},options:{required:!0,type:Array},placeholder:{type:String,required:!1,default:"warning.select.entry"},required:{type:Boolean,required:!1,default:!1},showPlaceholder:{type:Boolean,required:!1,default:!0},selected:{type:String,required:!1,default:""}},computed:{nameOrId(){return""===this.id?this.name:this.id}},methods:{update(e){this.$emit("select",e.target.value)}}},aa=sa,la=(0,l.Z)(aa,(function(){var e=this,t=e._self._c;return t("div",[e.label.text?t("dp-label",e._b({},"dp-label",{...e.label,for:e.nameOrId,required:e.required},!1)):e._e(),t("select",{staticClass:"o-form__control-select",class:[e.disabled?" bg-color--grey-light-2":"",e.classes],attrs:{id:e.nameOrId,required:e.required,name:""!==e.name&&e.name,disabled:e.disabled},on:{change:e.update}},[e.showPlaceholder?t("option",{attrs:{"data-id":"placeholder",disabled:"",value:""},domProps:{selected:""===e.selected}},[e._v("\n "+e._s(e.Translator.trans(e.placeholder))+"\n ")]):e._e(),e._v(" "),e._l(e.options,(function(n,r){return t("option",{key:r,domProps:{selected:n.value===e.selected,value:n.value}},[e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])}))],2)],1)}),[],!1,null,null,null).exports,ca={name:"DpSkeletonBox",props:{height:{type:String,default:"1em"},width:{type:String,default:"100%"}}},da=(0,l.Z)(ca,(function(){var e=this;return(0,e._self._c)("span",{staticClass:"c-skeleton-box",style:{height:e.height,width:e.width}})}),[],!1,null,null,null).exports,ua={name:"DpSlidebar",components:{DpIcon:Yr},data:()=>({sideNav:{}}),methods:{hideSlideBar(){(0,r.Q$)(this.sideNav,"hideSideNav")&&(this.sideNav.hideSideNav(),this.$emit("close"))},showSlideBar(){(0,r.Q$)(this.sideNav,"showSideNav")&&this.sideNav.showSideNav()}},mounted(){this.sideNav=new P,this.$root.$on("hide-slidebar",(()=>{this.hideSlideBar()})),this.$root.$on("show-slidebar",(()=>{this.showSlideBar()}))}},pa=(0,l.Z)(ua,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-slidebar u-pr-0",attrs:{"data-slidebar":"right"}},[t("div",{staticClass:"c-slidebar__container",attrs:{"data-slidebar-container":"","data-cy":"sidebarModal"}},[t("div",{staticClass:"u-ml-1_5"},[t("button",{staticClass:"btn--blank o-link--default u-mt-0_5 u-n-ml u-mb",attrs:{type:"button","data-slidebar-hide":""},on:{click:function(t){return e.$emit("close")}}},[t("dp-icon",{attrs:{icon:"close",size:"large"}})],1),e._v(" "),e._t("default")],2)])])}),[],!1,null,null,null).exports,ha={name:"DpSplitButton",directives:{ClickOutside:vi()},data:()=>({isOpen:!1,hasDropdownContent:!1}),methods:{close(){this.isOpen=!1},toggleDropdown(){this.isOpen=!1===this.isOpen}},mounted(){this.popupItem=this.$el,this.hasDropdownContent=void 0!==this.$slots.dropdown}},fa=(0,l.Z)(ha,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.close,expression:"close"}],staticClass:"c-splitbutton"},[e._t("default",(function(){return[t("button",{staticClass:"btn btn--primary",attrs:{type:"button"}},[e._v("\n Primary Action Button\n ")])]})),e.hasDropdownContent?t("button",{staticClass:"c-splitbutton__trigger",class:{"is-open":e.isOpen},attrs:{type:"button","aria-haspopup":"true","aria-expanded":e.isOpen},on:{click:e.toggleDropdown,keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;t.preventDefault(),e.isOpen&&(e.isOpen=!e.isOpen)}}},[t("i",{staticClass:"fa fa-caret-down c-splitbutton__trigger-icon"}),e._v(" "),t("span",{staticClass:"hide-visually"},[e._v(e._s(e.Translator.trans(e.isOpen?"dropdown.close":"dropdown.open")))])]):e._e(),e._v(" "),e.hasDropdownContent?t("div",{staticClass:"c-splitbutton__dropdown",class:{"is-open":e.isOpen},attrs:{role:"menu"}},[e._t("dropdown",(function(){return[e._v("\n Dropdown Actions\n ")]}))],2):e._e()],2)}),[],!1,null,null,null).exports,ma={name:"DpTab",props:{id:{type:String,required:!0},label:{type:String,required:!0},suffix:{type:String,required:!1,default:null}},data:()=>({isActive:!1})},ga=(0,l.Z)(ma,(function(){var e=this;return(0,e._self._c)("section",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],attrs:{id:e.id,role:"tabpanel"}},[e._t("default")],2)}),[],!1,null,null,null).exports,ya={name:"DpTabs",directives:{cleanhtml:n.J7},model:{prop:"activeId",event:"change"},props:{activeId:{type:String,required:!1,default:null},tabSize:{type:String,required:!1,default:"large",validator:e=>["medium","large"].includes(e)},useUrlFragment:{type:Boolean,required:!1,default:!1}},data:()=>({tabs:[]}),computed:{tabIds(){return this.tabs.map((e=>e.id))}},methods:{handleHashChange(){const e=window.location.hash.slice(1);this.isTabId(e)&&this.setActiveTab(e)},handleTabClick(e){this.$emit("change",e),this.setActiveTab(e),this.useUrlFragment&&history.pushState(null,null,`#${e}`)},isTabId(e){return this.tabs.map((e=>e.id)).includes(e)},setActiveTab(e){this.tabs.forEach((t=>{t.isActive=t.id===e}))},setInitialTab(){const e=window.location.hash.slice(1);this.useUrlFragment&&this.isTabId(e)?this.setActiveTab(e):this.activeId?this.setActiveTab(this.activeId):this.tabs[0].isActive=!0}},created(){this.tabs=this.$children},mounted(){this.setInitialTab(),this.useUrlFragment&&window.addEventListener("hashchange",this.handleHashChange)},beforeDestroy(){this.useUrlFragment&&window.removeEventListener("hashchange",this.handleHashChange)}},va=(0,l.Z)(ya,(function(){var e=this,t=e._self._c;return t("div",[t("ul",{staticClass:"flex space-inline-m list-style-none border--bottom",attrs:{role:"tablist"}},e._l(e.tabs,(function(n,r){return t("li",{key:`tab:${r}`,class:{"is-active":n.isActive},staticStyle:{"margin-bottom":"-1px"}},[t("button",{staticClass:"btn--blank o-link--default u-pb-0_5 border--bottom",class:[n.isActive?"color-interactive border-interactive":"border--none color-text-muted","large"===e.tabSize?"font-size-larger":"font-size-large"],attrs:{role:"tab","aria-selected":n.isActive,"aria-controls":n.id,"data-cy":n.id},on:{click:function(t){return t.preventDefault(),e.handleTabClick(n.id)}}},[e._v("\n "+e._s(n.label)+"\n "),n.suffix?t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:n.suffix,expression:"tab.suffix"}]}):e._e()])])})),0),e._v(" "),t("div",[e._t("default")],2)])}),[],!1,null,null,null).exports,ba={name:"DpTextArea",components:{DpLabel:async()=>await Promise.resolve().then(s.bind(s,4570))},props:{attributes:t("textarea"),dataDpValidateIf:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},growToParent:{type:Boolean,required:!1,default:!1},hint:{type:String,required:!1,default:""},id:{type:String,required:!1,default:""},label:{type:String,required:!1,default:""},maxlength:e,name:{type:String,required:!1,default:""},reducedHeight:{type:Boolean,required:!1,default:!1},required:{type:Boolean,required:!1,default:!1},value:{type:String,required:!1,default:""}},data(){return{currentValue:this.value}},computed:{allowedAttributes(){const e={};return this.attributes.forEach((t=>{t=t.split("="),e[t[0]]=t[1]})),e},labelProps(){return{for:this.id,hint:this.maxlength?[this.hint,(0,r.T8)(this.currentValue.length,this.maxlength)]:this.hint,required:this.required,text:this.label,tooltip:this.tooltip}}},watch:{value(){this.currentValue=this.value}}},wa=ba,xa=(0,l.Z)(wa,(function(){var e=this,t=e._self._c;return t("div",{class:{"flex flex-col":e.growToParent}},[""!==e.label?t("dp-label",e._b({},"dp-label",e.labelProps,!1)):e._e(),t("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.currentValue,expression:"currentValue"}],staticClass:"o-form__control-textarea",class:{grow:e.growToParent,"height-60":e.reducedHeight},attrs:{name:e.name,id:e.id,"data-dp-validate-if":e.dataDpValidateIf,disabled:e.disabled,maxlength:e.maxlength,required:e.required},domProps:{value:e.currentValue},on:{input:[function(t){t.target.composing||(e.currentValue=t.target.value)},function(t){return e.$emit("input",e.currentValue)}]}},"textarea",e.allowedAttributes,!1))],1)}),[],!1,null,null,null).exports,Sa={name:"DpToggle",props:{value:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1}},computed:{backgroundStyles(){return{backgroundColor:this.value?"#3490dc":"#dae1e7"}},indicatorStyles(){return{transform:this.value?"translateX(1rem)":"translateX(0)"}}},methods:{toggle(){!1===this.disabled&&this.$emit("input",!this.value)}}},ka=(0,l.Z)(Sa,(function(){var e=this,t=e._self._c;return t("span",{staticClass:"toggle-wrapper",attrs:{role:"checkbox","aria-checked":e.value.toString(),"aria-disabled":e.disabled,tabindex:"0"},on:{click:e.toggle,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.toggle.apply(null,arguments))}}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.disabled,expression:"disabled"}],staticClass:"toggle-disabled"}),e._v(" "),t("span",{staticClass:"toggle-background",style:e.backgroundStyles}),e._v(" "),t("span",{staticClass:"toggle-indicator",style:e.indicatorStyles})])}),[],!1,null,null,null).exports,Ca={name:"DpToggleForm",components:{DpAccordion:u,DpButtonRow:si},mixins:[V.cR],props:{formId:{type:String,default:""},title:{type:String,default:""}},methods:{abort(){""!==this.formId?document.querySelector(`form#${this.formId}`).reset():this.$emit("form-abort"),this.$refs.accordion.toggle()},save(){""!==this.formId?document.querySelector(`form#${this.formId}`).submit():this.$emit("form-save")}}},_a=(0,l.Z)(Ca,(function(){var e=this,t=e._self._c;return t("dp-accordion",{ref:"accordion",attrs:{title:e.title}},[e._t("default"),e._v(" "),e._t("buttons",(function(){return[t("dp-button-row",{attrs:{primary:"",secondary:""},on:{"primary-action":function(t){return e.dpValidateAction(e.formId,e.save,!1)},"secondary-action":e.abort}})]}))],2)}),[],!1,null,null,null).exports,Aa={name:"DpTooltipIcon",directives:{tooltip:n.u},props:{icon:{required:!0,type:String},text:{required:!0,type:String},large:{required:!1,type:Boolean,default:!1}}},Ea=(0,l.Z)(Aa,(function(){var e=this;return(0,e._self._c)("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.text,expression:"text"}],staticClass:"fa",class:[e.icon,e.large?"fa-lg":""]})}),[],!1,null,null,null).exports;var Oa=Object.freeze({}),Ta=Array.isArray;function Da(e){return null==e}function Ma(e){return null!=e}function Na(e){return!0===e}function Ia(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function Pa(e){return"function"==typeof e}function $a(e){return null!==e&&"object"==typeof e}var Ra=Object.prototype.toString;function Ba(e){return"[object Object]"===Ra.call(e)}function qa(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function Fa(e){return Ma(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function La(e){return null==e?"":Array.isArray(e)||Ba(e)&&e.toString===Ra?JSON.stringify(e,null,2):String(e)}function Va(e){var t=parseFloat(e);return isNaN(t)?e:t}function ja(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}ja("slot,component",!0);var za=ja("key,ref,slot,slot-scope,is");function Ha(e,t){var n=e.length;if(n){if(t===e[n-1])return void(e.length=n-1);var r=e.indexOf(t);if(r>-1)return e.splice(r,1)}}var Ua=Object.prototype.hasOwnProperty;function Wa(e,t){return Ua.call(e,t)}function Za(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var Ka=/-(\w)/g,Ja=Za((function(e){return e.replace(Ka,(function(e,t){return t?t.toUpperCase():""}))})),Ga=Za((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),Ya=/\B([A-Z])/g,Xa=Za((function(e){return e.replace(Ya,"-$1").toLowerCase()})),Qa=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function el(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function tl(e,t){for(var n in t)e[n]=t[n];return e}function nl(e){for(var t={},n=0;n<e.length;n++)e[n]&&tl(t,e[n]);return t}function rl(e,t,n){}var il=function(e,t,n){return!1},ol=function(e){return e};function sl(e,t){if(e===t)return!0;var n=$a(e),r=$a(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return sl(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var s=Object.keys(e),a=Object.keys(t);return s.length===a.length&&s.every((function(n){return sl(e[n],t[n])}))}catch(e){return!1}}function al(e,t){for(var n=0;n<e.length;n++)if(sl(e[n],t))return n;return-1}function ll(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var cl="data-server-rendered",dl=["component","directive","filter"],ul=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],pl={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:il,isReservedAttr:il,isUnknownElement:il,getTagNamespace:rl,parsePlatformTagName:ol,mustUseProp:il,async:!0,_lifecycleHooks:ul};function hl(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function fl(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var ml=new RegExp("[^".concat(/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/.source,".$_\\d]")),gl="__proto__"in{},yl="undefined"!=typeof window,vl=yl&&window.navigator.userAgent.toLowerCase(),bl=vl&&/msie|trident/.test(vl),wl=vl&&vl.indexOf("msie 9.0")>0,xl=vl&&vl.indexOf("edge/")>0;vl&&vl.indexOf("android");var Sl=vl&&/iphone|ipad|ipod|ios/.test(vl);vl&&/chrome\/\d+/.test(vl),vl&&/phantomjs/.test(vl);var kl,Cl=vl&&vl.match(/firefox\/(\d+)/),_l={}.watch,Al=!1;if(yl)try{var El={};Object.defineProperty(El,"passive",{get:function(){Al=!0}}),window.addEventListener("test-passive",null,El)}catch(z){}var Ol=function(){return void 0===kl&&(kl=!yl&&void 0!==s.g&&s.g.process&&"server"===s.g.process.env.VUE_ENV),kl},Tl=yl&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function Dl(e){return"function"==typeof e&&/native code/.test(e.toString())}var Ml,Nl="undefined"!=typeof Symbol&&Dl(Symbol)&&"undefined"!=typeof Reflect&&Dl(Reflect.ownKeys);Ml="undefined"!=typeof Set&&Dl(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Il=null;function Pl(e){void 0===e&&(e=null),e||Il&&Il._scope.off(),Il=e,e&&e._scope.on()}var $l=function(){function e(e,t,n,r,i,o,s,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),Rl=function(e){void 0===e&&(e="");var t=new $l;return t.text=e,t.isComment=!0,t};function Bl(e){return new $l(void 0,void 0,void 0,String(e))}function ql(e){var t=new $l(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var Fl=0,Ll=[],Vl=function(){for(var e=0;e<Ll.length;e++){var t=Ll[e];t.subs=t.subs.filter((function(e){return e})),t._pending=!1}Ll.length=0},jl=function(){function e(){this._pending=!1,this.id=Fl++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){this.subs[this.subs.indexOf(e)]=null,this._pending||(this._pending=!0,Ll.push(this))},e.prototype.depend=function(t){e.target&&e.target.addDep(this)},e.prototype.notify=function(e){for(var t=this.subs.filter((function(e){return e})),n=0,r=t.length;n<r;n++)t[n].update()},e}();jl.target=null;var zl=[];function Hl(e){zl.push(e),jl.target=e}function Ul(){zl.pop(),jl.target=zl[zl.length-1]}var Wl=Array.prototype,Zl=Object.create(Wl);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=Wl[e];fl(Zl,e,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o=t.apply(this,n),s=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&s.observeArray(i),s.dep.notify(),o}))}));var Kl=Object.getOwnPropertyNames(Zl),Jl={},Gl=!0;function Yl(e){Gl=e}var Xl={notify:rl,depend:rl,addSub:rl,removeSub:rl},Ql=function(){function e(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this.value=e,this.shallow=t,this.mock=n,this.dep=n?Xl:new jl,this.vmCount=0,fl(e,"__ob__",this),Ta(e)){if(!n)if(gl)e.__proto__=Zl;else for(var r=0,i=Kl.length;r<i;r++)fl(e,s=Kl[r],Zl[s]);t||this.observeArray(e)}else{var o=Object.keys(e);for(r=0;r<o.length;r++){var s;tc(e,s=o[r],Jl,void 0,t,n)}}}return e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)ec(e[t],!1,this.mock)},e}();function ec(e,t,n){return e&&Wa(e,"__ob__")&&e.__ob__ instanceof Ql?e.__ob__:!Gl||!n&&Ol()||!Ta(e)&&!Ba(e)||!Object.isExtensible(e)||e.__v_skip||ac(e)||e instanceof $l?void 0:new Ql(e,t,n)}function tc(e,t,n,r,i,o){var s=new jl,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var l=a&&a.get,c=a&&a.set;l&&!c||n!==Jl&&2!==arguments.length||(n=e[t]);var d=!i&&ec(n,!1,o);return Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=l?l.call(e):n;return jl.target&&(s.depend(),d&&(d.dep.depend(),Ta(t)&&ic(t))),ac(t)&&!i?t.value:t},set:function(t){var r=l?l.call(e):n;if(function(e,t){return e===t?0===e&&1/e!=1/t:e==e||t==t}(r,t)){if(c)c.call(e,t);else{if(l)return;if(!i&&ac(r)&&!ac(t))return void(r.value=t);n=t}d=!i&&ec(t,!1,o),s.notify()}}}),s}}function nc(e,t,n){if(!sc(e)){var r=e.__ob__;return Ta(e)&&qa(t)?(e.length=Math.max(e.length,t),e.splice(t,1,n),r&&!r.shallow&&r.mock&&ec(n,!1,!0),n):t in e&&!(t in Object.prototype)?(e[t]=n,n):e._isVue||r&&r.vmCount?n:r?(tc(r.value,t,n,void 0,r.shallow,r.mock),r.dep.notify(),n):(e[t]=n,n)}}function rc(e,t){if(Ta(e)&&qa(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||sc(e)||Wa(e,t)&&(delete e[t],n&&n.dep.notify())}}function ic(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Ta(t)&&ic(t)}function oc(e){return function(e,t){sc(e)||ec(e,t,Ol())}(e,!0),fl(e,"__v_isShallow",!0),e}function sc(e){return!(!e||!e.__v_isReadonly)}function ac(e){return!(!e||!0!==e.__v_isRef)}function lc(e,t,n){Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var e=t[n];if(ac(e))return e.value;var r=e&&e.__ob__;return r&&r.dep.depend(),e},set:function(e){var r=t[n];ac(r)&&!ac(e)?r.value=e:t[n]=e}})}var cc,dc="watcher";"".concat(dc," callback"),"".concat(dc," getter"),"".concat(dc," cleanup");var uc=function(){function e(e){void 0===e&&(e=!1),this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=cc,!e&&cc&&(this.index=(cc.scopes||(cc.scopes=[])).push(this)-1)}return e.prototype.run=function(e){if(this.active){var t=cc;try{return cc=this,e()}finally{cc=t}}},e.prototype.on=function(){cc=this},e.prototype.off=function(){cc=this.parent},e.prototype.stop=function(e){if(this.active){var t=void 0,n=void 0;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].teardown();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},e}();var pc=Za((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function hc(e,t){function n(){var e=n.fns;if(!Ta(e))return Xc(e,null,arguments,t,"v-on handler");for(var r=e.slice(),i=0;i<r.length;i++)Xc(r[i],null,arguments,t,"v-on handler")}return n.fns=e,n}function fc(e,t,n,r,i,o){var s,a,l,c;for(s in e)a=e[s],l=t[s],c=pc(s),Da(a)||(Da(l)?(Da(a.fns)&&(a=e[s]=hc(a,o)),Na(c.once)&&(a=e[s]=i(c.name,a,c.capture)),n(c.name,a,c.capture,c.passive,c.params)):a!==l&&(l.fns=a,e[s]=l));for(s in t)Da(e[s])&&r((c=pc(s)).name,t[s],c.capture)}function mc(e,t,n){var r;e instanceof $l&&(e=e.data.hook||(e.data.hook={}));var i=e[t];function o(){n.apply(this,arguments),Ha(r.fns,o)}Da(i)?r=hc([o]):Ma(i.fns)&&Na(i.merged)?(r=i).fns.push(o):r=hc([i,o]),r.merged=!0,e[t]=r}function gc(e,t,n,r,i){if(Ma(t)){if(Wa(t,n))return e[n]=t[n],i||delete t[n],!0;if(Wa(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function yc(e){return Ia(e)?[Bl(e)]:Ta(e)?bc(e):void 0}function vc(e){return Ma(e)&&Ma(e.text)&&function(e){return!1===e}(e.isComment)}function bc(e,t){var n,r,i,o,s=[];for(n=0;n<e.length;n++)Da(r=e[n])||"boolean"==typeof r||(o=s[i=s.length-1],Ta(r)?r.length>0&&(vc((r=bc(r,"".concat(t||"","_").concat(n)))[0])&&vc(o)&&(s[i]=Bl(o.text+r[0].text),r.shift()),s.push.apply(s,r)):Ia(r)?vc(o)?s[i]=Bl(o.text+r):""!==r&&s.push(Bl(r)):vc(r)&&vc(o)?s[i]=Bl(o.text+r.text):(Na(e._isVList)&&Ma(r.tag)&&Da(r.key)&&Ma(t)&&(r.key="__vlist".concat(t,"_").concat(n,"__")),s.push(r)));return s}function wc(e,t){var n,r,i,o,s=null;if(Ta(e)||"string"==typeof e)for(s=new Array(e.length),n=0,r=e.length;n<r;n++)s[n]=t(e[n],n);else if("number"==typeof e)for(s=new Array(e),n=0;n<e;n++)s[n]=t(n+1,n);else if($a(e))if(Nl&&e[Symbol.iterator]){s=[];for(var a=e[Symbol.iterator](),l=a.next();!l.done;)s.push(t(l.value,s.length)),l=a.next()}else for(i=Object.keys(e),s=new Array(i.length),n=0,r=i.length;n<r;n++)o=i[n],s[n]=t(e[o],o,n);return Ma(s)||(s=[]),s._isVList=!0,s}function xc(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=tl(tl({},r),n)),i=o(n)||(Pa(t)?t():t)):i=this.$slots[e]||(Pa(t)?t():t);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function Sc(e){return nu(this.$options,"filters",e)||ol}function kc(e,t){return Ta(e)?-1===e.indexOf(t):e!==t}function Cc(e,t,n,r,i){var o=pl.keyCodes[t]||n;return i&&r&&!pl.keyCodes[t]?kc(i,r):o?kc(o,e):r?Xa(r)!==t:void 0===e}function _c(e,t,n,r,i){if(n&&$a(n)){Ta(n)&&(n=nl(n));var o=void 0,s=function(s){if("class"===s||"style"===s||za(s))o=e;else{var a=e.attrs&&e.attrs.type;o=r||pl.mustUseProp(t,a,s)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=Ja(s),c=Xa(s);l in o||c in o||(o[s]=n[s],i&&((e.on||(e.on={}))["update:".concat(s)]=function(e){n[s]=e}))};for(var a in n)s(a)}return e}function Ac(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Oc(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,this._c,this),"__static__".concat(e),!1),r}function Ec(e,t,n){return Oc(e,"__once__".concat(t).concat(n?"_".concat(n):""),!0),e}function Oc(e,t,n){if(Ta(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Tc(e[r],"".concat(t,"_").concat(r),n);else Tc(e,t,n)}function Tc(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Dc(e,t){if(t&&Ba(t)){var n=e.on=e.on?tl({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}return e}function Mc(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Ta(o)?Mc(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function Nc(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Ic(e,t){return"string"==typeof e?t+e:e}function Pc(e){e._o=Ec,e._n=Va,e._s=La,e._l=wc,e._t=xc,e._q=sl,e._i=al,e._m=Ac,e._f=Sc,e._k=Cc,e._b=_c,e._v=Bl,e._e=Rl,e._u=Mc,e._g=Dc,e._d=Nc,e._p=Ic}function $c(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],s=o.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,o.context!==t&&o.fnContext!==t||!s||null==s.slot)(n.default||(n.default=[])).push(o);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var c in n)n[c].every(Rc)&&delete n[c];return n}function Rc(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Bc(e){return e.isComment&&e.asyncFactory}function qc(e,t,n,r){var i,o=Object.keys(n).length>0,s=t?!!t.$stable:!o,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&r&&r!==Oa&&a===r.$key&&!o&&!r.$hasNormal)return r;for(var l in i={},t)t[l]&&"$"!==l[0]&&(i[l]=Fc(e,n,l,t[l]))}else i={};for(var c in n)c in i||(i[c]=Lc(n,c));return t&&Object.isExtensible(t)&&(t._normalized=i),fl(i,"$stable",s),fl(i,"$key",a),fl(i,"$hasNormal",o),i}function Fc(e,t,n,r){var i=function(){var t=Il;Pl(e);var n=arguments.length?r.apply(null,arguments):r({}),i=(n=n&&"object"==typeof n&&!Ta(n)?[n]:yc(n))&&n[0];return Pl(t),n&&(!i||1===n.length&&i.isComment&&!Bc(i))?void 0:n};return r.proxy&&Object.defineProperty(t,n,{get:i,enumerable:!0,configurable:!0}),i}function Lc(e,t){return function(){return e[t]}}function Vc(e,t,n,r,i){var o=!1;for(var s in t)s in e?t[s]!==n[s]&&(o=!0):(o=!0,jc(e,s,r,i));for(var s in e)s in t||(o=!0,delete e[s]);return o}function jc(e,t,n,r){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return n[r][t]}})}function zc(e,t){for(var n in t)e[n]=t[n];for(var n in e)n in t||delete e[n]}var Hc=null;function Uc(e,t){return(e.__esModule||Nl&&"Module"===e[Symbol.toStringTag])&&(e=e.default),$a(e)?t.extend(e):e}function Wc(e){if(Ta(e))for(var t=0;t<e.length;t++){var n=e[t];if(Ma(n)&&(Ma(n.componentOptions)||Bc(n)))return n}}var Zc=1,Kc=2;function Jc(e,t,n,r,i,o){return(Ta(n)||Ia(n))&&(i=r,r=n,n=void 0),Na(o)&&(i=Kc),function(e,t,n,r,i){if(Ma(n)&&Ma(n.__ob__))return Rl();if(Ma(n)&&Ma(n.is)&&(t=n.is),!t)return Rl();var o,s;if(Ta(r)&&Pa(r[0])&&((n=n||{}).scopedSlots={default:r[0]},r.length=0),i===Kc?r=yc(r):i===Zc&&(r=function(e){for(var t=0;t<e.length;t++)if(Ta(e[t]))return Array.prototype.concat.apply([],e);return e}(r)),"string"==typeof t){var a=void 0;s=e.$vnode&&e.$vnode.ns||pl.getTagNamespace(t),o=pl.isReservedTag(t)?new $l(pl.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!Ma(a=nu(e.$options,"components",t))?new $l(t,n,r,void 0,void 0,e):Wd(a,n,e,r,t)}else o=Wd(t,n,e,r);return Ta(o)?o:Ma(o)?(Ma(s)&&Gc(o,s),Ma(n)&&function(e){$a(e.style)&&hd(e.style),$a(e.class)&&hd(e.class)}(n),o):Rl()}(e,t,n,r,i)}function Gc(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),Ma(e.children))for(var r=0,i=e.children.length;r<i;r++){var o=e.children[r];Ma(o.tag)&&(Da(o.ns)||Na(n)&&"svg"!==o.tag)&&Gc(o,t,n)}}function Yc(e,t,n){Hl();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Qc(e,r,"errorCaptured hook")}}Qc(e,t,n)}finally{Ul()}}function Xc(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&Fa(o)&&!o._handled&&(o.catch((function(e){return Yc(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(e){Yc(e,r,i)}return o}function Qc(e,t,n){if(pl.errorHandler)try{return pl.errorHandler.call(null,e,t,n)}catch(t){t!==e&&ed(t)}ed(e)}function ed(e,t,n){if(!yl||"undefined"==typeof console)throw e;console.error(e)}var td,nd=!1,rd=[],id=!1;function od(){id=!1;var e=rd.slice(0);rd.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&Dl(Promise)){var sd=Promise.resolve();td=function(){sd.then(od),Sl&&setTimeout(rl)},nd=!0}else if(bl||"undefined"==typeof MutationObserver||!Dl(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())td="undefined"!=typeof setImmediate&&Dl(setImmediate)?function(){setImmediate(od)}:function(){setTimeout(od,0)};else{var ad=1,ld=new MutationObserver(od),cd=document.createTextNode(String(ad));ld.observe(cd,{characterData:!0}),td=function(){ad=(ad+1)%2,cd.data=String(ad)},nd=!0}function dd(e,t){var n;if(rd.push((function(){if(e)try{e.call(t)}catch(e){Yc(e,t,"nextTick")}else n&&n(t)})),id||(id=!0,td()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}function ud(e){return function(t,n){if(void 0===n&&(n=Il),n)return function(e,t,n){var r=e.$options;r[t]=Xd(r[t],n)}(n,e,t)}}ud("beforeMount"),ud("mounted"),ud("beforeUpdate"),ud("updated"),ud("beforeDestroy"),ud("destroyed"),ud("activated"),ud("deactivated"),ud("serverPrefetch"),ud("renderTracked"),ud("renderTriggered"),ud("errorCaptured");var pd=new Ml;function hd(e){return fd(e,pd),pd.clear(),e}function fd(e,t){var n,r,i=Ta(e);if(!(!i&&!$a(e)||e.__v_skip||Object.isFrozen(e)||e instanceof $l)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(i)for(n=e.length;n--;)fd(e[n],t);else if(ac(e))fd(e.value,t);else for(n=(r=Object.keys(e)).length;n--;)fd(e[r[n]],t)}}var md,gd=0,yd=function(){function e(e,t,n,r,i){var o;void 0===(o=cc&&!cc._vm?cc:e?e._scope:void 0)&&(o=cc),o&&o.active&&o.effects.push(this),(this.vm=e)&&i&&(e._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++gd,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Ml,this.newDepIds=new Ml,this.expression="",Pa(t)?this.getter=t:(this.getter=function(e){if(!ml.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=rl)),this.value=this.lazy?void 0:this.get()}return e.prototype.get=function(){var e;Hl(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Yc(e,t,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&hd(e),Ul(),this.cleanupDeps()}return e},e.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},e.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},e.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==Dd[t]&&(e!==jl.target||!e.noRecurse)){if(Dd[t]=!0,Nd){for(var n=Od.length-1;n>Id&&Od[n].id>e.id;)n--;Od.splice(n+1,0,e)}else Od.push(e);Md||(Md=!0,dd(qd))}}(this)},e.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||$a(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'.concat(this.expression,'"');Xc(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},e.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},e.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},e.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&Ha(this.vm._scope.effects,this),this.active){for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},e}();function vd(e,t){md.$on(e,t)}function bd(e,t){md.$off(e,t)}function wd(e,t){var n=md;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function xd(e,t,n){md=e,fc(t,n||{},vd,bd,wd,e),md=void 0}var Sd=null;function kd(e){var t=Sd;return Sd=e,function(){Sd=t}}function Cd(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function _d(e,t){if(t){if(e._directInactive=!1,Cd(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)_d(e.$children[n]);Ed(e,"activated")}}function Ad(e,t){if(!(t&&(e._directInactive=!0,Cd(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)Ad(e.$children[n]);Ed(e,"deactivated")}}function Ed(e,t,n,r){void 0===r&&(r=!0),Hl();var i=Il;r&&Pl(e);var o=e.$options[t],s="".concat(t," hook");if(o)for(var a=0,l=o.length;a<l;a++)Xc(o[a],e,n||null,e,s);e._hasHookEvent&&e.$emit("hook:"+t),r&&Pl(i),Ul()}var Od=[],Td=[],Dd={},Md=!1,Nd=!1,Id=0,Pd=0,$d=Date.now;if(yl&&!bl){var Rd=window.performance;Rd&&"function"==typeof Rd.now&&$d()>document.createEvent("Event").timeStamp&&($d=function(){return Rd.now()})}var Bd=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function qd(){var e,t;for(Pd=$d(),Nd=!0,Od.sort(Bd),Id=0;Id<Od.length;Id++)(e=Od[Id]).before&&e.before(),t=e.id,Dd[t]=null,e.run();var n=Td.slice(),r=Od.slice();Id=Od.length=Td.length=0,Dd={},Md=Nd=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,_d(e[t],!0)}(n),function(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ed(r,"updated")}}(r),Vl(),Tl&&pl.devtools&&Tl.emit("flush")}function Fd(e,t){if(e){for(var n=Object.create(null),r=Nl?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){var s=e[o].from;if(s in t._provided)n[o]=t._provided[s];else if("default"in e[o]){var a=e[o].default;n[o]=Pa(a)?a.call(t):a}}}return n}}function Ld(e,t,n,r,i){var o,s=this,a=i.options;Wa(r,"_uid")?(o=Object.create(r))._original=r:(o=r,r=r._original);var l=Na(a._compiled),c=!l;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||Oa,this.injections=Fd(a.inject,r),this.slots=function(){return s.$slots||qc(r,e.scopedSlots,s.$slots=$c(n,r)),s.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return qc(r,e.scopedSlots,this.slots())}}),l&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=qc(r,e.scopedSlots,this.$slots)),a._scopeId?this._c=function(e,t,n,i){var s=Jc(o,e,t,n,i,c);return s&&!Ta(s)&&(s.fnScopeId=a._scopeId,s.fnContext=r),s}:this._c=function(e,t,n,r){return Jc(o,e,t,n,r,c)}}function Vd(e,t,n,r,i){var o=ql(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function jd(e,t){for(var n in t)e[Ja(n)]=t[n]}function zd(e){return e.name||e.__name||e._componentTag}Pc(Ld.prototype);var Hd={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Hd.prepatch(n,n)}else(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;return Ma(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new e.componentOptions.Ctor(n)}(e,Sd)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,i){var o=r.data.scopedSlots,s=e.$scopedSlots,a=!!(o&&!o.$stable||s!==Oa&&!s.$stable||o&&e.$scopedSlots.$key!==o.$key||!o&&e.$scopedSlots.$key),l=!!(i||e.$options._renderChildren||a),c=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i;var d=r.data.attrs||Oa;e._attrsProxy&&Vc(e._attrsProxy,d,c.data&&c.data.attrs||Oa,e,"$attrs")&&(l=!0),e.$attrs=d,n=n||Oa;var u=e.$options._parentListeners;if(e._listenersProxy&&Vc(e._listenersProxy,n,u||Oa,e,"$listeners"),e.$listeners=e.$options._parentListeners=n,xd(e,n,u),t&&e.$options.props){Yl(!1);for(var p=e._props,h=e.$options._propKeys||[],f=0;f<h.length;f++){var m=h[f],g=e.$options.props;p[m]=ru(m,g,t,e)}Yl(!0),e.$options.propsData=t}l&&(e.$slots=$c(i,r.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Ed(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,Td.push(t)):_d(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?Ad(t,!0):t.$destroy())}},Ud=Object.keys(Hd);function Wd(e,t,n,r,i){if(!Da(e)){var o=n.$options._base;if($a(e)&&(e=o.extend(e)),"function"==typeof e){var s;if(Da(e.cid)&&(e=function(e,t){if(Na(e.error)&&Ma(e.errorComp))return e.errorComp;if(Ma(e.resolved))return e.resolved;var n=Hc;if(n&&Ma(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),Na(e.loading)&&Ma(e.loadingComp))return e.loadingComp;if(n&&!Ma(e.owners)){var r=e.owners=[n],i=!0,o=null,s=null;n.$on("hook:destroyed",(function(){return Ha(r,n)}));var a=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==o&&(clearTimeout(o),o=null),null!==s&&(clearTimeout(s),s=null))},l=ll((function(n){e.resolved=Uc(n,t),i?r.length=0:a(!0)})),c=ll((function(t){Ma(e.errorComp)&&(e.error=!0,a(!0))})),d=e(l,c);return $a(d)&&(Fa(d)?Da(e.resolved)&&d.then(l,c):Fa(d.component)&&(d.component.then(l,c),Ma(d.error)&&(e.errorComp=Uc(d.error,t)),Ma(d.loading)&&(e.loadingComp=Uc(d.loading,t),0===d.delay?e.loading=!0:o=setTimeout((function(){o=null,Da(e.resolved)&&Da(e.error)&&(e.loading=!0,a(!1))}),d.delay||200)),Ma(d.timeout)&&(s=setTimeout((function(){s=null,Da(e.resolved)&&c(null)}),d.timeout)))),i=!1,e.loading?e.loadingComp:e.resolved}}(s=e,o),void 0===e))return function(e,t,n,r,i){var o=Rl();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(s,t,n,r,i);t=t||{},yu(e),Ma(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var i=t.on||(t.on={}),o=i[r],s=t.model.callback;Ma(o)?(Ta(o)?-1===o.indexOf(s):o!==s)&&(i[r]=[s].concat(o)):i[r]=s}(e.options,t);var a=function(e,t,n){var r=t.options.props;if(!Da(r)){var i={},o=e.attrs,s=e.props;if(Ma(o)||Ma(s))for(var a in r){var l=Xa(a);gc(i,s,a,l,!0)||gc(i,o,a,l,!1)}return i}}(t,e);if(Na(e.options.functional))return function(e,t,n,r,i){var o=e.options,s={},a=o.props;if(Ma(a))for(var l in a)s[l]=ru(l,a,t||Oa);else Ma(n.attrs)&&jd(s,n.attrs),Ma(n.props)&&jd(s,n.props);var c=new Ld(n,s,i,r,e),d=o.render.call(null,c._c,c);if(d instanceof $l)return Vd(d,n,c.parent,o);if(Ta(d)){for(var u=yc(d)||[],p=new Array(u.length),h=0;h<u.length;h++)p[h]=Vd(u[h],n,c.parent,o);return p}}(e,a,t,n,r);var l=t.on;if(t.on=t.nativeOn,Na(e.options.abstract)){var c=t.slot;t={},c&&(t.slot=c)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Ud.length;n++){var r=Ud[n],i=t[r],o=Hd[r];i===o||i&&i._merged||(t[r]=i?Zd(o,i):o)}}(t);var d=zd(e.options)||i;return new $l("vue-component-".concat(e.cid).concat(d?"-".concat(d):""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:a,listeners:l,tag:i,children:r},s)}}}function Zd(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var Kd=rl,Jd=pl.optionMergeStrategies;function Gd(e,t,n){if(void 0===n&&(n=!0),!t)return e;for(var r,i,o,s=Nl?Reflect.ownKeys(t):Object.keys(t),a=0;a<s.length;a++)"__ob__"!==(r=s[a])&&(i=e[r],o=t[r],n&&Wa(e,r)?i!==o&&Ba(i)&&Ba(o)&&Gd(i,o):nc(e,r,o));return e}function Yd(e,t,n){return n?function(){var r=Pa(t)?t.call(n,n):t,i=Pa(e)?e.call(n,n):e;return r?Gd(r,i):i}:t?e?function(){return Gd(Pa(t)?t.call(this,this):t,Pa(e)?e.call(this,this):e)}:t:e}function Xd(e,t){var n=t?e?e.concat(t):Ta(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Qd(e,t,n,r){var i=Object.create(e||null);return t?tl(i,t):i}Jd.data=function(e,t,n){return n?Yd(e,t,n):t&&"function"!=typeof t?e:Yd(e,t)},ul.forEach((function(e){Jd[e]=Xd})),dl.forEach((function(e){Jd[e+"s"]=Qd})),Jd.watch=function(e,t,n,r){if(e===_l&&(e=void 0),t===_l&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in tl(i,e),t){var s=i[o],a=t[o];s&&!Ta(s)&&(s=[s]),i[o]=s?s.concat(a):Ta(a)?a:[a]}return i},Jd.props=Jd.methods=Jd.inject=Jd.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return tl(i,e),t&&tl(i,t),i},Jd.provide=function(e,t){return e?function(){var n=Object.create(null);return Gd(n,Pa(e)?e.call(this):e),t&&Gd(n,Pa(t)?t.call(this):t,!1),n}:t};var eu=function(e,t){return void 0===t?e:t};function tu(e,t,n){if(Pa(t)&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Ta(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[Ja(i)]={type:null});else if(Ba(n))for(var s in n)i=n[s],o[Ja(s)]=Ba(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Ta(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(Ba(n))for(var o in n){var s=n[o];r[o]=Ba(s)?tl({from:o},s):{from:s}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];Pa(r)&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=tu(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=tu(e,t.mixins[r],n);var o,s={};for(o in e)a(o);for(o in t)Wa(e,o)||a(o);function a(r){var i=Jd[r]||eu;s[r]=i(e[r],t[r],n,r)}return s}function nu(e,t,n,r){if("string"==typeof n){var i=e[t];if(Wa(i,n))return i[n];var o=Ja(n);if(Wa(i,o))return i[o];var s=Ga(o);return Wa(i,s)?i[s]:i[n]||i[o]||i[s]}}function ru(e,t,n,r){var i=t[e],o=!Wa(n,e),s=n[e],a=au(Boolean,i.type);if(a>-1)if(o&&!Wa(i,"default"))s=!1;else if(""===s||s===Xa(e)){var l=au(String,i.type);(l<0||a<l)&&(s=!0)}if(void 0===s){s=function(e,t,n){if(Wa(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:Pa(r)&&"Function"!==ou(t.type)?r.call(e):r}}(r,i,e);var c=Gl;Yl(!0),ec(s),Yl(c)}return s}var iu=/^\s*function (\w+)/;function ou(e){var t=e&&e.toString().match(iu);return t?t[1]:""}function su(e,t){return ou(e)===ou(t)}function au(e,t){if(!Ta(t))return su(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(su(t[n],e))return n;return-1}var lu={enumerable:!0,configurable:!0,get:rl,set:rl};function cu(e,t,n){lu.get=function(){return this[t][n]},lu.set=function(e){this[t][n]=e},Object.defineProperty(e,n,lu)}function du(e){var t=e.$options;if(t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props=oc({}),i=e.$options._propKeys=[];!e.$parent||Yl(!1);var o=function(o){i.push(o);var s=ru(o,t,n,e);tc(r,o,s),o in e||cu(e,"_props",o)};for(var s in t)o(s);Yl(!0)}(e,t.props),function(e){var t=e.$options,n=t.setup;if(n){var r=e._setupContext=function(e){return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};fl(t,"_v_attr_proxy",!0),Vc(t,e.$attrs,Oa,e,"$attrs")}return e._attrsProxy},get listeners(){return e._listenersProxy||Vc(e._listenersProxy={},e.$listeners,Oa,e,"$listeners"),e._listenersProxy},get slots(){return function(e){return e._slotsProxy||zc(e._slotsProxy={},e.$scopedSlots),e._slotsProxy}(e)},emit:Qa(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return lc(e,t,n)}))}}}(e);Pl(e),Hl();var i=Xc(n,null,[e._props||oc({}),r],e,"setup");if(Ul(),Pl(),Pa(i))t.render=i;else if($a(i))if(e._setupState=i,i.__sfc){var o=e._setupProxy={};for(var s in i)"__sfc"!==s&&lc(o,i,s)}else for(var s in i)hl(s)||lc(e,i,s)}}(e),t.methods&&function(e,t){for(var n in e.$options.props,t)e[n]="function"!=typeof t[n]?rl:Qa(t[n],e)}(e,t.methods),t.data)!function(e){var t=e.$options.data;t=e._data=Pa(t)?function(e,t){Hl();try{return e.call(t,t)}catch(e){return Yc(e,t,"data()"),{}}finally{Ul()}}(t,e):t||{},Ba(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);i--;){var o=n[i];r&&Wa(r,o)||hl(o)||cu(e,"_data",o)}var s=ec(t);s&&s.vmCount++}(e);else{var n=ec(e._data={});n&&n.vmCount++}t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Ol();for(var i in t){var o=t[i],s=Pa(o)?o:o.get;r||(n[i]=new yd(e,s||rl,rl,uu)),i in e||pu(e,i,o)}}(e,t.computed),t.watch&&t.watch!==_l&&function(e,t){for(var n in t){var r=t[n];if(Ta(r))for(var i=0;i<r.length;i++)mu(e,n,r[i]);else mu(e,n,r)}}(e,t.watch)}var uu={lazy:!0};function pu(e,t,n){var r=!Ol();Pa(n)?(lu.get=r?hu(t):fu(n),lu.set=rl):(lu.get=n.get?r&&!1!==n.cache?hu(t):fu(n.get):rl,lu.set=n.set||rl),Object.defineProperty(e,t,lu)}function hu(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),jl.target&&t.depend(),t.value}}function fu(e){return function(){return e.call(this,this)}}function mu(e,t,n,r){return Ba(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var gu=0;function yu(e){var t=e.options;if(e.super){var n=yu(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&tl(e.extendOptions,r),(t=e.options=tu(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function vu(e){this._init(e)}function bu(e){return e&&(zd(e.Ctor.options)||e.tag)}function wu(e,t){return Ta(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!function(e){return"[object RegExp]"===Ra.call(e)}(e)&&e.test(t)}function xu(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var s=n[o];if(s){var a=s.name;a&&!t(a)&&Su(n,o,r,i)}}}function Su(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,Ha(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=gu++,t._isVue=!0,t.__v_skip=!0,t._scope=new uc(!0),t._scope._vm=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=tu(yu(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._provided=n?n._provided:Object.create(null),e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&xd(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=$c(t._renderChildren,r),e.$scopedSlots=n?qc(e.$parent,n.data.scopedSlots,e.$slots):Oa,e._c=function(t,n,r,i){return Jc(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Jc(e,t,n,r,i,!0)};var i=n&&n.data;tc(e,"$attrs",i&&i.attrs||Oa,null,!0),tc(e,"$listeners",t._parentListeners||Oa,null,!0)}(t),Ed(t,"beforeCreate",void 0,!1),function(e){var t=Fd(e.$options.inject,e);t&&(Yl(!1),Object.keys(t).forEach((function(n){tc(e,n,t[n])})),Yl(!0))}(t),du(t),function(e){var t=e.$options.provide;if(t){var n=Pa(t)?t.call(e):t;if(!$a(n))return;for(var r=function(e){var t=e._provided,n=e.$parent&&e.$parent._provided;return n===t?e._provided=Object.create(n):t}(e),i=Nl?Reflect.ownKeys(n):Object.keys(n),o=0;o<i.length;o++){var s=i[o];Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(n,s))}}}(t),Ed(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(vu),function(e){Object.defineProperty(e.prototype,"$data",{get:function(){return this._data}}),Object.defineProperty(e.prototype,"$props",{get:function(){return this._props}}),e.prototype.$set=nc,e.prototype.$delete=rc,e.prototype.$watch=function(e,t,n){var r=this;if(Ba(t))return mu(r,e,t,n);(n=n||{}).user=!0;var i=new yd(r,e,t,n);if(n.immediate){var o='callback for immediate watcher "'.concat(i.expression,'"');Hl(),Xc(t,r,[i.value],r,o),Ul()}return function(){i.teardown()}}}(vu),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Ta(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Ta(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,s=n._events[e];if(!s)return n;if(!t)return n._events[e]=null,n;for(var a=s.length;a--;)if((o=s[a])===t||o.fn===t){s.splice(a,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?el(n):n;for(var r=el(arguments,1),i='event handler for "'.concat(e,'"'),o=0,s=n.length;o<s;o++)Xc(n[o],t,r,t,i)}return t}}(vu),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=kd(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var s=n;s&&s.$vnode&&s.$parent&&s.$vnode===s.$parent._vnode;)s.$parent.$el=s.$el,s=s.$parent},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Ed(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||Ha(t.$children,e),e._scope.stop(),e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Ed(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(vu),function(e){Pc(e.prototype),e.prototype.$nextTick=function(e){return dd(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&t._isMounted&&(t.$scopedSlots=qc(t.$parent,i.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&zc(t._slotsProxy,t.$scopedSlots)),t.$vnode=i;try{Pl(t),Hc=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){Yc(n,t,"render"),e=t._vnode}finally{Hc=null,Pl()}return Ta(e)&&1===e.length&&(e=e[0]),e instanceof $l||(e=Rl()),e.parent=i,e}}(vu);var ku=[String,RegExp,Array],Cu={name:"keep-alive",abstract:!0,props:{include:ku,exclude:ku,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,n=e.keys,r=e.vnodeToCache,i=e.keyToCache;if(r){var o=r.tag,s=r.componentInstance,a=r.componentOptions;t[i]={name:bu(a),tag:o,componentInstance:s},n.push(i),this.max&&n.length>parseInt(this.max)&&Su(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Su(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){xu(e,(function(e){return wu(t,e)}))})),this.$watch("exclude",(function(t){xu(e,(function(e){return!wu(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=Wc(e),n=t&&t.componentOptions;if(n){var r=bu(n),i=this.include,o=this.exclude;if(i&&(!r||!wu(i,r))||o&&r&&wu(o,r))return t;var s=this.cache,a=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,Ha(a,l),a.push(l)):(this.vnodeToCache=t,this.keyToCache=l),t.data.keepAlive=!0}return t||e&&e[0]}},_u={KeepAlive:Cu};!function(e){var t={get:function(){return pl}};Object.defineProperty(e,"config",t),e.util={warn:Kd,extend:tl,mergeOptions:tu,defineReactive:tc},e.set=nc,e.delete=rc,e.nextTick=dd,e.observable=function(e){return ec(e),e},e.options=Object.create(null),dl.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,tl(e.options.components,_u),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=el(arguments,1);return n.unshift(this),Pa(e.install)?e.install.apply(e,n):Pa(e)&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=tu(this.options,e),this}}(e),function(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=zd(e)||zd(n.options),s=function(e){this._init(e)};return(s.prototype=Object.create(n.prototype)).constructor=s,s.cid=t++,s.options=tu(n.options,e),s.super=n,s.options.props&&function(e){var t=e.options.props;for(var n in t)cu(e.prototype,"_props",n)}(s),s.options.computed&&function(e){var t=e.options.computed;for(var n in t)pu(e.prototype,n,t[n])}(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,dl.forEach((function(e){s[e]=n[e]})),o&&(s.options.components[o]=s),s.superOptions=n.options,s.extendOptions=e,s.sealedOptions=tl({},s.options),i[r]=s,s}}(e),function(e){dl.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&Ba(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&Pa(n)&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(vu),Object.defineProperty(vu.prototype,"$isServer",{get:Ol}),Object.defineProperty(vu.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(vu,"FunctionalRenderContext",{value:Ld}),vu.version="2.7.14";var Au=ja("style,class"),Eu=ja("input,textarea,option,select,progress"),Ou=ja("contenteditable,draggable,spellcheck"),Tu=ja("events,caret,typing,plaintext-only"),Du=function(e,t){return $u(t)||"false"===t?"false":"contenteditable"===e&&Tu(t)?t:"true"},Mu=ja("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Nu="http://www.w3.org/1999/xlink",Iu=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Pu=function(e){return Iu(e)?e.slice(6,e.length):""},$u=function(e){return null==e||!1===e};function Ru(e,t){return{staticClass:Bu(e.staticClass,t.staticClass),class:Ma(e.class)?[e.class,t.class]:t.class}}function Bu(e,t){return e?t?e+" "+t:e:t||""}function qu(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)Ma(t=qu(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):$a(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Fu={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Lu=ja("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Vu=ja("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),ju=function(e){return Lu(e)||Vu(e)},zu=Object.create(null),Hu=ja("text,number,password,search,email,tel,url"),Uu=Object.freeze({__proto__:null,createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Fu[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Wu={create:function(e,t){Zu(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Zu(e,!0),Zu(t))},destroy:function(e){Zu(e,!0)}};function Zu(e,t){var n=e.data.ref;if(Ma(n)){var r=e.context,i=e.componentInstance||e.elm,o=t?null:i,s=t?void 0:i;if(Pa(n))Xc(n,r,[o],r,"template ref function");else{var a=e.data.refInFor,l="string"==typeof n||"number"==typeof n,c=ac(n),d=r.$refs;if(l||c)if(a){var u=l?d[n]:n.value;t?Ta(u)&&Ha(u,i):Ta(u)?u.includes(i)||u.push(i):l?(d[n]=[i],Ku(r,n,d[n])):n.value=[i]}else if(l){if(t&&d[n]!==i)return;d[n]=s,Ku(r,n,o)}else if(c){if(t&&n.value!==i)return;n.value=o}}}}function Ku(e,t,n){var r=e._setupState;r&&Wa(r,t)&&(ac(r[t])?r[t].value=n:r[t]=n)}var Ju=new $l("",{},[]),Gu=["create","activate","update","remove","destroy"];function Yu(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&Ma(e.data)===Ma(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=Ma(n=e.data)&&Ma(n=n.attrs)&&n.type,i=Ma(n=t.data)&&Ma(n=n.attrs)&&n.type;return r===i||Hu(r)&&Hu(i)}(e,t)||Na(e.isAsyncPlaceholder)&&Da(t.asyncFactory.error))}function Xu(e,t,n){var r,i,o={};for(r=t;r<=n;++r)Ma(i=e[r].key)&&(o[i]=r);return o}var Qu={create:ep,update:ep,destroy:function(e){ep(e,Ju)}};function ep(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===Ju,s=t===Ju,a=np(e.data.directives,e.context),l=np(t.data.directives,t.context),c=[],d=[];for(n in l)r=a[n],i=l[n],r?(i.oldValue=r.value,i.oldArg=r.arg,ip(i,"update",t,e),i.def&&i.def.componentUpdated&&d.push(i)):(ip(i,"bind",t,e),i.def&&i.def.inserted&&c.push(i));if(c.length){var u=function(){for(var n=0;n<c.length;n++)ip(c[n],"inserted",t,e)};o?mc(t,"insert",u):u()}if(d.length&&mc(t,"postpatch",(function(){for(var n=0;n<d.length;n++)ip(d[n],"componentUpdated",t,e)})),!o)for(n in a)l[n]||ip(a[n],"unbind",e,e,s)}(e,t)}var tp=Object.create(null);function np(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++){if((r=e[n]).modifiers||(r.modifiers=tp),i[rp(r)]=r,t._setupState&&t._setupState.__sfc){var o=r.def||nu(t,"_setupState","v-"+r.name);r.def="function"==typeof o?{bind:o,update:o}:o}r.def=r.def||nu(t.$options,"directives",r.name)}return i}function rp(e){return e.rawName||"".concat(e.name,".").concat(Object.keys(e.modifiers||{}).join("."))}function ip(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){Yc(r,n.context,"directive ".concat(e.name," ").concat(t," hook"))}}var op=[Wu,Qu];function sp(e,t){var n=t.componentOptions;if(!(Ma(n)&&!1===n.Ctor.options.inheritAttrs||Da(e.data.attrs)&&Da(t.data.attrs))){var r,i,o=t.elm,s=e.data.attrs||{},a=t.data.attrs||{};for(r in(Ma(a.__ob__)||Na(a._v_attr_proxy))&&(a=t.data.attrs=tl({},a)),a)i=a[r],s[r]!==i&&ap(o,r,i,t.data.pre);for(r in(bl||xl)&&a.value!==s.value&&ap(o,"value",a.value),s)Da(a[r])&&(Iu(r)?o.removeAttributeNS(Nu,Pu(r)):Ou(r)||o.removeAttribute(r))}}function ap(e,t,n,r){r||e.tagName.indexOf("-")>-1?lp(e,t,n):Mu(t)?$u(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Ou(t)?e.setAttribute(t,Du(t,n)):Iu(t)?$u(n)?e.removeAttributeNS(Nu,Pu(t)):e.setAttributeNS(Nu,t,n):lp(e,t,n)}function lp(e,t,n){if($u(n))e.removeAttribute(t);else{if(bl&&!wl&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var cp={create:sp,update:sp};function dp(e,t){var n=t.elm,r=t.data,i=e.data;if(!(Da(r.staticClass)&&Da(r.class)&&(Da(i)||Da(i.staticClass)&&Da(i.class)))){var o=function(e){for(var t=e.data,n=e,r=e;Ma(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Ru(r.data,t));for(;Ma(n=n.parent);)n&&n.data&&(t=Ru(t,n.data));return i=t.staticClass,o=t.class,Ma(i)||Ma(o)?Bu(i,qu(o)):"";var i,o}(t),s=n._transitionClasses;Ma(s)&&(o=Bu(o,qu(s))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var up,pp={create:dp,update:dp},hp="__r",fp="__c";function mp(e,t,n){var r=up;return function i(){null!==t.apply(null,arguments)&&vp(e,i,n,r)}}var gp=nd&&!(Cl&&Number(Cl[1])<=53);function yp(e,t,n,r){if(gp){var i=Pd,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}up.addEventListener(e,t,Al?{capture:n,passive:r}:n)}function vp(e,t,n,r){(r||up).removeEventListener(e,t._wrapper||t,n)}function bp(e,t){if(!Da(e.data.on)||!Da(t.data.on)){var n=t.data.on||{},r=e.data.on||{};up=t.elm||e.elm,function(e){if(Ma(e[hp])){var t=bl?"change":"input";e[t]=[].concat(e[hp],e[t]||[]),delete e[hp]}Ma(e[fp])&&(e.change=[].concat(e[fp],e.change||[]),delete e[fp])}(n),fc(n,r,yp,vp,mp,t.context),up=void 0}}var wp,xp={create:bp,update:bp,destroy:function(e){return bp(e,Ju)}};function Sp(e,t){if(!Da(e.data.domProps)||!Da(t.data.domProps)){var n,r,i=t.elm,o=e.data.domProps||{},s=t.data.domProps||{};for(n in(Ma(s.__ob__)||Na(s._v_attr_proxy))&&(s=t.data.domProps=tl({},s)),o)n in s||(i[n]="");for(n in s){if(r=s[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===o[n])continue;1===i.childNodes.length&&i.removeChild(i.childNodes[0])}if("value"===n&&"PROGRESS"!==i.tagName){i._value=r;var a=Da(r)?"":String(r);kp(i,a)&&(i.value=a)}else if("innerHTML"===n&&Vu(i.tagName)&&Da(i.innerHTML)){(wp=wp||document.createElement("div")).innerHTML="<svg>".concat(r,"</svg>");for(var l=wp.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;l.firstChild;)i.appendChild(l.firstChild)}else if(r!==o[n])try{i[n]=r}catch(e){}}}}function kp(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(Ma(r)){if(r.number)return Va(n)!==Va(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var Cp={create:Sp,update:Sp},_p=Za((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Ap(e){var t=Ep(e.style);return e.staticStyle?tl(e.staticStyle,t):t}function Ep(e){return Array.isArray(e)?nl(e):"string"==typeof e?_p(e):e}var Op,Tp=/^--/,Dp=/\s*!important$/,Mp=function(e,t,n){if(Tp.test(t))e.style.setProperty(t,n);else if(Dp.test(n))e.style.setProperty(Xa(t),n.replace(Dp,""),"important");else{var r=Ip(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Np=["Webkit","Moz","ms"],Ip=Za((function(e){if(Op=Op||document.createElement("div").style,"filter"!==(e=Ja(e))&&e in Op)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Np.length;n++){var r=Np[n]+t;if(r in Op)return r}}));function Pp(e,t){var n=t.data,r=e.data;if(!(Da(n.staticStyle)&&Da(n.style)&&Da(r.staticStyle)&&Da(r.style))){var i,o,s=t.elm,a=r.staticStyle,l=r.normalizedStyle||r.style||{},c=a||l,d=Ep(t.data.style)||{};t.data.normalizedStyle=Ma(d.__ob__)?tl({},d):d;var u=function(e,t){for(var n,r={},i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=Ap(i.data))&&tl(r,n);(n=Ap(e.data))&&tl(r,n);for(var o=e;o=o.parent;)o.data&&(n=Ap(o.data))&&tl(r,n);return r}(t);for(o in c)Da(u[o])&&Mp(s,o,"");for(o in u)(i=u[o])!==c[o]&&Mp(s,o,null==i?"":i)}}var $p={create:Pp,update:Pp},Rp=/\s+/;function Bp(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Rp).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" ".concat(e.getAttribute("class")||""," ");n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function qp(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Rp).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" ".concat(e.getAttribute("class")||""," "),r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Fp(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&tl(t,Lp(e.name||"v")),tl(t,e),t}return"string"==typeof e?Lp(e):void 0}}var Lp=Za((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),Vp=yl&&!wl,jp="transition",zp="animation",Hp="transition",Up="transitionend",Wp="animation",Zp="animationend";Vp&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Hp="WebkitTransition",Up="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Wp="WebkitAnimation",Zp="webkitAnimationEnd"));var Kp=yl?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Jp(e){Kp((function(){Kp(e)}))}function Gp(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Bp(e,t))}function Yp(e,t){e._transitionClasses&&Ha(e._transitionClasses,t),qp(e,t)}function Xp(e,t,n){var r=eh(e,t),i=r.type,o=r.timeout,s=r.propCount;if(!i)return n();var a=i===jp?Up:Zp,l=0,c=function(){e.removeEventListener(a,d),n()},d=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),o+1),e.addEventListener(a,d)}var Qp=/\b(transform|all)(,|$)/;function eh(e,t){var n,r=window.getComputedStyle(e),i=(r[Hp+"Delay"]||"").split(", "),o=(r[Hp+"Duration"]||"").split(", "),s=th(i,o),a=(r[Wp+"Delay"]||"").split(", "),l=(r[Wp+"Duration"]||"").split(", "),c=th(a,l),d=0,u=0;return t===jp?s>0&&(n=jp,d=s,u=o.length):t===zp?c>0&&(n=zp,d=c,u=l.length):u=(n=(d=Math.max(s,c))>0?s>c?jp:zp:null)?n===jp?o.length:l.length:0,{type:n,timeout:d,propCount:u,hasTransform:n===jp&&Qp.test(r[Hp+"Property"])}}function th(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return nh(t)+nh(e[n])})))}function nh(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function rh(e,t){var n=e.elm;Ma(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=Fp(e.data.transition);if(!Da(r)&&!Ma(n._enterCb)&&1===n.nodeType){for(var i=r.css,o=r.type,s=r.enterClass,a=r.enterToClass,l=r.enterActiveClass,c=r.appearClass,d=r.appearToClass,u=r.appearActiveClass,p=r.beforeEnter,h=r.enter,f=r.afterEnter,m=r.enterCancelled,g=r.beforeAppear,y=r.appear,v=r.afterAppear,b=r.appearCancelled,w=r.duration,x=Sd,S=Sd.$vnode;S&&S.parent;)x=S.context,S=S.parent;var k=!x._isMounted||!e.isRootInsert;if(!k||y||""===y){var C=k&&c?c:s,_=k&&u?u:l,A=k&&d?d:a,E=k&&g||p,O=k&&Pa(y)?y:h,T=k&&v||f,D=k&&b||m,M=Va($a(w)?w.enter:w),N=!1!==i&&!wl,I=sh(O),P=n._enterCb=ll((function(){N&&(Yp(n,A),Yp(n,_)),P.cancelled?(N&&Yp(n,C),D&&D(n)):T&&T(n),n._enterCb=null}));e.data.show||mc(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,P)})),E&&E(n),N&&(Gp(n,C),Gp(n,_),Jp((function(){Yp(n,C),P.cancelled||(Gp(n,A),I||(oh(M)?setTimeout(P,M):Xp(n,o,P)))}))),e.data.show&&(t&&t(),O&&O(n,P)),N||I||P()}}}function ih(e,t){var n=e.elm;Ma(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=Fp(e.data.transition);if(Da(r)||1!==n.nodeType)return t();if(!Ma(n._leaveCb)){var i=r.css,o=r.type,s=r.leaveClass,a=r.leaveToClass,l=r.leaveActiveClass,c=r.beforeLeave,d=r.leave,u=r.afterLeave,p=r.leaveCancelled,h=r.delayLeave,f=r.duration,m=!1!==i&&!wl,g=sh(d),y=Va($a(f)?f.leave:f),v=n._leaveCb=ll((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),m&&(Yp(n,a),Yp(n,l)),v.cancelled?(m&&Yp(n,s),p&&p(n)):(t(),u&&u(n)),n._leaveCb=null}));h?h(b):b()}function b(){v.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),c&&c(n),m&&(Gp(n,s),Gp(n,l),Jp((function(){Yp(n,s),v.cancelled||(Gp(n,a),g||(oh(y)?setTimeout(v,y):Xp(n,o,v)))}))),d&&d(n,v),m||g||v())}}function oh(e){return"number"==typeof e&&!isNaN(e)}function sh(e){if(Da(e))return!1;var t=e.fns;return Ma(t)?sh(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function ah(e,t){!0!==t.data.show&&rh(t)}var lh=yl?{create:ah,activate:ah,remove:function(e,t){!0!==e.data.show?ih(e,t):t()}}:{},ch=function(e){var t,n,r={},i=e.modules,o=e.nodeOps;for(t=0;t<Gu.length;++t)for(r[Gu[t]]=[],n=0;n<i.length;++n)Ma(i[n][Gu[t]])&&r[Gu[t]].push(i[n][Gu[t]]);function s(e){var t=o.parentNode(e);Ma(t)&&o.removeChild(t,e)}function a(e,t,n,i,s,a,u){if(Ma(e.elm)&&Ma(a)&&(e=a[u]=ql(e)),e.isRootInsert=!s,!function(e,t,n,i){var o=e.data;if(Ma(o)){var s=Ma(e.componentInstance)&&o.keepAlive;if(Ma(o=o.hook)&&Ma(o=o.init)&&o(e,!1),Ma(e.componentInstance))return l(e,t),c(n,e.elm,i),Na(s)&&function(e,t,n,i){for(var o,s=e;s.componentInstance;)if(Ma(o=(s=s.componentInstance._vnode).data)&&Ma(o=o.transition)){for(o=0;o<r.activate.length;++o)r.activate[o](Ju,s);t.push(s);break}c(n,e.elm,i)}(e,t,n,i),!0}}(e,t,n,i)){var f=e.data,m=e.children,g=e.tag;Ma(g)?(e.elm=e.ns?o.createElementNS(e.ns,g):o.createElement(g,e),h(e),d(e,m,t),Ma(f)&&p(e,t),c(n,e.elm,i)):Na(e.isComment)?(e.elm=o.createComment(e.text),c(n,e.elm,i)):(e.elm=o.createTextNode(e.text),c(n,e.elm,i))}}function l(e,t){Ma(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,u(e)?(p(e,t),h(e)):(Zu(e),t.push(e))}function c(e,t,n){Ma(e)&&(Ma(n)?o.parentNode(n)===e&&o.insertBefore(e,t,n):o.appendChild(e,t))}function d(e,t,n){if(Ta(t))for(var r=0;r<t.length;++r)a(t[r],n,e.elm,null,!0,t,r);else Ia(e.text)&&o.appendChild(e.elm,o.createTextNode(String(e.text)))}function u(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return Ma(e.tag)}function p(e,n){for(var i=0;i<r.create.length;++i)r.create[i](Ju,e);Ma(t=e.data.hook)&&(Ma(t.create)&&t.create(Ju,e),Ma(t.insert)&&n.push(e))}function h(e){var t;if(Ma(t=e.fnScopeId))o.setStyleScope(e.elm,t);else for(var n=e;n;)Ma(t=n.context)&&Ma(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t),n=n.parent;Ma(t=Sd)&&t!==e.context&&t!==e.fnContext&&Ma(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t)}function f(e,t,n,r,i,o){for(;r<=i;++r)a(n[r],o,e,t,!1,n,r)}function m(e){var t,n,i=e.data;if(Ma(i))for(Ma(t=i.hook)&&Ma(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(Ma(t=e.children))for(n=0;n<e.children.length;++n)m(e.children[n])}function g(e,t,n){for(;t<=n;++t){var r=e[t];Ma(r)&&(Ma(r.tag)?(y(r),m(r)):s(r.elm))}}function y(e,t){if(Ma(t)||Ma(e.data)){var n,i=r.remove.length+1;for(Ma(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}(e.elm,i),Ma(n=e.componentInstance)&&Ma(n=n._vnode)&&Ma(n.data)&&y(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);Ma(n=e.data.hook)&&Ma(n=n.remove)?n(e,t):t()}else s(e.elm)}function v(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];if(Ma(o)&&Yu(e,o))return i}}function b(e,t,n,i,s,l){if(e!==t){Ma(t.elm)&&Ma(i)&&(t=i[s]=ql(t));var c=t.elm=e.elm;if(Na(e.isAsyncPlaceholder))Ma(t.asyncFactory.resolved)?S(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(Na(t.isStatic)&&Na(e.isStatic)&&t.key===e.key&&(Na(t.isCloned)||Na(t.isOnce)))t.componentInstance=e.componentInstance;else{var d,p=t.data;Ma(p)&&Ma(d=p.hook)&&Ma(d=d.prepatch)&&d(e,t);var h=e.children,m=t.children;if(Ma(p)&&u(t)){for(d=0;d<r.update.length;++d)r.update[d](e,t);Ma(d=p.hook)&&Ma(d=d.update)&&d(e,t)}Da(t.text)?Ma(h)&&Ma(m)?h!==m&&function(e,t,n,r,i){for(var s,l,c,d=0,u=0,p=t.length-1,h=t[0],m=t[p],y=n.length-1,w=n[0],x=n[y],S=!i;d<=p&&u<=y;)Da(h)?h=t[++d]:Da(m)?m=t[--p]:Yu(h,w)?(b(h,w,r,n,u),h=t[++d],w=n[++u]):Yu(m,x)?(b(m,x,r,n,y),m=t[--p],x=n[--y]):Yu(h,x)?(b(h,x,r,n,y),S&&o.insertBefore(e,h.elm,o.nextSibling(m.elm)),h=t[++d],x=n[--y]):Yu(m,w)?(b(m,w,r,n,u),S&&o.insertBefore(e,m.elm,h.elm),m=t[--p],w=n[++u]):(Da(s)&&(s=Xu(t,d,p)),Da(l=Ma(w.key)?s[w.key]:v(w,t,d,p))?a(w,r,e,h.elm,!1,n,u):Yu(c=t[l],w)?(b(c,w,r,n,u),t[l]=void 0,S&&o.insertBefore(e,c.elm,h.elm)):a(w,r,e,h.elm,!1,n,u),w=n[++u]);d>p?f(e,Da(n[y+1])?null:n[y+1].elm,n,u,y,r):u>y&&g(t,d,p)}(c,h,m,n,l):Ma(m)?(Ma(e.text)&&o.setTextContent(c,""),f(c,null,m,0,m.length-1,n)):Ma(h)?g(h,0,h.length-1):Ma(e.text)&&o.setTextContent(c,""):e.text!==t.text&&o.setTextContent(c,t.text),Ma(p)&&Ma(d=p.hook)&&Ma(d=d.postpatch)&&d(e,t)}}}function w(e,t,n){if(Na(n)&&Ma(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var x=ja("attrs,class,staticClass,staticStyle,key");function S(e,t,n,r){var i,o=t.tag,s=t.data,a=t.children;if(r=r||s&&s.pre,t.elm=e,Na(t.isComment)&&Ma(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(Ma(s)&&(Ma(i=s.hook)&&Ma(i=i.init)&&i(t,!0),Ma(i=t.componentInstance)))return l(t,n),!0;if(Ma(o)){if(Ma(a))if(e.hasChildNodes())if(Ma(i=s)&&Ma(i=i.domProps)&&Ma(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var c=!0,u=e.firstChild,h=0;h<a.length;h++){if(!u||!S(u,a[h],n,r)){c=!1;break}u=u.nextSibling}if(!c||u)return!1}else d(t,a,n);if(Ma(s)){var f=!1;for(var m in s)if(!x(m)){f=!0,p(t,n);break}!f&&s.class&&hd(s.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,i){if(!Da(t)){var s,l=!1,c=[];if(Da(e))l=!0,a(t,c);else{var d=Ma(e.nodeType);if(!d&&Yu(e,t))b(e,t,c,null,null,i);else{if(d){if(1===e.nodeType&&e.hasAttribute(cl)&&(e.removeAttribute(cl),n=!0),Na(n)&&S(e,t,c))return w(t,c,!0),e;s=e,e=new $l(o.tagName(s).toLowerCase(),{},[],void 0,s)}var p=e.elm,h=o.parentNode(p);if(a(t,c,p._leaveCb?null:h,o.nextSibling(p)),Ma(t.parent))for(var f=t.parent,y=u(t);f;){for(var v=0;v<r.destroy.length;++v)r.destroy[v](f);if(f.elm=t.elm,y){for(var x=0;x<r.create.length;++x)r.create[x](Ju,f);var k=f.data.hook.insert;if(k.merged)for(var C=1;C<k.fns.length;C++)k.fns[C]()}else Zu(f);f=f.parent}Ma(h)?g([e],0,0):Ma(e.tag)&&m(e)}}return w(t,c,l),t.elm}Ma(e)&&m(e)}}({nodeOps:Uu,modules:[cp,pp,xp,Cp,$p,lh].concat(op)});wl&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&yh(e,"input")}));var dh={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?mc(n,"postpatch",(function(){dh.componentUpdated(e,t,n)})):uh(e,t,n.context),e._vOptions=[].map.call(e.options,fh)):("textarea"===n.tag||Hu(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",mh),e.addEventListener("compositionend",gh),e.addEventListener("change",gh),wl&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){uh(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,fh);if(i.some((function(e,t){return!sl(e,r[t])}))){var o=e.multiple?t.value.some((function(e){return hh(e,i)})):t.value!==t.oldValue&&hh(t.value,i);o&&yh(e,"change")}}}};function uh(e,t,n){ph(e,t),(bl||xl)&&setTimeout((function(){ph(e,t)}),0)}function ph(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,s,a=0,l=e.options.length;a<l;a++)if(s=e.options[a],i)o=al(r,fh(s))>-1,s.selected!==o&&(s.selected=o);else if(sl(fh(s),r))return void(e.selectedIndex!==a&&(e.selectedIndex=a));i||(e.selectedIndex=-1)}}function hh(e,t){return t.every((function(t){return!sl(t,e)}))}function fh(e){return"_value"in e?e._value:e.value}function mh(e){e.target.composing=!0}function gh(e){e.target.composing&&(e.target.composing=!1,yh(e.target,"input"))}function yh(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function vh(e){return!e.componentInstance||e.data&&e.data.transition?e:vh(e.componentInstance._vnode)}var bh={bind:function(e,t,n){var r=t.value,i=(n=vh(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,rh(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=vh(n)).data&&n.data.transition?(n.data.show=!0,r?rh(n,(function(){e.style.display=e.__vOriginalDisplay})):ih(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},wh={model:dh,show:bh},xh={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Sh(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Sh(Wc(t.children)):e}function kh(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var r in i)t[Ja(r)]=i[r];return t}function Ch(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var _h=function(e){return e.tag||Bc(e)},Ah=function(e){return"show"===e.name},Eh={name:"transition",props:xh,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(_h)).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=Sh(i);if(!o)return i;if(this._leaving)return Ch(e,i);var s="__transition-".concat(this._uid,"-");o.key=null==o.key?o.isComment?s+"comment":s+o.tag:Ia(o.key)?0===String(o.key).indexOf(s)?o.key:s+o.key:o.key;var a=(o.data||(o.data={})).transition=kh(this),l=this._vnode,c=Sh(l);if(o.data.directives&&o.data.directives.some(Ah)&&(o.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,c)&&!Bc(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var d=c.data.transition=tl({},a);if("out-in"===r)return this._leaving=!0,mc(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Ch(e,i);if("in-out"===r){if(Bc(o))return l;var u,p=function(){u()};mc(a,"afterEnter",p),mc(a,"enterCancelled",p),mc(d,"delayLeave",(function(e){u=e}))}}return i}}},Oh=tl({tag:String,moveClass:String},xh);delete Oh.mode;var Th={props:Oh,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=kd(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],s=kh(this),a=0;a<i.length;a++)(d=i[a]).tag&&null!=d.key&&0!==String(d.key).indexOf("__vlist")&&(o.push(d),n[d.key]=d,(d.data||(d.data={})).transition=s);if(r){var l=[],c=[];for(a=0;a<r.length;a++){var d;(d=r[a]).data.transition=s,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?l.push(d):c.push(d)}this.kept=e(t,null,l),this.removed=c}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Dh),e.forEach(Mh),e.forEach(Nh),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Gp(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Up,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Up,e),n._moveCb=null,Yp(n,t))})}})))},methods:{hasMove:function(e,t){if(!Vp)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){qp(n,e)})),Bp(n,t),n.style.display="none",this.$el.appendChild(n);var r=eh(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function Dh(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Mh(e){e.data.newPos=e.elm.getBoundingClientRect()}function Nh(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate(".concat(r,"px,").concat(i,"px)"),o.transitionDuration="0s"}}var Ih={Transition:Eh,TransitionGroup:Th};vu.config.mustUseProp=function(e,t,n){return"value"===n&&Eu(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},vu.config.isReservedTag=ju,vu.config.isReservedAttr=Au,vu.config.getTagNamespace=function(e){return Vu(e)?"svg":"math"===e?"math":void 0},vu.config.isUnknownElement=function(e){if(!yl)return!0;if(ju(e))return!1;if(e=e.toLowerCase(),null!=zu[e])return zu[e];var t=document.createElement(e);return e.indexOf("-")>-1?zu[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:zu[e]=/HTMLUnknownElement/.test(t.toString())},tl(vu.options.directives,wh),tl(vu.options.components,Ih),vu.prototype.__patch__=yl?ch:rl,vu.prototype.$mount=function(e,t){return function(e,t,n){var r;e.$el=t,e.$options.render||(e.$options.render=Rl),Ed(e,"beforeMount"),r=function(){e._update(e._render(),n)},new yd(e,r,rl,{before:function(){e._isMounted&&!e._isDestroyed&&Ed(e,"beforeUpdate")}},!0),n=!1;var i=e._preWatchers;if(i)for(var o=0;o<i.length;o++)i[o].run();return null==e.$vnode&&(e._isMounted=!0,Ed(e,"mounted")),e}(this,e=e&&yl?function(e){return"string"==typeof e?document.querySelector(e)||document.createElement("div"):e}(e):void 0,t)},yl&&setTimeout((function(){pl.devtools&&Tl&&Tl.emit("init",vu)}),0);const Ph=new vu,$h={name:"DpTreeListCheckbox",model:{prop:"checked",event:"check"},props:{checked:{type:Boolean,required:!1,default:!1},checkAll:{type:Boolean,required:!1,default:!1},name:{type:String,required:!0},stringValue:{type:String,required:!1,default:"on"}},computed:{label(){return this.checkAll?this.toggleCheckedStatus("aria.deselect_all","aria.select.all"):this.toggleCheckedStatus("aria.deselect","aria.select")}},methods:{check(){this.$emit("check",!this.checked)},toggleCheckedStatus(e,t){return Translator.trans(this.checked?e:t)}}},Rh=(0,l.Z)($h,(function(){var e=this,t=e._self._c;return t("label",{staticClass:"u-mb-0"},[t("input",{staticClass:"u-m-0_5 u-ml-0_25",attrs:{type:"checkbox",name:e.name,id:e.name},domProps:{checked:e.checked,value:e.stringValue},on:{click:e.check}}),e._v(" "),t("span",{staticClass:"hide-visually"},[e._v(e._s(e.label))])])}),[],!1,null,null,null).exports,Bh={name:"DpTreeListToggle",props:{value:{type:Boolean,required:!1,default:!1},iconClassProp:{type:String,required:!1,default:""},toggleAll:{type:Boolean,required:!1,default:!1}},computed:{iconClass(){return""!==this.iconClassProp?this.iconClassProp:"font-size-large line-height--1 u-p-0_25 fa "+(this.value?"fa-angle-up":"fa-angle-down")},label(){return this.toggleAll?Translator.trans(this.value?"aria.collapse.all":"aria.expand.all"):Translator.trans(this.value?"aria.collapse":"aria.expand")}},methods:{toggle(){this.$emit("input",!this.value)}}},qh=(0,l.Z)(Bh,(function(){var e=this,t=e._self._c;return t("button",{staticClass:"o-link--default btn--blank",attrs:{type:"button","aria-label":e.label},on:{click:e.toggle}},[t("i",{class:e.iconClass,attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null).exports,Fh={name:"DpTreeListNode",components:{DpDraggable:Oi,DpIcon:Yr,DpTreeListCheckbox:Rh,DpTreeListToggle:qh},directives:{tooltip:n.u},props:{checkBranch:{type:Function,required:!0},children:{type:Array,required:!0},draggable:{type:Boolean,required:!1,default:!0},handleChange:{type:Function,required:!0},handleDrag:{type:Function,required:!0},level:{type:Number,required:!0},node:{type:Object,required:!0},nodeId:{type:String,required:!0},onMove:{type:Function,required:!0},options:{type:Object,required:!1,default:()=>({})},parentId:{type:String,required:!1,default:""},parentSelected:{type:Boolean,required:!1,default:!1}},data:()=>({isExpanded:!1,isSelected:!1}),computed:{checkboxIdentifier(){return(this.isBranch?this.options.checkboxIdentifier.branch:this.options.checkboxIdentifier.leaf)+":"+this.nodeId},dragHandle(){const e=this.options.draggable.handle;return e.substring(1,e.length)},hasDraggableChildren(){return this.isBranch&&(this.options.dragLeaves||this.options.dragBranches)&&this.draggable},hasToggle(){return this.isBranch&&this.children.length>0},iconClassFolder(){let e;return e=this.children.length>0?this.isExpanded?"fa-folder-open":"fa-folder":"fa-folder-o","fa "+e},indentationStyle(){let e=25*this.level;return(this.isBranch&&!this.options.dragBranches&&this.options.dragLeaves||this.isLeaf&&this.options.dragBranches&&!this.options.dragLeaves)&&(e+=22),(this.isBranch&&!this.options.branchesSelectable&&this.options.leavesSelectable||this.isLeaf&&this.options.branchesSelectable&&!this.options.leavesSelectable)&&(e+=30),`margin-left: ${e}px;`},isBranch(){return this.checkBranch({node:this.node,children:this.children,id:this.nodeId})},isDraggable(){return this.isDraggableLeaf||this.isDraggableBranch},isDraggableBranch(){return this.options.dragBranches&&this.isBranch},isDraggableLeaf(){return this.options.dragLeaves&&this.isLeaf},isLeaf(){return!1===this.isBranch},isSelectable(){return this.isBranch&&this.options.branchesSelectable||this.isLeaf&&this.options.leavesSelectable||!1},tree:{get(){return this.children},set(e){this.$emit("tree:change",e)}}},watch:{parentSelected(e){this.options.selectOn.parentSelect&&!0===e&&!1===this.isSelected&&this.setSelectionState({selectionState:e,fromParent:!0}),this.options.deselectOn.parentDeselect&&!1===e&&!0===this.isSelected&&this.setSelectionState({selectionState:e,fromParent:!0})}},methods:{bubbleChangeEvent(e){this.$emit("tree:change",e)},bubbleDraggableChange(e){this.$emit("draggable:change",e)},handleChildSelectionChange(e){const t=e[e.length-1].selectionState;this.options.deselectOn.childDeselect&&!1===t&&!0===this.isSelected||this.options.selectOn.childSelect&&!0===t&&!1===this.isSelected?this.setSelectionState({selectionState:t,selections:e}):this.$emit("node-selected",e)},setSelectionState({selectionState:e,selections:t=[],fromParent:n=!1}){const r=[...t];this.isSelected=e,r.push({nodeId:this.nodeId,nodeType:!0===this.isBranch?"branch":"leaf",selectionState:e}),Ph.$emit("checked",r),!1===n&&this.$emit("node-selected",r)}},mounted(){this.$root.$on("treelist:toggle-all",(e=>this.isExpanded=e))}},Lh={name:"DpTreeList",components:{DpDraggable:Oi,DpTreeListCheckbox:Rh,DpTreeListNode:(0,l.Z)(Fh,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"border--top relative",attrs:{"data-cy":"treeListNode"}},[t("div",{staticClass:"c-treelist__node flex"},[e.isDraggable?t("div",{staticClass:"inline-block u-p-0_25 u-pr-0 u-mt-0_125",class:e.dragHandle},[t("dp-icon",{staticClass:"c-treelist__drag-handle-icon",attrs:{icon:"drag-handle"}})],1):e._e(),e._v(" "),e.isSelectable?t("dp-tree-list-checkbox",{attrs:{checked:e.isSelected,name:e.checkboxIdentifier,"string-value":e.nodeId},on:{check:function(t){return e.setSelectionState({selectionState:!e.isSelected})}}}):e._e(),e._v(" "),t("div",{staticClass:"flex grow items-start",style:e.indentationStyle},[e.isBranch?t("dp-tree-list-toggle",{staticClass:"c-treelist__folder text--left u-pv-0_25",class:{"pointer-events-none":0===e.children.length},attrs:{"icon-class-prop":e.iconClassFolder},model:{value:e.isExpanded,callback:function(t){e.isExpanded=t},expression:"isExpanded"}}):e._e(),e._v(" "),t("div",{staticClass:"grow u-pl-0 u-p-0_25"},[e.isBranch?e._t("branch",null,{nodeElement:e.node,nodeChildren:e.children,nodeId:e.nodeId,parentId:e.parentId}):e._e(),e._v(" "),e.isLeaf?e._t("leaf",null,{nodeElement:e.node,nodeId:e.nodeId,parentId:e.parentId}):e._e()],2)],1),e._v(" "),e.isBranch?t("dp-tree-list-toggle",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans(e.hasToggle?"":"no.elements.existing"),expression:"Translator.trans(!hasToggle ? 'no.elements.existing' : '')"}],staticClass:"self-start",attrs:{"data-cy":"treeListToggle",disabled:!e.hasToggle},model:{value:e.isExpanded,callback:function(t){e.isExpanded=t},expression:"isExpanded"}}):t("div",{staticClass:"min-width-25"})],1),e._v(" "),t(e.draggable?"dp-draggable":"div",{tag:"component",staticClass:"list-style-none u-mb-0 u-1-of-1",attrs:{"drag-across-branches":e.options.dragAcrossBranches,"draggable-tag":"ul","group-id":e.nodeId,"handle-change":e.handleChange,"handle-drag":e.handleDrag,"is-draggable":e.hasDraggableChildren,"node-id":e.nodeId,"on-move":e.onMove,opts:e.options.draggable},model:{value:e.tree,callback:function(t){e.tree=t},expression:"tree"}},e._l(e.children,(function(n){return t("dp-tree-list-node",{directives:[{name:"show",rawName:"v-show",value:!0===e.isExpanded,expression:"true === isExpanded"}],key:n.id,ref:`node_${n.id}`,refInFor:!0,attrs:{"check-branch":e.checkBranch,children:n.children||[],"handle-change":e.handleChange,"handle-drag":e.handleDrag,level:e.level+1,node:n,"node-id":n.id,"on-move":e.onMove,options:e.options,"parent-id":e.nodeId,"parent-selected":e.isSelected},on:{"draggable:change":e.bubbleDraggableChange,end:function(t){return e.handleDrag("end")},"node-selected":e.handleChildSelectionChange,start:function(t){return e.handleDrag("start")},"tree:change":e.bubbleChangeEvent},scopedSlots:e._u([e._l(Object.keys(e.$scopedSlots),(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}}))],null,!0)})})),1)],1)}),[],!1,null,null,null).exports,DpTreeListToggle:qh},props:{branchIdentifier:{type:Function,required:!0},draggable:{type:Boolean,required:!1,default:!0},onMove:{type:Function,required:!1,default:()=>!0},options:{type:Object,required:!1,default:()=>({})},treeData:{type:Array,required:!0}},data:()=>({allElementsExpanded:!1,allElementsSelected:!1,dragging:!1,opts:{},selectedNodesObject:{}}),computed:{checkAll(){return this.opts.branchesSelectable||this.opts.leavesSelectable},checkboxIndentationStyle(){return`margin-left: ${this.opts.dragBranches||this.opts.dragLeaves?22:0}px;`},selectedNodes(){return Object.keys(this.selectedNodesObject).map((e=>this.selectedNodesObject[e]))},tree:{get(){return this.treeData},set(e){this.$emit("tree:change",e)}}},methods:{bubbleChangeEvent(e){this.$emit("tree:change",e)},bubbleDraggableChange(e){this.$emit("draggable:change",e)},destroyFixedControls(){this.stickyHeader.destroy(),this.stickyFooter.destroy()},filterSelectableNodes(e){return this.opts.branchesSelectable&&this.opts.leavesSelectable?e:e.filter((({nodeType:e})=>{let t=!1;return(this.opts.branchesSelectable&&"branch"===e||this.opts.leavesSelectable&&"leaf"===e)&&(t=!0),t}))},handleChange(e,t){if((0,r.Q$)(e,"added")||(0,r.Q$)(e,"moved")){const{element:n,newIndex:i}=(0,r.Q$)(e,"moved")?e.moved:e.added,o={elementId:n.id,newIndex:i,parentId:t};this.$emit("draggable:change",o)}},handleDrag(e){this.$emit(e),this.dragging="start"===e},handleSelectEvent(e){this.filterSelectableNodes(e).forEach((e=>this.setSelectionState(e))),this.$emit("node-selection-change",this.selectedNodes)},initFixedControls(){this.stickyHeader=new R(this.$refs.header,this.$refs.treeList.$el,0),this.$slots.footer&&(this.stickyFooter=new R(this.$refs.footer,this.$refs.treeList.$el,0,"bottom"))},setSelectionState(e){if(!0===e.selectionState&&(this.selectedNodesObject={...this.selectedNodesObject,[e.nodeId]:e}),!1===e.selectionState){const t={...this.selectedNodesObject};delete t[e.nodeId],this.selectedNodesObject=t}},toggleAll(){this.$root.$emit("treelist:toggle-all",!this.allElementsExpanded),this.allElementsExpanded=!this.allElementsExpanded},unselectAll(){this.selectedNodes.forEach((e=>{this.$refs["node_"+e.id]&&this.$refs["node_"+e.id][0].setSelectionState(!1)})),this.selectedNodesObject={},this.allElementsSelected=!1,this.$emit("node-selection-change",this.selectedNodes)}},mounted(){this.opts=(0,r.RH)({branchesSelectable:!1,leavesSelectable:!1,rootDraggable:!1,dragAcrossBranches:!1,dragBranches:!1,dragLeaves:!1,draggable:{handle:".c-treelist__drag-handle",ghostClass:"c-treelist__node-ghost",chosenClass:"c-treelist__node-chosen"},checkboxIdentifier:{branch:"nodeSelected",leaf:"nodeSelected"},selectOn:{childSelect:!1,parentSelect:!1},deselectOn:{childDeselect:!1,parentDeselect:!1}},this.options),this.initFixedControls(),Ph.$on("checked",this.handleSelectEvent)}},Vh=(0,l.Z)(Lh,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"c-treelist",class:{"is-dragging":e.dragging}},[t("div",{ref:"header",staticClass:"c-treelist__header o-sticky line-height--2",class:{"has-checkbox":e.checkAll}},[t("div",{staticClass:"flex bg-color--white"},[e.checkAll?t("dp-tree-list-checkbox",{style:e.checkboxIndentationStyle,attrs:{name:"checkAll","check-all":""},model:{value:e.allElementsSelected,callback:function(t){e.allElementsSelected=t},expression:"allElementsSelected"}}):e._e(),e._v(" "),t("div",{staticClass:"grow color--grey"},[e._t("header")],2),e._v(" "),t("dp-tree-list-toggle",{staticClass:"color--grey",attrs:{value:e.allElementsExpanded,"toggle-all":""},on:{input:e.toggleAll}})],1)]),e._v(" "),t(e.draggable?"dp-draggable":"div",{ref:"treeList",tag:"component",staticClass:"list-style-none u-mb-0 u-1-of-1",attrs:{"drag-across-branches":e.opts.dragAcrossBranches,"draggable-tag":"ul","handle-change":e.handleChange,"handle-drag":e.handleDrag,"is-draggable":e.draggable,"on-move":e.onMove,opts:e.opts.draggable},model:{value:e.tree,callback:function(t){e.tree=t},expression:"tree"}},e._l(e.treeData,(function(n){return t("dp-tree-list-node",{key:n.id,ref:`node_${n.id}`,refInFor:!0,attrs:{"check-branch":e.branchIdentifier,children:n.children||[],draggable:e.draggable,"handle-change":e.handleChange,"handle-drag":e.handleDrag,level:0,node:n,"node-id":n.id,"on-move":e.onMove,options:e.opts,"parent-selected":e.allElementsSelected},on:{"draggable:change":e.bubbleDraggableChange,end:function(t){return e.handleDrag("end")},"node-selected":e.handleSelectEvent,start:function(t){return e.handleDrag("start")},"tree:change":e.bubbleChangeEvent},scopedSlots:e._u([e._l(Object.keys(e.$scopedSlots),(function(t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}}))],null,!0)})})),1),e._v(" "),e.$slots.footer?t("div",{ref:"footer",staticClass:"c-treelist__footer o-sticky"},[t("div",{staticClass:"u-p-0_5 bg-color--white"},[e._t("footer")],2)]):e._e()],1)}),[],!1,null,null,null).exports;function jh(e){this.content=e}jh.prototype={constructor:jh,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 r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return-1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new jh(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new jh(n)},addToStart:function(e,t){return new jh([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new jh(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new jh(i)},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=jh.from(e)).size?new jh(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=jh.from(e)).size?new jh(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=jh.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}},jh.from=function(e){if(e instanceof jh)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new jh(t)};const zh=jh;function Hh(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let e=0;i.text[e]==o.text[e];e++)n++;return n}if(i.content.size||o.content.size){let e=Hh(i.content,o.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function Uh(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e<t&&s.text[s.text.length-e-1]==a.text[a.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let e=Uh(s.content,a.content,n-1,r-1);if(e)return e}n-=l,r-=l}else n-=l,r-=l}}class Wh{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 a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(i+=s.text.slice(Math.max(e,a)-a,t-a),o=!n):s.isLeaf?(r?i+="function"==typeof r?r(s):r:s.type.spec.leafText&&(i+=s.type.spec.leafText(s)),o=!n):!o&&s.isBlock&&(i+=n,o=!0)}),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(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new Wh(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],a=o+s.nodeSize;a>e&&((o<e||a>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=a}return new Wh(n,r)}cutByIndex(e,t){return e==t?Wh.empty:0==e&&t==this.content.length?this:new Wh(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new Wh(r,i)}addToStart(e){return new Wh([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Wh(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 new 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 Hh(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Uh(this,e,t,n)}findIndex(e,t=-1){if(0==e)return Kh(0,e);if(e==this.size)return Kh(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?Kh(n+1,i):Kh(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 Wh.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Wh(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Wh.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 Wh(t||e,n)}static from(e){if(!e)return Wh.empty;if(e instanceof Wh)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Wh([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Wh.empty=new Wh([],0);const Zh={index:0,offset:0};function Kh(e,t){return Zh.index=e,Zh.offset=t,Zh}function Jh(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(!Jh(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Jh(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class Gh{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&&Jh(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 new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(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 Gh.none;if(e instanceof Gh)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}Gh.none=[];class Yh extends Error{}class Xh{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=ef(this.content,e+this.openStart,t);return n&&new Xh(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Xh(Qh(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 Xh.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Xh(Wh.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 Xh(e,n,r)}}function Qh(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(Qh(o.content,t-i-1,n-i-1)))}function ef(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ef(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function tf(e,t,n){if(n.openStart>e.depth)throw new Yh("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Yh("Inconsistent open depths");return nf(e,t,n,0)}function nf(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=nf(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:i,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(Wh.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return lf(o,cf(e,i,s,t,r))}{let r=e.parent,i=r.content;return lf(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}}return lf(o,df(e,t,r))}function rf(e,t){if(!t.type.compatibleContent(e.type))throw new Yh("Cannot join "+t.type.name+" onto "+e.type.name)}function of(e,t,n){let r=e.node(n);return rf(r,t.node(n)),r}function sf(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 af(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&&(sf(e.nodeAfter,r),o++));for(let e=o;e<s;e++)sf(i.child(e),r);t&&t.depth==n&&t.textOffset&&sf(t.nodeBefore,r)}function lf(e,t){return e.type.checkContent(t),e.copy(t)}function cf(e,t,n,r,i){let o=e.depth>i&&of(e,t,i+1),s=r.depth>i&&of(n,r,i+1),a=[];return af(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(rf(o,s),sf(lf(o,cf(e,t,n,r,i+1)),a)):(o&&sf(lf(o,df(e,t,i+1)),a),af(t,n,i,a),s&&sf(lf(s,df(n,r,i+1)),a)),af(r,null,i,a),new Wh(a)}function df(e,t,n){let r=[];return af(null,e,n,r),e.depth>n&&sf(lf(of(e,t,n+1),df(e,t,n+1)),r),af(t,null,n,r),new Wh(r)}Xh.empty=new Xh(Wh.empty,0,0);class uf{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 new 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 new 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 Gh.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 mf(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 new 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)break;if(t=t.child(e),t.isText)break;i=s-1,r+=o+1}return new uf(t,n,i)}static resolveCached(e,t){for(let n=0;n<pf.length;n++){let r=pf[n];if(r.pos==t&&r.doc==e)return r}let n=pf[hf]=uf.resolve(e,t);return hf=(hf+1)%ff,n}}let pf=[],hf=0,ff=12;class mf{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)}}const gf=Object.create(null);class yf{constructor(e,t,n,r=Gh.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Wh.empty}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&&Jh(this.attrs,t||e.defaultAttrs||gf)&&Gh.sameSet(this.marks,n||Gh.none)}copy(e=null){return e==this.content?this:new yf(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new yf(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 Xh.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new Xh(a,r.depth-o,i.depth-o)}replace(e,t,n){return tf(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),!t)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 uf.resolveCached(this,e)}resolveNoCache(e){return uf.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}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bf(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Wh.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<i;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);let e=Gh.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Gh.sameSet(e,this.marks))throw new 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){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=Wh.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}yf.prototype.text=void 0;class vf extends yf{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bf(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 vf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new vf(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 bf(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class wf{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new xf(e,t);if(null==n.next)return wf.empty;let r=Sf(n);n.next&&n.err("Unexpected trailing text");let i=function(e){let t=Object.create(null);return function n(r){let i=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Of(e,n).forEach((e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let o=t[r.join(",")]=new wf(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Ef);o.next.push({type:i[e][0],next:t[r.join(",")]||n(r)})}return o}(Of(e,0))}(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){if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(o)].concat(e(t.expr,o));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)]}if("name"==t.type)return[r(o,void 0,t.value)];throw new Error("Unknown expr 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())}}(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}function i(e,t){e.forEach((e=>e.to=t))}}(r));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)")}}(i,n),i}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 i(o,s){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return Wh.from(s.map((e=>e.createAndFill())));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=i(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),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 new 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")}}wf.empty=new wf(!0);class xf{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 new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Sf(e){let t=[];do{t.push(kf(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function kf(e){let t=[];do{t.push(Cf(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Cf(e){let t=function(e){if(e.eat("(")){let t=Sf(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=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.groups.indexOf(t)>-1&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=Af(e,t)}return t}function _f(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Af(e,t){let n=_f(e),r=n;return e.eat(",")&&(r="}"!=e.next?_f(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Ef(e,t){return t-e}function Of(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(Ef)}function Tf(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 Df(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)throw new RangeError("No value supplied for attribute "+r);i=t.default}n[r]=i}return n}function Mf(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new If(e[n]);return t}class Nf{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=Mf(n.attrs),this.defaultAttrs=Tf(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==wf.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:Df(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yf(this,this.computeAttrs(e),Wh.from(t),Gh.setFrom(n))}createChecked(e=null,t,n){return t=Wh.from(t),this.checkContent(t),new yf(this,this.computeAttrs(e),t,Gh.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=Wh.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(Wh.empty,!0);return i?new yf(this,e,t.append(i),Gh.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!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 new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}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){if(null==this.markSet)return e;let t;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:Gh.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new Nf(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class If{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Pf{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Mf(r.attrs),this.excluded=null;let i=Tf(this.attrs);this.instance=i?new Gh(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Gh(this,Df(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,i)=>n[e]=new Pf(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]}excludes(e){return this.excluded.indexOf(e)>-1}}class $f{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=zh.from(e.nodes),t.marks=zh.from(e.marks||{}),this.nodes=Nf.compile(this.spec.nodes,this),this.marks=Pf.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;t.contentMatch=n[r]||(n[r]=wf.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==i?null:i?Rf(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?[]:Rf(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 Nf))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new vf(n,n.defaultAttrs,e,Gh.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return yf.fromJSON(this,e)}markFromJSON(e){return Gh.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Rf(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 new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Bf{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&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 Wf(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Wf(this,t,!0);return n.addAll(e,t.from,t.to),Xh.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Zf(e,n.tag)&&(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=Kf(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=Kf(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Bf(e,Bf.schemaRules(e)))}}const qf={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},Ff={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Lf={ol:!0,ul:!0},Vf=1,jf=2,zf=4;function Hf(e,t,n){return null!=t?(t?Vf:0)|("full"===t?jf:0):e&&"pre"==e.whitespace?Vf|jf:n&~zf}class Uf{constructor(e,t,n,r,i,o,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=Gh.none,this.stashMarks=[],this.match=o||(s&zf?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Wh.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Vf)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=Wh.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Wh.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):Jf(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!qf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Wf{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,i=t.topNode,o=Hf(null,t.preserveWhitespace,0)|(n?zf:0);r=i?new Uf(i.type,i.attrs,Gh.none,Gh.none,!0,t.topMatch||i.type.contentMatch,o):new Uf(n?null:e.schema.topNodeType,null,Gh.none,Gh.none,!0,null,o),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(n.options&jf||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(n.options&Vf)t=n.options&jf?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=e.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();Lf.hasOwnProperty(r)&&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&&Lf.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(i?i.ignore:Ff.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let t,n=this.top,o=this.needsBlock;if(qf.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=o}else this.addElementByRule(e,i,!1===i.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Gh.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let i=this.parser.matchStyle(e[n],e[n+1],this,r);if(!i)continue e;if(i.ignore)return null;if(t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),!1!==i.consuming)break;r=i}return t}addElementByRule(e,t,n){let r,i,o;t.node?(i=this.parser.schema.nodes[t.node],i.isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):r=this.enter(i,t.attrs||null,t.preserveWhitespace)):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let s=this.top;if(i&&i.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,o&&this.removePendingMark(o,s)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let o=Hf(e,r,i.options);i.options&zf&&0==i.content.length&&(o|=zf),this.nodes.push(new Uf(e,t,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}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;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 a=t[e];if(""==a){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!=a&&-1==e.groups.indexOf(a))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];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function Zf(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Kf(e){let t={};for(let n in e)t[n]=e[n];return t}function Jf(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)return!0;if(o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}class Gf{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Xf(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]){if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}else 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}=Gf.renderSpec(Xf(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new 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&&Gf.renderSpec(Xf(n),r(e,t))}static renderSpec(e,t,n=null){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 r,i=t[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s=n?e.createElementNS(n,i):e.createElement(i),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let i=l;i<t.length;i++){let o=t[i];if(0===o){if(i<t.length-1||i>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:i}=Gf.renderSpec(e,o,n);if(s.appendChild(t),i){if(r)throw new RangeError("Multiple content holes");r=i}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Gf(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Yf(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Yf(e.marks)}}function Yf(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Xf(e){return e.document||window.document}const Qf=Math.pow(2,16);function em(e,t){return e+t*Qf}function tm(e){return 65535&e}class nm{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 rm{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&rm.empty)return rm.empty}recover(e){let t=0,n=tm(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+function(e){return(e-(65535&e))/Qf}(e)}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,i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+i],c=this.ranges[s+o],d=a+l;if(e<=d){let i=a+r+((l?e==a?-1:e==d?1:t:t)<0?0:c);if(n)return i;let o=e==(t<0?a:d)?null:em(s/3,e-a),u=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(u|=8),new nm(i,u,o)}r+=c-l}return n?e+r:new nm(e+r,0,null)}touches(e,t){let n=0,r=tm(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 a=this.ranges[t+i];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+o]-a}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),a=o+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),i+=c-l}}invert(){return new rm(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?rm.empty:new rm(e<0?[0,-e,0]:[0,0,e])}}rm.empty=new rm([]);class im{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new im(this.maps,this.mirror,e,t)}copy(){return new im(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){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 im;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 nm(e,r,null)}}const om=Object.create(null);class sm{getMap(){return rm.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=om[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in om)throw new RangeError("Duplicate use of step JSON ID "+e);return om[e]=t,t.prototype.jsonID=e,t}}class am{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new am(e,null)}static fail(e){return new am(null,e)}static fromReplace(e,t,n,r){try{return am.ok(e.replace(t,n,r))}catch(e){if(e instanceof Yh)return am.fail(e.message);throw e}}}function lm(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(lm(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Wh.fromArray(r)}class cm extends sm{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),r=n.node(n.sharedDepth(this.to)),i=new Xh(lm(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return am.fromReplace(e,this.from,this.to,i)}invert(){return new dm(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 cm(t.pos,n.pos,this.mark)}merge(e){return e instanceof cm&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new cm(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 new RangeError("Invalid input for AddMarkStep.fromJSON");return new cm(t.from,t.to,e.markFromJSON(t.mark))}}sm.jsonID("addMark",cm);class dm extends sm{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=new Xh(lm(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return am.fromReplace(e,this.from,this.to,n)}invert(){return new cm(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 dm(t.pos,n.pos,this.mark)}merge(e){return e instanceof dm&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dm(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 new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new dm(t.from,t.to,e.markFromJSON(t.mark))}}sm.jsonID("removeMark",dm);class um extends sm{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return am.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return am.fromReplace(e,this.pos,this.pos+1,new Xh(Wh.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 um(this.pos,t.marks[n]);return new um(this.pos,this.mark)}}return new pm(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new um(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 new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new um(t.pos,e.markFromJSON(t.mark))}}sm.jsonID("addNodeMark",um);class pm extends sm{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return am.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return am.fromReplace(e,this.pos,this.pos+1,new Xh(Wh.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new um(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new pm(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 new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new pm(t.pos,e.markFromJSON(t.mark))}}sm.jsonID("removeNodeMark",pm);class hm extends sm{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&mm(e,this.from,this.to)?am.fail("Structure replace would overwrite content"):am.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new rm([this.from,this.to-this.from,this.slice.size])}invert(e){return new hm(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 hm(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof hm)||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?Xh.empty:new Xh(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new hm(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?Xh.empty:new Xh(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new hm(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 new RangeError("Invalid input for ReplaceStep.fromJSON");return new hm(t.from,t.to,Xh.fromJSON(e,t.slice),!!t.structure)}}sm.jsonID("replace",hm);class fm extends sm{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&&(mm(e,this.from,this.gapFrom)||mm(e,this.gapTo,this.to)))return am.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return am.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?am.fromReplace(e,this.from,this.to,n):am.fail("Content does not fit in gap")}getMap(){return new rm([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 fm(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=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new fm(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 new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new fm(t.from,t.to,t.gapFrom,t.gapTo,Xh.fromJSON(e,t.slice),t.insert,!!t.structure)}}function mm(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&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 gm(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ym(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||!gm(r,i,o))break}return null}function vm(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 a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return o?i.map(bm).concat({type:t,attrs:n}).concat(o.map(bm)):null}function bm(e){return{type:e,attrs:null}}function wm(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),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function xm(e,t){let n=e.resolve(t),r=n.index();return function(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Sm(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),a=!1;if(1==e)a=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(o,o,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function km(e,t,n=t,r=Xh.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return Cm(i,o,r)?new hm(t,n,r):new _m(i,o,r).fit()}function Cm(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}sm.jsonID("replaceAround",fm);class _m{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Wh.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=Wh.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,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let a=new Xh(i,o,s);return e>-1?new fm(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new hm(n.pos,r.pos,a):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=Om(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let i=n.firstChild;for(let n=this.depth;n>=0;n--){let o,{type:s,match:a}=this.frontier[n],l=null;if(1==e&&(i?a.matchType(i.type)||(l=a.fillBefore(Wh.from(i),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:l};if(2==e&&i&&(o=a.findWrapping(i.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:o};if(r&&a.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Om(e,t);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new Xh(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Om(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new Xh(Am(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new Xh(Am(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let o=this.unplaced,s=n?n.content:o.content,a=o.openStart-e,l=0,c=[],{match:d,type:u}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));d=d.matchFragment(r)}let p=s.size+e-(o.content.size-o.openEnd);for(;l<s.childCount;){let e=s.child(l),t=d.matchType(e.type);if(!t)break;l++,(l>1||0==a||e.content.size)&&(d=t,c.push(Tm(e.mark(u.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?p:-1)))}let h=l==s.childCount;h||(p=-1),this.placed=Em(this.placed,t,Wh.from(c)),this.frontier[t].match=d,h&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=h?0==e?Xh.empty:new Xh(Am(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new Xh(Am(o.content,e,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Dm(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.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){e: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=Dm(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=Dm(e,n,r,t,!0);if(!i||i.childCount)continue e}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=Em(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 r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Em(this.placed,this.depth,Wh.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Wh.empty,!0);e.childCount&&(this.placed=Em(this.placed,this.frontier.length,e))}}function Am(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Am(e.firstChild.content,t-1,n)))}function Em(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Em(e.lastChild.content,t-1,n)))}function Om(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Tm(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Tm(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Wh.empty,!0)))),e.copy(r)}function Dm(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 a=r.fillBefore(o.content,!0,s);return a&&!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)?a:null}function Mm(e){return e.spec.defining||e.spec.definingForContent}function Nm(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(Nm(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Wh.empty,!0))}return e}function Im(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(i<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}class Pm extends sm{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 am.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 r=t.type.create(n,null,t.marks);return am.fromReplace(e,this.pos,this.pos+1,new Xh(Wh.from(r),0,t.isLeaf?0:1))}getMap(){return rm.empty}invert(e){return new Pm(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 Pm(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 new RangeError("Invalid input for AttrStep.fromJSON");return new Pm(t.pos,t.attr,t.value)}}sm.jsonID("attr",Pm);let $m=class extends Error{};$m=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},($m.prototype=Object.create(Error.prototype)).constructor=$m,$m.prototype.name="TransformError";class Rm{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new im}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new $m(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=Xh.empty){let r=km(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new Xh(Wh.from(n),0,0))}delete(e,t){return this.replace(e,t,Xh.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(Cm(i,o,r))return e.step(new hm(t,n,r));let s=Im(i,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:i.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],d=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){let t=c[e].type,n=Mm(t);if(n&&i.node(l).type!=t)d=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let a=(t+d+1)%(r.openStart+1),u=c[a];if(u)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],d=!0;c<0&&(d=!1,c=-c);let p=i.node(c-1),h=i.index(c-1);if(p.canReplaceWith(h,h,u.type,u.marks))return e.replace(i.before(c),d?o.after(c):n,new Xh(Nm(r.content,0,r.openStart,a),a,r.openEnd))}}let u=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,n,r),!(e.steps.length>u));a--){let e=s[a];e<0||(t=i.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=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)return null}return null}(e.doc,t,r.type);null!=i&&(t=n=i)}e.replaceRange(t,n,new Xh(Wh.from(r),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=Im(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)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:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),l=s,c=a,d=Wh.empty,u=0;for(let e=o,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,d=Wh.from(r.node(e).copy(d)),u++):l--;let p=Wh.empty,h=0;for(let e=o,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,p=Wh.from(i.node(e).copy(p)),h++):c++;e.step(new fm(l,c,s,a,new Xh(d.append(p),u,h),d.size-u,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new hm(t-n,t+n,Xh.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=Wh.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Wh.from(n[e].type.create(n[e].attrs,r))}let i=t.start,o=t.end;e.step(new fm(i,o,i,o,new Xh(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,i)&&function(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(e.doc,e.mapping.slice(o).map(n),r)){e.clearIncompatible(e.mapping.slice(o).map(n,1),r);let s=e.mapping.slice(o),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new fm(a,l,a+1,l-1,new Xh(Wh.from(r.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new fm(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Xh(Wh.from(s),0,0),1,!0))}(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Pm(e,t,n)),this}addNodeMark(e,t){return this.step(new um(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Gh)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new pm(e,t)),this}split(e,t=1,n){return function(e,t,n=1,r){let i=e.doc.resolve(t),o=Wh.empty,s=Wh.empty;for(let e=i.depth,t=i.depth-n,a=n-1;e>t;e--,a--){o=Wh.from(i.node(e).copy(o));let t=r&&r[a];s=Wh.from(t?t.type.create(t.attrs,s):i.node(e).copy(s))}e.step(new hm(t,t,new Xh(o.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let i,o,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let d=e.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),u=Math.min(l+e.nodeSize,n),p=r.addToSet(d);for(let e=0;e<d.length;e++)d[e].isInSet(p)||(i&&i.to==c&&i.mark.eq(d[e])?i.to=u:s.push(i=new dm(c,u,d[e])));o&&o.to==c?o.to=u:a.push(o=new cm(c,u,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;o++;let a=null;if(r instanceof Pf){let t,n=e.marks;for(;t=r.isInSet(n);)(a||(a=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;e<a.length;e++){let n,l=a[e];for(let e=0;e<i.length;e++){let t=i[e];t.step==o-1&&l.eq(i[e].style)&&(n=t)}n?(n.to=r,n.step=o):i.push({style:l,from:Math.max(s,t),to:r,step:o})}}})),i.forEach((t=>e.step(new dm(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let i=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<i.childCount;t++){let a=i.child(t),l=s+a.nodeSize,c=r.matchType(a.type);if(c){r=c;for(let t=0;t<a.marks.length;t++)n.allowsMarkType(a.marks[t].type)||e.step(new dm(s,l,a.marks[t]))}else o.push(new hm(s,l,Xh.empty));s=l}if(!r.validEnd){let t=r.fillBefore(Wh.empty,!0);e.replace(s,s,new Xh(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}(this,e,t,n),this}}const Bm=Object.create(null);class qm{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Fm(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=Xh.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],c=e.mapping.slice(i);e.replaceRange(c.map(a.pos),c.map(l.pos),s?Xh.empty:t),0==s&&Jm(e,i,(n?n.isInline:r&&r.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],a=e.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),Jm(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new jm(e):Km(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?Km(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Km(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Wm(e.node(0))}static atStart(e){return Km(e,e,0,0,1)||new Wm(e)}static atEnd(e){return Km(e,e,e.content.size,e.childCount,-1)||new Wm(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Bm[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Bm)throw new RangeError("Duplicate use of selection JSON ID "+e);return Bm[e]=t,t.prototype.jsonID=e,t}getBookmark(){return jm.between(this.$anchor,this.$head).getBookmark()}}qm.prototype.visible=!0;class Fm{constructor(e,t){this.$from=e,this.$to=t}}let Lm=!1;function Vm(e){Lm||e.parent.inlineContent||(Lm=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class jm extends qm{constructor(e,t=e){Vm(e),Vm(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 qm.near(n);let r=e.resolve(t.map(this.anchor));return new jm(r.parent.inlineContent?r:n,n)}replace(e,t=Xh.empty){if(super.replace(e,t),t==Xh.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof jm&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new zm(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 new RangeError("Invalid input for TextSelection.fromJSON");return new jm(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=qm.findFrom(t,n,!0)||qm.findFrom(t,-n,!0);if(!e)return qm.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(qm.findFrom(e,-n,!0)||qm.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new jm(e,t)}}qm.jsonID("text",jm);class zm{constructor(e,t){this.anchor=e,this.head=t}map(e){return new zm(e.map(this.anchor),e.map(this.head))}resolve(e){return jm.between(e.resolve(this.anchor),e.resolve(this.head))}}class Hm extends qm{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?qm.near(i):new Hm(i)}content(){return new Xh(Wh.from(this.node),0,0)}eq(e){return e instanceof Hm&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Um(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Hm(e.resolve(t.anchor))}static create(e,t){return new Hm(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Hm.prototype.visible=!1,qm.jsonID("node",Hm);class Um{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new zm(n,n):new Um(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Hm.isSelectable(n)?new Hm(t):qm.near(t)}}class Wm extends qm{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Xh.empty){if(t==Xh.empty){e.delete(0,e.doc.content.size);let t=qm.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wm(e)}map(e){return new Wm(e)}eq(e){return e instanceof Wm}getBookmark(){return Zm}}qm.jsonID("all",Wm);const Zm={map(){return this},resolve:e=>new Wm(e)};function Km(e,t,n,r,i,o=!1){if(t.inlineContent)return jm.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&&Hm.isSelectable(r))return Hm.create(e,n-(i<0?r.nodeSize:0))}else{let t=Km(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function Jm(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof hm||o instanceof fm)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==i&&(i=r)})),e.setSelection(qm.near(e.doc.resolve(i),n)))}class Gm extends Rm{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 new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return Gh.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)||Gh.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(qm.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 Ym(e,t){return t&&e?e.bind(t):e}class Xm{constructor(e,t,n){this.name=e,this.init=Ym(t.init,n),this.apply=Ym(t.apply,n)}}const Qm=[new Xm("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Xm("selection",{init:(e,t)=>e.selection||qm.atStart(t.doc),apply:e=>e.selection}),new Xm("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Xm("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class eg{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Qm.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new 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 Xm(e.key,e.spec.state,e))}))}}class tg{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 a=r?r[o].n:0,l=r?r[o].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,o)){if(c.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(c),n=n.applyInner(c),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 new RangeError("Applying a mismatched transaction");let t=new tg(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 Gm(this)}static create(e){let t=new eg(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new tg(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 eg(this.schema,e.plugins),n=t.fields,r=new tg(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 new 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 new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new eg(e.schema,e.plugins),i=new tg(r);return r.fields.forEach((r=>{if("doc"==r.name)i.doc=yf.fromJSON(e.schema,t.doc);else if("selection"==r.name)i.selection=qm.fromJSON(i.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let o in n){let s=n[o],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,o))return void(i[r.name]=a.fromJSON.call(s,e,t[o],i))}i[r.name]=r.init(e,i)}})),i}}function ng(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=ng(i,t,{})),n[r]=i}return n}class rg{constructor(e){this.spec=e,this.props={},e.props&&ng(e.props,this,this.props),this.key=e.key?e.key.key:og("plugin")}getState(e){return e[this.key]}}const ig=Object.create(null);function og(e){return e in ig?e+"$"+ ++ig[e]:(ig[e]=0,e+"$")}class sg{constructor(e="key"){this.key=og(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ag=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},lg=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let cg=null;const dg=function(e,t,n){let r=cg||(cg=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},ug=function(e,t,n,r){return n&&(hg(e,t,n,r,-1)||hg(e,t,n,r,1))},pg=/^(img|br|input|textarea|hr)$/i;function hg(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:fg(e))){let n=e.parentNode;if(!n||1!=n.nodeType||mg(e)||pg.test(e.nodeName)||"false"==e.contentEditable)return!1;t=ag(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?fg(e):0}}}function fg(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function mg(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const gg=function(e){return e.focusNode&&ug(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function yg(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const vg="undefined"!=typeof navigator?navigator:null,bg="undefined"!=typeof document?document:null,wg=vg&&vg.userAgent||"",xg=/Edge\/(\d+)/.exec(wg),Sg=/MSIE \d/.exec(wg),kg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(wg),Cg=!!(Sg||kg||xg),_g=Sg?document.documentMode:kg?+kg[1]:xg?+xg[1]:0,Ag=!Cg&&/gecko\/(\d+)/i.test(wg);Ag&&(/Firefox\/(\d+)/.exec(wg)||[0,0])[1];const Eg=!Cg&&/Chrome\/(\d+)/.exec(wg),Og=!!Eg,Tg=Eg?+Eg[1]:0,Dg=!Cg&&!!vg&&/Apple Computer/.test(vg.vendor),Mg=Dg&&(/Mobile\/\w+/.test(wg)||!!vg&&vg.maxTouchPoints>2),Ng=Mg||!!vg&&/Mac/.test(vg.platform),Ig=/Android \d/.test(wg),Pg=!!bg&&"webkitFontSmoothing"in bg.documentElement.style,$g=Pg?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Rg(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Bg(e,t){return"number"==typeof e?e:e[t]}function qg(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Fg(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=lg(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?Rg(o):qg(e),l=0,c=0;if(t.top<a.top+Bg(r,"top")?c=-(a.top-t.top+Bg(i,"top")):t.bottom>a.bottom-Bg(r,"bottom")&&(c=t.bottom-a.bottom+Bg(i,"bottom")),t.left<a.left+Bg(r,"left")?l=-(a.left-t.left+Bg(i,"left")):t.right>a.right-Bg(r,"right")&&(l=t.right-a.right+Bg(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function Lg(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=lg(r));return t}function Vg(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let jg=null;function zg(e,t){let n,r,i=2e8,o=0,s=t.top,a=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=dg(l).getClientRects()}for(let d=0;d<e.length;d++){let u=e[d];if(u.top<=s&&u.bottom>=a){s=Math.max(u.bottom,s),a=Math.min(u.top,a);let e=u.left>t.left?u.left-t.left:u.right<t.left?t.left-u.right:0;if(e<i){n=l,i=e,r=e&&3==n.nodeType?{left:u.right<t.left?u.right:u.left,top:t.top}:t,1==l.nodeType&&e&&(o=c+(t.left>=(u.left+u.right)/2?1:0));continue}}!n&&(t.left>=u.right&&t.top>=u.top||t.left>=u.left&&t.top>=u.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let n=Zg(r,1);if(n.top!=n.bottom&&Hg(t,n))return{node:e,offset:i+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:zg(n,r)}function Hg(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Ug(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=e.childNodes[o];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(Hg(t,i))return Ug(n,t,i)}}if((o=(o+1)%r)==i)break}return e}function Wg(e,t){let n,r=e.dom.ownerDocument,i=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:i}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:i}=e)}let o,s=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!s||!e.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=e.dom.getBoundingClientRect();if(!Hg(t,n))return null;if(s=Ug(e.dom,t,n),!s)return null}if(Dg)for(let e=s;n&&e;e=lg(e))e.draggable&&(n=void 0);if(s=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(s,t),n){if(Ag&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let e,r=n.childNodes[i];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=function(e,t,n,r){let i=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;i=t.posAfter}}n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,1)}(e,n,i,t))}null==o&&(o=function(e,t,n){let{node:r,offset:i}=zg(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:o,inside:a?a.posAtStart-a.border:-1}}function Zg(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const Kg=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Jg(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=Pg||Ag;if(3==r.nodeType){if(!s||!Kg.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,Gg(Zg(dg(r,e,t),1),o<0)}{let e=Zg(dg(r,i,i),n);if(Ag&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Zg(dg(r,i-1,i-1),-1);if(t.top==e.top){let n=Zg(dg(r,i,i+1),-1);if(n.top!=e.top)return Gg(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==fg(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return Yg(e.getBoundingClientRect(),!1)}if(null==o&&i<fg(r)){let e=r.childNodes[i];if(1==e.nodeType)return Yg(e.getBoundingClientRect(),!0)}return Yg(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==fg(r))){let e=r.childNodes[i-1],t=3==e.nodeType?dg(e,fg(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return Gg(Zg(t,1),!1)}if(null==o&&i<fg(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?dg(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return Gg(Zg(t,-1),!0)}return Gg(Zg(3==r.nodeType?dg(r):r,-n),n>=0)}function Gg(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Yg(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Xg(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const Qg=/[\u0590-\u08ac]/;let ey=null,ty=null,ny=!1;class ry{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>ag(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],o=t+i.size;if(o>e||i instanceof dy){r=e-t;break}t=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof iy&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?ag(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?ag(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&e<=a){let i=o+n.border;if(e>=i&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=ag(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=ag(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((Ag||Dg)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(s=a={node:t.parentNode,offset:ag(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(Ag&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&Dg)&&ug(s.node,s.offset,l.anchorNode,l.anchorOffset)&&ug(a.node,a.offset,l.focusNode,l.focusOffset))return;let d=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),d=!0}catch(e){}}if(!d){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s)return this.dirty=e==n||t==o?2:1,void(e!=r||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class iy extends ry{constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class oy extends ry{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class sy extends ry{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],o=i&&i(t,r,n);return o&&o.dom||(o=Gf.renderSpec(document,t.type.spec.toDOM(t,n))),new sy(e,t,o.dom,o.contentDOM||o.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=sy.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;t<o&&(i=ky(i,t,o,n)),e>0&&(i=ky(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}}class ay extends ry{constructor(e,t,n,r,i,o,s,a,l){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,o&&this.updateChildren(a,l)}static create(e,t,n,r,i,o){let s,a=i.nodeViews[t.type.name],l=a&&a(t,i,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:o),n,r),c=l&&l.dom,d=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:d}=Gf.renderSpec(document,t.type.spec.toDOM(t)));d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let u=c;return c=vy(c,n,t),l?s=new uy(e,t,n,r,c,d||null,u,l,i,o+1):t.isText?new cy(e,t,n,r,c,u,i):new ay(e,t,n,r,c,d||null,u,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Wh.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&by(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new xy(this,o&&o.node,e);!function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<i.length&&i[s].to==o){let e,t=i[s++];for(;s<i.length&&i[s].to==o;)(e||(e=[t])).push(i[s++]);if(e){e.sort(Sy);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let d,u;if(l)u=-1,d=l,l=null;else{if(!(c<e.childCount))break;u=c,d=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=o&&a.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let p=o+d.nodeSize;if(d.isText){let e=p;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=d.cut(e-o),d=d.cut(0,e-o),p=e,u=-1)}let h=d.isInline&&!d.isLeaf?a.filter((e=>!e.inline)):a.slice();r(d,h,t.forChild(o,d),u),o=p}}(this.node,this.innerDeco,((t,i,o)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Gh.none:this.node.child(i).marks,n,e),a.placeWidget(t,e,r)}),((t,o,l,c)=>{let d;a.syncToMarks(t.marks,n,e),a.findNodeMatch(t,o,l,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(d=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(t,o,l,d,e)||a.updateNextNode(t,o,l,e,c)||a.addNode(t,o,l,e,r),r+=t.nodeSize})),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(e,o),py(this.contentDOM,this.children,e),Mg&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof jm)||n<t||r>t+this.node.content.size)return null;let i=e.domSelectionRange(),o=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=fg(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,i=function(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;l+=t.text}if(o>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new oy(this,i,t,r);e.input.compositionNodes.push(o),this.children=ky(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(by(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=gy(this.dom,this.nodeDOM,my(this.outerDeco,this.node,t),my(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ly(e,t,n,r,i){return vy(r,t,e),new ay(void 0,e,t,n,r,r,r,i,0)}class cy extends ay{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new cy(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class dy extends ry{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class uy extends ay{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function py(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=wy(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof sy){let t=r?r.previousSibling:e.lastChild;py(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=wy(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const hy=function(e){e&&(this.nodeName=e)};hy.prototype=Object.create(null);const fy=[new hy];function my(e,t,n){if(0==e.length)return fy;let r=n?fy[0]:new hy,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new hy(s.nodeName));for(let e in s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new hy(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}}return i}function gy(e,t,n,r){if(n==fy&&r==fy)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||(t=document.createElement(o.nodeName),t.pmIsDeco=!0,t.appendChild(i),s=fy[0]),i=t}yy(i,s||fy[0],o)}return i}function yy(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function vy(e,t,n){return gy(e,e,fy,my(t,n,1!=e.nodeType))}function by(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function wy(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class xy{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof sy)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[i])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=sy.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(e,t,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0||(this.destroyBetween(this.index,o),this.index++,0))}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,i){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof ay){let a=this.preMatch.matched.get(s);if(null!=a&&a!=i)return!1;let l=s.dom;if((!this.lock||!(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))||e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&3!=s.dirty&&by(t,s.outerDeco))&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,i){this.top.children.splice(this.index++,0,ay.create(this.top,e,t,n,r,i)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new iy(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof sy;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof cy)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Dg||Og)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new dy(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function Sy(e,t){return e.type.side-t.type.side}function ky(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,d=a+=l.size;c>=n||d<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function Cy(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(gg(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&Hm.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==fg(e);r||i;){if(e==n)return!0;let t=ag(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==fg(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Hm(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}return l||(l=Iy(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!o?1:-1)),l}function _y(e){return e.editable?e.hasFocus():$y(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ay(e,t=!1){let n=e.state.selection;if(My(e,n),_y(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Og){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&ug(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,ag(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&Cg&&_g<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,{anchor:o,head:s}=n;!Ey||n instanceof jm||(n.$from.parent.inlineContent||(r=Oy(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Oy(e,n.to))),e.docView.setSelection(o,s,e.root,t),Ey&&(r&&Dy(r),i&&Dy(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{_y(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ey=Dg||Og&&Tg<63;function Oy(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Dg&&i&&"false"==i.contentEditable)return Ty(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return Ty(i);if(o)return Ty(o)}}function Ty(e){return e.contentEditable="true",Dg&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Dy(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function My(e,t){if(t instanceof Hm){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ny(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ny(e)}function Ny(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Iy(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||jm.between(t,n,r)}function Py(e){return!(e.editable&&!e.hasFocus())&&$y(e)}function $y(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Ry(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&qm.findFrom(o,t)}function By(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function qy(e,t,n){let r=e.state.selection;if(!(r instanceof jm)){if(r instanceof Hm&&r.node.isInline)return By(e,new jm(t>0?r.$to:r.$from));{let n=Ry(e.state,t);return!!n&&By(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Ry(e.state,t);return!!(n&&n instanceof Hm)&&By(e,n)}if(!(Ng&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Hm.isSelectable(o)?By(e,new Hm(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!Pg&&By(e,new jm(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function Fy(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ly(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Vy(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ag&&1==n.nodeType&&r<Fy(n)&&Ly(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Ly(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(zy(n))break;{let t=n.previousSibling;for(;t&&Ly(t);)i=n.parentNode,o=ag(t),t=t.previousSibling;if(t)n=t,r=Fy(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Hy(e,n,r):i&&Hy(e,i,o)}function jy(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=Fy(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Ly(n.childNodes[r]))break;i=n,o=++r}else{if(zy(n))break;{let t=n.nextSibling;for(;t&&Ly(t);)i=t.parentNode,o=ag(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=Fy(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&Hy(e,i,o)}function zy(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Hy(e,t,n){let r=e.domSelection();if(gg(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&Ay(e)}),50)}function Uy(e,t,n){let r=e.state.selection;if(r instanceof jm&&!r.empty||n.indexOf("s")>-1)return!1;if(Ng&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Ry(e.state,t);if(n&&n instanceof Hm)return By(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof Wm?qm.near(n,t):qm.findFrom(n,t);return!!s&&By(e,s)}return!1}function Wy(e,t){if(!(e.state.selection instanceof jm))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function Zy(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ky(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Gf.fromSchema(e.state.schema),a=iv(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,d=l.firstChild,u=0;for(;d&&1==d.nodeType&&(c=nv[d.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),u++}d=l.firstChild}d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${i} ${o}${u?` -${u}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:l,text:p}}function Jy(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(n=>{t=n(t,a||r,e)})),a)return t?new Xh(Wh.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Xh.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,i,r,e)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Gf.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),o=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=iv().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);if((n=i&&nv[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),Pg&&function(e){let t=e.querySelectorAll(Og?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=o.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;o=e}if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||Bf.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!d),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Gy.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(d)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=Wh.from(t.create(n[e+1],i)),o++,s++}return new Xh(i,o,s)}(tv(s,+d[1],+d[2]),d[4]);else if(s=Xh.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&Xy(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=Qy(o[o.length-1],r.length));let t=Yy(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return Wh.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=tv(s,e,t)}return e.someProp("transformPasted",(t=>{s=t(s,e)})),s}const Gy=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Yy(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Wh.from(e));return e}function Xy(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=Xy(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Wh.from(Yy(n,e,i+1))))}}function Qy(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,Qy(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Wh.empty,!0);return e.copy(n.append(r))}function ev(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=ev(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Wh.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function tv(e,t,n){return t<e.openStart&&(e=new Xh(ev(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Xh(ev(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const nv={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let rv=null;function iv(){return rv||(rv=document.implementation.createHTMLDocument("title"))}const ov={},sv={},av={touchstart:!0,touchmove:!0};class lv{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function cv(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function dv(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>uv(e,t))}))}function uv(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function pv(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function hv(e){return{left:e.clientX,top:e.clientY}}function fv(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function mv(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function gv(e,t,n,r){return fv(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function yv(e,t,n,r){return fv(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(mv(e,jm.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),o=i.before(t);if(n.inlineContent)mv(e,jm.create(r,o+1,o+1+n.content.size),"pointer");else{if(!Hm.isSelectable(n))continue;mv(e,Hm.create(r,o),"pointer")}return!0}}(e,n,r)}function vv(e){return _v(e)}sv.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!xv(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Ig||!Og||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Mg||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||function(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Ng&&72==n&&"c"==r?Wy(e,-1)||Vy(e):46==n||Ng&&68==n&&"c"==r?Wy(e,1)||jy(e):13==n||27==n||(37==n||Ng&&66==n&&"c"==r?qy(e,-1,r)||Vy(e):39==n||Ng&&70==n&&"c"==r?qy(e,1,r)||jy(e):38==n||Ng&&80==n&&"c"==r?Uy(e,-1,r)||Vy(e):40==n||Ng&&78==n&&"c"==r?function(e){if(!Dg||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Zy(e,n,"true"),setTimeout((()=>Zy(e,n,"false")),20)}return!1}(e)||Uy(e,1,r)||jy(e):r==(Ng?"m":"c")&&(66==n||73==n||89==n||90==n))}(e,n)?n.preventDefault():cv(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,yg(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},sv.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},sv.keypress=(e,t)=>{let n=t;if(xv(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ng&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof jm&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const bv=Ng?"metaKey":"ctrlKey";ov.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=vv(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[bv]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(hv(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new wv(e,s,n,!!r)):("doubleClick"==o?gv:yv)(e,s.pos,s.inside,n)?n.preventDefault():cv(e,"pointer"))};class wv{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[bv],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Hm&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ag||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),cv(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Ay(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(hv(e))),this.updateAllowDefault(e),this.allowDefault||!t?cv(this.view,"pointer"):function(e,t,n,r,i){return fv(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof Hm&&(n=i.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(Hm.isSelectable(t)){r=n&&i.$from.depth>0&&e>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(e);break}}return null!=r&&(mv(e,Hm.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Hm.isSelectable(r))&&(mv(e,new Hm(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Dg&&this.mightDrag&&!this.mightDrag.node.isAtom||Og&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(mv(this.view,qm.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):cv(this.view,"pointer")}move(e){this.updateAllowDefault(e),cv(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function xv(e,t){return!!e.composing||!!(Dg&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ov.touchstart=e=>{e.input.lastTouch=Date.now(),vv(e),cv(e,"pointer")},ov.touchmove=e=>{e.input.lastTouch=Date.now(),cv(e,"pointer")},ov.contextmenu=e=>vv(e);const Sv=Ig?5e3:-1;function kv(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>_v(e)),t))}function Cv(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function _v(e,t=!1){if(!(Ig&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Cv(e),t||e.docView&&e.docView.dirty){let t=Cy(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}sv.compositionstart=sv.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),_v(e,!0),e.markCursor=null;else if(_v(e),Ag&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}kv(e,Sv)},sv.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,kv(e,20))};const Av=Cg&&_g<15||Mg&&$g<604;function Ev(e,t,n,r){let i=Jy(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||Xh.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ov.copy=sv.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=Av?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Ky(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},sv.paste=(e,t)=>{let n=t;if(e.composing&&!Ig)return;let r=Av?null:n.clipboardData;r&&Ev(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ev(e,r.value,null,t):Ev(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Ov{constructor(e,t){this.slice=e,this.move=t}}const Tv=Ng?"altKey":"ctrlKey";ov.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(hv(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof Hm?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Hm.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Hm.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=Ky(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Av?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Av||n.dataTransfer.setData("text/plain",l),e.dragging=new Ov(s,!n[Tv])},ov.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},sv.dragover=sv.dragenter=(e,t)=>t.preventDefault(),sv.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(hv(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",(t=>{s=t(s,e)})):s=Jy(e,n.dataTransfer.getData(Av?"Text":"text/plain"),Av?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[Tv]);if(e.someProp("handleDrop",(t=>t(e,n,s||Xh.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?Sm(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let d=c.mapping.map(l),u=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(u?c.replaceRangeWith(d,d,s.content.firstChild):c.replaceRange(d,d,s),c.doc.eq(p))return;let h=c.doc.resolve(d);if(u&&Hm.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Hm(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(Iy(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},ov.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ay(e)}),20))},ov.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ov.beforeinput=(e,t)=>{if(Og&&Ig&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,yg(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in sv)ov[e]=sv[e];function Dv(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Mv{constructor(e,t){this.toDOM=e,this.spec=t||Rv,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new Pv(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Mv&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Dv(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Nv{constructor(e,t){this.attrs=e,this.spec=t||Rv}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Pv(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Nv&&Dv(this.attrs,e.attrs)&&Dv(this.spec,e.spec)}static is(e){return e.type instanceof Nv}destroy(){}}class Iv{constructor(e,t){this.attrs=e,this.spec=t||Rv}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Pv(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof Iv&&Dv(this.attrs,e.attrs)&&Dv(this.spec,e.spec)}destroy(){}}class Pv{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Pv(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Pv(e,e,new Mv(t,n))}static inline(e,t,n,r){return new Pv(e,t,new Nv(n,r))}static node(e,t,n,r){return new Pv(e,t,new Iv(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Nv}}const $v=[],Rv={};class Bv{constructor(e,t){this.local=e.length?e:$v,this.children=t.length?t:$v}static create(e,t){return t.length?zv(t,e,0,Rv):qv}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==qv||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Rv)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,o,s)=>{let l=s-o-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let d=a[s]+t-r;n>=d?a[s+1]=e<=d?-2:-1:o>=i&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+o),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let u=n.map(e[t+1]+o,-1)-i,{index:p,offset:h}=r.content.findIndex(d),f=r.maybeChild(p);if(f&&h==d&&h+f.nodeSize==u){let r=a[t+2].mapInner(n,f,c+1,e[t]+o+1,s);r!=qv?(a[t]=d,a[t+1]=u,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+o+1);return n}(a,e,t,n,i,o,s),c=zv(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new Bv(t.sort(Hv),a)}(this.children,o||[],e,t,n,r,i):o?new Bv(o.sort(Hv),$v):qv}add(e,t){return t.length?this==qv?Bv.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=Vv(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,zv(s,e,a+1,Rv)),i+=3}}));let o=Lv(i?jv(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new Bv(o.length?this.local.concat(o).sort(Hv):this.local,r||this.children)}remove(e){return 0==e.length||this==qv?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=qv?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Bv(r,n):qv}forChild(e,t){if(this==qv)return this;if(t.isLeaf)return Bv.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof Nv){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new Bv(r.sort(Hv),$v);return n?new Fv([e,n]):e}return n||qv}eq(e){if(this==e)return!0;if(!(e instanceof Bv)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Uv(this.localsInner(e))}localsInner(e){if(this==qv)return $v;if(e.inlineContent||!this.local.some(Nv.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Nv||t.push(this.local[e]);return t}}Bv.empty=new Bv([],[]),Bv.removeOverlap=Uv;const qv=Bv.empty;class Fv{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,Rv)));return Fv.from(n)}forChild(e,t){if(t.isLeaf)return Bv.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=qv&&(i instanceof Fv?n=n.concat(i.members):n.push(i))}return Fv.from(n)}eq(e){if(!(e instanceof Fv)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?Uv(n?t:t.sort(Hv)):$v}static from(e){switch(e.length){case 0:return qv;case 1:return e[0];default:return new Fv(e.every((e=>e instanceof Bv))?e:e.reduce(((e,t)=>e.concat(t instanceof Bv?t:t.members)),[]))}}}function Lv(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Pv(i.from+t,i.to+t,i.type))}return n}function Vv(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}function jv(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function zv(e,t,n,r){let i=[],o=!1;t.forEach(((t,s)=>{let a=Vv(e,t,s+n);if(a){o=!0;let e=zv(a,t,n+s+1,r);e!=qv&&i.push(s,s+t.nodeSize,e)}}));let s=Lv(o?jv(e):e,-n).sort(Hv);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new Bv(s,i):qv}function Hv(e,t){return e.from-t.from||e.to-t.to}function Uv(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),Wv(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),Wv(t,i+1,o.copy(r.to,o.to)))}}return t}function Wv(e,t,n){for(;t<e.length&&Hv(n,e[t])>0;)t++;e.splice(t,0,n)}function Zv(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=qv&&t.push(r)})),e.cursorWrapper&&t.push(Bv.create(e.state.doc,[e.cursorWrapper.deco])),Fv.from(t)}const Kv={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Jv=Cg&&_g<=11;class Gv{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Yv{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Gv,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);Cg&&_g<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Jv&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Kv)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Py(this.view)){if(this.suppressingSelectionUpdates)return Ay(this.view);if(Cg&&_g<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ug(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let t=e.focusNode;t;t=lg(t))n.add(t);for(let r=e.anchorNode;r;r=lg(r))if(n.has(r)){t=r;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Py(e)&&!this.ignoreSelectionChange(n),i=-1,o=-1,s=!1,a=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],a);n&&(i=i<0?n.from:Math.min(n.from,i),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(s=!0))}if(Ag&&a.length>1){let e=a.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let l=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch<Date.now()-300&&gg(n)&&(l=Cy(e))&&l.eq(qm.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ay(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,o),function(e){if(!Xv.has(e)&&(Xv.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=Ag,Qv)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Qv=!0}}(e)),this.handleDOMChange(i,o,s,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ay(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(Cg&&_g<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:o}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(e.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==e.target?ag(r)+1:0,s=n.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?ag(i):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let Xv=new WeakMap,Qv=!1;function eb(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Dg&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||Dg&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function tb(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Iy(e,t.resolve(n.anchor),t.resolve(n.head))}function nb(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}class rb{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new lv,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(lb),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=sb(this),ob(this),this.nodeViews=ab(this),this.docView=ly(this.state.doc,ib(this),Zv(this),this.dom,this),this.domObserver=new Yv(this,((e,t,n,r)=>function(e,t,n,r,i){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Cy(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a,l,c=e.state.selection,d=function(e,t,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelectionRange(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],gg(c)||r.push({node:c.focusNode,offset:c.focusOffset})),Og&&8===e.input.lastKeyCode)for(let e=s;e>o;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let u=e.state.doc,p=e.someProp("domParser")||Bf.fromSchema(e.state.schema),h=u.resolve(a),f=null,m=p.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:eb,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,n),u=e.state.doc,p=u.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(a=e.state.selection.to,l="end"):(a=e.state.selection.from,l="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==i&&(r-=s+Math.max(0,o-Math.min(s,a))-o),s<o&&e.size<t.size?(o-=r<=o&&r>=s?o-r:0,a=o+(a-s),s=o):a<o&&(o-=r<=o&&r>=a?o-r:0,s=o+(s-a),a=o),{start:o,endA:s,endB:a}}(p.content,d.doc.content,d.from,a,l);if((Mg&&e.input.lastIOSEnter>Date.now()-225||Ig)&&i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName||"LI"==e.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,yg(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&c instanceof jm&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let t=tb(e,e.state.doc,d.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}h={start:c.from,endA:c.to,endB:c.to}}if(Og&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from&&d.sel.head==d.sel.anchor){let e=h.endB-h.start;d.sel={anchor:d.sel.anchor+e,head:d.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof jm&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Cg&&_g<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>d.from&&" "==d.doc.textBetween(h.start-d.from-1,h.start-d.from+1)&&(h.start--,h.endA--,h.endB--);let f,m=d.doc.resolveNoCache(h.start-d.from),g=d.doc.resolveNoCache(h.endB-d.from),y=u.resolve(h.start),v=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=h.endA;if((Mg&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!v&&m.pos<d.doc.content.size&&(f=qm.findFrom(d.doc.resolve(m.pos+1),1,!0))&&f.head==g.pos)&&e.someProp("handleKeyDown",(t=>t(e,yg(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||nb(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(nb(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||nb(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(u,h.start,h.endA,m,g)&&e.someProp("handleKeyDown",(t=>t(e,yg(8,"Backspace")))))return void(Ig&&Og&&e.domObserver.suppressSelectionUpdates());Og&&Ig&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),Ig&&!v&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==h.endA&&(h.endB-=2,g=d.doc.resolveNoCache(h.endB-d.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,yg(13,"Enter"))}))}),20));let b,w,x,S=h.start,k=h.endA;if(v)if(m.pos==g.pos)Cg&&_g<=11&&0==m.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ay(e)),20)),b=e.state.tr.delete(S,k),w=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&(x=function(e,t){let n,r,i,o=e.firstChild.marks,s=t.firstChild.marks,a=o,l=s;for(let e=0;e<s.length;e++)a=s[e].removeFromSet(a);for(let e=0;e<o.length;e++)l=o[e].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(i(t.child(e)));if(Wh.from(c).eq(e))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))b=e.state.tr,"add"==x.type?b.addMark(S,k,x.mark):b.removeMark(S,k,x.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let t=m.parent.textBetween(m.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,S,k,t))))return;b=e.state.tr.insertText(t,S,k)}if(b||(b=e.state.tr.replace(S,k,d.doc.slice(h.start-d.from,h.endB-d.from))),d.sel){let t=tb(e,b.doc,d.sel);t&&!(Og&&Ig&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==S||t.head==b.mapping.map(k)-1)||Cg&&t.empty&&t.head==S)&&b.setSelection(t)}w&&b.ensureMarks(w),e.dispatch(b.scrollIntoView())}(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in ov){let n=ov[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!pv(e,t)||uv(e,t)||!e.editable&&t.type in sv||n(e,t)},av[t]?{passive:!0}:void 0)}Dg&&e.dom.addEventListener("input",(()=>null)),dv(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&dv(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(lb),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(Cv(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=ab(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&dv(this),this.editable=sb(this),ob(this);let s=Zv(this),a=ib(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(i=!0);let d="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:Lg(e.dom)}}(this);if(i){this.domObserver.stop();let t=c&&(Cg||Og)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=Og?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(e.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ly(e.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return ug(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Ay(this,t):(My(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;Vg(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof Hm){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&Fg(this,t.getBoundingClientRect(),e)}else Fg(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[e];if(null!=i&&(n=t?t(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[e];if(null!=o&&(n=t?t(o):o))return n}}hasFocus(){if(Cg){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(jg)return e.focus(jg);let t=Lg(e);e.focus(null==jg?{get preventScroll(){return jg={preventScroll:!0},!0}}:void 0),jg||(jg=!1,Vg(t,0))}(this.dom),Ay(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return Wg(this,e)}coordsAtPos(e,t=1){return Jg(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return ey==t&&ty==n?ny:(ey=t,ty=n,ny="up"==n||"down"==n?function(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return Xg(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=Jg(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=dg(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return Qg.test(r.parent.textContent)&&a.modify?Xg(e,t,(()=>{let{focusNode:t,focusOffset:i,anchorNode:o,anchorOffset:s}=e.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:d,focusOffset:u}=e.domSelectionRange(),p=d&&!c.contains(1==d.nodeType?d:d.parentNode)||t==d&&i==u;try{a.collapse(o,s),t&&(t!=o||i!=s)&&a.extend&&a.extend(t,i)}catch(e){}return null!=l&&(a.caretBidiLevel=l),p})):"left"==n||"backward"==n?o:s}(e,t,n))}(this,t||this.state,e)}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Zv(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){uv(e,t)||!ov[t.type]||!e.editable&&t.type in sv||ov[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return Dg&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function(e){let t;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return ug(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function ib(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[Pv.node(0,e.state.doc.content.size,t)]}function ob(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Pv.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function sb(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function ab(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function lb(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}function cb(e={}){return new rg({view:t=>new db(t,e)})}class db{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=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=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(t){let i=t.getBoundingClientRect(),o=n?i.bottom:i.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:i.left,right:i.right,top:o-this.width/2,bottom:o+this.width/2}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!i||i==document.body&&"static"==getComputedStyle(i).position)n=-pageXOffset,r=-pageYOffset;else{let e=i.getBoundingClientRect();n=e.left-i.scrollLeft,r=e.top-i.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"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&&(e=Sm(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}for(var ub={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:"'"},pb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},hb="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),fb=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),mb="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),gb=fb||hb&&+hb[1]<57,yb=0;yb<10;yb++)ub[48+yb]=ub[96+yb]=String(yb);for(yb=1;yb<=24;yb++)ub[yb+111]="F"+yb;for(yb=65;yb<=90;yb++)ub[yb]=String.fromCharCode(yb+32),pb[yb]=String.fromCharCode(yb);for(var vb in ub)pb.hasOwnProperty(vb)||(pb[vb]=ub[vb]);const bb="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function wb(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))throw new Error("Unrecognized modifier name: "+s);bb?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function xb(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function Sb(e){return new rg({props:{handleKeyDown:kb(e)}})}function kb(e){let t=function(e){let t=Object.create(null);for(let n in e)t[wb(n)]=e[n];return t}(e);return function(e,n){let r,i=function(e){var t=!(gb&&(e.ctrlKey||e.altKey||e.metaKey)||mb&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?pb:ub)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),o=1==i.length&&" "!=i,s=t[xb(i,n,!o)];if(s&&s(e.state,e.dispatch,e))return!0;if(o&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=ub[n.keyCode])&&r!=i){let i=t[xb(r,n,!0)];if(i&&i(e.state,e.dispatch,e))return!0}else if(o&&n.shiftKey){let r=t[xb(i,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}class Cb extends qm{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return Cb.valid(n)?new Cb(n):qm.near(n)}content(){return Xh.empty}eq(e){return e instanceof Cb&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new Cb(e.resolve(t.pos))}getBookmark(){return new _b(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)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}else if(r.type.spec.isolating)return!0}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)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}else if(r.type.spec.isolating)return!0}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){e:for(;;){if(!n&&Cb.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(Cb.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!Hm.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(Cb.valid(s))return s}return null}}}Cb.prototype.visible=!1,Cb.findFrom=Cb.findGapCursorFrom,qm.jsonID("gapcursor",Cb);class _b{constructor(e){this.pos=e}map(e){return new _b(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Cb.valid(t)?new Cb(t):qm.near(t)}}const Ab=kb({ArrowLeft:Eb("horiz",-1),ArrowRight:Eb("horiz",1),ArrowUp:Eb("vert",-1),ArrowDown:Eb("vert",1)});function Eb(e,t){const 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,a=o.empty;if(o instanceof jm){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=Cb.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new Cb(l))),!0)}}function Ob(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Cb.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&Hm.isSelectable(e.state.doc.nodeAt(i.inside))||(e.dispatch(e.state.tr.setSelection(new Cb(r))),0))}function Tb(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof Cb))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=Wh.empty;for(let e=r.length-1;e>=0;e--)i=Wh.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Xh(i,0,0));return o.setSelection(jm.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function Db(e){if(!(e.selection instanceof Cb))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Bv.create(e.doc,[Pv.widget(e.selection.head,t,{key:"gapcursor"})])}const Mb=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Nb(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function Ib(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 Pb(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}function $b(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Rb=(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),o=n.indexAfter(-1),s=$b(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(qm.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0};function Bb(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!i.isTextblock&&!xm(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=t.pos+s.nodeSize,a=Wh.empty;for(let e=r.length-1;e>=0;e--)a=Wh.from(r[e].create(null,a));a=Wh.from(o.copy(a));let l=e.tr.step(new fm(t.pos-1,i,t.pos,i,new Xh(a,1,0),r.length,!0)),c=i+2*r.length;xm(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=qm.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),d=c&&ym(c);if(null!=d&&d>=t.depth)return n&&n(e.tr.lift(c,d).scrollIntoView()),!0;if(a&&Nb(s,"start",!0)&&Nb(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=Wh.empty;for(let e=i.length-1;e>=0;e--)r=Wh.from(i[e].copy(r));n(e.tr.step(new fm(t.pos-i.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new Xh(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function qb(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(jm.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const Fb=qb(-1),Lb=qb(1);function Vb(e,t=null){return function(n,r){let{from:i,to:o}=n.selection,s=!1;return n.doc.nodesBetween(i,o,((r,i)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(i),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,o,e,t).scrollIntoView()),!0)}}function jb(e,t=null){return function(n,r){let{empty:i,$cursor:o,ranges:s}=n.selection;if(i&&!o||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:i,$to:o}=t[r],s=0==i.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,o.pos,(e=>{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(o)e.isInSet(n.storedMarks||o.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let i=!1,o=n.tr;for(let t=0;!i&&t<s.length;t++){let{$from:r,$to:o}=s[t];i=n.doc.rangeHasMark(r.pos,o.pos,e)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(i)o.removeMark(r.pos,a.pos,e);else{let n=r.pos,i=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,d=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<i&&(n+=c,i-=d),o.addMark(n,i,e.create(t))}}r(o.scrollIntoView())}return!0}}function zb(...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 Hb=zb(Mb,((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=Ib(r);if(!i){let n=r.blockRange(),i=n&&ym(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&Bb(e,i,t))return!0;if(0==r.parent.content.size&&(Nb(o,"end")||Hm.isSelectable(o))){let n=km(e.doc,r.before(),r.after(),Xh.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Nb(o,"end")?qm.findFrom(r.doc.resolve(r.mapping.map(i.pos,-1)),-1):Hm.create(r.doc,i.pos-o.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),0))}),((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=Ib(r)}let s=o&&o.nodeBefore;return!(!s||!Hm.isSelectable(s)||(t&&t(e.tr.setSelection(Hm.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),0))})),Ub=zb(Mb,((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let i=Pb(r);if(!i)return!1;let o=i.nodeAfter;if(Bb(e,i,t))return!0;if(0==r.parent.content.size&&(Nb(o,"start")||Hm.isSelectable(o))){let n=km(e.doc,r.before(),r.after(),Xh.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Nb(o,"start")?qm.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Hm.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),0))}),((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=Pb(r)}let s=o&&o.nodeAfter;return!(!s||!Hm.isSelectable(s)||(t&&t(e.tr.setSelection(Hm.create(e.doc,o.pos)).scrollIntoView()),0))}));const Wb={Enter:zb(((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))}),((e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Wm||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=$b(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(n,o.createAndFill());s.setSelection(jm.create(s.doc,n+1)),t(s.scrollIntoView())}return!0}),((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 r=n.before();if(wm(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&ym(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)}),((e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof Hm&&e.selection.node.isBlock)return!(!n.parentOffset||!wm(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let i=r.parentOffset==r.parent.content.size,o=e.tr;(e.selection instanceof jm||e.selection instanceof Wm)&&o.deleteSelection();let s=0==n.depth?null:$b(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=wm(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!wm(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let e=o.mapping.map(n.before()),t=o.doc.resolve(e);s&&n.node(-1).canReplaceWith(t.index(),t.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}t(o.scrollIntoView())}return!0})),"Mod-Enter":Rb,Backspace:Hb,"Mod-Backspace":Hb,"Shift-Backspace":Hb,Delete:Ub,"Mod-Delete":Ub,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new Wm(e.doc))),!0)},Zb={"Ctrl-h":Wb.Backspace,"Alt-Backspace":Wb["Mod-Backspace"],"Ctrl-d":Wb.Delete,"Ctrl-Alt-Backspace":Wb["Mod-Delete"],"Alt-Delete":Wb["Mod-Delete"],"Alt-d":Wb["Mod-Delete"],"Ctrl-a":Fb,"Ctrl-e":Lb};for(let e in Wb)Zb[e]=Wb[e];const Kb=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?Zb:Wb;class Jb{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,i){let o=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);o+=t[0].slice(e+t[1].length);let n=(r+=e)-i;n>0&&(o=t[0].slice(e-n,e)+o,r=i)}return e.tr.insertText(o,r,i)}):t}}const Gb=500;function Yb({rules:e}){let t=new rg({state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,i,o)=>Xb(n,r,i,o,e,t),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&Xb(n,r.pos,r.pos,"",e,t)}))}}},isInputRules:!0});return t}function Xb(e,t,n,r,i,o){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-Gb),a.parentOffset,null,"")+r;for(let a=0;a<i.length;a++){let c=i[a].match.exec(l),d=c&&i[a].handler(s,c,t-(c[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(o,{transform:d,from:t,to:n,text:r})),!0}return!1}const Qb=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i,o=n[r];if(o.spec.isInputRules&&(i=o.getState(e))){if(t){let n=e.tr,r=i.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(i.text){let t=n.doc.resolve(i.from).marks();n.replaceWith(i.from,i.to,e.schema.text(i.text,t))}else n.delete(i.from,i.to);t(n)}return!0}}return!1};function ew(e,t,n=null,r){return new Jb(e,((e,i,o,s)=>{let a=n instanceof Function?n(i):n,l=e.tr.delete(o,s),c=l.doc.resolve(o).blockRange(),d=c&&vm(c,t,a);if(!d)return null;l.wrap(c,d);let u=l.doc.resolve(o-1).nodeBefore;return u&&u.type==t&&xm(l.doc,o-1)&&(!r||r(i,u))&&l.join(o-1),l}))}function tw(e,t){return t?e.createChecked(null,t):e.createAndFill()}function nw(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function rw(e,t){const{from:n,to:r}=e.selection;let i=[];e.doc.nodesBetween(n,r,(e=>{i=[...i,...e.marks]}));const o=i.find((e=>e.type.name===t.name));return o?o.attrs:{}}function iw(e=null,t=null){if(!e||!t)return!1;const n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;const r=n.node.marks.find((e=>e.type===t));if(!r)return!1;let i=e.index(),o=e.start()+n.offset,s=i+1,a=o+n.node.nodeSize;for(;i>0&&r.isInSet(e.parent.child(i-1).marks);)i-=1,o-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&r.isInSet(e.parent.child(s).marks);)a+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:a}}function ow(e,t){const{from:n,to:r}=e.selection;let i=[];e.doc.nodesBetween(n,r,(e=>{i=[...i,e]}));const o=i.reverse().find((e=>e.type.name===t.name));return o?o.attrs:{}}function sw(e,t,n={}){const r=(i=t,function(e){if(function(e){return e instanceof Hm}(e)){const{node:t}=e,{$from:n}=e;if(function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e}(i,t))return{node:t,pos:n.pos,depth:n.depth}}})(e.selection)||nw((e=>e.type===t))(e.selection);var i;return Object.keys(n).length&&r?r.node.hasMarkup(t,{...r.node.attrs,...n}):!!r}new Jb(/--$/,"—"),new Jb(/\.\.\.$/,"…"),new Jb(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new Jb(/"$/,"”"),new Jb(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new Jb(/'$/,"’");class aw{constructor(e,{editor:t,extension:n,parent:r,node:i,view:o,decorations:s,getPos:a}){this.component=e,this.editor=t,this.extension=n,this.parent=r,this.node=i,this.view=o,this.decorations=s,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:a,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}createDOM(){const e=vu.extend(this.component),t={editor:this.editor,node:this.node,view:this.view,getPos:()=>this.getPos(),decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:e=>this.updateAttrs(e)};return"function"==typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),"function"==typeof this.extension.update&&(this.update=this.extension.update),this.vm=new e({parent:this.parent,propsData:t}).$mount(),this.vm.$el}update(e,t){return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.updateComponentProps({node:e,decorations:t})),!0)}updateComponentProps(e){if(!this.vm._props)return;const t=vu.config.silent;vu.config.silent=!0,Object.entries(e).forEach((([e,t])=>{this.vm._props[e]=t})),vu.config.silent=t}updateAttrs(e){if(!this.view.editable)return;const{state:t}=this.view,{type:n}=this.node,r=this.getPos(),i={...this.node.attrs,...e},o=this.isMark?t.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(i)):t.tr.setNodeMarkup(r,null,i);this.view.dispatch(o)}ignoreMutation(e){return!("selection"===e.type||this.contentDOM&&this.contentDOM.contains(e.target))}stopEvent(e){if("function"==typeof this.extension.stopEvent)return this.extension.stopEvent(e);const t=!!this.extension.schema.draggable;if(t&&"mousedown"===e.type){const t=e.target.closest&&e.target.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.captureEvents=!1,document.addEventListener("dragend",(()=>{this.captureEvents=!0}),{once:!0}))}const n="copy"===e.type,r="paste"===e.type,i="cut"===e.type,o=e.type.startsWith("drag")||"drop"===e.type;return!(t&&o||n||r||i)&&this.captureEvents}selectNode(){this.updateComponentProps({selected:!0})}deselectNode(){this.updateComponentProps({selected:!1})}getMarkPos(){const e=this.view.posAtDOM(this.dom);return iw(this.view.state.doc.resolve(e),this.node.type)}destroy(){this.vm.$destroy()}}class lw{on(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}emit(e,...t){this._callbacks=this._callbacks||{};const n=this._callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){if(arguments.length){const n=this._callbacks?this._callbacks[e]:null;n&&(t?this._callbacks[e]=n.filter((e=>e!==t)):delete this._callbacks[e])}else this._callbacks={};return this}}class cw{constructor(e={}){this.options={...this.defaultOptions,...e}}init(){return null}bindEditor(e=null){this.editor=e}get name(){return null}get type(){return"extension"}get defaultOptions(){return{}}get plugins(){return[]}inputRules(){return[]}pasteRules(){return[]}keys(){return{}}}class dw{constructor(e=[],t){e.forEach((e=>{e.bindEditor(t),e.init()})),this.extensions=e}get nodes(){return this.extensions.filter((e=>"node"===e.type)).reduce(((e,{name:t,schema:n})=>({...e,[t]:n})),{})}get options(){const{view:e}=this;return this.extensions.reduce(((t,n)=>({...t,[n.name]:new Proxy(n.options,{set(t,n,r){const i=t[n]!==r;return Object.assign(t,{[n]:r}),i&&e.updateState(e.state),!0}})})),{})}get marks(){return this.extensions.filter((e=>"mark"===e.type)).reduce(((e,{name:t,schema:n})=>({...e,[t]:n})),{})}get plugins(){return this.extensions.filter((e=>e.plugins)).reduce(((e,{plugins:t})=>[...e,...t]),[])}keymaps({schema:e}){return[...this.extensions.filter((e=>["extension"].includes(e.type))).filter((e=>e.keys)).map((t=>t.keys({schema:e}))),...this.extensions.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.keys)).map((t=>t.keys({type:e[`${t.type}s`][t.name],schema:e})))].map((e=>Sb(e)))}inputRules({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions;return[...n.filter((e=>["extension"].includes(e.type))).filter((e=>e.inputRules)).map((t=>t.inputRules({schema:e}))),...n.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.inputRules)).map((t=>t.inputRules({type:e[`${t.type}s`][t.name],schema:e})))].reduce(((e,t)=>[...e,...t]),[])}pasteRules({schema:e,excludedExtensions:t}){if(!(t instanceof Array)&&t)return[];const n=t instanceof Array?this.extensions.filter((e=>!t.includes(e.name))):this.extensions;return[...n.filter((e=>["extension"].includes(e.type))).filter((e=>e.pasteRules)).map((t=>t.pasteRules({schema:e}))),...n.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.pasteRules)).map((t=>t.pasteRules({type:e[`${t.type}s`][t.name],schema:e})))].reduce(((e,t)=>[...e,...t]),[])}commands({schema:e,view:t}){return this.extensions.filter((e=>e.commands)).reduce(((n,r)=>{const{name:i,type:o}=r,s={},a=r.commands({schema:e,...["node","mark"].includes(o)?{type:e[`${o}s`][i]}:{}}),l=(e,n)=>!!t.editable&&(t.focus(),e(n)(t.state,t.dispatch,t)),c=(e,t)=>{Array.isArray(t)?s[e]=e=>t.forEach((t=>l(t,e))):"function"==typeof t&&(s[e]=e=>l(t,e))};return"object"==typeof a?Object.entries(a).forEach((([e,t])=>{c(e,t)})):c(i,a),{...n,...s}}),{})}}class uw extends cw{constructor(e={}){super(e)}get type(){return"mark"}get view(){return null}get schema(){return null}command(){return()=>{}}}function pw(e=0,t=0,n=0){return Math.min(Math.max(parseInt(e,10),t),n)}class hw extends cw{constructor(e={}){super(e)}get type(){return"node"}get view(){return null}get schema(){return null}command(){return()=>{}}}class fw extends hw{get name(){return"doc"}get schema(){return{content:"block+"}}}class mw extends hw{get name(){return"paragraph"}get schema(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:()=>["p",0]}}commands({type:e}){return()=>Vb(e)}}class gw extends hw{get name(){return"text"}get schema(){return{group:"inline"}}}class yw extends lw{constructor(e={}){super(),this.defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},enableDropCursor:!0,enableGapCursor:!0,parseOptions:{},injectCSS:!0,onInit:()=>{},onTransaction:()=>{},onUpdate:()=>{},onFocus:()=>{},onBlur:()=>{},onPaste:()=>{},onDrop:()=>{}},this.events=["init","transaction","update","focus","blur","paste","drop"],this.init(e)}init(e={}){this.setOptions({...this.defaultOptions,...e}),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&function(e){{const e=document.createElement("style");e.type="text/css",e.textContent='.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n';const{head:t}=document,{firstChild:n}=t;n?t.insertBefore(e,n):t.appendChild(e)}}(),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((e=>{var t;this.on(e,this.options[(t=`on ${e}`,t.replace(/(?:^\w|[A-Z]|\b\w)/g,((e,t)=>0===t?e.toLowerCase():e.toUpperCase())).replace(/\s+/g,""))]||(()=>{}))})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}setOptions(e){this.options={...this.options,...e},this.view&&this.state&&this.view.updateState(this.state)}get builtInExtensions(){return this.options.useBuiltInExtensions?[new fw,new gw,new mw]:[]}get state(){return this.view?this.view.state:null}createExtensions(){return new dw([...this.builtInExtensions,...this.options.extensions],this)}createPlugins(){return this.extensions.plugins}createKeymaps(){return this.extensions.keymaps({schema:this.schema})}createInputRules(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}createPasteRules(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}createCommands(){return this.extensions.commands({schema:this.schema,view:this.view})}createNodes(){return this.extensions.nodes}createMarks(){return this.extensions.marks}createSchema(){return new $f({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}createState(){return tg.create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[...this.plugins,Yb({rules:this.inputRules}),...this.pasteRules,...this.keymaps,Sb({Backspace:Qb}),Sb(Kb),...this.options.enableDropCursor?[cb(this.options.dropCursor)]:[],...this.options.enableGapCursor?[new rg({props:{decorations:Db,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&Cb.valid(n)?new Cb(n):null,handleClick:Ob,handleKeyDown:Ab,handleDOMEvents:{beforeinput:Tb}}})]:[],new rg({key:new sg("editable"),props:{editable:()=>this.options.editable}}),new rg({props:{attributes:{tabindex:0},handleDOMEvents:{focus:(e,t)=>{this.focused=!0,this.emit("focus",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!0);this.view.dispatch(n)},blur:(e,t)=>{this.focused=!1,this.emit("blur",{event:t,state:e.state,view:e});const n=this.state.tr.setMeta("focused",!1);this.view.dispatch(n)}}}}),new rg({props:this.options.editorProps})]})}createDocument(e,t=this.options.parseOptions){if(null===e)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"==typeof e)try{return this.schema.nodeFromJSON(e)}catch(t){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",t),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"==typeof e){const n=`<div>${e}</div>`,r=(new window.DOMParser).parseFromString(n,"text/html").body.firstElementChild;return Bf.fromSchema(this.schema).parse(r,t)}return!1}createView(){return new rb(this.element,{state:this.createState(),handlePaste:(...e)=>{this.emit("paste",...e)},handleDrop:(...e)=>{this.emit("drop",...e)},dispatchTransaction:this.dispatchTransaction.bind(this)})}setParentComponent(e=null){e&&this.view.setProps({nodeViews:this.initNodeViews({parent:e,extensions:[...this.builtInExtensions,...this.options.extensions]})})}initNodeViews({parent:e,extensions:t}){return t.filter((e=>["node","mark"].includes(e.type))).filter((e=>e.view)).reduce(((t,n)=>({...t,[n.name]:(t,r,i,o)=>{const s=n.view;return new aw(s,{editor:this,extension:n,parent:e,node:t,view:r,getPos:i,decorations:o})}})),{})}dispatchTransaction(e){const t=this.state.apply(e);this.view.updateState(t),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emitUpdate(e)}emitUpdate(e){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:e})}resolveSelection(e=null){if(this.selection&&null===e)return this.selection;if("start"===e||!0===e)return{from:0,to:0};if("end"===e){const{doc:e}=this.state;return{from:e.content.size,to:e.content.size}}return{from:e,to:e}}focus(e=null){if(this.view.focused&&null===e||!1===e)return;const{from:t,to:n}=this.resolveSelection(e);this.setSelection(t,n),setTimeout((()=>this.view.focus()),10)}setSelection(e=0,t=0){const{doc:n,tr:r}=this.state,i=pw(e,0,n.content.size),o=pw(t,0,n.content.size),s=jm.create(n,i,o),a=r.setSelection(s);this.view.dispatch(a)}blur(){this.view.dom.blur()}getSchemaJSON(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}getHTML(){const e=document.createElement("div"),t=Gf.fromSchema(this.schema).serializeFragment(this.state.doc.content);return e.appendChild(t),e.innerHTML}getJSON(){return this.state.doc.toJSON()}setContent(e={},t=!1,n){const{doc:r,tr:i}=this.state,o=this.createDocument(e,n),s=jm.create(r,0,r.content.size),a=i.setSelection(s).replaceSelectionWith(o,!1).setMeta("preventUpdate",!t);this.view.dispatch(a)}clearContent(e=!1){this.setContent(this.options.emptyDocument,e)}setActiveNodesAndMarks(){this.activeMarks=Object.entries(this.schema.marks).reduce(((e,[t,n])=>({...e,[t]:(e={})=>function(e,t){const{from:n,$from:r,to:i,empty:o}=e.selection;return o?!!t.isInSet(e.storedMarks||r.marks()):!!e.doc.rangeHasMark(n,i,t)}(this.state,n)})),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce(((e,[t,n])=>({...e,[t]:rw(this.state,n)})),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce(((e,[t,n])=>({...e,[t]:(e={})=>sw(this.state,n,e)})),{})}getMarkAttrs(e=null){return this.activeMarkAttrs[e]}getNodeAttrs(e=null){return{...ow(this.state,this.schema.nodes[e])}}get isActive(){return Object.entries({...this.activeMarks,...this.activeNodes}).reduce(((e,[t,n])=>({...e,[t]:(e={})=>n(e)})),{})}registerPlugin(e=null,t){const n="function"==typeof t?t(e,this.state.plugins):[e,...this.state.plugins],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e=null){if(!e||!this.view.docView)return;const t=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(`${e}$`)))});this.view.updateState(t)}destroy(){this.view&&this.view.destroy()}}var vw={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(e){e&&e.element&&this.$nextTick((()=>{this.$el.appendChild(e.element.firstChild),e.setParentComponent(this)}))}}},render:e=>e("div"),beforeDestroy(){this.editor.element=this.$el}};class bw{constructor({options:e}){this.options=e,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.blurHandler=()=>{this.preventHide?this.preventHide=!1:this.options.editor.emit("menubar:focusUpdate",!1)},this.options.editor.on("blur",this.blurHandler)}handleClick(){this.preventHide=!0}destroy(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("blur",this.blurHandler)}}var ww={props:{editor:{default:null,type:Object}},data:()=>({focused:!1}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick((()=>{var t;e.registerPlugin((t={editor:e,element:this.$el},new rg({key:new sg("menu_bar"),view:e=>new bw({editorView:e,options:t})}))),this.focused=e.focused,e.on("focus",(()=>{this.focused=!0})),e.on("menubar:focusUpdate",(e=>{this.focused=e}))}))}}},render(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor)}):null}};function xw(e,t,n){const r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,Math.max(t,0)),r}function Sw(e,t){const n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function kw(e,t,n=!1){const{node:r,offset:i}=e.docView.domFromPos(t);let o,s;if(3===r.nodeType)n&&i<r.nodeValue.length?(s=Sw(xw(r,i-1,i),-1),o="right"):i<r.nodeValue.length&&(s=Sw(xw(r,i,i+1),-1),o="left");else if(r.firstChild){if(i<r.childNodes.length){const e=r.childNodes[i];s=Sw(3===e.nodeType?xw(e):e,-1),o="left"}if((!s||s.top===s.bottom)&&i){const e=r.childNodes[i-1];s=Sw(3===e.nodeType?xw(e):e,1),o="right"}}else s=r.getBoundingClientRect(),o="left";const a=s[o];return{top:s.top,bottom:s.bottom,left:a,right:a}}class Cw{constructor({options:e,editorView:t}){this.options={element:null,keepInBounds:!0,onUpdate:()=>!1,...e},this.editorView=t,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.focusHandler=({view:e})=>{this.update(e)},this.options.editor.on("focus",this.focusHandler),this.blurHandler=({event:e})=>{this.preventHide?this.preventHide=!1:this.hide(e)},this.options.editor.on("blur",this.blurHandler)}handleClick(){this.preventHide=!0}update(e,t){const{state:n}=e;if(e.composing)return;if(t&&t.doc.eq(n.doc)&&t.selection.eq(n.selection))return;if(n.selection.empty)return void this.hide();const{from:r,to:i}=n.selection,o=kw(e,r),s=kw(e,i,!0),a=this.options.element.offsetParent;if(!a)return void this.hide();const l=a.getBoundingClientRect(),c=this.options.element.getBoundingClientRect(),d=(o.left+s.left)/2-l.left;this.left=Math.round(this.options.keepInBounds?Math.min(l.width-c.width/2,Math.max(d,c.width/2)):d),this.bottom=Math.round(l.bottom-o.top),this.top=Math.round(s.bottom-l.top),this.isActive=!0,this.sendUpdate()}sendUpdate(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}hide(e){e&&e.relatedTarget&&this.options.element.parentNode&&this.options.element.parentNode.contains(e.relatedTarget)||(this.isActive=!1,this.sendUpdate())}destroy(){this.options.element.removeEventListener("mousedown",this.mousedownHandler),this.options.editor.off("focus",this.focusHandler),this.options.editor.off("blur",this.blurHandler)}}var _w={props:{editor:{default:null,type:Object},keepInBounds:{default:!0,type:Boolean}},data:()=>({menu:{isActive:!1,left:0,bottom:0}}),watch:{editor:{immediate:!0,handler(e){e&&this.$nextTick((()=>{var t;e.registerPlugin((t={editor:e,element:this.$el,keepInBounds:this.keepInBounds,onUpdate:e=>{e.isActive&&!1===this.menu.isActive?this.$emit("show",e):e.isActive||!0!==this.menu.isActive||this.$emit("hide",e),this.menu=e}},new rg({key:new sg("menu_bubble"),view:e=>new Cw({editorView:e,options:t})})))}))}}},render(){return this.editor?this.$scopedSlots.default({focused:this.editor.view.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor),getNodeAttrs:this.editor.getNodeAttrs.bind(this.editor),menu:this.menu}):null},beforeDestroy(){this.editor.unregisterPlugin("menu_bubble")}};function Aw(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));return!!o&&(!n||(r.node(o.depth-1).type==e?function(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new fm(o-1,s,o,s,new Xh(Wh.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new mf(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=ym(r);if(null==a)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;return xm(i.doc,l)&&i.join(l),t(i.scrollIntoView()),!0}(t,n,e,o):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,o=n.startIndex;t>o;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),d=o.index(-1);if(!c.canReplace(d+(a?0:1),d+1,s.content.append(l?Wh.empty:Wh.from(i))))return!1;let u=o.pos,p=u+s.nodeSize;return r.step(new fm(u-(a?1:0),p+(l?1:0),u+1,p-1,new Xh((a?Wh.empty:Wh.from(i.copy(Wh.empty))).append(l?Wh.empty:Wh.from(i.copy(Wh.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,o)))}}function Ew(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let r=l.lastChild&&l.lastChild.type==a.type,i=Wh.from(r?e.create():null),s=new Xh(Wh.from(e.create(null,Wh.from(a.type.create(null,i)))),r?3:1,0),c=o.start,d=o.end;n(t.tr.step(new fm(c-(r?3:1),d,c,d,s,1,!0)).scrollIntoView())}return!0}}function Ow(e,t,n){return new Jb(e,((e,r,i,o)=>{const s=n instanceof Function?n(r):n,{tr:a}=e,l=r.length-1;let c=o,d=i;if(r[l]){const n=i+r[0].indexOf(r[l-1]),s=n+r[l-1].length-1,u=n+r[l-1].lastIndexOf(r[l]),p=u+r[l].length,h=function(e,t,n){let r=[];return n.doc.nodesBetween(e,t,((e,t)=>{r=[...r,...e.marks.map((n=>({start:t,end:t+e.nodeSize,mark:n})))]})),r}(i,o,e).filter((e=>{const{excluded:n}=e.mark.type;return n.find((e=>e.name===t.name))})).filter((e=>e.end>n));if(h.length)return!1;p<s&&a.delete(p,s),u>n&&a.delete(n,u),d=n,c=d+r[l].length}return a.addMark(d,c,t.create(s)),a.removeStoredMark(t),a}))}function Tw(e,t,n){return new Jb(e,((e,r,i,o)=>{const s=n instanceof Function?n(r):n,{tr:a}=e;return r[0]&&a.replaceWith(i-1,o,t.create(s)),a}))}function Dw(e,t,n){const r=i=>{const o=[];return i.forEach((i=>{if(i.isText){const{text:r}=i;let s,a=0;do{if(s=e.exec(r),s){const e=s.index,r=e+s[0].length,l=n instanceof Function?n(s[0]):n;e>0&&o.push(i.cut(a,e)),o.push(i.cut(e,r).mark(t.create(l).addToSet(i.marks))),a=r}}while(s);a<r.length&&o.push(i.cut(a))}else o.push(i.copy(r(i.content)))})),Wh.fromArray(o)};return new rg({props:{transformPasted:e=>new Xh(r(e.content),e.openStart,e.openEnd)}})}function Mw(e,t,n){const r=(i,o)=>{const s=[];return i.forEach((i=>{if(i.isText){const{text:r,marks:a}=i;let l,c=0;const d=!!a.filter((e=>"link"===e.type.name))[0];for(;!d&&null!==(l=e.exec(r));)if(o&&o.type.allowsMarkType(t)&&l[1]){const e=l.index,r=e+l[0].length,o=e+l[0].indexOf(l[1]),a=o+l[1].length,d=n instanceof Function?n(l):n;e>0&&s.push(i.cut(c,e)),s.push(i.cut(o,a).mark(t.create(d).addToSet(i.marks))),c=r}c<r.length&&s.push(i.cut(c))}else s.push(i.copy(r(i.content,i)))})),Wh.fromArray(s)};return new rg({props:{transformPasted:e=>new Xh(r(e.content),e.openStart,e.openEnd)}})}function Nw(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list||e.type===t.nodes.todo_list}function Iw(e,t){return(n,r,i)=>{const{schema:o,selection:s}=n,{$from:a,$to:l}=s,c=a.blockRange(l);if(!c)return!1;const d=nw((e=>Nw(e,o)))(s);if(c.depth>=1&&d&&c.depth-d.depth<=1){if(d.node.type===e)return Aw(t)(n,r,i);if(Nw(d.node,o)&&e.validContent(d.node.content)){const{tr:t}=n;return t.setNodeMarkup(d.pos,e),r&&r(t),!1}}return function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new mf(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new mf(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=vm(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,i){let o=Wh.empty;for(let e=n.length-1;e>=0;e--)o=Wh.from(n[e].type.create(n[e].attrs,o));e.step(new fm(t.start-(r?2:0),t.end,t.start,t.end,new Xh(o,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==i&&(s=e+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&wm(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}(e)(n,r,i)}}let Pw,$w;if(s(6470),"undefined"!=typeof WeakMap){let e=new WeakMap;Pw=t=>e.get(t),$w=(t,n)=>(e.set(t,n),n)}else{let e=[],t=10,n=0;Pw=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},$w=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}class Rw{constructor(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r}}class Bw{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 new Rw(r,i,o,s)}throw new 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 new 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:a,top:l,bottom:c}=this.findCell(t);return new Rw(Math.min(n,s),Math.min(i,l),Math.max(r,a),Math.max(o,c))}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];n[s]||(n[s]=!0,i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s||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 Pw(e)||$w(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);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 a=0,l=0;a<n;a++){let c=e.child(a);l++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==c.childCount)break;let d=c.child(e),{colspan:u,rowspan:p,colwidth:h}=d.attrs;for(let e=0;e<p;e++){if(e+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:p-e});break}let c=i+e*t;for(let e=0;e<u;e++){0==r[c+e]?r[c+e]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:u-e});let n=h&&h[e];if(n){let r=(c+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+=u,l+=d.nodeSize}let d=(a+1)*t,u=0;for(;i<d;)0==r[i++]&&u++;u&&(o||(o=[])).push({type:"missing",row:a,n:u}),l++}let a=new Bw(t,n,r,o),l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);for(let r=0,i={};r<e.map.length;r++){let o=e.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o),a=null;for(let n=0;n<s.attrs.colspan;n++){let i=t[(r+n)%e.width*2];null==i||s.attrs.colwidth&&s.attrs.colwidth[n]==i||((a||(a=qw(s.attrs)))[n]=i)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,e),a}(e))}}function qw(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Fw(e,t){let n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,i=Number(e.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(let n in t){let r=t[n].getFromDOM,i=r&&r(e);null!=i&&(o[n]=i)}return o}function Lw(e,t){let n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(let r in t){let i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function Vw(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}const jw=new sg("selectingCells");function zw(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 Hw(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 Uw(e){let t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:zw(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)}function Ww(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Zw(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Kw(e,t,n){let r=e.start(-1),i=Bw.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==i?null:e.node(0).resolve(r+i)}function Jw(e,t,n){let r={};for(let t in e)r[t]=e[t];return r[t]=n,r}function Gw(e,t,n=1){let r=Jw(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 Yw(e,t,n=1){let r=Jw(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}class Xw extends qm{constructor(e,t=e){let n=e.node(-1),r=Bw.get(n),i=e.start(-1),o=r.rectBetween(e.pos-i,t.pos-i),s=e.node(0),a=r.cellsInRect(o).filter((e=>e!=t.pos-i));a.unshift(t.pos-i);let l=a.map((e=>{let t=n.nodeAt(e),r=e+i+1;return new Fm(s.resolve(r),s.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){let n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Ww(n)&&Ww(r)&&Zw(n,r)){let e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?Xw.rowSelection(n,r):e&&this.isColSelection()?Xw.colSelection(n,r):new Xw(n,r)}return jm.between(n,r)}content(){let e=this.$anchorCell.node(-1),t=Bw.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 s=[];for(let o=n*t.width+r.left,a=r.left;a<r.right;a++,o++){let n=t.map[o];if(!i[n]){i[n]=!0;let o=t.findCell(n),a=e.nodeAt(n),l=r.left-o.left,c=o.right-r.right;if(l>0||c>0){let e=a.attrs;l>0&&(e=Gw(e,0,l)),c>0&&(e=Gw(e,e.colspan-c,c)),a=o.left<r.left?a.type.createAndFill(e):a.type.create(e,a.content)}if(o.top<r.top||o.bottom>r.bottom){let e=Jw(a.attrs,"rowspan",Math.min(o.bottom,r.bottom)-Math.max(o.top,r.top));a=o.top<r.top?a.type.createAndFill(e):a.type.create(e,a.content)}s.push(a)}}o.push(e.child(n).copy(Wh.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:o;return new Xh(Wh.from(s),1,1)}replace(e,t=Xh.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=e.mapping.slice(n);e.replace(a.map(o.pos),a.map(s.pos),i?Xh.empty:t)}let i=qm.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new Xh(Wh.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=Bw.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(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);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){let n=Bw.get(e.node(-1)),r=e.start(-1),i=n.findCell(e.pos-r),o=n.findCell(t.pos-r),s=e.node(0);return i.top<=o.top?(i.top>0&&(e=s.resolve(r+n.map[i.left])),o.bottom<n.height&&(t=s.resolve(r+n.map[n.width*(n.height-1)+o.right-1]))):(o.top>0&&(t=s.resolve(r+n.map[o.left])),i.bottom<n.height&&(e=s.resolve(r+n.map[n.width*(n.height-1)+i.right-1]))),new Xw(e,t)}isRowSelection(){let e=Bw.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;let i=n+this.$anchorCell.nodeAfter.attrs.colspan,o=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,o)==e.width}eq(e){return e instanceof Xw&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){let n=Bw.get(e.node(-1)),r=e.start(-1),i=n.findCell(e.pos-r),o=n.findCell(t.pos-r),s=e.node(0);return i.left<=o.left?(i.left>0&&(e=s.resolve(r+n.map[i.top*n.width])),o.right<n.width&&(t=s.resolve(r+n.map[n.width*(o.top+1)-1]))):(o.left>0&&(t=s.resolve(r+n.map[o.top*n.width])),i.right<n.width&&(e=s.resolve(r+n.map[n.width*(i.top+1)-1]))),new Xw(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Xw(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new Xw(e.resolve(t),e.resolve(n))}getBookmark(){return new Qw(this.$anchorCell.pos,this.$headCell.pos)}}Xw.prototype.visible=!1,qm.jsonID("cell",Xw);class Qw{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Qw(e.map(this.anchor),e.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&&Zw(t,n)?new Xw(t,n):qm.near(n,1)}}function ex(e){if(!(e.selection instanceof Xw))return null;let t=[];return e.selection.forEachCell(((e,n)=>{t.push(Pv.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Bv.create(e.doc,t)}function tx(e,t){let n=e.createAndFill();return new Rm(n).replace(0,n.content.size,t).doc}function nx(e,t,n,r,i,o,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=i;c<o;c++){let i=s*t.width+c,o=t.map[i];if(t.map[i-t.width]==o){l=!0;let i=n.nodeAt(o),{top:d,left:u}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(a).map(o+r),null,Jw(i.attrs,"rowspan",s-d)),e.insert(e.mapping.slice(a).map(t.positionAt(s,u,n)),i.type.createAndFill(Jw(i.attrs,"rowspan",d+i.attrs.rowspan-s))),c+=i.attrs.colspan-1}}return l}function rx(e,t,n,r,i,o,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=i;c<o;c++){let i=c*t.width+s,o=t.map[i];if(t.map[i-1]==o){l=!0;let i=n.nodeAt(o),d=t.colCount(o),u=e.mapping.slice(a).map(o+r);e.setNodeMarkup(u,null,Gw(i.attrs,s-d,i.attrs.colspan-(s-d))),e.insert(u+i.nodeSize,i.type.createAndFill(Gw(i.attrs,0,s-d))),c+=i.attrs.rowspan-1}}return l}function ix(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc,s=Bw.get(o),{top:a,left:l}=r,c=l+i.width,d=a+i.height,u=e.tr,p=0;function h(){o=n?u.doc.nodeAt(n-1):u.doc,s=Bw.get(o),p=u.mapping.maps.length}(function(e,t,n,r,i,o,s){let a,l,c=Vw(e.doc.type.schema);if(i>t.width)for(let o=0,d=0;o<t.height;o++){let u=n.child(o);d+=u.nodeSize;let p,h=[];p=null==u.lastChild||u.lastChild.type==c.cell?a||(a=c.cell.createAndFill()):l||(l=c.header_cell.createAndFill());for(let e=t.width;e<i;e++)h.push(p);e.insert(e.mapping.slice(s).map(d-1+r),h)}if(o>t.height){let d=[];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;d.push(i?l||(l=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}let u=c.row.create(null,Wh.from(d)),p=[];for(let e=t.height;e<o;e++)p.push(u);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!(!a&&!l)})(u,s,o,n,c,d,p)&&h(),nx(u,s,o,n,l,c,a,p)&&h(),nx(u,s,o,n,l,c,d,p)&&h(),rx(u,s,o,n,a,d,l,p)&&h(),rx(u,s,o,n,a,d,c,p)&&h();for(let e=a;e<d;e++){let t=s.positionAt(e,l,o),r=s.positionAt(e,c,o);u.replace(u.mapping.slice(p).map(t+n),u.mapping.slice(p).map(r+n),new Xh(i.rows[e-a],0,0))}h(),u.setSelection(new Xw(u.doc.resolve(n+s.positionAt(a,l,o)),u.doc.resolve(n+s.positionAt(d-1,c-1,o)))),t(u)}const ox=kb({ArrowLeft:ax("horiz",-1),ArrowRight:ax("horiz",1),ArrowUp:ax("vert",-1),ArrowDown:ax("vert",1),"Shift-ArrowLeft":lx("horiz",-1),"Shift-ArrowRight":lx("horiz",1),"Shift-ArrowUp":lx("vert",-1),"Shift-ArrowDown":lx("vert",1),Backspace:cx,"Mod-Backspace":cx,Delete:cx,"Mod-Delete":cx});function sx(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ax(e,t){return(n,r,i)=>{let o=n.selection;if(o instanceof Xw)return sx(n,r,qm.near(o.$headCell,t));if("horiz"!=e&&!o.empty)return!1;let s=hx(i,e,t);if(null==s)return!1;if("horiz"==e)return sx(n,r,qm.near(n.doc.resolve(o.head+t),t));{let i,o=n.doc.resolve(s),a=Kw(o,e,t);return i=a?qm.near(a,1):t<0?qm.near(n.doc.resolve(o.before(-1)),-1):qm.near(n.doc.resolve(o.after(-1)),1),sx(n,r,i)}}}function lx(e,t){return(n,r,i)=>{let o=n.selection;if(!(o instanceof Xw)){let r=hx(i,e,t);if(null==r)return!1;o=new Xw(n.doc.resolve(r))}let s=Kw(o.$headCell,e,t);return!!s&&sx(n,r,new Xw(o.$anchorCell,s))}}function cx(e,t){let n=e.selection;if(!(n instanceof Xw))return!1;if(t){let r=e.tr,i=Vw(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 Xh(i,0,0))})),r.docChanged&&t(r)}return!0}function dx(e,t){let n=zw(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new Xw(n))),!0)}function ux(e,t,n){if(!Hw(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.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;let i=t.firstChild,o=i.type.spec.tableRole,s=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),l=e<t.childCount-1?0:Math.max(0,r-1);(o||l)&&(i=tx(Vw(s).row,new Xh(i,o,l)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?tx(Vw(s).row,new Xh(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(Wh.empty),n[i]<r){let o=Vw(e).cell.createAndFill(),s=[];for(let e=n[i];e<r;e++)s.push(o);t[i]=t[i].append(Wh.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}(n),i=e.state.selection;if(i instanceof Xw){r||(r={width:1,height:1,rows:[Wh.from(tx(Vw(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=Bw.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],s=[];for(let n=t[e]||0,i=0;n<r;i++){let a=o.child(i%o.childCount);n+a.attrs.colspan>r&&(a=a.type.create(Gw(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}i.push(Wh.from(s))}n=i,e=r}if(t!=i){let e=[];for(let r=0,o=0;r<i;r++,o++){let s=[],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(Jw(t.attrs,"rowspan",Math.max(1,i-t.attrs.rowspan)),t.content)),s.push(t)}e.push(Wh.from(s))}n=e,t=i}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),ix(e.state,e.dispatch,o,s,r),!0}if(r){let t=Uw(e.state),n=t.start(-1);return ix(e.state,e.dispatch,n,Bw.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function px(e,t){if(t.ctrlKey||t.metaKey)return;let n,r=fx(e,t.target);if(t.shiftKey&&e.state.selection instanceof Xw)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=zw(e.state.selection.$anchor))&&mx(e,t).pos!=n.pos)i(n,t),t.preventDefault();else if(!r)return;function i(t,n){let r=mx(e,n),i=null==jw.getState(e.state);if(!r||!Zw(t,r)){if(!i)return;r=t}let o=new Xw(t,r);if(i||!e.state.selection.eq(o)){let n=e.state.tr.setSelection(o);i&&n.setMeta(jw,t.pos),e.dispatch(n)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",s),null!=jw.getState(e.state)&&e.dispatch(e.state.tr.setMeta(jw,-1))}function s(n){let s,a=jw.getState(e.state);if(null!=a)s=e.state.doc.resolve(a);else if(fx(e,n.target)!=r&&(s=mx(e,t),!s))return o();s&&i(s,n)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",s)}function hx(e,t,n){if(!(e.state.selection instanceof jm))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))return null;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 fx(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function mx(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?zw(e.state.doc.resolve(n.pos)):null}const gx=new sg("fix-tables");function yx(e,t,n,r){let i=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){let o=t.child(s);for(let t=a,r=Math.min(i,s+3);t<r;t++)if(e.child(t)==o){a=t+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?yx(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function vx(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let i=Bw.get(t);if(!i.problems)return r;r||(r=e.tr);let o,s,a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if("collision"==o.type){let e=t.nodeAt(o.pos);for(let t=0;t<e.attrs.rowspan;t++)a[o.row+t]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Gw(e.attrs,e.attrs.colspan-o.n,o.n))}else if("missing"==o.type)a[o.row]+=o.n;else if("overlong_rowspan"==o.type){let e=t.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Jw(e.attrs,"rowspan",e.attrs.rowspan-o.n))}else if("colwidth mismatch"==o.type){let e=t.nodeAt(o.pos);r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Jw(e.attrs,"colwidth",o.colwidth))}}for(let e=0;e<a.length;e++)a[e]&&(null==o&&(o=e),s=e);for(let l=0,c=n+1;l<i.height;l++){let n=t.child(l),i=c+n.nodeSize,d=a[l];if(d>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<d;n++)a.push(Vw(e.schema)[t].createAndFill());let u=0!=l&&o!=l-1||s!=l?i-1:c+1;r.insert(r.mapping.map(u),a)}c=i}return r.setMeta(gx,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&yx(t.doc,e.doc,0,r):e.doc.descendants(r),n}function bx(e){let t,n=e.selection,r=Uw(e),i=r.node(-1),o=r.start(-1),s=Bw.get(i);return t=n instanceof Xw?s.rectBetween(n.$anchorCell.pos-o,n.$headCell.pos-o):s.findCell(r.pos-o),t.tableStart=o,t.map=s,t.table=i,t}function wx(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;(function(e,t,n){let r=Vw(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 a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){let o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,Yw(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{let l=null==o?Vw(r.type.schema).cell:r.nodeAt(t.map[a+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function xx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(wx(e.tr,n,n.left))}return!0}function Sx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(wx(e.tr,n,n.right))}return!0}function kx(e,{map:t,table:n,tableStart:r},i){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let a=s*t.width+i,l=t.map[a],c=n.nodeAt(l);if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(r+l),null,Gw(c.attrs,i-t.colCount(l)));else{let t=e.mapping.slice(o).map(r+l);e.delete(t,t+c.nodeSize)}s+=c.attrs.rowspan}}function Cx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;kx(r,n,e),e!=n.left;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Bw.get(n.table);t(r)}return!0}function _x(e,{map:t,tableStart:n,table:r},i){let o=n;for(let e=0;e<i;e++)o+=r.child(e).nodeSize;let s=[],a=i>0?-1:0;(function(e,t,n){let r=Vw(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width]).type!=r)return!1;return!0})(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let o=0,l=t.width*i;o<t.width;o++,l++)if(i>0&&i<t.height&&t.map[l]==t.map[l-t.width]){let i=t.map[l],s=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,Jw(s,"rowspan",s.rowspan+1)),o+=s.colspan-1}else{let e=null==a?Vw(r.type.schema).cell:r.nodeAt(t.map[l+a*t.width]).type;s.push(e.createAndFill())}return e.insert(o,Vw(r.type.schema).row.create(null,s)),e}function Ax(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(_x(e.tr,n,n.top))}return!0}function Ex(e,t){if(!Hw(e))return!1;if(t){let n=bx(e);t(_x(e.tr,n,n.bottom))}return!0}function Ox(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,a=e.mapping.maps.length;e.delete(o+r,s+r);for(let o=0,s=i*t.width;o<t.width;o++,s++){let l=t.map[s];if(i>0&&l==t.map[s-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(a).map(l+r),null,Jw(t,"rowspan",t.rowspan-1)),o+=t.colspan-1}else if(i<t.width&&l==t.map[s+t.width]){let s=n.nodeAt(l),c=s.type.create(Jw(s.attrs,"rowspan",s.attrs.rowspan-1),s.content),d=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(a).map(r+d),c),o+=s.attrs.colspan-1}}}function Tx(e,t){if(!Hw(e))return!1;if(t){let n=bx(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Ox(r,n,e),e!=n.top;e--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Bw.get(n.table);t(r)}return!0}function Dx(e){let t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function Mx(e,t){let n=e.selection;if(!(n instanceof Xw)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=bx(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,a=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[a]==n[a+1])return!0;o+=e,a+=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,s=e.tr,a={},l=Wh.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let c=i.map[e*i.width+t],d=r.table.nodeAt(c);if(!a[c])if(a[c]=!0,null==n)n=c,o=d;else{Dx(d)||(l=l.append(d.content));let e=s.mapping.map(c+r.tableStart);s.delete(e,e+d.nodeSize)}}if(s.setNodeMarkup(n+r.tableStart,null,Jw(Yw(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),"rowspan",r.bottom-r.top)),l.size){let e=n+1+o.content.size,t=Dx(o)?n+1:e;s.replaceWith(t+r.tableStart,e+r.tableStart,l)}s.setSelection(new Xw(s.doc.resolve(n+r.tableStart))),t(s)}return!0}function Nx(e,t){const n=Vw(e.schema);return(r=({node:e})=>n[e.type.spec.tableRole],(e,t)=>{let n,i,o=e.selection;if(o instanceof Xw){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;n=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(n=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from),!n)return!1;i=zw(o.$from).pos}if(1==n.attrs.colspan&&1==n.attrs.rowspan)return!1;if(t){let s=n.attrs,a=[],l=s.colwidth;s.rowspan>1&&(s=Jw(s,"rowspan",1)),s.colspan>1&&(s=Jw(s,"colspan",1));let c,d=bx(e),u=e.tr;for(let e=0;e<d.right-d.left;e++)a.push(l?Jw(s,"colwidth",l&&l[e]?[l[e]]:null):s);for(let e=d.top;e<d.bottom;e++){let t=d.map.positionAt(e,d.left,d.table);e==d.top&&(t+=n.nodeSize);for(let i=d.left,o=0;i<d.right;i++,o++)i==d.left&&e==d.top||u.insert(c=u.mapping.map(t+d.tableStart,1),r({node:n,row:e,col:i}).createAndFill(a[o]))}u.setNodeMarkup(i,r({node:n,row:d.top,col:d.left}),a[0]),o instanceof Xw&&u.setSelection(new Xw(u.doc.resolve(o.$anchorCell.pos),c&&u.doc.resolve(c))),t(u)}return!0})(e,t);var r}function Ix(e,t,n){const 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++){const i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function Px(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!Hw(t))return!1;if(n){let r=Vw(t.schema),i=bx(t),o=t.tr,s=i.map.cellsInRect("column"==e?new Rw(i.left,0,i.right,i.map.height):"row"==e?new Rw(0,i.top,i.map.width,i.bottom):i),a=s.map((e=>i.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[e],r.cell,a[e].attrs);if(0==o.steps.length)for(let e=0;e<s.length;e++)o.setNodeMarkup(i.tableStart+s[e],r.header_cell,a[e].attrs);n(o)}return!0}}(e):function(t,n){if(!Hw(t))return!1;if(n){let r=Vw(t.schema),i=bx(t),o=t.tr,s=Ix("row",i,r),a=Ix("column",i,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?new Rw(0,l,1,i.map.height):"row"==e?new Rw(l,0,i.map.width,1):i,d="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(c).forEach((e=>{const t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,d,n.attrs)})),n(o)}return!0}}let $x=Px("row",{useDeprecatedLogic:!0}),Rx=Px("column",{useDeprecatedLogic:!0}),Bx=Px("cell",{useDeprecatedLogic:!0});function qx(e){return function(t,n){if(!Hw(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);if(r.childCount)return n-1-r.lastChild.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}}}(Uw(t),e);if(null!=r){if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(jm.between(e,(i=e,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}}function Fx(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}class Lx{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")),Vx(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,Vx(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}}function Vx(e,t,n,r,i,o){let s=0,a=!0,l=t.firstChild,c=e.firstChild;for(let e=0,n=0;e<c.childCount;e++){let{colspan:d,colwidth:u}=c.child(e).attrs;for(let e=0;e<d;e++,n++){let c=i==n?o:u&&u[e],d=c?c+"px":"";s+=c||r,c||(a=!1),l?(l.style.width!=d&&(l.style.width=d),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=d}}for(;l;){let e=l.nextSibling;l.parentNode.removeChild(l),l=e}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}const jx=new sg("tableColumnResizing");function zx({handleWidth:e=5,cellMinWidth:t=25,View:n=Lx,lastColumnResizable:r=!0}={}){let i=new rg({key:jx,state:{init(e,r){return this.spec.props.nodeViews[Vw(r.schema).table.name]=(e,r)=>new n(e,t,r),new Hx(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>jx.getState(e).activeHandle>-1?{class:"resize-cursor"}:null,handleDOMEvents:{mousemove(t,n){!function(e,t,n,r,i){let o=jx.getState(e.state);if(!o.dragging){let r=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(r){let{left:i,right:o}=r.getBoundingClientRect();t.clientX-i<=n?s=Ux(e,t,"left"):o-t.clientX<=n&&(s=Ux(e,t,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){let t=e.state.doc.resolve(s),n=t.node(-1),r=Bw.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Zx(e,s)}}}(t,n,e,0,r)},mouseleave(e){!function(e){let t=jx.getState(e.state);t.activeHandle>-1&&!t.dragging&&Zx(e,-1)}(e)},mousedown(e,n){!function(e,t,n){let r=jx.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;let i=e.state.doc.nodeAt(r.activeHandle),o=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,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],a--);return s/a}(e,r.activeHandle,i.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);let r=jx.getState(e.state);r.dragging&&(function(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),o=Bw.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<o.height;e++){let t=e*o.width+a;if(e&&o.map[t]==o.map[t-o.width])continue;let r=o.map[t],{attrs:c}=i.nodeAt(r),d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let u=c.colwidth?c.colwidth.slice():Kx(c.colspan);u[d]=n,l.setNodeMarkup(s+r,null,Jw(c,"colwidth",u))}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Wx(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(jx,{setDragging:null})))}function a(t){if(!t.which)return s(t);let r=jx.getState(e.state),i=Wx(r.dragging,t,n);!function(e,t,n,r){let i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),a=Bw.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=e.domAtPos(i.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;Vx(o,l.firstChild,l,r,a,n)}(e,r.activeHandle,i,n)}e.dispatch(e.state.tr.setMeta(jx,{setDragging:{startX:t.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,n,t)}},decorations(e){let t=jx.getState(e);if(t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return Bv.empty;let o=Bw.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let e=0;e<o.height;e++){let t=a+e*o.width-1;if(!(a!=o.width&&o.map[t]==o.map[t+1]||0!=e&&o.map[t-1]==o.map[t-1-o.width])){let e=o.map[t],r=s+e+i.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(Pv.widget(r,a))}}return Bv.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return i}class Hx{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){let t=this,n=e.getMeta(jx);if(n&&null!=n.setHandle)return new Hx(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Hx(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);Ww(e.doc.resolve(n))||(n=null),t=new Hx(n,t.dragging)}return t}}function Ux(e,t,n){let r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;let{pos:i}=r,o=zw(e.state.doc.resolve(i));if(!o)return-1;if("right"==n)return o.pos;let s=Bw.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Wx(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Zx(e,t){e.dispatch(e.state.tr.setMeta(jx,{setHandle:t}))}function Kx(e){let t=[];for(let n=0;n<e;n++)t.push(0);return t}function Jx({allowTableNodeSelection:e=!1}={}){return new rg({key:jw,state:{init:()=>null,apply(e,t){let n=e.getMeta(jw);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:ex,handleDOMEvents:{mousedown:px},createSelectionBetween(e){if(null!=jw.getState(e.state))return e.state.selection},handleTripleClick:dx,handleKeyDown:ox,handlePaste:ux},appendTransaction:(t,n,r)=>function(e,t,n){let r,i,o=(t||e).selection,s=(t||e).doc;if(o instanceof Hm&&(i=o.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=Xw.create(s,o.from);else if("row"==i){let e=s.resolve(o.from+1);r=Xw.rowSelection(e,e)}else if(!n){let e=Bw.get(o.node),t=o.from+1,n=t+e.map[e.width*e.height-1];r=Xw.create(s,t+1,n)}}else o instanceof jm&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.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)}(o)?r=jm.create(s,o.from):o instanceof jm&&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}(o)&&(r=jm.create(s,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,vx(r,n),e)})}var Gx=200,Yx=function(){};Yx.prototype.append=function(e){return e.length?(e=Yx.from(e),!this.length&&e||e.length<Gx&&this.leafAppend(e)||this.length<Gx&&e.leafPrepend(this)||this.appendInner(e)):this},Yx.prototype.prepend=function(e){return e.length?Yx.from(e).append(this):this},Yx.prototype.appendInner=function(e){return new Qx(this,e)},Yx.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Yx.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Yx.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Yx.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)},Yx.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},Yx.from=function(e){return e instanceof Yx?e:e&&e.length?new Xx(e):Yx.empty};var Xx=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<=Gx)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Gx)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}(Yx);Yx.empty=new Xx([]);var Qx=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;return!(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))&&void 0},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(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))&&void 0},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}(Yx);const eS=Yx;class tS{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new nS(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new nS(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new tS(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),d=new nS(e.mapping.maps[n],c,t);(l=a&&a.merge(d))&&(d=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(d),t&&(o++,t=void 0),r||(a=d)}let l=o-n.depth;return l>iS&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new tS(s.append(i),o)}remapping(e,t){let n=new im;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 tS(this.items.append(e.map((e=>new nS(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 a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new nS(l,o,c))}else n.push(new nS(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new nS(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),d=new tS(c,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=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new nS(s.invert(),e,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new tS(eS.from(r.reverse()),i)}}tS.empty=new tS(eS.empty,0);class nS{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 nS(t.getMap().invert(),t,this.selection)}}}class rS{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const iS=20;function oS(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function sS(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}function aS(e,t,n,r){let i=dS(t),o=uS.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new rS(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(uS,{redo:r,historyState:c}).scrollIntoView())}let lS=!1,cS=null;function dS(e){let t=e.plugins;if(cS!=t){lS=!1,cS=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){lS=!0;break}}return lS}const uS=new sg("history"),pS=new sg("closeHistory");function hS(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new rg({key:uS,state:{init:()=>new rS(tS.empty,tS.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(uS);if(o)return o.historyState;n.getMeta(pS)&&(e=new rS(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(uS))return s.getMeta(uS).redo?new rS(e.done.addTransform(n,void 0,r,dS(t)),e.undone,oS(n.mapping.maps[n.steps.length-1]),e.prevTime):new rS(e.done,e.undone.addTransform(n,void 0,r,dS(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new rS(e.done.rebased(n,i),e.undone.rebased(n,i),sS(e.prevRanges,n.mapping),e.prevTime):new rS(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),sS(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return 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)),o=s?sS(e.prevRanges,n.mapping):oS(n.mapping.maps[n.steps.length-1]);return new rS(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,dS(t)),tS.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?fS:"historyRedo"==n?mS:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const fS=(e,t)=>{let n=uS.getState(e);return!(!n||0==n.done.eventCount||(t&&aS(n,e,t,!1),0))},mS=(e,t)=>{let n=uS.getState(e);return!(!n||0==n.undone.eventCount||(t&&aS(n,e,t,!0),0))};function gS(e){let t=uS.getState(e);return t?t.done.eventCount:0}function yS(e){let t=uS.getState(e);return t?t.undone.eventCount:0}class vS extends hw{get name(){return"bullet_list"}get schema(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:()=>["ul",0]}}commands({type:e,schema:t}){return()=>Iw(e,t.nodes.list_item)}keys({type:e,schema:t}){return{"Shift-Ctrl-8":Iw(e,t.nodes.list_item)}}inputRules({type:e}){return[ew(/^\s*([-+*])\s$/,e)]}}class bS extends hw{get name(){return"hard_break"}get schema(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}}commands({type:e}){return()=>zb(Rb,((t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)))}keys({type:e}){const t=zb(Rb,((t,n)=>(n(t.tr.replaceSelectionWith(e.create()).scrollIntoView()),!0)));return{"Mod-Enter":t,"Shift-Enter":t}}}class wS extends hw{get name(){return"heading"}get defaultOptions(){return{levels:[1,2,3,4,5,6]}}get schema(){return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}}))),toDOM:e=>[`h${e.attrs.level}`,0]}}commands({type:e,schema:t}){return n=>function(e,t,n={}){return(r,i,o)=>sw(r,e,n)?Vb(t)(r,i,o):Vb(e,n)(r,i,o)}(e,t.nodes.paragraph,n)}keys({type:e}){return this.options.levels.reduce(((t,n)=>({...t,[`Shift-Ctrl-${n}`]:Vb(e,{level:n})})),{})}inputRules({type:e}){return this.options.levels.map((t=>function(e,t,n=null){return new Jb(e,((e,r,i,o)=>{let s=e.doc.resolve(i),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(i,o).setBlockType(i,i,t,a):null}))}(new RegExp(`^(#{1,${t}})\\s$`),e,(()=>({level:t})))))}}class xS extends hw{get name(){return"list_item"}get schema(){return{content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]}}keys({type:e}){return{Enter:(t=e,function(e,n){let{$from:r,$to:i,node:o}=e.selection;if(o&&o.isBlock||r.depth<2||!r.sameParent(i))return!1;let s=r.node(-1);if(s.type!=t)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=t||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let i=Wh.empty,o=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-o;e>=r.depth-3;e--)i=Wh.from(r.node(e).copy(i));let s=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;i=i.append(Wh.from(t.createAndFill()));let a=r.before(r.depth-(o-1)),l=e.tr.replace(a,r.after(-s),new Xh(i,4-o,0)),c=-1;l.doc.nodesBetween(a,l.doc.content.size,((e,t)=>{if(c>-1)return!1;e.isTextblock&&0==e.content.size&&(c=t+1)})),c>-1&&l.setSelection(qm.near(l.doc.resolve(c))),n(l.scrollIntoView())}return!0}let a=i.pos==r.end()?s.contentMatchAt(0).defaultType:null,l=e.tr.delete(r.pos,i.pos),c=a?[null,{type:a}]:void 0;return!!wm(l.doc,r.pos,2,c)&&(n&&n(l.split(r.pos,2,c).scrollIntoView()),!0)}),Tab:Ew(e),"Shift-Tab":Aw(e)};var t}}function SS({matcher:e={char:"@",allowSpaces:!1,startOfLine:!1},appendText:t=null,suggestionClass:n="suggestion",command:r=(()=>!1),items:i=[],onEnter:o=(()=>!1),onChange:s=(()=>!1),onExit:a=(()=>!1),onKeyDown:l=(()=>!1),onFilter:c=((e,t)=>t?e.filter((e=>JSON.stringify(e).toLowerCase().includes(t.toLowerCase()))):e)}){return new rg({key:new sg("suggestions"),view(){return{update:async(e,n)=>{const l=this.key.getState(n),d=this.key.getState(e.state),u=l.active&&d.active&&l.range.from!==d.range.from,p=!l.active&&d.active,h=l.active&&!d.active,f=p||u,m=!p&&!h&&l.query!==d.query&&!u,g=h||u;if(!f&&!m&&!g)return;const y=g?l:d,v=document.querySelector(`[data-decoration-id="${y.decorationId}"]`),b=v?{getBoundingClientRect:()=>v.getBoundingClientRect(),clientWidth:v.clientWidth,clientHeight:v.clientHeight}:null,w={view:e,range:y.range,query:y.query,text:y.text,decorationNode:v,virtualNode:b,items:m||f?await c(Array.isArray(i)?i:await i(),y.query):[],command:({range:n,attrs:i})=>{r({range:n,attrs:i,schema:e.state.schema})(e.state,e.dispatch,e),t&&function(e=""){return(t,n)=>{const{$from:r}=t.selection,{pos:i}=r.pos;return n(t.tr.insertText(e,i)),!0}}(t)(e.state,e.dispatch,e)}};g&&a(w),m&&s(w),f&&o(w)}}},state:{init:()=>({active:!1,range:{},query:null,text:null}),apply(t,n){const{selection:r}=t,i={...n};if(r.from===r.to){(r.from<n.range.from||r.from>n.range.to)&&(i.active=!1);const t=r.$from,o=function({char:e="@",allowSpaces:t=!1,startOfLine:n=!1}){return r=>{if(r.depth<=0)return!1;const i=`\\${e}`,o=new RegExp(`\\s${i}$`),s=n?"^":"",a=t?new RegExp(`${s}${i}.*?(?=\\s${i}|$)`,"gm"):new RegExp(`${s}(?:^)?${i}[^\\s${i}]*`,"gm"),l=r.before(),c=r.end(),d=function(e,t,n,r,i,o="\0"){let s="",a=!0,l=null;return e.content.nodesBetween(t,n,((e,c)=>{if(e.isText){if(l)return void(l=null);s+=e.text.slice(Math.max(t,c)-c,n-c),a=!r}else e.isLeaf&&o?(s+=o,a=!r):e.isInline&&!e.isLeaf?(s+=i,e.textContent&&(s+=e.textContent,l=e),s+=i,a=!a):!a&&e.isBlock&&(s+=r,a=!0)}),0),s}(r.doc,l,c,"\0","\0");let u,p=a.exec(d);for(;null!==p;){const n=p.input.slice(Math.max(0,p.index-1),p.index);if(/^[\s\0]?$/.test(n)){const n=p.index+r.start();let i=n+p[0].length;t&&o.test(d.slice(i-1,i+1))&&(p[0]+=" ",i+=1),n<r.pos&&i>=r.pos&&(u={range:{from:n,to:i},query:p[0].slice(e.length),text:p[0]})}p=a.exec(d)}return u}}(e)(t),s=(Math.random()+1).toString(36).substr(2,5);o?(i.active=!0,i.decorationId=n.decorationId?n.decorationId:s,i.range=o.range,i.query=o.query,i.text=o.text):i.active=!1}else i.active=!1;return i.active||(i.decorationId=null,i.range={},i.query=null,i.text=null),i}},props:{handleKeyDown(e,t){const{active:n,range:r}=this.getState(e.state);return!!n&&l({view:e,event:t,range:r})},decorations(e){const{active:t,range:r,decorationId:i}=this.getState(e);return t?Bv.create(e.doc,[Pv.inline(r.from,r.to,{nodeName:"span",class:n,"data-decoration-id":i})]):null}}})}class kS extends hw{get name(){return"mention"}get defaultOptions(){return{matcher:{char:"@",allowSpaces:!1,startOfLine:!1},mentionClass:"mention",suggestionClass:"mention-suggestion"}}getLabel(e){return e.innerText.split(this.options.matcher.char).join("")}createFragment(e,t){return Wh.fromJSON(e,[{type:"text",text:`${this.options.matcher.char}${t}`}])}insertMention(e,t,n){return function(e=null,t,n={},r=Wh.empty){return(i,o)=>{const{$from:s,$to:a}=i.selection,l=s.index(),c=e?e.from:s.pos,d=e?e.to:a.pos;return!!s.parent.canReplaceWith(l,l,t)&&(o&&o(i.tr.replaceWith(c,d,t.create(n,r))),!0)}}(e,n.nodes[this.name],t,this.createFragment(n,t.label))}get schema(){return{attrs:{id:{},label:{}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:e=>["span",{class:this.options.mentionClass,"data-mention-id":e.attrs.id},`${this.options.matcher.char}${e.attrs.label}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.getAttribute("data-mention-id"),label:this.getLabel(e)}),getContent:(e,t)=>{const n=this.getLabel(e);return this.createFragment(t,n)}}]}}commands({schema:e}){return t=>this.insertMention(null,t,e)}get plugins(){return[SS({command:({range:e,attrs:t,schema:n})=>this.insertMention(e,t,n),appendText:" ",matcher:this.options.matcher,items:this.options.items,onEnter:this.options.onEnter,onChange:this.options.onChange,onExit:this.options.onExit,onKeyDown:this.options.onKeyDown,onFilter:this.options.onFilter,suggestionClass:this.options.suggestionClass})]}}class CS extends hw{get name(){return"ordered_list"}get schema(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}commands({type:e,schema:t}){return()=>Iw(e,t.nodes.list_item)}keys({type:e,schema:t}){return{"Shift-Ctrl-9":Iw(e,t.nodes.list_item)}}inputRules({type:e}){return[ew(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1]))]}}var _S=function(e){let t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(let e in t)n[e]={default:t[e].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>Fw(e,t)}],toDOM:e=>["td",Lw(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>Fw(e,t)}],toDOM:e=>["th",Lw(e,t),0]}}}({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:e=>e.style.backgroundColor||null,setDOMAttr(e,t){if(e){const n={style:`${t.style||""}background-color: ${e};`};Object.assign(t,n)}}}}});class AS extends hw{get name(){return"table"}get defaultOptions(){return{resizable:!1}}get schema(){return _S.table}commands({schema:e}){return{createTable:({rowsCount:t,colsCount:n,withHeaderRow:r})=>(i,o)=>{const s=i.tr.selection.anchor+1,a=function(e,t,n,r,i){const o=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach((n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),s=[],a=[];for(let e=0;e<n;e+=1){const e=tw(o.cell,i);if(e&&a.push(e),r){const e=tw(o.header_cell,i);e&&s.push(e)}}const l=[];for(let e=0;e<t;e+=1)l.push(o.row.createChecked(null,r&&0===e?s:a));return o.table.createChecked(null,l)}(e,t,n,r),l=i.tr.replaceSelectionWith(a).scrollIntoView(),c=l.doc.resolve(s);l.setSelection(jm.near(c)),o(l)},addColumnBefore:()=>xx,addColumnAfter:()=>Sx,deleteColumn:()=>Cx,addRowBefore:()=>Ax,addRowAfter:()=>Ex,deleteRow:()=>Tx,deleteTable:()=>Fx,toggleCellMerge:()=>(e,t)=>{Mx(e,t)||Nx(e,t)},mergeCells:()=>Mx,splitCell:()=>Nx,toggleHeaderColumn:()=>Rx,toggleHeaderRow:()=>$x,toggleHeaderCell:()=>Bx,setCellAttr:({name:e,value:t})=>function(e,t){return function(n,r){if(!Hw(n))return!1;let i=Uw(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let o=n.tr;n.selection instanceof Xw?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&o.setNodeMarkup(r,null,Jw(n.attrs,e,t))})):o.setNodeMarkup(i.pos,null,Jw(i.nodeAfter.attrs,e,t)),r(o)}return!0}}(e,t),fixTables:()=>vx}}keys(){return{Tab:qx(1),"Shift-Tab":qx(-1)}}get plugins(){return[...this.options.resizable?[zx()]:[],Jx()]}}class ES extends hw{get name(){return"table_header"}get schema(){return _S.table_header}}class OS extends hw{get name(){return"table_cell"}get schema(){return _S.table_cell}}class TS extends hw{get name(){return"table_row"}get schema(){return _S.table_row}}class DS extends uw{get name(){return"bold"}get schema(){return{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]}}keys({type:e}){return{"Mod-b":jb(e)}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,e)]}pasteRules({type:e}){return[Mw(/(?:\*\*|__)([^*_]+)(?:\*\*|__)/g,e)]}}class MS extends uw{get name(){return"italic"}get schema(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]}}keys({type:e}){return{"Mod-i":jb(e)}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:^|[^_])(_([^_]+)_)$/,e),Ow(/(?:^|[^*])(\*([^*]+)\*)$/,e)]}pasteRules({type:e}){return[Mw(/_([^_]+)_/g,e),Mw(/\*([^*]+)\*/g,e)]}}class NS extends uw{get name(){return"link"}get defaultOptions(){return{openOnClick:!0,target:null}}get schema(){return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target")})}],toDOM:e=>["a",{...e.attrs,rel:"noopener noreferrer nofollow",target:e.attrs.target||this.options.target},0]}}commands({type:e}){return t=>t.href?function(e,t){return(n,r)=>{const{tr:i,selection:o,doc:s}=n,{ranges:a,empty:l}=o;if(l){const{from:n,to:r}=iw(o.$from,e);s.rangeHasMark(n,r,e)&&i.removeMark(n,r,e),i.addMark(n,r,e.create(t))}else a.forEach((n=>{const{$to:r,$from:o}=n;s.rangeHasMark(o.pos,r.pos,e)&&i.removeMark(o.pos,r.pos,e),i.addMark(o.pos,r.pos,e.create(t))}));return r(i)}}(e,t):function(e){return(t,n)=>{const{tr:r,selection:i}=t;let{from:o,to:s}=i;const{$from:a,empty:l}=i;if(l){const t=iw(a,e);o=t.from,s=t.to}return r.removeMark(o,s,e),n(r)}}(e)}pasteRules({type:e}){return[Dw(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,e,(e=>({href:e})))]}get plugins(){return this.options.openOnClick?[new rg({props:{handleClick:(e,t,n)=>{const{schema:r}=e.state,i=rw(e.state,r.marks.link);i.href&&n.target instanceof HTMLAnchorElement&&(n.stopPropagation(),window.open(i.href,i.target))}}})]:[]}}class IS extends uw{get name(){return"strike"}get schema(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e}],toDOM:()=>["s",0]}}keys({type:e}){return{"Mod-d":jb(e)}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/~([^~]+)~$/,e)]}pasteRules({type:e}){return[Mw(/~([^~]+)~/g,e)]}}class PS extends uw{get name(){return"underline"}get schema(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e}],toDOM:()=>["u",0]}}keys({type:e}){return{"Mod-u":jb(e)}}commands({type:e}){return()=>jb(e)}}class $S extends cw{get name(){return"history"}get defaultOptions(){return{depth:"",newGroupDelay:""}}keys(){return{"Mod-z":fS,"Mod-y":mS,"Shift-Mod-z":mS,"Mod-я":fS,"Shift-Mod-я":mS}}get plugins(){return[hS({depth:this.options.depth,newGroupDelay:this.options.newGroupDelay})]}commands(){return{undo:()=>fS,redo:()=>mS,undoDepth:()=>gS,redoDepth:()=>yS}}}class RS extends uw{get name(){return"anonymize"}get schema(){return{attrs:{title:{default:null}},spanning:!1,parseDOM:[{tag:".anonymize-me",getAttrs:e=>({title:e.getAttribute("title")})}],toDOM:e=>["span",{...e.attrs,class:"anonymize-me"},0]}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:<o>)([^<o>]+)(?:<o>)$/,e)]}pasteRules({type:e}){return[Mw(/(?:<o>)([^<o>]+)(?:<o>)/g,e)]}}class BS extends uw{get name(){return"obscure"}get schema(){return{parseDOM:[{tag:".u-obscure"},{tag:"dp-obscure"}],toDOM:()=>["span",{class:"u-obscure"},0]}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:<o>)([^<o>]+)(?:<o>)$/,e)]}pasteRules({type:e}){return[Mw(/(?:<o>)([^<o>]+)(?:<o>)/g,e)]}}class qS extends uw{get name(){return"unanonymize"}get schema(){return{parseDOM:[{tag:".unanonymized"}],toDOM:()=>["span",{class:"unanonymized"},0]}}commands({type:e}){return()=>jb(e)}inputRules({type:e}){return[Ow(/(?:<o>)([^<o>]+)(?:<o>)$/,e)]}pasteRules({type:e}){return[Mw(/(?:<o>)([^<o>]+)(?:<o>)/g,e)]}}class FS extends cw{get name(){return"PreventDrop"}get plugins(){return[new rg({props:{handleDOMEvents:{drop:(e,t)=>(t.preventDefault(),!0)}}})]}}class LS extends cw{get name(){return"PreventDrop"}get plugins(){return[new rg({props:{handleKeyDown:(e,t)=>!0,handleTextInput:(e,t)=>!0}})]}}const VS={name:"DpAnonymizeText",components:{EditorContent:vw,EditorMenuBubble:_w},props:{value:{type:String,required:!0}},data:()=>({editor:null}),methods:{setValue(){let e=this.editor.getHTML();e=e.replace(/<span[^>]*?title="(.*?)"([^>]*?)class="anonymize-me"([^>]*?)>([^<]*?)<span class="unanonymized">([^<]*?)<\/span>([^<]*?)<\/span>/gm,((e,t)=>t.replaceAll(""",'"'))),e=e.replace(/<span class="unanonymized">(.*?)<\/span>/gm,"$1"),e=e.replace(/<span class="anonymize-me">(.*?)<\/span>/gm,((e,t)=>'<span title="'+t.replaceAll('"',""")+'" class="anonymize-me">***</span>')),this.editor.setContent(e),this.$emit("change",e)}},mounted(){this.editor=new yw({content:this.value,editable:!0,disableInputRules:!0,disablePasteRules:!0,extensions:[new RS,new qS,new BS,new LS,new FS,new DS,new MS,new vS,new CS,new xS,new PS,new $S,new bS],onUpdate:()=>{this.setValue()},editorProps:{handleTextInput:()=>!0}})}},jS=(0,l.Z)(VS,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"border"},[t("editor-menu-bubble",{staticClass:"editor-menububble__wrapper",attrs:{editor:e.editor,"keep-in-bounds":!0},scopedSlots:e._u([{key:"default",fn:function({commands:n,isActive:r,menu:i}){return[t("div",{class:{"is-active":i.isActive},style:`left: ${i.left}px; bottom: ${i.bottom}px;`},[r.anonymize()?t("a",{staticClass:"editor-menububble__button is-active",on:{click:n.unanonymize}},[e._v("\n "+e._s(e.Translator.trans("statement.anonymize.unmark"))+"\n ")]):t("a",{staticClass:"editor-menububble__button",on:{click:n.anonymize}},[e._v("\n "+e._s(e.Translator.trans("statement.anonymize.mark"))+"\n ")])])]}}])}),e._v(" "),t("editor-content",{ref:"editorContent",staticClass:"editor-content",attrs:{autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",editor:e.editor}})],1)}),[],!1,null,null,null).exports,zS={name:"DpBulkEditHeader",props:{selectedItemsCount:{type:Number,required:!1,default:0},selectionText:{type:String,required:!1,default:""}},computed:{selectedItemsText(){return this.selectedItemsCount+" "+this.selectionText}}},HS=(0,l.Z)(zS,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"layout__item u-12-of-12 u-p-0_5 bg-color-selection line-height--1_6",attrs:{role:"menu"}},[t("span",{staticClass:"u-mr"},[e._v("\n "+e._s(e.selectedItemsText)+"\n ")]),e._v(" "),e._t("default",null,{selectedItemsCount:e.selectedItemsCount}),e._v(" "),t("button",{staticClass:"btn btn--secondary float-right",attrs:{type:"button"},on:{click:function(t){return e.$emit("reset-selection")}}},[e._v("\n "+e._s(e.Translator.trans("unselect"))+"\n ")])],2)}),[],!1,null,null,null).exports,US={name:"DpDashboardTaskCard",components:{DpButton:ni,DpCard:di},directives:{cleanhtml:n.J7},props:{currentUserId:{type:String,required:!0},procedureId:{type:String,required:!0}},data:()=>({assignedSegmentCount:0,userHash:""}),computed:{userFilteredSegmentUrl(){return Routing.generate("dplan_segments_list",{procedureId:this.procedureId})+"/"+this.userHash}},mounted(){const e={[this.currentUserId]:{condition:{path:"assignee",value:this.currentUserId}},sameProcedure:{condition:{path:"parentStatement.procedure.id",value:this.procedureId}}},t=Routing.generate("api_resource_list",{resourceType:"StatementSegment"});k.get(t,{filter:e},{serialize:!0}).then((e=>{this.assignedSegmentCount=e.data.data.length})),k.get(Routing.generate("dplan_segments_list",{procedureId:this.procedureId})).then((t=>{const n=t.request.responseURL.split("/"),r=n[n.length-1],i={filter:{...e},searchPhrase:""},o=Routing.generate("dplan_rpc_segment_list_query_update",{queryHash:r});k.patch(o,{},i).then((e=>_(e))).then((e=>{e&&(this.userHash=e)}))}))}},WS=(0,l.Z)(US,(function(){var e=this,t=e._self._c;return t("dp-card",{attrs:{heading:e.Translator.trans("tasks.my")}},[t("div",{staticClass:"u-mt"},[t("span",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.Translator.trans("segments.assigned.now",{count:e.assignedSegmentCount}),expression:"Translator.trans('segments.assigned.now', { count: assignedSegmentCount })"}]})]),e._v(" "),0!==e.assignedSegmentCount?t("div",{staticClass:"text--right u-mt"},[t("dp-button",{attrs:{href:e.userFilteredSegmentUrl,text:e.Translator.trans("tasks.view")}})],1):e._e()])}),[],!1,null,null,null).exports,ZS={name:"DpEditableList",props:{entries:{required:!0,type:[Array,Object],default:()=>[]},translationKeys:{required:!1,type:Object,default:()=>({new:Translator.trans("new"),add:Translator.trans("add"),abort:Translator.trans("abort"),update:Translator.trans("update"),noEntries:Translator.trans("none"),delete:Translator.trans("delete")})},hasPermissionToEdit:{required:!1,type:Boolean,default:!0}},data:()=>({isFormVisible:!1,currentlyUpdating:""}),methods:{toggleFormVisibility(e){this.isFormVisible=e},showNewForm(){this.toggleFormVisibility(!0),this.currentlyUpdating="",this.$emit("reset")},saveEntry(){const e=""!==this.currentlyUpdating?this.currentlyUpdating:"new";this.$emit("saveEntry",e)},resetForm(){this.toggleFormVisibility(!1),this.currentlyUpdating="",this.$emit("reset")},showUpdateForm(e){this.toggleFormVisibility(!0),this.currentlyUpdating=e,this.$parent.$emit("showUpdateForm",e)},deleteEntry(e){this.toggleFormVisibility(!1),this.currentlyUpdating="",this.$parent.$emit("delete",e)}}},KS=ZS;var JS=(0,l.Z)(KS,(function(){var e=this,t=e._self._c;return t("div",[e.entries.length>0||Object.keys(e.entries).length>0?t("ul",{staticClass:"u-mb-0_75"},e._l(e.entries,(function(n,r){return t("li",{key:r,attrs:{"data-cy":"entryItem"}},[e._t("list",null,{entry:n,index:r},n),e._v(" "),!0===e.hasPermissionToEdit?t("span",[t("button",{staticClass:"btn-icns u-m-0 u-ml-0_5",attrs:{"aria-label":e.translationKeys.update,"data-cy":"updateEntry"},on:{click:function(t){return t.preventDefault(),e.showUpdateForm(r)}}},[t("i",{staticClass:"fa fa-pencil",attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{staticClass:"btn-icns u-m-0 u-pl-0",attrs:{"aria-label":e.translationKeys.delete,"data-cy":"deleteEntry"},on:{click:function(t){return t.preventDefault(),e.deleteEntry(r)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"aria-hidden":"true"}})])]):e._e()],2)})),0):t("div",{staticClass:"color--grey u-mb-0_5"},[e._v("\n "+e._s(e.translationKeys.noEntries)+"\n ")]),e._v(" "),!0===e.isFormVisible&&!0===e.hasPermissionToEdit?t("div",[t("div",{staticClass:"u-mb-0_5"},[e._t("form")],2),e._v(" "),t("button",{staticClass:"btn btn--primary",attrs:{"data-cy":""!==e.currentlyUpdating?"saveEntry":"addEntry"},on:{click:function(t){return t.preventDefault(),e.saveEntry.apply(null,arguments)}}},[e._v("\n "+e._s(""!==e.currentlyUpdating?e.translationKeys.update:e.translationKeys.add)+"\n ")]),e._v(" "),t("button",{staticClass:"btn btn--secondary u-ml-0_5",on:{click:function(t){return t.preventDefault(),e.resetForm.apply(null,arguments)}}},[e._v("\n "+e._s(e.translationKeys.abort)+"\n ")])]):e._e(),e._v(" "),!1===e.isFormVisible&&!0===e.hasPermissionToEdit?t("button",{staticClass:"btn btn--primary",attrs:{"data-cy":"showInput"},on:{click:function(t){return t.preventDefault(),e.showNewForm()}}},[e._v("\n "+e._s(e.translationKeys.new)+"\n ")]):e._e()])}),[],!1,null,null,null);const GS=JS.exports,YS=require("tippy.js");var XS=s.n(YS);function QS(e){const t=document.querySelector('[data-suggestion-id="suggestion-popup"]');t&&t.childNodes.forEach(((t,n)=>n===e?t.classList.add("suggestion__list-item--is-active"):t.classList.remove("suggestion__list-item--is-active")))}function ek(e){const t=document.createElement("ul");t.setAttribute("data-suggestion-id","suggestion-popup"),t.setAttribute("class","o-list suggestion__popup");for(let n=0;n<e.length;n++){const r=document.createElement("li");r.setAttribute("class","o-list__item suggestion__list-item u-ph-0_5 u-pv-0_25"),r.setAttribute("data-suggestion-item",`${n}`);const i=document.createElement("button");i.setAttribute("class","btn--blank"),i.appendChild(document.createTextNode(e[n].name)),r.appendChild(i),t.appendChild(r)}if(0===e.length){const e=document.createElement("li");e.appendChild(document.createTextNode("Keine passenden Platzhalter gefunden")),t.appendChild(e)}return t}const tk={name:"DpLinkModal",components:{DpButtonRow:si,DpCheckbox:fi,DpInput:ts,DpModal:zs},mixins:[V.cR],data:()=>({initUrl:"",isVisible:!1,newTab:!1,text:"",url:""}),computed:{hasLink(){return""!==this.initUrl}},methods:{emitAndClose(e){this.$emit("insert","insert"===e?this.url:null,this.newTab,this.text),this.toggleModal()},setVisible(e){this.isVisible=e},toggleModal(e,t,n){this.$refs.linkModal.toggle(),this.isVisible?(this.initUrl=e,this.url=e,this.text=t,this.newTab="_blank"===n):(this.url="",this.text="",this.newTab=!1)}}},nk=(0,l.Z)(tk,(function(){var e=this,t=e._self._c;return t("dp-modal",{ref:"linkModal",attrs:{"content-classes":"u-1-of-3","data-dp-validate":"linkModal"},on:{"modal:toggled":e.setVisible}},[[t("h3",[e._v("\n "+e._s(e.Translator.trans(e.hasLink?"editor.link.edit":"editor.link.insert"))+"\n ")]),e._v(" "),t("div",{staticClass:"space-stack-m"},[t("dp-input",{attrs:{id:"link_text",label:{text:e.Translator.trans("link.text")},required:e.isVisible},model:{value:e.text,callback:function(t){e.text=t},expression:"text"}}),e._v(" "),t("dp-input",{attrs:{id:"link_url",label:{hint:e.Translator.trans("editor.link.url.formatHint"),text:e.Translator.trans("url")},pattern:!0===e.isVisible?"(^https?://.*|^//.*)":null,required:e.isVisible,type:"url"},model:{value:e.url,callback:function(t){e.url=t},expression:"url"}}),e._v(" "),t("dp-checkbox",{attrs:{id:"newTab",label:{text:e.Translator.trans("open.in.new.tab")}},model:{value:e.newTab,callback:function(t){e.newTab=t},expression:"newTab"}}),e._v(" "),t("dp-button-row",{staticClass:"u-mt",attrs:{primary:"","primary-text":e.Translator.trans("insert"),secondary:"","secondary-text":e.Translator.trans("remove")},on:{"primary-action":function(t){e.dpValidateAction("linkModal",(()=>e.emitAndClose("insert")),!1)},"secondary-action":function(t){return e.emitAndClose("remove")}}})],1)]],2)}),[],!1,null,null,null).exports,rk=require("@uppy/drag-drop");var ik=s.n(rk);const ok=require("@uppy/progress-bar");var sk=s.n(ok);const ak=require("@uppy/tus");var lk=s.n(ak);const ck=require("@uppy/core");var dk=s.n(ck);const uk={name:"DpUpload",props:{allowedFileTypes:{type:[Array,String],required:!1,default:"pdf"},allowedFileTypesWarning:{type:String,default:"warning.filetype"},allowMultipleUploads:{type:Boolean,default:!1},chunkSize:{type:Number,default:1/0,required:!1},maxFileSize:{type:Number,default:1e7},maxNumberOfFiles:{type:Number,required:!1,default:1},translations:{type:Object,required:!1,default:()=>({})}},data:()=>({currentFileHash:"",currentFileId:"",uppy:null}),computed:{allowedFileTypeArray(){return T(this.allowedFileTypes)}},methods:{getCookieValue(e){const t=document.cookie.match("(^|[^;]+)\\s*"+e+"\\s*=\\s*([^;]+)");return t?t.pop():""},handleOnBeforeFileAdded(e,t){let n=e.name;const r=["?","#","&","'",'"',"/",":","\\"];for(let e=0;e<r.length;e++)n.includes(r[e])&&(n=n.replace(r[e],"_"));return n!==e.name?{...e,name:n,meta:{...e.meta,name:n}}:e},initialize(){const e={strings:{dropHereOr:Translator.trans("form.button.upload.pdf",{browse:"{browse}",maxUploadSize:O("GB",window.dplan.settings.maxUploadSize)}),failedToUpload:Translator.trans("form.button.upload.failed",{file:"{file}"}),browse:Translator.trans("form.button.upload.search"),...this.translations}};this.uppy=new(dk())({disabled:!0,autoProceed:!0,allowMultipleUploads:this.allowMultipleUploads,restrictions:{allowedFileTypes:this.allowedFileTypeArray,maxFileSize:this.maxFileSize,maxNumberOfFiles:this.maxNumberOfFiles},onBeforeFileAdded:this.handleOnBeforeFileAdded,locale:e}),this.uppy.use(ik(),{target:this.$refs.fileInput,width:"100%",note:null,locale:e}),this.uppy.use(sk(),{target:this.$refs.fileInput,fixed:!1,hideAfterFinish:!1});let t=null;"undefined"!=typeof dplan&&(0,r.Q$)(dplan,"procedureId")&&(t=dplan.procedureId);const n={};null!==t&&"0"!==t&&(n["X-Demosplan-Procedure-Id"]=t),""!==dplan.settings.basicAuth&&(n.Authorization=dplan.settings.basicAuth),this.uppy.use(lk(),{endpoint:dplan.paths.uploadPost,chunkSize:819200,limit:5,onAfterResponse:(e,t)=>{this.currentFileHash=t.getHeader("X-Demosplan-File-Hash"),this.currentFileId=t.getHeader("X-Demosplan-File-Id")},removeFingerprintOnSuccess:!0,headers:n})}},mounted(){this.initialize(),this.uppy.on("complete",(e=>{setTimeout((()=>{this.uppy.cancelAll()}),2e3),this.$emit("uploads-completed",e)})),this.uppy.on("upload-error",((e,t,n)=>{console.error(t),dplan.notify.error(Translator.trans("error.fileupload")),this.$emit("file-error",{file:e,error:t,response:n})})),this.uppy.on("file-added",(e=>{this.$emit("file-added",e)})),this.uppy.on("upload",(e=>{this.$emit("upload",e)})),this.uppy.on("restriction-failed",(()=>{dplan.notify.warning(Translator.trans(this.allowedFileTypesWarning))})),this.uppy.on("upload-success",(e=>{const{name:t,size:n,type:r}=e.data,i={name:t,hash:this.currentFileHash,size:n,type:r,id:e.id,fileId:this.currentFileId};this.currentFileHash="",this.currentFileId="",this.$emit("upload-success",i)}))},beforeDestroy(){this.uppy&&this.uppy.close()}},pk=uk,hk=(0,l.Z)(pk,(function(){return(0,this._self._c)("div",{ref:"fileInput"})}),[],!1,null,null,null).exports,fk={name:"DpUploadedFile",inject:["getFileByHash"],mixins:[V.gH],props:{file:{type:Object,required:!0}},computed:{fileIcon(){const e="txt"===this.file.mimeType?"fa-file-text-o":"fa-folder-o";return this.prefixClass("fa "+e)},fileSize(){return O("KB",this.file.size)},isImage(){return void 0!==["png","jpg","gif","bmp","ico","tiff","svg"].find((e=>e===this.file.mimeType))}},methods:{removeFile(){this.$emit("file-remove",this.file)}}},mk={name:"DpUploadedFileList",components:{DpUploadedFile:(0,l.Z)(fk,(function(){var e=this,t=e._self._c;return t("li",["txt"===e.file.mimeType?t("span",{attrs:{"aria-hidden":"true"}},[t("i",{class:e.fileIcon})]):e._e(),e._v(" "),e.isImage?t("span",[t("img",{attrs:{src:e.getFileByHash(e.file.hash),"aria-label":e.Translator.trans("image.preview"),width:"50px"}})]):e._e(),e._v(" "),t("span",{class:e.prefixClass("inline-block u-pl-0_5"),staticStyle:{width:"calc(100% - 62px)"}},[t("span",{staticClass:"break-words"},[e._v("\n "+e._s(e.file.name)+"\n ")]),e._v("\n ("+e._s(e.fileSize)+")\n "),t("button",{class:e.prefixClass("btn-icns u-m-0"),attrs:{type:"button","aria-label":e.Translator.trans("file.remove")},on:{click:e.removeFile}},[t("i",{class:e.prefixClass("fa fa-trash"),attrs:{"aria-hidden":"true"}})])])])}),[],!1,null,null,null).exports},mixins:[V.gH],props:{files:{type:Array,required:!1,default:()=>[]}}},gk=(0,l.Z)(mk,(function(){var e=this,t=e._self._c;return t("div",[t("h4",{class:e.prefixClass("u-mb-0_25")},[e._v("\n "+e._s(e.Translator.trans("uploaded.files"))+"\n ")]),e._v(" "),t("ul",{class:e.prefixClass("o-list space-stack-xs")},e._l(e.files,(function(n,r){return t("dp-uploaded-file",{key:r,attrs:{file:n},on:{"file-remove":t=>e.$emit("file-remove",t)}})})),1)])}),[],!1,null,null,null).exports,yk={name:"DpUploadFiles",components:{DpLabel:ui.default,DpUpload:hk,DpUploadedFileList:gk},mixins:[V.gH],provide(){return{getFileByHash:this.getFileByHash}},props:{allowedFileTypes:{type:[Array,String],required:!0,default:"pdf"},chunkSize:{type:Number,default:1/0,required:!1},dataDpValidateIf:{type:[Boolean,String],required:!1,default:!1},getFileByHash:{type:Function,required:!0},id:{type:String,required:!1,default:""},label:{type:Object,default:()=>({}),validator:e=>Object.keys(e).every((e=>["hint","text","tooltip"].includes(e)))},maxFileSize:{type:Number,required:!1,default:1e7},maxNumberOfFiles:{type:Number,required:!1,default:1},name:{type:String,required:!1,default:"uploadedFiles"},needsHiddenInput:{type:Boolean,default:!1},required:{type:Boolean,required:!1,default:!1},translations:{type:Object,required:!1,default:()=>({})},sideBySide:{type:Boolean,required:!1,default:!1},storageName:{type:String,required:!1,default:""}},data:()=>({fileHashes:[],uploadedFiles:[]}),watch:{storageName(){this.storageName&&this.updateSessionStorage()}},methods:{addFile(e){this.maxNumberOfFiles<=this.uploadedFiles.length&&(this.fileHashes.shift(),this.uploadedFiles.shift()),this.needsHiddenInput&&this.fileHashes.push(e.hash),this.uploadedFiles.push(e),this.storageName&&this.updateSessionStorage()},clearFilesList(){this.uploadedFiles.forEach((e=>{this.removeFile(e)}))},handleRemove(e){this.removeFile(e),this.$emit("file-remove",e)},handleUpload(e){this.addFile(e),this.$emit("upload-success",e),document.dispatchEvent(new CustomEvent("uploadSuccess",{detail:{file:e,fieldName:this.name}}))},removeFile(e){this.needsHiddenInput&&(this.fileHashes=this.fileHashes.filter((t=>t!==e.hash))),this.uploadedFiles=this.uploadedFiles.filter((t=>t.hash!==e.hash)),this.storageName&&this.updateSessionStorage()},updateSessionStorage(){sessionStorage.setItem(this.storageName,JSON.stringify(this.uploadedFiles))}},mounted(){this.storageName&&(this.uploadedFiles=JSON.parse(sessionStorage.getItem(this.storageName))||[])}},vk=yk,bk=(0,l.Z)(vk,(function(){var e=this,t=e._self._c;return t("fieldset",{class:e.prefixClass("layout")},[t("legend",{staticClass:"hide-visually",domProps:{textContent:e._s(e.Translator.trans("upload.files"))}}),e._v(" "),e.label.text?t("dp-label",e._b({staticClass:"layout__item"},"dp-label",{for:e.id,required:e.required,...e.label},!1)):e._e(),e._v(" "),t("dp-upload",{class:[e.prefixClass("layout__item u-1-of-1-palm"),e.prefixClass(e.sideBySide?"u-1-of-2":"u-1-of-1")],attrs:{"allowed-file-types":e.allowedFileTypes,"chunk-size":e.chunkSize,"max-number-of-files":e.maxNumberOfFiles,"max-file-size":e.maxFileSize,translations:e.translations},on:{"upload-success":e.handleUpload}}),e.uploadedFiles.length>0?t("dp-uploaded-file-list",{class:[e.prefixClass("layout__item u-1-of-1-palm"),e.prefixClass(e.sideBySide?"u-1-of-2":"u-1-of-1 u-mt")],attrs:{files:e.uploadedFiles},on:{"file-remove":e.handleRemove}}):e._e(),e._v(" "),e.needsHiddenInput?t("input",{attrs:{type:"hidden",name:"uploadedFiles"!==e.name?`uploadedFiles[${e.name}]`:"uploadedFiles",required:e.required,"data-dp-validate-if":e.dataDpValidateIf},domProps:{value:e.fileHashes}}):e._e()],1)}),[],!1,null,null,null).exports,wk={name:"DpUploadModal",components:{DpInput:ts,DpModal:zs,DpUploadFiles:bk},props:{getFileByHash:{type:Function,required:!0}},data:()=>({fileUrl:"",altText:"",editAltTextOnly:!1}),methods:{emitAndClose(){this.editAltTextOnly?this.$emit("add-alt",this.altText):this.fileUrl&&this.$emit("insert-image",this.fileUrl,this.altText),this.resetAndClose()},resetAndClose(){this.altText="",this.fileUrl="",this.editAltTextOnly=!1,this.$emit("close"),this.toggleModal()},setFile({hash:e}){this.fileUrl=this.getFileByHash(e),this.$forceUpdate()},toggleModal(e){!0===this.$refs.uploadModal.isOpenModal?this.$refs.uploader.clearFilesList():e&&(this.editAltTextOnly=e.editAltOnly,this.altText=e.currentAlt),this.$refs.uploadModal.toggle()}}},xk=(0,l.Z)(wk,(function(){var e=this,t=e._self._c;return t("dp-modal",{ref:"uploadModal",attrs:{"content-classes":"u-2-of-3-lap-up u-1-of-2-desk-up"}},[[e.editAltTextOnly?t("h3",{staticClass:"u-mb"},[e._v("\n "+e._s(e.Translator.trans("image.edit"))+"\n ")]):t("h3",{staticClass:"u-mb"},[e._v("\n "+e._s(e.Translator.trans("image.insert"))+"\n ")]),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!1===e.editAltTextOnly,expression:"editAltTextOnly === false"}]},[t("dp-upload-files",{ref:"uploader",attrs:{"allowed-file-types":"img",id:"imageFile","get-file-by-hash":e.getFileByHash,"max-file-size":20971520,"max-number-of-files":1,translations:{dropHereOr:e.Translator.trans("form.button.upload.image",{browse:"{browse}",maxUploadSize:"20MB"})}},on:{"upload-success":e.setFile}})],1),e._v(" "),t("dp-input",{staticClass:"u-mb",attrs:{id:"altText",label:{hint:e.Translator.trans("image.alt.explanation"),text:e.Translator.trans("alternative.text")}},model:{value:e.altText,callback:function(t){e.altText=t},expression:"altText"}}),e._v(" "),t("div",{staticClass:"u-mt text--right width-100p space-inline-s"},[t("button",{staticClass:"btn btn--primary",attrs:{type:"button"},on:{click:function(t){return e.emitAndClose()}}},[e._v("\n "+e._s(e.Translator.trans("insert"))+"\n ")]),e._v(" "),t("button",{staticClass:"btn btn--secondary",attrs:{type:"button"},on:{click:function(t){return e.resetAndClose()}}},[e._v("\n "+e._s(e.Translator.trans("abort"))+"\n ")])])]],2)}),[],!1,null,null,null).exports;class Sk extends uw{get name(){return"delete"}get schema(){return{parseDOM:[{tag:"del"}],toDOM:()=>["del",{title:Translator.trans("text.deleted")},0]}}commands({type:e}){return()=>jb(e)}}const kk={name:"DpResizableImage",props:{getPos:{type:Function,required:!1,default:()=>({})},node:{type:Object,required:!1,default:()=>({})},options:{type:Object,required:!1,default:()=>({})},selected:{type:Boolean,required:!1,default:!1},updateAttrs:{type:Function,required:!1,default:()=>({})},view:{type:Object,required:!1,default:()=>({})}},data:()=>({id:(0,g.v4)(),imageTitle:Translator.trans("image.alt.edit.hint"),observer:null,ratioFactor:1}),methods:{updateImageDimensions(e){e>0&&this.$nextTick((()=>{this.updateAttrs({height:e/this.ratioFactor,width:e})}))},setRatio(e=!1){const t=new Image;t.onload=()=>{if(this.ratioFactor=t.width/t.height,e){const e=this.$parent.$el.clientWidth-40,n=t.width<e?t.width:e;this.updateImageDimensions(n)}},t.src=this.node.attrs.src}},mounted(){this.observer=new ResizeObserver((e=>this.updateImageDimensions(e[0].target.offsetWidth))),this.observer.observe(this.$refs.imagewrapper),this.$root.$on("update-image:"+this.id,(e=>{this.updateAttrs(e)}));const e=this.node.attrs.height>0==0||this.node.attrs.height===1/0;this.setRatio(e)}},Ck=kk,_k=(0,l.Z)(Ck,(function(){var e=this,t=e._self._c;return t("span",{ref:"imagewrapper",staticClass:"resizable-image",style:`height: ${e.node.attrs.height}px; width: ${e.node.attrs.width}px`,attrs:{tabindex:"1"},on:{mouseup:()=>e.updateImageDimensions(e.node.attrs.width)}},[t("img",{ref:"image",attrs:{alt:e.node.attrs.alt,src:e.node.attrs.src,title:e.imageTitle,width:e.node.attrs.width},on:{click:function(t){return t.ctrlKey?e.$root.$emit("open-image-alt-modal",t,e.id):null}}})])}),[],!1,null,null,null).exports,Ak=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/;class Ek extends hw{get name(){return"image"}get schema(){return{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt"),width:e.getAttribute("width"),height:e.getAttribute("height")})}],toDOM:e=>["img",{...e.attrs,unselectable:"on"}]}}commands({type:e}){return{insertImage:t=>(n,r)=>{const{selection:i}=n,o=i.$cursor?i.$cursor.pos:i.$to.pos,s=e.create(t);r(n.tr.insert(o,s))}}}inputRules({type:e}){return[Tw(Ak,e,(e=>{const[,t,n,r,i,o]=e;return{src:n,alt:t,title:r,width:i,height:o}}))]}get view(){return _k}}class Ok extends uw{get name(){return"insert"}get schema(){return{parseDOM:[{tag:"ins"}],toDOM:()=>["ins",{title:Translator.trans("text.inserted")},0]}}commands({type:e}){return()=>jb(e)}}class Tk extends NS{get defaultOptions(){return{openOnClick:!1,target:null}}get schema(){return{attrs:{href:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),target:e.getAttribute("target")})}],toDOM:e=>["a",{...e.attrs,rel:"noopener noreferrer nofollow"},0]}}}class Dk extends uw{get name(){return"mark"}get schema(){return{parseDOM:[{tag:"mark"}],toDOM:()=>["mark",{title:Translator.trans("text.mark")},0]}}commands({type:e}){return()=>jb(e)}}class Mk extends hw{get name(){return"insertHTML"}get schema(){return{inline:!1,attrs:{},group:"block",draggable:!0,parseDOM:[]}}commands({type:e}){return{insertHTML:e=>(t,n)=>{const{selection:r}=t,i=document.createElement("div");i.innerHTML=e.trim();const o=Bf.fromSchema(t.schema).parseSlice(i);n(t.tr.insert(r.anchor,o.content))}}}}function Nk(e){const t=[e[0].type];let n=`<${e[0].type}>`;for(let r=0;r<e.length;r++){const i=e[r];n+=`<li>${i.content}`;const o=r+1<e.length&&e[r+1].indent>i.indent,s=r+1<e.length&&e[r+1].indent<i.indent,a=r+1===e.length;if(o?(n+=`<${e[r+1].type}>`,t.unshift(e[r+1].type)):n+="</li>",s){let o=0;for(;e[r+1].indent+o<i.indent;)n+=`</${t[0]}></li>`,t.shift(),o++}if(a)for(let e=i.indent;e>1;e--)n+=`</${t[0]}></li>`,t.shift()}return n+=`</${e[0].type}>`,n}const Ik={name:"DpEditor",components:{DpIcon:Yr,EditorMenuBar:ww,EditorContent:vw,DpLinkModal:nk,DpUploadModal:xk},directives:{cleanhtml:n.J7,tooltip:n.u},mixins:[V.gH],props:{editorId:{type:String,required:!1,default:""},hiddenInput:{type:String,required:!1,default:""},required:{type:Boolean,required:!1,default:!1},toolbarItems:{required:!1,type:Object,default:()=>({})},maxlength:{type:[Number,null],default:null},obscure:{type:Boolean,required:!1,default:!1},readonly:{required:!1,default:!1,type:Boolean},routes:{type:Object,required:!1,default:()=>({}),validator:e=>Object.keys(e).every((e=>["getFileByHash"].includes(e)))},suggestions:{type:Array,validator:e=>{const t="@|$|#",n=!0,r=!0,i=[{id:"a unique id",name:"a string that should be displayed when inserting the suggestion"}];return Array.isArray(e)&&e.filter((e=>{let o=e.matcher&&e.suggestions;return o=o&&typeof e.matcher.char==typeof t,o=o&&typeof e.matcher.allowSpaces==typeof n,o=o&&typeof e.matcher.startOfLine==typeof r,o=o&&e.suggestions.filter((e=>typeof e.id==typeof i[0].id&&typeof e.name==typeof i[0].name)).length===e.suggestions.length,o})).length===e.length},required:!1,default:()=>[]},value:{type:String,required:!0},dataDpValidateIf:{type:String,default:"",required:!1}},data(){return{currentValue:"",diffMenu:{isOpen:!1,buttons:[]},editingImage:null,editor:null,editorHeight:"",isDiffMenuOpen:!1,isFullscreen:!1,isTableMenuOpen:!1,linkUrl:"",manuallyResetForm:!0,tableMenu:{isOpen:!1,buttons:[{label:"editor.table.create",command:e=>e.createTable({rowsCount:3,colsCount:3,withHeaderRow:!1}),name:"createTable"},{label:"editor.table.delete",command:e=>e.deleteTable(),name:"deleteTable"},{label:"editor.table.addColumnBefore",command:e=>e.addColumnBefore(),name:"addColumnBefore"},{label:"editor.table.addColumnAfter",command:e=>e.addColumnAfter(),name:"addColumnAfter"},{label:"editor.table.deleteColumn",command:e=>e.deleteColumn(),name:"deleteColumn"},{label:"editor.table.addRowBefore",command:e=>e.addRowBefore(),name:"addRowBefore"},{label:"editor.table.addRowAfter",command:e=>e.addRowAfter(),name:"addRowAfter"},{label:"editor.table.deleteRow",command:e=>e.deleteRow(),name:"deleteRow"},{label:"editor.table.toggleCellMerge",command:e=>e.toggleCellMerge(),name:"toggleCellMerge"}]},toolbar:Object.assign({headings:[],imageButton:!1,insertAndDelete:!1,fullscreenButton:!0,linkButton:!1,listButtons:!0,mark:!1,obscure:this.obscure,strikethrough:!1,table:!1,textDecoration:!0},this.toolbarItems)}},computed:{counterText(){return(0,r.T8)(this.hiddenInputValue.length,this.maxlength)},hiddenInputValue(){return""===this.currentValue.replace("<p></p>","")?"":this.currentValue},obscureEnabled(){return this.toolbar.obscure}},watch:{value(e){this.editor.focused||(this.currentValue=e,this.editor.setContent(e,!1))},readonly(){this.editor.setOptions({editable:!this.readonly})}},methods:{addAltTextToImage(e){this.$root.$emit("update-image:"+this.editingImage,{alt:e}),this.resetEditingImage(),this.setValue()},appendText(e){let t;const n=this.startsWithTag(this.currentValue,"p")||this.startsWithTag(e,"p");"k.A."===this.currentValue||""===this.currentValue?t=e:"k.A"!==this.currentValue&&""!==this.currentValue&&n?t=this.currentValue+e:"k.A"!==this.currentValue&&""!==this.currentValue&&(t=this.currentValue+"<br>"+e),this.editor.setContent(t),this.currentValue=t,this.$emit("input",this.currentValue)},cut(){document.execCommand("cut")},fullscreen(e){const t=e.target.parentElement.parentElement.parentElement.querySelector(".tiptap .editor__content");!1===this.isFullscreen&&t.hasAttribute("style")&&(this.editorHeight=t.getAttribute("style"),t.removeAttribute("style")),this.isFullscreen=!this.isFullscreen,!1===this.isFullscreen&&""!==this.editorHeight&&t.setAttribute("style",this.editorHeight)},handleInsertText(e){e=e.replace(/\n/g,"<br>"),0===this.editor.view.input.lastClick.x&&0===this.editor.view.input.lastClick.y?this.appendText(e):this.insertTextAtCursorPos(e)},insertTextAtCursorPos(e){this.startsWithTag(e,"p")&&(e=e.slice(3,-4)),this.editor.commands.insertHTML(e),this.currentValue=this.editor.getHTML()},startsWithTag(e,t){const n=document.createElement("div");return n.innerHTML=e,(n.firstChild&&n.firstChild.nodeName)===t.toUpperCase()},insertImage(e,t){this.editor.commands.insertImage({src:e,alt:t})},insertUrl(e,t,n){if(null!==e){if(""!==e&&""!==n){const r=this.editor.schema.text(n,[this.editor.schema.marks.link.create({href:e,...t&&{target:"_blank"}})]);this.editor.view.dispatch(this.editor.state.tr.replaceSelectionWith(r,!1))}}else this.editor.commands.link({href:null,...t&&{target:"_blank"}})},getLinkMark:e=>e.marks&&e.marks.find((e=>"link"===e.type.name)),openUploadModal(e){this.$refs.uploadModal.toggleModal(e)},prepareInitText(){this.currentValue=this.replaceLinebreaks(this.currentValue),this.currentValue=this.replacePlaceholdersWithImages(this.currentValue)},replaceLinebreaks(e){let t=e;return t=t.replace(/<\/p>[\n|\r|\s|\\n|\\r]*?<p>/g,"</p><p>"),t=t.replace(/<ul>[\n|\r|\s|\\n|\\r]*?<li>/g,"<ul><li>"),t.replace(/<\/li>[\n|\r|\s|\\n|\\r]*?<li>/g,"</li><li>")},replacePlaceholdersWithImages(e=this.currentValue){const t=Translator.trans("image.placeholder"),n=t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t,r=new RegExp(`(\\[${n}\\].*?--\x3e)`,"gm");try{return e.replace(r,((e,t)=>{const n=t.match(/{([^}]*?)}/)[1]===Translator.trans("image.alt.placeholder")?"":t.match(/{([^}]*?)}/)[1],r=t.match(/<!-- (.*?) -->/)[1],i=r.substr(7,36),o=r.match(/width=(\d*?)&/)[1],s=r.match(/height=(\d*?)$/)[1];return`<img src="${this.routes.getFileByHash(i)}" width="${o}" height="${s}" alt="${n}">`}))}catch(t){return e}},resetEditingImage(){this.editingImage=null},resizeVertically(e){const t=e.target.parentElement.querySelector(".tiptap .editor__content");e.preventDefault();const n=parseFloat(getComputedStyle(t,null).getPropertyValue("height").replace("px","")),r=e.pageY;function i(e){const i=n+(e.pageY-r);t.style.height=i+"px"}window.addEventListener("mousemove",i),window.addEventListener("mouseup",(function(){window.removeEventListener("mousemove",i)}))},resetEditor(){this.editor.setContent("")},setValue(){this.currentValue=this.editor.getHTML();const e=new RegExp('<span class="'+this.prefixClass("u-obscure")+'">(.*?)<\\/span>',"g");this.currentValue=this.currentValue.replace(e,"<dp-obscure>$1</dp-obscure>");const t=""===this.currentValue.split("<p>").join("").split("</p>").join("").trim();this.$emit("input",t?"":this.currentValue)},setSelectionByEditor(e,t,n){const r=this.editor.view.state.tr;if(e){const t=this.getLinkMark(e);t&&t.attrs.href===n.href&&this.editor.setSelection(r.selection.anchor-r.selection.$anchor.nodeBefore.nodeSize,r.selection.anchor)}if(t){const e=this.getLinkMark(t);e&&e.attrs.href===n.href&&this.editor.setSelection(r.selection.anchor,r.selection.anchor+r.selection.$anchor.nodeAfter.nodeSize)}},showLinkPrompt(e,t){this.linkUrl=t.href?t.href:"";const n=this.editor.view.state.tr.selection;if(t.href){const e=n.anchor>n.head,r=e?"$anchor":"$head",i=n[e?"$head":"$anchor"].nodeBefore,o=n[r].nodeAfter;this.setSelectionByEditor(i,o,t)}const r=this.editor.state.doc.textBetween(this.editor.view.state.tr.selection.from,this.editor.view.state.tr.selection.to," ");this.$refs.linkModal.toggleModal(this.linkUrl,r,t.target)},executeSubMenuButtonAction(e,t,n=!1){n?this[t].buttons.forEach((t=>{(this.editor.isActive[t.name]()||t===e)&&t.command(this.editor.commands)})):e.command(this.editor.commands),this[t].isOpen=!1},toggleSubMenu(e,t){if(this[e].isOpen=t,!0===t){this["tableMenu"===e?"diffMenu":"tableMenu"].isOpen=!1;const t=()=>{this[e].isOpen=!1,document.removeEventListener("click",t)};document.addEventListener("click",t)}}},created(){this.currentValue=this.value,this.prepareInitText()},mounted(){const e=[new $S,new bS,new wS({levels:this.toolbar.headings})];e.push(new Mk),this.suggestions.length>0&&this.suggestions.forEach((t=>{e.push(function({matcher:e,suggestions:t},n){const r=t.map((e=>({id:e.id,name:e.name+" "})));let i=null,o=0,s=r,a=(...e)=>({args:e}),l=null;function c(e){let t=e.target;"BUTTON"===t.tagName&&(t=t.parentElement);const i=parseInt(t.getAttribute("data-suggestion-item"));u(r[i]),n.editor.focus()}function d(e,t,n){const r=n.getBoundingClientRect(),{x:o,y:s}=r;0===o&&0===s||(i?i[0].setContent(ek(e)):i=XS()("#mainContent",{getReferenceClientRect:()=>r,appendTo:()=>document.body,interactive:!0,sticky:!0,plugins:[YS.sticky],content:ek(e),trigger:"manual",showOnCreate:!0,theme:"dark",placement:"top-start",inertia:!0,duration:[400,200]}),QS(t),function(...e){const t=document.querySelector('[data-suggestion-id="suggestion-popup"]');e.forEach((({eventType:e,handler:n})=>function(e,t,n){e&&(e.removeEventListener(t,n),e.addEventListener(t,n))}(t,e,n)))}({eventType:"click",handler:c}))}function u(e){a({range:l,attrs:{id:e.id,label:e.name}})}return new kS({items:r,matcher:e,mentionClass:"suggestion__node",onEnter:({items:e,range:t,command:n,virtualNode:r})=>{s=e,l=t,o=0,d(s,o,r),a=n},onChange:({items:e,range:t,virtualNode:n})=>{s=e,l=t,o=0,d(s,o,n)},onExit:()=>{s=[],l=null,o=0,i&&(i[0].destroy(),i=null)},onKeyDown:({event:e})=>"ArrowUp"===e.key?(o>0&&(o-=1,QS(o)),!0):"ArrowDown"===e.key?(o<r.length-1&&(o+=1,QS(o)),!0):"Enter"===e.key?(u(r[o]),!0):" "===e.key&&(1===r.length&&u(r[0]),!0)})}(t,this))})),this.toolbar.headings.length>0&&e.push(new wS({levels:this.toolbar.headings})),this.toolbar.imageButton&&e.push(new Ek),this.toolbar.linkButton&&(e.push(new NS),e.push(new Tk)),this.toolbar.obscure&&e.push(new BS),this.toolbar.listButtons&&(e.push(new vS),e.push(new CS),e.push(new xS)),this.toolbar.table&&(e.push(new AS({resizable:!0})),e.push(new ES),e.push(new OS),e.push(new TS)),this.toolbar.insertAndDelete&&(e.push(new Sk),e.push(new Ok),this.diffMenu.buttons=[{label:"editor.diff.insert",command:e=>e.insert(),name:"insert"},{label:"editor.diff.delete",command:e=>e.delete(),name:"delete"}]),this.toolbar.mark&&(e.push(new Dk),this.diffMenu.buttons.unshift({label:"editor.mark",command:e=>e.mark(),name:"mark"})),this.toolbar.textDecoration&&(e.push(new DS),e.push(new MS),e.push(new PS)),this.toolbar.strikethrough&&e.push(new IS),this.editor=new yw({editable:!this.readonly,extensions:e,content:this.currentValue,disableInputRules:!0,disablePasteRules:!0,onUpdate:()=>{this.setValue()},editorProps:{handleDrop:(e,t,n,r)=>{if(!r)return!0},handleClick:(e,t,n)=>{if("img"===n.target.tagName.toLowerCase()&&n.ctrlKey){const e=n.target;this.openUploadModal({editAltOnly:!0,currentAlt:e.getAttribute("alt")})}},transformPastedHTML:e=>{e=function(e){const t=/class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|office:wo/i.test(e),n=/class="OutlineElement/.test(e);if(!1===(t||n))return e;e=e.replace(/<meta[^>]*>/im,""),t&&(e=function(e){return e.replace(/( |\r|\n)/gim," ").replace(/<head>(.|\n|\r)*?<\/head>/im,"").replace(/<(\/)?(html|o:p)[^>]*>/gim,"").replace(/<!\[if !(.*?)\]>(.*?)<span(.*?)style='mso-list:Ignore'>(.*?)<!\[endif\]>/gim,((e,t,n,r,i)=>`<span data-val-${t}="${i.replace(/<span[^>]*>/gim,"").replace(/<\/span>/gim,"").replace(/( |\s|\\r|\\n|\r|\n)/gim,"")}" />`))}(e));const r=(new DOMParser).parseFromString(e,"text/html"),i=function(e,t){let n={};return(t?e.querySelectorAll("[class^=MsoList]"):e.querySelectorAll("li")).forEach((e=>{const r=t?function(e){const t=e.getAttribute("style").match(/mso-list:([^'|^"|^;]*)/i)[0],n=parseInt(t.match(/level\d+/i)[0].slice(5)),r=t.match(/lfo\d+/i)[0]||"",i=e.querySelector("[data-val-supportLists]")?.getAttribute("data-val-supportLists")||"";return{listId:r,indent:n,type:"ul",content:e.innerHTML,listStyleType:i}}(e):function(e){const t=parseInt(e.getAttribute("data-aria-level"));return{listId:parseInt(e.getAttribute("data-listid")),indent:t,type:e.parentElement.nodeName,content:e.innerHTML.replace(/ /gim," ")}}(e);!1===Object.keys(n).includes(r.listId.toString())&&(n[r.listId]=[]),e.setAttribute("data-list-indicator",r.listId),n[r.listId].push(r)})),t&&(n=function(e){return Object.values(e).forEach((t=>{let n=(0,g.v4)();const r=[n],i=[n];let o=0;e[t[0].listId].forEach(((e,s)=>{s>0&&t[s-1].indent<t[s].indent&&(n=(0,g.v4)(),o++,r[o]=n,i.push(n)),s>0&&t[s-1].indent>t[s].indent&&o--,e.sublistId=r[o],e.idx=s})),i.forEach((n=>{const r=t.filter((e=>e.sublistId===n));r.length>1&&r.map((e=>({...e,type:r[0].listStyleType===r[1].listStyleType?"ul":"ol"}))).forEach((n=>{e[t[0].listId][n.idx]=n})),1===r.length&&/(\d+|\w+)/i.test(r[0].listStyleType)&&"o"!==r[0].listStyleType&&(e[t[0].listId][r[0].idx].type="ol")}))})),e}(n)),n}(r,t);return Object.keys(i).forEach((e=>{const t=r.querySelector('[data-list-indicator="'+e+'"]');"ul"===t.parentElement.nodeName.toLowerCase()||"ol"===t.parentElement.nodeName.toLowerCase()?t.parentElement.before(Nk(i[e])):t.before(Nk(i[e])),r.querySelectorAll('[data-list-indicator="'+e+'"]').forEach((e=>{"ul"===e.parentElement.nodeName.toLowerCase()||"ol"===e.parentElement.nodeName.toLowerCase()?e.parentElement.remove():e.remove()}))})),r.documentElement.outerHTML.replace(/>/gim,">").replace(/</gim,"<").replace(/<div[^>]*?class="ListContainerWrapper[^>]*?><ul[^>]*?><\/ul><\/div>/gm,"").replace(/<ul[^>]*?><\/ul>/gm,"")}(e);const t=this.prefixClass("u-obscure"),n=function(e){const t=document.getElementsByTagName("body")[0],n=document.createElement("div");n.className=e,n.id="tmpIdToGetColor",t.appendChild(n);const r=document.getElementById("tmpIdToGetColor"),i=window.getComputedStyle(r).getPropertyValue("color");return t.removeChild(r),i}(t);let r=e;return e.includes(`span style="color: ${n}`)&&(r=e.replace(/(?:<meta [^>]*>\s*<span [^>]*>\s*)([^<]*?)(?:\s*<\/span>)/g,"$1"),r='<span class="'+t+'">'+r+"</span>"),!1===this.linkButton&&(r=r.replace(/<a[^>]*>(.*?)<\/a>/g,"$1")),r=r.replace(/<img.*?>/g,""),r}},onInit:({state:e,view:t})=>{t._props.handleScrollToSelection=Bk}}),this.$root.$on("open-image-alt-modal",((e,t)=>{this.editingImage=t,this.openUploadModal({editAltOnly:!0,currentAlt:e.target.getAttribute("alt")})})),this.manuallyResetForm=""!==this.hiddenInput&&null!==this.$el.closest("form"),this.manuallyResetForm&&this.$el.closest("form").addEventListener("reset",this.resetEditor)},beforeDestroy(){this.editor&&(this.editor.destroy(),this.manuallyResetForm&&this.$el.closest("form").removeEventListener("reset",this.resetEditor))}};function Pk(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function $k(e,t){return"number"==typeof e?e:e[t]}const Rk=function(e){const t=e.parentNode;return t&&11===t.nodeType?t.host:t};function Bk(e,t=e.coordsAtPos(e.state.selection.head),n=e.docView.dom){const r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument.defaultView;for(let s=n||e.dom;s;s=Rk(s)){if(1!==s.nodeType)continue;const e=window.getComputedStyle(s,null),n="auto"===e["overflow-y"]||"scroll"===e["overflow-y"]||1!==s.nodeType,a=n?Pk(o):s.getBoundingClientRect();let l=0,c=0;if(t.top<a.top+$k(r,"top")?c=-(a.top-t.top+$k(i,"top")):t.bottom>a.bottom-$k(r,"bottom")&&(c=t.bottom-a.bottom+$k(i,"bottom")),t.left<a.left+$k(r,"left")?l=-(a.left-t.left+$k(i,"left")):t.right>a.right-$k(r,"right")&&(l=t.right-a.right+$k(i,"right")),(l||c)&&(c&&(s.scrollTop+=c),l&&(s.scrollLeft+=l)),n)break}}const qk=Ik;var Fk=(0,l.Z)(qk,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"o-form__control-tiptap"},[0!==e.maxlength?t("div",{directives:[{name:"cleanhtml",rawName:"v-cleanhtml",value:e.counterText,expression:"counterText"}],class:e.prefixClass("lbl__hint")}):e._e(),e._v(" "),e.toolbar.linkButton?t("dp-link-modal",{ref:"linkModal",on:{insert:e.insertUrl}}):e._e(),e._v(" "),e.toolbar.imageButton?t("dp-upload-modal",{ref:"uploadModal",attrs:{"get-file-by-hash":e.routes.getFileByHash},on:{"insert-image":e.insertImage,"add-alt":e.addAltTextToImage,close:e.resetEditingImage}}):e._e(),e._v(" "),e._t("modal",null,{appendText:e.appendText,handleInsertText:e.handleInsertText}),e._v(" "),t("div",{class:e.prefixClass("row tiptap")},[t("div",{class:e.prefixClass("col")},[t("div",{class:[e.isFullscreen?"fullscreen":"",e.prefixClass("editor")]},[t("editor-menu-bar",{attrs:{editor:e.editor},scopedSlots:e._u([{key:"default",fn:function({commands:n,isActive:r,getMarkAttrs:i}){return t("div",{class:[e.readonly?e.prefixClass("readonly"):"",e.prefixClass("menubar")]},[t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.cut"),expression:"Translator.trans('editor.cut')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button","aria-label":e.Translator.trans("editor.cut"),disabled:e.readonly},on:{click:e.cut}},[t("i",{class:e.prefixClass("fa fa-scissors"),attrs:{"aria-hidden":"true"}})]),e._v("\n ❘\n "),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.undo"),expression:"Translator.trans('editor.undo')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button","aria-label":e.Translator.trans("editor.undo"),disabled:e.readonly},on:{click:n.undo}},[t("i",{class:e.prefixClass("fa fa-reply"),attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.redo"),expression:"Translator.trans('editor.redo')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button","aria-label":e.Translator.trans("editor.redo"),disabled:e.readonly},on:{click:n.redo}},[t("i",{class:e.prefixClass("fa fa-share"),attrs:{"aria-hidden":"true"}})]),e._v(" "),e.toolbar.textDecoration?[e._v("\n ❘\n "),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.bold"),expression:"Translator.trans('editor.bold')"}],class:[r.bold()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.bold"),disabled:e.readonly},on:{click:n.bold}},[t("i",{class:e.prefixClass("fa fa-bold"),attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.italic"),expression:"Translator.trans('editor.italic')"}],class:[r.italic()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.italic"),disabled:e.readonly},on:{click:n.italic}},[t("i",{class:e.prefixClass("fa fa-italic"),attrs:{"aria-hidden":"true"}})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.underline"),expression:"Translator.trans('editor.underline')"}],class:[r.underline()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.underline"),disabled:e.readonly},on:{click:n.underline}},[t("i",{class:e.prefixClass("fa fa-underline"),attrs:{"aria-hidden":"true"}})])]:e._e(),e._v(" "),e.toolbar.strikethrough?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.strikethrough"),expression:"Translator.trans('editor.strikethrough')"}],class:[r.strike()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.strikethrough"),disabled:e.readonly},on:{click:n.strike}},[t("i",{class:e.prefixClass("fa fa-strikethrough"),attrs:{"aria-hidden":"true"}})]):e._e(),e._v(" "),e.toolbar.insertAndDelete?t("div",{class:e.prefixClass("inline-block relative")},[t("button",{class:[r.insert()||r.delete()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:function(t){return t.stopPropagation(),e.toggleSubMenu("diffMenu",!e.diffMenu.isOpen)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.toggleSubMenu("diffMenu",!1):null}}},[t("dp-icon",{staticClass:"align-text-top",attrs:{icon:"highlighter"}}),e._v(" "),t("i",{class:e.prefixClass("fa fa-caret-down")})],1),e._v(" "),e.diffMenu.isOpen?t("div",{class:e.prefixClass("button_submenu")},e._l(e.diffMenu.buttons,(function(n,i){return t("button",{key:`diffMenu_${i}`,class:{"is-active":r[n.name]()},attrs:{type:"button",disabled:e.readonly},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(()=>{i===e.diffMenu.buttons.length-1&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(()=>{0===i&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments):null}],click:function(t){return t.stopPropagation(),e.executeSubMenuButtonAction(n,"diffMenu",!0)}}},[e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])})),0):e._e(),e._v("\n ❘\n ")]):e.toolbar.mark?t("div",{class:e.prefixClass("inline-block relative")},e._l(e.diffMenu.buttons,(function(n,i){return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans(n.label),expression:"Translator.trans(button.label)"}],key:`diffMenu_${i}`,class:[r[n.name]()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly,"aria-label":e.Translator.trans(n.label)},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(()=>{i===e.diffMenu.buttons.length-1&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(()=>{0===i&&e.toggleSubMenu("diffMenu",!1)}).apply(null,arguments):null}],click:function(t){return t.stopPropagation(),e.executeSubMenuButtonAction(n,"diffMenu",!0)}}},[t("dp-icon",{staticClass:"align-text-top",attrs:{icon:"highlighter"}})],1)})),0):e._e(),e._v(" "),e.toolbar.listButtons?[t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.unordered.list"),expression:"Translator.trans('editor.unordered.list')"}],class:[r.bullet_list()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.unordered.list"),disabled:e.readonly},on:{click:n.bullet_list}},[t("i",{class:e.prefixClass("fa fa-list-ul")})]),e._v(" "),t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.ordered.list"),expression:"Translator.trans('editor.ordered.list')"}],class:[r.ordered_list()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button","aria-label":e.Translator.trans("editor.ordered.list"),disabled:e.readonly},on:{click:n.ordered_list}},[t("i",{class:e.prefixClass("fa fa-list-ol")})]),e._v("\n ❘\n ")]:e._e(),e._v(" "),e.toolbar.headings.length>0?[e._l(e.toolbar.headings,(function(i){return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.heading.level",{level:i}),expression:"Translator.trans('editor.heading.level', {level: heading})"}],key:"heading_"+i,class:[r.heading({level:i})?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:function(e){return n.heading({level:i})}}},[e._v("\n "+e._s(`H${i}`)+"\n ")])})),e._v("\n ❘\n ")]:e._e(),e._v(" "),e.obscureEnabled?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("obscure.title"),expression:"Translator.trans('obscure.title')"}],class:[r.obscure()?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:n.obscure}},[t("i",{class:e.prefixClass("fa fa-pencil-square"),attrs:{"aria-hidden":"true"}})]):e._e(),e._v(" "),e.toolbar.linkButton?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.link.edit.insert"),expression:"Translator.trans('editor.link.edit.insert')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button"},on:{click:function(t){t.stopPropagation(),e.showLinkPrompt(n.link,i("link"))}}},[t("i",{class:e.prefixClass("fa fa-link")})]):e._e(),e._v(" "),e.toolbar.imageButton?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("image.insert"),expression:"Translator.trans('image.insert')"}],class:e.prefixClass("menubar__button"),attrs:{type:"button",disabled:e.readonly},on:{click:function(t){return t.stopPropagation(),e.openUploadModal(null)}}},[t("i",{class:e.prefixClass("fa fa-picture-o")})]):e._e(),e._v(" "),e.toolbar.table?t("div",{class:e.prefixClass("inline-block relative")},[t("button",{class:[e.tableMenu.isOpen?e.prefixClass("is-active"):"",e.prefixClass("menubar__button")],attrs:{type:"button",disabled:e.readonly},on:{click:function(t){return t.stopPropagation(),e.toggleSubMenu("tableMenu",!e.tableMenu.isOpen)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.toggleSubMenu("tableMenu",!1):null}}},[t("i",{class:e.prefixClass("fa fa-table")}),e._v(" "),t("i",{class:e.prefixClass("fa fa-caret-down")})]),e._v(" "),e.tableMenu.isOpen?t("div",{class:e.prefixClass("button_submenu")},e._l(e.tableMenu.buttons,(function(n,r){return t("button",{key:`tableMenu_${r}`,attrs:{type:"button",disabled:e.readonly},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(()=>{r===e.tableMenu.buttons.length-1&&e.toggleSubMenu("tableMenu",!1)}).apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(()=>{0===r&&e.toggleSubMenu("tableMenu",!1)}).apply(null,arguments):null}],click:function(t){return t.stopPropagation(),e.executeSubMenuButtonAction(n,"tableMenu")}}},[e._v("\n "+e._s(e.Translator.trans(n.label))+"\n ")])})),0):e._e()]):e._e(),e._v(" "),e.toolbar.fullscreenButton?t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.Translator.trans("editor.fullscreen"),expression:"Translator.trans('editor.fullscreen')"}],class:[e.isFullscreen?e.prefixClass("is-active"):"",e.prefixClass("menubar__button float-right")],attrs:{type:"button","aria-label":e.Translator.trans("editor.fullscreen")},on:{click:e.fullscreen}},[t("i",{class:e.prefixClass("fa fa-arrows-alt"),attrs:{"aria-hidden":"true"}})]):e._e(),e._v(" "),e._t("button")],2)}}],null,!0)}),e._v(" "),e.editor?t("editor-content",{class:e.prefixClass("editor__content overflow-hidden"),attrs:{"data-cy":`editor${e.editorId}`,editor:e.editor}}):e._e(),e._v(" "),""!==e.hiddenInput?t("input",{class:[e.required?e.prefixClass("is-required"):"",e.prefixClass("tiptap__input--hidden")],attrs:{"data-dp-validate-if":e.dataDpValidateIf||!1,type:"hidden",id:e.hiddenInput,name:e.hiddenInput,"data-dp-validate-maxlength":e.maxlength},domProps:{value:e.hiddenInputValue}}):e._e(),e._v(" "),e.isFullscreen?e._e():t("i",{class:e.prefixClass("fa fa-angle-down resizeVertical"),attrs:{"aria-hidden":"true",draggable:"true"},on:{mousedown:e.resizeVertically}})],1)])])],2)}),[],!1,null,null,null);const Lk=Fk.exports,Vk=require("vuex"),jk={name:"DpNotifyMessage",mixins:[V.gH],props:{message:{type:Object,required:!0},hideTimer:{type:Number,required:!1,default:2e4}},data:()=>({messageId:"",icons:{info:"fa-info-circle",warning:"fa-exclamation-triangle",error:"fa-exclamation-circle",confirm:"fa-check-circle",dev:"fa-info-circle"}}),computed:{messageClass(){return"c-notify__message--"+this.message.type},messageIcon(){return this.icons[this.message.type]}},methods:{hide(){this.$emit("dp-notify-remove",this.message)}},mounted(){"error"!==this.message.type&&setTimeout((()=>{this.hide()}),this.hideTimer)}},zk=(0,l.Z)(jk,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("c-notify__message "+e.messageClass)},[t("i",{class:e.prefixClass("c-notify__icon c-notify__closer fa fa-times-circle cursor-pointer"),attrs:{"aria-hidden":"true"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.hide.apply(null,arguments)}}}),e._v(" "),t("div",{class:e.prefixClass("flow-root")},[t("i",{class:e.prefixClass("c-notify__icon fa u-mt-0_125 u-mr-0_25 float-left "+e.messageIcon)}),e._v(" "),t("div",{class:e.prefixClass("u-ml")},[e._v("\n "+e._s(e.message.text)+"\n "),e.message.linkUrl?t("a",{class:e.prefixClass("c-notify__link u-mt-0_25"),attrs:{href:e.message.linkUrl,"data-cy":"messageLink"}},[e._v("\n "+e._s(e.message.linkText||e.message.linkUrl)+"\n ")]):e._e()])])])}),[],!1,null,null,null).exports,Hk={name:"DpNotifyContainer",components:{DpNotifyMessage:zk},mixins:[V.gH],props:{notifications:{type:[Object,Array],required:!1,default:()=>[]}},data:()=>({isVisible:!1}),computed:{...(0,Vk.mapState)("notify",["messages"]),liveState(){return this.isVisible?"polite":"off"},messageRole(){return this.isVisible?"message":"none"}},methods:{...(0,Vk.mapMutations)("notify",["add","remove"]),init(){for(const e in this.notifications)if((0,r.Q$)(this.notifications,e)){const t=this.notifications[e];let n=0;const r=t.length;let i;for(;n<r;n++)i=t[n],"string"==typeof i&&(i={message:i}),this.add({type:e,text:i.message||"",linkUrl:i.linkUrl||"",linkText:i.linkText||""})}document.addEventListener("visibilitychange",(()=>{this.isVisible=!document.hidden}))},removeMessage(e){this.remove(e)}},created(){this.init()}},Uk=Hk,Wk=(0,l.Z)(Uk,(function(){var e=this,t=e._self._c;return t("div",{class:e.prefixClass("c-notify"),attrs:{"aria-live":e.liveState}},[t("transition-group",{attrs:{name:"transition-slide-up"}},e._l(e.messages,(function(n){return t("dp-notify-message",{key:n.uid,attrs:{message:n,role:e.messageRole},on:{"dp-notify-remove":e.removeMessage}})})),1)],1)}),[],!1,null,null,null).exports,Zk=(0,l.Z)({name:"DpObscure"},(function(){var e=this;return(0,e._self._c)("span",{staticClass:"u-obscure",attrs:{title:e.Translator.trans("obscure.title")}},[e._t("default")],2)}),[],!1,null,null,null).exports,Kk={name:"DpSwitcher",props:{active:{required:!1,type:Boolean,default:!0},inputId:{required:!0,type:String}},methods:{toggle(){this.$emit("input",!1===this.active)}}},Jk=(0,l.Z)(Kk,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"o-switcher"},[t("input",{attrs:{type:"checkbox",id:e.inputId},on:{change:e.toggle}}),e._v(" "),t("label",{attrs:{for:e.inputId}},[t("span",{staticClass:"o-switcher__option float-left",class:{"o-switcher__option--checked":e.active}},[e._t("option1")],2),e._v(" "),t("span",{staticClass:"o-switcher__option float-right",class:{"o-switcher__option--checked":!e.active},attrs:{"data-cy":"fragmentTab"}},[e._t("option2")],2)])])}),[],!1,null,null,null).exports,Gk={name:"DpTableCard",props:{open:{type:Boolean,required:!1,default:!1}},data(){return{isOpen:this.open}},watch:{open(e){this.isOpen=e}},methods:{toggle(e){this.isOpen=void 0!==e?e:!1===this.isOpen}}},Yk=(0,l.Z)(Gk,(function(){var e=this,t=e._self._c;return t("li",{class:{"is-expanded":e.isOpen}},[t("div",{attrs:{"data-add-animation":""}},[e._t("header")],2),e._v(" "),t("transition",{attrs:{name:"fading"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"u-p-0_5"},[e._t("default")],2)])],1)}),[],!1,null,null,null).exports,Xk={name:"DpTableCardListHeader",components:{DpCheckbox:fi,DpSearchField:oa,DpStickyElement:eo},props:{items:{type:Array,required:!0},searchable:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:""},selectable:{type:Boolean,default:!1}}},Qk=(0,l.Z)(Xk,(function(){var e=this,t=e._self._c;return t("dp-sticky-element",[e.searchable?t("dp-search-field",{staticClass:"layout__item u-1-of-2 u-mb-0_5",attrs:{placeholder:e.searchPlaceholder},on:{reset:function(t){return e.$emit("reset-search")},search:t=>e.$emit("search",t)}}):e._e(),e._t("header-buttons"),e._v(" "),t("div",{staticClass:"layout__item border--bottom"},[e.selectable?t("dp-checkbox",{staticClass:"inline-block width-20 u-pv-0_25",attrs:{id:"selectAll"},on:{change:t=>e.$emit("select-all",t)}}):e._e(),e._l(e.items,(function(n,r){return t("div",{key:r,staticClass:"layout__item weight--bold u-pv-0_5",class:[n.classes?n.classes:"",n.width?n.width:""]},[e._v("\n "+e._s(n.label)+"\n ")])}))],2)],2)}),[],!1,null,null,null).exports,eC={name:"DpVideoPlayer",props:{ariaLabelledby:{type:[String,Boolean],required:!1,default:!1},iconUrl:{type:String,required:!0},id:{type:String,required:!0},poster:{type:String,required:!1,default:""},sources:{required:!1,validator:e=>Array.isArray(e)&&e.filter((e=>e.src&&e.type)).length===e.length,default:()=>[]},tracks:{required:!1,validator:e=>Array.isArray(e)&&e.filter((e=>e.kind&&e.srclang&&e.label&&e.src)).length===e.length,default:()=>[]}},data:()=>({player:{}}),created(){this.player=s.e(642).then(s.t.bind(s,1642,23))},mounted(){this.player.then((e=>{this.player=new e.default("#"+this.id,{iconUrl:this.iconUrl,controls:["play-large","play","progress","duration","mute","volume","captions","settings","download","fullscreen"]})}))}},tC=(0,l.Z)(eC,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"relative"},[t("video",{attrs:{"aria-labelledby":e.ariaLabelledby,id:e.id,playsinline:"","data-poster":e.poster}},[e._l(e.sources,(function(e){return t("source",{key:e.src,attrs:{src:e.src,type:e.type}})})),e._v(" "),e._l(e.tracks,(function(e){return t("track",{key:e.src,attrs:{src:e.src,srclang:e.srclang,label:e.label,kind:e.kind,default:!!e.default}})}))],2)])}),[],!1,null,null,null).exports;var nC=s(5647),rC=s(405);const iC=(e,t)=>{document.dispatchEvent(new CustomEvent("customValidationPassed",{detail:{form:e}})),"function"==typeof e.submit&&(t&&function(e,t,n){const r=document.createElement("input"),i={type:"hidden",name:t,value:n,"data-form-actions-added":"1"};Object.keys(i).forEach((e=>{r.setAttribute(e,i[e])})),e.appendChild(r)}(e,t,t),e.submit())};function oC(e,t){e.addEventListener("click",(n=>{const r=e.dataset.dpValidateCallback?e.dataset.dpValidateCallback:"",i=e.dataset.dpValidateTranskey?e.dataset.dpValidateTranskey:"",o=e.getAttribute("name"),s=e.hasAttribute("data-dp-validate-capture-click"),a=(0,rC.Z)(t);if(n.preventDefault(),!1===a.valid){s&&n.stopImmediatePropagation();const e=a.invalidFields.filter((e=>e.dataset.dpValidateError));e.forEach((e=>{dplan.notify.notify("error",Translator.trans(e.validationMessage))})),(0===e.length||e.length<a.invalidFields)&&dplan.notify.notify("error",Translator.trans("error.mandatoryfields.no_asterisk")),(0,nC.KG)(a.invalidFields[0]),document.dispatchEvent(new CustomEvent("customValidationFailed",{detail:{form:t}}))}else"dpconfirm"===r&&!1===window.dpconfirm(i,!0)?n.preventDefault():iC(t,o)}))}var sC=s(9436);function aC(e){const t=e;new MutationObserver((e=>{e.forEach((e=>{switch(e.type){case"childList":if(e.addedNodes.length>0){const t=Array.from(e.addedNodes).filter((e=>1===e.nodeType))[0];if(!t)return!1;(0,nC.ph)(t)?(0,sC.g)(t):t.children.length>0&&(0,nC.e7)(t).length>0&&(0,nC.e7)(t).forEach((e=>{(0,sC.g)(e)}))}break;case"attributes":if(!("INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||"required"!==e.attributeName&&"pattern"!==e.attributeName))if(null===e.oldValue)(0,sC.g)(e.target);else if(function(e){let t=!1;const n=e.target;return"required"===e.attributeName?t="required"===e.oldValue&&!1===n.hasAttribute("required"):"pattern"===e.attributeName&&(t=e.oldValue&&(!1===n.hasAttribute("pattern")||n.getAttribute("pattern")===e.oldValue)),t}(e)){const t=e.target.cloneNode();t.classList.remove(nC.YQ),t.setCustomValidity(""),e.target.parentNode.replaceChild(t,e.target)}}}))})).observe(t,{attributes:!0,attributeOldValue:!0,childList:!0,subtree:!0})}var lC=s(5322);const cC={inserted(e,t,n){if(!t.value)return;const r=n.componentInstance,i=r.groupValues?r.options.some((e=>e[r.groupValues].length>0)):r.options.length>0;e.setAttribute("data-dp-validate-is-valid",!i),e.addEventListener("mouseup",(t=>{t.stopPropagation();const n=t=>{document.removeEventListener("mouseup",n),(0,lC.Z)(e)};document.addEventListener("mouseup",n)}))},componentUpdated(e,t,n){if(!t.value)return;const r=n.componentInstance,i=r.groupValues?r.options.some((e=>e[r.groupValues].length>0)):r.options.length>0;let o=function(e){if(!e)return!1;let t;return Array.isArray(e)?t=0!==e.length&&(1!==e.length||("object"==typeof e[0]?""!==e[0].id:""!==e[0])):"object"==typeof e?t=null!==e&&Object.keys(e).length>0&&""!==e.id:"string"==typeof e&&(t=""!==e),t}(r.value);!1===i&&(o=!0),e.setAttribute("data-dp-validate-is-valid",o)}},dC=cC;var uC=s(3656),pC=s(4299),hC=s(702),fC=s(3178),mC=s(8767);const gC={ActionMenu:function(){const e=document.querySelectorAll("[data-actionmenu]"),t=[];for(let n=0;n<e.length;n++)t.push(new M(e[n]))},assignHandlerForTrigger:oC,assignHandlersForInputs:sC.W,assignObserver:aC,attributes:t,Confirm:function(){window.dpconfirm=function(e,t){return void 0!==t&&t&&(e=decodeURI(e)),confirm(e)}},convertSize:O,checkResponse:_,dataTableSearch:i,DATE_FORMAT_LONG:r.OC,debounce:r.Ds,deepMerge:r.RH,Detabinator:N,formatDate:r.p6,formatBytes:r.td,toggleFullscreen:r.V9,bindFullScreenChange:r.KQ,isActiveFullScreen:r.ts,getAnimationEventName:r.c8,getCssVariable:function(e){return getComputedStyle(document.documentElement).getPropertyValue(e)},getFileInfo:function(e="",t={}){const n={sizeScale:"KB",separator:":",...t},r=e.split(n.separator);let i={};var o;return i=r.length>0?{name:r[0],hash:r[1],size:O(n.sizeScale,r[2]),mimeType:(o=r[3],(0,f.Z)(E,o)?E[o]:o),id:r[1]||""}:{name:r[0],hash:r[0],size:r[0],mimeType:r[0],id:r[0]},i},getFileTypes:T,getScrollTop:r.cx,handleResponseMessages:C,highlightActiveLinks:function(e){const t=document.querySelectorAll(e);window.addEventListener("hashchange",(function(){for(let e=0;e<t.length;e++)t[e].href.match(/(#.*)/)[1]===window.location.hash?t[e].className=(0,D.Z)("o-link--active"):t[e].className=(0,D.Z)("o-link--default")}));const n=new CustomEvent("hashchangeevent");window.dispatchEvent(n)},hasOwnProp:r.Q$,hasPermission:r.Fs,hasAllPermissions:r.wP,hasAnyPermissions:r.ec,sortAlphabetically:r.a,throttle:r.P2,uniqueArrayByObjectKey:r.GD,toDate:r.ZU,length:e,dpApi:k,dpRpc:function(e,t,n=null){const r={jsonrpc:"2.0",method:e,id:null===n?(0,g.v4)():n,params:t};return S({method:"post",url:Routing.generate("rpc_generic_post"),data:r})},externalApi:function(e){const t=h().defaults.headers.common["Content-Type"];return delete h().defaults.headers.common["Content-Type"],h().get(e).then((e=>(h().defaults.headers.common["Content-Type"]=t,e)))},dpValidate:function(e){let t=[];e?t.push(document.querySelector(`[data-dp-validate=${e}]`)):t=Array.from(document.querySelectorAll("[data-dp-validate]")),t.length>0&&t.forEach((e=>{(0,sC.W)(e),aC(e);const t=e.querySelector('[type="submit"]:not([data-skip-validation])')?Array.from(e.querySelectorAll('[type="submit"]:not([data-skip-validation])')):Array.from(e.querySelectorAll(".submit:not([data-skip-validation])"));t.length>0&&t.forEach((t=>oC(t,e)))}))},dpValidateMultiselectDirective:dC,DpButton:ni,DpDetails:Ts,DpIcon:Yr,DpInput:ts,DpLabel:ui.default,DpLoading:Mi,DpAccordion:u,DpAnonymizeText:jS,DpAutocomplete:Zr,DpBulkEditHeader:HS,DpButtonIcon:ii,DpButtonRow:si,DpCard:di,DpCheckbox:fi,DpCheckboxGroup:gi,DpColumnSelector:Si,DpContextualHelp:li,DpDashboardTaskCard:WS,DpDataTable:Wi,DpDataTableExtended:io,DpDatepicker:Wo,DpDateRangePicker:Ko,DpDatetimePicker:Es,DpDraggable:Oi,DpEditableList:GS,DpEditor:Lk,DpFlyout:wi,DpFormRow:Ms,DpHeightLimit:Rs,DpInlineNotification:Ls,DpModal:zs,DpMultiselect:Zs,DpMultistepNav:Js,DpNotifyContainer:Wk,DpNotifyMessage:zk,DpObscure:Zk,DpPager:Xs,DpProgressBar:ea,DpRadio:ra,DpResettableInput:rs,DpSearchField:oa,DpSelect:la,DpSelectPageItemCount:Ji,DpSkeletonBox:da,DpSlidebar:pa,DpSlidingPagination:Xi,DpSplitButton:fa,DpStickyElement:eo,DpSwitcher:Jk,DpTab:ga,DpTableCard:Yk,DpTableCardListHeader:Qk,DpTabs:va,DpTextArea:xa,DpTextWrapper:Ps,DpTimePicker:_s,DpToggle:ka,DpToggleForm:_a,DpTooltipIcon:Ea,DpTransitionExpand:c,DpTreeList:Vh,DpUploadFiles:bk,DpVideoPlayer:tC,getFileIdsByHash:function(e,t){return k.get(t,{filter:{hasHash:{condition:{operator:"IN",path:"hash",value:e}}}},{serialize:!0}).then((({data:e})=>e.data.map((e=>e.id))))},CleanHtml:n.J7,prefixClassMixin:V.gH,dpSelectAllMixin:V.fE,dpValidateMixin:V.cR,tableSelectAllItems:V.Be,Tooltip:n.u,VPopover:n.Kr,exactlengthHint:r.f5,makeFormPost:function(e,t){const n=new FormData;for(const[t,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>n.append(t+"[]",e))):n.append(t,r);return k({method:"post",url:t,data:n,headers:{"Content-Type":"multipart/form-data"}})},MatchMedia:I,maxlengthHint:r.T8,minlengthHint:r.C4,mimeTypes:E,SideNav:P,Stickier:R,Sticky:function(){const e=document.querySelectorAll("[data-sticky]");e.length>0&&console.warn("Found usage of deprecated stickier implementation, use <DpStickyElement> instead");const t=[];return Array.from(e).forEach((e=>{const n=B(e,"context"),r=B(e,"container"),i=parseInt(e.getAttribute("data-sticky-offset")||0),o=e.getAttribute("data-sticky")||null;t.push(new R(e,n,i,"top",o,r))})),t},TableWrapper:function(){const e=document.querySelectorAll("[data-table-wrapper]");for(let t=0;t<e.length;t++){const n=e[t],r=(0,D.Z)(n.dataset.tableWrapper);L(n.children,"table").forEach((e=>{const t=F(r);q(e,t)}))}},prefixClass:r.o4,unbindFullScreenChange:r.Wz,validateDatepicker:uC.Z,validateEmail:pC.Z,validateFieldset:hC.Z,validateForm:rC.Z,validateInput:fC.Z,validateMultiselect:lC.Z,validateTiptap:mC.Z}})(),a.default})()));
|