var App=function(t){function e(e){for(var n,r,o=e[0],s=e[1],a=0,c=[];at.get(e),c=(e,n)=>(t.set(e,n),n)}else{const t=[],e=10;let n=0;l=e=>{for(let n=0;n(n==e&&(n=0),t[n++]=i,t[n++]=r)}var u=class{constructor(t,e,n,i){this.width=t,this.height=e,this.map=n,this.problems=i}findCell(t){for(let e=0;ei&&(o+=r.attrs.colspan)}}for(let t=0;t1&&(n=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(t),n=t.childCount,i=[];let r=0,o=null;const s=[];for(let t=0,r=e*n;t=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:p-t});break}const c=r+t*e;for(let t=0;tNumber(t)):null,r=Number(t.getAttribute("colspan")||1),o={colspan:r,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:i&&i.length==r?i:null};for(const n in e){const i=e[n].getFromDOM,r=i&&i(t);null!=r&&(o[n]=r)}return o}function h(t,e){const n={};1!=t.attrs.colspan&&(n.colspan=t.attrs.colspan),1!=t.attrs.rowspan&&(n.rowspan=t.attrs.rowspan),t.attrs.colwidth&&(n["data-colwidth"]=t.attrs.colwidth.join(","));for(const i in e){const r=e[i].setDOMAttr;r&&r(t.attrs[i],n)}return n}function f(t){if(null!==t){if(!Array.isArray(t))throw new TypeError("colwidth must be null or an array");for(const e of t)if("number"!=typeof e)throw new TypeError("colwidth must be null or an array of numbers")}}function m(t){const e=t.cellAttributes||{},n={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:f}};for(const t in e)n[t]={default:e[t].default,validate:e[t].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:t.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:t.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:t=>p(t,e)}],toDOM:t=>["td",h(t,e),0]},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:t=>p(t,e)}],toDOM:t=>["th",h(t,e),0]}}}function g(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const i=t.nodes[n],r=i.spec.tableRole;r&&(e[r]=i)}}return e}const v=new i.PluginKey("selectingCells");function y(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function b(t){const e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function _(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const n=y(e.$head)||x(e.$head);if(n)return n;throw new RangeError("No cell found around position "+e.head)}function x(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const i=e.type.spec.tableRole;if("cell"==i||"header_cell"==i)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const i=e.type.spec.tableRole;if("cell"==i||"header_cell"==i)return t.doc.resolve(n-e.nodeSize)}}function w(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function k(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function C(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function S(t){return u.get(t.node(-1)).findCell(t.pos-t.start(-1))}function E(t){return u.get(t.node(-1)).colCount(t.pos-t.start(-1))}function T(t,e,n){const i=t.node(-1),r=u.get(i),o=t.start(-1),s=r.nextCell(t.pos-o,e,n);return null==s?null:t.node(0).resolve(o+s)}function A(t,e,n=1){const i={...t,colspan:t.colspan-n};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(e,n),i.colwidth.some(t=>t>0)||(i.colwidth=null)),i}function M(t,e,n=1){const i={...t,colspan:t.colspan+n};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let t=0;tt!=e.pos-o);l.unshift(e.pos-o);const c=l.map(t=>{const e=n.nodeAt(t);if(!e)throw new RangeError(`No cell with offset ${t} found`);const r=o+t+1;return new i.SelectionRange(a.resolve(r),a.resolve(r+e.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=e}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(w(r)&&w(o)&&C(r,o)){const e=this.$anchorCell.node(-1)!=r.node(-1);return e&&this.isRowSelection()?t.rowSelection(r,o):e&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return i.TextSelection.between(r,o)}content(){const t=this.$anchorCell.node(-1),e=u.get(t),n=this.$anchorCell.start(-1),i=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},s=[];for(let n=i.top;n0||u>0){let t=l.attrs;if(c>0&&(t=A(t,0,c)),u>0&&(t=A(t,t.colspan-u,u)),s.lefti.bottom){const t={...l.attrs,rowspan:Math.min(s.bottom,i.bottom)-Math.max(s.top,i.top)};l=s.top0)return!1;const n=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const i=e.node(-1),r=u.get(i),o=e.start(-1),s=r.findCell(e.pos-o),a=r.findCell(n.pos-o),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(o+r.map[s.left])),a.bottom0&&(n=l.resolve(o+r.map[a.left])),s.bottom0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,s=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const i=e.node(-1),r=u.get(i),o=e.start(-1),s=r.findCell(e.pos-o),a=r.findCell(n.pos-o),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(o+r.map[s.top*r.width])),a.right0&&(n=l.resolve(o+r.map[a.top*r.width])),s.right{e.push(o.Decoration.node(n,n+t.nodeSize,{class:"selectedCell"}))}),o.DecorationSet.create(t.doc,e)}const $=new i.PluginKey("fix-tables");function N(t,e){let n;const i=(e,i)=>{"table"==e.type.spec.tableRole&&(n=function(t,e,n,i){const r=u.get(e);if(!r.problems)return i;i||(i=t.tr);const o=[];for(let t=0;t0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);const o=[];for(let n=0;n0){const t=s-r;if(a===e.map[t]){i.push(null);continue}}if(n>0){const t=s-1;if(a===e.map[t]){i.push(null);continue}}i.push(t.nodeAt(a))}n.push(i)}return n}function R(t,e){const n=[],i=u.get(t),r=i.height,o=i.width;for(let s=0;sn[0]?-1:1,o=t.splice(e[0],e.length),s=o.length%2==0?1:0;let a;return a=-1===i&&1===r?n[0]-1:1===i&&-1===r?n[n.length-1]-s+1:-1===r?n[0]:n[n.length-1]-s,t.splice(a,0,...o),t}function j(t){return function(t,e){for(let n=e.depth;n>=0;n-=1){const i=e.node(n);if(t(i))return{node:i,pos:0===n?0:e.before(n),start:e.start(n),depth:n}}return null}(t=>"table"===t.type.spec.tableRole,t)}function B(t,e,n){var i,r;if(null==e&&null==n&&t instanceof O)return[t.$anchorCell,t.$headCell];const o=null!==(i=null!=e?e:n)&&void 0!==i?i:t.anchor,s=null!==(r=null!=n?n:e)&&void 0!==r?r:t.head,a=t.$head.doc,l=V(a,o),c=V(a,s);return l&&c&&C(l,c)?[l,c]:null}function V(t,e){const n=t.resolve(e);return y(n)||x(n)}function z(t,e){const n=j(e.$from);if(!n)return;const i=u.get(n.node);return t<0||t>i.width-1?void 0:i.cellsInRect({left:t,right:t+1,top:0,bottom:i.height}).map(t=>{const e=n.node.nodeAt(t),i=t+n.start;return{pos:i,start:i+1,node:e,depth:n.depth+2}})}function H(t,e){const n=j(e.$from);if(!n)return;const i=u.get(n.node);return t<0||t>i.height-1?void 0:i.cellsInRect({left:0,right:i.width,top:t,bottom:t+1}).map(t=>{const e=n.node.nodeAt(t),i=t+n.start;return{pos:i,start:i+1,node:e,depth:n.depth+2}})}function W(t,e,n=e){let i=e,r=n;for(let n=e;n>=0;n--){const e=z(n,t.selection);e&&e.forEach(t=>{const e=t.node.attrs.colspan+n-1;e>=i&&(i=n),e>r&&(r=e)})}for(let n=e;n<=r;n++){const e=z(n,t.selection);e&&e.forEach(t=>{const e=t.node.attrs.colspan+n-1;t.node.attrs.colspan>1&&e>r&&(r=e)})}const o=[];for(let e=i;e<=r;e++){const n=z(e,t.selection);n&&n.length>0&&o.push(e)}i=o[0],r=o[o.length-1];const s=z(i,t.selection),a=H(0,t.selection);if(!s||!a)return;const l=t.doc.resolve(s[s.length-1].pos);let c;for(let e=r;e>=i;e--){const n=z(e,t.selection);if(n&&n.length>0){for(let t=a.length-1;t>=0;t--)if(a[t].pos===n[0].pos){c=n[0];break}if(c)break}}return c?{$anchor:l,$head:t.doc.resolve(c.pos),indexes:o}:void 0}function G(t,e,n=e){let i=e,r=n;for(let n=e;n>=0;n--){const e=H(n,t.selection);e&&e.forEach(t=>{const e=t.node.attrs.rowspan+n-1;e>=i&&(i=n),e>r&&(r=e)})}for(let n=e;n<=r;n++){const e=H(n,t.selection);e&&e.forEach(t=>{const e=t.node.attrs.rowspan+n-1;t.node.attrs.rowspan>1&&e>r&&(r=e)})}const o=[];for(let e=i;e<=r;e++){const n=H(e,t.selection);n&&n.length>0&&o.push(e)}i=o[0],r=o[o.length-1];const s=H(i,t.selection),a=z(0,t.selection);if(!s||!a)return;const l=t.doc.resolve(s[s.length-1].pos);let c;for(let e=r;e>=i;e--){const n=H(e,t.selection);if(n&&n.length>0){for(let t=a.length-1;t>=0;t--)if(a[t].pos===n[0].pos){c=n[0];break}if(c)break}}return c?{$anchor:l,$head:t.doc.resolve(c.pos),indexes:o}:void 0}function q(t){return t[0].map((e,n)=>t.map(t=>t[n]))}function U(t){var e,n;const{tr:i,originIndex:r,targetIndex:o,select:s,pos:a}=t,l=j(i.doc.resolve(a));if(!l)return!1;const c=null===(e=W(i,r))||void 0===e?void 0:e.indexes,d=null===(n=W(i,o))||void 0===n?void 0:n.indexes;if(!c||!d)return!1;if(c.includes(o))return!1;const p=function(t,e,n,i){let r=q(F(t));return r=L(r,e,n,i),r=q(r),R(t,r)}(l.node,c,d,0);if(i.replaceWith(l.pos,l.pos+l.node.nodeSize,p),!s)return!0;const h=u.get(p),f=l.start,m=o,g=h.positionAt(h.height-1,m,p),v=i.doc.resolve(f+g),y=h.positionAt(0,m,p),b=i.doc.resolve(f+y);return i.setSelection(O.colSelection(v,b)),!0}function K(t){var e,n;const{tr:i,originIndex:r,targetIndex:o,select:s,pos:a}=t,l=j(i.doc.resolve(a));if(!l)return!1;const c=null===(e=G(i,r))||void 0===e?void 0:e.indexes,d=null===(n=G(i,o))||void 0===n?void 0:n.indexes;if(!c||!d)return!1;if(c.includes(o))return!1;const p=function(t,e,n,i){let r=F(t);return r=L(r,e,n,i),R(t,r)}(l.node,c,d,0);if(i.replaceWith(l.pos,l.pos+l.node.nodeSize,p),!s)return!0;const h=u.get(p),f=l.start,m=o,g=h.positionAt(m,h.width-1,p),v=i.doc.resolve(f+g),y=h.positionAt(m,0,p),b=i.doc.resolve(f+y);return i.setSelection(O.rowSelection(v,b)),!0}function J(t){const e=t.selection,n=_(t),i=n.node(-1),r=n.start(-1),o=u.get(i);return{...e instanceof O?o.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r):o.findCell(n.pos-r),tableStart:r,map:o,table:i}}function Y(t,{map:e,tableStart:n,table:i},r){let o=r>0?-1:0;P(e,i,r+o)&&(o=0==r||r==e.width?null:0);for(let s=0;s0&&r0&&e.map[a-1]==l||r0?-1:0;et(e,i,r+a)&&(a=0==r||r==e.height?null:0);for(let o=0,c=e.width*r;o0&&r0&&c==e.map[s-e.width]){const e=n.nodeAt(c).attrs;t.setNodeMarkup(t.mapping.slice(a).map(c+i),null,{...e,rowspan:e.rowspan-1}),o+=e.colspan-1}else if(r0&&n[o]==n[o-1]||i.right0&&n[r]==n[r-t]||i.bottom0){const t=a+1+l.content.size,e=at(l)?a+1:t;n.replaceWith(e+i.tableStart,t+i.tableStart,c)}n.setSelection(new O(n.doc.resolve(a+i.tableStart))),e(n)}return!0}function ct(t,e){const n=g(t.schema);return ut(({node:t})=>n[t.type.spec.tableRole])(t,e)}function ut(t){return(e,n)=>{const i=e.selection;let r,o;if(i instanceof O){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{var s;if(r=function(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(i.$from),!r)return!1;o=null===(s=y(i.$from))||void 0===s?void 0:s.pos}if(null==r||null==o)return!1;if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){let s=r.attrs;const a=[],l=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const c=J(e),u=e.tr;for(let t=0;t{n.attrs[t]!==e&&o.setNodeMarkup(i,null,{...n.attrs,[t]:e})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[t]:e}),i(o)}return!0}}function pt(t,e,n){const i=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let t=0;tr.table.nodeAt(t));for(let t=0;t{const e=t+r.tableStart,n=o.doc.nodeAt(e);n&&o.setNodeMarkup(e,u,n.attrs)}),n(o)}return!0}}const ft=ht("row",{useDeprecatedLogic:!0}),mt=ht("column",{useDeprecatedLogic:!0}),gt=ht("cell",{useDeprecatedLogic:!0});function vt(t){return function(e,n){if(!b(e))return!1;const r=function(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let e=t.index(-1)-1,n=t.before();e>=0;e--){const i=t.node(-1).child(e),r=i.lastChild;if(r)return n-1-r.nodeSize;n-=i.nodeSize}}else{if(t.index()0;i--)if("table"==n.node(i).type.spec.tableRole)return e&&e(t.tr.delete(n.before(i),n.after(i)).scrollIntoView()),!0;return!1}function bt(t,e){const n=t.selection;if(!(n instanceof O))return!1;if(e){const i=t.tr,o=g(t.schema).cell.createAndFill().content;n.forEachCell((t,e)=>{t.content.eq(o)||i.replace(i.mapping.map(e+1),i.mapping.map(e+t.nodeSize-1),new r.Slice(o,0,0))}),i.docChanged&&e(i)}return!0}function _t(t){return(e,n)=>{const{from:i,to:r,select:o=!0,pos:s=e.selection.from}=t,a=e.tr;return!!K({tr:a,originIndex:i,targetIndex:r,select:o,pos:s})&&(null==n||n(a),!0)}}function xt(t){return(e,n)=>{const{from:i,to:r,select:o=!0,pos:s=e.selection.from}=t,a=e.tr;return!!U({tr:a,originIndex:i,targetIndex:r,select:o,pos:s})&&(null==n||n(a),!0)}}function wt(t){if(0===t.size)return null;let{content:e,openStart:n,openEnd:i}=t;for(;1==e.childCount&&(n>0&&i>0||"table"==e.child(0).type.spec.tableRole);)n--,i--,e=e.child(0).content;const o=e.child(0),s=o.type.spec.tableRole,a=o.type.schema,l=[];if("row"==s)for(let t=0;t=0;e--){const{rowspan:r,colspan:o}=i.child(e).attrs;for(let e=t;e=e.length&&e.push(r.Fragment.empty),n[o]i&&(o=o.type.createChecked(A(o.attrs,o.attrs.colspan,n+o.attrs.colspan-i),o.content)),a.push(o),n+=o.attrs.colspan;for(let n=1;no&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,o-e.attrs.rowspan)},e.content)),a.push(e)}t.push(r.Fragment.from(a))}n=t,e=o}return{width:t,height:e,rows:n}}function St(t,e,n,i,r,o,s,a){if(0==s||s==e.height)return!1;let l=!1;for(let c=r;ce.width)for(let r=0,s=0;re.height){const d=[];for(let t=0,i=(e.height-1)*e.width;t=e.width)&&n.nodeAt(e.map[i+t]).type==l.header_cell;d.push(r?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const p=l.row.create(null,r.Fragment.from(d)),h=[];for(let t=e.height;t{if(!o)return!1;const s=n.selection;if(s instanceof O)return Mt(n,r,i.Selection.near(s.$headCell,e));if("horiz"!=t&&!s.empty)return!1;const a=Nt(o,t,e);if(null==a)return!1;if("horiz"==t)return Mt(n,r,i.Selection.near(n.doc.resolve(s.head+e),e));{const o=n.doc.resolve(a),s=T(o,t,e);let l;return l=s?i.Selection.near(s,1):e<0?i.Selection.near(n.doc.resolve(o.before(-1)),-1):i.Selection.near(n.doc.resolve(o.after(-1)),1),Mt(n,r,l)}}}function Ot(t,e){return(n,i,r)=>{if(!r)return!1;const o=n.selection;let s;if(o instanceof O)s=o;else{const i=Nt(r,t,e);if(null==i)return!1;s=new O(n.doc.resolve(i))}const a=T(s.$headCell,t,e);return!!a&&Mt(n,i,new O(s.$anchorCell,a))}}function Dt(t,e){const n=y(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new O(n))),!0)}function It(t,e,n){if(!b(t.state))return!1;let i=wt(n);const o=t.state.selection;if(o instanceof O){i||(i={width:1,height:1,rows:[r.Fragment.from(kt(g(t.state.schema).cell,n))]});const e=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=u.get(e).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return i=Ct(i,a.right-a.left,a.bottom-a.top),Tt(t.state,t.dispatch,s,a,i),!0}if(i){const e=_(t.state),n=e.start(-1);return Tt(t.state,t.dispatch,n,u.get(e.node(-1)).findCell(e.pos-n),i),!0}return!1}function $t(t,e){var n;if(0!=e.button)return;if(e.ctrlKey||e.metaKey)return;const i=Ft(t,e.target);let r;if(e.shiftKey&&t.state.selection instanceof O)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&null!=(r=y(t.state.selection.$anchor))&&(null===(n=Rt(t,e))||void 0===n?void 0:n.pos)!=r.pos)o(r,e),e.preventDefault();else if(!i)return;function o(e,n){let i=Rt(t,n);const r=null==v.getState(t.state);if(!i||!C(e,i)){if(!r)return;i=e}const o=new O(e,i);if(r||!t.state.selection.eq(o)){const n=t.state.tr.setSelection(o);r&&n.setMeta(v,e.pos),t.dispatch(n)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),null!=v.getState(t.state)&&t.dispatch(t.state.tr.setMeta(v,-1))}function a(n){const r=n,a=v.getState(t.state);let l;if(null!=a)l=t.state.doc.resolve(a);else if(Ft(t,r.target)!=i&&(l=Rt(t,e),!l))return s();l&&o(l,r)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function Nt(t,e,n){if(!(t.state.selection instanceof i.TextSelection))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const 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){const o=r.before(i),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?o:null}}return null}function Ft(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function Rt(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:i,pos:r}=n;return i>=0&&y(t.state.doc.resolve(i))||y(t.state.doc.resolve(r))}var Lt=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",e+"px"),this.colgroup=this.table.appendChild(document.createElement("colgroup")),jt(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,jt(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function jt(t,e,n,i,r,o){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;if(c){for(let t=0,n=0;tnew r(t,n,e)),new zt(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>{const e=Bt.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(e,n)=>{!function(t,e,n,i){if(!t.editable)return;const r=Bt.getState(t.state);if(!r)return;if(!r.dragging){const o=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target);let s=-1;if(o){const{left:i,right:r}=o.getBoundingClientRect();e.clientX-i<=n?s=Ht(t,e,"left",n):r-e.clientX<=n&&(s=Ht(t,e,"right",n))}if(s!=r.activeHandle){if(!i&&-1!==s){const e=t.state.doc.resolve(s),n=e.node(-1),i=u.get(n),r=e.start(-1);if(i.colCount(e.pos-r)+e.nodeAfter.attrs.colspan-1==i.width-1)return}Gt(t,s)}}}(e,n,t,s)},mouseleave:t=>{!function(t){if(!t.editable)return;const e=Bt.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Gt(t,-1)}(t)},mousedown:(t,i)=>{!function(t,e,n,i){var r;if(!t.editable)return!1;const o=null!==(r=t.dom.ownerDocument.defaultView)&&void 0!==r?r:window,s=Bt.getState(t.state);if(!s||-1==s.activeHandle||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),l=function(t,e,{colspan:n,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=t.domAtPos(e);let s=o.node.childNodes[o.offset].offsetWidth,a=n;if(i)for(let t=0;t{const e=Bt.getState(t);if(e&&e.activeHandle>-1)return function(t,e){const n=[],i=t.doc.resolve(e),r=i.node(-1);if(!r)return o.DecorationSet.empty;const s=u.get(r),a=i.start(-1),l=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let e=0;e-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return w(e.doc.resolve(i))||(i=-1),new t(i,n.dragging)}return n}};function Ht(t,e,n,i){const r="right"==n?-i:i,o=t.posAtCoords({left:e.clientX+r,top:e.clientY});if(!o)return-1;const{pos:s}=o,a=y(t.state.doc.resolve(s));if(!a)return-1;if("right"==n)return a.pos;const l=u.get(a.node(-1)),c=a.start(-1),d=l.map.indexOf(a.pos-c);return d%l.width==0?-1:c+l.map[d-1]}function Wt(t,e,n){const i=e.clientX-t.startX;return Math.max(n,t.startWidth+i)}function Gt(t,e){t.dispatch(t.state.tr.setMeta(Bt,{setHandle:e}))}function qt(t,e,n,i){const r=t.state.doc.resolve(e),o=r.node(-1),s=r.start(-1),a=u.get(o).colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;let l=t.domAtPos(r.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&jt(o,l.firstChild,l,i,a,n)}function Ut({allowTableNodeSelection:t=!1}={}){return new i.Plugin({key:v,state:{init:()=>null,apply(t,e){const n=t.getMeta(v);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;const{deleted:i,pos:r}=t.mapping.mapResult(e);return i?null:r}},props:{decorations:I,handleDOMEvents:{mousedown:$t},createSelectionBetween:t=>null!=v.getState(t.state)?t.state.selection:null,handleTripleClick:Dt,handleKeyDown:At,handlePaste:It},appendTransaction:(e,n,r)=>function(t,e,n){const r=(e||t).selection,o=(e||t).doc;let s,a;if(r instanceof i.NodeSelection&&(a=r.node.type.spec.tableRole)){if("cell"==a||"header_cell"==a)s=O.create(o,r.from);else if("row"==a){const t=o.resolve(r.from+1);s=O.rowSelection(t,t)}else if(!n){const t=u.get(r.node),e=r.from+1,n=e+t.map[t.width*t.height-1];s=O.create(o,e+1,n)}}else r instanceof i.TextSelection&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0&&!(t.after(r+1)=0&&!(e.before(t+1)>e.start(t));t--,i--);return n==i&&/row|table/.test(t.node(r).type.spec.tableRole)}(r)?s=i.TextSelection.create(o,r.from):r instanceof i.TextSelection&&function({$from:t,$to:e}){let n,i;for(let e=t.depth;e>0;e--){const i=t.node(e);if("cell"===i.type.spec.tableRole||"header_cell"===i.type.spec.tableRole){n=i;break}}for(let t=e.depth;t>0;t--){const n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){i=n;break}}return n!==i&&0===e.parentOffset}(r)&&(s=i.TextSelection.create(o,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}(r,N(r,n),t)})}},"/h46":function(t,e,n){n("cHUd")("Map")},"05c+":function(t,e,n){"use strict";e.__esModule=!0,e.isDef=function(t){return null!=t},e.isKorean=function(t){return/([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(t)}},"06Vp":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return h})),n.d(e,"f",(function(){return d}));var i=n("GtT5"),r=n("MaG/"),o=n("oCYn"),s=class extends i.a{constructor(){super(...arguments),this.contentComponent=null}},a={name:"EditorContent",props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler(t){t&&t.options.element&&this.$nextTick(()=>{var e;const n=this.$el;n&&(null==(e=t.view.dom)?void 0:e.parentNode)&&(n.append(...t.view.dom.parentNode.childNodes),t.contentComponent=this,t.setOptions({element:n}),t.createNodeViews())})}}},render:t=>t("div"),beforeDestroy(){var t;const{editor:e}=this;if(!e)return;if(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!(null==(t=e.view.dom)?void 0:t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}},l={props:{as:{type:String,default:"div"}},render(t){return t(this.as,{style:{whiteSpace:"pre-wrap"},attrs:{"data-node-view-content":""}})}},c={props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(t){return t(this.as,{class:this.decorationClasses.value,style:{whiteSpace:"normal"},attrs:{"data-node-view-wrapper":""},on:{dragstart:this.onDragStart}},this.$slots.default)}},u=o.default,d={editor:Object(r.objectProp)().required,node:Object(r.objectProp)().required,decorations:Object(r.objectProp)().required,selected:Object(r.booleanProp)().required,extension:Object(r.objectProp)().required,getPos:Object(r.functionProp)().required,updateAttributes:Object(r.functionProp)().required,deleteNode:Object(r.functionProp)().required},p=class extends i.e{constructor(){super(...arguments),this.positionCheckCallback=null}mount(){var t,e;const n={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(t={})=>this.updateAttributes(t),deleteNode:()=>this.deleteNode()},r=this.onDragStart.bind(this);this.decorationClasses=u.observable({value:this.getDecorationClasses()});const o=(null!=(e=null==(t=this.editor.contentComponent)?void 0:t.$options._base)?e:u).extend(this.component).extend({props:Object.keys(n),provide:()=>({onDragStart:r,decorationClasses:this.decorationClasses})});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.currentPos=this.getPos(),this.positionCheckCallback=()=>{if(!this.renderer)return;const t=this.getPos();"number"==typeof t&&t!==this.currentPos&&(this.currentPos=t,this.renderer.updateProps({getPos:()=>this.getPos()}))},Object(i.F)(this.editor,this.positionCheckCallback),this.renderer=new class{constructor(t,e){const n="function"==typeof t?t:u.extend(t);this.ref=new n(e).$mount()}get element(){return this.ref.$el}updateProps(t={}){var e,n,i;if(!this.ref.$props)return;const r=null!=(i=null==(n=null==(e=this.ref.$props.editor)?void 0:e.contentComponent)?void 0:n.$options._base)?i:u,o=r.config.silent;r.config.silent=!0,Object.entries(t).forEach(([t,e])=>{this.ref.$props[t]=e}),r.config.silent=o}destroy(){this.ref.$destroy()}}(o,{parent:this.editor.contentComponent,propsData:n})}get dom(){if(!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:t,to:e}=this.editor.state.selection,n=this.getPos();if("number"==typeof n)if(t<=n&&e>=n+this.node.nodeSize){if(this.renderer.ref.$props.selected)return;this.selectNode()}else{if(!this.renderer.ref.$props.selected)return;this.deselectNode()}}update(t,e,n){const i=t=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(t)};if("function"==typeof this.options.update){const r=this.node,o=this.decorations,s=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:r,oldDecorations:o,newNode:t,newDecorations:e,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>i({node:t,decorations:e,innerDecorations:n})})}if(t.type!==this.node.type)return!1;const r=this.getPos();return t===this.node&&this.decorations===e&&this.innerDecorations===n?(r===this.currentPos||(this.currentPos=r,i({node:t,decorations:e,innerDecorations:n,getPos:()=>this.getPos()})),!0):(this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=r,i({node:t,decorations:e,innerDecorations:n}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.flatMap(t=>t.type.attrs.class).join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.positionCheckCallback&&(Object(i.h)(this.editor,this.positionCheckCallback),this.positionCheckCallback=null)}};function h(t,e){return n=>n.editor.contentComponent?new p(t,n,e):{}}},"0BDH":function(t,e,n){"use strict";function i(t,e,n){this.$children.forEach((function(r){r.$options.componentName===t?r.$emit.apply(r,[e].concat(n)):i.apply(r,[t,e].concat([n]))}))}e.__esModule=!0,e.default={methods:{dispatch:function(t,e,n){for(var i=this.$parent||this.$root,r=i.$options.componentName;i&&(!r||r!==t);)(i=i.$parent)&&(r=i.$options.componentName);i&&i.$emit.apply(i,[e].concat(n))},broadcast:function(t,e,n){i.call(this,t,e,n)}}}},"0DQi":function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return f}));var i=n("GtT5"),r=n("usTV"),o=n("yeI/"),s=n("c0pu"),a=n("k20u"),l=n("YNkh"),c=(i.b.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(t=>""!==t).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=t=>{const e=(null==t?void 0:t.node)||this.editor.state.doc;if("textSize"===((null==t?void 0:t.mode)||this.options.mode)){const t=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(t)}return e.nodeSize},this.storage.words=t=>{const e=(null==t?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new r.Plugin({key:new r.PluginKey("characterCount"),appendTransaction:(e,n,i)=>{if(t)return;const r=this.options.limit;if(null==r||0===r)return void(t=!0);const o=this.storage.characters({node:i.doc});if(o>r){const e=0,n=o-r;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const s=i.tr.deleteRange(e,n);return t=!0,s}t=!0},filterTransaction:(t,e)=>{const n=this.options.limit;if(!t.docChanged||0===n||null==n)return!0;const i=this.storage.characters({node:e.doc}),r=this.storage.characters({node:t.doc});if(r<=n)return!0;if(i>n&&r>n&&r<=i)return!0;if(i>n&&r>n&&r>i)return!1;if(!t.getMeta("paste"))return!1;const o=t.selection.$head.pos,s=o-(r-n),a=o;t.deleteRange(s,a);return!(this.storage.characters({node:t.doc})>n)}})]}}),i.b.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Object(o.dropCursor)(this.options)]}})),u=(i.b.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new r.Plugin({key:new r.PluginKey("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:r}=e,o=[];if(!n||!i)return s.DecorationSet.create(t,[]);let a=0;"deepest"===this.options.mode&&t.descendants((t,e)=>{if(t.isText)return;if(!(r>=e&&r<=e+t.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((t,e)=>{if(t.isText)return!1;if(!(r>=e&&r<=e+t.nodeSize-1))return!1;l+=1;if("deepest"===this.options.mode&&a-l>0||"shallowest"===this.options.mode&&l>1)return"deepest"===this.options.mode;o.push(s.Decoration.node(e,e+t.nodeSize,{class:this.options.className}))}),s.DecorationSet.create(t,o)}}})]}}),i.b.create({name:"gapCursor",addProseMirrorPlugins:()=>[Object(a.gapCursor)()],extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!=(e=Object(i.f)(Object(i.o)(t,"allowGapCursor",n)))?e:null}}}));var d=i.b.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:"placeholder",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){const t=this.options.dataAttribute?"data-"+this.options.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase():"data-placeholder";return[new r.Plugin({key:new r.PluginKey("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,a=[];if(!r)return null;const l=this.editor.isEmpty;return e.descendants((e,n)=>{const r=o>=n&&o<=n+e.nodeSize,c=!e.isLeaf&&Object(i.w)(e);if(!e.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&c){const i=[this.options.emptyNodeClass];l&&i.push(this.options.emptyEditorClass);const o=s.Decoration.node(n,n+e.nodeSize,{class:i.join(" "),[t]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:n,hasAnchor:r}):this.options.placeholder});a.push(o)}return this.options.includeChildren}),s.DecorationSet.create(e,a)}}})]}});i.b.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new r.Plugin({key:new r.PluginKey("selection"),props:{decorations:n=>n.selection.empty||t.isFocused||!t.isEditable||Object(i.x)(n.selection)||t.view.dragging?null:s.DecorationSet.create(n.doc,[s.Decoration.inline(n.selection.from,n.selection.to,{class:e.className})])}})]}});function p({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(null==e?void 0:e.type)===t}var h=i.b.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var t;const e=new r.PluginKey(this.name),n=this.options.node||(null==(t=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:t.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,t])=>t).filter(t=>(this.options.notAfter||[]).concat(n).includes(t.name));return[new r.Plugin({key:e,appendTransaction:(t,i,r)=>{const{doc:o,tr:s,schema:a}=r,l=e.getState(r),c=o.content.size,u=a.nodes[n];if(!t.some(t=>t.getMeta("skipTrailingNode"))&&l)return s.insert(c,u.create())},state:{init:(t,e)=>!p({node:e.tr.doc.lastChild,types:i}),apply:(t,e)=>{if(!t.docChanged)return e;if(t.getMeta("__uniqueIDTransaction"))return e;return!p({node:t.doc.lastChild,types:i})}}})]}}),f=i.b.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>Object(l.undo)(t,e),redo:()=>({state:t,dispatch:e})=>Object(l.redo)(t,e)}),addProseMirrorPlugins(){return[Object(l.history)(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},"0QOg":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=n("GtT5").b.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:null}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:"text-align: "+t.textAlign}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>!!this.options.alignments.includes(t)&&this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(t=>t),unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(t=>t),toggleTextAlign:t=>({editor:e,commands:n})=>!!this.options.alignments.includes(t)&&(e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}})},"0T4c":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSymbol=void 0;e.isSymbol=t=>{if("symbol"!=typeof t)return"value should be a symbol"}},"0lmf":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s}));var i=n("u/5A");function r(t){if("string"!=typeof t)return i.b;var e=t.trim().toLowerCase();return i.a.indexOf(e)>=0?e:i.b}function o(t){var e=t.querySelector(".quote-user"),n=t.cloneNode(!0),i=n.querySelector(".quote-user");i&&i.parentNode.removeChild(i);var r=e&&e.querySelector("img")?e.querySelector("img").getAttribute("src"):"",o=e&&e.textContent||"";return{post:t.getAttribute("data-post")||"",topic:t.getAttribute("data-topic")||"",user:t.getAttribute("data-user")||"",avatar:r||"",display_name:o.replace(/:\s*$/,"").trim(),message:n.innerHTML.trim()}}function s(t){if("string"!=typeof t)return"";var e=t.trim();return i.d.indexOf(e)>=0?"":e}},"0tVQ":function(t,e,n){n("FlQf"),n("VJsP"),t.exports=n("WEpk").Array.from},"1+SV":function(t,e,n){t.exports={default:n("zxeX"),__esModule:!0}},"14Xm":function(t,e,n){t.exports=n("cSMa")},"1MFB":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return l}));n("4d7F");var i=n("oLOV"),r=n("u/5A");function o(){return{authorization:"Bearer "+(i.a.access_token||"")}}function s(t){return t&&t.urls?t.urls.full||t.urls.original||t.url||t.link||t.urls.cover||t.urls.medium||t.urls.thumbnail||t.urls.preview||"":t&&(t.url||t.link)?t.url||t.link:t&&t.filename&&window.site&&window.site.media_url?""+window.site.media_url+t.filename+"_f.jpg":""}function a(t){var e="string"==typeof t?t.match(r.e):null;return e?e[1]:""}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new window.FormData;return n.append("file",t),n.append("category",e.category||"photos"),$.ajax({url:e.url||r.c,type:"POST",data:n,processData:!1,contentType:!1,headers:e.headers||o()})}},"1hDP":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.symbolProp=void 0;const i=n("zyfj"),r=n("3qjj");e.symbolProp=t=>(0,i.propOptionsGenerator)(void 0,t,r.isSymbol)},"29s/":function(t,e,n){var i=n("WEpk"),r=n("5T2Y"),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n("uOPS")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"2GTP":function(t,e,n){var i=n("eaoh");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},"2Nb0":function(t,e,n){n("FlQf"),n("bBy9"),t.exports=n("zLkG").f("iterator")},"2faE":function(t,e,n){var i=n("5K7Z"),r=n("eUtF"),o=n("G8Mo"),s=Object.defineProperty;e.f=n("jmDH")?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"2qlU":function(t,e,n){"use strict";var i,r,o,s=n("ncDI"),a=n("kHMt"),l=!1,c=window.document,u=c.documentElement,d=window.navigator.msPointerEnabled,p={start:d?"MSPointerDown":"touchstart",move:d?"MSPointerMove":"touchmove",end:d?"MSPointerUp":"touchend"},h=function(){var t=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,e=c.getElementsByTagName("script")[0].style;for(var n in e)if(t.test(n))return"-"+n.match(t)[0].toLowerCase()+"-";return"WebkitOpacity"in e?"-webkit-":"KhtmlOpacity"in e?"-khtml-":""}();function f(t){t=t||{},this._startOffsetX=0,this._currentOffsetX=0,this._opening=!1,this._moved=!1,this._opened=!1,this._preventOpen=!1,this._touch=(void 0===t.touch||t.touch)&&!0,this._side=t.side||"left",this.panel=t.panel,this.menu=t.menu,this.panel.classList.contains("slideout-panel")||this.panel.classList.add("slideout-panel"),this.panel.classList.contains("slideout-panel-"+this._side)||this.panel.classList.add("slideout-panel-"+this._side),this.menu.classList.contains("slideout-menu")||this.menu.classList.add("slideout-menu"),this.menu.classList.contains("slideout-menu-"+this._side)||this.menu.classList.add("slideout-menu-"+this._side),this._fx=t.fx||"ease",this._duration=parseInt(t.duration,10)||300,this._tolerance=parseInt(t.tolerance,10)||70,this._padding=this._translateTo=parseInt(t.padding,10)||256,this._orientation="right"===this._side?-1:1,this._translateTo*=this._orientation,this._touch&&this._initTouchEvents()}o=a,(r=f).prototype=function(t,e){for(var n in e)e[n]&&(t[n]=e[n]);return t}(r.prototype||{},o.prototype),f.prototype.open=function(){var t=this;return this.emit("beforeopen"),u.classList.contains("slideout-open")||u.classList.add("slideout-open"),this._setTransition(),this._translateXTo(this._translateTo),this._opened=!0,setTimeout((function(){t.panel.style.transition=t.panel.style["-webkit-transition"]="",t.emit("open")}),this._duration+50),this},f.prototype.close=function(){var t=this;return this.isOpen()||this._opening?(this.emit("beforeclose"),this._setTransition(),this._translateXTo(0),this._opened=!1,setTimeout((function(){u.classList.remove("slideout-open"),t.panel.style.transition=t.panel.style["-webkit-transition"]=t.panel.style[h+"transform"]=t.panel.style.transform="",t.emit("close")}),this._duration+50),this):this},f.prototype.toggle=function(){return this.isOpen()?this.close():this.open()},f.prototype.isOpen=function(){return this._opened},f.prototype._translateXTo=function(t){return this._currentOffsetX=t,this.panel.style[h+"transform"]=this.panel.style.transform="translateX("+t+"px)",this},f.prototype._setTransition=function(){return this.panel.style[h+"transition"]=this.panel.style.transition=h+"transform "+this._duration+"ms "+this._fx,this},f.prototype._initTouchEvents=function(){var t=this;return this._onScrollFn=s(c,"scroll",(function(){t._moved||(clearTimeout(i),l=!0,i=setTimeout((function(){l=!1}),250))})),this._preventMove=function(e){t._moved&&e.preventDefault()},c.addEventListener(p.move,this._preventMove),this._resetTouchFn=function(e){void 0!==e.touches&&(t._moved=!1,t._opening=!1,t._startOffsetX=e.touches[0].pageX,t._preventOpen=!t._touch||!t.isOpen()&&0!==t.menu.clientWidth)},this.panel.addEventListener(p.start,this._resetTouchFn),this._onTouchCancelFn=function(){t._moved=!1,t._opening=!1},this.panel.addEventListener("touchcancel",this._onTouchCancelFn),this._onTouchEndFn=function(){t._moved&&(t.emit("translateend"),t._opening&&Math.abs(t._currentOffsetX)>t._tolerance?t.open():t.close()),t._moved=!1},this.panel.addEventListener(p.end,this._onTouchEndFn),this._onTouchMoveFn=function(e){if(!(l||t._preventOpen||void 0===e.touches||function(t){for(;t.parentNode;){if(null!==t.getAttribute("data-slideout-ignore"))return t;t=t.parentNode}return null}(e.target))){var n=e.touches[0].clientX-t._startOffsetX,i=t._currentOffsetX=n;if(!(Math.abs(i)>t._padding)&&Math.abs(n)>20){t._opening=!0;var r=n*t._orientation;if(t._opened&&r>0||!t._opened&&r<0)return;t._moved||t.emit("translatestart"),r<=0&&(i=n+t._padding*t._orientation,t._opening=!1),t._moved&&u.classList.contains("slideout-open")||u.classList.add("slideout-open"),t.panel.style[h+"transform"]=t.panel.style.transform="translateX("+i+"px)",t.emit("translate",i),t._moved=!0}}},this.panel.addEventListener(p.move,this._onTouchMoveFn),this},f.prototype.enableTouch=function(){return this._touch=!0,this},f.prototype.disableTouch=function(){return this._touch=!1,this},f.prototype.destroy=function(){return this.close(),c.removeEventListener(p.move,this._preventMove),this.panel.removeEventListener(p.start,this._resetTouchFn),this.panel.removeEventListener("touchcancel",this._onTouchCancelFn),this.panel.removeEventListener(p.end,this._onTouchEndFn),this.panel.removeEventListener(p.move,this._onTouchMoveFn),c.removeEventListener("scroll",this._onScrollFn),this.open=this.close=function(){},this},t.exports=f},"2ukL":function(t,e,n){var i=n("Y7ZC"),r=Math.imul;i(i.S+i.F*n("KUxP")((function(){return-5!=r(4294967295,5)||2!=r.length})),"Math",{imul:function(t,e){var n=+t,i=+e,r=65535&n,o=65535&i;return 0|r*o+((65535&n>>>16)*o+r*(65535&i>>>16)<<16>>>0)}})},"36mD":function(t,e,n){"use strict";var i=n("hUA5");n("hfKm")(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("hqFN")).default;e.default=r},"377r":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.anyProp=void 0;const i=n("zyfj");e.anyProp=t=>(0,i.propOptionsGenerator)(void 0,t)},"3E3M":function(t,e,n){"use strict";var i=n("14Xm"),r=n.n(i),o=n("QbLZ"),s=n.n(o),a=n("D3Ub"),l=n.n(a),c=n("m1cH"),u=n.n(c),d=n("Al62"),p=n("huYB"),h={props:{idx:{type:Number},choice:{type:Object},entities:{type:Object},preload:{type:Boolean},winner:{type:Boolean},preview:{type:Boolean}},data:function(){return{fadeOutLeft:!1,fadeOutRight:!1}},mounted:function(){var t=this;this.preload||this.winner||this.$bus.$on("winner",(function(e){t.choice.id!=e.id&&(0==t.idx?t.fadeOutLeft=!0:t.fadeOutRight=!0)}))},beforeDestroy:function(){this.$bus.$off("winner")},computed:{entity:function(){return this.choice.entity?this.choice.entity:this.choice.ref_id?this.entities[this.choice.ref_type+"."+this.choice.ref_id]:null},image:function(){return this.choice.images?this.choice.images.medium:this.entity&&this.entity.images?this.entity.images.medium:""}},methods:{select:function(t){var e=this;this.winner||(this.$bus.$emit("winner",t),setTimeout((function(){e.$emit("select",t)}),600))}}},f=n("KHd+"),m=Object(f.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:{"animated fadeInRight tournament-choice text-center":!t.preload,fadeOutLeft:t.fadeOutLeft,fadeOutRight:t.fadeOutRight,"is-preview":t.preview},on:{click:function(e){return t.select(t.choice)}}},[t.preload?[n("img",{staticStyle:{position:"absolute"},attrs:{src:t.image,width:"10",height:"10"}})]:[t.image?n("div",{staticClass:"image"},[n("img",{attrs:{src:t.image}})]):t._e(),t._v(" "),n("div",{staticClass:"tournament-select"},[n("div",{staticClass:"inner"},[n("div",{staticClass:"icon",class:{heart:!t.winner,crown:t.winner}}),t._v(" "),n("div",{staticClass:"choice"},[t.entity?["title"==t.choice.ref_type?[t.choice.answer_text?[n("div",{staticClass:"name"},[t._v(t._s(t.choice.answer_text))]),t._v(" "),n("small",[t._v(t._s(t.entity.title))])]:[t._v(t._s(t.entity.title))]]:"wiki"==t.choice.ref_type?[t.choice.answer_text?[n("div",{staticClass:"name"},[t._v(t._s(t.choice.answer_text))]),t._v(" "),n("small",[t._v(t._s(t.entity.title))])]:[t._v(t._s(t.entity.title))],t._v(" "),n("div",[n("small",{staticClass:"text-primary"},[t._v(t._s(t.entity.featured_in))])])]:"person"==t.choice.ref_type?[t.choice.answer_text?[n("div",{staticClass:"name"},[t._v(t._s(t.choice.answer_text))]),t._v(" "),n("small",[t._v(t._s(t.entity.display_name))])]:[t._v(t._s(t.entity.display_name))]]:t._e()]:[t._v("\n\t\t\t\t\t\t"+t._s(t.choice.answer_text)+"\n\t\t\t\t\t")]],2)])])]],2)}),[],!1,null,null,null).exports,g=n("y269"),v=n("lifM"),y={props:["game","result_id","results","user_result","can_start"],components:{TournamentChoice:m,ShareInput:v.a},data:function(){return{networks:[{key:"facebook",icon:"fab fa-facebook-f"},{key:"twitter",icon:"fab fa-twitter"},{key:"reddit",icon:"fab fa-reddit"},{key:"pinterest",icon:"fab fa-pinterest"},{key:"telegram",icon:"fab fa-telegram"},{key:"line",icon:"fab fa-line"},{key:"messenger",icon:"fab fa-facebook-messenger"},{key:"whatsapp",icon:"fab fa-whatsapp"}],shareable_url:window.site.url+"/games/"+this.game.slug+"/result/"+this.result_id}},computed:{final_results:function(){return this.results.splice(0,2)}},methods:{playAgain:function(){this.$bus.$emit("game.play")}}},b=Object(f.a)(y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"text-center"},[n("h1",[t._v(t._s(t.game.title))]),t._v(" "),n("div",{staticClass:"row m-t-lg text-center is-gapless"},t._l(t.final_results,(function(t,e){return n("div",{staticClass:"col-lg-sm-6 col-lg-6"},[n("tournament-choice",{key:t.id,attrs:{idx:e,choice:t,winner:0==e,preview:!0}})],1)})),0),t._v(" "),n("div",{staticClass:"p-a-md"},[n("share-input",{attrs:{url:t.shareable_url,open_url:!1}})],1),t._v(" "),n("div",{staticClass:"social-share-desktop"},t._l(t.networks,(function(e){return n("ShareNetwork",{key:e.key,staticClass:"share-network-btn",attrs:{network:e.key,url:t.shareable_url,title:t.game.title,description:t.game.description,hashtags:"mydramalist"}},[n("i",{class:e.icon})])})),1),t._v(" "),t.can_start?n("div",{staticClass:"text-center m-t-md m-b-md"},[n("el-button",{attrs:{type:"primary"},on:{click:t.playAgain}},[n("b",[t._v("Play Again")])])],1):t._e()])}),[],!1,null,null,null).exports,_=n("RRlP"),x=n.t(_,2),w={props:["game","preview","result"],components:{TournamentChoice:m,LottieAnimation:p.a,Result:g.a,ShareResult:b},data:function(){return{defaultOptions:{animationData:x},loading:!0,started:!1,selections:[],elimination:[],candidates:[],results:[],user_result:null,result_id:null,start_loading:!1,share_dialog:!1,preliminary:!1,view_results:!1,results_loading:!1,fetched:!1,min_candidates:2,rounds:1,round:1,match:1}},mounted:function(){this.$bus.$on("game.result",this.setResult),this.$bus.$on("game.play",this.startGame)},beforeDestroy:function(){this.$bus.$off("game.result"),this.$bus.$off("game.play")},computed:{published:function(){return!!this.preview||this.game.published},candidates_count:function(){return this.candidate_list.length>0?this.candidate_list.length:this.game.total_selections},candidate_list:function(){return this.game.questions?this.game.questions.reduce((function(t,e){return t=[].concat(u()(t),u()(e.answers))}),[]).sort((function(){return Math.random()-.5})):[]},settings:function(){return this.game.settings?this.game.settings.reduce((function(t,e){return t[e.setting_name]=e.setting_value,t}),{}):{}},choices:function(){var t=2*this.match-2;return this.elimination.slice(t,t+2)},preload_choices:function(){var t=2*Math.min(this.match+1,this.matches)-2;return this.elimination.slice(t,t+2)},matches:function(){return Math.floor(this.elimination.length/2)},current_round:function(){return Math.min(Math.max(1,this.rounds-this.round+1),this.rounds)},rounds_of:function(){return this.elimination.length<=2?"Final Round":"Round of "+this.elimination.length},entities_map:function(){return this.game.entities?this.game.entities.reduce((function(t,e){return t[e.object+"."+e.id]=e,t}),{}):{}},can_start:function(){if(this.game.expired)return!1;if(this.preview)return!0;var t="0"==this.getSetting("replayable")?1:0;return!(t>0&&this.game.user_play_count>=t)}},methods:{newNesults:function(){var t=this;return this.candidate_list.sort((function(t,e){return e.total_votes==t.total_votes?e.total_votes+e.total_selections-(t.total_votes+t.total_selections):e.total_votes-t.total_votes})).map((function(e){var n=e.ref_type+"."+e.ref_id;return t.entities_map[n]&&(e.entity=t.entities_map[n]),e}))},showResults:function(){var t=this;return l()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.fetched){e.next=5;break}return t.results_loading=!0,e.next=4,t.$http.Get("/v1/games/"+t.game.id+"?expand=1",(function(e){t.$emit("update:game",s()({},t.game,e)),t.fetched=!0}));case 4:t.results_loading=!1;case 5:t.results=t.newNesults(),t.view_results=!t.view_results;case 7:case"end":return e.stop()}}),e,t)})))()},highlightWinner:function(t){return this.candidates.indexOf((function(e){return e.id==t.id}))},getSetting:function(t){return this.settings.hasOwnProperty(t)?this.settings[t]:"0"},submitSelections:function(){var t=this;return l()(r.a.mark((function e(){var n,i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.selections.reduce((function(t,e){return e.weight<=2&&!t.includes(e.id)&&t.push(e.id),t}),[]),!t.preview){e.next=3;break}return e.abrupt("return");case 3:if(i={question_id:t.game.questions[0].id,selections:t.selections.reduce((function(t,e){return t.push({id:e.id,weight:e.weight}),t}),[])},!t.game.session_id){e.next=8;break}i.session_id=t.game.session_id,e.next=10;break;case 8:return e.next=10,t.$http.Post("/v1/games/"+t.game.id+"/session",{},(function(e){t.$emit("update:game",s()({},t.game,e)),i.session_id=e.session_id}));case 10:return e.next=12,t.$http.PostJson("/v1/games/sessions/"+t.game.session_id+"/selections",i,(function(t){}));case 12:t.$http.PostJson("/v1/games/sessions/"+t.game.session_id+"/finished",{first_id:n[0],second_id:n[1]?n[1]:0},(function(e){t.$emit("update:game",s()({},t.game,{user_play_count:t.game.user_play_count+1})),t.setResult(e)}));case 13:case"end":return e.stop()}}),e,t)})))()},setResult:function(t){this.result_id=t.id,this.share_dialog=!0,this.user_result=t,this.results=[t.first_answer,t.second_answer]},select:function(t){if(!(this.match>this.matches)){this.$scrollTo&&this.$scrollTo("#games",300,{offset:-40});var e=s()({},t,{weight:this.current_round});if(this.selections.unshift(e),this.candidates.push(t),this.match==this.matches&&this.candidates.length>0)return this.elimination=this.candidates.splice(0,this.candidates.length),this.preliminary=!1,this.match=1,this.round++,void(1==this.elimination.length&&this.round>=this.rounds&&this.submitSelections());this.match++}},startGame:function(){var t=this;return l()(r.a.mark((function e(){var n,i,o,a;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.can_start){e.next=2;break}return e.abrupt("return");case 2:if(t.share_dialog=!1,t.preview){e.next=17;break}return t.start_loading=!0,e.prev=5,e.next=8,Object(d.c)("start_game");case 8:return n=e.sent,i=t.$http.Post("/v1/games/"+t.game.id+"/start",{token:n},(function(e){t.$emit("update:game",s()({},t.game,e)),t.fetched=!0})),e.next=12,i.fail((function(e){t.start_loading=!1}));case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(5),e.abrupt("return");case 17:if(t.start_loading=!1,t.candidates=t.candidate_list,!(t.candidates_count<=0)){e.next=21;break}return e.abrupt("return",0);case 21:t.rounds=Math.ceil(Math.log(t.candidates_count)/Math.log(2)),t.round=1,t.match=1,t.elimination=t.candidates,t.candidates=[],t.selections=[],(o=Math.pow(2,t.rounds)-t.candidates_count)>0&&(t.preliminary=!0,(a=t.candidates).push.apply(a,u()(t.elimination.splice(0,o)))),t.started=!0;case 30:case"end":return e.stop()}}),e,t,[[5,14]])})))()}}},k=Object(f.a)(w,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"container"},[t.started?[1==t.elimination.length?[i("div",{staticClass:"text-center tournament-winner"},[i("div",{staticClass:"m-t-md m-b-lg"},[i("div",{staticClass:"winner-anim"},[i("lottie-animation",{ref:"anim",attrs:{loop:!0,animationData:n("RRlP")}})],1),t._v(" "),i("h2",[t._v("Winner")])]),t._v(" "),t._l(t.elimination,(function(e){return i("tournament-choice",{key:e.id,attrs:{choice:e,entities:t.entities_map,winner:""}})}))],2),t._v(" "),i("div",{staticClass:"tournament-results text-center"},[!t.view_results||t.game.user_play_count>0?i("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.results_loading,expression:"results_loading"}],staticClass:"btn btn-block",attrs:{disabled:t.candidates_count1?i("b",[t._v("Match "+t._s(t.match)+"/"+t._s(t.matches))]):t._e()]),t._v(" "),i("div",{staticClass:"row text-center is-gapless"},t._l(t.choices,(function(e,n){return i("div",{staticClass:"col-lg-6"},[i("tournament-choice",{key:e.id,attrs:{idx:n,choice:e,entities:t.entities_map},on:{select:t.select}})],1)})),0),t._v(" "),t._l(t.preload_choices,(function(e){return[i("tournament-choice",{key:e.id,staticClass:"preload-data",attrs:{choice:e,entities:t.entities_map,preload:""}})]}))]]:i("div",{staticClass:"tournament-intro text-center"},[t._m(0),t._v(" "),t.published?[i("div",{staticClass:"game-info"},[i("h4",[t._v(t._s(t.game.title))]),t._v(" "),t.game.description?i("p",{staticClass:"game-desc"},[t._v(t._s(t.game.description))]):t._e(),t._v(" "),i("div",{staticClass:"game-candidates"},[t._v(t._s(t.candidates_count)+" candidate"+t._s(1==t.candidates_count?"":"s"))])]),t._v(" "),t.can_start?i("button",{directives:[{name:"loading",rawName:"v-loading",value:t.start_loading,expression:"start_loading"}],staticClass:"btn btn-primary btn-block m-t-md",attrs:{disabled:t.candidates_count0?i("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.results_loading,expression:"results_loading"}],staticClass:"btn btn-block m-t-md",attrs:{disabled:t.candidates_count0&&this.game.user_play_count>=t)}},methods:{getSetting:function(t){return this.settings.hasOwnProperty(t)?this.settings[t]:"0"}}}],components:{SocialSharing:n("8oF0").a,ShareInput:v.a},data:function(){return{current_index:0,selections:{},unique_questions:{},force_result:null,view_result_loading:!1,game_over:!1,game_over_loading:!1,load_next_question:!1,timer:null,final_result:null,timerTimeout:null}},mounted:function(){this.$bus.$on("game.result",this.setResult),this.$bus.$on("game.play",this.startGame)},beforeDestroy:function(){this.$bus.$off("game.result"),this.$bus.$off("game.play")},watch:{timer:{handler:function(t){var e=this;t>0?this.timerTimeout=setTimeout((function(){e.timer--}),1e3):0===t&&this.selectDefaultAnswer()},immediate:!0}},computed:{current_question:function(){return this.game.questions[this.current_index]},next_question:function(){return this.game.questions[Math.min(this.current_index+1,this.game.questions.length)]},answers_with_image:function(){return this.current_question.answers.findIndex((function(t){return null!==t.images}))>=0},questions_map:function(){return this.game.questions.reduce((function(t,e,n){return t[e.id]=n,t}),{})},current_answers:function(){var t=this.current_question.answers;if(this.current_question.rules&&this.current_question.rules.length>0)for(var e=JSON.parse(this.current_question.rules),n=this.processRules(e),i=t.reduce((function(t,e){return t.set(e.id,e),t}),new M.a),r=0;r3600){var n=Math.floor(this.timer/3600),i=3600*n;return n+"h "+(e=Math.floor((t-i)/60))+"m "+(t-(i+60*e))+"s"}return this.timer>60?(e=Math.floor(this.timer/60))+"m "+(t-60*e)+"s":this.timer+"s"},disable_start:function(){return!this.can_start||(!!(this.game.results&&this.game.results.length<=0)||this.game.total_questions<=0)},results_stats:function(){var t=this;return T()(this.selections).reduce((function(e,n){var i=t.selections[n];return e.set(i.result_id,i),e}),new M.a)},game_url:function(){return window.site.url+"/games/"+this.game.slug},shareable_url:function(){return window.site.url+"/games/"+this.game.slug+"/p/"+this.user_result.result_id+"?r="+this.user_result.id}},methods:{restartGame:function(){this.game_over=!1,this.started=!1,this.load_next_question=!1,this.startGame()},resetGame:function(){this.game_over=!1,this.started=!1,this.selections={},this.unique_questions={},this.load_next_question=!1,this.sendDebugData()},setFinalResult:function(){var t=this;if(this.game.results&&this.game.results.length<=0)return null;if(this.force_result)return"object"===S()(this.force_result)?this.force_result:void(this.final_result=this.game.results.find((function(e){return e.id==t.force_result})));var e=[].concat(u()(this.results_stats.entries())).sort((function(t,e){return e[1].points-t[1].points}))[0][1];this.final_result=this.game.results.find((function(t){return t.id==e.result_id}))},startGame:function(){var t=this;return l()(r.a.mark((function e(){var n,i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.selections={},t.force_result=null,t.can_start){e.next=4;break}return e.abrupt("return");case 4:if(t.$scrollTo&&t.$scrollTo("#games",0,{offset:-40}),t.preview){e.next=19;break}return t.start_loading=!0,e.prev=7,e.next=10,Object(d.c)("start_game");case 10:return n=e.sent,i=t.$http.Post("/v1/games/"+t.game.id+"/start",{token:n},(function(e){t.$emit("update:game",s()({},t.game,e)),t.fetched=!0})),e.next=14,i.fail((function(e){t.start_loading=!1}));case 14:e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(7),e.abrupt("return");case 19:t.current_index=0,t.start_loading=!1,t.started=!0,t.initCurrentQuestion();case 23:case"end":return e.stop()}}),e,t,[[7,16]])})))()},selectDefaultAnswer:function(){for(var t=0;t=0&&(this.current_index=n),void this.$nextTick((function(){e.initCurrentQuestion()}))}if(this.current_index0?this.timer=this.current_question.time_limit:this.timerTimeout=null,this.$nextTick((function(){if(t.current_question.reset_answer&&t.unique_questions[t.current_question.id]){var e=s()({},t.unique_questions[t.current_question.id]);t.decrSelectionPoints(e),delete t.unique_questions[e.question_id]}t.sendDebugData()}))},sendDebugData:function(){var t=this;this.debug&&setTimeout((function(){t.$bus.$emit("game.debug",{game:t.game,selections:t.selections,results_stats:t.results_stats})}),100)},triggerGameOver:function(){var t=this;return l()(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.game_over=!0,t.setFinalResult(),t.sendDebugData(),!t.preview){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,t.$http.Post("/v1/games/"+t.game.id+"/session",{},(function(e){t.$emit("update:game",s()({},t.game,e))}));case 7:t.game_over_loading=!0,t.$http.PostJson("/v1/games/sessions/"+t.game.session_id+"/finished",{result_id:t.final_result.id},(function(e){t.$emit("update:game",s()({},t.game,{user_play_count:t.game.user_play_count+1})),t.game_over_loading=!1,t.user_result=e}));case 9:case"end":return e.stop()}}),e,t)})))()},shuffle:function(t){for(var e=t.length,n=void 0;0!=e;){n=Math.floor(Math.random()*e),e--;var i=[t[n],t[e]];t[e]=i[0],t[n]=i[1]}return t},processRules:function(t){for(var e=[],n=0;n=1},processTrigger:function(t){switch(t.id){case"result_points":var e=this.results_stats.get(t.rid);switch(e||(e={result_id:t.rid,points:0}),t.operator){case">":return e.points>t.value;case"=":return e.points==t.value;case"<":return e.points=100}},[t._v(t._s(t.current_question.question_text))])]),t._v(" "),t.load_next_question?t._e():n("div",{staticClass:"quiz-answers",class:{"has-image":t.answers_with_image}},t._l(t.current_answers,(function(e){return"hidden"!=e.visibility?n("div",{staticClass:"quiz-answer",on:{click:function(n){return t.selectAnswer(e)}}},[n("div",{staticClass:"quiz-answer-body"},[e.images?n("div",{staticClass:"quiz-answer-img"},[n("img",{attrs:{src:e.images.medium,alt:e.answer_text}})]):t._e(),t._v(" "),n("div",{staticClass:"quiz-answer-text"},[t._v(t._s(e.answer_text))])])]):t._e()})),0),t._v(" "),t.next_question&&t.next_question.images?n("div",{staticClass:"quiz-question-next"},[n("img",{staticClass:"animated fadeIn",attrs:{src:t.next_question.images.full}})]):t._e()])]):n("div",{staticClass:"tournament-intro text-center"},[t.game.images?n("div",{staticClass:"m-b-md"},[n("img",{staticClass:"game-trophy",attrs:{src:t.game.images.medium}})]):n("div",{staticClass:"m-b-md"},[n("img",{staticClass:"game-trophy",attrs:{src:"/assets/game_chess.svg"}})]),t._v(" "),t.published?[n("div",{staticClass:"game-info"},[n("h4",[t._v(t._s(t.game.title))]),t._v(" "),t.game.description?n("p",{staticClass:"game-desc"},[t._v(t._s(t.game.description))]):t._e()]),t._v(" "),n("button",{directives:[{name:"loading",rawName:"v-loading",value:t.start_loading,expression:"start_loading"}],staticClass:"btn btn-primary btn-block m-t-md",attrs:{disabled:t.disable_start},on:{click:t.startGame}},[n("b",[t._v("Start Quiz")])]),t._v(" "),!t.view_results&&t.game.user_play_count>0?n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.view_result_loading,expression:"view_result_loading"}],staticClass:"btn btn-block m-t-md",on:{click:t.viewResult}},[n("b",[t._v("View Result")])]):t._e(),t._v(" "),t.view_results?n("div",{staticClass:"game-edit-list m-t-lg"},t._l(t.results,(function(e){return n("result",{key:e.id,staticClass:"edit-item",attrs:{game:t.game,item:e,preview:!0,total_choices:t.results.length}})})),1):t._e()]:[n("h4",[t._v("Content Not Ready")])]],2)])}),[],!1,null,null,null).exports},props:{preview:{type:Boolean,default:!1},debug:{type:Boolean,default:!1},gid:{type:Number},isWidget:{type:Boolean,default:!1},inlineStyle:{type:String,default:"min-height: 550px;"}},data:function(){return{game:{},loading:!0}},mounted:function(){this.fetchGame(),this.$bus.$on("fetch_next_game",this.getNextGame)},computed:{game_type:function(){switch(this.game.type){case 7:return"personality-quiz"}return"tournament"},game_id:function(){return this.gid?this.gid:this.$route.params.id}},beforeDestroy:function(){this.$bus.$off("fetch_next_game",this.getNextGame)},methods:{fetchGame:function(){var t=this,e="/v1/games/"+this.game_id;this.preview&&(e+="?preview=1&expand=1"),this.$http.Get(e,(function(e){t.game=e,t.loading=!1,t.fetchResult()}))},resetGame:function(){this.$refs.game.resetGame()},restartGame:function(){this.$refs.game.restartGame()},fetchResult:function(){var t=this;this.hasOwnProperty("$route")&&this.$route.params.rid&&this.$http.Get("/v1/games/"+this.game.id+"/result/"+this.$route.params.rid,(function(e){t.$bus.$emit("game.result",e)}))},getNextGame:function(){var t=this;this.loading=!0,this.$http.Get("/v1/games/next_rand_game",{cgid:this.gid},(function(e){t.game=e,t.loading=!1,t.fetchResult()}))}}},D=(n("Ws6e"),Object(f.a)(O,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],class:{"is-widget":t.isWidget},style:t.inlineStyle,attrs:{id:"games"}},[t.loading?t._e():n(t.game_type,{ref:"game",tag:"component",attrs:{game:t.game,debug:t.debug,isWidget:t.isWidget,preview:t.preview},on:{"update:game":function(e){t.game=e}}})],1)}),[],!1,null,null,null));e.a=D.exports},"3qjj":function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.isSymbol=e.isOneOf=e.isInteger=e.isInstanceOf=e.vuePropValidator=void 0;const r=i(n("oCYn"));e.vuePropValidator=function(t,...e){const n=t?[...e,t]:e;if(0!==n.length)return t=>{for(const e of n){const n=e(t);if(n)return"object"==typeof r.default&&"util"in r.default?r.default.util.warn(`${n} (received: '${String(t)}')`):console.warn(`${n} (received: '${String(t)}')`),!1}return!0}};var o=n("NXre");Object.defineProperty(e,"isInstanceOf",{enumerable:!0,get:function(){return o.isInstanceOf}});var s=n("d7ep");Object.defineProperty(e,"isInteger",{enumerable:!0,get:function(){return s.isInteger}});var a=n("ZLBF");Object.defineProperty(e,"isOneOf",{enumerable:!0,get:function(){return a.isOneOf}});var l=n("0T4c");Object.defineProperty(e,"isSymbol",{enumerable:!0,get:function(){return l.isSymbol}})},"3vv1":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=82)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},5:function(t,e){t.exports=n("6XTx")},82:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this.$createElement,e=this._self._c||t;return e("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":this.doDestroy}},[e("ul",{directives:[{name:"show",rawName:"v-show",value:this.showPopper,expression:"showPopper"}],staticClass:"el-dropdown-menu el-popper",class:[this.size&&"el-dropdown-menu--"+this.size]},[this._t("default")],2)])};i._withStripped=!0;var r=n(5),o={name:"ElDropdownMenu",componentName:"ElDropdownMenu",mixins:[n.n(r).a],props:{visibleArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:0}},data:function(){return{size:this.dropdown.dropdownSize}},inject:["dropdown"],created:function(){var t=this;this.$on("updatePopper",(function(){t.showPopper&&t.updatePopper()})),this.$on("visible",(function(e){t.showPopper=e}))},mounted:function(){this.dropdown.popperElm=this.popperElm=this.$el,this.referenceElm=this.dropdown.$el,this.dropdown.initDomOperation()},watch:{"dropdown.placement":{immediate:!0,handler:function(t){this.currentPlacement=t}}}},s=n(0),a=Object(s.a)(o,i,[],!1,null,null,null);a.options.__file="packages/dropdown/src/dropdown-menu.vue";var l=a.exports;l.install=function(t){t.component(l.name,l)};e.default=l}})},"3zPb":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=89)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},11:function(t,e){t.exports=n("K7XR")},15:function(t,e){t.exports=n("UShQ")},4:function(t,e){t.exports=n("0BDH")},89:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"dialog-fade"},on:{"after-enter":t.afterEnter,"after-leave":t.afterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-dialog__wrapper",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleWrapperClick(e)}}},[n("div",{key:t.key,ref:"dialog",class:["el-dialog",{"is-fullscreen":t.fullscreen,"el-dialog--center":t.center},t.customClass],style:t.style,attrs:{role:"dialog","aria-modal":"true","aria-label":t.title||"dialog"}},[n("div",{staticClass:"el-dialog__header"},[t._t("title",[n("span",{staticClass:"el-dialog__title"},[t._v(t._s(t.title))])]),t.showClose?n("button",{staticClass:"el-dialog__headerbtn",attrs:{type:"button","aria-label":"Close"},on:{click:t.handleClose}},[n("i",{staticClass:"el-dialog__close el-icon el-icon-close"})]):t._e()],2),t.rendered?n("div",{staticClass:"el-dialog__body"},[t._t("default")],2):t._e(),t.$slots.footer?n("div",{staticClass:"el-dialog__footer"},[t._t("footer")],2):t._e()])])])};i._withStripped=!0;var r=n(15),o=n.n(r),s=n(11),a=n.n(s),l=n(4),c=n.n(l),u={name:"ElDialog",mixins:[o.a,c.a,a.a],props:{title:{type:String,default:""},modal:{type:Boolean,default:!0},modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},width:String,fullscreen:Boolean,customClass:{type:String,default:""},top:{type:String,default:"15vh"},beforeClose:Function,center:{type:Boolean,default:!1},destroyOnClose:Boolean},data:function(){return{closed:!1,key:0}},watch:{visible:function(t){var e=this;t?(this.closed=!1,this.$emit("open"),this.$el.addEventListener("scroll",this.updatePopper),this.$nextTick((function(){e.$refs.dialog.scrollTop=0})),this.appendToBody&&document.body.appendChild(this.$el)):(this.$el.removeEventListener("scroll",this.updatePopper),this.closed||this.$emit("close"),this.destroyOnClose&&this.$nextTick((function(){e.key++})))}},computed:{style:function(){var t={};return this.fullscreen||(t.marginTop=this.top,this.width&&(t.width=this.width)),t}},methods:{getMigratingConfig:function(){return{props:{size:"size is removed."}}},handleWrapperClick:function(){this.closeOnClickModal&&this.handleClose()},handleClose:function(){"function"==typeof this.beforeClose?this.beforeClose(this.hide):this.hide()},hide:function(t){!1!==t&&(this.$emit("update:visible",!1),this.$emit("close"),this.closed=!0)},updatePopper:function(){this.broadcast("ElSelectDropdown","updatePopper"),this.broadcast("ElDropdownMenu","updatePopper")},afterEnter:function(){this.$emit("opened")},afterLeave:function(){this.$emit("closed")}},mounted:function(){this.visible&&(this.rendered=!0,this.open(),this.appendToBody&&document.body.appendChild(this.$el))},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},d=n(0),p=Object(d.a)(u,i,[],!1,null,null,null);p.options.__file="packages/dialog/src/component.vue";var h=p.exports;h.install=function(t){t.component(h.name,h)};e.default=h}})},"49oK":function(t,e,n){"use strict";n.r(e),n.d(e,"keydownHandler",(function(){return m})),n.d(e,"keymap",(function(){return f}));for(var i={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:"'"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)i[48+a]=i[96+a]=String(a);for(a=1;a<=24;a++)i[a+111]="F"+a;for(a=65;a<=90;a++)i[a]=String.fromCharCode(a+32),r[a]=String.fromCharCode(a);for(var l in i)r.hasOwnProperty(l)||(r[l]=i[l]);var c=n("b/sn");const u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function p(t){let e,n,i,r,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t({optional:{type:Function,required:!1,default:void 0,validator:(0,i.vuePropValidator)(t)},nullable:{type:Function,required:!1,default:null,validator:(0,i.vuePropValidator)(t)},required:{type:Function,required:!0,validator:(0,i.vuePropValidator)(t)}})},"4d7F":function(t,e,n){t.exports={default:n("aW7e"),__esModule:!0}},"53J1":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=53)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},3:function(t,e){t.exports=n("gSIQ")},33:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-select-dropdown__item",class:{selected:t.itemSelected,"is-disabled":t.disabled||t.groupDisabled||t.limitReached,hover:t.hover},on:{mouseenter:t.hoverItem,click:function(e){return e.stopPropagation(),t.selectOptionClick(e)}}},[t._t("default",[n("span",[t._v(t._s(t.currentLabel))])])],2)};i._withStripped=!0;var r=n(4),o=n.n(r),s=n(3),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l={mixins:[o.a],name:"ElOption",componentName:"ElOption",inject:["select"],props:{value:{required:!0},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:!1}},data:function(){return{index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}},computed:{isObject:function(){return"[object object]"===Object.prototype.toString.call(this.value).toLowerCase()},currentLabel:function(){return this.label||(this.isObject?"":this.value)},currentValue:function(){return this.value||this.label||""},itemSelected:function(){return this.select.multiple?this.contains(this.select.value,this.value):this.isEqual(this.value,this.select.value)},limitReached:function(){return!!this.select.multiple&&(!this.itemSelected&&(this.select.value||[]).length>=this.select.multipleLimit&&this.select.multipleLimit>0)}},watch:{currentLabel:function(){this.created||this.select.remote||this.dispatch("ElSelect","setSelected")},value:function(t,e){var n=this.select,i=n.remote,r=n.valueKey;if(!this.created&&!i){if(r&&"object"===(void 0===t?"undefined":a(t))&&"object"===(void 0===e?"undefined":a(e))&&t[r]===e[r])return;this.dispatch("ElSelect","setSelected")}}},methods:{isEqual:function(t,e){if(this.isObject){var n=this.select.valueKey;return Object(s.getValueByPath)(t,n)===Object(s.getValueByPath)(e,n)}return t===e},contains:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(this.isObject){var n=this.select.valueKey;return t&&t.some((function(t){return Object(s.getValueByPath)(t,n)===Object(s.getValueByPath)(e,n)}))}return t&&t.indexOf(e)>-1},handleGroupDisabled:function(t){this.groupDisabled=t},hoverItem:function(){this.disabled||this.groupDisabled||(this.select.hoverIndex=this.select.options.indexOf(this))},selectOptionClick:function(){!0!==this.disabled&&!0!==this.groupDisabled&&this.dispatch("ElSelect","handleOptionClick",[this,!0])},queryChange:function(t){this.visible=new RegExp(Object(s.escapeRegexpString)(t),"i").test(this.currentLabel)||this.created,this.visible||this.select.filteredOptionsCount--}},created:function(){this.select.options.push(this),this.select.cachedOptions.push(this),this.select.optionsCount++,this.select.filteredOptionsCount++,this.$on("queryChange",this.queryChange),this.$on("handleGroupDisabled",this.handleGroupDisabled)},beforeDestroy:function(){var t=this.select,e=t.selected,n=t.multiple?e:[e],i=this.select.cachedOptions.indexOf(this),r=n.indexOf(this);i>-1&&r<0&&this.select.cachedOptions.splice(i,1),this.select.onOptionDestroy(this.select.options.indexOf(this))}},c=n(0),u=Object(c.a)(l,i,[],!1,null,null,null);u.options.__file="packages/select/src/option.vue";e.a=u.exports},4:function(t,e){t.exports=n("0BDH")},53:function(t,e,n){"use strict";n.r(e);var i=n(33);i.a.install=function(t){t.component(i.a.name,i.a)},e.default=i.a}})},"58S2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("byeC");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},"5FBR":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=114)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},10:function(t,e){t.exports=n("8606")},114:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["el-input-number",t.inputNumberSize?"el-input-number--"+t.inputNumberSize:"",{"is-disabled":t.inputNumberDisabled},{"is-without-controls":!t.controls},{"is-controls-right":t.controlsAtRight}],on:{dragstart:function(t){t.preventDefault()}}},[t.controls?n("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-input-number__decrease",class:{"is-disabled":t.minDisabled},attrs:{role:"button"},on:{keydown:function(e){return!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.decrease(e)}}},[n("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-down":"minus")})]):t._e(),t.controls?n("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-input-number__increase",class:{"is-disabled":t.maxDisabled},attrs:{role:"button"},on:{keydown:function(e){return!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.increase(e)}}},[n("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-up":"plus")})]):t._e(),n("el-input",{ref:"input",attrs:{value:t.displayValue,placeholder:t.placeholder,disabled:t.inputNumberDisabled,size:t.inputNumberSize,max:t.max,min:t.min,name:t.name,label:t.label},on:{blur:t.handleBlur,focus:t.handleFocus,input:t.handleInput,change:t.handleInputChange},nativeOn:{keydown:[function(e){return!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.increase(e))},function(e){return!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.decrease(e))}]}})],1)};i._withStripped=!0;var r=n(10),o=n.n(r),s=n(22),a=n.n(s),l=n(30),c={name:"ElInputNumber",mixins:[a()("input")],inject:{elForm:{default:""},elFormItem:{default:""}},directives:{repeatClick:l.a},components:{ElInput:o.a},props:{step:{type:Number,default:1},stepStrictly:{type:Boolean,default:!1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},value:{},disabled:Boolean,size:String,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:""},name:String,label:String,placeholder:String,precision:{type:Number,validator:function(t){return t>=0&&t===parseInt(t,10)}}},data:function(){return{currentValue:0,userInput:null}},watch:{value:{immediate:!0,handler:function(t){var e=void 0===t?t:Number(t);if(void 0!==e){if(isNaN(e))return;if(this.stepStrictly){var n=this.getPrecision(this.step),i=Math.pow(10,n);e=Math.round(e/this.step)*i*this.step/i}void 0!==this.precision&&(e=this.toPrecision(e,this.precision))}e>=this.max&&(e=this.max),e<=this.min&&(e=this.min),this.currentValue=e,this.userInput=null,this.$emit("input",e)}}},computed:{minDisabled:function(){return this._decrease(this.value,this.step)this.max},numPrecision:function(){var t=this.value,e=this.step,n=this.getPrecision,i=this.precision,r=n(e);return void 0!==i?(r>i&&console.warn("[Element Warn][InputNumber]precision should not be less than the decimal places of step"),i):Math.max(n(t),r)},controlsAtRight:function(){return this.controls&&"right"===this.controlsPosition},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},inputNumberSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputNumberDisabled:function(){return this.disabled||!!(this.elForm||{}).disabled},displayValue:function(){if(null!==this.userInput)return this.userInput;var t=this.currentValue;if("number"==typeof t){if(this.stepStrictly){var e=this.getPrecision(this.step),n=Math.pow(10,e);t=Math.round(t/this.step)*n*this.step/n}void 0!==this.precision&&(t=t.toFixed(this.precision))}return t}},methods:{toPrecision:function(t,e){return void 0===e&&(e=this.numPrecision),parseFloat(Math.round(t*Math.pow(10,e))/Math.pow(10,e))},getPrecision:function(t){if(void 0===t)return 0;var e=t.toString(),n=e.indexOf("."),i=0;return-1!==n&&(i=e.length-n-1),i},_increase:function(t,e){if("number"!=typeof t&&void 0!==t)return this.currentValue;var n=Math.pow(10,this.numPrecision);return this.toPrecision((n*t+n*e)/n)},_decrease:function(t,e){if("number"!=typeof t&&void 0!==t)return this.currentValue;var n=Math.pow(10,this.numPrecision);return this.toPrecision((n*t-n*e)/n)},increase:function(){if(!this.inputNumberDisabled&&!this.maxDisabled){var t=this.value||0,e=this._increase(t,this.step);this.setCurrentValue(e)}},decrease:function(){if(!this.inputNumberDisabled&&!this.minDisabled){var t=this.value||0,e=this._decrease(t,this.step);this.setCurrentValue(e)}},handleBlur:function(t){this.$emit("blur",t)},handleFocus:function(t){this.$emit("focus",t)},setCurrentValue:function(t){var e=this.currentValue;"number"==typeof t&&void 0!==this.precision&&(t=this.toPrecision(t,this.precision)),t>=this.max&&(t=this.max),t<=this.min&&(t=this.min),e!==t&&(this.userInput=null,this.$emit("input",t),this.$emit("change",t,e),this.currentValue=t)},handleInput:function(t){this.userInput=t},handleInputChange:function(t){var e=""===t?void 0:Number(t);isNaN(e)&&""!==t||this.setCurrentValue(e),this.userInput=null},select:function(){this.$refs.input.select()}},mounted:function(){var t=this.$refs.input.$refs.input;t.setAttribute("role","spinbutton"),t.setAttribute("aria-valuemax",this.max),t.setAttribute("aria-valuemin",this.min),t.setAttribute("aria-valuenow",this.currentValue),t.setAttribute("aria-disabled",this.inputNumberDisabled)},updated:function(){this.$refs&&this.$refs.input&&this.$refs.input.$refs.input.setAttribute("aria-valuenow",this.currentValue)}},u=n(0),d=Object(u.a)(c,i,[],!1,null,null,null);d.options.__file="packages/input-number/src/input-number.vue";var p=d.exports;p.install=function(t){t.component(p.name,p)};e.default=p},2:function(t,e){t.exports=n("WST1")},22:function(t,e){t.exports=n("EvI9")},30:function(t,e,n){"use strict";var i=n(2);e.a={bind:function(t,e,n){var r=null,o=void 0,s=function(){return n.context[e.expression].apply()},a=function(){Date.now()-o<100&&s(),clearInterval(r),r=null};Object(i.on)(t,"mousedown",(function(t){0===t.button&&(o=Date.now(),Object(i.once)(document,"mouseup",a),clearInterval(r),r=setInterval(s,100))}))}}}})},"5K7Z":function(t,e,n){var i=n("93I4");t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},"5T2Y":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"5fLb":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=70)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},15:function(t,e){t.exports=n("UShQ")},23:function(t,e){t.exports=n("Qfgm")},7:function(t,e){t.exports=n("oCYn")},70:function(t,e,n){"use strict";n.r(e);var i=n(7),r=n.n(i),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"el-notification-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],class:["el-notification",t.customClass,t.horizontalClass],style:t.positionStyle,attrs:{role:"alert"},on:{mouseenter:function(e){t.clearTimer()},mouseleave:function(e){t.startTimer()},click:t.click}},[t.type||t.iconClass?n("i",{staticClass:"el-notification__icon",class:[t.typeClass,t.iconClass]}):t._e(),n("div",{staticClass:"el-notification__group",class:{"is-with-icon":t.typeClass||t.iconClass}},[n("h2",{staticClass:"el-notification__title",domProps:{textContent:t._s(t.title)}}),n("div",{directives:[{name:"show",rawName:"v-show",value:t.message,expression:"message"}],staticClass:"el-notification__content"},[t._t("default",[t.dangerouslyUseHTMLString?n("p",{domProps:{innerHTML:t._s(t.message)}}):n("p",[t._v(t._s(t.message))])])],2),t.showClose?n("div",{staticClass:"el-notification__closeBtn el-icon-close",on:{click:function(e){return e.stopPropagation(),t.close(e)}}}):t._e()])])])};o._withStripped=!0;var s={success:"success",info:"info",warning:"warning",error:"error"},a={data:function(){return{visible:!1,title:"",message:"",duration:4500,type:"",showClose:!0,customClass:"",iconClass:"",onClose:null,onClick:null,closed:!1,verticalOffset:0,timer:null,dangerouslyUseHTMLString:!1,position:"top-right"}},computed:{typeClass:function(){return this.type&&s[this.type]?"el-icon-"+s[this.type]:""},horizontalClass:function(){return this.position.indexOf("right")>-1?"right":"left"},verticalProperty:function(){return/^top-/.test(this.position)?"top":"bottom"},positionStyle:function(){var t;return(t={})[this.verticalProperty]=this.verticalOffset+"px",t}},watch:{closed:function(t){t&&(this.visible=!1,this.$el.addEventListener("transitionend",this.destroyElement))}},methods:{destroyElement:function(){this.$el.removeEventListener("transitionend",this.destroyElement),this.$destroy(!0),this.$el.parentNode.removeChild(this.$el)},click:function(){"function"==typeof this.onClick&&this.onClick()},close:function(){this.closed=!0,"function"==typeof this.onClose&&this.onClose()},clearTimer:function(){clearTimeout(this.timer)},startTimer:function(){var t=this;this.duration>0&&(this.timer=setTimeout((function(){t.closed||t.close()}),this.duration))},keydown:function(t){46===t.keyCode||8===t.keyCode?this.clearTimer():27===t.keyCode?this.closed||this.close():this.startTimer()}},mounted:function(){var t=this;this.duration>0&&(this.timer=setTimeout((function(){t.closed||t.close()}),this.duration)),document.addEventListener("keydown",this.keydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.keydown)}},l=n(0),c=Object(l.a)(a,o,[],!1,null,null,null);c.options.__file="packages/notification/src/main.vue";var u=c.exports,d=n(9),p=n.n(d),h=n(15),f=n(23),m=r.a.extend(u),g=void 0,v=[],y=1,b=function t(e){if(!r.a.prototype.$isServer){var n=(e=p()({},e)).onClose,i="notification_"+y++,o=e.position||"top-right";e.onClose=function(){t.close(i,n)},g=new m({data:e}),Object(f.isVNode)(e.message)&&(g.$slots.default=[e.message],e.message="REPLACED_BY_VNODE"),g.id=i,g.$mount(),document.body.appendChild(g.$el),g.visible=!0,g.dom=g.$el,g.dom.style.zIndex=h.PopupManager.nextZIndex();var s=e.offset||0;return v.filter((function(t){return t.position===o})).forEach((function(t){s+=t.$el.offsetHeight+16})),s+=16,g.verticalOffset=s,v.push(g),g}};["success","warning","info","error"].forEach((function(t){b[t]=function(e){return("string"==typeof e||Object(f.isVNode)(e))&&(e={message:e}),e.type=t,b(e)}})),b.close=function(t,e){var n=-1,i=v.length,r=v.filter((function(e,i){return e.id===t&&(n=i,!0)}))[0];if(r&&("function"==typeof e&&e(r),v.splice(n,1),!(i<=1)))for(var o=r.position,s=r.dom.offsetHeight,a=n;a=0;t--)v[t].close()};var _=b;e.default=_},9:function(t,e){t.exports=n("f03z")}})},"5i1c":function(t,e,n){"use strict";e.__esModule=!0,e.default=function(){if(o.default.prototype.$isServer)return 0;if(void 0!==s)return s;var t=document.createElement("div");t.className="el-scrollbar__wrap",t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",t.appendChild(n);var i=n.offsetWidth;return t.parentNode.removeChild(t),s=e-i};var i,r=n("oCYn"),o=(i=r)&&i.__esModule?i:{default:i};var s=void 0},"5pKv":function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},"5vMV":function(t,e,n){var i=n("B+OT"),r=n("NsO/"),o=n("W070")(!1),s=n("VVlx")("IE_PROTO");t.exports=function(t,e){var n,a=r(t),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>l;)i(a,n=e[l++])&&(~o(c,n)||c.push(n));return c}},"6/1s":function(t,e,n){var i=n("YqAc")("meta"),r=n("93I4"),o=n("B+OT"),s=n("2faE").f,a=0,l=Object.isExtensible||function(){return!0},c=!n("KUxP")((function(){return l(Object.preventExtensions({}))})),u=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},d=t.exports={KEY:i,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[i].i},getWeak:function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[i].w},onFreeze:function(t){return c&&d.NEED&&l(t)&&!o(t,i)&&u(t),t}}},"6HaS":function(t,e,n){"use strict";n.d(e,"b",(function(){return m})),n.d(e,"f",(function(){return g})),n.d(e,"e",(function(){return v})),n.d(e,"a",(function(){return y})),n.d(e,"d",(function(){return b})),n.d(e,"c",(function(){return _}));var i=n("rfXi"),r=n.n(i),o=n("GtT5"),s=n("usTV"),a=n("58S2"),l=n("06Vp"),c=n("1MFB"),u=n("0lmf"),d={name:"DiscussionQuoteView",components:{NodeViewContent:l.c,NodeViewWrapper:l.d},props:l.f,computed:{displayName:function(){return(this.node.attrs.display_name||"")+":"},removeButtonTitle:function(){return this.$t?this.$t("Remove quote"):"Remove quote"}},methods:{getNodePos:function(){if(!this.getPos)return null;try{return this.getPos()}catch(t){return null}},removeQuote:function(){var t=this.getNodePos();"number"==typeof t&&this.editor&&"function"==typeof this.editor._removeDiscussionQuote&&this.editor._removeDiscussionQuote(t)}}},p=n("KHd+"),h=Object(p.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("node-view-wrapper",{staticClass:"quote dte-discussion-quote",attrs:{as:"blockquote","data-post":t.node.attrs.post||"","data-topic":t.node.attrs.topic||"","data-user":t.node.attrs.user||"","data-message-source":"tiptap"}},[n("button",{staticClass:"dte-quote-remove",attrs:{type:"button",contenteditable:"false",title:t.removeButtonTitle},on:{mousedown:function(t){t.stopPropagation(),t.preventDefault()},click:function(e){return e.stopPropagation(),e.preventDefault(),t.removeQuote(e)}}},[n("i",{staticClass:"fa fa-times",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("div",{staticClass:"quote-user",attrs:{contenteditable:"false"}},[t.node.attrs.avatar?n("img",{staticClass:"avatar",attrs:{src:t.node.attrs.avatar}}):t._e(),t._v("\n "+t._s(t.displayName)+"\n ")]),t._v(" "),n("node-view-content",{staticClass:"quote-body",attrs:{as:"div"}})],1)}),[],!1,null,null,null).exports;function f(t,e){var n=document.createElement("div");return n.innerHTML=e&&String(e).trim()?e:"

",a.DOMParser.fromSchema(t).parseSlice(n,{preserveWhitespace:!0}).content}function m(){return o.d.create({name:"discussionQuote",group:"block",content:"block+",isolating:!0,defining:!0,draggable:!0,selectable:!0,addAttributes:function(){return{post:{default:""},topic:{default:""},user:{default:""},avatar:{default:""},display_name:{default:""}}},parseHTML:function(){return[{tag:"blockquote.quote",getAttrs:function(t){return Object(u.a)(t)},getContent:function(t,e){return function(t,e){var n=document.createElement("div");r()(e.childNodes||[]).forEach((function(t){1===t.nodeType&&t.classList&&t.classList.contains("quote-user")||n.appendChild(t.cloneNode(!0))}));var i=a.DOMParser.fromSchema(t).parseSlice(n,{preserveWhitespace:!0}).content;return i.size>0?i:f(t,"

")}(e,t)}}]},addNodeView:function(){return Object(l.e)(h)},renderHTML:function(t){var e=t.HTMLAttributes,n=Object(o.A)({class:"quote","data-post":e.post||"","data-topic":e.topic||"","data-user":e.user||"","data-message-source":"tiptap"}),i=[];return e.avatar&&i.push(["img",{src:e.avatar,class:"avatar"}]),i.push((e.display_name||"")+":"),["blockquote",n,["div",{class:"quote-user"}].concat(i),["div",{class:"quote-body"},0]]}})}function g(t,e,n){if(!t||"number"!=typeof e||!t.state||!t.view)return!1;var i=t.state.doc.nodeAt(e);if(!i||!i.type||i.type.name!==n)return!1;var r=t.state.tr.delete(e,e+i.nodeSize);return t.view.dispatch(r),!0}function v(){return o.c.create({name:"spoiler",parseHTML:function(){return[{tag:"span.spoiler"}]},renderHTML:function(t){var e=t.HTMLAttributes;return["span",Object(o.A)(e,{class:"spoiler"}),0]},addCommands:function(){var t=this;return{toggleSpoiler:function(){return function(e){return e.commands.toggleMark(t.name)}}}}})}function y(t){return o.b.create({name:"discussionMediaUpload",addProseMirrorPlugins:function(){return[new s.Plugin({props:{handlePaste:function(e,n){if(!(n&&n.clipboardData&&n.clipboardData.files&&n.clipboardData.files.length))return!1;var i=r()(n.clipboardData.files).filter((function(t){return/image/i.test(t.type)}));return!!i.length&&(n.preventDefault(),t.uploadEditorImageFiles(i,e.state.selection.from),!0)},handleDOMEvents:{drop:function(e,n){if(!(n&&n.dataTransfer&&n.dataTransfer.files&&n.dataTransfer.files.length))return!1;var i=r()(n.dataTransfer.files).filter((function(t){return/image/i.test(t.type)}));if(!i.length)return!1;n.preventDefault();var o=e.posAtCoords({left:n.clientX,top:n.clientY}),s=o&&"number"==typeof o.pos?o.pos:e.state.selection.from;return t.uploadEditorImageFiles(i,s),!0}}}})]}})}function b(t){return o.b.create({name:"discussionYoutubeAutoEmbed",addProseMirrorPlugins:function(){return[new s.Plugin({props:{handlePaste:function(e,n){if(!n||!n.clipboardData||n.clipboardData.files&&n.clipboardData.files.length)return!1;var i=(n.clipboardData.getData("text/plain")||"").trim();return!!Object(c.b)(i)&&(n.preventDefault(),t.insertVideoFromUrl(i,e.state.selection.from),!0)},handleDOMEvents:{drop:function(e,n){if(!n||!n.dataTransfer||n.dataTransfer.files&&n.dataTransfer.files.length)return!1;var i=(n.dataTransfer.getData("text/plain")||"").trim();if(!Object(c.b)(i))return!1;n.preventDefault();var r=e.posAtCoords({left:n.clientX,top:n.clientY}),o=r&&"number"==typeof r.pos?r.pos:e.state.selection.from;return t.insertVideoFromUrl(i,o),!0}}}})]}})}function _(t,e,n){var i=f(t,n);return t.nodes.discussionQuote.create(e,i.size>0?i:f(t,"

"))}},"6XTx":function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("oCYn"),o=(i=r)&&i.__esModule?i:{default:i},s=n("UShQ");var a=o.default.prototype.$isServer?function(){}:n("YWdi"),l=function(t){return t.stopPropagation()};e.default={props:{transformOrigin:{type:[Boolean,String],default:!0},placement:{type:String,default:"bottom"},boundariesPadding:{type:Number,default:5},reference:{},popper:{},offset:{default:0},value:Boolean,visibleArrow:Boolean,arrowOffset:{type:Number,default:35},appendToBody:{type:Boolean,default:!0},popperOptions:{type:Object,default:function(){return{gpuAcceleration:!1}}}},data:function(){return{showPopper:!1,currentPlacement:""}},watch:{value:{immediate:!0,handler:function(t){this.showPopper=t,this.$emit("input",t)}},showPopper:function(t){this.disabled||(t?this.updatePopper():this.destroyPopper(),this.$emit("input",t))}},methods:{createPopper:function(){var t=this;if(!this.$isServer&&(this.currentPlacement=this.currentPlacement||this.placement,/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))){var e=this.popperOptions,n=this.popperElm=this.popperElm||this.popper||this.$refs.popper,i=this.referenceElm=this.referenceElm||this.reference||this.$refs.reference;!i&&this.$slots.reference&&this.$slots.reference[0]&&(i=this.referenceElm=this.$slots.reference[0].elm),n&&i&&(this.visibleArrow&&this.appendArrow(n),this.appendToBody&&document.body.appendChild(this.popperElm),this.popperJS&&this.popperJS.destroy&&this.popperJS.destroy(),e.placement=this.currentPlacement,e.offset=this.offset,e.arrowOffset=this.arrowOffset,this.popperJS=new a(i,n,e),this.popperJS.onCreate((function(e){t.$emit("created",t),t.resetTransformOrigin(),t.$nextTick(t.updatePopper)})),"function"==typeof e.onUpdate&&this.popperJS.onUpdate(e.onUpdate),this.popperJS._popper.style.zIndex=s.PopupManager.nextZIndex(),this.popperElm.addEventListener("click",l))}},updatePopper:function(){var t=this.popperJS;t?(t.update(),t._popper&&(t._popper.style.zIndex=s.PopupManager.nextZIndex())):this.createPopper()},doDestroy:function(t){!this.popperJS||this.showPopper&&!t||(this.popperJS.destroy(),this.popperJS=null)},destroyPopper:function(){this.popperJS&&this.resetTransformOrigin()},resetTransformOrigin:function(){if(this.transformOrigin){var t=this.popperJS._popper.getAttribute("x-placement").split("-")[0],e={top:"bottom",bottom:"top",left:"right",right:"left"}[t];this.popperJS._popper.style.transformOrigin="string"==typeof this.transformOrigin?this.transformOrigin:["top","bottom"].indexOf(t)>-1?"center "+e:e+" center"}},appendArrow:function(t){var e=void 0;if(!this.appended){for(var n in this.appended=!0,t.attributes)if(/^_v-/.test(t.attributes[n].name)){e=t.attributes[n].name;break}var i=document.createElement("div");e&&i.setAttribute(e,""),i.setAttribute("x-arrow",""),i.className="popper__arrow",t.appendChild(i)}}},beforeDestroy:function(){this.doDestroy(!0),this.popperElm&&this.popperElm.parentNode===document.body&&(this.popperElm.removeEventListener("click",l),document.body.removeChild(this.popperElm))},deactivated:function(){this.$options.beforeDestroy[0].call(this)}}},"7t/g":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=97)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},97:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"el-button",class:[t.type?"el-button--"+t.type:"",t.buttonSize?"el-button--"+t.buttonSize:"",{"is-disabled":t.buttonDisabled,"is-loading":t.loading,"is-plain":t.plain,"is-round":t.round,"is-circle":t.circle}],attrs:{disabled:t.buttonDisabled||t.loading,autofocus:t.autofocus,type:t.nativeType},on:{click:t.handleClick}},[t.loading?n("i",{staticClass:"el-icon-loading"}):t._e(),t.icon&&!t.loading?n("i",{class:t.icon}):t._e(),t.$slots.default?n("span",[t._t("default")],2):t._e()])};i._withStripped=!0;var r={name:"ElButton",inject:{elForm:{default:""},elFormItem:{default:""}},props:{type:{type:String,default:"default"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},buttonSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},buttonDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},methods:{handleClick:function(t){this.$emit("click",t)}}},o=n(0),s=Object(o.a)(r,i,[],!1,null,null,null);s.options.__file="packages/button/src/button.vue";var a=s.exports;a.install=function(t){t.component(a.name,a)};e.default=a}})},8606:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=76)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},11:function(t,e){t.exports=n("K7XR")},21:function(t,e){t.exports=n("05c+")},4:function(t,e){t.exports=n("0BDH")},76:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["textarea"===t.type?"el-textarea":"el-input",t.inputSize?"el-input--"+t.inputSize:"",{"is-disabled":t.inputDisabled,"is-exceed":t.inputExceed,"el-input-group":t.$slots.prepend||t.$slots.append,"el-input-group--append":t.$slots.append,"el-input-group--prepend":t.$slots.prepend,"el-input--prefix":t.$slots.prefix||t.prefixIcon,"el-input--suffix":t.$slots.suffix||t.suffixIcon||t.clearable||t.showPassword}],on:{mouseenter:function(e){t.hovering=!0},mouseleave:function(e){t.hovering=!1}}},["textarea"!==t.type?[t.$slots.prepend?n("div",{staticClass:"el-input-group__prepend"},[t._t("prepend")],2):t._e(),"textarea"!==t.type?n("input",t._b({ref:"input",staticClass:"el-input__inner",attrs:{tabindex:t.tabindex,type:t.showPassword?t.passwordVisible?"text":"password":t.type,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"input",t.$attrs,!1)):t._e(),t.$slots.prefix||t.prefixIcon?n("span",{staticClass:"el-input__prefix"},[t._t("prefix"),t.prefixIcon?n("i",{staticClass:"el-input__icon",class:t.prefixIcon}):t._e()],2):t._e(),t.getSuffixVisible()?n("span",{staticClass:"el-input__suffix"},[n("span",{staticClass:"el-input__suffix-inner"},[t.showClear&&t.showPwdVisible&&t.isWordLimitVisible?t._e():[t._t("suffix"),t.suffixIcon?n("i",{staticClass:"el-input__icon",class:t.suffixIcon}):t._e()],t.showClear?n("i",{staticClass:"el-input__icon el-icon-circle-close el-input__clear",on:{mousedown:function(t){t.preventDefault()},click:t.clear}}):t._e(),t.showPwdVisible?n("i",{staticClass:"el-input__icon el-icon-view el-input__clear",on:{click:t.handlePasswordVisible}}):t._e(),t.isWordLimitVisible?n("span",{staticClass:"el-input__count"},[n("span",{staticClass:"el-input__count-inner"},[t._v("\n "+t._s(t.textLength)+"/"+t._s(t.upperLimit)+"\n ")])]):t._e()],2),t.validateState?n("i",{staticClass:"el-input__icon",class:["el-input__validateIcon",t.validateIcon]}):t._e()]):t._e(),t.$slots.append?n("div",{staticClass:"el-input-group__append"},[t._t("append")],2):t._e()]:n("textarea",t._b({ref:"textarea",staticClass:"el-textarea__inner",style:t.textareaStyle,attrs:{tabindex:t.tabindex,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"textarea",t.$attrs,!1)),t.isWordLimitVisible&&"textarea"===t.type?n("span",{staticClass:"el-input__count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()],2)};i._withStripped=!0;var r=n(4),o=n.n(r),s=n(11),a=n.n(s),l=void 0,c="\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",u=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function d(t){var e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),i=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),r=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:u.map((function(t){return t+":"+e.getPropertyValue(t)})).join(";"),paddingSize:i,borderSize:r,boxSizing:n}}function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;l||(l=document.createElement("textarea"),document.body.appendChild(l));var i=d(t),r=i.paddingSize,o=i.borderSize,s=i.boxSizing,a=i.contextStyle;l.setAttribute("style",a+";"+c),l.value=t.value||t.placeholder||"";var u=l.scrollHeight,p={};"border-box"===s?u+=o:"content-box"===s&&(u-=r),l.value="";var h=l.scrollHeight-r;if(null!==e){var f=h*e;"border-box"===s&&(f=f+r+o),u=Math.max(f,u),p.minHeight=f+"px"}if(null!==n){var m=h*n;"border-box"===s&&(m=m+r+o),u=Math.min(m,u)}return p.height=u+"px",l.parentNode&&l.parentNode.removeChild(l),l=null,p}var h=n(9),f=n.n(h),m=n(21),g={name:"ElInput",componentName:"ElInput",mixins:[o.a,a.a],inheritAttrs:!1,inject:{elForm:{default:""},elFormItem:{default:""}},data:function(){return{textareaCalcStyle:{},hovering:!1,focused:!1,isComposing:!1,passwordVisible:!1}},props:{value:[String,Number],size:String,resize:String,form:String,disabled:Boolean,readonly:Boolean,type:{type:String,default:"text"},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator:function(t){return!0}},validateEvent:{type:Boolean,default:!0},suffixIcon:String,prefixIcon:String,label:String,clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},tabindex:String},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},validateState:function(){return this.elFormItem?this.elFormItem.validateState:""},needStatusIcon:function(){return!!this.elForm&&this.elForm.statusIcon},validateIcon:function(){return{validating:"el-icon-loading",success:"el-icon-circle-check",error:"el-icon-circle-close"}[this.validateState]},textareaStyle:function(){return f()({},this.textareaCalcStyle,{resize:this.resize})},inputSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputDisabled:function(){return this.disabled||(this.elForm||{}).disabled},nativeInputValue:function(){return null===this.value||void 0===this.value?"":String(this.value)},showClear:function(){return this.clearable&&!this.inputDisabled&&!this.readonly&&this.nativeInputValue&&(this.focused||this.hovering)},showPwdVisible:function(){return this.showPassword&&!this.inputDisabled&&!this.readonly&&(!!this.nativeInputValue||this.focused)},isWordLimitVisible:function(){return this.showWordLimit&&this.$attrs.maxlength&&("text"===this.type||"textarea"===this.type)&&!this.inputDisabled&&!this.readonly&&!this.showPassword},upperLimit:function(){return this.$attrs.maxlength},textLength:function(){return"number"==typeof this.value?String(this.value).length:(this.value||"").length},inputExceed:function(){return this.isWordLimitVisible&&this.textLength>this.upperLimit}},watch:{value:function(t){this.$nextTick(this.resizeTextarea),this.validateEvent&&this.dispatch("ElFormItem","el.form.change",[t])},nativeInputValue:function(){this.setNativeInputValue()},type:function(){var t=this;this.$nextTick((function(){t.setNativeInputValue(),t.resizeTextarea(),t.updateIconOffset()}))}},methods:{focus:function(){this.getInput().focus()},blur:function(){this.getInput().blur()},getMigratingConfig:function(){return{props:{icon:"icon is removed, use suffix-icon / prefix-icon instead.","on-icon-click":"on-icon-click is removed."},events:{click:"click is removed."}}},handleBlur:function(t){this.focused=!1,this.$emit("blur",t),this.validateEvent&&this.dispatch("ElFormItem","el.form.blur",[this.value])},select:function(){this.getInput().select()},resizeTextarea:function(){if(!this.$isServer){var t=this.autosize;if("textarea"===this.type)if(t){var e=t.minRows,n=t.maxRows;this.textareaCalcStyle=p(this.$refs.textarea,e,n)}else this.textareaCalcStyle={minHeight:p(this.$refs.textarea).minHeight}}},setNativeInputValue:function(){var t=this.getInput();t&&t.value!==this.nativeInputValue&&(t.value=this.nativeInputValue)},handleFocus:function(t){this.focused=!0,this.$emit("focus",t)},handleCompositionStart:function(){this.isComposing=!0},handleCompositionUpdate:function(t){var e=t.target.value,n=e[e.length-1]||"";this.isComposing=!Object(m.isKorean)(n)},handleCompositionEnd:function(t){this.isComposing&&(this.isComposing=!1,this.handleInput(t))},handleInput:function(t){this.isComposing||t.target.value!==this.nativeInputValue&&(this.$emit("input",t.target.value),this.$nextTick(this.setNativeInputValue))},handleChange:function(t){this.$emit("change",t.target.value)},calcIconOffset:function(t){var e=[].slice.call(this.$el.querySelectorAll(".el-input__"+t)||[]);if(e.length){for(var n=null,i=0;i{if("number"!=typeof t||t<=0||Number.isNaN(t))return"value should be a positive number"}},"8Ldi":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNonPositive=void 0;e.isNonPositive=t=>{if("number"!=typeof t||t>0||Number.isNaN(t))return"value should be a non-positive number"}},"8aD0":function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"c",(function(){return g})),n.d(e,"b",(function(){return v})),n.d(e,"f",(function(){return b})),n.d(e,"g",(function(){return _})),n.d(e,"h",(function(){return x})),n.d(e,"d",(function(){return k})),n.d(e,"e",(function(){return P}));var i=n("QbLZ"),r=n.n(i),o=n("GtT5"),s=n("06Vp"),a=n("rfXi"),l=n.n(a),c=n("r8UP"),u=n.n(c),d=n("+Ej1"),p=n.n(d),h=n("58S2"),f=["normal","left","right","hero"],m="normal",g=100,v=72;function y(t){return"string"!=typeof t?[]:t.split(/\s+/).filter(Boolean)}function b(t){if("string"!=typeof t)return m;var e=t.trim().toLowerCase();return-1!==f.indexOf(e)?e:m}function _(t){if("number"==typeof t&&!p()(t))return Math.min(g,Math.max(24,Math.round(t)));if("string"!=typeof t)return v;var e=t.trim().toLowerCase();if("small"===e)return 36;if("medium"===e)return 58;if("large"===e)return 82;var n=u()(e.replace("%",""));return p()(n)?v:Math.min(g,Math.max(24,Math.round(n)))}function x(t){return null==t||""===t?null:_(t)}function w(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=b(t),i=["grc__figure"];return n!==m&&i.push("grc__figure--"+n),e&&i.push("grc__img--selected"),i.join(" ")}function k(t){var e=x(t);return null===e?null:"width:"+e+"%;"}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{src:t.src||null,alt:t.alt||"",title:t.title||""}}function S(t){var e,n;return!!("img"===(t&&t.tagName?t.tagName.toLowerCase():"")?t:t&&t.querySelector?t.querySelector("img[src]"):null)&&{layout:b(t.getAttribute&&t.getAttribute("data-layout")||(e=t.getAttribute?t.getAttribute("class"):"",b((n=y(e).find((function(t){return 0===t.indexOf("grc__figure--")})))?n.replace("grc__figure--",""):m))),width:x(t.getAttribute&&t.getAttribute("data-width")||function(t){if("string"!=typeof t)return"";var e=t.match(/(?:^|;)\s*width\s*:\s*([0-9.]+)%/i);if(e)return _(e[1]);var n=t.match(/--grc-image-width\s*:\s*([0-9.]+)%/i);return n?_(n[1]):""}(t.getAttribute?t.getAttribute("style"):"")||function(t){var e=y(t).find((function(t){return 0===t.indexOf("grc__figure-width--")}));return e?_(e.replace("grc__figure-width--","")):""}(t.getAttribute?t.getAttribute("class"):"")),height:t.getAttribute&&t.getAttribute("data-height")?t.getAttribute("data-height"):null}}var E={name:"FigureView",components:{NodeViewContent:s.c,NodeViewWrapper:s.d},props:s.f,data:function(){return{isEditingCaption:!1,isCaptionVisible:!1,isNodeActive:!1,displayWidthOverride:null,naturalWidthPx:null}},mounted:function(){this.syncActiveState(),this.syncNaturalWidth(),this.editor&&"function"==typeof this.editor.on&&(this.editor.on("selectionUpdate",this.syncActiveState),this.editor.on("transaction",this.syncActiveState),this.editor.on("focus",this.syncActiveState),this.editor.on("blur",this.syncActiveState),this.editor.on("richImageResize",this.handleRichImageResize))},beforeDestroy:function(){this.editor&&"function"==typeof this.editor.off&&(this.editor.off("selectionUpdate",this.syncActiveState),this.editor.off("transaction",this.syncActiveState),this.editor.off("focus",this.syncActiveState),this.editor.off("blur",this.syncActiveState),this.editor.off("richImageResize",this.handleRichImageResize))},computed:{captionClassNames:function(){return{grc__figcaption:!0,"is-empty":this.isCaptionEmpty,"grc__figcaption--hidden":!this.shouldShowCaption}},captionText:function(){return this.node&&this.node.textContent?this.node.textContent:""},captionToggleTitle:function(){return this.isCaptionVisible?this.$t?this.$t("Hide caption"):"Hide caption":this.$t?this.$t("Show caption"):"Show caption"},displayedWidth:function(){return"number"==typeof this.displayWidthOverride?String(_(this.displayWidthOverride)):this.node&&this.node.attrs&&null!==this.node.attrs.width&&void 0!==this.node.attrs.width&&""!==this.node.attrs.width?String(_(this.node.attrs.width)):null},dragHandleTitle:function(){return this.$t?this.$t("Drag image"):"Drag image"},figureClassName:function(){var t=[w(this.normalizedLayout)];return this.isNodeActive&&t.push("grc__figure--active"),this.selected&&t.push("grc__img--selected"),t.join(" ")},figureStyle:function(){return this.displayedWidth?k(this.displayedWidth):this.normalizedLayout===m&&this.naturalWidthPx?{maxWidth:this.naturalWidthPx+"px"}:null},imageClassName:function(){return"grc__img"},isCaptionEmpty:function(){return!this.captionText.trim()},layoutOptions:function(){return[{value:"left",label:this.$t?this.$t("Float left"):"Float left"},{value:"normal",label:this.$t?this.$t("Inline"):"Inline"},{value:"right",label:this.$t?this.$t("Float right"):"Float right"},{value:"hero",label:this.$t?this.$t("Hero"):"Hero"}]},menuWidthLabel:function(){return this.displayedWidth?this.displayedWidth+"%":"Auto"},normalizedLayout:function(){return b(this.node&&this.node.attrs?this.node.attrs.layout:m)},placeholderText:function(){return this.$t?this.$t("Write a caption..."):"Write a caption..."},removeButtonTitle:function(){return this.$t?this.$t("Remove image"):"Remove image"},shouldShowCaption:function(){return!this.isCaptionEmpty||this.isCaptionVisible||this.isEditingCaption},showFigureMenu:function(){return this.isNodeActive&&!this.isEditingCaption}},methods:{activateImage:function(){if(this.editor&&"function"==typeof this.editor._activateRichImage){var t=this.getNodePos();"number"==typeof t&&this.editor._activateRichImage(t)}},getNodePos:function(){if(!this.getPos)return null;try{return this.getPos()}catch(t){return null}},handleCaptionBlur:function(){var t=this;this.isEditingCaption=!1,this.$nextTick((function(){t.syncActiveState()}))},handleCaptionFocus:function(){this.isEditingCaption=!0,this.isCaptionVisible=!0,this.activateImage()},handleDragHandleDragStart:function(t){var e=this.getNodePos();"number"==typeof e&&this.editor&&"function"==typeof this.editor._startRichImageDrag&&this.editor._startRichImageDrag(e),t&&t.dataTransfer&&(t.dataTransfer.effectAllowed="move")},handleDragHandleMouseDown:function(t){if(!t||0===t.button){var e=this.getNodePos();"number"==typeof e&&this.editor&&"function"==typeof this.editor._selectRichImageNode&&this.editor._selectRichImageNode(e)}},handleImageMouseDown:function(t){t&&0!==t.button||this.activateImage()},syncNaturalWidth:function(){var t=this.$refs.image;if(t){var e=t.naturalWidth||t.width||0;this.naturalWidthPx=e||null}else this.naturalWidthPx=null},handleRichImageResize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getNodePos();"number"==typeof e?t&&t.pos===e&&"number"==typeof t.width?this.displayWidthOverride=t.width:t&&t.pos!==e||(this.displayWidthOverride=null):this.displayWidthOverride=null},removeImage:function(){var t=this.getNodePos();"number"==typeof t&&this.editor&&"function"==typeof this.editor._removeRichImage&&this.editor._removeRichImage(t)},toggleCaption:function(){var t=this,e=!this.isCaptionVisible;this.isCaptionVisible=e,e&&(this.activateImage(),this.isCaptionEmpty&&this.$nextTick((function(){var e=t.getNodePos();if("number"==typeof e&&t.editor&&"function"==typeof t.editor._focusRichImageCaption)t.editor._focusRichImageCaption(e);else{var n=t.$refs.caption;n&&"function"==typeof n.focus&&n.focus()}})))},setLayout:function(t){var e=this.getNodePos();"number"==typeof e&&this.editor&&"function"==typeof this.editor._setRichImageLayout&&this.editor._setRichImageLayout(e,t)},syncActiveState:function(){var t=this.getNodePos();"number"==typeof t?this.editor&&"function"==typeof this.editor._getActiveRichImagePos?this.isNodeActive=this.editor._getActiveRichImagePos()===t:this.isNodeActive=!!this.selected:this.isNodeActive=!1}}},T=n("KHd+"),A=Object(T.a)(E,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("node-view-wrapper",{class:t.figureClassName,style:t.figureStyle,attrs:{as:"figure","data-layout":t.normalizedLayout,"data-width":t.displayedWidth,draggable:t.isEditingCaption?"false":"true"}},[t.showFigureMenu?n("div",{staticClass:"grc__menu",attrs:{contenteditable:"false"},on:{mousedown:function(t){t.stopPropagation()},click:function(t){t.stopPropagation()}}},[t._l(t.layoutOptions,(function(e){return n("button",{key:e.value,staticClass:"grc__menu-button",class:{"is-active":t.normalizedLayout===e.value},attrs:{type:"button",title:e.label},on:{click:function(n){return t.setLayout(e.value)}}},["left"===e.value?n("span",[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 512 512",fill:"currentColor"}},[n("path",{attrs:{d:"M432 424H16c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16zm3.2-256H263.8a12.76 12.76 0 0 0-12.8 12.8v22.3a12.76 12.76 0 0 0 12.8 12.8h171.3a12.76 12.76 0 0 0 12.8-12.8v-22.3c.1-7.1-5.6-12.8-12.7-12.8zM432 48H16C7.2 48 0 55.2 0 64v16c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16zm3.2 248H263.8a12.76 12.76 0 0 0-12.8 12.8v22.3a12.76 12.76 0 0 0 12.8 12.8h171.3a12.76 12.76 0 0 0 12.8-12.8v-22.3c.1-7.1-5.6-12.8-12.7-12.8zm-264.1 72H15.9A15.88 15.88 0 0 1 0 352.1V159.9A15.88 15.88 0 0 1 15.9 144h155.2a15.88 15.88 0 0 1 15.9 15.9v192.2a15.88 15.88 0 0 1-15.9 15.9z"}})])]):"right"===e.value?n("span",[n("svg",{staticStyle:{transform:"scale(-1,1)"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 512 512",fill:"currentColor"}},[n("path",{attrs:{d:"M432 424H16c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16zm3.2-256H263.8a12.76 12.76 0 0 0-12.8 12.8v22.3a12.76 12.76 0 0 0 12.8 12.8h171.3a12.76 12.76 0 0 0 12.8-12.8v-22.3c.1-7.1-5.6-12.8-12.7-12.8zM432 48H16C7.2 48 0 55.2 0 64v16c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16zm3.2 248H263.8a12.76 12.76 0 0 0-12.8 12.8v22.3a12.76 12.76 0 0 0 12.8 12.8h171.3a12.76 12.76 0 0 0 12.8-12.8v-22.3c.1-7.1-5.6-12.8-12.7-12.8zm-264.1 72H15.9A15.88 15.88 0 0 1 0 352.1V159.9A15.88 15.88 0 0 1 15.9 144h155.2a15.88 15.88 0 0 1 15.9 15.9v192.2a15.88 15.88 0 0 1-15.9 15.9z"}})])]):"hero"===e.value?n("span",[n("svg",{attrs:{focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 512 512",fill:"currentColor"}},[n("path",{attrs:{d:"M387.4,424H60.6c-6.9,0-12.6,7.2-12.6,16v16c0,8.8,5.6,16,12.6,16h326.9c6.9,0,12.6-7.2,12.6-16v-16 C400,431.2,394.4,424,387.4,424z M387.4,48H60.6C53.6,48,48,55.2,48,64v16c0,8.8,5.6,16,12.6,16h326.9c6.9,0,12.6-7.2,12.6-16V64 C400,55.2,394.4,48,387.4,48z M423.4,368H24.6C11,368,0,357,0,343.4V168.6C0,155,11,144,24.6,144h398.8c13.6,0,24.6,11,24.6,24.6v174.8C448,357,437,368,423.4,368z"}})])]):n("span",[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 512 512",fill:"currentColor"}},[n("path",{attrs:{d:"M432,424H16c-8.8,0-16,7.2-16,16v16c0,8.8,7.2,16,16,16h416c8.8,0,16-7.2,16-16v-16C448,431.2,440.8,424,432,424z M432,48 H16C7.2,48,0,55.2,0,64v16c0,8.8,7.2,16,16,16h416c8.8,0,16-7.2,16-16V64C448,55.2,440.8,48,432,48z M423.4,368H24.6C11,368,0,357,0,343.4V168.6C0,155,11,144,24.6,144h398.8c13.6,0,24.6,11,24.6,24.6v174.8C448,357,437,368,423.4,368z"}})])])])})),t._v(" "),n("span",{staticClass:"grc__menu-size"},[t._v(t._s(t.menuWidthLabel))]),t._v(" "),n("button",{staticClass:"grc__menu-button",class:{"is-active":t.isCaptionVisible},attrs:{type:"button",title:t.captionToggleTitle},on:{click:t.toggleCaption}},[n("i",{staticClass:"far fa-closed-captioning",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("div",{staticClass:"grc__menu-button grc__menu-button--drag",attrs:{contenteditable:"false",role:"button",tabindex:"0",draggable:"true","data-drag-handle":"",title:t.dragHandleTitle},on:{mousedown:function(e){return e.stopPropagation(),t.handleDragHandleMouseDown(e)},dragstart:t.handleDragHandleDragStart,click:function(t){t.stopPropagation()}}},[n("i",{staticClass:"fa fa-arrows-alt",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{staticClass:"grc__menu-button grc__menu-button--danger",attrs:{type:"button",title:t.removeButtonTitle},on:{click:t.removeImage}},[n("i",{staticClass:"fa fa-trash",attrs:{"aria-hidden":"true"}})])],2):t._e(),t._v(" "),n("img",{ref:"image",class:t.imageClassName,attrs:{src:t.node.attrs.src,alt:t.node.attrs.alt,title:t.node.attrs.title,draggable:"false"},on:{load:t.syncNaturalWidth,mousedown:function(e){return e.preventDefault(),e.stopPropagation(),t.handleImageMouseDown(e)},click:function(t){t.stopPropagation()},mouseup:function(t){t.stopPropagation()},dragstart:function(t){t.preventDefault(),t.stopPropagation()}}}),t._v(" "),n("node-view-content",{ref:"caption",class:t.captionClassNames,attrs:{as:"figcaption",draggable:"false",dir:"ltr","data-placeholder":t.placeholderText},on:{mousedown:function(t){t.stopPropagation()},click:function(t){t.stopPropagation()},mouseup:function(t){t.stopPropagation()},focus:t.handleCaptionFocus,blur:t.handleCaptionBlur,dragstart:function(t){t.preventDefault(),t.stopPropagation()}}})],1)}),[],!1,null,null,null).exports;var M=o.d.create({name:"figure",addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",marks:"bold italic underline link",draggable:!0,selectable:!0,atom:!1,defining:!0,isolating:!0,addAttributes:function(){return{src:{default:null},alt:{default:""},title:{default:""},layout:{default:m},width:{default:null},height:{default:null}}},parseHTML:function(){return[{tag:"figure",getAttrs:function(t){var e=t.querySelector?t.querySelector("img[src]"):null;return!!e&&r()({},C({src:e.getAttribute("src"),alt:e.getAttribute("alt"),title:e.getAttribute("title")}),S(t))},getContent:function(t,e){return function(t,e){if(!t||!e)return h.Fragment.empty;var n="figure"===(e.tagName?e.tagName.toLowerCase():"")&&e.querySelector?e.querySelector("figcaption"):null;if(!n)return h.Fragment.empty;var i=document.createElement("div");return l()(n.childNodes||[]).forEach((function(t){i.appendChild(t.cloneNode(!0))})),h.DOMParser.fromSchema(t).parseSlice(i,{preserveWhitespace:!0}).content}(e,t)}},{tag:"img[src]",getAttrs:function(t){return r()({},C({src:t.getAttribute("src"),alt:t.getAttribute("alt"),title:t.getAttribute("title")}),S(t))}}]},addNodeView:function(){return Object(s.e)(A)},renderHTML:function(t){var e=t.HTMLAttributes,n=b(e.layout),i=Object(o.A)(this.options.HTMLAttributes,{class:w(n),"data-layout":n}),s=x(e.width);return null!==s&&(i["data-width"]=String(s),i.style=k(s)),e.height&&(i["data-height"]=e.height),["figure",i,["img",r()({},C(e),{class:"grc__img"})],["figcaption",{class:"grc__figcaption"},0]]},addCommands:function(){var t=this;return{insertFigureImage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(i){var r=i.commands,o=i.state,s=b(e.layout||m),a="hero"===s?100:"left"===s||"right"===s?50:null,l="string"==typeof e.caption?e.caption:"";return r.insertContentAt("number"==typeof n?n:o.selection.from,{type:t.name,attrs:{src:e.src||null,alt:e.alt||"",title:e.title||"",layout:s,width:void 0!==e.width?_(e.width):a,height:void 0===e.height?null:e.height},content:l?[{type:"text",text:l}]:[]})}},focusSelectedFigureCaption:function(){return function(t){var e=t.commands,n=function(t){if(!t||!t.selection)return null;var e=t.selection;if(e.node&&e.node.type&&"figure"===e.node.type.name)return{node:e.node,pos:e.from};if(!e.$from)return null;for(var n=e.$from.depth;n>0;n-=1){var i=e.$from.node(n);if(i&&i.type&&"figure"===i.type.name)return{node:i,pos:e.$from.before(n)}}return null}(t.state);return!!n&&e.setTextSelection(n.pos+n.node.nodeSize-1)}}}}});function P(){return[M]}},"8gFn":function(t,e,n){"use strict";n.r(e),n.d(e,"closeHistory",(function(){return y})),n.d(e,"history",(function(){return x})),n.d(e,"isHistoryTransaction",(function(){return M})),n.d(e,"redo",(function(){return C})),n.d(e,"redoDepth",(function(){return A})),n.d(e,"redoNoScroll",(function(){return E})),n.d(e,"undo",(function(){return k})),n.d(e,"undoDepth",(function(){return T})),n.d(e,"undoNoScroll",(function(){return S}));var i=function(){};i.prototype.append=function(t){return t.length?(t=i.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},i.prototype.prepend=function(t){return t.length?i.from(t).append(this):this},i.prototype.appendInner=function(t){return new o(this,t)},i.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?i.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},i.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},i.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},i.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var i=[];return this.forEach((function(e,n){return i.push(t(e,n))}),e,n),i},i.from=function(t){return t instanceof i?t:t&&t.length?new r(t):i.empty};var r=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,i){for(var r=e;r=n;r--)if(!1===t(this.values[r],i+r))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(i);i.empty=new r([]);var o=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return tr&&!1===this.right.forEachInner(t,Math.max(e-r,0),Math.min(this.length,n)-r,i+r))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,i){var r=this.left.length;return!(e>r&&!1===this.right.forEachInvertedInner(t,e-r,Math.max(n,r)-r,i+r))&&(!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(i),s=i,a=n("uSMm"),l=n("b/sn");class c{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,i,r=this.items.length;for(;;r--){if(this.items.get(r-1).selection){--r;break}}e&&(n=this.remapping(r,this.items.length),i=n.maps.length);let o,s,a=t.tr,l=[],d=[];return this.items.forEach((t,e)=>{if(!t.step)return n||(n=this.remapping(r,e+1),i=n.maps.length),i--,void d.push(t);if(n){d.push(new u(t.map));let e,r=t.step.map(n.slice(i));r&&a.maybeStep(r).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new u(e,void 0,void 0,l.length+d.length))),i--,e&&n.appendMap(e,i)}else a.maybeStep(t.step);return t.selection?(o=n?t.selection.map(n.slice(i)):t.selection,s=new c(this.items.slice(0,r).append(d.reverse().concat(l)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(t,e,n,i){let r=[],o=this.eventCount,s=this.items,a=!i&&s.length?s.get(s.length-1):null;for(let n=0;np&&(s=function(t,e){let n;return t.forEach((t,i)=>{if(t.selection&&0==e--)return n=i,!1}),t.slice(n)}(s,l),o-=l),new c(s.append(r),o)}remapping(t,e){let n=new a.Mapping;return this.items.forEach((e,i)=>{let r=null!=e.mirrorOffset&&i-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,r)},t,e),n}addMaps(t){return 0==this.eventCount?this:new c(this.items.append(t.map(t=>new u(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-e),r=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(t=>{t.selection&&s--},i);let a=e;this.items.forEach(e=>{let i=r.getMirror(--a);if(null==i)return;o=Math.min(o,i);let l=r.maps[i];if(e.step){let o=t.steps[i].invert(t.docs[i]),c=e.selection&&e.selection.map(r.slice(a+1,i));c&&s++,n.push(new u(l,o,c))}else n.push(new u(l))},i);let l=[];for(let t=e;t500&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,i=[],r=0;return this.items.forEach((o,s)=>{if(s>=t)i.push(o),o.selection&&r++;else if(o.step){let t=o.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=o.selection&&o.selection.map(e.slice(n));a&&r++;let l,c=new u(s.invert(),t,a),d=i.length-1;(l=i.length&&i[d].merge(c))?i[d]=l:i.push(c)}}else o.map&&n--},this.items.length,0),new c(s.from(i.reverse()),r)}}c.empty=new c(s.empty,0);class u{constructor(t,e,n,i){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new u(e.getMap().invert(),e,this.selection)}}}class d{constructor(t,e,n,i,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=i,this.prevComposition=r}}const p=20;function h(t){let e=[];for(let n=t.length-1;n>=0&&0==e.length;n--)t[n].forEach((t,n,i,r)=>e.push(i,r));return e}function f(t,e){if(!t)return null;let n=[];for(let i=0;inew d(c.empty,c.empty,null,0,-1),apply:(e,n,i)=>function(t,e,n,i){let r,o=n.getMeta(b);if(o)return o.historyState;n.getMeta(_)&&(t=new d(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(b))return s.getMeta(b).redo?new d(t.done.addTransform(n,void 0,i,v(e)),t.undone,h(n.mapping.maps),t.prevTime,t.prevComposition):new d(t.done,t.undone.addTransform(n,void 0,i,v(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(r=n.getMeta("rebased"))?new d(t.done.rebased(n,r),t.undone.rebased(n,r),f(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new d(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),f(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let r=n.getMeta("composition"),o=0==t.prevTime||!s&&t.prevComposition!=r&&(t.prevTime<(n.time||0)-i.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((t,i)=>{for(let r=0;r=e[r]&&(n=!0)}),n}(n,t.prevRanges)),a=s?f(t.prevRanges,n.mapping):h(n.mapping.maps);return new d(t.done.addTransform(n,o?e.selection.getBookmark():void 0,i,v(e)),c.empty,a,n.time,null==r?t.prevComposition:r)}}(n,i,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,i="historyUndo"==n?k:"historyRedo"==n?C:null;return!(!i||!t.editable)&&(e.preventDefault(),i(t.state,t.dispatch))}}}})}function w(t,e){return(n,i)=>{let r=b.getState(n);if(!r||0==(t?r.undone:r.done).eventCount)return!1;if(i){let o=function(t,e,n){let i=v(e),r=b.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,i);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),r,i),l=new d(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(b,{redo:n,historyState:l})}(r,n,t);o&&i(e?o.scrollIntoView():o)}return!0}}const k=w(!1,!0),C=w(!0,!0),S=w(!1,!1),E=w(!0,!1);function T(t){let e=b.getState(t);return e?e.done.eventCount:0}function A(t){let e=b.getState(t);return e?e.undone.eventCount:0}function M(t){return null!=t.getMeta(b)}},"8gHz":function(t,e,n){var i=n("5K7Z"),r=n("eaoh"),o=n("UWiX")("species");t.exports=function(t,e){var n,s=i(t).constructor;return void 0===s||null==(n=i(s)[o])?e:r(n)}},"8iia":function(t,e,n){var i=n("QMMT"),r=n("RRc/");t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");return r(this)}}},"8oF0":function(t,e,n){"use strict";var i={props:["game","shareable_url"],data:function(){return{networks:[{key:"facebook",icon:"fab fa-facebook-f"},{key:"twitter",icon:"fab fa-twitter"},{key:"reddit",icon:"fab fa-reddit"},{key:"pinterest",icon:"fab fa-pinterest"},{key:"telegram",icon:"fab fa-telegram"},{key:"line",icon:"fab fa-line"},{key:"messenger",icon:"fab fa-facebook-messenger"},{key:"whatsapp",icon:"fab fa-whatsapp"}]}}},r=n("KHd+"),o=Object(r.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"social-share-desktop"},t._l(t.networks,(function(e){return n("ShareNetwork",{key:e.key,staticClass:"share-network-btn",attrs:{network:e.key,url:t.shareable_url,title:t.game.title,description:t.game.description,hashtags:"mydramalist"}},[n("i",{class:e.icon})])})),1)}),[],!1,null,null,null);e.a=o.exports},"93I4":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"9Jkg":function(t,e,n){t.exports=n("oh+g")},"9hz7":function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.selector=e,this.elements=[],this.version="1.3.0",this.vp=this.getViewportSize(),this.body=document.querySelector("body"),this.options={wrap:n.wrap||!1,wrapWith:n.wrapWith||"",marginTop:n.marginTop||0,marginBottom:n.marginBottom||0,stickyFor:n.stickyFor||0,stickyClass:n.stickyClass||null,stickyContainer:n.stickyContainer||"body"},this.updateScrollTopPosition=this.updateScrollTopPosition.bind(this),this.updateScrollTopPosition(),window.addEventListener("load",this.updateScrollTopPosition),window.addEventListener("scroll",this.updateScrollTopPosition),this.run()}var e,n,o;return e=t,(n=[{key:"run",value:function(){var t=this,e=setInterval((function(){if("complete"===document.readyState){clearInterval(e);var n=document.querySelectorAll(t.selector);t.forEach(n,(function(e){return t.renderElement(e)}))}}),10)}},{key:"renderElement",value:function(t){var e=this;t.sticky={},t.sticky.active=!1,t.sticky.marginTop=parseInt(t.getAttribute("data-margin-top"))||this.options.marginTop,t.sticky.marginBottom=parseInt(t.getAttribute("data-margin-bottom"))||this.options.marginBottom,t.sticky.stickyFor=parseInt(t.getAttribute("data-sticky-for"))||this.options.stickyFor,t.sticky.stickyClass=t.getAttribute("data-sticky-class")||this.options.stickyClass,t.sticky.wrap=!!t.hasAttribute("data-sticky-wrap")||this.options.wrap,t.sticky.stickyContainer=this.options.stickyContainer,t.sticky.container=this.getStickyContainer(t),t.sticky.container.rect=this.getRectangle(t.sticky.container),t.sticky.rect=this.getRectangle(t),"img"===t.tagName.toLowerCase()&&(t.onload=function(){return t.sticky.rect=e.getRectangle(t)}),t.sticky.wrap&&this.wrapElement(t),this.activate(t)}},{key:"wrapElement",value:function(t){t.insertAdjacentHTML("beforebegin",t.getAttribute("data-sticky-wrapWith")||this.options.wrapWith),t.previousSibling.appendChild(t)}},{key:"activate",value:function(t){t.sticky.rect.top+t.sticky.rect.height=t.sticky.container.rect.top+t.sticky.container.rect.height||t.sticky.stickyFor>=this.vp.width&&t.sticky.active)&&(t.sticky.active=!1),this.setPosition(t)}},{key:"initScrollEvents",value:function(t){var e=this;t.sticky.scrollListener=function(){return e.onScrollEvents(t)},window.addEventListener("scroll",t.sticky.scrollListener)}},{key:"destroyScrollEvents",value:function(t){window.removeEventListener("scroll",t.sticky.scrollListener)}},{key:"onScrollEvents",value:function(t){t.sticky&&t.sticky.active&&this.setPosition(t)}},{key:"setPosition",value:function(t){this.css(t,{position:"",width:"",top:"",left:""}),this.vp.heightt.sticky.rect.top-t.sticky.marginTop?(this.css(t,{position:"fixed",width:t.sticky.rect.width+"px",left:t.sticky.rect.left+"px"}),this.scrollTop+t.sticky.rect.height+t.sticky.marginTop>t.sticky.container.rect.top+t.sticky.container.offsetHeight-t.sticky.marginBottom?(t.sticky.stickyClass&&t.classList.remove(t.sticky.stickyClass),this.css(t,{top:t.sticky.container.rect.top+t.sticky.container.offsetHeight-(this.scrollTop+t.sticky.rect.height+t.sticky.marginBottom)+"px"})):(t.sticky.stickyClass&&t.classList.add(t.sticky.stickyClass),this.css(t,{top:t.sticky.marginTop+"px"}))):(t.sticky.stickyClass&&t.classList.remove(t.sticky.stickyClass),this.css(t,{position:"",width:"",top:"",left:""}),t.sticky.wrap&&this.css(t.parentNode,{display:"",width:"",height:""})))}},{key:"update",value:function(){var t=this;this.forEach(this.elements,(function(e){e.sticky.rect=t.getRectangle(e),e.sticky.container.rect=t.getRectangle(e.sticky.container),t.activate(e),t.setPosition(e)}))}},{key:"destroy",value:function(){var t=this;window.removeEventListener("load",this.updateScrollTopPosition),window.removeEventListener("scroll",this.updateScrollTopPosition),this.forEach(this.elements,(function(e){t.destroyResizeEvents(e),t.destroyScrollEvents(e),delete e.sticky}))}},{key:"getStickyContainer",value:function(t){for(var e=t.parentNode;!e.hasAttribute("data-sticky-container")&&!e.parentNode.querySelector(t.sticky.stickyContainer)&&e!==this.body;)e=e.parentNode;return e}},{key:"getRectangle",value:function(t){this.css(t,{position:"",width:"",top:"",left:""});var e=Math.max(t.offsetWidth,t.clientWidth,t.scrollWidth),n=Math.max(t.offsetHeight,t.clientHeight,t.scrollHeight),i=0,r=0;do{i+=t.offsetTop||0,r+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:i,left:r,width:e,height:n}}},{key:"getViewportSize",value:function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}},{key:"updateScrollTopPosition",value:function(){this.scrollTop=(window.pageYOffset||document.scrollTop)-(document.clientTop||0)||0}},{key:"forEach",value:function(t,e){for(var n=0,i=t.length;nr;)J(t,n=i[r++],e[n]);return t},X=function(t){var e=L.call(this,t=w(t,!0));return!(this===z&&r(B,t)&&!r(V,t))&&(!(e||!r(this,t)||!r(B,t)||r(this,F)&&this[F][t])||e)},Q=function(t,e){if(t=x(t),e=w(e,!0),t!==z||!r(B,e)||r(V,e)){var n=P(t,e);return!n||!r(B,e)||r(t,F)&&t[F][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=D(x(t)),i=[],o=0;n.length>o;)r(B,e=n[o++])||e==F||e==l||i.push(e);return i},tt=function(t){for(var e,n=t===z,i=D(n?V:x(t)),o=[],s=0;i.length>s;)!r(B,e=i[s++])||n&&!r(z,e)||o.push(B[e]);return o};H||(a((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(V,n),r(this,F)&&r(this[F],t)&&(this[F][t]=!1),q(this,t,k(1,n))};return o&&G&&q(z,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",(function(){return this._k})),E.f=Q,A.f=J,n("ar/p").f=S.f=Z,n("NV0k").f=X,T.f=tt,o&&!n("uOPS")&&a(z,"propertyIsEnumerable",X,!0),f.f=function(t){return U(h(t))}),s(s.G+s.W+s.F*!H,{Symbol:I});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var it=M(h.store),rt=0;it.length>rt;)m(it[rt++]);s(s.S+s.F*!H,"Symbol",{for:function(t){return r(j,t+="")?j[t]:j[t]=I(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in j)if(j[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!H,"Object",{create:function(t,e){return void 0===e?C(t):Y(C(t),e)},defineProperty:J,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var ot=c((function(){T.f(1)}));s(s.S+s.F*ot,"Object",{getOwnPropertySymbols:function(t){return T.f(_(t))}}),$&&s(s.S+s.F*(!H||c((function(){var t=I();return"[null]"!=N([t])||"{}"!=N({a:t})||"{}"!=N(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=e=i[1],(b(e)||void 0!==t)&&!K(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),i[1]=e,N.apply($,i)}}),I.prototype[R]||n("NegM")(I.prototype,R,I.prototype.valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},Al62:function(t,e,n){"use strict";n.d(e,"d",(function(){return x})),n.d(e,"b",(function(){return w})),n.d(e,"c",(function(){return C}));var i=n("sk9p"),r=n.n(i),o=n("1+SV"),s=n.n(o),a=n("14Xm"),l=n.n(a),c=n("D3Ub"),u=n.n(c),d=n("GQeE"),p=n.n(d),h=n("EJiy"),f=n.n(h),m=n("cg3e");function g(t){var e="0123456789abcdef",n=parseInt(t);return 0==n||isNaN(t)?"00":(n=Math.round(Math.min(Math.max(0,n),255)),e.charAt((n-n%16)/16)+e.charAt(n%16))}function v(t){return"#"==t.charAt(0)?t.substring(1,7):t}function y(t){var e=[];return e[0]=parseInt(v(t).substring(0,2),16),e[1]=parseInt(v(t).substring(2,4),16),e[2]=parseInt(v(t).substring(4,6),16),e}var b,_,x="6LfZi0QjAAAAABIvJyW6h-NPvoEVzpWLqbeqpE9z",w="97f94390-3c42-4702-8511-f927809d402f",k={useRecaptchaNet:!0},C=(b=u()(l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(m.load)(x,k);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),_=u()(l.a.mark((function t(e){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(m.load)(x,k);case 2:return n=t.sent,t.next=5,n.execute(e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)}),S={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){var e,n,i,r,o,s,a,l="",c=0;for(t=S._utf8_encode(t);c>2,o=(3&e)<<4|(n=t.charCodeAt(c++))>>4,s=(15&n)<<2|(i=t.charCodeAt(c++))>>6,a=63&i,isNaN(n)?s=a=64:isNaN(i)&&(a=64),l=l+this._keyStr.charAt(r)+this._keyStr.charAt(o)+this._keyStr.charAt(s)+this._keyStr.charAt(a);return l},decode:function(t){var e,n,i,r,o,s,a="",l=0;for(t=t.replace(/[^A-Za-z0-9+/=]/g,"");l>4,n=(15&r)<<4|(o=this._keyStr.indexOf(t.charAt(l++)))>>2,i=(3&o)<<6|(s=this._keyStr.indexOf(t.charAt(l++))),a+=String.fromCharCode(e),64!=o&&(a+=String.fromCharCode(n)),64!=s&&(a+=String.fromCharCode(i));return a=S._utf8_decode(a)},_utf8_encode:function(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e},_utf8_decode:function(t){for(var e,n="",i=0,r=0;i191&&e<224?(r=t.charCodeAt(i+1),n+=String.fromCharCode((31&e)<<6|63&r),i+=2):(r=t.charCodeAt(i+1),c3=t.charCodeAt(i+2),n+=String.fromCharCode((15&e)<<12|(63&r)<<6|63&c3),i+=3);return n}};e.a={Base64:S,slugify:function(t){return t.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},numberWithCommas:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},deepClone:function t(e){if(Array.isArray(e))return e.map(t);if(e&&"object"===(void 0===e?"undefined":f()(e))){for(var n={},i=p()(e),r=0,o=i.length;r\r\n]?)(\r\n|\n\r|\r|\n)/g,"").replace(//gm,"\n")},nl2br:function(t){return(t+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")},pad:function(t,e){var n="000000000"+t;return n.substr(n.length-e)},varsReplace:function(t,e,n){var i=t;return $.each(e,(function(t,e){i=i.replace(new RegExp("\\{"+t+"\\}","g"),e)})),n&&(i=$(i)),i},isMobileDevice:function(){return window.isMobile},convertTime12to24:function(t){if(!t)return t;var e=t.split(" "),n=r()(e,2),i=n[0],o=n[1],s=i.split(":"),a=r()(s,2),l=a[0],c=a[1];return"12"===l&&(l="00"),"PM"===o&&(l=parseInt(l,10)+12),l+":"+c},convertTime24to12:function(t){if(!t)return t;var e=t.split(":"),n=r()(e,2),i=n[0],o=n[1],s=(i=parseInt(i))>=12?"PM":"AM";return(i=this.pad((i+11)%12+1,2))+":"+o+" "+s},popupCenter:function(t,e,n,i){var r=void 0!==window.screenLeft?window.screenLeft:screen.left,o=void 0!==window.screenTop?window.screenTop:screen.top,s=(window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width)/2-n/2+r,a=(window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/3-i/3+o,l=window.open(t,e,"scrollbars=yes, width="+n+", height="+i+", top="+a+", left="+s);window.focus&&l.focus()},isURL:function(t){return new RegExp(/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/).test(t)}}},"B+OT":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},B9Yq:function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},C2SN:function(t,e,n){var i=n("93I4"),r=n("kAMH"),o=n("UWiX")("species");t.exports=function(t){var e;return r(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!r(e.prototype)||(e=void 0),i(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},D3Ub:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("4d7F"),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default((function(t,n){return function i(r,s){try{var a=e[r](s),l=a.value}catch(t){return void n(t)}if(!a.done)return o.default.resolve(l).then((function(t){i("next",t)}),(function(t){i("throw",t)}));t(l)}("next")}))}}},D8kY:function(t,e,n){var i=n("Ojgd"),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},DhVD:function(t,e,n){var i=n("WX/U");t.exports=function(t,e,n){return void 0===n?i(t,e,!1):i(t,n,!1!==e)}},DqYT:function(t,e,n){"use strict";n("KW5J")},EJiy:function(t,e,n){"use strict";e.__esModule=!0;var i=s(n("F+2o")),r=s(n("+JPL")),o="function"==typeof r.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof r.default&&t.constructor===r.default&&t!==r.default.prototype?"symbol":typeof t};function s(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof r.default&&"symbol"===o(i.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof r.default&&t.constructor===r.default&&t!==r.default.prototype?"symbol":void 0===t?"undefined":o(t)}},EP9H:function(t,e,n){var i=n("5T2Y").parseFloat,r=n("oc46").trim;t.exports=1/i(n("5pKv")+"-0")!=-1/0?function(t){var e=r(String(t),3),n=i(e);return 0===n&&"-"==e.charAt(0)?-0:n}:i},EPAk:function(t,e,n){"use strict";var i={name:"dstar-rating",props:["rating","size","showRating","disabled","showRated"],data:function(){return{width:0,fill:0,fillRating:0,finalRating:0,maxWidth:0,rated:!1,isActive:!1,fontSize:30,hints:[this.$t("I hate it"),this.$t("I don't like it"),this.$t("It's okay"),this.$t("I like it"),this.$t("I love it")]}},mounted:function(){switch(this.fillRating=this.rating,this.showRated&&this.rating>0&&(this.rated=!0),this.size){case"small":this.fontSize=16;break;case"medium":this.fontSize=24;break;default:case"large":this.fontSize=30}},watch:{rating:function(t){this.fillRating=t,this.showRated&&t>0&&(this.rated=!0)}},computed:{classSize:function(){return this.size?"dstar-"+this.size:""},getFormattedRating:function(){return this.fillRating>=10?10:void 0===this.fillRating?0:this.fillRating.toFixed(1)},getRatingScore:function(){void 0===this.fillRating&&(this.fillRating=0);var t=Math.round(this.fillRating/2)-1;return t>4?t=4:t<=0&&(t=1),"Rating: "+(this.fillRating>=10?10:void 0===this.fillRating?0:this.fillRating.toFixed(1))+""},ratingWidth:function(){return 10*this.fillRating},rating_classes:function(){return{"font-size":this.fontSize+"px"}},prev_classes:function(){return{display:this.isActive?"block":"none",left:this.fillRating*(.07*this.maxWidth)+"px"}}},methods:{resetRating:function(t){var e=this;this.disabled||(this.$emit("m-leave"),setTimeout((function(){e.isActive=!1,e.fillRating=e.rating}),300))},mouseEnter:function(){this.disabled||(this.$emit("m-enter"),this.maxWidth=this.$refs.rating.clientWidth)},updateRating:function(t){this.disabled||(this.rated=!0,this.$emit("update:rating",this.fillRating))},mouseMove:function(t){if(!this.disabled){this.isActive=!0;var e=t.offsetX,n=Math.min(Math.max(Math.ceil(e/this.maxWidth*20)/2,1),10);this.fillRating===n&&n<=10||(this.fillRating=n)}}}},r=(n("Uuwv"),n("KHd+")),o=Object(r.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["dstar-wrapper",t.classSize]},[n("div",{ref:"rating",class:["dstar-rating",t.classSize,{rated:t.rated,disabled:t.disabled}],on:{mousemove:t.mouseMove,mouseleave:t.resetRating,mouseenter:t.mouseEnter,click:t.updateRating}},[n("div",{staticClass:"dstar-fill",style:{width:t.ratingWidth+"%"}})]),t._v(" "),t.showRating?n("div",{staticClass:"dstar-right"},[n("strong",[t._v(t._s(t.getFormattedRating))]),t._v("/10\n ")]):t._e(),t._v(" "),n("div",{staticClass:"dstar-prev",style:t.prev_classes},[n("span",{domProps:{innerHTML:t._s(t.getRatingScore)}})])])}),[],!1,null,null,null);e.a=o.exports},EXMj:function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},EvI9:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t){return{methods:{focus:function(){this.$refs[t].focus()}}}}},"F+2o":function(t,e,n){t.exports={default:n("2Nb0"),__esModule:!0}},FMiQ:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.booleanProp=void 0;const i=n("zyfj");e.booleanProp=t=>(0,i.propOptionsGenerator)(Boolean,t)},FOnU:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=127)}({127:function(t,e,n){"use strict";n.r(e);var i=n(16),r=n(38),o=n.n(r),s=n(3),a=n(2),l={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};function c(t){var e=t.move,n=t.size,i=t.bar,r={},o="translate"+i.axis+"("+e+"%)";return r[i.size]=n,r.transform=o,r.msTransform=o,r.webkitTransform=o,r}var u={name:"Bar",props:{vertical:Boolean,size:String,move:Number},computed:{bar:function(){return l[this.vertical?"vertical":"horizontal"]},wrap:function(){return this.$parent.wrap}},render:function(t){var e=this.size,n=this.move,i=this.bar;return t("div",{class:["el-scrollbar__bar","is-"+i.key],on:{mousedown:this.clickTrackHandler}},[t("div",{ref:"thumb",class:"el-scrollbar__thumb",on:{mousedown:this.clickThumbHandler},style:c({size:e,move:n,bar:i})})])},methods:{clickThumbHandler:function(t){t.ctrlKey||2===t.button||(this.startDrag(t),this[this.bar.axis]=t.currentTarget[this.bar.offset]-(t[this.bar.client]-t.currentTarget.getBoundingClientRect()[this.bar.direction]))},clickTrackHandler:function(t){var e=100*(Math.abs(t.target.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-this.$refs.thumb[this.bar.offset]/2)/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=e*this.wrap[this.bar.scrollSize]/100},startDrag:function(t){t.stopImmediatePropagation(),this.cursorDown=!0,Object(a.on)(document,"mousemove",this.mouseMoveDocumentHandler),Object(a.on)(document,"mouseup",this.mouseUpDocumentHandler),document.onselectstart=function(){return!1}},mouseMoveDocumentHandler:function(t){if(!1!==this.cursorDown){var e=this[this.bar.axis];if(e){var n=100*(-1*(this.$el.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-(this.$refs.thumb[this.bar.offset]-e))/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=n*this.wrap[this.bar.scrollSize]/100}}},mouseUpDocumentHandler:function(t){this.cursorDown=!1,this[this.bar.axis]=0,Object(a.off)(document,"mousemove",this.mouseMoveDocumentHandler),document.onselectstart=null}},destroyed:function(){Object(a.off)(document,"mouseup",this.mouseUpDocumentHandler)}},d={name:"ElScrollbar",components:{Bar:u},props:{native:Boolean,wrapStyle:{},wrapClass:{},viewClass:{},viewStyle:{},noresize:Boolean,tag:{type:String,default:"div"}},data:function(){return{sizeWidth:"0",sizeHeight:"0",moveX:0,moveY:0}},computed:{wrap:function(){return this.$refs.wrap}},render:function(t){var e=o()(),n=this.wrapStyle;if(e){var i="-"+e+"px",r="margin-bottom: "+i+"; margin-right: "+i+";";Array.isArray(this.wrapStyle)?(n=Object(s.toObject)(this.wrapStyle)).marginRight=n.marginBottom=i:"string"==typeof this.wrapStyle?n+=r:n=r}var a=t(this.tag,{class:["el-scrollbar__view",this.viewClass],style:this.viewStyle,ref:"resize"},this.$slots.default),l=t("div",{ref:"wrap",style:n,on:{scroll:this.handleScroll},class:[this.wrapClass,"el-scrollbar__wrap",e?"":"el-scrollbar__wrap--hidden-default"]},[[a]]),c=void 0;return c=this.native?[t("div",{ref:"wrap",class:[this.wrapClass,"el-scrollbar__wrap"],style:n},[[a]])]:[l,t(u,{attrs:{move:this.moveX,size:this.sizeWidth}}),t(u,{attrs:{vertical:!0,move:this.moveY,size:this.sizeHeight}})],t("div",{class:"el-scrollbar"},c)},methods:{handleScroll:function(){var t=this.wrap;this.moveY=100*t.scrollTop/t.clientHeight,this.moveX=100*t.scrollLeft/t.clientWidth},update:function(){var t,e,n=this.wrap;n&&(t=100*n.clientHeight/n.scrollHeight,e=100*n.clientWidth/n.scrollWidth,this.sizeHeight=t<100?t+"%":"",this.sizeWidth=e<100?e+"%":"")}},mounted:function(){this.native||(this.$nextTick(this.update),!this.noresize&&Object(i.addResizeListener)(this.$refs.resize,this.update))},beforeDestroy:function(){this.native||!this.noresize&&Object(i.removeResizeListener)(this.$refs.resize,this.update)},install:function(t){t.component(d.name,d)}};e.default=d},16:function(t,e){t.exports=n("QBBo")},2:function(t,e){t.exports=n("WST1")},3:function(t,e){t.exports=n("gSIQ")},38:function(t,e){t.exports=n("5i1c")}})},FlQf:function(t,e,n){"use strict";var i=n("ccE7")(!0);n("MPFp")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})}))},FpHa:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},FyfS:function(t,e,n){t.exports={default:n("Rp86"),__esModule:!0}},G1qu:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("uSMm");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},G8Mo:function(t,e,n){var i=n("93I4");t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},GMsW:function(t,e){},"GP+6":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=87)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},4:function(t,e){t.exports=n("0BDH")},87:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"el-dropdown-menu__item",class:{"is-disabled":t.disabled,"el-dropdown-menu__item--divided":t.divided},attrs:{"aria-disabled":t.disabled,tabindex:t.disabled?null:-1},on:{click:t.handleClick}},[t.icon?n("i",{class:t.icon}):t._e(),t._t("default")],2)};i._withStripped=!0;var r=n(4),o={name:"ElDropdownItem",mixins:[n.n(r).a],props:{command:{},disabled:Boolean,divided:Boolean,icon:String},methods:{handleClick:function(t){this.dispatch("ElDropdown","menu-item-click",[this.command,this])}}},s=n(0),a=Object(s.a)(o,i,[],!1,null,null,null);a.options.__file="packages/dropdown/src/dropdown-item.vue";var l=a.exports;l.install=function(t){t.component(l.name,l)};e.default=l}})},GQeE:function(t,e,n){t.exports={default:n("iq4v"),__esModule:!0}},GdW1:function(t,e,n){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function r(t){var e=t.charAt(t.length-1),n=parseInt(t,10),i=new Date;switch(e){case"Y":i.setFullYear(i.getFullYear()+n);break;case"M":i.setMonth(i.getMonth()+n);break;case"D":i.setDate(i.getDate()+n);break;case"h":i.setHours(i.getHours()+n);break;case"m":i.setMinutes(i.getMinutes()+n);break;case"s":i.setSeconds(i.getSeconds()+n);break;default:i=new Date(t)}return i}function o(t,e){if(void 0===e&&(e=decodeURIComponent),"string"!=typeof t||!t)return null;var n=new RegExp("(?:^|; )"+(t.replace(/[.*+?^$|[\](){}\\-]/g,"\\$&")+"(?:=([^;]*))?(?:;|$)")).exec(document.cookie);return null===n?null:"function"==typeof e?e(n[1]):n[1]}function s(t,e,n,o){void 0===n&&(n=encodeURIComponent),"object"==typeof n&&null!==n&&(o=n,n=encodeURIComponent);var s=function(t){var e="";for(var n in t)if(i(t,n))if(/^expires$/i.test(n)){var o=t[n];"object"!=typeof o&&(o=r(o+="number"==typeof o?"D":"")),e+=";"+n+"="+o.toUTCString()}else/^secure$/.test(n)?t[n]&&(e+=";"+n):e+=";"+n+"="+t[n];return i(t,"path")||(e+=";path=/"),e}(o||{}),a=t+"="+("function"==typeof n?n(e):e)+s;document.cookie=a}n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s}))},GmIP:function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return h})),n.d(e,"f",(function(){return m}));var i=n("GtT5"),r=n("usTV"),o=n("wdIX");function s(t){return"left"===t||"right"===t||"center"===t?t:null}function a(){return{default:null,parseHTML:t=>function(t){const e=(t.style.textAlign||"").trim().toLowerCase(),n=(t.getAttribute("align")||"").trim().toLowerCase();return s(e||n)}(t),renderHTML:t=>t.align?{style:"text-align: "+t.align}:{}}}var l=i.d.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;const i=t.getAttribute("colwidth"),r=i?i.split(",").map(t=>parseInt(t,10)):null;if(!r){const i=null==(e=t.closest("table"))?void 0:e.querySelectorAll("colgroup > col"),r=Array.from((null==(n=t.parentElement)?void 0:n.children)||[]).indexOf(t);if(r&&r>-1&&i&&i[r]){const t=i[r].getAttribute("width");return t?[parseInt(t,10)]:null}}return r}},align:a()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:t}){return["td",Object(i.A)(this.options.HTMLAttributes,t),0]}}),c=i.d.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(t=>parseInt(t,10)):null}},align:a()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:t}){return["th",Object(i.A)(this.options.HTMLAttributes,t),0]}}),u=i.d.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:t}){return["tr",Object(i.A)(this.options.HTMLAttributes,t),0]}});function d(t,e){return e?["width",Math.max(e,t)+"px"]:["min-width",t+"px"]}function p(t,e,n,i,r,o){var s;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(null!==u)for(let t=0,n=0;t{const i=t.nodes[n];i.spec.tableRole&&(e[i.spec.tableRole]=i)}),t.cached.tableNodeTypes=e,e}(t),s=[],a=[];for(let t=0;t{const{selection:e}=t.state;if(!(e instanceof o.CellSelection))return!1;let n=0;const r=Object(i.l)(e.ranges[0].$from,t=>"table"===t.type.name);null==r||r.node.descendants(t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(n+=1)});return n===e.ranges.length&&(t.commands.deleteTable(),!0)};var v=function(t,e,n={}){var i;const r=null!=(i=n.cellLineSeparator)?i:"";if(!t||!t.content||0===t.content.length)return"";const o=[];t.content.forEach(t=>{const n=[];t.content&&t.content.forEach(t=>{let i="";if(t.content&&Array.isArray(t.content)&&t.content.length>1){i=t.content.map(t=>e.renderChildren(t)).join(r)}else i=t.content?e.renderChildren(t.content):"";const o=(i||"").replace(/\s+/g," ").trim();const a="tableHeader"===t.type,l=s(null==(c=t.attrs)?void 0:c.align);var c;n.push({text:o,isHeader:a,align:l})}),o.push(n)});const a=o.reduce((t,e)=>Math.max(t,e.length),0);if(0===a)return"";const l=new Array(a).fill(0);o.forEach(t=>{var e;for(let n=0;nl[n]&&(l[n]=i),l[n]<3&&(l[n]=3)}});const c=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),u=o[0],d=u.some(t=>t.isHeader),p=new Array(a).fill(null);o.forEach(t=>{var e;for(let n=0;nd&&u[e]&&u[e].text||"");return h+=`| ${f.map((t,e)=>c(t,l[e])).join(" | ")} |\n`,h+=`| ${l.map((t,e)=>{const n=Math.max(3,t),i=p[e];return"left"===i?":"+"-".repeat(n):"right"===i?"-".repeat(n)+":":"center"===i?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} |\n`,(d?o.slice(1):o).forEach(t=>{h+=`| ${new Array(a).fill(0).map((e,n)=>c(t[n]&&t[n].text||"",l[n])).join(" | ")} |\n`}),h},y=i.d.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:h,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=function(t,e,n,i){let r=0,o=!0;const s=[],a=t.firstChild;if(!a)return{};for(let t=0,l=0;t{const n=[],i=Array.isArray(t.align)?t.align:[];if(t.header){const r=[];t.header.forEach((t,n)=>{var o;const a=s(null!=(o=i[n])?o:t.align),l=a?{align:a}:{};r.push(e.createNode("tableHeader",l,[{type:"paragraph",content:e.parseInline(t.tokens)}]))}),n.push(e.createNode("tableRow",{},r))}return t.rows&&t.rows.forEach(t=>{const r=[];t.forEach((t,n)=>{var o;const a=s(null!=(o=i[n])?o:t.align),l=a?{align:a}:{};r.push(e.createNode("tableCell",l,[{type:"paragraph",content:e.parseInline(t.tokens)}]))}),n.push(e.createNode("tableRow",{},r))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>v(t,e),addCommands:()=>({insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:i,dispatch:o,editor:s})=>{const a=m(s.schema,t,e,n);if(o){const t=i.selection.from+1;i.replaceSelectionWith(a).scrollIntoView().setSelection(r.TextSelection.near(i.doc.resolve(t)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Object(o.addColumnBefore)(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Object(o.addColumnAfter)(t,e),deleteColumn:()=>({state:t,dispatch:e})=>Object(o.deleteColumn)(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Object(o.addRowBefore)(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Object(o.addRowAfter)(t,e),deleteRow:()=>({state:t,dispatch:e})=>Object(o.deleteRow)(t,e),deleteTable:()=>({state:t,dispatch:e})=>Object(o.deleteTable)(t,e),mergeCells:()=>({state:t,dispatch:e})=>Object(o.mergeCells)(t,e),splitCell:()=>({state:t,dispatch:e})=>Object(o.splitCell)(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Object(o.toggleHeader)("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Object(o.toggleHeader)("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Object(o.toggleHeaderCell)(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>!!Object(o.mergeCells)(t,e)||Object(o.splitCell)(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:i})=>Object(o.setCellAttr)(t,e)(n,i),goToNextCell:()=>({state:t,dispatch:e})=>Object(o.goToNextCell)(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Object(o.goToNextCell)(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Object(o.fixTables)(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const n=o.CellSelection.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:g,"Mod-Backspace":g,Delete:g,"Mod-Delete":g}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Object(o.columnResizing)({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Object(o.tableEditing)({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:Object(i.f)(Object(i.o)(t,"tableRole",e))}}});i.b.create({name:"tableKit",addExtensions(){const t=[];return!1!==this.options.table&&t.push(y.configure(this.options.table)),!1!==this.options.tableCell&&t.push(l.configure(this.options.tableCell)),!1!==this.options.tableHeader&&t.push(c.configure(this.options.tableHeader)),!1!==this.options.tableRow&&t.push(u.configure(this.options.tableRow)),t}})},GtT5:function(t,e,n){"use strict";n.d(e,"a",(function(){return Ze})),n.d(e,"b",(function(){return Ve})),n.d(e,"c",(function(){return Ne})),n.d(e,"d",(function(){return bn})),n.d(e,"e",(function(){return _n})),n.d(e,"f",(function(){return Pt})),n.d(e,"g",(function(){return on})),n.d(e,"h",(function(){return vn})),n.d(e,"i",(function(){return wt})),n.d(e,"j",(function(){return ln})),n.d(e,"k",(function(){return kt})),n.d(e,"l",(function(){return Ct})),n.d(e,"m",(function(){return Gt})),n.d(e,"n",(function(){return Ut})),n.d(e,"o",(function(){return Et})),n.d(e,"p",(function(){return Kt})),n.d(e,"q",(function(){return Jt})),n.d(e,"r",(function(){return w})),n.d(e,"s",(function(){return Nt})),n.d(e,"t",(function(){return Zt})),n.d(e,"u",(function(){return te})),n.d(e,"v",(function(){return rt})),n.d(e,"w",(function(){return ie})),n.d(e,"x",(function(){return re})),n.d(e,"y",(function(){return tn})),n.d(e,"z",(function(){return xn})),n.d(e,"A",(function(){return $t})),n.d(e,"B",(function(){return en})),n.d(e,"C",(function(){return wn})),n.d(e,"D",(function(){return hn})),n.d(e,"E",(function(){return fn})),n.d(e,"F",(function(){return gn})),n.d(e,"G",(function(){return nn})),n.d(e,"H",(function(){return rn}));var i=n("G1qu"),r=n("x9G1"),o=n("usTV"),s=n("58S2"),a=n("ZSoY"),l=n("c0pu"),c=n("wx3Q"),u=Object.defineProperty,d=(t,e)=>{for(var n in e)u(t,n,{get:e[n],enumerable:!0})};function p(t){const{state:e,transaction:n}=t;let{selection:i}=n,{doc:r}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=n.selection,r=n.doc,o=n.storedMarks,n}}}var h=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:i}=e,{tr:r}=n,o=this.buildProps(r);return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,(...t)=>{const n=e(...t)(o);return r.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(r),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:i,state:r}=this,{view:o}=i,s=[],a=!!t,l=t||r.tr,c={...Object.fromEntries(Object.entries(n).map(([t,n])=>[t,(...t)=>{const i=this.buildProps(l,e),r=n(...t)(i);return s.push(r),c}])),run:()=>(a||!e||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every(t=>!0===t))};return c}createCan(t){const{rawCommands:e,state:n}=this,i=t||n.tr,r=this.buildProps(i,!1);return{...Object.fromEntries(Object.entries(e).map(([t,e])=>[t,(...t)=>e(...t)({...r,dispatch:void 0})])),chain:()=>this.createChain(i,!1)}}buildProps(t,e=!0){const{rawCommands:n,editor:i,state:r}=this,{view:o}=i,s={tr:t,editor:i,view:o,state:p({state:r,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([t,e])=>[t,(...t)=>e(...t)(s)]))}};return s}},f={};d(f,{blur:()=>m,clearContent:()=>g,clearNodes:()=>v,command:()=>y,createParagraphNear:()=>b,cut:()=>_,deleteCurrentNode:()=>x,deleteNode:()=>k,deleteRange:()=>C,deleteSelection:()=>S,enter:()=>E,exitCode:()=>T,extendMarkRange:()=>$,first:()=>N,focus:()=>V,forEach:()=>z,insertContent:()=>H,insertContentAt:()=>U,joinBackward:()=>Y,joinDown:()=>J,joinForward:()=>X,joinItemBackward:()=>Q,joinItemForward:()=>Z,joinTextblockBackward:()=>tt,joinTextblockForward:()=>et,joinUp:()=>K,keyboardShortcut:()=>it,lift:()=>ot,liftEmptyBlock:()=>st,liftListItem:()=>at,newlineInCode:()=>lt,resetAttributes:()=>dt,scrollIntoView:()=>pt,selectAll:()=>ht,selectNodeBackward:()=>ft,selectNodeForward:()=>mt,selectParentNode:()=>gt,selectTextblockEnd:()=>vt,selectTextblockStart:()=>yt,setContent:()=>_t,setMark:()=>le,setMeta:()=>ce,setNode:()=>ue,setNodeSelection:()=>de,setTextDirection:()=>pe,setTextSelection:()=>he,sinkListItem:()=>fe,splitBlock:()=>ge,splitListItem:()=>ve,toggleList:()=>_e,toggleMark:()=>xe,toggleNode:()=>we,toggleWrap:()=>ke,undoInputRule:()=>Ce,unsetAllMarks:()=>Se,unsetMark:()=>Ee,unsetTextDirection:()=>Te,updateAttributes:()=>Ae,wrapIn:()=>Me,wrapInList:()=>Pe});var m=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),null==(n=null==window?void 0:window.getSelection())||n.removeAllRanges())}),!0),g=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),v=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return!n||(o.forEach(({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,(t,n)=>{if(t.type.isText)return;const{doc:r,mapping:o}=e,s=r.resolve(o.map(n)),a=r.resolve(o.map(n+t.nodeSize)),l=s.blockRange(a);if(!l)return;const c=Object(i.liftTarget)(l);if(t.type.isTextblock){const{defaultType:t}=s.parent.contentMatchAt(s.index());e.setNodeMarkup(l.start,t)}(c||0===c)&&e.lift(l,c)})}),!0)},y=t=>e=>t(e),b=()=>({state:t,dispatch:e})=>Object(r.createParagraphNear)(t,e),_=(t,e)=>({editor:n,tr:i})=>{const{state:r}=n,s=r.doc.slice(t.from,t.to);i.deleteRange(t.from,t.to);const a=i.mapping.map(e);return i.insert(a,s.content),i.setSelection(new o.TextSelection(i.doc.resolve(Math.max(a-1,0)))),!0},x=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,i=n.$anchor.node();if(i.content.size>0)return!1;const r=t.selection.$anchor;for(let n=r.depth;n>0;n-=1){if(r.node(n).type===i.type){if(e){const e=r.before(n),i=r.after(n);t.delete(e,i).scrollIntoView()}return!0}}return!1};function w(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var k=t=>({tr:e,state:n,dispatch:i})=>{const r=w(t,n.schema),o=e.selection.$anchor;for(let t=o.depth;t>0;t-=1){if(o.node(t).type===r){if(i){const n=o.before(t),i=o.after(t);e.delete(n,i).scrollIntoView()}return!0}}return!1},C=t=>({tr:e,dispatch:n})=>{const{from:i,to:r}=t;return n&&e.delete(i,r),!0},S=()=>({state:t,dispatch:e})=>Object(r.deleteSelection)(t,e),E=()=>({commands:t})=>t.keyboardShortcut("Enter"),T=()=>({state:t,dispatch:e})=>Object(r.exitCode)(t,e);function A(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function M(t,e,n={strict:!0}){const i=Object.keys(e);return!i.length||i.every(i=>n.strict?e[i]===t[i]:A(e[i])?e[i].test(t[i]):e[i]===t[i])}function P(t,e,n={}){return t.find(t=>t.type===e&&M(Object.fromEntries(Object.keys(n).map(e=>[e,t.attrs[e]])),n))}function O(t,e,n={}){return!!P(t,e,n)}function D(t,e,n){if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if(i.node&&i.node.marks.some(t=>t.type===e)||(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some(t=>t.type===e))return;if(!n){const t=i.node.marks.find(t=>t.type===e);t&&(n=t.attrs)}if(!P([...i.node.marks],e,n))return;let r=i.index,o=t.start()+i.offset,s=r+1,a=o+i.node.nodeSize;for(;r>0&&O([...t.parent.child(r-1).marks],e,n);)r-=1,o-=t.parent.child(r).nodeSize;for(;s({tr:n,state:i,dispatch:r})=>{const s=I(t,i.schema),{doc:a,selection:l}=n,{$from:c,from:u,to:d}=l;if(r){const t=D(c,s,e);if(t&&t.from<=u&&t.to>=d){const e=o.TextSelection.create(a,t.from,t.to);n.setSelection(e)}}return!0},N=t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t({editor:n,view:i,tr:r,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{(B()||j())&&i.dom.focus(),"undefined"==typeof navigator||!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||B()||j()||i.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(i.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())})};try{if(i.hasFocus()&&null===t||!1===t)return!0}catch{return!1}if(o&&null===t&&!F(n.state.selection))return s(),!0;const a=L(r.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},z=(t,e)=>n=>t.every((t,i)=>e(t,{...n,index:i})),H=(t,e)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),W=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const i=e[n];3===i.nodeType&&i.nodeValue&&/^(\n\s\s|\n)$/.test(i.nodeValue)?t.removeChild(i):1===i.nodeType&&W(i)}return t};function G(t){if("undefined"==typeof window)throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`${t}`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return W(n)}function q(t,e,n){if(t instanceof s.Node||t instanceof s.Fragment)return t;n={slice:!0,parseOptions:{},...n};const i="string"==typeof t;if("object"==typeof t&&null!==t)try{if(Array.isArray(t)&&t.length>0)return s.Fragment.fromArray(t.map(t=>e.nodeFromJSON(t)));const i=e.nodeFromJSON(t);return n.errorOnInvalidContent&&i.check(),i}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),q("",e,n)}if(i){if(n.errorOnInvalidContent){let i=!1,r="";const o=new s.Schema({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:t=>(i=!0,r="string"==typeof t?t:t.outerHTML,null)}]}})});if(n.slice?s.DOMParser.fromSchema(o).parseSlice(G(t),n.parseOptions):s.DOMParser.fromSchema(o).parse(G(t),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error("Invalid element found: "+r)})}const i=s.DOMParser.fromSchema(e);return n.slice?i.parseSlice(G(t),n.parseOptions).content:i.parse(G(t),n.parseOptions)}return q("",e,n)}var U=(t,e,n)=>({tr:r,dispatch:a,editor:l})=>{var c;if(a){let a;const u=t=>{l.emit("contentError",{editor:l,error:t,disableCollaboration:()=>{"collaboration"in l.storage&&"object"==typeof l.storage.collaboration&&l.storage.collaboration&&(l.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...(n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n}).parseOptions};if(!n.errorOnInvalidContent&&!l.options.enableContentCheck&&l.options.emitContentError)try{q(e,l.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(t){u(t)}try{a=q(e,l.schema,{parseOptions:d,errorOnInvalidContent:null!=(c=n.errorOnInvalidContent)?c:l.options.enableContentCheck})}catch(t){return u(t),!1}let{from:p,to:h}="number"==typeof t?{from:t,to:t}:{from:t.from,to:t.to},f=!0,m=!0;if(("type"in a?[a]:a).forEach(t=>{t.check(),f=!!f&&(t.isText&&0===t.marks.length),m=!!m&&t.isBlock}),p===h&&m){const{parent:t}=r.doc.resolve(p);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(p-=1,h+=1)}let g;if(f){if(Array.isArray(e))g=e.map(t=>t.text||"").join("");else if(e instanceof s.Fragment){let t="";e.forEach(e=>{e.text&&(t+=e.text)}),g=t}else g="object"==typeof e&&e&&e.text?e.text:e;r.insertText(g,p,h)}else{g=a;const t=r.doc.resolve(p),e=t.node(),n=0===t.parentOffset,i=e.isText||e.isTextblock,o=e.content.size>0;n&&i&&o&&(p=Math.max(0,p-1)),r.replaceWith(p,h,g)}n.updateSelection&&function(t,e,n){const r=t.steps.length-1;if(r{0===l&&(l=i)}),t.setSelection(o.Selection.near(t.doc.resolve(l),n))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:p,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:p,text:g})}return!0},K=()=>({state:t,dispatch:e})=>Object(r.joinUp)(t,e),J=()=>({state:t,dispatch:e})=>Object(r.joinDown)(t,e),Y=()=>({state:t,dispatch:e})=>Object(r.joinBackward)(t,e),X=()=>({state:t,dispatch:e})=>Object(r.joinForward)(t,e),Q=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Object(i.joinPoint)(t.doc,t.selection.$from.pos,-1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},Z=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Object(i.joinPoint)(t.doc,t.selection.$from.pos,1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},tt=()=>({state:t,dispatch:e})=>Object(r.joinTextblockBackward)(t,e),et=()=>({state:t,dispatch:e})=>Object(r.joinTextblockForward)(t,e);function nt(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}var it=t=>({editor:e,view:n,tr:i,dispatch:r})=>{const o=function(t){const e=t.split(/-(?!$)/);let n,i,r,o,s=e[e.length-1];"Space"===s&&(s=" ");for(let t=0;t!["Alt","Ctrl","Meta","Shift"].includes(t)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",t=>t(n,a))});return null==l||l.steps.forEach(t=>{const e=t.map(i.mapping);e&&r&&i.maybeStep(e)}),!0};function rt(t,e,n={}){const{from:i,to:r,empty:o}=t.selection,s=e?w(e,t.schema):null,a=[];t.doc.nodesBetween(i,r,(t,e)=>{if(t.isText)return;const n=Math.max(i,e),o=Math.min(r,e+t.nodeSize);a.push({node:t,from:n,to:o})});const l=r-i,c=a.filter(t=>!s||s.name===t.node.type.name).filter(t=>M(t.node.attrs,n,{strict:!1}));if(o)return!!c.length;return c.reduce((t,e)=>t+e.to-e.from,0)>=l}var ot=(t,e={})=>({state:n,dispatch:i})=>!!rt(n,w(t,n.schema),e)&&Object(r.lift)(n,i),st=()=>({state:t,dispatch:e})=>Object(r.liftEmptyBlock)(t,e),at=t=>({state:e,dispatch:n})=>{const i=w(t,e.schema);return Object(a.liftListItem)(i)(e,n)},lt=()=>({state:t,dispatch:e})=>Object(r.newlineInCode)(t,e);function ct(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function ut(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce((e,i)=>(n.includes(i)||(e[i]=t[i]),e),{})}var dt=(t,e)=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null;const a=ct("string"==typeof t?t:t.name,i.schema);if(!a)return!1;"node"===a&&(o=w(t,i.schema)),"mark"===a&&(s=I(t,i.schema));let l=!1;return n.selection.ranges.forEach(t=>{i.doc.nodesBetween(t.$from.pos,t.$to.pos,(t,i)=>{o&&o===t.type&&(l=!0,r&&n.setNodeMarkup(i,void 0,ut(t.attrs,e))),s&&t.marks.length&&t.marks.forEach(o=>{s===o.type&&(l=!0,r&&n.addMark(i,i+t.nodeSize,s.create(ut(o.attrs,e))))})})}),l},pt=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),ht=()=>({tr:t,dispatch:e})=>{if(e){const e=new o.AllSelection(t.doc);t.setSelection(e)}return!0},ft=()=>({state:t,dispatch:e})=>Object(r.selectNodeBackward)(t,e),mt=()=>({state:t,dispatch:e})=>Object(r.selectNodeForward)(t,e),gt=()=>({state:t,dispatch:e})=>Object(r.selectParentNode)(t,e),vt=()=>({state:t,dispatch:e})=>Object(r.selectTextblockEnd)(t,e),yt=()=>({state:t,dispatch:e})=>Object(r.selectTextblockStart)(t,e);function bt(t,e,n={},i={}){return q(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}var _t=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:i={}}={})=>({editor:r,tr:o,dispatch:s,commands:a})=>{const{doc:l}=o;if("full"!==i.preserveWhitespace){const a=bt(t,r.schema,i,{errorOnInvalidContent:null!=e?e:r.options.enableContentCheck});return s&&o.replaceWith(0,l.content.size,a).setMeta("preventUpdate",!n),!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:i,errorOnInvalidContent:null!=e?e:r.options.enableContentCheck})};function xt(t,e){const n=I(e,t.schema),{from:i,to:r,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(i,r,t=>{s.push(...t.marks)});const a=s.find(t=>t.type.name===n.name);return a?{...a.attrs}:{}}function wt(t,e){const n=new i.Transform(t);return e.forEach(t=>{t.steps.forEach(t=>{n.step(t)})}),n}function kt(t,e,n){const i=[];return t.nodesBetween(e.from,e.to,(t,e)=>{n(t)&&i.push({node:t,pos:e})}),i}function Ct(t,e){for(let n=t.depth;n>0;n-=1){const i=t.node(n);if(e(i))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:i}}}function St(t){return e=>Ct(e.$from,t)}function Et(t,e,n){if(void 0===t.config[e]&&t.parent)return Et(t.parent,e,n);if("function"==typeof t.config[e]){return t.config[e].bind({...n,parent:t.parent?Et(t.parent,e,n):null})}return t.config[e]}function Tt(t){return t.map(t=>{const e=Et(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...Tt(e())]:t}).flat(10)}function At(t,e){const n=s.DOMSerializer.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Mt(t){return"function"==typeof t}function Pt(t,e,...n){return Mt(t)?e?t.bind(e)(...n):t(...n):t}function Ot(t){return{baseExtensions:t.filter(t=>"extension"===t.type),nodeExtensions:t.filter(t=>"node"===t.type),markExtensions:t.filter(t=>"mark"===t.type)}}function Dt(t){const e=[],{nodeExtensions:n,markExtensions:i}=Ot(t),r=[...n,...i],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(t=>"text"!==t.name).map(t=>t.name),a=i.map(t=>t.name),l=[...s,...a];return t.forEach(t=>{const n=Et(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage,extensions:r});if(!n)return;n().forEach(t=>{let n;n=Array.isArray(t.types)?t.types:"*"===t.types?l:"nodes"===t.types?s:"marks"===t.types?a:[],n.forEach(n=>{Object.entries(t.attributes).forEach(([t,i])=>{e.push({type:n,name:t,attribute:{...o,...i}})})})})}),r.forEach(t=>{const n={name:t.name,options:t.options,storage:t.storage},i=Et(t,"addAttributes",n);if(!i)return;const r=i();Object.entries(r).forEach(([n,i])=>{const r={...o,...i};"function"==typeof(null==r?void 0:r.default)&&(r.default=r.default()),(null==r?void 0:r.isRequired)&&void 0===(null==r?void 0:r.default)&&delete r.default,e.push({type:t.name,name:n,attribute:r})})}),e}function It(t){const e=[],n=function(t){const e=[];let n="",i=!1,r=!1,o=0;const s=t.length;for(let a=0;a0){o-=1,n+=s;continue}if(";"===s&&0===o){e.push(n),n="";continue}}n+=s}else r=!r,n+=s;else i=!i,n+=s}return n&&e.push(n),e}(t||""),i=n.length;for(let t=0;t!!t).reduce((t,e)=>{const n={...t};return Object.entries(e).forEach(([t,e])=>{if(n[t])if("class"===t){const i=e?String(e).split(" "):[],r=n[t]?n[t].split(" "):[],o=i.filter(t=>!r.includes(t));n[t]=[...r,...o].join(" ")}else if("style"===t){const i=new Map([...It(n[t]),...It(e)]);n[t]=Array.from(i.entries()).map(([t,e])=>`${t}: ${e}`).join("; ")}else n[t]=e;else n[t]=e}),n},{})}function Nt(t,e){return e.filter(e=>e.type===t.type.name).filter(t=>t.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]}).reduce((t,e)=>$t(t,e),{})}function Ft(t,e){return"style"in t?t:{...t,getAttrs:n=>{const i=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===i)return!1;const r=e.reduce((t,e)=>{const i=e.attribute.parseHTML?e.attribute.parseHTML(n):function(t){return"string"!=typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}(n.getAttribute(e.name));return null==i?t:{...t,[e.name]:i}},{});return{...i,...r}}}}function Rt(t){return Object.fromEntries(Object.entries(t).filter(([t,e])=>("attrs"!==t||!function(t={}){return 0===Object.keys(t).length&&t.constructor===Object}(e))&&null!=e))}function Lt(t){var e,n;const i={};return!(null==(e=null==t?void 0:t.attribute)?void 0:e.isRequired)&&"default"in((null==t?void 0:t.attribute)||{})&&(i.default=t.attribute.default),void 0!==(null==(n=null==t?void 0:t.attribute)?void 0:n.validate)&&(i.validate=t.attribute.validate),[t.name,i]}function jt(t,e){var n;const i=Dt(t),{nodeExtensions:r,markExtensions:o}=Ot(t),a=null==(n=r.find(t=>Et(t,"topNode")))?void 0:n.name,l=Object.fromEntries(r.map(n=>{const r=i.filter(t=>t.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:e},s=Rt({...t.reduce((t,e)=>{const i=Et(e,"extendNodeSchema",o);return{...t,...i?i(n):{}}},{}),content:Pt(Et(n,"content",o)),marks:Pt(Et(n,"marks",o)),group:Pt(Et(n,"group",o)),inline:Pt(Et(n,"inline",o)),atom:Pt(Et(n,"atom",o)),selectable:Pt(Et(n,"selectable",o)),draggable:Pt(Et(n,"draggable",o)),code:Pt(Et(n,"code",o)),whitespace:Pt(Et(n,"whitespace",o)),linebreakReplacement:Pt(Et(n,"linebreakReplacement",o)),defining:Pt(Et(n,"defining",o)),isolating:Pt(Et(n,"isolating",o)),attrs:Object.fromEntries(r.map(Lt))}),a=Pt(Et(n,"parseHTML",o));a&&(s.parseDOM=a.map(t=>Ft(t,r)));const l=Et(n,"renderHTML",o);l&&(s.toDOM=t=>l({node:t,HTMLAttributes:Nt(t,r)}));const c=Et(n,"renderText",o);return c&&(s.toText=c),[n.name,s]})),c=Object.fromEntries(o.map(n=>{const r=i.filter(t=>t.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:e},s=Rt({...t.reduce((t,e)=>{const i=Et(e,"extendMarkSchema",o);return{...t,...i?i(n):{}}},{}),inclusive:Pt(Et(n,"inclusive",o)),excludes:Pt(Et(n,"excludes",o)),group:Pt(Et(n,"group",o)),spanning:Pt(Et(n,"spanning",o)),code:Pt(Et(n,"code",o)),attrs:Object.fromEntries(r.map(Lt))}),a=Pt(Et(n,"parseHTML",o));a&&(s.parseDOM=a.map(t=>Ft(t,r)));const l=Et(n,"renderHTML",o);return l&&(s.toDOM=t=>l({mark:t,HTMLAttributes:Nt(t,r)})),[n.name,s]}));return new s.Schema({topNode:a,nodes:l,marks:c})}function Bt(t){return t.sort((t,e)=>{const n=Et(t,"priority")||100,i=Et(e,"priority")||100;return n>i?-1:nt.indexOf(e)!==n);return Array.from(new Set(e))}(e.map(t=>t.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(t=>`'${t}'`).join(", ")}]. This can lead to issues.`),e}function zt(t,e,n){const{from:i,to:r}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{};let a="";return t.nodesBetween(i,r,(t,n,l,c)=>{var u;t.isBlock&&n>i&&(a+=o);const d=null==s?void 0:s[t.type.name];if(d)return l&&(a+=d({node:t,pos:n,parent:l,index:c,range:e})),!1;t.isText&&(a+=null==(u=null==t?void 0:t.text)?void 0:u.slice(Math.max(i,n)-n,r-n))}),a}function Ht(t,e){return zt(t,{from:0,to:t.content.size},e)}function Wt(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}function Gt(t,e){const n=ct("string"==typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=w(e,t.schema),{from:i,to:r}=t.selection,o=[];t.doc.nodesBetween(i,r,t=>{o.push(t)});const s=o.reverse().find(t=>t.type.name===n.name);return s?{...s.attrs}:{}}(t,e):"mark"===n?xt(t,e):{}}function qt(t){const e=function(t,e=JSON.stringify){const n={};return t.filter(t=>{const i=e(t);return!Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=!0)})}(t);return 1===e.length?e:e.filter((t,n)=>!e.filter((t,e)=>e!==n).some(e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))}function Ut(t){const{mapping:e,steps:n}=t,i=[];return e.maps.forEach((t,r)=>{const o=[];if(t.ranges.length)t.forEach((t,e)=>{o.push({from:t,to:e})});else{const{from:t,to:e}=n[r];if(void 0===t||void 0===e)return;o.push({from:t,to:e})}o.forEach(({from:t,to:n})=>{const o=e.slice(r).map(t,-1),s=e.slice(r).map(n),a=e.invert().map(o,-1),l=e.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})})}),qt(i)}function Kt(t,e,n){const i=[];return t===e?n.resolve(t).marks().forEach(e=>{const r=D(n.resolve(t),e.type);r&&i.push({mark:e,...r})}):n.nodesBetween(t,e,(t,e)=>{t&&void 0!==(null==t?void 0:t.nodeSize)&&i.push(...t.marks.map(n=>({from:e,to:e+t.nodeSize,mark:n})))}),i}var Jt=(t,e,n,i=20)=>{const r=t.doc.resolve(n);let o=i,s=null;for(;o>0&&null===s;){const t=r.node(o);(null==t?void 0:t.type.name)===e?s=t:o-=1}return[s,o]};function Yt(t,e){return e.nodes[t]||e.marks[t]||null}function Xt(t,e,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{const i=t.find(t=>t.type===e&&t.name===n);return!!i&&i.attribute.keepOnSplit}))}function Qt(t,e,n={}){const{empty:i,ranges:r}=t.selection,o=e?I(e,t.schema):null;if(i)return!!(t.storedMarks||t.selection.$from.marks()).filter(t=>!o||o.name===t.type.name).find(t=>M(t.attrs,n,{strict:!1}));let s=0;const a=[];if(r.forEach(({$from:e,$to:n})=>{const i=e.pos,r=n.pos;t.doc.nodesBetween(i,r,(t,e)=>{if(o&&t.inlineContent&&!t.type.allowsMarkType(o))return!1;if(!t.isText&&!t.marks.length)return;const n=Math.max(i,e),l=Math.min(r,e+t.nodeSize);s+=l-n,a.push(...t.marks.map(t=>({mark:t,from:n,to:l})))})}),0===s)return!1;const l=a.filter(t=>!o||o.name===t.mark.type.name).filter(t=>M(t.mark.attrs,n,{strict:!1})).reduce((t,e)=>t+e.to-e.from,0),c=a.filter(t=>!o||t.mark.type!==o&&t.mark.type.excludes(o)).reduce((t,e)=>t+e.to-e.from,0);return(l>0?l+c:l)>=s}var Zt=(t,e)=>{const{$from:n,$to:i,$anchor:r}=t.selection;if(e){const n=St(t=>t.type.name===e)(t.selection);if(!n)return!1;const i=t.doc.resolve(n.pos+1);return r.pos+1===i.end()}return!(i.parentOffset{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ee(t,e){return Array.isArray(e)?e.some(e=>("string"==typeof e?e:e.name)===t.name):e}function ne(t,e){const{nodeExtensions:n}=Ot(e),i=n.find(e=>e.name===t);if(!i)return!1;const r=Pt(Et(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof r&&r.split(" ").includes("list")}function ie(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var i;if(n){if("hardBreak"===t.type.name)return!0;if(t.isText)return!/\S/.test(null!=(i=t.text)?i:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;if(e){let i=!0;return t.content.forEach(t=>{!1!==i&&(ie(t,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function re(t){return t instanceof o.NodeSelection}var oe=class t{constructor(t){this.position=t}static fromJSON(e){return new t(e.position)}toJSON(){return{position:this.position}}};function se(t,e){const n=e.mapping.mapResult(t.position);return{position:new oe(n.pos),mapResult:n}}function ae(t){return new oe(t)}var le=(t,e={})=>({tr:n,state:i,dispatch:r})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=I(t,i.schema);if(r)if(s){const t=xt(i,l);n.addStoredMark(l.create({...t,...e}))}else a.forEach(t=>{const r=t.$from.pos,o=t.$to.pos;i.doc.nodesBetween(r,o,(t,i)=>{const s=Math.max(i,r),a=Math.min(i+t.nodeSize,o);t.marks.find(t=>t.type===l)?t.marks.forEach(t=>{l===t.type&&n.addMark(s,a,l.create({...t.attrs,...e}))}):n.addMark(s,a,l.create(e))})});return function(t,e,n){var i;const{selection:r}=e;let o=null;if(F(r)&&(o=r.$cursor),o){const e=null!=(i=t.storedMarks)?i:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(e)||!e.some(t=>t.type.excludes(n)))}const{ranges:s}=r;return s.some(({$from:e,$to:i})=>{let r=0===e.depth&&(t.doc.inlineContent&&t.doc.type.allowsMarkType(n));return t.doc.nodesBetween(e.pos,i.pos,(t,e,i)=>{if(r)return!1;if(t.isInline){const e=!i||i.type.allowsMarkType(n),o=!!n.isInSet(t.marks)||!t.marks.some(t=>t.type.excludes(n));r=e&&o}return!r}),r})}(i,n,l)},ce=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),ue=(t,e={})=>({state:n,dispatch:i,chain:o})=>{const s=w(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:t})=>!!Object(r.setBlockType)(s,{...a,...e})(n)||t.clearNodes()).command(({state:t})=>Object(r.setBlockType)(s,{...a,...e})(t,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},de=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,i=R(t,0,n.content.size),r=o.NodeSelection.create(n,i);e.setSelection(r)}return!0},pe=(t,e)=>({tr:n,state:i,dispatch:r})=>{const{selection:o}=i;let s,a;return"number"==typeof e?(s=e,a=e):e&&"from"in e&&"to"in e?(s=e.from,a=e.to):(s=o.from,a=o.to),r&&n.doc.nodesBetween(s,a,(e,i)=>{e.isText||n.setNodeMarkup(i,void 0,{...e.attrs,dir:t})}),!0},he=t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:i,to:r}="number"==typeof t?{from:t,to:t}:t,s=o.TextSelection.atStart(n).from,a=o.TextSelection.atEnd(n).to,l=R(i,s,a),c=R(r,s,a),u=o.TextSelection.create(n,l,c);e.setSelection(u)}return!0},fe=t=>({state:e,dispatch:n})=>{const i=w(t,e.schema);return Object(a.sinkListItem)(i)(e,n)};function me(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const i=n.filter(t=>null==e?void 0:e.includes(t.type.name));t.tr.ensureMarks(i)}}var ge=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:a,doc:l}=e,{$from:c,$to:u}=a,d=Xt(s.extensionManager.attributes,c.node().type.name,c.node().attrs);if(a instanceof o.NodeSelection&&a.node.isBlock)return!(!c.parentOffset||!Object(i.canSplit)(l,c.pos))&&(r&&(t&&me(n,s.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;const p=u.parentOffset===u.parent.content.size,h=0===c.depth?void 0:function(t){for(let e=0;e({tr:n,state:r,dispatch:a,editor:l})=>{var c;const u=w(t,r.schema),{$from:d,$to:p}=r.selection,h=r.selection.node;if(h&&h.isBlock||d.depth<2||!d.sameParent(p))return!1;const f=d.node(-1);if(f.type!==u)return!1;const m=l.extensionManager.attributes;if(0===d.parent.content.size&&d.node(-1).childCount===d.indexAfter(-1)){if(2===d.depth||d.node(-3).type!==u||d.index(-2)!==d.node(-2).childCount-1)return!1;if(a){let t=s.Fragment.empty;const i=d.index(-1)?1:d.index(-2)?2:3;for(let e=d.depth-i;e>=d.depth-3;e-=1)t=s.Fragment.from(d.node(e).copy(t));const r=d.indexAfter(-1){if(h>-1)return!1;t.isTextblock&&0===t.content.size&&(h=e+1)}),h>-1&&n.setSelection(o.TextSelection.near(n.doc.resolve(h))),n.scrollIntoView()}return!0}const g=p.pos===d.end()?f.contentMatchAt(0).defaultType:null,v={...Xt(m,f.type.name,f.attrs),...e},y={...Xt(m,d.node().type.name,d.node().attrs),...e};n.delete(d.pos,p.pos);const b=g?[{type:u,attrs:v},{type:g,attrs:y}]:[{type:u,attrs:v}];if(!Object(i.canSplit)(n.doc,d.pos,2))return!1;if(a){const{selection:t,storedMarks:e}=r,{splittableMarks:i}=l.extensionManager,o=e||t.$to.parentOffset&&t.$from.marks();if(n.split(d.pos,2,b).scrollIntoView(),!o||!a)return!0;const s=o.filter(t=>i.includes(t.type.name));n.ensureMarks(s)}return!0},ye=(t,e)=>{const n=St(t=>t.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!Object(i.canJoin)(t.doc,n.pos)||(t.join(n.pos),!0)},be=(t,e)=>{const n=St(t=>t.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!Object(i.canJoin)(t.doc,r)||(t.join(r),!0)};var _e=(t,e,n,i={})=>({editor:r,tr:s,state:a,dispatch:l,chain:c,commands:u,can:d})=>{const{extensions:p,splittableMarks:h}=r.extensionManager,f=w(t,a.schema),m=w(e,a.schema),{selection:g,storedMarks:v}=a,{$from:y,$to:b}=g,_=y.blockRange(b),x=v||g.$to.parentOffset&&g.$from.marks();if(!_)return!1;const k=St(t=>ne(t.type.name,p))(g),C=0===g.from&&g.to===a.doc.content.size,S=a.doc.content.content,E=1===S.length?S[0]:null,T=C&&E&&ne(E.type.name,p)?{node:E,pos:0,depth:0}:null,A=null!=k?k:T,M=!!T;if((!!k&&_.depth>=1&&_.depth-k.depth<=1||M)&&A){if(A.node.type===f)return C&&M?c().command(({tr:t,dispatch:e})=>{const n=function(t){const e=t.doc,n=e.firstChild;if(!n)return null;const i=n.nodeSize-1;return o.TextSelection.create(e,1,i)}(t);return!!n&&(t.setSelection(n),e&&e(t),!0)}).liftListItem(m).run():u.liftListItem(m);if(ne(A.node.type.name,p)&&f.validContent(A.node.content))return c().command(()=>(s.setNodeMarkup(A.pos,f),!0)).command(()=>ye(s,f)).command(()=>be(s,f)).run()}return n&&x&&l?c().command(()=>{const t=d().wrapInList(f,i),e=x.filter(t=>h.includes(t.type.name));return s.ensureMarks(e),!!t||u.clearNodes()}).wrapInList(f,i).command(()=>ye(s,f)).command(()=>be(s,f)).run():c().command(()=>!!d().wrapInList(f,i)||u.clearNodes()).wrapInList(f,i).command(()=>ye(s,f)).command(()=>be(s,f)).run()},xe=(t,e={},n={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=n,s=I(t,i.schema);return Qt(i,s,e)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,e)},we=(t,e,n={})=>({state:i,commands:r})=>{const o=w(t,i.schema),s=w(e,i.schema),a=rt(i,o,n);let l;return i.selection.$anchor.sameParent(i.selection.$head)&&(l=i.selection.$anchor.parent.attrs),a?r.setNode(s,l):r.setNode(o,{...l,...n})},ke=(t,e={})=>({state:n,commands:i})=>{const r=w(t,n.schema);return rt(n,r,e)?i.lift(r):i.wrapIn(r,e)},Ce=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let i=0;i=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(o.text){const n=e.doc.resolve(o.from).marks();e.replaceWith(o.from,o.to,t.schema.text(o.text,n))}else e.delete(o.from,o.to)}return!0}}return!1},Se=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:i,ranges:r}=n;return i||e&&r.forEach(e=>{t.removeMark(e.$from.pos,e.$to.pos)}),!0},Ee=(t,e={})=>({tr:n,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=I(t,i.schema),{$from:c,empty:u,ranges:d}=a;if(!r)return!0;if(u&&s){let{from:t,to:e}=a;const i=null==(o=c.marks().find(t=>t.type===l))?void 0:o.attrs,r=D(c,l,i);r&&(t=r.from,e=r.to),n.removeMark(t,e,l)}else d.forEach(t=>{n.removeMark(t.$from.pos,t.$to.pos,l)});return n.removeStoredMark(l),!0},Te=t=>({tr:e,state:n,dispatch:i})=>{const{selection:r}=n;let o,s;return"number"==typeof t?(o=t,s=t):t&&"from"in t&&"to"in t?(o=t.from,s=t.to):(o=r.from,s=r.to),i&&e.doc.nodesBetween(o,s,(t,n)=>{if(t.isText)return;const i={...t.attrs};delete i.dir,e.setNodeMarkup(n,void 0,i)}),!0},Ae=(t,e={})=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null;const a=ct("string"==typeof t?t:t.name,i.schema);if(!a)return!1;"node"===a&&(o=w(t,i.schema)),"mark"===a&&(s=I(t,i.schema));let l=!1;return n.selection.ranges.forEach(t=>{const a=t.$from.pos,c=t.$to.pos;let u,d,p,h;n.selection.empty?i.doc.nodesBetween(a,c,(t,e)=>{o&&o===t.type&&(l=!0,p=Math.max(e,a),h=Math.min(e+t.nodeSize,c),u=e,d=t)}):i.doc.nodesBetween(a,c,(t,i)=>{i=a&&i<=c&&(o&&o===t.type&&(l=!0,r&&n.setNodeMarkup(i,void 0,{...t.attrs,...e})),s&&t.marks.length&&t.marks.forEach(o=>{if(s===o.type&&(l=!0,r)){const r=Math.max(i,a),l=Math.min(i+t.nodeSize,c);n.addMark(r,l,s.create({...o.attrs,...e}))}}))}),d&&(void 0!==u&&r&&n.setNodeMarkup(u,void 0,{...d.attrs,...e}),s&&d.marks.length&&d.marks.forEach(t=>{s===t.type&&r&&n.addMark(p,h,s.create({...t.attrs,...e}))}))}),l},Me=(t,e={})=>({state:n,dispatch:i})=>{const o=w(t,n.schema);return Object(r.wrapIn)(o,e)(n,i)},Pe=(t,e={})=>({state:n,dispatch:i})=>{const r=w(t,n.schema);return Object(a.wrapInList)(r,e)(n,i)},Oe=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=null==(e=t.undoable)||e}};function De(t){var e;const{editor:n,from:i,to:r,text:o,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(i);if(c.parent.type.spec.code||(null==(e=c.nodeBefore||c.nodeAfter)?void 0:e.marks.find(t=>t.type.spec.code)))return!1;let u=!1;const d=((t,e=500)=>{let n="";const i=t.parentOffset;return t.parent.nodesBetween(Math.max(0,i-e),i,(t,e,r,o)=>{var s,a;const l=(null==(a=(s=t.type.spec).toText)?void 0:a.call(s,{node:t,pos:e,parent:r,index:o}))||t.textContent||"%leaf%";n+=t.isAtom&&!t.isText?l:l.slice(0,Math.max(0,i-e))}),n})(c)+o;return s.forEach(t=>{if(u)return;const e=((t,e)=>{if(A(e))return e.exec(t);const n=e(t);if(!n)return null;const i=[n.text];return i.index=n.index,i.input=t,i.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(n.replaceWith)),i})(d,t.find);if(!e)return;const s=l.state.tr,c=p({state:l.state,transaction:s}),f={from:i-(e[0].length-o.length),to:r},{commands:m,chain:g,can:v}=new h({editor:n,state:c});null!==t.handler({state:c,range:f,match:e,commands:m,chain:g,can:v})&&s.steps.length&&(t.undoable&&s.setMeta(a,{transform:s,from:i,to:r,text:o}),l.dispatch(s),u=!0)}),u}function Ie(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}var $e=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Pt(Et(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Pt(Et(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>function t(e,n){const i={...e};return Ie(e)&&Ie(n)&&Object.keys(n).forEach(r=>{Ie(n[r])&&Ie(e[r])?i[r]=t(e[r],n[r]):i[r]=n[r]}),i}(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Ne=class t extends $e{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n="function"==typeof e?e():e;return new t(n)}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const r=i.marks();if(!!!r.find(t=>(null==t?void 0:t.type.name)===e.name))return!1;const o=r.find(t=>(null==t?void 0:t.type.name)===e.name);return o&&n.removeStoredMark(o),n.insertText(" ",i.pos),t.view.dispatch(n),!0}return!1}configure(t){return super.configure(t)}extend(t){const e="function"==typeof t?t():t;return super.extend(e)}};var Fe=class{constructor(t){this.find=t.find,this.handler=t.handler}};function Re(t){const{editor:e,state:n,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:u}=new h({editor:e,state:n}),d=[];n.doc.nodesBetween(i,r,(t,e)=>{var p,h,f,m,g;if((null==(h=null==(p=t.type)?void 0:p.spec)?void 0:h.code)||!(t.isText||t.isTextblock||t.isInline))return;const v=null!=(g=null!=(m=null==(f=t.content)?void 0:f.size)?m:t.nodeSize)?g:0,y=Math.max(i,e),b=Math.min(r,e+v);if(y>=b)return;((t,e,n)=>{if(A(e))return[...t.matchAll(e)];const i=e(t,n);return i?i.map(e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n}):[]})(t.isText?t.text||"":t.textBetween(y-e,b-e,void 0,""),o.find,s).forEach(t=>{if(void 0===t.index)return;const e=y+t.index+1,i=e+t[0].length,r={from:n.tr.mapping.map(e),to:n.tr.mapping.map(i)},p=o.handler({state:n,range:r,match:t,commands:l,chain:c,can:u,pasteEvent:s,dropEvent:a});d.push(p)})});return d.every(t=>null!==t)}var Le=null;function je(t){const{editor:e,rules:n}=t;let i,r=null,a=!1,l=!1,c="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{i="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{i=null}const u=({state:t,from:n,to:r,rule:o,pasteEvt:s})=>{const a=t.tr,l=p({state:t,transaction:a});if(Re({editor:e,state:l,from:Math.max(n-1,0),to:r.b-1,rule:o,pasteEvent:s,dropEvent:i})&&a.steps.length){try{i="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{i=null}return c="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}};return n.map(t=>new o.Plugin({view(t){const n=n=>{var i;r=(null==(i=t.dom.parentElement)?void 0:i.contains(n.target))?t.dom.parentElement:null,r&&(Le=e)},i=()=>{Le&&(Le=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",i),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",i)}}},props:{handleDOMEvents:{drop:(t,e)=>{if(l=r===t.dom.parentElement,i=e,!l){const t=Le;(null==t?void 0:t.isEditable)&&setTimeout(()=>{const e=t.state.selection;e&&t.commands.deleteRange({from:e.from,to:e.to})},10)}return!1},paste:(t,e)=>{var n;const i=null==(n=e.clipboardData)?void 0:n.getData("text/html");return c=e,a=!!(null==i?void 0:i.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,i)=>{const r=e[0],o="paste"===r.getMeta("uiEvent")&&!a,d="drop"===r.getMeta("uiEvent")&&!l,p=r.getMeta("applyPasteRules"),h=!!p;if(!o&&!d&&!h)return;if(h){let{text:e}=p;e="string"==typeof e?e:At(s.Fragment.from(e),i.schema);const{from:n}=p,r=n+e.length,o=(t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null==(e=n.clipboardData)||e.setData("text/html",t),n})(e);return u({rule:t,state:i,from:n,to:{b:r},pasteEvt:o})}const f=n.doc.content.findDiffStart(i.doc.content),m=n.doc.content.findDiffEnd(i.doc.content);return"number"==typeof f&&m&&f!==m.b?u({rule:t,state:i,from:f,to:m,pasteEvt:c}):void 0}}))}var Be=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Vt(t),this.schema=jt(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n=Et(e,"addCommands",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Yt(e.name,this.schema)});return n?{...t,...n()}:t},{})}get plugins(){const{editor:t}=this;return Bt([...this.extensions].reverse()).flatMap(e=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:Yt(e.name,this.schema)},i=[],r=Et(e,"addKeyboardShortcuts",n);let a={};if("mark"===e.type&&Et(e,"exitable",n)&&(a.ArrowRight=()=>Ne.handleExit({editor:t,mark:e})),r){const e=Object.fromEntries(Object.entries(r()).map(([e,n])=>[e,()=>n({editor:t})]));a={...a,...e}}const l=Object(c.keymap)(a);i.push(l);const u=Et(e,"addInputRules",n);if(ee(e,t.options.enableInputRules)&&u){const e=u();if(e&&e.length){const n=function(t){const{editor:e,rules:n}=t,i=new o.Plugin({state:{init:()=>null,apply(t,r,o){const a=t.getMeta(i);if(a)return a;const l=t.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:t}=l;t="string"==typeof t?t:At(s.Fragment.from(t),o.schema);const{from:r}=l,a=r+t.length;De({editor:e,from:r,to:a,text:t,rules:n,plugin:i})}),t.selectionSet||t.docChanged?null:r}},props:{handleTextInput:(t,r,o,s)=>De({editor:e,from:r,to:o,text:s,rules:n,plugin:i}),handleDOMEvents:{compositionend:t=>(setTimeout(()=>{const{$cursor:r}=t.state.selection;r&&De({editor:e,from:r.pos,to:r.pos,text:"",rules:n,plugin:i})}),!1)},handleKeyDown(t,r){if("Enter"!==r.key)return!1;const{$cursor:o}=t.state.selection;return!!o&&De({editor:e,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:i})}},isInputRules:!0});return i}({editor:t,rules:e}),r=Array.isArray(n)?n:[n];i.push(...r)}}const d=Et(e,"addPasteRules",n);if(ee(e,t.options.enablePasteRules)&&d){const e=d();if(e&&e.length){const n=je({editor:t,rules:e});i.push(...n)}}const p=Et(e,"addProseMirrorPlugins",n);if(p){const t=p();i.push(...t)}return i})}get attributes(){return Dt(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Ot(this.extensions);return Object.fromEntries(e.filter(t=>!!Et(t,"addNodeView")).map(e=>{const n=this.attributes.filter(t=>t.type===e.name),i={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:w(e.name,this.schema)},r=Et(e,"addNodeView",i);if(!r)return[];const o=r();if(!o)return[];return[e.name,(i,r,s,a,l)=>{const c=Nt(i,n);return o({node:i,view:r,getPos:s,decorations:a,innerDecorations:l,editor:t,extension:e,HTMLAttributes:c})}]}))}dispatchTransaction(t){const{editor:e}=this;return Bt([...this.extensions].reverse()).reduceRight((t,n)=>{const i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Yt(n.name,this.schema)},r=Et(n,"dispatchTransaction",i);return r?e=>{r.call(i,{transaction:e,next:t})}:t},t)}transformPastedHTML(t){const{editor:e}=this;return Bt([...this.extensions]).reduce((t,n)=>{const i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Yt(n.name,this.schema)},r=Et(n,"transformPastedHTML",i);return r?(e,n)=>{const o=t(e,n);return r.call(i,o)}:t},t||(t=>t))}get markViews(){const{editor:t}=this,{markExtensions:e}=Ot(this.extensions);return Object.fromEntries(e.filter(t=>!!Et(t,"addMarkView")).map(e=>{const n=this.attributes.filter(t=>t.type===e.name),i={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:I(e.name,this.schema)},r=Et(e,"addMarkView",i);if(!r)return[];return[e.name,(i,o,s)=>{const a=Nt(i,n);return r()({mark:i,view:o,inline:s,editor:t,extension:e,HTMLAttributes:a,updateAttributes:e=>{yn(i,t,e)}})}]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(t=>[t.name,t.storage])),t.forEach(t=>{var e;const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Yt(t.name,this.schema)};if("mark"===t.type){(null==(e=Pt(Et(t,"keepOnSplit",n)))||e)&&this.splittableMarks.push(t.name)}const i=Et(t,"onBeforeCreate",n),r=Et(t,"onCreate",n),o=Et(t,"onUpdate",n),s=Et(t,"onSelectionUpdate",n),a=Et(t,"onTransaction",n),l=Et(t,"onFocus",n),c=Et(t,"onBlur",n),u=Et(t,"onDestroy",n);i&&this.editor.on("beforeCreate",i),r&&this.editor.on("create",r),o&&this.editor.on("update",o),s&&this.editor.on("selectionUpdate",s),a&&this.editor.on("transaction",a),l&&this.editor.on("focus",l),c&&this.editor.on("blur",c),u&&this.editor.on("destroy",u)})}};Be.resolve=Vt,Be.sort=Bt,Be.flatten=Tt;d({},{ClipboardTextSerializer:()=>ze,Commands:()=>He,Delete:()=>We,Drop:()=>Ge,Editable:()=>qe,FocusEvents:()=>Ke,Keymap:()=>Je,Paste:()=>Ye,Tabindex:()=>Xe,TextDirection:()=>Qe,focusEventsPluginKey:()=>Ue});var Ve=class t extends $e{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n="function"==typeof e?e():e;return new t(n)}configure(t){return super.configure(t)}extend(t){const e="function"==typeof t?t():t;return super.extend(e)}},ze=Ve.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:i,selection:r}=e,{ranges:o}=r,s=Math.min(...o.map(t=>t.$from.pos)),a=Math.max(...o.map(t=>t.$to.pos)),l=Wt(n);return zt(i,{from:s,to:a},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),He=Ve.create({name:"commands",addCommands:()=>({...f})}),We=Ve.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,o;const s=()=>{var n,r,o,s;if(null!=(s=null==(o=null==(r=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:r.filterTransaction)?void 0:o.call(r,t))?s:t.getMeta("y-sync$"))return;const a=wt(t.before,[t,...e]);Ut(a).forEach(e=>{a.mapping.mapResult(e.oldRange.from).deletedAfter&&a.mapping.mapResult(e.oldRange.to).deletedBefore&&a.before.nodesBetween(e.oldRange.from,e.oldRange.to,(n,i)=>{const r=i+n.nodeSize-2,o=e.oldRange.from<=i&&r<=e.oldRange.to;this.editor.emit("delete",{type:"node",node:n,from:i,to:r,newFrom:a.mapping.map(i),newTo:a.mapping.map(r),deletedRange:e.oldRange,newRange:e.newRange,partial:!o,editor:this.editor,transaction:t,combinedTransform:a})})});const l=a.mapping;a.steps.forEach((e,n)=>{var r,o;if(e instanceof i.RemoveMarkStep){const i=l.slice(n).map(e.from,-1),s=l.slice(n).map(e.to),c=l.invert().map(i,-1),u=l.invert().map(s),d=i>0&&(null==(r=a.doc.nodeAt(i-1))?void 0:r.marks.some(t=>t.eq(e.mark))),p=null==(o=a.doc.nodeAt(s))?void 0:o.marks.some(t=>t.eq(e.mark));this.editor.emit("delete",{type:"mark",mark:e.mark,from:e.from,to:e.to,deletedRange:{from:c,to:u},newRange:{from:i,to:s},partial:Boolean(p||d),editor:this.editor,transaction:t,combinedTransform:a})}})};null==(o=null==(r=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:r.async)||o?setTimeout(s,0):s()}}),Ge=Ve.create({name:"drop",addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("tiptapDrop"),props:{handleDrop:(t,e,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:i})}}})]}}),qe=Ve.create({name:"editable",addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ue=new o.PluginKey("focusEvents"),Ke=Ve.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new o.Plugin({key:Ue,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const i=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(i),!1},blur:(e,n)=>{t.isFocused=!1;const i=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(i),!1}}}})]}}),Je=Ve.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:t})=>[()=>t.undoInputRule(),()=>t.command(({tr:e})=>{const{selection:n,doc:i}=e,{empty:r,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock&&a>0?e.doc.resolve(a-1):s,u=c.parent.type.spec.isolating,d=s.pos-s.parentOffset,p=u&&1===c.parent.childCount?d===s.pos:o.Selection.atStart(i).from===a;return!(!r||!l.type.isTextblock||l.textContent.length||!p||p&&"paragraph"===s.parent.type.name)&&t.clearNodes()}),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},r={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return B()||nt()?r:i},addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(t=>t.getMeta("composition")))return;const i=t.some(t=>t.docChanged)&&!e.doc.eq(n.doc),r=t.some(t=>t.getMeta("preventClearDocument"));if(!i||r)return;const{empty:s,from:a,to:l}=e.selection,c=o.Selection.atStart(e.doc).from,u=o.Selection.atEnd(e.doc).to;if(s||!(a===c&&l===u))return;if(!ie(n.doc))return;const d=n.tr,f=p({state:n,transaction:d}),{commands:m}=new h({editor:this.editor,state:f});return m.clearNodes(),d.steps.length?d:void 0}})]}}),Ye=Ve.create({name:"paste",addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Xe=Ve.create({name:"tabindex",addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Qe=Ve.create({name:"textDirection",addOptions:()=>({direction:void 0}),addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Ot(this.extensions);return[{types:t.filter(t=>"text"!==t.name).map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{const e=t.getAttribute("dir");return!e||"ltr"!==e&&"rtl"!==e&&"auto"!==e?this.options.direction:e},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new o.Plugin({key:new o.PluginKey("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}});var Ze=class extends class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(t=>t.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(t=>t!==e):delete this.callbacks[t]),this}once(t,e){const n=(...i)=>{this.off(t,n),e.apply(this,i)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}}{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:"undefined"!=typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:se,createMappablePosition:ae},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:e,moved:n})=>this.options.onDrop(t,e,n)),this.on("paste",({event:t,slice:e})=>this.options.onPaste(t,e)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=L(e,this.options.autofocus);this.editorState=o.EditorState.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if("undefined"==typeof document)throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(!1!==this.options.autofocus&&null!==this.options.autofocus&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;(null==t?void 0:t.editor)&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll("."+this.className).length)try{"function"==typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&"undefined"!=typeof document&&(this.css=function(t,e,n){const i=document.querySelector(`style[data-tiptap-style${n?"-"+n:""}]`);if(null!==i)return i;const r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute("data-tiptap-style"+(n?"-"+n:""),""),r.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\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}',this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if("state"===e)return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=Mt(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(t=>{const e="string"==typeof t?t+"$":t.key;n=n.filter(t=>!t.key.startsWith(e))}),e.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[qe,ze.configure({blockSeparator:null==(e=null==(t=this.options.coreExtensionOptions)?void 0:t.clipboardTextSerializer)?void 0:e.blockSeparator}),He,Ke,Je,Xe,Ge,Ye,We,Qe.configure({direction:this.options.textDirection})].filter(t=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[t.name]):[],...this.options.extensions].filter(t=>["extension","node","mark"].includes(null==t?void 0:t.type));this.extensionManager=new Be(n,this)}createCommandManager(){this.commandManager=new h({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=bt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error&&["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message)))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&"object"==typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(t=>"collaboration"!==t.name),this.createExtensionManager()}}),t=bt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,i=e.dispatchTransaction||this.dispatchTransaction.bind(this),r=n?this.extensionManager.dispatchTransaction(i):i,o=e.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new l.EditorView(t,{...e,attributes:{role:"textbox",...null==e?void 0:e.attributes},dispatchTransaction:r,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach(t=>{var e;return null==(e=this.capturedTransaction)?void 0:e.step(t)}):void(this.capturedTransaction=t);const{state:e,transactions:n}=this.state.applyTransaction(t),i=!this.state.selection.eq(e.selection),r=n.includes(t),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!r)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),i&&this.emit("selectionUpdate",{editor:this,transaction:t});const s=n.findLast(t=>t.getMeta("focus")||t.getMeta("blur")),a=null==s?void 0:s.getMeta("focus"),l=null==s?void 0:s.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),t.getMeta("preventUpdate")||!n.some(t=>t.docChanged)||o.doc.eq(e.doc)||this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return Gt(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,i="string"==typeof t?e:t;return function(t,e,n={}){if(!e)return rt(t,null,n)||Qt(t,null,n);const i=ct(e,t.schema);return"node"===i?rt(t,e,n):"mark"===i&&Qt(t,e,n)}(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return At(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return Ht(this.state.doc,{blockSeparator:e,textSerializers:{...Wt(this.schema),...n}})}get isEmpty(){return ie(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return null==(e=null==(t=this.editorView)?void 0:t.isDestroyed)||e}$node(t,e){var n;return(null==(n=this.$doc)?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null==(n=this.$doc)?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new class t{constructor(t,e,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!=(t=this.actualDepth)?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new t(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new t(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new t(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,i)=>{const r=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,a=this.pos+i+(o?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!r&&!s&&l.depth<=this.depth)return;const c=new t(l,this.editor,r,r||s?n:null);r&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===t)if(Object.keys(e).length>0){const t=i.node.attrs,n=Object.keys(e);for(let i=0;i{if(!(n&&i.length>0)){if(o.node.type.name===t){r.every(t=>e[t]===o.node.attrs[t])&&i.push(o)}n&&i.length>0||(i=i.concat(o.querySelectorAll(t,e,n)))}}),i}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}}(e,this)}get $doc(){return this.$pos(0)}};function tn(t){return new Oe({find:t.find,handler:({state:e,range:n,match:i})=>{const r=Pt(t.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=e,s=i[i.length-1],a=i[0];if(s){const i=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(Kt(n.from,n.to,e.doc).filter(e=>e.mark.type.excluded.find(n=>n===t.type&&n!==e.mark.type)).filter(t=>t.to>l).length)return null;cn.from&&o.delete(n.from+i,l);const u=n.from+i+s.length;o.addMark(n.from+i,u,t.type.create(r||{})),o.removeStoredMark(t.type)}},undoable:t.undoable})}function en(t){return new Oe({find:t.find,handler:({state:e,range:n,match:i})=>{const r=Pt(t.getAttributes,void 0,i)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(r);if(i[1]){let t=s+i[0].lastIndexOf(i[1]);t>a?t=a:a=t+i[1].length;const e=i[0][i[0].length-1];o.insertText(e,s+i[0].length-1),o.replaceWith(t,a,l)}else if(i[0]){const e=t.type.isInline?s:s-1;o.insert(e,t.type.create(r)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()},undoable:t.undoable})}function nn(t){return new Oe({find:t.find,handler:({state:e,range:n,match:i})=>{const r=e.doc.resolve(n.from),o=Pt(t.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)},undoable:t.undoable})}function rn(t){return new Oe({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const s=Pt(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),c=l&&Object(i.findWrapping)(l,t.type,s);if(!c)return null;if(a.wrap(l,c),t.keepMarks&&t.editor){const{selection:n,storedMarks:i}=e,{splittableMarks:r}=t.editor.extensionManager,o=i||n.$to.parentOffset&&n.$from.marks();if(o){const t=o.filter(t=>r.includes(t.type.name));a.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";o().updateAttributes(e,s).run()}const u=a.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Object(i.canJoin)(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&a.join(n.from-1)},undoable:t.undoable})}function on(t,e){const{selection:n}=t,{$from:i}=n;if(n instanceof o.NodeSelection){const t=i.index();return i.parent.canReplaceWith(t,t+1,e)}let r=i.depth;for(;r>=0;){const t=i.index(r);if(i.node(r).contentMatchAt(t).matchType(e))return!0;r-=1}return!1}function sn(t){if(!(null==t?void 0:t.trim()))return{};const e={},n=[],i=t.replace(/["']([^"']*)["']/g,t=>(n.push(t),`__QUOTED_${n.length-1}__`)),r=i.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(r){const t=r.map(t=>t.trim().slice(1));e.class=t.join(" ")}const o=i.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);o&&(e.id=o[1]);Array.from(i.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([,t,i])=>{var r;const o=parseInt((null==(r=i.match(/__QUOTED_(\d+)__/))?void 0:r[1])||"0",10),s=n[o];s&&(e[t]=s.slice(1,-1))});const s=i.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();if(s){s.split(/\s+/).filter(Boolean).forEach(t=>{t.match(/^[a-zA-Z][\w-]*$/)&&(e[t]=!0)})}return e}function an(t){if(!t||0===Object.keys(t).length)return"";const e=[];if(t.class){String(t.class).split(/\s+/).filter(Boolean).forEach(t=>e.push("."+t))}return t.id&&e.push("#"+t.id),Object.entries(t).forEach(([t,n])=>{"class"!==t&&"id"!==t&&(!0===n?e.push(t):!1!==n&&null!=n&&e.push(`${t}="${String(n)}"`))}),e.join(" ")}function ln(t){const{nodeName:e,name:n,parseAttributes:i=sn,serializeAttributes:r=an,defaultAttributes:o={},requiredAttributes:s=[],allowedAttributes:a}=t,l=n||e;return{parseMarkdown:(t,n)=>{const i={...o,...t.attributes};return n.createNode(e,i,[])},markdownTokenizer:{name:e,level:"block",start(t){var e;const n=new RegExp(`^:::${l}(?:\\s|$)`,"m"),i=null==(e=t.match(n))?void 0:e.index;return void 0!==i?i:-1},tokenize(t,n,r){const o=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),a=t.match(o);if(!a)return;const c=a[1]||"",u=i(c);return s.find(t=>!(t in u))?void 0:{type:e,raw:a[0],attributes:u}}},renderMarkdown:t=>{const e=(t=>{if(!a)return t;const e={};return a.forEach(n=>{n in t&&(e[n]=t[n])}),e})(t.attrs||{}),n=r(e);return`:::${l}${n?` {${n}}`:""} :::`}}}function cn(t){const{nodeName:e,name:n,getContent:i,parseAttributes:r=sn,serializeAttributes:o=an,defaultAttributes:s={},content:a="block",allowedAttributes:l}=t,c=n||e;return{parseMarkdown:(t,n)=>{let r;if(i){const e=i(t);r="string"==typeof e?[{type:"text",text:e}]:e}else r="block"===a?n.parseChildren(t.tokens||[]):n.parseInline(t.tokens||[]);const o={...s,...t.attributes};return n.createNode(e,o,r)},markdownTokenizer:{name:e,level:"block",start(t){var e;const n=new RegExp("^:::"+c,"m"),i=null==(e=t.match(n))?void 0:e.index;return void 0!==i?i:-1},tokenize(t,n,i){var o;const s=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),l=t.match(s);if(!l)return;const[u,d=""]=l,p=r(d);let h=1;const f=u.length;let m="";const g=/^:::([\w-]*)(\s.*)?/gm,v=t.slice(f);for(g.lastIndex=0;;){const n=g.exec(v);if(null===n)break;const r=n.index,s=n[1];if(!(null==(o=n[2])?void 0:o.endsWith(":::")))if(s)h+=1;else if(h-=1,0===h){const o=v.slice(0,r);m=o.trim();const s=t.slice(0,f+r+n[0].length);let l=[];if(m)if("block"===a)for(l=i.blockTokens(o),l.forEach(t=>{!t.text||t.tokens&&0!==t.tokens.length||(t.tokens=i.inlineTokens(t.text))});l.length>0;){const t=l[l.length-1];if("paragraph"!==t.type||t.text&&""!==t.text.trim())break;l.pop()}else l=i.inlineTokens(m);return{type:e,raw:s,attributes:p,content:m,tokens:l}}}}},renderMarkdown:(t,e)=>{const n=(t=>{if(!l)return t;const e={};return l.forEach(n=>{n in t&&(e[n]=t[n])}),e})(t.attrs||{}),i=o(n),r=i?` {${i}}`:"",s=e.renderChildren(t.content||[],"\n\n");return`:::${c}${r}\n\n${s}\n\n:::`}}}function un(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let i=n.exec(t);for(;null!==i;){const[,r,o,s]=i;e[r]=o||s,i=n.exec(t)}return e}function dn(t){return Object.entries(t).filter(([,t])=>null!=t).map(([t,e])=>`${t}="${e}"`).join(" ")}function pn(t){const{nodeName:e,name:n,getContent:i,parseAttributes:r=un,serializeAttributes:o=dn,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,u=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(t,n)=>{const r={...s,...t.attributes};if(a)return n.createNode(e,r);const o=i?i(t):t.content||"";return o?n.createNode(e,r,[n.createTextNode(o)]):n.createNode(e,r,[])},markdownTokenizer:{name:e,level:"inline",start(t){const e=a?new RegExp(`\\[${u}\\s*[^\\]]*\\]`):new RegExp(`\\[${u}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${u}\\]`),n=t.match(e),i=null==n?void 0:n.index;return void 0!==i?i:-1},tokenize(t,n,i){const o=a?new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`),s=t.match(o);if(!s)return;let l="",c="";if(a){const[,t]=s;c=t}else{const[,t,e]=s;c=t,l=e||""}const d=r(c.trim());return{type:e,raw:s[0],content:l.trim(),attributes:d}}},renderMarkdown:t=>{let e="";i?e=i(t):t.content&&t.content.length>0&&(e=t.content.filter(t=>"text"===t.type).map(t=>t.text).join(""));const n=(t=>{if(!l)return t;const e={};return l.forEach(n=>{const i="string"==typeof n?n:n.name,r="string"==typeof n?void 0:n.skipIfDefault;if(i in t){const n=t[i];if(void 0!==r&&n===r)return;e[i]=n}}),e})(t.attrs||{}),r=o(n),s=r?" "+r:"";return a?`[${c}${s}]`:`[${c}${s}]${e}[/${c}]`}}}function hn(t,e,n){var i,r,o,s;const a=t.split("\n"),l=[];let c="",u=0;const d=e.baseIndentSize||2;for(;u0)break;if(""===t.trim()){u+=1,c=`${c}${t}\n`;continue}return}const h=e.extractItemData(p),{indentLevel:f,mainContent:m}=h;c=`${c}${t}\n`;const g=[m];for(u+=1;u""!==t.trim());if(-1===e)break;if(((null==(r=null==(i=a[u+1+e].match(/^(\s*)/))?void 0:i[1])?void 0:r.length)||0)>f){g.push(t),c=`${c}${t}\n`,u+=1;continue}break}if(!(((null==(s=null==(o=t.match(/^(\s*)/))?void 0:o[1])?void 0:s.length)||0)>f))break;g.push(t),c=`${c}${t}\n`,u+=1}let v;const y=g.slice(1);if(y.length>0){const t=y.map(t=>t.slice(f+d)).join("\n");t.trim()&&(v=e.customNestedParser?e.customNestedParser(t):n.blockTokens(t))}const b=e.createToken(h,v);l.push(b)}if(0!==l.length)return{items:l,raw:c}}function fn(t,e,n,i){if(!t||!Array.isArray(t.content))return"";const r="function"==typeof n?n(i):n,[o,...s]=t.content;let a=`${r}${e.renderChildren([o])}`;return s&&s.length>0&&s.forEach((t,n)=>{var i,r;const o=null!=(r=null==(i=e.renderChild)?void 0:i.call(e,t,n+1))?r:e.renderChildren([t]);if(null!=o){const n=o.split("\n").map(t=>t?e.indent(t):e.indent("")).join("\n");a+="paragraph"===t.type?"\n\n"+n:"\n"+n}}),a}d({},{createAtomBlockMarkdownSpec:()=>ln,createBlockMarkdownSpec:()=>cn,createInlineMarkdownSpec:()=>pn,parseAttributes:()=>sn,parseIndentedBlocks:()=>hn,renderNestedMarkdownContent:()=>fn,serializeAttributes:()=>an});var mn=new WeakMap;function gn(t,e){let n=mn.get(t);if(!n){const e={callbacks:new Set,rafId:null,handler:()=>{null!==e.rafId&&cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(()=>{e.rafId=null,e.callbacks.forEach(t=>t())})}};mn.set(t,e),t.on("update",e.handler),n=e}n.callbacks.add(e)}function vn(t,e){const n=mn.get(t);n&&(n.callbacks.delete(e),0===n.callbacks.size&&(null!==n.rafId&&cancelAnimationFrame(n.rafId),t.off("update",n.handler),mn.delete(t)))}function yn(t,e,n={}){const{state:i}=e,{doc:r,tr:o}=i,s=t;r.descendants((e,i)=>{const r=o.mapping.map(i),a=o.mapping.map(i)+e.nodeSize;let l=null;if(e.marks.forEach(t=>{if(t!==s)return!1;l=t}),!l)return;let c=!1;if(Object.keys(n).forEach(t=>{n[t]!==l.attrs[t]&&(c=!0)}),c){const e=t.type.create({...t.attrs,...n});o.removeMark(r,a,t.type),o.addMark(r,a,e)}}),o.docChanged&&e.view.dispatch(o)}var bn=class t extends $e{constructor(){super(...arguments),this.type="node"}static create(e={}){const n="function"==typeof e?e():e;return new t(n)}configure(t){return super.configure(t)}extend(t){const e="function"==typeof t?t():t;return super.extend(e)}},_n=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,i,r,s,a,l;const{view:c}=this.editor,u=t.target,d=3===u.nodeType?null==(e=u.parentElement)?void 0:e.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(null==(n=this.contentDOM)?void 0:n.contains(u))||!d)return;let p=0,h=0;if(this.dom!==d){const e=this.dom.getBoundingClientRect(),n=d.getBoundingClientRect(),o=null!=(r=t.offsetX)?r:null==(i=t.nativeEvent)?void 0:i.offsetX,l=null!=(a=t.offsetY)?a:null==(s=t.nativeEvent)?void 0:s.offsetY;p=n.x-e.x+o,h=n.y-e.y+l}const f=this.dom.cloneNode(!0);try{const t=this.dom.getBoundingClientRect();f.style.width=Math.round(t.width)+"px",f.style.height=Math.round(t.height)+"px",f.style.boxSizing="border-box",f.style.pointerEvents="none"}catch{}let m=null;try{m=document.createElement("div"),m.style.position="absolute",m.style.top="-9999px",m.style.left="-9999px",m.style.pointerEvents="none",m.appendChild(f),document.body.appendChild(m),null==(l=t.dataTransfer)||l.setDragImage(f,p,h)}finally{m&&setTimeout(()=>{try{null==m||m.remove()}catch{}},0)}const g=this.getPos();if("number"!=typeof g)return;const v=o.NodeSelection.create(c.state.doc,g),y=c.state.tr.setSelection(v);c.dispatch(y)}stopEvent(t){var e;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:t});const n=t.target;if(!(this.dom.contains(n)&&!(null==(e=this.contentDOM)?void 0:e.contains(n))))return!1;const i=t.type.startsWith("drag"),r="dragover"===t.type||"dragenter"===t.type,s="drop"===t.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s&&!i)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=o.NodeSelection.isSelectable(this.node),d="copy"===t.type,p="paste"===t.type,h="cut"===t.type,f="mousedown"===t.type;if(!c&&u&&i&&t.target===this.dom&&t.preventDefault(),c&&i&&!l&&t.target===this.dom)return t.preventDefault(),!1;if(c&&a&&!l&&f){const t=n.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||r||s||d||p||h||f&&u)}ignoreMutation(t){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:t});if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===t.type)return!1;if(this.dom.contains(t.target)&&"childList"===t.type&&(B()||j())&&this.editor.isFocused){if([...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(t=>t.isContentEditable))return!1}return this.contentDOM===t.target&&"attributes"===t.type||!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const n=this.getPos();return"number"==typeof n&&(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if("number"!=typeof t)return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function xn(t){return new Fe({find:t.find,handler:({state:e,range:n,match:i,pasteEvent:r})=>{const o=Pt(t.getAttributes,void 0,i,r);if(!1===o||null===o)return null;const{tr:s}=e,a=i[i.length-1],l=i[0];let c=n.to;if(a){const r=l.search(/\S/),u=n.from+l.indexOf(a),d=u+a.length;if(Kt(n.from,n.to,e.doc).filter(e=>e.mark.type.excluded.find(n=>n===t.type&&n!==e.mark.type)).filter(t=>t.to>u).length)return null;dn.from&&s.delete(n.from+r,u),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(o||{}));void 0!==i.index&&void 0!==i.input&&i.index+i[0].length>=i.input.length||s.removeStoredMark(t.type)}}})}function wn(t){return new Fe({find:t.find,handler({match:e,chain:n,range:i,pasteEvent:r}){const o=Pt(t.getAttributes,void 0,e,r),s=Pt(t.getContent,void 0,o);if(!1===o||null===o)return null;const a={type:t.type.name,attrs:o};s&&(a.content=s),e.input&&n().deleteRange(i).insertContentAt(i.from,a)}})}},Hsns:function(t,e,n){var i=n("93I4"),r=n("5T2Y").document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},IP1Z:function(t,e,n){"use strict";var i=n("2faE"),r=n("rr1i");t.exports=function(t,e,n){e in t?i.f(t,e,r(0,n)):t[e]=n}},IfwE:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNonNegative=void 0;e.isNonNegative=t=>{if("number"!=typeof t||t<0||Number.isNaN(t))return"value should be a non-negative number"}},Ik2V:function(t,e,n){"use strict";n.r(e),n.d(e,"GapCursor",(function(){return a})),n.d(e,"gapCursor",(function(){return u}));var i=n("49oK"),r=n("b/sn"),o=n("byeC"),s=n("cD+i");class a extends r.Selection{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return a.valid(n)?new a(n):r.Selection.near(n)}content(){return o.Slice.empty}eq(t){return t instanceof a&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new a(t.resolve(e.pos))}getBookmark(){return new l(this.anchor)}static valid(t){let e=t.parent;if(e.inlineContent||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),i=t.node(e);if(0!=n)for(let t=i.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||c(t.type))return!0;if(t.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),i=t.node(e);if(n!=i.childCount)for(let t=i.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||c(t.type))return!0;if(t.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let i=e.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&a.valid(t))return t;let i=t.pos,o=null;for(let n=t.depth;;n--){let r=t.node(n);if(e>0?t.indexAfter(n)0){o=r.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;i+=e;let s=t.doc.resolve(i);if(a.valid(s))return s}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!r.NodeSelection.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*e),n=!1;continue t}break}o=s,i+=e;let l=t.doc.resolve(i);if(a.valid(l))return l}return null}}}a.prototype.visible=!1,a.findFrom=a.findGapCursorFrom,r.Selection.jsonID("gapcursor",a);class l{constructor(t){this.pos=t}map(t){return new l(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return a.valid(e)?new a(e):r.Selection.near(e)}}function c(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function u(){return new r.Plugin({props:{decorations:m,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&a.valid(n)?new a(n):null,handleClick:h,handleKeyDown:d,handleDOMEvents:{beforeinput:f}}})}const d=Object(i.keydownHandler)({ArrowLeft:p("horiz",-1),ArrowRight:p("horiz",1),ArrowUp:p("vert",-1),ArrowDown:p("vert",1)});function p(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,i,o){let s=t.selection,l=e>0?s.$to:s.$from,c=s.empty;if(s instanceof r.TextSelection){if(!o.endOfTextblock(n)||0==l.depth)return!1;c=!1,l=t.doc.resolve(e>0?l.after():l.before())}let u=a.findGapCursorFrom(l,e,c);return!!u&&(i&&i(t.tr.setSelection(new a(u))),!0)}}function h(t,e,n){if(!t||!t.editable)return!1;let i=t.state.doc.resolve(e);if(!a.valid(i))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&r.NodeSelection.isSelectable(t.state.doc.nodeAt(o.inside)))&&(t.dispatch(t.state.tr.setSelection(new a(i))),!0)}function f(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof a))return!1;let{$from:n}=t.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!i)return!1;let s=o.Fragment.empty;for(let t=i.length-1;t>=0;t--)s=o.Fragment.from(i[t].createAndFill(null,s));let l=t.state.tr.replace(n.pos,n.pos,new o.Slice(s,0,0));return l.setSelection(r.TextSelection.near(l.doc.resolve(n.pos+1))),t.dispatch(l),!1}function m(t){if(!(t.selection instanceof a))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",s.DecorationSet.create(t.doc,[s.Decoration.widget(t.selection.head,e,{key:"gapcursor"})])}},JB68:function(t,e,n){var i=n("Jes0");t.exports=function(t){return Object(i(t))}},"JMW+":function(t,e,n){"use strict";var i,r,o,s,a=n("uOPS"),l=n("5T2Y"),c=n("2GTP"),u=n("QMMT"),d=n("Y7ZC"),p=n("93I4"),h=n("eaoh"),f=n("EXMj"),m=n("oioR"),g=n("8gHz"),v=n("QXhf").set,y=n("q6LJ")(),b=n("ZW5q"),_=n("RDmV"),x=n("vBP9"),w=n("zXhZ"),k=l.TypeError,C=l.process,S=C&&C.versions,E=S&&S.v8||"",T=l.Promise,A="process"==u(C),M=function(){},P=r=b.f,O=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n("UWiX")("species")]=function(t){t(M,M)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e&&0!==E.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),D=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;y((function(){for(var i=t._v,r=1==t._s,o=0,s=function(e){var n,o,s,a=r?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{a?(r||(2==t._h&&F(t),t._h=1),!0===a?n=i:(u&&u.enter(),n=a(i),u&&(u.exit(),s=!0)),n===e.promise?c(k("Promise-chain cycle")):(o=D(n))?o.call(n,l,c):l(n)):c(i)}catch(t){u&&!s&&u.exit(),c(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&$(t)}))}},$=function(t){v.call(l,(function(){var e,n,i,r=t._v,o=N(t);if(o&&(e=_((function(){A?C.emit("unhandledRejection",r,t):(n=l.onunhandledrejection)?n({promise:t,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)})),t._h=A||N(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},N=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){v.call(l,(function(){var e;A?C.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})}))},R=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},L=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(e=D(t))?y((function(){var i={_w:n,_d:!1};try{e.call(t,c(L,i,1),c(R,i,1))}catch(t){R.call(i,t)}})):(n._v=t,n._s=1,I(n,!1))}catch(t){R.call({_w:n,_d:!1},t)}}};O||(T=function(t){f(this,T,"Promise","_h"),h(t),i.call(this);try{t(c(L,this,1),c(R,this,1))}catch(t){R.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("XJU/")(T.prototype,{then:function(t,e){var n=P(g(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=A?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new i;this.promise=t,this.resolve=c(L,t,1),this.reject=c(R,t,1)},b.f=P=function(t){return t===T||t===s?new o(t):r(t)}),d(d.G+d.W+d.F*!O,{Promise:T}),n("RfKB")(T,"Promise"),n("TJWN")("Promise"),s=n("WEpk").Promise,d(d.S+d.F*!O,"Promise",{reject:function(t){var e=P(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(a||!O),"Promise",{resolve:function(t){return w(a&&this===s?T:this,t)}}),d(d.S+d.F*!(O&&n("TuGD")((function(t){T.all(t).catch(M)}))),"Promise",{all:function(t){var e=this,n=P(e),i=n.resolve,r=n.reject,o=_((function(){var n=[],o=0,s=1;m(t,!1,(function(t){var a=o++,l=!1;n.push(void 0),s++,e.resolve(t).then((function(t){l||(l=!0,n[a]=t,--s||i(n))}),r)})),--s||i(n)}));return o.e&&r(o.v),n.promise},race:function(t){var e=this,n=P(e),i=n.reject,r=_((function(){m(t,!1,(function(t){e.resolve(t).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},"JS6+":function(t,e,n){"use strict";n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return l}));var i=n("rfXi"),r=n.n(i),o=n("0lmf");function s(t){if("string"!=typeof t||""===t.trim())return"";var e=(new window.DOMParser).parseFromString("
"+t+"
","text/html"),n=e.body.firstElementChild;return n?(r()(n.querySelectorAll("*")).forEach((function(t){t.classList.remove("ProseMirror-selectednode"),t.classList.remove("is-empty"),t.classList.remove("is-editor-empty"),t.classList.remove("has-focus"),t.className&&String(t.className).trim()||t.removeAttribute("class"),"true"!==t.getAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable")||t.removeAttribute("contenteditable"),t.removeAttribute("data-empty-text"),t.removeAttribute("data-placeholder"),t.removeAttribute("draggable"),t.removeAttribute("tabindex"),t.removeAttribute("spellcheck"),t.tagName&&"figcaption"===t.tagName.toLowerCase()&&function(t,e){if(t){var n={a:["href","title","target","rel"],em:[],strong:[],u:[]};r()(t.querySelectorAll("*")).forEach((function(t){var i=t.tagName.toLowerCase();n[i]?r()(t.attributes).forEach((function(e){-1===n[i].indexOf(e.name)&&t.removeAttribute(e.name)})):function(t,e){if(t&&t.parentNode){for(var n=e.createDocumentFragment();t.firstChild;)n.appendChild(t.firstChild);t.parentNode.replaceChild(n,t)}}(t,e)})),t.setAttribute("class","grc__figcaption"),""===(t.textContent||"").trim()&&t.parentNode.removeChild(t)}}(t,e)})),Object(o.c)(n.innerHTML)):""}function a(t){return s(function(t){if("string"!=typeof t||-1===t.indexOf("yt-container")&&-1===t.indexOf("youtube.com/embed/")&&-1===t.indexOf("youtube-nocookie.com/embed/"))return Object(o.c)(t);var e=(new window.DOMParser).parseFromString("
"+t+"
","text/html"),n=e.body.firstElementChild;return n?(r()(n.querySelectorAll(".yt-container[data-id]")).forEach((function(t){var n=t.getAttribute("data-id")||"";if(n){var i=e.createElement("div"),r=e.createElement("iframe");i.setAttribute("data-youtube-video",""),r.setAttribute("src","https://www.youtube.com/embed/"+n),r.setAttribute("width",t.getAttribute("data-width")||"585"),r.setAttribute("height",t.getAttribute("data-height")||"329"),r.setAttribute("frameborder","0"),r.setAttribute("allowfullscreen","true"),r.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),i.appendChild(r),t.parentNode.replaceChild(i,t)}})),r()(n.querySelectorAll("iframe")).forEach((function(t){var n=t.getAttribute("src")||"";if(n&&(-1!==n.indexOf("youtube.com/embed/")||-1!==n.indexOf("youtube-nocookie.com/embed/"))&&(!t.parentNode||1!==t.parentNode.nodeType||!t.parentNode.hasAttribute("data-youtube-video"))){var i=e.createElement("div");i.setAttribute("data-youtube-video",""),t.parentNode.replaceChild(i,t),i.appendChild(t)}})),Object(o.c)(n.innerHTML)):Object(o.c)(t)}(t))||"

"}function l(t){if(t&&t.view&&t.view.dom&&"function"==typeof $.fn.ytLazyLoad){var e=$(t.view.dom);e.find(".yt-container").ytLazyLoad(!0),e.find(".yt-container").attr("contenteditable",!1),e.find(".quote").attr("contenteditable",!1)}}},Jes0:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},K7XR:function(t,e,n){"use strict";e.__esModule=!0;n("gSIQ");e.default={mounted:function(){},methods:{getMigratingConfig:function(){return{props:{},events:{}}}}}},"KHd+":function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},KUxP:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},KW5J:function(t,e){},Kl55:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(o.default.prototype.$isServer)return;if(!e)return void(t.scrollTop=0);var n=[],i=e.offsetParent;for(;i&&t!==i&&t.contains(i);)n.push(i),i=i.offsetParent;var r=e.offsetTop+n.reduce((function(t,e){return t+e.offsetTop}),0),s=r+e.offsetHeight,a=t.scrollTop,l=a+t.clientHeight;rl&&(t.scrollTop=s-t.clientHeight)};var i,r=n("oCYn"),o=(i=r)&&i.__esModule?i:{default:i}},LEl0:function(t,e,n){"use strict";var i=n("cU5j"),r=n("u/5A"),o=n("o6SV"),s={name:"DiscussionsTiptapEditor",components:{GenericTiptapEditor:i.a},props:{value:{type:String,default:""},placeholder:{type:String,default:""},minHeight:{type:Number,default:200},stickyToolbar:{type:Boolean,default:!1},toolbarComponent:{type:[String,Object],default:"TiptapEditorToolbar"},imageDialogComponent:{type:[String,Object],default:"TiptapEditorImageDialog"},uploadUrl:{type:String,default:r.c},uploadHeaders:{type:Object,default:null},uploadCategory:{type:String,default:"photos"},defaultImageSourceMode:{type:String,default:"url"},createEditor:{type:Function,default:o.a},editorFeatures:{type:Object,default:function(){return{discussionQuote:!0,mediaUpload:!0,spoiler:!0,youtube:!0,youtubeAutoEmbed:!0}}},quoteCommandName:{type:String,default:"discussion_quote"},videoCommandName:{type:String,default:"video_embed"},videoNodeName:{type:String,default:"video_embed"}},methods:{focus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.$refs.editor&&this.$refs.editor.focus(t)},getHTML:function(){return this.$refs.editor?this.$refs.editor.getHTML():""},insertQuote:function(t){return this.$refs.editor&&this.$refs.editor.insertQuote(t)},uploadEditorImageFiles:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.$refs.editor&&this.$refs.editor.uploadEditorImageFiles(t,e)}}},a=n("KHd+"),l=Object(a.a)(s,(function(){var t=this.$createElement;return(this._self._c||t)("generic-tiptap-editor",this._g(this._b({ref:"editor"},"generic-tiptap-editor",this.$props,!1),this.$listeners))}),[],!1,null,null,null);e.a=l.exports},"LPu/":function(t,e){},Lsik:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arrayProp=void 0;const i=n("zyfj");e.arrayProp=t=>(0,i.propOptionsGenerator)(Array,t)},M1xp:function(t,e,n){var i=n("a0xu");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},MCSJ:function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},MPFp:function(t,e,n){"use strict";var i=n("uOPS"),r=n("Y7ZC"),o=n("kTiW"),s=n("NegM"),a=n("SBuE"),l=n("j2DC"),c=n("RfKB"),u=n("U+KD"),d=n("UWiX")("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,f,m,g,v){l(n,e,f);var y,b,_,x=function(t){if(!p&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",k="values"==m,C=!1,S=t.prototype,E=S[d]||S["@@iterator"]||m&&S[m],T=E||x(m),A=m?k?x("entries"):T:void 0,M="Array"==e&&S.entries||E;if(M&&(_=u(M.call(new t)))!==Object.prototype&&_.next&&(c(_,w,!0),i||"function"==typeof _[d]||s(_,d,h)),k&&E&&"values"!==E.name&&(C=!0,T=function(){return E.call(this)}),i&&!v||!p&&!C&&S[d]||s(S,d,T),a[e]=T,a[w]=h,m)if(y={values:k?T:x("values"),keys:g?T:x("keys"),entries:A},v)for(b in y)b in S||o(S,b,y[b]);else r(r.P+r.F*(p||C),e,y);return y}},"MaG/":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNonPositive=e.isNonNegative=e.isPositive=e.isNegative=e.instanceOfProp=e.oneOfTypesProp=e.oneOfObjectKeysProp=e.oneOfProp=e.functionProp=e.objectProp=e.arrayProp=e.anyProp=e.vueComponentProp=e.symbolProp=e.integerProp=e.numberProp=e.booleanProp=e.stringProp=void 0;var i=n("SsGo");Object.defineProperty(e,"stringProp",{enumerable:!0,get:function(){return i.stringProp}});var r=n("FMiQ");Object.defineProperty(e,"booleanProp",{enumerable:!0,get:function(){return r.booleanProp}});var o=n("v28A");Object.defineProperty(e,"numberProp",{enumerable:!0,get:function(){return o.numberProp}});var s=n("sEkU");Object.defineProperty(e,"integerProp",{enumerable:!0,get:function(){return s.integerProp}});var a=n("1hDP");Object.defineProperty(e,"symbolProp",{enumerable:!0,get:function(){return a.symbolProp}});var l=n("l8ok");Object.defineProperty(e,"vueComponentProp",{enumerable:!0,get:function(){return l.vueComponentProp}});var c=n("377r");Object.defineProperty(e,"anyProp",{enumerable:!0,get:function(){return c.anyProp}});var u=n("Lsik");Object.defineProperty(e,"arrayProp",{enumerable:!0,get:function(){return u.arrayProp}});var d=n("j9nl");Object.defineProperty(e,"objectProp",{enumerable:!0,get:function(){return d.objectProp}});var p=n("4IEJ");Object.defineProperty(e,"functionProp",{enumerable:!0,get:function(){return p.functionProp}});var h=n("m7fW");Object.defineProperty(e,"oneOfProp",{enumerable:!0,get:function(){return h.oneOfProp}});var f=n("ma6Y");Object.defineProperty(e,"oneOfObjectKeysProp",{enumerable:!0,get:function(){return f.oneOfObjectKeysProp}});var m=n("huD+");Object.defineProperty(e,"oneOfTypesProp",{enumerable:!0,get:function(){return m.oneOfTypesProp}});var g=n("wPni");Object.defineProperty(e,"instanceOfProp",{enumerable:!0,get:function(){return g.instanceOfProp}});var v=n("cHSS");Object.defineProperty(e,"isNegative",{enumerable:!0,get:function(){return v.isNegative}});var y=n("89Qr");Object.defineProperty(e,"isPositive",{enumerable:!0,get:function(){return y.isPositive}});var b=n("IfwE");Object.defineProperty(e,"isNonNegative",{enumerable:!0,get:function(){return b.isNonNegative}});var _=n("8Ldi");Object.defineProperty(e,"isNonPositive",{enumerable:!0,get:function(){return _.isNonPositive}})},MjBc:function(t,e,n){"use strict";var i=n("EJiy"),r=n.n(i),o=n("QbLZ"),s=n.n(o),a={props:{data:Object,loaded:{type:Boolean,default:!1}},data:function(){return{trigger:"click",is_loaded:!1,options_loading:!0,current_component:"",component_visible:!1,component_data:{},report_dialog:!1,params:{items:[]}}},mounted:function(){this.params=s()({},this.data),this.component_data={type:this.params.ctype,id:this.params.cid}},computed:{options:function(){return this.params.items.slice()}},methods:{mouseEnter:function(){this.is_loaded||this.reloadMenu()},reloadMenu:function(){var t=this;this.is_loaded=!0,this.$http.Get("/v1/users/actions",this.component_data,(function(e){t.params=e})).fail((function(){t.is_loaded=!1}))},redirect:function(t){window.location.href=t},toDashcase:function(t){for(var e=t.split(" "),n=1,i=e.length;n .options-menu");i.find(".icon-sticky").remove(),"sticky"==t.key&&i.prepend(''),e.reloadMenu()}))},subscribeTopic:function(t){var e=this;this.$http.Post("/v1/users/notifications/subscribe",{id:this.params.cid,do:t.label.toLowerCase(),type:"topic.reply"},(function(n){e.reloadMenu();var i=$(".notify-status");if("unsubscribe"==t.key)return i.removeClass("active"),void i.attr("title",e.$t("You are not subscribed to this topic."));i.addClass("active"),i.attr("title",e.$t("You are subscribed to this topic."))}))},resolvedTopic:function(t){this.$http.Patch("/v1/forums/topics/"+this.params.cid+"/resolve",{resolved:"mark-resolved"==t.key},(function(e){var n=$(".discussion-header > .options-menu");n.find(".icon-sticky").remove(),"mark-resolved"==t.key?n.find(".ticket-status").addClass("resolved").text("Resolved"):n.find(".ticket-status").removeClass("resolved").text("Unresolved"),window.location.reload()}))},closeTopic:function(t){this.$http.Patch("/v1/forums/topics/"+this.params.cid+"/close",{},(function(t){window.location.reload()}))},deleteTopic:function(){this.confirmCommand("/v1/forums/topics/"+this.params.cid,this.$t("Are you sure you want delete this topic?"),(function(t){window.location.reload()}))},MoveTopic:function(){},editPost:function(){this.current_component="edit-post-dialog",this.component_visible=!0},editPhoto:function(){this.current_component="edit-photo-dialog",this.component_visible=!0},deletePhoto:function(){this.confirmCommand("/v1/photos/"+this.params.cid,this.$t("Are you sure you want delete this post?"),(function(t){window.location.reload()}))},banUser:function(t){this.confirmCommand({url:"/v1/admin/users/"+t.extra+"/ban",type:"PATCH",auc:!0},this.$t("Are you sure you want ban this user?"),(function(t){window.location.reload()}))},unbanUser:function(t){this.confirmCommand({url:"/v1/admin/users/"+t.extra+"/unban",type:"PATCH",auc:!0},this.$t("Are you sure you want unban this user?"),(function(t){window.location.reload()}))},deleteRec:function(){var t=this;this.confirmCommand("/v1/recs/"+this.params.cid,this.$t("Are you sure you want delete this recommendation?"),(function(){$("#more-recs-"+t.params.cid).length?setTimeout((function(){location.reload()}),1e3):$("#rec_"+t.params.cid).fadeOut((function(){$(this).remove()}))}))}}},l=n("KHd+"),c=Object(l.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mdl-dropdown",on:{mouseenter:t.mouseEnter}},[n("el-dropdown",{attrs:{trigger:t.trigger},on:{command:t.handleCommand}},[n("span",{staticClass:"el-dropdown-link"},[n("i",{staticClass:"far fa-chevron-down"})]),t._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.options.length<=0?n("div",{staticClass:"el-dropdown-menu__item"}):t._e(),t._v(" "),t._l(t.options,(function(e){return n("el-dropdown-item",{key:e.value,attrs:{command:e}},[e.icon?n("i",{class:e.icon}):t._e(),t._v(t._s(e.label))])}))],2)],1),t._v(" "),t.component_visible?n(t.current_component,{tag:"component",attrs:{visible:t.component_visible,data:t.component_data},on:{"update:visible":function(e){t.component_visible=e}}}):t._e()],1)}),[],!1,null,null,null);e.a=c.exports},Mqbl:function(t,e,n){var i=n("JB68"),r=n("w6GO");n("zn7N")("keys",(function(){return function(t){return r(i(t))}}))},MvwC:function(t,e,n){var i=n("5T2Y").document;t.exports=i&&i.documentElement},N4fY:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=67)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},3:function(t,e){t.exports=n("gSIQ")},4:function(t,e){t.exports=n("0BDH")},48:function(t,e){t.exports=n("oV5b")},67:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"el-form-item",class:[{"el-form-item--feedback":t.elForm&&t.elForm.statusIcon,"is-error":"error"===t.validateState,"is-validating":"validating"===t.validateState,"is-success":"success"===t.validateState,"is-required":t.isRequired||t.required,"is-no-asterisk":t.elForm&&t.elForm.hideRequiredAsterisk},t.sizeClass?"el-form-item--"+t.sizeClass:""]},[n("label-wrap",{attrs:{"is-auto-width":t.labelStyle&&"auto"===t.labelStyle.width,"update-all":"auto"===t.form.labelWidth}},[t.label||t.$slots.label?n("label",{staticClass:"el-form-item__label",style:t.labelStyle,attrs:{for:t.labelFor}},[t._t("label",[t._v(t._s(t.label+t.form.labelSuffix))])],2):t._e()]),n("div",{staticClass:"el-form-item__content",style:t.contentStyle},[t._t("default"),n("transition",{attrs:{name:"el-zoom-in-top"}},["error"===t.validateState&&t.showMessage&&t.form.showMessage?t._t("error",[n("div",{staticClass:"el-form-item__error",class:{"el-form-item__error--inline":"boolean"==typeof t.inlineMessage?t.inlineMessage:t.elForm&&t.elForm.inlineMessage||!1}},[t._v("\n "+t._s(t.validateMessage)+"\n ")])],{error:t.validateMessage}):t._e()],2)],2)],1)};i._withStripped=!0;var r=n(48),o=n.n(r),s=n(4),a=n.n(s),l=n(9),c=n.n(l),u=n(3),d={props:{isAutoWidth:Boolean,updateAll:Boolean},inject:["elForm","elFormItem"],render:function(){var t=arguments[0],e=this.$slots.default;if(!e)return null;if(this.isAutoWidth){var n=this.elForm.autoLabelWidth,i={};if(n&&"auto"!==n){var r=parseInt(n,10)-this.computedWidth;r&&(i.marginLeft=r+"px")}return t("div",{class:"el-form-item__label-wrap",style:i},[e])}return e[0]},methods:{getLabelWidth:function(){if(this.$el&&this.$el.firstElementChild){var t=window.getComputedStyle(this.$el.firstElementChild).width;return Math.ceil(parseFloat(t))}return 0},updateLabelWidth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update";this.$slots.default&&this.isAutoWidth&&this.$el.firstElementChild&&("update"===t?this.computedWidth=this.getLabelWidth():"remove"===t&&this.elForm.deregisterLabelWidth(this.computedWidth))}},watch:{computedWidth:function(t,e){this.updateAll&&(this.elForm.registerLabelWidth(t,e),this.elFormItem.updateComputedLabelWidth(t))}},data:function(){return{computedWidth:0}},mounted:function(){this.updateLabelWidth("update")},updated:function(){this.updateLabelWidth("update")},beforeDestroy:function(){this.updateLabelWidth("remove")}},p=n(0),h=Object(p.a)(d,void 0,void 0,!1,null,null,null);h.options.__file="packages/form/src/label-wrap.vue";var f=h.exports,m={name:"ElFormItem",componentName:"ElFormItem",mixins:[a.a],provide:function(){return{elFormItem:this}},inject:["elForm"],props:{label:String,labelWidth:String,prop:String,required:{type:Boolean,default:void 0},rules:[Object,Array],error:String,validateStatus:String,for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:String},components:{LabelWrap:f},watch:{error:{immediate:!0,handler:function(t){this.validateMessage=t,this.validateState=t?"error":""}},validateStatus:function(t){this.validateState=t}},computed:{labelFor:function(){return this.for||this.prop},labelStyle:function(){var t={};if("top"===this.form.labelPosition)return t;var e=this.labelWidth||this.form.labelWidth;return e&&(t.width=e),t},contentStyle:function(){var t={},e=this.label;if("top"===this.form.labelPosition||this.form.inline)return t;if(!e&&!this.labelWidth&&this.isNested)return t;var n=this.labelWidth||this.form.labelWidth;return"auto"===n?"auto"===this.labelWidth?t.marginLeft=this.computedLabelWidth:"auto"===this.form.labelWidth&&(t.marginLeft=this.elForm.autoLabelWidth):t.marginLeft=n,t},form:function(){for(var t=this.$parent,e=t.$options.componentName;"ElForm"!==e;)"ElFormItem"===e&&(this.isNested=!0),e=(t=t.$parent).$options.componentName;return t},fieldValue:function(){var t=this.form.model;if(t&&this.prop){var e=this.prop;return-1!==e.indexOf(":")&&(e=e.replace(/:/,".")),Object(u.getPropByPath)(t,e,!0).v}},isRequired:function(){var t=this.getRules(),e=!1;return t&&t.length&&t.every((function(t){return!t.required||(e=!0,!1)})),e},_formSize:function(){return this.elForm.size},elFormItemSize:function(){return this.size||this._formSize},sizeClass:function(){return this.elFormItemSize||(this.$ELEMENT||{}).size}},data:function(){return{validateState:"",validateMessage:"",validateDisabled:!1,validator:{},isNested:!1,computedLabelWidth:""}},methods:{validate:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.noop;this.validateDisabled=!1;var i=this.getFilteredRule(t);if((!i||0===i.length)&&void 0===this.required)return n(),!0;this.validateState="validating";var r={};i&&i.length>0&&i.forEach((function(t){delete t.trigger})),r[this.prop]=i;var s=new o.a(r),a={};a[this.prop]=this.fieldValue,s.validate(a,{firstFields:!0},(function(t,i){e.validateState=t?"error":"success",e.validateMessage=t?t[0].message:"",n(e.validateMessage,i),e.elForm&&e.elForm.$emit("validate",e.prop,!t,e.validateMessage||null)}))},clearValidate:function(){this.validateState="",this.validateMessage="",this.validateDisabled=!1},resetField:function(){var t=this;this.validateState="",this.validateMessage="";var e=this.form.model,n=this.fieldValue,i=this.prop;-1!==i.indexOf(":")&&(i=i.replace(/:/,"."));var r=Object(u.getPropByPath)(e,i,!0);this.validateDisabled=!0,Array.isArray(n)?r.o[r.k]=[].concat(this.initialValue):r.o[r.k]=this.initialValue,this.$nextTick((function(){t.validateDisabled=!1})),this.broadcast("ElTimeSelect","fieldReset",this.initialValue)},getRules:function(){var t=this.form.rules,e=this.rules,n=void 0!==this.required?{required:!!this.required}:[],i=Object(u.getPropByPath)(t,this.prop||"");return t=t?i.o[this.prop||""]||i.v:[],[].concat(e||t||[]).concat(n)},getFilteredRule:function(t){return this.getRules().filter((function(e){return!e.trigger||""===t||(Array.isArray(e.trigger)?e.trigger.indexOf(t)>-1:e.trigger===t)})).map((function(t){return c()({},t)}))},onFieldBlur:function(){this.validate("blur")},onFieldChange:function(){this.validateDisabled?this.validateDisabled=!1:this.validate("change")},updateComputedLabelWidth:function(t){this.computedLabelWidth=t?t+"px":""},addValidateEvents:function(){(this.getRules().length||void 0!==this.required)&&(this.$on("el.form.blur",this.onFieldBlur),this.$on("el.form.change",this.onFieldChange))},removeValidateEvents:function(){this.$off()}},mounted:function(){if(this.prop){this.dispatch("ElForm","el.form.addField",[this]);var t=this.fieldValue;Array.isArray(t)&&(t=[].concat(t)),Object.defineProperty(this,"initialValue",{value:t}),this.addValidateEvents()}},beforeDestroy:function(){this.dispatch("ElForm","el.form.removeField",[this])}},g=Object(p.a)(m,i,[],!1,null,null,null);g.options.__file="packages/form/src/form-item.vue";var v=g.exports;v.install=function(t){t.component(v.name,v)};e.default=v},9:function(t,e){t.exports=n("f03z")}})},NV0k:function(t,e){e.f={}.propertyIsEnumerable},NXre:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceOf=void 0;e.isInstanceOf=t=>e=>{if(!(e instanceof t))return"value should be an instance of "+t.name}},NegM:function(t,e,n){var i=n("2faE"),r=n("rr1i");t.exports=n("jmDH")?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},"NsO/":function(t,e,n){var i=n("M1xp"),r=n("Jes0");t.exports=function(t){return i(r(t))}},NwJ3:function(t,e,n){var i=n("SBuE"),r=n("UWiX")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},ODRq:function(t,e,n){t.exports={default:n("UDep"),__esModule:!0}},OUnJ:function(t,e,n){"use strict";(function(t){var i=n("GdW1");var r=function(t,e,n,i,r,o,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);var u,d="function"==typeof n?n.options:n;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),i&&(d._scopeId=i),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=u):e&&(u=s?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),u)if(d.functional){var p=d.render;d.render=function(t,e){return u.call(e),p(t,e)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return n},o={name:"vue-cookie-accept-decline",props:{elementId:{type:String,required:!0},debug:{type:Boolean,default:!1},disableDecline:{type:Boolean,default:!1},position:{type:String,default:"bottom-left"},type:{type:String,default:"floating"},transitionName:{type:String,default:"slideFromBottom"},showPostponeButton:{type:Boolean,default:!1},forceCookies:{type:Boolean,default:!1}},data:function(){return{status:null,supportsLocalStorage:!0,isOpen:!1}},computed:{containerPosition:function(){return"cookie--"+this.position},containerType:function(){return"cookie--"+this.type}},mounted:function(){this.checkLocalStorageFunctionality(),this.init()},methods:{init:function(){var t=this.getCookieStatus();!t||"accept"!==t&&"decline"!==t&&"postpone"!==t||(this.isOpen=!1),t||(this.isOpen=!0),this.status=t,this.$emit("status",t)},checkLocalStorageFunctionality:function(){if(this.forceCookies)this.supportsLocalStorage=!1;else try{var t="__vue-cookie-accept-decline-check-localStorage";window.localStorage.setItem(t,t),window.localStorage.removeItem(t)}catch(t){console.error("Local storage is not supported, falling back to cookie use"),this.supportsLocalStorage=!1}},setCookieStatus:function(t){this.supportsLocalStorage?("accept"===t&&localStorage.setItem("vue-cookie-accept-decline-"+this.elementId,"accept"),"decline"===t&&localStorage.setItem("vue-cookie-accept-decline-"+this.elementId,"decline"),"postpone"===t&&localStorage.setItem("vue-cookie-accept-decline-"+this.elementId,"postpone")):("accept"===t&&Object(i.b)("vue-cookie-accept-decline-"+this.elementId,"accept"),"decline"===t&&Object(i.b)("vue-cookie-accept-decline-"+this.elementId,"decline"),"postpone"===t&&Object(i.b)("vue-cookie-accept-decline-"+this.elementId,"postpone"))},getCookieStatus:function(){return this.supportsLocalStorage?localStorage.getItem("vue-cookie-accept-decline-"+this.elementId):Object(i.a)("vue-cookie-accept-decline-"+this.elementId)},accept:function(){this.debug||this.setCookieStatus("accept"),this.status="accept",this.isOpen=!1,this.$emit("clicked-accept")},decline:function(){this.debug||this.setCookieStatus("decline"),this.status="decline",this.isOpen=!1,this.$emit("clicked-decline")},postpone:function(){this.debug||this.setCookieStatus("postpone"),this.status="postpone",this.isOpen=!1,this.$emit("clicked-postpone")},removeCookie:function(){localStorage.removeItem("vue-cookie-accept-decline-"+this.elementId),this.status=null,this.$emit("removed-cookie")}}},s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{appear:"",name:t.transitionName}},[t.isOpen?n("div",{staticClass:"cookie",class:["cookie__"+t.type,"cookie__"+t.type+"--"+t.position],attrs:{id:t.elementId}},[n("div",{class:"cookie__"+t.type+"__wrap"},[!0===t.showPostponeButton?n("div",{class:"cookie__"+t.type+"__postpone-button",attrs:{title:"Close"},on:{click:t.postpone}},[t._t("postponeContent",[t._v("\n ×\n ")])],2):t._e(),t._v(" "),n("div",{class:"cookie__"+t.type+"__content"},[t._t("message",[t._v("\n We use cookies to ensure you get the best experience on our website. "),n("a",{attrs:{href:"https://cookiesandyou.com/",target:"_blank"}},[t._v("Learn More...")])])],2),t._v(" "),n("div",{class:"cookie__"+t.type+"__buttons"},[!1===t.disableDecline?n("button",{class:["cookie__"+t.type+"__buttons__button","cookie__"+t.type+"__buttons__button--decline"],on:{click:t.decline}},[t._t("declineContent",[t._v("\n Opt Out\n ")])],2):t._e(),t._v(" "),n("button",{class:["cookie__"+t.type+"__buttons__button","cookie__"+t.type+"__buttons__button--accept"],on:{click:t.accept}},[t._t("acceptContent",[t._v("\n Got It!\n ")])],2)])])]):t._e()])};s._withStripped=!0;var a=r({render:s,staticRenderFns:[]},void 0,o,void 0,!1,void 0,void 0,void 0);var l={install:function t(e){t.installed||(t.installed=!0,e.component("VueCookieAcceptDecline",a))}},c=null;"undefined"!=typeof window?c=window.Vue:void 0!==t&&(c=t.Vue),c&&c.use(l),e.a=a}).call(this,n("yLpj"))},Ojgd:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},Ovn1:function(t,e,n){"use strict";var i={props:["visible","data"],data:function(){return{report_type:null,submit_loading:!1,explain:"",options:{duplicate:!0,offensive_or_spam:!0,incorrect_information:!0,no_longer_relevant:!0,spoiler_alert:!0}}},mounted:function(){switch(this.data.type){case"post":this.options.duplicate=!1,this.options.no_longer_relevant=!1}},computed:{isVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}}},methods:{submit:function(){var t=this;this.submit_loading=!0;var e={id:this.data.id,type:this.data.type,url:window.location.pathname,title:$("title").text(),explain:this.explain,reason:this.report_type};this.$http.Post("/v1/users/flags",e,(function(){t.submit_loading=!1,t.isVisible=!1,t.$notify({offset:60,type:"success",message:t.$t("Report Submitted Successfully.")})})).fail((function(){t.submit_loading=!1}))}}},r=n("KHd+"),o=Object(r.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"mdl-modal"}},[n("el-dialog",{attrs:{visible:t.isVisible,title:"Report an issue",width:"700px","append-to-body":!0},on:{"update:visible":function(e){t.isVisible=e}}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[t.options.duplicate?n("div",{staticClass:"col-lg-4"},[n("el-radio",{attrs:{label:"10"},model:{value:t.report_type,callback:function(e){t.report_type=e},expression:"report_type"}},[t._v(t._s(t.$t("Duplicate")))])],1):t._e(),t._v(" "),t.options.offensive_or_spam?n("div",{staticClass:"col-lg-4"},[n("el-radio",{attrs:{label:"1"},model:{value:t.report_type,callback:function(e){t.report_type=e},expression:"report_type"}},[t._v(t._s(t.$t("Offensive")))])],1):t._e(),t._v(" "),t.options.offensive_or_spam?n("div",{staticClass:"col-lg-4"},[n("el-radio",{attrs:{label:"2"},model:{value:t.report_type,callback:function(e){t.report_type=e},expression:"report_type"}},[t._v(t._s(t.$t("Spam")))])],1):t._e(),t._v(" "),t.options.incorrect_information?n("div",{staticClass:"col-lg-4"},[n("el-radio",{attrs:{label:"3"},model:{value:t.report_type,callback:function(e){t.report_type=e},expression:"report_type"}},[t._v(t._s(t.$t("Incorrect Information")))])],1):t._e(),t._v(" "),t.options.no_longer_relevant?n("div",{staticClass:"col-lg-4"},[n("el-radio",{attrs:{label:"4"},model:{value:t.report_type,callback:function(e){t.report_type=e},expression:"report_type"}},[t._v(t._s(t.$t("No longer relevant")))])],1):t._e(),t._v(" "),t.options.spoiler_alert?n("div",{staticClass:"col-lg-4"},[n("el-radio",{attrs:{label:"5"},model:{value:t.report_type,callback:function(e){t.report_type=e},expression:"report_type"}},[t._v(t._s(t.$t("Spoiler Alert")))])],1):t._e()])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"form-label"}},[n("b",[t._v(t._s(t.$t("Explanation"))+"*:")])]),t._v(" "),n("el-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:t.explain,callback:function(e){t.explain=e},expression:"explain"}})],1),t._v(" "),n("div",{staticClass:"m-t clearfix"},[n("el-button",{staticClass:"btn pull-right",attrs:{loading:t.submit_loading,type:"primary"},on:{click:t.submit}},[n("span",[t._v("Submit")])])],1)])],1)}),[],!1,null,null,null);e.a=o.exports},P2sY:function(t,e,n){t.exports={default:n("UbbE"),__esModule:!0}},PBE1:function(t,e,n){"use strict";var i=n("Y7ZC"),r=n("WEpk"),o=n("5T2Y"),s=n("8gHz"),a=n("zXhZ");i(i.P+i.R,"Promise",{finally:function(t){var e=s(this,r.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then((function(){return n}))}:t,n?function(n){return a(e,t()).then((function(){throw n}))}:t)}})},PDX0:function(t,e){(function(e){t.exports=e}).call(this,{})},PE4B:function(t,e,n){"use strict";var i=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===r}(t)}(t)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(t,e){var n;return e&&!0===e.clone&&i(t)?a((n=t,Array.isArray(n)?[]:{}),t,e):t}function s(t,e,n){var r=t.slice();return e.forEach((function(e,s){void 0===r[s]?r[s]=o(e,n):i(e)?r[s]=a(t[s],e,n):-1===t.indexOf(e)&&r.push(o(e,n))})),r}function a(t,e,n){var r=Array.isArray(e);return r===Array.isArray(t)?r?((n||{arrayMerge:s}).arrayMerge||s)(t,e,n):function(t,e,n){var r={};return i(t)&&Object.keys(t).forEach((function(e){r[e]=o(t[e],n)})),Object.keys(e).forEach((function(s){i(e[s])&&t[s]?r[s]=a(t[s],e[s],n):r[s]=o(e[s],n)})),r}(t,e,n):o(e,n)}a.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce((function(t,n){return a(t,n,e)}))};var l=a;t.exports=l},"Q/yX":function(t,e,n){"use strict";var i=n("Y7ZC"),r=n("ZW5q"),o=n("RDmV");i(i.S,"Promise",{try:function(t){var e=r.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},QBBo:function(t,e,n){"use strict";e.__esModule=!0,e.removeResizeListener=e.addResizeListener=void 0;var i,r=n("bdgK"),o=(i=r)&&i.__esModule?i:{default:i};var s="undefined"==typeof window,a=function(t){var e=t,n=Array.isArray(e),i=0;for(e=n?e:e[Symbol.iterator]();;){var r;if(n){if(i>=e.length)break;r=e[i++]}else{if((i=e.next()).done)break;r=i.value}var o=r.target.__resizeListeners__||[];o.length&&o.forEach((function(t){t()}))}};e.addResizeListener=function(t,e){s||(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new o.default(a),t.__ro__.observe(t)),t.__resizeListeners__.push(e))},e.removeResizeListener=function(t,e){t&&t.__resizeListeners__&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||t.__ro__.disconnect())}},QMMT:function(t,e,n){var i=n("a0xu"),r=n("UWiX")("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},QQVE:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=121)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},121:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this.$createElement;return(this._self._c||t)("form",{staticClass:"el-form",class:[this.labelPosition?"el-form--label-"+this.labelPosition:"",{"el-form--inline":this.inline}]},[this._t("default")],2)};i._withStripped=!0;var r=n(9),o=n.n(r),s={name:"ElForm",componentName:"ElForm",provide:function(){return{elForm:this}},props:{model:Object,rules:Object,labelPosition:String,labelWidth:String,labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},size:String,disabled:Boolean,validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean,default:!1}},watch:{rules:function(){this.fields.forEach((function(t){t.removeValidateEvents(),t.addValidateEvents()})),this.validateOnRuleChange&&this.validate((function(){}))}},computed:{autoLabelWidth:function(){if(!this.potentialLabelWidthArr.length)return 0;var t=Math.max.apply(Math,this.potentialLabelWidthArr);return t?t+"px":""}},data:function(){return{fields:[],potentialLabelWidthArr:[]}},created:function(){var t=this;this.$on("el.form.addField",(function(e){e&&t.fields.push(e)})),this.$on("el.form.removeField",(function(e){e.prop&&t.fields.splice(t.fields.indexOf(e),1)}))},methods:{resetFields:function(){this.model?this.fields.forEach((function(t){t.resetField()})):console.warn("[Element Warn][Form]model is required for resetFields to work.")},clearValidate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length?"string"==typeof t?this.fields.filter((function(e){return t===e.prop})):this.fields.filter((function(e){return t.indexOf(e.prop)>-1})):this.fields;e.forEach((function(t){t.clearValidate()}))},validate:function(t){var e=this;if(this.model){var n=void 0;"function"!=typeof t&&window.Promise&&(n=new window.Promise((function(e,n){t=function(t){t?e(t):n(t)}})));var i=!0,r=0;0===this.fields.length&&t&&t(!0);var s={};return this.fields.forEach((function(n){n.validate("",(function(n,a){n&&(i=!1),s=o()({},s,a),"function"==typeof t&&++r===e.fields.length&&t(i,s)}))})),n||void 0}console.warn("[Element Warn][Form]model is required for validate to work!")},validateField:function(t,e){t=[].concat(t);var n=this.fields.filter((function(e){return-1!==t.indexOf(e.prop)}));n.length?n.forEach((function(t){t.validate("",e)})):console.warn("[Element Warn]please pass correct props!")},getLabelWidthIndex:function(t){var e=this.potentialLabelWidthArr.indexOf(t);if(-1===e)throw new Error("[ElementForm]unpected width ",t);return e},registerLabelWidth:function(t,e){if(t&&e){var n=this.getLabelWidthIndex(e);this.potentialLabelWidthArr.splice(n,1,t)}else t&&this.potentialLabelWidthArr.push(t)},deregisterLabelWidth:function(t){var e=this.getLabelWidthIndex(t);this.potentialLabelWidthArr.splice(e,1)}}},a=n(0),l=Object(a.a)(s,i,[],!1,null,null,null);l.options.__file="packages/form/src/form.vue";var c=l.exports;c.install=function(t){t.component(c.name,c)};e.default=c},9:function(t,e){t.exports=n("f03z")}})},"QX/b":function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("oCYn"),o=(i=r)&&i.__esModule?i:{default:i},s=n("WST1");var a=[],l="@@clickoutsideContext",c=void 0,u=0;function d(t,e,n){return function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!(n&&n.context&&i.target&&r.target)||t.contains(i.target)||t.contains(r.target)||t===i.target||n.context.popperElm&&(n.context.popperElm.contains(i.target)||n.context.popperElm.contains(r.target))||(e.expression&&t[l].methodName&&n.context[t[l].methodName]?n.context[t[l].methodName]():t[l].bindingFn&&t[l].bindingFn())}}!o.default.prototype.$isServer&&(0,s.on)(document,"mousedown",(function(t){return c=t})),!o.default.prototype.$isServer&&(0,s.on)(document,"mouseup",(function(t){a.forEach((function(e){return e[l].documentHandler(t,c)}))})),e.default={bind:function(t,e,n){a.push(t);var i=u++;t[l]={id:i,documentHandler:d(t,e,n),methodName:e.expression,bindingFn:e.value}},update:function(t,e,n){t[l].documentHandler=d(t,e,n),t[l].methodName=e.expression,t[l].bindingFn=e.value},unbind:function(t){for(var e=a.length,n=0;nn;)e.push(arguments[n++]);return v[++g]=function(){a("function"==typeof t?t:Function(t),e)},i(g),g},h=function(t){delete v[t]},"process"==n("a0xu")(d)?i=function(t){d.nextTick(s(y,t,1))}:m&&m.now?i=function(t){m.now(s(y,t,1))}:f?(o=(r=new f).port2,r.port1.onmessage=b,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(t){u.postMessage(t+"","*")},u.addEventListener("message",b,!1)):i="onreadystatechange"in c("script")?function(t){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),y.call(t)}}:function(t){setTimeout(s(y,t,1),0)}),t.exports={set:p,clear:h}},QbLZ:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("P2sY"),o=(i=r)&&i.__esModule?i:{default:i};e.default=o.default||function(t){for(var e=1;e0,g<=m.r||!m.r){g<=1&&f>0&&(m=p[f-1]);var v=d[m.l];a&&(g=a(""+g)),c="string"==typeof v?v.replace("%d",g):v(g,i,m.l,u);break}}if(i)return c;var y=u?d.future:d.past;return"function"==typeof y?y(c):y.replace("%s",c)},i.to=function(t,e){return o(t,e,this,!0)},i.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};i.toNow=function(t){return this.to(s(this),t)},i.fromNow=function(t){return this.from(s(this),t)}}}()},"R+7+":function(t,e,n){var i=n("w6GO"),r=n("mqlF"),o=n("NV0k");t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),l=o.f,c=0;a.length>c;)l.call(t,s=a[c++])&&e.push(s);return e}},RCw7:function(t,e,n){"use strict";n.r(e),n.d(e,"autoJoin",(function(){return j})),n.d(e,"baseKeymap",(function(){return G})),n.d(e,"chainCommands",(function(){return B})),n.d(e,"createParagraphNear",(function(){return S})),n.d(e,"deleteSelection",(function(){return s})),n.d(e,"exitCode",(function(){return C})),n.d(e,"joinBackward",(function(){return l})),n.d(e,"joinDown",(function(){return _})),n.d(e,"joinForward",(function(){return g})),n.d(e,"joinTextblockBackward",(function(){return c})),n.d(e,"joinTextblockForward",(function(){return u})),n.d(e,"joinUp",(function(){return b})),n.d(e,"lift",(function(){return x})),n.d(e,"liftEmptyBlock",(function(){return E})),n.d(e,"macBaseKeymap",(function(){return W})),n.d(e,"newlineInCode",(function(){return w})),n.d(e,"pcBaseKeymap",(function(){return H})),n.d(e,"selectAll",(function(){return O})),n.d(e,"selectNodeBackward",(function(){return h})),n.d(e,"selectNodeForward",(function(){return v})),n.d(e,"selectParentNode",(function(){return P})),n.d(e,"selectTextblockEnd",(function(){return N})),n.d(e,"selectTextblockStart",(function(){return $})),n.d(e,"setBlockType",(function(){return R})),n.d(e,"splitBlock",(function(){return A})),n.d(e,"splitBlockAs",(function(){return T})),n.d(e,"splitBlockKeepMarks",(function(){return M})),n.d(e,"toggleMark",(function(){return L})),n.d(e,"wrapIn",(function(){return F}));var i=n("uSMm"),r=n("byeC"),o=n("b/sn");const s=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function a(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const l=(t,e,n)=>{let s=a(t,n);if(!s)return!1;let l=f(s);if(!l){let n=s.blockRange(),r=n&&Object(i.liftTarget)(n);return null!=r&&(e&&e(t.tr.lift(n,r).scrollIntoView()),!0)}let c=l.nodeBefore;if(D(t,l,e,-1))return!0;if(0==s.parent.content.size&&(p(c,"end")||o.NodeSelection.isSelectable(c)))for(let n=s.depth;;n--){let a=Object(i.replaceStep)(t.doc,s.before(n),s.after(n),r.Slice.empty);if(a&&a.slice.size1)break}return!(!c.isAtom||l.depth!=s.depth-1)&&(e&&e(t.tr.delete(l.pos-c.nodeSize,l.pos).scrollIntoView()),!0)},c=(t,e,n)=>{let i=a(t,n);if(!i)return!1;let r=f(i);return!!r&&d(t,r,e)},u=(t,e,n)=>{let i=m(t,n);if(!i)return!1;let r=y(i);return!!r&&d(t,r,e)};function d(t,e,n){let s=e.nodeBefore,a=e.pos-1;for(;!s.isTextblock;a--){if(s.type.spec.isolating)return!1;let t=s.lastChild;if(!t)return!1;s=t}let l=e.nodeAfter,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let t=l.firstChild;if(!t)return!1;l=t}let u=Object(i.replaceStep)(t.doc,a,c,r.Slice.empty);if(!u||u.from!=a||u instanceof i.ReplaceStep&&u.slice.size>=c-a)return!1;if(n){let e=t.tr.step(u);e.setSelection(o.TextSelection.create(e.doc,a)),n(e.scrollIntoView())}return!0}function p(t,e,n=!1){for(let i=t;i;i="start"==e?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&1!=i.childCount)return!1}return!1}const h=(t,e,n)=>{let{$head:i,empty:r}=t.selection,s=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;s=f(i)}let a=s&&s.nodeBefore;return!(!a||!o.NodeSelection.isSelectable(a))&&(e&&e(t.tr.setSelection(o.NodeSelection.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function f(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function m(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let s=m(t,n);if(!s)return!1;let a=y(s);if(!a)return!1;let l=a.nodeAfter;if(D(t,a,e,1))return!0;if(0==s.parent.content.size&&(p(l,"start")||o.NodeSelection.isSelectable(l))){let n=Object(i.replaceStep)(t.doc,s.before(),s.after(),r.Slice.empty);if(n&&n.slice.size{let{$head:i,empty:r}=t.selection,s=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let n,r=t.selection,s=r instanceof o.NodeSelection;if(s){if(r.node.isTextblock||!Object(i.canJoin)(t.doc,r.from))return!1;n=r.from}else if(n=Object(i.joinPoint)(t.doc,r.from,-1),null==n)return!1;if(e){let i=t.tr.join(n);s&&i.setSelection(o.NodeSelection.create(i.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},_=(t,e)=>{let n,r=t.selection;if(r instanceof o.NodeSelection){if(r.node.isTextblock||!Object(i.canJoin)(t.doc,r.to))return!1;n=r.to}else if(n=Object(i.joinPoint)(t.doc,r.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0},x=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&Object(i.liftTarget)(o);return null!=s&&(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},w=(t,e)=>{let{$head:n,$anchor:i}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(i))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function k(t){for(let e=0;e{let{$head:n,$anchor:i}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let r=n.node(-1),s=n.indexAfter(-1),a=k(r.contentMatchAt(s));if(!a||!r.canReplaceWith(s,s,a))return!1;if(e){let i=n.after(),r=t.tr.replaceWith(i,i,a.createAndFill());r.setSelection(o.Selection.near(r.doc.resolve(i),1)),e(r.scrollIntoView())}return!0},S=(t,e)=>{let n=t.selection,{$from:i,$to:r}=n;if(n instanceof o.AllSelection||i.parent.inlineContent||r.parent.inlineContent)return!1;let s=k(r.parent.contentMatchAt(r.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!i.parentOffset&&r.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Object(i.canSplit)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Object(i.liftTarget)(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function T(t){return(e,n)=>{let{$from:r,$to:s}=e.selection;if(e.selection instanceof o.NodeSelection&&e.selection.node.isBlock)return!(!r.parentOffset||!Object(i.canSplit)(e.doc,r.pos))&&(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a,l,c=[],u=!1,d=!1;for(let e=r.depth;;e--){if(r.node(e).isBlock){u=r.end(e)==r.pos+(r.depth-e),d=r.start(e)==r.pos-(r.depth-e),l=k(r.node(e-1).contentMatchAt(r.indexAfter(e-1)));let n=t&&t(s.parent,u,r);c.unshift(n||(u&&l?{type:l}:null)),a=e;break}if(1==e)return!1;c.unshift(null)}let p=e.tr;(e.selection instanceof o.TextSelection||e.selection instanceof o.AllSelection)&&p.deleteSelection();let h=p.mapping.map(r.pos),f=Object(i.canSplit)(p.doc,h,c.length,c);if(f||(c[0]=l?{type:l}:null,f=Object(i.canSplit)(p.doc,h,c.length,c)),!f)return!1;if(p.split(h,c.length,c),!u&&d&&r.node(a).type!=l){let t=p.mapping.map(r.before(a)),e=p.doc.resolve(t);l&&r.node(a-1).canReplaceWith(e.index(),e.index()+1,l)&&p.setNodeMarkup(p.mapping.map(r.before(a)),l)}return n&&n(p.scrollIntoView()),!0}}const A=T(),M=(t,e)=>A(t,e&&(n=>{let i=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();i&&n.ensureMarks(i),e(n)})),P=(t,e)=>{let n,{$from:i,to:r}=t.selection,s=i.sharedDepth(r);return 0!=s&&(n=i.before(s),e&&e(t.tr.setSelection(o.NodeSelection.create(t.doc,n))),!0)},O=(t,e)=>(e&&e(t.tr.setSelection(new o.AllSelection(t.doc))),!0);function D(t,e,n,s){let a,l,c=e.nodeBefore,u=e.nodeAfter,d=c.type.spec.isolating||u.type.spec.isolating;if(!d&&function(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(s,s+1)||!o.isTextblock&&!Object(i.canJoin)(t.doc,e.pos))&&(n&&n(t.tr.join(e.pos).scrollIntoView()),!0))}(t,e,n))return!0;let h=!d&&e.parent.canReplace(e.index(),e.index()+1);if(h&&(a=(l=c.contentMatchAt(c.childCount)).findWrapping(u.type))&&l.matchType(a[0]||u.type).validEnd){if(n){let o=e.pos+u.nodeSize,s=r.Fragment.empty;for(let t=a.length-1;t>=0;t--)s=r.Fragment.from(a[t].create(null,s));s=r.Fragment.from(c.copy(s));let l=t.tr.step(new i.ReplaceAroundStep(e.pos-1,o,e.pos,o,new r.Slice(s,1,0),a.length,!0)),d=l.doc.resolve(o+2*a.length);d.nodeAfter&&d.nodeAfter.type==c.type&&Object(i.canJoin)(l.doc,d.pos)&&l.join(d.pos),n(l.scrollIntoView())}return!0}let f=u.type.spec.isolating||s>0&&d?null:o.Selection.findFrom(e,1),m=f&&f.$from.blockRange(f.$to),g=m&&Object(i.liftTarget)(m);if(null!=g&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(h&&p(u,"start",!0)&&p(c,"end")){let o=c,s=[];for(;s.push(o),!o.isTextblock;)o=o.lastChild;let a=u,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(o.canReplace(o.childCount,o.childCount,a.content)){if(n){let o=r.Fragment.empty;for(let t=s.length-1;t>=0;t--)o=r.Fragment.from(s[t].copy(o));n(t.tr.step(new i.ReplaceAroundStep(e.pos-s.length,e.pos+u.nodeSize,e.pos+l,e.pos+u.nodeSize-l,new r.Slice(o,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function I(t){return function(e,n){let i=e.selection,r=t<0?i.$from:i.$to,s=r.depth;for(;r.node(s).isInline;){if(!s)return!1;s--}return!!r.node(s).isTextblock&&(n&&n(e.tr.setSelection(o.TextSelection.create(e.doc,t<0?r.start(s):r.end(s)))),!0)}}const $=I(-1),N=I(1);function F(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,a=o.blockRange(s),l=a&&Object(i.findWrapping)(a,t,e);return!!l&&(r&&r(n.tr.wrap(a,l).scrollIntoView()),!0)}}function R(t,e=null){return function(n,i){let r=!1;for(let i=0;i{if(r)return!1;if(i.isTextblock&&!i.hasMarkup(t,e))if(i.type==t)r=!0;else{let e=n.doc.resolve(o),i=e.index();r=e.parent.canReplaceWith(i,i+1,t)}})}if(!r)return!1;if(i){let r=n.tr;for(let i=0;i{if(a||!i&&t.isAtom&&t.isInline&&e>=o.pos&&e+t.nodeSize<=s.pos)return!1;a=t.inlineContent&&t.type.allowsMarkType(n)}),a)return!0}return!1}(n.doc,u,t,r))return!1;if(a)if(c)t.isInSet(n.storedMarks||c.marks())?a(n.tr.removeStoredMark(t)):a(n.tr.addStoredMark(t.create(e)));else{let l,c=n.tr;r||(u=function(t){let e=[];for(let n=0;n{if(t.isAtom&&t.content.size&&t.isInline&&n>=i.pos&&n+t.nodeSize<=r.pos)return n+1>i.pos&&e.push(new o.SelectionRange(i,i.doc.resolve(n+1))),i=i.doc.resolve(n+1+t.content.size),!1}),i.posn.doc.rangeHasMark(e.$from.pos,e.$to.pos,t)):!u.every(e=>{let n=!1;return c.doc.nodesBetween(e.$from.pos,e.$to.pos,(i,r,o)=>{if(n)return!1;n=!t.isInSet(i.marks)&&!!o&&o.type.allowsMarkType(t)&&!(i.isText&&/^\s*$/.test(i.textBetween(Math.max(0,e.$from.pos-r),Math.min(i.nodeSize,e.$to.pos-r))))}),!n});for(let n=0;ne.indexOf(t.type.name)>-1:e;return(e,r,o)=>t(e,r&&function(t,e){return n=>{if(!n.isGeneric)return t(n);let r=[];for(let t=0;tr.push(n,i))}let o=[];for(let t=0;tt-e);for(let t=o.length-1;t>=0;t--)Object(i.canJoin)(n.doc,o[t])&&n.join(o[t]);t(n)}}(r,n),o)}function B(...t){return function(e,n,i){for(let r=0;r(0,i.propOptionsGenerator)(String,t)},Syab:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("oCYn"),o=(i=r)&&i.__esModule?i:{default:i},s=n("WST1");var a=!1,l=!1,c=void 0,u=function(){if(!o.default.prototype.$isServer){var t=p.modalDom;return t?a=!0:(a=!1,t=document.createElement("div"),p.modalDom=t,t.addEventListener("touchmove",(function(t){t.preventDefault(),t.stopPropagation()})),t.addEventListener("click",(function(){p.doOnModalClick&&p.doOnModalClick()}))),t}},d={},p={modalFade:!0,getInstance:function(t){return d[t]},register:function(t,e){t&&e&&(d[t]=e)},deregister:function(t){t&&(d[t]=null,delete d[t])},nextZIndex:function(){return p.zIndex++},modalStack:[],doOnModalClick:function(){var t=p.modalStack[p.modalStack.length-1];if(t){var e=p.getInstance(t.id);e&&e.closeOnClickModal&&e.close()}},openModal:function(t,e,n,i,r){if(!o.default.prototype.$isServer&&t&&void 0!==e){this.modalFade=r;for(var l=this.modalStack,c=0,d=l.length;c0){var i=e[e.length-1];if(i.id===t){if(i.modalClass)i.modalClass.trim().split(/\s+/).forEach((function(t){return(0,s.removeClass)(n,t)}));e.pop(),e.length>0&&(n.style.zIndex=e[e.length-1].zIndex)}else for(var r=e.length-1;r>=0;r--)if(e[r].id===t){e.splice(r,1);break}}0===e.length&&(this.modalFade&&(0,s.addClass)(n,"v-modal-leave"),setTimeout((function(){0===e.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",p.modalDom=void 0),(0,s.removeClass)(n,"v-modal-leave")}),200))}};Object.defineProperty(p,"zIndex",{configurable:!0,get:function(){return l||(c=c||(o.default.prototype.$ELEMENT||{}).zIndex||2e3,l=!0),c},set:function(t){c=t}});o.default.prototype.$isServer||window.addEventListener("keydown",(function(t){if(27===t.keyCode){var e=function(){if(!o.default.prototype.$isServer&&p.modalStack.length>0){var t=p.modalStack[p.modalStack.length-1];if(!t)return;return p.getInstance(t.id)}}();e&&e.closeOnPressEscape&&(e.handleClose?e.handleClose():e.handleAction?e.handleAction("cancel"):e.close())}})),e.default=p},T8un:function(t,e,n){var i=n("Y7ZC"),r=n("EP9H");i(i.S+i.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},TJWN:function(t,e,n){"use strict";var i=n("5T2Y"),r=n("WEpk"),o=n("2faE"),s=n("jmDH"),a=n("UWiX")("species");t.exports=function(t){var e="function"==typeof r[t]?r[t]:i[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},TclB:function(t,e,n){n("Vzfy"),t.exports=n("WEpk").Number.isNaN},TkuN:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=61)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},10:function(t,e){t.exports=n("8606")},12:function(t,e){t.exports=n("QX/b")},14:function(t,e){t.exports=n("FOnU")},16:function(t,e){t.exports=n("QBBo")},17:function(t,e){t.exports=n("DhVD")},21:function(t,e){t.exports=n("05c+")},22:function(t,e){t.exports=n("EvI9")},3:function(t,e){t.exports=n("gSIQ")},31:function(t,e){t.exports=n("Kl55")},33:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-select-dropdown__item",class:{selected:t.itemSelected,"is-disabled":t.disabled||t.groupDisabled||t.limitReached,hover:t.hover},on:{mouseenter:t.hoverItem,click:function(e){return e.stopPropagation(),t.selectOptionClick(e)}}},[t._t("default",[n("span",[t._v(t._s(t.currentLabel))])])],2)};i._withStripped=!0;var r=n(4),o=n.n(r),s=n(3),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l={mixins:[o.a],name:"ElOption",componentName:"ElOption",inject:["select"],props:{value:{required:!0},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:!1}},data:function(){return{index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}},computed:{isObject:function(){return"[object object]"===Object.prototype.toString.call(this.value).toLowerCase()},currentLabel:function(){return this.label||(this.isObject?"":this.value)},currentValue:function(){return this.value||this.label||""},itemSelected:function(){return this.select.multiple?this.contains(this.select.value,this.value):this.isEqual(this.value,this.select.value)},limitReached:function(){return!!this.select.multiple&&(!this.itemSelected&&(this.select.value||[]).length>=this.select.multipleLimit&&this.select.multipleLimit>0)}},watch:{currentLabel:function(){this.created||this.select.remote||this.dispatch("ElSelect","setSelected")},value:function(t,e){var n=this.select,i=n.remote,r=n.valueKey;if(!this.created&&!i){if(r&&"object"===(void 0===t?"undefined":a(t))&&"object"===(void 0===e?"undefined":a(e))&&t[r]===e[r])return;this.dispatch("ElSelect","setSelected")}}},methods:{isEqual:function(t,e){if(this.isObject){var n=this.select.valueKey;return Object(s.getValueByPath)(t,n)===Object(s.getValueByPath)(e,n)}return t===e},contains:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(this.isObject){var n=this.select.valueKey;return t&&t.some((function(t){return Object(s.getValueByPath)(t,n)===Object(s.getValueByPath)(e,n)}))}return t&&t.indexOf(e)>-1},handleGroupDisabled:function(t){this.groupDisabled=t},hoverItem:function(){this.disabled||this.groupDisabled||(this.select.hoverIndex=this.select.options.indexOf(this))},selectOptionClick:function(){!0!==this.disabled&&!0!==this.groupDisabled&&this.dispatch("ElSelect","handleOptionClick",[this,!0])},queryChange:function(t){this.visible=new RegExp(Object(s.escapeRegexpString)(t),"i").test(this.currentLabel)||this.created,this.visible||this.select.filteredOptionsCount--}},created:function(){this.select.options.push(this),this.select.cachedOptions.push(this),this.select.optionsCount++,this.select.filteredOptionsCount++,this.$on("queryChange",this.queryChange),this.$on("handleGroupDisabled",this.handleGroupDisabled)},beforeDestroy:function(){var t=this.select,e=t.selected,n=t.multiple?e:[e],i=this.select.cachedOptions.indexOf(this),r=n.indexOf(this);i>-1&&r<0&&this.select.cachedOptions.splice(i,1),this.select.onOptionDestroy(this.select.options.indexOf(this))}},c=n(0),u=Object(c.a)(l,i,[],!1,null,null,null);u.options.__file="packages/select/src/option.vue";e.a=u.exports},37:function(t,e){t.exports=n("i7wE")},4:function(t,e){t.exports=n("0BDH")},5:function(t,e){t.exports=n("6XTx")},6:function(t,e){t.exports=n("a3zo")},61:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleClose,expression:"handleClose"}],staticClass:"el-select",class:[t.selectSize?"el-select--"+t.selectSize:""],on:{click:function(e){return e.stopPropagation(),t.toggleMenu(e)}}},[t.multiple?n("div",{ref:"tags",staticClass:"el-select__tags",style:{"max-width":t.inputWidth-32+"px",width:"100%"}},[t.collapseTags&&t.selected.length?n("span",[n("el-tag",{attrs:{closable:!t.selectDisabled,size:t.collapseTagSize,hit:t.selected[0].hitState,type:"info","disable-transitions":""},on:{close:function(e){t.deleteTag(e,t.selected[0])}}},[n("span",{staticClass:"el-select__tags-text"},[t._v(t._s(t.selected[0].currentLabel))])]),t.selected.length>1?n("el-tag",{attrs:{closable:!1,size:t.collapseTagSize,type:"info","disable-transitions":""}},[n("span",{staticClass:"el-select__tags-text"},[t._v("+ "+t._s(t.selected.length-1))])]):t._e()],1):t._e(),t.collapseTags?t._e():n("transition-group",{on:{"after-leave":t.resetInputHeight}},t._l(t.selected,(function(e){return n("el-tag",{key:t.getValueKey(e),attrs:{closable:!t.selectDisabled,size:t.collapseTagSize,hit:e.hitState,type:"info","disable-transitions":""},on:{close:function(n){t.deleteTag(n,e)}}},[n("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.currentLabel))])])})),1),t.filterable?n("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"el-select__input",class:[t.selectSize?"is-"+t.selectSize:""],style:{"flex-grow":"1",width:t.inputLength/(t.inputWidth-32)+"%","max-width":t.inputWidth-42+"px"},attrs:{type:"text",disabled:t.selectDisabled,autocomplete:t.autoComplete||t.autocomplete},domProps:{value:t.query},on:{focus:t.handleFocus,blur:function(e){t.softFocus=!1},keyup:t.managePlaceholder,keydown:[t.resetInputState,function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.preventDefault(),t.navigateOptions("next")},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.preventDefault(),t.navigateOptions("prev")},function(e){return!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.selectOption(e))},function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.stopPropagation(),e.preventDefault(),t.visible=!1},function(e){return!("button"in e)&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:t.deletePrevTag(e)},function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.visible=!1}],compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:[function(e){e.target.composing||(t.query=e.target.value)},t.debouncedQueryChange]}}):t._e()],1):t._e(),n("el-input",{ref:"reference",class:{"is-focus":t.visible},attrs:{type:"text",placeholder:t.currentPlaceholder,name:t.name,id:t.id,autocomplete:t.autoComplete||t.autocomplete,size:t.selectSize,disabled:t.selectDisabled,readonly:t.readonly,"validate-event":!1,tabindex:t.multiple&&t.filterable?"-1":null},on:{focus:t.handleFocus,blur:t.handleBlur},nativeOn:{keyup:function(e){return t.debouncedOnInputChange(e)},keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.stopPropagation(),e.preventDefault(),t.navigateOptions("next")},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.stopPropagation(),e.preventDefault(),t.navigateOptions("prev")},function(e){return!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.selectOption(e))},function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.stopPropagation(),e.preventDefault(),t.visible=!1},function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.visible=!1}],paste:function(e){return t.debouncedOnInputChange(e)},mouseenter:function(e){t.inputHovering=!0},mouseleave:function(e){t.inputHovering=!1}},model:{value:t.selectedLabel,callback:function(e){t.selectedLabel=e},expression:"selectedLabel"}},[t.$slots.prefix?n("template",{slot:"prefix"},[t._t("prefix")],2):t._e(),n("template",{slot:"suffix"},[n("i",{directives:[{name:"show",rawName:"v-show",value:!t.showClose,expression:"!showClose"}],class:["el-select__caret","el-input__icon","el-icon-"+t.iconClass]}),t.showClose?n("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close",on:{click:t.handleClearClick}}):t._e()])],2),n("transition",{attrs:{name:"el-zoom-in-top"},on:{"before-enter":t.handleMenuEnter,"after-leave":t.doDestroy}},[n("el-select-menu",{directives:[{name:"show",rawName:"v-show",value:t.visible&&!1!==t.emptyText,expression:"visible && emptyText !== false"}],ref:"popper",attrs:{"append-to-body":t.popperAppendToBody}},[n("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:t.options.length>0&&!t.loading,expression:"options.length > 0 && !loading"}],ref:"scrollbar",class:{"is-empty":!t.allowCreate&&t.query&&0===t.filteredOptionsCount},attrs:{tag:"ul","wrap-class":"el-select-dropdown__wrap","view-class":"el-select-dropdown__list"}},[t.showNewOption?n("el-option",{attrs:{value:t.query,created:""}}):t._e(),t._t("default")],2),t.emptyText&&(!t.allowCreate||t.loading||t.allowCreate&&0===t.options.length)?[t.$slots.empty?t._t("empty"):n("p",{staticClass:"el-select-dropdown__empty"},[t._v("\n "+t._s(t.emptyText)+"\n ")])]:t._e()],2)],1)],1)};i._withStripped=!0;var r=n(4),o=n.n(r),s=n(22),a=n.n(s),l=n(6),c=n.n(l),u=n(10),d=n.n(u),p=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-select-dropdown el-popper",class:[{"is-multiple":this.$parent.multiple},this.popperClass],style:{minWidth:this.minWidth}},[this._t("default")],2)};p._withStripped=!0;var h=n(5),f={name:"ElSelectDropdown",componentName:"ElSelectDropdown",mixins:[n.n(h).a],props:{placement:{default:"bottom-start"},boundariesPadding:{default:0},popperOptions:{default:function(){return{gpuAcceleration:!1}}},visibleArrow:{default:!0},appendToBody:{type:Boolean,default:!0}},data:function(){return{minWidth:""}},computed:{popperClass:function(){return this.$parent.popperClass}},watch:{"$parent.inputWidth":function(){this.minWidth=this.$parent.$el.getBoundingClientRect().width+"px"}},mounted:function(){var t=this;this.referenceElm=this.$parent.$refs.reference.$el,this.$parent.popperElm=this.popperElm=this.$el,this.$on("updatePopper",(function(){t.$parent.visible&&t.updatePopper()})),this.$on("destroyPopper",this.destroyPopper)}},m=n(0),g=Object(m.a)(f,p,[],!1,null,null,null);g.options.__file="packages/select/src/select-dropdown.vue";var v=g.exports,y=n(33),b=n(37),_=n.n(b),x=n(14),w=n.n(x),k=n(17),C=n.n(k),S=n(12),E=n.n(S),T=n(16),A=n(31),M=n.n(A),P=n(3),O=n(21),D={mixins:[o.a,c.a,a()("reference"),{data:function(){return{hoverOption:-1}},computed:{optionsAllDisabled:function(){return this.options.filter((function(t){return t.visible})).every((function(t){return t.disabled}))}},watch:{hoverIndex:function(t){var e=this;"number"==typeof t&&t>-1&&(this.hoverOption=this.options[t]||{}),this.options.forEach((function(t){t.hover=e.hoverOption===t}))}},methods:{navigateOptions:function(t){var e=this;if(this.visible){if(0!==this.options.length&&0!==this.filteredOptionsCount&&!this.optionsAllDisabled){"next"===t?(this.hoverIndex++,this.hoverIndex===this.options.length&&(this.hoverIndex=0)):"prev"===t&&(this.hoverIndex--,this.hoverIndex<0&&(this.hoverIndex=this.options.length-1));var n=this.options[this.hoverIndex];!0!==n.disabled&&!0!==n.groupDisabled&&n.visible||this.navigateOptions(t),this.$nextTick((function(){return e.scrollToOption(e.hoverOption)}))}}else this.visible=!0}}}],name:"ElSelect",componentName:"ElSelect",inject:{elForm:{default:""},elFormItem:{default:""}},provide:function(){return{select:this}},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},readonly:function(){return!this.filterable||this.multiple||!Object(P.isIE)()&&!Object(P.isEdge)()&&!this.visible},showClose:function(){var t=this.multiple?Array.isArray(this.value)&&this.value.length>0:void 0!==this.value&&null!==this.value&&""!==this.value;return this.clearable&&!this.selectDisabled&&this.inputHovering&&t},iconClass:function(){return this.remote&&this.filterable?"":this.visible?"arrow-up is-reverse":"arrow-up"},debounce:function(){return this.remote?300:0},emptyText:function(){return this.loading?this.loadingText||this.t("el.select.loading"):(!this.remote||""!==this.query||0!==this.options.length)&&(this.filterable&&this.query&&this.options.length>0&&0===this.filteredOptionsCount?this.noMatchText||this.t("el.select.noMatch"):0===this.options.length?this.noDataText||this.t("el.select.noData"):null)},showNewOption:function(){var t=this,e=this.options.filter((function(t){return!t.created})).some((function(e){return e.currentLabel===t.query}));return this.filterable&&this.allowCreate&&""!==this.query&&!e},selectSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},selectDisabled:function(){return this.disabled||(this.elForm||{}).disabled},collapseTagSize:function(){return["small","mini"].indexOf(this.selectSize)>-1?"mini":"small"},propPlaceholder:function(){return void 0!==this.placeholder?this.placeholder:this.t("el.select.placeholder")}},components:{ElInput:d.a,ElSelectMenu:v,ElOption:y.a,ElTag:_.a,ElScrollbar:w.a},directives:{Clickoutside:E.a},props:{name:String,id:String,value:{required:!0},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator:function(t){return!0}},automaticDropdown:Boolean,size:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:String,remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String,required:!1},defaultFirstOption:Boolean,reserveKeyword:Boolean,valueKey:{type:String,default:"value"},collapseTags:Boolean,popperAppendToBody:{type:Boolean,default:!0}},data:function(){return{options:[],cachedOptions:[],createdLabel:null,createdSelected:!1,selected:this.multiple?[]:{},inputLength:20,inputWidth:0,initialInputHeight:0,cachedPlaceHolder:"",optionsCount:0,filteredOptionsCount:0,visible:!1,softFocus:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,currentPlaceholder:"",menuVisibleOnFocus:!1,isOnComposition:!1,isSilentBlur:!1}},watch:{selectDisabled:function(){var t=this;this.$nextTick((function(){t.resetInputHeight()}))},propPlaceholder:function(t){this.cachedPlaceHolder=this.currentPlaceholder=t},value:function(t,e){this.multiple&&(this.resetInputHeight(),t&&t.length>0||this.$refs.input&&""!==this.query?this.currentPlaceholder="":this.currentPlaceholder=this.cachedPlaceHolder,this.filterable&&!this.reserveKeyword&&(this.query="",this.handleQueryChange(this.query))),this.setSelected(),this.filterable&&!this.multiple&&(this.inputLength=20),Object(P.valueEquals)(t,e)||this.dispatch("ElFormItem","el.form.change",t)},visible:function(t){var e=this;t?(this.broadcast("ElSelectDropdown","updatePopper"),this.filterable&&(this.query=this.remote?"":this.selectedLabel,this.handleQueryChange(this.query),this.multiple?this.$refs.input.focus():(this.remote||(this.broadcast("ElOption","queryChange",""),this.broadcast("ElOptionGroup","queryChange")),this.selectedLabel&&(this.currentPlaceholder=this.selectedLabel,this.selectedLabel="")))):(this.broadcast("ElSelectDropdown","destroyPopper"),this.$refs.input&&this.$refs.input.blur(),this.query="",this.previousQuery=null,this.selectedLabel="",this.inputLength=20,this.menuVisibleOnFocus=!1,this.resetHoverIndex(),this.$nextTick((function(){e.$refs.input&&""===e.$refs.input.value&&0===e.selected.length&&(e.currentPlaceholder=e.cachedPlaceHolder)})),this.multiple||(this.selected&&(this.filterable&&this.allowCreate&&this.createdSelected&&this.createdLabel?this.selectedLabel=this.createdLabel:this.selectedLabel=this.selected.currentLabel,this.filterable&&(this.query=this.selectedLabel)),this.filterable&&(this.currentPlaceholder=this.cachedPlaceHolder))),this.$emit("visible-change",t)},options:function(){var t=this;if(!this.$isServer){this.$nextTick((function(){t.broadcast("ElSelectDropdown","updatePopper")})),this.multiple&&this.resetInputHeight();var e=this.$el.querySelectorAll("input");-1===[].indexOf.call(e,document.activeElement)&&this.setSelected(),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()}}},methods:{handleComposition:function(t){var e=this,n=t.target.value;if("compositionend"===t.type)this.isOnComposition=!1,this.$nextTick((function(t){return e.handleQueryChange(n)}));else{var i=n[n.length-1]||"";this.isOnComposition=!Object(O.isKorean)(i)}},handleQueryChange:function(t){var e=this;this.previousQuery===t||this.isOnComposition||(null!==this.previousQuery||"function"!=typeof this.filterMethod&&"function"!=typeof this.remoteMethod?(this.previousQuery=t,this.$nextTick((function(){e.visible&&e.broadcast("ElSelectDropdown","updatePopper")})),this.hoverIndex=-1,this.multiple&&this.filterable&&this.$nextTick((function(){var t=15*e.$refs.input.value.length+20;e.inputLength=e.collapseTags?Math.min(50,t):t,e.managePlaceholder(),e.resetInputHeight()})),this.remote&&"function"==typeof this.remoteMethod?(this.hoverIndex=-1,this.remoteMethod(t)):"function"==typeof this.filterMethod?(this.filterMethod(t),this.broadcast("ElOptionGroup","queryChange")):(this.filteredOptionsCount=this.optionsCount,this.broadcast("ElOption","queryChange",t),this.broadcast("ElOptionGroup","queryChange")),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()):this.previousQuery=t)},scrollToOption:function(t){var e=Array.isArray(t)&&t[0]?t[0].$el:t.$el;if(this.$refs.popper&&e){var n=this.$refs.popper.$el.querySelector(".el-select-dropdown__wrap");M()(n,e)}this.$refs.scrollbar&&this.$refs.scrollbar.handleScroll()},handleMenuEnter:function(){var t=this;this.$nextTick((function(){return t.scrollToOption(t.selected)}))},emitChange:function(t){Object(P.valueEquals)(this.value,t)||this.$emit("change",t)},getOption:function(t){for(var e=void 0,n="[object object]"===Object.prototype.toString.call(t).toLowerCase(),i="[object null]"===Object.prototype.toString.call(t).toLowerCase(),r="[object undefined]"===Object.prototype.toString.call(t).toLowerCase(),o=this.cachedOptions.length-1;o>=0;o--){var s=this.cachedOptions[o];if(n?Object(P.getValueByPath)(s.value,this.valueKey)===Object(P.getValueByPath)(t,this.valueKey):s.value===t){e=s;break}}if(e)return e;var a={value:t,currentLabel:n||i||r?"":t};return this.multiple&&(a.hitState=!1),a},setSelected:function(){var t=this;if(!this.multiple){var e=this.getOption(this.value);return e.created?(this.createdLabel=e.currentLabel,this.createdSelected=!0):this.createdSelected=!1,this.selectedLabel=e.currentLabel,this.selected=e,void(this.filterable&&(this.query=this.selectedLabel))}var n=[];Array.isArray(this.value)&&this.value.forEach((function(e){n.push(t.getOption(e))})),this.selected=n,this.$nextTick((function(){t.resetInputHeight()}))},handleFocus:function(t){this.softFocus?this.softFocus=!1:((this.automaticDropdown||this.filterable)&&(this.visible=!0,this.filterable&&(this.menuVisibleOnFocus=!0)),this.$emit("focus",t))},blur:function(){this.visible=!1,this.$refs.reference.blur()},handleBlur:function(t){var e=this;setTimeout((function(){e.isSilentBlur?e.isSilentBlur=!1:e.$emit("blur",t)}),50),this.softFocus=!1},handleClearClick:function(t){this.deleteSelected(t)},doDestroy:function(){this.$refs.popper&&this.$refs.popper.doDestroy()},handleClose:function(){this.visible=!1},toggleLastOptionHitState:function(t){if(Array.isArray(this.selected)){var e=this.selected[this.selected.length-1];if(e)return!0===t||!1===t?(e.hitState=t,t):(e.hitState=!e.hitState,e.hitState)}},deletePrevTag:function(t){if(t.target.value.length<=0&&!this.toggleLastOptionHitState()){var e=this.value.slice();e.pop(),this.$emit("input",e),this.emitChange(e)}},managePlaceholder:function(){""!==this.currentPlaceholder&&(this.currentPlaceholder=this.$refs.input.value?"":this.cachedPlaceHolder)},resetInputState:function(t){8!==t.keyCode&&this.toggleLastOptionHitState(!1),this.inputLength=15*this.$refs.input.value.length+20,this.resetInputHeight()},resetInputHeight:function(){var t=this;this.collapseTags&&!this.filterable||this.$nextTick((function(){if(t.$refs.reference){var e=t.$refs.reference.$el.childNodes,n=[].filter.call(e,(function(t){return"INPUT"===t.tagName}))[0],i=t.$refs.tags,r=t.initialInputHeight||40;n.style.height=0===t.selected.length?r+"px":Math.max(i?i.clientHeight+(i.clientHeight>r?6:0):0,r)+"px",t.visible&&!1!==t.emptyText&&t.broadcast("ElSelectDropdown","updatePopper")}}))},resetHoverIndex:function(){var t=this;setTimeout((function(){t.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map((function(e){return t.options.indexOf(e)}))):t.hoverIndex=-1:t.hoverIndex=t.options.indexOf(t.selected)}),300)},handleOptionSelect:function(t,e){var n=this;if(this.multiple){var i=(this.value||[]).slice(),r=this.getValueIndex(i,t.value);r>-1?i.splice(r,1):(this.multipleLimit<=0||i.length0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n="[object object]"===Object.prototype.toString.call(e).toLowerCase();if(n){var i=this.valueKey,r=-1;return t.some((function(t,n){return Object(P.getValueByPath)(t,i)===Object(P.getValueByPath)(e,i)&&(r=n,!0)})),r}return t.indexOf(e)},toggleMenu:function(){this.selectDisabled||(this.menuVisibleOnFocus?this.menuVisibleOnFocus=!1:this.visible=!this.visible,this.visible&&(this.$refs.input||this.$refs.reference).focus())},selectOption:function(){this.visible?this.options[this.hoverIndex]&&this.handleOptionSelect(this.options[this.hoverIndex]):this.toggleMenu()},deleteSelected:function(t){t.stopPropagation();var e=this.multiple?[]:"";this.$emit("input",e),this.emitChange(e),this.visible=!1,this.$emit("clear")},deleteTag:function(t,e){var n=this.selected.indexOf(e);if(n>-1&&!this.selectDisabled){var i=this.value.slice();i.splice(n,1),this.$emit("input",i),this.emitChange(i),this.$emit("remove-tag",e.value)}t.stopPropagation()},onInputChange:function(){this.filterable&&this.query!==this.selectedLabel&&(this.query=this.selectedLabel,this.handleQueryChange(this.query))},onOptionDestroy:function(t){t>-1&&(this.optionsCount--,this.filteredOptionsCount--,this.options.splice(t,1))},resetInputWidth:function(){this.inputWidth=this.$refs.reference.$el.getBoundingClientRect().width},handleResize:function(){this.resetInputWidth(),this.multiple&&this.resetInputHeight()},checkDefaultFirstOption:function(){this.hoverIndex=-1;for(var t=!1,e=this.options.length-1;e>=0;e--)if(this.options[e].created){t=!0,this.hoverIndex=e;break}if(!t)for(var n=0;n!==this.options.length;++n){var i=this.options[n];if(this.query){if(!i.disabled&&!i.groupDisabled&&i.visible){this.hoverIndex=n;break}}else if(i.itemSelected){this.hoverIndex=n;break}}},getValueKey:function(t){return"[object object]"!==Object.prototype.toString.call(t.value).toLowerCase()?t.value:Object(P.getValueByPath)(t.value,this.valueKey)}},created:function(){var t=this;this.cachedPlaceHolder=this.currentPlaceholder=this.propPlaceholder,this.multiple&&!Array.isArray(this.value)&&this.$emit("input",[]),!this.multiple&&Array.isArray(this.value)&&this.$emit("input",""),this.debouncedOnInputChange=C()(this.debounce,(function(){t.onInputChange()})),this.debouncedQueryChange=C()(this.debounce,(function(e){t.handleQueryChange(e.target.value)})),this.$on("handleOptionClick",this.handleOptionSelect),this.$on("setSelected",this.setSelected)},mounted:function(){var t=this;this.multiple&&Array.isArray(this.value)&&this.value.length>0&&(this.currentPlaceholder=""),Object(T.addResizeListener)(this.$el,this.handleResize);var e=this.$refs.reference;if(e&&e.$el){var n=e.$el.querySelector("input");this.initialInputHeight=n.getBoundingClientRect().height||{medium:36,small:32,mini:28}[this.selectSize]}this.remote&&this.multiple&&this.resetInputHeight(),this.$nextTick((function(){e&&e.$el&&(t.inputWidth=e.$el.getBoundingClientRect().width)})),this.setSelected()},beforeDestroy:function(){this.$el&&this.handleResize&&Object(T.removeResizeListener)(this.$el,this.handleResize)}},I=Object(m.a)(D,i,[],!1,null,null,null);I.options.__file="packages/select/src/select.vue";var $=I.exports;$.install=function(t){t.component($.name,$)};e.default=$}})},TuGD:function(t,e,n){var i=n("UWiX")("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],s=o[i]();s.next=function(){return{done:n=!0}},o[i]=function(){return s},t(o)}catch(t){}return n}},"U+KD":function(t,e,n){var i=n("B+OT"),r=n("JB68"),o=n("VVlx")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},UDep:function(t,e,n){n("wgeU"),n("FlQf"),n("bBy9"),n("g33z"),n("XLbu"),n("/h46"),n("dVTT"),t.exports=n("WEpk").Map},UO39:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},UShQ:function(t,e,n){"use strict";e.__esModule=!0,e.PopupManager=void 0;var i=l(n("oCYn")),r=l(n("f03z")),o=l(n("Syab")),s=l(n("5i1c")),a=n("WST1");function l(t){return t&&t.__esModule?t:{default:t}}var c=1,u=void 0;e.default={props:{visible:{type:Boolean,default:!1},openDelay:{},closeDelay:{},zIndex:{},modal:{type:Boolean,default:!1},modalFade:{type:Boolean,default:!0},modalClass:{},modalAppendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1}},beforeMount:function(){this._popupId="popup-"+c++,o.default.register(this._popupId,this)},beforeDestroy:function(){o.default.deregister(this._popupId),o.default.closeModal(this._popupId),this.restoreBodyStyle()},data:function(){return{opened:!1,bodyPaddingRight:null,computedBodyPaddingRight:0,withoutHiddenClass:!0,rendered:!1}},watch:{visible:function(t){var e=this;if(t){if(this._opening)return;this.rendered?this.open():(this.rendered=!0,i.default.nextTick((function(){e.open()})))}else this.close()}},methods:{open:function(t){var e=this;this.rendered||(this.rendered=!0);var n=(0,r.default)({},this.$props||this,t);this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),clearTimeout(this._openTimer);var i=Number(n.openDelay);i>0?this._openTimer=setTimeout((function(){e._openTimer=null,e.doOpen(n)}),i):this.doOpen(n)},doOpen:function(t){if(!this.$isServer&&(!this.willOpen||this.willOpen())&&!this.opened){this._opening=!0;var e=this.$el,n=t.modal,i=t.zIndex;if(i&&(o.default.zIndex=i),n&&(this._closing&&(o.default.closeModal(this._popupId),this._closing=!1),o.default.openModal(this._popupId,o.default.nextZIndex(),this.modalAppendToBody?void 0:e,t.modalClass,t.modalFade),t.lockScroll)){this.withoutHiddenClass=!(0,a.hasClass)(document.body,"el-popup-parent--hidden"),this.withoutHiddenClass&&(this.bodyPaddingRight=document.body.style.paddingRight,this.computedBodyPaddingRight=parseInt((0,a.getStyle)(document.body,"paddingRight"),10)),u=(0,s.default)();var r=document.documentElement.clientHeight0&&(r||"scroll"===l)&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.computedBodyPaddingRight+u+"px"),(0,a.addClass)(document.body,"el-popup-parent--hidden")}"static"===getComputedStyle(e).position&&(e.style.position="absolute"),e.style.zIndex=o.default.nextZIndex(),this.opened=!0,this.onOpen&&this.onOpen(),this.doAfterOpen()}},doAfterOpen:function(){this._opening=!1},close:function(){var t=this;if(!this.willClose||this.willClose()){null!==this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null),clearTimeout(this._closeTimer);var e=Number(this.closeDelay);e>0?this._closeTimer=setTimeout((function(){t._closeTimer=null,t.doClose()}),e):this.doClose()}},doClose:function(){this._closing=!0,this.onClose&&this.onClose(),this.lockScroll&&setTimeout(this.restoreBodyStyle,200),this.opened=!1,this.doAfterClose()},doAfterClose:function(){o.default.closeModal(this._popupId),this._closing=!1},restoreBodyStyle:function(){this.modal&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.bodyPaddingRight,(0,a.removeClass)(document.body,"el-popup-parent--hidden")),this.withoutHiddenClass=!0}}},e.PopupManager=o.default},UWiX:function(t,e,n){var i=n("29s/")("wks"),r=n("YqAc"),o=n("5T2Y").Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},UbbE:function(t,e,n){n("o8NH"),t.exports=n("WEpk").Object.assign},Uuwv:function(t,e,n){"use strict";n("GMsW")},V7Et:function(t,e,n){var i=n("2GTP"),r=n("M1xp"),o=n("JB68"),s=n("tEej"),a=n("v6xn");t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,d=6==t,p=5==t||d,h=e||a;return function(e,a,f){for(var m,g,v=o(e),y=r(v),b=i(a,f,3),_=s(y.length),x=0,w=n?h(e,_):l?h(e,0):void 0;_>x;x++)if((p||x in y)&&(g=b(m=y[x],x,v),t))if(n)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(u)return!1;return d?-1:c||u?u:w}}},VJsP:function(t,e,n){"use strict";var i=n("2GTP"),r=n("Y7ZC"),o=n("JB68"),s=n("sNwI"),a=n("NwJ3"),l=n("tEej"),c=n("IP1Z"),u=n("fNZA");r(r.S+r.F*!n("TuGD")((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,r,d,p=o(t),h="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m,v=0,y=u(p);if(g&&(m=i(m,f>2?arguments[2]:void 0,2)),null==y||h==Array&&a(y))for(n=new h(e=l(p.length));e>v;v++)c(n,v,g?m(p[v],v):p[v]);else for(d=y.call(p),n=new h;!(r=d.next()).done;v++)c(n,v,g?s(d,m,[r.value,v],!0):r.value);return n.length=v,n}})},VKFn:function(t,e,n){n("bBy9"),n("FlQf"),t.exports=n("ldVq")},VVlx:function(t,e,n){var i=n("29s/")("keys"),r=n("YqAc");t.exports=function(t){return i[t]||(i[t]=r(t))}},Vtdi:function(t,e,n){"use strict";n.r(e);var i=n("rfXi"),r=n.n(i),o=(n("LPu/"),n("oCYn")),s=n("a1Qh"),a=n("Al62"),l=n("5fLb"),c=n.n(l),u=n("oLOV"),d=n("gfa5"),p=n("EPAk"),h=n("p4zG"),f={props:["items"],data:function(){return{loading:!1,clear_loading:!1,notifications:[]}},mounted:function(){this.notifications=this.items.slice()},methods:{clearAll:function(t){var e=this;t.preventDefault(),t.stopPropagation(),this.clear_loading=!0,this.$http.Post("/v1/users/notifications/clear",{},(function(){e.clear_loading=!1,e.notifications=[],$(".nav-notifications .notif-count").remove()}))}}},m=n("KHd+"),g=Object(m.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{staticClass:"btn btn-default btn-clear",attrs:{loading:t.clear_loading,icon:"fa fa-check"},on:{click:t.clearAll}},[t._v(t._s(t.$t("Mark these as read")))]),t._v(" "),n("a",{staticClass:"menu-header-link",attrs:{href:"/notifications"}},[n("strong",[t._v(t._s(t.$t("See All Notifications")))]),t.notifications.length?n("span",{staticClass:"unread-count"},[t._v("("+t._s(t.notifications.length)+")")]):t._e()]),t._v(" "),n("ul",{staticClass:"list-group"},t._l(t.notifications,(function(e,i){return n("li",{key:i,class:["list-group-item unseen",{system:"SYSTEM"==e.username}]},[n("a",{staticClass:"overlay",attrs:{href:e.url,"data-notif":e.id}}),t._v(" "),n("span",{staticClass:"avatar"},[n("img",{staticClass:"w-40 img-circle",attrs:{src:e.avatar_url}})]),t._v(" "),n("span",{staticClass:"message"},["SYSTEM"!=e.username?n("a",{attrs:{href:"/profile/"+e.username}},[t._v(t._s(e.display_name))]):t._e(),t._v(" "),n("span",{domProps:{innerHTML:t._s(e.message)}}),n("br"),n("small",{staticClass:"timeago"},[t._v(t._s(t._f("time_ago")(e.created_at)))])])])})),0),t._v(" "),t.notifications.length?t._e():n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"empty-board"},[n("h2",[t._v(t._s(t.$t("No Unread Notifications")))]),t._v(" "),n("a",{staticClass:"btn primary",attrs:{href:"/notifications"}},[t._v(t._s(t.$t("See Past Notifications")))])])],1)}),[],!1,null,null,null).exports,v={props:["item","show_cover"],data:function(){return{}},computed:{rating_value:function(){var t=parseFloat(this.item.rating);return isNaN(t)||t<=0?"":t>=10?10:t.toFixed(1)},rating_width:function(){var t=parseFloat(this.item.rating);return isNaN(t)&&(t=0),10*parseFloat(t)},show_cover_class:function(){return this.show_cover?"col-lg-9 col-xs-9":"col-lg-12 col-xs-12"}}},y=Object(m.a)(v,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"film-popover"},[n("div",{staticClass:"header"},[n("h2",[n("a",{attrs:{href:t.item.url}},[t._v(t._s(t.item.title))]),t._v(" "),n("span",[t._v(t._s(t.item.year))])]),t._v(" "),n("p",{staticClass:"original-title"},[t._v(t._s(t.item.original_title)+" ("+t._s(t.$t(t.item.film_type))+")")])]),t._v(" "),n("div",{staticClass:"row"},[t.show_cover?n("div",{staticClass:"col-lg-3 col-xs-3"},[n("img",{staticClass:"img-responsive",attrs:{src:t.item.thumbnail}}),t._v(" "),t._m(0)]):t._e(),t._v(" "),n("div",{class:t.show_cover_class},[n("div",{staticClass:"stats"},[n("div",{staticClass:"ranking"},[t._v("#"+t._s(t.item.rank)+" Highest Rated")]),t._v(" "),n("span",{staticClass:"rating"},[n("span",{staticClass:"fill",style:{width:t.rating_width+"%"}})]),n("span",{staticClass:"score"},[t._v(t._s(t.rating_value))])]),t._v(" "),n("p",{staticClass:"synopsis"},[t._v(t._s(t.item.synopsis))]),t._v(" "),n("p",{staticClass:"genre-tags"},t._l(t.item.genres,(function(e){return n("a",{key:e.id,attrs:{href:"/search?adv=titles&ge="+e.id+"&so=top"}},[t._v(t._s(t.$t(e.name)))])})),0)])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn-trailer btn-sm btn-block btn white m-t",attrs:{"data-id":"10540"}},[e("i",{staticClass:"fa fa-play-circle"}),this._v(" Watch Trailer")])}],!1,null,null,null).exports,b={data:function(){return{loading:!1,languages:[{code:"en-US",group:"en",domain:"mydramalist.com",name:"English"},{code:"es-ES",group:"es",domain:"es.mydramalist.com",name:"Español"},{code:"pt-PT",group:"pt",domain:"pt.mydramalist.com",name:"Português"},{code:"pt-BR",group:"br",domain:"br.mydramalist.com",name:"Português"},{code:"it-IT",group:"it",domain:"it.mydramalist.com",name:"Italiano"},{code:"fr-FR",group:"fr",domain:"fr.mydramalist.com",name:"Français"},{code:"ro-RO",group:"ro",domain:"ro.mydramalist.com",name:"Română"},{code:"nl-NL",group:"nl",domain:"nl.mydramalist.com",name:"Nederlands"}],language:document.documentElement.lang}},computed:{languages_map:function(){return this.languages.reduce((function(t,e){return t[e.code]=e,e.code!=e.group&&(t[e.group]=e),t}),{})},language_group:function(){return this.languages_map.hasOwnProperty(this.language)?this.languages_map[this.language].group:"??"},languages_sorted:function(){return this.languages.sort((function(t,e){return t.namee.name?1:0}))}},methods:{switchLanguage:function(t){this.loading=!0,this.language=t.code,this.$http.Post(window.site.url+"/i18n-switcher",{lang:t.code},(function(e){for(var n={},i=window.location.search.substring(1).split("&"),r=0;rCookie Policy, Privacy Policy, and our Terms of Service.',{cookie_link:"/privacy",privacy_link:"/privacy",terms_link:"/terms"})}},methods:{cookieClickedAccept:function(){},cookieStatus:function(){}}},k=Object(m.a)(w,(function(){var t=this.$createElement,e=this._self._c||t;return e("vue-cookie-accept-decline",{ref:"mdl-cookie-accept",attrs:{elementId:"mdl-cookie-accept",debug:!1,position:"bottom",type:"floating",disableDecline:!0,transitionName:"slideFromBottom",showPostponeButton:!1,forceCookies:!1},on:{status:this.cookieStatus,"clicked-accept":this.cookieClickedAccept}},[e("div",{attrs:{slot:"message"},domProps:{innerHTML:this._s(this.message)},slot:"message"}),this._v(" "),e("div",{attrs:{slot:"acceptContent"},slot:"acceptContent"},[e("i",{staticClass:"fa fa-times"})])])}),[],!1,null,null,null).exports;const C=(t,e)=>t.getAttribute("data-"+e),S=t=>"true"===C(t,"was-processed"),E=function(t){return t.getBoundingClientRect().top+window.pageYOffset-t.ownerDocument.documentElement.clientTop},T=function(t){return t.getBoundingClientRect().left+window.pageXOffset-t.ownerDocument.documentElement.clientLeft};function A(t,e,n){return!(function(t,e,n){return(e===window?window.innerHeight+window.pageYOffset:E(e)+e.offsetHeight)<=E(t)-n}(t,e,n)||function(t,e,n){return(e===window?window.pageYOffset:E(e))>=E(t)+n+t.offsetHeight}(t,e,n)||function(t,e,n){const i=window.innerWidth;return(e===window?i+window.pageXOffset:T(e)+i)<=T(t)-n}(t,e,n)||function(t,e,n){return(e===window?window.pageXOffset:T(e))>=T(t)+n+t.offsetWidth}(t,e,n))}const M=function(t,e){var n;let i=new t(e);try{n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:i}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:i})}window.dispatchEvent(n)};const P=(t,e)=>e?t.replace(/\.(jpe?g|png)/gi,".webp"):t,O="undefined"!=typeof window,D=O&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),I=O&&"classList"in document.createElement("p"),N=O&&(!(!(F=document.createElement("canvas")).getContext||!F.getContext("2d"))&&0===F.toDataURL("image/webp").indexOf("data:image/webp"));var F;const R=(t,e)=>{I?t.classList.add(e):t.className+=(t.className?" ":"")+e},L=function(t,e,n,i){for(let r,o=0;r=t.children[o];o+=1)if("SOURCE"===r.tagName){let t=C(r,n);j(r,e,t,i)}},j=function(t,e,n,i){n&&t.setAttribute(e,P(n,i))},B={IMG:(t,e)=>{const n=N&&e.to_webp,i=e.data_srcset,r=t.parentNode;r&&"PICTURE"===r.tagName&&L(r,"srcset",i,n);const o=C(t,e.data_sizes);j(t,"sizes",o);const s=C(t,i);j(t,"srcset",s,n);const a=C(t,e.data_src);j(t,"src",a,n)},IFRAME:(t,e)=>{const n=C(t,e.data_src);j(t,"src",n)},VIDEO:(t,e)=>{const n=e.data_src,i=C(t,n);L(t,"src",n),j(t,"src",i),t.load()}},V=(t,e)=>{const n=e._settings,i=t.tagName,r=B[i];if(r)return r(t,n),e._updateLoadingCount(1),void(e._elements=(o=e._elements,s=t,o.filter(t=>t!==s)));var o,s;((t,e)=>{const n=N&&e.to_webp,i=C(t,e.data_src),r=C(t,e.data_bg);if(i){let e=P(i,n);t.style.backgroundImage=`url("${e}")`}if(r){let e=P(r,n);t.style.backgroundImage=e}})(t,n)},z=function(t,e){t&&t(e)},H=(t,e,n)=>{t.addEventListener(e,n)},W=(t,e,n)=>{t.removeEventListener(e,n)},G=(t,e,n)=>{W(t,"load",e),W(t,"loadeddata",e),W(t,"error",n)},q=function(t,e,n){var i=n._settings;const r=e?i.class_loaded:i.class_error,o=e?i.callback_load:i.callback_error,s=t.target;((t,e)=>{I?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")})(s,i.class_loading),R(s,r),z(o,s),n._updateLoadingCount(-1)},U=(t,e)=>{const n=r=>{q(r,!0,e),G(t,n,i)},i=r=>{q(r,!1,e),G(t,n,i)};((t,e,n)=>{H(t,"load",e),H(t,"loadeddata",e),H(t,"error",n)})(t,n,i)},K=["IMG","IFRAME","VIDEO"];const J=function(t){this._settings=Object.assign({},{elements_selector:"img",container:window,threshold:300,throttle:150,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_initial:"initial",skip_invisible:!0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,callback_finish:null,to_webp:!1},t),this._loadingCount=0,this._queryOriginNode=this._settings.container===window?document:this._settings.container,this._previousLoopTime=0,this._loopTimeout=null,this._boundHandleScroll=this.handleScroll.bind(this),this._isFirstLoop=!0,window.addEventListener("resize",this._boundHandleScroll),this.update()};J.prototype={_loopThroughElements:function(t){const e=this._settings,n=this._elements,i=n?n.length:0;let r,o=[],s=this._isFirstLoop;if(s&&(this._isFirstLoop=!1),0!==i){for(r=0;r{for(;e.length;)t.splice(e.pop(),1)})(n,o)}else this._stopScrollHandler()},_startScrollHandler:function(){this._isHandlingScroll||(this._isHandlingScroll=!0,this._settings.container.addEventListener("scroll",this._boundHandleScroll))},_stopScrollHandler:function(){this._isHandlingScroll&&(this._isHandlingScroll=!1,this._settings.container.removeEventListener("scroll",this._boundHandleScroll))},_updateLoadingCount:function(t){this._loadingCount+=t,0===this._elements.length&&0===this._loadingCount&&z(this._settings.callback_finish)},handleScroll:function(){const t=this._settings.throttle;if(0!==t){let e=Date.now(),n=t-(e-this._previousLoopTime);n<=0||n>t?(this._loopTimeout&&(clearTimeout(this._loopTimeout),this._loopTimeout=null),this._previousLoopTime=e,this._loopThroughElements()):this._loopTimeout||(this._loopTimeout=setTimeout(function(){this._previousLoopTime=Date.now(),this._loopTimeout=null,this._loopThroughElements()}.bind(this),n))}else this._loopThroughElements()},loadAll:function(){this._loopThroughElements(!0)},update:function(t){const e=this._settings,n=t||this._queryOriginNode.querySelectorAll(e.elements_selector);this._elements=(t=>t.filter(t=>!S(t)))(Array.prototype.slice.call(n)),D?this.loadAll():(this._loopThroughElements(),this._startScrollHandler())},destroy:function(){window.removeEventListener("resize",this._boundHandleScroll),this._loopTimeout&&(clearTimeout(this._loopTimeout),this._loopTimeout=null),this._stopScrollHandler(),this._elements=null,this._queryOriginNode=null,this._settings=null},load:function(t,e){!function(t,e,n){var i=e._settings;!n&&S(t)||(z(i.callback_enter,t),K.indexOf(t.tagName)>-1&&(U(t,e),R(t,i.class_loading)),V(t,e),(t=>{((t,e,n)=>{var i="data-"+e;null!==n?t.setAttribute(i,n):t.removeAttribute(i)})(t,"was-processed","true")})(t),z(i.callback_set,t))}(t,this,e)}},O&&function(t,e){if(e)if(e.length)for(let n,i=0;n=e[i];i+=1)M(t,n);else M(t,e)}(J,window.lazyLoadOptions);var Y=n("pJH5"),X=n.n(Y),Q=n("hUol"),Z=n.n(Q),tt=n("2qlU"),et=n.n(tt),nt=n("36mD"),it=n.n(nt),rt=n("Ovn1"),ot=n("fb7z"),st={props:["visible","data"],data:function(){return{loading:!0,submit_loading:!1,form:{title:"",description:"",nsfw:!1}}},mounted:function(){this.fetchData()},computed:{isVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}}},methods:{fetchData:function(){var t=this;this.$http.Get("/v1/photos/"+this.data.id,(function(e){t.loading=!1,t.form=e}))},submit:function(){var t=this;this.submit_loading=!0,this.$http.Patch("/v1/photos/"+this.data.id,this.form,(function(){t.submit_loading=!1,t.loading=!0,window.location.reload()})).fail((function(){t.submit_loading=!1}))}}},at=Object(m.a)(st,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-dialog",{attrs:{visible:t.isVisible,title:t.$t("Edit Photo"),width:"700px","append-to-body":!0},on:{"update:visible":function(e){t.isVisible=e}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"form-label"}},[n("b",[t._v(t._s(t.$t("Title"))+":")])]),t._v(" "),n("el-input",{model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"form-label"}},[n("b",[t._v(t._s(t.$t("Description"))+":")])]),t._v(" "),n("el-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description",e)},expression:"form.description"}})],1),t._v(" "),n("div",{staticClass:"form-group"},[n("el-checkbox",{staticClass:"text-danger",model:{value:t.form.nsfw,callback:function(e){t.$set(t.form,"nsfw",e)},expression:"form.nsfw"}},[t._v("NSFW or Sensitive Content")]),t._v(" "),n("div",{staticClass:"text-muted"},[t._v("I acknowledge that uploading images containing nudity, shocking content, excessive violence, or any implied or explicit sexual acts may result in account suspension or a permanent ban.")])],1),t._v(" "),n("div",{staticClass:"m-t clearfix"},[n("el-button",{staticClass:"btn pull-right",attrs:{loading:t.submit_loading,type:"primary"},on:{click:t.submit}},[n("span",[t._v(t._s(t.$t("Save Changes")))])])],1)])])],1)}),[],!1,null,null,null).exports,lt={components:{Share:n("yhnj").a},props:["visible","data"],data:function(){return{}},mounted:function(){},computed:{isVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}}}},ct=Object(m.a)(lt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{visible:t.isVisible,title:"Share",width:"500px","append-to-body":!0},on:{"update:visible":function(e){t.isVisible=e}}},[n("share",{attrs:{url:t.data.url}})],1)}),[],!1,null,null,null).exports,ut=n("GQeE"),dt=n.n(ut),pt={components:{DiscussionsTiptapEditor:n("LEl0").a},props:["data","visible"],data:function(){return{i18n:s.a,loading:!1,submit_loading:!1,hasLoadedPost:!1,editorKey:0,editorMessage:"",post:{}}},mounted:function(){this.visible&&this.handleOpen(),$(".el-dialog__wrapper").length&&$(".el-dialog__wrapper").scroll((function(){$(document).trigger("scroll")}))},watch:{visible:function(t){t?this.handleOpen():this.handleClosed()},loading:function(t){!t&&this.visible&&this.focusEditor()}},computed:{is_visible:{set:function(t){this.$emit("update:visible",t)},get:function(){return this.visible}},url:function(){var t="/v1/forums/posts/"+this.data.id;return"topic"==this.data.type?"/v1/forums/topics/"+this.data.id:t},shouldRenderEditor:function(){return this.visible&&this.hasLoadedPost&&!this.loading}},methods:{handleOpen:function(){dt()(this.post).length?this.focusEditor():this.loading||this.fetchData()},handleClosed:function(){this.loading=!1,this.submit_loading=!1,this.hasLoadedPost=!1,this.editorMessage="",this.post={}},handleEditorInput:function(t){this.editorMessage=t},focusEditor:function(){var t=this;this.$nextTick((function(){t.$refs.editor&&"function"==typeof t.$refs.editor.focus&&t.$refs.editor.focus()}))},fetchData:function(){var t=this;this.loading=!0,this.$http.Get(this.url+"/edit",(function(e){t.post=e,t.editorMessage=e&&"string"==typeof e.message?e.message:"",t.hasLoadedPost=!0,t.editorKey+=1,t.loading=!1})).fail((function(){t.loading=!1,t.hasLoadedPost=!1,t.is_visible=!1}))},submit:function(){var t=this;this.submit_loading=!0;var e=this.$refs.editor&&"function"==typeof this.$refs.editor.getHTML?this.$refs.editor.getHTML():this.editorMessage,n={title:this.post.topic_title,text:e};this.$http.Patch(this.url,n,(function(e){t.is_visible=!1,$("#post-"+t.post.id).find(".post__message").html(e.message)})).fail((function(){t.submit_loading=!1}))}}},ht=Object(m.a)(pt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{visible:t.is_visible,title:t.i18n.t("Edit Post"),width:"640px","append-to-body":!0,"close-on-click-modal":!1},on:{"update:visible":function(e){t.is_visible=e},open:t.handleOpen,closed:t.handleClosed}},[t.post.first_post?n("div",{staticClass:"form-group"},[n("el-input",{attrs:{placeholder:t.i18n.t("Subject")},model:{value:t.post.topic_title,callback:function(e){t.$set(t.post,"topic_title",e)},expression:"post.topic_title"}})],1):t._e(),t._v(" "),n("div",{staticClass:"form-group"},[t.shouldRenderEditor?n("discussions-tiptap-editor",{key:t.editorKey,ref:"editor",attrs:{value:t.editorMessage,"min-height":220,"sticky-toolbar":!0,placeholder:t.i18n.t("Type something")},on:{input:t.handleEditorInput}}):t._e()],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{disabled:t.submit_loading},on:{click:function(e){t.is_visible=!1}}},[t._v(t._s(t.i18n.t("Cancel")))]),t._v(" "),n("el-button",{attrs:{type:"primary",loading:t.submit_loading},on:{click:t.submit}},[t._v(t._s(t.i18n.t("Save")))])],1)])}),[],!1,null,null,null).exports,ft={components:{GameContainer:n("3E3M").a},props:["gid"],data:function(){return{}},methods:{getNextGame:function(t){t.preventDefault(),this.$bus.$emit("fetch_next_game")}}},mt=Object(m.a)(ft,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"mdl-game-widget","data-gid":this.gid}},[e("game-container",{ref:"game",attrs:{gid:this.gid,isWidget:!0,inlineStyle:"min-height: 350px;"}}),this._v(" "),e("div",{staticClass:"text-right"},[e("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:this.getNextGame}},[this._v("Skip")])])],1)}),[],!1,null,null,null).exports,gt=n("yghv"),vt=n.n(gt),yt=n("OUnJ"),bt=n("xB1w"),_t=n.n(bt);function xt(t,e){switch(t.toUpperCase()){case"NEWSFEED":case"FEEDS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(5),n.e(26)]).then(n.bind(null,"4SGj"));case"SETTINGS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(28)]).then(n.bind(null,"5yY1"));case"ADVANCED-SEARCH":return void n.e(59).then(n.bind(null,"MlUh"));case"NOTIFICATIONS-VIEW":return void Promise.all([n.e(0),n.e(56)]).then(n.bind(null,"ONOM"));case"FRIENDS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(43)]).then(n.bind(null,"B6II"));case"SHOW-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(30)]).then(n.bind(null,"bXjU"));case"ADMIN-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(10),n.e(12),n.e(32)]).then(n.bind(null,"ubyJ"));case"HOME-VIEW":return void Promise.all([n.e(22),n.e(63)]).then(n.bind(null,"e0Gm"));case"CLIST-MANAGE-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(39)]).then(n.bind(null,"gNNL"));case"REVIEWS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(51)]).then(n.bind(null,"L9lx"));case"PLAYLIST-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(7),n.e(11),n.e(8),n.e(6),n.e(9),n.e(4),n.e(24)]).then(n.bind(null,"3Ihu"));case"RECS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(53)]).then(n.bind(null,"93LH"));case"RECOMMENDATIONS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(7),n.e(11),n.e(8),n.e(6),n.e(9),n.e(4),n.e(25)]).then(n.bind(null,"wfnx"));case"ARTICLE-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(55)]).then(n.bind(null,"8K3l"));case"ARTICLE-EDITOR-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(50)]).then(n.bind(null,"Yg5L"));case"TRANSLATIONS-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(5),n.e(36)]).then(n.bind(null,"JkNW"));case"TUTORIAL-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(2),n.e(42)]).then(n.bind(null,"JDg6"));case"EPISODE-CALENDAR-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(33)]).then(n.bind(null,"stG9"));case"INBOX-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(44)]).then(n.bind(null,"6i55"));case"PROFILE-VIEW":return void Promise.all([n.e(0),n.e(1),n.e(45)]).then(n.bind(null,"bhUH"));case"YEAR-IN-REVIEW":return void Promise.all([n.e(0),n.e(52)]).then(n.bind(null,"IF/B"));case"PASSWORD-RESET-VIEW":case"SIGNIN-VIEW":case"SIGNUP-VIEW":return Promise.all([n.e(0),n.e(58)]).then(n.bind(null,"TwXn"));case"REVIEW-FORM-VIEW":return Promise.all([n.e(0),n.e(1),n.e(38)]).then(n.bind(null,"fXS2"));case"TITLE-EDIT-VIEW":return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(10),n.e(12),n.e(49)]).then(n.bind(null,"vnPi"));case"TITLE-ADD-VIEW":return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(10),n.e(12),n.e(60)]).then(n.bind(null,"Efvj"));case"GROUP-CREATE-VIEW":case"GROUP-PAGE-ANALYTICS":case"GROUP-MEMBERSHIP-ACTION":case"GROUP-SETTINGS-VIEW":case"GROUP-MOD-TOOLS-VIEW":return Promise.all([n.e(0),n.e(1),n.e(3),n.e(35)]).then(n.bind(null,"McEH"));case"PERSON-EDIT-VIEW":return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(31)]).then(n.bind(null,"bMzP"));case"PERSON-VIEW":return Promise.all([n.e(0),n.e(1),n.e(57)]).then(n.bind(null,"yNm8"));case"PERSON-ADD-VIEW":return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(29)]).then(n.bind(null,"WdCk"));case"EPISODE-EDIT-VIEW":return Promise.all([n.e(0),n.e(1),n.e(34)]).then(n.bind(null,"4DHi"));case"COMMENTS-VIEW":return Promise.all([n.e(0),n.e(1),n.e(5),n.e(41)]).then(n.bind(null,"zxKb"));case"PATRON-VIEW":return Promise.all([n.e(0),n.e(46)]).then(n.bind(null,"a8KF"));case"STYLES-VIEW":return Promise.all([n.e(1),n.e(37)]).then(n.bind(null,"nndF"));case"FORUM-VIEW":return Promise.all([n.e(0),n.e(1),n.e(48)]).then(n.bind(null,"P+xH"));case"WATCH-TRAILER":return Promise.all([n.e(2),n.e(7),n.e(11),n.e(8),n.e(6),n.e(9),n.e(4),n.e(27)]).then(n.bind(null,"XKvV"));case"COINS-INFO":return n.e(61).then(n.t.bind(null,"nPIW",7));case"WIKI-VIEW":return Promise.all([n.e(0),n.e(54)]).then(n.bind(null,"nSst"));case"GAMES-RESULT-SHARE":case"GAME-VIEW":return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(40)]).then(n.bind(null,"1tnd"));case"REDIRECT-VIEW":return Promise.all([n.e(1),n.e(64)]).then(n.bind(null,"kqMS"));case"DRAMALIST-VIEW":return n.e(62).then(n.bind(null,"q7V8"));case"DRAMALIST-VIEW-V2":return Promise.all([n.e(0),n.e(1),n.e(2),n.e(47)]).then(n.bind(null,"DibU")).then((function(t){window.App.default.setDramalistSettings=t.default.setDramalistSettings}))}console.warn("Invalid component: ",t)}var wt=n("iWqV"),kt=n.n(wt),Ct=n("s3Cy"),St=n.n(Ct),Et=n("3vv1"),Tt=n.n(Et),At=n("GP+6"),Mt=n.n(At),Pt=n("7t/g"),Ot=n.n(Pt),Dt=n("hF+1"),It=n.n(Dt),$t=n("3zPb"),Nt=n.n($t),Ft=n("8606"),Rt=n.n(Ft),Lt=n("QQVE"),jt=n.n(Lt),Bt=n("N4fY"),Vt=n.n(Bt),zt=n("TkuN"),Ht=n.n(zt),Wt=n("s1u7"),Gt=n.n(Wt),qt=n("53J1"),Ut=n.n(qt),Kt=n("SGzU"),Jt=n.n(Kt),Yt=n("5FBR"),Xt=n.n(Yt),Qt=n("vYzU"),Zt=n.n(Qt),te=n("Wgwc"),ee=n.n(te),ne=(n("aUzv"),n("QgiU")),ie=n.n(ne);o.default.prototype.$notify=c.a,o.default.use(it.a),o.default.use(Zt.a),ee.a.extend(ie.a),ee.a.locale(document.documentElement.lang),o.default.use(kt.a),o.default.use(St.a),o.default.use(Tt.a),o.default.use(Mt.a),o.default.use(Ot.a),o.default.use(It.a),o.default.use(Nt.a),o.default.use(Rt.a),o.default.use(jt.a),o.default.use(Vt.a),o.default.use(Ht.a),o.default.use(Gt.a),o.default.use(Ut.a),o.default.use(Jt.a),o.default.use(Xt.a),window.bootbox=X.a,window.toastr=Z.a,o.default.component("edit-post-dialog",ht),o.default.component("report-dialog",rt.a),o.default.component("edit-photo-dialog",at),o.default.component("share-dialog",ct),o.default.component("rating",p.a),o.default.prototype.$http=u.a,o.default.prototype.$bus=d.a,o.default.component("vue-cookie-accept-decline",yt.a),o.default.filter("time_ago",(function(t){return ee()(t).fromNow()})),o.default.filter("num_with_commas",(function(t){return(t=parseInt(t))>0?t.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"):0})),$.fn.loading=function(t){var e=$(this);if(1==t){var n=e.outerWidth(),i=e[0].getBoundingClientRect().height;e.hasClass("input-group-addon")||e.css({width:n,height:i}),e.addClass("loading").prop("disabled",!0),e.children("span").length?e.children("span:first-child").after(''):e.append(''),e.find("input").prop("disabled",!0)}else e.removeClass("loading").prop("disabled",!1).css({width:!1,height:!1}).children("i").remove(),e.find("input").prop("disabled",!1)},$.fn.ytLazyLoad=function(t){this.each((function(){var e=$(this).data(),n=$(this);""!=e.id?(n.css({width:e.width,height:e.height,"background-image":"url(https://i.ytimg.com/vi/"+e.id+"/hqdefault.jpg)"}).removeClass("loaded"),t?n.html(""):n.html(''+e.title+"")):n.remove()}))},$.fn.loadYtp=function(){$(this).addClass("loaded").html(a.a.varsReplace('',$(this).data()))},$.fn.stickyBox=function(){$(this).sticky({topSpacing:78,bottomSpacing:$("#footer").outerHeight()+40})};var re=["ERROR","Currently watching","Completed","Plan to watch","On-hold","Dropped","Not Interested","Undecided"];function oe(t){for(var e in t){var n=void 0;switch(e){case"e_reviews":case"reviews":ce(t[e]);break;case"mylist":se(t[e]);break;case"photo":n="photos";case"article":case"clist":case"game":case"wiki":case"people":le(t[e],void 0!==n?n:e);break;case"mlikes":ae(t[e])}}}function se(t){for(var e=0;e'):i.text((n=t[e].status,void 0!==re[n]?re[n]:"Error Status"))})),t[e].rating){var i=$("#your-rating-"+t[e].rid);i.length&&(i.find(".fill").width(10*t[e].rating+"%"),i.find(".score > b").text(t[e].rating))}}}function ae(t){for(var e={},n=0;nRe-send verification email\')'}),$(document).on("click",".btn-resend-verifye",(function(t){t.preventDefault();var e=$(this);e.hasClass("sent")||(e.addClass("sent"),u.a.Post("/v1/account/resend_verify_email",{},(function(t){e.removeClass("sent"),o.default.prototype.$notify({offset:60,type:"success",title:"Success",message:"Email verification sent!"})})))}))},setDramalistSettings:function(t){console.log("init..")}};n.e(65).then(n.t.bind(null,"oVzR",7)),$(document).ready((function(){var t=new et.a({panel:document.getElementById("content"),menu:document.getElementById("menu"),padding:300,side:"right",touch:!1,tolerance:70});if(window.user.logged_in||setTimeout((function(){var t=document.createElement("div");t.id="accept_cookies",document.body.appendChild(t),new o.default({el:"#accept_cookies",template:"",render:function(t){return t(k)}})}),3e4),document.getElementById("mdl-component")){var e=document.getElementById("mdl-component").tagName;xt("DIV"==e?document.getElementById("mdl-component").getAttribute("data-component"):e)}$("#newsfeed").length&&xt("newsfeed"),$("#cmtsapp").length&&xt("comments-view"),document.getElementsByClassName("mdl-component")&&r()(document.getElementsByClassName("mdl-component")).forEach((function(t){xt(t.getAttribute("data-component"))}));new _t.a(".adpin",{marginTop:87,marginBottom:35,stickyClass:".apin",stickyContainer:".affix"});$(".btn-dark-mode").on("click",(function(t){t.preventDefault();var e=$(this).data("mode");if(null==e)e=$("html").hasClass("dark-mode")?0:1;else if(e==($("html").hasClass("dark-mode")?1:0))return;var n=0;0==e?($("html").removeClass("dark-mode"),$(".btn-dark-mode").find("button").removeClass("btn-success").addClass("btn-default").text("OFF")):($("html").addClass("dark-mode"),n=1,$(".btn-dark-mode").find("button").removeClass("btn-default").addClass("btn-success").text("ON")),vt.a.set("_mdl_dm",n,365),window.user.logged_in&&u.a.Post("/v1/account/settings",{dark_mode:n})}));var n=$("meta[property=mdl\\:rid]");if(n.length){var i=n.attr("content"),l=$("meta[property=mdl\\:type]").attr("content");u.a.Collect({eid:i,e:l})}$(".btn-slide-menu").on("click",(function(){t.toggle()}));var c=document.querySelector(".app-header");if(t.on("translate",(function(t){c.style.transform="translateX("+t+"px)"})),t.on("beforeopen",(function(){c.style.transition="transform 300ms ease",c.style.transform="translateX(-300px)"})),t.on("beforeclose",(function(){c.style.transition="transform 300ms ease",c.style.transform="translateX(0px)"})),t.on("open",(function(){c.style.transition="",$("#content").one("click",(function(e){e.preventDefault(),t.close()}))})),t.on("close",(function(){c.style.transition=""})),$(document).on("click",".mdl-verified",(function(){window.location.href="/account/privacy"})),$(document).on("click",".vip-tag",(function(){window.location.href="/vip"})),$(document).on("click",".in-link",(function(){$(this).data("href")&&(window.location.href=$(this).data("href"))})),$(window).resize((function(){$(".app-header").width($(this).width())})).trigger("resize"),$(".read-more").click((function(t){t.preventDefault(),$(this).closest("div").addClass("full-read")})),$(".btn-menu:not(.loaded)").on("mouseenter",(function(t){var e=$(this);if(!e.hasClass("loaded")){e.addClass("loaded");var n=e.data();new o.default({i18n:s.a,el:e.parent()[0],template:"",render:function(t){return t(x.a,{props:{data:{items:[],cid:n.id,ctype:n.type},loaded:!0}})}})}})),$("#mdl-game-widget").length&&new o.default({i18n:s.a,el:"#mdl-game-widget",template:"",render:function(t){return t(mt,{props:{gid:$("#mdl-game-widget").data("gid")}})}}),$(document).on("click",".btn-manage-list",(function(t){t.preventDefault();var e=$(this),n=$(this).data("rid")?$(this).data("rid"):$(this).data("id");if(u.a.Lock())return!1;if(e.loading(!0),!$("#mdl-manage-modal").length){var i=$('
');$("body").append(i)}o.default.prototype.$http.Get("/v1/users/watchaction/"+n,(function(t){u.a.Release(),new o.default({i18n:s.a,el:"#mdl-manage-modal",template:"",data:{visible:!1},render:function(e){var i=this;return e(h.a,{props:{isMobilePhone:window.isMobilePh,resp:t,rid:n,visible:this.visible},on:{"update:visible":function(t){i.visible=t}}})}}),e.loading(!1)}))})),$(document).on("click",".jbtn-like",(function(t){t.preventDefault();var e=$(this),n=e.data("id"),i=e.data("type"),r=!e.hasClass("active");u.a.Lock()||u.a.Post("/v1/users/likes/"+n,{type:i,liked:r},(function(t){u.a.Release((function(){$(".jbtn-like[data-type="+i+"]").each((function(){var e=$(this);e.data("id")==n&&(r?e.addClass("active"):e.removeClass("active"),e.find(".like-cnt,.like-cntb,.like-cntb-nohl").text(t.total.toLocaleString("en-US")))}))}))})).fail((function(t){o.default.prototype.$notify({type:"danger",offset:60,message:t.responseJSON.error})}))})),$("[data-stats]").length&&""!=u.a.access_token){var d={},p={},f={},m=0;if($("[data-stats]").each((function(){var t=$(this).data("stats"),e=t.split(":");void 0===p[t]&&(p[t]=!0,void 0===d[e[0]]?(m++,d[e[0]]=e[1],f[e[0]]=1):(d[e[0]]+="-"+e[1],f[e[0]]++))})),m>0){if(void 0!==f.mylist&&f.mylist>40){var v=d.mylist;delete d.mylist,m--;var b,w,C,S=v.split("-");for(b=0,w=S.length;b0&&u.a.Get("/v1/users/data",d,(function(t){oe(t)}))}}if($(".nav-notifications").length||window.location.href.indexOf("notif")>=0){var E=a.a.getUrlVars();if("notif"==E.r){var T=parseInt(E._nid),A=$(".nav-notifications .notif-count");T>0&&A.length&&(A.fadeOut(),u.a.Post("/v1/users/notifications/"+T+"/clear",{},(function(t){if(void 0!==t.cleared){var e=parseInt(A.text());isNaN(e)||--e<=0?A.remove():(A.text(e),A.fadeIn())}else A.fadeIn()})).fail((function(){A.fadeIn()})))}}$(".share-container .btn-social").on("click",(function(t){t.preventDefault();var e=$(this).attr("href");void 0!==e&&e.length&&("#comments"!=e?a.a.popupCenter(e,"",580,470):$("body, html").animate({scrollTop:$("#cmtsapp").offset().top},600))})),$(".nav-notifications").one("click",(function(t){t.preventDefault();var e=$(this);if(!e.hasClass("open")){var n=e.find("> .nav-link");"dropdown"!=n.attr("data-toggle")&&u.a.Get("/v1/users/notifications?filter=new",(function(t){n.attr("data-toggle","dropdown").dropdown("toggle"),new o.default({i18n:s.a,el:"#mdl-notify-dropdown",template:"",render:function(e){return e(g,{props:{isMobilePhone:window.isMobilePh,items:t.items}})}})}))}}));var M=null;if($(document).on("click",".btn-sync-balance",(function(t){var e=this;$(this).children("i").addClass("fa-spin"),u.a.Post("/v1/users/balance/sync",{},(function(t){$(e).children("i").removeClass("fa-spin"),$(e).parent().find(".balance").text(a.a.numberWithCommas(t.balance))}))})),$(document).on("click",".btn-get-coins",(function(t){new o.default({el:"#mdl-modal",i18n:s.a,template:"",data:{visible:!0},render:function(t){var e=this;return t(ot.a,{props:{visible:this.visible},on:{"update:visible":function(t){e.visible=t}}})}})})),$(document).on("click",".ad-removal",(function(t){window.location.href="/vip"})),$(document).on("click",".report-link",(function(t){var e=$(this).data("id"),n=$(this).data("type");new o.default({el:"#mdl-modal",template:"",data:{visible:!0},render:function(t){var i=this;return t(rt.a,{props:{data:{id:e,type:n},visible:this.visible},on:{"update:visible":function(t){i.visible=t}}})}})})),$(document).on("mouseenter.info","a[data-info]",(function(t){if(t.preventDefault(),a.a.isMobileDevice())$(document).unbind("mouseenter.info");else{var e=$(this);M=setTimeout((function(){var t=e.data("info").split(":"),n=void 0===e.data("cover")||n;e.removeAttr("data-info"),e.qtip({id:t[1]+"-"+t[0],content:{text:function(e,i){return u.a.Get("/v1/titles/"+t[1],(function(e){var r=new o.default({template:"",i18n:s.a,render:function(t){return t(y,{props:{isMobilePhone:window.isMobilePh,show_cover:n,item:e}})}}).$mount("#popover-"+t[1]+"-"+t[0]);i.set("content.text",r.$el.innerHTML)})),'
'}},show:{delay:300,ready:!0,event:"mouseenter"},hide:{fixed:!0,delay:300},position:{my:"center left",at:"center right",adjust:{method:"flip flip"},viewport:$(window)},style:"qtip-wiki"})}),600)}})).on("mouseleave.info","a[data-info]",(function(){clearTimeout(M)})),$(".film-info").click((function(t){t.preventDefault();var e=$(this).data("info").split(":");X.a.hideAll(),u.a.Get("/v1/titles/"+e[1],(function(t){X.a.dialog({message:'
',backdrop:!1,onEscape:!0}).init((function(){new o.default({template:"",i18n:s.a,render:function(e){return e(y,{props:{isMobilePhone:window.isMobilePh,item:t}})}}).$mount("#popover-"+e[1]+"-"+e[0])}))}))})),$(".nav-search").bind("shown.bs.dropdown",(function(){$(this).find(".form-control").focus()})),$(".current-avatar").length){var P=$(".header-user-avatar").attr("src");""==P&&(P="https://i.mydramalist.com/letter/anon"),$(".current-avatar").each((function(){$(this).attr("src",P)}))}$("#mdl-lang").one("mouseenter",(function(){new o.default({el:"#mdl-lang",template:"",components:{LangSwitcher:_}})})),$("#top-nav li.dropdown").hover((function(){$(this).find(".dropdown-menu").stop(!0,!0).delay(100).fadeIn(300)}),(function(){$(this).find(".dropdown-menu").stop(!0,!0).delay(100).fadeOut(300)})),$(document).on("click",".footer-stky-close",(function(){$("#footer-stky ").removeClass("float")})),$(".btnQuickEpisodeUpdate a").click((function(t){t.preventDefault();var e=$(this).parent().data("id"),n=$("#ml"+e).find(".episode-seen"),i=parseInt(n.text());isNaN(i)&&(i=0),"+"==$(this).text()?i++:i--,u.a.Patch("/v1/users/watchaction/"+e,{episode_seen:i,quick_action:!0},(function(t,e,i){o.default.prototype.$notify({offset:60,type:"success",message:"Success!"}),n.text(t.episode_seen)}))}))}))},Vzfy:function(t,e,n){var i=n("Y7ZC");i(i.S,"Number",{isNaN:function(t){return t!=t}})},W070:function(t,e,n){var i=n("NsO/"),r=n("tEej"),o=n("D8kY");t.exports=function(t){return function(e,n,s){var a,l=i(e),c=r(l.length),u=o(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},WEpk:function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},WST1:function(t,e,n){"use strict";e.__esModule=!0,e.isInContainer=e.getScrollContainer=e.isScroll=e.getStyle=e.once=e.off=e.on=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.hasClass=h,e.addClass=function(t,e){if(!t)return;for(var n=t.className,i=(e||"").split(" "),r=0,o=i.length;r-1}var f=e.getStyle=c<9?function(t,e){if(!s){if(!t||!e)return null;"float"===(e=u(e))&&(e="styleFloat");try{switch(e){case"opacity":try{return t.filters.item("alpha").opacity/100}catch(t){return 1}default:return t.style[e]||t.currentStyle?t.currentStyle[e]:null}}catch(n){return t.style[e]}}}:function(t,e){if(!s){if(!t||!e)return null;"float"===(e=u(e))&&(e="cssFloat");try{var n=document.defaultView.getComputedStyle(t,"");return t.style[e]||n?n[e]:null}catch(n){return t.style[e]}}};var m=e.isScroll=function(t,e){if(!s)return f(t,null!==e||void 0!==e?e?"overflow-y":"overflow-x":"overflow").match(/(scroll|auto)/)};e.getScrollContainer=function(t,e){if(!s){for(var n=t;n;){if([window,document,document.documentElement].includes(n))return window;if(m(n,e))return n;n=n.parentNode}return n}},e.isInContainer=function(t,e){if(s||!t||!e)return!1;var n=t.getBoundingClientRect(),i=void 0;return i=[window,document,document.documentElement,null,void 0].includes(e)?{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:e.getBoundingClientRect(),n.topi.top&&n.right>i.left&&n.leftt?c():!0!==e&&(r=setTimeout(i?u:c,void 0===i?t-a:t))}}},Wgwc:function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",i="hour",r="day",o="week",s="month",a="quarter",l="year",c="date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},f={s:h,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+h(i,2,"0")+":"+h(r,2,"0")},m:function t(e,n){if(e.date()1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(i(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(f(this,e),t)}}),p&&i(u.prototype,"size",{get:function(){return f(this,e)[m]}}),u},def:function(t,e,n){var i,r,o=g(t,e);return o?o.v=n:(t._l=o={i:r=h(e,!0),k:e,v:n,p:i=t._l,n:void 0,r:!1},t._f||(t._f=o),i&&(i.n=o),t[m]++,"F"!==r&&(t._i[r]=o)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,(function(t,n){this._t=f(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?u(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),d(e)}}},"XJU/":function(t,e,n){var i=n("NegM");t.exports=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:i(t,r,e[r]);return t}},XLbu:function(t,e,n){var i=n("Y7ZC");i(i.P+i.R,"Map",{toJSON:n("8iia")("Map")})},Y7ZC:function(t,e,n){var i=n("5T2Y"),r=n("WEpk"),o=n("2GTP"),s=n("NegM"),a=n("B+OT"),l=function(t,e,n){var c,u,d,p=t&l.F,h=t&l.G,f=t&l.S,m=t&l.P,g=t&l.B,v=t&l.W,y=h?r:r[e]||(r[e]={}),b=y.prototype,_=h?i:f?i[e]:(i[e]||{}).prototype;for(c in h&&(n=e),n)(u=!p&&_&&void 0!==_[c])&&a(y,c)||(d=u?_[c]:n[c],y[c]=h&&"function"!=typeof _[c]?n[c]:g&&u?o(d,i):v&&_[c]==d?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[c]=d,t&l.R&&b&&!b[c]&&s(b,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},YApg:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=n("0DQi").c},YEIV:function(t,e,n){"use strict";e.__esModule=!0;var i,r=n("SEkw"),o=(i=r)&&i.__esModule?i:{default:i};e.default=function(t,e,n){return e in t?(0,o.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},YNkh:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("8gFn");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},YWdi:function(t,e,n){"use strict";var i,r;"function"==typeof Symbol&&Symbol.iterator;void 0===(r="function"==typeof(i=function(){var t=window,e={placement:"bottom",gpuAcceleration:!0,offset:0,boundariesElement:"viewport",boundariesPadding:5,preventOverflowOrder:["left","right","top","bottom"],flipBehavior:"flip",arrowElement:"[x-arrow]",arrowOffset:0,modifiers:["shift","offset","preventOverflow","keepTogether","arrow","flip","applyStyle"],modifiersIgnored:[],forceAbsolute:!1};function n(t,n,i){this._reference=t.jquery?t[0]:t,this.state={};var r=null==n,o=n&&"[object Object]"===Object.prototype.toString.call(n);return this._popper=r||o?this.parse(o?n:{}):n.jquery?n[0]:n,this._options=Object.assign({},e,i),this._options.modifiers=this._options.modifiers.map(function(t){if(-1===this._options.modifiersIgnored.indexOf(t))return"applyStyle"===t&&this._popper.setAttribute("x-placement",this._options.placement),this.modifiers[t]||t}.bind(this)),this.state.position=this._getPosition(this._popper,this._reference),u(this._popper,{position:this.state.position,top:0}),this.update(),this._setupEventListeners(),this}function i(e){var n=e.style.display,i=e.style.visibility;e.style.display="block",e.style.visibility="hidden",e.offsetWidth;var r=t.getComputedStyle(e),o=parseFloat(r.marginTop)+parseFloat(r.marginBottom),s=parseFloat(r.marginLeft)+parseFloat(r.marginRight),a={width:e.offsetWidth+s,height:e.offsetHeight+o};return e.style.display=n,e.style.visibility=i,a}function r(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function o(t){var e=Object.assign({},t);return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function s(t,e){var n,i=0;for(n in t){if(t[n]===e)return i;i++}return null}function a(e,n){return t.getComputedStyle(e,null)[n]}function l(e){var n=e.offsetParent;return n!==t.document.body&&n?n:t.document.documentElement}function c(e){var n=e.parentNode;return n?n===t.document?t.document.body.scrollTop||t.document.body.scrollLeft?t.document.body:t.document.documentElement:-1!==["scroll","auto"].indexOf(a(n,"overflow"))||-1!==["scroll","auto"].indexOf(a(n,"overflow-x"))||-1!==["scroll","auto"].indexOf(a(n,"overflow-y"))?n:c(e.parentNode):e}function u(t,e){Object.keys(e).forEach((function(n){var i,r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&""!==(i=e[n])&&!isNaN(parseFloat(i))&&isFinite(i)&&(r="px"),t.style[n]=e[n]+r}))}function d(t){var e={width:t.offsetWidth,height:t.offsetHeight,left:t.offsetLeft,top:t.offsetTop};return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function p(t){var e=t.getBoundingClientRect(),n=-1!=navigator.userAgent.indexOf("MSIE")&&"HTML"===t.tagName?-t.scrollTop:e.top;return{left:e.left,top:n,right:e.right,bottom:e.bottom,width:e.right-e.left,height:e.bottom-n}}function h(e){for(var n=["","ms","webkit","moz","o"],i=0;i1&&console.warn("WARNING: the given `parent` query("+e.parent+") matched more than one element, the first one will be used"),0===s.length)throw"ERROR: the given `parent` doesn't exists!";s=s[0]}return s.length>1&&s instanceof Element==0&&(console.warn("WARNING: you have passed as parent a list of elements, the first one will be used"),s=s[0]),s.appendChild(r),r;function a(t,e){e.forEach((function(e){t.classList.add(e)}))}function l(t,e){e.forEach((function(e){t.setAttribute(e.split(":")[0],e.split(":")[1]||"")}))}},n.prototype._getPosition=function(e,n){return l(n),this._options.forceAbsolute?"absolute":function e(n){return n!==t.document.body&&("fixed"===a(n,"position")||(n.parentNode?e(n.parentNode):n))}(n)?"fixed":"absolute"},n.prototype._getOffsets=function(t,e,n){n=n.split("-")[0];var r={};r.position=this.state.position;var o="fixed"===r.position,s=function(t,e,n){var i=p(t),r=p(e);if(n){var o=c(e);r.top+=o.scrollTop,r.bottom+=o.scrollTop,r.left+=o.scrollLeft,r.right+=o.scrollLeft}return{top:i.top-r.top,left:i.left-r.left,bottom:i.top-r.top+i.height,right:i.left-r.left+i.width,width:i.width,height:i.height}}(e,l(t),o),a=i(t);return-1!==["right","left"].indexOf(n)?(r.top=s.top+s.height/2-a.height/2,r.left="left"===n?s.left-a.width:s.right):(r.left=s.left+s.width/2-a.width/2,r.top="top"===n?s.top-a.height:s.bottom),r.width=a.width,r.height=a.height,{popper:r,reference:s}},n.prototype._setupEventListeners=function(){if(this.state.updateBound=this.update.bind(this),t.addEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement){var e=c(this._reference);e!==t.document.body&&e!==t.document.documentElement||(e=t),e.addEventListener("scroll",this.state.updateBound),this.state.scrollTarget=e}},n.prototype._removeEventListeners=function(){t.removeEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement&&this.state.scrollTarget&&(this.state.scrollTarget.removeEventListener("scroll",this.state.updateBound),this.state.scrollTarget=null),this.state.updateBound=null},n.prototype._getBoundaries=function(e,n,i){var r,o,s={};if("window"===i){var a=t.document.body,u=t.document.documentElement;r=Math.max(a.scrollHeight,a.offsetHeight,u.clientHeight,u.scrollHeight,u.offsetHeight),s={top:0,right:Math.max(a.scrollWidth,a.offsetWidth,u.clientWidth,u.scrollWidth,u.offsetWidth),bottom:r,left:0}}else if("viewport"===i){var p=l(this._popper),h=c(this._popper),f=d(p),m="fixed"===e.offsets.popper.position?0:(o=h)==document.body?Math.max(document.documentElement.scrollTop,document.body.scrollTop):o.scrollTop,g="fixed"===e.offsets.popper.position?0:function(t){return t==document.body?Math.max(document.documentElement.scrollLeft,document.body.scrollLeft):t.scrollLeft}(h);s={top:0-(f.top-m),right:t.document.documentElement.clientWidth-(f.left-g),bottom:t.document.documentElement.clientHeight-(f.top-m),left:0-(f.left-g)}}else s=l(this._popper)===i?{top:0,left:0,right:i.clientWidth,bottom:i.clientHeight}:d(i);return s.left+=n,s.right-=n,s.top=s.top+n,s.bottom=s.bottom-n,s},n.prototype.runModifiers=function(t,e,n){var i=e.slice();return void 0!==n&&(i=this._options.modifiers.slice(0,s(this._options.modifiers,n))),i.forEach(function(e){var n;(n=e)&&"[object Function]"==={}.toString.call(n)&&(t=e.call(this,t))}.bind(this)),t},n.prototype.isModifierRequired=function(t,e){var n=s(this._options.modifiers,t);return!!this._options.modifiers.slice(0,n).filter((function(t){return t===e})).length},n.prototype.modifiers={},n.prototype.modifiers.applyStyle=function(t){var e,n={position:t.offsets.popper.position},i=Math.round(t.offsets.popper.left),r=Math.round(t.offsets.popper.top);return this._options.gpuAcceleration&&(e=h("transform"))?(n[e]="translate3d("+i+"px, "+r+"px, 0)",n.top=0,n.left=0):(n.left=i,n.top=r),Object.assign(n,t.styles),u(this._popper,n),this._popper.setAttribute("x-placement",t.placement),this.isModifierRequired(this.modifiers.applyStyle,this.modifiers.arrow)&&t.offsets.arrow&&u(t.arrowElement,t.offsets.arrow),t},n.prototype.modifiers.shift=function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var r=t.offsets.reference,s=o(t.offsets.popper),a={y:{start:{top:r.top},end:{top:r.top+r.height-s.height}},x:{start:{left:r.left},end:{left:r.left+r.width-s.width}}},l=-1!==["bottom","top"].indexOf(n)?"x":"y";t.offsets.popper=Object.assign(s,a[l][i])}return t},n.prototype.modifiers.preventOverflow=function(t){var e=this._options.preventOverflowOrder,n=o(t.offsets.popper),i={left:function(){var e=n.left;return n.leftt.boundaries.right&&(e=Math.min(n.left,t.boundaries.right-n.width)),{left:e}},top:function(){var e=n.top;return n.topt.boundaries.bottom&&(e=Math.min(n.top,t.boundaries.bottom-n.height)),{top:e}}};return e.forEach((function(e){t.offsets.popper=Object.assign(n,i[e]())})),t},n.prototype.modifiers.keepTogether=function(t){var e=o(t.offsets.popper),n=t.offsets.reference,i=Math.floor;return e.righti(n.right)&&(t.offsets.popper.left=i(n.right)),e.bottomi(n.bottom)&&(t.offsets.popper.top=i(n.bottom)),t},n.prototype.modifiers.flip=function(t){if(!this.isModifierRequired(this.modifiers.flip,this.modifiers.preventOverflow))return console.warn("WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!"),t;if(t.flipped&&t.placement===t._originalPlacement)return t;var e=t.placement.split("-")[0],n=r(e),i=t.placement.split("-")[1]||"",s=[];return(s="flip"===this._options.flipBehavior?[e,n]:this._options.flipBehavior).forEach(function(a,l){if(e===a&&s.length!==l+1){e=t.placement.split("-")[0],n=r(e);var c=o(t.offsets.popper),u=-1!==["right","bottom"].indexOf(e);(u&&Math.floor(t.offsets.reference[e])>Math.floor(c[n])||!u&&Math.floor(t.offsets.reference[e])a[h]&&(t.offsets.popper[d]+=l[d]+f-a[h]);var m=l[d]+(n||l[u]/2-f/2)-a[d];return m=Math.max(Math.min(a[u]-f-8,m),8),r[d]=m,r[p]="",t.offsets.arrow=r,t.arrowElement=e,t},Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),n=1;ne=>{if(!t.includes(e))return`value should be one of "${t.join('", "')}"`}},ZSoY:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("g4zJ");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},ZW5q:function(t,e,n){"use strict";var i=n("eaoh");function r(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)}t.exports.f=function(t){return new r(t)}},ZY75:function(t,e,n){"use strict";n.r(e),e.default={"% Love":"{count} Love | {count} Loves","% Title":"{count} Title | {count} Titles","%d Fan":"{count} Fan | {count} Fans","%d Follower":"{count} Follower | {count} Followers","%d Subscriber":"{count} Subscriber | {count} Subscribers","%d Vote":"{count} Vote | {count} Votes","%d comment":"{count} comment | {count} comments","%d day ago":"{count} day ago | {count} days ago","%d edit":"{count} edit | {count} edits","%d hour ago":"{count} hour ago | {count} hours ago","%d minute ago":"{count} minute ago | {count} minutes ago","%d point":"{count} point | {count} points","%d point by %s":"{count} point by {count} | {count} points by {count}","%d result":"{count} result | {count} results","%d second ago":"{count} second ago | {count} seconds ago","%d user":"{count} user | {count} users","%d voter":"{count} voter | {count} voters","%s episode":"{count} episode | {count} episodes","%s movie":"{count} movie | {count} movies","%s show":"{count} show | {count} shows","%s/10 from %s user":"{count}/10 from {count} user | {count}/10 from {count} users","1 Vote":"1 Vote | {count} Votes","1 change":"1 change | {count} changes","1 cup of coffee monthly":"1 cup of coffee monthly | {count} cups of coffee monthly","1 cup of coffee yearly":"1 cup of coffee yearly | {count} cups of coffee yearly","1 day":"1 day | {count} days","1 day left":"1 day left | {day} days left","1 episode":"1 episode | {count} episodes","1 movie":"1 movie | {count} movies","1 result":"1 result | {count} results","1 show":"1 show | {count} shows","1 user":"1 user | {count} users","Buy 1 Cup of Coffee":"Buy 1 Cup of Coffee | Buy {count} Cups of Coffee",Fan:"Fan | Fans",Follower:"Follower | Followers","Read recommendations by 1 more user":"Read recommendations by 1 more user | Read recommendations by {count} more users","Read recommendations by {count} more user":"Read recommendations by {count} more user | Read recommendations by {count} more users",Subscriber:"Subscriber | Subscribers","You have rated 1 title":"You have rated 1 title | You have rated {count} titles","alt:TV Show":"TV Show","feminine:American":"American","feminine:Australian":"Australian","feminine:British":"British","feminine:Cambodian":"Cambodian","feminine:Canadian":"Canadian","feminine:Chinese":"Chinese","feminine:English":"English","feminine:Filipino":"Filipino","feminine:French":"French","feminine:German":"German","feminine:Ghanaian":"Ghanaian","feminine:Hong Konger":"Hong Konger","feminine:Hong Kongers":"Hong Kongers","feminine:Indian":"Indian","feminine:Indonesian":"Indonesian","feminine:Japanese":"Japanese","feminine:Malaysian":"Malaysian","feminine:Mandarin":"Mandarin","feminine:Mongolian":"Mongolian","feminine:Newest":"Newest","feminine:Russian":"Russian","feminine:Singaporean":"Singaporean","feminine:South Korean":"South Korean","feminine:Taiwanese":"Taiwanese","feminine:Thai":"Thai","feminine:Vietnamese":"Vietnamese","feminine:View all":"View all","filter:Arabic":"Arabic","filter:Brazil":"Brazil","filter:Chinese (Sim.)":"Chinese (Sim.)","filter:Chinese (Trad.)":"Chinese (Trad.)","filter:Czech":"Czech","filter:Danish":"Danish","filter:Dutch":"Dutch","filter:English":"English","filter:Finnish":"Finnish","filter:Greek":"Greek","filter:Hebrew":"Hebrew","filter:Hungarian":"Hungarian","filter:Italian":"Italian","filter:Norwegian":"Norwegian","filter:Polish":"Polish","filter:Portuguese":"Portuguese","filter:Serbian":"Serbian","filter:Slovak":"Slovak","filter:Spanish":"Spanish","filter:Swedish":"Swedish","filter:Turkish":"Turkish","imperative:login":"login","imperative:register":"register","infinitive:login":"login","infinitive:register":"register","masculine:American":"American","masculine:Australian":"Australian","masculine:British":"British","masculine:Cambodian":"Cambodian","masculine:Canadian":"Canadian","masculine:Chinese":"Chinese","masculine:English":"English","masculine:Filipino":"Filipino","masculine:French":"French","masculine:German":"German","masculine:Ghanaian":"Ghanaian","masculine:Hong Konger":"Hong Konger","masculine:Hong Kongers":"Hong Kongers","masculine:Indian":"Indian","masculine:Indonesian":"Indonesian","masculine:Japanese":"Japanese","masculine:Malaysian":"Malaysian","masculine:Mandarin":"Mandarin","masculine:Mongolian":"Mongolian","masculine:Newest":"Newest","masculine:Russian":"Russian","masculine:Singaporean":"Singaporean","masculine:South Korean":"South Korean","masculine:Taiwanese":"Taiwanese","masculine:Thai":"Thai","masculine:Vietnamese":"Vietnamese","masculine:View all":"View all","movies:Cancelled":"Cancelled","scored by 1 user":"scored by 1 user | scored by {count} users","shows:Cancelled":"Cancelled","{count} Vote":"{count} Vote | {count} Votes","{points} point":"{points} point | {points} points","{votes} vote remaining!":"{votes} vote remaining! | {votes} votes remaining!"}},Zxgi:function(t,e,n){var i=n("5T2Y"),r=n("WEpk"),o=n("uOPS"),s=n("zLkG"),a=n("2faE").f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},a0xu:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},a1Qh:function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var i=n("mSNy"),r=document.documentElement.lang;function o(){return document.documentElement.lang}"en-US"==r&&(r="en"),"en"!=r&&Object(i.loadLanguageAsync)(r),e.a=i.i18n},a3zo:function(t,e,n){"use strict";e.__esModule=!0;var i=n("SJdT");e.default={methods:{t:function(){for(var t=arguments.length,e=Array(t),n=0;n=0;i--){let r=e<0?g(t.node(0),t.node(i),t.before(i+1),t.index(i),e,n):g(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,n);if(r)return r}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in o)throw new RangeError("Duplicate use of selection JSON ID "+t);return o[t]=e,e.prototype.jsonID=t,e}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(t,e){this.$from=t,this.$to=e}}let l=!1;function c(t){l||t.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class u extends s{constructor(t,e=t){c(t),c(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let i=t.resolve(e.map(this.anchor));return new u(i.parent.inlineContent?i:n,n)}replace(t,e=i.Slice.empty){if(super.replace(t,e),e==i.Slice.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof u&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new d(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new u(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let i=t.resolve(e);return new this(i,n==e?i:t.resolve(n))}static between(t,e,n){let i=t.pos-e.pos;if(n&&!i||(n=i>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==i||(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).posnew f(t)};function g(t,e,n,i,r,o=!1){if(e.inlineContent)return u.create(t,n);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let i=e.child(s);if(i.isAtom){if(!o&&p.isSelectable(i))return p.create(t,n-(r<0?i.nodeSize:0))}else{let e=g(t,i,n+r,r<0?i.childCount:0,r,o);if(e)return e}n+=i.nodeSize*r}return null}function v(t,e,n){let i=t.steps.length-1;if(i{null==o&&(o=i)}),t.setSelection(s.near(t.doc.resolve(o),n)))}class y extends r.Transform{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return i.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||i.Mark.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let i=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),!t)return this.deleteRange(e,n);let r=this.storedMarks;if(!r){let t=this.doc.resolve(e);r=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,i.text(t,r)),this.selection.empty||this.selection.to!=e+t.length||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function b(t,e){return e&&t?t.bind(e):t}class _{constructor(t,e,n){this.name=t,this.init=b(e.init,n),this.apply=b(e.apply,n)}}const x=[new _("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new _("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new _("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,i)=>i.selection.$cursor?t.storedMarks:null}),new _("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class w{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),e&&e.forEach(t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new _(t.key,t.spec.state,t))})}}class k{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;nt.toJSON())),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[n],r=i.spec.state;r&&r.toJSON&&(e[n]=r.toJSON.call(i,this[i.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new w(t.schema,t.plugins),o=new k(r);return r.fields.forEach(r=>{if("doc"==r.name)o.doc=i.Node.fromJSON(t.schema,e.doc);else if("selection"==r.name)o.selection=s.fromJSON(o.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,i))return void(o[r.name]=a.fromJSON.call(s,t,e[i],o))}o[r.name]=r.init(t,o)}}),o}}class C{constructor(t){this.spec=t,this.props={},t.props&&function t(e,n,i){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(n):"handleDOMEvents"==r&&(o=t(o,n,{})),i[r]=o}return i}(t.props,this,this.props),this.key=t.key?t.key.key:E("plugin")}getState(t){return t[this.key]}}const S=Object.create(null);function E(t){return t in S?t+"$"+ ++S[t]:(S[t]=0,t+"$")}class T{constructor(t="key"){this.key=E(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},bBy9:function(t,e,n){n("w2d+");for(var i=n("5T2Y"),r=n("NegM"),o=n("SBuE"),s=n("UWiX")("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,i=Object.keys(e);n0},t}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),i=new _(e,n,this);x.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var k=void 0!==r.ResizeObserver?r.ResizeObserver:w;e.default=k}.call(this,n("yLpj"))},byeC:function(t,e,n){"use strict";function i(t){this.content=t}n.r(e),n.d(e,"ContentMatch",(function(){return A})),n.d(e,"DOMParser",(function(){return q})),n.d(e,"DOMSerializer",(function(){return nt})),n.d(e,"Fragment",(function(){return o})),n.d(e,"Mark",(function(){return c})),n.d(e,"MarkType",(function(){return H})),n.d(e,"Node",(function(){return S})),n.d(e,"NodeRange",(function(){return k})),n.d(e,"NodeType",(function(){return V})),n.d(e,"ReplaceError",(function(){return u})),n.d(e,"ResolvedPos",(function(){return b})),n.d(e,"Schema",(function(){return W})),n.d(e,"Slice",(function(){return d})),i.prototype={constructor:i,find:function(t){for(var e=0;e>1}},i.from=function(t){if(t instanceof i)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new i(e)};var r=i;class o{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;et&&!1!==n(a,i+s,r||null,o)&&a.content.size){let r=s+1;a.nodesBetween(Math.max(0,t-r),Math.min(a.content.size,e-r),n,i+r)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,i){let r="",o=!0;return this.nodesBetween(t,e,(s,a)=>{let l=s.isText?s.text.slice(Math.max(t,a)-a,e-a):s.isLeaf?i?"function"==typeof i?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:r+=n),r+=l},0),r}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,i=this.content.slice(),r=0;for(e.isText&&e.sameMarkup(n)&&(i[i.length-1]=e.withText(e.text+n.text),r=1);rt)for(let r=0,o=0;ot&&((oe)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),i+=s.nodeSize),o=a}return new o(n,i)}cutByIndex(t,e){return t==e?o.empty:0==t&&e==this.content.length?this:new o(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let i=this.content.slice(),r=this.size+e.nodeSize-n.nodeSize;return i[t]=e,new o(i,r)}addToStart(t){return new o([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new o(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,n=0;;e++){let i=n+this.child(e).nodeSize;if(i>=t)return i==t?a(e+1,i):a(e,n);n=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return o.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new o(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return o.empty;let e,n=0;for(let i=0;ithis.type.rank&&(e||(e=t.slice(0,i)),e.push(this),n=!0),e&&e.push(r)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;et.type.rank-e.type.rank),e}}c.none=[];class u extends Error{}class d{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=function t(e,n,i,r){let{index:o,offset:s}=e.findIndex(n),a=e.maybeChild(o);if(s==n||a.isText)return r&&!r.canReplace(o,o,i)?null:e.cut(0,n).append(i).append(e.cut(n));let l=t(a.content,n-s-1,i,a);return l&&e.replaceChild(o,a.copy(l))}(this.content,t+this.openStart,e);return n&&new d(n,this.openStart,this.openEnd)}removeBetween(t,e){return new d(function t(e,n,i){let{index:r,offset:o}=e.findIndex(n),s=e.maybeChild(r),{index:a,offset:l}=e.findIndex(i);if(o==n||s.isText){if(l!=i&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(i))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,s.copy(t(s.content,n-o-1,i-o-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return d.empty;let n=e.openStart||0,i=e.openEnd||0;if("number"!=typeof n||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new d(o.fromJSON(t,e.content),n,i)}static maxOpen(t,e=!0){let n=0,i=0;for(let i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)i++;return new d(t,n,i)}}function p(t,e,n){if(n.openStart>t.depth)throw new u("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new u("Inconsistent open depths");return function t(e,n,i,r){let s=e.index(r),a=e.node(r);if(s==n.index(r)&&r=0;t--)i=e.node(t).copy(o.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}(i,e);return v(a,function t(e,n,i,r,s){let a=e.depth>s&&f(e,n,s+1),l=r.depth>s&&f(i,r,s+1),c=[];g(null,e,s,c),a&&l&&n.index(s)==i.index(s)?(h(a,l),m(v(a,t(e,n,i,r,s+1)),c)):(a&&m(v(a,y(e,n,s+1)),c),g(n,i,s,c),l&&m(v(l,y(i,r,s+1)),c));return g(r,null,s,c),new o(c)}(e,t,s,n,r))}{let t=e.parent,r=t.content;return v(t,r.cut(0,e.parentOffset).append(i.content).append(r.cut(n.parentOffset)))}}return v(a,y(e,n,r))}(t,e,n,0)}function h(t,e){if(!e.type.compatibleContent(t.type))throw new u("Cannot join "+e.type.name+" onto "+t.type.name)}function f(t,e,n){let i=t.node(n);return h(i,e.node(n)),i}function m(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function g(t,e,n,i){let r=(e||t).node(n),o=0,s=e?e.index(n):r.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(m(t.nodeAfter,i),o++));for(let t=o;tn){m(v(f(t,e,n+1),y(t,e,n+1)),i)}return g(e,null,n,i),new o(i)}d.empty=new d(o.empty,0,0);class b{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=t.child(e);return n?t.child(e).cut(n):i}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],i=0==e?0:this.path[3*e-1]+1;for(let e=0;e0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new k(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],i=0,r=e;for(let e=t;;){let{index:t,offset:o}=e.content.findIndex(r),s=r-o;if(n.push(e,t,i+o),!s)break;if(e=e.child(t),e.isText)break;r=s-1,i+=o+1}return new b(e,n,r)}static resolveCached(t,e){let n=w.get(t);if(n)for(let t=0;tt&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(i=!0),!i)),i}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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),T(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=o.empty,i=0,r=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,i,r),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let t=i;tt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=void 0;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let i=o.fromJSON(t,e.content),r=t.nodeType(e.type).create(e.attrs,i,n);return r.type.checkAttrs(r.attrs),r}}S.prototype.text=void 0;class E extends S{constructor(t,e,n,i){if(super(t,e,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):T(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new E(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new E(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function T(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class A{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new M(t,e);if(null==n.next)return A.empty;let i=P(n);n.next&&n.err("Unexpected trailing text");let r=function(t){let e=Object.create(null);return function n(i){let r=[];i.forEach(e=>{t[e].forEach(({term:e,to:n})=>{if(!e)return;let i;for(let t=0;t{i||r.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t)})})});let o=e[i.join(",")]=new A(i.indexOf(t.length-1)>-1);for(let t=0;te.concat(t(n,o)),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return i(o,s),r(t(e.expr,s),s),[i(s)]}if("plus"==e.type){let s=n();return r(t(e.expr,o),s),r(t(e.expr,s),s),[i(s)]}if("opt"==e.type)return[i(o)].concat(t(e.expr,o));if("range"==e.type){let s=o;for(let i=0;it.to=e)}}(i));return function(t,e){for(let n=0,i=[t];nt.createAndFill()));for(let t=0;t=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let i=0;i{let i=n+(e.validEnd?"*":" ")+" ";for(let n=0;n"+t.indexOf(e.next[n].next);return i}).join("\n")}}A.empty=new A(!0);class M{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function P(t){let e=[];do{e.push(O(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function O(t){let e=[];do{e.push(D(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function D(t){let e=function(t){if(t.eat("(")){let e=P(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,i=n[e];if(i)return[i];let r=[];for(let t in n){let i=n[t];i.isInGroup(e)&&r.push(i)}0==r.length&&t.err("No node type or group '"+e+"' found");return r}(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=$(t,e)}return e}function I(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function $(t,e){let n=I(t),i=n;return t.eat(",")&&(i="}"!=t.next?I(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:e}}function N(t,e){return e-t}function F(t,e){let n=[];return function e(i){let r=t[i];if(1==r.length&&!r[0].term)return e(r[0].to);n.push(i);for(let t=0;t-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:L(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new S(this,this.computeAttrs(t),o.from(e),c.setFrom(n))}createChecked(t=null,e,n){return e=o.from(e),this.checkContent(e),new S(this,this.computeAttrs(t),e,c.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=o.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let i=this.contentMatch.matchFragment(e),r=i&&i.fillBefore(o.empty,!0);return r?new S(this,t,e.append(r),c.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;en[t]=new V(t,e,i));let i=e.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class z{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let i=n.split("|");return n=>{let r=null===n?"null":typeof n;if(i.indexOf(r)<0)throw new RangeError(`Expected value of type ${i} for attribute ${e} on type ${t}, got ${r}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class H{constructor(t,e,n,i){this.name=t,this.rank=e,this.schema=n,this.spec=i,this.attrs=B(t,i.attrs),this.excluded=null;let r=R(this.attrs);this.instance=r?new c(this,r):null}create(t=null){return!t&&this.instance?this.instance:new c(this,L(this.attrs,t))}static compile(t,e){let n=Object.create(null),i=0;return t.forEach((t,r)=>n[t]=new H(t,i++,e,r)),n}removeFromSet(t){for(var e=0;e-1}}class W{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=r.from(t.nodes),e.marks=r.from(t.marks||{}),this.nodes=V.compile(this.spec.nodes,this),this.marks=H.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],i=e.spec.content||"",r=e.spec.marks;if(e.contentMatch=n[i]||(n[i]=A.parse(i,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==r?null:r?G(this,r.split(" ")):""!=r&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:G(this,n.split(" "))}this.nodeFromJSON=t=>S.fromJSON(this,t),this.markFromJSON=t=>c.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,i){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof V))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,i)}text(t,e){let n=this.nodes.text;return new E(n,n.defaultAttrs,t,c.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function G(t,e){let n=[];for(let i=0;i-1)&&n.push(s=i)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return n}class q{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach(t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new Q(this,e,!1);return n.addAll(t,c.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new Q(this,e,!0);return n.addAll(t,c.none,e.from,e.to),d.maxOpen(n.finish())}matchTag(t,e,n){for(let i=n?this.tags.indexOf(n)+1:0;it.length&&(61!=o.charCodeAt(t.length)||o.slice(t.length+1)!=e))){if(i.getAttrs){let t=i.getAttrs(e);if(!1===t)continue;i.attrs=t||void 0}return i}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,i=0;for(;i{n(t=tt(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)})}for(let e in t.nodes){let i=t.nodes[e].spec.parseDOM;i&&i.forEach(t=>{n(t=tt(t)),t.node||t.ignore||t.mark||(t.node=e)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new q(t,q.schemaRules(t)))}}const U={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},K={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},J={ol:!0,ul:!0};function Y(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class X{constructor(t,e,n,i,r,o){this.type=t,this.attrs=e,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=c.none,this.match=r||(4&o?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(o.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=o.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(o.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!U.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Q{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i,r=e.topNode,o=Y(null,e.preserveWhitespace,0)|(n?4:0);i=r?new X(r.type,r.attrs,c.none,!0,e.topMatch||r.type.contentMatch,o):new X(n?null:t.schema.topNodeType,null,c.none,!0,null,o),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,i=this.top,r=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:o}=this.parser;if("full"===r||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r)if("full"===r)n=n.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let t=n.split(/\r?\n|\r/);for(let n=0;n!n.clearMark(t)):e.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1!==n.consuming)break;t=n}}return e}addElementByRule(t,e,n,i){let r,o;if(e.node)if(o=this.parser.schema.nodes[e.node],o.isLeaf)this.insertNode(o.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(o,e.attrs||null,n,e.preserveWhitespace);t&&(r=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,n,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n,!1));else{let i=t;"string"==typeof e.contentElement?i=t.querySelector(e.contentElement):"function"==typeof e.contentElement?i=e.contentElement(t):e.contentElement&&(i=e.contentElement),this.findAround(t,i,!0),this.addAll(i,n),this.findAround(t,i,!1)}r&&this.sync(s)&&this.open--}addAll(t,e,n,i){let r=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=null==i?null:t.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o,e);this.findAtPoint(t,r)}findPlace(t,e,n){let i,r;for(let e=this.open,o=0;e>=0;e--){let s=this.nodes[e],a=s.findWrapping(t);if(a&&(!i||i.length>a.length+o)&&(i=a,r=s,!a.length))break;if(s.solid){if(n)break;o+=2}}if(!i)return null;this.sync(r);for(let t=0;t!(o.type?o.type.allowsMarkType(e.type):et(e.type,t))||(a=e.addToSet(a),!1)),this.nodes.push(new X(t,e,a,i,null,s)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));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(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,i=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),r=-(n?n.depth+1:0)+(i?0:1),o=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=r;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&i?this.nodes[s].type:n&&s>=r?n.node(s-r).type:null;if(!t||t.name!=a&&!t.isInGroup(a))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function Z(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function tt(t){let e={};for(let n in t)e[n]=t[n];return e}function et(t,e){let n=e.schema.nodes;for(let i in n){let r=n[i];if(!r.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n{if(r.length||t.marks.length){let n=0,o=0;for(;n=0;i--){let r=this.serializeMark(t.marks[i],t.isInline,e);r&&((r.contentDOM||r.dom).appendChild(n),n=r.dom)}return n}serializeMark(t,e,n={}){let i=this.marks[t.type.name];return i&&at(rt(n),i(t,e),null,t.attrs)}static renderSpec(t,e,n=null,i){return at(t,e,n,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new nt(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=it(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return it(t.marks)}}function it(t){let e={};for(let n in t){let i=t[n].spec.toDOM;i&&(e[n]=i)}return e}function rt(t){return t.document||window.document}const ot=new WeakMap;function st(t){let e=ot.get(t);return void 0===e&&ot.set(t,e=function(t){let e=null;return function t(n){if(n&&"object"==typeof n)if(Array.isArray(n))if("string"==typeof n[0])e||(e=[]),e.push(n);else for(let e=0;e-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],u=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){u=2;for(let t in c)if(null!=c[t]){let e=t.indexOf(" ");e>0?l.setAttributeNS(t.slice(0,e),t.slice(e+1),c[t]):"style"==t&&l.style?l.style.cssText=c[t]:l.setAttribute(t,c[t])}}for(let r=u;ru)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:e,contentDOM:r}=at(t,o,n,i);if(l.appendChild(e),r){if(s)throw new RangeError("Multiple content holes");s=r}}}return{dom:l,contentDOM:s}}},c0pu:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("cD+i");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},"cD+i":function(t,e,n){"use strict";n.r(e),n.d(e,"Decoration",(function(){return je})),n.d(e,"DecorationSet",(function(){return ze})),n.d(e,"EditorView",(function(){return gn})),n.d(e,"__endComposition",(function(){return mn})),n.d(e,"__parseFromClipboard",(function(){return fn}));var i=n("b/sn"),r=n("byeC"),o=n("uSMm");const s=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},a=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let l=null;const c=function(t,e,n){let i=l||(l=document.createRange());return i.setEnd(t,null==n?t.nodeValue.length:n),i.setStart(t,e||0),i},u=function(t,e,n,i){return n&&(p(t,e,n,i,-1)||p(t,e,n,i,1))},d=/^(img|br|input|textarea|hr)$/i;function p(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:h(t))){let n=t.parentNode;if(!n||1!=n.nodeType||f(t)||d.test(t.nodeName)||"false"==t.contentEditable)return!1;e=s(t)+(r<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(r<0?-1:0)]).contentEditable)return!1;e=r<0?h(t):0}}}function h(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function f(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const m=function(t){return t.focusNode&&u(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function g(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const v="undefined"!=typeof navigator?navigator:null,y="undefined"!=typeof document?document:null,b=v&&v.userAgent||"",_=/Edge\/(\d+)/.exec(b),x=/MSIE \d/.exec(b),w=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),k=!!(x||w||_),C=x?document.documentMode:w?+w[1]:_?+_[1]:0,S=!k&&/gecko\/(\d+)/i.test(b);S&&(/Firefox\/(\d+)/.exec(b)||[0,0])[1];const E=!k&&/Chrome\/(\d+)/.exec(b),T=!!E,A=E?+E[1]:0,M=!k&&!!v&&/Apple Computer/.test(v.vendor),P=M&&(/Mobile\/\w+/.test(b)||!!v&&v.maxTouchPoints>2),O=P||!!v&&/Mac/.test(v.platform),D=!!v&&/Win/.test(v.platform),I=/Android \d/.test(b),$=!!y&&"webkitFontSmoothing"in y.documentElement.style,N=$?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function F(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function R(t,e){return"number"==typeof t?t:t[e]}function L(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*i}}function j(t,e,n){let i=t.someProp("scrollThreshold")||0,r=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(1!=s.nodeType){s=a(s);continue}let t=s,n=t==o.body,l=n?F(o):L(t),c=0,u=0;if(e.topl.bottom-R(i,"bottom")&&(u=e.bottom-e.top>l.bottom-l.top?e.top+R(r,"top")-l.top:e.bottom-l.bottom+R(r,"bottom")),e.leftl.right-R(i,"right")&&(c=e.right-l.right+R(r,"right")),c||u)if(n)o.defaultView.scrollBy(c,u);else{let n=t.scrollLeft,i=t.scrollTop;u&&(t.scrollTop+=u),c&&(t.scrollLeft+=c);let r=t.scrollLeft-n,o=t.scrollTop-i;e={left:e.left-r,top:e.top-o,right:e.right-r,bottom:e.bottom-o}}let d=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s="absolute"==d?s.offsetParent:a(s)}}function B(t){let e=[],n=t.ownerDocument;for(let i=t;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),t!=n);i=a(i));return e}function V(t,e){for(let n=0;n=u){l=Math.max(h.bottom,l),u=Math.min(h.top,u);let t=h.left>e.left?h.left-e.left:h.right=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!r&&h.left<=e.left&&h.right>=e.left&&(r=d,o={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!n&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(a=p+1)}}return!n&&r&&(n=r,i=o,s=0),n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,i=document.createRange();for(let r=0;r=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,i):!n||s&&1==n.nodeType?{node:t,offset:a}:H(n,i)}function W(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function G(t,e){let n,i=t.dom.ownerDocument,r=0,o=function(t,e,n){if(t.caretPositionFromPoint)try{let i=t.caretPositionFromPoint(e,n);if(i)return{node:i.offsetNode,offset:Math.min(h(i.offsetNode),i.offset)}}catch(t){}if(t.caretRangeFromPoint){let i=t.caretRangeFromPoint(e,n);if(i)return{node:i.startContainer,offset:Math.min(h(i.startContainer),i.startOffset)}}}(i,e.left,e.top);o&&({node:n,offset:r}=o);let s,l=(t.root.elementFromPoint?t.root:i).elementFromPoint(e.left,e.top);if(!l||!t.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=t.dom.getBoundingClientRect();if(!W(e,n))return null;if(l=function t(e,n,i){let r=e.childNodes.length;if(r&&i.tope.top&&r++}let i;$&&r&&1==n.nodeType&&1==(i=n.childNodes[r-1]).nodeType&&"false"==i.contentEditable&&i.getBoundingClientRect().top>=e.top&&r--,n==t.dom&&r==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=r&&1==n.nodeType&&"BR"==n.childNodes[r-1].nodeName||(s=function(t,e,n,i){let r=-1;for(let n=e,o=!1;n!=t.dom;){let e,s=t.docView.nearestDesc(n,!0);if(!s)return null;if(1==s.dom.nodeType&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((e=s.dom.getBoundingClientRect()).width||e.height)&&(s.node.isBlock&&s.parent&&(!o&&e.left>i.left||e.top>i.top?r=s.posBefore:(!o&&e.right-1?r:t.docView.posFromDOM(e,n,-1)}(t,n,r,e))}null==s&&(s=function(t,e,n){let{node:i,offset:r}=H(e,n),o=-1;if(1==i.nodeType&&!i.firstChild){let t=i.getBoundingClientRect();o=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(i,r,o)}(t,l,e));let c=t.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function q(t){return t.top=0&&r==i.nodeValue.length?(t--,o=1):n<0?t--:e++,Y(U(c(i,t,e),o),o<0)}{let t=U(c(i,r,r),n);if(S&&r&&/\s/.test(i.nodeValue[r-1])&&r=0)}if(null==o&&r&&(n<0||r==h(i))){let t=i.childNodes[r-1],e=3==t.nodeType?c(t,h(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Y(U(e,1),!1)}if(null==o&&r=0)}function Y(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function X(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Q(t,e,n){let i=t.state,r=t.root.activeElement;i!=e&&t.updateState(e),r!=t.dom&&t.focus();try{return n()}finally{i!=e&&t.updateState(i),r!=t.dom&&r&&r.focus()}}const Z=/[\u0590-\u08ac]/;let tt=null,et=null,nt=!1;function it(t,e,n){return tt==e&&et==n?nt:(tt=e,et=n,nt="up"==n||"down"==n?function(t,e,n){let i=e.selection,r="up"==n?i.$from:i.$to;return Q(t,e,()=>{let{node:e}=t.docView.domFromPos(r.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let i=J(t,r.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=c(t,0,t.nodeValue.length).getClientRects()}for(let t=0;tr.top+1&&("up"==n?i.top-r.top>2*(r.bottom-i.top):r.bottom-i.bottom>2*(i.bottom-r.top)))return!1}}return!0})}(t,e,n):function(t,e,n){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=t.domSelection();return a?Z.test(i.parent.textContent)&&a.modify?Q(t,e,()=>{let{focusNode:e,focusOffset:r,anchorNode:o,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=i.depth?t.docView.domAfterPos(i.before()):t.dom,{focusNode:u,focusOffset:d}=t.domSelectionRange(),p=u&&!c.contains(1==u.nodeType?u:u.parentNode)||e==u&&r==d;try{a.collapse(o,s),e&&(e!=o||r!=s)&&a.extend&&a.extend(e,r)}catch(t){}return null!=l&&(a.caretBidiLevel=l),p}):"left"==n||"backward"==n?o:s:i.pos==i.start()||i.pos==i.end()}(t,e,n))}class rt{constructor(t,e,n,i){this.parent=t,this.children=e,this.dom=n,this.contentDOM=i,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;es(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){i=!1;break}if(e.previousSibling)break}if(null==i&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){i=!0;break}if(e.nextSibling)break}}return(null==i?n>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,i=t;i;i=i.parentNode){let r,o=this.getDesc(i);if(o&&(!e||o.node)){if(!n||!(r=o.nodeDOM)||(1==r.nodeType?r.contains(1==t.nodeType?t:t.parentNode):r==t))return o;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let i=t;i;i=i.parentNode){let r=this.getDesc(i);if(r)return r.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;et||n instanceof dt){r=t-e;break}e=o}if(r)return this.children[i].domFromPos(r-this.children[i].border,e);for(;i&&!(n=this.children[i-1]).size&&n instanceof ot&&n.side>=0;i--);if(e<=0){let t,n=!0;for(;t=i?this.children[i-1]:null,t&&t.dom.parentNode!=this.contentDOM;i--,n=!1);return t&&e&&n&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?s(t.dom)+1:0}}{let t,n=!0;for(;t=i=r&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,r);t=o;for(let e=a;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){i=s(n.dom)+1;break}t-=n.size}-1==i&&(i=0)}if(i>-1&&(l>e||a==this.children.length-1)){e=l;for(let t=a+1;ta&&oe){let t=a;a=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,i=0;i=n:tn){let i=n+r.border,s=o-r.border;if(t>=i&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=i||e!=s||!r.contentLost&&r.dom.parentNode==this.contentDOM?r.markDirty(t-i,e-i):r.dirty=3);r.dirty=r.dom!=r.contentDOM||r.dom.parentNode!=this.contentDOM||r.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirtyr?r.parent?r.parent.posBeforeChild(r):void 0:i)),!e.type.spec.raw){if(1!=o.nodeType){let t=document.createElement("span");t.appendChild(o),o=t}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=e,this.widget=e,r=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.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 st extends rt{constructor(t,e,n,i){super(t,[],e,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class at extends rt{constructor(t,e,n,i,r){super(t,[],n,i),this.mark=e,this.spec=r}static create(t,e,n,i){let o=i.nodeViews[e.type.name],s=o&&o(e,i,n);return s&&s.dom||(s=r.DOMSerializer.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new at(t,e,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty0&&(r=kt(r,0,t,n));for(let t=0;ta?a.parent?a.parent.posBeforeChild(a):void 0:s,n,i),u=c&&c.dom,d=c&&c.contentDOM;if(e.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(e.text);else if(!u){let t=r.DOMSerializer.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs);({dom:u,contentDOM:d}=t)}d||e.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),e.type.spec.draggable&&(u.draggable=!0));let p=u;return u=yt(u,n,e),c?a=new pt(t,e,n,i,u,d||null,p,c,o,s+1):e.isText?new ut(t,e,n,i,u,p,o):new lt(t,e,n,i,u,d||null,p,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>r.Fragment.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&bt(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,i=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new xt(this,s&&s.node,t);!function(t,e,n,i){let r=e.locals(t),o=0;if(0==r.length){for(let n=0;no;)a.push(r[s++]);let f=o+p.nodeSize;if(p.isText){let t=f;s!t.inline):a.slice();i(p,m,e.forChild(o,p),h),o=f}}(this.node,this.innerDeco,(e,o,s)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&l.syncToMarks(o==this.node.childCount?r.Mark.none:this.node.child(o).marks,n,t),l.placeWidget(e,t,i)},(e,r,s,c)=>{let u;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,r,s,c)||a&&t.state.selection.from>i&&t.state.selection.to-1&&l.updateNodeAt(e,r,s,u,t)||l.updateNextNode(e,r,s,t,c,i)||l.addNode(e,r,s,t,i),i+=e.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),function t(e,n,i){let r=e.firstChild,o=!1;for(let s=0;se+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let t=o.nodeValue,i=function(t,e,n,i){for(let r=0,o=0;r=n){if(o>=i&&l.slice(i-e.length-a,i-a)==e)return i-e.length;let t=a=0&&t+e.length+a>=n)return a+t;if(n==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}(this.node.content,t,n-e,r-e);return i<0?null:{node:o,pos:i,text:t}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:i}){if(this.getDesc(e))return;let r=e;for(;r.parentNode!=this.contentDOM;r=r.parentNode){for(;r.previousSibling;)r.parentNode.removeChild(r.previousSibling);for(;r.nextSibling;)r.parentNode.removeChild(r.nextSibling);r.pmViewDesc&&(r.pmViewDesc=void 0)}let o=new st(this,r,e,i);t.input.compositionNodes.push(o),this.children=kt(this.children,n,n+i.length,t,o)}update(t,e,n,i){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,i),!0)}updateInner(t,e,n,i){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(bt(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=gt(this.dom,this.nodeDOM,mt(this.outerDeco,this.node,e),mt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}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 ct(t,e,n,i,r){yt(i,e,t);let o=new lt(void 0,t,e,n,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class ut extends lt{constructor(t,e,n,i,r,o,s){super(t,e,n,i,r,null,o,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,i){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let i=this.node.cut(t,e),r=document.createTextNode(i.text);return new ut(this.parent,i,this.outerDeco,this.innerDeco,r,r,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class dt extends rt{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class pt extends lt{constructor(t,e,n,i,r,o,s,a,l,c){super(t,e,n,i,r,o,s,l,c),this.spec=a}update(t,e,n,i){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let r=this.spec.update(t,e,n);return r&&this.updateInner(t,e,n,i),r}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,i){this.spec.setSelection?this.spec.setSelection(t,e,n.root):super.setSelection(t,e,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}const ht=function(t){t&&(this.nodeName=t)};ht.prototype=Object.create(null);const ft=[new ht];function mt(t,e,n){if(0==t.length)return ft;let i=n?ft[0]:new ht,r=[i];for(let o=0;o0;){let a;for(;;)if(i){let t=n.children[i-1];if(!(t instanceof at)){a=t,i--;break}n=t,i=t.children.length}else{if(n==e)break t;i=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n>1,o=Math.min(r,t.length);for(;i-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let i=at.create(this.top,t[r],e,n);this.top.children.splice(this.index,0,i),this.top=i,this.changed=!0}this.index=0,r++}}findNodeMatch(t,e,n,i){let r,o=-1;if(i>=this.preMatch.index&&(r=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&r.matchesNode(t,e,n))o=this.top.children.indexOf(r,this.index);else for(let i=this.index,r=Math.min(this.top.children.length,i+5);i=n||u<=e?o.push(l):(cn&&o.push(l.slice(n-c,l.size,i)))}return o}function Ct(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),a=o&&0==o.size,l=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,u,d=r.resolve(l);if(m(n)){for(c=l;o&&!o.node;)o=o.parent;let t=o.node;if(o&&t.isAtom&&i.NodeSelection.isSelectable(t)&&o.parent&&(!t.isInline||!function(t,e,n){for(let i=0==e,r=e==h(t);i||r;){if(t==n)return!0;let e=s(t);if(!(t=t.parentNode))return!1;i=i&&0==e,r=r&&e==h(t)}}(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;u=new i.NodeSelection(l==t?d:r.resolve(t))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let e=l,i=l;for(let r=0;r{n.anchorNode==i&&n.anchorOffset==r||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{St(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")},20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Tt=M||T&&A<63;function At(t,e){let{node:n,offset:i}=t.docView.domFromPos(e,0),r=ii(t,e,n))||i.TextSelection.between(e,n,r)}function $t(t){return!(t.editable&&!t.hasFocus())&&Nt(t)}function Nt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Ft(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&i.Selection.findFrom(s,e)}function Rt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Lt(t,e,n){let r=t.state.selection;if(!(r instanceof i.TextSelection)){if(r instanceof i.NodeSelection&&r.node.isInline)return Rt(t,new i.TextSelection(e>0?r.$to:r.$from));{let n=Ft(t.state,e);return!!n&&Rt(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(n.pos+o.nodeSize*(e<0?-1:1));return Rt(t,new i.TextSelection(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Ft(t.state,e);return!!(n&&n instanceof i.NodeSelection)&&Rt(t,n)}if(!(O&&n.indexOf("m")>-1)){let n,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(n=t.docView.descAt(a))&&!n.contentDOM)&&(i.NodeSelection.isSelectable(s)?Rt(t,new i.NodeSelection(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!$&&Rt(t,new i.TextSelection(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function jt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Bt(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function Vt(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let r,o,a=!1;S&&1==n.nodeType&&i0){if(1!=n.nodeType)break;{let t=n.childNodes[i-1];if(Bt(t,-1))r=n,o=--i;else{if(3!=t.nodeType)break;n=t,i=n.nodeValue.length}}}else{if(zt(n))break;{let e=n.previousSibling;for(;e&&Bt(e,-1);)r=n.parentNode,o=s(e),e=e.previousSibling;if(e)n=e,i=jt(n);else{if(n=n.parentNode,n==t.dom)break;i=0}}}a?Ht(t,n,i):r&&Ht(t,r,o)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let r,o,a=jt(n);for(;;)if(i{t.state==r&&Et(t)},50)}function Wt(t,e){let n=t.state.doc.resolve(e);if(!T&&!D&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),r=(n.top+n.bottom)/2;if(r>i.top&&r1)return n.lefti.top&&r1)return n.left>i.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function Gt(t,e,n){let r=t.state.selection;if(r instanceof i.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(O&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Ft(t.state,e);if(n&&n instanceof i.NodeSelection)return Rt(t,n)}if(!o.parent.inlineContent){let n=e<0?o:s,a=r instanceof i.AllSelection?i.Selection.near(n,e):i.Selection.findFrom(n,e);return!!a&&Rt(t,a)}return!1}function qt(t,e){if(!(t.state.selection instanceof i.TextSelection))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=t.state.tr;return e<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),t.dispatch(i),!0}return!1}function Ut(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Kt(t,e){let n=e.keyCode,i=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);if(8==n||O&&72==n&&"c"==i)return qt(t,-1)||Vt(t,-1);if(46==n&&!e.shiftKey||O&&68==n&&"c"==i)return qt(t,1)||Vt(t,1);if(13==n||27==n)return!0;if(37==n||O&&66==n&&"c"==i){let e=37==n?"ltr"==Wt(t,t.state.selection.from)?-1:1:-1;return Lt(t,e,i)||Vt(t,e)}if(39==n||O&&70==n&&"c"==i){let e=39==n?"ltr"==Wt(t,t.state.selection.from)?1:-1:1;return Lt(t,e,i)||Vt(t,e)}return 38==n||O&&80==n&&"c"==i?Gt(t,-1,i)||Vt(t,-1):40==n||O&&78==n&&"c"==i?function(t){if(!M||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Ut(t,n,"true"),setTimeout(()=>Ut(t,n,"false"),20)}return!1}(t)||Gt(t,1,i)||Vt(t,1):i==(O?"m":"c")&&(66==n||73==n||89==n||90==n)}function Jt(t,e){t.someProp("transformCopied",n=>{e=n(e,t)});let n=[],{content:i,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&1==i.childCount&&1==i.firstChild.childCount;){o--,s--;let t=i.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),i=t.content}let a=t.someProp("clipboardSerializer")||r.DOMSerializer.fromSchema(t.state.schema),l=oe(),c=l.createElement("div");c.appendChild(a.serializeFragment(i,{document:l}));let u,d=c.firstChild,p=0;for(;d&&1==d.nodeType&&(u=ie[d.nodeName.toLowerCase()]);){for(let t=u.length-1;t>=0;t--){let e=l.createElement(u[t]);for(;c.firstChild;)e.appendChild(c.firstChild);c.appendChild(e),p++}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${o} ${s}${p?" -"+p:""} ${JSON.stringify(n)}`),{dom:c,text:t.someProp("clipboardTextSerializer",n=>n(e,t))||e.content.textBetween(0,e.content.size,"\n\n"),slice:e}}function Yt(t,e,n,i,o){let s,a,l=o.parent.type.spec.code;if(!n&&!e)return null;let c=e&&(i||l||!n);if(c){if(t.someProp("transformPastedText",n=>{e=n(e,l||i,t)}),l)return e?new r.Slice(r.Fragment.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):r.Slice.empty;let n=t.someProp("clipboardTextParser",n=>n(e,o,i,t));if(n)a=n;else{let n=o.marks(),{schema:i}=t.state,a=r.DOMSerializer.fromSchema(i);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(a.serializeNode(i.text(t,n)))})}}else t.someProp("transformPastedHTML",e=>{n=e(n,t)}),s=function(t){let e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,i=oe().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t);(n=r&&ie[r[1].toLowerCase()])&&(t=n.map(t=>"<"+t+">").join("")+t+n.map(t=>"").reverse().join(""));if(i.innerHTML=function(t){let e=window.trustedTypes;if(!e)return t;se||(se=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t}));return se.createHTML(t)}(t),n)for(let t=0;t0;t--){let t=s.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;s=t}if(!a){let e=t.someProp("clipboardParser")||t.someProp("domParser")||r.DOMParser.fromSchema(t.state.schema);a=e.parseSlice(s,{preserveWhitespace:!(!c&&!d),context:o,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Xt.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(d)a=function(t,e){if(!t.size)return t;let n,i=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:o,openStart:s,openEnd:a}=t;for(let t=n.length-2;t>=0;t-=2){let e=i.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;o=r.Fragment.from(e.create(n[t+1],o)),s++,a++}return new r.Slice(o,s,a)}(ne(a,+d[1],+d[2]),d[4]);else if(a=r.Slice.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i,o=e.node(n).contentMatchAt(e.index(n)),s=[];if(t.forEach(t=>{if(!s)return;let e,n=o.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&i.length&&Zt(n,i,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=te(s[s.length-1],i.length));let e=Qt(t,n);s.push(e),o=o.matchType(e.type),i=n}}),s)return r.Fragment.from(s)}return t}(a.content,o),!0),a.openStart||a.openEnd){let t=0,e=0;for(let e=a.content.firstChild;t{a=e(a,t)}),a}const Xt=/^(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 Qt(t,e,n=0){for(let i=e.length-1;i>=n;i--)t=e[i].create(null,r.Fragment.from(t));return t}function Zt(t,e,n,i,o){if(o1&&(s=0),o=n&&(l=e<0?a.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(r.Fragment.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function ne(t,e,n){return e{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>he(t,e))})}function he(t,e){return t.someProp("handleDOMEvents",n=>{let i=n[e.type];return!!i&&(i(t,e)||e.defaultPrevented)})}function fe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function me(t){return{left:t.clientX,top:t.clientY}}function ge(t,e,n,i,r){if(-1==i)return!1;let o=t.state.doc.resolve(i);for(let i=o.depth+1;i>0;i--)if(t.someProp(e,e=>i>o.depth?e(t,n,o.nodeAfter,o.before(i),r,!0):e(t,n,o.node(i),o.before(i),r,!1)))return!0;return!1}function ve(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let i=t.state.tr.setSelection(e);"pointer"==n&&i.setMeta("pointer",!0),t.dispatch(i)}function ye(t,e,n,r,o){return ge(t,"handleClickOn",e,n,r)||t.someProp("handleClick",n=>n(t,e,r))||(o?function(t,e){if(-1==e)return!1;let n,r,o=t.state.selection;o instanceof i.NodeSelection&&(n=o.node);let s=t.state.doc.resolve(e);for(let t=s.depth+1;t>0;t--){let e=t>s.depth?s.nodeAfter:s.node(t);if(i.NodeSelection.isSelectable(e)){r=n&&o.$from.depth>0&&t>=o.$from.depth&&s.before(o.$from.depth+1)==o.$from.pos?s.before(o.$from.depth):s.before(t);break}}return null!=r&&(ve(t,i.NodeSelection.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&i.NodeSelection.isSelectable(r))&&(ve(t,new i.NodeSelection(n),"pointer"),!0)}(t,n))}function be(t,e,n,i){return ge(t,"handleDoubleClickOn",e,n,i)||t.someProp("handleDoubleClick",n=>n(t,e,i))}function _e(t,e,n,r){return ge(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",n=>n(t,e,r))||function(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(ve(t,i.TextSelection.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(e);for(let e=o.depth+1;e>0;e--){let n=e>o.depth?o.nodeAfter:o.node(e),s=o.before(e);if(n.inlineContent)ve(t,i.TextSelection.create(r,s+1,s+1+n.content.size),"pointer");else{if(!i.NodeSelection.isSelectable(n))continue;ve(t,i.NodeSelection.create(r,s),"pointer")}return!0}}(t,n,r)}function xe(t){return Me(t)}le.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Ce(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!I||!T||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!P||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",e=>e(t,n))||Kt(t,n)?n.preventDefault():de(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",e=>e(t,g(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},le.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},le.keypress=(t,e)=>{let n=e;if(Ce(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||O&&n.metaKey)return;if(t.someProp("handleKeyPress",e=>e(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof i.TextSelection&&r.$from.sameParent(r.$to))){let e=String.fromCharCode(n.charCode);/[\r\n]/.test(e)||t.someProp("handleTextInput",n=>n(t,r.$from.pos,r.$to.pos,e))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const we=O?"metaKey":"ctrlKey";ae.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let i=xe(t),r=Date.now(),o="singleClick";r-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,i=e.y-t.clientY;return n*n+i*i<100}(n,t.input.lastClick)&&!n[we]&&("singleClick"==t.input.lastClick.type?o="doubleClick":"doubleClick"==t.input.lastClick.type&&(o="tripleClick")),t.input.lastClick={time:r,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(me(n));s&&("singleClick"==o?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new ke(t,s,n,!!i)):("doubleClick"==o?be:_e)(t,s.pos,s.inside,n)?n.preventDefault():de(t,"pointer"))};class ke{constructor(t,e,n,r){let o,s;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[we],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,s=n.depth?n.before():0}const a=r?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:c}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof i.NodeSelection&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!S||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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),de(t,"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(()=>Et(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(me(t))),this.updateAllowDefault(t),this.allowDefault||!e?de(this.view,"pointer"):ye(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||M&&this.mightDrag&&!this.mightDrag.node.isAtom||T&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(ve(this.view,i.Selection.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):de(this.view,"pointer")}move(t){this.updateAllowDefault(t),de(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function Ce(t,e){return!!t.composing||!!(M&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}ae.touchstart=t=>{t.input.lastTouch=Date.now(),xe(t),de(t,"pointer")},ae.touchmove=t=>{t.input.lastTouch=Date.now(),de(t,"pointer")},ae.contextmenu=t=>xe(t);const Se=I?5e3:-1;function Ee(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Me(t),e))}function Te(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Ae(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=function(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;e=h(t=t.childNodes[e-1])}else{if(!t.parentNode||f(t))return null;e=s(t),t=t.parentNode}}}(e.focusNode,e.focusOffset),i=function(t,e){for(;;){if(3==t.nodeType&&e=0)){if(t.domObserver.forceFlush(),Te(t),e||t.docView&&t.docView.dirty){let n=Ct(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||t.state.selection.empty?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}le.compositionstart=le.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof i.TextSelection&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(t=>!1===t.type.spec.inclusive)))t.markCursor=t.state.storedMarks||n.marks(),Me(t,!0),t.markCursor=null;else if(Me(t,!e.selection.empty),S&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,i=e.focusOffset;n&&1==n.nodeType&&0!=i;){let e=i<0?n.lastChild:n.childNodes[i-1];if(!e)break;if(3==e.nodeType){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,i=-1}}t.input.composing=!0}Ee(t,Se)},le.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Ee(t,20))};const Pe=k&&C<15||P&&N<604;function Oe(t,e,n,i,o){let s=Yt(t,e,n,i,t.state.selection.$from);if(t.someProp("handlePaste",e=>e(t,o,s||r.Slice.empty)))return!0;if(!s)return!1;let a=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(s),l=a?t.state.tr.replaceSelectionWith(a,i):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function De(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ae.copy=le.cut=(t,e)=>{let n=e,i=t.state.selection,r="cut"==n.type;if(i.empty)return;let o=Pe?null:n.clipboardData,s=i.content(),{dom:a,text:l}=Jt(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(e),t.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},le.paste=(t,e)=>{let n=e;if(t.composing&&!I)return;let i=Pe?null:n.clipboardData,r=t.input.shiftKey&&45!=t.input.lastKeyCode;i&&Oe(t,De(i),i.getData("text/html"),r,n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,i=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let r=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout(()=>{t.focus(),i.parentNode&&i.parentNode.removeChild(i),n?Oe(t,i.value,null,r,e):Oe(t,i.textContent,i.innerHTML,r,e)},50)}(t,n)};class Ie{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const $e=O?"altKey":"ctrlKey";ae.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o,s=t.state.selection,a=s.empty?null:t.posAtCoords(me(n));if(a&&a.pos>=s.from&&a.pos<=(s instanceof i.NodeSelection?s.to-1:s.to));else if(r&&r.mightDrag)o=i.NodeSelection.create(t.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(o=i.NodeSelection.create(t.state.doc,e.posBefore))}let l=(o||t.state.selection).content(),{dom:c,text:u,slice:d}=Jt(t,l);(!n.dataTransfer.files.length||!T||A>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Pe?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",Pe||n.dataTransfer.setData("text/plain",u),t.dragging=new Ie(d,!n[$e],o)},ae.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},le.dragover=le.dragenter=(t,e)=>e.preventDefault(),le.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let a=t.posAtCoords(me(n));if(!a)return;let l=t.state.doc.resolve(a.pos),c=s&&s.slice;c?t.someProp("transformPasted",e=>{c=e(c,t)}):c=Yt(t,De(n.dataTransfer),Pe?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!s||n[$e]);if(t.someProp("handleDrop",e=>e(t,n,c||r.Slice.empty,u)))return void n.preventDefault();if(!c)return;n.preventDefault();let d=c?Object(o.dropPoint)(t.state.doc,l.pos,c):l.pos;null==d&&(d=l.pos);let p=t.state.tr;if(u){let{node:t}=s;t?t.replace(p):p.deleteSelection()}let h=p.mapping.map(d),f=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=p.doc;if(f?p.replaceRangeWith(h,h,c.content.firstChild):p.replaceRange(h,h,c),p.doc.eq(m))return;let g=p.doc.resolve(h);if(f&&i.NodeSelection.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))p.setSelection(new i.NodeSelection(g));else{let e=p.mapping.map(d);p.mapping.maps[p.mapping.maps.length-1].forEach((t,n,i,r)=>e=r),p.setSelection(It(t,g,p.doc.resolve(e)))}t.focus(),t.dispatch(p.setMeta("uiEvent","drop"))},ae.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Et(t)},20))},ae.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},ae.beforeinput=(t,e)=>{if(T&&I&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",e=>e(t,g(8,"Backspace"))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let t in le)ae[t]=le[t];function Ne(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Fe{constructor(t,e){this.toDOM=t,this.spec=e||Ve,this.side=this.spec.side||0}map(t,e,n,i){let{pos:r,deleted:o}=t.mapResult(e.from+i,this.side<0?-1:1);return o?null:new je(r-n,r-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Fe&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ne(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Re{constructor(t,e){this.attrs=t,this.spec=e||Ve}map(t,e,n,i){let r=t.map(e.from+i,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+i,this.spec.inclusiveEnd?1:-1)-n;return r>=o?null:new je(r,o,this)}valid(t,e){return e.from=t&&(!r||r(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let o=0;ot){let s=this.children[o]+1;this.children[o+2].findInner(t-s,e-s,n,i+s,r)}}map(t,e,n){return this==He||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Ve)}mapInner(t,e,n,i,r){let o;for(let s=0;s{let s=o-r-(n-t);for(let r=0;ro+e-i)continue;let l=a[r]+e-i;n>=l?a[r+1]=t<=l?-2:-1:t>=e&&s&&(a[r]+=s,a[r+1]+=s)}i+=s}),e=n.maps[t].map(e,-1)}let l=!1;for(let e=0;e=i.content.size){l=!0;continue}let d=n.map(t[e+1]+o,-1)-r,{index:p,offset:h}=i.content.findIndex(u),f=i.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let i=a[e+2].mapInner(n,f,c+1,t[e]+o+1,s);i!=He?(a[e]=u,a[e+1]=d,a[e+2]=i):(a[e+1]=-2,l=!0)}else l=!0}if(l){let l=Ke(function(t,e,n,i,r,o,s){function a(t,e){for(let o=0;o{let s,a=o+n;if(s=qe(e,t,a)){for(i||(i=this.children.slice());ro&&e.to=t){this.children[e]==t&&(n=this.children[e+2]);break}let r=t+1,o=r+e.content.size;for(let t=0;tr&&e.type instanceof Re){let t=Math.max(r,e.from)-r,n=Math.min(o,e.to)-r;tn.map(t,e,Ve));return We.from(n)}forChild(t,e){if(e.isLeaf)return ze.empty;let n=[];for(let i=0;it instanceof ze)?t:t.reduce((t,e)=>t.concat(e instanceof ze?e:e.members),[]))}}forEachSet(t){for(let e=0;en&&e.to{let a=qe(t,e,s+n);if(a){o=!0;let t=Ke(a,e,n+s+1,i);t!=He&&r.push(s,s+e.nodeSize,t)}});let s=Ge(o?Ue(t):t,-n).sort(Je);for(let t=0;t0;)e++;t.splice(e,0,n)}function Qe(t){let e=[];return t.someProp("decorations",n=>{let i=n(t.state);i&&i!=He&&e.push(i)}),t.cursorWrapper&&e.push(ze.create(t.state.doc,[t.cursorWrapper.deco])),We.from(e)}const Ze={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tn=k&&C<=11;class en{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class nn{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new en,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),tn&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.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,Ze)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.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($t(this.view)){if(this.suppressingSelectionUpdates)return Et(this.view);if(k&&C<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&u(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let e=t.focusNode;e;e=a(e))n.add(e);for(let i=t.anchorNode;i;i=a(i))if(n.has(i)){e=i;break}let i=e&&this.view.docView.nearestDesc(e);return i&&i.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&$t(t)&&!this.ignoreSelectionChange(n),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let t=0;t"BR"==t.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let i of e){let e=i.parentNode;!e||"LI"!=e.nodeName||n&&an(t,n)==e||i.remove()}}}let c=null;o<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||r)&&(o>-1&&(t.docView.markDirty(o,s),function(t){if(rn.has(t))return;if(rn.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)){if(t.requiresGeckoHackNode=S,on)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."),on=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Et(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;nDate.now()-50?t.input.lastSelectionOrigin:null,n=Ct(t,e);if(n&&!t.state.selection.eq(n)){if(T&&I&&13===t.input.lastKeyCode&&Date.now()-100e(t,g(13,"Enter"))))return;let i=t.state.tr.setSelection(n);"pointer"==e?i.setMeta("pointer",!0):"key"==e&&i.scrollIntoView(),a&&i.setMeta("composition",a),t.dispatch(i)}return}let l=t.state.doc.resolve(e),c=l.sharedDepth(n);e=l.before(c+1),n=t.state.doc.resolve(n).after(c+1);let u,d,p=t.state.selection,h=function(t,e,n){let i,{node:o,fromOffset:s,toOffset:a,from:l,to:c}=t.docView.parseRange(e,n),u=t.domSelectionRange(),d=u.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(i=[{node:d,offset:u.anchorOffset}],m(u)||i.push({node:u.focusNode,offset:u.focusOffset})),T&&8===t.input.lastKeyCode)for(let t=a;t>s;t--){let e=o.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){a=t;break}if(!n||n.size)break}let p=t.state.doc,h=t.someProp("domParser")||r.DOMParser.fromSchema(t.state.schema),f=p.resolve(l),g=null,v=h.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:i,ruleFromNode:ln,context:f});if(i&&null!=i[0].pos){let t=i[0].pos,e=i[1]&&i[1].pos;null==e&&(e=t),g={anchor:t+l,head:e+l}}return{doc:v,sel:g,from:l,to:c}}(t,e,n),f=t.state.doc,v=f.slice(h.from,h.to);8===t.input.lastKeyCode&&Date.now()-100=s?o-i:0;o-=t,o&&o=a?o-i:0;o-=e,o&&oDate.now()-225||I)&&s.some(t=>1==t.nodeType&&!cn.test(t.nodeName))&&(!y||y.endA>=y.endB)&&t.someProp("handleKeyDown",e=>e(t,g(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!y){if(!(o&&p instanceof i.TextSelection&&!p.empty&&p.$head.sameParent(p.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let e=dn(t,t.state.doc,h.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);a&&n.setMeta("composition",a),t.dispatch(n)}}return}y={start:p.from,endA:p.to,endB:p.to}}t.state.selection.fromt.state.selection.from&&y.start<=t.state.selection.from+2&&t.state.selection.from>=h.from?y.start=t.state.selection.from:y.endA=t.state.selection.to-2&&t.state.selection.to<=h.to&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),k&&C<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>h.from&&"  "==h.doc.textBetween(y.start-h.from-1,y.start-h.from+1)&&(y.start--,y.endA--,y.endB--);let b,_=h.doc.resolveNoCache(y.start-h.from),x=h.doc.resolveNoCache(y.endB-h.from),w=f.resolve(y.start),S=_.sameParent(x)&&_.parent.inlineContent&&w.end()>=y.endA;if((P&&t.input.lastIOSEnter>Date.now()-225&&(!S||s.some(t=>"DIV"==t.nodeName||"P"==t.nodeName))||!S&&_.pose(t,g(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>y.start&&function(t,e,n,i,r){if(n-e<=r.pos-i.pos||pn(i,!0,!1)n||pn(s,!0,!1)e(t,g(8,"Backspace"))))return void(I&&T&&t.domObserver.suppressSelectionUpdates());T&&y.endB==y.start&&(t.input.lastChromeDelete=Date.now()),I&&!S&&_.start()!=x.start()&&0==x.parentOffset&&_.depth==x.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==y.endA&&(y.endB-=2,x=h.doc.resolveNoCache(y.endB-h.from),setTimeout(()=>{t.someProp("handleKeyDown",(function(e){return e(t,g(13,"Enter"))}))},20));let E,A,M,O=y.start,D=y.endA;if(S)if(_.pos==x.pos)k&&C<=11&&0==_.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Et(t),20)),E=t.state.tr.delete(O,D),A=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(M=function(t,e){let n,i,o,s=t.firstChild.marks,a=e.firstChild.marks,l=s,c=a;for(let t=0;tt.mark(i.addToSet(t.marks));else{if(0!=l.length||1!=c.length)return null;i=c[0],n="remove",o=t=>t.mark(i.removeFromSet(t.marks))}let u=[];for(let t=0;tn(t,O,D,e)))return;E=t.state.tr.insertText(e,O,D)}if(E||(E=t.state.tr.replace(O,D,h.doc.slice(y.start-h.from,y.endB-h.from))),h.sel){let e=dn(t,E.doc,h.sel);e&&!(T&&t.composing&&e.empty&&(y.start!=y.endB||t.input.lastChromeDeletee.content.size?null:It(t,e.resolve(n.anchor),e.resolve(n.head))}function pn(t,e,n){let i=t.depth,r=e?t.end():t.pos;for(;i>0&&(e||t.indexAfter(i)==t.node(i).childCount);)i--,r++,e=!1;if(n){let e=t.node(i).maybeChild(t.indexAfter(i));for(;e&&!e.isLeaf;)e=e.firstChild,r++}return r}function hn(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}const fn=Yt,mn=Me;class gn{constructor(t,e){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 ue,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(xn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=bn(this),yn(this),this.nodeViews=_n(this),this.docView=ct(this.state.doc,vn(this),Qe(this),this.dom,this),this.domObserver=new nn(this,(t,e,n,i)=>un(this,t,e,n,i)),this.domObserver.start(),function(t){for(let e in ae){let n=ae[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!fe(t,e)||he(t,e)||!t.editable&&e.type in le||n(t,e)},ce[e]?{passive:!0}:void 0)}M&&t.dom.addEventListener("input",()=>null),pe(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&pe(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(xn),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let i=this.state,r=!1,o=!1;t.storedMarks&&this.composing&&(Te(this),o=!0),this.state=t;let s=i.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=_n(this);(function(t,e){let n=0,i=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let t in e)i++;return n!=i})(t,this.nodeViews)&&(this.nodeViews=t,r=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&pe(this),this.editable=bn(this),yn(this);let a=Qe(this),l=vn(this),c=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=r||!this.docView.matchesNode(t.doc,l,a);!d&&t.selection.eq(i.selection)||(o=!0);let p="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function(t){let e,n,i=t.dom.getBoundingClientRect(),r=Math.max(0,i.top);for(let o=(i.left+i.right)/2,s=r+1;s=r-20){e=i,n=a.top;break}}return{refDOM:e,refTop:n,stack:B(t.dom)}}(this);if(o){this.domObserver.stop();let e=d&&(k||T)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(i.selection,t.selection);if(d){let n=T?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Ae(this)),!r&&this.docView.update(t.doc,l,a,this)||(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=ct(t.doc,l,a,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return u(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?Et(this,e):(Ot(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():p&&function({refDOM:t,refTop:e,stack:n}){let i=t?t.getBoundingClientRect().top:0;V(n,0==i?0:i-e)}(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(1==t.nodeType?t:t.parentNode))if(this.someProp("handleScrollToSelection",t=>t(this)));else if(this.state.selection instanceof i.NodeSelection){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&j(this,e.getBoundingClientRect(),t)}else j(this,this.coordsAtPos(this.state.selection.head,1),t);else;}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e0&&this.state.doc.nodeAt(t))==n.node&&(r=t)}this.dragging=new Ie(t.slice,t.move,r<0?void 0:i.NodeSelection.create(this.state.doc,r))}someProp(t,e){let n,i=this._props&&this._props[t];if(null!=i&&(n=e?e(i):i))return n;for(let i=0;it.ownerDocument.getSelection()),this._root=t;return t||document}updateRoot(){this._root=null}posAtCoords(t){return G(this,t)}coordsAtPos(t,e=1){return J(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let i=this.docView.posFromDOM(t,e,n);if(null==i)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,e){return it(this,e||this.state,t)}pasteHTML(t,e){return Oe(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Oe(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return Jt(this,t)}destroy(){this.docView&&(!function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Qe(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,l=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){he(t,e)||!ae[e.type]||!t.editable&&e.type in le||ae[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?M&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return sn(t,n)}let n;function i(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",i,!0),n?sn(t,n):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function vn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))}),e.translate||(e.translate="no"),[je.node(0,t.state.doc.content.size,e)]}function yn(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:je.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function bn(t){return!t.someProp("editable",e=>!1===e(t.state))}function _n(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function xn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},cHSS:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNegative=void 0;e.isNegative=t=>{if("number"!=typeof t||t>=0||Number.isNaN(t))return"value should be a negative number"}},cHUd:function(t,e,n){"use strict";var i=n("Y7ZC");t.exports=function(t){i(i.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},cSMa:function(t,e,n){var i=function(){return this}()||Function("return this")(),r=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,o=r&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,t.exports=n("u4eC"),r)i.regeneratorRuntime=o;else try{delete i.regeneratorRuntime}catch(t){i.regeneratorRuntime=void 0}},cU5j:function(t,e,n){"use strict";var i=n("14Xm"),r=n.n(i),o=n("D3Ub"),s=n.n(o),a=n("EJiy"),l=n.n(a),c=n("rfXi"),u=n.n(c),d=n("QbLZ"),p=n.n(d),h=n("58S2"),f=n("usTV"),m=n("G1qu"),g=n("06Vp"),v={toggleHeaderColumn:{type:"tableHeader"},toggleHeaderRow:{type:"tableHeader"},toggleHeaderCell:{type:"tableHeader"},toggleTableAlternateRows:{type:"tableClass",className:"alternate-rows"},toggleTableBordered:{type:"tableClass",className:"bordered"},toggleTableDashed:{type:"tableClass",className:"dashed"},tableCellBackgroundColor:{type:"tableCellAttribute",attrName:"backgroundColor"}},y=["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8"],b=n("pMYU"),_=[{command:"addColumnBefore",label:"Insert column before"},{command:"addColumnAfter",label:"Insert column after"},{command:"deleteColumn",label:"Delete column"}],x=[{command:"addRowBefore",label:"Insert row before"},{command:"addRowAfter",label:"Insert row after"},{command:"deleteRow",label:"Delete row"}],w=[{command:"toggleTableDashed",label:"Dashed"},{command:"toggleTableAlternateRows",label:"Alternate rows"},{command:"toggleTableBordered",label:"Bordered"}],k={name:"TiptapEditorTableToolbar",props:{isCommandAvailable:{type:Function,required:!0},isCommandActive:{type:Function,default:function(){return!1}},currentCellBackgroundColor:{type:String,default:null}},data:function(){return{openMenu:null,colorInput:this.currentCellBackgroundColor||""}},computed:{backgroundColors:function(){return y},canSetCellBackgroundColor:function(){return this.isCommandAvailable("setTableCellBackgroundColor")},canClearBackgroundColor:function(){return this.canSetCellBackgroundColor&&!!this.currentCellBackgroundColor},columnActions:function(){return _},rowActions:function(){return x},styleActions:function(){return w},normalizedInputColor:function(){return Object(b.d)(this.colorInput)},canApplyInputColor:function(){return this.canSetCellBackgroundColor&&!!this.normalizedInputColor},colorPreviewStyle:function(){return{backgroundColor:this.currentCellBackgroundColor||"transparent"}},inputPreviewStyle:function(){return this.normalizedInputColor?{backgroundColor:this.normalizedInputColor}:{}}},watch:{currentCellBackgroundColor:function(t){this.colorInput=t||""}},mounted:function(){document.addEventListener("mousedown",this.handleOutsideClick)},beforeDestroy:function(){document.removeEventListener("mousedown",this.handleOutsideClick)},methods:{handleMouseDown:function(t){t&&t.target&&t.target.closest&&(t.target.closest("input, textarea, select, option")||t.preventDefault())},handleOutsideClick:function(t){this.$el&&!this.$el.contains(t.target)&&(this.openMenu=null)},toggleMenu:function(t){if("background"!==t||this.canSetCellBackgroundColor){var e=this.openMenu===t?null:t;this.openMenu=e,"background"===e&&(this.colorInput=this.currentCellBackgroundColor||"")}},runAction:function(t){this.openMenu=null,this.$emit("run-table-command",t)},applyBackgroundColor:function(t){this.canSetCellBackgroundColor&&(this.colorInput=t,this.openMenu=null,this.$emit("set-table-cell-background-color",t))},applyInputColor:function(){this.canApplyInputColor&&(this.colorInput=this.normalizedInputColor,this.openMenu=null,this.$emit("set-table-cell-background-color",this.normalizedInputColor))},clearBackgroundColor:function(){this.canClearBackgroundColor&&(this.colorInput="",this.openMenu=null,this.$emit("unset-table-cell-background-color"))},isDisabled:function(t){return!this.isCommandAvailable(t)},isActive:function(t){return this.isCommandActive(t)},isCurrentColor:function(t){return Object(b.d)(t)===this.currentCellBackgroundColor},canShowCommand:function(t){return this.isCommandAvailable(t)},isMenuActive:function(t){var e=this;return this.openMenu===t||("style"===t?w.some((function(t){return e.isActive(t.command)})):"background"===t&&this.isActive("tableCellBackgroundColor"))}}},C=n("KHd+"),S=Object(C.a)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dte-table-toolbar",on:{mousedown:t.handleMouseDown}},[n("div",{staticClass:"dte-table-toolbar__row"},[n("div",{staticClass:"dte-table-toolbar__menu",class:{"is-open":"column"===t.openMenu}},[n("button",{class:{active:t.isMenuActive("column")},attrs:{type:"button",title:t.$t("Column tools"),"aria-label":t.$t("Column tools")},on:{click:function(e){return t.toggleMenu("column")}}},[n("i",{staticClass:"far fa-table-columns-add-before",attrs:{"aria-hidden":"true"}}),t._v(" "),n("i",{staticClass:"fa fa-caret-down dte-table-toolbar__caret",attrs:{"aria-hidden":"true"}})]),t._v(" "),"column"===t.openMenu?n("div",{staticClass:"dte-table-toolbar__panel"},t._l(t.columnActions,(function(e){return n("button",{key:e.command,attrs:{type:"button",disabled:t.isDisabled(e.command)},on:{click:function(n){return t.runAction(e.command)}}},[t._v("\n "+t._s(t.$t(e.label))+"\n ")])})),0):t._e()]),t._v(" "),n("div",{staticClass:"dte-table-toolbar__menu",class:{"is-open":"row"===t.openMenu}},[n("button",{class:{active:t.isMenuActive("row")},attrs:{type:"button",title:t.$t("Row tools"),"aria-label":t.$t("Row tools")},on:{click:function(e){return t.toggleMenu("row")}}},[n("i",{staticClass:"far fa-table-rows-add-below",attrs:{"aria-hidden":"true"}}),t._v(" "),n("i",{staticClass:"fa fa-caret-down dte-table-toolbar__caret",attrs:{"aria-hidden":"true"}})]),t._v(" "),"row"===t.openMenu?n("div",{staticClass:"dte-table-toolbar__panel"},t._l(t.rowActions,(function(e){return n("button",{key:e.command,attrs:{type:"button",disabled:t.isDisabled(e.command)},on:{click:function(n){return t.runAction(e.command)}}},[t._v("\n "+t._s(t.$t(e.label))+"\n ")])})),0):t._e()]),t._v(" "),n("div",{staticClass:"dte-table-toolbar__menu",class:{"is-open":"style"===t.openMenu}},[n("button",{class:{active:t.isMenuActive("style")},attrs:{type:"button",title:t.$t("Table styles"),"aria-label":t.$t("Table styles")},on:{click:function(e){return t.toggleMenu("style")}}},[t._v("\n "+t._s(t.$t("Style"))+"\n "),n("i",{staticClass:"fa fa-caret-down dte-table-toolbar__caret",attrs:{"aria-hidden":"true"}})]),t._v(" "),"style"===t.openMenu?n("div",{staticClass:"dte-table-toolbar__panel"},t._l(t.styleActions,(function(e){return n("button",{key:e.command,class:{active:t.isActive(e.command)},attrs:{type:"button",disabled:t.isDisabled(e.command)},on:{click:function(n){return t.runAction(e.command)}}},[t._v("\n "+t._s(t.$t(e.label))+"\n ")])})),0):t._e()]),t._v(" "),n("div",{staticClass:"dte-table-toolbar__menu",class:{"is-open":"background"===t.openMenu}},[n("button",{staticClass:"dte-table-toolbar__color-trigger",class:{active:t.isMenuActive("background")},attrs:{type:"button",title:t.$t("Background Color"),"aria-label":t.$t("Background Color"),disabled:!t.canSetCellBackgroundColor},on:{click:function(e){return t.toggleMenu("background")}}},[n("span",{staticClass:"dte-table-toolbar__color-preview",style:t.colorPreviewStyle,attrs:{"aria-hidden":"true"}}),t._v(" "),n("i",{staticClass:"fa fa-caret-down dte-table-toolbar__caret",attrs:{"aria-hidden":"true"}})]),t._v(" "),"background"===t.openMenu?n("div",{staticClass:"dte-table-toolbar__panel dte-table-toolbar__panel--color"},[n("div",{staticClass:"dte-table-toolbar__swatches"},t._l(t.backgroundColors,(function(e){return n("button",{key:e,staticClass:"dte-table-toolbar__swatch",class:{active:t.isCurrentColor(e)},style:{backgroundColor:e,"--dte-swatch-color":e},attrs:{type:"button",title:e,"aria-label":t.$t("Background Color")+": "+e},on:{click:function(n){return t.applyBackgroundColor(e)}}},[n("span",{staticClass:"dte-table-toolbar__sr-only"},[t._v(t._s(e))])])})),0),t._v(" "),n("div",{staticClass:"dte-table-toolbar__color-input-row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.colorInput,expression:"colorInput"}],staticClass:"dte-table-toolbar__color-input",attrs:{type:"text",placeholder:t.$t("HEX Color"),"aria-label":t.$t("HEX Color")},domProps:{value:t.colorInput},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.applyInputColor(e))},input:function(e){e.target.composing||(t.colorInput=e.target.value)}}}),t._v(" "),n("button",{staticClass:"dte-table-toolbar__apply",style:t.inputPreviewStyle,attrs:{type:"button",disabled:!t.canApplyInputColor,title:t.$t("Background Color"),"aria-label":t.$t("Background Color")},on:{click:t.applyInputColor}})]),t._v(" "),n("button",{staticClass:"dte-table-toolbar__clear",attrs:{type:"button",disabled:!t.canClearBackgroundColor},on:{click:t.clearBackgroundColor}},[n("i",{staticClass:"fa fa-eraser",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.$t("Clear Formatting"))+"\n ")])]):t._e()])]),t._v(" "),n("div",{staticClass:"dte-table-toolbar__row"},[n("button",{class:{active:t.isActive("toggleHeaderRow")},attrs:{type:"button",title:t.$t("Toggle header row"),"aria-label":t.$t("Toggle header row"),disabled:t.isDisabled("toggleHeaderRow")},on:{click:function(e){return t.runAction("toggleHeaderRow")}}},[n("i",{staticClass:"far fa-table-columns",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:t.isActive("toggleHeaderColumn")},attrs:{type:"button",title:t.$t("Toggle header column"),"aria-label":t.$t("Toggle header column"),disabled:t.isDisabled("toggleHeaderColumn")},on:{click:function(e){return t.runAction("toggleHeaderColumn")}}},[n("i",{staticClass:"far fa-rows",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:t.isActive("toggleHeaderCell")},attrs:{type:"button",title:t.$t("Toggle header cell"),"aria-label":t.$t("Toggle header cell"),disabled:t.isDisabled("toggleHeaderCell")},on:{click:function(e){return t.runAction("toggleHeaderCell")}}},[n("i",{staticClass:"far fa-table-cells-columns",attrs:{"aria-hidden":"true"}})]),t._v(" "),t.canShowCommand("mergeCells")?n("button",{attrs:{type:"button",title:t.$t("Merge cells"),"aria-label":t.$t("Merge cells"),disabled:t.isDisabled("mergeCells")},on:{click:function(e){return t.runAction("mergeCells")}}},[n("i",{staticClass:"far fa-merge",attrs:{"aria-hidden":"true"}})]):t._e(),t._v(" "),t.canShowCommand("splitCell")?n("button",{attrs:{type:"button",title:t.$t("Split cell"),"aria-label":t.$t("Split cell"),disabled:t.isDisabled("splitCell")},on:{click:function(e){return t.runAction("splitCell")}}},[n("i",{staticClass:"far fa-split",attrs:{"aria-hidden":"true"}})]):t._e(),t._v(" "),n("button",{attrs:{type:"button",title:t.$t("Delete table"),"aria-label":t.$t("Delete table"),disabled:t.isDisabled("deleteTable")},on:{click:function(e){return t.runAction("deleteTable")}}},[t._m(0)])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"dte-table-toolbar__icon-stack dte-table-toolbar__icon-stack--danger",attrs:{"aria-hidden":"true"}},[e("i",{staticClass:"far fa-trash dte-table-toolbar__icon-primary"})])}],!1,null,null,null).exports,E={name:"TiptapEditorImageDialog",props:{imageForm:{type:Object,required:!0},imageSourceMode:{type:String,required:!0},imageUploadHeaders:{type:Object,required:!0},imageUploadUrl:{type:String,required:!0},uploadCategory:{type:String,default:"photos"},value:{type:Boolean,required:!0}},data:function(){return{localImageForm:{url:this.imageForm&&this.imageForm.url?this.imageForm.url:"",alt:this.imageForm&&this.imageForm.alt?this.imageForm.alt:""}}},computed:{visibleProxy:{get:function(){return this.value},set:function(t){this.$emit("input",t),t||this.$emit("close")}}},watch:{imageForm:{deep:!0,handler:function(t){this.localImageForm={url:t&&t.url?t.url:"",alt:t&&t.alt?t.alt:""}}}},methods:{beforeUpload:function(){return!0},handleUploadError:function(){this.$emit("upload-error")},handleUploadSuccess:function(t,e){this.$emit("upload-success",t,e)},emitImageFormUpdate:function(){this.$emit("update:imageForm",p()({},this.imageForm,{url:this.localImageForm.url,alt:this.localImageForm.alt}))},handleSubmitUrl:function(){this.emitImageFormUpdate(),this.$emit("submit-url",{url:this.localImageForm.url,alt:this.localImageForm.alt})}}},T=Object(C.a)(E,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{visible:t.visibleProxy,title:t.$t("Insert image"),width:"520px","append-to-body":!0,"custom-class":"dte-image-dialog"},on:{"update:visible":function(e){t.visibleProxy=e}}},[n("div",{staticClass:"dte-image-panel"},[n("div",{staticClass:"dte-image-tabs"},[n("button",{class:{active:"url"===t.imageSourceMode},attrs:{type:"button"},on:{click:function(e){return t.$emit("update:imageSourceMode","url")}}},[t._v("\n "+t._s(t.$t("Image URL"))+"\n ")]),t._v(" "),n("button",{class:{active:"upload"===t.imageSourceMode},attrs:{type:"button"},on:{click:function(e){return t.$emit("update:imageSourceMode","upload")}}},[t._v("\n "+t._s(t.$t("Upload file"))+"\n ")])]),t._v(" "),"upload"===t.imageSourceMode?n("div",{staticClass:"dte-image-upload"},[n("el-upload",{attrs:{drag:"",action:t.imageUploadUrl,data:{category:t.uploadCategory},headers:t.imageUploadHeaders,"show-file-list":!1,multiple:!1,"on-success":t.handleUploadSuccess,"on-error":t.handleUploadError,"before-upload":t.beforeUpload,"auto-upload":!0}},[n("div",{staticClass:"dte-image-upload-copy"},[n("i",{staticClass:"fa fa-cloud-upload-alt"}),t._v(" "),n("div",[t._v(t._s(t.$t("Drop an image here or click to browse")))])])])],1):n("div",{staticClass:"dte-image-url-form"},[n("el-input",{attrs:{placeholder:t.$t("https://example.com/image.jpg")},on:{input:t.emitImageFormUpdate},model:{value:t.localImageForm.url,callback:function(e){t.$set(t.localImageForm,"url",e)},expression:"localImageForm.url"}}),t._v(" "),n("el-input",{staticClass:"m-t-sm",attrs:{placeholder:t.$t("Caption")},on:{input:t.emitImageFormUpdate},model:{value:t.localImageForm.alt,callback:function(e){t.$set(t.localImageForm,"alt",e)},expression:"localImageForm.alt"}})],1)]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){return t.$emit("close")}}},[t._v(t._s(t.$t("Cancel")))]),t._v(" "),"url"===t.imageSourceMode?n("el-button",{attrs:{type:"primary",disabled:!t.localImageForm.url},on:{click:t.handleSubmitUrl}},[t._v("\n "+t._s(t.$t("Insert"))+"\n ")]):t._e()],1)])}),[],!1,null,null,null).exports,A=n("jEQI"),M={name:"TiptapEditorToolbar",props:{currentAlignment:{type:String,required:!0},currentBlock:{type:String,required:!0},currentTextColor:{type:String,default:null},currentTextBackgroundColor:{type:String,default:null},isActive:{type:Function,required:!0},isCommandAvailable:{type:Function,default:function(){return!0}},showTableButton:{type:Boolean,default:!0}},data:function(){return{activeColorTab:"text",colorInput:"",openMenu:null}},computed:{activeColorTitle:function(){return"background"===this.activeColorTab?this.$t("Background Color"):this.$t("Text")},backgroundColors:function(){return y},canApplyInputColor:function(){return this.canOpenColorMenu&&!!this.normalizedInputColor},canClearCurrentTabColor:function(){return this.canOpenColorMenu&&!!this.currentTabColor},canOpenColorMenu:function(){return this.isCommandAvailable("set_text_color")||this.isCommandAvailable("set_text_background_color")},currentTabColor:function(){return"background"===this.activeColorTab?this.currentTextBackgroundColor:this.currentTextColor},currentTabPreviewStyle:function(){return"background"===this.activeColorTab?{backgroundColor:this.currentTextBackgroundColor||"transparent"}:{backgroundColor:this.currentTextColor||"transparent"}},inputPreviewStyle:function(){return this.normalizedInputColor?{backgroundColor:this.normalizedInputColor}:{}},isColorMenuActive:function(){return!(!this.currentTextColor&&!this.currentTextBackgroundColor&&"color"!==this.openMenu)},normalizedInputColor:function(){return Object(A.b)(this.colorInput)}},watch:{activeColorTab:function(){this.colorInput=this.currentTabColor||""},currentTextBackgroundColor:function(){"background"===this.activeColorTab&&(this.colorInput=this.currentTextBackgroundColor||"")},currentTextColor:function(){"text"===this.activeColorTab&&(this.colorInput=this.currentTextColor||"")}},mounted:function(){document.addEventListener("mousedown",this.handleOutsideClick)},beforeDestroy:function(){document.removeEventListener("mousedown",this.handleOutsideClick)},methods:{applyCurrentTabColor:function(t){"background"===this.activeColorTab?this.$emit("set-text-background-color",t):this.$emit("set-text-color",t),this.colorInput=t,this.openMenu=null},applyInputColor:function(){this.canApplyInputColor&&this.applyCurrentTabColor(this.normalizedInputColor)},clearCurrentTabColor:function(){this.canClearCurrentTabColor&&("background"===this.activeColorTab?this.$emit("unset-text-background-color"):this.$emit("unset-text-color"),this.colorInput="",this.openMenu=null)},handleMouseDown:function(t){t&&t.target&&t.target.closest&&(t.target.closest("input, textarea, select, option")||t.preventDefault())},handleOutsideClick:function(t){this.$el&&!this.$el.contains(t.target)&&(this.openMenu=null)},isCurrentTabColor:function(t){return Object(A.b)(t)===this.currentTabColor},toggleColorMenu:function(){this.canOpenColorMenu&&(this.openMenu="color"===this.openMenu?null:"color",this.colorInput=this.currentTabColor||"")}}},P=Object(C.a)(M,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dte-toolbar"},[n("div",{staticClass:"dte-toolbar-row"},[n("button",{class:{active:t.isActive("bold")},attrs:{type:"button",disabled:!t.isCommandAvailable("bold"),title:t.$t("Bold")},on:{click:function(e){return t.$emit("run","bold")}}},[n("i",{staticClass:"far fa-bold",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:t.isActive("italic")},attrs:{type:"button",disabled:!t.isCommandAvailable("italic"),title:t.$t("Italic")},on:{click:function(e){return t.$emit("run","italic")}}},[n("i",{staticClass:"far fa-italic",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:t.isActive("underline")},attrs:{type:"button",disabled:!t.isCommandAvailable("underline"),title:t.$t("Underline")},on:{click:function(e){return t.$emit("run","underline")}}},[n("i",{staticClass:"far fa-underline",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:t.isActive("strike")},attrs:{type:"button",disabled:!t.isCommandAvailable("strike"),title:t.$t("Strike")},on:{click:function(e){return t.$emit("run","strike")}}},[n("i",{staticClass:"far fa-strikethrough",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("div",{staticClass:"dte-toolbar__menu",class:{"is-open":"color"===t.openMenu},on:{mousedown:t.handleMouseDown}},[n("button",{staticClass:"dte-toolbar__color-trigger",class:{active:t.isColorMenuActive},attrs:{type:"button",disabled:!t.canOpenColorMenu,title:t.activeColorTitle,"aria-label":t.activeColorTitle},on:{click:t.toggleColorMenu}},[n("span",{staticClass:"dte-toolbar__color-preview",style:t.currentTabPreviewStyle,attrs:{"aria-hidden":"true"}}),t._v(" "),n("i",{staticClass:"fa fa-caret-down dte-table-toolbar__caret",attrs:{"aria-hidden":"true"}})]),t._v(" "),"color"===t.openMenu?n("div",{staticClass:"dte-toolbar__panel dte-toolbar__panel--color"},[n("div",{staticClass:"dte-toolbar__tabs",attrs:{role:"tablist","aria-label":t.$t("Text")}},[n("button",{staticClass:"dte-toolbar__tab",class:{active:"text"===t.activeColorTab},attrs:{type:"button",role:"tab","aria-selected":"text"===t.activeColorTab},on:{click:function(e){t.activeColorTab="text"}}},[t._v("\n "+t._s(t.$t("Text"))+"\n ")]),t._v(" "),n("button",{staticClass:"dte-toolbar__tab",class:{active:"background"===t.activeColorTab},attrs:{type:"button",role:"tab","aria-selected":"background"===t.activeColorTab},on:{click:function(e){t.activeColorTab="background"}}},[t._v("\n "+t._s(t.$t("Background Color"))+"\n ")])]),t._v(" "),n("div",{staticClass:"dte-table-toolbar__swatches"},t._l(t.backgroundColors,(function(e){return n("button",{key:t.activeColorTab+"-"+e,staticClass:"dte-table-toolbar__swatch",class:{active:t.isCurrentTabColor(e)},style:{backgroundColor:e,"--dte-swatch-color":e},attrs:{type:"button",title:e,"aria-label":t.activeColorTitle+": "+e},on:{click:function(n){return t.applyCurrentTabColor(e)}}},[n("span",{staticClass:"dte-table-toolbar__sr-only"},[t._v(t._s(e))])])})),0),t._v(" "),n("div",{staticClass:"dte-table-toolbar__color-input-row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.colorInput,expression:"colorInput"}],staticClass:"dte-table-toolbar__color-input",attrs:{type:"text",placeholder:t.$t("HEX Color"),"aria-label":t.$t("HEX Color")},domProps:{value:t.colorInput},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.applyInputColor(e))},input:function(e){e.target.composing||(t.colorInput=e.target.value)}}}),t._v(" "),n("button",{staticClass:"dte-table-toolbar__apply",style:t.inputPreviewStyle,attrs:{type:"button",disabled:!t.canApplyInputColor,title:t.activeColorTitle,"aria-label":t.activeColorTitle},on:{click:t.applyInputColor}})]),t._v(" "),n("button",{staticClass:"dte-table-toolbar__clear",attrs:{type:"button",disabled:!t.canClearCurrentTabColor},on:{click:t.clearCurrentTabColor}},[n("i",{staticClass:"fa fa-eraser",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.$t("Clear Formatting"))+"\n ")])]):t._e()]),t._v(" "),n("button",{class:{active:t.isActive("spoiler")},attrs:{type:"button",disabled:!t.isCommandAvailable("spoiler"),title:t.$t("Spoiler")},on:{click:function(e){return t.$emit("run","spoiler")}}},[n("i",{staticClass:"far fa-triangle-exclamation"})]),t._v(" "),n("button",{class:{active:"paragraph"===t.currentBlock},attrs:{type:"button",disabled:!t.isCommandAvailable("set_paragraph"),title:t.$t("Paragraph")},on:{click:function(e){return t.$emit("set-paragraph")}}},[n("i",{staticClass:"far fa-paragraph"})]),t._v(" "),n("button",{class:{active:"h2"===t.currentBlock},attrs:{type:"button",disabled:!t.isCommandAvailable("set_heading_2"),title:t.$t("Heading 2")},on:{click:function(e){return t.$emit("set-heading",2)}}},[n("i",{staticClass:"far fa-h2",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:"h3"===t.currentBlock},attrs:{type:"button",disabled:!t.isCommandAvailable("set_heading_3"),title:t.$t("Heading 3")},on:{click:function(e){return t.$emit("set-heading",3)}}},[n("i",{staticClass:"far fa-h3",attrs:{"aria-hidden":"true"}})]),t._v(" "),n("button",{class:{active:t.isActive("bullet_list")},attrs:{type:"button",disabled:!t.isCommandAvailable("bullet_list"),title:t.$t("Bullets")},on:{click:function(e){return t.$emit("run","bullet_list")}}},[n("i",{staticClass:"far fa-list-ul"})]),t._v(" "),n("button",{class:{active:t.isActive("ordered_list")},attrs:{type:"button",disabled:!t.isCommandAvailable("ordered_list"),title:t.$t("Numbers")},on:{click:function(e){return t.$emit("run","ordered_list")}}},[n("i",{staticClass:"far fa-list-ol"})]),t._v(" "),n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("horizontal_rule"),title:t.$t("Horizontal rule")},on:{click:function(e){return t.$emit("run","horizontal_rule")}}},[n("i",{staticClass:"far fa-minus"})]),t._v(" "),t.showTableButton?n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("insert_table"),title:t.$t("Table")},on:{click:function(e){return t.$emit("insert-table")}}},[n("i",{staticClass:"far fa-table",attrs:{"aria-hidden":"true"}})]):t._e()]),t._v(" "),n("div",{staticClass:"dte-toolbar-row dte-toolbar-row--secondary"},[n("button",{class:{active:"left"===t.currentAlignment},attrs:{type:"button",disabled:!t.isCommandAvailable("align_left"),title:t.$t("Align left")},on:{click:function(e){return t.$emit("set-alignment","left")}}},[n("i",{staticClass:"far fa-align-left"})]),t._v(" "),n("button",{class:{active:"center"===t.currentAlignment},attrs:{type:"button",disabled:!t.isCommandAvailable("align_center"),title:t.$t("Align center")},on:{click:function(e){return t.$emit("set-alignment","center")}}},[n("i",{staticClass:"far fa-align-center"})]),t._v(" "),n("button",{class:{active:"right"===t.currentAlignment},attrs:{type:"button",disabled:!t.isCommandAvailable("align_right"),title:t.$t("Align right")},on:{click:function(e){return t.$emit("set-alignment","right")}}},[n("i",{staticClass:"far fa-align-right"})]),t._v(" "),n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("insert_image"),title:t.$t("Image")},on:{click:function(e){return t.$emit("insert-image")}}},[n("i",{staticClass:"far fa-image"})]),t._v(" "),n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("add_link"),title:t.$t("Link")},on:{click:function(e){return t.$emit("add-link")}}},[n("i",{staticClass:"far fa-link"})]),t._v(" "),n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("undo"),title:t.$t("Undo")},on:{click:function(e){return t.$emit("run","undo")}}},[n("i",{staticClass:"far fa-undo"})]),t._v(" "),n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("redo"),title:t.$t("Redo")},on:{click:function(e){return t.$emit("run","redo")}}},[n("i",{staticClass:"far fa-redo"})]),t._v(" "),n("button",{attrs:{type:"button",disabled:!t.isCommandAvailable("prompt_video"),title:t.$t("Embed video")},on:{click:function(e){return t.$emit("prompt-video")}}},[n("i",{staticClass:"far fa-play-circle"})]),t._v(" "),n("button",{class:{active:"code_block"===t.currentBlock},attrs:{type:"button",disabled:!t.isCommandAvailable("code_block"),title:t.$t("Code block")},on:{click:function(e){return t.$emit("run","code_block")}}},[n("i",{staticClass:"far fa-code"})])])])}),[],!1,null,null,null).exports,O=n("u/5A"),D=n("o6SV"),I=n("JS6+"),$=n("0lmf"),N=n("1MFB"),F=n("8aD0"),R=n("6HaS"),L={name:"GenericTiptapEditor",components:{EditorContent:g.b,TiptapEditorImageDialog:T,TiptapEditorTableToolbar:S,TiptapEditorToolbar:P},props:{value:{type:String,default:""},placeholder:{type:String,default:""},minHeight:{type:Number,default:200},stickyToolbar:{type:Boolean,default:!1},toolbarComponent:{type:[String,Object],default:"TiptapEditorToolbar"},imageDialogComponent:{type:[String,Object],default:"TiptapEditorImageDialog"},uploadUrl:{type:String,default:O.c},uploadHeaders:{type:Object,default:null},uploadCategory:{type:String,default:"photos"},defaultImageSourceMode:{type:String,default:"url"},createEditor:{type:Function,default:D.a},editorFeatures:{type:Object,default:function(){return{discussionQuote:!0,mediaUpload:!0,spoiler:!0,youtube:!0,youtubeAutoEmbed:!0}}},quoteCommandName:{type:String,default:"discussion_quote"},videoCommandName:{type:String,default:"video_embed"},videoNodeName:{type:String,default:"video_embed"}},data:function(){return{editor:null,lastValue:"",imageDialogVisible:!1,imageSourceMode:this.defaultImageSourceMode,imageUploadPosition:null,imageForm:{url:"",alt:""},selectionVersion:0,tableToolbarStyle:null,imageResizeHandleStyle:null,activeImagePos:null,activeImageSelectionKey:null,draggingRichImagePos:null,showFloatingToolbars:!0,syncingImageCaptionAttrs:!1,resizingImage:null,imageToolbarFrame:null,imageToolbarFrameFollowUp:null,stickyToolbarScrollParent:null}},computed:{currentBlock:function(){return this.selectionVersion,this.isActive("code_block")?"code_block":this.isHeadingActive(2)?"h2":this.isHeadingActive(3)?"h3":"paragraph"},currentAlignment:function(){if(this.selectionVersion,!this.editor||!this.editor.state||!this.editor.state.selection)return O.b;var t=this.editor.state.selection.$from.parent;return Object($.b)(t&&t.attrs?t.attrs.textAlign:O.b)},currentTextColor:function(){return this.selectionVersion,this.editor&&(this.editor.getAttributes("textStyle")||{}).color||null},currentTextBackgroundColor:function(){return this.selectionVersion,this.editor&&(this.editor.getAttributes("textStyle")||{}).backgroundColor||null},isTableNodeSelected:function(){return this.selectionVersion,this.showFloatingToolbars&&!this.isImageToolbarActive&&!!this.getSelectedTableContext()},currentTableCellBackgroundColor:function(){this.selectionVersion;var t=this.getSelectedTableContext(),e=t&&t.currentCellNode;return e&&e.attrs&&e.attrs.backgroundColor||null},isImageSelected:function(){return this.selectionVersion,this.showFloatingToolbars&&!!this.getSelectedImageNodeInfo()},isImageToolbarActive:function(){return this.selectionVersion,null!==this.activeImagePos||!!this.getSelectedImageNodeInfo()},isHeroImageSelected:function(){var t=this.getSelectedImageNodeInfo();return!!t&&"hero"===Object(F.f)(t.node.attrs.layout)},displayedImageWidth:function(){if(this.resizingImage&&"number"==typeof this.resizingImage.currentWidth)return Object(F.g)(this.resizingImage.currentWidth);var t=this.getSelectedImageNodeInfo();return t?Object(F.g)(t.node.attrs.width):F.b},imageUploadUrl:function(){return this.uploadUrl},imageUploadHeaders:function(){return this.uploadHeaders||Object(N.a)()},selectedImageLayout:function(){this.selectionVersion;var t=this.getSelectedImageNodeInfo();return t?Object(F.f)(t.node.attrs.layout):F.a},selectedImageHasCaption:function(){this.selectionVersion;var t=this.getSelectedImageNodeInfo();return!!t&&!!this.normalizeImageCaptionText(t.node.textContent||"")}},watch:{value:function(t){var e=this.prepareIncomingHtml(t);this.editor&&e!==this.lastValue&&(this.lastValue=e,this.editor.commands.setContent(e,!1))},selectionVersion:function(){var t=this;this.$nextTick((function(){t.updateStickyToolbarPosition(),t.updateTableToolbarPosition(),t.scheduleImageToolbarPositionUpdate()}))},stickyToolbar:function(){var t=this;this.$nextTick((function(){t.updateStickyToolbarPosition()}))}},mounted:function(){var t=this;window.addEventListener("resize",this.handleViewportChange),window.addEventListener("scroll",this.handleViewportChange,!0),document.addEventListener("mousedown",this.handleDocumentMouseDown,!0),document.addEventListener("dragend",this.handleDocumentDragEnd,!0),this.editor=this.createEditor(this,this.editorFeatures),this.$nextTick((function(){t.updateStickyToolbarPosition()}))},beforeDestroy:function(){window.removeEventListener("resize",this.handleViewportChange),window.removeEventListener("scroll",this.handleViewportChange,!0),document.removeEventListener("mousedown",this.handleDocumentMouseDown,!0),document.removeEventListener("dragend",this.handleDocumentDragEnd,!0),this.stopImageResize(),null!==this.imageToolbarFrame&&(window.cancelAnimationFrame(this.imageToolbarFrame),this.imageToolbarFrame=null),null!==this.imageToolbarFrameFollowUp&&(window.cancelAnimationFrame(this.imageToolbarFrameFollowUp),this.imageToolbarFrameFollowUp=null),this.tableToolbarStyle=null,this.imageResizeHandleStyle=null,this._editorToDestroy=this.editor,this._editorToDestroy&&(this._editorToDestroy.view&&this._editorToDestroy.view.dom&&(this._editorToDestroy.view.dom.removeEventListener("dragover",this.handleRichImageDragOver,!0),this._editorToDestroy.view.dom.removeEventListener("drop",this.handleRichImageDrop,!0)),delete this._editorToDestroy._activateRichImage,delete this._editorToDestroy._selectRichImageNode,delete this._editorToDestroy._startRichImageDrag,delete this._editorToDestroy._dropRichImageAt,delete this._editorToDestroy._cancelRichImageDrag,delete this._editorToDestroy._focusRichImageCaption,delete this._editorToDestroy._removeRichImage,delete this._editorToDestroy._removeDiscussionQuote,delete this._editorToDestroy._setRichImageLayout,delete this._editorToDestroy._getActiveRichImagePos,delete this._editorToDestroy._getRichImageDisplayWidth),this.editor=null},destroyed:function(){this._editorToDestroy&&!this._editorToDestroy.isDestroyed&&this._editorToDestroy.destroy(),this._editorToDestroy=null},methods:{handleRootMouseDown:function(){this.showFloatingToolbars=!0},handleDocumentMouseDown:function(t){this.$refs.root&&t&&t.target&&(this.$refs.root.contains(t.target)?this.showFloatingToolbars=!0:this.dismissFloatingToolbars())},dismissFloatingToolbars:function(){var t=this.showFloatingToolbars||null!==this.activeImagePos||null!==this.tableToolbarStyle||null!==this.imageResizeHandleStyle;this.showFloatingToolbars=!1,this.clearActiveImage(),this.tableToolbarStyle=null,this.imageResizeHandleStyle=null,this.resizingImage&&this.stopImageResize(),t&&this.bumpSelectionVersion()},handleEditorCreate:function(t){var e=this;this.editor=t,t&&t.view&&t.view.dom&&(t.view.dom.addEventListener("dragover",this.handleRichImageDragOver,!0),t.view.dom.addEventListener("drop",this.handleRichImageDrop,!0)),this.editor._activateRichImage=function(t){e.activateImage(t)},this.editor._selectRichImageNode=function(t){e.selectImageNode(t)},this.editor._startRichImageDrag=function(t){e.startRichImageDrag(t)},this.editor._dropRichImageAt=function(t,n){e.dropRichImageAt(t,n)},this.editor._cancelRichImageDrag=function(){e.draggingRichImagePos=null},this.editor._focusRichImageCaption=function(t){e.focusImageCaptionAtPos(t)},this.editor._removeRichImage=function(t){e.removeImageAtPos(t)},this.editor._removeDiscussionQuote=function(t){e.removeDiscussionQuoteAtPos(t)},this.editor._setRichImageLayout=function(t,n){e.updateImageNodeAttrsAtPos(t,{layout:Object(F.f)(n)})},this.editor._getActiveRichImagePos=function(){return e.showFloatingToolbars?e.activeImagePos:null},this.editor._getRichImageDisplayWidth=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:F.b;return e.resizingImage&&e.resizingImage.pos===t&&"number"==typeof e.resizingImage.currentWidth?Object(F.g)(e.resizingImage.currentWidth):Object(F.g)(n)},this.lastValue=this.sanitizeEditorHtml(t.getHTML()),this.$emit("input",this.lastValue),this.bumpSelectionVersion(),this.$emit("ready",this),this.$nextTick(this.hydrateEmbeddedContent)},handleEditorUpdate:function(t){this.editor=t,this.syncImageCaptionAttrsFromSelection()||(this.emitCurrentHtml(),this.bumpSelectionVersion(),this.$nextTick(this.hydrateEmbeddedContent))},handleEditorSelectionUpdate:function(t){this.editor=t,this.bumpSelectionVersion()},handleEditorTransaction:function(t,e){this.editor=t,this.syncActiveImageState(e),this.bumpSelectionVersion()},handleViewportChange:function(){var t=this;this.$nextTick((function(){t.updateStickyToolbarPosition(),t.updateTableToolbarPosition(),t.scheduleImageToolbarPositionUpdate()}))},getScrollContainer:function(){if("undefined"==typeof window||!this.$refs.root)return null;var t=this.$refs.root.closest(".el-dialog__wrapper");if(t)return t;var e=this.$refs.root.closest(".el-dialog.is-fullscreen");if(e)return e;var n=this.$refs.root.closest(".el-dialog__body");if(n)return n;for(var i=this.$refs.root.parentElement;i&&i!==document.body;){var r=window.getComputedStyle(i);if(r){var o=r.overflow+" "+r.overflowY+" "+r.overflowX;if(/(auto|scroll|overlay)/.test(o)&&i.scrollHeight>i.clientHeight)return i}i=i.parentElement}return window},getStickyToolbarElement:function(){var t=this.$refs.toolbar;return t?t.$el||t:null},getViewportTopInset:function(){return 57},updateStickyToolbarPosition:function(){if(this.$refs.root){if(!this.stickyToolbar||!this.getStickyToolbarElement())return this.stickyToolbarScrollParent=null,void this.$refs.root.style.setProperty("--dte-sticky-toolbar-top","0px");var t=this.getScrollContainer();this.stickyToolbarScrollParent=t;var e=t&&t!==window&&t.classList&&t.classList.contains("el-dialog__wrapper"),n=t===window||e?this.getViewportTopInset():0;this.$refs.root.style.setProperty("--dte-sticky-toolbar-top",Math.max(n,0)+"px")}},handleDocumentDragEnd:function(){this.draggingRichImagePos=null},handleRichImageDragOver:function(t){"number"==typeof this.draggingRichImagePos&&t&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))},handleRichImageDrop:function(t){"number"==typeof this.draggingRichImagePos&&t&&this.editor&&this.editor.view&&(t.preventDefault(),t.stopPropagation(),this.dropRichImageAt(t.clientX,t.clientY))},scheduleImageToolbarPositionUpdate:function(){var t=this;"undefined"!=typeof window&&window.requestAnimationFrame?(null!==this.imageToolbarFrame&&window.cancelAnimationFrame(this.imageToolbarFrame),null!==this.imageToolbarFrameFollowUp&&(window.cancelAnimationFrame(this.imageToolbarFrameFollowUp),this.imageToolbarFrameFollowUp=null),this.imageToolbarFrame=window.requestAnimationFrame((function(){t.imageToolbarFrame=null,t.updateImageToolbarPosition(),t.imageToolbarFrameFollowUp=window.requestAnimationFrame((function(){t.imageToolbarFrameFollowUp=null,t.updateImageToolbarPosition()}))}))):this.updateImageToolbarPosition()},bumpSelectionVersion:function(){this.selectionVersion+=1},getSelectedTableContext:function(){if(!this.editor||!this.editor.state||!this.editor.state.selection)return null;var t=this.editor.state.selection,e=null,n=null,i=null,r=null,o=null;if(t instanceof f.NodeSelection&&t.node&&"table"===t.node.type.name)e=t.node,n=t.from;else for(var s=t.$from.depth;s>=0;s-=1){var a=t.$from.node(s);if(r||!a||!a.type||"cell"!==a.type.spec.tableRole&&"header_cell"!==a.type.spec.tableRole||(r=a,o=t.$from.before(s)),a&&a.type&&"table"===a.type.name){e=a,n=t.$from.before(s);break}}return e&&"number"==typeof n?(e.descendants((function(t,e){return"cell"!==t.type.spec.tableRole&&"header_cell"!==t.type.spec.tableRole||(i=n+e+1,!1)})),"number"!=typeof i?null:{currentCellNode:r,currentCellPos:o,firstCellPos:i,hasTableNodeSelection:t instanceof f.NodeSelection&&t.node===e,tableNode:e,tablePos:n}):null},getSelectedTableDomNode:function(){var t=this.getSelectedTableContext();if(!(t&&this.editor&&this.editor.view&&this.editor.view.nodeDOM))return null;var e=this.editor.view.nodeDOM(t.tablePos);return e&&e.getBoundingClientRect?e.classList&&e.classList.contains("tableWrapper")?e:e.closest&&e.closest(".tableWrapper")||e:null},getTableToolbarAnchorDomNode:function(){var t=this.getSelectedTableContext();if(!(t&&this.editor&&this.editor.view&&this.editor.view.nodeDOM))return null;if(!t.hasTableNodeSelection&&"number"==typeof t.currentCellPos){var e=this.editor.view.nodeDOM(t.currentCellPos);if(e&&e.getBoundingClientRect)return e}return this.getSelectedTableDomNode()},updateTableToolbarPosition:function(){if(this.$refs.root&&!this.isImageToolbarActive&&this.isTableNodeSelected){var t=this.getTableToolbarAnchorDomNode();if(t&&t.getBoundingClientRect){var e=this.$refs.root.getBoundingClientRect(),n=t.getBoundingClientRect(),i=this.$refs.tableToolbar,r=i&&i.$el&&i.$el.offsetWidth?i.$el.offsetWidth:320,o=i&&i.$el&&i.$el.offsetHeight?i.$el.offsetHeight:44,s=n.top-e.top+this.$refs.root.scrollTop-o-8,a=n.left-e.left+this.$refs.root.scrollLeft+n.width/2-r/2,l=Math.min(Math.max(a,12),Math.max(e.width-r-12,12));this.tableToolbarStyle={top:Math.max(s,12)+"px",left:l+"px"}}else this.tableToolbarStyle=null}else this.tableToolbarStyle=null},resolveImageNodeInfoAtPos:function(t){if(null==t||!this.editor||!this.editor.state)return null;var e=this.editor.state.doc.nodeAt(t);return e&&e.type&&"figure"===e.type.name?{node:e,pos:t}:null},getLegacySelectedImageNodeInfo:function(){if(!this.editor||!this.editor.state||!this.editor.state.selection)return null;var t=this.editor.state.selection,e=t.node;return e&&e.type&&"figure"===e.type.name?{node:e,pos:t.from}:null},getImageNodeInfoFromSelection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.editor||!this.editor.state)return null;var e=t||this.editor.state.selection;if(!e||!e.$from)return null;var n=this.getLegacySelectedImageNodeInfo();if(n)return n;for(var i=e.$from.depth;i>0;i-=1){var r=e.$from.node(i);if(r&&r.type&&"figure"===r.type.name)return{node:r,pos:e.$from.before(i)}}return null},getSelectedImageNodeInfo:function(){if(this.resizingImage&&null!==this.resizingImage.pos)return this.resolveImageNodeInfoAtPos(this.resizingImage.pos);var t=this.resolveImageNodeInfoAtPos(this.activeImagePos);return t||this.getLegacySelectedImageNodeInfo()},activateImage:function(t){var e=this.resolveImageNodeInfoAtPos(t);if(e){if(this.activeImagePos=e.pos,this.activeImageSelectionKey=this.getSelectionKey(),this.editor&&this.editor.view){var n=e.pos+1,i=this.editor.state.tr.setSelection(f.TextSelection.create(this.editor.state.doc,n));this.editor.view.dispatch(i),this.editor.commands.focus()}this.bumpSelectionVersion(),this.scheduleImageToolbarPositionUpdate()}},selectImageNode:function(t){var e=this.resolveImageNodeInfoAtPos(t);if(e&&this.editor&&this.editor.view){this.activeImagePos=e.pos;var n=this.editor.state.tr.setSelection(f.NodeSelection.create(this.editor.state.doc,e.pos));this.editor.view.dispatch(n),this.activeImageSelectionKey=this.getSelectionKey(this.editor.view.state.selection),this.editor.view.focus(),this.bumpSelectionVersion(),this.scheduleImageToolbarPositionUpdate()}},startRichImageDrag:function(t){this.selectImageNode(t),this.draggingRichImagePos=t},dropRichImageAt:function(t,e){if("number"!=typeof this.draggingRichImagePos||!this.editor||!this.editor.view)return!1;var n=this.editor.view.posAtCoords({left:t,top:e}),i=n&&"number"==typeof n.pos?n.pos:this.editor.state.selection.from,r=this.moveRichImageNode(this.draggingRichImagePos,i);return this.draggingRichImagePos=null,r},getSelectionKey:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!this.editor||!this.editor.state)return"";var e=t||this.editor.state.selection;return e?[e.constructor?e.constructor.name:"Selection",e.from,e.to].join(":"):""},clearActiveImage:function(){null!==this.activeImagePos?(this.activeImagePos=null,this.activeImageSelectionKey=null):this.activeImageSelectionKey=null},syncActiveImageState:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.editor&&this.editor.state){if("number"==typeof this.activeImagePos&&t&&t.mapping){var e=t.mapping.mapResult(this.activeImagePos);this.activeImagePos=e.deleted?null:e.pos}if(this.resizingImage&&null!==this.resizingImage.pos)this.activeImagePos=this.resizingImage.pos;else{var n=this.resolveImageNodeInfoAtPos(this.activeImagePos),i=this.getImageNodeInfoFromSelection(),r=this.getSelectionKey();if(i&&(!n||i.pos===n.pos))return this.activeImagePos=i.pos,void(this.activeImageSelectionKey=r);n?i&&i.pos===n.pos?this.activeImageSelectionKey=r:r!==this.activeImageSelectionKey&&this.clearActiveImage():this.clearActiveImage()}}else this.clearActiveImage()},normalizeImageCaptionText:function(t){return"string"!=typeof t?"":t.replace(/\s+/g," ").trim()},syncImageCaptionAttrsFromSelection:function(){var t=this;if(this.syncingImageCaptionAttrs||!this.editor)return!1;var e=this.getImageNodeInfoFromSelection();if(!e||!e.node||!e.node.attrs)return!1;var n=this.normalizeImageCaptionText(e.node.textContent||"");if(!n)return!1;if(e.node.attrs.alt===n&&e.node.attrs.title===n)return!1;this.syncingImageCaptionAttrs=!0;var i=p()({},e.node.attrs,{alt:n,title:n});return this.editor.view.dispatch(this.editor.state.tr.setNodeMarkup(e.pos,null,i)),this.$nextTick((function(){t.syncingImageCaptionAttrs=!1})),!0},getSelectedImageDomNode:function(){var t=this.getSelectedImageNodeInfo();return t?this.getImageDomNodeByPos(t.pos):null},getImageDomNodeByPos:function(t){return null!=t&&this.editor&&this.editor.view&&this.editor.view.nodeDOM?this.editor.view.nodeDOM(t):null},getImageElementFromFigureNode:function(t){return t&&t.querySelector?t.querySelector("img.grc__img"):null},getNaturalImageWidthPercentAtPos:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:F.b,n=this.getImageDomNodeByPos(t),i=this.getImageElementFromFigureNode(n);if(!i)return Object(F.g)(e);var r=i.naturalWidth||i.width||0,o=this.editor&&this.editor.view&&this.editor.view.dom&&(this.editor.view.dom.clientWidth||this.editor.view.dom.offsetWidth)||0;return r&&o?Object(F.g)(Math.min(r/o*100,F.c)):Object(F.g)(e)},resolveImageWidthForLayout:function(t,e){arguments.length>2&&void 0!==arguments[2]||F.b;var n=Object(F.f)(e);return"hero"===n?F.c:"left"===n||"right"===n?50:null},applyImageWidthToDom:function(t,e){var n=this.getImageDomNodeByPos(t);if(n&&n.setAttribute){var i=Object(F.g)(e);n.setAttribute("data-width",String(i)),n.setAttribute("style",Object(F.d)(i))}},moveRichImageNode:function(t,e){var n=this.resolveImageNodeInfoAtPos(t);if(!n||!this.editor||"number"!=typeof e)return!1;var i=n.node,r=this.editor.state,o=new h.Slice(h.Fragment.from(i),0,0),s=e;if(s>=n.pos&&s<=n.pos+i.nodeSize)return!1;s>n.pos&&(s-=i.nodeSize);var a=r.tr.delete(n.pos,n.pos+i.nodeSize),l=Object(m.dropPoint)(a.doc,Math.max(0,Math.min(s,a.doc.content.size)),o);return null!=l&&(a.insert(l,i),a.setSelection(f.NodeSelection.create(a.doc,l)),this.editor.view.dispatch(a.scrollIntoView()),this.activeImagePos=l,this.activeImageSelectionKey=this.getSelectionKey(this.editor.view.state.selection),this.bumpSelectionVersion(),this.scheduleImageToolbarPositionUpdate(),!0)},updateImageToolbarPosition:function(){if(this.$refs.root){var t=this.resizingImage&&null!==this.resizingImage.pos?this.resizingImage.pos:this.getSelectedImageNodeInfo()?this.getSelectedImageNodeInfo().pos:null,e=this.getImageDomNodeByPos(t);if(e&&e.getBoundingClientRect){var n=this.getImageElementFromFigureNode(e);if(n&&n.getBoundingClientRect){var i=this.$refs.root.getBoundingClientRect(),r=n.getBoundingClientRect();this.imageResizeHandleStyle={top:r.bottom-i.top+this.$refs.root.scrollTop-16+"px",left:r.right-i.left+this.$refs.root.scrollLeft-16+"px"}}else this.imageResizeHandleStyle=null}else this.imageResizeHandleStyle=null}else this.imageResizeHandleStyle=null},normalizeHtml:function(t){return Object($.c)(t)},prepareIncomingHtml:function(t){return Object(I.b)(t)},sanitizeEditorHtml:function(t){return Object(I.c)(t)},emitCurrentHtml:function(){this.editor&&(this.lastValue=this.sanitizeEditorHtml(this.editor.getHTML()),this.$emit("input",this.lastValue))},hydrateEmbeddedContent:function(){Object(I.a)(this.editor)},focus:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.editor){var e=this.editor.chain().focus();"number"==typeof t&&e.setTextSelection(t),e.run()}},closeImageDialog:function(){this.imageDialogVisible=!1,this.imageSourceMode=this.defaultImageSourceMode,this.imageForm.url="",this.imageForm.alt="",this.imageUploadPosition=null},updateImageForm:function(t){this.imageForm=t},updateImageSourceMode:function(t){this.imageSourceMode=t},resolveUploadUrl:function(t){return Object(N.c)(t)},insertImageAt:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.editor&&this.editor.schema&&this.editor.state&&this.editor.view&&this.editor.commands&&"function"==typeof this.editor.commands.insertFigureImage){var i="number"==typeof n?n:this.editor.state.selection.from;this.editor.chain().focus().insertFigureImage({src:t,alt:e.alt||"",title:e.title||"",caption:e.caption||"",layout:Object(F.f)(e.layout||F.a),width:void 0!==e.width?Object(F.h)(e.width):void 0,height:e.height},i).run(),this.editor.commands&&"function"==typeof this.editor.commands.focusSelectedFigureCaption?this.editor.commands.focusSelectedFigureCaption():this.focusSelectedImageCaption()}},handleImagePickerUploadSuccess:function(t,e){var n=this.resolveUploadUrl(t);n?(this.insertImageAt(n,{alt:e&&e.name?e.name:"",title:e&&e.name?e.name:""},this.imageUploadPosition),this.closeImageDialog()):this.handleImagePickerUploadError()},handleImagePickerUploadError:function(){window.toastr&&window.toastr.error(this.$t("Unable to upload image right now."))},uploadEditorImageFiles:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=Array.isArray(t)?t:u()(t||[]);i.length&&i.forEach((function(t,i){Object(N.d)(t,{category:e.uploadCategory,headers:e.imageUploadHeaders,url:e.imageUploadUrl}).done((function(r){var o=e.resolveUploadUrl(r);o?e.insertImageAt(o,{alt:t&&t.name?t.name:"",title:t&&t.name?t.name:""},"number"==typeof n?n+i:null):window.toastr&&window.toastr.error(e.$t("Unable to upload image right now."))})).fail((function(){window.toastr&&window.toastr.error(e.$t("Unable to upload image right now."))}))}))},removeSelectedImage:function(){var t=this.getSelectedImageNodeInfo();t&&this.editor&&this.removeImageAtPos(t.pos)},setSelectedImageLayout:function(t){this.updateSelectedImageAttrs({layout:Object(F.f)(t)})},focusSelectedImageCaption:function(){var t=this.getSelectedImageNodeInfo();t&&(this.editor&&this.editor.commands&&"function"==typeof this.editor.commands.focusSelectedFigureCaption?this.editor.commands.focusSelectedFigureCaption():this.focusImageCaptionAtPos(t.pos))},removeImageAtPos:function(t){var e=this.resolveImageNodeInfoAtPos(t);if(e&&this.editor){var n=this.editor.state.tr.delete(e.pos,e.pos+e.node.nodeSize);this.editor.view.dispatch(n),this.clearActiveImage(),this.focus(),this.bumpSelectionVersion()}},removeDiscussionQuoteAtPos:function(t){this.editor&&(Object(R.f)(this.editor,t,"discussionQuote")&&(this.focus(),this.bumpSelectionVersion()))},focusImageCaptionAtPos:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.resolveImageNodeInfoAtPos(t);i&&(this.activateImage(i.pos),this.$nextTick((function(){var t=function(){var t=e.getImageDomNodeByPos(i.pos),r=t&&t.querySelector?t.querySelector('figcaption.grc__figcaption[contenteditable="true"]'):null;if(r){if(r.focus(),"undefined"!=typeof window&&window.getSelection&&document.createRange){var o=window.getSelection(),s=document.createRange();s.selectNodeContents(r),s.collapse(!1),o&&(o.removeAllRanges(),o.addRange(s))}}else n<3&&window.setTimeout((function(){e.focusImageCaptionAtPos(i.pos,n+1)}),16)};"undefined"==typeof window||"function"!=typeof window.requestAnimationFrame?t():window.requestAnimationFrame(t)})))},updateSelectedImageAttrs:function(t){var e=this.getSelectedImageNodeInfo();if(e&&this.editor){var n=Object(F.f)(t&&t.layout?t.layout:e.node.attrs.layout),i=void 0!==t.width?t.width:e.node.attrs.width,r=p()({},e.node.attrs,t,{layout:n,width:t&&Object.prototype.hasOwnProperty.call(t,"layout")&&void 0===t.width?this.resolveImageWidthForLayout(e.pos,n,i):Object(F.h)(i)});this.editor.view.dispatch(this.editor.state.tr.setNodeMarkup(e.pos,null,r)),this.activeImagePos=e.pos,this.activeImageSelectionKey=this.getSelectionKey(),this.focus(),this.bumpSelectionVersion()}},updateImageNodeAttrsAtPos:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=t&&this.editor){var i=this.editor.state.doc.nodeAt(t);if(i&&"figure"===i.type.name){var r=Object(F.f)(e&&e.layout?e.layout:i.attrs.layout),o=void 0!==e.width?e.width:i.attrs.width,s=p()({},i.attrs,e,{layout:r,width:e&&Object.prototype.hasOwnProperty.call(e,"layout")&&void 0===e.width?this.resolveImageWidthForLayout(t,r,o):Object(F.h)(o)}),a=this.editor.state.tr.setNodeMarkup(t,null,s);this.editor.view.dispatch(a),this.activeImagePos=t,this.activeImageSelectionKey=this.getSelectionKey(),!1!==n.focus&&this.focus(),!1!==n.refresh&&this.bumpSelectionVersion()}}},startImageResize:function(t){if(!this.isHeroImageSelected){var e=this.getSelectedImageNodeInfo(),n=this.getSelectedImageDomNode();if(e&&n&&n.getBoundingClientRect){var i=n.parentElement,r=i&&i.getBoundingClientRect?i.getBoundingClientRect():null;r&&r.width&&(this.resizingImage={pos:e.pos,startX:t.clientX,startWidthPx:n.getBoundingClientRect().width,containerWidthPx:r.width,currentWidth:Object(F.g)(n.getBoundingClientRect().width/r.width*100)},this.activeImagePos=e.pos,this.activeImageSelectionKey=this.getSelectionKey(),window.addEventListener("mousemove",this.onImageResizeMove,!0),window.addEventListener("mouseup",this.stopImageResize,!0))}}},onImageResizeMove:function(t){var e=this;if(this.resizingImage){var n=t.clientX-this.resizingImage.startX,i=this.resizingImage.startWidthPx+n,r=Object(F.g)(i/this.resizingImage.containerWidthPx*100);this.resizingImage.currentWidth=r,this.applyImageWidthToDom(this.resizingImage.pos,r),this.editor&&"function"==typeof this.editor.emit&&this.editor.emit("richImageResize",{pos:this.resizingImage.pos,width:r}),this.bumpSelectionVersion(),this.$nextTick((function(){e.updateImageToolbarPosition()}))}},stopImageResize:function(){if(window.removeEventListener("mousemove",this.onImageResizeMove,!0),window.removeEventListener("mouseup",this.stopImageResize,!0),this.resizingImage){var t=this.resizingImage,e=t.pos,n=t.currentWidth;this.resizingImage=null,this.editor&&"function"==typeof this.editor.emit&&this.editor.emit("richImageResize",{pos:e,width:null}),this.updateImageNodeAttrsAtPos(e,{width:n},{focus:!0,refresh:!0})}},getHTML:function(){return this.lastValue},run:function(t){if(this.editor&&this.isToolbarCommandAvailable(t)){var e=this.editor.chain().focus();switch(t){case"bold":e.toggleBold().run();break;case"italic":e.toggleItalic().run();break;case"underline":e.toggleUnderline().run();break;case"strike":e.toggleStrike().run();break;case"spoiler":"function"==typeof e.toggleSpoiler&&e.toggleSpoiler().run();break;case"bullet_list":e.toggleBulletList().run();break;case"ordered_list":e.toggleOrderedList().run();break;case"horizontal_rule":e.setHorizontalRule().run();break;case"undo":e.undo().run();break;case"redo":e.redo().run();break;case"code_block":e.toggleCodeBlock().run()}}},isActive:function(t,e){if(!this.editor)return!1;return this.editor.isActive({bullet_list:"bulletList",ordered_list:"orderedList",code_block:"codeBlock"}[t]||t,e)},isHeadingActive:function(t){return this.isActive("heading",{level:t})},isSelectionInImageCaption:function(){return this.selectionVersion,!!this.getImageNodeInfoFromSelection()},isToolbarCommandAvailable:function(t){return this.selectionVersion,!!this.editor&&(!this.isSelectionInImageCaption()||-1!==["bold","italic","underline","add_link","redo","set_text_background_color","set_text_color","undo","unset_text_background_color","unset_text_color"].indexOf(t))},setParagraph:function(){this.editor&&this.isToolbarCommandAvailable("set_paragraph")&&this.editor.chain().focus().setParagraph().setTextAlign(this.currentAlignment).run()},setHeading:function(t,e){this.editor&&this.isToolbarCommandAvailable("set_heading_"+t)&&this.editor.chain().focus().setHeading({level:t}).setTextAlign(Object($.b)(e||this.currentAlignment)).run()},setAlignment:function(t){this.editor&&this.isToolbarCommandAvailable("align_"+t)&&this.editor.chain().focus().setTextAlign(Object($.b)(t)).run()},setTextColor:function(t){this.editor&&this.isToolbarCommandAvailable("set_text_color")&&this.editor.commands&&"function"==typeof this.editor.commands.setTextColor&&(this.editor.chain().focus().setTextColor(t).run(),this.bumpSelectionVersion())},unsetTextColor:function(){this.editor&&this.isToolbarCommandAvailable("unset_text_color")&&this.editor.commands&&"function"==typeof this.editor.commands.unsetTextColor&&(this.editor.chain().focus().unsetTextColor().run(),this.bumpSelectionVersion())},setTextBackgroundColor:function(t){this.editor&&this.isToolbarCommandAvailable("set_text_background_color")&&this.editor.commands&&"function"==typeof this.editor.commands.setTextBackgroundColor&&(this.editor.chain().focus().setTextBackgroundColor(t).run(),this.bumpSelectionVersion())},unsetTextBackgroundColor:function(){this.editor&&this.isToolbarCommandAvailable("unset_text_background_color")&&this.editor.commands&&"function"==typeof this.editor.commands.unsetTextBackgroundColor&&(this.editor.chain().focus().unsetTextBackgroundColor().run(),this.bumpSelectionVersion())},addLink:function(){if(this.editor&&this.isToolbarCommandAvailable("add_link")){var t=this.editor.getAttributes("link")||{},e=window.prompt(this.$t("Enter a URL"),t&&t.href?t.href:"https://");null!==e&&(""!==e?this.editor.chain().focus().extendMarkRange("link").setLink({href:e,target:"_blank"}).run():this.editor.chain().focus().extendMarkRange("link").unsetLink().run())}},insertImage:function(){this.editor&&this.editor.state&&this.editor.state.selection&&this.isToolbarCommandAvailable("insert_image")&&(this.imageUploadPosition=this.editor.state.selection.from,this.imageDialogVisible=!0)},submitImageUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=t&&"object"===(void 0===t?"undefined":l()(t))?t:this.imageForm,n=(""+(e.url||"")).trim();if(n){var i=(""+(e.alt||"")).trim();this.insertImageAt(n,{alt:i,title:i,caption:i},this.imageUploadPosition),this.closeImageDialog()}},insertTable:function(){this.editor&&this.editor.commands&&"function"==typeof this.editor.commands.insertTable&&this.isToolbarCommandAvailable("insert_table")&&(this.editor.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).selectParentNode().run(),this.bumpSelectionVersion())},canRunTableCommand:function(t){if(this.selectionVersion,!this.isTableNodeSelected||!this.editor||!this.editor.can)return!1;var e=this.getSelectedTableContext();if(!e)return!1;var n="setTableCellBackgroundColor"===t||"unsetTableCellBackgroundColor"===t;if(n&&(e.hasTableNodeSelection||!e.currentCellNode))return!1;var i=this.editor.can().chain().focus();return e.hasTableNodeSelection&&!n&&i.setTextSelection(e.firstCellPos),"function"==typeof i[t]&&("setTableCellBackgroundColor"===t?i[t]("rgb(61, 142, 185)").run():i[t]().run())},isTableCommandActive:function(t){this.selectionVersion;var e=v[t],n=this.getSelectedTableContext();if(!e||!n)return!1;if("tableClass"===e.type)return this.tableHasClass(n.tableNode,e.className);if("tableHeader"===e.type){var i=!1;return n.tableNode.descendants((function(t){return"tableHeader"!==t.type.name||(i=!0,!1)})),i}if("tableCellAttribute"===e.type){var r=n.currentCellNode;return!!(r&&r.attrs&&r.attrs[e.attrName])}return!1},runTableCommand:function(t){if(this.editor&&this.editor.commands&&"function"==typeof this.editor.commands[t]&&this.canRunTableCommand(t)){var e=this.getSelectedTableContext();if(e){var n=this.editor.chain().focus();e.hasTableNodeSelection&&n.setTextSelection(e.firstCellPos),"function"==typeof n[t]&&(n[t]().run(),this.bumpSelectionVersion())}}},setTableCellBackgroundColor:function(t){this.editor&&this.editor.commands&&"function"==typeof this.editor.commands.setTableCellBackgroundColor&&this.canRunTableCommand("setTableCellBackgroundColor")&&(this.editor.chain().focus().setTableCellBackgroundColor(t).run(),this.bumpSelectionVersion())},unsetTableCellBackgroundColor:function(){this.editor&&this.editor.commands&&"function"==typeof this.editor.commands.unsetTableCellBackgroundColor&&this.canRunTableCommand("unsetTableCellBackgroundColor")&&(this.editor.chain().focus().unsetTableCellBackgroundColor().run(),this.bumpSelectionVersion())},getTableNodeClassNames:function(t){return t&&t.attrs&&t.attrs.class?(""+t.attrs.class).split(/\s+/).filter(Boolean):[]},tableHasClass:function(t,e){return-1!==this.getTableNodeClassNames(t).indexOf(e)},promptVideo:function(){var t=this;return s()(r.a.mark((function e(){var n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.isToolbarCommandAvailable("prompt_video")){e.next=2;break}return e.abrupt("return");case 2:if(n=window.prompt(t.$t("Enter a YouTube URL"),"https://")){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,t.insertVideoFromUrl(n);case 7:case"end":return e.stop()}}),e,t)})))()},insertVideoFromUrl:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s()(r.a.mark((function i(){var o,s;return r.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.editor&&Object(N.b)(t)){i.next=3;break}return window.toastr&&window.toastr.error(e.$t("Only YouTube videos are supported.")),i.abrupt("return",!1);case 3:return o=e.editor.chain().focus(),"number"==typeof n&&o.setTextSelection(n),!(s=o.setYoutubeVideo({src:t,width:585,height:329}).run())&&window.toastr&&window.toastr.error(e.$t("Unable to embed this video.")),i.abrupt("return",s);case 8:case"end":return i.stop()}}),i,e)})))()},insertQuote:function(t){var e=this;if(this.editor&&this.editor.schema&&this.editor.view){var n=this.editor.state.selection.from,i=this.editor.schema.nodes.paragraph;if(this.editor.schema.nodes.discussionQuote&&i){var r=Object(R.c)(this.editor.schema,{post:t&&t.post?String(t.post):"",topic:t&&t.topic?String(t.topic):"",user:t&&t.username?String(t.username):"",avatar:t&&t.avatar?String(t.avatar):"",display_name:t&&t.display_name?String(t.display_name):""},t&&t.message?String(t.message):""),o=i.createAndFill();if(o){var s=h.Fragment.fromArray([r,o]),a=this.editor.state.tr.replaceSelection(new h.Slice(s,0,0)),l=a.mapping.map(n,-1)+r.nodeSize+1;a=(a=a.setSelection(f.TextSelection.create(a.doc,l))).scrollIntoView(),this.editor.view.dispatch(a),this.$nextTick((function(){window.getSelection&&"function"==typeof window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges(),e.focus(l)}))}}}}}},j=(n("DqYT"),Object(C.a)(L,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"root",staticClass:"mdl-editor",class:{"is-sticky-toolbar":t.stickyToolbar,"is-resizing-image":!!t.resizingImage},on:{"!mousedown":function(e){return t.handleRootMouseDown(e)}}},[n(t.toolbarComponent,{ref:"toolbar",tag:"component",attrs:{"current-alignment":t.currentAlignment,"current-block":t.currentBlock,"current-text-background-color":t.currentTextBackgroundColor,"current-text-color":t.currentTextColor,"is-active":t.isActive,"is-command-available":t.isToolbarCommandAvailable},on:{"add-link":t.addLink,"insert-image":t.insertImage,"insert-table":t.insertTable,"prompt-video":t.promptVideo,run:t.run,"set-alignment":t.setAlignment,"set-heading":t.setHeading,"set-paragraph":t.setParagraph,"set-text-background-color":t.setTextBackgroundColor,"set-text-color":t.setTextColor,"unset-text-background-color":t.unsetTextBackgroundColor,"unset-text-color":t.unsetTextColor}}),t._v(" "),t.isTableNodeSelected&&t.tableToolbarStyle?n("tiptap-editor-table-toolbar",{ref:"tableToolbar",style:t.tableToolbarStyle,attrs:{"is-command-available":t.canRunTableCommand,"is-command-active":t.isTableCommandActive,"current-cell-background-color":t.currentTableCellBackgroundColor},on:{"set-table-cell-background-color":t.setTableCellBackgroundColor,"unset-table-cell-background-color":t.unsetTableCellBackgroundColor,"run-table-command":t.runTableCommand}}):t._e(),t._v(" "),t.isImageSelected&&!t.isHeroImageSelected&&t.imageResizeHandleStyle?n("button",{staticClass:"dte-image-resize-handle",style:t.imageResizeHandleStyle,attrs:{type:"button","aria-label":t.$t("Resize image")},on:{mousedown:function(e){return e.preventDefault(),t.startImageResize(e)}}},[n("i",{staticClass:"far fa-expand",attrs:{"aria-hidden":"true"}})]):t._e(),t._v(" "),n("editor-content",{ref:"content",staticClass:"dte-content",style:{minHeight:t.minHeight+"px"},attrs:{editor:t.editor}}),t._v(" "),n(t.imageDialogComponent,{tag:"component",attrs:{"image-form":t.imageForm,"image-source-mode":t.imageSourceMode,"image-upload-headers":t.imageUploadHeaders,"image-upload-url":t.imageUploadUrl,"upload-category":t.uploadCategory},on:{close:t.closeImageDialog,"submit-url":t.submitImageUrl,"update:image-form":t.updateImageForm,"update:imageSourceMode":t.updateImageSourceMode,"upload-error":t.handleImagePickerUploadError,"upload-success":t.handleImagePickerUploadSuccess},model:{value:t.imageDialogVisible,callback:function(e){t.imageDialogVisible=e},expression:"imageDialogVisible"}})],1)}),[],!1,null,null,null));e.a=j.exports},ccE7:function(t,e,n){var i=n("Ojgd"),r=n("Jes0");t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),l=i(n),c=a.length;return l<0||l>=c?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}}},cdid:function(t,e,n){"use strict";n.d(e,"a",(function(){return Yt}));var i=n("GtT5");var r=(t,e)=>{if("slot"===t)return 0;if(t instanceof Function)return t(e);const{children:n,...i}=null!=e?e:{};if("svg"===t)throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,i,n]},o=/^\s*>\s$/,s=i.d.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return r("blockquote",{...Object(i.A)(this.options.HTMLAttributes,t),children:r("slot",{})})},parseMarkdown:(t,e)=>{var n;const i=null!=(n=e.parseBlockChildren)?n:e.parseChildren;return e.createNode("blockquote",void 0,i(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=[];return t.content.forEach((t,i)=>{var r,o;const s=(null!=(o=null==(r=e.renderChild)?void 0:r.call(e,t,i))?o:e.renderChildren([t])).split("\n").map(t=>""===t.trim()?">":"> "+t);n.push(s.join("\n"))}),n.join("\n>\n")},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Object(i.H)({find:o,type:this.type})]}}),a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,u=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,d=i.c.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return r("strong",{...Object(i.A)(this.options.HTMLAttributes,t),children:r("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Object(i.y)({find:a,type:this.type}),Object(i.y)({find:c,type:this.type})]},addPasteRules(){return[Object(i.z)({find:l,type:this.type}),Object(i.z)({find:u,type:this.type})]}}),p=/(^|[^`])`([^`]+)`(?!`)$/,h=/(^|[^`])`([^`]+)`(?!`)/g,f=i.c.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",Object(i.A)(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Object(i.y)({find:p,type:this.type})]},addPasteRules(){return[Object(i.z)({find:h,type:this.type})]}}),m=n("usTV"),g=/^```([a-z]+)?[\s\n]$/,v=/^~~~([a-z]+)?[\s\n]$/,y=i.d.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...(null==(e=t.firstElementChild)?void 0:e.classList)||[]].filter(t=>t.startsWith(n)).map(t=>t.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",Object(i.A)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,i;return!1===(null==(n=t.raw)?void 0:n.startsWith("```"))&&!1===(null==(i=t.raw)?void 0:i.startsWith("~~~"))&&"indented"!==t.codeBlockStyle?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let i="";const r=(null==(n=t.attrs)?void 0:n.language)||"";if(t.content){i=["```"+r,e.renderChildren(t.content),"```"].join("\n")}else i=`\`\`\`${r}\n\n\`\`\``;return i},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&(!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes())},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=null!=(e=this.options.tabSize)?e:4,{state:i}=t,{selection:r}=i,{$from:o,empty:s}=r;if(o.parent.type!==this.type)return!1;const a=" ".repeat(n);return s?t.commands.insertContent(a):t.commands.command(({tr:t})=>{const{from:e,to:n}=r,o=i.doc.textBetween(e,n,"\n","\n").split("\n").map(t=>a+t).join("\n");return t.replaceWith(e,n,i.schema.text(o)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=null!=(e=this.options.tabSize)?e:4,{state:i}=t,{selection:r}=i,{$from:o,empty:s}=r;return o.parent.type===this.type&&(s?t.commands.command(({tr:t})=>{var e;const{pos:r}=o,s=o.start(),a=o.end(),l=i.doc.textBetween(s,a,"\n","\n").split("\n");let c=0,u=0;const d=r-s;for(let t=0;t=d){c=t;break}u+=l[t].length+1}const p=(null==(e=l[c].match(/^ */))?void 0:e[0])||"",h=Math.min(p.length,n);if(0===h)return!0;let f=s;for(let t=0;t{const{from:e,to:o}=r,s=i.doc.textBetween(e,o,"\n","\n").split("\n").map(t=>{var e;const i=(null==(e=t.match(/^ */))?void 0:e[0])||"",r=Math.min(i.length,n);return t.slice(r)}).join("\n");return t.replaceWith(e,o,i.schema.text(s)),!0}))},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&t.chain().command(({tr:t})=>(t.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:i}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;if(!(r.parentOffset===r.parent.nodeSize-2))return!1;const s=r.after();if(void 0===s)return!1;return i.nodeAt(s)?t.commands.command(({tr:t})=>(t.setSelection(m.Selection.near(i.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[Object(i.G)({find:g,type:this.type,getAttributes:t=>({language:t[1]})}),Object(i.G)({find:v,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new m.Plugin({key:new m.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),i=e.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,o=null==r?void 0:r.mode;if(!n||!o)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(m.TextSelection.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),b=i.d.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n\n"):""}),_=i.d.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",Object(i.A)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",renderMarkdown:()=>" \n",parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:i})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:t,storedMarks:r}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,a=r||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&a&&o){const e=a.filter(t=>s.includes(t.type.name));t.ensureMarks(e)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),x=i.d.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(t=>({tag:"h"+t,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return["h"+(this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]),Object(i.A)(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const i=(null==(n=t.attrs)?void 0:n.level)?parseInt(t.attrs.level,10):1,r="#".repeat(i);return t.content?`${r} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,["Mod-Alt-"+e]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Object(i.G)({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),w=i.d.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",Object(i.A)(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!Object(i.g)(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,o=t();return Object(i.x)(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:t,tr:e,dispatch:n})=>{if(n){const{$to:n}=e.selection,i=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?e.setSelection(m.TextSelection.create(e.doc,n.pos+1)):n.nodeAfter.isBlock?e.setSelection(m.NodeSelection.create(e.doc,n.pos)):e.setSelection(m.TextSelection.create(e.doc,n.pos));else{const r=t.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=null==r?void 0:r.create();o&&(e.insert(i,o),e.setSelection(m.TextSelection.create(e.doc,i+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Object(i.B)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),k=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,C=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,S=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,E=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,T=i.c.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Object(i.A)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"",close:""}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Object(i.y)({find:k,type:this.type}),Object(i.y)({find:S,type:this.type})]},addPasteRules(){return[Object(i.z)({find:C,type:this.type}),Object(i.z)({find:E,type:this.type})]}});function A(t,e){return t in e||(e[t]=[]),e[t]}function M(t,e,n){e.numeric&&(e.asciinumeric=!0,e.alphanumeric=!0),e.ascii&&(e.asciinumeric=!0,e.alpha=!0),e.asciinumeric&&(e.alphanumeric=!0),e.alpha&&(e.alphanumeric=!0),e.alphanumeric&&(e.domain=!0),e.emoji&&(e.domain=!0);for(const i in e){const e=A(i,n);e.indexOf(t)<0&&e.push(t)}}function P(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}P.groups={},P.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let n=0;n=0&&(n[i]=!0);return n}(s.t,i),n),i)}else n&&M(o,n,i);s.t=o}return r.j[t]=s,s}};const O=(t,e,n,i,r)=>t.ta(e,n,i,r),D=(t,e,n,i,r)=>t.tr(e,n,i,r),I=(t,e,n,i,r)=>t.ts(e,n,i,r),$=(t,e,n,i,r)=>t.tt(e,n,i,r),N="WORD",F="AT",R="COLON",L="DOT",j="HYPHEN",B="SLASH";var V=Object.freeze({__proto__:null,ALPHANUMERICAL:"ALPHANUMERICAL",AMPERSAND:"AMPERSAND",APOSTROPHE:"APOSTROPHE",ASCIINUMERICAL:"ASCIINUMERICAL",ASTERISK:"ASTERISK",AT:F,BACKSLASH:"BACKSLASH",BACKTICK:"BACKTICK",CARET:"CARET",CLOSEANGLEBRACKET:"CLOSEANGLEBRACKET",CLOSEBRACE:"CLOSEBRACE",CLOSEBRACKET:"CLOSEBRACKET",CLOSEPAREN:"CLOSEPAREN",COLON:R,COMMA:"COMMA",DOLLAR:"DOLLAR",DOT:L,EMOJI:"EMOJI",EQUALS:"EQUALS",EXCLAMATION:"EXCLAMATION",FULLWIDTHGREATERTHAN:"FULLWIDTHGREATERTHAN",FULLWIDTHLEFTPAREN:"FULLWIDTHLEFTPAREN",FULLWIDTHLESSTHAN:"FULLWIDTHLESSTHAN",FULLWIDTHMIDDLEDOT:"FULLWIDTHMIDDLEDOT",FULLWIDTHRIGHTPAREN:"FULLWIDTHRIGHTPAREN",HYPHEN:j,LEFTCORNERBRACKET:"LEFTCORNERBRACKET",LEFTWHITECORNERBRACKET:"LEFTWHITECORNERBRACKET",LOCALHOST:"LOCALHOST",NL:"NL",NUM:"NUM",OPENANGLEBRACKET:"OPENANGLEBRACKET",OPENBRACE:"OPENBRACE",OPENBRACKET:"OPENBRACKET",OPENPAREN:"OPENPAREN",PERCENT:"PERCENT",PIPE:"PIPE",PLUS:"PLUS",POUND:"POUND",QUERY:"QUERY",QUOTE:"QUOTE",RIGHTCORNERBRACKET:"RIGHTCORNERBRACKET",RIGHTWHITECORNERBRACKET:"RIGHTWHITECORNERBRACKET",SCHEME:"SCHEME",SEMI:"SEMI",SLASH:B,SLASH_SCHEME:"SLASH_SCHEME",SYM:"SYM",TILDE:"TILDE",TLD:"TLD",UNDERSCORE:"UNDERSCORE",UTLD:"UTLD",UWORD:"UWORD",WORD:N,WS:"WS"});const z=/[a-z]/,H=/\p{L}/u,W=/\p{Emoji}/u,G=/\d/,q=/\s/;let U=null,K=null;function J(t,e){const n=function(t){const e=[],n=t.length;let i=0;for(;i56319||i+1===n||(r=t.charCodeAt(i+1))<56320||r>57343?t[i]:t.slice(i,i+2);e.push(s),i+=s.length}return e}(e.replace(/[A-Z]/g,t=>t.toLowerCase())),i=n.length,r=[];let o=0,s=0;for(;s=0&&(d+=n[s].length,p++),c+=n[s].length,o+=n[s].length,s++;o-=d,s-=p,c-=d,r.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return r}function Y(t,e,n,i,r){let o;const s=e.length;for(let n=0;n=0;)r++;if(r>0){e.push(n.join(""));for(let e=parseInt(t.substring(i,i+r),10);e>0;e--)n.pop();i+=r}else n.push(t[i]),i++}return e}const Q={defaultProtocol:"http",events:null,format:tt,formatHref:tt,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Z(t,e=null){let n=Object.assign({},Q);t&&(n=Object.assign(n,t instanceof Z?t.o:t));const i=n.ignoreTags,r=[];for(let t=0;tt,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const i=null!=e;let r=this.o[t];return r?("object"==typeof r?(r=n.t in r?r[n.t]:Q[t],"function"==typeof r&&i&&(r=r(e,n))):"function"==typeof r&&i&&(r=r(e,n.t,n)),r):r},getObj(t,e,n){let i=this.o[t];return"function"==typeof i&&null!=e&&(i=i(e,n.t,n)),i},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function et(t,e){this.t="token",this.v=t,this.tk=e}function nt(t,e){class n extends et{constructor(e,n){super(e,n),this.t=t}}for(const t in e)n.prototype[t]=e[t];return n.t=t,n}et.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),i=t.get("format",e,this);return n&&i.length>n?i.substring(0,n)+"…":i},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Q.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",e,this),i=t.get("tagName",e,this),r=this.toFormattedString(t),o={},s=t.get("className",e,this),a=t.get("target",e,this),l=t.get("rel",e,this),c=t.getObj("attributes",e,this),u=t.getObj("events",e,this);return o.href=n,s&&(o.class=s),a&&(o.target=a),l&&(o.rel=l),c&&Object.assign(o,c),{tagName:i,attributes:o,content:r,eventListeners:u}}};const it=nt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),rt=nt("text"),ot=nt("nl"),st=nt("url",{isLink:!0,toHref(t=Q.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&"LOCALHOST"!==t[0].t&&t[1].t===R}});const at=t=>new P(t);function lt(t,e,n){const i=n[0].s,r=n[n.length-1].e;return new t(e.slice(i,r),n)}const ct="undefined"!=typeof console&&console&&console.warn||(()=>{}),ut="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",dt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function pt(t,e=!1){if(dt.initialized&&ct(`linkifyjs: already initialized - will not register custom scheme "${t}" ${ut}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');dt.customSchemes.push([t,e])}function ht(){dt.scanner=function(t=[]){const e={};P.groups=e;const n=new P;null==U&&(U=X("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==K&&(K=X("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2")),$(n,"'","APOSTROPHE"),$(n,"{","OPENBRACE"),$(n,"}","CLOSEBRACE"),$(n,"[","OPENBRACKET"),$(n,"]","CLOSEBRACKET"),$(n,"(","OPENPAREN"),$(n,")","CLOSEPAREN"),$(n,"<","OPENANGLEBRACKET"),$(n,">","CLOSEANGLEBRACKET"),$(n,"(","FULLWIDTHLEFTPAREN"),$(n,")","FULLWIDTHRIGHTPAREN"),$(n,"「","LEFTCORNERBRACKET"),$(n,"」","RIGHTCORNERBRACKET"),$(n,"『","LEFTWHITECORNERBRACKET"),$(n,"』","RIGHTWHITECORNERBRACKET"),$(n,"<","FULLWIDTHLESSTHAN"),$(n,">","FULLWIDTHGREATERTHAN"),$(n,"&","AMPERSAND"),$(n,"*","ASTERISK"),$(n,"@",F),$(n,"`","BACKTICK"),$(n,"^","CARET"),$(n,":",R),$(n,",","COMMA"),$(n,"$","DOLLAR"),$(n,".",L),$(n,"=","EQUALS"),$(n,"!","EXCLAMATION"),$(n,"-",j),$(n,"%","PERCENT"),$(n,"|","PIPE"),$(n,"+","PLUS"),$(n,"#","POUND"),$(n,"?","QUERY"),$(n,'"',"QUOTE"),$(n,"/",B),$(n,";","SEMI"),$(n,"~","TILDE"),$(n,"_","UNDERSCORE"),$(n,"\\","BACKSLASH"),$(n,"・","FULLWIDTHMIDDLEDOT");const i=D(n,G,"NUM",{numeric:!0});D(i,G,i);const r=D(i,z,"ASCIINUMERICAL",{asciinumeric:!0}),o=D(i,H,"ALPHANUMERICAL",{alphanumeric:!0}),s=D(n,z,N,{ascii:!0});D(s,G,r),D(s,z,s),D(r,G,r),D(r,z,r);const a=D(n,H,"UWORD",{alpha:!0});D(a,z),D(a,G,o),D(a,H,a),D(o,G,o),D(o,z),D(o,H,o);const l=$(n,"\n","NL",{whitespace:!0}),c=$(n,"\r","WS",{whitespace:!0}),u=D(n,q,"WS",{whitespace:!0});$(n,"",u),$(c,"\n",l),$(c,"",u),D(c,q,u),$(u,"\r"),$(u,"\n"),D(u,q,u),$(u,"",u);const d=D(n,W,"EMOJI",{emoji:!0});$(d,"#"),D(d,W,d),$(d,"️",d);const p=$(d,"‍");$(p,"#"),D(p,W,d);const h=[[z,s],[G,r]],f=[[z,null],[H,a],[G,o]];for(let t=0;tt[0]>e[0]?1:-1);for(let e=0;e=0?r.domain=!0:z.test(i)?G.test(i)?r.asciinumeric=!0:r.ascii=!0:r.numeric=!0,I(n,i,i,r)}return I(n,"localhost","LOCALHOST",{ascii:!0}),n.jd=new P("SYM"),{start:n,tokens:Object.assign({groups:e},V)}}(dt.customSchemes);for(let t=0;t=0&&p++,r++,u++;if(p<0)r-=u,r0&&(o.push(lt(rt,e,s)),s=[]),r-=p,u-=p;const t=d.t,i=n.slice(r-u,r);o.push(lt(t,e,i))}}return s.length>0&&o.push(lt(rt,e,s)),o}(dt.parser.start,t,J(dt.scanner.start,t))}function mt(t,e=null,n=null){if(e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const i=new Z(n),r=ft(t),o=[];for(let t=0;t{const e="string"==typeof t?t:t.scheme;e&&n.push(e)}),!t||t.replace(yt,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var _t=i.c.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{"string"!=typeof t?pt(t.scheme,t.optionalSlashes):pt(t)})},onDestroy(){P.groups={},dt.scanner=null,dt.parser=null,dt.tokenQueue=[],dt.pluginQueue=[],dt.customSchemes=[],dt.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!bt(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const i=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(i)&&!!/\./.test(i)}}),addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!(!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!bt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:t=>!!bt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Object(i.A)(this.options.HTMLAttributes,t),0]:["a",Object(i.A)(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,i,r,o;const s=null!=(i=null==(n=t.attrs)?void 0:n.href)?i:"",a=null!=(o=null==(r=t.attrs)?void 0:r.title)?o:"",l=e.renderChildren(t);return a?`[${l}](${s} "${a}")`:`[${l}](${s})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return!!this.options.isAllowedUri(n,{defaultValidate:t=>!!bt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&e().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return!(n&&!this.options.isAllowedUri(n,{defaultValidate:t=>!!bt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Object(i.z)({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:i}=this.options,r=mt(t).filter(t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!bt(t,n),protocols:n,defaultProtocol:i}));r.length&&r.forEach(t=>{this.options.shouldAutoLink(t.value)&&e.push({text:t.value,data:{href:t.href},index:t.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:null==(e=t.data)?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;var r;return this.options.autolink&&t.push((r={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!bt(t,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink},new m.Plugin({key:new m.PluginKey("autolink"),appendTransaction:(t,e,n)=>{const o=t.some(t=>t.docChanged)&&!e.doc.eq(n.doc),s=t.some(t=>t.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=n,l=Object(i.i)(e.doc,[...t]);return Object(i.n)(l).forEach(({newRange:t})=>{const e=Object(i.k)(n.doc,t,t=>t.isTextblock);let o,s;if(e.length>1)o=e[0],s=n.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ");else if(e.length){const i=n.doc.textBetween(t.from,t.to," "," ");if(!vt.test(i))return;o=e[0],s=n.doc.textBetween(o.pos,t.to,void 0," ")}if(o&&s){const t=s.split(gt).filter(Boolean);if(t.length<=0)return!1;const e=t[t.length-1],c=o.pos+s.lastIndexOf(e);if(!e)return!1;const u=ft(e).map(t=>t.toObject(r.defaultProtocol));if(!(1===(l=u).length?l[0].isLink:3===l.length&&l[1].isLink&&["()","[]"].includes(l[0].value+l[2].value)))return!1;u.filter(t=>t.isLink).map(t=>({...t,from:c+t.start+1,to:c+t.end+1})).filter(t=>!n.schema.marks.code||!n.doc.rangeHasMark(t.from,t.to,n.schema.marks.code)).filter(t=>r.validate(t.value)).filter(t=>r.shouldAutoLink(t.value)).forEach(t=>{Object(i.p)(t.from,t.to,n.doc).some(t=>t.mark.type===r.type)||a.addMark(t.from,t.to,r.type.create({href:t.href}))})}var l}),a.steps.length?a:void 0}}))),t.push(function(t){return new m.Plugin({key:new m.PluginKey("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(0!==r.button)return!1;if(!e.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const e=r.target;if(!e)return!1;const n=t.editor.view.dom;a=e.closest("a"),a&&!n.contains(a)&&(a=null)}if(!a)return!1;let l=!1;if(t.enableClickSelection){l=t.editor.commands.extendMarkRange(t.type.name)}if(t.openOnClick){const n=Object(i.m)(e.state,t.type.name),r=null!=(o=a.href)?o:n.href,c=null!=(s=a.target)?s:n.target;r&&(window.open(r,c),l=!0)}return l}}})}({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(function(t){return new m.Plugin({key:new m.PluginKey("handlePasteLink"),props:{handlePaste:(e,n,i)=>{const{shouldAutoLink:r}=t,{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";i.content.forEach(t=>{l+=t.textContent});const c=mt(l,{defaultProtocol:t.defaultProtocol}).find(t=>t.isLink&&t.value===l);return!(!l||!c||void 0!==r&&!r(c.value))&&t.editor.commands.setMark(t.type,{href:c.href})}}})}({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),xt=Object.defineProperty,wt=/^\s*([-+*])\s$/,kt=i.d.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return this.options.itemTypeName+"+"},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",Object(i.A)(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>"list"!==t.type||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes("textStyle")).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Object(i.H)({find:wt,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Object(i.H)({find:wt,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes("textStyle"),editor:this.editor})),[t]}}),Ct=i.d.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",Object(i.A)(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if("list_item"!==t.type)return[];const i=null!=(n=e.parseBlockChildren)?n:e.parseChildren;let r=[];if(t.tokens&&t.tokens.length>0){if(t.tokens.some(t=>"paragraph"===t.type))r=i(t.tokens);else{const n=t.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(r=[{type:"paragraph",content:e.parseInline(n.tokens)}],t.tokens.length>1){const e=i(t.tokens.slice(1));r.push(...e)}}else r=i(t.tokens)}}return 0===r.length&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(t,e,n)=>Object(i.E)(t,e,t=>{var e,n;if("bulletList"===t.parentType)return"- ";if("orderedList"===t.parentType){return((null==(n=null==(e=t.meta)?void 0:e.parentAttrs)?void 0:n.start)||1)+t.index+". "}return"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});((t,e)=>{for(var n in e)xt(t,n,{get:e[n],enumerable:!0})})({},{findListItemPos:()=>St,getNextListDepth:()=>Et,handleBackspace:()=>Pt,handleDelete:()=>It,hasListBefore:()=>Tt,hasListItemAfter:()=>$t,hasListItemBefore:()=>At,listItemHasSubList:()=>Mt,nextListIsDeeper:()=>Ot,nextListIsHigher:()=>Dt});var St=(t,e)=>{const{$from:n}=e.selection,r=Object(i.r)(t,e.schema);let o=null,s=n.depth,a=n.pos,l=null;for(;s>0&&null===l;)o=n.node(s),o.type===r?l=s:(s-=1,a-=1);return null===l?null:{$pos:e.doc.resolve(a),depth:l}},Et=(t,e)=>{const n=St(t,e);if(!n)return!1;const[,r]=Object(i.q)(e,t,n.$pos.pos+4);return r},Tt=(t,e,n)=>{const{$anchor:i}=t.selection,r=Math.max(0,i.pos-2),o=t.doc.resolve(r).node();return!(!o||!n.includes(o.type.name))},At=(t,e)=>{var n;const{$anchor:i}=e.selection,r=e.doc.resolve(i.pos-2);return 0!==r.index()&&(null==(n=r.nodeBefore)?void 0:n.type.name)===t},Mt=(t,e,n)=>{if(!n)return!1;const r=Object(i.r)(t,e.schema);let o=!1;return n.descendants(t=>{t.type===r&&(o=!0)}),o},Pt=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Object(i.v)(t.state,e)&&Tt(t.state,e,n)){const{$anchor:n}=t.state.selection,i=t.state.doc.resolve(n.before()-1),r=[];i.node().descendants((t,n)=>{t.type.name===e&&r.push({node:t,pos:n})});const o=r.at(-1);if(!o)return!1;const s=t.state.doc.resolve(i.start()+o.pos+1);return t.chain().cut({from:n.start()-1,to:n.end()+1},s.end()).joinForward().run()}if(!Object(i.v)(t.state,e))return!1;if(!Object(i.u)(t.state))return!1;const r=St(e,t.state);if(!r)return!1;const o=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=Mt(e,t.state,o);return At(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},Ot=(t,e)=>{const n=Et(t,e),i=St(t,e);return!(!i||!n)&&n>i.depth},Dt=(t,e)=>{const n=Et(t,e),i=St(t,e);return!(!i||!n)&&n{if(!Object(i.v)(t.state,e))return!1;if(!Object(i.t)(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:o}=n;return!(!n.empty&&r.sameParent(o))&&(Ot(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Dt(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward())},$t=(t,e)=>{var n;const{$anchor:i}=e.selection,r=e.doc.resolve(i.pos-i.parentOffset-2);return r.index()!==r.parent.childCount-1&&(null==(n=r.nodeAfter)?void 0:n.type.name)===t},Nt=i.b.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==t.state.schema.nodes[n]&&It(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==t.state.schema.nodes[n]&&It(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:i})=>{void 0!==t.state.schema.nodes[n]&&Pt(t,n,i)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:i})=>{void 0!==t.state.schema.nodes[n]&&Pt(t,n,i)&&(e=!0)}),e}}}}),Ft=/^(\s*)(\d+)\.\s+(.*)$/,Rt=/^\s/;var Lt=/^(\d+)\.\s$/,jt=i.d.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return this.options.itemTypeName+"+"},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",Object(i.A)(this.options.HTMLAttributes,n),0]:["ol",Object(i.A)(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if("list"!==t.type||!t.ordered)return[];const n=t.start||1,i=t.items?function(t,e){return t.map(t=>{if("list_item"!==t.type)return e.parseChildren([t])[0];const n=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(t=>{if("paragraph"===t.type||"list"===t.type||"blockquote"===t.type||"code"===t.type)n.push(...e.parseChildren([t]));else if("text"===t.type&&t.tokens){const i=e.parseChildren([t]);n.push({type:"paragraph",content:i})}else{const i=e.parseChildren([t]);i.length>0&&n.push(...i)}}),{type:"listItem",content:n}})}(t.items,e):[];return 1!==n?{type:"orderedList",attrs:{start:n},content:i}:{type:"orderedList",content:i}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=null==e?void 0:e.index;return void 0!==n?n:-1},tokenize:(t,e,n)=>{var i;const r=t.split("\n"),[o,s]=function(t){const e=[];let n=0,i=0;for(;nn;)h.push(e[p]),p+=1;if(h.length>0){const e=Math.min(...h.map(t=>t.indent)),n=t(h,e,i);u.push({type:"list",ordered:!0,start:h[0].number,items:n,raw:h.map(t=>t.raw).join("\n")})}o.push({type:"list_item",raw:a.raw,tokens:u}),s=p}else s+=1}return o}(o,0,n);if(0===a.length)return;return{type:"list",ordered:!0,start:(null==(i=o[0])?void 0:i.number)||1,items:a,raw:r.slice(0,s).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes("textStyle")).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Object(i.H)({find:Lt,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Object(i.H)({find:Lt,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes("textStyle")}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),Bt=/^\s*(\[([( |x])?\])\s$/,Vt=i.d.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return""===e||"true"===e},renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Object(i.A)(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const i=e.parseChildren(t.nestedTokens);n.push(...i)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const r=`- [${(null==(n=t.attrs)?void 0:n.checked)?"x":" "}] `;return Object(i.E)(t,e,r)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),c=document.createElement("div"),u=t=>{var e,n;l.ariaLabel=(null==(n=null==(e=this.options.a11y)?void 0:e.checkboxLabel)?void 0:n.call(e,t,l.checked))||"Task item checkbox for "+(t.textContent||"empty task item")};u(t),s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",t=>t.preventDefault()),l.addEventListener("change",e=>{if(!r.isEditable&&!this.options.onReadOnlyChecked)return void(l.checked=!l.checked);const{checked:i}=e.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:t})=>{const e=n();if("number"!=typeof e)return!1;const r=t.doc.nodeAt(e);return t.setNodeMarkup(e,void 0,{...null==r?void 0:r.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,i)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([t,e])=>{o.setAttribute(t,e)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,s.append(l,a),o.append(s,c),Object.entries(e).forEach(([t,e])=>{o.setAttribute(t,e)});let d=new Set(Object.keys(e));return{dom:o,contentDOM:c,update:t=>{if(t.type!==this.type)return!1;o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,u(t);const e=r.extensionManager.attributes,n=Object(i.s)(t,e),s=new Set(Object.keys(n)),a=this.options.HTMLAttributes;return d.forEach(t=>{s.has(t)||(t in a?o.setAttribute(t,a[t]):o.removeAttribute(t))}),Object.entries(n).forEach(([t,e])=>{null==e?t in a?o.setAttribute(t,a[t]):o.removeAttribute(t):o.setAttribute(t,e)}),d=s,!0}}}},addInputRules(){return[Object(i.H)({find:Bt,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),zt=i.d.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return this.options.itemTypeName+"+"},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Object(i.A)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=null==(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:e.index;return void 0!==n?n:-1},tokenize(t,e,n){const r=t=>{const e=Object(i.D)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:r},n);return e?[{type:"taskList",raw:e.raw,items:e.items}]:n.blockTokens(t)},o=Object(i.D)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Ht=(i.b.create({name:"listKit",addExtensions(){const t=[];return!1!==this.options.bulletList&&t.push(kt.configure(this.options.bulletList)),!1!==this.options.listItem&&t.push(Ct.configure(this.options.listItem)),!1!==this.options.listKeymap&&t.push(Nt.configure(this.options.listKeymap)),!1!==this.options.orderedList&&t.push(jt.configure(this.options.orderedList)),!1!==this.options.taskItem&&t.push(Vt.configure(this.options.taskItem)),!1!==this.options.taskList&&t.push(zt.configure(this.options.taskList)),t}}),i.d.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",Object(i.A)(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(1===n.length&&"image"===n[0].type)return e.parseChildren([n[0]]);const i=e.parseInline(n);return!(1===n.length&&"text"===n[0].type&&(" "===n[0].raw||" "===n[0].text||" "===n[0].raw||" "===n[0].text))||1!==i.length||"text"!==i[0].type||" "!==i[0].text&&" "!==i[0].text?e.createNode("paragraph",void 0,i):e.createNode("paragraph",void 0,[])},renderMarkdown:(t,e,n)=>{var i,r;if(!t)return"";const o=Array.isArray(t.content)?t.content:[];if(0===o.length){const t=Array.isArray(null==(i=null==n?void 0:n.previousNode)?void 0:i.content)?n.previousNode.content:[];return"paragraph"===(null==(r=null==n?void 0:n.previousNode)?void 0:r.type)&&0===t.length?" ":""}return e.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})),Wt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Gt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,qt=i.c.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",Object(i.A)(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Object(i.y)({find:Wt,type:this.type})]},addPasteRules(){return[Object(i.z)({find:Gt,type:this.type})]}}),Ut=i.d.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Kt=i.c.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",Object(i.A)(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown:(t,e)=>`++${e.renderChildren(t)}++`,markdownTokenizer:{name:"underline",level:"inline",start:t=>t.indexOf("++"),tokenize(t,e,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!i)return;const r=i[2].trim();return{type:"underline",raw:i[0],text:r,tokens:n.inlineTokens(r)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Jt=n("0DQi"),Yt=i.b.create({name:"starterKit",addExtensions(){var t,e,n,i;const r=[];return!1!==this.options.bold&&r.push(d.configure(this.options.bold)),!1!==this.options.blockquote&&r.push(s.configure(this.options.blockquote)),!1!==this.options.bulletList&&r.push(kt.configure(this.options.bulletList)),!1!==this.options.code&&r.push(f.configure(this.options.code)),!1!==this.options.codeBlock&&r.push(y.configure(this.options.codeBlock)),!1!==this.options.document&&r.push(b.configure(this.options.document)),!1!==this.options.dropcursor&&r.push(Jt.a.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&r.push(Jt.b.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&r.push(_.configure(this.options.hardBreak)),!1!==this.options.heading&&r.push(x.configure(this.options.heading)),!1!==this.options.undoRedo&&r.push(Jt.e.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&r.push(w.configure(this.options.horizontalRule)),!1!==this.options.italic&&r.push(T.configure(this.options.italic)),!1!==this.options.listItem&&r.push(Ct.configure(this.options.listItem)),!1!==this.options.listKeymap&&r.push(Nt.configure(null==(t=this.options)?void 0:t.listKeymap)),!1!==this.options.link&&r.push(_t.configure(null==(e=this.options)?void 0:e.link)),!1!==this.options.orderedList&&r.push(jt.configure(this.options.orderedList)),!1!==this.options.paragraph&&r.push(Ht.configure(this.options.paragraph)),!1!==this.options.strike&&r.push(qt.configure(this.options.strike)),!1!==this.options.text&&r.push(Ut.configure(this.options.text)),!1!==this.options.underline&&r.push(Kt.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&r.push(Jt.d.configure(null==(i=this.options)?void 0:i.trailingNode)),r}})},cg3e:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReCaptchaInstance=e.getInstance=e.load=void 0;var i=n("//vW");Object.defineProperty(e,"load",{enumerable:!0,get:function(){return i.load}}),Object.defineProperty(e,"getInstance",{enumerable:!0,get:function(){return i.getInstance}});var r=n("s+AW");Object.defineProperty(e,"ReCaptchaInstance",{enumerable:!0,get:function(){return r.ReCaptchaInstance}})},d7ep:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isInteger=void 0;e.isInteger=t=>{if("number"!=typeof t||!Number.isInteger(t))return"value should be an integer"}},dVTT:function(t,e,n){n("aPfg")("Map")},dl0q:function(t,e,n){n("Zxgi")("observable")},eUtF:function(t,e,n){t.exports=!n("jmDH")&&!n("KUxP")((function(){return 7!=Object.defineProperty(n("Hsns")("div"),"a",{get:function(){return 7}}).a}))},eaoh:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},f03z:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t){for(var e=1,n=arguments.length;e ',api_key:"none_auth",selected:!1},{key:"stripe",name:this.$t("Credit Card"),html:'',selected:!0}]}},mounted:function(){this.getList()},computed:{isVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},title:function(){return this.item?"Buy "+this.numberWithCommas(this.item.coins)+" "+this.plural("Coin",this.item.coins)+"!":""}},methods:{getList:function(){var t=this;this.$http.Get("/v1/payment/coins",{},(function(e){t.items=e}))},selectPaymentMethod:function(t){if(!this.loading)for(var e=0;el;)i.f(t,n=s[l++],e[n]);return t}},g33z:function(t,e,n){"use strict";var i=n("Wu5q"),r=n("n3ko");t.exports=n("raTm")("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=i.getEntry(r(this,"Map"),t);return e&&e.v},set:function(t,e){return i.def(r(this,"Map"),0===t?0:t,e)}},i,!0)},g4zJ:function(t,e,n){"use strict";n.r(e),n.d(e,"addListNodes",(function(){return h})),n.d(e,"bulletList",(function(){return u})),n.d(e,"liftListItem",(function(){return y})),n.d(e,"listItem",(function(){return d})),n.d(e,"orderedList",(function(){return c})),n.d(e,"sinkListItem",(function(){return b})),n.d(e,"splitListItem",(function(){return g})),n.d(e,"splitListItemKeepMarks",(function(){return v})),n.d(e,"wrapInList",(function(){return f})),n.d(e,"wrapRangeInList",(function(){return m}));var i=n("uSMm"),r=n("byeC"),o=n("b/sn");const s=["ol",0],a=["ul",0],l=["li",0],c={attrs:{order:{default:1,validate:"number"}},parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1==t.attrs.order?s:["ol",{start:t.attrs.order},0]},u={parseDOM:[{tag:"ul"}],toDOM:()=>a},d={parseDOM:[{tag:"li"}],toDOM:()=>l,defining:!0};function p(t,e){let n={};for(let e in t)n[e]=t[e];for(let t in e)n[t]=e[t];return n}function h(t,e,n){return t.append({ordered_list:p(c,{content:"list_item+",group:n}),bullet_list:p(u,{content:"list_item+",group:n}),list_item:p(d,{content:e})})}function f(t,e=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o);if(!s)return!1;let a=i?n.tr:null;return!!m(a,s,t,e)&&(i&&i(a.scrollIntoView()),!0)}}function m(t,e,n,o=null){let s=!1,a=e,l=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&0==e.startIndex){if(0==e.$from.index(e.depth-1))return!1;let t=l.resolve(e.start-2);a=new r.NodeRange(t,t,e.depth),e.endIndex=0;t--)a=r.Fragment.from(n[t].type.create(n[t].attrs,a));t.step(new i.ReplaceAroundStep(e.start-(o?2:0),e.end,e.start,e.end,new r.Slice(a,0,0),n.length,!0));let l=0;for(let t=0;t=a.depth-3;t--)e=r.Fragment.from(a.node(t).copy(e));let l=a.indexAfter(-1){if(d>-1)return!1;t.isTextblock&&0==t.content.size&&(d=e+1)}),d>-1&&u.setSelection(o.Selection.near(u.doc.resolve(d))),s(u.scrollIntoView())}return!0}let d=l.pos==a.end()?u.contentMatchAt(0).defaultType:null,p=n.tr.delete(a.pos,l.pos),h=d?[e?{type:t,attrs:e}:null,{type:d}]:void 0;return!!Object(i.canSplit)(p.doc,a.pos,2,h)&&(s&&s(p.split(a.pos,2,h).scrollIntoView()),!0)}}function v(t,e){let n=g(t,e);return(t,e)=>n(t,e&&(n=>{let i=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();i&&n.ensureMarks(i),e(n)}))}function y(t){return function(e,n){let{$from:o,$to:s}=e.selection,a=o.blockRange(s,e=>e.childCount>0&&e.firstChild.type==t);return!!a&&(!n||(o.node(a.depth-1).type==t?function(t,e,n,o){let s=t.tr,a=o.end,l=o.$to.end(o.depth);ai;e--)t-=s.child(e).nodeSize,o.delete(t-1,t+1);let a=o.doc.resolve(n.start),l=a.nodeAfter;if(o.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,u=n.endIndex==s.childCount,d=a.node(-1),p=a.index(-1);if(!d.canReplace(p+(c?0:1),p+1,l.content.append(u?r.Fragment.empty:r.Fragment.from(s))))return!1;let h=a.pos,f=h+l.nodeSize;return o.step(new i.ReplaceAroundStep(h-(c?1:0),f+(u?1:0),h+1,f-1,new r.Slice((c?r.Fragment.empty:r.Fragment.from(s.copy(r.Fragment.empty))).append(u?r.Fragment.empty:r.Fragment.from(s.copy(r.Fragment.empty))),c?0:1,u?0:1),c?0:1)),e(o.scrollIntoView()),!0}(e,n,a)))}}function b(t){return function(e,n){let{$from:o,$to:s}=e.selection,a=o.blockRange(s,e=>e.childCount>0&&e.firstChild.type==t);if(!a)return!1;let l=a.startIndex;if(0==l)return!1;let c=a.parent,u=c.child(l-1);if(u.type!=t)return!1;if(n){let o=u.lastChild&&u.lastChild.type==c.type,s=r.Fragment.from(o?t.create():null),l=new r.Slice(r.Fragment.from(t.create(null,r.Fragment.from(c.type.create(null,s)))),o?3:1,0),d=a.start,p=a.end;n(e.tr.step(new i.ReplaceAroundStep(d-(o?3:1),p,d,p,l,1,!0)).scrollIntoView())}return!0}}},"gDS+":function(t,e,n){t.exports={default:n("oh+g"),__esModule:!0}},gSIQ:function(t,e,n){"use strict";e.__esModule=!0,e.isEmpty=e.isEqual=e.arrayEquals=e.looseEqual=e.capitalize=e.kebabCase=e.autoprefixer=e.isFirefox=e.isEdge=e.isIE=e.coerceTruthyValueToArray=e.arrayFind=e.arrayFindIndex=e.escapeRegexpString=e.valueEquals=e.generateId=e.getValueByPath=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.noop=function(){},e.hasOwn=function(t,e){return l.call(t,e)},e.toObject=function(t){for(var e={},n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};var u=e.arrayFindIndex=function(t,e){for(var n=0;n!==t.length;++n)if(e(t[n]))return n;return-1},d=(e.arrayFind=function(t,e){var n=u(t,e);return-1!==n?t[n]:void 0},e.coerceTruthyValueToArray=function(t){return Array.isArray(t)?t:t?[t]:[]},e.isIE=function(){return!s.default.prototype.$isServer&&!isNaN(Number(document.documentMode))},e.isEdge=function(){return!s.default.prototype.$isServer&&navigator.userAgent.indexOf("Edge")>-1},e.isFirefox=function(){return!s.default.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)},e.autoprefixer=function(t){if("object"!==(void 0===t?"undefined":i(t)))return t;var e=["ms-","webkit-"];return["transform","transition","animation"].forEach((function(n){var i=t[n];n&&i&&e.forEach((function(e){t[e+n]=i}))})),t},e.kebabCase=function(t){var e=/([^-])([A-Z])/g;return t.replace(e,"$1-$2").replace(e,"$1-$2").toLowerCase()},e.capitalize=function(t){return(0,a.isString)(t)?t.charAt(0).toUpperCase()+t.slice(1):t},e.looseEqual=function(t,e){var n=(0,a.isObject)(t),i=(0,a.isObject)(e);return n&&i?JSON.stringify(t)===JSON.stringify(e):!n&&!i&&String(t)===String(e)}),p=e.arrayEquals=function(t,e){if(e=e||[],(t=t||[]).length!==e.length)return!1;for(var n=0;n=0;r--)d(t(i[r]),n)}(r)},remove:function(n){var i=f();e||u(i),n&&0===t(":focus",n).length?m(n):e.children().length&&e.remove()},error:function(t,e,n){return h({type:o,iconClass:f().iconClasses.error,message:t,optionsOverride:n,title:e})},getContainer:u,info:function(t,e,n){return h({type:s,iconClass:f().iconClasses.info,message:t,optionsOverride:n,title:e})},options:{},subscribe:function(t){n=t},success:function(t,e,n){return h({type:a,iconClass:f().iconClasses.success,message:t,optionsOverride:n,title:e})},version:"2.1.4",warning:function(t,e,n){return h({type:l,iconClass:f().iconClasses.warning,message:t,optionsOverride:n,title:e})}};return c;function u(n,i){return n||(n=f()),(e=t("#"+n.containerId)).length||i&&(e=function(n){return(e=t("
").attr("id",n.containerId).addClass(n.positionClass)).appendTo(t(n.target)),e}(n)),e}function d(e,n,i){var r=!(!i||!i.force)&&i.force;return!(!e||!r&&0!==t(":focus",e).length||(e[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){m(e)}}),0))}function p(t){n&&n(t)}function h(n){var o=f(),s=n.iconClass||o.iconClass;if(void 0!==n.optionsOverride&&(o=t.extend(o,n.optionsOverride),s=n.optionsOverride.iconClass||s),!function(t,e){if(t.preventDuplicates){if(e.message===i)return!0;i=e.message}return!1}(o,n)){r++,e=u(o,!0);var a=null,l=t("
"),c=t("
"),d=t("
"),h=t("
"),g=t(o.closeHtml),v={intervalId:null,hideEta:null,maxHideTime:null},y={toastId:r,state:"visible",startTime:new Date,options:o,map:n};return n.iconClass&&l.addClass(o.toastClass).addClass(s),function(){if(n.title){var t=n.title;o.escapeHtml&&(t=b(n.title)),c.append(t).addClass(o.titleClass),l.append(c)}}(),function(){if(n.message){var t=n.message;o.escapeHtml&&(t=b(n.message)),d.append(t).addClass(o.messageClass),l.append(d)}}(),o.closeButton&&(g.addClass(o.closeClass).attr("role","button"),l.prepend(g)),o.progressBar&&(h.addClass(o.progressClass),l.prepend(h)),o.rtl&&l.addClass("rtl"),o.newestOnTop?e.prepend(l):e.append(l),function(){var t="";switch(n.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}l.attr("aria-live",t)}(),l.hide(),l[o.showMethod]({duration:o.showDuration,easing:o.showEasing,complete:o.onShown}),o.timeOut>0&&(a=setTimeout(_,o.timeOut),v.maxHideTime=parseFloat(o.timeOut),v.hideEta=(new Date).getTime()+v.maxHideTime,o.progressBar&&(v.intervalId=setInterval(k,10))),o.closeOnHover&&l.hover(w,x),!o.onclick&&o.tapToDismiss&&l.click(_),o.closeButton&&g&&g.click((function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),o.onCloseClick&&o.onCloseClick(t),_(!0)})),o.onclick&&l.click((function(t){o.onclick(t),_()})),p(y),o.debug&&console&&console.log(y),l}function b(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function _(e){var n=e&&!1!==o.closeMethod?o.closeMethod:o.hideMethod,i=e&&!1!==o.closeDuration?o.closeDuration:o.hideDuration,r=e&&!1!==o.closeEasing?o.closeEasing:o.hideEasing;if(!t(":focus",l).length||e)return clearTimeout(v.intervalId),l[n]({duration:i,easing:r,complete:function(){m(l),clearTimeout(a),o.onHidden&&"hidden"!==y.state&&o.onHidden(),y.state="hidden",y.endTime=new Date,p(y)}})}function x(){(o.timeOut>0||o.extendedTimeOut>0)&&(a=setTimeout(_,o.extendedTimeOut),v.maxHideTime=parseFloat(o.extendedTimeOut),v.hideEta=(new Date).getTime()+v.maxHideTime)}function w(){clearTimeout(a),v.hideEta=0,l.stop(!0,!0)[o.showMethod]({duration:o.showDuration,easing:o.showEasing})}function k(){var t=(v.hideEta-(new Date).getTime())/v.maxHideTime*100;h.width(t+"%")}}function f(){return t.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},c.options)}function m(t){e||(e=u()),t.is(":visible")||(t.remove(),t=null,0===e.children().length&&(e.remove(),i=void 0))}}()}.apply(e,i))||(t.exports=r)},hfKm:function(t,e,n){t.exports=n("RU/L")},hqFN:function(t,e,n){"use strict";var i=n("hUA5");n("hfKm")(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("9Jkg"));e.default=function(t){var e={props:["tag","value","config","onManualControllerReady"],watch:{value:function(){this.model=this.value,this.updateValue()}},render:function(t){return t(this.currentTag,[this.$slots.default])},created:function(){this.currentTag=this.tag||this.currentTag,this.model=this.value},mounted:function(){-1!=this.SPECIAL_TAGS.indexOf(this.currentTag)&&(this.hasSpecialTag=!0),this.onManualControllerReady?this.generateManualController():this.createEditor()},beforeDestroy:function(){this.destroyEditor()},data:function(){return{currentTag:"div",listeningEvents:[],_$element:null,_$editor:null,currentConfig:null,defaultConfig:{immediateVueModelUpdate:!1,vueIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,model:null,oldModel:null}},methods:{updateValue:function(){(0,r.default)(this.oldModel)!=(0,r.default)(this.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.currentConfig=this.config||this.defaultConfig,this._$element=jQuery(this.$el),this.setContent(!0),this.registerEvents(),this._$editor=this._$element.froalaEditor(this.currentConfig).data("froala.editor").$el,this.initListeners(),this.editorInitialized=!0)},setContent:function(t){(this.editorInitialized||t)&&(this.model||""==this.model)&&(this.oldModel=this.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(t))},setNormalTagContent:function(t){var e=this;function n(){e._$element.froalaEditor("html.set",e.model||"",!0),e._$element.froalaEditor("undo.saveStep"),e._$element.froalaEditor("undo.reset")}t?this.registerEvent(this._$element,"froalaEditor.initialized",(function(){n()})):n()},setSpecialTagContent:function(){var t=this.model;if(t){for(var e in t)t.hasOwnProperty(e)&&e!=this.INNER_HTML_ATTR&&this._$element.attr(e,t[e]);t.hasOwnProperty(this.INNER_HTML_ATTR)&&(this._$element[0].innerHTML=t[this.INNER_HTML_ATTR])}},destroyEditor:function(){this._$element&&(this.listeningEvents&&this._$element.off(this.listeningEvents.join(" ")),this._$editor.off("keyup"),this._$element.froalaEditor("destroy"),this.listeningEvents.length=0,this._$element=null,this.editorInitialized=!1)},getEditor:function(){return this._$element?this._$element.froalaEditor.bind(this._$element):null},generateManualController:function(){var t={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.onManualControllerReady(t)},updateModel:function(){var t="";if(this.hasSpecialTag){for(var e=this._$element[0].attributes,n={},i=0;i(0,i.propOptionsGenerator)(t,e)},huYB:function(t,e,n){"use strict";(function(t){var i=n("lPHp"),r=n.n(i);function o(t,e,n,i,r,o,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);var u,d="function"==typeof n?n.options:n;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),i&&(d._scopeId=i),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=u):e&&(u=s?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),u)if(d.functional){var p=d.render;d.render=function(t,e){return u.call(e),p(t,e)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return n}var s={props:{animationData:{type:[Object,String],required:!0},loop:{type:[Boolean,Number],default:!1},autoPlay:{type:Boolean,default:!0},renderer:{type:String,default:"svg"},speed:{type:Number,default:1}},data:function(){return{anim:null}},mounted:function(){this.init()},beforeDestroy:function(){this.anim&&this.anim.destroy()},methods:{init:function(){var t=this,e={container:this.$refs.animation,renderer:this.renderer,loop:this.loop,autoplay:this.autoPlay,animationData:this.animationData};this.anim=r.a.loadAnimation(e),this.anim.addEventListener("loopComplete",(function(){t.$emit("loopComplete",t.anim)})),this.anim.addEventListener("complete",(function(){t.$emit("complete",t.anim)})),this.anim.addEventListener("enterFrame",(function(){t.$emit("enterFrame",t.anim)}))},play:function(){this.anim&&this.anim.play()},stop:function(){this.anim&&this.anim.stop()},pause:function(){this.anim&&this.anim.pause()}}},a=function(){var t=this.$createElement;return(this._self._c||t)("div",{ref:"animation"})};a._withStripped=!0;var l=o({render:a,staticRenderFns:[]},void 0,s,void 0,!1,void 0,!1,void 0,void 0,void 0);var c={install:function t(e){t.installed||(t.installed=!0,e.component("LottieWebVue",l))}},u=null;"undefined"!=typeof window?u=window.Vue:void 0!==t&&(u=t.Vue),u&&u.use(c),e.a=l}).call(this,n("yLpj"))},i7wE:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=124)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},124:function(t,e,n){"use strict";n.r(e);var i={name:"ElTag",props:{text:String,closable:Boolean,type:String,hit:Boolean,disableTransitions:Boolean,color:String,size:String,effect:{type:String,default:"light",validator:function(t){return-1!==["dark","light","plain"].indexOf(t)}}},methods:{handleClose:function(t){t.stopPropagation(),this.$emit("close",t)},handleClick:function(t){this.$emit("click",t)}},computed:{tagSize:function(){return this.size||(this.$ELEMENT||{}).size}},render:function(t){var e=this.type,n=this.tagSize,i=this.hit,r=this.effect,o=t("span",{class:["el-tag",e?"el-tag--"+e:"",n?"el-tag--"+n:"",r?"el-tag--"+r:"",i&&"is-hit"],style:{backgroundColor:this.color},on:{click:this.handleClick}},[this.$slots.default,this.closable&&t("i",{class:"el-tag__close el-icon-close",on:{click:this.handleClose}})]);return this.disableTransitions?o:t("transition",{attrs:{name:"el-zoom-in-center"}},[o])}},r=n(0),o=Object(r.a)(i,void 0,void 0,!1,null,null,null);o.options.__file="packages/tag/src/tag.vue";var s=o.exports;s.install=function(t){t.component(s.name,s)};e.default=s}})},iFSW:function(t,e){},iWqV:function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=68)}({0:function(t,e,n){"use strict";function i(t,e,n,i,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return i}))},15:function(t,e){t.exports=n("UShQ")},2:function(t,e){t.exports=n("WST1")},41:function(t,e){t.exports=n("xWqt")},68:function(t,e,n){"use strict";n.r(e);var i=n(7),r=n.n(i),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"el-loading-fade"},on:{"after-leave":t.handleAfterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-loading-mask",class:[t.customClass,{"is-fullscreen":t.fullscreen}],style:{backgroundColor:t.background||""}},[n("div",{staticClass:"el-loading-spinner"},[t.spinner?n("i",{class:t.spinner}):n("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[n("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t.text?n("p",{staticClass:"el-loading-text"},[t._v(t._s(t.text))]):t._e()])])])};o._withStripped=!0;var s={data:function(){return{text:null,spinner:null,background:null,fullscreen:!0,visible:!1,customClass:""}},methods:{handleAfterLeave:function(){this.$emit("after-leave")},setText:function(t){this.text=t}}},a=n(0),l=Object(a.a)(s,o,[],!1,null,null,null);l.options.__file="packages/loading/src/loading.vue";var c=l.exports,u=n(2),d=n(15),p=n(41),h=n.n(p),f=r.a.extend(c),m={install:function(t){if(!t.prototype.$isServer){var e=function(e,i){i.value?t.nextTick((function(){i.modifiers.fullscreen?(e.originalPosition=Object(u.getStyle)(document.body,"position"),e.originalOverflow=Object(u.getStyle)(document.body,"overflow"),e.maskStyle.zIndex=d.PopupManager.nextZIndex(),Object(u.addClass)(e.mask,"is-fullscreen"),n(document.body,e,i)):(Object(u.removeClass)(e.mask,"is-fullscreen"),i.modifiers.body?(e.originalPosition=Object(u.getStyle)(document.body,"position"),["top","left"].forEach((function(t){var n="top"===t?"scrollTop":"scrollLeft";e.maskStyle[t]=e.getBoundingClientRect()[t]+document.body[n]+document.documentElement[n]-parseInt(Object(u.getStyle)(document.body,"margin-"+t),10)+"px"})),["height","width"].forEach((function(t){e.maskStyle[t]=e.getBoundingClientRect()[t]+"px"})),n(document.body,e,i)):(e.originalPosition=Object(u.getStyle)(e,"position"),n(e,e,i)))})):(h()(e.instance,(function(t){if(e.instance.hiding){e.domVisible=!1;var n=i.modifiers.fullscreen||i.modifiers.body?document.body:e;Object(u.removeClass)(n,"el-loading-parent--relative"),Object(u.removeClass)(n,"el-loading-parent--hidden"),e.instance.hiding=!1}}),300,!0),e.instance.visible=!1,e.instance.hiding=!0)},n=function(e,n,i){n.domVisible||"none"===Object(u.getStyle)(n,"display")||"hidden"===Object(u.getStyle)(n,"visibility")?n.domVisible&&!0===n.instance.hiding&&(n.instance.visible=!0,n.instance.hiding=!1):(Object.keys(n.maskStyle).forEach((function(t){n.mask.style[t]=n.maskStyle[t]})),"absolute"!==n.originalPosition&&"fixed"!==n.originalPosition&&Object(u.addClass)(e,"el-loading-parent--relative"),i.modifiers.fullscreen&&i.modifiers.lock&&Object(u.addClass)(e,"el-loading-parent--hidden"),n.domVisible=!0,e.appendChild(n.mask),t.nextTick((function(){n.instance.hiding?n.instance.$emit("after-leave"):n.instance.visible=!0})),n.domInserted=!0)};t.directive("loading",{bind:function(t,n,i){var r=t.getAttribute("element-loading-text"),o=t.getAttribute("element-loading-spinner"),s=t.getAttribute("element-loading-background"),a=t.getAttribute("element-loading-custom-class"),l=i.context,c=new f({el:document.createElement("div"),data:{text:l&&l[r]||r,spinner:l&&l[o]||o,background:l&&l[s]||s,customClass:l&&l[a]||a,fullscreen:!!n.modifiers.fullscreen}});t.instance=c,t.mask=c.$el,t.maskStyle={},n.value&&e(t,n)},update:function(t,n){t.instance.setText(t.getAttribute("element-loading-text")),n.oldValue!==n.value&&e(t,n)},unbind:function(t,n){t.domInserted&&(t.mask&&t.mask.parentNode&&t.mask.parentNode.removeChild(t.mask),e(t,{value:!1,modifiers:n.modifiers})),t.instance&&t.instance.$destroy()}})}}},g=m,v=n(9),y=n.n(v),b=r.a.extend(c),_={text:null,fullscreen:!0,body:!1,lock:!1,customClass:""},x=void 0;b.prototype.originalPosition="",b.prototype.originalOverflow="",b.prototype.close=function(){var t=this;this.fullscreen&&(x=void 0),h()(this,(function(e){var n=t.fullscreen||t.body?document.body:t.target;Object(u.removeClass)(n,"el-loading-parent--relative"),Object(u.removeClass)(n,"el-loading-parent--hidden"),t.$el&&t.$el.parentNode&&t.$el.parentNode.removeChild(t.$el),t.$destroy()}),300),this.visible=!1};var w=function(t,e,n){var i={};t.fullscreen?(n.originalPosition=Object(u.getStyle)(document.body,"position"),n.originalOverflow=Object(u.getStyle)(document.body,"overflow"),i.zIndex=d.PopupManager.nextZIndex()):t.body?(n.originalPosition=Object(u.getStyle)(document.body,"position"),["top","left"].forEach((function(e){var n="top"===e?"scrollTop":"scrollLeft";i[e]=t.target.getBoundingClientRect()[e]+document.body[n]+document.documentElement[n]+"px"})),["height","width"].forEach((function(e){i[e]=t.target.getBoundingClientRect()[e]+"px"}))):n.originalPosition=Object(u.getStyle)(e,"position"),Object.keys(i).forEach((function(t){n.$el.style[t]=i[t]}))},k=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!r.a.prototype.$isServer){if("string"==typeof(t=y()({},_,t)).target&&(t.target=document.querySelector(t.target)),t.target=t.target||document.body,t.target!==document.body?t.fullscreen=!1:t.body=!0,t.fullscreen&&x)return x;var e=t.body?document.body:t.target,n=new b({el:document.createElement("div"),data:t});return w(t,e,n),"absolute"!==n.originalPosition&&"fixed"!==n.originalPosition&&Object(u.addClass)(e,"el-loading-parent--relative"),t.fullscreen&&t.lock&&Object(u.addClass)(e,"el-loading-parent--hidden"),e.appendChild(n.$el),r.a.nextTick((function(){n.visible=!0})),t.fullscreen&&(x=n),n}};e.default={install:function(t){t.use(g),t.prototype.$loading=k},directive:g,service:k}},7:function(t,e){t.exports=n("oCYn")},9:function(t,e){t.exports=n("f03z")}})},iq4v:function(t,e,n){n("Mqbl"),t.exports=n("WEpk").Object.keys},j2DC:function(t,e,n){"use strict";var i=n("oVml"),r=n("rr1i"),o=n("RfKB"),s={};n("NegM")(s,n("UWiX")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},j9nl:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectProp=void 0;const i=n("zyfj");e.objectProp=t=>(0,i.propOptionsGenerator)(Object,t)},jEQI:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return c}));var i=n("YEIV"),r=n.n(i),o=n("GtT5");function s(t){if("string"!=typeof t)return null;var e=t.trim();if(!e)return null;if("undefined"==typeof document||!document.createElement)return e;var n=document.createElement("span");return n.style.color="",n.style.color=e,n.style.color||null}function a(t){if("string"!=typeof t)return null;var e=t.trim();if(!e)return null;if("undefined"==typeof document||!document.createElement)return e;var n=document.createElement("span");return n.style.backgroundColor="",n.style.backgroundColor=e,n.style.backgroundColor||null}function l(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{color:s(t.color),backgroundColor:a(t.backgroundColor)}}var c=o.c.create({name:"textStyle",priority:90,inclusive:!0,parseHTML:function(){return[{tag:"span",getAttrs:function(t){var e=l({color:t.style?t.style.color:"",backgroundColor:t.style?t.style.backgroundColor:""});return!(!e.color&&!e.backgroundColor)&&e}}]},addAttributes:function(){var t;return t={},r()(t,"color",{default:null,renderHTML:function(){return{}}}),r()(t,"backgroundColor",{default:null,renderHTML:function(){return{}}}),t},renderHTML:function(t){var e=t.mark,n=t.HTMLAttributes,i=l(e&&e.attrs?e.attrs:{}),r=[];return i.color&&r.push("color: "+i.color),i.backgroundColor&&r.push("background-color: "+i.backgroundColor),r.length?["span",Object(o.A)(n,{style:r.join("; ")}),0]:["span",{},0]},addCommands:function(){var t=this;return{setTextColor:function(e){return function(n){var i=n.chain,r=s(e);return!!r&&i().setMark(t.name,{color:r}).run()}},unsetTextColor:function(){return function(e){var n=e.editor,i=e.chain,r=e.commands,o=l(n.getAttributes(t.name));return o.backgroundColor?i().setMark(t.name,{backgroundColor:o.backgroundColor,color:null}).run():r.unsetMark(t.name)}},setTextBackgroundColor:function(e){return function(n){var i=n.chain,r=a(e);return!!r&&i().setMark(t.name,{backgroundColor:r}).run()}},unsetTextBackgroundColor:function(){return function(e){var n=e.editor,i=e.chain,r=e.commands,o=l(n.getAttributes(t.name));return o.color?i().setMark(t.name,{color:o.color,backgroundColor:null}).run():r.unsetMark(t.name)}}}}})},jmDH:function(t,e,n){t.exports=!n("KUxP")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"k/8l":function(t,e,n){t.exports={default:n("VKFn"),__esModule:!0}},k20u:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("Ik2V");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},kAMH:function(t,e,n){var i=n("a0xu");t.exports=Array.isArray||function(t){return"Array"==i(t)}},kHMt:function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.on=function(t,e){return this._eventCollection=this._eventCollection||{},this._eventCollection[t]=this._eventCollection[t]||[],this._eventCollection[t].push(e),this},t.prototype.once=function(t,e){var n=this;function i(){n.off(t,i),e.apply(this,arguments)}return i.listener=e,this.on(t,i),this},t.prototype.off=function(t,e){var n=void 0;return this._eventCollection&&(n=this._eventCollection[t])?(n.forEach((function(t,i){t!==e&&t.listener!==e||n.splice(i,1)})),0===n.length&&delete this._eventCollection[t],this):this},t.prototype.emit=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;ru;)for(var h,f=l(arguments[u++]),m=d?r(f).concat(d(f)):r(f),g=m.length,v=0;g>v;)h=m[v++],i&&!p.call(f,h)||(n[h]=f[h]);return n}:c},l8ok:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.vueComponentProp=void 0;const i=n("zyfj");e.vueComponentProp=t=>(0,i.propOptionsGenerator)([Object,String],t)},lPHp:function(module,exports,__webpack_require__){"undefined"!=typeof navigator&&function(t,e){module.exports=e()}(0,(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var n,i,r=t.length;for(n=0;n1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(t,e){var n=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return n[2]+=e,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(t,e){var n=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return n[0]+=e/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){var t,e,n=[];for(t=0;t<256;t+=1)e=t.toString(16),n[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+n[t]+n[e]+n[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dataManager=function(){var t,e,n=1,i=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},o={postMessage:function(t){r.onmessage({data:t})}};function s(){e||((e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var n=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(n);return new Worker(i)}return t=e,r}((function(t){if(o.dataManager||(o.dataManager=function(){function t(r,o){var s,a,l,c,u,p,h=r.length;for(a=0;a=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(o=t[e].ks.k.length,r=0;rn[0]||!(n[0]>t[0])&&(t[1]>n[1]||!(n[1]>t[1])&&(t[2]>n[2]||!(n[2]>t[2])&&null))}var o,s=function(){var t=[4,4,14];function e(t){var e,n,i,r=t.length;for(e=0;e=0;n-=1)if("sh"===t[n].ty)if(t[n].ks.k.i)t[n].ks.k.c=t[n].closed;else for(r=t[n].ks.k.length,i=0;i500)&&(this._imageLoaded(),clearInterval(n)),e+=1}.bind(this),50)}function o(t){var e={assetData:t},n=i(t,this.assetsPath,this.path);return dataManager.loadData(n,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function s(){this._imageLoaded=e.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=o.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(t,e){var n;this.imagesLoadedCb=e;var i=t.length;for(n=0;nthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,n,i=this.animationData.layers,r=i.length,o=t.layers,s=o.length;for(n=0;nthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,n=0;n=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(n=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(n=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),n&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(n=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==n&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var n,i=t.length;for(n=0;n=0;n-=1)e[n].animation.destroy(t)},t.freeze=function(){s=!0},t.unfreeze=function(){s=!1,f()},t.setVolume=function(t,n){var r;for(r=0;r=.001?function(t,e,n,i){for(var r=0;r<4;++r){var o=a(e,n,i);if(0===o)return e;e-=(s(e,n,i)-t)/o}return e}(t,l,e,n):0===c?l:function(t,e,n,i,r){var o,a,l=0;do{(o=s(a=e+(n-e)/2,i,r)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++l<10);return a}(t,r,r+.1,e,n)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,n){var i=0,r=t,o=createSizedArray(r);return{newElement:function(){return i?o[i-=1]:e()},release:function(t){i===r&&(o=pooling.double(o),r*=2),n&&n(t),o[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,n=t.lengths.length;for(e=0;e-.001&&s<.001}var n=function(t,e,n,i){var r,o,s,a,l,c,u=getDefaultCurveSegments(),d=0,p=[],h=[],f=bezierLengthPool.newElement();for(s=n.length,r=0;rs?-1:1,c=!0;c;)if(i[o]<=s&&i[o+1]>s?(a=(s-i[o])/(i[o+1]-i[o]),c=!1):o+=l,o<0||o>=r-1){if(o===r-1)return n[o];c=!1}return n[o]+(n[o+1]-n[o])*a}var l=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),r=t.c,o=t.v,s=t.o,a=t.i,l=t._length,c=i.lengths,u=0;for(e=0;e1&&(o=1);var u,d=a(o,c),p=a(s=s>1?1:s,c),h=e.length,f=1-d,m=1-p,g=f*f*f,v=d*f*f*3,y=d*d*f*3,b=d*d*d,_=f*f*m,x=d*f*m+f*d*m+f*f*p,w=d*d*m+f*d*p+d*f*p,k=d*d*p,C=f*m*m,S=d*m*m+f*p*m+f*m*p,E=d*p*m+f*p*p+d*m*p,T=d*p*p,A=m*m*m,M=p*m*m+m*p*m+m*m*p,P=p*p*m+m*p*p+p*m*p,O=p*p*p;for(u=0;uh?p>f?p-h-f:f-h-p:f>h?f-h-p:h-p-f)>-1e-4&&d<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function n(t,e){var n,r=this.offsetTime;"multidimensional"===this.propType&&(n=createTypedArray("float32",this.pv.length));for(var o,s,a,l,c,u,d,p,h,f=e.lastIndex,m=f,g=this.keyframes.length-1,v=!0;v;){if(o=this.keyframes[m],s=this.keyframes[m+1],m===g-1&&t>=s.t-r){o.h&&(o=s),f=0;break}if(s.t-r>t){f=m;break}m=b||t<_){var w=t>=b?x.points.length-1:0;for(c=x.points[w].point.length,l=0;l=S&&C=b)n[0]=y[0],n[1]=y[1],n[2]=y[2];else if(t<=_)n[0]=o.s[0],n[1]=o.s[1],n[2]=o.s[2];else{!function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=Math.atan2(2*i*o-2*n*r,1-2*i*i-2*r*r),a=Math.asin(2*n*i+2*r*o),l=Math.atan2(2*n*o-2*i*r,1-2*n*n-2*r*r);t[0]=s/degToRads,t[1]=a/degToRads,t[2]=l/degToRads}(n,function(t,e,n){var i,r,o,s,a,l=[],c=t[0],u=t[1],d=t[2],p=t[3],h=e[0],f=e[1],m=e[2],g=e[3];(r=c*h+u*f+d*m+p*g)<0&&(r=-r,h=-h,f=-f,m=-m,g=-g);1-r>1e-6?(i=Math.acos(r),o=Math.sin(i),s=Math.sin((1-n)*i)/o,a=Math.sin(n*i)/o):(s=1-n,a=n);return l[0]=s*c+a*h,l[1]=s*u+a*f,l[2]=s*d+a*m,l[3]=s*p+a*g,l}(i(o.s),i(y),(t-_)/(b-_)))}else for(m=0;m=b?u=1:t<_?u=0:(o.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[m]?h=a.__fnct[m]:(E=void 0===o.o.x[m]?o.o.x[0]:o.o.x[m],T=void 0===o.o.y[m]?o.o.y[0]:o.o.y[m],A=void 0===o.i.x[m]?o.i.x[0]:o.i.x[m],M=void 0===o.i.y[m]?o.i.y[0]:o.i.y[m],h=BezierFactory.getBezierEasing(E,T,A,M).get,a.__fnct[m]=h)):a.__fnct?h=a.__fnct:(E=o.o.x,T=o.o.y,A=o.i.x,M=o.i.y,h=BezierFactory.getBezierEasing(E,T,A,M).get,o.keyframeMetadata=h),u=h((t-_)/(b-_)))),y=s.s||o.e,P=1===o.h?o.s[m]:o.s[m]+(y[m]-o.s[m])*u,"multidimensional"===this.propType?n[m]=P:n=P}return e.lastIndex=f,n}function i(t){var e=t[0]*degToRads,n=t[1]*degToRads,i=t[2]*degToRads,r=Math.cos(e/2),o=Math.cos(n/2),s=Math.cos(i/2),a=Math.sin(e/2),l=Math.sin(n/2),c=Math.sin(i/2);return[a*l*s+r*o*c,a*o*s+r*l*c,r*l*s-a*o*c,r*o*s-a*l*c]}function r(){var e=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function o(t){var n;if("unidimensional"===this.propType)n=t*this.mult,e(this.v-n)>1e-5&&(this.v=n,this._mdf=!0);else for(var i=0,r=this.v.length;i1e-5&&(this.v[i]=n,this._mdf=!0),i+=1}function s(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),n){case"v":o=this.v;break;case"i":o=this.i;break;case"o":o=this.o;break;default:o=[]}(!o[i]||o[i]&&!r)&&(o[i]=pointPool.newElement()),o[i][0]=t,o[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,n,i,r,o,s,a){this.setXYAt(t,e,"v",s,a),this.setXYAt(n,i,"o",s,a),this.setXYAt(r,o,"i",s,a)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,n=this.o,i=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],n[0][0],n[0][1],0,!1),r=1);var o,s=this._length-1,a=this._length;for(o=r;o=h[h.length-1].t-this.offsetTime)i=h[h.length-1].s?h[h.length-1].s[0]:h[h.length-2].e[0],o=!0;else{for(var f,m,g,v=p,y=h.length-1,b=!0;b&&(f=h[v],!((m=h[v+1]).t-this.offsetTime>t));)v=m.t-this.offsetTime)u=1;else if(tn&&t>n)||(this._caching.lastIndex=i0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function D(){var t=this.props;return"matrix("+O(t[0])+","+O(t[1])+","+O(t[4])+","+O(t[5])+","+O(t[12])+","+O(t[13])+")"}return function(){this.reset=r,this.rotate=o,this.rotateX=s,this.rotateY=a,this.rotateZ=l,this.skew=u,this.skewFromAxis=d,this.shear=c,this.scale=p,this.setTransform=h,this.translate=f,this.transform=m,this.applyToPoint=_,this.applyToX=x,this.applyToY=w,this.applyToZ=k,this.applyToPointArray=A,this.applyToTriplePoints=T,this.applyToPointStringified=M,this.toCSS=P,this.to2dCSS=D,this.clone=y,this.cloneFromProps=b,this.equals=v,this.inversePoints=E,this.inversePoint=S,this.getInverseMatrix=C,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),n=0;n=1?o.push({s:t-1,e:e-1}):(o.push({s:t,e:1}),o.push({s:0,e:e-1}));var s,a,l=[],c=o.length;for(s=0;si+n))u=a.s*r<=i?0:(a.s*r-i)/n,d=a.e*r>=i+n?1:(a.e*r-i)/n,l.push([u,d])}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,n=t.length;for(e=0;e1?1+o:this.s.v<0?0+o:this.s.v+o)>(n=this.e.v>1?1+o:this.e.v<0?0+o:this.e.v+o)){var s=e;e=n,n=s}e=1e-4*Math.round(1e4*e),n=1e-4*Math.round(1e4*n),this.sValue=e,this.eValue=n}else e=this.sValue,n=this.eValue;var a,l,c,u,d,p=this.shapes.length,h=0;if(n===e)for(r=0;r=0;r-=1)if((f=this.shapes[r]).shape._mdf){for((m=f.localShapeCollection).releaseShapes(),2===this.m&&p>1?(v=this.calculateShapeEdges(e,n,f.totalShapeLength,_,h),_+=f.totalShapeLength):v=[[y,b]],l=v.length,a=0;a=1?g.push({s:f.totalShapeLength*(y-1),e:f.totalShapeLength*(b-1)}):(g.push({s:f.totalShapeLength*y,e:f.totalShapeLength}),g.push({s:0,e:f.totalShapeLength*(b-1)}));var x=this.addShapes(f,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(f.shape.paths.shapes[f.shape.paths._length-1].c){var w=x.pop();this.addPaths(x,m),x=this.addShapes(f,g[1],w)}else this.addPaths(x,m),x=this.addShapes(f,g[1]);this.addPaths(x,m)}}f.shape.paths=m}}},TrimModifier.prototype.addPaths=function(t,e){var n,i=t.length;for(n=0;ne.e){n.c=!1;break}e.s<=f&&e.e>=f+s.addedLength?(this.addSegment(p[i].v[r-1],p[i].o[r-1],p[i].i[r],p[i].v[r],n,a,g),g=!1):(c=bez.getNewSegment(p[i].v[r-1],p[i].v[r],p[i].o[r-1],p[i].i[r],(e.s-f)/s.addedLength,(e.e-f)/s.addedLength,l[r-1]),this.addSegmentFromArray(c,n,a,g),g=!1,n.c=!1),f+=s.addedLength,a+=1}if(p[i].c&&l.length){if(s=l[r-1],f<=e.e){var v=l[r-1].addedLength;e.s<=f&&e.e>=f+v?(this.addSegment(p[i].v[r-1],p[i].o[r-1],p[i].i[0],p[i].v[0],n,a,g),g=!1):(c=bez.getNewSegment(p[i].v[r-1],p[i].v[0],p[i].o[r-1],p[i].i[0],(e.s-f)/v,(e.e-f)/v,l[r-1]),this.addSegmentFromArray(c,n,a,g),g=!1,n.c=!1)}else n.c=!1;f+=s.addedLength,a+=1}if(n._length&&(n.setXYAt(n.v[u][0],n.v[u][1],"i",u),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),f>e.e)break;i=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(i=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],r=[];var o=this.px,s=this.py;o._caching.lastFrame+o.offsetTime<=o.keyframes[0].t?(i[0]=o.getValueAtTime((o.keyframes[0].t+.01)/n,0),i[1]=s.getValueAtTime((s.keyframes[0].t+.01)/n,0),r[0]=o.getValueAtTime(o.keyframes[0].t/n,0),r[1]=s.getValueAtTime(s.keyframes[0].t/n,0)):o._caching.lastFrame+o.offsetTime>=o.keyframes[o.keyframes.length-1].t?(i[0]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/n,0),i[1]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/n,0),r[0]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/n,0),r[1]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/n,0)):(i=[o.pv,s.pv],r[0]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/n,o.offsetTime),r[1]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/n,s.offsetTime))}else i=r=t;this.v.rotate(-Math.atan2(i[1]-r[1],i[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,n,i){return new e(t,n,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],n="normal",i="normal",r=e.length,o=0;o0;)n-=1,this._elements.unshift(e[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,n=t.length;for(e=0;e0?Math.floor(p):Math.ceil(p),m=this.pMatrix.props,g=this.rMatrix.props,v=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var y,b,_=0;if(p>0){for(;_f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-h,!0),_-=h)}for(i=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,o=this._currentCopies;o;){if(b=(n=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===r||i!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),y=0;y0&&(u=!1),u){var d=createTag("style");d.setAttribute("f-forigin",i[n].fOrigin),d.setAttribute("f-origin",i[n].origin),d.setAttribute("f-family",i[n].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+i[n].fFamily+"; font-style: normal; src: url('"+i[n].fPath+"');}",e.appendChild(d)}}else if("g"===i[n].fOrigin||1===i[n].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;ct?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(y,"url("+getLocationHref()+"#"+g+")"),o.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,n,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(n=this.layers[e]).ip-n.st<=t-this.layers[e].st&&n.op-n.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t1&&(o+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),n.lastPath!==o){var s="";n.elem&&(e.c&&(s=t.inv?this.solidPath+o:o),n.elem.setAttribute("d",s)),n.lastPath=o}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var n=createNS("filter");n.setAttribute("id",t),!0!==e&&(n.setAttribute("filterUnits","objectBoundingBox"),n.setAttribute("x","0%"),n.setAttribute("y","0%"),n.setAttribute("width","100%"),n.setAttribute("height","100%"));return n},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(t){var e,n,i="SourceGraphic",r=t.data.ef?t.data.ef.length:0,o=createElementID(),s=filtersFactory.createFilter(o,!0),a=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,n=0,i=e.length;n.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)l=i.transformers[m].mProps._mdf||l,f-=1,m-=1;if(l)for(f=v-i.styles[u].lvl,m=i.transformers.length-1;f>0;)h=i.transformers[m].mProps.v.props,p.transform(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15]),f-=1,m-=1}else p=t;if(s=(d=i.sh.paths)._length,l){for(a="",o=0;o=1?y=.99:y<=-1&&(y=-.99);var b=a*y,_=Math.cos(v+e.a.v)*b+u[0],x=Math.sin(v+e.a.v)*b+u[1];l.setAttribute("fx",_),l.setAttribute("fy",x),c&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",x))}}function l(t,e,n){var i=e.style,r=e.d;r&&(r._mdf||n)&&r.dashStr&&(i.pElem.setAttribute("stroke-dasharray",r.dashStr),i.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||n)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||n)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||n)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return o;case"gf":return a;case"gs":return s;case"st":return l;case"sh":case"el":case"rc":case"sr":return r;case"tr":return n;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,n){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,n),this.prevViewData=[]}function LetterProps(t,e,n,i,r,o){this.o=t,this.sw=e,this.sc=n,this.fc=i,this.m=r,this.p=o,this._mdf={o:!0,sw:!!e,sc:!!n,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,n,i,r=this.shapes.length,o=this.stylesList.length,s=[],a=!1;for(n=0;n1&&a&&this.setShapesAsAnimated(s)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,n=t.length;for(e=0;e=0;a-=1){if((p=this.searchProcessedElement(t[a]))?e[a]=n[p-1]:t[a]._render=s,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty||"no"===t[a].ty)p?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],r),t[a]._render&&e[a].style.pElem.parentNode!==i&&i.appendChild(e[a].style.pElem),m.push(e[a].style);else if("gr"===t[a].ty){if(p)for(c=e[a].it.length,l=0;l1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,o=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,n,i=[],r=0,o=t.length,s=!1;r=55296&&e<=56319?(n=t.charCodeAt(r+1))>=56320&&n<=57343?(s||FontManager.isModifier(e,n)?(i[i.length-1]+=t.substr(r,2),s=!1):i.push(t.substr(r,2)),r+=1):i.push(t.charAt(r)):e>56319?(n=t.charCodeAt(r+1),FontManager.isZeroWidthJoiner(e,n)?(s=!0,i[i.length-1]+=t.substr(r,2),r+=1):i.push(t.charAt(r))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(r),s=!0):i.push(t.charAt(r)),r+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,n,i,r,o,s,a,l=this.elem.globalData.fontManager,c=this.data,u=[],d=0,p=c.m.g,h=0,f=0,m=0,g=[],v=0,y=0,b=l.getFontByName(t.f),_=0,x=getFontProperties(b);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),n=t.finalText.length,t.finalLineHeight=t.lh;var w,k=t.tr/1e3*t.finalSize;if(t.sz)for(var C,S,E=!0,T=t.sz[0],A=t.sz[1];E;){C=0,v=0,n=(S=this.buildFinalText(t.t)).length,k=t.tr/1e3*t.finalSize;var M=-1;for(e=0;eT&&" "!==S[e]?(-1===M?n+=1:e=M,C+=t.finalLineHeight||1.2*t.finalSize,S.splice(e,M===e?1:0,"\r"),M=-1,v=0):(v+=_,v+=k);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Ay?v:y,v=-2*k,r="",i=!0,m+=1):r=P,l.chars?(a=l.getCharData(P,b.fStyle,l.getFontByName(t.f).fFamily),_=i?0:a.w*t.finalSize/100):_=l.measureText(r,t.f,t.finalSize)," "===P?O+=_+k:(v+=_+k+O,O=0),u.push({l:_,an:_,add:h,n:i,anIndexes:[],val:r,line:m,animatorJustifyOffset:0}),2==p){if(h+=_,""===r||" "===r||e===n-1){for(""!==r&&" "!==r||(h-=_);f<=e;)u[f].an=h,u[f].ind=d,u[f].extra=_,f+=1;d+=1,h=0}}else if(3==p){if(h+=_,""===r||e===n-1){for(""===r&&(h-=_);f<=e;)u[f].an=h,u[f].ind=d,u[f].extra=_,f+=1;h=0,d+=1}}else u[d].ind=d,u[d].extra=0,d+=1;if(t.l=u,y=v>y?v:y,g.push(v),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=y,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var D,I,$,N,F=c.a;s=F.length;var R=[];for(o=0;o0?r=this.ne.v/100:o=-this.ne.v/100,this.xe.v>0?s=1-this.xe.v/100:a=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(r,o,s,a).get,c=0,u=this.finalS,d=this.finalE,p=this.data.sh;if(2===p)c=l(c=d===u?i>=d?1:0:t(0,e(.5/(d-u)+(i-u)/(d-u),1)));else if(3===p)c=l(c=d===u?i>=d?0:1:1-t(0,e(.5/(d-u)+(i-u)/(d-u),1)));else if(4===p)d===u?c=0:(c=t(0,e(.5/(d-u)+(i-u)/(d-u),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===p){if(d===u)c=0;else{var h=d-u,f=-h/2+(i=e(t(0,i+.5-u),d-u)),m=h/2;c=Math.sqrt(1-f*f/(m*m))}c=l(c)}else 6===p?(d===u?c=0:(i=e(t(0,i+.5-u),d-u),c=(1+Math.cos(Math.PI+2*Math.PI*i/(d-u)))/2),c=l(c)):(i>=n(u)&&(c=t(0,e(i-u<0?e(d,1)-(u-i):d-i,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var v=.5-.5*g;c1&&(c=1)}return c*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,n=this.o.v/e,i=this.s.v/e+n,r=this.e.v/e+n;if(i>r){var o=i;i=r,r=o}this.finalS=i,this.finalE=r}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,n){return new i(t,e,n)}}}();function TextAnimatorDataProperty(t,e,n){var i={propType:!1},r=PropertyFactory.getProp,o=e.a;this.a={r:o.r?r(t,o.r,0,degToRads,n):i,rx:o.rx?r(t,o.rx,0,degToRads,n):i,ry:o.ry?r(t,o.ry,0,degToRads,n):i,sk:o.sk?r(t,o.sk,0,degToRads,n):i,sa:o.sa?r(t,o.sa,0,degToRads,n):i,s:o.s?r(t,o.s,1,.01,n):i,a:o.a?r(t,o.a,1,0,n):i,o:o.o?r(t,o.o,0,.01,n):i,p:o.p?r(t,o.p,1,0,n):i,sw:o.sw?r(t,o.sw,0,0,n):i,sc:o.sc?r(t,o.sc,1,0,n):i,fc:o.fc?r(t,o.fc,1,0,n):i,fh:o.fh?r(t,o.fh,0,0,n):i,fs:o.fs?r(t,o.fs,0,.01,n):i,fb:o.fb?r(t,o.fb,0,.01,n):i,t:o.t?r(t,o.t,0,0,n):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,n),this.s.t=e.s.t}function TextAnimatorProperty(t,e,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,n=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t=a+at||!f?(y=(a+at-c)/l.partialLength,L=h.point[0]+(l.point[0]-h.point[0])*y,j=h.point[1]+(l.point[1]-h.point[1])*y,C.translate(-x[0]*T[r].an*.005,-x[1]*N*.01),u=!1):f&&(c+=l.partialLength,(d+=1)>=f.length&&(d=0,m[p+=1]?f=m[p].points:_.v.c?(d=0,f=m[p=0].points):(c-=l.partialLength,f=null)),f&&(h=l,g=(l=f[d]).partialLength));R=T[r].an/2-T[r].add,C.translate(-R,0,0)}else R=T[r].an/2-T[r].add,C.translate(-R,0,0),C.translate(-x[0]*T[r].an*.005,-x[1]*N*.01,0);for(O=0;Ot?this.textSpans[t].span:createNS(l?"g":"text"),g<=t){if(s.setAttribute("stroke-linecap","butt"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=s,l){var v=createNS("g");s.appendChild(v),this.textSpans[t].childSpan=v}this.textSpans[t].span=s,this.layerElement.appendChild(s)}s.style.display="inherit"}if(c.reset(),u&&(a[t].n&&(d=-f,p+=n.yOffset,p+=h?1:0,h=!1),this.applyTextPropertiesToMatrix(n,c,a[t].line,d,p),d+=a[t].l||0,d+=f),l){var y;if(1===(m=this.globalData.fontManager.getCharData(n.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily)).t)y=new SVGCompElement(m.data,this.globalData,this);else{var b=emptyShapeData;m.data&&m.data.shapes&&(b=this.buildShapeData(m.data,n.finalSize)),y=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var _=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(_.layerElement),_.destroy()}this.textSpans[t].glyph=y,y._debug=!0,y.prepareFrame(0),y.renderFrame(),this.textSpans[t].childSpan.appendChild(y.layerElement),1===m.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+n.finalSize/100+","+n.finalSize/100+")")}else u&&s.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),s.textContent=a[t].val,s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}u&&s&&s.setAttribute("d","")}else{var x=this.textContainer,w="start";switch(n.j){case 1:w="end";break;case 2:w="middle";break;default:w="start"}x.setAttribute("text-anchor",w),x.setAttribute("letter-spacing",f);var k=this.buildTextContents(n.finalText);for(e=k.length,p=n.ps?n.ps[1]+n.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)n=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);t._mdf=o},processSequences:function(t){var e,n=this.sequenceList.length;for(e=0;e=0;o-=1){if((l=this.searchProcessedElement(t[o]))?e[o]=n[l-1]:t[o]._shouldRender=i,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty)l?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],f),p.push(e[o].style);else if("gr"===t[o].ty){if(l)for(a=e[o].it.length,s=0;s=0;r-=1)"tr"===e[r].ty?(o=n[r].transform,this.renderShapeTransform(t,o)):"sh"===e[r].ty||"el"===e[r].ty||"rc"===e[r].ty||"sr"===e[r].ty?this.renderPath(e[r],n[r]):"fl"===e[r].ty?this.renderFill(e[r],n[r],o):"st"===e[r].ty?this.renderStroke(e[r],n[r],o):"gf"===e[r].ty||"gs"===e[r].ty?this.renderGradientFill(e[r],n[r],o):"gr"===e[r].ty?this.renderShape(o,e[r].it,n[r].it):e[r].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var n,i,r,o=t.trNodes,s=e.paths,a=s._length;o.length=0;var l=t.transforms.finalTransform;for(r=0;r=1?d=.99:d<=-1&&(d=-.99);var p=c*d,h=Math.cos(u+e.a.v)*p+a[0],f=Math.sin(u+e.a.v)*p+a[1];i=s.createRadialGradient(h,f,0,a[0],a[1],c)}var m=t.g.p,g=e.g.c,v=1;for(o=0;oa&&"xMidYMid slice"===l||sn&&"meet"===o||in&&"slice"===o)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===a&&(in&&"slice"===o)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===l&&(i>n&&"meet"===o||in&&"meet"===o||i=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var n;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),n=0;n=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var n=this.createItem(this.layers[t],this,this.globalData);e[t]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var n,i=t.length;for(n=0;n0&&a<1&&d[p].push(this.calculateF(a,t,e,n,i,p)):(l=o*o-4*s*r)>=0&&((c=(-o+bmSqrt(l))/(2*r))>0&&c<1&&d[p].push(this.calculateF(c,t,e,n,i,p)),(u=(-o-bmSqrt(l))/(2*r))>0&&u<1&&d[p].push(this.calculateF(u,t,e,n,i,p))));this.shapeBoundingBox.left=bmMin.apply(null,d[0]),this.shapeBoundingBox.top=bmMin.apply(null,d[1]),this.shapeBoundingBox.right=bmMax.apply(null,d[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,d[1])},HShapeElement.prototype.calculateF=function(t,e,n,i,r,o){return bmPow(1-t,3)*e[o]+3*bmPow(1-t,2)*t*n[o]+3*(1-t)*bmPow(t,2)*i[o]+bmPow(t,3)*r[o]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var n,i=t.length;for(n=0;nn&&(n=r)}n*=t.mult}else n=t.v*t.mult;e.x-=n,e.xMax+=n,e.y-=n,e.yMax+=n},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r;r=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var o=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)+Math.pow(r[2],2)),s=[r[0]/o,r[1]/o,r[2]/o],a=Math.sqrt(s[2]*s[2]+s[0]*s[0]),l=Math.atan2(s[1],a),c=Math.atan2(s[0],-s[2]);this.mat.rotateY(c).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var u=!this._prevMat.equals(this.mat);if((u||this.pe._mdf)&&this.comp.threeDElements){var d,p,h;for(e=this.comp.threeDElements.length,t=0;t=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var n,i,r=createTag("div");styleDiv(r);var o=createTag("div");if(styleDiv(o),"3d"===e){(n=r.style).width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px";n.webkitTransformOrigin="50% 50%",n.mozTransformOrigin="50% 50%",n.transformOrigin="50% 50%";var s="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=o.style).transform=s,i.webkitTransform=s}r.appendChild(o);var a={container:o,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(a),a},HybridRendererBase.prototype.build3dContainers=function(){var t,e,n=this.layers.length,i="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var n=0,i=this.threeDElements.length;ns?(t=r/this.globalData.compSize.w,e=r/this.globalData.compSize.w,n=0,i=(o-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(t=o/this.globalData.compSize.h,e=o/this.globalData.compSize.h,n=(r-this.globalData.compSize.w*(o/this.globalData.compSize.h))/2,i=0);var a=this.resizerElem.style;a.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+n+","+i+",0,1)",a.transform=a.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,n=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t=o;)t/=2,e/=2,n>>>=1;return(t+n)/e};return g.int32=function(){return 0|m.g(4)},g.quick=function(){return m.g(4)/4294967296},g.double=g,l(c(m.S),t),(d.pass||p||function(t,n,i,r){return r&&(r.S&&a(r,m),t.state=function(){return a(m,{})}),i?(e.random=t,n):t})(g,f,"global"in d?d.global:this==e,d.state)},l(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var n,i=t.length,r=[];for(n=0;nn){var i=n;n=e,e=i}return Math.min(Math.max(t,e),n)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var n;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),r=0;for(n=0;n.5?c/(2-s-a):c/(s+a),s){case i:e=(r-o)/c+(r1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t){var e,n,i,r=t[0],o=t[1],s=t[2];if(0===o)e=s,i=s,n=s;else{var a=s<.5?s*(1+o):s+o-s*o,l=2*s-a;e=hue2rgb(l,a,r+1/3),n=hue2rgb(l,a,r),i=hue2rgb(l,a,r-1/3)}return[e,n,i,t[3]]}function linear(t,e,n,i,r){if(void 0!==i&&void 0!==r||(i=e,r=n,e=0,n=1),n=n)return r;var s,a=n===e?0:(t-e)/(n-e);if(!i.length)return i+(r-i)*a;var l=i.length,c=createTypedArray("float32",l);for(s=0;s1){for(i=0;i1?e=1:e<0&&(e=0);var s=t(e);if($bm_isInstanceOfArray(r)){var a,l=r.length,c=createTypedArray("float32",l);for(a=0;adata.k[e].t&&tdata.k[e+1].t-t?(n=e+2,i=data.k[e+1].t):(n=e+1,i=data.k[e].t);break}}-1===n&&(n=e+1,i=data.k[e].t)}else n=0,i=0;var o={};return o.index=n,o.time=i/elem.comp.globalData.frameRate,o}function key(t){var e,n,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var r=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=r.length,n=0;nc.length-1)&&(e=c.length-1),i=u-(r=c[c.length-1-e].t)),"pingpong"===t){if(Math.floor((l-r)/i)%2!=0)return this.getValueAtTime((i-(l-r)%i+r)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var d=this.getValueAtTime(r/this.comp.globalData.frameRate,0),p=this.getValueAtTime(u/this.comp.globalData.frameRate,0),h=this.getValueAtTime(((l-r)%i+r)/this.comp.globalData.frameRate,0),f=Math.floor((l-r)/i);if(this.pv.length){for(s=(a=new Array(d.length)).length,o=0;o=u)return this.pv;if(n?r=u+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-u)):((!e||e>c.length-1)&&(e=c.length-1),i=(r=c[e].t)-u),"pingpong"===t){if(Math.floor((u-l)/i)%2==0)return this.getValueAtTime(((u-l)%i+u)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var d=this.getValueAtTime(u/this.comp.globalData.frameRate,0),p=this.getValueAtTime(r/this.comp.globalData.frameRate,0),h=this.getValueAtTime((i-(u-l)%i+u)/this.comp.globalData.frameRate,0),f=Math.floor((u-l)/i)+1;if(this.pv.length){for(s=(a=new Array(d.length)).length,o=0;o1?(r+t-o)/(e-1):1,a=0,l=0;for(n=this.pv.length?createTypedArray("float32",this.pv.length):0;as){var u=a,d=n.c&&a===l-1?0:a+1,p=(s-c)/o[a].addedLength;i=bez.getPointInSegment(n.v[u],n.v[d],n.o[u],n.i[d],p,o[a]);break}c+=o[a].addedLength,a+=1}return i||(i=n.c?[n.v[0][0],n.v[0][1]]:[n.v[n._length-1][0],n.v[n._length-1][1]]),i},vectorOnPath:function(t,e,n){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),r=this.pointOnPath(t+.001,e),o=r[0]-i[0],s=r[1]-i[1],a=Math.sqrt(Math.pow(o,2)+Math.pow(s,2));return 0===a?[0,0]:"tangent"===n?[o/a,s/a]:[-s/a,o/a]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],a),extendPrototype([c],l),l.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=c?h<0?i:r:i+p*Math.pow((o-t)/h,1/n),u[d]=s,d+=1,a+=256/255;return u.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,n=this.filterManager.effectElements;this.feFuncRComposed&&(t||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(e=this.getTableValue(n[3].p.v,n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(e=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(e=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(e=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(e=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var n=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,r=n*Math.cos(i),o=n*Math.sin(i);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",o)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,n){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=n,n.matteElement=createNS("g"),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}function SVGGaussianBlurEffect(t,e,n,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");r.setAttribute("result",i),t.appendChild(r),this.feGaussianBlur=r}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,n=_svgMatteSymbols.length;e(0,i.propOptionsGenerator)((t=>{const e=[...new Set(t.flatMap(t=>{var e;return null==t?[]:null!==(e=t.constructor)&&void 0!==e?e:[]}))];if(0!==e.length)return 1===e.length?e[0]:e})(t),e,(0,r.isOneOf)(t))},mSNy:function(t,e,n){"use strict";n.r(e),n.d(e,"i18n",(function(){return st})),n.d(e,"setI18nLanguage",(function(){return lt})),n.d(e,"loadLanguageAsync",(function(){return ut}));var i=n("14Xm"),r=n.n(i),o=n("4d7F"),s=n.n(o),a=n("D3Ub"),l=n.n(a),c=n("oCYn"),u=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function d(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var p=Array.isArray;function h(t){return null!==t&&"object"==typeof t}function f(t){return"string"==typeof t}var m=Object.prototype.toString;function g(t){return"[object Object]"===m.call(t)}function v(t){return null==t}function y(t){return"function"==typeof t}function b(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,i=null;return 1===t.length?h(t[0])||p(t[0])?i=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(h(t[1])||p(t[1]))&&(i=t[1])),{locale:n,params:i}}function _(t){return JSON.parse(JSON.stringify(t))}function x(t,e){return!!~t.indexOf(e)}var w=Object.prototype.hasOwnProperty;function k(t,e){return w.call(t,e)}function C(t){for(var e=arguments,n=Object(t),i=1;i/g,">").replace(/"/g,""").replace(/'/g,"'"))})),t}var T={beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n)if(t.i18n instanceof nt){if(t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach((function(t){e=C(e,JSON.parse(t))})),Object.keys(e).forEach((function(n){t.i18n.mergeLocaleMessage(n,e[n])}))}catch(t){0}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(g(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this.$root.$i18n:null;if(n&&(t.i18n.root=this.$root,t.i18n.formatter=n.formatter,t.i18n.fallbackLocale=n.fallbackLocale,t.i18n.formatFallbackMessages=n.formatFallbackMessages,t.i18n.silentTranslationWarn=n.silentTranslationWarn,t.i18n.silentFallbackWarn=n.silentFallbackWarn,t.i18n.pluralizationRules=n.pluralizationRules,t.i18n.preserveDirectiveContent=n.preserveDirectiveContent),t.__i18n)try{var i=t.i18n&&t.i18n.messages?t.i18n.messages:{};t.__i18n.forEach((function(t){i=C(i,JSON.parse(t))})),t.i18n.messages=i}catch(t){0}var r=t.i18n.sharedMessages;r&&g(r)&&(t.i18n.messages=C(t.i18n.messages,r)),this._i18n=new nt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}else 0;else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18n?{}:null),t.i18n?(t.i18n instanceof nt||g(t.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof nt||t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof nt)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},mounted:function(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)},beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick((function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}},A={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.data,i=e.parent,r=e.props,o=e.slots,s=i.$i18n;if(s){var a=r.path,l=r.locale,c=r.places,u=o(),d=s.i(a,l,function(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(u)||c?function(t,e){var n=e?function(t){0;return Array.isArray(t)?t.reduce(P,{}):Object.assign({},t)}(e):{};if(!t)return n;var i=(t=t.filter((function(t){return t.tag||""!==t.text.trim()}))).every(O);0;return t.reduce(i?M:P,n)}(u.default,c):u),p=r.tag&&!0!==r.tag||!1===r.tag?r.tag:"span";return p?t(p,n,d):d}}};function M(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function P(t,e,n){return t[n]=e,t}function O(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var D,I={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(t,e){var n=e.props,i=e.parent,r=e.data,o=i.$i18n;if(!o)return null;var s=null,a=null;f(n.format)?s=n.format:h(n.format)&&(n.format.key&&(s=n.format.key),a=Object.keys(n.format).reduce((function(t,e){var i;return x(u,e)?Object.assign({},t,((i={})[e]=n.format[e],i)):t}),null));var l=n.locale||o.locale,c=o._ntp(n.value,l,s,a),d=c.map((function(t,e){var n,i=r.scopedSlots&&r.scopedSlots[t.type];return i?i(((n={})[t.type]=t.value,n.index=e,n.parts=c,n)):t.value})),p=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return p?t(p,{attrs:r.attrs,class:r.class,staticClass:r.staticClass},d):d}};function $(t,e,n){R(t,n)&&L(t,e,n)}function N(t,e,n,i){if(R(t,n)){var r=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&S(e.value,e.oldValue)&&S(t._localeMessage,r.getLocaleMessage(r.locale))||L(t,e,n)}}function F(t,e,n,i){if(n.context){var r=n.context.$i18n||{};e.modifiers.preserve||r.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}else d("Vue instance does not exists in VNode context")}function R(t,e){var n=e.context;return n?!!n.$i18n||(d("VueI18n instance does not exists in Vue instance"),!1):(d("Vue instance does not exists in VNode context"),!1)}function L(t,e,n){var i,r,o=function(t){var e,n,i,r;f(t)?e=t:g(t)&&(e=t.path,n=t.locale,i=t.args,r=t.choice);return{path:e,locale:n,args:i,choice:r}}(e.value),s=o.path,a=o.locale,l=o.args,c=o.choice;if(s||a||l)if(s){var u=n.context;t._vt=t.textContent=null!=c?(i=u.$i18n).tc.apply(i,[s,c].concat(j(a,l))):(r=u.$i18n).t.apply(r,[s].concat(j(a,l))),t._locale=u.$i18n.locale,t._localeMessage=u.$i18n.getLocaleMessage(u.$i18n.locale)}else d("`path` is required in v-t directive");else d("value type not supported")}function j(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||g(e))&&n.push(e),n}function B(t){B.installed=!0;(D=t).version&&Number(D.version.split(".")[0]);(function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=this.$i18n;return i._t.apply(i,[t,i.locale,i._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];var r=this.$i18n;return r._tc.apply(r,[t,r.locale,r._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}})(D),D.mixin(T),D.directive("t",{bind:$,update:N,unbind:F}),D.component(A.name,A),D.component(I.name,I),D.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var V=function(){this._caches=Object.create(null)};V.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=function(t){var e=[],n=0,i="";for(;n0)d--,u=4,p[0]();else{if(d=0,void 0===n)return!1;if(!1===(n=U(n)))return!1;p[1]()}};null!==u;)if(c++,"\\"!==(e=t[c])||!h()){if(r=q(e),8===(o=(a=W[u])[r]||a.else||8))return;if(u=o[0],(s=p[o[1]])&&(i=void 0===(i=o[2])?e:i,!1===s()))return;if(7===u)return l}}(t))&&(this._cache[t]=e),e||[]},K.prototype.getPathValue=function(t,e){if(!h(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var i=n.length,r=t,o=0;o/,X=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,Q=/^@(?:\.([a-z]+))?:/,Z=/[()]/g,tt={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},et=new V,nt=function(t){var e=this;void 0===t&&(t={}),!D&&"undefined"!=typeof window&&window.Vue&&B(window.Vue);var n=t.locale||"en-US",i=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),r=t.messages||{},o=t.dateTimeFormats||{},s=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||et,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new K,this._dataListeners=new Set,this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,this.getChoiceIndex=function(t,n){var i=Object.getPrototypeOf(e);if(i&&i.getChoiceIndex)return i.getChoiceIndex.call(e,t,n);var r,o;return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):(r=t,o=n,r=Math.abs(r),2===o?r?r>1?1:0:1:r?Math.min(r,2):0)},this._exist=function(t,n){return!(!t||!n)&&(!v(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(r).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})),this._initVM({locale:n,fallbackLocale:i,messages:r,dateTimeFormats:o,numberFormats:s})},it={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0}};nt.prototype._checkLocaleMessage=function(t,e,n){var i=function(t,e,n,r){if(g(n))Object.keys(n).forEach((function(o){var s=n[o];g(s)?(r.push(o),r.push("."),i(t,e,s,r),r.pop(),r.pop()):(r.push(o),i(t,e,s,r),r.pop())}));else if(p(n))n.forEach((function(n,o){g(n)?(r.push("["+o+"]"),r.push("."),i(t,e,n,r),r.pop(),r.pop()):(r.push("["+o+"]"),i(t,e,n,r),r.pop())}));else if(f(n)){if(Y.test(n)){var o="Detected HTML in message '"+n+"' of keypath '"+r.join("")+"' at '"+e+"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?d(o):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(o)}}};i(e,t,n,[])},nt.prototype._initVM=function(t){var e=D.config.silent;D.config.silent=!0,this._vm=new D({data:t}),D.config.silent=e},nt.prototype.destroyVM=function(){this._vm.$destroy()},nt.prototype.subscribeDataChanging=function(t){this._dataListeners.add(t)},nt.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.delete(e));}(this._dataListeners,t)},nt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",(function(){for(var e,n,i=(e=t._dataListeners,n=[],e.forEach((function(t){return n.push(t)})),n),r=i.length;r--;)D.nextTick((function(){i[r]&&i[r].$forceUpdate()}))}),{deep:!0})},nt.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",(function(e){t.$set(t,"locale",e),t.$forceUpdate()}),{immediate:!0})},nt.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},it.vm.get=function(){return this._vm},it.messages.get=function(){return _(this._getMessages())},it.dateTimeFormats.get=function(){return _(this._getDateTimeFormats())},it.numberFormats.get=function(){return _(this._getNumberFormats())},it.availableLocales.get=function(){return Object.keys(this.messages).sort()},it.locale.get=function(){return this._vm.locale},it.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},it.fallbackLocale.get=function(){return this._vm.fallbackLocale},it.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},it.formatFallbackMessages.get=function(){return this._formatFallbackMessages},it.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},it.missing.get=function(){return this._missing},it.missing.set=function(t){this._missing=t},it.formatter.get=function(){return this._formatter},it.formatter.set=function(t){this._formatter=t},it.silentTranslationWarn.get=function(){return this._silentTranslationWarn},it.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},it.silentFallbackWarn.get=function(){return this._silentFallbackWarn},it.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},it.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},it.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},it.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},it.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var i=this._getMessages();Object.keys(i).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,i[t])}))}},it.postTranslation.get=function(){return this._postTranslation},it.postTranslation.set=function(t){this._postTranslation=t},nt.prototype._getMessages=function(){return this._vm.messages},nt.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},nt.prototype._getNumberFormats=function(){return this._vm.numberFormats},nt.prototype._warnDefault=function(t,e,n,i,r,o){if(!v(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,i,r]);if(f(s))return s}else 0;if(this._formatFallbackMessages){var a=b.apply(void 0,r);return this._render(e,o,a.params,e)}return e},nt.prototype._isFallbackRoot=function(t){return!t&&!v(this._root)&&this._fallbackRoot},nt.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},nt.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},nt.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},nt.prototype._interpolate=function(t,e,n,i,r,o,s){if(!e)return null;var a,l=this._path.getPathValue(e,n);if(p(l)||g(l))return l;if(v(l)){if(!g(e))return null;if(!f(a=e[n])&&!y(a))return null}else{if(!f(l)&&!y(l))return null;a=l}return f(a)&&(a.indexOf("@:")>=0||a.indexOf("@.")>=0)&&(a=this._link(t,e,a,i,"raw",o,s)),this._render(a,r,o,n)},nt.prototype._link=function(t,e,n,i,r,o,s){var a=n,l=a.match(X);for(var c in l)if(l.hasOwnProperty(c)){var u=l[c],d=u.match(Q),h=d[0],f=d[1],m=u.replace(h,"").replace(Z,"");if(x(s,m))return a;s.push(m);var g=this._interpolate(t,e,m,i,"raw"===r?"string":r,"raw"===r?void 0:o,s);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");var v=this._root.$i18n;g=v._translate(v._getMessages(),v.locale,v.fallbackLocale,m,i,r,o)}g=this._warnDefault(t,m,g,i,p(o)?o:[o],r),this._modifiers.hasOwnProperty(f)?g=this._modifiers[f](g):tt.hasOwnProperty(f)&&(g=tt[f](g)),s.pop(),a=g?a.replace(u,g):a}return a},nt.prototype._createMessageContext=function(t,e,n,i){var r=this,o=p(t)?t:[],s=h(t)?t:{},a=this._getMessages(),l=this.locale;return{list:function(t){return o[t]},named:function(t){return s[t]},values:t,formatter:e,path:n,messages:a,locale:l,linked:function(t){return r._interpolate(l,a[l]||{},t,null,i,void 0,[t])}}},nt.prototype._render=function(t,e,n,i){if(y(t))return t(this._createMessageContext(n,this._formatter||et,i,e));var r=this._formatter.interpolate(t,n,i);return r||(r=et.interpolate(t,n,i)),"string"!==e||f(r)?r:r.join("")},nt.prototype._appendItemToChain=function(t,e,n){var i=!1;return x(t,e)||(i=!0,e&&(i="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(i=n[e]))),i},nt.prototype._appendLocaleToChain=function(t,e,n){var i,r=e.split("-");do{var o=r.join("-");i=this._appendItemToChain(t,o,n),r.splice(-1,1)}while(r.length&&!0===i);return i},nt.prototype._appendBlockToChain=function(t,e,n){for(var i=!0,r=0;r0;)o[s]=arguments[s+4];if(!t)return"";var a=b.apply(void 0,o);this._escapeParameterHtml&&(a.params=E(a.params));var l=a.locale||e,c=this._translate(n,l,this.fallbackLocale,t,i,"string",a.params);if(this._isFallbackRoot(c)){if(!this._root)throw Error("unexpected error");return(r=this._root).$t.apply(r,[t].concat(o))}return c=this._warnDefault(l,t,c,i,o,"string"),this._postTranslation&&null!=c&&(c=this._postTranslation(c,t)),c},nt.prototype.t=function(t){for(var e,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},nt.prototype._i=function(t,e,n,i,r){var o=this._translate(n,e,this.fallbackLocale,t,i,"raw",r);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,r)}return this._warnDefault(e,t,o,i,[r],"raw")},nt.prototype.i=function(t,e,n){return t?(f(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},nt.prototype._tc=function(t,e,n,i,r){for(var o,s=[],a=arguments.length-5;a-- >0;)s[a]=arguments[a+5];if(!t)return"";void 0===r&&(r=1);var l={count:r,n:r},c=b.apply(void 0,s);return c.params=Object.assign(l,c.params),s=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((o=this)._t.apply(o,[t,e,n,i].concat(s)),r)},nt.prototype.fetchChoice=function(t,e){if(!t||!f(t))return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},nt.prototype.tc=function(t,e){for(var n,i=[],r=arguments.length-2;r-- >0;)i[r]=arguments[r+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(i))},nt.prototype._te=function(t,e,n){for(var i=[],r=arguments.length-3;r-- >0;)i[r]=arguments[r+3];var o=b.apply(void 0,i).locale||e;return this._exist(n[o],t)},nt.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},nt.prototype.getLocaleMessage=function(t){return _(this._vm.messages[t]||{})},nt.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},nt.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,C(void 0!==this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},this._vm.messages[t]):{},e))},nt.prototype.getDateTimeFormat=function(t){return _(this._vm.dateTimeFormats[t]||{})},nt.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},nt.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,C(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},nt.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var i=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(i)&&delete this._dateTimeFormatters[i]}},nt.prototype._localizeDateTime=function(t,e,n,i,r){for(var o=e,s=i[o],a=this._getLocaleChain(e,n),l=0;l0;)e[n]=arguments[n+1];var i=this.locale,r=null;return 1===e.length?f(e[0])?r=e[0]:h(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(r=e[0].key)):2===e.length&&(f(e[0])&&(r=e[0]),f(e[1])&&(i=e[1])),this._d(t,i,r)},nt.prototype.getNumberFormat=function(t){return _(this._vm.numberFormats[t]||{})},nt.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},nt.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,C(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},nt.prototype._clearNumberFormat=function(t,e){for(var n in e){var i=t+"__"+n;this._numberFormatters.hasOwnProperty(i)&&delete this._numberFormatters[i]}},nt.prototype._getNumberFormatter=function(t,e,n,i,r,o){for(var s=e,a=i[s],l=this._getLocaleChain(e,n),c=0;c0;)e[n]=arguments[n+1];var i=this.locale,r=null,o=null;return 1===e.length?f(e[0])?r=e[0]:h(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(r=e[0].key),o=Object.keys(e[0]).reduce((function(t,n){var i;return x(u,n)?Object.assign({},t,((i={})[n]=e[0][n],i)):t}),null)):2===e.length&&(f(e[0])&&(r=e[0]),f(e[1])&&(i=e[1])),this._n(t,i,r,o)},nt.prototype._ntp=function(t,e,n,i){if(!nt.availabilities.numberFormat)return[];if(!n)return(i?new Intl.NumberFormat(e,i):new Intl.NumberFormat(e)).formatToParts(t);var r=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,i),o=r&&r.formatToParts(t);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,i)}return o||[]},Object.defineProperties(nt.prototype,it),Object.defineProperty(nt,"availabilities",{get:function(){if(!J){var t="undefined"!=typeof Intl;J={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return J}}),nt.install=B,nt.version="8.25.0";var rt=nt,ot=n("ZY75");c.default.use(rt);var st=new rt({locale:"en-US",fallbackLocale:"en-US",formatFallbackMessages:!0,silentTranslationWarn:!0,messages:{en:ot.default}}),at=["en-US"];function lt(t){return st.locale=t,t}var ct,ut=(ct=l()(r.a.mark((function t(e){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(st.locale!==e){t.next=2;break}return t.abrupt("return",s.a.resolve(lt(e)));case 2:if(!at.includes(e)){t.next=4;break}return t.abrupt("return",s.a.resolve(lt(e)));case 4:return t.abrupt("return",n("y2OS")("./"+e+".js").then((function(t){return st.setLocaleMessage(e,t.default),at.push(e),lt(e)})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return ct.apply(this,arguments)})},ma6Y:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.oneOfObjectKeysProp=void 0;const i=n("m7fW");e.oneOfObjectKeysProp=(t,e)=>(0,i.oneOfProp)(Object.keys(t),e)},mqlF:function(t,e){e.f=Object.getOwnPropertySymbols},mtFF:function(t,e,n){"use strict";n("iFSW")},n3ko:function(t,e,n){var i=n("93I4");t.exports=function(t,e){if(!i(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},nX6K:function(t,e,n){"use strict";e.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t){return function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),s=1;st.match(d),f=(t,e)=>e?"https://www.youtube-nocookie.com/embed/videoseries?list=":t?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",m=u.d.create({name:"youtube",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640,rel:1}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-youtube-video] iframe"}],addCommands(){return{setYoutubeVideo:t=>({commands:e})=>!!h(t.src)&&e.insertContent({type:this.name,attrs:t})}},addPasteRules(){return this.options.addPasteHandler?[Object(u.C)({find:p,type:this.type,getAttributes:t=>({src:t.input})})]:[]},renderHTML({HTMLAttributes:t}){const e=(t=>{const{url:e,allowFullscreen:n,autoplay:i,ccLanguage:r,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:p,modestBranding:m,nocookie:g,origin:v,playlist:y,progressBarColor:b,startAt:_,rel:x}=t;if(!h(e))return null;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){const t=e.split("/").pop();return t?`${f(g)}${t}`:null}const w=/(?:(v|list)=|shorts\/)([-\w]+)/gm.exec(e);if(!w||!w[2])return null;let k=`${f(g,"list"===w[1])}${w[2]}`;const C=[];return!1===n&&C.push("fs=0"),i&&C.push("autoplay=1"),r&&C.push("cc_lang_pref="+r),o&&C.push("cc_load_policy=1"),s||C.push("controls=0"),a&&C.push("disablekb=1"),l&&C.push("enablejsapi=1"),c&&C.push("end="+c),u&&C.push("hl="+u),d&&C.push("iv_load_policy="+d),p&&C.push("loop=1"),m&&C.push("modestbranding=1"),v&&C.push("origin="+v),y&&C.push("playlist="+y),_&&C.push("start="+_),b&&C.push("color="+b),void 0!==x&&C.push("rel="+x),C.length&&(k+=`${"list"===w[1]?"&":"?"}${C.join("&")}`),k})({url:t.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:t.start||0,rel:this.options.rel});return t.src=e,["div",{"data-youtube-video":""},["iframe",Object(u.A)(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,rel:this.options.rel},t)]]},...Object(u.j)({nodeName:"youtube",allowedAttributes:["src","width","height","start"]})}),g=n("u/5A"),v=n("8aD0"),y=n("QbLZ"),b=n.n(y),_=n("usTV"),x=n("pMYU"),w=["alternate-rows","bordered","dashed"],k={bordered:["dashed"],dashed:["bordered"]};function C(t){return(""+(t||"")).split(/\s+/).filter(Boolean).join(" ")||null}function S(t){var e=C(t);return e?e.split(" "):[]}function E(t,e){var n=S(t).filter((function(t){return t!==e})),i=k[e]||[],r=n.filter((function(t){return-1===i.indexOf(t)}));return-1===S(t).indexOf(e)&&r.push(e),C(r.join(" "))}function T(t){return function(e){var n=e.state,i=e.dispatch,r=function(t){if(!t||!t.selection)return null;var e=t.selection;if(e.node&&e.node.type&&"table"===e.node.type.name)return{node:e.node,pos:e.from};if(!e.$from)return null;for(var n=e.$from.depth;n>0;n-=1){var i=e.$from.node(n);if(i&&i.type&&"table"===i.type.name)return{node:i,pos:e.$from.before(n)}}return null}(n);if(!r)return!1;var o=E(r.node.attrs.class,t),s=b()({},r.node.attrs,{class:o});return o||delete s.class,i&&i(n.tr.setNodeMarkup(r.pos,void 0,s)),!0}}function A(t,e){var n=S(e&&e.attrs?e.attrs.class:null),i=S(t.className).filter((function(t){return-1===w.indexOf(t)})),o=C([].concat(r()(i),r()(n)).join(" "));t.className=o||""}function M(t,e){var n=new l.e(t,e);return A(n.table,t),{dom:n.dom,contentDOM:n.contentDOM,update:function(t){var e=n.update(t);return e&&A(n.table,t),e},ignoreMutation:function(t){return n.ignoreMutation(t)},destroy:function(){"function"==typeof n.destroy&&n.destroy()}}}var P=l.a.extend({addOptions:function(){var t="function"==typeof this.parent?this.parent():{};return b()({},t,{View:M})},addAttributes:function(){var t="function"==typeof this.parent?this.parent():{};return b()({},t,{class:{default:null,parseHTML:function(t){return C(t.getAttribute("class"))},renderHTML:function(t){var e=C(t.class);return e?{class:e}:{}}}})},addCommands:function(){var t="function"==typeof this.parent?this.parent():{};return b()({},t,{insertTable:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.rows,n=void 0===e?3:e,i=t.cols,r=void 0===i?3:i,o=t.withHeaderRow,s=void 0===o||o;return function(t){var e=t.tr,i=t.dispatch,o=t.editor,a=Object(l.f)(o.schema,n,r,s),c=a.type.createChecked(b()({},a.attrs,{class:E(a.attrs.class,"bordered")}),a.content,a.marks);if(i){var u=e.selection.from+1;e.replaceSelectionWith(c).scrollIntoView().setSelection(_.TextSelection.near(e.doc.resolve(u)))}return!0}},setTableCellBackgroundColor:function(t){return function(e){var n=e.commands,i=Object(x.d)(t);return!!i&&n.setCellAttribute(x.c,i)}},unsetTableCellBackgroundColor:function(){return function(t){return t.commands.setCellAttribute(x.c,null)}},toggleTableAlternateRows:function(){return T("alternate-rows")},toggleTableBordered:function(){return T("bordered")},toggleTableDashed:function(){return T("dashed")}})}}),O=n("jEQI"),D=n("6HaS");function I(t,e){return!t||!1!==t[e]}function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e||t.editorFeatures||{},i=[a.a.configure({blockquote:!1,dropcursor:{color:"var(--dte-focus-ring)",width:3},heading:{levels:[2,3]},link:{openOnClick:!1,HTMLAttributes:{target:"_blank"}}}),s.a.configure({placeholder:t.placeholder||"",showOnlyCurrent:!1}),O.a].concat(r()(Object(v.e)()),[P.configure({resizable:!1,renderWrapper:!0,handleWidth:5,cellMinWidth:25,lastColumnResizable:!0,allowTableNodeSelection:!0}),l.d,x.b,x.a,c.a.configure({types:["heading","paragraph"],defaultAlignment:g.b})]);return I(n,"youtube")&&i.push(m.configure({width:585,height:329,allowFullscreen:!0,nocookie:!1,HTMLAttributes:{class:"dte-youtube-embed"}})),I(n,"discussionQuote")&&i.push(Object(D.b)()),I(n,"spoiler")&&i.push(Object(D.e)()),I(n,"mediaUpload")&&i.push(Object(D.a)(t)),I(n,"youtubeAutoEmbed")&&i.push(Object(D.d)(t)),new o.a({content:t.prepareIncomingHtml(t.value),extensions:i,onCreate:function(e){var n=e.editor;t.handleEditorCreate(n)},onUpdate:function(e){var n=e.editor;t.handleEditorUpdate(n)},onSelectionUpdate:function(e){var n=e.editor;t.handleEditorSelectionUpdate(n)},onTransaction:function(e){var n=e.editor,i=e.transaction;t.handleEditorTransaction(n,i)}})}},o8NH:function(t,e,n){var i=n("Y7ZC");i(i.S+i.F,"Object",{assign:n("kwZ1")})},oCYn:function(t,e,n){"use strict";n.r(e),function(t){var n=Object.freeze({});function i(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return null!==t&&"object"==typeof t}var l=Object.prototype.toString;function c(t){return"[object Object]"===l.call(t)}function u(t){return"[object RegExp]"===l.call(t)}function d(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),i=t.split(","),r=0;r-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function _(t,e){return b.call(t,e)}function x(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,k=x((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),C=x((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),S=/\B([A-Z])/g,E=x((function(t){return t.replace(S,"-$1").toLowerCase()}));var T=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function A(t,e){e=e||0;for(var n=t.length-e,i=new Array(n);n--;)i[n]=t[n+e];return i}function M(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n0,Q=J&&J.indexOf("edge/")>0,Z=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),tt=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),et={}.watch,nt=!1;if(q)try{var it={};Object.defineProperty(it,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,it)}catch(t){}var rt=function(){return void 0===W&&(W=!q&&!U&&void 0!==t&&(t.process&&"server"===t.process.env.VUE_ENV)),W},ot=q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,lt="undefined"!=typeof Symbol&&st(Symbol)&&"undefined"!=typeof Reflect&&st(Reflect.ownKeys);at="undefined"!=typeof Set&&st(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ct=O,ut=0,dt=function(){this.id=ut++,this.subs=[]};dt.prototype.addSub=function(t){this.subs.push(t)},dt.prototype.removeSub=function(t){y(this.subs,t)},dt.prototype.depend=function(){dt.target&&dt.target.addDep(this)},dt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(o&&!_(r,"default"))s=!1;else if(""===s||s===E(t)){var l=zt(String,r.type);(l<0||a0&&(de((l=t(l,(n||"")+"_"+a))[0])&&de(u)&&(d[c]=yt(u.text+l[0].text),l.shift()),d.push.apply(d,l)):s(l)?de(u)?d[c]=yt(u.text+l):""!==l&&d.push(yt(l)):de(l)&&de(u)?d[c]=yt(u.text+l.text):(o(e._isVList)&&r(l.tag)&&i(l.key)&&r(n)&&(l.key="__vlist"+n+"_"+a+"__"),d.push(l)));return d}(t):void 0}function de(t){return r(t)&&r(t.text)&&!1===t.isComment}function pe(t,e){if(t){for(var n=Object.create(null),i=lt?Reflect.ownKeys(t):Object.keys(t),r=0;r0,s=t?!!t.$stable:!o,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&i&&i!==n&&a===i.$key&&!o&&!i.$hasNormal)return i;for(var l in r={},t)t[l]&&"$"!==l[0]&&(r[l]=ge(e,l,t[l]))}else r={};for(var c in e)c in r||(r[c]=ve(e,c));return t&&Object.isExtensible(t)&&(t._normalized=r),z(r,"$stable",s),z(r,"$key",a),z(r,"$hasNormal",o),r}function ge(t,e,n){var i=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ue(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:i,enumerable:!0,configurable:!0}),i}function ve(t,e){return function(){return t[e]}}function ye(t,e){var n,i,o,s,l;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),i=0,o=t.length;idocument.createEvent("Event").timeStamp&&(cn=function(){return un.now()})}function dn(){var t,e;for(ln=cn(),sn=!0,en.sort((function(t,e){return t.id-e.id})),an=0;anan&&en[n].id>t.id;)n--;en.splice(n+1,0,t)}else en.push(t);on||(on=!0,ne(dn))}}(this)},hn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||a(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Ht(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},hn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},hn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},hn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var fn={enumerable:!0,configurable:!0,get:O,set:O};function mn(t,e,n){fn.get=function(){return this[e][n]},fn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,fn)}function gn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},i=t._props={},r=t.$options._propKeys=[];t.$parent&&Ct(!1);var o=function(o){r.push(o);var s=jt(o,e,n,t);Tt(i,o,s),o in t||mn(t,"_props",o)};for(var s in e)o(s);Ct(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?O:T(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){ht();try{return t.call(e,e)}catch(t){return Ht(t,e,"data()"),{}}finally{ft()}}(e,t):e||{})||(e={});var n=Object.keys(e),i=t.$options.props,r=(t.$options.methods,n.length);for(;r--;){var o=n[r];0,i&&_(i,o)||V(o)||mn(t,"_data",o)}Et(e,!0)}(t):Et(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),i=rt();for(var r in e){var o=e[r],s="function"==typeof o?o:o.get;0,i||(n[r]=new hn(t,s||O,O,vn)),r in t||yn(t,r,o)}}(t,e.computed),e.watch&&e.watch!==et&&function(t,e){for(var n in e){var i=e[n];if(Array.isArray(i))for(var r=0;r-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!u(t)&&t.test(e)}function An(t,e){var n=t.cache,i=t.keys,r=t._vnode;for(var o in n){var s=n[o];if(s){var a=En(s.componentOptions);a&&!e(a)&&Mn(n,o,i,r)}}}function Mn(t,e,n,i){var r=t[e];!r||i&&r.tag===i.tag||r.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=wn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),i=e._parentVnode;n.parent=e.parent,n._parentVnode=i;var r=i.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Rt(kn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Je(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,i=t.$vnode=e._parentVnode,r=i&&i.context;t.$slots=he(e._renderChildren,r),t.$scopedSlots=n,t._c=function(e,n,i,r){return Be(t,e,n,i,r,!1)},t.$createElement=function(e,n,i,r){return Be(t,e,n,i,r,!0)};var o=i&&i.data;Tt(t,"$attrs",o&&o.attrs||n,null,!0),Tt(t,"$listeners",e._parentListeners||n,null,!0)}(e),tn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(Ct(!1),Object.keys(e).forEach((function(n){Tt(t,n,e[n])})),Ct(!0))}(e),gn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),tn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Cn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=At,t.prototype.$delete=Mt,t.prototype.$watch=function(t,e,n){if(c(e))return xn(this,t,e,n);(n=n||{}).user=!0;var i=new hn(this,t,e,n);if(n.immediate)try{e.call(this,i.value)}catch(t){Ht(t,this,'callback for immediate watcher "'+i.expression+'"')}return function(){i.teardown()}}}(Cn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var i=this;if(Array.isArray(t))for(var r=0,o=t.length;r1?A(n):n;for(var i=A(arguments,1),r='event handler for "'+t+'"',o=0,s=n.length;oparseInt(this.max)&&Mn(s,a[0],a,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return j}};Object.defineProperty(t,"config",e),t.util={warn:ct,extend:M,mergeOptions:Rt,defineReactive:Tt},t.set=At,t.delete=Mt,t.nextTick=ne,t.observable=function(t){return Et(t),t},t.options=Object.create(null),R.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,M(t.options.components,On),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=A(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Rt(this.options,t),this}}(t),Sn(t),function(t){R.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Cn),Object.defineProperty(Cn.prototype,"$isServer",{get:rt}),Object.defineProperty(Cn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cn,"FunctionalRenderContext",{value:Ie}),Cn.version="2.6.12";var Dn=m("style,class"),In=m("input,textarea,option,select,progress"),$n=function(t,e,n){return"value"===n&&In(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Nn=m("contenteditable,draggable,spellcheck"),Fn=m("events,caret,typing,plaintext-only"),Rn=m("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,translate,truespeed,typemustmatch,visible"),Ln="http://www.w3.org/1999/xlink",jn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Bn=function(t){return jn(t)?t.slice(6,t.length):""},Vn=function(t){return null==t||!1===t};function zn(t){for(var e=t.data,n=t,i=t;r(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(e=Hn(i.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Hn(e,n.data));return function(t,e){if(r(t)||r(e))return Wn(t,Gn(e));return""}(e.staticClass,e.class)}function Hn(t,e){return{staticClass:Wn(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Wn(t,e){return t?e?t+" "+e:t:e||""}function Gn(t){return Array.isArray(t)?function(t){for(var e,n="",i=0,o=t.length;i-1?gi(t,e,n):Rn(e)?Vn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Nn(e)?t.setAttribute(e,function(t,e){return Vn(e)||"false"===e?"false":"contenteditable"===t&&Fn(e)?e:"true"}(e,n)):jn(e)?Vn(n)?t.removeAttributeNS(Ln,Bn(e)):t.setAttributeNS(Ln,e,n):gi(t,e,n)}function gi(t,e,n){if(Vn(n))t.removeAttribute(e);else{if(Y&&!X&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var i=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",i)};t.addEventListener("input",i),t.__ieph=!0}t.setAttribute(e,n)}}var vi={create:fi,update:fi};function yi(t,e){var n=e.elm,o=e.data,s=t.data;if(!(i(o.staticClass)&&i(o.class)&&(i(s)||i(s.staticClass)&&i(s.class)))){var a=zn(e),l=n._transitionClasses;r(l)&&(a=Wn(a,Gn(l))),a!==n._prevClass&&(n.setAttribute("class",a),n._prevClass=a)}}var bi,_i,xi,wi,ki,Ci,Si={create:yi,update:yi},Ei=/[\w).+\-_$\]]/;function Ti(t){var e,n,i,r,o,s=!1,a=!1,l=!1,c=!1,u=0,d=0,p=0,h=0;for(i=0;i=0&&" "===(m=t.charAt(f));f--);m&&Ei.test(m)||(c=!0)}}else void 0===r?(h=i+1,r=t.slice(0,i).trim()):g();function g(){(o||(o=[])).push(t.slice(h,i).trim()),h=i+1}if(void 0===r?r=t.slice(0,i).trim():0!==h&&g(),o)for(i=0;i-1?{exp:t.slice(0,wi),key:'"'+t.slice(wi+1)+'"'}:{exp:t,key:null};_i=t,wi=ki=Ci=0;for(;!Wi();)Gi(xi=Hi())?Ui(xi):91===xi&&qi(xi);return{exp:t.slice(0,ki),key:t.slice(ki+1,Ci)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Hi(){return _i.charCodeAt(++wi)}function Wi(){return wi>=bi}function Gi(t){return 34===t||39===t}function qi(t){var e=1;for(ki=wi;!Wi();)if(Gi(t=Hi()))Ui(t);else if(91===t&&e++,93===t&&e--,0===e){Ci=wi;break}}function Ui(t){for(var e=t;!Wi()&&(t=Hi())!==e;);}var Ki;function Ji(t,e,n){var i=Ki;return function r(){var o=e.apply(null,arguments);null!==o&&Qi(t,r,n,i)}}var Yi=Kt&&!(tt&&Number(tt[1])<=53);function Xi(t,e,n,i){if(Yi){var r=ln,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=r||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}Ki.addEventListener(t,e,nt?{capture:n,passive:i}:n)}function Qi(t,e,n,i){(i||Ki).removeEventListener(t,e._wrapper||e,n)}function Zi(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ki=e.elm,function(t){if(r(t.__r)){var e=Y?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}r(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),ae(n,o,Xi,Qi,Ji,e.context),Ki=void 0}}var tr,er={create:Zi,update:Zi};function nr(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,o,s=e.elm,a=t.data.domProps||{},l=e.data.domProps||{};for(n in r(l.__ob__)&&(l=e.data.domProps=M({},l)),a)n in l||(s[n]="");for(n in l){if(o=l[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===a[n])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===n&&"PROGRESS"!==s.tagName){s._value=o;var c=i(o)?"":String(o);ir(s,c)&&(s.value=c)}else if("innerHTML"===n&&Kn(s.tagName)&&i(s.innerHTML)){(tr=tr||document.createElement("div")).innerHTML=""+o+"";for(var u=tr.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}else if(o!==a[n])try{s[n]=o}catch(t){}}}}function ir(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,i=t._vModifiers;if(r(i)){if(i.number)return f(n)!==f(e);if(i.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var rr={create:nr,update:nr},or=x((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var i=t.split(n);i.length>1&&(e[i[0].trim()]=i[1].trim())}})),e}));function sr(t){var e=ar(t.style);return t.staticStyle?M(t.staticStyle,e):e}function ar(t){return Array.isArray(t)?P(t):"string"==typeof t?or(t):t}var lr,cr=/^--/,ur=/\s*!important$/,dr=function(t,e,n){if(cr.test(e))t.style.setProperty(e,n);else if(ur.test(n))t.style.setProperty(E(e),n.replace(ur,""),"important");else{var i=hr(e);if(Array.isArray(n))for(var r=0,o=n.length;r-1?e.split(gr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function yr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(gr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",i=" "+e+" ";n.indexOf(i)>=0;)n=n.replace(i," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function br(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&M(e,_r(t.name||"v")),M(e,t),e}return"string"==typeof t?_r(t):void 0}}var _r=x((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),xr=q&&!X,wr="transition",kr="transitionend",Cr="animation",Sr="animationend";xr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(wr="WebkitTransition",kr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Cr="WebkitAnimation",Sr="webkitAnimationEnd"));var Er=q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Tr(t){Er((function(){Er(t)}))}function Ar(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),vr(t,e))}function Mr(t,e){t._transitionClasses&&y(t._transitionClasses,e),yr(t,e)}function Pr(t,e,n){var i=Dr(t,e),r=i.type,o=i.timeout,s=i.propCount;if(!r)return n();var a="transition"===r?kr:Sr,l=0,c=function(){t.removeEventListener(a,u),n()},u=function(e){e.target===t&&++l>=s&&c()};setTimeout((function(){l0&&(n="transition",u=s,d=o.length):"animation"===e?c>0&&(n="animation",u=c,d=l.length):d=(n=(u=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?o.length:l.length:0,{type:n,timeout:u,propCount:d,hasTransform:"transition"===n&&Or.test(i[wr+"Property"])}}function Ir(t,e){for(;t.length1}function jr(t,e){!0!==e.data.show&&Nr(e)}var Br=function(t){var e,n,a={},l=t.modules,c=t.nodeOps;for(e=0;ef?b(t,i(n[v+1])?null:n[v+1].elm,n,h,v,o):h>v&&x(e,p,f)}(p,m,v,n,u):r(v)?(r(t.text)&&c.setTextContent(p,""),b(p,null,v,0,v.length-1,n)):r(m)?x(m,0,m.length-1):r(t.text)&&c.setTextContent(p,""):t.text!==e.text&&c.setTextContent(p,e.text),r(f)&&r(h=f.hook)&&r(h=h.postpatch)&&h(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i-1,s.selected!==o&&(s.selected=o);else if($(Gr(s),i))return void(t.selectedIndex!==a&&(t.selectedIndex=a));r||(t.selectedIndex=-1)}}function Wr(t,e){return e.every((function(e){return!$(e,t)}))}function Gr(t){return"_value"in t?t._value:t.value}function qr(t){t.target.composing=!0}function Ur(t){t.target.composing&&(t.target.composing=!1,Kr(t.target,"input"))}function Kr(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Jr(t){return!t.componentInstance||t.data&&t.data.transition?t:Jr(t.componentInstance._vnode)}var Yr={model:Vr,show:{bind:function(t,e,n){var i=e.value,r=(n=Jr(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;i&&r?(n.data.show=!0,Nr(n,(function(){t.style.display=o}))):t.style.display=i?o:"none"},update:function(t,e,n){var i=e.value;!i!=!e.oldValue&&((n=Jr(n)).data&&n.data.transition?(n.data.show=!0,i?Nr(n,(function(){t.style.display=t.__vOriginalDisplay})):Fr(n,(function(){t.style.display="none"}))):t.style.display=i?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,i,r){r||(t.style.display=t.__vOriginalDisplay)}}},Xr={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 Qr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Qr(Ge(e.children)):t}function Zr(t){var e={},n=t.$options;for(var i in n.propsData)e[i]=t[i];var r=n._parentListeners;for(var o in r)e[k(o)]=r[o];return e}function to(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var eo=function(t){return t.tag||We(t)},no=function(t){return"show"===t.name},io={name:"transition",props:Xr,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(eo)).length){0;var i=this.mode;0;var r=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return r;var o=Qr(r);if(!o)return r;if(this._leaving)return to(t,r);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=Zr(this),c=this._vnode,u=Qr(c);if(o.data.directives&&o.data.directives.some(no)&&(o.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,u)&&!We(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=M({},l);if("out-in"===i)return this._leaving=!0,le(d,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),to(t,r);if("in-out"===i){if(We(o))return c;var p,h=function(){p()};le(l,"afterEnter",h),le(l,"enterCancelled",h),le(d,"delayLeave",(function(t){p=t}))}}return r}}},ro=M({tag:String,moveClass:String},Xr);function oo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function so(t){t.data.newPos=t.elm.getBoundingClientRect()}function ao(t){var e=t.data.pos,n=t.data.newPos,i=e.left-n.left,r=e.top-n.top;if(i||r){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+i+"px,"+r+"px)",o.transitionDuration="0s"}}delete ro.mode;var lo={Transition:io,TransitionGroup:{props:ro,beforeMount:function(){var t=this,e=this._update;this._update=function(n,i){var r=Xe(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,r(),e.call(t,n,i)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,r=this.$slots.default||[],o=this.children=[],s=Zr(this),a=0;a-1?Xn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Xn[t]=/HTMLUnknownElement/.test(e.toString())},M(Cn.options.directives,Yr),M(Cn.options.components,lo),Cn.prototype.__patch__=q?Br:O,Cn.prototype.$mount=function(t,e){return function(t,e,n){var i;return t.$el=e,t.$options.render||(t.$options.render=vt),tn(t,"beforeMount"),i=function(){t._update(t._render(),n)},new hn(t,i,O,{before:function(){t._isMounted&&!t._isDestroyed&&tn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,tn(t,"mounted")),t}(this,t=t&&q?Zn(t):void 0,e)},q&&setTimeout((function(){j.devtools&&ot&&ot.emit("init",Cn)}),0);var co=/\{\{((?:.|\r?\n)+?)\}\}/g,uo=/[-.*+?^${}()|[\]\/\\]/g,po=x((function(t){var e=t[0].replace(uo,"\\$&"),n=t[1].replace(uo,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var ho={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Li(t,"class");n&&(t.staticClass=JSON.stringify(n));var i=Ri(t,"class",!1);i&&(t.classBinding=i)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var fo,mo={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Li(t,"style");n&&(t.staticStyle=JSON.stringify(or(n)));var i=Ri(t,"style",!1);i&&(t.styleBinding=i)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},go=function(t){return(fo=fo||document.createElement("div")).innerHTML=t,fo.textContent},vo=m("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),yo=m("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),bo=m("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),_o=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,wo="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+B.source+"]*",ko="((?:"+wo+"\\:)?"+wo+")",Co=new RegExp("^<"+ko),So=/^\s*(\/?)>/,Eo=new RegExp("^<\\/"+ko+"[^>]*>"),To=/^]+>/i,Ao=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,$o=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,No=m("pre,textarea",!0),Fo=function(t,e){return t&&No(t)&&"\n"===e[0]};function Ro(t,e){var n=e?$o:Io;return t.replace(n,(function(t){return Do[t]}))}var Lo,jo,Bo,Vo,zo,Ho,Wo,Go,qo=/^@|^v-on:/,Uo=/^v-|^@|^:|^#/,Ko=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Jo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Yo=/^\(|\)$/g,Xo=/^\[.*\]$/,Qo=/:(.*)$/,Zo=/^:|^\.|^v-bind:/,ts=/\.[^.\]]+(?=[^\]]*$)/g,es=/^v-slot(:|$)|^#/,ns=/[\r\n]/,is=/\s+/g,rs=x(go);function os(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:ps(e),rawAttrsMap:{},parent:n,children:[]}}function ss(t,e){Lo=e.warn||Mi,Ho=e.isPreTag||D,Wo=e.mustUseProp||D,Go=e.getTagNamespace||D;var n=e.isReservedTag||D;(function(t){return!!t.component||!n(t.tag)}),Bo=Pi(e.modules,"transformNode"),Vo=Pi(e.modules,"preTransformNode"),zo=Pi(e.modules,"postTransformNode"),jo=e.delimiters;var i,r,o=[],s=!1!==e.preserveWhitespace,a=e.whitespace,l=!1,c=!1;function u(t){if(d(t),l||t.processed||(t=as(t,e)),o.length||t===i||i.if&&(t.elseif||t.else)&&cs(i,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)s=t,(a=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children))&&a.if&&cs(a,{exp:s.elseif,block:s});else{if(t.slotScope){var n=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[n]=t}r.children.push(t),t.parent=r}var s,a;t.children=t.children.filter((function(t){return!t.slotScope})),d(t),t.pre&&(l=!1),Ho(t.tag)&&(c=!1);for(var u=0;u]*>)","i")),p=t.replace(d,(function(t,n,i){return c=i.length,Po(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),Fo(u,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));l+=t.length-p.length,t=p,E(u,l-c,l)}else{var h=t.indexOf("<");if(0===h){if(Ao.test(t)){var f=t.indexOf("--\x3e");if(f>=0){e.shouldKeepComment&&e.comment(t.substring(4,f),l,l+f+3),k(f+3);continue}}if(Mo.test(t)){var m=t.indexOf("]>");if(m>=0){k(m+2);continue}}var g=t.match(To);if(g){k(g[0].length);continue}var v=t.match(Eo);if(v){var y=l;k(v[0].length),E(v[1],y,l);continue}var b=C();if(b){S(b),Fo(b.tagName,t)&&k(1);continue}}var _=void 0,x=void 0,w=void 0;if(h>=0){for(x=t.slice(h);!(Eo.test(x)||Co.test(x)||Ao.test(x)||Mo.test(x)||(w=x.indexOf("<",1))<0);)h+=w,x=t.slice(h);_=t.substring(0,h)}h<0&&(_=t),_&&k(_.length),e.chars&&_&&e.chars(_,l-_.length,l)}if(t===n){e.chars&&e.chars(t);break}}function k(e){l+=e,t=t.substring(e)}function C(){var e=t.match(Co);if(e){var n,i,r={tagName:e[1],attrs:[],start:l};for(k(e[0].length);!(n=t.match(So))&&(i=t.match(xo)||t.match(_o));)i.start=l,k(i[0].length),i.end=l,r.attrs.push(i);if(n)return r.unarySlash=n[1],k(n[0].length),r.end=l,r}}function S(t){var n=t.tagName,l=t.unarySlash;o&&("p"===i&&bo(n)&&E(i),a(n)&&i===n&&E(n));for(var c=s(n)||!!l,u=t.attrs.length,d=new Array(u),p=0;p=0&&r[s].lowerCasedTag!==a;s--);else s=0;if(s>=0){for(var c=r.length-1;c>=s;c--)e.end&&e.end(r[c].tag,n,o);r.length=s,i=s&&r[s-1].tag}else"br"===a?e.start&&e.start(t,[],!0,n,o):"p"===a&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}E()}(t,{warn:Lo,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,n,s,a,d){var p=r&&r.ns||Go(t);Y&&"svg"===p&&(n=function(t){for(var e=[],n=0;nl&&(a.push(o=t.slice(l,r)),s.push(JSON.stringify(o)));var c=Ti(i[1].trim());s.push("_s("+c+")"),a.push({"@binding":c}),l=r+i[0].length}return l-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Fi(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+s+");if(Array.isArray($$a)){var $$v="+(i?"_n("+r+")":r)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+zi(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+zi(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+zi(e,"$$c")+"}",null,!0)}(t,i,r);else if("input"===o&&"radio"===s)!function(t,e,n){var i=n&&n.number,r=Ri(t,"value")||"null";Oi(t,"checked","_q("+e+","+(r=i?"_n("+r+")":r)+")"),Fi(t,"change",zi(e,r),null,!0)}(t,i,r);else if("input"===o||"textarea"===o)!function(t,e,n){var i=t.attrsMap.type;0;var r=n||{},o=r.lazy,s=r.number,a=r.trim,l=!o&&"range"!==i,c=o?"change":"range"===i?"__r":"input",u="$event.target.value";a&&(u="$event.target.value.trim()");s&&(u="_n("+u+")");var d=zi(e,u);l&&(d="if($event.target.composing)return;"+d);Oi(t,"value","("+e+")"),Fi(t,c,d,null,!0),(a||s)&&Fi(t,"blur","$forceUpdate()")}(t,i,r);else{if(!j.isReservedTag(o))return Vi(t,i,r),!1}return!0},text:function(t,e){e.value&&Oi(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Oi(t,"innerHTML","_s("+e.value+")",e)}},isPreTag:function(t){return"pre"===t},isUnaryTag:vo,mustUseProp:$n,canBeLeftOpenTag:yo,isReservedTag:Jn,getTagNamespace:Yn,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(gs)},_s=x((function(t){return m("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function xs(t,e){t&&(vs=_s(e.staticKeys||""),ys=e.isReservedTag||D,function t(e){if(e.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||g(t.tag)||!ys(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(vs)))}(e),1===e.type){if(!ys(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var n=0,i=e.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,ks=/\([^)]*?\);*$/,Cs=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ss={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Es={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ts=function(t){return"if("+t+")return null;"},As={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ts("$event.target !== $event.currentTarget"),ctrl:Ts("!$event.ctrlKey"),shift:Ts("!$event.shiftKey"),alt:Ts("!$event.altKey"),meta:Ts("!$event.metaKey"),left:Ts("'button' in $event && $event.button !== 0"),middle:Ts("'button' in $event && $event.button !== 1"),right:Ts("'button' in $event && $event.button !== 2")};function Ms(t,e){var n=e?"nativeOn:":"on:",i="",r="";for(var o in t){var s=Ps(t[o]);t[o]&&t[o].dynamic?r+=o+","+s+",":i+='"'+o+'":'+s+","}return i="{"+i.slice(0,-1)+"}",r?n+"_d("+i+",["+r.slice(0,-1)+"])":n+i}function Ps(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return Ps(t)})).join(",")+"]";var e=Cs.test(t.value),n=ws.test(t.value),i=Cs.test(t.value.replace(ks,""));if(t.modifiers){var r="",o="",s=[];for(var a in t.modifiers)if(As[a])o+=As[a],Ss[a]&&s.push(a);else if("exact"===a){var l=t.modifiers;o+=Ts(["ctrl","shift","alt","meta"].filter((function(t){return!l[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else s.push(a);return s.length&&(r+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Os).join("&&")+")return null;"}(s)),o&&(r+=o),"function($event){"+r+(e?"return "+t.value+"($event)":n?"return ("+t.value+")($event)":i?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(i?"return "+t.value:t.value)+"}"}function Os(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Ss[t],i=Es[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(i)+")"}var Ds={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:O},Is=function(t){this.options=t,this.warn=t.warn||Mi,this.transforms=Pi(t.modules,"transformCode"),this.dataGenFns=Pi(t.modules,"genData"),this.directives=M(M({},Ds),t.directives);var e=t.isReservedTag||D;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function $s(t,e){var n=new Is(e);return{render:"with(this){return "+(t?Ns(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ns(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Fs(t,e);if(t.once&&!t.onceProcessed)return Rs(t,e);if(t.for&&!t.forProcessed)return js(t,e);if(t.if&&!t.ifProcessed)return Ls(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',i=Hs(t,e),r="_t("+n+(i?","+i:""),o=t.attrs||t.dynamicAttrs?qs((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:k(t.name),value:t.value,dynamic:t.dynamic}}))):null,s=t.attrsMap["v-bind"];!o&&!s||i||(r+=",null");o&&(r+=","+o);s&&(r+=(o?"":",null")+","+s);return r+")"}(t,e);var n;if(t.component)n=function(t,e,n){var i=e.inlineTemplate?null:Hs(e,n,!0);return"_c("+t+","+Bs(e,n)+(i?","+i:"")+")"}(t.component,t,e);else{var i;(!t.plain||t.pre&&e.maybeComponent(t))&&(i=Bs(t,e));var r=t.inlineTemplate?null:Hs(t,e,!0);n="_c('"+t.tag+"'"+(i?","+i:"")+(r?","+r:"")+")"}for(var o=0;o>>0}(s):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=function(t,e){var n=t.children[0];0;if(n&&1===n.type){var i=$s(n,e.options);return"inlineTemplate:{render:function(){"+i.render+"},staticRenderFns:["+i.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+qs(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Vs(t){return 1===t.type&&("slot"===t.tag||t.children.some(Vs))}function zs(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ls(t,e,zs,"null");if(t.for&&!t.forProcessed)return js(t,e,zs);var i="_empty_"===t.slotScope?"":String(t.slotScope),r="function("+i+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Hs(t,e)||"undefined")+":undefined":Hs(t,e)||"undefined":Ns(t,e))+"}",o=i?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+r+o+"}"}function Hs(t,e,n,i,r){var o=t.children;if(o.length){var s=o[0];if(1===o.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var a=n?e.maybeComponent(s)?",1":",0":"";return""+(i||Ns)(s,e)+a}var l=n?function(t,e){for(var n=0,i=0;i':'
',Xs.innerHTML.indexOf(" ")>0}var ea=!!q&&ta(!1),na=!!q&&ta(!0),ia=x((function(t){var e=Zn(t);return e&&e.innerHTML})),ra=Cn.prototype.$mount;Cn.prototype.$mount=function(t,e){if((t=t&&Zn(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var i=n.template;if(i)if("string"==typeof i)"#"===i.charAt(0)&&(i=ia(i));else{if(!i.nodeType)return this;i=i.innerHTML}else t&&(i=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(i){0;var r=Zs(i,{outputSourceRange:!1,shouldDecodeNewlines:ea,shouldDecodeNewlinesForHref:na,delimiters:n.delimiters,comments:n.comments},this),o=r.render,s=r.staticRenderFns;n.render=o,n.staticRenderFns=s}}return ra.call(this,t,e)},Cn.compile=Zs,e.default=Cn}.call(this,n("yLpj"))},oLOV:function(t,e,n){"use strict";var i=n("gDS+"),r=n.n(i),o=n("EJiy"),s=n.n(o),a=n("oCYn"),l=n("Al62");function c(){this._locked=!1,this.domain=window.location.hostname.indexOf("beta")>=0?"https://dev-api2.mydramalist.dev":"",this.interval_delay=1e4,this.cdata=[],this.access_token="",this.lang=null,this.auc=!1,document.documentElement.lang&&(this.lang=document.documentElement.lang);var t=("; "+document.cookie).split("; jl_sess=").pop().split(";").shift();""!=t&&(this.access_token=t)}c.prototype.SetToken=function(t){""!=t&&(this.access_token=t)},c.prototype.SetLang=function(t){this.lang=t},c.prototype.getAUCToken=function(t){return void 0===this.auc_token&&(this.auc_token=("; "+document.cookie).split("; jl_auc=").pop().split(";").shift()),this.auc_token},c.prototype.Lock=function(t){return!!this._locked||(this._locked=!0,"function"==typeof t&&t(),!1)},c.prototype.Release=function(t){this._locked=!1,"function"==typeof t&&t()},c.prototype.IsLocked=function(){return this._locked},c.prototype.GetDomain=function(){return this.domain},c.prototype.BuildParams=function(t){return $.param(t)},c.prototype.buildURL=function(t){if(t.indexOf("https://")>=0)return t;var e={};""!==this.lang&&t.indexOf("lang=")<0&&(e.lang=this.lang);var n=$.param(e);return t.indexOf("?")>=0?this.domain+t+"&"+n:this.domain+t+"?"+n},c.prototype.setCpushInternval=function(t,e){this.cpush_internval=setInterval((function(){console.log("push interval")}),this.interval_delay)},c.prototype.CPush=function(t,e){},c.prototype.Collect=function(t,e,n){},c.prototype.Ajax=function(t,e,n){if(t.dataType||(t.dataType="json"),"json"===t.dataType){var i=t.dataFilter;t.dataFilter=function(t,e){return"function"==typeof i&&(t=i(t,e)),"json"===e&&""===t?"null":t}}t.url=this.buildURL(t.url),t.headers={authorization:"Bearer "+this.access_token},!0!==t.auc&&!0!==this.auc||(t.headers["authorization-auc"]=l.a.Base64.encode(this.getAUCToken())),"function"==typeof e&&"function"!=typeof t.success&&(t.success=e),"function"==typeof t.fail&&"function"!=typeof n&&(n=t.fail);var r=$.ajax(t);return function(t,e){t.fail((function(t){void 0!==t.responseJSON?"object"===s()(t.responseJSON.error)||(void 0!==t.responseJSON.message?a.default.prototype.$notify({offset:60,type:"error",message:t.responseJSON.message}):a.default.prototype.$notify({offset:60,type:"error",message:t.responseJSON.error})):a.default.prototype.$notify({offset:60,type:"error",message:"Something went wrong."}),"function"==typeof e&&e(t),401==t.status&&!1!==t.showLoginModal&&bootbox.hideAll()}))}(r,(function(t){"function"==typeof n&&n(t)})),r},c.prototype.Get=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="GET",this.Ajax(t)):("function"==typeof e&&(n=e,e={}),this.Ajax({url:t,type:"GET",data:e,dataType:"json",success:n,fail:i}))},c.prototype.Delete=function(t,e,n){return"object"===(void 0===t?"undefined":s()(t))?(t.type="DELETE",this.Ajax(t)):this.Ajax({url:t,type:"DELETE",dataType:"json",success:e,fail:n})},c.prototype.Post=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="POST",this.Ajax(t)):this.Ajax({url:t,type:"POST",data:e,dataType:"json",success:n,fail:i})},c.prototype.SendBeacon=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="POST",this.Ajax(t)):this.Ajax({url:t,type:"POST",data:r()(e),dataType:"json",contentType:"application/json; charset=utf-8",traditional:!0,success:n,fail:i})},c.prototype.PostHTML=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="POST",this.Ajax(t)):this.Ajax({url:t,type:"POST",data:r()(e),dataType:"html",contentType:"application/json; charset=utf-8",traditional:!0,success:n,fail:i})},c.prototype.PostJson=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="POST",this.Ajax(t)):this.Ajax({url:t,type:"POST",data:r()(e),dataType:"json",contentType:"application/json; charset=utf-8",traditional:!0,success:n,fail:i})},c.prototype.PatchJson=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="PATCH",this.Ajax(t)):this.Ajax({url:t,type:"PATCH",data:r()(e),dataType:"json",contentType:"application/json; charset=utf-8",traditional:!0,success:n,fail:i})},c.prototype.Patch=function(t,e,n,i){return"object"===(void 0===t?"undefined":s()(t))?(t.type="PATCH",this.Ajax(t)):this.Ajax({url:t,type:"PATCH",data:e,dataType:"json",success:n,fail:i})},e.a=new c},oV5b:function(t,e,n){"use strict";n.r(e);var i=n("QbLZ"),r=n.n(i),o=n("EJiy"),s=n.n(o),a=/%[sdj%]/g;function l(){for(var t=arguments.length,e=Array(t),n=0;n=o)return t;switch(t){case"%s":return String(e[i++]);case"%d":return Number(e[i++]);case"%j":try{return JSON.stringify(e[i++])}catch(t){return"[Circular]"}break;default:return t}})),l=e[i];i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},v={integer:function(t){return v.number(t)&&parseInt(t,10)===t},float:function(t){return v.number(t)&&!v.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(t){return!1}},date:function(t){return"function"==typeof t.getTime&&"function"==typeof t.getMonth&&"function"==typeof t.getYear},number:function(t){return!isNaN(t)&&"number"==typeof t},object:function(t){return"object"===(void 0===t?"undefined":s()(t))&&!v.array(t)},method:function(t){return"function"==typeof t},email:function(t){return"string"==typeof t&&!!t.match(g.email)&&t.length<255},url:function(t){return"string"==typeof t&&!!t.match(g.url)},hex:function(t){return"string"==typeof t&&!!t.match(g.hex)}};var y=function(t,e,n,i,r){if(t.required&&void 0===e)f(t,e,n,i,r);else{var o=t.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(o)>-1?v[o](e)||i.push(l(r.messages.types[o],t.fullField,t.type)):o&&(void 0===e?"undefined":s()(e))!==t.type&&i.push(l(r.messages.types[o],t.fullField,t.type))}};var b={required:f,whitespace:m,type:y,range:function(t,e,n,i,r){var o="number"==typeof t.len,s="number"==typeof t.min,a="number"==typeof t.max,c=e,u=null,d="number"==typeof e,p="string"==typeof e,h=Array.isArray(e);if(d?u="number":p?u="string":h&&(u="array"),!u)return!1;h&&(c=e.length),p&&(c=e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?c!==t.len&&i.push(l(r.messages[u].len,t.fullField,t.len)):s&&!a&&ct.max?i.push(l(r.messages[u].max,t.fullField,t.max)):s&&a&&(ct.max)&&i.push(l(r.messages[u].range,t.fullField,t.min,t.max))},enum:function(t,e,n,i,r){t.enum=Array.isArray(t.enum)?t.enum:[],-1===t.enum.indexOf(e)&&i.push(l(r.messages.enum,t.fullField,t.enum.join(", ")))},pattern:function(t,e,n,i,r){if(t.pattern)if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||i.push(l(r.messages.pattern.mismatch,t.fullField,e,t.pattern));else if("string"==typeof t.pattern){new RegExp(t.pattern).test(e)||i.push(l(r.messages.pattern.mismatch,t.fullField,e,t.pattern))}}};var _=function(t,e,n,i,r){var o=t.type,s=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e,o)&&!t.required)return n();b.required(t,e,i,s,r,o),c(e,o)||b.type(t,e,i,s,r)}n(s)},x={string:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e,"string")&&!t.required)return n();b.required(t,e,i,o,r,"string"),c(e,"string")||(b.type(t,e,i,o,r),b.range(t,e,i,o,r),b.pattern(t,e,i,o,r),!0===t.whitespace&&b.whitespace(t,e,i,o,r))}n(o)},method:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),void 0!==e&&b.type(t,e,i,o,r)}n(o)},number:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),void 0!==e&&(b.type(t,e,i,o,r),b.range(t,e,i,o,r))}n(o)},boolean:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),void 0!==e&&b.type(t,e,i,o,r)}n(o)},regexp:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),c(e)||b.type(t,e,i,o,r)}n(o)},integer:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),void 0!==e&&(b.type(t,e,i,o,r),b.range(t,e,i,o,r))}n(o)},float:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),void 0!==e&&(b.type(t,e,i,o,r),b.range(t,e,i,o,r))}n(o)},array:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e,"array")&&!t.required)return n();b.required(t,e,i,o,r,"array"),c(e,"array")||(b.type(t,e,i,o,r),b.range(t,e,i,o,r))}n(o)},object:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),void 0!==e&&b.type(t,e,i,o,r)}n(o)},enum:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();b.required(t,e,i,o,r),e&&b.enum(t,e,i,o,r)}n(o)},pattern:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e,"string")&&!t.required)return n();b.required(t,e,i,o,r),c(e,"string")||b.pattern(t,e,i,o,r)}n(o)},date:function(t,e,n,i,r){var o=[];if(t.required||!t.required&&i.hasOwnProperty(t.field)){if(c(e)&&!t.required)return n();if(b.required(t,e,i,o,r),!c(e)){var s=void 0;s="number"==typeof e?new Date(e):e,b.type(t,s,i,o,r),s&&b.range(t,s.getTime(),i,o,r)}}n(o)},url:_,hex:_,email:_,required:function(t,e,n,i,r){var o=[],a=Array.isArray(e)?"array":void 0===e?"undefined":s()(e);b.required(t,e,i,o,r,a),n(o)}};function w(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var k=w();function C(t){this.rules=null,this._messages=k,this.define(t)}C.prototype={messages:function(t){return t&&(this._messages=h(w(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if("object"!==(void 0===t?"undefined":s()(t))||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var e=void 0,n=void 0;for(e in t)t.hasOwnProperty(e)&&(n=t[e],this.rules[e]=Array.isArray(n)?n:[n])},validate:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2],o=t,a=n,c=i;if("function"==typeof a&&(c=a,a={}),this.rules&&0!==Object.keys(this.rules).length){if(a.messages){var u=this.messages();u===k&&(u=w()),h(u,a.messages),a.messages=u}else a.messages=this.messages();var f=void 0,m=void 0,g={},v=a.keys||Object.keys(this.rules);v.forEach((function(n){f=e.rules[n],m=o[n],f.forEach((function(i){var s=i;"function"==typeof s.transform&&(o===t&&(o=r()({},o)),m=o[n]=s.transform(m)),(s="function"==typeof s?{validator:s}:r()({},s)).validator=e.getValidationMethod(s),s.field=n,s.fullField=s.fullField||n,s.type=e.getType(s),s.validator&&(g[n]=g[n]||[],g[n].push({rule:s,value:m,source:o,field:n}))}))}));var y={};d(g,a,(function(t,e){var n=t.rule,i=!("object"!==n.type&&"array"!==n.type||"object"!==s()(n.fields)&&"object"!==s()(n.defaultField));function o(t,e){return r()({},e,{fullField:n.fullField+"."+t})}function c(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=s;if(Array.isArray(c)||(c=[c]),c.length,c.length&&n.message&&(c=[].concat(n.message)),c=c.map(p(n)),a.first&&c.length)return y[n.field]=1,e(c);if(i){if(n.required&&!t.value)return c=n.message?[].concat(n.message).map(p(n)):a.error?[a.error(n,l(a.messages.required,n.field))]:[],e(c);var u={};if(n.defaultField)for(var d in t.value)t.value.hasOwnProperty(d)&&(u[d]=n.defaultField);for(var h in u=r()({},u,t.rule.fields))if(u.hasOwnProperty(h)){var f=Array.isArray(u[h])?u[h]:[u[h]];u[h]=f.map(o.bind(null,h))}var m=new C(u);m.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),m.validate(t.value,t.rule.options||a,(function(t){e(t&&t.length?c.concat(t):t)}))}else e(c)}i=i&&(n.required||!n.required&&t.value),n.field=t.field;var u=n.validator(n,t.value,c,t.source,a);u&&u.then&&u.then((function(){return c()}),(function(t){return c(t)}))}),(function(t){b(t)}))}else c&&c();function b(t){var e,n=void 0,i=void 0,r=[],o={};for(n=0;ndocument.F=Object<\/script>"),t.close(),l=t.F;i--;)delete l.prototype[o[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=i(t),n=new a,a.prototype=null,n[s]=t):n=l(),void 0===e?n:r(n,e)}},oc46:function(t,e,n){var i=n("Y7ZC"),r=n("Jes0"),o=n("KUxP"),s=n("5pKv"),a="["+s+"]",l=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),u=function(t,e,n){var r={},a=o((function(){return!!s[t]()||"​…"!="​…"[t]()})),l=r[t]=a?e(d):s[t];n&&(r[n]=l),i(i.P+i.F*a,"String",r)},d=u.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(c,"")),t};t.exports=u},"oh+g":function(t,e,n){var i=n("WEpk"),r=i.JSON||(i.JSON={stringify:JSON.stringify});t.exports=function(t){return r.stringify.apply(r,arguments)}},oioR:function(t,e,n){var i=n("2GTP"),r=n("sNwI"),o=n("NwJ3"),s=n("5K7Z"),a=n("tEej"),l=n("fNZA"),c={},u={};(e=t.exports=function(t,e,n,d,p){var h,f,m,g,v=p?function(){return t}:l(t),y=i(n,d,e?2:1),b=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(h=a(t.length);h>b;b++)if((g=e?y(s(f=t[b])[0],f[1]):y(t[b]))===c||g===u)return g}else for(m=v.call(t);!(f=m.next()).done;)if((g=r(m,y,f.value,e))===c||g===u)return g}).BREAK=c,e.RETURN=u},p0JX:function(t,e,n){"use strict";e.__esModule=!0,e.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},e.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isHtmlElement=function(t){return t&&t.nodeType===Node.ELEMENT_NODE};e.isFunction=function(t){return t&&"[object Function]"==={}.toString.call(t)},e.isUndefined=function(t){return void 0===t},e.isDefined=function(t){return null!=t}},p4zG:function(t,e,n){"use strict";var i=n("P2sY"),r=n.n(i),o=n("GQeE"),s=n.n(o),a=n("QbLZ"),l=n.n(a),c={props:{rid:Number,resp:Object,visible:Boolean,appendToBody:Boolean},data:function(){return{dialogReaction:!1,formLabelWidth:"140px",reaction:{name:"",comment:"",region:"",date1:"",date2:"",delivery:!1,type:[],resource:"",desc:""},gridData:{},loading:!1,history_loading:!0,submit_loading:!1,delete_loading:!1,title:{},activeTab:"",history:{timeline:[]},data:{id:null,score:0,watch_status:0,episode_seen:0,social:[],priority:0,times_rewatched:0,rewatch_value:0,date_start:"0000-00-00",date_finish:"0000-00-00",note:"",post_status:"",watch_points:[]},date_selection:{},watch_points:[{id:"production",name:"Production",selected:!1},{id:"story",name:"Story",selected:!1},{id:"acting",name:"Acting",selected:!1},{id:"visual",name:"Visual FX",selected:!1},{id:"ost",name:"OST",selected:!1}],shares:[{icon:"fa-twitter",color:"light-blue",type:"twitter",active:!1},{icon:"fa-mdl",color:"primary",type:"mdl",active:!1}],watch_status_labels:[this.$t("Currently watching"),this.$t("Completed"),this.$t("Plan to watch"),this.$t("On-hold"),this.$t("Dropped"),this.$t("Not Interested"),this.$t("Undecided")]}},mounted:function(){if(this.data=l()({},this.resp.data),this.title=this.resp.title,this.selectTab("General"),this.isVisible=!0,this.data.watch_points)for(var t=s()(this.data.watch_points),e=0;e0&&t.push({value:"History",label:this.$t("History")}),t},months:function(){return[this.$t("January"),this.$t("February"),this.$t("March"),this.$t("April"),this.$t("May"),this.$t("June"),this.$t("July"),this.$t("August"),this.$t("September"),this.$t("October"),this.$t("November"),this.$t("December")]},watch_points_selected:function(){return this.watch_points.reduce((function(t,e){return e.selected&&t.push(e.id),t}),[])},watch_points_map:function(){return this.watch_points.reduce((function(t,e){return t[e.id]=e,t}),{})},disabledEpisodeRating:function(){var t=this.watch_status;return 3==t||t>=6||0==this.data.episode_seen},disabledStatus:function(){var t=this.watch_status;return 2==t||3==t||t>=6},disabledRating:function(){var t=this.watch_status;return 3==t||t>=6},ratings:function(){for(var t=[],e=10;e>=1;e-=.5){var n=e<10?e.toFixed(1):e+"";t.push({value:parseFloat(n),label:n})}return t},date_months:function(){var t=this.setRange(1,12,2).map((function(t,e){return t}));return t.unshift({value:"00",label:this.$t("Month")}),t},date_days:function(){var t=this.setRange(1,31,2);return t.unshift({value:"00",label:this.$t("Day")}),t},date_years:function(){var t=this.setRange((new Date).getUTCFullYear(),1800);return t.unshift({value:"0000",label:this.$t("Year")}),t},episode_seen:{set:function(t){t<0?t=0:t>this.title.episodes&&(t=this.title.episodes),this.data.episode_seen=t},get:function(){return 2==this.watch_status?this.title.episodes:this.data.episode_seen}},watch_status:{set:function(t){this.data.watch_status=t},get:function(){var t=this.data.watch_status;return 0!=this.title.released||3==t||t>=6?this.data.watch_status:3}},rating_score:{set:function(t){this.data.score=parseFloat(t)},get:function(){return this.data.score}},finish_month:{get:function(){return(""==this.data.date_finish?"0000-00-00":this.data.date_finish).split("-")[1]},set:function(t){var e=this.data.date_finish.split("-");e[1]=t,this.data.date_finish=e.join("-")}},finish_day:{get:function(){return(""==this.data.date_finish?"0000-00-00":this.data.date_finish).split("-")[2]},set:function(t){var e=this.data.date_finish.split("-");e[2]=t,this.data.date_finish=e.join("-")}},finish_year:{get:function(){return(""==this.data.date_finish?"0000-00-00":this.data.date_finish).split("-")[0]},set:function(t){var e=this.data.date_finish.split("-");e[0]=t,this.data.date_finish=e.join("-")}},start_month:{get:function(){return(""==this.data.date_start?"0000-00-00":this.data.date_start).split("-")[1]},set:function(t){var e=this.data.date_start.split("-");e[1]=t,this.data.date_start=e.join("-")}},start_day:{get:function(){return(""==this.data.date_start?"0000-00-00":this.data.date_start).split("-")[2]},set:function(t){var e=this.data.date_start.split("-");e[2]=t,this.data.date_start=e.join("-")}},start_year:{get:function(){return(""==this.data.date_start?"0000-00-00":this.data.date_start).split("-")[0]},set:function(t){var e=this.data.date_start.split("-");e[0]=t,this.data.date_start=e.join("-")}},is_tvseries:function(){return"Movie"!=this.title.type},section_general:function(){return"General"==this.activeTab},section_advanced:function(){return"Advanced"==this.activeTab},section_rewatch_value:function(){return"Rewatch"==this.activeTab},section_history:function(){return"History"==this.activeTab},watch_status_label:function(){return this.watch_status_labels[this.watch_status-1]}},methods:{deleteEntry:function(){var t=this,e=this;this.delete_loading=!0,this.$http.Delete("/v1/users/watchaction/"+this.rid,(function(n){t.delete_loading=!1,t.isVisible=!1,t.$emit("update",{watch_status:0,score:0}),$(".btn-manage-list[data-id="+t.title.id+"]").each((function(){$(this).hasClass("simple")?($("#ml"+e.title.id).fadeOut(),$(this).find("span:first-child").html('')):$(this).html(' '+this.$t("Add to List"))}))})).fail((function(){t.delete_loading=!1}))},submitData:function(){var t=this,e=this.params,n=this;this.submit_loading=!0,this.$http.Patch("/v1/users/watchaction/"+this.rid,e,(function(e){t.submit_loading=!1,t.isVisible=!1,t.$emit("update",e),$(".btn-manage-list[data-id="+t.title.id+"]").each((function(){if($(this).hasClass("simple")){var t=$("#ml"+n.title.id);t.find(".watch-status").text(n.watch_status_label),$(this).find("span").html('');var e=t.find(".episode-seen");e.length&&(e.text(n.episode_seen),t.find(".fill").css("width",10*parseFloat(n.data.score)+"%"),t.find(".score").text(n.data.score))}else $(this).hasClass("ratingPanel")?($(".your-rating .score > b").text(n.data.score),$(".your-rating .fill").css("width",10*parseFloat(n.data.score)+"%")):$(this).text(n.watch_status_label)}))})).fail((function(){t.submit_loading=!1}))},fetchHistory:function(){var t=this;this.history_loading=!0,this.$http.Get("/v1/users/watchaction/"+this.rid+"/history",(function(e){t.history=e,t.history_loading=!1})).fail((function(){t.history_loading=!1}))},increaseEpisodeSeen:function(){this.disabledStatus||this.episode_seen>=this.title.episodes||(this.episode_seen=parseInt(this.episode_seen)+1)},fetchData:function(){var t=this;this.$http.Get("/v1/users/watchaction/"+this.rid,(function(e){t.title=e.title,t.data=e.data,t.loading=!1})).fail((function(){t.isVisible=!1}))},pad:function(t,e){var n="000000000"+t;return n.substr(n.length-e)},selectWatchPoint:function(t){t.selected=!t.selected},setCurrentDate:function(t){var e=(new Date).getFullYear(),n=(new Date).getDate(),i=(new Date).getMonth()+1;this.$set(this.data,"date_"+t,e+"-"+this.pad(i,2)+"-"+this.pad(n,2))},setRange:function(t,e,n){var i=[];if(t>e){for(var r=t;r>=e;r--){var o=r+"",s=n?this.pad(r,n):r+"";i.push({value:s,label:o})}return i}for(r=t;r<=e;r++){var a=r+"",l=n?this.pad(r,n):r+"";i.push({value:l,label:a})}return i},selectTab:function(t){this.activeTab=t,"History"==t&&this.fetchHistory()}}},u=(n("mtFF"),n("KHd+")),d=Object(u.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"manage-list-modal",attrs:{id:"mdl-manage-modal"}},[n("el-dialog",{attrs:{visible:t.isVisible,title:t.title.title+" ("+t.title.year+")",width:"898px","append-to-body":t.appendToBody},on:{"update:visible":function(e){t.isVisible=e}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"min-height":"408px"}},[t.loading?t._e():n("div",{staticClass:"row-col"},[n("div",{staticClass:"col-sm-3 light"},[n("div",{staticClass:"padding hidden-xs-down p-b-0"},[n("img",{staticClass:"img-responsive",attrs:{src:t.title.cover}})]),t._v(" "),n("div",{staticClass:"left-menu padding pos-rlt"},[n("div",{staticClass:"nav-active-primary"},[n("div",{staticClass:"nav nav-pills nav-sm"},t._l(t.tabs,(function(e){return n("a",{key:e.value,class:["nav-link",{active:t.activeTab==e.value}],on:{click:function(n){return t.selectTab(e.value)}}},[t._v(t._s(e.label))])})),0)])])]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("div",{staticClass:"padding"},[t.section_general?[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"username"}},[n("b",[t._v(t._s(t.$t("Status")))])])]),t._v(" "),n("div",{staticClass:"col-sm-5"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.watch_status,expression:"watch_status"}],staticClass:"form-control select-watch-status custom",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.watch_status=e.target.multiple?n:n[0]}}},[t.title.released?[n("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("Currently watching")))]),t._v(" "),n("option",{attrs:{value:"2",disabled:!t.title.ended}},[t._v(t._s(t.$t("Completed")))]),t._v(" "),n("option",{attrs:{value:"3"}},[t._v(t._s(t.$t("Plan to watch")))]),t._v(" "),n("option",{attrs:{value:"4"}},[t._v(t._s(t.$t("On-hold")))]),t._v(" "),n("option",{attrs:{value:"5"}},[t._v(t._s(t.$t("Dropped")))]),t._v(" "),n("option",{attrs:{value:"7"}},[t._v(t._s(t.$t("Undecided")))]),t._v(" "),n("option",{attrs:{value:"6"}},[t._v(t._s(t.$t("Not Interested")))])]:[n("option",{attrs:{value:"1",disabled:""}},[t._v(t._s(t.$t("Currently watching")))]),t._v(" "),n("option",{attrs:{value:"2",disabled:""}},[t._v(t._s(t.$t("Completed")))]),t._v(" "),n("option",{attrs:{value:"3"}},[t._v(t._s(t.$t("Plan to watch")))]),t._v(" "),n("option",{attrs:{value:"4",disabled:""}},[t._v(t._s(t.$t("On-hold")))]),t._v(" "),n("option",{attrs:{value:"5",disabled:""}},[t._v(t._s(t.$t("Dropped")))]),t._v(" "),n("option",{attrs:{value:"7"}},[t._v(t._s(t.$t("Undecided")))]),t._v(" "),n("option",{attrs:{value:"6"}},[t._v(t._s(t.$t("Not Interested")))])]],2),t._v(" "),t.title.released?t._e():n("small",{staticClass:"text-muted"},[t._v(t._s(t.$t("This show has not started yet.")))])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"shares"}},[n("b",[t._v(t._s(t.$t("Share")))])])]),t._v(" "),n("div",{staticClass:"col-sm-5"},[n("div",{staticClass:"share-container"},t._l(t.shares,(function(t,e){return n("a",{key:e,class:["btn btn-icon btn-social rounded light",{active:t.active}],attrs:{rel:"nofollow"},on:{click:function(e){t.active=!t.active}}},[n("i",{class:["fab",t.icon]}),n("i",{class:["fab",t.icon,t.color]})])})),0)])])]),t._v(" "),t.mdl_share_active?n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label"})]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("el-input",{attrs:{type:"textarea",autosize:{minRows:2},placeholder:t.$t("Write a comment...")},model:{value:t.data.post_status,callback:function(e){t.$set(t.data,"post_status",e)},expression:"data.post_status"}})],1)])]):t._e(),t._v(" "),t.is_tvseries?[n("hr"),t._v(" "),n("div",{class:["form-group episode-seen",{disabled:t.disabledStatus}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"username"}},[n("b",[t._v(t._s(t.$t("Episodes Watched")))])])]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("div",{staticClass:"row no-gutter"},[n("div",{staticClass:"col-xs-6 col-sm-6"},[n("div",{staticClass:"col-sm-4 col-xs-4 episode-input"},[n("el-input",{staticClass:"input-episode-seen",attrs:{type:"number",min:0,max:t.title.episodes,disabled:t.disabledStatus},model:{value:t.episode_seen,callback:function(e){t.episode_seen=e},expression:"episode_seen"}})],1),t._v(" "),n("div",{staticClass:"col-sm-5 col-xs-5 episode-control m-l-sm"},[n("a",{on:{click:t.increaseEpisodeSeen}},[t._v("+")]),t._v(" / "+t._s(t.title.episodes))])]),t._v(" "),t.disabledEpisodeRating?t._e():n("div",{staticClass:"text-right col-xs-6"},[n("div",[n("a",{staticClass:"text-primary",attrs:{target:"x_blank",href:t.title.url+"/episode/"+t.data.episode_seen+"/write_review"}},[t._v(t._s(t.$t("Rate/Review this episode!")))])])])])])])])]:t._e(),t._v(" "),n("hr"),t._v(" "),n("div",{class:["form-group",{disabled:t.disabledRating}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"username"}},[n("b",[t._v(t._s(t.$t("Overall Rating")))])])]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3 col-xs-3"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.rating_score,expression:"rating_score"}],staticClass:"form-control custom select-rating",attrs:{disabled:t.disabledRating},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.rating_score=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"0"}},[t._v("--")]),t._v(" "),t._l(t.ratings,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])}))],2)]),t._v(" "),n("div",{staticClass:"col-sm-9 col-xs-9"},[n("rating",{staticClass:"m-t-xs",attrs:{rating:t.rating_score,showRating:!0,disabled:t.disabledRating},on:{"update:rating":function(e){t.rating_score=e}}})],1)]),t._v(" "),t.rating_score>0?n("div",{staticClass:"m-t watch-points animated fadeIn"},[n("div",{staticClass:"p-b-sm"},[n("label",{staticClass:"m-b-0"},[n("b",[t._v(t._s(t.$t("What do you like most about it?")))])]),t._v(" "),n("span",{staticClass:"text-muted m-l-xs text-xs"},[t._v("Multiple selection (optional)")])]),t._v(" "),n("div",{staticClass:"m-y-sm text-center"},t._l(t.watch_points,(function(e){return n("el-button",{key:e.name,class:["m-l-0 m-r-sm m-b-sm",{selected:e.selected}],attrs:{size:"small"},on:{click:function(n){return t.selectWatchPoint(e)}}},[t._v(t._s(e.name))])})),1)]):t._e()])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"note"}},[n("b",[t._v(t._s(t.$t("Notes")))])])]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("el-input",{attrs:{type:"textarea",autosize:{minRows:3}},model:{value:t.data.note,callback:function(e){t.$set(t.data,"note",e)},expression:"data.note"}})],1)])])]:t._e(),t._v(" "),t.section_advanced?[n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"note"}},[n("b",[t._v(t._s(t.$t("Priority")))])])]),t._v(" "),n("div",{staticClass:"col-sm-3"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.data.priority,expression:"data.priority"}],staticClass:"form-control custom",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.data,"priority",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("Select priority")))]),t._v(" "),n("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("Low")))]),t._v(" "),n("option",{attrs:{value:"2"}},[t._v(t._s(t.$t("Medium")))]),t._v(" "),n("option",{attrs:{value:"3"}},[t._v(t._s(t.$t("High")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"note"}},[n("b",[t._v(t._s(t.$t("Total Times Rewatched")))])])]),t._v(" "),n("div",{staticClass:"col-sm-2"},[n("el-input",{attrs:{type:"number"},model:{value:t.data.times_rewatched,callback:function(e){t.$set(t.data,"times_rewatched",e)},expression:"data.times_rewatched"}})],1)])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"control-label",attrs:{for:"note"}},[n("b",[t._v(t._s(t.$t("Rewatch Value")))])])]),t._v(" "),n("div",{staticClass:"col-sm-5"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.data.rewatch_value,expression:"data.rewatch_value"}],staticClass:"form-control custom",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.data,"rewatch_value",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:"0"}},[t._v(t._s(t.$t("Select rewatch value")))]),t._v(" "),n("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("Very Low")))]),t._v(" "),n("option",{attrs:{value:"2"}},[t._v(t._s(t.$t("Low")))]),t._v(" "),n("option",{attrs:{value:"3"}},[t._v(t._s(t.$t("Medium")))]),t._v(" "),n("option",{attrs:{value:"4"}},[t._v(t._s(t.$t("High")))]),t._v(" "),n("option",{attrs:{value:"5"}},[t._v(t._s(t.$t("Very High")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",[n("b",[t._v(t._s(t.$t("Start Date")))])]),t._v(" "),n("div",[n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.setCurrentDate("start")}}},[t._v(t._s(t.$t("Today date")))])],1)]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("div",{staticClass:"row start-finish-date"},[n("div",{staticClass:"col-lg-4 col-xs-4"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.start_month,expression:"start_month"}],staticClass:"form-control custom",attrs:{placeholder:t.$t("Month")},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.start_month=e.target.multiple?n:n[0]}}},t._l(t.date_months,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),n("div",{staticClass:"col-lg-4 col-xs-4"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.start_day,expression:"start_day"}],staticClass:"form-control custom",attrs:{placeholder:t.$t("Day")},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.start_day=e.target.multiple?n:n[0]}}},t._l(t.date_days,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),n("div",{staticClass:"col-lg-4 col-xs-4"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.start_year,expression:"start_year"}],staticClass:"form-control custom",attrs:{placeholder:t.$t("Year")},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.start_year=e.target.multiple?n:n[0]}}},t._l(t.date_years,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-3"},[n("label",[n("b",[t._v(t._s(t.$t("Finish Date")))])]),t._v(" "),n("div",[n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.setCurrentDate("finish")}}},[t._v(t._s(t.$t("Today date")))])],1)]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("div",{staticClass:"row start-finish-date"},[n("div",{staticClass:"col-lg-4 col-xs-4"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.finish_month,expression:"finish_month"}],staticClass:"form-control custom",attrs:{placeholder:t.$t("Month")},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.finish_month=e.target.multiple?n:n[0]}}},t._l(t.date_months,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),n("div",{staticClass:"col-lg-4 col-xs-4"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.finish_day,expression:"finish_day"}],staticClass:"form-control custom",attrs:{placeholder:t.$t("Day")},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.finish_day=e.target.multiple?n:n[0]}}},t._l(t.date_days,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)]),t._v(" "),n("div",{staticClass:"col-lg-4 col-xs-4"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.finish_year,expression:"finish_year"}],staticClass:"form-control custom",attrs:{placeholder:t.$t("Year")},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.finish_year=e.target.multiple?n:n[0]}}},t._l(t.date_years,(function(e){return n("option",{key:e.value,domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)])])])])])]:t._e(),t._v(" "),t.section_history?[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.history_loading,expression:"history_loading"}],staticClass:"form-group history-tab",staticStyle:{"min-height":"343px"}},[t.history.timeline.length?[n("h5",[t._v(t._s(t.$t("Timeline")))]),t._v(" "),n("table",{staticClass:"table"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.$t("Watch Status")))]),t._v(" "),t.is_tvseries?n("th",[t._v(t._s(t.$t("Episode Seen")))]):t._e(),t._v(" "),n("th",[t._v(t._s(t.$t("Overall Rating")))]),t._v(" "),n("th",[t._v(t._s(t.$t("Timestamp")))])])]),t._v(" "),n("tbody",t._l(t.history.timeline,(function(e){return n("tr",[n("td",[t._v(t._s(t.$t(e.watch_status)))]),t._v(" "),t.is_tvseries?n("td",{attrs:{align:"center"}},[t._v(t._s(e.episode_seen))]):t._e(),t._v(" "),n("td",[n("rating",{attrs:{size:"small",rating:e.overall_rating,showRating:!0,disabled:!0}})],1),t._v(" "),n("td",[t._v(t._s(t._f("time_ago")(e.timestamp)))])])})),0)])]:[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.$t("There is no history available."))+"\n\t\t\t\t\t\t\t\t")]],2)]:t._e()],2)])])]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t.data.id>0?n("el-button",{staticClass:"pull-left",attrs:{type:"danger",plain:"",loading:t.delete_loading,disabled:t.submit_loading},on:{click:t.deleteEntry}},[t._v(t._s(t.$t("Delete")))]):t._e(),t._v(" "),n("el-button",{staticClass:"btn btn-default",attrs:{disabled:t.submit_loading||t.delete_loading},on:{click:function(e){t.isVisible=!1}}},[t._v(t._s(t.$t("Cancel")))]),t._v(" "),n("el-button",{staticClass:"btn btn-success",attrs:{type:"primary",loading:t.submit_loading,disabled:t.delete_loading},on:{click:t.submitData}},[t._v(t._s(t.$t("Submit")))])],1)]),t._v(" "),n("el-dialog",{attrs:{width:"600px",title:"New Reaction",visible:t.dialogReaction},on:{"update:visible":function(e){t.dialogReaction=e}}},[n("el-form",{attrs:{model:t.reaction}},[n("el-form-item",{staticClass:"_600",attrs:{label:"How was it?","label-width":t.formLabelWidth}},[n("div",{staticStyle:{poistion:"relative"}},[n("rating",{staticClass:"m-t-xs",attrs:{rating:t.rating_score,showRating:!0,disabled:t.disabledRating},on:{"update:rating":function(e){t.rating_score=e}}})],1)]),t._v(" "),n("el-form-item",{staticClass:"_600",attrs:{label:"What was your reaction?","label-width":t.formLabelWidth}},[n("el-input",{staticClass:"_400",attrs:{type:"textarea",placeholder:"Add a comment about your reaction",autosize:{minRows:2}},model:{value:t.reaction.comment,callback:function(e){t.$set(t.reaction,"comment",e)},expression:"reaction.comment"}})],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogReaction=!1}}},[t._v("Cancel")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogReaction=!1}}},[t._v("Post")])],1)],1)],1)}),[],!1,null,null,null);e.a=d.exports},pJH5:function(t,e,n){var i,r,o;!function(s,a){"use strict";r=[n("xeH2")],void 0===(o="function"==typeof(i=function t(e,n){var i={dialog:"",header:"",footer:"",closeButton:"",form:"
",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"
",date:"",time:"",number:"",password:""}},r={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},o={};function s(t){var e=h[r.locale];return e?e[t]:h.en[t]}function a(t,n,i){t.stopPropagation(),t.preventDefault(),e.isFunction(i)&&!1===i.call(n,t)||n.modal("hide")}function l(t,n){var i=0;e.each(t,(function(t,e){n(t,e,i++)}))}function c(t,n,i){return e.extend(!0,{},t,function(t,e){var n=t.length,i={};if(n<1||n>2)throw new Error("Invalid argument length");return 2===n||"string"==typeof t[0]?(i[e[0]]=t[0],i[e[1]]=t[1]):i=t[0],i}(n,i))}function u(t,e,n,i){return p(c({className:"bootbox-"+t,buttons:d.apply(null,e)},i,n),e)}function d(){for(var t={},e=0,n=arguments.length;e").attr("label",i.group)),r=m[i.group]),r.append("")})),l(m,(function(t,e){u.append(e)})),u.val(t.value);break;case"checkbox":var g=e.isArray(t.value)?t.value:[t.value];if(!(f=t.inputOptions||[]).length)throw new Error("prompt with checkbox requires options");if(!f[0].value||!f[0].text)throw new Error("given options in wrong format");u=e("
"),l(f,(function(n,r){var o=e(i.inputs[t.inputType]);o.find("input").attr("value",r.value),o.find("label").append(r.text),l(g,(function(t,e){e===r.value&&o.find("input").prop("checked",!0)})),u.append(o)}))}return t.placeholder&&u.attr("placeholder",t.placeholder),t.pattern&&u.attr("pattern",t.pattern),t.maxlength&&u.attr("maxlength",t.maxlength),a.append(u),a.on("submit",(function(t){t.preventDefault(),t.stopPropagation(),s.find(".btn-primary").click()})),(s=o.dialog(t)).off("shown.bs.modal"),s.on("shown.bs.modal",(function(){u.focus()})),!0===h&&s.modal("show"),s},o.dialog=function(t){t=function(t){var n,i;if("object"!=typeof t)throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return(t=e.extend({},r,t)).buttons||(t.buttons={}),n=t.buttons,i=function(t){var e,n=0;for(e in t)n++;return n}(n),l(n,(function(t,r,o){if(e.isFunction(r)&&(r=n[t]={callback:r}),"object"!==e.type(r))throw new Error("button with key "+t+" must be an object");r.label||(r.label=t),r.className||(r.className=i<=2&&o===i-1?"btn-primary":"btn-default")})),t}(t);var o=e(i.dialog),s=o.find(".modal-dialog"),c=o.find(".modal-body"),u=t.buttons,d="",p={onEscape:t.onEscape};if(e.fn.modal===n)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(l(u,(function(t,e){d+="",p[t]=e.callback})),c.find(".bootbox-body").html(t.message),!0===t.animate&&o.addClass("fade"),t.className&&o.addClass(t.className),"large"===t.size?s.addClass("modal-lg"):"small"===t.size&&s.addClass("modal-sm"),t.title&&c.before(i.header),t.closeButton){var h=e(i.closeButton);t.title?o.find(".modal-header").prepend(h):h.css("margin-top","-10px").prependTo(c)}return t.title&&o.find(".modal-title").html(t.title),d.length&&(c.after(i.footer),o.find(".modal-footer").html(d)),o.on("hidden.bs.modal",(function(t){t.target===this&&o.remove()})),o.on("shown.bs.modal",(function(){o.find(".btn-primary:first").focus()})),"static"!==t.backdrop&&o.on("click.dismiss.bs.modal",(function(t){o.children(".modal-backdrop").length&&(t.currentTarget=o.children(".modal-backdrop").get(0)),t.target===t.currentTarget&&o.trigger("escape.close.bb")})),o.on("escape.close.bb",(function(t){p.onEscape&&a(t,o,p.onEscape)})),o.on("click",".modal-footer button",(function(t){var n=e(this).data("bb-handler");a(t,o,p[n])})),o.on("click",".bootbox-close-button",(function(t){a(t,o,p.onEscape)})),o.on("keyup",(function(t){27===t.which&&o.trigger("escape.close.bb")})),e(t.container).append(o),o.modal({backdrop:!!t.backdrop&&"static",keyboard:!1,show:!1}),t.show&&o.modal("show"),o},o.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],e.extend(r,t)},o.hideAll=function(){return e(".bootbox").modal("hide"),o};var h={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return o.addLocale=function(t,n){return e.each(["OK","CANCEL","CONFIRM"],(function(t,e){if(!n[e])throw new Error("Please supply a translation for '"+e+"'")})),h[t]={OK:n.OK,CANCEL:n.CANCEL,CONFIRM:n.CONFIRM},o},o.removeLocale=function(t){return delete h[t],o},o.setLocale=function(t){return o.setDefaults("locale",t)},o.init=function(n){return t(n||e)},o})?i.apply(e,r):i)||(t.exports=o)}()},pMYU:function(t,e,n){"use strict";n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));var i=n("YEIV"),r=n.n(i),o=n("QbLZ"),s=n.n(o),a=n("GmIP"),l=(a.b,a.c,"backgroundColor");function c(t){if("string"!=typeof t)return null;var e=t.trim();if(!e)return null;if("undefined"==typeof document||!document.createElement)return e;var n=document.createElement("div");return n.style.backgroundColor="",n.style.backgroundColor=e,n.style.backgroundColor||null}function u(){return{default:null,parseHTML:function(t){return c(t.style.backgroundColor||"")},renderHTML:function(t){var e=c(t[l]);return e?{style:"background-color: "+e}:{}}}}var d=a.b.extend({addAttributes:function(){var t="function"==typeof this.parent?this.parent():{};return s()({},t,r()({},l,u()))}}),p=a.c.extend({addAttributes:function(){var t="function"==typeof this.parent?this.parent():{};return s()({},t,r()({},l,u()))}})},"pZ+9":function(t,e,n){"use strict";n.r(e),n.d(e,"dropCursor",(function(){return o}));var i=n("b/sn"),r=n("uSMm");function o(t={}){return new i.Plugin({view:e=>new s(e,t)})}class s{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,i=this.editorView.dom,r=i.getBoundingClientRect(),o=r.width/i.offsetWidth,s=r.height/i.offsetHeight;if(n){let n=e.nodeBefore,i=e.nodeAfter;if(n||i){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let r=e.getBoundingClientRect(),o=n?r.bottom:r.top;n&&i&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;t={left:r.left,right:r.right,top:o-a,bottom:o+a}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*o;t={left:e.left-n,right:e.left+n,top:e.top,bottom:e.bottom}}let a,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!c||c==document.body&&"static"==getComputedStyle(c).position)a=-pageXOffset,l=-pageYOffset;else{let t=c.getBoundingClientRect(),e=t.width/c.offsetWidth,n=t.height/c.offsetHeight;a=t.left-c.scrollLeft*e,l=t.top-c.scrollTop*n}this.element.style.left=(t.left-a)/o+"px",this.element.style.top=(t.top-l)/s+"px",this.element.style.width=(t.right-t.left)/o+"px",this.element.style.height=(t.bottom-t.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),i=n&&n.type.spec.disableDropCursor,o="function"==typeof i?i(this.editorView,e,t):i;if(e&&!o){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=Object(r.dropPoint)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}},q6LJ:function(t,e,n){var i=n("5T2Y"),r=n("QXhf").set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n("a0xu")(s);t.exports=function(){var t,e,n,c=function(){var i,r;for(l&&(i=s.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var d=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=d=!d}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},r8UP:function(t,e,n){t.exports={default:n("ablF"),__esModule:!0}},raTm:function(t,e,n){"use strict";var i=n("5T2Y"),r=n("Y7ZC"),o=n("6/1s"),s=n("KUxP"),a=n("NegM"),l=n("XJU/"),c=n("oioR"),u=n("EXMj"),d=n("93I4"),p=n("RfKB"),h=n("2faE").f,f=n("V7Et")(0),m=n("jmDH");t.exports=function(t,e,n,g,v,y){var b=i[t],_=b,x=v?"set":"add",w=_&&_.prototype,k={};return m&&"function"==typeof _&&(y||w.forEach&&!s((function(){(new _).entries().next()})))?(_=e((function(e,n){u(e,_,t,"_c"),e._c=new b,null!=n&&c(n,v,e[x],e)})),f("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(t){var e="add"==t||"set"==t;!(t in w)||y&&"clear"==t||a(_.prototype,t,(function(n,i){if(u(this,_,t),!e&&y&&!d(n))return"get"==t&&void 0;var r=this._c[t](0===n?0:n,i);return e?this:r}))})),y||h(_.prototype,"size",{get:function(){return this._c.size}})):(_=g.getConstructor(e,t,v,x),l(_.prototype,n),o.NEED=!0),p(_,t),k[t]=_,r(r.G+r.W+r.F,k),y||g.setStrong(_,t,v),_}},rfXi:function(t,e,n){t.exports={default:n("0tVQ"),__esModule:!0}},rr1i:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"s+AW":function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=0&&this.resetTabindex(this.triggerElm),clearTimeout(this.timeout),this.timeout=setTimeout((function(){t.visible=!1}),"click"===this.trigger?0:this.hideTimeout))},handleClick:function(){this.triggerElm.disabled||(this.visible?this.hide():this.show())},handleTriggerKeyDown:function(t){var e=t.keyCode;[38,40].indexOf(e)>-1?(this.removeTabindex(),this.resetTabindex(this.menuItems[0]),this.menuItems[0].focus(),t.preventDefault(),t.stopPropagation()):13===e?this.handleClick():[9,27].indexOf(e)>-1&&this.hide()},handleItemKeyDown:function(t){var e=t.keyCode,n=t.target,i=this.menuItemsArray.indexOf(n),r=this.menuItemsArray.length-1,o=void 0;[38,40].indexOf(e)>-1?(o=38===e?0!==i?i-1:0:i-1&&(this.hide(),this.triggerElmFocus())},resetTabindex:function(t){this.removeTabindex(),t.setAttribute("tabindex","0")},removeTabindex:function(){this.triggerElm.setAttribute("tabindex","-1"),this.menuItemsArray.forEach((function(t){t.setAttribute("tabindex","-1")}))},initAria:function(){this.dropdownElm.setAttribute("id",this.listId),this.triggerElm.setAttribute("aria-haspopup","list"),this.triggerElm.setAttribute("aria-controls",this.listId),this.splitButton||(this.triggerElm.setAttribute("role","button"),this.triggerElm.setAttribute("tabindex",this.tabindex),this.triggerElm.setAttribute("class",(this.triggerElm.getAttribute("class")||"")+" el-dropdown-selfdefine"))},initEvent:function(){var t=this,e=this.trigger,n=this.show,i=this.hide,r=this.handleClick,o=this.splitButton,s=this.handleTriggerKeyDown,a=this.handleItemKeyDown;this.triggerElm=o?this.$refs.trigger.$el:this.$slots.default[0].elm;var l=this.dropdownElm;this.triggerElm.addEventListener("keydown",s),l.addEventListener("keydown",a,!0),o||(this.triggerElm.addEventListener("focus",(function(){t.focusing=!0})),this.triggerElm.addEventListener("blur",(function(){t.focusing=!1})),this.triggerElm.addEventListener("click",(function(){t.focusing=!1}))),"hover"===e?(this.triggerElm.addEventListener("mouseenter",n),this.triggerElm.addEventListener("mouseleave",i),l.addEventListener("mouseenter",n),l.addEventListener("mouseleave",i)):"click"===e&&this.triggerElm.addEventListener("click",r)},handleMenuItemClick:function(t,e){this.hideOnClick&&(this.visible=!1),this.$emit("command",t,e)},triggerElmFocus:function(){this.triggerElm.focus&&this.triggerElm.focus()},initDomOperation:function(){this.dropdownElm=this.popperElm,this.menuItems=this.dropdownElm.querySelectorAll("[tabindex='-1']"),this.menuItemsArray=[].slice.call(this.menuItems),this.initEvent(),this.initAria()}},render:function(t){var e=this,n=this.hide,i=this.splitButton,r=this.type,o=this.dropdownSize,s=i?t("el-button-group",[t("el-button",{attrs:{type:r,size:o},nativeOn:{click:function(t){e.$emit("click",t),n()}}},[this.$slots.default]),t("el-button",{ref:"trigger",attrs:{type:r,size:o},class:"el-dropdown__caret-button"},[t("i",{class:"el-dropdown__icon el-icon-arrow-down"})])]):this.$slots.default;return t("div",{class:"el-dropdown",directives:[{name:"clickoutside",value:n}]},[s,this.$slots.dropdown])}},m=n(0),g=Object(m.a)(f,void 0,void 0,!1,null,null,null);g.options.__file="packages/dropdown/src/dropdown.vue";var v=g.exports;v.install=function(t){t.component(v.name,v)};e.default=v},13:function(t,e){t.exports=n("7t/g")},3:function(t,e){t.exports=n("gSIQ")},35:function(t,e){t.exports=n("hF+1")},4:function(t,e){t.exports=n("0BDH")}})},sEkU:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.integerProp=void 0;const i=n("zyfj"),r=n("3qjj");e.integerProp=t=>(0,i.propOptionsGenerator)(Number,t,r.isInteger)},sNwI:function(t,e,n){var i=n("5K7Z");t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},sk9p:function(t,e,n){"use strict";e.__esModule=!0;var i=o(n("k/8l")),r=o(n("FyfS"));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if(Array.isArray(t))return t;if((0,i.default)(Object(t)))return function(t,e){var n=[],i=!0,o=!1,s=void 0;try{for(var a,l=(0,r.default)(t);!(i=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){o=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(o)throw s}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},stYL:function(t,e,n){"use strict";e.__esModule=!0,e.default={el:{colorpicker:{confirm:"OK",clear:"Clear"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:""},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}}},tEej:function(t,e,n){var i=n("Ojgd"),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},"u/5A":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return a}));var i="left",r=["left","center","right"],o=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/i,s="/upload/",a=["

","


",'


']},u4eC:function(t,e){!function(e){"use strict";var n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag",l="object"==typeof t,c=e.regeneratorRuntime;if(c)l&&(t.exports=c);else{(c=e.regeneratorRuntime=l?t.exports:{}).wrap=m;var u={},d={};d[o]=function(){return this};var p=Object.getPrototypeOf,h=p&&p(p(E([])));h&&h!==n&&i.call(h,o)&&(d=h);var f=b.prototype=v.prototype=Object.create(d);y.prototype=f.constructor=b,b.constructor=y,b[a]=y.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(f),t},c.awrap=function(t){return{__await:t}},_(x.prototype),x.prototype[s]=function(){return this},c.AsyncIterator=x,c.async=function(t,e,n,i){var r=new x(m(t,e,n,i));return c.isGeneratorFunction(e)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},_(f),f[a]="Generator",f[o]=function(){return this},f.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},c.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return s.type="throw",s.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(a&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function m(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,o=Object.create(r.prototype),s=new S(i||[]);return o._invoke=function(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return T()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===u)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=g(t,e,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(t,n,s),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function y(){}function b(){}function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t){var e;this._invoke=function(n,r){function o(){return new Promise((function(e,o){!function e(n,r,o,s){var a=g(t[n],t,r);if("throw"!==a.type){var l=a.arg,c=l.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(t){e("next",t,o,s)}),(function(t){e("throw",t,o,s)})):Promise.resolve(c).then((function(t){l.value=t,o(l)}),s)}s(a.arg)}(n,r,e,o)}))}return e=e?e.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=g(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,u;var r=i.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&a.empty)return a.empty}recover(t){let e=0,n=o(t);if(!this.inverted)for(let t=0;tt)break;let u=this.ranges[l+o],d=this.ranges[l+a],p=c+u;if(t<=p){let o=c+i+((u?t==c?-1:t==p?1:e:e)<0?0:d);if(n)return o;let a=t==(e<0?c:p)?null:l/3+(t-c)*r,h=t==c?2:t==p?1:4;return(e<0?t!=c:t!=p)&&(h|=8),new s(o,h,a)}i+=d-u}return n?t+i:new s(t+i,0,null)}touches(t,e){let n=0,i=o(e),r=this.inverted?2:1,s=this.inverted?1:2;for(let e=0;et)break;let a=this.ranges[e+r];if(t<=o+a&&e==3*i)return!0;n+=this.ranges[e+s]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,r=0;i=0;e--){let i=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=i&&i>e?n-i-1:void 0)}}invert(){let t=new l;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;nn&&et.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,r),e.openStart,e.openEnd);return d.fromReplace(t,this.from,this.to,o)}invert(){return new f(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new h(e.pos,n.pos,this.mark)}merge(t){return t instanceof h&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new h(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new h(e.from,e.to,t.markFromJSON(e.mark))}}u.jsonID("addMark",h);class f extends u{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new i.Slice(p(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return d.fromReplace(t,this.from,this.to,n)}invert(){return new h(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new f(e.pos,n.pos,this.mark)}merge(t){return t instanceof f&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new f(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new f(e.from,e.to,t.markFromJSON(e.mark))}}u.jsonID("removeMark",f);class m extends u{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return d.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return d.fromReplace(t,this.pos,this.pos+1,new i.Slice(i.Fragment.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;nn.pos?null:new y(e.pos,n.pos,i,r,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new y(e.from,e.to,e.gapFrom,e.gapTo,i.Slice.fromJSON(t,e.slice),e.insert,!!e.structure)}}function b(t,e,n){let i=t.resolve(e),r=n-e,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let t=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,r--}}return!1}function _(t,e,n,r=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),a=[],l=e+1;for(let e=0;e=0;e--)t.step(a[e])}function x(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function w(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,i=0,r=0;;--n){let o=t.$from.node(n),s=t.$from.index(n)+i,a=t.$to.indexAfter(n)-r;if(n{if(r.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(r.text);){let r=t.mapping.slice(i).map(n+1+o+s.index);t.replaceWith(r,r+1,e.type.schema.linebreakReplacement.create())}}})}function E(t,e,n,i){e.forEach((r,o)=>{if(r.type==r.type.schema.linebreakReplacement){let r=t.mapping.slice(i).map(n+1+o);t.replaceWith(r,r+1,e.type.schema.text("\n"))}})}function T(t,e,n=1,i){let r=t.resolve(e),o=r.depth-n,s=i&&i[i.length-1]||r.parent;if(o<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let t=r.depth-1,e=n-2;t>o;t--,e--){let n=r.node(t),o=r.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),a=i&&i[e+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=i&&i[e]||n;if(!n.canReplace(o+1,n.childCount)||!l.type.validContent(s))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function A(t,e){let n=t.resolve(e),i=n.index();return M(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function M(t,e){return!(!t||!e||t.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:i}=t.type.schema;for(let r=0;r0?(r=i.node(t+1),s++,o=i.node(t).maybeChild(s)):(r=i.node(t).maybeChild(s-1),o=i.node(t+1)),r&&!r.isTextblock&&M(r,o)&&i.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?i.before(t):i.after(t)}}function O(t,e,n){let i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),n))return e;if(0==i.parentOffset)for(let t=i.depth-1;t>=0;t--){let e=i.index(t);if(i.node(t).canReplaceWith(e,e,n))return i.before(t+1);if(e>0)return null}if(i.parentOffset==i.parent.content.size)for(let t=i.depth-1;t>=0;t--){let e=i.indexAfter(t);if(i.node(t).canReplaceWith(e,e,n))return i.after(t+1);if(e=0;e--){let n=e==i.depth?0:i.pos<=(i.start(e+1)+i.end(e+1))/2?-1:1,o=i.index(e)+(n>0?1:0),s=i.node(e),a=!1;if(1==t)a=s.canReplace(o,o,r);else{let t=s.contentMatchAt(o).findWrapping(r.firstChild.type);a=t&&s.canReplaceWith(o,o,t[0])}if(a)return 0==n?i.pos:n<0?i.before(e+1):i.after(e+1)}return null}function I(t,e,n=e,r=i.Slice.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),s=t.resolve(n);return $(o,s,r)?new v(e,n,r):new N(o,s,r).fit()}function $(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}u.jsonID("replaceAround",y);class N{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=i.Fragment.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=i.Fragment.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let o=this.placed,s=n.depth,a=r.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new i.Slice(o,s,a);return t>-1?new y(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new v(n.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),r.type.spec.isolating&&i<=n){t=n;break}e=r.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,r=null;n?(r=L(this.unplaced.content,n-1).firstChild,t=r.content):t=this.unplaced.content;let o=t.firstChild;for(let t=this.depth;t>=0;t--){let s,{type:a,match:l}=this.frontier[t],c=null;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(i.Fragment.from(o),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:t,parent:r,inject:c};if(2==e&&o&&(s=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:t,parent:r,wrap:s};if(r&&l.matchType(r.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=L(t,e);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new i.Slice(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=L(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new i.Slice(F(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new i.Slice(F(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t1||0==l||t.content.size)&&(d=e,u.push(j(t.mark(p.allowedMarks(t.marks)),1==c?l:0,c==a.childCount?h:-1)))}let f=c==a.childCount;f||(h=-1),this.placed=R(this.placed,e,i.Fragment.from(u)),this.frontier[e].match=d,f&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=a;t1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:i}=this.frontier[e],r=e=0;n--){let{match:e,type:i}=this.frontier[n],r=B(t,n,i,e,!0);if(!r||r.childCount)continue t}return{depth:e,fit:o,move:r?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=R(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),i=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,i)}return t}openFrontierNode(t,e=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=R(this.placed,this.depth,i.Fragment.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(i.Fragment.empty,!0);t.childCount&&(this.placed=R(this.placed,this.frontier.length,t))}}function F(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(F(t.firstChild.content,e-1,n)))}function R(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(R(t.lastChild.content,e-1,n)))}function L(t,e){for(let n=0;n1&&(r=r.replaceChild(0,j(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(i.Fragment.empty,!0)))),t.copy(r)}function B(t,e,n,i,r){let o=t.node(e),s=r?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function(t,e,n){for(let i=n;ir){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(i.Fragment.empty,!0))}return t}function z(t,e){let n=[];for(let i=Math.min(t.depth,e.depth);i>=0;i--){let r=t.start(i);if(re.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(r==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==r-1)&&n.push(i)}return n}class H extends u{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return d.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let r=e.type.create(n,null,e.marks);return d.fromReplace(t,this.pos,this.pos+1,new i.Slice(i.Fragment.from(r),0,e.isLeaf?0:1))}getMap(){return a.empty}invert(t){return new H(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new H(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new H(e.pos,e.attr,e.value)}}u.jsonID("attr",H);class W extends u{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return d.ok(n)}getMap(){return a.empty}invert(t){return new W(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new W(e.attr,e.value)}}u.jsonID("docAttr",W);let G=class extends Error{};G=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},G.prototype=Object.create(Error.prototype),G.prototype.constructor=G,G.prototype.name="TransformError";class q{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new l}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new G(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,e=-1e9;for(let n=0;n{t=Math.min(t,r),e=Math.max(e,o)})}return 1e9==t?null:{from:t,to:e}}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=i.Slice.empty){let r=I(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new i.Slice(i.Fragment.from(n),0,0))}delete(t,e){return this.replace(t,e,i.Slice.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if($(o,s,r))return t.step(new v(e,n,r));let a=z(o,s);0==a[a.length-1]&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(t)>-1?l=t:o.before(t)==e&&a.splice(1,0,-t)}let c=a.indexOf(l),u=[],d=r.openStart;for(let t=r.content,e=0;;e++){let n=t.firstChild;if(u.push(n),e==r.openStart)break;t=n.content}for(let t=d-1;t>=0;t--){let e=u[t],n=(p=e.type).spec.defining||p.spec.definingForContent;if(n&&!e.sameMarkup(o.node(Math.abs(l)-1)))d=t;else if(n||!e.type.isTextblock)break}var p;for(let e=r.openStart;e>=0;e--){let l=(e+d+1)%(r.openStart+1),p=u[l];if(p)for(let e=0;e=0&&(t.replace(e,n,r),!(t.steps.length>h));i--){let t=a[i];t<0||(e=o.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=O(t.doc,e,r.type);null!=i&&(e=n=i)}t.replaceRange(e,n,new i.Slice(i.Fragment.from(r),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let i=t.doc.resolve(e),r=t.doc.resolve(n);if(i.parent.isTextblock&&r.parent.isTextblock&&i.start()!=r.start()&&0==i.parentOffset&&0==r.parentOffset){let o=i.sharedDepth(n),s=!1;for(let t=i.depth;t>o;t--)i.node(t).type.spec.isolating&&(s=!0);for(let t=r.depth;t>o;t--)r.node(t).type.spec.isolating&&(s=!0);if(!s){for(let t=i.depth;t>0&&e==i.start(t);t--)e=i.before(t);for(let t=r.depth;t>0&&n==r.start(t);t--)n=r.before(t);i=t.doc.resolve(e),r=t.doc.resolve(n)}}let o=z(i,r);for(let e=0;e0&&(s||i.node(n-1).canReplace(i.index(n-1),r.indexAfter(n-1))))return t.delete(i.before(n),r.after(n))}for(let o=1;o<=i.depth&&o<=r.depth;o++)if(e-i.start(o)==i.depth-o&&n>i.end(o)&&r.end(o)-n!=r.depth-o&&i.start(o-1)==r.start(o-1)&&i.node(o-1).canReplace(i.index(o-1),r.index(o-1)))return t.delete(i.before(o),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:r,$to:o,depth:s}=e,a=r.before(s+1),l=o.after(s+1),c=a,u=l,d=i.Fragment.empty,p=0;for(let t=s,e=!1;t>n;t--)e||r.index(t)>0?(e=!0,d=i.Fragment.from(r.node(t).copy(d)),p++):c--;let h=i.Fragment.empty,f=0;for(let t=s,e=!1;t>n;t--)e||o.after(t+1)=0;t--){if(r.size){let e=n[t].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=i.Fragment.from(n[t].type.create(n[t].attrs,r))}let o=e.start,s=e.end;t.step(new y(o,s,o,s,new i.Slice(r,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,r=null){return function(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{let a="function"==typeof o?o(e):o;if(e.isTextblock&&!e.hasMarkup(r,a)&&function(t,e,n){let i=t.resolve(e),r=i.index();return i.parent.canReplaceWith(r,r+1,n)}(t.doc,t.mapping.slice(s).map(n),r)){let o=null;if(r.schema.linebreakReplacement){let t="pre"==r.whitespace,e=!!r.contentMatch.matchType(r.schema.linebreakReplacement);t&&!e?o=!1:!t&&e&&(o=!0)}!1===o&&E(t,e,n,s),_(t,t.mapping.slice(s).map(n,1),r,void 0,null===o);let l=t.mapping.slice(s),c=l.map(n,1),u=l.map(n+e.nodeSize,1);return t.step(new y(c,u,c+1,u-1,new i.Slice(i.Fragment.from(r.create(a,null,e.marks)),0,0),1,!0)),!0===o&&S(t,e,n,s),!1}})}(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r){return function(t,e,n,r,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(r,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new y(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new i.Slice(i.Fragment.from(a),0,0),1,!0))}(this,t,e,n,r),this}setNodeAttribute(t,e,n){return this.step(new H(t,e,n)),this}setDocAttribute(t,e){return this.step(new W(t,e)),this}addNodeMark(t,e){return this.step(new m(t,e)),this}removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e instanceof i.Mark)e.isInSet(n.marks)&&this.step(new g(t,e));else{let i,r=n.marks,o=[];for(;i=e.isInSet(r);)o.push(new g(t,i)),r=i.removeFromSet(r);for(let t=o.length-1;t>=0;t--)this.step(o[t])}return this}split(t,e=1,n){return function(t,e,n=1,r){let o=t.doc.resolve(e),s=i.Fragment.empty,a=i.Fragment.empty;for(let t=o.depth,e=o.depth-n,l=n-1;t>e;t--,l--){s=i.Fragment.from(o.node(t).copy(s));let e=r&&r[l];a=i.Fragment.from(e?e.type.create(e.attrs,a):o.node(t).copy(a))}t.step(new v(e,e,new i.Slice(s.append(a),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,i){let r,o,s=[],a=[];t.doc.nodesBetween(e,n,(t,l,c)=>{if(!t.isInline)return;let u=t.marks;if(!i.isInSet(u)&&c.type.allowsMarkType(i.type)){let c=Math.max(l,e),d=Math.min(l+t.nodeSize,n),p=i.addToSet(u);for(let t=0;tt.step(e)),a.forEach(e=>t.step(e))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,r){let o=[],s=0;t.doc.nodesBetween(e,n,(t,a)=>{if(!t.isInline)return;s++;let l=null;if(r instanceof i.MarkType){let e,n=t.marks;for(;e=r.isInSet(n);)(l||(l=[])).push(e),n=e.removeFromSet(n)}else r?r.isInSet(t.marks)&&(l=[r]):l=t.marks;if(l&&l.length){let i=Math.min(a+t.nodeSize,n);for(let t=0;tt.step(new f(e.from,e.to,e.style)))}(this,t,e,n),this}clearIncompatible(t,e,n){return _(this,t,e,n),this}}},usTV:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("b/sn");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},v28A:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.numberProp=void 0;const i=n("zyfj");e.numberProp=t=>(0,i.propOptionsGenerator)(Number,t)},v6xn:function(t,e,n){var i=n("C2SN");t.exports=function(t,e){return new(i(t))(e)}},vBP9:function(t,e,n){var i=n("5T2Y").navigator;t.exports=i&&i.userAgent||""},vYzU:function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";n.r(e),n.d(e,"ShareNetwork",(function(){return o}));var i={baidu:"http://cang.baidu.com/do/add?iu=@u&it=@t",buffer:"https://bufferapp.com/add?text=@t&url=@u",email:"mailto:?subject=@t&body=@u%0D%0A@d",evernote:"https://www.evernote.com/clip.action?url=@u&title=@t",facebook:"https://www.facebook.com/sharer/sharer.php?u=@u&title=@t&description=@d"e=@q&hashtag=@h",flipboard:"https://share.flipboard.com/bookmarklet/popout?v=2&url=@u&title=@t",hackernews:"https://news.ycombinator.com/submitlink?u=@u&t=@t",instapaper:"http://www.instapaper.com/edit?url=@u&title=@t&description=@d",line:"http://line.me/R/msg/text/?@t%0D%0A@u%0D%0A@d",linkedin:"https://www.linkedin.com/sharing/share-offsite/?url=@u",messenger:"fb-messenger://share/?link=@u",odnoklassniki:"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@u&st.comments=@t",pinterest:"https://pinterest.com/pin/create/button/?url=@u&media=@m&description=@t",pocket:"https://getpocket.com/save?url=@u&title=@t",quora:"https://www.quora.com/share?url=@u&title=@t",reddit:"https://www.reddit.com/submit?url=@u&title=@t",skype:"https://web.skype.com/share?url=@t%0D%0A@u%0D%0A@d",sms:"sms:?body=@t%0D%0A@u%0D%0A@d",stumbleupon:"https://www.stumbleupon.com/submit?url=@u&title=@t",telegram:"https://t.me/share/url?url=@u&text=@t%0D%0A@d",tumblr:"https://www.tumblr.com/share/link?url=@u&name=@t&description=@d",twitter:"https://twitter.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu",viber:"viber://forward?text=@t%0D%0A@u%0D%0A@d",vk:"https://vk.com/share.php?url=@u&title=@t&description=@d&image=@m&noparse=true",weibo:"http://service.weibo.com/share/share.php?url=@u&title=@t&pic=@m",whatsapp:"https://api.whatsapp.com/send?text=@t%0D%0A@u%0D%0A@d",wordpress:"https://wordpress.com/press-this.php?u=@u&t=@t&s=@d&i=@m",xing:"https://www.xing.com/social/share/spi?op=share&url=@u&title=@t",yammer:"https://www.yammer.com/messages/new?login=true&status=@t%0D%0A@u%0D%0A@d"},r="undefined"!=typeof window?window:null,o={name:"ShareNetwork",props:{network:{type:String,required:!0},url:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},media:{type:String,default:""},tag:{type:String,default:"a"},popup:{type:Object,default:function(){return{width:626,height:436}}}},data:function(){return{popupTop:0,popupLeft:0,popupWindow:void 0,popupInterval:null}},computed:{networks:function(){return this.$SocialSharing?this.$SocialSharing.options.networks:i},key:function(){return this.network.toLowerCase()},rawLink:function(){var t=navigator.userAgent.toLowerCase();return"sms"===this.key&&(t.indexOf("iphone")>-1||t.indexOf("ipad")>-1)?this.networks[this.key].replace(":?",":&"):this.networks[this.key]},shareLink:function(){var t=this.rawLink;return"twitter"===this.key&&(this.hashtags.length||(t=t.replace("&hashtags=@h","")),this.twitterUser.length||(t=t.replace("@tu",""))),t.replace(/@tu/g,"&via="+encodeURIComponent(this.twitterUser)).replace(/@u/g,encodeURIComponent(this.url)).replace(/@t/g,encodeURIComponent(this.title)).replace(/@d/g,encodeURIComponent(this.description)).replace(/@q/g,encodeURIComponent(this.quote)).replace(/@h/g,this.encodedHashtags).replace(/@m/g,encodeURIComponent(this.media))},encodedHashtags:function(){return"facebook"===this.key&&this.hashtags.length?"%23"+this.hashtags.split(",")[0]:this.hashtags}},render:function(t){var e=this;if(!this.networks.hasOwnProperty(this.key))throw new Error("Network "+this.key+" does not exist");var n={class:"share-network-"+this.key,on:{click:function(){return e["http"===e.rawLink.substring(0,4)?"share":"touch"]()}}};return"a"===this.tag&&(n.attrs={href:"javascript:void(0)"}),t(this.tag,n,this.$slots.default)},methods:{resizePopup:function(){var t=r.innerWidth||document.documentElement.clientWidth||r.screenX,e=r.innerHeight||document.documentElement.clientHeight||r.screenY,n=t/r.screen.availWidth;this.popupLeft=(t-this.popup.width)/2/n+(void 0!==r.screenLeft?r.screenLeft:r.screenX),this.popupTop=(e-this.popup.height)/2/n+(void 0!==r.screenTop?r.screenTop:r.screenY)},share:function(){var t=this;this.resizePopup(),this.popupWindow&&this.popupInterval&&(clearInterval(this.popupInterval),this.popupWindow.close(),this.emit("change")),this.popupWindow=r.open(this.shareLink,"sharer-"+this.key,",height="+this.popup.height+",width="+this.popup.width+",left="+this.popupLeft+",top="+this.popupTop+",screenX="+this.popupLeft+",screenY="+this.popupTop),this.popupWindow&&(this.popupWindow.focus(),this.popupInterval=setInterval((function(){t.popupWindow&&!t.popupWindow.closed||(clearInterval(t.popupInterval),t.popupWindow=null,t.emit("close"))}),500),this.emit("open"))},touch:function(){window.open(this.shareLink,"_blank"),this.emit("open")},emit:function(t){this.$root.$emit("share_network_"+t,this.key,this.url),this.$emit(t,this.key,this.url)}}};e.default={install:function(t,e){t.component(o.name,o),t.prototype.$SocialSharing={options:{networks:e&&e.hasOwnProperty("networks")?Object.assign(i,e.networks):i}}}}}])},vwuL:function(t,e,n){var i=n("NV0k"),r=n("rr1i"),o=n("NsO/"),s=n("G8Mo"),a=n("B+OT"),l=n("eUtF"),c=Object.getOwnPropertyDescriptor;e.f=n("jmDH")?c:function(t,e){if(t=o(t),e=s(e,!0),l)try{return c(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},"w2d+":function(t,e,n){"use strict";var i=n("hDam"),r=n("UO39"),o=n("SBuE"),s=n("NsO/");t.exports=n("MPFp")(Array,"Array",(function(t,e){this._t=s(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},w6GO:function(t,e,n){var i=n("5vMV"),r=n("FpHa");t.exports=Object.keys||function(t){return i(t,r)}},wPni:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.instanceOfProp=void 0;const i=n("zyfj"),r=n("3qjj");e.instanceOfProp=(t,e)=>(0,i.propOptionsGenerator)(t,e,(0,r.isInstanceOf)(t))},wdIX:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("/IjO");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},wgeU:function(t,e){},wx3Q:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("49oK");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},x9G1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("RCw7");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},xB1w:function(t,e,n){var i=n("9hz7");t.exports=i},xWqt:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!e)throw new Error("instance & callback is required");var r=!1,o=function(){r||(r=!0,e&&e.apply(null,arguments))};i?t.$once("after-leave",o):t.$on("after-leave",o),setTimeout((function(){o()}),n+100)}},xeH2:function(t,e){t.exports=jQuery},xx1W:function(t,e){},y269:function(t,e,n){"use strict";var i={props:["item","game","total_choices","preview"],data:function(){return{}},computed:{win_rate:function(){if(this.item.total_votes<=0||this.game.total_play_count<=0)return 0;var t=(this.item.total_votes/this.game.total_play_count*100).toFixed(1);return 0==t?0:t},popularity_rate:function(){if(this.item.total_selections<=0||this.game.total_play_count<=0)return 0;var t=(this.item.total_selections/(this.game.total_play_count*Math.floor(this.total_choices/2)+1)*100).toFixed(1);return 0==t?0:t},featured_in:function(){return this.item.featured_in?{title:this.item.featured_in,url:this.item.featured_in_url}:this.item.entity.featured_in?{title:this.item.entity.featured_in,url:this.item.entity.featured_in_url}:null},url:function(){return this.item.entity.url?this.item.entity.url:this.item.entity.permalink?this.item.entity.permalink:this.item.entity.slug?this.item.entity.slug:null}},methods:{editItem:function(){this.$bus.$emit("edit:item",this.item)},deleteItem:function(){this.$bus.$emit("delete:item",this.item)}}},r=n("KHd+"),o=Object(r.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.item.images?[n("div",{staticClass:"edit-left"},[n("div",{staticClass:"cover"},[t.item.images?n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.item.images.thumb,expression:"item.images.thumb"}]}):t._e()])])]:t.item.entity&&t.item.entity.images?[n("div",{staticClass:"edit-left"},[n("div",{staticClass:"cover"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.item.entity.images.thumb,expression:"item.entity.images.thumb"}]})])])]:t._e(),t._v(" "),n("div",{staticClass:"edit-body"},[t.item.entity?["title"==t.item.ref_type?[n("div",{staticClass:"title"},[t.item.answer_text?[n("div",[t._v(t._s(t.item.answer_text))]),t._v(" "),n("small",{staticClass:"subtitle"},[n("a",{staticClass:"text-primary",attrs:{href:t.url,target:"_blank"}},[t._v(t._s(t.item.entity.title))])])]:[n("div",[t._v(t._s(t.item.entity.title)+" "),n("small",[n("a",{staticClass:"text-primary",attrs:{href:t.url,target:"_blank"}},[n("i",{staticClass:"fa fa-external-link"})])])])]],2)]:t._e(),t._v(" "),"wiki"==t.item.ref_type?[n("div",{staticClass:"title"},[t.item.answer_text?[n("div",[t._v(t._s(t.item.answer_text))]),t._v(" "),t.featured_in?[n("small",{staticClass:"subtitle"},[n("a",{staticClass:"text-primary",attrs:{href:t.featured_in.url,target:"_blank"}},[t._v(t._s(t.featured_in.title))])])]:t._e(),t._v(" "),t.item.entity.title?n("small",{staticClass:"subtitle"},[t._v("("),n("a",{staticClass:"text-primary",attrs:{href:t.url,target:"_blank"}},[t._v(t._s(t.item.entity.title))]),t._v(")")]):t._e()]:[n("div",[t._v(t._s(t.item.entity.title)+" "),n("small",[n("a",{staticClass:"text-primary",attrs:{href:t.url,target:"_blank"}},[n("i",{staticClass:"fa fa-external-link"})])])]),t._v(" "),t.featured_in?[n("small",{staticClass:"subtitle"},[n("a",{staticClass:"text-primary",attrs:{href:t.featured_in.url,target:"_blank"}},[t._v(t._s(t.featured_in.title))])])]:t._e()]],2)]:t._e(),t._v(" "),"person"==t.item.ref_type?[t.item.answer_text?[n("div",[t._v(t._s(t.item.answer_text))]),t._v(" "),n("small",{staticClass:"subtitle"},[n("a",{staticClass:"text-primary",attrs:{href:t.url,target:"_blank"}},[t._v(t._s(t.item.entity.display_name))])])]:[n("div",[t._v(t._s(t.item.entity.display_name)+" "),n("small",[n("a",{staticClass:"text-primary",attrs:{href:t.url,target:"_blank"}},[n("i",{staticClass:"fa fa-external-link"})])])])]]:t._e()]:[n("div",{staticClass:"title"},[t._v(t._s(t.item.answer_text))])],t._v(" "),n("div",{staticClass:"stats"},[n("div",{staticClass:"stats-winrate"},[n("div",{staticClass:"stats-label"},[t._v("Winrate")]),t._v(" "),n("div",{staticClass:"stats-chart"},[n("span",{staticClass:"bar",style:{width:Math.max(1,t.win_rate)+"%"}}),n("span",{staticClass:"percentage"},[n("span",[t._v(t._s(t.win_rate)+"%")])])])]),t._v(" "),n("div",{staticClass:"stats-selections"},[n("div",{staticClass:"stats-label"},[t._v("Popularity")]),t._v(" "),n("div",{staticClass:"stats-chart"},[n("span",{staticClass:"bar",style:{width:Math.max(1,t.popularity_rate)+"%"}}),n("span",{staticClass:"percentage"},[n("span",[t._v(t._s(t.popularity_rate)+"%")])])])])])],2),t._v(" "),t.preview?t._e():n("div",{staticClass:"edit-right"},[n("div",[n("el-button",{attrs:{size:"small",type:"info",icon:"fa fa-pencil",circle:""},on:{click:t.editItem}}),t._v(" "),n("el-button",{attrs:{size:"small",type:"white",icon:"far fa-trash",circle:""},on:{click:t.deleteItem}})],1)])],2)}),[],!1,null,null,null);e.a=o.exports},y2OS:function(t,e,n){var i={"./cs-CS.js":["La3z",13],"./en-US.js":["ZY75"],"./es-ES.js":["hi4K",14],"./fr-FR.js":["E7Zd",15],"./index.js":["mSNy"],"./it-IT.js":["DZe9",16],"./nl-NL.js":["x/y3",17],"./pt-BR.js":["OEju",18],"./pt-PT.js":["luUc",19],"./ro-RO.js":["cqdr",20]};function r(t){if(!n.o(i,t))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=i[t],r=e[0];return Promise.all(e.slice(1).map(n.e)).then((function(){return n(r)}))}r.keys=function(){return Object.keys(i)},r.id="y2OS",t.exports=r},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"yeI/":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n("pZ+9");i=r,Object.keys(i).filter(t=>"default"!==t&&"__esModule"!==t).forEach(t=>{e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:()=>i[t]})})},yghv:function(t,e,n){t.exports=function(){"use strict";var t=function(){return t.get.apply(t,arguments)},e=t.utils={isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isPlainObject:function(t){return!!t&&"[object Object]"===Object.prototype.toString.call(t)},toArray:function(t){return Array.prototype.slice.call(t)},getKeys:Object.keys||function(t){var e=[],n="";for(n in t)t.hasOwnProperty(n)&&e.push(n);return e},encode:function(t){return String(t).replace(/[,;"\\=\s%]/g,(function(t){return encodeURIComponent(t)}))},decode:function(t){return decodeURIComponent(t)},retrieve:function(t,e){return null==t?e:t}};return t.defaults={},t.expiresMultiplier=86400,t.set=function(t,n,i){if(e.isPlainObject(t))for(var r in t)t.hasOwnProperty(r)&&this.set(r,t[r],n);else{var o=void 0!==(i=e.isPlainObject(i)?i:{expires:i}).expires?i.expires:this.defaults.expires||"",s=typeof o;"string"===s&&""!==o?o=new Date(o):"number"===s&&(o=new Date(+new Date+1e3*this.expiresMultiplier*o)),""!==o&&"toUTCString"in o&&(o=";expires="+o.toUTCString());var a=i.path||this.defaults.path;a=a?";path="+a:"";var l=i.domain||this.defaults.domain;l=l?";domain="+l:"";var c=i.secure||this.defaults.secure?";secure":"";!1===i.secure&&(c="");var u=i.sameSite||this.defaults.sameSite;u=u?";SameSite="+u:"",null===i.sameSite&&(u=""),document.cookie=e.encode(t)+"="+e.encode(n)+o+a+l+c+u}return this},t.setDefault=function(n,i,r){if(e.isPlainObject(n)){for(var o in n)void 0===this.get(o)&&this.set(o,n[o],i);return t}if(void 0===this.get(n))return this.set.apply(this,arguments)},t.remove=function(t){for(var n=0,i=(t=e.isArray(t)?t:e.toArray(arguments)).length;n({optional:{type:t,required:!1,default:void 0,validator:(0,i.vuePropValidator)(e,...n)},nullable:{type:t,required:!1,default:null,validator:(0,i.vuePropValidator)(e,...n)},withDefault:r=>({type:t,required:!1,default:r,validator:(0,i.vuePropValidator)(e,...n)}),required:{type:t,required:!0,validator:(0,i.vuePropValidator)(e,...n)}})}});