Home
last modified time | relevance | path

Searched refs:pop (Results 426 – 450 of 559) sorted by relevance

1...<<11121314151617181920>>...23

/plugin/yuriigantt/3rd/dhtmlxgantt/ext/
H A Ddhtmlxgantt_undo.js.map1pop","weights","any","link","task","actionWeights","sort","a","b","parent","$index","weightA","ent…
/plugin/diagramsnet/lib/js/
H A Dextensions.min.js7 …n(" ")+";");b+='">';Tb.push(g);return b}function n(a){var b="";do{var c=pa.pop();if(!a&&E&&("ul"==…
8 …a);a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;");do for(b=Tb.pop(),c=0;c<b;c++){var n=z.pop();a+="…
264 …b=Hb.filter(function(a){return a});/^\{[^}]*\}$/.test(Hb[Hb.length-1])&&Hb.pop();for(var Vc=Hb[0].…
1137 …A&&d.setConnectionConstraint(y,b,!1,new mxConnectionConstraint(A,!1)),E&&e.pop());B=d.getModel().g…
1140 …this.rotateChildEdge(d.getModel(),b,n,w,e);b=d.getModel().getGeometry(g);e.pop();e.shift();b.point…
1493 k&&(a="<li>"+a,k=!1);e?(a=a.split("\n"),a[a.length-1]||(a.pop(),k=!0),a=a.join("</li><li>")):a=a.re…
1705pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(…
1728pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof …
/plugin/fckg/fckeditor/editor/js/
H A Dfckeditorcode_gecko.js26pop) A=A[0];for (var i=0;i<A.length;i++){if (this==A[i]) return true;};return false;};String.proto…
38 …){var D={};if (!C.pop) C=[C];while (C.length>0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonPar…
89 …(var i=0;i<C.length;i++) G=FCKDomTools.GetCommonParents(G,C[i].parentNode).pop();for (var i=0;i<C.…
92 … i=0;i<I.length;i++){H=I[i];J=FCKDomTools.GetCommonParents(H.parentNode,J).pop();}while (J.nodeNam…
/plugin/sequencediagram/bower_components/js-sequence-diagrams/dist/
H A Dsequence-diagram-raphael-min.js6 …nction(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionSta…
H A Dsequence-diagram-min.js6 …nction(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionSta…
/plugin/yuriigantt/3rd/dhtmlxgantt/sources/ext/
H A Ddhtmlxgantt_keyboard_navigation.js1652 var box = modalsStack.pop();
/plugin/ckgedit/ckeditor/plugins/pastefromword/filter/
H A Ddefault.js37 …length&&g.setListSymbol(r,b.attributes["cke-symbol"],c)}for(;c<l.length;)l.pop(),k=l[l.length-1],c…
/plugin/combo/resources/library/combo/dist/
H A Dcombo.min.js1 !function(){function t(t){return t&&t.__esModule?t.default:t}function e(t,e,n,r,a,o,i){try{var l=t[o](i),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,a)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(a,o){var i=t.apply(n,r);function l(t){e(i,a,o,l,s,"next",t)}function s(t){e(i,a,o,l,s,"throw",t)}l(void 0)}))}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l,s=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"toBoolean",value:function(t){return"boolean"==typeof t?t:"true"===t}}]),t}(),u=function(){"use strict";function t(){r(this,t)}return o(t,[{key:"error",value:function(t){console.error(t)}}],[{key:"getLogger",value:function(){return void 0===l&&(l=new t),l}}]),t}(),c=function(t){return crypto.getRandomValues(new Uint8Array(t))},h=function(t,e){return function(t,e,n){var r=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*r*e/t.length);return function(){for(var o="";;)for(var i=n(a),l=a;l--;)if((o+=t[i[l]&r]||"").length===e)return o}}(t,e,c)},d=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"toHtmlId",value:function(t){return t.toString().replace(/[_.\s:\/\\]/g,"-")}},{key:"createRandomId",value:function(){return h("abcdefghijklmnopqrstuvwxyz",10)()}},{key:"toEntities",value:function(t){for(var e=[],n=0;n<t.length;n++){var r="&#".concat(t[n].charCodeAt(),";");e.push(r)}return e.join("")}}]),t}(),f=function(){"use strict";function t(e){r(this,t),i(this,"tab","unknown"),i(this,"mutable",!0),i(this,"values",[]),i(this,"defaultValues",[]),i(this,"multiple",!1),i(this,"children",{}),this.name=e}return o(t,[{key:"getLabelAnchor",value:function(){if(void 0===this.getUrl()&&void 0===this.getDescription())return this.getLabel();var t=this.getUrl();return void 0===this.getUrl()?(t="#",'\n<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="'.concat(this.getDescription(),'">\n <a href="').concat(t,'" title="').concat(this.getDescription(),'" style="text-decoration:none;pointer-events: none;">').concat(this.getLabel(),"</a>\n</span>")):'<a href="'.concat(t,'" title="').concat(this.getDescription(),'" data-bs-toggle="tooltip" style="text-decoration:none" target="_blank">').concat(this.getLabel(),"</a>")}},{key:"setType",value:function(t){return this.type=t,this}},{key:"setLabel",value:function(t){return this.label=t,this}},{key:"setUrl",value:function(t){return this.url=t,this}},{key:"addValue",value:function(t,e){return this.values.push(t),this.defaultValues.push(e),this}},{key:"getType",value:function(){return this.type}},{key:"getLabel",value:function(){return void 0===this.label?this.getName().split(/_|-/).map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "):this.label}},{key:"getUrl",value:function(){return this.url}},{key:"getName",value:function(){return this.name}},{key:"getDescription",value:function(){return this.description}},{key:"getTab",value:function(){return this.tab}},{key:"setMultiple",value:function(t){return this.multiple=t,this}},{key:"setParent",value:function(t){return this.parent=t,this}},{key:"isMutable",value:function(){return this.mutable}},{key:"setTab",value:function(t){return this.tab=t,this}},{key:"setMutable",value:function(t){return this.mutable=s.toBoolean(t),this}},{key:"setDescription",value:function(t){return this.description=t,this}},{key:"getDefaultValue",value:function(){return this.defaultValues[0]}},{key:"getValue",value:function(){return this.values[0]}},{key:"getDomainValues",value:function(){return this.domainValues}},{key:"setDomainValues",value:function(t){if(Array.isArray(t))return this.domainValues=t,this;console.error("The domains values should be an array. (".concat(t,") is not an array"))}},{key:"setControlWidth",value:function(t){return this.width=t,this}},{key:"getControlWidth",value:function(){return void 0===this.width&&void 0!==this.parent?12/this.parent.getChildren().length:this.width}},{key:"getValues",value:function(){return this.values}},{key:"getDefaultValues",value:function(){return this.defaultValues}},{key:"getChildren",value:function(){return Object.values(this.children)}},{key:"addChild",value:function(t){return this.children[t.getName()]=t,this}},{key:"toHtmlLabel",value:function(e,n){var r=this.getLabelAnchor(),a="";return a=this.getType()===t.BOOLEAN?"form-check-label":"col-form-label",void 0!==n&&(a="".concat(n," ").concat(a)),'<label for="'.concat(e,'" class="').concat(a,'">').concat(r,"</label>")}},{key:"toHtmlControl",value:function(e){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.getType(),l=this.isMutable(),s=this.getDomainValues();if(void 0!==s){r="select";var u="";void 0!==o&&(u=" (".concat(o,")"));var c="";this.getMultiple()&&(c="multiple"),r='<select class="form-select" aria-label="'.concat(this.getLabel(),'" name="').concat(this.getName(),'" id="').concat(e,'" ').concat(c,">");var h="";null===a&&(h="selected"),r+='<option value="" '.concat(h,">Default").concat(u,"</option>");var f=!0,v=!1,y=void 0;try{for(var m,g=s[Symbol.iterator]();!(f=(m=g.next()).done);f=!0){var p=m.value;h=p===a?"selected":"",r+='<option value="'.concat(p,'" ').concat(h,">").concat(p,"</option>")}}catch(t){v=!0,y=t}finally{try{f||null==g.return||g.return()}finally{if(v)throw y}}return r+="</select>"}var b="No value";l&&(b="Enter a ".concat(this.getLabel())),null!=o&&(b="string"==typeof o||o instanceof String?d.toEntities(o):o);var w,k='placeholder="'.concat(b,'"'),L="",E=this.getName();n=void 0!==l&&!1===l?"disabled":"";var T="input",S="form-control",C="",x=3;switch(i){case t.DATE_TIME:w="datetime-local",null!==a?(a=a.slice(0,19),L='value="'.concat(a,'"')):l||null===o||(o=o.slice(0,19),L='value="'.concat(o,'"')),k="";break;case t.PARAGRAPH:T="textarea",null!==a&&(a=d.toEntities(a),L="".concat(a));break;case t.JSON:T="textarea",null!==a&&("object"==typeof a&&(a=JSON.stringify(a,null,2)),a=d.toEntities(a),L="".concat(a)),x=15;break;case t.BOOLEAN:w="checkbox",S="form-check-input",null!==o?(L='value="'.concat(o,'"'),a===o&&(C="checked")):"on"===a&&(C="checked"),k="";break;default:w="text",null!=a&&(L='value="'.concat(a,'"'))}if("textarea"===T)r='<textarea id="'.concat(e,'" name="').concat(E,'" class="').concat(S,'" rows="').concat(x,'" ').concat(k," ").concat(n,">").concat(L,"</textarea>");else r='<input type="'.concat(w,'" name="').concat(E,'" class="').concat(S,'" id="').concat(e,'" ').concat(k," ").concat(L," ").concat(C," ").concat(n,"/>");return r}},{key:"toJavascriptObject",value:function(){return{name:this.getName(),label:this.getLabel(),type:this.getType(),description:this.getDescription(),tab:this.getTab(),mutable:this.isMutable(),value:this.getValue(),default:this.getDefaultValue(),url:this.getUrl()}}},{key:"getMultiple",value:function(){return this.multiple}}],[{key:"createFromJson",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.hasOwnProperty("name")||u.getLogger().error("To create a form meta field, the name property is mandatory.");var r,a,o=e.name,i=t.createFromName(o);for(var l in null!=n&&i.setParent(n),e)if(e.hasOwnProperty(l)){var s=e[l];switch(l){case"name":continue;case"label":i.setLabel(s);continue;case"tab":i.setTab(s);continue;case"type":i.setType(s);continue;case"mutable":i.setMutable(s);continue;case"description":i.setDescription(s);continue;case"url":i.setUrl(s);continue;case"value":r=s;continue;case"default":a=s;continue;case"domain-values":i.setDomainValues(s);continue;case"multiple":i.setMultiple(s);continue;case"width":i.setControlWidth(s);continue;case"children":var c=s;for(var h in c)if(c.hasOwnProperty(h)){var d=t.createFromJson(c[h],i);i.addChild(d)}continue;default:u.getLogger().error("The property (".concat(l,") of the form (").concat(o,") is unknown"))}}return Array.isArray(r)?r.forEach((function(t,e){var n=a[e];void 0!==n?i.addValue(t,n):i.addValue(t)})):i.addValue(r,a),i}},{key:"createFromName",value:function(e){return new t(e)}}]),t}();i(f,"TABULAR_TYPE","tabular"),i(f,"DATE_TIME","datetime"),i(f,"PARAGRAPH","paragraph"),i(f,"BOOLEAN","boolean"),i(f,"JSON","json");var v=function(){"use strict";function t(e){r(this,t),this.name=e}return o(t,[{key:"getName",value:function(){return this.name}},{key:"setWidth",value:function(t){this.width=t}},{key:"getWidth",value:function(){return this.width}},{key:"setLabel",value:function(t){return this.label=t,this}},{key:"getLabel",value:function(){return void 0===this.label?this.name:this.label}},{key:"setWidthField",value:function(t){return this.widthField=t,this}},{key:"setWidthLabel",value:function(t){return this.widthLabel=t,this}},{key:"getLabelWidth",value:function(){return void 0===this.widthLabel?3:this.widthLabel}},{key:"getFieldWidth",value:function(){return void 0===this.widthField?12-this.getLabelWidth():this.widthField}}],[{key:"createFromJson",value:function(e){e.hasOwnProperty("name")||u.getLogger().error("A name property is mandatory to create a tab and was not found in the json provided");var n=e.name,r=new t(n);for(var a in e)if(e.hasOwnProperty(a)){var o=e[a];switch(a){case"name":continue;case"label":r.setLabel(o);continue;case"width-field":r.setWidthField(o);continue;case"width-label":r.setWidthLabel(o);continue;default:u.getLogger().error("The property (".concat(a,") of the tab (").concat(n,") is unknown"))}}return r}},{key:"createFromName",value:function(e){return new t(e)}}]),t}(),y=function(){function t(e){if(r(this,t),i(this,"formFields",{}),i(this,"tabs",{}),i(this,"width",8),null==e)throw new Error("The if of the form should not be null");this.name=e}return o(t,[{key:"getLabel",value:function(){return this.label}},{key:"getUrl",value:function(){return this.url}},{key:"getId",value:function(){return this.name}},{key:"getControlWidth",value:function(){return this.width}},{key:"getLabelWidth",value:function(){return 12-this.getControlWidth()}},{key:"addFormField",value:function(t){return this.formFields[t.getName()]=t,this.tabs.hasOwnProperty(t.getTab())||(this.tabs[t.getTab()]=v.createFromName(t.getTab())),this}},{key:"getFields",value:function(){return Object.values(this.formFields)}},{key:"getTabs",value:function(){return Object.values(this.tabs)}},{key:"addTab",value:function(t){this.tabs[t.getName()]=t}},{key:"valueOf",value:function(){return this.getId()}},{key:"getFieldsForTab",value:function(t){return this.getFields().filter((function(e){return e.getTab()===t}))}},{key:"toHtmlElement",value:function(){var t,e,n=this.getId(),r='<ul class="nav nav-tabs mb-3">';this.getTabPaneId=function(t){var e=d.toHtmlId(t.getName());return"".concat(n,"-tab-pane-").concat(e)},this.getTabNavId=function(t){var e=d.toHtmlId(t.getName());return"".concat(n,"-tab-nav-").concat(e)},this.getControlId=function(t){var e=d.toHtmlId(t);return"".concat(n,"-control-").concat(e)};var a=this.getTabs(),o=a[0],i=!0,l=!1,s=void 0;try{for(var u,c=a[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var h=u.value;Object.is(h,o)?(t="active",e="true"):(t="",e="false");var f=h.getLabel(),v=this.getTabPaneId(h),y=this.getTabNavId(h);r+='\n<li class="nav-item">\n<button\n class="nav-link '.concat(t,'"\n id="').concat(y,'"\n type="button"\n role="tab"\n aria-selected = "').concat(e,'"\n aria-controls = "').concat(v,'"\n data-bs-toggle = "tab"\n data-bs-target = "#').concat(v,'" >').concat(f,"\n </button>\n</li>")}}catch(t){l=!0,s=t}finally{try{i||null==c.return||c.return()}finally{if(l)throw s}}r+="</ul>";var m,g,p='<div class="tab-content">',b=0,w=!0,k=!1,L=void 0;try{for(var E,T=a[Symbol.iterator]();!(w=(E=T.next()).done);w=!0){var S=E.value,C=this.getTabPaneId(S),x=this.getTabNavId(S);p+='<div class="tab-pane '.concat(t=S===o?"active":"",'" id="').concat(C,'" role="tabpanel" aria-labelledby="').concat(x,'">'),g=S.getLabelWidth(),m=S.getFieldWidth();var F=this.getFieldsForTab(S.getName());if(1===F.length){var O=F[0];if(0===O.getChildren().length){b++;var A=this.getControlId(b),P=O.toHtmlLabel(A),B=O.getValue(),N=O.getDefaultValue(),I=O.toHtmlControl(A,B,N);p+='\n<div class="row mb-3 text-center"><div class="col-sm-12">'.concat(P,'</div></div>\n<div class="row mb-3"><div class="col-sm-12">').concat(I,"</div></div>\n"),p+="</div>";continue}}var R=!0,H=!1,D=void 0;try{for(var M,j=F[Symbol.iterator]();!(R=(M=j.next()).done);R=!0){var U=M.value;if(0===U.getChildren().length){b++;var V=this.getControlId(b),W=U.toHtmlLabel(V,"col-sm-".concat(g)),_=U.getValue(),J=U.getDefaultValue(),G=U.toHtmlControl(V,_,J);p+='\n<div class="row mb-3">\n '.concat(W,'\n <div class="col-sm-').concat(m,'">').concat(G,"</div>\n</div>\n")}else{var q=U.getLabelAnchor();p+='<div class="row mb-3 text-center">'.concat(q,"</div>"),p+='<div class="row mb-3">';var K=0,X=!0,Y=!1,z=void 0;try{for(var Q,Z=U.getChildren()[Symbol.iterator]();!(X=(Q=Z.next()).done);X=!0){var $=Q.value,tt=$.getControlWidth();p+='<div class="col-sm-'.concat(tt,' text-center">'),p+=$.getLabelAnchor(),p+="</div>";var et=$.getValues().length;et>K&&(K=et)}}catch(t){Y=!0,z=t}finally{try{X||null==Z.return||Z.return()}finally{if(Y)throw z}}p+="</div>";for(var nt=0;nt<K;nt++){p+='<div class="row mb-3">';var rt=!0,at=!1,ot=void 0;try{for(var it,lt=U.getChildren()[Symbol.iterator]();!(rt=(it=lt.next()).done);rt=!0){var st=it.value,ut=st.getValues()[nt],ct=st.getDefaultValues()[nt];b++;var ht=this.getControlId(b),dt=st.getControlWidth();p+='<div class="col-sm-'.concat(dt,'">'),p+=st.toHtmlControl(ht,ut,ct),p+="</div>"}}catch(t){at=!0,ot=t}finally{try{rt||null==lt.return||lt.return()}finally{if(at)throw ot}}p+="</div>"}}}}catch(t){H=!0,D=t}finally{try{R||null==j.return||j.return()}finally{if(H)throw D}}p+="</div>"}}catch(t){k=!0,L=t}finally{try{w||null==T.return||T.return()}finally{if(k)throw L}}p+="</div>";var ft=document.createElement("form");return ft.setAttribute("id",n),ft.innerHTML="".concat(r," ").concat(p),ft}},{key:"setControlWidth",value:function(t){return this.width=t,this}},{key:"setLabel",value:function(t){this.label=t}},{key:"setUrl",value:function(t){this.url=t}}],[{key:"createFromJson",value:function(e,n){var r=t.createFromId(e);for(var a in n)if(n.hasOwnProperty(a)){var o=n[a];switch(a){case"fields":var i=o;for(var l in i)i.hasOwnProperty(l)&&r.addFormField(f.createFromJson(i[l]));continue;case"tabs":var s=o;for(var c in s)s.hasOwnProperty(c)&&r.addTab(v.createFromJson(s[c]));break;case"width":r.setControlWidth(o);break;case"label":r.setLabel(o);break;case"url":r.setUrl(o);break;default:u.getLogger().error("The form property (".concat(a,") is unknown"))}}return r}},{key:"createFromId",value:function(e){return new t(e)}}]),t}(),m={};m=bootstrap;var g={},p=function(){"use strict";function t(e){r(this,t),i(this,"footerButtons",[]),i(this,"bodies",[]),i(this,"isBuild",!1),i(this,"bodyStyles",{}),i(this,"dialogStyles",{}),i(this,"showFooter",!0),i(this,"dialogClasses",[]),this.modalId=e;var n=document.getElementById(e);null!==n?(u.getLogger().error("The id (".concat(e,") given to create a modal was already used by an element in the DOM. We have reused it.")),this.modalRootHtmlElement=n,this.reset()):(this.modalRootHtmlElement=document.createElement("div"),this.modalRootHtmlElement.setAttribute("id",this.modalId),this.modalRootHtmlElement.classList.add("modal","fade"),this.modalRootHtmlElement.setAttribute("aria-hidden","true"))}return o(t,[{key:"setHeader",value:function(t){return this.headerText=t,this}},{key:"addBody",value:function(t){return this.bodies.push(t),this}},{key:"addBodyStyle",value:function(t,e){return this.bodyStyles[t]=e,this}},{key:"noFooter",value:function(){return this.showFooter=!1,this}},{key:"addDialogStyle",value:function(t,e){return this.dialogStyles[t]=e,this}},{key:"addDialogClass",value:function(t){return this.dialogClasses.push(t),this}},{key:"resetOnClose",value:function(){return this.isResetOnClose=!0,this}},{key:"addFooterButton",value:function(t){return this.footerButtons.push(t),this}},{key:"addFooterCloseButton",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Close";this.closeButton=document.createElement("button"),this.closeButton.classList.add("btn","btn-secondary"),this.closeButton.innerHTML=t;var e=this;return this.closeButton.addEventListener("click",(function(){e.bootStrapModal.hide()})),this.addFooterButton(this.closeButton),this}},{key:"centered",value:function(){return this.isCentered=!0,this}},{key:"show",value:function(){if(null==this.modalRootHtmlElement)throw new Error("This modal has no HTML element, you can't use it anymore");if(this.isBuild||this.build(),!0===this.isResetOnClose){var t=this;this.getElement().addEventListener("hidden.bs.modal",(function(){t.reset()}))}if(void 0!==this.callBack&&void 0!==this.closeButton){var e=this;this.closeButton.addEventListener("click",(function(){e.dismissHide(),e.callBack()}))}this.bootStrapModal.show()}},{key:"dismissHide",value:function(){void 0!==this.bootStrapModal&&this.bootStrapModal.hide()}},{key:"getModalId",value:function(){return this.modalId}},{key:"setCallBackOnClose",value:function(t){return this.callBack=t,this}},{key:"getElement",value:function(){return this.modalRootHtmlElement}},{key:"wasBuild",value:function(){return this.isBuild}},{key:"setCentered",value:function(t){return this.isCentered=t,this}},{key:"resetIfBuild",value:function(){return this.wasBuild()&&this.reset(),this}},{key:"reset",value:function(){this.modalRootHtmlElement.querySelectorAll('[data-bs-toggle="tab"]').forEach((function(t){var e=m.Tab.getInstance(t);null!==e&&e.dispose()})),void 0!==this.bootStrapModal&&this.dismissHide(),this.modalRootHtmlElement.innerHTML="",this.isBuild=!1,this.bodies=[],this.footerButtons=[],this.headerText=void 0}},{key:"build",value:function(){this.isBuild=!0,document.body.appendChild(this.modalRootHtmlElement);var t=document.createElement("div");for(var e in t.classList.add("modal-dialog","modal-dialog-scrollable","modal-lg"),this.isCentered?t.classList.add("modal-dialog-centered"):(t.style.setProperty("margin","5rem auto"),t.style.setProperty("height","calc(100% - 9rem)")),this.dialogStyles)this.dialogStyles.hasOwnProperty(e)&&t.style.setProperty(e,this.dialogStyles[e]);for(var n in this.dialogClasses)t.classList.add(n);for(var r in this.modalRootHtmlElement.appendChild(t),this.modalContent=document.createElement("div"),this.modalContent.classList.add("modal-content"),t.appendChild(this.modalContent),this.modalBody=document.createElement("div"),this.modalBody.classList.add("modal-body"),this.bodyStyles)this.bodyStyles.hasOwnProperty(r)&&this.modalBody.style.setProperty(r,this.bodyStyles[r]);if(this.modalContent.appendChild(this.modalBody),this.bootStrapModal=m.Modal.getInstance(this.modalRootHtmlElement),null===this.bootStrapModal){this.bootStrapModal=new m.Modal(this.modalRootHtmlElement,{backdrop:!0,keyboard:!0,focus:!0})}if(void 0!==this.headerText){var a='\n<div class="modal-header">\n <h5 class="modal-title">'.concat(this.headerText,'</h5>\n <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>\n</div>\n');this.modalContent.insertAdjacentHTML("afterbegin",a)}var o,i=!0,l=!1,s=void 0;try{for(var u,c=this.bodies[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var h=u.value;if("string"===(void 0===h?"undefined":(o=h)&&o.constructor===Symbol?"symbol":typeof o))this.modalBody.insertAdjacentHTML("beforeend",h);else this.modalBody.appendChild(h)}}catch(t){l=!0,s=t}finally{try{i||null==c.return||c.return()}finally{if(l)throw s}}if(this.showFooter){var d=document.createElement("div");d.classList.add("modal-footer"),this.modalContent.appendChild(d),0===this.footerButtons.length&&this.addFooterCloseButton();var f=!0,v=!1,y=void 0;try{for(var g,p=this.footerButtons[Symbol.iterator]();!(f=(g=p.next()).done);f=!0){var b=g.value;"string"==typeof b||b instanceof String?d.insertAdjacentHTML("beforeend",b):d.appendChild(b)}}catch(t){v=!0,y=t}finally{try{f||null==p.return||p.return()}finally{if(v)throw y}}}var w="#".concat(this.modalId,' [data-bs-toggle="tooltip"]');document.querySelectorAll(w).forEach((function(t){return new m.Tooltip(t)}))}}],[{key:"createFromId",value:function(e){var n=new t(e);return g[e]=n,n}},{key:"createTemporary",value:function(){return this.createFromId(d.createRandomId())}},{key:"getOrCreate",value:function(e){var n=t.getModal(e);return null===n&&(n=t.createFromId(e)),n}}]),t}();i(p,"getModal",(function(t){return t in g?g[t]:null})),i(p,"listModals",(function(){console.log(Object.keys(g).join(", "))})),i(p,"resetAllModals",(function(){for(var t in g)if(g.hasOwnProperty(t)){g[t].reset()}}));var b={},w=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),i=new F(r||[]);return o._invoke=function(t,e,n){var r=h;return function(a,o){if(r===f)throw new Error("Generator is already running");if(r===v){if("throw"===a)throw o;return A()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var l=S(i,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var s=c(t,e,n);if("normal"===s.type){if(r=n.done?v:d,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=v,n.method="throw",n.arg=s.arg)}}}(t,n,i),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",f="executing",v="completed",y={};function m(){}function g(){}function p(){}var b={};s(b,o,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(O([])));k&&k!==n&&r.call(k,o)&&(b=k);var L=p.prototype=m.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(a,o,i,l){var s=c(t[a],t,o);if("throw"!==s.type){var u=s.arg,h=u.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,i,l)}),(function(t){n("throw",t,i,l)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return n("throw",t,i,l)}))}l(s.arg)}var a;this._invoke=function(t,r){function o(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(o,o):o()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=c(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function O(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:A}}function A(){return{value:e,done:!0}}return g.prototype=p,s(L,"constructor",p),s(p,"constructor",g),g.displayName=s(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},E(T.prototype),s(T.prototype,i,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new T(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,o,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}(b);try{regeneratorRuntime=w}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=w:Function("r","regeneratorRuntime = r")(w)}var k=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"hasWindowGuard",value:function(t){if(!this.hasWindow(t))throw Error("The element has no window")}},{key:"hasWindow",value:function(t){return!(!t||!t.ownerDocument||!t.ownerDocument.defaultView)}},{key:"getWindow",value:function(t){return this.hasWindowGuard(t),t.ownerDocument.defaultView}},{key:"formDataToObject",value:function(t){var e={},n=!0,r=!1,a=void 0;try{for(var o,i=t[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l=o.value,s=l[0],u=l[1];if(e.hasOwnProperty(s)){var c=e[s];Array.isArray(c)?e[s].push(u):e[s]=[c,u]}else e[s]=u}}catch(t){r=!0,a=t}finally{try{n||null==i.return||i.return()}finally{if(r)throw a}}return e}}]),t}(),L=function(){"use strict";function t(e){switch(r(this,t),e){case t.AJAX:this.url=new URL(DOKU_BASE+"lib/exe/ajax.php",window.location.href),this.url.searchParams.set("id",JSINFO.id);break;case t.RUNNER:this.url=new URL(DOKU_BASE+"lib/exe/taskrunner.php",window.location.href),this.url.searchParams.set("id",JSINFO.id);break;case t.FETCH:this.url=new URL(DOKU_BASE+"lib/exe/fetch.php",window.location.href);break;case t.EDIT:this.url=new URL(DOKU_BASE+"doku.php",window.location.href),this.url.searchParams.set("do","edit"),this.url.searchParams.set("id",JSINFO.id);break;case t.SHOW:this.url=new URL(DOKU_BASE+"doku.php",window.location.href),this.url.searchParams.set("id",JSINFO.id)}}return o(t,[{key:"setProperty",value:function(t,e){return this.url.searchParams.set(t,e),this}},{key:"toString",value:function(){return this.url.toString()}},{key:"getCall",value:function(){return this.url.searchParams.get(t.CALL)}}],[{key:"createAjax",value:function(e){return new t(this.AJAX).setProperty(t.CALL,e)}},{key:"createRunner",value:function(){return new t(this.RUNNER)}},{key:"createFetch",value:function(e,n){var r=new t(this.FETCH);if(void 0===e)throw new Error("The media id is mandatory");return r.setProperty("media",e),void 0!==n&&r.setProperty("drive",n),r}},{key:"createEdit",value:function(e){var n=new t(this.EDIT);return void 0!==e&&n.setProperty("id",e),n}}]),t}();i(L,"AJAX","AJAX"),i(L,"RUNNER","RUNNER"),i(L,"CALL","call"),i(L,"EDIT","edit"),i(L,"SHOW","show"),i(L,"FETCH","fetch");var E=function(){"use strict";function e(t){r(this,e),i(this,"method","GET"),this.url=L.createAjax(t)}return o(e,[{key:"getJson",value:function(){var e=this;return n(t(b).mark((function n(){var r;return t(b).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getResponse();case 2:if(200===(r=t.sent).status){t.next=5;break}return t.abrupt("return",{});case 5:return t.abrupt("return",r.json());case 6:case"end":return t.stop()}}),n)})))()}},{key:"getText",value:function(){var e=this;return n(t(b).mark((function n(){var r;return t(b).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getResponse();case 2:if(200===(r=t.sent).status){t.next=5;break}return t.abrupt("return","");case 5:return t.abrupt("return",r.text());case 6:case"end":return t.stop()}}),n)})))()}},{key:"setMethod",value:function(t){return this.method=t.toUpperCase(),this}},{key:"setProperty",value:function(t,e){return this.url.setProperty(t,e),this}},{key:"sendFormDataAsJson",value:function(t){return fetch(this.url.toString(),{method:this.method,body:JSON.stringify(k.formDataToObject(t)),headers:{"Content-Type":"application/json"}})}},{key:"getResponse",value:function(){var e=this;return n(t(b).mark((function n(){var r,a;return t(b).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e.url.toString(),{method:e.method});case 2:return 200!==(r=t.sent).status&&((a=p.createTemporary()).addBody("Bad request: the call ".concat(e.url.getCall()," to the backend sends back the following exit code")+r.status),a.show()),t.abrupt("return",r);case 5:case"end":return t.stop()}}),n)})))()}}]),e}();i(E,"createDokuRequest",(function(t){return new E(t)}));var T,S=function(){"use strict";function t(e){r(this,t),this.date=e}return o(t,[{key:"toSqlTimestampString",value:function(){return"".concat(this.date.getFullYear(),"-").concat((this.date.getMonth()+1).toString().padStart(2,"0"),"-").concat(this.date.getDate().toString().padStart(2,"0")," ").concat(this.date.getHours().toString().padStart(2,"0"),":").concat(this.date.getMinutes().toString().padStart(2,"0"),":").concat(this.date.getSeconds().toString().padStart(2,"0"))}}],[{key:"createFromIso",value:function(e){return new t(new Date(e))}}]),t}();window.combo=(i(T=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"toHtmlId",value:function(t){return d.toHtmlId(t)}},{key:"getOrCreateModal",value:function(t){return p.getOrCreate(t)}},{key:"removeAllModals",value:function(){p.resetAllModals()}},{key:"createDokuRequest",value:function(t){return E.createDokuRequest(t)}},{key:"getRunnerUrl",value:function(){return L.createRunner()}},{key:"createFormMetaField",value:function(t){return f.createFromName(t)}},{key:"createFormFromJson",value:function(t,e){return y.createFromJson(t,e)}},{key:"createTemporaryModal",value:function(){return p.createTemporary()}}]),t}(),"comboDate",S),i(T,"DokuUrl",L),T)}();
/plugin/ol3/
H A Dscript.js8pop()},e.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},… method in t
/plugin/codemirror/dist/modes/
H A Dperl.min.js.map1pop","pos","print","printf","prototype","push","q","qq","qr","quotemeta","qw","qx","rand","read","…
/plugin/jplayer/vendor/happyworm/jplayer/lib/aurora/
H A Daurora.js2173 type = this.atoms.pop();
2174 this.offsets.pop();
/plugin/pdfjs/pdfjs/build/
H A Dpdf.worker.js.map1pop","copy","roll","PostScriptEvaluator","execute","operator","PostScriptCompiler","AstNode","AstA…
/plugin/prosemirror/lib/
H A Dbundle.js1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,t.svgIcon=function(e){var t=document.createElement("span");return t.innerHTML=o(e),t};var r={"alert-circle-outline":"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z","chevron-down":"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","file-image-outline":"M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M17,13V19H7L12,14L14,16M10,10.5A1.5,1.5 0 0,1 8.5,12A1.5,1.5 0 0,1 7,10.5A1.5,1.5 0 0,1 8.5,9A1.5,1.5 0 0,1 10,10.5Z","format-bold":"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z","format-header-pound":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M13,8H15.31L15.63,5H17.63L17.31,8H19.31L19.63,5H21.63L21.31,8H23V10H21.1L20.9,12H23V14H20.69L20.37,17H18.37L18.69,14H16.69L16.37,17H14.37L14.69,14H13V12H14.9L15.1,10H13V8M17.1,10L16.9,12H18.9L19.1,10H17.1Z","format-header-1":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z","format-header-2":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z","format-header-3":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z","format-header-4":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z","format-header-5":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H20V6H15V10H17A4,4 0 0,1 21,14A4,4 0 0,1 17,18H15A2,2 0 0,1 13,16V15H15V16H17A2,2 0 0,0 19,14A2,2 0 0,0 17,12H15A2,2 0 0,1 13,10V6A2,2 0 0,1 15,4Z","format-header-6":"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V7H19V6H15V10H19A2,2 0 0,1 21,12V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V6A2,2 0 0,1 15,4M15,12V16H19V12H15Z","format-header-decrease":"M4,4H6V10H10V4H12V18H10V12H6V18H4V4M20.42,7.41L16.83,11L20.42,14.59L19,16L14,11L19,6L20.42,7.41Z","format-header-equal":"M4,4H6V10H10V4H12V18H10V12H6V18H4V4M14,10V8H21V10H14M14,12H21V14H14V12Z","format-header-increase":"M4,4H6V10H10V4H12V18H10V12H6V18H4V4M14.59,7.41L18.17,11L14.59,14.59L16,16L21,11L16,6L14.59,7.41Z","format-text":"M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z","format-italic":"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z","format-list-bulleted":"M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z","format-list-numbers":"M7,13H21V11H7M7,19H21V17H7M7,7H21V5H7M2,11H3.8L2,13.1V14H5V13H3.2L5,10.9V10H2M3,8H4V4H2V5H3M2,17H4V17.5H3V18.5H4V19H2V20H5V16H2V17Z","format-paragraph":"M13,4A4,4 0 0,1 17,8A4,4 0 0,1 13,12H11V18H9V4H13M13,10A2,2 0 0,0 15,8A2,2 0 0,0 13,6H11V10H13Z","format-strikethrough":"M3,14H21V12H3M5,4V7H10V10H14V7H19V4M10,19H14V16H10V19Z","format-superscript":"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z","format-subscript":"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,21.03H16.97V20.03L17.86,19.23C18.62,18.58 19.18,18.04 19.56,17.6C19.93,17.16 20.12,16.75 20.13,16.36C20.14,16.08 20.05,15.85 19.86,15.66C19.68,15.5 19.39,15.38 19,15.38C18.69,15.38 18.42,15.44 18.16,15.56L17.5,15.94L17.05,14.77C17.32,14.56 17.64,14.38 18.03,14.24C18.42,14.1 18.85,14 19.32,14C20.1,14.04 20.7,14.25 21.1,14.66C21.5,15.07 21.72,15.59 21.72,16.23C21.71,16.79 21.53,17.31 21.18,17.78C20.84,18.25 20.42,18.7 19.91,19.14L19.27,19.66V19.68H21.85V21.03Z","format-underline":"M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z","format-quote-close":"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z","console-line":"M13,19V16H21V19H13M8.5,13L2.47,7H6.71L11.67,11.95C12.25,12.54 12.25,13.5 11.67,14.07L6.74,19H2.5L8.5,13Z","translate-off":"M12.17,5.81C11.87,6.69 11.47,7.55 11,8.39L12.35,9.74C13.11,8.5 13.71,7.18 14.13,5.81H17.16V3.75H9.94V1.69H7.87V3.75H6.37L8.43,5.81H12.17M15.53,12.91L17.03,14.41L17.67,12.69L19.08,16.47L22.39,19.77L18.7,9.94H16.64L15.53,12.91M1.31,1.31L0,2.62L1.13,3.75H0.65V5.81H3.19L5.26,7.88H4.46C5.21,9.56 6.24,11.15 7.53,12.58L2.28,17.76L3.75,19.22L8.91,14.07L12.11,17.27L12.8,15.43L14.1,16.72L12,22.31H14.06L15.22,19.22H16.6L21.38,24L22.69,22.69L1.31,1.31Z","link-variant":"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z",image:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z","arrow-expand-left":"M20,22H22V2H20V11H5.83L11.33,5.5L9.92,4.08L2,12L9.92,19.92L11.33,18.5L5.83,13H20V22Z","arrow-expand-right":"M4,2H2V22H4V13H18.17L12.67,18.5L14.08,19.92L22,12L14.08,4.08L12.67,5.5L18.17,11H4V2Z",puzzle:"M20.5,11H19V7C19,5.89 18.1,5 17,5H13V3.5A2.5,2.5 0 0,0 10.5,1A2.5,2.5 0 0,0 8,3.5V5H4A2,2 0 0,0 2,7V10.8H3.5C5,10.8 6.2,12 6.2,13.5C6.2,15 5,16.2 3.5,16.2H2V20A2,2 0 0,0 4,22H7.8V20.5C7.8,19 9,17.8 10.5,17.8C12,17.8 13.2,19 13.2,20.5V22H17A2,2 0 0,0 19,20V16H20.5A2.5,2.5 0 0,0 23,13.5A2.5,2.5 0 0,0 20.5,11Z","puzzle-outline":"M22,13.5C22,15.26 20.7,16.72 19,16.96V20A2,2 0 0,1 17,22H13.2V21.7A2.7,2.7 0 0,0 10.5,19C9,19 7.8,20.21 7.8,21.7V22H4A2,2 0 0,1 2,20V16.2H2.3C3.79,16.2 5,15 5,13.5C5,12 3.79,10.8 2.3,10.8H2V7A2,2 0 0,1 4,5H7.04C7.28,3.3 8.74,2 10.5,2C12.26,2 13.72,3.3 13.96,5H17A2,2 0 0,1 19,7V10.04C20.7,10.28 22,11.74 22,13.5M17,15H18.5A1.5,1.5 0 0,0 20,13.5A1.5,1.5 0 0,0 18.5,12H17V7H12V5.5A1.5,1.5 0 0,0 10.5,4A1.5,1.5 0 0,0 9,5.5V7H4V9.12C5.76,9.8 7,11.5 7,13.5C7,15.5 5.75,17.2 4,17.88V20H6.12C6.8,18.25 8.5,17 10.5,17C12.5,17 14.2,18.25 14.88,20H17V15Z","code-braces":"M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",rss:"M6.18,15.64A2.18,2.18 0 0,1 8.36,17.82C8.36,19 7.38,20 6.18,20C5,20 4,19 4,17.82A2.18,2.18 0 0,1 6.18,15.64M4,4.44A15.56,15.56 0 0,1 19.56,20H16.73A12.73,12.73 0 0,0 4,7.27V4.44M4,10.1A9.9,9.9 0 0,1 13.9,20H11.07A7.07,7.07 0 0,0 4,12.93V10.1Z",emoticon:"M12,17.5C14.33,17.5 16.3,16.04 17.11,14H6.89C7.69,16.04 9.67,17.5 12,17.5M8.5,11A1.5,1.5 0 0,0 10,9.5A1.5,1.5 0 0,0 8.5,8A1.5,1.5 0 0,0 7,9.5A1.5,1.5 0 0,0 8.5,11M15.5,11A1.5,1.5 0 0,0 17,9.5A1.5,1.5 0 0,0 15.5,8A1.5,1.5 0 0,0 14,9.5A1.5,1.5 0 0,0 15.5,11M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","note-plus-outline":"M15,10H20.5L15,4.5V10M4,3H16L22,9V19A2,2 0 0,1 20,21H4C2.89,21 2,20.1 2,19V5C2,3.89 2.89,3 4,3M4,5V19H20V12H13V5H4M8,17V15H6V13H8V11H10V13H12V15H10V17H8Z","table-plus":"M18,14H20V17H23V19H20V22H18V19H15V17H18V14M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z","table-edit":"M21.7,13.35L20.7,14.35L18.65,12.3L19.65,11.3C19.86,11.08 20.21,11.08 20.42,11.3L21.7,12.58C21.92,12.79 21.92,13.14 21.7,13.35M12,18.94L18.07,12.88L20.12,14.93L14.06,21H12V18.94M4,2H18A2,2 0 0,1 20,4V8.17L16.17,12H12V16.17L10.17,18H4A2,2 0 0,1 2,16V4A2,2 0 0,1 4,2M4,6V10H10V6H4M12,6V10H18V6H12M4,12V16H10V12H4Z","table-row-plus-before":"M22,14A2,2 0 0,0 20,12H4A2,2 0 0,0 2,14V21H4V19H8V21H10V19H14V21H16V19H20V21H22V14M4,14H8V17H4V14M10,14H14V17H10V14M20,14V17H16V14H20M11,10H13V7H16V5H13V2H11V5H8V7H11V10Z","table-row-plus-after":"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z","table-row-remove":"M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z","table-column-plus-before":"M13,2A2,2 0 0,0 11,4V20A2,2 0 0,0 13,22H22V2H13M20,10V14H13V10H20M20,16V20H13V16H20M20,4V8H13V4H20M9,11H6V8H4V11H1V13H4V16H6V13H9V11Z","table-column-plus-after":"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z","table-column-remove":"M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z","table-border":"M21,19A1,1 0 0,1 20,20H19V18H21V19M15,20V18H17V20H15M11,20V18H13V20H11M7,20V18H9V20H7M4,20A1,1 0 0,1 3,19V18H5V20H4M19,4H5A2,2 0 0,0 3,6V8H5L11,8H13L19,8H21V6C21,4.89 20.11,4 19,4M5,14H3V16H5V14M5,10H3V12H5V10M21,10H19V12H21V10M21,14H19V16H21V14M11,16V14H13V16H11M11,12V10H13V12H11","format-align-left":"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z","format-align-center":"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z","format-align-right":"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z","table-merge-cells":"M5,10H3V6A2,2 0 0,1 5,4H11V6H5V10M19,18H13V20H19A2,2 0 0,0 21,18V14H19V18M5,18V14H3V18A2,2 0 0,0 5,20H11V18H5M19,4H13V6H19V10H21V6A2,2 0 0,0 19,4M8,13V15L11,12L8,9V11H3V13H8M16,11V9L13,12L16,15V13H21V11H16Z","arrow-split-vertical":"M18,16V13H15V22H13V2H15V11H18V8L22,12L18,16M2,12L6,16V13H9V22H11V2H9V11H6V8L2,12Z","table-remove":"M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z","settings-outline":"M19.43,12.97L21.54,14.63C21.73,14.78 21.78,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.03 19.05,18.95L16.56,17.94C16.04,18.34 15.5,18.67 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.78,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,12.97M6.5,12C6.5,12.58 6.59,13.13 6.75,13.66L4.68,15.36L5.43,16.66L7.95,15.72C8.69,16.53 9.68,17.12 10.8,17.37L11.24,20H12.74L13.18,17.37C14.3,17.13 15.3,16.54 16.05,15.73L18.56,16.67L19.31,15.37L17.24,13.67C17.41,13.14 17.5,12.58 17.5,12C17.5,11.43 17.41,10.87 17.25,10.35L19.31,8.66L18.56,7.36L16.06,8.29C15.31,7.47 14.31,6.88 13.19,6.63L12.75,4H11.25L10.81,6.63C9.69,6.88 8.69,7.47 7.94,8.29L5.44,7.35L4.69,8.65L6.75,10.35C6.59,10.87 6.5,11.43 6.5,12M12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5M12,10.5A1.5,1.5 0 0,0 10.5,12A1.5,1.5 0 0,0 12,13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 12,10.5Z","checkbox-blank-outline":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z","checkbox-marked-outline":"M19,19H5V5H15V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V11H19M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z",undo:"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z",redo:"M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z"};function o(e){var t=r["alert-circle-outline"];return void 0!==r[e]?t=r[e]:console.error("SVG icon "+e+" does not exist"),'<svg viewBox="0 0 24 24"><path d="'+t+'" /></svg>'}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,e),"function"!=typeof t.command)throw new TypeError("command is not a function!");this.options=t,"function"==typeof t.isActive&&(this.isActive=t.isActive)}return r(e,[{key:"isActive",value:function(e){return!1}}]),r(e,[{key:"render",value:function(e){var t=this,n=this.renderDOM(e);if(!n)throw new Error("Could not generate dom for "+this.options.label+" "+JSON.stringify(this.options));return n.addEventListener("mousedown",(function(n){n.preventDefault(),t.options.command(e.state,e.dispatch,e)})),this.dom=n,n}},{key:"renderDOM",value:function(t){var n=void 0;return"function"==typeof this.options.render?n=this.options.render(t):(n=jQuery("<span>").addClass("menuitem"),this.options.icon instanceof Element&&n.append(e.renderSVGIcon(this.options.icon,this.options.label)),"string"==typeof this.options.label&&n.append(jQuery("<span>").addClass("menulabel").attr("title",this.options.label).text(this.options.label).get(0)),n=n.get(0)),n}},{key:"update",value:function(e){"function"==typeof this.options.update&&this.options.update(e,this.dom),this.isActive(e.state)?this.dom.classList.add("is-active"):this.dom.classList.remove("is-active"),this.options.command(e.state,null,e)?this.dom.classList.remove("is-disabled"):this.dom.classList.add("is-disabled")}}],[{key:"renderSVGIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return jQuery(e).addClass("menuicon").attr("title",t)}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"isAvailable",value:function(e){throw new Error("isAvailable is not implemented!")}},{key:"getMenuItem",value:function(e){throw new Error("getMenuItem is not implemented!")}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=n(4),a=n(13),s=n(5),l=n(6),c=n(16);if("undefined"!=typeof WeakMap){var u=new WeakMap;r=function(e){return u.get(e)},o=function(e,t){return u.set(e,t),t}}else{var f=[],p=0;r=function(e){for(var t=0;t<f.length;t+=2)if(f[t]==e)return f[t+1]},o=function(e,t){return 10==p&&(p=0),f[p++]=e,f[p++]=t}}var d=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},h=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function v(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}h.prototype.findCell=function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,a=o+1,s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(var l=1;a<this.height&&this.map[t+this.width*l]==n;l++)a++;return new d(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},h.prototype.colCount=function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")},h.prototype.nextCell=function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,a=r.top,s=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[a*this.width+(n<0?o-1:i)]:(n<0?0==a:s==this.height)?null:this.map[o+this.width*(n<0?a-1:s)]},h.prototype.rectBetween=function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,a=n.bottom,s=this.findCell(t),l=s.left,c=s.right,u=s.top,f=s.bottom;return new d(Math.min(r,l),Math.min(i,u),Math.max(o,c),Math.max(a,f))},h.prototype.cellsInRect=function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t},h.prototype.positionAt=function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var a=t+e*this.width,s=(e+1)*this.width;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}},h.get=function(e){return r(e)||o(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var a=0;a<r;a++)for(var s=e.child(a),l=0;l<s.childCount;l++){var c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}for(var u=0;u<o.childCount;u++){var f=o.child(u);i+=f.attrs.colspan,f.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,l=t*n;s<l;s++)r[s]=0;for(var c=0,u=0;c<n;c++){var f=e.child(c);u++;for(var p=0;;p++){for(;o<r.length&&0!=r[o];)o++;if(p==f.childCount)break;for(var d=f.child(p),m=d.attrs,y=m.colspan,g=m.rowspan,b=m.colwidth,w=0;w<g;w++){if(w+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:g-w});break}for(var k=o+w*t,O=0;O<y;O++){0==r[k+O]?r[k+O]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:y-O});var M=b&&b[O];if(M){var S=(k+O)%t*2,_=a[S];null==_||_!=M&&1==a[S+1]?(a[S]=M,a[S+1]=1):_==M&&a[S+1]++}}}o+=y,u+=d.nodeSize}for(var C=(c+1)*t,x=0;o<C;)0==r[o++]&&x++;x&&(i||(i=[])).push({type:"missing",row:c,n:x}),u++}for(var A=new h(t,n,r,i),T=!1,V=0;!T&&V<a.length;V+=2)null!=a[V]&&a[V+1]<n&&(T=!0);T&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var a=n.nodeAt(i),s=null,l=0;l<a.attrs.colspan;l++){var c=(r+l)%e.width,u=t[2*c];null==u||a.attrs.colwidth&&a.attrs.colwidth[l]==u||((s||(s=v(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(A,a,e);return A}(e))};var m=new i.PluginKey("selectingCells");function y(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function g(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function b(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:y(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function w(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function k(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function O(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function M(e,t,n){var r=e.start(-1),o=h.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function S(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function _(e,t,n){void 0===n&&(n=1);var r=S(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function C(e,t,n){void 0===n&&(n=1);var r=S(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}var x=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=h.get(r),a=t.start(-1),s=o.rectBetween(t.pos-a,n.pos-a),l=t.node(0),c=o.cellsInRect(s).filter((function(e){return e!=n.pos-a}));c.unshift(n.pos-a);var u=c.map((function(e){var t=r.nodeAt(e),n=e+a+1;return new i.SelectionRange(l.resolve(n),l.resolve(n+t.content.size))}));e.call(this,u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(e,n){var r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(w(r)&&w(o)&&O(r,o)){var a=this.$anchorCell.node(-1)!=r.node(-1);return a&&this.isRowSelection()?t.rowSelection(r,o):a&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return i.TextSelection.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=h.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[],a=r.top;a<r.bottom;a++){for(var l=[],c=a*t.width+r.left,u=r.left;u<r.right;u++,c++){var f=t.map[c];if(!o[f]){o[f]=!0;var p=t.findCell(f),d=e.nodeAt(f),v=r.left-p.left,m=p.right-r.right;if(v>0||m>0){var y=d.attrs;v>0&&(y=_(y,0,v)),m>0&&(y=_(y,y.colspan-m,m)),d=p.left<r.left?d.type.createAndFill(y):d.type.create(y,d.content)}if(p.top<r.top||p.bottom>r.bottom){var g=S(d.attrs,"rowspan",Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top));d=p.top<r.top?d.type.createAndFill(g):d.type.create(g,d.content)}l.push(d)}}i.push(e.child(a).copy(s.Fragment.from(l)))}var b=this.isColSelection()&&this.isRowSelection()?e:i;return new s.Slice(s.Fragment.from(b),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=s.Slice.empty);for(var r=t.steps.length,o=this.ranges,i=0;i<o.length;i++){var a=o[i],l=a.$from,c=a.$to,u=t.mapping.slice(r);t.replace(u.map(l.pos),u.map(c.pos),i?s.Slice.empty:n)}var f=e.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);f&&t.setSelection(f)},t.prototype.replaceWith=function(e,t){this.replace(e,new s.Slice(s.Fragment.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=h.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])},t.prototype.isColSelection=function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom<r.height&&(n=s.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(n=s.resolve(o+r.map[a.left])),i.bottom<r.height&&(e=s.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new t(e,n)},t.prototype.isRowSelection=function(){var e=h.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=h.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right<r.width&&(n=s.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right<r.width&&(e=s.resolve(o+r.map[r.width*(i.top+1)-1]))),new t(e,n)},t.prototype.toJSON=function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}},t.fromJSON=function(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,n,r){return void 0===r&&(r=n),new t(e.resolve(n),e.resolve(r))},t.prototype.getBookmark=function(){return new A(this.$anchorCell.pos,this.$headCell.pos)},t}(i.Selection);x.prototype.visible=!1,i.Selection.jsonID("cell",x);var A=function(e,t){this.anchor=e,this.head=t};function T(e){if(!(e.selection instanceof x))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(a.Decoration.node(n,n+e.nodeSize,{class:"selectedCell"}))})),a.DecorationSet.create(e.doc,t)}function V(e,t){var n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((function(e){return Number(e)})):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(var a in t){var s=t[a].getFromDOM,l=s&&s(e);null!=l&&(i[a]=l)}return i}function j(e,t){var n={};for(var r in 1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(",")),t){var o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function E(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}function P(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,a=o.type.schema,l=[];if("row"==i)for(var c=0;c<t.childCount;c++){var u=t.child(c).content,f=c?0:Math.max(0,n-1),p=c<t.childCount-1?0:Math.max(0,r-1);(f||p)&&(u=N(E(a).row,new s.Slice(u,f,p)).content),l.push(u)}else{if("cell"!=i&&"header_cell"!=i)return null;l.push(n||r?N(E(a).row,new s.Slice(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],i=o.childCount-1;i>=0;i--)for(var a=o.child(i).attrs,l=a.rowspan,c=a.colspan,u=r;u<r+l;u++)n[u]=(n[u]||0)+c;for(var f=0,p=0;p<n.length;p++)f=Math.max(f,n[p]);for(var d=0;d<n.length;d++)if(d>=t.length&&t.push(s.Fragment.empty),n[d]<f){for(var h=E(e).cell.createAndFill(),v=[],m=n[d];m<f;m++)v.push(h);t[d]=t[d].append(s.Fragment.from(v))}return{height:t.length,width:f,rows:t}}(a,l)}function N(e,t){var n=e.createAndFill();return new l.Transform(n).replace(0,n.content.size,t).doc}function H(e,t,n){var r=e.width,o=e.height,i=e.rows;if(r!=t){for(var a=[],l=[],c=0;c<i.length;c++){for(var u=i[c],f=[],p=a[c]||0,d=0;p<t;d++){var h=u.child(d%u.childCount);p+h.attrs.colspan>t&&(h=h.type.create(_(h.attrs,h.attrs.colspan,p+h.attrs.colspan-t),h.content)),f.push(h),p+=h.attrs.colspan;for(var v=1;v<h.attrs.rowspan;v++)a[c+v]=(a[c+v]||0)+h.attrs.colspan}l.push(s.Fragment.from(f))}i=l,r=t}if(o!=n){for(var m=[],y=0,g=0;y<n;y++,g++){for(var b=[],w=i[g%o],k=0;k<w.childCount;k++){var O=w.child(k);y+O.attrs.rowspan>n&&(O=O.type.create(S(O.attrs,"rowspan",n-O.attrs.rowspan),O.content)),b.push(O)}m.push(s.Fragment.from(b))}i=m,o=n}return{width:r,height:o,rows:i}}function L(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var l=!1,c=o;c<i;c++){var u=a*t.width+c,f=t.map[u];if(t.map[u-t.width]==f){l=!0;var p=n.nodeAt(f),d=t.findCell(f),h=d.top,v=d.left;e.setNodeMarkup(e.mapping.slice(s).map(f+r),null,S(p.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,v,n)),p.type.createAndFill(S(p.attrs,"rowspan",h+p.attrs.rowspan-a))),c+=p.attrs.colspan-1}}return l}function D(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var l=!1,c=o;c<i;c++){var u=c*t.width+a,f=t.map[u];if(t.map[u-1]==f){l=!0;var p=n.nodeAt(f),d=t.colCount(f),h=e.mapping.slice(s).map(f+r);e.setNodeMarkup(h,null,_(p.attrs,a-d,p.attrs.colspan-(a-d))),e.insert(h+p.nodeSize,p.type.createAndFill(_(p.attrs,0,a-d))),c+=p.attrs.rowspan-1}}return l}function I(e,t,n,r,o){var i=n?e.doc.nodeAt(n-1):e.doc,a=h.get(i),l=r.top,c=r.left,u=c+o.width,f=l+o.height,p=e.tr,d=0;function v(){i=n?p.doc.nodeAt(n-1):p.doc,a=h.get(i),d=p.mapping.maps.length}(function(e,t,n,r,o,i,a){var l,c,u=E(e.doc.type.schema);if(o>t.width)for(var f=0,p=0;f<t.height;f++){var d=n.child(f);p+=d.nodeSize;var h=[],v=void 0;v=null==d.lastChild||d.lastChild.type==u.cell?l||(l=u.cell.createAndFill()):c||(c=u.header_cell.createAndFill());for(var m=t.width;m<o;m++)h.push(v);e.insert(e.mapping.slice(a).map(p-1+r),h)}if(i>t.height){for(var y=[],g=0,b=(t.height-1)*t.width;g<Math.max(t.width,o);g++){var w=!(g>=t.width)&&n.nodeAt(t.map[b+g]).type==u.header_cell;y.push(w?c||(c=u.header_cell.createAndFill()):l||(l=u.cell.createAndFill()))}for(var k=u.row.create(null,s.Fragment.from(y)),O=[],M=t.height;M<i;M++)O.push(k);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),O)}return!(!l&&!c)})(p,a,i,n,u,f,d)&&v(),L(p,a,i,n,c,u,l,d)&&v(),L(p,a,i,n,c,u,f,d)&&v(),D(p,a,i,n,l,f,c,d)&&v(),D(p,a,i,n,l,f,u,d)&&v();for(var m=l;m<f;m++){var y=a.positionAt(m,c,i),g=a.positionAt(m,u,i);p.replace(p.mapping.slice(d).map(y+n),p.mapping.slice(d).map(g+n),new s.Slice(o.rows[m-l],0,0))}v(),p.setSelection(new x(p.doc.resolve(n+a.positionAt(l,c,i)),p.doc.resolve(n+a.positionAt(f-1,u-1,i)))),t(p)}A.prototype.map=function(e){return new A(e.map(this.anchor),e.map(this.head))},A.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&O(t,n)?new x(t,n):i.Selection.near(n,1)};var R=c.keydownHandler({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":z("horiz",-1),"Shift-ArrowRight":z("horiz",1),"Shift-ArrowUp":z("vert",-1),"Shift-ArrowDown":z("vert",1),Backspace:B,"Mod-Backspace":B,Delete:B,"Mod-Delete":B});function $(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return function(n,r,o){var a=n.selection;if(a instanceof x)return $(n,r,i.Selection.near(a.$headCell,t));if("horiz"!=e&&!a.empty)return!1;var s=K(o,e,t);if(null==s)return!1;if("horiz"==e)return $(n,r,i.Selection.near(n.doc.resolve(a.head+t),t));var l,c=n.doc.resolve(s),u=M(c,e,t);return l=u?i.Selection.near(u,1):t<0?i.Selection.near(n.doc.resolve(c.before(-1)),-1):i.Selection.near(n.doc.resolve(c.after(-1)),1),$(n,r,l)}}function z(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof x)){var a=K(o,e,t);if(null==a)return!1;i=new x(n.doc.resolve(a))}var s=M(i.$headCell,e,t);return!!s&&$(n,r,new x(i.$anchorCell,s))}}function B(e,t){var n=e.selection;if(!(n instanceof x))return!1;if(t){var r=e.tr,o=E(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new s.Slice(o,0,0))})),r.docChanged&&t(r)}return!0}function J(e,t){var n=y(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new x(n))),!0)}function W(e,t,n){if(!g(e.state))return!1;var r=P(n),o=e.state.selection;if(o instanceof x){r||(r={width:1,height:1,rows:[s.Fragment.from(N(E(e.state.schema).cell,n))]});var i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),l=h.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=H(r,l.right-l.left,l.bottom-l.top),I(e.state,e.dispatch,a,l,r),!0}if(r){var c=b(e.state),u=c.start(-1);return I(e.state,e.dispatch,u,h.get(c.node(-1)).findCell(c.pos-u),r),!0}return!1}function q(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=G(e,t.target);if(t.shiftKey&&e.state.selection instanceof x)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=y(e.state.selection.$anchor))&&Q(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function o(t,n){var r=Q(e,n),o=null==m.getState(e.state);if(!r||!O(t,r)){if(!o)return;r=t}var i=new x(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(m,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=m.getState(e.state)&&e.dispatch(e.state.tr.setMeta(m,-1))}function a(n){var a,s=m.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(G(e,n.target)!=r&&!(a=Q(e,t)))return i();a&&o(a,n)}}function K(e,t,n){if(!(e.state.selection instanceof i.TextSelection))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(o),l="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function G(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Q(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?y(e.state.doc.resolve(n.pos)):null}function Z(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=h.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l<o.height;l++)s.push(0);for(var c=0;c<o.problems.length;c++){var u=o.problems[c];if("collision"==u.type){for(var f=t.nodeAt(u.pos),p=0;p<f.attrs.rowspan;p++)s[u.row+p]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,_(f.attrs,f.attrs.colspan-u.n,u.n))}else if("missing"==u.type)s[u.row]+=u.n;else if("overlong_rowspan"==u.type){var d=t.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,S(d.attrs,"rowspan",d.attrs.rowspan-u.n))}else if("colwidth mismatch"==u.type){var v=t.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,S(v.attrs,"colwidth",u.colwidth))}}for(var m=0;m<s.length;m++)s[m]&&(null==i&&(i=m),a=m);for(var y=0,g=n+1;y<o.height;y++){var b=t.child(y),w=g+b.nodeSize,k=s[y];if(k>0){var O="cell";b.firstChild&&(O=b.firstChild.type.spec.tableRole);for(var M=[],C=0;C<k;C++)M.push(E(e.schema)[O].createAndFill());var x=0!=y&&i!=y-1||a!=y?w-1:g+1;r.insert(r.mapping.map(x),M)}g=w}return r}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){var i=t.childCount,a=n.childCount;e:for(var s=0,l=0;s<a;s++){for(var c=n.child(s),u=l,f=Math.min(i,s+3);u<f;u++)if(t.child(u)==c){l=u+1,r+=c.nodeSize;continue e}o(c,r),l<i&&t.child(l).sameMarkup(c)?e(t.child(l),c,r+1,o):c.nodesBetween(0,c.content.size,o,r+1),r+=c.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function U(e){var t,n=e.selection,r=b(e),o=r.node(-1),i=r.start(-1),a=h.get(o);return(t=n instanceof x?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i)).tableStart=i,t.map=a,t.table=o,t}function X(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;(function(e,t,n){for(var r=E(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s<r.height;s++){var l=s*r.width+n;if(n>0&&n<r.width&&r.map[l-1]==r.map[l]){var c=r.map[l],u=i.nodeAt(c);e.setNodeMarkup(e.mapping.map(o+c),null,C(u.attrs,n-r.colCount(c))),s+=u.attrs.rowspan-1}else{var f=null==a?E(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,p=r.positionAt(s,n,i);e.insert(e.mapping.map(o+p),f.createAndFill())}}return e}function Y(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=e.mapping.maps.length,s=0;s<r.height;){var l=s*r.width+n,c=r.map[l],u=o.nodeAt(c);if(n>0&&r.map[l-1]==c||n<r.width-1&&r.map[l+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(i+c),null,_(u.attrs,n-r.colCount(c)));else{var f=e.mapping.slice(a).map(i+c);e.delete(f,f+u.nodeSize)}s+=u.attrs.rowspan}}function ee(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,a=o,s=0;s<n;s++)a+=i.child(s).nodeSize;var l=[],c=n>0?-1:0;(function(e,t,n){for(var r=E(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0})(r,i,n+c)&&(c=0==n||n==r.height?null:0);for(var u=0,f=r.width*n;u<r.width;u++,f++)if(n>0&&n<r.height&&r.map[f]==r.map[f-r.width]){var p=r.map[f],d=i.nodeAt(p).attrs;e.setNodeMarkup(o+p,null,S(d,"rowspan",d.rowspan+1)),u+=d.colspan-1}else{var h=null==c?E(i.type.schema).cell:i.nodeAt(r.map[f+c*r.width]).type;l.push(h.createAndFill())}return e.insert(a,E(i.type.schema).row.create(null,l)),e}function te(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=0,s=0;s<n;s++)a+=o.child(s).nodeSize;var l=a+o.child(n).nodeSize,c=e.mapping.maps.length;e.delete(a+i,l+i);for(var u=0,f=n*r.width;u<r.width;u++,f++){var p=r.map[f];if(n>0&&p==r.map[f-r.width]){var d=o.nodeAt(p).attrs;e.setNodeMarkup(e.mapping.slice(c).map(p+i),null,S(d,"rowspan",d.rowspan-1)),u+=d.colspan-1}else if(n<r.width&&p==r.map[f+r.width]){var h=o.nodeAt(p),v=h.type.create(S(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),m=r.positionAt(n+1,u,o);e.insert(e.mapping.slice(c).map(i+m),v),u+=h.attrs.colspan-1}}}function ne(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function re(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function oe(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!g(t))return!1;if(n){for(var r=E(t.schema),o=U(t),i=t.tr,a=o.map.cellsInRect("column"==e?new d(o.left,0,o.right,o.map.height):"row"==e?new d(0,o.top,o.map.width,o.bottom):o),s=a.map((function(e){return o.table.nodeAt(e)})),l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(0==i.steps.length)for(var c=0;c<a.length;c++)i.setNodeMarkup(o.tableStart+a[c],r.header_cell,s[c].attrs);n(i)}return!0}}(e):function(t,n){if(!g(t))return!1;if(n){var r=E(t.schema),o=U(t),i=t.tr,a=re("row",o,r),s=re("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new d(0,l,1,o.map.height):"row"==e?new d(l,0,o.map.width,1):o,u="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}var ie=oe("row",{useDeprecatedLogic:!0}),ae=oe("column",{useDeprecatedLogic:!0}),se=oe("cell",{useDeprecatedLogic:!0});var le=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ce(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function ce(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,c=e.firstChild,u=0,f=0;u<c.childCount;u++)for(var p=c.child(u).attrs,d=p.colspan,h=p.colwidth,v=0;v<d;v++,f++){var m=o==f?i:h&&h[v],y=m?m+"px":"";a+=m||r,m||(s=!1),l?(l.style.width!=y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}for(;l;){var g=l.nextSibling;l.parentNode.removeChild(l),l=g}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}le.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,ce(e,this.colgroup,this.table,this.cellMinWidth),!0)},le.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var ue=new i.PluginKey("tableColumnResizing");var fe=function(e,t){this.activeHandle=e,this.dragging=t};function pe(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY}).pos,o=y(e.state.doc.resolve(r));if(!o)return-1;if("right"==n)return o.pos;var i=h.get(o.node(-1)),a=o.start(-1),s=i.map.indexOf(o.pos-a);return s%i.width==0?-1:a+i.map[s-1]}function de(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function he(e,t){e.dispatch(e.state.tr.setMeta(ue,{setHandle:t}))}function ve(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}fe.prototype.apply=function(e){var t=this,n=e.getMeta(ue);if(n&&null!=n.setHandle)return new fe(n.setHandle,null);if(n&&void 0!==n.setDragging)return new fe(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);w(e.doc.resolve(r))||(r=null),t=new fe(r,t.dragging)}return t},t.tableEditing=function(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new i.Plugin({key:m,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(m);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:T,handleDOMEvents:{mousedown:q},createSelectionBetween:function(e){if(null!=m.getState(e.state))return e.state.selection},handleTripleClick:J,handleKeyDown:R,handlePaste:W},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,a=(t||e).selection,s=(t||e).doc;if(a instanceof i.NodeSelection&&(o=a.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=x.create(s,a.from);else if("row"==o){var l=s.resolve(a.from+1);r=x.rowSelection(l,l)}else if(!n){var c=h.get(a.node),u=a.from+1,f=u+c.map[c.width*c.height-1];r=x.create(s,u+1,f)}}else a instanceof i.TextSelection&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var a=n.depth;a>=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(a)?r=i.TextSelection.create(s,a.from):a instanceof i.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===o.parentOffset}(a)&&(r=i.TextSelection.create(s,a.$from.start(),a.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,Z(r,n),t)}})},t.fixTables=Z,t.handlePaste=W,t.cellAround=y,t.isInTable=g,t.selectionCell=b,t.moveCellForward=k,t.inSameTable=O,t.findCell=function(e){return h.get(e.node(-1)).findCell(e.pos-e.start(-1))},t.colCount=function(e){return h.get(e.node(-1)).colCount(e.pos-e.start(-1))},t.nextCell=M,t.tableNodes=function(e){var t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(e){return V(e,t)}}],toDOM:function(e){return["td",j(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return V(e,t)}}],toDOM:function(e){return["th",j(e,t),0]}}}},t.CellSelection=x,t.TableMap=h,t.columnResizing=function(e){void 0===e&&(e={});var t=e.handleWidth;void 0===t&&(t=5);var n=e.cellMinWidth;void 0===n&&(n=25);var r=e.View;void 0===r&&(r=le);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new i.Plugin({key:ue,state:{init:function(e,t){return this.spec.props.nodeViews[E(t.schema).table.name]=function(e,t){return new r(e,n,t)},new fe(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return ue.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=ue.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),c=l.left,u=l.right;t.clientX-c<=n?s=pe(e,t,"left"):u-t.clientX<=n&&(s=pe(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var f=e.state.doc.resolve(s),p=f.node(-1),d=h.get(p),v=f.start(-1);if(d.colCount(f.pos-v)+f.nodeAfter.attrs.colspan-1==d.width-1)return}he(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=ue.getState(e.state);t.activeHandle>-1&&!t.dragging&&he(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=ue.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(o)for(var c=0;c<r;c++)o[c]&&(s-=o[c],l--);return s/l}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=ue.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=h.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr,c=0;c<i.height;c++){var u=c*i.width+s;if(!c||i.map[u]!=i.map[u-i.width]){var f=i.map[u],p=o.nodeAt(f).attrs,d=1==p.colspan?0:s-i.colCount(f);if(!p.colwidth||p.colwidth[d]!=n){var v=p.colwidth?p.colwidth.slice():ve(p.colspan);v[d]=n,l.setNodeMarkup(a+f,null,S(p,"colwidth",v))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,de(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(ue,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=ue.getState(e.state),o=de(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=h.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;ce(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(ue,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=ue.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=h.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan,c=0;c<i.height;c++){var u=l+c*i.width-1;if(!(l!=i.width&&i.map[u]==i.map[u+1]||0!=c&&i.map[u-1]==i.map[u-1-i.width])){var f=i.map[u],p=s+f+o.nodeAt(f).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",n.push(a.Decoration.widget(p,d))}}return a.DecorationSet.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})},t.columnResizingPluginKey=ue,t.updateColumnsOnResize=ce,t.__pastedCells=P,t.__insertCells=I,t.__clipCells=H,t.addColumn=X,t.addColumnBefore=function(e,t){if(!g(e))return!1;if(t){var n=U(e);t(X(e.tr,n,n.left))}return!0},t.addColumnAfter=function(e,t){if(!g(e))return!1;if(t){var n=U(e);t(X(e.tr,n,n.right))}return!0},t.removeColumn=Y,t.deleteColumn=function(e,t){if(!g(e))return!1;if(t){var n=U(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;Y(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=h.get(n.table);t(r)}return!0},t.addRow=ee,t.addRowBefore=function(e,t){if(!g(e))return!1;if(t){var n=U(e);t(ee(e.tr,n,n.top))}return!0},t.addRowAfter=function(e,t){if(!g(e))return!1;if(t){var n=U(e);t(ee(e.tr,n,n.bottom))}return!0},t.removeRow=te,t.deleteRow=function(e,t){if(!g(e))return!1;if(t){var n=U(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;te(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=h.get(n.table);t(r)}return!0},t.mergeCells=function(e,t){var n=e.selection;if(!(n instanceof x)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=U(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,a=i,s=(t.bottom-1)*n+t.left,l=i+(t.right-t.left-1),c=t.top;c<t.bottom;c++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[l]==o[l+1])return!0;a+=n,l+=n}for(var u=t.left;u<t.right;u++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[s]==o[s+n])return!0;i++,s++}return!1}(o,r))return!1;if(t){for(var i,a,l=e.tr,c={},u=s.Fragment.empty,f=r.top;f<r.bottom;f++)for(var p=r.left;p<r.right;p++){var d=o.map[f*o.width+p],h=r.table.nodeAt(d);if(!c[d])if(c[d]=!0,null==i)i=d,a=h;else{ne(h)||(u=u.append(h.content));var v=l.mapping.map(d+r.tableStart);l.delete(v,v+h.nodeSize)}}if(l.setNodeMarkup(i+r.tableStart,null,S(C(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),"rowspan",r.bottom-r.top)),u.size){var m=i+1+a.content.size,y=ne(a)?i+1:m;l.replaceWith(y+r.tableStart,m+r.tableStart,u)}l.setSelection(new x(l.doc.resolve(i+r.tableStart))),t(l)}return!0},t.splitCell=function(e,t){var n,r,o=e.selection;if(o instanceof x){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;n=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{if(!(n=function(e){for(var t=e.depth-1;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from)))return!1;r=y(o.$from).pos}if(1==n.attrs.colspan&&1==n.attrs.rowspan)return!1;if(t){var i=n.attrs,a=[],s=i.colwidth;i.rowspan>1&&(i=S(i,"rowspan",1)),i.colspan>1&&(i=S(i,"colspan",1));for(var l=U(e),c=e.tr,u=0;u<l.right-l.left;u++)a.push(s?S(i,"colwidth",s&&s[u]?[s[u]]:null):i);for(var f,p=E(e.schema)[n.type.spec.tableRole],d=0;d<l.bottom;d++)if(d>=l.top){var h=l.map.positionAt(d,l.left,l.table);d==l.top&&(h+=n.nodeSize);for(var v=l.left,m=0;v<l.right;v++,m++)v==l.left&&d==l.top||c.insert(f=c.mapping.map(h+l.tableStart,1),p.createAndFill(a[m]))}c.setNodeMarkup(r,null,a[0]),o instanceof x&&c.setSelection(new x(c.doc.resolve(o.$anchorCell.pos),f&&c.doc.resolve(f))),t(c)}return!0},t.setCellAttr=function(e,t){return function(n,r){if(!g(n))return!1;var o=b(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof x?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,S(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,S(o.nodeAfter.attrs,e,t)),r(i)}return!0}},t.toggleHeader=oe,t.toggleHeaderRow=ie,t.toggleHeaderColumn=ae,t.toggleHeaderCell=se,t.goToNextCell=function(e){return function(t,n){if(!g(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var a=e.node(-1),s=e.indexAfter(-1),l=e.after();s<a.childCount;s++){var c=a.child(s);if(c.childCount)return l+1;l+=c.nodeSize}}}(b(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(i.TextSelection.between(o,k(o))).scrollIntoView())}return!0}}},t.deleteTable=function(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(6),i=Object.create(null),a=function(e,t,n){this.ranges=n||[new l(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},s={anchor:{},head:{},from:{},to:{},$from:{},$to:{},empty:{}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},a.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},a.prototype.replace=function(e,t){void 0===t&&(t=r.Slice.empty);for(var n=t.content.lastChild,o=null,i=0;i<t.openEnd;i++)o=n,n=n.lastChild;for(var a=e.steps.length,s=this.ranges,l=0;l<s.length;l++){var c=s[l],u=c.$from,f=c.$to,p=e.mapping.slice(a);e.replaceRange(p.map(u.pos),p.map(f.pos),l?r.Slice.empty:t),0==l&&m(e,a,(n?n.isInline:o&&o.isTextblock)?-1:1)}},a.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n),c=l.map(a.pos),u=l.map(s.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),m(e,n,t.isInline?-1:1))}},a.findFrom=function(e,t,n){var r=e.parent.inlineContent?new c(e):v(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?v(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):v(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new d(e.node(0))},a.atStart=function(e){return v(e,e,0,0,1)||new d(e)},a.atEnd=function(e){return v(e,e,e.content.size,e.childCount,-1)||new d(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return c.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var l=function(e,t){this.$from=e,this.$to=t},c=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new u(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0)&&(n=r),new t(n,r)},Object.defineProperties(t.prototype,n),t}(a);a.jsonID("text",c);var u=function(e,t){this.anchor=e,this.head=t};u.prototype.map=function(e){return new u(e.map(this.anchor),e.map(this.head))},u.prototype.resolve=function(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))};var f=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos,s=n.resolve(a);return i?e.near(s):new t(s)},t.prototype.content=function(){return new r.Slice(r.Fragment.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new p(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(a);f.prototype.visible=!1,a.jsonID("node",f);var p=function(e){this.anchor=e};p.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new u(r,r):new p(r)},p.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&f.isSelectable(n)?new f(t):a.near(t)};var d=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return h},t}(a);a.jsonID("all",d);var h={map:function(){return this},resolve:function(e){return new d(e)}};function v(e,t,n,r,o,i){if(t.inlineContent)return c.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&f.isSelectable(s))return f.create(e,n-(o<0?s.nodeSize:0))}else{var l=v(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function m(e,t,n){var r=e.steps.length-1;if(!(r<t)){var i,s=e.steps[r];if(s instanceof o.ReplaceStep||s instanceof o.ReplaceAroundStep)e.mapping.maps[r].forEach((function(e,t,n,r){null==i&&(i=r)})),e.setSelection(a.near(e.doc.resolve(i),n))}}var y=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{},selectionSet:{},storedMarksSet:{},isGeneric:{},scrolledIntoView:{}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function g(e,t){return t&&e?e.bind(t):e}var b=function(e,t,n){this.name=e,this.init=g(t.init,n),this.apply=g(t.apply,n)},w=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],k=function(e,t){var n=this;this.schema=e,this.fields=w.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},O=function(e){this.config=e},M={schema:{},plugins:{},tr:{}};M.schema.get=function(){return this.config.schema},M.plugins.get=function(){return this.config.plugins},O.prototype.apply=function(e){return this.applyTransaction(e).state},O.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},O.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,l=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},O.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new O(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<S.length;i++)S[i](this,e,t);return t},M.tr.get=function(){return new y(this)},O.create=function(e){for(var t=new k(e.schema||e.doc.type.schema,e.plugins),n=new O(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},O.prototype.reconfigure=function(e){for(var t=new k(e.schema||this.schema,e.plugins),n=t.fields,r=new O(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},O.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},O.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var o=new k(e.schema,e.plugins),i=new O(o);return o.fields.forEach((function(o){if("doc"==o.name)i.doc=r.Node.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=a.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var s in n){var l=n[s],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,s))return void(i[o.name]=c.fromJSON.call(l,e,t[s],i))}i[o.name]=o.init(e,i)}})),i},O.addApplyListener=function(e){S.push(e)},O.removeApplyListener=function(e){var t=S.indexOf(e);t>-1&&S.splice(t,1)},Object.defineProperties(O.prototype,M);var S=[];var _=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:x("plugin")};_.prototype.getState=function(e){return e[this.key]};var C=Object.create(null);function x(e){return e in C?e+"$"+ ++C[e]:(C[e]=0,e+"$")}var A=function(e){void 0===e&&(e="key"),this.key=x(e)};A.prototype.get=function(e){return e.config.pluginsByKey[this.key]},A.prototype.getState=function(e){return e[this.key]},t.Selection=a,t.SelectionRange=l,t.TextSelection=c,t.NodeSelection=f,t.AllSelection=d,t.Transaction=y,t.EditorState=O,t.Plugin=_,t.PluginKey=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(28))&&"object"==typeof r&&"default"in r?r.default:r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize},a={firstChild:{},lastChild:{},childCount:{}};i.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,a=0;a<t;i++){var s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=l}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)},i.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,a=0;a<t;o++){var s=this.content[o],l=a+s.nodeSize;l>e&&((a<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=l}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},a.firstChild.get=function(){return this.content.length?this.content[0]:null},a.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},a.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},i.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),a=n.child(o);if(i!=a){if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)r++;return r}if(i.content.size||a.content.size){var l=e(i.content,a.content,r+1);if(null!=l)return l}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,a=n.childCount;;){if(0==i||0==a)return i==a?null:{a:r,b:o};var s=t.child(--i),l=n.child(--a),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:r,b:o};if(s.isText&&s.text!=l.text){for(var u=0,f=Math.min(s.text.length,l.text.length);u<f&&s.text[s.text.length-u-1]==l.text[l.text.length-u-1];)u++,r--,o--;return{a:r,b:o}}if(s.content.size||l.content.size){var p=e(s.content,l.content,r-1,o-1);if(p)return p}r-=c,o-=c}else r-=c,o-=c}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return l(0,e);if(e==this.size)return l(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?l(n+1,o):l(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(i.prototype,a);var s={index:0,offset:0};function l(e,t){return s.index=e,s.offset=t,s}function c(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!c(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!c(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var u=function(e,t){this.type=e,this.attrs=t};function f(e){var t=Error.call(this,e);return t.__proto__=f.prototype,t}u.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},u.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},u.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},u.prototype.eq=function(e){return this==e||this.type==e.type&&c(this.attrs,e.attrs)},u.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},u.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},u.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},u.setFrom=function(e){if(!e||0==e.length)return u.none;if(e instanceof u)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},u.none=[],f.prototype=Object.create(Error.prototype),f.prototype.constructor=f,f.prototype.name="ReplaceError";var p=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n},d={size:{}};function h(e,t,n){if(n.openStart>e.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o<t.depth-r.openStart){var l=e(t,n,r,o+1);return s.copy(s.content.replaceChild(a,l))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var c=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),u=c.start,f=c.end;return b(s,function e(t,n,r,o,a){var s=t.depth>a&&m(t,n,a+1),l=o.depth>a&&m(r,o,a+1),c=[];g(null,t,a,c),s&&l&&n.index(a)==r.index(a)?(v(s,l),y(b(s,e(t,n,r,o,a+1)),c)):(s&&y(b(s,w(t,n,a+1)),c),g(n,r,a,c),l&&y(b(l,w(r,o,a+1)),c));return g(o,null,a,c),new i(c)}(t,u,f,n,o))}var p=t.parent,d=p.content;return b(p,d.cut(0,t.parentOffset).append(r.content).append(d.cut(n.parentOffset)))}return b(s,w(t,n,o))}(e,t,n,0)}function v(e,t){if(!t.type.compatibleContent(e.type))throw new f("Cannot join "+t.type.name+" onto "+e.type.name)}function m(e,t,n){var r=e.node(n);return v(r,t.node(n)),r}function y(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function g(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(y(e.nodeAfter,r),i++));for(var s=i;s<a;s++)y(o.child(s),r);t&&t.depth==n&&t.textOffset&&y(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new f("Invalid content for node "+e.type.name);return e.copy(t)}function w(e,t,n){var r=[];(g(null,e,n,r),e.depth>n)&&y(b(m(e,t,n+1),w(e,t,n+1)),r);return g(t,null,n,r),new i(r)}d.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,l=t.maybeChild(a);if(s==n||l.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var c=e(l.content,n-s-1,r);return c&&t.replaceChild(a,l.copy(c))}(this.content,e+this.openStart,t,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(e,t){return new p(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),l=t.findIndex(r),c=l.index,u=l.offset;if(a==n||s.isText){if(u!=r&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},p.fromJSON=function(e,t){if(!t)return p.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(i.fromJSON(e,t.content),t.openStart||0,t.openEnd||0)},p.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new p(e,n,r)},Object.defineProperties(p.prototype,d),p.empty=new p(i.empty,0,0);var k=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},O={parent:{},doc:{},textOffset:{},nodeAfter:{},nodeBefore:{}};k.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},O.parent.get=function(){return this.node(this.depth)},O.doc.get=function(){return this.node(0)},k.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},k.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},k.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},k.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},k.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},k.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},k.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},O.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},O.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},O.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},k.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i},k.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},k.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},k.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new C(this,e,n)},k.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},k.prototype.max=function(e){return e.pos>this.pos?e:this},k.prototype.min=function(e){return e.pos<this.pos?e:this},k.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},k.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,l=a.offset,c=o-l;if(n.push(i,s,r+l),!c)break;if((i=i.child(s)).isText)break;o=c-1,r+=l+1}return new k(t,n,o)},k.resolveCached=function(e,t){for(var n=0;n<M.length;n++){var r=M[n];if(r.pos==t&&r.doc==e)return r}var o=M[S]=k.resolve(e,t);return S=(S+1)%_,o},Object.defineProperties(k.prototype,O);var M=[],S=0,_=12,C=function(e,t,n){this.$from=e,this.$to=t,this.depth=n},x={start:{},end:{},parent:{},startIndex:{},endIndex:{}};x.start.get=function(){return this.$from.before(this.depth+1)},x.end.get=function(){return this.$to.after(this.depth+1)},x.parent.get=function(){return this.$from.node(this.depth)},x.startIndex.get=function(){return this.$from.index(this.depth)},x.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(C.prototype,x);var A=Object.create(null),T=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||u.none},V={nodeSize:{},childCount:{},textContent:{},firstChild:{},lastChild:{},isBlock:{},isTextblock:{},inlineContent:{},isInline:{},isText:{},isLeaf:{},isAtom:{}};V.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},V.childCount.get=function(){return this.content.childCount},T.prototype.child=function(e){return this.content.child(e)},T.prototype.maybeChild=function(e){return this.content.maybeChild(e)},T.prototype.forEach=function(e){this.content.forEach(e)},T.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},T.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},V.textContent.get=function(){return this.textBetween(0,this.content.size,"")},T.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},V.firstChild.get=function(){return this.content.firstChild},V.lastChild.get=function(){return this.content.lastChild},T.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},T.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},T.prototype.hasMarkup=function(e,t,n){return this.type==e&&c(this.attrs,t||e.defaultAttrs||A)&&u.sameSet(this.marks,n||u.none)},T.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},T.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},T.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},T.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return p.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new p(s,r.depth-i,o.depth-i)},T.prototype.replace=function(e,t,n){return h(this.resolve(e),this.resolve(t),n)},T.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},T.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},T.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},T.prototype.resolve=function(e){return k.resolveCached(this,e)},T.prototype.resolveNoCache=function(e){return k.resolve(this,e)},T.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},V.isBlock.get=function(){return this.type.isBlock},V.isTextblock.get=function(){return this.type.isTextblock},V.inlineContent.get=function(){return this.type.inlineContent},V.isInline.get=function(){return this.type.isInline},V.isText.get=function(){return this.type.isText},V.isLeaf.get=function(){return this.type.isLeaf},V.isAtom.get=function(){return this.type.isAtom},T.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(this.marks,e)},T.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},T.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0},T.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},T.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},T.prototype.defaultContentType=function(e){return this.contentMatchAt(e).defaultType},T.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));this.content.forEach((function(e){return e.check()}))},T.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e},T.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(T.prototype,V);var j=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{},nodeSize:{}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(T);function E(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var P=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},N={inlineContent:{},defaultType:{},edgeCount:{}};P.parse=function(e,t){var n=new H(e,t);if(null==n.next)return P.empty;var r=D(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];B(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new P(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort(z);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(B(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(e(n,i))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=e(t.exprs[a],i);if(a==t.exprs.length-1)return s;o(s,i=n())}else{if("star"==t.type){var l=n();return r(i,l),o(e(t.expr,l),l),[r(l)]}if("plus"==t.type){var c=n();return o(e(t.expr,i),c),o(e(t.expr,c),c),[r(c)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var u=i,f=0;f<t.min;f++){var p=n();o(e(t.expr,u),p),u=p}if(-1==t.max)o(e(t.expr,u),u);else for(var d=t.min;d<t.max;d++){var h=n();r(u,h),o(e(t.expr,u),h),u=h}return[r(u)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s+=2){var l=o.next[s],c=o.next[s+1];a.push(l.name),!i||l.isText||l.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position")}}(o,n),o},P.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},P.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},N.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},N.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},P.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},P.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(a,s){var l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return i.from(s.map((function(e){return e.createAndFill()})));for(var c=0;c<a.next.length;c+=2){var u=a.next[c],f=a.next[c+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(f)){r.push(f);var p=o(f,s.concat(u));if(p)return p}}}(this,[])},P.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},P.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s+=2){var l=o.next[s];l.isLeaf||l.hasRequiredAttrs()||l.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:l.contentMatch,type:l,via:r}),t[l.name]=!0)}}},N.edgeCount.get=function(){return this.next.length>>1},P.prototype.edge=function(e){var t=e<<1;if(t>this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},P.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(P.prototype,N),P.empty=new P(!0);var H=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},L={next:{}};function D(e){var t=[];do{t.push(I(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function I(e){var t=[];do{t.push(R(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function R(e){for(var t=function(e){if(e.eat("(")){var t=D(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=F(e,t)}return t}function $(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function F(e,t){var n=$(e),r=n;return e.eat(",")&&(r="}"!=e.next?$(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function z(e,t){return e-t}function B(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort(z)}function J(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function W(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function q(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new Q(e[n]);return t}L.next.get=function(){return this.tokens[this.pos]},H.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},H.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(H.prototype,L);var K=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=q(n.attrs),this.defaultAttrs=J(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e},G={isInline:{},isTextblock:{},isLeaf:{},isAtom:{}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==P.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},K.prototype.hasRequiredAttrs=function(e){for(var t in this.attrs)if(this.attrs[t].isRequired&&(!e||!(t in e)))return!0;return!1},K.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},K.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:W(this.attrs,e)},K.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new T(this,this.computeAttrs(e),i.from(t),u.setFrom(n))},K.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new T(this,this.computeAttrs(e),t,u.setFrom(n))},K.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new T(this,e,t.append(o),u.setFrom(n)):null},K.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},K.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},K.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},K.prototype.allowedMarks=function(e){var t;if(null==this.markSet)return e;for(var n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.empty:e},K.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new K(e,t,r)}));var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(K.prototype,G);var Q=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},Z={isRequired:{}};Z.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(Q.prototype,Z);var U=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=q(r.attrs),this.rank=t,this.excluded=null;var o=J(this.attrs);this.instance=o&&new u(this,o)};U.prototype.create=function(e){return!e&&this.instance?this.instance:new u(this,W(this.attrs,e))},U.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new U(e,r++,t,o)})),n},U.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e.slice(0,t).concat(e.slice(t+1));return e},U.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},U.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var X=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=K.compile(this.spec.nodes,this),this.marks=U.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=P.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Y(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:Y(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Y(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}X.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof K))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},X.prototype.text=function(e,t){var n=this.nodes.text;return new j(n,n.defaultAttrs,e,u.setFrom(t))},X.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},X.prototype.nodeFromJSON=function(e){return T.fromJSON(this,e)},X.prototype.markFromJSON=function(e){return u.fromJSON(this,e)},X.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),p.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t){for(var n=0;n<this.tags.length;n++){var r=this.tags[n];if(le(e,r.tag)&&(void 0===r.namespace||e.namespaceURI==r.namespace)&&(!r.context||t.matchesContext(r.context))){if(r.getAttrs){var o=r.getAttrs(e);if(!1===o)continue;r.attrs=o}return r}}},ee.prototype.matchStyle=function(e,t,n){for(var r=0;r<this.styles.length;r++){var o=this.styles[r];if(!(0!=o.style.indexOf(e)||o.context&&!n.matchesContext(o.context)||o.style.length>e.length&&(61!=o.style.charCodeAt(e.length)||o.style.slice(e.length+1)!=t))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=ce(e)),e.mark=t}))};for(var o in e.marks)r(o);var i;for(var a in e.nodes)i=void 0,(i=e.nodes[a].spec.parseDOM)&&i.forEach((function(e){n(e=ce(e)),e.node=a}));return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={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},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0};function oe(e){return(e?1:0)|("full"===e?2:0)}var ie=function(e,t,n,r,o,i){this.type=e,this.attrs=t,this.solid=r,this.match=o||(4&i?null:e.contentMatch),this.options=i,this.content=[],this.marks=n,this.activeMarks=u.none};ie.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ie.prototype.finish=function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/\s+$/.exec(n.text))&&(n.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)))}var r=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r};var ae=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.pendingMarks=[];var r,o=t.topNode,i=oe(t.preserveWhitespace)|(n?4:0);r=o?new ie(o.type,o.attrs,u.none,!0,t.topMatch||o.type.contentMatch,i):new ie(n?null:e.schema.topNodeType,null,u.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},se={top:{},currentPos:{}};function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ce(e){var t={};for(var n in e)t[n]=e[n];return t}se.top.get=function(){return this.nodes[this.open]},ae.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null;if(null!=n)for(var r=0;r<n.length;r++)this.addPendingMark(n[r]);if(this.addElement(e),null!=n)for(var o=0;o<n.length;o++)this.removePendingMark(n[o])}},ae.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/\S/.test(t)){if(1&n.options)2&n.options||(t=t.replace(/\r?\n|\r/g," "));else if(t=t.replace(/\s+/g," "),/^\s/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/\s$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},ae.prototype.addElement=function(e){var t=e.nodeName.toLowerCase();re.hasOwnProperty(t)&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&re.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var n=this.options.ruleFromNode&&this.options.ruleFromNode(e)||this.parser.matchTag(e,this);if(n?n.ignore:ne.hasOwnProperty(t))this.findInside(e);else if(!n||n.skip){n&&n.skip.nodeType&&(e=n.skip);var r,o=this.top,i=this.needsBlock;te.hasOwnProperty(t)&&(r=!0,o.type||(this.needsBlock=!0)),this.addAll(e),r&&this.sync(o),this.needsBlock=i}else this.addElementByRule(e,n)},ae.prototype.readStyles=function(e){for(var t=u.none,n=0;n<e.length;n+=2){var r=this.parser.matchStyle(e[n],e[n+1],this);if(r){if(r.ignore)return null;t=this.parser.schema.marks[r.mark].create(r.attrs).addToSet(t)}}return t},ae.prototype.addElementByRule=function(e,t){var n,r,o,i=this;t.node?(r=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(r.create(t.attrs)):n=this.enter(r,t.attrs,t.preserveWhitespace):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));var a=this.top;if(r&&r.isLeaf)this.findInside(e);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return i.insertNode(e)}));else{var s=t.contentElement;"string"==typeof s?s=e.querySelector(s):"function"==typeof s&&(s=s(e)),s||(s=e),this.findAround(e,s,!0),this.addAll(s,n)}return n&&(this.sync(a),this.open--),o&&this.removePendingMark(o),!0},ae.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,a=null==r?null:e.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ae.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0},ae.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;this.applyPendingMarks(n),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));n.content.push(e.mark(r))}},ae.prototype.applyPendingMarks=function(e){for(var t=0;t<this.pendingMarks.length;t++){var n=this.pendingMarks[t];e.type&&!e.type.allowsMarkType(n.type)||n.isInSet(e.activeMarks)||(e.activeMarks=n.addToSet(e.activeMarks),this.pendingMarks.splice(t--,1))}},ae.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&(this.applyPendingMarks(this.top),this.enterInner(e,t,!0,n)),r},ae.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.match=o.match&&o.match.matchType(e,t);var i=null==r?-5&o.options:oe(r);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ie(e,t,o.activeMarks,n,null,i)),this.open++},ae.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},ae.prototype.addPendingMark=function(e){this.pendingMarks.push(e)},ae.prototype.removePendingMark=function(e){var t=this.pendingMarks.lastIndexOf(e);if(t>-1)this.pendingMarks.splice(t,1);else{var n=this.top;n.activeMarks=e.removeFromSet(n.activeMarks)}},se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ae.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},ae.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},ae.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},ae.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},ae.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(e,s){for(;e>=0;e--){var l=n[e];if(""==l){if(e==n.length-1||0==e)continue;for(;s>=i;s--)if(a(e-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=l&&-1==c.groups.indexOf(l))return!1;s--}return!0};return a(n.length-1,this.open)},ae.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},Object.defineProperties(ae.prototype,se);var ue=function(e,t){this.nodes=e||{},this.marks=t||{}};function fe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function pe(e){return e.document||window.document}ue.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=pe(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n<i.length&&a<e.marks.length;){var s=e.marks[a];if(r.marks[s.type.name]){if(!s.eq(i[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<i.length;)o=i.pop(),i.pop();for(;a<e.marks.length;){var l=e.marks[a++],c=r.serializeMark(l,e.isInline,t);c&&(i.push(l,o),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(r.serializeNode(e,t))})),n},ue.prototype.serializeNode=function(e,t){void 0===t&&(t={});var n=ue.renderSpec(pe(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},ue.prototype.serializeNodeAndMarks=function(e,t){void 0===t&&(t={});for(var n=this.serializeNode(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},ue.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&ue.renderSpec(pe(n),r(e,t))},ue.renderSpec=function(e,t){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};var n=e.createElement(t[0]),r=null,o=t[1],i=1;if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o))for(var a in i=2,o)null!=o[a]&&n.setAttribute(a,o[a]);for(var s=i;s<t.length;s++){var l=t[s];if(0===l){if(s<t.length-1||s>i)throw new RangeError("Content hole must be the only child of its parent node");return{dom:n,contentDOM:n}}var c=ue.renderSpec(e,l),u=c.dom,f=c.contentDOM;if(n.appendChild(u),f){if(r)throw new RangeError("Multiple content holes");r=f}}return{dom:n,contentDOM:r}},ue.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new ue(this.nodesFromSchema(e),this.marksFromSchema(e)))},ue.nodesFromSchema=function(e){var t=fe(e.nodes);return t.text||(t.text=function(e){return e.text}),t},ue.marksFromSchema=function(e){return fe(e.marks)},t.Node=T,t.ResolvedPos=k,t.NodeRange=C,t.Fragment=i,t.Slice=p,t.ReplaceError=f,t.Mark=u,t.Schema=X,t.NodeType=K,t.MarkType=U,t.ContentMatch=P,t.DOMParser=ee,t.DOMSerializer=ue},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=Math.pow(2,16);function i(e){return 65535&e}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},s=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};s.prototype.recover=function(e){var t=0,n=i(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/o}(e)},s.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},s.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},s.prototype._map=function(e,t,n){for(var r=0,i=this.inverted?2:1,s=this.inverted?1:2,l=0;l<this.ranges.length;l+=3){var c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;var u=this.ranges[l+i],f=this.ranges[l+s],p=c+u;if(e<=p){var d=c+r+((u?e==c?-1:e==p?1:t:t)<0?0:f);if(n)return d;var h=l/3+(e-c)*o;return new a(d,t<0?e!=c:e!=p,h)}r+=f-u}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;var c=this.ranges[s+o];if(e<=l+c&&s==3*r)return!0;n+=this.ranges[s+a]-c}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(a,a+l,s,s+c),o+=c-l}},s.prototype.invert=function(){return new s(this.ranges,!this.inverted)},s.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},s.offset=function(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])},s.empty=new s([]);var l=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function c(e){var t=Error.call(this,e);return t.__proto__=c.prototype,t}l.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new l(this.maps,this.mirror,e,t)},l.prototype.copy=function(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},l.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},l.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},l.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},l.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},l.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},l.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},l.prototype._map=function(e,t,n){for(var r=!1,o=null,i=this.from;i<this.to;i++){var s=this.maps[i],l=o&&o[i];if(null!=l&&s.touches(e,l))e=s.recover(l);else{var c=s.mapResult(e,t);if(null!=c.recover){var u=this.getMirror(i);if(null!=u&&u>i&&u<this.to){if(c.deleted){i=u,e=this.maps[u].recover(c.recover);continue}(o||(o=Object.create(null)))[u]=c.recover}}c.deleted&&(r=!0),e=c.pos}}return n?e:new a(e,r)},c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,c.prototype.name="TransformError";var u=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l},f={before:{},docChanged:{}};function p(){throw new Error("Override me")}f.before.get=function(){return this.docs.length?this.docs[0]:this.doc},u.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new c(t.failed);return this},u.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},f.docChanged.get=function(){return this.steps.length>0},u.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(u.prototype,f);var d=Object.create(null),h=function(){};h.prototype.apply=function(e){return p()},h.prototype.getMap=function(){return s.empty},h.prototype.invert=function(e){return p()},h.prototype.map=function(e){return p()},h.prototype.merge=function(e){return null},h.prototype.toJSON=function(){return p()},h.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=d[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},h.jsonID=function(e,t){if(e in d)throw new RangeError("Duplicate use of step JSON ID "+e);return d[e]=t,t.prototype.jsonID=e,t};var v=function(e,t){this.doc=e,this.failed=t};v.ok=function(e){return new v(e,null)},v.fail=function(e){return new v(null,e)},v.fromReplace=function(e,t,n,o){try{return v.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.ReplaceError)return v.fail(e.message);throw e}};var m=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&g(e,this.from,this.to)?v.fail("Structure replace would overwrite content"):v.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(h);h.jsonID("replace",m);var y=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(g(e,this.from,this.gapFrom)||g(e,this.gapTo,this.to)))return v.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return v.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?v.fromReplace(e,this.from,this.to,n):v.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(h);function g(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function b(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function w(e){return{type:e,attrs:null}}function k(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function O(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}}function M(e,t,n){for(var o=[],i=0;i<e.childCount;i++){var a=e.child(i);a.content.size&&(a=a.copy(M(a.content,t,a))),a.isInline&&(a=t(a,n,i)),o.push(a)}return r.Fragment.fromArray(o)}h.jsonID("replaceAround",y),u.prototype.lift=function(e,t){for(var n=e.$from,o=e.$to,i=e.depth,a=n.before(i+1),s=o.after(i+1),l=a,c=s,u=r.Fragment.empty,f=0,p=i,d=!1;p>t;p--)d||n.index(p)>0?(d=!0,u=r.Fragment.from(n.node(p).copy(u)),f++):l--;for(var h=r.Fragment.empty,v=0,m=i,g=!1;m>t;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=r.Fragment.from(o.node(m).copy(h)),v++):c++;return this.step(new y(l,c,a,s,new r.Slice(u.append(h),f,v),u.size-f,!0))},u.prototype.wrap=function(e,t){for(var n=r.Fragment.empty,o=t.length-1;o>=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,a=e.end;return this.step(new y(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},u.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(a).map(t),n)){i.clearIncompatible(i.mapping.slice(a).map(t,1),n);var s=i.mapping.slice(a),l=s.map(t,1),c=s.map(t+e.nodeSize,1);return i.step(new y(l,c,l+1,c-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},u.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var a=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new y(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},u.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,a=r.Fragment.empty,s=o.depth,l=o.depth-t,c=t-1;s>l;s--,c--){i=r.Fragment.from(o.node(s).copy(i));var u=n&&n[c];a=r.Fragment.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}return this.step(new m(e,e,new r.Slice(i.append(a),t,t,!0)))},u.prototype.join=function(e,t){void 0===t&&(t=1);var n=new m(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var S=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r.Slice(M(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new _(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);h.jsonID("addMark",S);var _=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(M(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new S(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);function C(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),a=e.resolve(n);if(T(i,a,o))return new m(t,n,o);var s=function(e,t){var n=function e(t,n,o,i){var a=r.Fragment.empty,s=0,l=o[n];if(t.depth>n){var c=e(t,n+1,o,i||l);s=c.openEnd+1,a=r.Fragment.from(t.node(n+1).copy(c.content))}l&&(a=a.append(l.content),s=l.openEnd);i&&(a=a.append(t.node(n).contentMatchAt(t.indexAfter(n)).fillBefore(r.Fragment.empty,!0)),s=0);return{content:a,openEnd:s}}(e,0,t,!1),o=n.content,i=n.openEnd;return new r.Slice(o,e.depth,i||0)}(i,function(e,t){for(var n=new V(e),r=1;t.size&&r<=3;r++)t=n.placeSlice(t.content,t.openStart,t.openEnd,r);for(;n.open.length;)n.closeNode();return n.placed}(i,o)),l=A(i,a,s);if(!l)return null;if(s.size!=l.size&&function(e,t,n){if(!t.parent.isTextblock)return!1;var r,o=n.openEnd?function(e,t){for(var n=1;n<t;n++)e=e.lastChild.content;return e.lastChild}(n.content,n.openEnd):e.node(e.depth-(n.openStart-n.openEnd));if(!o.isTextblock)return!1;for(var i=t.index();i<t.parent.childCount;i++)if(!o.type.allowsMarks(t.parent.child(i).marks))return!1;n.openEnd?r=o.contentMatchAt(o.childCount):(r=o.contentMatchAt(o.childCount),n.size&&(r=r.matchFragment(n.content,n.openStart?1:0)));return(r=r.matchFragment(t.parent.content,t.index()))&&r.validEnd}(i,a,s)){for(var c=a.depth,u=a.after(c);c>1&&u==a.end(--c);)++u;var f=A(i,e.resolve(u),s);if(f)return new y(t,u,n,a.end(),f,s.size)}return l.size||t!=n?new m(t,n,l):null}function x(e,t,n,o,i,a,s){var l,c=e.childCount,u=c-(s>0?1:0),f=a<0?t:n.node(i);l=a<0?f.contentMatchAt(u):1==c&&s>0?f.contentMatchAt(a?n.index(i):n.indexAfter(i)):f.contentMatchAt(n.indexAfter(i)).matchFragment(e,c>0&&a?1:0,u);var p=o.node(i);if(s>0&&i<o.depth){var d=p.content.cutByIndex(o.indexAfter(i)).addToStart(e.lastChild),h=l.fillBefore(d,!0);if(h&&h.size&&a>0&&1==c&&(h=null),h){var v=x(e.lastChild.content,e.lastChild,n,o,i+1,1==c?a-1:-1,s-1);if(v){var m=e.lastChild.copy(v);return h.size?e.cutByIndex(0,c-1).append(h).addToEnd(m):e.replaceChild(c-1,m)}}}s>0&&(l=l.matchType((1==c&&a>0?n.node(i+1):e.lastChild).type));var y=o.index(i);if(y==p.childCount&&!p.type.compatibleContent(t.type))return null;for(var g=l.fillBefore(p.content,!0,y),b=y;g&&b<p.content.childCount;b++)f.type.allowsMarks(p.content.child(b).marks)||(g=null);if(!g)return null;if(s>0){var w=function e(t,n,o,i,a){var s,l=t.content,c=l.childCount;s=a>=0?o.node(i).contentMatchAt(o.indexAfter(i)).matchFragment(l,a>0?1:0,c):t.contentMatchAt(c);if(n>0){var u=e(l.lastChild,n-1,o,i+1,1==c?a-1:-1);l=l.replaceChild(c-1,u)}return t.copy(l.append(s.fillBefore(r.Fragment.empty,!0)))}(e.lastChild,s-1,n,i+1,1==c?a-1:-1);e=e.replaceChild(c-1,w)}return e=e.append(g),o.depth>i&&(e=e.addToEnd(function e(t,n){var r=t.node(n),o=r.contentMatchAt(0).fillBefore(r.content,!0,t.index(n));t.depth>n&&(o=o.addToEnd(e(t,n+1)));return r.copy(o)}(o,i+1))),e}function A(e,t,n){var o=x(n.content,e.node(0),e,t,0,n.openStart,n.openEnd);return o?function(e,t,n){for(;t>0&&n>0&&1==e.childCount;)e=e.firstChild.content,t--,n--;return new r.Slice(e,t,n)}(o,n.openStart,t.depth):null}function T(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}h.jsonID("removeMark",_),u.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,c){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){for(var f=Math.max(l,e),p=Math.min(l+r.nodeSize,t),d=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(d)||(a&&a.to==f&&a.mark.eq(u[h])?a.to=p:o.push(a=new _(f,p,u[h])));s&&s.to==f?s.to=p:i.push(s=new S(f,p,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},u.prototype.removeMark=function(e,t,n){var o=this;void 0===n&&(n=null);var i=[],a=0;return this.doc.nodesBetween(e,t,(function(o,s){if(o.isInline){a++;var l=null;if(n instanceof r.MarkType){var c=n.isInSet(o.marks);c&&(l=[c])}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length)for(var u=Math.min(s+o.nodeSize,t),f=0;f<l.length;f++){for(var p=l[f],d=void 0,h=0;h<i.length;h++){var v=i[h];v.step==a-1&&p.eq(i[h].style)&&(d=v)}d?(d.to=u,d.step=a):i.push({style:p,from:Math.max(s,e),to:u,step:a})}}})),i.forEach((function(e){return o.step(new _(e.from,e.to,e.style))})),this},u.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var o=this.doc.nodeAt(e),i=[],a=e+1,s=0;s<o.childCount;s++){var l=o.child(s),c=a+l.nodeSize,u=n.matchType(l.type,l.attrs);if(u){n=u;for(var f=0;f<l.marks.length;f++)t.allowsMarkType(l.marks[f].type)||this.step(new _(a,c,l.marks[f]))}else i.push(new m(a,c,r.Slice.empty));a=c}if(!n.validEnd){var p=n.fillBefore(r.Fragment.empty,!0);this.replace(a,a,new r.Slice(p,0,0))}for(var d=i.length-1;d>=0;d--)this.step(i[d]);return this},u.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=C(this.doc,e,t,n);return o&&this.step(o),this},u.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},u.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},u.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var V=function(e){this.open=[];for(var t=0;t<=e.depth;t++){var n=e.node(t),o=n.contentMatchAt(e.indexAfter(t));this.open.push({parent:n,match:o,content:r.Fragment.empty,wrapper:!1,openEnd:0,depth:t})}this.placed=[]};function j(e,t,n){var r=e.content;if(t>1){var o=j(e.firstChild,t-1,1==e.childCount?n-1:0);r=e.content.replaceChild(0,o)}var i=e.type.contentMatch.fillBefore(r,0==n);return e.copy(i.append(r))}function E(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(E(i.content,t+1,n,r,i)))}return t>r&&(e=o.contentMatchAt(0).fillBefore(e,!0).append(e)),e}function P(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;o==t.start(r)&&n.push(r)}return n}V.prototype.placeSlice=function(e,t,n,o,i){if(t>0){var a=e.firstChild,s=this.placeSlice(a.content,Math.max(0,t-1),n&&1==e.childCount?n-1:0,o,a);s.content!=a.content&&(s.content.size?(e=e.replaceChild(0,a.copy(s.content)),t=s.openStart+1):(1==e.childCount&&(n=0),e=e.cutByIndex(1),t=0))}var l=this.placeContent(e,t,n,o,i);if(o>2&&l.size&&0==t){for(var c=0;c<l.content.childCount;c++){var u=l.content.child(c);this.placeContent(u.content,0,n&&c==l.content.childCount.length-1?n-1:0,o,u)}l=r.Fragment.empty}return l},V.prototype.placeContent=function(e,t,n,o,i){for(var a=0;a<e.childCount;a++){for(var s=e.child(a),l=!1,c=a==e.childCount-1,u=this.open.length-1;u>=0;u--){var f=this.open[u],p=void 0;if(o>1&&(p=f.match.findWrapping(s.type))&&(!i||!p.length||p[p.length-1]!=i.type)){for(;this.open.length-1>u;)this.closeNode();for(var d=0;d<p.length;d++)f.match=f.match.matchType(p[d]),u++,f={parent:p[d].create(),match:p[d].contentMatch,content:r.Fragment.empty,wrapper:!0,openEnd:0,depth:u+d},this.open.push(f)}var h=f.match.matchType(s.type);if(!h){var v=f.match.fillBefore(r.Fragment.from(s));if(!v){if(i&&f.match.matchType(i.type))break;continue}for(var m=0;m<v.childCount;m++){var y=v.child(m);this.addNode(f,y,0),h=f.match.matchFragment(y)}}for(;this.open.length-1>u;)this.closeNode();s=s.mark(f.parent.type.allowedMarks(s.marks)),t&&(s=j(s,t,c?n:0),t=0),this.addNode(f,s,c?n:0),f.match=h,c&&(n=0),l=!0;break}if(!l)break}return this.open.length>1&&(a>0&&a==e.childCount||i&&this.open[this.open.length-1].parent.type==i.type)&&this.closeNode(),new r.Slice(e.cutByIndex(a),t,n)},V.prototype.addNode=function(e,t,n){var o,i;e.content=(o=e.content,i=e.openEnd,i?o.replaceChild(o.childCount-1,function e(t,n){var o=t.content;if(n>1){var i=e(t.lastChild,n-1);o=t.content.replaceChild(t.childCount-1,i)}var a=t.contentMatchAt(t.childCount).fillBefore(r.Fragment.empty,!0);return t.copy(o.append(a))}(o.lastChild,i)):o).addToEnd(t),e.openEnd=n},V.prototype.closeNode=function(){var e=this.open.pop();0==e.content.size||(e.wrapper?this.addNode(this.open[this.open.length-1],e.parent.copy(e.content),e.openEnd+1):this.placed[e.depth]={depth:e.depth,content:e.content,openEnd:e.openEnd})},u.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(T(o,i,n))return this.step(new m(e,t,n));var a=P(o,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var l=o.depth,c=o.pos-1;l>0;l--,c--){var u=o.node(l).type.spec;if(u.defining||u.isolating)break;a.indexOf(l)>-1?s=l:o.before(l)==c&&a.splice(1,0,-l)}for(var f=a.indexOf(s),p=[],d=n.openStart,h=n.content,v=0;;v++){var y=h.firstChild;if(p.push(y),v==n.openStart)break;h=y.content}d>0&&p[d-1].type.spec.defining&&o.node(f).type!=p[d-1].type?d-=1:d>=2&&p[d-1].isTextblock&&p[d-2].type.spec.defining&&o.node(f).type!=p[d-2].type&&(d-=2);for(var g=n.openStart;g>=0;g--){var b=(g+d+1)%(n.openStart+1),w=p[b];if(w)for(var k=0;k<a.length;k++){var O=a[(k+f)%a.length],M=!0;O<0&&(M=!1,O=-O);var S=o.node(O-1),_=o.index(O-1);if(S.canReplaceWith(_,_,w.type,w.marks))return this.replace(o.before(O),M?i.after(O):t,new r.Slice(E(n.content,0,n.openStart,b),b,n.openEnd))}}return this.replace(e,t,n)},u.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=O(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},u.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=P(n,r),i=0;i<o.length;i++){var a=o[i],s=i==o.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var l=1;l<=n.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l))return this.delete(n.before(l),t);return this.delete(e,t)},t.Transform=u,t.TransformError=c,t.Step=h,t.StepResult=v,t.joinPoint=function(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0;if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),a=r.node(o).maybeChild(r.index(o)+1)):(i=r.node(o).maybeChild(r.index(o)-1),a=r.node(o+1)),i&&!i.isTextblock&&k(i,a))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}},t.canJoin=function(e,t){var n=e.resolve(t),r=n.index();return k(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)},t.canSplit=function(e,t,n,r){void 0===n&&(n=1);var o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,l=n-2;s>i;s--,l--){var c=o.node(s),u=o.index(s);if(c.type.spec.isolating)return!1;var f=c.content.cutByIndex(u,c.childCount),p=r&&r[l]||c;if(p!=c&&(f=f.replaceChild(0,p.type.create(p.attrs))),!c.canReplace(u+1,c.childCount)||!p.type.validContent(f))return!1}var d=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(d,d,h?h.type:o.node(i+1).type)},t.insertPoint=O,t.dropPoint=function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0);if(1==a?r.node(s).canReplace(c,c,o):r.node(s).contentMatchAt(c).findWrapping(o.firstChild.type))return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null},t.liftTarget=function(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!b(r,o,i))break}},t.findWrapping=function(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);if(!s||!s.validEnd)return null;return a}(r,t);return i?o.map(w).concat({type:t,attrs:n}).concat(i.map(w)):null},t.StepMap=s,t.MapResult=a,t.Mapping=l,t.AddMarkStep=S,t.RemoveMarkStep=_,t.ReplaceStep=m,t.ReplaceAroundStep=y,t.replaceStep=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(5),i=["ol",0],a=["ul",0],s=["li",0],l={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?i:["ol",{start:e.attrs.order},0]}},c={parseDOM:[{tag:"ul"}],toDOM:function(){return a}},u={parseDOM:[{tag:"li"}],toDOM:function(){return s},defining:!0};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}t.orderedList=l,t.bulletList=c,t.listItem=u,t.addListNodes=function(e,t,n){return e.append({ordered_list:f(l,{content:"list_item+",group:n}),bullet_list:f(c,{content:"list_item+",group:n}),list_item:f(u,{content:t})})},t.wrapInList=function(e,t){return function(n,i){var a=n.selection,s=a.$from,l=a.$to,c=s.blockRange(l),u=!1,f=c;if(!c)return!1;if(c.depth>=2&&s.node(c.depth-1).type.compatibleContent(e)&&0==c.startIndex){if(0==s.index(c.depth-1))return!1;var p=n.doc.resolve(c.start-2);f=new o.NodeRange(p,p,c.depth),c.endIndex<c.parent.childCount&&(c=new o.NodeRange(s,n.doc.resolve(l.end(c.depth)),c.depth)),u=!0}var d=r.findWrapping(f,e,t,c);return!!d&&(i&&i(function(e,t,n,i,a){for(var s=o.Fragment.empty,l=n.length-1;l>=0;l--)s=o.Fragment.from(n[l].type.create(n[l].attrs,s));e.step(new r.ReplaceAroundStep(t.start-(i?2:0),t.end,t.start,t.end,new o.Slice(s,0,0),n.length,!0));for(var c=0,u=0;u<n.length;u++)n[u].type==a&&(c=u+1);for(var f=n.length-c,p=t.start+n.length-(i?2:0),d=t.parent,h=t.startIndex,v=t.endIndex,m=!0;h<v;h++,m=!1)!m&&r.canSplit(e.doc,p,f)&&(e.split(p,f),p+=2*f),p+=d.child(h).nodeSize;return e}(n.tr,c,d,u,e).scrollIntoView()),!0)}},t.splitListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=i.node;if(l&&l.isBlock||a.depth<2||!a.sameParent(s))return!1;var c=a.node(-1);if(c.type!=e)return!1;if(0==a.parent.content.size){if(2==a.depth||a.node(-3).type!=e||a.index(-2)!=a.node(-2).childCount-1)return!1;if(n){for(var u=o.Fragment.empty,f=a.index(-1)>0,p=a.depth-(f?1:2);p>=a.depth-3;p--)u=o.Fragment.from(a.node(p).copy(u));u=u.append(o.Fragment.from(e.createAndFill()));var d=t.tr.replace(a.before(f?null:-1),a.after(-3),new o.Slice(u,f?3:2,2));d.setSelection(t.selection.constructor.near(d.doc.resolve(a.pos+(f?3:2)))),n(d.scrollIntoView())}return!0}var h=s.pos==a.end()?c.contentMatchAt(a.indexAfter(-1)).defaultType:null,v=t.tr.delete(a.pos,s.pos),m=h&&[null,{type:h}];return!!r.canSplit(v.doc,a.pos,2,m)&&(n&&n(v.split(a.pos,2,m).scrollIntoView()),!0)}},t.liftListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!l&&(!n||(a.node(l.depth-1).type==e?function(e,t,n,i){var a=e.tr,s=i.end,l=i.$to.end(i.depth);s<l&&(a.step(new r.ReplaceAroundStep(s-1,l,s,l,new o.Slice(o.Fragment.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new o.NodeRange(a.doc.resolve(i.$from.pos),a.doc.resolve(l),i.depth));return t(a.lift(i,r.liftTarget(i)).scrollIntoView()),!0}(t,n,e,l):function(e,t,n){for(var i=e.tr,a=n.parent,s=n.end,l=n.endIndex-1,c=n.startIndex;l>c;l--)s-=a.child(l).nodeSize,i.delete(s-1,s+1);var u=i.doc.resolve(n.start),f=u.nodeAfter,p=0==n.startIndex,d=n.endIndex==a.childCount,h=u.node(-1),v=u.index(-1);if(!h.canReplace(v+(p?0:1),v+1,f.content.append(d?o.Fragment.empty:o.Fragment.from(a))))return!1;var m=u.pos,y=m+f.nodeSize;return i.step(new r.ReplaceAroundStep(m-(p?1:0),y+(d?1:0),m+1,y-1,new o.Slice((p?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))).append(d?o.Fragment.empty:o.Fragment.from(a.copy(o.Fragment.empty))),p?0:1,d?0:1),p?0:1)),t(i.scrollIntoView()),!0}(t,n,l)))}},t.sinkListItem=function(e){return function(t,n){var i=t.selection,a=i.$from,s=i.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!l)return!1;var c=l.startIndex;if(0==c)return!1;var u=l.parent,f=u.child(c-1);if(f.type!=e)return!1;if(n){var p=f.lastChild&&f.lastChild.type==u.type,d=o.Fragment.from(p?e.create():null),h=new o.Slice(o.Fragment.from(e.create(null,o.Fragment.from(u.type.create(null,d)))),p?3:1,0),v=l.start,m=l.end;n(t.tr.step(new r.ReplaceAroundStep(v-(p?3:1),m,v,m,h,1,!0)).scrollIntoView())}return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(5),i=n(4);function a(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function s(e,t,n){var o=e.selection.$cursor;if(!o||(n?!n.endOfTextblock("backward",e):o.parentOffset>0))return!1;var a=u(o);if(!a){var s=o.blockRange(),c=s&&r.liftTarget(s);return null!=c&&(t&&t(e.tr.lift(s,c).scrollIntoView()),!0)}var f=a.nodeBefore;if(!f.type.spec.isolating&&w(e,a,t))return!0;if(0==o.parent.content.size&&(l(f,"end")||i.NodeSelection.isSelectable(f))){if(t){var p=e.tr.deleteRange(o.before(),o.after());p.setSelection(l(f,"end")?i.Selection.findFrom(p.doc.resolve(p.mapping.map(a.pos,-1)),-1):i.NodeSelection.create(p.doc,a.pos-f.nodeSize)),t(p.scrollIntoView())}return!0}return!(!f.isAtom||a.depth!=o.depth-1)&&(t&&t(e.tr.delete(a.pos-f.nodeSize,a.pos).scrollIntoView()),!0)}function l(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function c(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=u(r),a=o&&o.nodeBefore;return!(!a||!i.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)}function u(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function f(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=d(r);if(!o)return!1;var a=o.nodeAfter;if(w(e,o,t))return!0;if(0==r.parent.content.size&&(l(a,"start")||i.NodeSelection.isSelectable(a))){if(t){var s=e.tr.deleteRange(r.before(),r.after());s.setSelection(l(a,"start")?i.Selection.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):i.NodeSelection.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}return!(!a.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+a.nodeSize).scrollIntoView()),!0)}function p(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=d(r),a=o&&o.nodeAfter;return!(!a||!i.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,o.pos)).scrollIntoView()),!0)}function d(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function h(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}function v(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var a=r.node(-1),s=r.indexAfter(-1),l=a.contentMatchAt(s).defaultType;if(!a.canReplaceWith(s,s,l))return!1;if(t){var c=r.after(),u=e.tr.replaceWith(c,c,l.createAndFill());u.setSelection(i.Selection.near(u.doc.resolve(c),1)),t(u.scrollIntoView())}return!0}function m(e,t){var n=e.selection,r=n.$from,o=n.$to;if(r.parent.inlineContent||o.parent.inlineContent)return!1;var a=r.parent.contentMatchAt(o.indexAfter()).defaultType;if(!a||!a.isTextblock)return!1;if(t){var s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=e.tr.insert(s,a.createAndFill());l.setSelection(i.TextSelection.create(l.doc,s+1)),t(l.scrollIntoView())}return!0}function y(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var o=n.before();if(r.canSplit(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var i=n.blockRange(),a=i&&r.liftTarget(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function g(e,t){var n=e.selection,a=n.$from,s=n.$to;if(e.selection instanceof i.NodeSelection&&e.selection.node.isBlock)return!(!a.parentOffset||!r.canSplit(e.doc,a.pos))&&(t&&t(e.tr.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(t){var l=s.parentOffset==s.parent.content.size,c=e.tr;e.selection instanceof i.TextSelection&&c.deleteSelection();var u=0==a.depth?null:a.node(-1).contentMatchAt(a.indexAfter(-1)).defaultType,f=l&&u?[{type:u}]:null,p=r.canSplit(c.doc,c.mapping.map(a.pos),1,f);f||p||!r.canSplit(c.doc,c.mapping.map(a.pos),1,u&&[{type:u}])||(f=[{type:u}],p=!0),p&&(c.split(c.mapping.map(a.pos),1,f),l||a.parentOffset||a.parent.type==u||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),o.Fragment.from(u.create(),a.parent))||c.setNodeMarkup(c.mapping.map(a.before()),u)),t(c.scrollIntoView())}return!0}function b(e,t){return t&&t(e.tr.setSelection(new i.AllSelection(e.doc))),!0}function w(e,t,n){var a,s,l=t.nodeBefore,c=t.nodeAfter;if(l.type.spec.isolating||c.type.spec.isolating)return!1;if(function(e,t,n){var o=t.nodeBefore,i=t.nodeAfter,a=t.index();return!!(o&&i&&o.type.compatibleContent(i.type))&&(!o.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(a,a+1)||!i.isTextblock&&!r.canJoin(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;if(t.parent.canReplace(t.index(),t.index()+1)&&(a=(s=l.contentMatchAt(l.childCount)).findWrapping(c.type))&&s.matchType(a[0]||c.type).validEnd){if(n){for(var u=t.pos+c.nodeSize,f=o.Fragment.empty,p=a.length-1;p>=0;p--)f=o.Fragment.from(a[p].create(null,f));f=o.Fragment.from(l.copy(f));var d=e.tr.step(new r.ReplaceAroundStep(t.pos-1,u,t.pos,u,new o.Slice(f,1,0),a.length,!0)),h=u+2*a.length;r.canJoin(d.doc,h)&&d.join(h),n(d.scrollIntoView())}return!0}var v=i.Selection.findFrom(t,1),m=v&&v.$from.blockRange(v.$to),y=m&&r.liftTarget(m);return null!=y&&y>=t.depth&&(n&&n(e.tr.lift(m,y).scrollIntoView()),!0)}function k(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var O=k(a,s,c),M=k(a,f,p),S={Enter:k(h,m,y,g),"Mod-Enter":v,Backspace:O,"Mod-Backspace":O,Delete:M,"Mod-Delete":M,"Mod-a":b},_={"Ctrl-h":S.Backspace,"Alt-Backspace":S["Mod-Backspace"],"Ctrl-d":S.Delete,"Ctrl-Alt-Backspace":S["Mod-Delete"],"Alt-Delete":S["Mod-Delete"],"Alt-d":S["Mod-Delete"]};for(var C in S)_[C]=S[C];var x=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?_:S;t.deleteSelection=a,t.joinBackward=s,t.selectNodeBackward=c,t.joinForward=f,t.selectNodeForward=p,t.joinUp=function(e,t){var n,o=e.selection,a=o instanceof i.NodeSelection;if(a){if(o.node.isTextblock||!r.canJoin(e.doc,o.from))return!1;n=o.from}else if(null==(n=r.joinPoint(e.doc,o.from,-1)))return!1;if(t){var s=e.tr.join(n);a&&s.setSelection(i.NodeSelection.create(s.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},t.joinDown=function(e,t){var n,o=e.selection;if(o instanceof i.NodeSelection){if(o.node.isTextblock||!r.canJoin(e.doc,o.to))return!1;n=o.to}else if(null==(n=r.joinPoint(e.doc,o.to,1)))return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},t.lift=function(e,t){var n=e.selection,o=n.$from,i=n.$to,a=o.blockRange(i),s=a&&r.liftTarget(a);return null!=s&&(t&&t(e.tr.lift(a,s).scrollIntoView()),!0)},t.newlineInCode=h,t.exitCode=v,t.createParagraphNear=m,t.liftEmptyBlock=y,t.splitBlock=g,t.splitBlockKeepMarks=function(e,t){return g(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})},t.selectParentNode=function(e,t){var n,r=e.selection,o=r.$from,a=r.to,s=o.sharedDepth(a);return 0!=s&&(n=o.before(s),t&&t(e.tr.setSelection(i.NodeSelection.create(e.doc,n))),!0)},t.selectAll=b,t.wrapIn=function(e,t){return function(n,o){var i=n.selection,a=i.$from,s=i.$to,l=a.blockRange(s),c=l&&r.findWrapping(l,e,t);return!!c&&(o&&o(n.tr.wrap(l,c).scrollIntoView()),!0)}},t.setBlockType=function(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}},t.toggleMark=function(e,t){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,s,e))return!1;if(r)if(a)e.isInSet(n.storedMarks||a.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{for(var l=!1,c=n.tr,u=0;!l&&u<s.length;u++){var f=s[u],p=f.$from,d=f.$to;l=n.doc.rangeHasMark(p.pos,d.pos,e)}for(var h=0;h<s.length;h++){var v=s[h],m=v.$from,y=v.$to;l?c.removeMark(m.pos,y.pos,e):c.addMark(m.pos,y.pos,e.create(t))}r(c.scrollIntoView())}return!0}},t.autoJoin=function(e,t){if(Array.isArray(t)){var n=t;t=function(e){return n.indexOf(e.type.name)>-1}}return function(n,o){return e(n,o&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var o=[],i=0;i<n.mapping.maps.length;i++){for(var a=n.mapping.maps[i],s=0;s<o.length;s++)o[s]=a.map(o[s]);a.forEach((function(e,t,n,r){return o.push(n,r)}))}for(var l=[],c=0;c<o.length;c+=2)for(var u=o[c],f=o[c+1],p=n.doc.resolve(u),d=p.sharedDepth(f),h=p.node(d),v=p.indexAfter(d),m=p.after(d+1);m<=f;++v){var y=h.maybeChild(v);if(!y)break;if(v&&-1==l.indexOf(m)){var g=h.child(v-1);g.type==y.type&&t(g,y)&&l.push(m)}m+=y.nodeSize}l.sort((function(e,t){return e-t}));for(var b=l.length-1;b>=0;b--)r.canJoin(n.doc,l[b])&&n.join(l[b]);e(n)}}(o,t))}},t.chainCommands=k,t.pcBaseKeymap=S,t.macBaseKeymap=_,t.baseKeymap=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.node=t,this.outerView=n,this.getPos=r,this.renderNode(t.attrs)}return r(e,[{key:"renderNode",value:function(e){throw console.log(this.node,e),new Error("renderNode must be implemented by child class!")}}],[{key:"unsetPrefixAttributes",value:function(e,t){var n={};return Object.keys(t).forEach((function(r){r.substr(0,e.length)!==e&&(n[r]=t[r])})),n}}]),e}();t.default=o,window.AbstractNodeView=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(39),a=(r=i)&&r.__esModule?r:{default:r};var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.items=t}return o(e,[{key:"isAvailable",value:function(e){return this.items.some((function(t){return t.isAvailable(e)}))}},{key:"getMenuItem",value:function(e,t){if(!this.isAvailable(e))throw new Error("None of the items is valid for this Schema!");if(!t)throw new Error("dropdown attributes missing!");return new a.default(this.items.filter((function(t){return t.isAvailable(e)})).map((function(t){return t.getMenuItem(e)})),t)}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(30))&&"object"==typeof r&&"default"in r?r.default:r,i=n(6),a=n(4),s=function(e,t){this.items=e,this.eventCount=t};s.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(n.items.get(i-1).selection){--i;break}}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,c,u=e.tr,f=[],p=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void p.push(e);if(r){p.push(new l(e.map));var d,h=e.step.map(r.slice(o));h&&u.maybeStep(h).doc&&(d=u.mapping.maps[u.mapping.maps.length-1],f.push(new l(d,null,null,f.length+p.length))),o--,d&&r.appendMap(d,o)}else u.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,c=new s(n.items.slice(0,i).append(p.reverse().concat(f)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:c,transform:u,selection:a}},s.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,a=this.items,c=!r&&a.length?a.get(a.length-1):null,f=0;f<e.steps.length;f++){var p,d=e.steps[f].invert(e.docs[f]),h=new l(e.mapping.maps[f],d,t);(p=c&&c.merge(h))&&(h=p,f?o.pop():a=a.slice(0,a.length-1)),o.push(h),t&&(i++,t=null),r||(c=h)}var v,m,y,g=i-n.depth;return g>u&&(m=g,(v=a).forEach((function(e,t){if(e.selection&&0==m--)return y=t,!1})),a=v.slice(y),i-=g),new s(a.append(o),i)},s.prototype.remapping=function(e,t){var n=new i.Mapping;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?o=n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,o)}),e,t),n},s.prototype.addMaps=function(e){return 0==this.eventCount?this:new s(this.items.append(e.map((function(e){return new l(e)}))),this.eventCount)},s.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((function(e){e.selection&&a--}),r);var c=t;this.items.forEach((function(t){var r=o.getMirror(--c);if(null!=r){i=Math.min(i,r);var s=o.maps[r];if(t.step){var u=e.steps[r].invert(e.docs[r]),f=t.selection&&t.selection.map(o.slice(c+1,r));f&&a++,n.push(new l(s,u,f))}else n.push(new l(s))}}),r);for(var u=[],f=t;f<i;f++)u.push(new l(o.maps[f]));var p=this.items.slice(0,r).append(u).append(n),d=new s(p,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d},s.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},s.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((function(o,a){if(a>=e)r.push(o),o.selection&&i++;else if(o.step){var s=o.step.map(t.slice(n)),c=s&&s.getMap();if(n--,c&&t.appendMap(c,n),s){var u=o.selection&&o.selection.map(t.slice(n));u&&i++;var f,p=new l(c.invert(),s,u),d=r.length-1;(f=r.length&&r[d].merge(p))?r[d]=f:r.push(p)}}else o.map&&n--}),this.items.length,0),new s(o.from(r.reverse()),i)},s.empty=new s(o.empty,0);var l=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};l.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new l(t.getMap().invert(),t,this.selection)}};var c=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},u=20;function f(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function p(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function d(e,t,n,r){var o=m(t),i=y.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),u=new c(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(y,{redo:r,historyState:u}).scrollIntoView())}}var h=!1,v=null;function m(e){var t=e.plugins;if(v!=t){h=!1,v=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){h=!0;break}}return h}var y=new a.PluginKey("history"),g=new a.PluginKey("closeHistory");t.HistoryState=c,t.closeHistory=function(e){return e.setMeta(g,!0)},t.history=function(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new a.Plugin({key:y,state:{init:function(){return new c(s.empty,s.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(y);if(i)return i.historyState;n.getMeta(g)&&(e=new c(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(y))return a.getMeta(y).redo?new c(e.done.addTransform(n,null,r,m(t)),e.undone,f(n.mapping.maps[n.steps.length-1]),e.prevTime):new c(e.done,e.undone.addTransform(n,null,r,m(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new c(e.done.rebased(n,o),e.undone.rebased(n,o),p(e.prevRanges,n.mapping),e.prevTime):new c(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),p(e.prevRanges,n.mapping),e.prevTime);var l=e.prevTime<(n.time||0)-r.newGroupDelay||!a&&!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges),u=a?p(e.prevRanges,n.mapping):f(n.mapping.maps[n.steps.length-1]);return new c(e.done.addTransform(n,l?t.selection.getBookmark():null,r,m(t)),s.empty,u,n.time)}(n,r,t,e)}},config:e})},t.undo=function(e,t){var n=y.getState(e);return!(!n||0==n.done.eventCount)&&(t&&d(n,e,t,!1),!0)},t.redo=function(e,t){var n=y.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&d(n,e,t,!0),!0)},t.undoDepth=function(e){var t=y.getState(e);return t?t.done.eventCount:0},t.redoDepth=function(e){var t=y.getState(e);return t?t.undone.eventCount:0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTypeNoAttrCheck=function(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(t,r){if(s)return!1;if(!t.isTextblock||t.type===e)return!0;var o=n.doc.resolve(r),i=o.index();return s=o.parent.canReplaceWith(i,i+1,e),!0})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(4),i=n(6),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),l=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var u=a.ie=!!(l||c||s);a.ie_version=l?document.documentMode||6:c?+c[1]:s?+s[1]:null,a.gecko=!u&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var f=!u&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!f,a.chrome_version=f&&+f[1],a.ios=!u&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),a.android=/Android \d/.test(navigator.userAgent),a.webkit=!u&&"WebkitAppearance"in document.documentElement.style,a.safari=/Apple Computer/.test(navigator.vendor),a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var p=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},d=function(e){var t=e.parentNode;return t&&11==t.nodeType?t.host:t},h=function(e,t,n){var r=document.createRange();return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},v=function(e,t,n,r){return n&&(y(e,t,n,r,-1)||y(e,t,n,r,1))},m=/^(img|br|input|textarea|hr)$/i;function y(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:g(e))||3==e.nodeType&&"\ufeff"==e.nodeValue){var i=e.parentNode;if(1!=i.nodeType||(a=void 0,(a=e.pmViewDesc)&&a.node&&a.node.isBlock)||m.test(e.nodeName)||"false"==e.contentEditable)return!1;t=p(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;e=e.childNodes[t+(o<0?-1:0)],t=o<0?g(e):0}}var a}function g(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}var b=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function w(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function k(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function O(e,t){return"number"==typeof e?e:e[t]}function M(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=i.defaultView,s=n||e.dom;s;s=d(s))if(1==s.nodeType){var l=s==i.body||1!=s.nodeType,c=l?k(a):s.getBoundingClientRect(),u=0,f=0;if(t.top<c.top+O(r,"top")?f=-(c.top-t.top+O(o,"top")):t.bottom>c.bottom-O(r,"bottom")&&(f=t.bottom-c.bottom+O(o,"bottom")),t.left<c.left+O(r,"left")?u=-(c.left-t.left+O(o,"left")):t.right>c.right-O(r,"right")&&(u=t.right-c.right+O(o,"right")),(u||f)&&(l?a.scrollBy(u,f):(f&&(s.scrollTop+=f),u&&(s.scrollLeft+=u))),l)break}}function S(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,c=0;l;l=l.nextSibling,c++){var u=void 0;if(1==l.nodeType)u=l.getClientRects();else{if(3!=l.nodeType)continue;u=h(l).getClientRects()}for(var f=0;f<u.length;f++){var p=u[f];if(p.top<=a&&p.bottom>=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var d=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(d<o){n=l,o=d,r=d&&3==n.nodeType?{left:p.right<t.left?p.right:p.left,top:t.top}:t,1==l.nodeType&&d&&(i=c+(t.left>=(p.left+p.right)/2?1:0));continue}}!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=x(r,1);if(i.top!=i.bottom&&_(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:S(n,r)}function _(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function C(e,t){var n,r,o=e.root;if(o.caretPositionFromPoint){var i,a=o.caretPositionFromPoint(t.left,t.top);if(a)n=(i=a).offsetNode,r=i.offset}if(!n&&o.caretRangeFromPoint){var s,l=o.caretRangeFromPoint(t.left,t.top);if(l)n=(s=l).startContainer,r=s.startOffset}var c,u=o.elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var f=e.dom.getBoundingClientRect();if(!_(t,f))return null;if(!(u=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2),a=i;;){var s=t.childNodes[a];if(1==s.nodeType)for(var l=s.getClientRects(),c=0;c<l.length;c++){var u=l[c];if(_(n,u))return e(s,n,u)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,f)))return null}u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),n&&(1==n.nodeType&&(r=Math.min(r,n.childNodes.length)),n==e.dom&&r==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=r&&1==n.nodeType&&"BR"==n.childNodes[r-1].nodeName||(c=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,n,r,t))),null==c&&(c=function(e,t,n){var r=S(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var p=e.docView.nearestDesc(u,!0);return{pos:c,inside:p?p.posAtStart-p.border:-1}}function x(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function A(e,t){var n=e.docView.domFromPos(t),r=n.node,o=n.offset;if(3==r.nodeType&&(a.chrome||a.gecko)){var i=x(h(r,o,o),0);if(a.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){var s=x(h(r,o-1,o-1),-1);if(Math.abs(s.left-i.left)<1&&s.top==i.top){var l=x(h(r,o,o+1),-1);return T(l,l.left<s.left)}}return i}if(1==r.nodeType&&!e.state.doc.resolve(t).parent.inlineContent){var c,u=!0;if(o<r.childNodes.length){var f=r.childNodes[o];1==f.nodeType&&(c=f.getBoundingClientRect())}if(!c&&o){var p=r.childNodes[o-1];1==p.nodeType&&(c=p.getBoundingClientRect(),u=!1)}return function(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}(c||r.getBoundingClientRect(),u)}for(var d=-1;d<2;d+=2)if(d<0&&o){var v=void 0,m=3==r.nodeType?h(r,o-1,o):3==(v=r.childNodes[o-1]).nodeType?h(v):1==v.nodeType&&"BR"!=v.nodeName?v:null;if(m){var y=x(m,1);if(y.top<y.bottom)return T(y,!1)}}else if(d>0&&o<g(r)){var b=void 0,w=3==r.nodeType?h(r,o,o+1):3==(b=r.childNodes[o]).nodeType?h(b):1==b.nodeType?b:null;if(w){var k=x(w,-1);if(k.top<k.bottom)return T(k,!0)}}return T(x(3==r.nodeType?h(r):r,0),!1)}function T(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function V(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o.focus()}}var j=/[\u0590-\u08ac]/;var E=null,P=null,N=!1;function H(e,t,n){return E==t&&P==n?N:(E=t,P=n,N="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return V(e,t,(function(){for(var t=e.docView.domFromPos(o.pos).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=A(e,o.pos),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=h(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var c=s[l];if(c.bottom>c.top&&("up"==n?c.bottom<i.top+1:c.top>i.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=getSelection();return j.test(r.parent.textContent)&&s.modify?V(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset;s.modify("move",n,"character");var a=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),a})):"left"==n||"backward"==n?i:a}(e,t,n))}var L=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},D={beforePosition:{},size:{},border:{},posBefore:{},posAtStart:{},posAfter:{},posAtEnd:{},contentLost:{}};L.prototype.matchesWidget=function(){return!1},L.prototype.matchesMark=function(){return!1},L.prototype.matchesNode=function(){return!1},L.prototype.matchesHack=function(){return!1},D.beforePosition.get=function(){return!1},L.prototype.parseRule=function(){return null},L.prototype.stopEvent=function(){return!1},D.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},D.border.get=function(){return 0},L.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},L.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},D.posBefore.get=function(){return this.parent.posBeforeChild(this)},D.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},D.posAfter.get=function(){return this.posBefore+this.size},D.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},L.prototype.localPosFromDOM=function(e,t,n){var r;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var o,i;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(i=o.pmViewDesc)||i.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(i)+i.size:this.posAtStart}var a,s;if(e==this.contentDOM)a=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.nextSibling}for(;a&&(!(s=a.pmViewDesc)||s.parent!=this);)a=a.nextSibling;return a?this.posBeforeChild(s):this.posAtEnd}if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){r=!1;break}if(l.parentNode.firstChild!=l)break}if(null==r&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){r=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart},L.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(e):o.nodeDOM==e))return o;n=!1}}},L.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},L.prototype.posFromDOM=function(e,t,n){for(var r=e;;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}},L.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},L.prototype.domFromPos=function(e){if(!this.contentDOM)return{node:this.dom,offset:0};for(var t=0,n=0;;n++){if(t==e){for(;n<this.children.length&&(this.children[n].beforePosition||this.children[n].dom.parentNode!=this.contentDOM);)n++;return{node:this.contentDOM,offset:n==this.children.length?this.contentDOM.childNodes.length:p(this.children[n].dom)}}if(n==this.children.length)throw new Error("Invalid position "+e);var r=this.children[n],o=t+r.size;if(e<o)return r.domFromPos(e-t-r.border);t=o}},L.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var c=i+s.border;if(e>=c&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var u=a;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=p(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&t<=l){t=l;for(var d=a+1;d<this.children.length;d++){var h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=p(h.dom);break}t+=h.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},L.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},L.prototype.domAfterPos=function(e){var t=this.domFromPos(e),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},L.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],c=s+l.size;if(o>s&&i<c)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=c}var u=this.domFromPos(e),f=this.domFromPos(t),p=n.getSelection(),d=document.createRange();if(r||!v(u.node,u.offset,p.anchorNode,p.anchorOffset)||!v(f.node,f.offset,p.focusNode,p.focusOffset)){if(p.extend)d.setEnd(u.node,u.offset),d.collapse(!1);else{if(e>t){var h=u;u=f,f=h}d.setEnd(f.node,f.offset),d.setStart(u.node,u.offset)}p.removeAllRanges(),p.addRange(d),p.extend&&p.extend(f.node,f.offset)}},L.prototype.ignoreMutation=function(e){return!this.contentDOM},D.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},L.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e==a&&t==s&&o.contentLost?o.dirty=3:o.markDirty(e-a,t-a));o.dirty=3}n=i}this.dirty=2},L.prototype.markParentsDirty=function(){for(var e=this.parent;e;e=e.parent){e.dirty<2&&(e.dirty=2)}},Object.defineProperties(L.prototype,D);var I=[],R=function(e){function t(t,n,r,o){var i,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}e.call(this,t,I,a,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={beforePosition:{}};return n.beforePosition.get=function(){return this.widget.type.side<0},t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},Object.defineProperties(t.prototype,n),t}(L),$=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{skip:ie(this.dom)}},t.prototype.ignoreMutation=function(){return!1},t}(R),F=function(e){function t(t,n,r,o){e.call(this,t,I,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{}};return n.size.get=function(){return this.text.length},t.prototype.parseRule=function(){return{skip:ie(this.dom)}},t.prototype.localPosFromDOM=function(e,t){if(e!=this.textDOM)return this.posAtStart+(t?this.size:0);var n=this.textDOM.nodeValue.indexOf("\ufeff");return this.posAtStart+t-(n>-1&&n<t?1:0)},t.prototype.domFromPos=function(e){var t=this.textDOM.nodeValue.indexOf("\ufeff");return{node:this.textDOM,offset:e+(t>-1&&t<=e?1:0)}},t.prototype.ignoreMutation=function(){return!1},Object.defineProperties(t.prototype,n),t}(L),z=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,o,i){var a=i.nodeViews[n.type.name],s=a&&a(n,i,o);return s&&s.dom||(s=r.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n,o))),new t(e,n,s.dom,s.contentDOM||s.dom)},t.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=oe(i,n,a,r)),e>0&&(i=oe(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(L),B=function(e){function t(t,n,r,o,i,a,s,l,c){e.call(this,t,n.isLeaf?I:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(l,c)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{},border:{}};return t.create=function(e,n,o,i,a,s){var l,c=a.nodeViews[n.type.name],u=c&&c(n,a,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:s}),o),f=u&&u.dom,p=u&&u.contentDOM;if(n.isText)if(f){if(3!=f.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else f=document.createTextNode(n.text);else if(!f){var d;f=(d=r.DOMSerializer.renderSpec(document,n.type.spec.toDOM(n))).dom,p=d.contentDOM}p||n.isText||"BR"==f.nodeName||(f.hasAttribute("contenteditable")||(f.contentEditable=!1),n.type.spec.draggable&&(f.draggable=!0));var h=f;return f=Y(f,o,n),u?l=new K(e,n,o,i,f,p,h,u,a,s+1):n.isText?new W(e,n,o,i,f,h,a):new t(e,n,o,i,f,p,h,a,s+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?r.Fragment.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ee(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,o=this.node.inlineContent,i=t,a=o&&e.composing&&this.localCompositionNode(e,t),s=new ne(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,c=[],u=null,f=0;;){if(l<o.length&&o[l].to==i){for(var p=o[l++],d=void 0;l<o.length&&o[l].to==i;)(d||(d=[p])).push(o[l++]);if(d){d.sort(re);for(var h=0;h<d.length;h++)n(d[h],f)}else n(p,f)}var v=void 0,m=void 0;if(u)m=-1,v=u,u=null;else{if(!(f<e.childCount))break;m=f,v=e.child(f++)}for(var y=0;y<c.length;y++)c[y].to<=i&&c.splice(y--,1);for(;l<o.length&&o[l].from==i;)c.push(o[l++]);var g=i+v.nodeSize;if(v.isText){var b=g;l<o.length&&o[l].from<b&&(b=o[l].from);for(var w=0;w<c.length;w++)c[w].to<b&&(b=c[w].to);b<g&&(u=v.cut(b-i),v=v.cut(0,b-i),g=b,m=-1)}r(v,c.length?c.slice():I,t.forChild(i,v),m),i=g}}(this.node,this.innerDeco,(function(t,a){t.spec.marks?s.syncToMarks(t.spec.marks,o,e):t.type.side>=0&&s.syncToMarks(a==n.node.childCount?r.Mark.none:n.node.child(a).marks,o,e),s.placeWidget(t,e,i)}),(function(t,n,r,a){s.syncToMarks(t.marks,o,e),s.findNodeMatch(t,n,r,a)||s.updateNextNode(t,n,r,e,a)||s.addNode(t,n,r,e,i),i+=t.nodeSize})),s.syncToMarks(I,o,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),this.renderChildren())},t.prototype.renderChildren=function(){!function e(t,n){for(var r=t.firstChild,o=0;o<n.length;o++){var i=n[o],a=i.dom;if(a.parentNode==t){for(;a!=r;)r=te(r);r=r.nextSibling}else t.insertBefore(a,r);if(i instanceof z){var s=r?r.previousSibling:t.lastChild;e(i.contentDOM,i.children),r=s?s.nextSibling:t.firstChild}}for(;r;)r=te(r)}(this.contentDOM,this.children,t.is),a.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom)},t.prototype.localCompositionNode=function(e,t){var n=e.state.selection,r=n.from,i=n.to;if(!(!(e.state.selection instanceof o.TextSelection)||r<t||i>t+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0)e=e.childNodes[t-1],t=g(e);else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(a.focusNode,a.focusOffset);if(s&&this.dom.contains(s.parentNode)){var l=s.nodeValue.replace(/\ufeff/g,""),c=function(e,t,n,r){for(var o="",i=0,a=0;i<e.childCount;i++){var s=e.child(i),l=a+s.nodeSize;if(s.isText){if(o+=s.text,l>=r){for(var c=l-o.length,u=o.lastIndexOf(t);u>-1&&c+u>n;)u=o.lastIndexOf(t,u-1);if(u>-1&&c+u+t.length>=r)return c+u;if(l>r-t.length)break}}else o="";a=l}return-1}(this.node.content,l,r-t,i-t);return c<0?null:{node:s,pos:c,text:l}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new F(this,i,n,o);e.compositionNodes.push(a),this.children=oe(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!ee(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=U(this.dom,this.nodeDOM,Z(this.outerDeco,this.node,t),Z(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!1)},Object.defineProperties(t.prototype,n),t}(L);function J(e,t,n,r,o){return Y(r,t,e),new B(null,e,t,n,r,r,r,o,0)}var W=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){var e=this.nodeDOM.parentNode;return e?{skip:e}:{ignore:!0}},t.prototype.update=function(e,t){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t}(B),q=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return 0==this.dirty},t}(L),K=function(e){function t(t,n,r,o,i,a,s,l,c,u){e.call(this,t,n,r,o,i,a,s,c,u),this.spec=l}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(B);function G(e){e&&(this.nodeName=e)}G.prototype=Object.create(null);var Q=[new G];function Z(e,t,n){if(0==e.length)return Q;for(var r=n?Q[0]:new G,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs,s=r;if(a)for(var l in a.nodeName&&o.push(s=new G(a.nodeName)),a){var c=a[l];null!=c&&(n&&1==o.length&&o.push(s=r=new G(t.isInline?"span":"div")),"class"==l?s.class=(s.class?s.class+" ":"")+c:"style"==l?s.style=(s.style?s.style+";":"")+c:"nodeName"!=l&&(s[l]=c))}}return o}function U(e,t,n,r){if(n==Q&&r==Q)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=t.parentNode)&&l.tagName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName)).appendChild(o),o=l}X(o,s||Q[0],a)}return o}function X(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" "):I,a=n.class?n.class.split(" "):I,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l])}if(t.style!=n.style){if(t.style)for(var c,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=u.exec(t.style);)e.style[c[1].toLowerCase()]="";n.style&&(e.style.cssText+=n.style)}}function Y(e,t,n){return U(e,e,Q,Z(t,n,1!=e.nodeType))}function ee(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function te(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var ne=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1;var n=function(e,t){for(var n=[],r=e.childCount,o=t.length-1;r>0&&o>=0;o--){var i=t[o],a=i.node;if(a){if(a!=e.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}(e.node.content,e.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function re(e,t){return e.type.side-t.type.side}function oe(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=null),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function ie(e){var t=e.cloneNode(!0);return function e(t){if(1==t.nodeType)for(var n=t.firstChild;n;n=n.nextSibling)e(n);else 3==t.nodeType&&(t.nodeValue=t.nodeValue.replace(/\ufeff/g,""))}(t),t}function ae(e,t){var n=e.selection,r=n.$anchor,i=n.$head,a=t>0?r.max(i):r.min(i),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&o.Selection.findFrom(s,t)}function se(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function le(e,t,n){var r=e.state.selection;if(r instanceof o.TextSelection){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=ae(e.state,t);return!!(i&&i instanceof o.NodeSelection)&&se(e,i)}var s,l=r.$head,c=l.textOffset?null:t<0?l.nodeBefore:l.nodeAfter;if(!c||c.isText)return!1;var u=t<0?l.pos-c.nodeSize:l.pos;return!!(c.isAtom||(s=e.docView.descAt(u))&&!s.contentDOM)&&(o.NodeSelection.isSelectable(c)?se(e,new o.NodeSelection(t<0?e.state.doc.resolve(l.pos-c.nodeSize):l)):!!a.webkit&&se(e,new o.TextSelection(e.state.doc.resolve(t<0?u:u+c.nodeSize))))}if(r instanceof o.NodeSelection&&r.node.isInline)return se(e,new o.TextSelection(t>0?r.$to:r.$from));var f=ae(e.state,t);return!!f&&se(e,f)}function ce(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ue(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function fe(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r<ce(n)&&ue(n.childNodes[r])&&(s=!0);;)if(r>0)if(1!=n.nodeType){if(3!=n.nodeType||"\ufeff"!=n.nodeValue.charAt(r-1))break;a.ie&&a.ie_version<=11&&(s=!0),o=n,i=--r}else{var l=n.childNodes[r-1];if(ue(l))o=n,i=--r;else{if(3!=l.nodeType)break;r=(n=l).nodeValue.length}}else{if(de(n))break;for(var c=n.previousSibling;c&&ue(c);)o=n.parentNode,i=p(c),c=c.previousSibling;if(c)r=ce(n=c);else{if((n=n.parentNode)==e.dom)break;r=0}}s?he(e,t,n,r):o&&he(e,t,o,i)}}function pe(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=ce(n);;)if(r<a){if(1!=n.nodeType)break;if(!ue(n.childNodes[r]))break;o=n,i=++r}else{if(de(n))break;for(var s=n.nextSibling;s&&ue(s);)o=s.parentNode,i=p(s)+1,s=s.nextSibling;if(s)r=0,a=ce(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&he(e,t,o,i)}}function de(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function he(e,t,n,r){if(b(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection()}function ve(e,t,n){var r=e.state.selection;if(r instanceof o.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;var i=r.$from,a=r.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var s=ae(e.state,t);if(s&&s instanceof o.NodeSelection)return se(e,s)}if(!i.parent.inlineContent){var l=o.Selection.findFrom(t<0?i:a,t);return!l||se(e,l)}return!1}function me(e,t){if(!(e.state.selection instanceof o.TextSelection))return!0;var n=e.state.selection,r=n.$head,i=n.$anchor,a=n.empty;if(!r.sameParent(i))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){var l=e.state.tr;return t<0?l.delete(r.pos-s.nodeSize,r.pos):l.delete(r.pos,r.pos+s.nodeSize),e.dispatch(l),!0}return!1}function ye(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ge(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?me(e,-1)||fe(e):46==n||a.mac&&68==n&&"c"==r?me(e,1)||pe(e):13==n||27==n||(37==n?le(e,-1,r)||fe(e):39==n?le(e,1,r)||pe(e):38==n?ve(e,-1,r)||fe(e):40==n?function(e){if(a.chrome&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;ye(e,o,!0),setTimeout((function(){return ye(e,o,!1)}),20)}}}(e)||ve(e,1,r)||pe(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function be(e,t,n){var r=e.state.selection;if(Oe(e,r),e.editable&&!e.hasFocus()){if(!t)return;a.gecko&&a.gecko_version<=55&&(e.domObserver.disconnectSelection(),e.dom.focus(),e.domObserver.connectSelection())}else if(!(e.editable||_e(e)&&document.activeElement.contains(e.dom)||t))return;if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom;n.setEnd(r,r.childNodes.length),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!e.state.selection.visible&&a.ie&&a.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var i,s,l=r.anchor,c=r.head;!we||r instanceof o.TextSelection||(r.$from.parent.inlineContent||(i=ke(e,r.from)),r.empty||r.$from.parent.inlineContent||(s=ke(e,r.to))),e.docView.setSelection(l,c,e.root,n),we&&(i&&(i.contentEditable="false"),s&&(s.contentEditable="false")),r.visible?e.dom.classList.remove("ProseMirror-hideselection"):l!=c&&(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),e.dom.classList.remove("ProseMirror-hideselection"))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}ne.prototype.getPreMatch=function(e){return e>=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},ne.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},ne.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ne.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.top.children.splice(this.index,a-this.index)),this.top=this.top.children[this.index];else{var l=z.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}},ne.prototype.findNodeMatch=function(e,t,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(i&&i.matchesNode(e,t,n))o=a.indexOf(i);else for(var s=this.index,l=Math.min(a.length,s+5);s<l;s++){var c=a[s];if(c.matchesNode(e,t,n)&&this.preMatched.indexOf(c)<0){o=s;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)},ne.prototype.updateNextNode=function(e,t,n,r,o){if(this.index==this.top.children.length)return!1;var i=this.top.children[this.index];if(i instanceof B){var a=this.preMatched.indexOf(i);if(a>-1&&a+this.preMatchOffset!=o)return!1;var s=i.dom;if(!(this.lock&&(s==this.lock||1==s.nodeType&&s.contains(this.lock.parentNode))&&!(e.isText&&i.node&&i.node.isText&&i.nodeDOM.nodeValue==e.text&&3!=i.dirty&&ee(t,i.outerDeco)))&&i.update(e,t,n,r))return i.dom!=s&&(this.changed=!0),this.index++,!0}return!1},ne.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,B.create(this.top,e,t,n,r,o)),this.changed=!0},ne.prototype.placeWidget=function(e,t,n){if(this.index<this.top.children.length&&this.top.children[this.index].matchesWidget(e))this.index++;else{var r=new(e.spec.isCursorWrapper?$:R)(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}},ne.prototype.placeComposition=function(e,t){this.syncToMarks(I,!0,e),this.top.children[this.index]==t?this.index++:(this.top.children.splice(this.index++,0,t),this.changed=!0)},ne.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof z;)e=e.children[e.children.length-1];if(!e||!(e instanceof W)||/\n$/.test(e.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var t=document.createElement("br");this.top.children.splice(this.index++,0,new q(this.top,I,t,null)),this.changed=!0}};var we=a.safari||a.chrome&&a.chrome_version<63;function ke(e,t){var n=e.docView.domFromPos(t),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return i.contentEditable="true",i;if(a)return a.contentEditable="true",a}}function Oe(e,t){if(t instanceof o.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Me(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Me(e)}function Me(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function Se(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||o.TextSelection.between(t,n,r)}function _e(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Ce(e){return!1===e.type.spec.inclusive}function xe(e){var t=e.selection,n=t.$head,r=t.$anchor,o=t.visible,i=n.pos!=r.pos||o&&!n.parent.inlineContent?null:n;return i&&(!o||e.storedMarks||0==i.parent.content.length||i.parentOffset&&!i.textOffset&&i.nodeBefore.marks.some(Ce))?i:null}function Ae(e,t){return function(n){var r=n.pmViewDesc;if(r)return r.parseRule();if("BR"==n.nodeName&&n.parentNode){if(a.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName))return e.matchTag(document.createElement("li"),t);if(n.parentNode.lastChild==n||a.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}}}function Te(e,t,n,i){if(t<0){var s=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,l=function(e,t){var n,r,i=e.root.getSelection(),a=e.state.doc,s=e.docView.nearestDesc(i.focusNode),l=s&&0==s.size,c=e.docView.posFromDOM(i.focusNode,i.focusOffset),u=a.resolve(c);if(b(i)){for(n=u;s&&!s.node;)s=s.parent;if(s&&s.node.isAtom&&o.NodeSelection.isSelectable(s.node)&&s.parent){var f=s.posBefore;r=new o.NodeSelection(c==f?u:a.resolve(f))}}else n=a.resolve(e.docView.posFromDOM(i.anchorNode,i.anchorOffset));return r||(r=Se(e,n,u,"pointer"==t||e.state.selection.head<u.pos&&!l?1:-1)),r}(e,s);if(!e.state.selection.eq(l)){var c=e.state.tr.setSelection(l);"pointer"==s?c.setMeta("pointer",!0):"key"==s&&c.scrollIntoView(),e.dispatch(c)}}else{var u=e.state.doc.resolve(t),f=u.sharedDepth(n);t=u.before(f+1),n=e.state.doc.resolve(n).after(f+1);var p,d,h=e.state.selection,v=function(e,t,n){var o=e.docView.parseRange(t,n),i=o.node,s=o.fromOffset,l=o.toOffset,c=o.from,u=o.to,f=e.root.getSelection(),p=null,d=f.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(p=[{node:d,offset:f.anchorOffset}],b(f)||p.push({node:f.focusNode,offset:f.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var h=l;h>s;h--){var v=i.childNodes[h-1],m=v.pmViewDesc;if("BR"==v.nodeType&&!m){l=h;break}if(!m||m.size)break}var y=e.state.doc,g=e.someProp("domParser")||r.DOMParser.fromSchema(e.state.schema),w=y.resolve(c),k=null,O=g.parse(i,{topNode:w.parent,topMatch:w.parent.contentMatchAt(w.index()),topOpen:!0,from:s,to:l,preserveWhitespace:!w.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:Ae(g,w),context:w});if(p&&null!=p[0].pos){var M=p[0].pos,S=p[1]&&p[1].pos;null==S&&(S=M),k={anchor:M+c,head:S+c}}return{doc:O,sel:k,from:c,to:u}}(e,t,n),m=e.state.doc,y=m.slice(v.from,v.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(p=e.state.selection.to,d="end"):(p=e.state.selection.from,d="start"),e.lastKeyCode=null;var g=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){var c=Math.max(0,i-Math.min(s,l));r-=s+c-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(y.content,v.doc.content,v.from,p,d);if(g){e.domChangeCount++,e.state.selection.from<e.state.selection.to&&g.start==g.endB&&e.state.selection instanceof o.TextSelection&&(g.start>e.state.selection.from&&g.start<=e.state.selection.from+2?g.start=e.state.selection.from:g.endA<e.state.selection.to&&g.endA>=e.state.selection.to-2&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to));var k,O=v.doc.resolveNoCache(g.start-v.from),M=v.doc.resolveNoCache(g.endB-v.from);if(!(!O.sameParent(M)&&O.pos<v.doc.content.size&&(k=o.Selection.findFrom(v.doc.resolve(O.pos+1),1,!0))&&k.head==M.pos&&e.someProp("handleKeyDown",(function(t){return t(e,w(13,"Enter"))}))))if(e.state.selection.anchor>g.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||je(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(je(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||je(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(m,g.start,g.endA,O,M)&&e.someProp("handleKeyDown",(function(t){return t(e,w(8,"Backspace"))})))a.android&&a.chrome&&e.domObserver.suppressSelectionUpdates();else{var S,_,C,x,A=g.start,T=g.endA;if(O.sameParent(M)&&O.parent.inlineContent)if(O.pos==M.pos)a.ie&&a.ie_version<=11&&0==O.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return be(e)}),20)),S=e.state.tr.delete(A,T),_=m.resolve(g.start).marksAcross(m.resolve(g.endA));else if(g.endA==g.endB&&(x=m.resolve(g.start))&&(C=function(e,t){for(var n,o,i,a=e.firstChild.marks,s=t.firstChild.marks,l=a,c=s,u=0;u<s.length;u++)l=s[u].removeFromSet(l);for(var f=0;f<a.length;f++)c=a[f].removeFromSet(c);if(1==l.length&&0==c.length)o=l[0],n="add",i=function(e){return e.mark(o.addToSet(e.marks))};else{if(0!=l.length||1!=c.length)return null;o=c[0],n="remove",i=function(e){return e.mark(o.removeFromSet(e.marks))}}for(var p=[],d=0;d<t.childCount;d++)p.push(i(t.child(d)));if(r.Fragment.from(p).eq(e))return{mark:o,type:n}}(O.parent.content.cut(O.parentOffset,M.parentOffset),x.parent.content.cut(x.parentOffset,g.endA-x.start()))))S=e.state.tr,"add"==C.type?S.addMark(A,T,C.mark):S.removeMark(A,T,C.mark);else if(O.parent.child(O.index()).isText&&O.index()==M.index()-(M.textOffset?0:1)){var V=O.parent.textBetween(O.parentOffset,M.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,A,T,V)})))return;S=e.state.tr.insertText(V,A,T)}if(S||(S=e.state.tr.replace(A,T,v.doc.slice(g.start-v.from,g.endB-v.from))),v.sel){var j=Ve(e,S.doc,v.sel);j&&S.setSelection(j)}_&&S.ensureMarks(_),e.dispatch(S.scrollIntoView())}}else if(!(i&&h instanceof o.TextSelection&&!h.empty&&h.$head.sameParent(h.$anchor))||e.composing||v.sel&&v.sel.anchor!=v.sel.head){if(v.sel){var E=Ve(e,e.state.doc,v.sel);E&&!E.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(E))}}else{var P=e.state,N=P.selection;e.dispatch(P.tr.replaceSelectionWith(P.schema.text(P.doc.textBetween(N.from,N.to)),!0).scrollIntoView())}}}function Ve(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Se(e,t.resolve(n.anchor),t.resolve(n.head))}function je(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Ee(e,t){for(var n=[],o=t.content,i=t.openStart,a=t.openEnd;i>1&&a>1&&1==o.childCount&&1==o.firstChild.childCount;){i--,a--;var s=o.firstChild;n.push(s.type.name,s.type.hasRequiredAttrs()?s.attrs:null),o=s.content}var l=e.someProp("clipboardSerializer")||r.DOMSerializer.fromSchema(e.state.schema),c=document.createElement("div");c.appendChild(l.serializeFragment(o));for(var u,f=c.firstChild;f&&1==f.nodeType&&(u=Le[f.nodeName.toLowerCase()]);){for(var p=u.length-1;p>=0;p--){for(var d=document.createElement(u[p]);c.firstChild;)d.appendChild(c.firstChild);c.appendChild(d)}f=c.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Pe(e,t,n,o,i){var a,s,l=i.parent.type.spec.code;if(!n&&!t)return null;var c=t&&(o||l||!n);if(c){if(e.someProp("transformPastedText",(function(e){t=e(t)})),l)return new r.Slice(r.Fragment.from(e.state.schema.text(t)),0,0);var u=e.someProp("clipboardTextParser",(function(e){return e(t,i)}));u?s=u:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=(De||(De=document.implementation.createHTMLDocument("title"))).createElement("div"),o=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(e),i=0;(n=o&&Le[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""),i=n.length);r.innerHTML=e;for(var a=0;a<i;a++)r=r.firstChild;return r}(n);var f=a&&a.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+) (.*)/.exec(f.getAttribute("data-pm-slice"));if(!s){var d=e.someProp("clipboardParser")||e.someProp("domParser")||r.DOMParser.fromSchema(e.state.schema);s=d.parseSlice(a,{preserveWhitespace:!(!c&&!p),context:i})}return s=p?function(e,t){if(!e.size)return e;var n,o=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var i=e.content,a=e.openStart,s=e.openEnd,l=n.length-2;l>=0;l-=2){var c=o.nodes[n[l]];if(!c||c.hasRequiredAttrs())break;i=r.Fragment.from(c.create(n[l+1],i)),a++,s++}return new r.Slice(i,a,s)}(function(e,t,n){t<e.openStart&&(e=new r.Slice(He(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd));n<e.openEnd&&(e=new r.Slice(He(e.content,1,n,e.openEnd,0,0),e.openStart,n));return e}(s,+p[1],+p[2]),p[3]):r.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var o=t.node(n).contentMatchAt(t.index(n)),i=void 0,a=[];if(e.forEach((function(e){if(a){var t,n=o.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&i.length&&function e(t,n,o,i,a){if(a<t.length&&a<n.length&&t[a]==n[a]){var s=e(t,n,o,i.lastChild,a+1);if(s)return i.copy(i.content.replaceChild(i.childCount-1,s));if(i.contentMatchAt(i.childCount).matchType(a==t.length-1?o.type:t[a+1]))return i.copy(i.content.append(r.Fragment.from(Ne(o,t,a+1))))}}(n,i,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;var o=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),i=t.contentMatchAt(t.childCount).fillBefore(r.Fragment.empty,!0);return t.copy(o.append(i))}(a[a.length-1],i.length));var s=Ne(e,n);a.push(s),o=o.matchType(s.type,s.attrs),i=n}}})),a)return{v:r.Fragment.from(a)}},o=t.depth;o>=0;o--){var i=n(o);if(i)return i.v}return e}(s.content,i),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}function Ne(e,t,n){void 0===n&&(n=0);for(var o=t.length-1;o>=n;o--)e=t[o].create(null,r.Fragment.from(e));return e}function He(e,t,n,o,i,a){var s=t<0?e.firstChild:e.lastChild,l=s.content;return i<o-1&&(l=He(l,t,n,o,i+1,a)),i>=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(r.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}var Le={thead:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},De=null;var Ie={childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0},Re=a.ie&&a.ie_version<=11,$e=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};$e.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},$e.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Fe=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){a.ie&&a.ie_version<=11&&e.some((function(e){return"childList"==e.type&&1==e.removedNodes.length&&e.removedNodes[0].parentNode==e.target}))?setTimeout((function(){return n.flush(e)}),10):n.flush(e)})),this.currentSelection=new $e,this.queue=[],Re&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),window.setTimeout((function(){return n.flush()}),20)}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Fe.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ie),Re&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Fe.prototype.stop=function(){var e=this,t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)e.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer&&this.observer.disconnect(),Re&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Fe.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Fe.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Fe.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},Fe.prototype.onSelectionChange=function(){var e;if((!(e=this.view).editable||e.root.activeElement==e.dom)&&_e(e))return this.suppressingSelectionUpdates?be(this.view):void this.flush()},Fe.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Fe.prototype.flush=function(e){if(this.view.docView){e||(e=this.observer.takeRecords()),this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&_e(this.view),r=-1,o=-1,i=!1;if(this.view.editable)for(var a=0;a<e.length;a++){var s=this.registerMutation(e[a]);s&&(r=r<0?s.from:Math.min(s.from,r),o=o<0?s.to:Math.max(s.to,o),s.typeOver&&(i=!0))}(r>-1||n)&&(r>-1&&this.view.docView.markDirty(r,o),this.handleDOMChange(r,o,i),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||be(this.view))}},Fe.prototype.registerMutation=function(e){var t=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(t==this.view.docView||"contenteditable"==e.attributeName))return null;if(!t||t.ignoreMutation(e))return null;if("childList"==e.type){var n=e.previousSibling&&e.previousSibling.parentNode==e.target?p(e.previousSibling)+1:0,r=t.localPosFromDOM(e.target,n,-1),o=e.nextSibling&&e.nextSibling.parentNode==e.target?p(e.nextSibling):e.target.childNodes.length;return{from:r,to:t.localPosFromDOM(e.target,o,1)}}return"attributes"==e.type?{from:t.posAtStart-t.border,to:t.posAtEnd+t.border}:{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var ze={},Be={};function Je(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function We(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return qe(e,t)})}))}function qe(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Ke(e){return{left:e.clientX,top:e.clientY}}function Ge(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if(l)return l.v}return!1}function Qe(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Ze(e,t,n,r,i){return Ge(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(i?function(e,t){if(-1==t)return!1;var n,r,i=e.state.selection;i instanceof o.NodeSelection&&(n=i.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var l=s>a.depth?a.nodeAfter:a.node(s);if(o.NodeSelection.isSelectable(l)){r=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=r&&(Qe(e,o.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&o.NodeSelection.isSelectable(r))&&(Qe(e,new o.NodeSelection(n),"pointer"),!0)}(e,n))}function Ue(e,t,n,r){return Ge(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Xe(e,t,n,r){return Ge(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(Qe(e,o.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var r=n.resolve(t),i=r.depth+1;i>0;i--){var a=i>r.depth?r.nodeAfter:r.node(i),s=r.before(i);if(a.inlineContent)Qe(e,o.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!o.NodeSelection.isSelectable(a))continue;Qe(e,o.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function Ye(e){return it(e)}Be.keydown=function(e,t){e.shiftKey=16==t.keyCode||t.shiftKey,nt(e,t)||(e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),e.someProp("handleKeyDown",(function(n){return n(e,t)}))||ge(e,t)?t.preventDefault():Je(e,"key"))},Be.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Be.keypress=function(e,t){if(!(nt(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof o.TextSelection&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,r)}))||e.dispatch(e.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}}};var et=a.mac?"metaKey":"ctrlKey";ze.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=Ye(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[et]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(Ke(t));i&&("singleClick"==o?e.mouseDown=new tt(e,i,t,n):("doubleClick"==o?Ue:Xe)(e,i.pos,i.inside,t)?t.preventDefault():Je(e,"pointer"))};var tt=function(e,t,n,r){var i,s,l=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=r,this.selectNode=n[et],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var c=e.state.doc.resolve(t.pos);i=c.parent,s=c.depth?c.before():0}this.mightDrag=null;var u=r?null:n.target,f=u?e.docView.nearestDesc(u,!0):null;this.target=f?f.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof o.NodeSelection&&s==e.state.selection.from)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!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((function(){return l.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Je(e,"pointer")};function nt(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}tt.prototype.done=function(){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.draggable=!1),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},tt.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ke(e))),this.allowDefault||!t?(a.ie&&xe(this.view.state)&&this.view.updateState(this.view.state),Je(this.view,"pointer")):Ze(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():!this.flushed&&(!a.chrome||this.view.state.selection instanceof o.TextSelection||t.pos!=this.view.state.selection.from&&t.pos!=this.view.state.selection.to)?Je(this.view,"pointer"):(Qe(this.view,o.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault())}},tt.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Je(this.view,"pointer")},ze.touchdown=function(e){Ye(e),Je(e,"pointer")},ze.contextmenu=function(e){return Ye(e)};var rt=a.android?5e3:-1;function ot(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return it(e)}),t))}function it(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop()
[all...]
/plugin/abc2/abc-libraries/abc2svg/
H A Dsnd-1.js68 case')':j=st.pop()
/plugin/diagramsnet/lib/resources/
H A Ddia_he.txt979 officePopupInfo=Please complete the process in the pop-up window.
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-navigated-viewer.production.min.js2pop(),v=R+2+a.length,e.substring(R+2,v)!==a)return g("closing tag mismatch");for(;v<T;v++)if(!(32=…
/plugin/amcharts/assets/amcharts/plugins/export/libs/pdfmake/
H A Dpdfmake.js4558 stackA.pop();
4559 stackB.pop();
13654 styleContextStack.pop();
14860 StyleContextStack.prototype.pop = function(howMany) {
14864 this.styleOverrides.pop();
14943 this.pop(pushedItems);
16029 var saved = this.snapshots.pop();
16092 var saved = this.snapshots.pop();
16362 this.repeatables.pop();
16628 this.context = this.contextStack.pop();
[all …]
H A Dpdfmake.min.js7 …rn a[v]==e;o.push(t),a.push(e);var m=(s?ln:fn)(t,e,n,r,i,o,a);return o.pop(),a.pop(),m}function Me…
9pop();return{size:r,fontSize:c}}for(var r=Object.getOwnPropertyNames(e.fonts)[0],i={text:t,font:e.… method in n
10pop();this.calculateBottomMost(t),this.endingCell=null,this.x=t.x,this.y=t.bottomMost.y,this.page=…
13pop(),d(S,m,_)}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(w(e)){var n="'…
/plugin/diagramsnet/lib/js/orgchart/
H A Dbridge.collections.min.js1 …alidOperationException("Stack empty.");return this._array[this._size-1|0]},pop:function(){if(this.…
/plugin/diagramsnet/lib/math/config/
H A DAccessible.js70pop();if(!m.isOpen){delete m.env}this.env=(this.data.length?this.Top().env:{});return m},Top:funct…
111 t.unshift(i.items.pop()), t.unshift(i.items.pop())), t.unshift("Accessibility"),
/plugin/dirtylittlehelper/mermaid/editor/docs/
H A D4.4.js.map1pop();\n parent = findNodeAtLocation(root, path);\n if (parent === void 0 && value !…
/plugin/datatables/assets/datatables.net/js/
H A Djquery.dataTables.min.js4 !function(n){"use strict";var a;"function"==typeof define&&define.amd?define(["jquery"],function(t){return n(t,window,document)}):"object"==typeof exports?(a=require("jquery"),"undefined"!=typeof window?module.exports=function(t,e){return t=t||window,e=e||a(t),n(e,t,t.document)}:n(a,window,window.document)):window.DataTable=n(jQuery,window,document)}(function(P,j,y,H){"use strict";function d(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null}function l(t,e,n){var a=typeof t,r="string"==a;return"number"==a||"bigint"==a||!!h(t)||(e&&r&&(t=$(t,e)),n&&r&&(t=t.replace(q,"")),!isNaN(parseFloat(t))&&isFinite(t))}function a(t,e,n){var a;return!!h(t)||(h(a=t)||"string"==typeof a)&&!!l(t.replace(V,"").replace(/<script/i,""),e,n)||null}function m(t,e,n,a){var r=[],o=0,i=e.length;if(a!==H)for(;o<i;o++)t[e[o]][n]&&r.push(t[e[o]][n][a]);else for(;o<i;o++)r.push(t[e[o]][n]);return r}function f(t,e){var n,a=[];e===H?(e=0,n=t):(n=e,e=t);for(var r=e;r<n;r++)a.push(r);return a}function _(t){for(var e=[],n=0,a=t.length;n<a;n++)t[n]&&e.push(t[n]);return e}function s(t,e){return-1!==this.indexOf(t,e=e===H?0:e)}var p,e,t,w=function(t,v){if(w.factory(t,v))return w;if(this instanceof w)return P(t).DataTable(v);v=t,this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new B(t?ge(this[p.iApiIndex]):this)},this.fnAddData=function(t,e){var n=this.api(!0),t=(Array.isArray(t)&&(Array.isArray(t[0])||P.isPlainObject(t[0]))?n.rows:n.row).add(t);return e!==H&&!e||n.draw(),t.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],a=n.oScroll;t===H||t?e.draw(!1):""===a.sX&&""===a.sY||Qt(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();t!==H&&!t||e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var a=this.api(!0),t=a.rows(t),r=t.settings()[0],o=r.aoData[t[0][0]];return t.remove(),e&&e.call(this,r,o),n!==H&&!n||a.draw(),o},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,a,r,o){var i=this.api(!0);(null===e||e===H?i:i.column(e)).search(t,n,a,o),i.draw()},this.fnGetData=function(t,e){var n,a=this.api(!0);return t!==H?(n=t.nodeName?t.nodeName.toLowerCase():"",e!==H||"td"==n||"th"==n?a.cell(t,e).data():a.row(t).data()||null):a.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==H?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();return"TR"==n?e.row(t).index():"TD"==n||"TH"==n?[(n=e.cell(t).index()).row,n.columnVisible,n.column]:null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){t=this.api(!0).page(t);e!==H&&!e||t.draw(!1)},this.fnSetColumnVis=function(t,e,n){t=this.api(!0).column(t).visible(e);n!==H&&!n||t.columns.adjust().draw()},this.fnSettings=function(){return ge(this[p.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,a,r){var o=this.api(!0);return(n===H||null===n?o.row(e):o.cell(e,n)).data(t),r!==H&&!r||o.columns.adjust(),a!==H&&!a||o.draw(),0},this.fnVersionCheck=p.fnVersionCheck;var e,y=this,D=v===H,_=this.length;for(e in D&&(v={}),this.oApi=this.internal=p.internal,w.ext.internal)e&&(this[e]=$e(e));return this.each(function(){var r=1<_?be({},v,!0):v,o=0,t=this.getAttribute("id"),i=!1,e=w.defaults,l=P(this);if("table"!=this.nodeName.toLowerCase())W(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{K(e),Q(e.column),C(e,e,!0),C(e.column,e.column,!0),C(e,P.extend(r,l.data()),!0);for(var n=w.settings,o=0,s=n.length;o<s;o++){var a=n[o];if(a.nTable==this||a.nTHead&&a.nTHead.parentNode==this||a.nTFoot&&a.nTFoot.parentNode==this){var u=(r.bRetrieve!==H?r:e).bRetrieve,c=(r.bDestroy!==H?r:e).bDestroy;if(D||u)return a.oInstance;if(c){a.oInstance.fnDestroy();break}return void W(a,0,"Cannot reinitialise DataTable",3)}if(a.sTableId==this.id){n.splice(o,1);break}}null!==t&&""!==t||(t="DataTables_Table_"+w.ext._unique++,this.id=t);var f,d,h=P.extend(!0,{},w.models.oSettings,{sDestroyWidth:l[0].style.width,sInstance:t,sTableId:t}),p=(h.nTable=this,h.oApi=y.internal,h.oInit=r,n.push(h),h.oInstance=1===y.length?y:l.dataTable(),K(r),Z(r.oLanguage),r.aLengthMenu&&!r.iDisplayLength&&(r.iDisplayLength=(Array.isArray(r.aLengthMenu[0])?r.aLengthMenu[0]:r.aLengthMenu)[0]),r=be(P.extend(!0,{},e),r),F(h.oFeatures,r,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),F(h,r,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),F(h.oScroll,r,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),F(h.oLanguage,r,"fnInfoCallback"),L(h,"aoDrawCallback",r.fnDrawCallback,"user"),L(h,"aoServerParams",r.fnServerParams,"user"),L(h,"aoStateSaveParams",r.fnStateSaveParams,"user"),L(h,"aoStateLoadParams",r.fnStateLoadParams,"user"),L(h,"aoStateLoaded",r.fnStateLoaded,"user"),L(h,"aoRowCallback",r.fnRowCallback,"user"),L(h,"aoRowCreatedCallback",r.fnCreatedRow,"user"),L(h,"aoHeaderCallback",r.fnHeaderCallback,"user"),L(h,"aoFooterCallback",r.fnFooterCallback,"user"),L(h,"aoInitComplete",r.fnInitComplete,"user"),L(h,"aoPreDrawCallback",r.fnPreDrawCallback,"user"),h.rowIdFn=A(r.rowId),tt(h),h.oClasses),g=(P.extend(p,w.ext.classes,r.oClasses),l.addClass(p.sTable),h.iInitDisplayStart===H&&(h.iInitDisplayStart=r.iDisplayStart,h._iDisplayStart=r.iDisplayStart),null!==r.iDeferLoading&&(h.bDeferLoading=!0,t=Array.isArray(r.iDeferLoading),h._iRecordsDisplay=t?r.iDeferLoading[0]:r.iDeferLoading,h._iRecordsTotal=t?r.iDeferLoading[1]:r.iDeferLoading),h.oLanguage),t=(P.extend(!0,g,r.oLanguage),g.sUrl?(P.ajax({dataType:"json",url:g.sUrl,success:function(t){C(e.oLanguage,t),Z(t),P.extend(!0,g,t,h.oInit.oLanguage),R(h,null,"i18n",[h]),Jt(h)},error:function(){Jt(h)}}),i=!0):R(h,null,"i18n",[h]),null===r.asStripeClasses&&(h.asStripeClasses=[p.sStripeOdd,p.sStripeEven]),h.asStripeClasses),b=l.children("tbody").find("tr").eq(0),m=(-1!==P.inArray(!0,P.map(t,function(t,e){return b.hasClass(t)}))&&(P("tbody tr",this).removeClass(t.join(" ")),h.asDestroyStripes=t.slice()),[]),t=this.getElementsByTagName("thead");if(0!==t.length&&(wt(h.aoHeader,t[0]),m=Ct(h)),null===r.aoColumns)for(f=[],o=0,s=m.length;o<s;o++)f.push(null);else f=r.aoColumns;for(o=0,s=f.length;o<s;o++)nt(h,m?m[o]:null);st(h,r.aoColumnDefs,f,function(t,e){at(h,t,e)}),b.length&&(d=function(t,e){return null!==t.getAttribute("data-"+e)?e:null},P(b[0]).children("th, td").each(function(t,e){var n,a=h.aoColumns[t];a||W(h,0,"Incorrect column count",18),a.mData===t&&(n=d(e,"sort")||d(e,"order"),e=d(e,"filter")||d(e,"search"),null===n&&null===e||(a.mData={_:t+".display",sort:null!==n?t+".@data-"+n:H,type:null!==n?t+".@data-"+n:H,filter:null!==e?t+".@data-"+e:H},a._isArrayHost=!0,at(h,t)))}));var S=h.oFeatures,t=function(){if(r.aaSorting===H){var t=h.aaSorting;for(o=0,s=t.length;o<s;o++)t[o][1]=h.aoColumns[o].asSorting[0]}ce(h),S.bSort&&L(h,"aoDrawCallback",function(){var t,n;h.bSorted&&(t=I(h),n={},P.each(t,function(t,e){n[e.src]=e.dir}),R(h,null,"order",[h,t,n]),le(h))}),L(h,"aoDrawCallback",function(){(h.bSorted||"ssp"===E(h)||S.bDeferRender)&&ce(h)},"sc");var e=l.children("caption").each(function(){this._captionSide=P(this).css("caption-side")}),n=l.children("thead"),a=(0===n.length&&(n=P("<thead/>").appendTo(l)),h.nTHead=n[0],l.children("tbody")),n=(0===a.length&&(a=P("<tbody/>").insertAfter(n)),h.nTBody=a[0],l.children("tfoot"));if(0===(n=0===n.length&&0<e.length&&(""!==h.oScroll.sX||""!==h.oScroll.sY)?P("<tfoot/>").appendTo(l):n).length||0===n.children().length?l.addClass(p.sNoFooter):0<n.length&&(h.nTFoot=n[0],wt(h.aoFooter,h.nTFoot)),r.aaData)for(o=0;o<r.aaData.length;o++)x(h,r.aaData[o]);else!h.bDeferLoading&&"dom"!=E(h)||ut(h,P(h.nTBody).children("tr"));h.aiDisplay=h.aiDisplayMaster.slice(),!(h.bInitialised=!0)===i&&Jt(h)};L(h,"aoDrawCallback",de,"state_save"),r.bStateSave?(S.bStateSave=!0,he(h,0,t)):t()}}),y=null,this},c={},U=/[\r\n\u2028]/g,V=/<.*?>/g,X=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,J=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),q=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,h=function(t){return!t||!0===t||"-"===t},$=function(t,e){return c[e]||(c[e]=new RegExp(Ot(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(c[e],"."):t},N=function(t,e,n){var a=[],r=0,o=t.length;if(n!==H)for(;r<o;r++)t[r]&&t[r][e]&&a.push(t[r][e][n]);else for(;r<o;r++)t[r]&&a.push(t[r][e]);return a},G=function(t){if(!(t.length<2))for(var e=t.slice().sort(),n=e[0],a=1,r=e.length;a<r;a++){if(e[a]===n)return!1;n=e[a]}return!0},z=function(t){if(G(t))return t.slice();var e,n,a,r=[],o=t.length,i=0;t:for(n=0;n<o;n++){for(e=t[n],a=0;a<i;a++)if(r[a]===e)continue t;r.push(e),i++}return r},Y=function(t,e){if(Array.isArray(e))for(var n=0;n<e.length;n++)Y(t,e[n]);else t.push(e);return t};function i(n){var a,r,o={};P.each(n,function(t,e){(a=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(a[1]+" ")&&(r=t.replace(a[0],a[2].toLowerCase()),o[r]=t,"o"===a[1])&&i(n[t])}),n._hungarianMap=o}function C(n,a,r){var o;n._hungarianMap||i(n),P.each(a,function(t,e){(o=n._hungarianMap[t])===H||!r&&a[o]!==H||("o"===o.charAt(0)?(a[o]||(a[o]={}),P.extend(!0,a[o],a[t]),C(n[o],a[o],r)):a[o]=a[t])})}function Z(t){var e,n=w.defaults.oLanguage,a=n.sDecimal;a&&Me(a),t&&(e=t.sZeroRecords,!t.sEmptyTable&&e&&"No data available in table"===n.sEmptyTable&&F(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&e&&"Loading..."===n.sLoadingRecords&&F(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands),e=t.sDecimal)&&a!==e&&Me(e)}Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.includes||(Array.prototype.includes=s),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),String.prototype.includes||(String.prototype.includes=s),w.util={throttle:function(a,t){var r,o,i=t!==H?t:200;return function(){var t=this,e=+new Date,n=arguments;r&&e<r+i?(clearTimeout(o),o=setTimeout(function(){r=H,a.apply(t,n)},i)):(r=e,a.apply(t,n))}},escapeRegex:function(t){return t.replace(J,"\\$1")},set:function(a){var d;return P.isPlainObject(a)?w.util.set(a._):null===a?function(){}:"function"==typeof a?function(t,e,n){a(t,"set",e,n)}:"string"!=typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("(")?function(t,e){t[a]=e}:(d=function(t,e,n){for(var a,r,o,i,l=dt(n),n=l[l.length-1],s=0,u=l.length-1;s<u;s++){if("__proto__"===l[s]||"constructor"===l[s])throw new Error("Cannot set prototype values");if(a=l[s].match(ft),r=l[s].match(g),a){if(l[s]=l[s].replace(ft,""),t[l[s]]=[],(a=l.slice()).splice(0,s+1),i=a.join("."),Array.isArray(e))for(var c=0,f=e.length;c<f;c++)d(o={},e[c],i),t[l[s]].push(o);else t[l[s]]=e;return}r&&(l[s]=l[s].replace(g,""),t=t[l[s]](e)),null!==t[l[s]]&&t[l[s]]!==H||(t[l[s]]={}),t=t[l[s]]}n.match(g)?t[n.replace(g,"")](e):t[n.replace(ft,"")]=e},function(t,e){return d(t,e,a)})},get:function(r){var o,d;return P.isPlainObject(r)?(o={},P.each(r,function(t,e){e&&(o[t]=w.util.get(e))}),function(t,e,n,a){var r=o[e]||o._;return r!==H?r(t,e,n,a):t}):null===r?function(t){return t}:"function"==typeof r?function(t,e,n,a){return r(t,e,n,a)}:"string"!=typeof r||-1===r.indexOf(".")&&-1===r.indexOf("[")&&-1===r.indexOf("(")?function(t,e){return t[r]}:(d=function(t,e,n){var a,r,o;if(""!==n)for(var i=dt(n),l=0,s=i.length;l<s;l++){if(f=i[l].match(ft),a=i[l].match(g),f){if(i[l]=i[l].replace(ft,""),""!==i[l]&&(t=t[i[l]]),r=[],i.splice(0,l+1),o=i.join("."),Array.isArray(t))for(var u=0,c=t.length;u<c;u++)r.push(d(t[u],e,o));var f=f[0].substring(1,f[0].length-1);t=""===f?r:r.join(f);break}if(a)i[l]=i[l].replace(g,""),t=t[i[l]]();else{if(null===t||null===t[i[l]])return null;if(t===H||t[i[l]]===H)return H;t=t[i[l]]}}return t},function(t,e){return d(t,e,r)})}};var r=function(t,e,n){t[e]!==H&&(t[n]=t[e])};function K(t){r(t,"ordering","bSort"),r(t,"orderMulti","bSortMulti"),r(t,"orderClasses","bSortClasses"),r(t,"orderCellsTop","bSortCellsTop"),r(t,"order","aaSorting"),r(t,"orderFixed","aaSortingFixed"),r(t,"paging","bPaginate"),r(t,"pagingType","sPaginationType"),r(t,"pageLength","iDisplayLength"),r(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,a=e.length;n<a;n++)e[n]&&C(w.models.oSearch,e[n])}function Q(t){r(t,"orderable","bSortable"),r(t,"orderData","aDataSort"),r(t,"orderSequence","asSorting"),r(t,"orderDataType","sortDataType");var e=t.aDataSort;"number"!=typeof e||Array.isArray(e)||(t.aDataSort=[e])}function tt(t){var e,n,a,r;w.__browser||(w.__browser=e={},r=(a=(n=P("<div/>").css({position:"fixed",top:0,left:-1*P(j).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(P("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(P("<div/>").css({width:"100%",height:10}))).appendTo("body")).children()).children(),e.barWidth=a[0].offsetWidth-a[0].clientWidth,e.bScrollOversize=100===r[0].offsetWidth&&100!==a[0].clientWidth,e.bScrollbarLeft=1!==Math.round(r.offset().left),e.bBounding=!!n[0].getBoundingClientRect().width,n.remove()),P.extend(t.oBrowser,w.__browser),t.oScroll.iBarWidth=w.__browser.barWidth}function et(t,e,n,a,r,o){var i,l=a,s=!1;for(n!==H&&(i=n,s=!0);l!==r;)t.hasOwnProperty(l)&&(i=s?e(i,t[l],l,t):t[l],s=!0,l+=o);return i}function nt(t,e){var n=w.defaults.column,a=t.aoColumns.length,n=P.extend({},w.models.oColumn,n,{nTh:e||y.createElement("th"),sTitle:n.sTitle||(e?e.innerHTML:""),aDataSort:n.aDataSort||[a],mData:n.mData||a,idx:a}),n=(t.aoColumns.push(n),t.aoPreSearchCols);n[a]=P.extend({},w.models.oSearch,n[a]),at(t,a,P(e).data())}function at(t,e,n){function a(t){return"string"==typeof t&&-1!==t.indexOf("@")}var e=t.aoColumns[e],r=t.oClasses,o=P(e.nTh),i=(!e.sWidthOrig&&(e.sWidthOrig=o.attr("width")||null,u=(o.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/))&&(e.sWidthOrig=u[1]),n!==H&&null!==n&&(Q(n),C(w.defaults.column,n,!0),n.mDataProp===H||n.mData||(n.mData=n.mDataProp),n.sType&&(e._sManualType=n.sType),n.className&&!n.sClass&&(n.sClass=n.className),n.sClass&&o.addClass(n.sClass),u=e.sClass,P.extend(e,n),F(e,n,"sWidth","sWidthOrig"),u!==e.sClass&&(e.sClass=u+" "+e.sClass),n.iDataSort!==H&&(e.aDataSort=[n.iDataSort]),F(e,n,"aDataSort")),e.mData),l=A(i),s=e.mRender?A(e.mRender):null,u=(e._bAttrSrc=P.isPlainObject(i)&&(a(i.sort)||a(i.type)||a(i.filter)),e._setter=null,e.fnGetData=function(t,e,n){var a=l(t,e,H,n);return s&&e?s(a,e,t,n):a},e.fnSetData=function(t,e,n){return b(i)(t,e,n)},"number"==typeof i||e._isArrayHost||(t._rowReadObject=!0),t.oFeatures.bSort||(e.bSortable=!1,o.addClass(r.sSortableNone)),-1!==P.inArray("asc",e.asSorting)),n=-1!==P.inArray("desc",e.asSorting);e.bSortable&&(u||n)?u&&!n?(e.sSortingClass=r.sSortableAsc,e.sSortingClassJUI=r.sSortJUIAscAllowed):!u&&n?(e.sSortingClass=r.sSortableDesc,e.sSortingClassJUI=r.sSortJUIDescAllowed):(e.sSortingClass=r.sSortable,e.sSortingClassJUI=r.sSortJUI):(e.sSortingClass=r.sSortableNone,e.sSortingClassJUI="")}function O(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;ee(t);for(var n=0,a=e.length;n<a;n++)e[n].nTh.style.width=e[n].sWidth}var r=t.oScroll;""===r.sY&&""===r.sX||Qt(t),R(t,null,"column-sizing",[t])}function rt(t,e){t=it(t,"bVisible");return"number"==typeof t[e]?t[e]:null}function ot(t,e){t=it(t,"bVisible"),e=P.inArray(e,t);return-1!==e?e:null}function T(t){var n=0;return P.each(t.aoColumns,function(t,e){e.bVisible&&"none"!==P(e.nTh).css("display")&&n++}),n}function it(t,n){var a=[];return P.map(t.aoColumns,function(t,e){t[n]&&a.push(e)}),a}function lt(t){for(var e,n,a,r,o,i,l,s=t.aoColumns,u=t.aoData,c=w.ext.type.detect,f=0,d=s.length;f<d;f++)if(l=[],!(o=s[f]).sType&&o._sManualType)o.sType=o._sManualType;else if(!o.sType){for(e=0,n=c.length;e<n;e++){for(a=0,r=u.length;a<r&&(l[a]===H&&(l[a]=S(t,a,f,"type")),(i=c[e](l[a],t))||e===c.length-1)&&("html"!==i||h(l[a]));a++);if(i){o.sType=i;break}}o.sType||(o.sType="string")}}function st(t,e,n,a){var r,o,i,l,s=t.aoColumns;if(e)for(r=e.length-1;0<=r;r--)for(var u,c=(u=e[r]).target!==H?u.target:u.targets!==H?u.targets:u.aTargets,f=0,d=(c=Array.isArray(c)?c:[c]).length;f<d;f++)if("number"==typeof c[f]&&0<=c[f]){for(;s.length<=c[f];)nt(t);a(c[f],u)}else if("number"==typeof c[f]&&c[f]<0)a(s.length+c[f],u);else if("string"==typeof c[f])for(i=0,l=s.length;i<l;i++)"_all"!=c[f]&&!P(s[i].nTh).hasClass(c[f])||a(i,u);if(n)for(r=0,o=n.length;r<o;r++)a(r,n[r])}function x(t,e,n,a){for(var r=t.aoData.length,o=P.extend(!0,{},w.models.oRow,{src:n?"dom":"data",idx:r}),i=(o._aData=e,t.aoData.push(o),t.aoColumns),l=0,s=i.length;l<s;l++)i[l].sType=null;t.aiDisplayMaster.push(r);e=t.rowIdFn(e);return e!==H&&(t.aIds[e]=o),!n&&t.oFeatures.bDeferRender||St(t,r,n,a),r}function ut(n,t){var a;return(t=t instanceof P?t:P(t)).map(function(t,e){return a=mt(n,e),x(n,a.data,e,a.cells)})}function S(t,e,n,a){"search"===a?a="filter":"order"===a&&(a="sort");var r=t.iDraw,o=t.aoColumns[n],i=t.aoData[e]._aData,l=o.sDefaultContent,s=o.fnGetData(i,a,{settings:t,row:e,col:n});if(s===H)return t.iDrawError!=r&&null===l&&(W(t,0,"Requested unknown parameter "+("function"==typeof o.mData?"{function}":"'"+o.mData+"'")+" for row "+e+", column "+n,4),t.iDrawError=r),l;if(s!==i&&null!==s||null===l||a===H){if("function"==typeof s)return s.call(i)}else s=l;return null===s&&"display"===a?"":"filter"===a&&(e=w.ext.type.search)[o.sType]?e[o.sType](s):s}function ct(t,e,n,a){var r=t.aoColumns[n],o=t.aoData[e]._aData;r.fnSetData(o,a,{settings:t,row:e,col:n})}var ft=/\[.*?\]$/,g=/\(\)$/;function dt(t){return P.map(t.match(/(\\.|[^\.])+/g)||[""],function(t){return t.replace(/\\\./g,".")})}var A=w.util.get,b=w.util.set;function ht(t){return N(t.aoData,"_aData")}function pt(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function gt(t,e,n){for(var a=-1,r=0,o=t.length;r<o;r++)t[r]==e?a=r:t[r]>e&&t[r]--;-1!=a&&n===H&&t.splice(a,1)}function bt(n,a,t,e){function r(t,e){for(;t.childNodes.length;)t.removeChild(t.firstChild);t.innerHTML=S(n,a,e,"display")}var o,i,l=n.aoData[a];if("dom"!==t&&(t&&"auto"!==t||"dom"!==l.src)){var s=l.anCells;if(s)if(e!==H)r(s[e],e);else for(o=0,i=s.length;o<i;o++)r(s[o],o)}else l._aData=mt(n,l,e,e===H?H:l._aData).data;l._aSortData=null,l._aFilterData=null;var u=n.aoColumns;if(e!==H)u[e].sType=null;else{for(o=0,i=u.length;o<i;o++)u[o].sType=null;vt(n,l)}}function mt(t,e,n,a){function r(t,e){var n;"string"==typeof t&&-1!==(n=t.indexOf("@"))&&(n=t.substring(n+1),b(t)(a,e.getAttribute(n)))}function o(t){n!==H&&n!==f||(l=d[f],s=t.innerHTML.trim(),l&&l._bAttrSrc?(b(l.mData._)(a,s),r(l.mData.sort,t),r(l.mData.type,t),r(l.mData.filter,t)):h?(l._setter||(l._setter=b(l.mData)),l._setter(a,s)):a[f]=s),f++}var i,l,s,u=[],c=e.firstChild,f=0,d=t.aoColumns,h=t._rowReadObject;a=a!==H?a:h?{}:[];if(c)for(;c;)"TD"!=(i=c.nodeName.toUpperCase())&&"TH"!=i||(o(c),u.push(c)),c=c.nextSibling;else for(var p=0,g=(u=e.anCells).length;p<g;p++)o(u[p]);var e=e.firstChild?e:e.nTr;return e&&(e=e.getAttribute("id"))&&b(t.rowId)(a,e),{data:a,cells:u}}function St(t,e,n,a){var r,o,i,l,s,u,c=t.aoData[e],f=c._aData,d=[];if(null===c.nTr){for(r=n||y.createElement("tr"),c.nTr=r,c.anCells=d,r._DT_RowIndex=e,vt(t,c),l=0,s=t.aoColumns.length;l<s;l++)i=t.aoColumns[l],(o=(u=!n)?y.createElement(i.sCellType):a[l])||W(t,0,"Incorrect column count",18),o._DT_CellIndex={row:e,column:l},d.push(o),!u&&(!i.mRender&&i.mData===l||P.isPlainObject(i.mData)&&i.mData._===l+".display")||(o.innerHTML=S(t,e,l,"display")),i.sClass&&(o.className+=" "+i.sClass),i.bVisible&&!n?r.appendChild(o):!i.bVisible&&n&&o.parentNode.removeChild(o),i.fnCreatedCell&&i.fnCreatedCell.call(t.oInstance,o,S(t,e,l),f,e,l);R(t,"aoRowCreatedCallback",null,[r,f,e,d])}}function vt(t,e){var n=e.nTr,a=e._aData;n&&((t=t.rowIdFn(a))&&(n.id=t),a.DT_RowClass&&(t=a.DT_RowClass.split(" "),e.__rowc=e.__rowc?z(e.__rowc.concat(t)):t,P(n).removeClass(e.__rowc.join(" ")).addClass(a.DT_RowClass)),a.DT_RowAttr&&P(n).attr(a.DT_RowAttr),a.DT_RowData)&&P(n).data(a.DT_RowData)}function yt(t){var e,n,a,r=t.nTHead,o=t.nTFoot,i=0===P("th, td",r).length,l=t.oClasses,s=t.aoColumns;for(i&&(n=P("<tr/>").appendTo(r)),c=0,f=s.length;c<f;c++)a=s[c],e=P(a.nTh).addClass(a.sClass),i&&e.appendTo(n),t.oFeatures.bSort&&(e.addClass(a.sSortingClass),!1!==a.bSortable)&&(e.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),ue(t,a.nTh,c)),a.sTitle!=e[0].innerHTML&&e.html(a.sTitle),ve(t,"header")(t,e,a,l);if(i&&wt(t.aoHeader,r),P(r).children("tr").children("th, td").addClass(l.sHeaderTH),P(o).children("tr").children("th, td").addClass(l.sFooterTH),null!==o)for(var u=t.aoFooter[0],c=0,f=u.length;c<f;c++)(a=s[c])?(a.nTf=u[c].cell,a.sClass&&P(a.nTf).addClass(a.sClass)):W(t,0,"Incorrect column count",18)}function Dt(t,e,n){var a,r,o,i,l,s,u,c,f,d=[],h=[],p=t.aoColumns.length;if(e){for(n===H&&(n=!1),a=0,r=e.length;a<r;a++){for(d[a]=e[a].slice(),d[a].nTr=e[a].nTr,o=p-1;0<=o;o--)t.aoColumns[o].bVisible||n||d[a].splice(o,1);h.push([])}for(a=0,r=d.length;a<r;a++){if(u=d[a].nTr)for(;s=u.firstChild;)u.removeChild(s);for(o=0,i=d[a].length;o<i;o++)if(f=c=1,h[a][o]===H){for(u.appendChild(d[a][o].cell),h[a][o]=1;d[a+c]!==H&&d[a][o].cell==d[a+c][o].cell;)h[a+c][o]=1,c++;for(;d[a][o+f]!==H&&d[a][o].cell==d[a][o+f].cell;){for(l=0;l<c;l++)h[a+l][o+f]=1;f++}P(d[a][o].cell).attr("rowspan",c).attr("colspan",f)}}}}function v(t,e){n="ssp"==E(s=t),(l=s.iInitDisplayStart)!==H&&-1!==l&&(s._iDisplayStart=!n&&l>=s.fnRecordsDisplay()?0:l,s.iInitDisplayStart=-1);var n=R(t,"aoPreDrawCallback","preDraw",[t]);if(-1!==P.inArray(!1,n))D(t,!1);else{var a=[],r=0,o=t.asStripeClasses,i=o.length,l=t.oLanguage,s="ssp"==E(t),u=t.aiDisplay,n=t._iDisplayStart,c=t.fnDisplayEnd();if(t.bDrawing=!0,t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,D(t,!1);else if(s){if(!t.bDestroying&&!e)return void xt(t)}else t.iDraw++;if(0!==u.length)for(var f=s?t.aoData.length:c,d=s?0:n;d<f;d++){var h,p=u[d],g=t.aoData[p],b=(null===g.nTr&&St(t,p),g.nTr);0!==i&&(h=o[r%i],g._sRowStripe!=h)&&(P(b).removeClass(g._sRowStripe).addClass(h),g._sRowStripe=h),R(t,"aoRowCallback",null,[b,g._aData,r,d,p]),a.push(b),r++}else{e=l.sZeroRecords;1==t.iDraw&&"ajax"==E(t)?e=l.sLoadingRecords:l.sEmptyTable&&0===t.fnRecordsTotal()&&(e=l.sEmptyTable),a[0]=P("<tr/>",{class:i?o[0]:""}).append(P("<td />",{valign:"top",colSpan:T(t),class:t.oClasses.sRowEmpty}).html(e))[0]}R(t,"aoHeaderCallback","header",[P(t.nTHead).children("tr")[0],ht(t),n,c,u]),R(t,"aoFooterCallback","footer",[P(t.nTFoot).children("tr")[0],ht(t),n,c,u]);s=P(t.nTBody);s.children().detach(),s.append(P(a)),R(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}}function u(t,e){var n=t.oFeatures,a=n.bSort,n=n.bFilter;a&&ie(t),n?Rt(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,v(t),t._drawHold=!1}function _t(t){for(var e,n,a,r,o,i,l,s=t.oClasses,u=P(t.nTable),u=P("<div/>").insertBefore(u),c=t.oFeatures,f=P("<div/>",{id:t.sTableId+"_wrapper",class:s.sWrapper+(t.nTFoot?"":" "+s.sNoFooter)}),d=(t.nHolding=u[0],t.nTableWrapper=f[0],t.nTableReinsertBefore=t.nTable.nextSibling,t.sDom.split("")),h=0;h<d.length;h++){if(e=null,"<"==(n=d[h])){if(a=P("<div/>")[0],"'"==(r=d[h+1])||'"'==r){for(o="",i=2;d[h+i]!=r;)o+=d[h+i],i++;"H"==o?o=s.sJUIHeader:"F"==o&&(o=s.sJUIFooter),-1!=o.indexOf(".")?(l=o.split("."),a.id=l[0].substr(1,l[0].length-1),a.className=l[1]):"#"==o.charAt(0)?a.id=o.substr(1,o.length-1):a.className=o,h+=i}f.append(a),f=P(a)}else if(">"==n)f=f.parent();else if("l"==n&&c.bPaginate&&c.bLengthChange)e=Gt(t);else if("f"==n&&c.bFilter)e=Lt(t);else if("r"==n&&c.bProcessing)e=Zt(t);else if("t"==n)e=Kt(t);else if("i"==n&&c.bInfo)e=Ut(t);else if("p"==n&&c.bPaginate)e=zt(t);else if(0!==w.ext.feature.length)for(var p=w.ext.feature,g=0,b=p.length;g<b;g++)if(n==p[g].cFeature){e=p[g].fnInit(t);break}e&&((l=t.aanFeatures)[n]||(l[n]=[]),l[n].push(e),f.append(e))}u.replaceWith(f),t.nHolding=null}function wt(t,e){var n,a,r,o,i,l,s,u,c,f,d=P(e).children("tr");for(t.splice(0,t.length),r=0,l=d.length;r<l;r++)t.push([]);for(r=0,l=d.length;r<l;r++)for(a=(n=d[r]).firstChild;a;){if("TD"==a.nodeName.toUpperCase()||"TH"==a.nodeName.toUpperCase())for(u=(u=+a.getAttribute("colspan"))&&0!=u&&1!=u?u:1,c=(c=+a.getAttribute("rowspan"))&&0!=c&&1!=c?c:1,s=function(t,e,n){for(var a=t[e];a[n];)n++;return n}(t,r,0),f=1==u,i=0;i<u;i++)for(o=0;o<c;o++)t[r+o][s+i]={cell:a,unique:f},t[r+o].nTr=n;a=a.nextSibling}}function Ct(t,e,n){var a=[];n||(n=t.aoHeader,e&&wt(n=[],e));for(var r=0,o=n.length;r<o;r++)for(var i=0,l=n[r].length;i<l;i++)!n[r][i].unique||a[i]&&t.bSortCellsTop||(a[i]=n[r][i].cell);return a}function Tt(r,t,n){function e(t){var e=r.jqXHR?r.jqXHR.status:null;(null===t||"number"==typeof e&&204==e)&&Ft(r,t={},[]),(e=t.error||t.sError)&&W(r,0,e),r.json=t,R(r,null,"xhr",[r,t,r.jqXHR]),n(t)}R(r,"aoServerParams","serverParams",[t]),t&&Array.isArray(t)&&(a={},o=/(.*?)\[\]$/,P.each(t,function(t,e){var n=e.name.match(o);n?(n=n[0],a[n]||(a[n]=[]),a[n].push(e.value)):a[e.name]=e.value}),t=a);var a,o,i,l=r.ajax,s=r.oInstance,u=(P.isPlainObject(l)&&l.data&&(u="function"==typeof(i=l.data)?i(t,r):i,t="function"==typeof i&&u?u:P.extend(!0,t,u),delete l.data),{data:t,success:e,dataType:"json",cache:!1,type:r.sServerMethod,error:function(t,e,n){var a=R(r,null,"xhr",[r,null,r.jqXHR]);-1===P.inArray(!0,a)&&("parsererror"==e?W(r,0,"Invalid JSON response",1):4===t.readyState&&W(r,0,"Ajax error",7)),D(r,!1)}});r.oAjaxData=t,R(r,null,"preXhr",[r,t]),r.fnServerData?r.fnServerData.call(s,r.sAjaxSource,P.map(t,function(t,e){return{name:e,value:t}}),e,r):r.sAjaxSource||"string"==typeof l?r.jqXHR=P.ajax(P.extend(u,{url:l||r.sAjaxSource})):"function"==typeof l?r.jqXHR=l.call(s,t,e,r):(r.jqXHR=P.ajax(P.extend(u,l)),l.data=i)}function xt(e){e.iDraw++,D(e,!0);var n=e._drawHold;Tt(e,At(e),function(t){e._drawHold=n,It(e,t),e._drawHold=!1})}function At(t){for(var e,n,a,r=t.aoColumns,o=r.length,i=t.oFeatures,l=t.oPreviousSearch,s=t.aoPreSearchCols,u=[],c=I(t),f=t._iDisplayStart,d=!1!==i.bPaginate?t._iDisplayLength:-1,h=function(t,e){u.push({name:t,value:e})},p=(h("sEcho",t.iDraw),h("iColumns",o),h("sColumns",N(r,"sName").join(",")),h("iDisplayStart",f),h("iDisplayLength",d),{draw:t.iDraw,columns:[],order:[],start:f,length:d,search:{value:l.sSearch,regex:l.bRegex}}),g=0;g<o;g++)n=r[g],a=s[g],e="function"==typeof n.mData?"function":n.mData,p.columns.push({data:e,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:a.sSearch,regex:a.bRegex}}),h("mDataProp_"+g,e),i.bFilter&&(h("sSearch_"+g,a.sSearch),h("bRegex_"+g,a.bRegex),h("bSearchable_"+g,n.bSearchable)),i.bSort&&h("bSortable_"+g,n.bSortable);i.bFilter&&(h("sSearch",l.sSearch),h("bRegex",l.bRegex)),i.bSort&&(P.each(c,function(t,e){p.order.push({column:e.col,dir:e.dir}),h("iSortCol_"+t,e.col),h("sSortDir_"+t,e.dir)}),h("iSortingCols",c.length));f=w.ext.legacy.ajax;return null===f?t.sAjaxSource?u:p:f?u:p}function It(t,n){function e(t,e){return n[t]!==H?n[t]:n[e]}var a=Ft(t,n),r=e("sEcho","draw"),o=e("iTotalRecords","recordsTotal"),i=e("iTotalDisplayRecords","recordsFiltered");if(r!==H){if(+r<t.iDraw)return;t.iDraw=+r}a=a||[],pt(t),t._iRecordsTotal=parseInt(o,10),t._iRecordsDisplay=parseInt(i,10);for(var l=0,s=a.length;l<s;l++)x(t,a[l]);t.aiDisplay=t.aiDisplayMaster.slice(),v(t,!0),t._bInitComplete||qt(t,n),D(t,!1)}function Ft(t,e,n){t=P.isPlainObject(t.ajax)&&t.ajax.dataSrc!==H?t.ajax.dataSrc:t.sAjaxDataProp;if(!n)return"data"===t?e.aaData||e[t]:""!==t?A(t)(e):e;b(t)(e,n)}function Lt(n){function e(t){i.f;var e=this.value||"";o.return&&"Enter"!==t.key||e!=o.sSearch&&(Rt(n,{sSearch:e,bRegex:o.bRegex,bSmart:o.bSmart,bCaseInsensitive:o.bCaseInsensitive,return:o.return}),n._iDisplayStart=0,v(n))}var t=n.oClasses,a=n.sTableId,r=n.oLanguage,o=n.oPreviousSearch,i=n.aanFeatures,l='<input type="search" class="'+t.sFilterInput+'"/>',s=(s=r.sSearch).match(/_INPUT_/)?s.replace("_INPUT_",l):s+l,l=P("<div/>",{id:i.f?null:a+"_filter",class:t.sFilter}).append(P("<label/>").append(s)),t=null!==n.searchDelay?n.searchDelay:"ssp"===E(n)?400:0,u=P("input",l).val(o.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",t?ne(e,t):e).on("mouseup.DT",function(t){setTimeout(function(){e.call(u[0],t)},10)}).on("keypress.DT",function(t){if(13==t.keyCode)return!1}).attr("aria-controls",a);return P(n.nTable).on("search.dt.DT",function(t,e){if(n===e)try{u[0]!==y.activeElement&&u.val(o.sSearch)}catch(t){}}),l[0]}function Rt(t,e,n){function a(t){o.sSearch=t.sSearch,o.bRegex=t.bRegex,o.bSmart=t.bSmart,o.bCaseInsensitive=t.bCaseInsensitive,o.return=t.return}function r(t){return t.bEscapeRegex!==H?!t.bEscapeRegex:t.bRegex}var o=t.oPreviousSearch,i=t.aoPreSearchCols;if(lt(t),"ssp"!=E(t)){Ht(t,e.sSearch,n,r(e),e.bSmart,e.bCaseInsensitive),a(e);for(var l=0;l<i.length;l++)jt(t,i[l].sSearch,l,r(i[l]),i[l].bSmart,i[l].bCaseInsensitive);Pt(t)}else a(e);t.bFiltered=!0,R(t,null,"search",[t])}function Pt(t){for(var e,n,a=w.ext.search,r=t.aiDisplay,o=0,i=a.length;o<i;o++){for(var l=[],s=0,u=r.length;s<u;s++)n=r[s],e=t.aoData[n],a[o](t,e._aFilterData,n,e._aData,s)&&l.push(n);r.length=0,P.merge(r,l)}}function jt(t,e,n,a,r,o){if(""!==e){for(var i,l=[],s=t.aiDisplay,u=Nt(e,a,r,o),c=0;c<s.length;c++)i=t.aoData[s[c]]._aFilterData[n],u.test(i)&&l.push(s[c]);t.aiDisplay=l}}function Ht(t,e,n,a,r,o){var i,l,s,u=Nt(e,a,r,o),r=t.oPreviousSearch.sSearch,o=t.aiDisplayMaster,c=[];if(0!==w.ext.search.length&&(n=!0),l=Wt(t),e.length<=0)t.aiDisplay=o.slice();else{for((l||n||a||r.length>e.length||0!==e.indexOf(r)||t.bSorted)&&(t.aiDisplay=o.slice()),i=t.aiDisplay,s=0;s<i.length;s++)u.test(t.aoData[i[s]]._sFilterRow)&&c.push(i[s]);t.aiDisplay=c}}function Nt(t,e,n,a){return t=e?t:Ot(t),n&&(t="^(?=.*?"+P.map(t.match(/["\u201C][^"\u201D]+["\u201D]|[^ ]+/g)||[""],function(t){var e;return'"'===t.charAt(0)?t=(e=t.match(/^"(.*)"$/))?e[1]:t:"“"===t.charAt(0)&&(t=(e=t.match(/^\u201C(.*)\u201D$/))?e[1]:t),t.replace('"',"")}).join(")(?=.*?")+").*$"),new RegExp(t,a?"i":"")}var Ot=w.util.escapeRegex,kt=P("<div>")[0],Mt=kt.textContent!==H;function Wt(t){for(var e,n,a,r,o,i=t.aoColumns,l=!1,s=0,u=t.aoData.length;s<u;s++)if(!(o=t.aoData[s])._aFilterData){for(a=[],e=0,n=i.length;e<n;e++)i[e].bSearchable?"string"!=typeof(r=null===(r=S(t,s,e,"filter"))?"":r)&&r.toString&&(r=r.toString()):r="",r.indexOf&&-1!==r.indexOf("&")&&(kt.innerHTML=r,r=Mt?kt.textContent:kt.innerText),r.replace&&(r=r.replace(/[\r\n\u2028]/g,"")),a.push(r);o._aFilterData=a,o._sFilterRow=a.join(" "),l=!0}return l}function Et(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function Bt(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function Ut(t){var e=t.sTableId,n=t.aanFeatures.i,a=P("<div/>",{class:t.oClasses.sInfo,id:n?null:e+"_info"});return n||(t.aoDrawCallback.push({fn:Vt,sName:"information"}),a.attr("role","status").attr("aria-live","polite"),P(t.nTable).attr("aria-describedby",e+"_info")),a[0]}function Vt(t){var e,n,a,r,o,i,l=t.aanFeatures.i;0!==l.length&&(i=t.oLanguage,e=t._iDisplayStart+1,n=t.fnDisplayEnd(),a=t.fnRecordsTotal(),o=(r=t.fnRecordsDisplay())?i.sInfo:i.sInfoEmpty,r!==a&&(o+=" "+i.sInfoFiltered),o=Xt(t,o+=i.sInfoPostFix),null!==(i=i.fnInfoCallback)&&(o=i.call(t.oInstance,t,e,n,a,r,o)),P(l).html(o))}function Xt(t,e){var n=t.fnFormatNumber,a=t._iDisplayStart+1,r=t._iDisplayLength,o=t.fnRecordsDisplay(),i=-1===r;return e.replace(/_START_/g,n.call(t,a)).replace(/_END_/g,n.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,n.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(t,o)).replace(/_PAGE_/g,n.call(t,i?1:Math.ceil(a/r))).replace(/_PAGES_/g,n.call(t,i?1:Math.ceil(o/r)))}function Jt(n){var a,t,e,r=n.iInitDisplayStart,o=n.aoColumns,i=n.oFeatures,l=n.bDeferLoading;if(n.bInitialised){for(_t(n),yt(n),Dt(n,n.aoHeader),Dt(n,n.aoFooter),D(n,!0),i.bAutoWidth&&ee(n),a=0,t=o.length;a<t;a++)(e=o[a]).sWidth&&(e.nTh.style.width=M(e.sWidth));R(n,null,"preInit",[n]),u(n);i=E(n);"ssp"==i&&!l||("ajax"==i?Tt(n,[],function(t){var e=Ft(n,t);for(a=0;a<e.length;a++)x(n,e[a]);n.iInitDisplayStart=r,u(n),D(n,!1),qt(n,t)}):(D(n,!1),qt(n)))}else setTimeout(function(){Jt(n)},200)}function qt(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&O(t),R(t,null,"plugin-init",[t,e]),R(t,"aoInitComplete","init",[t,e])}function $t(t,e){e=parseInt(e,10);t._iDisplayLength=e,Se(t),R(t,null,"length",[t,e])}function Gt(a){for(var t=a.oClasses,e=a.sTableId,n=a.aLengthMenu,r=Array.isArray(n[0]),o=r?n[0]:n,i=r?n[1]:n,l=P("<select/>",{name:e+"_length","aria-controls":e,class:t.sLengthSelect}),s=0,u=o.length;s<u;s++)l[0][s]=new Option("number"==typeof i[s]?a.fnFormatNumber(i[s]):i[s],o[s]);var c=P("<div><label/></div>").addClass(t.sLength);return a.aanFeatures.l||(c[0].id=e+"_length"),c.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),P("select",c).val(a._iDisplayLength).on("change.DT",function(t){$t(a,P(this).val()),v(a)}),P(a.nTable).on("length.dt.DT",function(t,e,n){a===e&&P("select",c).val(n)}),c[0]}function zt(t){function c(t){v(t)}var e=t.sPaginationType,f=w.ext.pager[e],d="function"==typeof f,e=P("<div/>").addClass(t.oClasses.sPaging+e)[0],h=t.aanFeatures;return d||f.fnInit(t,e,c),h.p||(e.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(t){if(d)for(var e=t._iDisplayStart,n=t._iDisplayLength,a=t.fnRecordsDisplay(),r=-1===n,o=r?0:Math.ceil(e/n),i=r?1:Math.ceil(a/n),l=f(o,i),s=0,u=h.p.length;s<u;s++)ve(t,"pageButton")(t,h.p[s],s,l,o,i);else f.fnUpdate(t,c)},sName:"pagination"})),e}function Yt(t,e,n){var a=t._iDisplayStart,r=t._iDisplayLength,o=t.fnRecordsDisplay(),o=(0===o||-1===r?a=0:"number"==typeof e?o<(a=e*r)&&(a=0):"first"==e?a=0:"previous"==e?(a=0<=r?a-r:0)<0&&(a=0):"next"==e?a+r<o&&(a+=r):"last"==e?a=Math.floor((o-1)/r)*r:W(t,0,"Unknown paging action: "+e,5),t._iDisplayStart!==a);return t._iDisplayStart=a,o?(R(t,null,"page",[t]),n&&v(t)):R(t,null,"page-nc",[t]),o}function Zt(t){return P("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing,role:"status"}).html(t.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>").insertBefore(t.nTable)[0]}function D(t,e){t.oFeatures.bProcessing&&P(t.aanFeatures.r).css("display",e?"block":"none"),R(t,null,"processing",[t,e])}function Kt(t){var e,n,a,r,o,i,l,s,u,c,f,d,h=P(t.nTable),p=t.oScroll;return""===p.sX&&""===p.sY?t.nTable:(e=p.sX,n=p.sY,a=t.oClasses,o=(r=h.children("caption")).length?r[0]._captionSide:null,s=P(h[0].cloneNode(!1)),i=P(h[0].cloneNode(!1)),u=function(t){return t?M(t):null},(l=h.children("tfoot")).length||(l=null),s=P(f="<div/>",{class:a.sScrollWrapper}).append(P(f,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:e?u(e):"100%"}).append(P(f,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:p.sXInner||"100%"}).append(s.removeAttr("id").css("margin-left",0).append("top"===o?r:null).append(h.children("thead"))))).append(P(f,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:u(e)}).append(h)),l&&s.append(P(f,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:e?u(e):"100%"}).append(P(f,{class:a.sScrollFootInner}).append(i.removeAttr("id").css("margin-left",0).append("bottom"===o?r:null).append(h.children("tfoot"))))),u=s.children(),c=u[0],f=u[1],d=l?u[2]:null,e&&P(f).on("scroll.DT",function(t){var e=this.scrollLeft;c.scrollLeft=e,l&&(d.scrollLeft=e)}),P(f).css("max-height",n),p.bCollapse||P(f).css("height",n),t.nScrollHead=c,t.nScrollBody=f,t.nScrollFoot=d,t.aoDrawCallback.push({fn:Qt,sName:"scrolling"}),s[0])}function Qt(n){function t(t){(t=t.style).paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0}var e,a,r,o,i,l=n.oScroll,s=l.sX,u=l.sXInner,c=l.sY,l=l.iBarWidth,f=P(n.nScrollHead),d=f[0].style,h=f.children("div"),p=h[0].style,h=h.children("table"),g=n.nScrollBody,b=P(g),m=g.style,S=P(n.nScrollFoot).children("div"),v=S.children("table"),y=P(n.nTHead),D=P(n.nTable),_=D[0],w=_.style,C=n.nTFoot?P(n.nTFoot):null,T=n.oBrowser,x=T.bScrollOversize,A=(N(n.aoColumns,"nTh"),[]),I=[],F=[],L=[],R=g.scrollHeight>g.clientHeight;n.scrollBarVis!==R&&n.scrollBarVis!==H?(n.scrollBarVis=R,O(n)):(n.scrollBarVis=R,D.children("thead, tfoot").remove(),C&&(R=C.clone().prependTo(D),i=C.find("tr"),a=R.find("tr"),R.find("[id]").removeAttr("id")),R=y.clone().prependTo(D),y=y.find("tr"),e=R.find("tr"),R.find("th, td").removeAttr("tabindex"),R.find("[id]").removeAttr("id"),s||(m.width="100%",f[0].style.width="100%"),P.each(Ct(n,R),function(t,e){r=rt(n,t),e.style.width=n.aoColumns[r].sWidth}),C&&k(function(t){t.style.width=""},a),f=D.outerWidth(),""===s?(w.width="100%",x&&(D.find("tbody").height()>g.offsetHeight||"scroll"==b.css("overflow-y"))&&(w.width=M(D.outerWidth()-l)),f=D.outerWidth()):""!==u&&(w.width=M(u),f=D.outerWidth()),k(t,e),k(function(t){var e=j.getComputedStyle?j.getComputedStyle(t).width:M(P(t).width());F.push(t.innerHTML),A.push(e)},e),k(function(t,e){t.style.width=A[e]},y),P(e).css("height",0),C&&(k(t,a),k(function(t){L.push(t.innerHTML),I.push(M(P(t).css("width")))},a),k(function(t,e){t.style.width=I[e]},i),P(a).height(0)),k(function(t,e){t.innerHTML='<div class="dataTables_sizing">'+F[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=A[e]},e),C&&k(function(t,e){t.innerHTML='<div class="dataTables_sizing">'+L[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=I[e]},a),Math.round(D.outerWidth())<Math.round(f)?(o=g.scrollHeight>g.offsetHeight||"scroll"==b.css("overflow-y")?f+l:f,x&&(g.scrollHeight>g.offsetHeight||"scroll"==b.css("overflow-y"))&&(w.width=M(o-l)),""!==s&&""===u||W(n,1,"Possible column misalignment",6)):o="100%",m.width=M(o),d.width=M(o),C&&(n.nScrollFoot.style.width=M(o)),c||x&&(m.height=M(_.offsetHeight+l)),R=D.outerWidth(),h[0].style.width=M(R),p.width=M(R),y=D.height()>g.clientHeight||"scroll"==b.css("overflow-y"),p[i="padding"+(T.bScrollbarLeft?"Left":"Right")]=y?l+"px":"0px",C&&(v[0].style.width=M(R),S[0].style.width=M(R),S[0].style[i]=y?l+"px":"0px"),D.children("colgroup").insertBefore(D.children("thead")),b.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(g.scrollTop=0))}function k(t,e,n){for(var a,r,o=0,i=0,l=e.length;i<l;){for(a=e[i].firstChild,r=n?n[i].firstChild:null;a;)1===a.nodeType&&(n?t(a,r,o):t(a,o),o++),a=a.nextSibling,r=n?r.nextSibling:null;i++}}var te=/<.*?>/g;function ee(t){var e,n,a=t.nTable,r=t.aoColumns,o=t.oScroll,i=o.sY,l=o.sX,o=o.sXInner,s=r.length,u=it(t,"bVisible"),c=P("th",t.nTHead),f=a.getAttribute("width"),d=a.parentNode,h=!1,p=t.oBrowser,g=p.bScrollOversize,b=a.style.width;for(b&&-1!==b.indexOf("%")&&(f=b),D=0;D<u.length;D++)null!==(e=r[u[D]]).sWidth&&(e.sWidth=ae(e.sWidthOrig,d),h=!0);if(g||!h&&!l&&!i&&s==T(t)&&s==c.length)for(D=0;D<s;D++){var m=rt(t,D);null!==m&&(r[m].sWidth=M(c.eq(D).width()))}else{var b=P(a).clone().css("visibility","hidden").removeAttr("id"),S=(b.find("tbody tr").remove(),P("<tr/>").appendTo(b.find("tbody")));for(b.find("thead, tfoot").remove(),b.append(P(t.nTHead).clone()).append(P(t.nTFoot).clone()),b.find("tfoot th, tfoot td").css("width",""),c=Ct(t,b.find("thead")[0]),D=0;D<u.length;D++)e=r[u[D]],c[D].style.width=null!==e.sWidthOrig&&""!==e.sWidthOrig?M(e.sWidthOrig):"",e.sWidthOrig&&l&&P(c[D]).append(P("<div/>").css({width:e.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(t.aoData.length)for(D=0;D<u.length;D++)e=r[n=u[D]],P(re(t,n)).clone(!1).append(e.sContentPadding).appendTo(S);P("[name]",b).removeAttr("name");for(var v=P("<div/>").css(l||i?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(b).appendTo(d),y=(l&&o?b.width(o):l?(b.css("width","auto"),b.removeAttr("width"),b.width()<d.clientWidth&&f&&b.width(d.clientWidth)):i?b.width(d.clientWidth):f&&b.width(f),0),D=0;D<u.length;D++){var _=P(c[D]),w=_.outerWidth()-_.width(),_=p.bBounding?Math.ceil(c[D].getBoundingClientRect().width):_.outerWidth();y+=_,r[u[D]].sWidth=M(_-w)}a.style.width=M(y),v.remove()}f&&(a.style.width=M(f)),!f&&!l||t._reszEvt||(o=function(){P(j).on("resize.DT-"+t.sInstance,ne(function(){O(t)}))},g?setTimeout(o,1e3):o(),t._reszEvt=!0)}var ne=w.util.throttle;function ae(t,e){return t?(e=(t=P("<div/>").css("width",M(t)).appendTo(e||y.body))[0].offsetWidth,t.remove(),e):0}function re(t,e){var n,a=oe(t,e);return a<0?null:(n=t.aoData[a]).nTr?n.anCells[e]:P("<td/>").html(S(t,a,e,"display"))[0]}function oe(t,e){for(var n,a=-1,r=-1,o=0,i=t.aoData.length;o<i;o++)(n=(n=(n=S(t,o,e,"display")+"").replace(te,"")).replace(/&nbsp;/g," ")).length>a&&(a=n.length,r=o);return r}function M(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function I(t){function e(t){t.length&&!Array.isArray(t[0])?h.push(t):P.merge(h,t)}var n,a,r,o,i,l,s,u=[],c=t.aoColumns,f=t.aaSortingFixed,d=P.isPlainObject(f),h=[];for(Array.isArray(f)&&e(f),d&&f.pre&&e(f.pre),e(t.aaSorting),d&&f.post&&e(f.post),n=0;n<h.length;n++)for(r=(o=c[s=h[n][a=0]].aDataSort).length;a<r;a++)l=c[i=o[a]].sType||"string",h[n]._idx===H&&(h[n]._idx=P.inArray(h[n][1],c[i].asSorting)),u.push({src:s,col:i,dir:h[n][1],index:h[n]._idx,type:l,formatter:w.ext.type.order[l+"-pre"]});return u}function ie(t){var e,n,a,r,c,f=[],u=w.ext.type.order,d=t.aoData,o=(t.aoColumns,0),i=t.aiDisplayMaster;for(lt(t),e=0,n=(c=I(t)).length;e<n;e++)(r=c[e]).formatter&&o++,fe(t,r.col);if("ssp"!=E(t)&&0!==c.length){for(e=0,a=i.length;e<a;e++)f[i[e]]=e;o===c.length?i.sort(function(t,e){for(var n,a,r,o,i=c.length,l=d[t]._aSortData,s=d[e]._aSortData,u=0;u<i;u++)if(0!=(r=(n=l[(o=c[u]).col])<(a=s[o.col])?-1:a<n?1:0))return"asc"===o.dir?r:-r;return(n=f[t])<(a=f[e])?-1:a<n?1:0}):i.sort(function(t,e){for(var n,a,r,o=c.length,i=d[t]._aSortData,l=d[e]._aSortData,s=0;s<o;s++)if(n=i[(r=c[s]).col],a=l[r.col],0!==(r=(u[r.type+"-"+r.dir]||u["string-"+r.dir])(n,a)))return r;return(n=f[t])<(a=f[e])?-1:a<n?1:0})}t.bSorted=!0}function le(t){for(var e=t.aoColumns,n=I(t),a=t.oLanguage.oAria,r=0,o=e.length;r<o;r++){var i=e[r],l=i.asSorting,s=i.ariaTitle||i.sTitle.replace(/<.*?>/g,""),u=i.nTh;u.removeAttribute("aria-sort"),i=i.bSortable?s+("asc"===(0<n.length&&n[0].col==r&&(u.setAttribute("aria-sort","asc"==n[0].dir?"ascending":"descending"),l[n[0].index+1])||l[0])?a.sSortAscending:a.sSortDescending):s,u.setAttribute("aria-label",i)}}function se(t,e,n,a){function r(t,e){var n=t._idx;return(n=n===H?P.inArray(t[1],s):n)+1<s.length?n+1:e?null:0}var o,i=t.aoColumns[e],l=t.aaSorting,s=i.asSorting;"number"==typeof l[0]&&(l=t.aaSorting=[l]),n&&t.oFeatures.bSortMulti?-1!==(i=P.inArray(e,N(l,"0")))?null===(o=null===(o=r(l[i],!0))&&1===l.length?0:o)?l.splice(i,1):(l[i][1]=s[o],l[i]._idx=o):(l.push([e,s[0],0]),l[l.length-1]._idx=0):l.length&&l[0][0]==e?(o=r(l[0]),l.length=1,l[0][1]=s[o],l[0]._idx=o):(l.length=0,l.push([e,s[0]]),l[0]._idx=0),u(t),"function"==typeof a&&a(t)}function ue(e,t,n,a){var r=e.aoColumns[n];me(t,{},function(t){!1!==r.bSortable&&(e.oFeatures.bProcessing?(D(e,!0),setTimeout(function(){se(e,n,t.shiftKey,a),"ssp"!==E(e)&&D(e,!1)},0)):se(e,n,t.shiftKey,a))})}function ce(t){var e,n,a,r=t.aLastSort,o=t.oClasses.sSortColumn,i=I(t),l=t.oFeatures;if(l.bSort&&l.bSortClasses){for(e=0,n=r.length;e<n;e++)a=r[e].src,P(N(t.aoData,"anCells",a)).removeClass(o+(e<2?e+1:3));for(e=0,n=i.length;e<n;e++)a=i[e].src,P(N(t.aoData,"anCells",a)).addClass(o+(e<2?e+1:3))}t.aLastSort=i}function fe(t,e){for(var n,a,r,o=t.aoColumns[e],i=w.ext.order[o.sSortDataType],l=(i&&(n=i.call(t.oInstance,t,e,ot(t,e))),w.ext.type.order[o.sType+"-pre"]),s=0,u=t.aoData.length;s<u;s++)(a=t.aoData[s])._aSortData||(a._aSortData=[]),a._aSortData[e]&&!i||(r=i?n[s]:S(t,s,e,"sort"),a._aSortData[e]=l?l(r):r)}function de(n){var t;n._bLoadingState||(t={time:+new Date,start:n._iDisplayStart,length:n._iDisplayLength,order:P.extend(!0,[],n.aaSorting),search:Et(n.oPreviousSearch),columns:P.map(n.aoColumns,function(t,e){return{visible:t.bVisible,search:Et(n.aoPreSearchCols[e])}})},n.oSavedState=t,R(n,"aoStateSaveParams","stateSaveParams",[n,t]),n.oFeatures.bStateSave&&!n.bDestroying&&n.fnStateSaveCallback.call(n.oInstance,n,t))}function he(e,t,n){var a;if(e.oFeatures.bStateSave)return(a=e.fnStateLoadCallback.call(e.oInstance,e,function(t){pe(e,t,n)}))!==H&&pe(e,a,n),!0;n()}function pe(n,t,e){var a,r,o=n.aoColumns,i=(n._bLoadingState=!0,n._bInitComplete?new w.Api(n):null);if(t&&t.time){var l=R(n,"aoStateLoadParams","stateLoadParams",[n,t]);if(-1!==P.inArray(!1,l))n._bLoadingState=!1;else{l=n.iStateDuration;if(0<l&&t.time<+new Date-1e3*l)n._bLoadingState=!1;else if(t.columns&&o.length!==t.columns.length)n._bLoadingState=!1;else{if(n.oLoadedState=P.extend(!0,{},t),t.length!==H&&(i?i.page.len(t.length):n._iDisplayLength=t.length),t.start!==H&&(null===i?(n._iDisplayStart=t.start,n.iInitDisplayStart=t.start):Yt(n,t.start/n._iDisplayLength)),t.order!==H&&(n.aaSorting=[],P.each(t.order,function(t,e){n.aaSorting.push(e[0]>=o.length?[0,e[1]]:e)})),t.search!==H&&P.extend(n.oPreviousSearch,Bt(t.search)),t.columns){for(a=0,r=t.columns.length;a<r;a++){var s=t.columns[a];s.visible!==H&&(i?i.column(a).visible(s.visible,!1):o[a].bVisible=s.visible),s.search!==H&&P.extend(n.aoPreSearchCols[a],Bt(s.search))}i&&i.columns.adjust()}n._bLoadingState=!1,R(n,"aoStateLoaded","stateLoaded",[n,t])}}}else n._bLoadingState=!1;e()}function ge(t){var e=w.settings,t=P.inArray(t,N(e,"nTable"));return-1!==t?e[t]:null}function W(t,e,n,a){if(n="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+n,a&&(n+=". For more information about this error, please see http://datatables.net/tn/"+a),e)j.console&&console.log&&console.log(n);else{e=w.ext,e=e.sErrMode||e.errMode;if(t&&R(t,null,"error",[t,a,n]),"alert"==e)alert(n);else{if("throw"==e)throw new Error(n);"function"==typeof e&&e(t,a,n)}}}function F(n,a,t,e){Array.isArray(t)?P.each(t,function(t,e){Array.isArray(e)?F(n,a,e[0],e[1]):F(n,a,e)}):(e===H&&(e=t),a[t]!==H&&(n[e]=a[t]))}function be(t,e,n){var a,r;for(r in e)e.hasOwnProperty(r)&&(a=e[r],P.isPlainObject(a)?(P.isPlainObject(t[r])||(t[r]={}),P.extend(!0,t[r],a)):n&&"data"!==r&&"aaData"!==r&&Array.isArray(a)?t[r]=a.slice():t[r]=a);return t}function me(e,t,n){P(e).on("click.DT",t,function(t){P(e).trigger("blur"),n(t)}).on("keypress.DT",t,function(t){13===t.which&&(t.preventDefault(),n(t))}).on("selectstart.DT",function(){return!1})}function L(t,e,n,a){n&&t[e].push({fn:n,sName:a})}function R(n,t,e,a){var r=[];return t&&(r=P.map(n[t].slice().reverse(),function(t,e){return t.fn.apply(n.oInstance,a)})),null!==e&&(t=P.Event(e+".dt"),(e=P(n.nTable)).trigger(t,a),0===e.parents("body").length&&P("body").trigger(t,a),r.push(t.result)),r}function Se(t){var e=t._iDisplayStart,n=t.fnDisplayEnd(),a=t._iDisplayLength;n<=e&&(e=n-a),e-=e%a,t._iDisplayStart=e=-1===a||e<0?0:e}function ve(t,e){var t=t.renderer,n=w.ext.renderer[e];return P.isPlainObject(t)&&t[e]?n[t[e]]||n._:"string"==typeof t&&n[t]||n._}function E(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function ye(t,n){var a;return Array.isArray(t)?P.map(t,function(t){return ye(t,n)}):"number"==typeof t?[n[t]]:(a=P.map(n,function(t,e){return t.nTable}),P(a).filter(t).map(function(t){var e=P.inArray(this,a);return n[e]}).toArray())}function De(r,o,t){var e,n;t&&(e=new B(r)).one("draw",function(){t(e.ajax.json())}),"ssp"==E(r)?u(r,o):(D(r,!0),(n=r.jqXHR)&&4!==n.readyState&&n.abort(),Tt(r,[],function(t){pt(r);for(var e=Ft(r,t),n=0,a=e.length;n<a;n++)x(r,e[n]);u(r,o),D(r,!1)}))}function _e(t,e,n,a,r){for(var o,i,l,s,u=[],c=typeof e,f=0,d=(e=e&&"string"!=c&&"function"!=c&&e.length!==H?e:[e]).length;f<d;f++)for(l=0,s=(i=e[f]&&e[f].split&&!e[f].match(/[\[\(:]/)?e[f].split(","):[e[f]]).length;l<s;l++)(o=n("string"==typeof i[l]?i[l].trim():i[l]))&&o.length&&(u=u.concat(o));var h=p.selector[t];if(h.length)for(f=0,d=h.length;f<d;f++)u=h[f](a,r,u);return z(u)}function we(t){return(t=t||{}).filter&&t.search===H&&(t.search=t.filter),P.extend({search:"none",order:"current",page:"all"},t)}function Ce(t){for(var e=0,n=t.length;e<n;e++)if(0<t[e].length)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t}function Te(o,t,e,n){function i(t,e){var n;if(Array.isArray(t)||t instanceof P)for(var a=0,r=t.length;a<r;a++)i(t[a],e);else t.nodeName&&"tr"===t.nodeName.toLowerCase()?l.push(t):(n=P("<tr><td></td></tr>").addClass(e),P("td",n).addClass(e).html(t)[0].colSpan=T(o),l.push(n[0]))}var l=[];i(e,n),t._details&&t._details.detach(),t._details=P(l),t._detailsShow&&t._details.insertAfter(t.nTr)}function xe(t,e){var n=t.context;if(n.length&&t.length){var a=n[0].aoData[t[0]];if(a._details){(a._detailsShow=e)?(a._details.insertAfter(a.nTr),P(a.nTr).addClass("dt-hasChild")):(a._details.detach(),P(a.nTr).removeClass("dt-hasChild")),R(n[0],null,"childRow",[e,t.row(t[0])]);var s=n[0],r=new B(s),a=".dt.DT_details",e="draw"+a,t="column-sizing"+a,a="destroy"+a,u=s.aoData;if(r.off(e+" "+t+" "+a),N(u,"_details").length>0){r.on(e,function(t,e){if(s!==e)return;r.rows({page:"current"}).eq(0).each(function(t){var e=u[t];if(e._detailsShow)e._details.insertAfter(e.nTr)})});r.on(t,function(t,e,n,a){if(s!==e)return;var r,o=T(e);for(var i=0,l=u.length;i<l;i++){r=u[i];if(r._details)r._details.children("td[colspan]").attr("colspan",o)}});r.on(a,function(t,e){if(s!==e)return;for(var n=0,a=u.length;n<a;n++)if(u[n]._details)Re(r,n)})}Le(n)}}}function Ae(t,e,n,a,r){for(var o=[],i=0,l=r.length;i<l;i++)o.push(S(t,r[i],e));return o}var Ie=[],o=Array.prototype,B=function(t,e){if(!(this instanceof B))return new B(t,e);function n(t){var e,n,a,r;t=t,a=w.settings,r=P.map(a,function(t,e){return t.nTable}),(t=t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(e=P.inArray(t,r))?[a[e]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?n=P(t):t instanceof P&&(n=t),n?n.map(function(t){return-1!==(e=P.inArray(this,r))?a[e]:null}).toArray():void 0):[])&&o.push.apply(o,t)}var o=[];if(Array.isArray(t))for(var a=0,r=t.length;a<r;a++)n(t[a]);else n(t);this.context=z(o),e&&P.merge(this,e),this.selector={rows:null,cols:null,opts:null},B.extend(this,this,Ie)},Fe=(w.Api=B,P.extend(B.prototype,{any:function(){return 0!==this.count()},concat:o.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,n=this.length;e<n;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new B(e[t],this[t]):null},filter:function(t){var e=[];if(o.filter)e=o.filter.call(this,t,this);else for(var n=0,a=this.length;n<a;n++)t.call(this,this[n],n,this)&&e.push(this[n]);return new B(this.context,e)},flatten:function(){var t=[];return new B(this.context,t.concat.apply(t,this.toArray()))},join:o.join,indexOf:o.indexOf||function(t,e){for(var n=e||0,a=this.length;n<a;n++)if(this[n]===t)return n;return-1},iterator:function(t,e,n,a){var r,o,i,l,s,u,c,f,d=[],h=this.context,p=this.selector;for("string"==typeof t&&(a=n,n=e,e=t,t=!1),o=0,i=h.length;o<i;o++){var g=new B(h[o]);if("table"===e)(r=n.call(g,h[o],o))!==H&&d.push(r);else if("columns"===e||"rows"===e)(r=n.call(g,h[o],this[o],o))!==H&&d.push(r);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(c=this[o],"column-rows"===e&&(u=Fe(h[o],p.opts)),l=0,s=c.length;l<s;l++)f=c[l],(r="cell"===e?n.call(g,h[o],f.row,f.column,o,l):n.call(g,h[o],f,o,l,u))!==H&&d.push(r)}return d.length||a?((t=(a=new B(h,t?d.concat.apply([],d):d)).selector).rows=p.rows,t.cols=p.cols,t.opts=p.opts,a):this},lastIndexOf:o.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(o.map)e=o.map.call(this,t,this);else for(var n=0,a=this.length;n<a;n++)e.push(t.call(this,this[n],n));return new B(this.context,e)},pluck:function(t){var e=w.util.get(t);return this.map(function(t){return e(t)})},pop:o.pop,push:o.push,reduce:o.reduce||function(t,e){return et(this,t,e,0,this.length,1)},reduceRight:o.reduceRight||function(t,e){return et(this,t,e,this.length-1,-1,-1)},reverse:o.reverse,selector:null,shift:o.shift,slice:function(){return new B(this.context,this)},sort:o.sort,splice:o.splice,toArray:function(){return o.slice.call(this)},to$:function(){return P(this)},toJQuery:function(){return P(this)},unique:function(){return new B(this.context,z(this))},unshift:o.unshift}),B.extend=function(t,e,n){if(n.length&&e&&(e instanceof B||e.__dt_wrapper))for(var a,r=0,o=n.length;r<o;r++)e[(a=n[r]).name]="function"===a.type?function(e,n,a){return function(){var t=n.apply(e,arguments);return B.extend(t,t,a.methodExt),t}}(t,a.val,a):"object"===a.type?{}:a.val,e[a.name].__dt_wrapper=!0,B.extend(t,e[a.name],a.propExt)},B.register=e=function(t,e){if(Array.isArray(t))for(var n=0,a=t.length;n<a;n++)B.register(t[n],e);else for(var r=t.split("."),o=Ie,i=0,l=r.length;i<l;i++){var s,u,c=function(t,e){for(var n=0,a=t.length;n<a;n++)if(t[n].name===e)return t[n];return null}(o,u=(s=-1!==r[i].indexOf("()"))?r[i].replace("()",""):r[i]);c||o.push(c={name:u,val:{},methodExt:[],propExt:[],type:"object"}),i===l-1?(c.val=e,c.type="function"==typeof e?"function":P.isPlainObject(e)?"object":"other"):o=s?c.methodExt:c.propExt}},B.registerPlural=t=function(t,e,n){B.register(t,n),B.register(e,function(){var t=n.apply(this,arguments);return t===this?this:t instanceof B?t.length?Array.isArray(t[0])?new B(t.context,t[0]):t[0]:H:t})},e("tables()",function(t){return t!==H&&null!==t?new B(ye(t,this.context)):this}),e("table()",function(t){var t=this.tables(t),e=t.context;return e.length?new B(e[0]):t}),t("tables().nodes()","table().node()",function(){return this.iterator("table",function(t){return t.nTable},1)}),t("tables().body()","table().body()",function(){return this.iterator("table",function(t){return t.nTBody},1)}),t("tables().header()","table().header()",function(){return this.iterator("table",function(t){return t.nTHead},1)}),t("tables().footer()","table().footer()",function(){return this.iterator("table",function(t){return t.nTFoot},1)}),t("tables().containers()","table().container()",function(){return this.iterator("table",function(t){return t.nTableWrapper},1)}),e("draw()",function(e){return this.iterator("table",function(t){"page"===e?v(t):u(t,!1===(e="string"==typeof e?"full-hold"!==e:e))})}),e("page()",function(e){return e===H?this.page.info().page:this.iterator("table",function(t){Yt(t,e)})}),e("page.info()",function(t){var e,n,a,r,o;return 0===this.context.length?H:(n=(e=this.context[0])._iDisplayStart,a=e.oFeatures.bPaginate?e._iDisplayLength:-1,r=e.fnRecordsDisplay(),{page:(o=-1===a)?0:Math.floor(n/a),pages:o?1:Math.ceil(r/a),start:n,end:e.fnDisplayEnd(),length:a,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r,serverSide:"ssp"===E(e)})}),e("page.len()",function(e){return e===H?0!==this.context.length?this.context[0]._iDisplayLength:H:this.iterator("table",function(t){$t(t,e)})}),e("ajax.json()",function(){var t=this.context;if(0<t.length)return t[0].json}),e("ajax.params()",function(){var t=this.context;if(0<t.length)return t[0].oAjaxData}),e("ajax.reload()",function(e,n){return this.iterator("table",function(t){De(t,!1===n,e)})}),e("ajax.url()",function(e){var t=this.context;return e===H?0===t.length?H:(t=t[0]).ajax?P.isPlainObject(t.ajax)?t.ajax.url:t.ajax:t.sAjaxSource:this.iterator("table",function(t){P.isPlainObject(t.ajax)?t.ajax.url=e:t.ajax=e})}),e("ajax.url().load()",function(e,n){return this.iterator("table",function(t){De(t,!1===n,e)})}),function(t,e){var n,a=[],r=t.aiDisplay,o=t.aiDisplayMaster,i=e.search,l=e.order,e=e.page;if("ssp"==E(t))return"removed"===i?[]:f(0,o.length);if("current"==e)for(u=t._iDisplayStart,c=t.fnDisplayEnd();u<c;u++)a.push(r[u]);else if("current"==l||"applied"==l){if("none"==i)a=o.slice();else if("applied"==i)a=r.slice();else if("removed"==i){for(var s={},u=0,c=r.length;u<c;u++)s[r[u]]=null;a=P.map(o,function(t){return s.hasOwnProperty(t)?null:t})}}else if("index"==l||"original"==l)for(u=0,c=t.aoData.length;u<c;u++)("none"==i||-1===(n=P.inArray(u,r))&&"removed"==i||0<=n&&"applied"==i)&&a.push(u);return a}),Le=(e("rows()",function(e,n){e===H?e="":P.isPlainObject(e)&&(n=e,e=""),n=we(n);var t=this.iterator("table",function(t){return _e("row",e,function(n){var t=d(n),a=r.aoData;if(null!==t&&!o)return[t];if(i=i||Fe(r,o),null!==t&&-1!==P.inArray(t,i))return[t];if(null===n||n===H||""===n)return i;if("function"==typeof n)return P.map(i,function(t){var e=a[t];return n(t,e._aData,e.nTr)?t:null});if(n.nodeName)return t=n._DT_RowIndex,e=n._DT_CellIndex,t!==H?a[t]&&a[t].nTr===n?[t]:[]:e?a[e.row]&&a[e.row].nTr===n.parentNode?[e.row]:[]:(t=P(n).closest("*[data-dt-row]")).length?[t.data("dt-row")]:[];if("string"==typeof n&&"#"===n.charAt(0)){var e=r.aIds[n.replace(/^#/,"")];if(e!==H)return[e.idx]}t=_(m(r.aoData,i,"nTr"));return P(t).filter(n).map(function(){return this._DT_RowIndex}).toArray()},r=t,o=n);var r,o,i},1);return t.selector.rows=e,t.selector.opts=n,t}),e("rows().nodes()",function(){return this.iterator("row",function(t,e){return t.aoData[e].nTr||H},1)}),e("rows().data()",function(){return this.iterator(!0,"rows",function(t,e){return m(t.aoData,e,"_aData")},1)}),t("rows().cache()","row().cache()",function(n){return this.iterator("row",function(t,e){t=t.aoData[e];return"search"===n?t._aFilterData:t._aSortData},1)}),t("rows().invalidate()","row().invalidate()",function(n){return this.iterator("row",function(t,e){bt(t,e,n)})}),t("rows().indexes()","row().index()",function(){return this.iterator("row",function(t,e){return e},1)}),t("rows().ids()","row().id()",function(t){for(var e=[],n=this.context,a=0,r=n.length;a<r;a++)for(var o=0,i=this[a].length;o<i;o++){var l=n[a].rowIdFn(n[a].aoData[this[a][o]]._aData);e.push((!0===t?"#":"")+l)}return new B(n,e)}),t("rows().remove()","row().remove()",function(){var f=this;return this.iterator("row",function(t,e,n){var a,r,o,i,l,s,u=t.aoData,c=u[e];for(u.splice(e,1),a=0,r=u.length;a<r;a++)if(s=(l=u[a]).anCells,null!==l.nTr&&(l.nTr._DT_RowIndex=a),null!==s)for(o=0,i=s.length;o<i;o++)s[o]._DT_CellIndex.row=a;gt(t.aiDisplayMaster,e),gt(t.aiDisplay,e),gt(f[n],e,!1),0<t._iRecordsDisplay&&t._iRecordsDisplay--,Se(t);n=t.rowIdFn(c._aData);n!==H&&delete t.aIds[n]}),this.iterator("table",function(t){for(var e=0,n=t.aoData.length;e<n;e++)t.aoData[e].idx=e}),this}),e("rows.add()",function(o){var t=this.iterator("table",function(t){for(var e,n=[],a=0,r=o.length;a<r;a++)(e=o[a]).nodeName&&"TR"===e.nodeName.toUpperCase()?n.push(ut(t,e)[0]):n.push(x(t,e));return n},1),e=this.rows(-1);return e.pop(),P.merge(e,t),e}),e("row()",function(t,e){return Ce(this.rows(t,e))}),e("row().data()",function(t (…)
/plugin/ckgdoku/ckeditor/
H A Dckeditor.js195 …or(A in z)"!"==A.charAt(0)&&(A=A.slice(1),G.push(A),n[A]=!0,x=!1);for(;A=G.pop();)z[A]=z["!"+A],de…
214 …nterMode:CKEDITOR.ENTER_P)];for(var n;c=g.pop();)c.type==CKEDITOR.NODE_ELEMENT?r(c,d,a):c.remove()…
220 …{var e=a.slice(),g;if(this.check(H[c]))return c;for(d||(e=e.reverse());g=e.pop();)if(this.check(g)…
227 g)for(c=a.classes.join("|"),h=e[g].split(/\s+/);m=h.pop();)-1==c.indexOf(m)&&a.classes.push(m);else…
251 …n;CKEDITOR.tools.isArray(r)&&(r=r.join(","));if(r&&(n=r.match(f)))for(;r=n.pop();)CKEDITOR.error("…
338 …n b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}…
362 … a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("tex…
376 …")),ea=X.length),ja=1):(X.push(ia),ja=0);M&&ea==X.length&&X.pop();aa=X}}if(aa){for(;M=aa.pop();)R.…
378 …d());if(Z)for(;T=Z.pop();)CKEDITOR.env.needsBrFiller?T.appendBogus():T.append(U.document.createTex…
855 this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function f(a,c,e){var l=c.pop();if(l){if(e)return f(a,…
[all …]
/plugin/amcharts/assets/amcharts/plugins/responsive/
H A Dresponsive.min.js.map7 …","restoreOriginalProperty","originalValue","restoreOriginals","override","pop","redrawChart","dat…
/plugin/passpolicy/
H A Dwords.txt2715 pop

1...<<11121314151617181920>>...23