{
"version": 3,
"sources": ["angular:script/global:scripts.js"],
"sourcesContent": ["/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */\n!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return t(e)}:t(e)}(\"undefined\"!=typeof window?window:this,function(ie,e){\"use strict\";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return\"function\"==typeof e&&\"number\"!=typeof e.nodeType&&\"function\"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement(\"script\");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?n[i.call(e)]||\"object\":typeof e}var t=\"3.7.1\",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&\"length\"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&(\"array\"===n||0===t||\"number\"==typeof t&&0+~]|\"+ge+\")\"+ge+\"*\"),x=new RegExp(ge+\"|>\"),j=new RegExp(g),A=new RegExp(\"^\"+t+\"$\"),D={ID:new RegExp(\"^#(\"+t+\")\"),CLASS:new RegExp(\"^\\\\.(\"+t+\")\"),TAG:new RegExp(\"^(\"+t+\"|[*])\"),ATTR:new RegExp(\"^\"+p),PSEUDO:new RegExp(\"^\"+g),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+ge+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+ge+\"*(?:([+-]|)\"+ge+\"*(\\\\d+)|))\"+ge+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+f+\")$\",\"i\"),needsContext:new RegExp(\"^\"+ge+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+ge+\"*((?:-\\\\d)?\\\\d*)\"+ge+\"*\\\\)|)(?=[^-]|$)\",\"i\")},N=/^(?:input|select|textarea|button)$/i,q=/^h\\d$/i,L=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,H=/[+~]/,O=new RegExp(\"\\\\\\\\[\\\\da-fA-F]{1,6}\"+ge+\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\",\"g\"),P=function(e,t){var n=\"0x\"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,\"fieldset\")},{dir:\"parentNode\",next:\"legend\"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],\"string\"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+\" \"]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute(\"id\"))?s=ce.escapeSelector(s):e.setAttribute(\"id\",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?\"#\"+s:\":scope\")+\" \"+Q(l[o]);c=l.join(\",\")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute(\"id\")}}}return re(t.replace(ve,\"$1\"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+\" \")>b.cacheLength&&delete e[r.shift()],e[t+\" \"]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement(\"fieldset\");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,\"input\")&&e.type===t}}function _(t){return function(e){return(fe(e,\"input\")||fe(e,\"button\"))&&e.type===t}}function z(t){return function(e){return\"form\"in e?e.parentNode&&!1===e.disabled?\"label\"in e?\"label\"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:\"label\"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener(\"unload\",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,\"*\")}),le.scope=$(function(){return T.querySelectorAll(\":scope\")}),le.cssHas=$(function(){try{return T.querySelector(\":has(*,:jqfake)\"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute(\"id\")===t}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return t&&t.value===n}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML=\"\",e.querySelectorAll(\"[selected]\").length||d.push(\"\\\\[\"+ge+\"*(?:value|\"+f+\")\"),e.querySelectorAll(\"[id~=\"+S+\"-]\").length||d.push(\"~=\"),e.querySelectorAll(\"a#\"+S+\"+*\").length||d.push(\".#.+[+~]\"),e.querySelectorAll(\":checked\").length||d.push(\":checked\"),(t=T.createElement(\"input\")).setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&d.push(\":enabled\",\":disabled\"),(t=T.createElement(\"input\")).setAttribute(\"name\",\"\"),e.appendChild(t),e.querySelectorAll(\"[name='']\").length||d.push(\"\\\\[\"+ge+\"*name\"+ge+\"*=\"+ge+\"*(?:''|\\\"\\\")\")}),le.cssHas||d.push(\":has\"),d=d.length&&new RegExp(d.join(\"|\")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+\" \"]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||\"\").replace(O,P),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+\" \"];return t||(t=new RegExp(\"(^|\"+ge+\")\"+e+\"(\"+ge+\"|$)\"))&&s(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?\"!=\"===r:!r||(t+=\"\",\"=\"===r?t===i:\"!=\"===r?t!==i:\"^=\"===r?i&&0===t.indexOf(i):\"*=\"===r?i&&-1:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):\"string\"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,\"string\"==typeof e){if(!(r=\"<\"===e[0]&&\">\"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\\x20\\t\\r\\n\\f]*)/i,Ce=/^$|^module$|\\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement(\"div\")),(be=C.createElement(\"input\")).setAttribute(\"type\",\"radio\"),be.setAttribute(\"checked\",\"checked\"),be.setAttribute(\"name\",\"t\"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML=\"\",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML=\"\",le.option=!!xe.lastChild;var ke={thead:[1,\"\"],col:[2,\"\"],tr:[2,\"\"],td:[3,\"\"],_default:[0,\"\",\"\"]};function Se(e,t){var n;return n=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n\",\"\"]);var je=/<|?\\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\\s*$/g;function Re(e,t){return fe(e,\"table\")&&fe(11!==t.nodeType?t:t.firstChild,\"tr\")&&ce(e).children(\"tbody\")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function We(e){return\"true/\"===(e.type||\"\").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute(\"type\"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,\"handle events\"),s)for(n=0,r=s[i].length;n\").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on(\"load error\",i=function(e){r.remove(),i=null,e&&t(\"error\"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\\?(?=&|$)|\\?\\?/;ce.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=Kt.pop()||ce.expando+\"_\"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter(\"json jsonp\",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?\"url\":\"string\"==typeof e.data&&0===(e.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Zt.test(e.data)&&\"data\");if(a||\"jsonp\"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,\"$1\"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?\"&\":\"?\")+e.jsonp+\"=\"+r),e.converters[\"script json\"]=function(){return o||ce.error(r+\" was not called\"),o[0]},e.dataTypes[0]=\"json\",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),\"script\"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument(\"\").body).innerHTML=\"\",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return\"string\"!=typeof e?[]:(\"boolean\"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument(\"\")).createElement(\"base\")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(\" \");return-1\").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,\"position\"),c=ce(e),f={};\"static\"===l&&(e.style.position=\"relative\"),s=c.offset(),o=ce.css(e,\"top\"),u=ce.css(e,\"left\"),(\"absolute\"===l||\"fixed\"===l)&&-1<(o+u).indexOf(\"auto\")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),\"using\"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(\"fixed\"===ce.css(r,\"position\"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&\"static\"===ce.css(e,\"position\"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,\"borderTopWidth\",!0),i.left+=ce.css(e,\"borderLeftWidth\",!0))}return{top:t.top-i.top-ce.css(r,\"marginTop\",!0),left:t.left-i.left-ce.css(r,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&\"static\"===ce.css(e,\"position\"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(t,i){var o=\"pageYOffset\"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each([\"top\",\"left\"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+\"px\":t})}),ce.each({Height:\"height\",Width:\"width\"},function(a,s){ce.each({padding:\"inner\"+a,content:s,\"\":\"outer\"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||\"boolean\"!=typeof e),i=r||(!0===e||!0===t?\"margin\":\"border\");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf(\"outer\")?e[\"inner\"+a]:e.document.documentElement[\"client\"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body[\"scroll\"+a],r[\"scroll\"+a],e.body[\"offset\"+a],r[\"offset\"+a],r[\"client\"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)},hover:function(e,t){return this.on(\"mouseenter\",e).on(\"mouseleave\",t||e)}}),ce.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),function(e,n){ce.fn[n]=function(e,t){return 0(()=>{\"use strict\";var e={7e3:(t,e,o)=>{var n=o(8938),i=o.n(n);i().summernote=i().summernote||{lang:{}},i().extend(!0,i().summernote.lang,{\"en-US\":{font:{bold:\"Bold\",italic:\"Italic\",underline:\"Underline\",clear:\"Remove Font Style\",height:\"Line Height\",name:\"Font Family\",strikethrough:\"Strikethrough\",subscript:\"Subscript\",superscript:\"Superscript\",size:\"Font Size\",sizeunit:\"Font Size Unit\"},image:{image:\"Picture\",insert:\"Insert Image\",resizeFull:\"Resize full\",resizeHalf:\"Resize half\",resizeQuarter:\"Resize quarter\",resizeNone:\"Original size\",floatLeft:\"Float Left\",floatRight:\"Float Right\",floatNone:\"Remove float\",shapeRounded:\"Shape: Rounded\",shapeCircle:\"Shape: Circle\",shapeThumbnail:\"Shape: Thumbnail\",shapeNone:\"Shape: None\",dragImageHere:\"Drag image or text here\",dropImage:\"Drop image or Text\",selectFromFiles:\"Select from files\",maximumFileSize:\"Maximum file size\",maximumFileSizeError:\"Maximum file size exceeded.\",url:\"Image URL\",remove:\"Remove Image\",original:\"Original\"},video:{video:\"Video\",videoLink:\"Video Link\",insert:\"Insert Video\",url:\"Video URL\",providers:\"(YouTube, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)\"},link:{link:\"Link\",insert:\"Insert Link\",unlink:\"Unlink\",edit:\"Edit\",textToDisplay:\"Text to display\",url:\"To what URL should this link go?\",openInNewWindow:\"Open in new window\"},table:{table:\"Table\",addRowAbove:\"Add row above\",addRowBelow:\"Add row below\",addColLeft:\"Add column left\",addColRight:\"Add column right\",delRow:\"Delete row\",delCol:\"Delete column\",delTable:\"Delete table\"},hr:{insert:\"Insert Horizontal Rule\"},style:{style:\"Style\",p:\"Normal\",blockquote:\"Quote\",pre:\"Code\",h1:\"Header 1\",h2:\"Header 2\",h3:\"Header 3\",h4:\"Header 4\",h5:\"Header 5\",h6:\"Header 6\"},lists:{unordered:\"Unordered list\",ordered:\"Ordered list\"},options:{help:\"Help\",fullscreen:\"Full Screen\",codeview:\"Code View\"},paragraph:{paragraph:\"Paragraph\",outdent:\"Outdent\",indent:\"Indent\",left:\"Align left\",center:\"Align center\",right:\"Align right\",justify:\"Justify full\"},color:{recent:\"Recent Color\",more:\"More Color\",background:\"Background Color\",foreground:\"Text Color\",transparent:\"Transparent\",setTransparent:\"Set transparent\",reset:\"Reset\",resetToDefault:\"Reset to default\",cpSelect:\"Select\"},shortcut:{shortcuts:\"Keyboard shortcuts\",close:\"Close\",textFormatting:\"Text formatting\",action:\"Action\",paragraphFormatting:\"Paragraph formatting\",documentStyle:\"Document Style\",extraKeys:\"Extra keys\"},help:{escape:\"Escape\",insertParagraph:\"Insert Paragraph\",undo:\"Undo the last command\",redo:\"Redo the last command\",tab:\"Tab\",untab:\"Untab\",bold:\"Set a bold style\",italic:\"Set a italic style\",underline:\"Set a underline style\",strikethrough:\"Set a strikethrough style\",removeFormat:\"Clean a style\",justifyLeft:\"Set left align\",justifyCenter:\"Set center align\",justifyRight:\"Set right align\",justifyFull:\"Set full align\",insertUnorderedList:\"Toggle unordered list\",insertOrderedList:\"Toggle ordered list\",outdent:\"Outdent on current paragraph\",indent:\"Indent on current paragraph\",formatPara:\"Change current block's format as a paragraph(P tag)\",formatH1:\"Change current block's format as H1\",formatH2:\"Change current block's format as H2\",formatH3:\"Change current block's format as H3\",formatH4:\"Change current block's format as H4\",formatH5:\"Change current block's format as H5\",formatH6:\"Change current block's format as H6\",insertHorizontalRule:\"Insert horizontal rule\",\"linkDialog.show\":\"Show Link Dialog\"},history:{undo:\"Undo\",redo:\"Redo\"},specialChar:{specialChar:\"SPECIAL CHARACTERS\",select:\"Select Special characters\"},output:{noSelection:\"No Selection Made!\"}}})},8938:e=>{e.exports=t}},o={};function n(t){var i=o[t];if(void 0!==i)return i.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i=n(8938),r=n.n(i),a=(n(7e3),[\"sans-serif\",\"serif\",\"monospace\",\"cursive\",\"fantasy\"]);function s(t){return-1===r().inArray(t.toLowerCase(),a)?\"'\".concat(t,\"'\"):t}var l,c=navigator.userAgent,u=/MSIE|Trident/i.test(c);if(u){var d=/MSIE (\\d+[.]\\d+)/.exec(c);d&&(l=parseFloat(d[1])),(d=/Trident\\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(c))&&(l=parseFloat(d[1]))}var f=/Edge\\/\\d+/.test(c),h=\"ontouchstart\"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,p=u?\"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted\":\"input\";const m={isMac:navigator.appVersion.indexOf(\"Mac\")>-1,isMSIE:u,isEdge:f,isFF:!f&&/firefox/i.test(c),isPhantom:/PhantomJS/i.test(c),isWebkit:!f&&/webkit/i.test(c),isChrome:!f&&/chrome/i.test(c),isSafari:!f&&/safari/i.test(c)&&!/chrome/i.test(c),browserVersion:l,isSupportTouch:h,isFontInstalled:function(){var t=document.createElement(\"canvas\"),e=t.getContext(\"2d\",{willReadFrequently:!0});function o(t,o){return e.clearRect(0,0,40,20),e.font=\"20px \"+s(t)+', \"'+o+'\"',e.fillText(\"mw\",20,10),e.getImageData(0,0,40,20).data.join(\"\")}return t.width=40,t.height=20,e.textAlign=\"center\",e.fillStyle=\"black\",e.textBaseline=\"middle\",function(t){var e=\"Comic Sans MS\"===t?\"Courier New\":\"Comic Sans MS\";return o(e,e)!==o(t,e)}}(),isW3CRangeSupport:!!document.createRange,inputEventName:p,genericFontFamilies:a,validFontName:s};var v=0;const g={eq:function(t){return function(e){return t===e}},eq2:function(t,e){return t===e},peq2:function(t){return function(e,o){return e[t]===o[t]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(t,e){return function(o){return t(o)&&e(o)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},resetUniqueId:function(){v=0},uniqueId:function(t){var e=++v+\"\";return t?t+e:e},rect2bnd:function(t){var e=r()(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[t[o]]=o);return e},namespaceToCamel:function(t,e){return(e=e||\"\")+t.split(\".\").map((function(t){return t.substring(0,1).toUpperCase()+t.substring(1)})).join(\"\")},debounce:function(t,e,o){var n;return function(){var i=this,r=arguments,a=o&&!n;clearTimeout(n),n=setTimeout((function(){n=null,o||t.apply(i,r)}),e),a&&t.apply(i,r)}},isValidUrl:function(t){return/[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/gi.test(t)}};function b(t){return t[0]}function y(t){return t[t.length-1]}function k(t){return t.slice(1)}function w(t,e){if(t&&t.length&&e){if(t.indexOf)return-1!==t.indexOf(e);if(t.contains)return t.contains(e)}return!1}const C={head:b,last:y,initial:function(t){return t.slice(0,t.length-1)},tail:k,prev:function(t,e){if(t&&t.length&&e){var o=t.indexOf(e);return-1===o?null:t[o-1]}return null},next:function(t,e){if(t&&t.length&&e){var o=t.indexOf(e);return-1===o?null:t[o+1]}return null},find:function(t,e){for(var o=0,n=t.length;o\";function U(t){return E(t)?t.nodeValue.length:t?t.childNodes.length:0}function W(t){var e=U(t);return 0===e||(!E(t)&&1===e&&t.innerHTML===M||!(!C.all(t.childNodes,E)||\"\"!==t.innerHTML))}function K(t){P(t)||U(t)||(t.innerHTML=M)}function q(t,e){for(;t;){if(e(t))return t;if(x(t))break;t=t.parentNode}return null}function V(t,e){e=e||g.fail;var o=[];return q(t,(function(t){return x(t)||o.push(t),e(t)})),o}function _(t,e){e=e||g.fail;for(var o=[];t&&!e(t);)o.push(t),t=t.nextSibling;return o}function G(t,e){var o=e.nextSibling,n=e.parentNode;return o?n.insertBefore(t,o):n.appendChild(t),t}function Z(t,e,o){return r().each(e,(function(e,n){!o&&I(t)&&null===t.firstChild&&F(n)&&t.appendChild(ut(\"br\")),t.appendChild(n)})),t}function Y(t){return 0===t.offset}function X(t){return t.offset===U(t.node)}function Q(t){return Y(t)||X(t)}function J(t,e){for(;t&&t!==e;){if(0!==et(t))return!1;t=t.parentNode}return!0}function tt(t,e){if(!e)return!1;for(;t&&t!==e;){if(et(t)!==U(t.parentNode)-1)return!1;t=t.parentNode}return!0}function et(t){for(var e=0;t=t.previousSibling;)e+=1;return e}function ot(t){return!!(t&&t.childNodes&&t.childNodes.length)}function nt(t,e){var o,n;if(0===t.offset){if(x(t.node))return null;o=t.node.parentNode,n=et(t.node)}else ot(t.node)?n=U(o=t.node.childNodes[t.offset-1]):(o=t.node,n=e?0:t.offset-1);return{node:o,offset:n}}function it(t,e){var o,n;if(U(t.node)===t.offset){if(x(t.node))return null;var i=at(t.node);i?(o=i,n=0):(o=t.node.parentNode,n=et(t.node)+1)}else ot(t.node)?(o=t.node.childNodes[t.offset],n=0):(o=t.node,n=e?U(t.node):t.offset+1);return{node:o,offset:n}}function rt(t,e){var o,n=0;if(U(t.node)===t.offset){if(x(t.node))return null;o=t.node.parentNode,n=et(t.node)+1,x(o)&&(o=t.node.nextSibling,n=0)}else ot(t.node)?(o=t.node.childNodes[t.offset],n=0):(o=t.node,n=e?U(t.node):t.offset+1);return{node:o,offset:n}}function at(t){if(t.nextSibling&&t.parent===t.nextSibling.parent)return E(t.nextSibling)?t.nextSibling:at(t.nextSibling)}function st(t,e){return t.node===e.node&&t.offset===e.offset}function lt(t,e){var o=e&&e.isSkipPaddingBlankHTML,n=e&&e.isNotSplitEdgePoint,i=e&&e.isDiscardEmptySplits;if(i&&(o=!0),Q(t)&&(E(t.node)||n)){if(Y(t))return t.node;if(X(t))return t.node.nextSibling}if(E(t.node))return t.node.splitText(t.offset);var r=_(t.node.childNodes[t.offset]),a=G(t.node.cloneNode(!1),t.node);return Z(a,r),o||(K(t.node),K(a)),i&&(W(t.node)&&dt(t.node),W(a))?(dt(a),t.node.nextSibling):a}function ct(t,e,o){var n=V(e.node,g.eq(t));if(!n.length)return null;if(1===n.length)return lt(e,o);if(n.length>2){var i=n.slice(0,n.length-1).find((function(t){return t.nextSibling}));if(i&&0!=e.offset&&X(e)){var r,a=i.nextSibling;1==a.nodeType?(n=V(r=a.childNodes[0],g.eq(t)),e={node:r,offset:0}):3!=a.nodeType||a.data.match(/[\\n\\r]/g)||(n=V(r=a,g.eq(t)),e={node:r,offset:0})}}return n.reduce((function(t,n){return t===e.node&&(t=lt(e,o)),lt({node:n,offset:t?et(t):U(n)},o)}))}function ut(t){return document.createElement(t)}function dt(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var o=t.parentNode;if(!e){for(var n=[],i=0,r=t.childNodes.length;i\".concat(M,\"
\"),makePredByNodeName:T,isEditable:x,isControlSizing:function(t){return t&&r()(t).hasClass(\"note-control-sizing\")},isText:E,isElement:function(t){return t&&1===t.nodeType},isVoid:P,isPara:N,isPurePara:function(t){return N(t)&&!I(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:L,isBlock:g.not(L),isBodyInline:function(t){return L(t)&&!q(t,N)},isBody:z,isParaInline:function(t){return L(t)&&!!q(t,N)},isPre:$,isList:F,isTable:R,isData:A,isCell:H,isBlockquote:j,isBodyContainer:B,isAnchor:O,isDiv:T(\"DIV\"),isLi:I,isBR:T(\"BR\"),isSpan:T(\"SPAN\"),isB:T(\"B\"),isU:T(\"U\"),isS:T(\"S\"),isI:T(\"I\"),isImg:T(\"IMG\"),isTextarea:ft,deepestChildIsEmpty:function(t){do{if(null===t.firstElementChild||\"\"===t.firstElementChild.innerHTML)break}while(t=t.firstElementChild);return W(t)},isEmpty:W,isEmptyAnchor:g.and(O,W),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||g.ok;var o=[];return t.previousSibling&&e(t.previousSibling)&&o.push(t.previousSibling),o.push(t),t.nextSibling&&e(t.nextSibling)&&o.push(t.nextSibling),o},nodeLength:U,isLeftEdgePoint:Y,isRightEdgePoint:X,isEdgePoint:Q,isLeftEdgeOf:J,isRightEdgeOf:tt,isLeftEdgePointOf:function(t,e){return Y(t)&&J(t.node,e)},isRightEdgePointOf:function(t,e){return X(t)&&tt(t.node,e)},prevPoint:nt,nextPoint:it,nextPointWithEmptyNode:rt,isSamePoint:st,isVisiblePoint:function(t){if(E(t.node)||!ot(t.node)||W(t.node))return!0;var e=t.node.childNodes[t.offset-1],o=t.node.childNodes[t.offset];return!((e&&!P(e)||o&&!P(o))&&!R(o))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=nt(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=it(t)}return null},isCharPoint:function(t){if(!E(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&\" \"!==e&&e!==S},isSpacePoint:function(t){if(!E(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return\" \"===e||e===S},walkPoint:function(t,e,o,n){for(var i=t;i&&i.node&&(o(i),!st(i,e));){i=rt(i,n&&t.node!==i.node&&e.node!==i.node)}},ancestor:q,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===U(t);){if(e(t))return t;if(x(t))break;t=t.parentNode}return null},listAncestor:V,lastAncestor:function(t,e){var o=V(t);return C.last(o.filter(e))},listNext:_,listPrev:function(t,e){e=e||g.fail;for(var o=[];t&&!e(t);)o.push(t),t=t.previousSibling;return o},listDescendant:function(t,e){var o=[];return e=e||g.ok,function n(i){t!==i&&e(i)&&o.push(i);for(var r=0,a=i.childNodes.length;r-1)return n;return null},wrap:function(t,e){var o=t.parentNode,n=r()(\"<\"+e+\">\")[0];return o.insertBefore(n,t),n.appendChild(t),n},insertAfter:G,appendChildNodes:Z,position:et,hasChildren:ot,makeOffsetPath:function(t,e){return V(e,g.eq(t)).map(et).reverse()},fromOffsetPath:function(t,e){for(var o=t,n=0,i=e.length;n\\s]*)(.*?)(\\s*\\/?>)/g,(function(t,e,o){o=o.toUpperCase();var n=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(o)&&!!e,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(o);return t+(n||i?\"\\n\":\"\")}))).trim()}return o},value:ht,posFromPlaceholder:function(t){var e=r()(t),o=e.offset(),n=e.outerHeight(!0);return{left:o.left,top:o.top+n}},attachEvents:function(t,e){Object.keys(e).forEach((function(o){t.on(o,e[o])}))},detachEvents:function(t,e){Object.keys(e).forEach((function(o){t.off(o,e[o])}))},isCustomStyleTag:function(t){return t&&!E(t)&&C.contains(t.classList,\"note-styletag\")}};function mt(t){return mt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},mt(t)}function vt(t,e){for(var o=0;o1,i=n&&C.head(o),r=n?C.last(o):C.head(o),a=this.modules[i||\"editor\"];return!i&&this[r]?this[r].apply(this,e):a&&a[r]&&a.shouldInitialize()?a[r].apply(a,e):void 0}}],e&&vt(t.prototype,e),o&&vt(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function yt(t){return yt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},yt(t)}function kt(t){return kt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},kt(t)}function wt(t,e){for(var o=0;o=0)break;n=a[o]}if(0!==o&&pt.isText(a[o-1])){var s=document.body.createTextRange(),l=null;s.moveToElementText(n||i),s.collapse(!n),l=n?n.nextSibling:i.firstChild;var c=t.duplicate();c.setEndPoint(\"StartToStart\",s);for(var u=c.text.replace(/[\\r\\n]/g,\"\").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&pt.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,o=u}return{cont:i,offset:o}}function xt(t){var e=document.body.createTextRange(),o=function t(e,o){var n,i;if(pt.isText(e)){var r=pt.listPrev(e,g.not(pt.isText)),a=C.last(r).previousSibling;n=a||e.parentNode,o+=C.sum(C.tail(r),pt.nodeLength),i=!a}else{if(n=e.childNodes[o]||e,pt.isText(n))return t(n,0);o=0,i=!1}return{node:n,collapseToStart:i,offset:o}}(t.node,t.offset);return e.moveToElementText(o.node),e.collapse(o.collapseToStart),e.moveStart(\"character\",o.offset),e}r().fn.extend({summernote:function(){var t=yt(C.head(arguments)),e=\"string\"===t,o=\"object\"===t,n=r().extend({},r().summernote.options,o?C.head(arguments):{});n.langInfo=r().extend(!0,{},r().summernote.lang[\"en-US\"],r().summernote.lang[n.lang]),n.icons=r().extend(!0,{},r().summernote.options.icons,n.icons),n.tooltip=\"auto\"===n.tooltip?!m.isSupportTouch:n.tooltip,this.each((function(t,e){var o=r()(e);if(!o.data(\"summernote\")){var i=new bt(o,n);o.data(\"summernote\",i),o.data(\"summernote\").triggerEvent(\"init\",i.layoutInfo)}}));var i=this.first();if(i.length){var a=i.data(\"summernote\");if(e)return a.invoke.apply(a,C.from(arguments));n.focus&&a.invoke(\"editor.focus\")}return this}});var Tt=function(){function t(e,o,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.sc=e,this.so=o,this.ec=n,this.eo=i,this.isOnEditable=this.makeIsOn(pt.isEditable),this.isOnList=this.makeIsOn(pt.isList),this.isOnAnchor=this.makeIsOn(pt.isAnchor),this.isOnCell=this.makeIsOn(pt.isCell),this.isOnData=this.makeIsOn(pt.isData)}return e=t,o=[{key:\"nativeRange\",value:function(){if(m.isW3CRangeSupport){var t=document.createRange();return t.setStart(this.sc,this.so),t.setEnd(this.ec,this.eo),t}var e=xt({node:this.sc,offset:this.so});return e.setEndPoint(\"EndToEnd\",xt({node:this.ec,offset:this.eo})),e}},{key:\"getPoints\",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:\"getStartPoint\",value:function(){return{node:this.sc,offset:this.so}}},{key:\"getEndPoint\",value:function(){return{node:this.ec,offset:this.eo}}},{key:\"select\",value:function(){var t=this.nativeRange();if(m.isW3CRangeSupport){var e=document.getSelection();e.rangeCount>0&&e.removeAllRanges(),e.addRange(t)}else t.select();return this}},{key:\"scrollIntoView\",value:function(t){var e=r()(t).height();return t.scrollTop+e0?o.so-1:0];if(e){var i=pt.listPrev(e,pt.isParaInline).reverse();if((i=i.concat(pt.listNext(e.nextSibling,pt.isParaInline))).length){var r=pt.wrap(C.head(i),\"p\");pt.appendChildNodes(r,C.tail(i))}}return this.normalize()}},{key:\"insertNode\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this;(pt.isText(t)||pt.isInline(t))&&(o=this.wrapBodyInlineWithPara().deleteContents());var n=pt.splitPoint(o.getStartPoint(),pt.isInline(t));return n.rightNode?(n.rightNode.parentNode.insertBefore(t,n.rightNode),pt.isEmpty(n.rightNode)&&(e||pt.isPara(t))&&n.rightNode.parentNode.removeChild(n.rightNode)):n.container.appendChild(t),t}},{key:\"pasteHTML\",value:function(t){t=((t||\"\")+\"\").trim(t);var e=r()(\"\").html(t)[0],o=C.from(e.childNodes),n=this,i=!1;return n.so>=0&&(o=o.reverse(),i=!0),o=o.map((function(t){return n.insertNode(t,!pt.isInline(t))})),i&&(o=o.reverse()),o}},{key:\"toString\",value:function(){var t=this.nativeRange();return m.isW3CRangeSupport?t.toString():t.text}},{key:\"getWordRange\",value:function(e){var o=this.getEndPoint();if(!pt.isCharPoint(o))return this;var n=pt.prevPointUntil(o,(function(t){return!pt.isCharPoint(t)}));return e&&(o=pt.nextPointUntil(o,(function(t){return!pt.isCharPoint(t)}))),new t(n.node,n.offset,o.node,o.offset)}},{key:\"getWordsRange\",value:function(e){var o=this.getEndPoint(),n=function(t){return!pt.isCharPoint(t)&&!pt.isSpacePoint(t)};if(n(o))return this;var i=pt.prevPointUntil(o,n);return e&&(o=pt.nextPointUntil(o,n)),new t(i.node,i.offset,o.node,o.offset)}},{key:\"getWordsMatchRange\",value:function(e){var o=this.getEndPoint(),n=pt.prevPointUntil(o,(function(n){if(!pt.isCharPoint(n)&&!pt.isSpacePoint(n))return!0;var i=new t(n.node,n.offset,o.node,o.offset),r=e.exec(i.toString());return r&&0===r.index})),i=new t(n.node,n.offset,o.node,o.offset),r=i.toString(),a=e.exec(r);return a&&a[0].length===r.length?i:null}},{key:\"bookmark\",value:function(t){return{s:{path:pt.makeOffsetPath(t,this.sc),offset:this.so},e:{path:pt.makeOffsetPath(t,this.ec),offset:this.eo}}}},{key:\"paraBookmark\",value:function(t){return{s:{path:C.tail(pt.makeOffsetPath(C.head(t),this.sc)),offset:this.so},e:{path:C.tail(pt.makeOffsetPath(C.last(t),this.ec)),offset:this.eo}}}},{key:\"getClientRects\",value:function(){return this.nativeRange().getClientRects()}}],o&&wt(e.prototype,o),n&&wt(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),e;var e,o,n}();const Et={create:function(t,e,o,n){if(4===arguments.length)return new Tt(t,e,o,n);if(2===arguments.length)return new Tt(t,e,o=t,n=e);var i=this.createFromSelection();if(!i&&1===arguments.length){var r=arguments[0];return pt.isEditable(r)&&(r=r.lastChild),this.createFromBodyElement(r,pt.emptyPara===arguments[0].innerHTML)}return i},createFromBodyElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.createFromNode(t).collapse(e)},createFromSelection:function(){var t,e,o,n;if(m.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(pt.isBody(i.anchorNode))return null;var r=i.getRangeAt(0);t=r.startContainer,e=r.startOffset,o=r.endContainer,n=r.endOffset}else{var a=document.selection.createRange(),s=a.duplicate();s.collapse(!1);var l=a;l.collapse(!0);var c=St(l,!0),u=St(s,!1);pt.isText(c.node)&&pt.isLeftEdgePoint(c)&&pt.isTextNode(u.node)&&pt.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),t=c.cont,e=c.offset,o=u.cont,n=u.offset}return new Tt(t,e,o,n)},createFromNode:function(t){var e=t,o=0,n=t,i=pt.nodeLength(n);return pt.isVoid(e)&&(o=pt.listPrev(e).length-1,e=e.parentNode),pt.isBR(n)?(i=pt.listPrev(n).length-1,n=n.parentNode):pt.isVoid(n)&&(i=pt.listPrev(n).length,n=n.parentNode),this.create(e,o,n,i)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var o=pt.fromOffsetPath(t,e.s.path),n=e.s.offset,i=pt.fromOffsetPath(t,e.e.path),r=e.e.offset;return new Tt(o,n,i,r)},createFromParaBookmark:function(t,e){var o=t.s.offset,n=t.e.offset,i=pt.fromOffsetPath(C.head(e),t.s.path),r=pt.fromOffsetPath(C.last(e),t.e.path);return new Tt(i,o,r,n)}};var Pt={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34};const Nt={isEdit:function(t){return C.contains([Pt.BACKSPACE,Pt.TAB,Pt.ENTER,Pt.SPACE,Pt.DELETE],t)},isRemove:function(t){return C.contains([Pt.BACKSPACE,Pt.DELETE],t)},isMove:function(t){return C.contains([Pt.LEFT,Pt.UP,Pt.RIGHT,Pt.DOWN],t)},isNavigation:function(t){return C.contains([Pt.HOME,Pt.END,Pt.PAGEUP,Pt.PAGEDOWN],t)},nameFromCode:g.invertObject(Pt),code:Pt};function $t(t){return $t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},$t(t)}function It(t,e){for(var o=0;o0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:\"redo\",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:\"recordUndo\",value:function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot()),this.stack.length>this.context.options.historyLimit&&(this.stack.shift(),this.stackOffset-=1)}}])&&It(t.prototype,e),o&&It(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function Lt(t){return Lt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Lt(t)}function Ft(t,e){for(var o=0;o-1;o[\"list-style\"]=n?\"unordered\":\"ordered\"}else o[\"list-style\"]=\"none\";var i=pt.ancestor(t.sc,pt.isPara);if(i&&i.style[\"line-height\"])o[\"line-height\"]=i.style.lineHeight;else{var a=parseInt(o[\"line-height\"],10)/parseInt(o[\"font-size\"],10);o[\"line-height\"]=a.toFixed(1)}return o.anchor=t.isOnAnchor()&&pt.ancestor(t.sc,pt.isAnchor),o.ancestors=pt.listAncestor(t.sc,pt.isEditable),o.range=t,o}}],e&&Ft(t.prototype,e),o&&Ft(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function jt(t){return jt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},jt(t)}function Bt(t,e){for(var o=0;o25?e-25:\"\"}))}))})),o.select()}},{key:\"toggleList\",value:function(t,e){var o=this,n=Et.create(e).wrapBodyInlineWithPara(),i=n.nodes(pt.isPara,{includeAncestor:!0}),a=n.paraBookmark(i),s=C.clusterBy(i,g.peq2(\"parentNode\"));if(C.find(i,pt.isPurePara)){var l=[];r().each(s,(function(e,n){l=l.concat(o.wrapList(n,t))})),i=l}else{var c=n.nodes(pt.isList,{includeAncestor:!0}).filter((function(e){return!r().nodeName(e,t)}));c.length?r().each(c,(function(e,o){pt.replace(o,t)})):i=this.releaseList(s,!0)}Et.createFromParaBookmark(a,i).select()}},{key:\"wrapList\",value:function(t,e){var o=C.head(t),n=C.last(t),i=pt.isList(o.previousSibling)&&o.previousSibling,r=pt.isList(n.nextSibling)&&n.nextSibling,a=i||pt.insertAfter(pt.create(e||\"UL\"),n);return t=t.map((function(t){return pt.isPurePara(t)?pt.replace(t,\"LI\"):t})),pt.appendChildNodes(a,t,!0),r&&(pt.appendChildNodes(a,C.from(r.childNodes),!0),pt.remove(r)),t}},{key:\"releaseList\",value:function(t,e){var o=this,n=[];return r().each(t,(function(t,i){var a=C.head(i),s=C.last(i),l=e?pt.lastAncestor(a,pt.isList):a.parentNode,c=l.parentNode;if(\"LI\"===l.parentNode.nodeName)i.map((function(t){var e=o.findNextSiblings(t);c.nextSibling?c.parentNode.insertBefore(t,c.nextSibling):c.parentNode.appendChild(t),e.length&&(o.wrapList(e,l.nodeName),t.appendChild(e[0].parentNode))})),0===l.children.length&&c.removeChild(l),0===c.childNodes.length&&c.parentNode.removeChild(c);else{var u=l.childNodes.length>1?pt.splitTree(l,{node:s.parentNode,offset:pt.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,d=pt.splitTree(l,{node:a.parentNode,offset:pt.position(a)},{isSkipPaddingBlankHTML:!0});i=e?pt.listDescendant(d,pt.isLi):C.from(d.childNodes).filter(pt.isLi),!e&&pt.isList(l.parentNode)||(i=i.map((function(t){return pt.replace(t,\"P\")}))),r().each(C.from(i).reverse(),(function(t,e){pt.insertAfter(e,l)}));var f=C.compact([l,d,u]);r().each(f,(function(t,e){var o=[e].concat(pt.listDescendant(e,pt.isList));r().each(o.reverse(),(function(t,e){pt.nodeLength(e)||pt.remove(e,!0)}))}))}n=n.concat(i)})),n}},{key:\"appendToPrevious\",value:function(t){return t.previousSibling?pt.appendChildNodes(t.previousSibling,[t]):this.wrapList([t],\"LI\")}},{key:\"findList\",value:function(t){return t?C.find(t.children,(function(t){return[\"OL\",\"UL\"].indexOf(t.nodeName)>-1})):null}},{key:\"findNextSiblings\",value:function(t){for(var e=[];t.nextSibling;)e.push(t.nextSibling),t=t.nextSibling;return e}}],e&&Bt(t.prototype,e),o&&Bt(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function Mt(t){return Mt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Mt(t)}function Ut(t,e){for(var o=0;o1,i=e.rowSpan>1,a=t.rowIndex===r.rowPos&&e.cellIndex===r.colPos;l(t.rowIndex,o,t,e,i,n,!1);var s=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(s>1)for(var c=1;c1)for(var p=1;p=o.cellIndex&&o.cellIndex<=e&&!n&&r.colPos++}function h(e){switch(o){case t.where.Column:if(e.isColSpan)return t.resultAction.SubtractSpanCount;break;case t.where.Row:if(!e.isVirtual&&e.isRowSpan)return t.resultAction.AddCell;if(e.isRowSpan)return t.resultAction.SubtractSpanCount}return t.resultAction.RemoveCell}function p(e){switch(o){case t.where.Column:if(e.isColSpan)return t.resultAction.SumSpanCount;if(e.isRowSpan&&e.isVirtual)return t.resultAction.Ignore;break;case t.where.Row:if(e.isRowSpan)return t.resultAction.SumSpanCount;if(e.isColSpan&&e.isVirtual)return t.resultAction.Ignore}return t.resultAction.AddCell}this.getActionList=function(){for(var e=o===t.where.Row?r.rowPos:-1,i=o===t.where.Column?r.colPos:-1,l=0,u=!0;u;){var d=e>=0?e:l,f=i>=0?i:l,m=a[d];if(!m)return u=!1,s;var v=m[f];if(!v)return u=!1,s;var g=t.resultAction.Ignore;switch(n){case t.requestAction.Add:g=p(v);break;case t.requestAction.Delete:g=h(v)}s.push(c(v,g,d,f)),l++}return s},e&&e.tagName&&(\"td\"===e.tagName.toLowerCase()||\"th\"===e.tagName.toLowerCase())&&(r.colPos=e.cellIndex,e.parentElement&&e.parentElement.tagName&&\"tr\"===e.parentElement.tagName.toLowerCase()&&(r.rowPos=e.parentElement.rowIndex)),function(){for(var t=i.rows,e=0;e\"),s=new Gt(o,Gt.where.Row,Gt.requestAction.Add,r()(n).closest(\"table\")[0]).getActionList(),l=0;l\"+pt.blank+\"\");break;case Gt.resultAction.SumSpanCount:if(\"top\"===e&&(c.baseCell.parent?c.baseCell.closest(\"tr\").rowIndex:0)<=n[0].rowIndex){var d=r()(\"\").append(r()(\"\"+pt.blank+\" | \").removeAttr(\"rowspan\")).html();a.append(d);break}var f=parseInt(c.baseCell.rowSpan,10);f++,c.baseCell.setAttribute(\"rowSpan\",f)}}if(\"top\"===e)n.before(a);else{if(o.rowSpan>1){var h=n[0].rowIndex+(o.rowSpan-2);return void r()(r()(n).parent().find(\"tr\")[h]).after(r()(a))}n.after(a)}}},{key:\"addCol\",value:function(t,e){var o=pt.ancestor(t.commonAncestor(),pt.isCell),n=r()(o).closest(\"tr\");r()(n).siblings().push(n);for(var i=new Gt(o,Gt.where.Column,Gt.requestAction.Add,r()(n).closest(\"table\")[0]).getActionList(),a=0;a\"+pt.blank+\"\"):r()(s.baseCell).before(\"\"+pt.blank+\" | \");break;case Gt.resultAction.SumSpanCount:if(\"right\"===e){var c=parseInt(s.baseCell.colSpan,10);c++,s.baseCell.setAttribute(\"colSpan\",c)}else r()(s.baseCell).before(\"\"+pt.blank+\" | \")}}}},{key:\"recoverAttributes\",value:function(t){var e=\"\";if(!t)return e;for(var o=t.attributes||[],n=0;n1,d=u?parseInt(l.rowSpan,10):0;switch(a[s].action){case Gt.resultAction.Ignore:continue;case Gt.resultAction.AddCell:var f=o.next(\"tr\")[0];if(!f)continue;var h=o[0].cells[n];u&&(d>2?(d--,f.insertBefore(h,f.cells[n]),f.cells[n].setAttribute(\"rowSpan\",d),f.cells[n].innerHTML=\"\"):2===d&&(f.insertBefore(h,f.cells[n]),f.cells[n].removeAttribute(\"rowSpan\"),f.cells[n].innerHTML=\"\"));continue;case Gt.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute(\"rowSpan\",d),c.rowIndex!==i&&l.cellIndex===n&&(l.innerHTML=\"\")):2===d&&(l.removeAttribute(\"rowSpan\"),c.rowIndex!==i&&l.cellIndex===n&&(l.innerHTML=\"\")));continue;case Gt.resultAction.RemoveCell:continue}}o.remove()}},{key:\"deleteCol\",value:function(t){for(var e=pt.ancestor(t.commonAncestor(),pt.isCell),o=r()(e).closest(\"tr\"),n=o.children(\"td, th\").index(r()(e)),i=new Gt(e,Gt.where.Column,Gt.requestAction.Delete,r()(o).closest(\"table\")[0]).getActionList(),a=0;a1){var l=s.colSpan?parseInt(s.colSpan,10):0;l>2?(l--,s.setAttribute(\"colSpan\",l),s.cellIndex===n&&(s.innerHTML=\"\")):2===l&&(s.removeAttribute(\"colSpan\"),s.cellIndex===n&&(s.innerHTML=\"\"))}continue;case Gt.resultAction.RemoveCell:pt.remove(i[a].baseCell,!0);continue}}},{key:\"createTable\",value:function(t,e,o){for(var n,i=[],a=0;a\"+pt.blank+\"\");n=i.join(\"\");for(var s,l=[],c=0;c\"+n+\"\");s=l.join(\"\");var u=r()(\"\");return o&&o.tableClassName&&u.addClass(o.tableClassName),u[0]}},{key:\"deleteTable\",value:function(t){var e=pt.ancestor(t.commonAncestor(),pt.isCell);r()(e).closest(\"table\").remove()}}],e&&Vt(t.prototype,e),o&&Vt(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function Yt(t){return Yt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Yt(t)}function Xt(t,e){for(var o=0;o0&&o.isLimited(u))){var d=c.toString()!==i;\"string\"==typeof n&&(n=n.trim()),n=o.options.onCreateLink?o.options.onCreateLink(n):o.checkLinkUrl(n);var f=[];if(d){var h=(c=c.deleteContents()).insertNode(r()(\"\").text(i)[0]);f.push(h)}else f=o.style.styleNodes(c,{nodeName:\"A\",expandClosestSibling:!0,onlyPartialContains:!0});r().each(f,(function(t,o){r()(o).attr(\"href\",n),a?(r()(o).attr(\"target\",\"_blank\"),s&&e.push(\"noreferrer\"),l&&e.push(\"noopener\"),e.length&&r()(o).attr(\"rel\",e.join(\" \"))):r()(o).removeAttr(\"target\")})),o.setLastRange(o.createRangeFromList(f).select())}})),this.color=this.wrapCommand((function(t){var e=t.foreColor,o=t.backColor;e&&document.execCommand(\"foreColor\",!1,e),o&&document.execCommand(\"backColor\",!1,o)})),this.foreColor=this.wrapCommand((function(t){document.execCommand(\"foreColor\",!1,t)})),this.insertTable=this.wrapCommand((function(t){var e=t.split(\"x\");o.getLastRange().deleteContents().insertNode(o.table.createTable(e[0],e[1],o.options))})),this.removeMedia=this.wrapCommand((function(){var t=r()(o.restoreTarget()).parent();t.closest(\"figure\").length?t.closest(\"figure\").remove():t=r()(o.restoreTarget()).detach(),o.setLastRange(Et.createFromSelection(t).select()),o.context.triggerEvent(\"media.delete\",t,o.$editable)})),this.floatMe=this.wrapCommand((function(t){var e=r()(o.restoreTarget());e.toggleClass(\"note-float-left\",\"left\"===t),e.toggleClass(\"note-float-right\",\"right\"===t),e.css(\"float\",\"none\"===t?\"\":t)})),this.resize=this.wrapCommand((function(t){var e=r()(o.restoreTarget());0===(t=parseFloat(t))?e.css(\"width\",\"\"):e.css({width:100*t+\"%\",height:\"\"})}))},e=[{key:\"initialize\",value:function(){var t=this;this.$editable.on(\"keydown\",(function(e){if(e.keyCode===Nt.code.ENTER&&t.context.triggerEvent(\"enter\",e),t.context.triggerEvent(\"keydown\",e),t.snapshot=t.history.makeSnapshot(),t.hasKeyShortCut=!1,e.isDefaultPrevented()||(t.options.shortcuts?t.hasKeyShortCut=t.handleKeyMap(e):t.preventDefaultEditableShortCuts(e)),t.isLimited(1,e)){var o=t.getLastRange();if(o.eo-o.so==0)return!1}t.setLastRange(),t.options.recordEveryKeystroke&&!1===t.hasKeyShortCut&&t.history.recordUndo()})).on(\"keyup\",(function(e){t.setLastRange(),t.context.triggerEvent(\"keyup\",e)})).on(\"focus\",(function(e){t.setLastRange(),t.context.triggerEvent(\"focus\",e)})).on(\"blur\",(function(e){t.context.triggerEvent(\"blur\",e)})).on(\"mousedown\",(function(e){t.context.triggerEvent(\"mousedown\",e)})).on(\"mouseup\",(function(e){t.setLastRange(),t.history.recordUndo(),t.context.triggerEvent(\"mouseup\",e)})).on(\"scroll\",(function(e){t.context.triggerEvent(\"scroll\",e)})).on(\"paste\",(function(e){t.setLastRange(),t.context.triggerEvent(\"paste\",e)})).on(\"copy\",(function(e){t.context.triggerEvent(\"copy\",e)})).on(\"input\",(function(){t.isLimited(0)&&t.snapshot&&t.history.applySnapshot(t.snapshot)})),this.$editable.attr(\"spellcheck\",this.options.spellCheck),this.$editable.attr(\"autocorrect\",this.options.spellCheck),this.options.disableGrammar&&this.$editable.attr(\"data-gramm\",!1),this.$editable.html(pt.html(this.$note)||pt.emptyPara),this.$editable.on(m.inputEventName,g.debounce((function(){t.context.triggerEvent(\"change\",t.$editable.html(),t.$editable)}),10)),this.$editable.on(\"focusin\",(function(e){t.context.triggerEvent(\"focusin\",e)})).on(\"focusout\",(function(e){t.context.triggerEvent(\"focusout\",e)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on(\"contextmenu\",(function(e){return t.context.triggerEvent(\"contextmenu\",e),!1})):(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css(\"max-height\",this.options.maxHeight),this.options.minHeight&&this.$editable.css(\"min-height\",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()}},{key:\"destroy\",value:function(){this.$editable.off()}},{key:\"handleKeyMap\",value:function(t){var e=this.options.keyMap[m.isMac?\"mac\":\"pc\"],o=[];t.metaKey&&o.push(\"CMD\"),t.ctrlKey&&!t.altKey&&o.push(\"CTRL\"),t.shiftKey&&o.push(\"SHIFT\");var n=Nt.nameFromCode[t.keyCode];n&&o.push(n);var i=e[o.join(\"+\")];if(\"TAB\"!==n||this.options.tabDisable)if(i){if(!1!==this.context.invoke(i))return t.preventDefault(),!0}else Nt.isEdit(t.keyCode)&&(Nt.isRemove(t.keyCode)&&this.context.invoke(\"removed\"),this.afterCommand());else this.afterCommand();return!1}},{key:\"preventDefaultEditableShortCuts\",value:function(t){(t.ctrlKey||t.metaKey)&&C.contains([66,73,85],t.keyCode)&&t.preventDefault()}},{key:\"isLimited\",value:function(t,e){return t=t||0,(void 0===e||!(Nt.isMove(e.keyCode)||Nt.isNavigation(e.keyCode)||e.ctrlKey||e.metaKey||C.contains([Nt.code.BACKSPACE,Nt.code.DELETE],e.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+t>this.options.maxTextLength}},{key:\"checkLinkUrl\",value:function(t){return Jt.test(t)?\"mailto://\"+t:te.test(t)?\"tel://\"+t:ee.test(t)?t:\"http://\"+t}},{key:\"createRange\",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:\"createRangeFromList\",value:function(t){var e=Et.createFromNodeBefore(C.head(t)).getStartPoint(),o=Et.createFromNodeAfter(C.last(t)).getEndPoint();return Et.create(e.node,e.offset,o.node,o.offset)}},{key:\"setLastRange\",value:function(t){t?this.lastRange=t:(this.lastRange=Et.create(this.editable),0===r()(this.lastRange.sc).closest(\".note-editable\").length&&(this.lastRange=Et.createFromBodyElement(this.editable)))}},{key:\"getLastRange\",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:\"saveRange\",value:function(t){t&&this.getLastRange().collapse().select()}},{key:\"restoreRange\",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:\"saveTarget\",value:function(t){this.$editable.data(\"target\",t)}},{key:\"clearTarget\",value:function(){this.$editable.removeData(\"target\")}},{key:\"restoreTarget\",value:function(){return this.$editable.data(\"target\")}},{key:\"currentStyle\",value:function(){var t=Et.create();return t&&(t=t.normalize()),t?this.style.current(t):this.style.fromNode(this.$editable)}},{key:\"styleFromNode\",value:function(t){return this.style.fromNode(t)}},{key:\"undo\",value:function(){this.context.triggerEvent(\"before.command\",this.$editable.html()),this.history.undo(),this.context.triggerEvent(\"change\",this.$editable.html(),this.$editable)}},{key:\"commit\",value:function(){this.context.triggerEvent(\"before.command\",this.$editable.html()),this.history.commit(),this.context.triggerEvent(\"change\",this.$editable.html(),this.$editable)}},{key:\"redo\",value:function(){this.context.triggerEvent(\"before.command\",this.$editable.html()),this.history.redo(),this.context.triggerEvent(\"change\",this.$editable.html(),this.$editable)}},{key:\"beforeCommand\",value:function(){this.context.triggerEvent(\"before.command\",this.$editable.html()),document.execCommand(\"styleWithCSS\",!1,this.options.styleWithCSS),this.focus()}},{key:\"afterCommand\",value:function(t){this.normalizeContent(),this.history.recordUndo(),t||this.context.triggerEvent(\"change\",this.$editable.html(),this.$editable)}},{key:\"tab\",value:function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(t,this.options.tabSize),this.afterCommand())}}},{key:\"untab\",value:function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t,!0);else if(0===this.options.tabSize)return!1}},{key:\"wrapCommand\",value:function(t){return function(){this.beforeCommand(),t.apply(this,arguments),this.afterCommand()}}},{key:\"removed\",value:function(t,e,o){(t=Et.create()).isCollapsed()&&t.isOnCell()&&(o=(e=t.ec).tagName)&&1===e.childElementCount&&\"BR\"===e.childNodes[0].tagName&&(\"P\"===o?e.remove():[\"TH\",\"TD\"].indexOf(o)>=0&&e.firstChild.remove())}},{key:\"insertImage\",value:function(t,e){var o,n=this;return(o=t,r().Deferred((function(t){var e=r()(\"
\");e.one(\"load\",(function(){e.off(\"error abort\"),t.resolve(e)})).one(\"error abort\",(function(){e.off(\"load\").detach(),t.reject(e)})).css({display:\"none\"}).appendTo(document.body).attr(\"src\",o)})).promise()).then((function(t){n.beforeCommand(),\"function\"==typeof e?e(t):(\"string\"==typeof e&&t.attr(\"data-filename\",e),t.css(\"width\",Math.min(n.$editable.width(),t.width()))),t.show(),n.getLastRange().insertNode(t[0]),n.setLastRange(Et.createFromNodeAfter(t[0]).select()),n.afterCommand()})).fail((function(t){n.context.triggerEvent(\"image.upload.error\",t)}))}},{key:\"insertImagesAsDataURL\",value:function(t){var e=this;r().each(t,(function(t,o){var n=o.name;e.options.maximumImageFileSize&&e.options.maximumImageFileSize\":t),e&&e.length&&(e[0].tagName.toUpperCase()!==t.toUpperCase()&&(e=e.find(t)),e&&e.length)){var o=this.createRange(),n=r()([o.sc,o.ec]).closest(t);n.removeClass();var i=e[0].className||\"\";i&&n.addClass(i)}}},{key:\"formatPara\",value:function(){this.formatBlock(\"P\")}},{key:\"fontStyling\",value:function(t,e){var o=this.getLastRange();if(\"\"!==o){var n=this.style.styleNodes(o);if(this.$editor.find(\".note-status-output\").html(\"\"),r()(n).css(t,e),o.isCollapsed()){var i=C.head(n);i&&!pt.nodeLength(i)&&(i.innerHTML=pt.ZERO_WIDTH_NBSP_CHAR,Et.createFromNode(i.firstChild).select(),this.setLastRange(),this.$editable.data(\"bogus\",i))}else o.select()}else{var a=r().now();this.$editor.find(\".note-status-output\").html(''+this.lang.output.noSelection+\"
\"),setTimeout((function(){r()(\"#note-status-output-\"+a).remove()}),5e3)}}},{key:\"unlink\",value:function(){var t=this.getLastRange();if(t.isOnAnchor()){var e=pt.ancestor(t.sc,pt.isAnchor);(t=Et.createFromNode(e)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand(\"unlink\"),this.afterCommand()}}},{key:\"getLinkInfo\",value:function(){this.hasFocus()||this.focus();var t=this.getLastRange().expand(pt.isAnchor),e=r()(C.head(t.nodes(pt.isAnchor))),o={range:t,text:t.toString(),url:e.length?e.attr(\"href\"):\"\"};return e.length&&(o.isNewWindow=\"_blank\"===e.attr(\"target\")),o}},{key:\"addRow\",value:function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addRow(e,t),this.afterCommand())}},{key:\"addCol\",value:function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addCol(e,t),this.afterCommand())}},{key:\"deleteRow\",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(t),this.afterCommand())}},{key:\"deleteCol\",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(t),this.afterCommand())}},{key:\"deleteTable\",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(t),this.afterCommand())}},{key:\"resizeTo\",value:function(t,e,o){var n;if(o){var i=t.y/t.x,r=e.data(\"ratio\");n={width:r>i?t.x:t.y/r,height:r>i?t.x*r:t.y}}else n={width:t.x,height:t.y};e.css(n)}},{key:\"hasFocus\",value:function(){return this.$editable.is(\":focus\")}},{key:\"focus\",value:function(){this.hasFocus()||this.$editable.trigger(\"focus\")}},{key:\"isEmpty\",value:function(){return pt.isEmpty(this.$editable[0])||pt.emptyPara===this.$editable.html()}},{key:\"empty\",value:function(){this.context.invoke(\"code\",pt.emptyPara)}},{key:\"normalizeContent\",value:function(){this.$editable[0].normalize()}}],e&&Xt(t.prototype,e),o&&Xt(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function ne(t){return ne=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},ne(t)}function ie(t,e){for(var o=0;o0&&this.options.allowClipboardImagePasting&&(this.context.invoke(\"editor.insertImagesOrCallback\",n),t.preventDefault()),i.length>0&&this.context.invoke(\"editor.isLimited\",i.length)&&t.preventDefault()}else if(window.clipboardData){var r=window.clipboardData.getData(\"text\");this.context.invoke(\"editor.isLimited\",r.length)&&t.preventDefault()}setTimeout((function(){e.context.invoke(\"editor.afterCommand\")}),10)}}}])&&ie(t.prototype,e),o&&ie(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function se(t){return se=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},se(t)}function le(t,e){for(var o=0;o','',\"\"].join(\"\")).prependTo(this.$editor)},e=[{key:\"initialize\",value:function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(t){t.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on(\"drop\",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:\"attachDragAndDropEvent\",value:function(){var t=this,e=r()(),o=this.$dropzone.find(\".note-dropzone-message\");this.documentEventHandlers.onDragenter=function(n){var i=t.context.invoke(\"codeview.isActivated\"),r=t.$editor.width()>0&&t.$editor.height()>0;i||e.length||!r||(t.$editor.addClass(\"dragover\"),t.$dropzone.width(t.$editor.width()),t.$dropzone.height(t.$editor.height()),o.text(t.lang.image.dragImageHere)),e=e.add(n.target)},this.documentEventHandlers.onDragleave=function(o){(e=e.not(o.target)).length&&\"BODY\"!==o.target.nodeName||(e=r()(),t.$editor.removeClass(\"dragover\"))},this.documentEventHandlers.onDrop=function(){e=r()(),t.$editor.removeClass(\"dragover\")},this.$eventListener.on(\"dragenter\",this.documentEventHandlers.onDragenter).on(\"dragleave\",this.documentEventHandlers.onDragleave).on(\"drop\",this.documentEventHandlers.onDrop),this.$dropzone.on(\"dragenter\",(function(){t.$dropzone.addClass(\"hover\"),o.text(t.lang.image.dropImage)})).on(\"dragleave\",(function(){t.$dropzone.removeClass(\"hover\"),o.text(t.lang.image.dragImageHere)})),this.$dropzone.on(\"drop\",(function(e){var o=e.originalEvent.dataTransfer;e.preventDefault(),o&&o.files&&o.files.length?(t.$editable.trigger(\"focus\"),t.context.invoke(\"editor.insertImagesOrCallback\",o.files)):r().each(o.types,(function(e,n){if(!(n.toLowerCase().indexOf(\"_moz_\")>-1)){var i=o.getData(n);n.toLowerCase().indexOf(\"text\")>-1?t.context.invoke(\"editor.pasteHTML\",i):r()(i).each((function(e,o){t.context.invoke(\"editor.insertNode\",o)}))}}))})).on(\"dragover\",!1)}},{key:\"destroy\",value:function(){var t=this;Object.keys(this.documentEventHandlers).forEach((function(e){t.$eventListener.off(e.slice(2).toLowerCase(),t.documentEventHandlers[e])})),this.documentEventHandlers={}}}],e&&le(t.prototype,e),o&&le(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function de(t){return de=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},de(t)}function fe(t,e){var o=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!o){if(Array.isArray(t)||(o=function(t,e){if(t){if(\"string\"==typeof t)return he(t,e);var o={}.toString.call(t).slice(8,-1);return\"Object\"===o&&t.constructor&&(o=t.constructor.name),\"Map\"===o||\"Set\"===o?Array.from(t):\"Arguments\"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?he(t,e):void 0}}(t))||e&&t&&\"number\"==typeof t.length){o&&(t=o);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var r,a=!0,s=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw r}}}}function he(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o.*?(?:<\\/iframe>)?)/gi,(function(t){if(/<.+src(?==?('|\"|\\s)?)[\\s\\S]+src(?=('|\"|\\s)?)[^>]*?>/i.test(t))return\"\";var o,n=fe(e);try{for(n.s();!(o=n.n()).done;){var i=o.value;if(new RegExp('src=\"(https?:)?//'+i.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")+'/(.+)\"').test(t))return t}}catch(t){n.e(t)}finally{n.f()}return\"\"}))}return t}},{key:\"activate\",value:function(){var t=this,e=this.CodeMirrorConstructor;if(this.$codable.val(pt.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke(\"toolbar.updateCodeview\",!0),this.context.invoke(\"airPopover.updateCodeview\",!0),this.$editor.addClass(\"codeview\"),this.$codable.trigger(\"focus\"),e){var o=e.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var n=new e.TernServer(this.options.codemirror.tern);o.ternServer=n,o.on(\"cursorActivity\",(function(t){n.updateArgHints(t)}))}o.on(\"blur\",(function(e){t.context.triggerEvent(\"blur.codeview\",o.getValue(),e)})),o.on(\"change\",(function(){t.context.triggerEvent(\"change.codeview\",o.getValue(),o)})),o.setSize(null,this.$editable.outerHeight()),this.$codable.data(\"cmEditor\",o)}else this.$codable.on(\"blur\",(function(e){t.context.triggerEvent(\"blur.codeview\",t.$codable.val(),e)})),this.$codable.on(\"input\",(function(){t.context.triggerEvent(\"change.codeview\",t.$codable.val(),t.$codable)}))}},{key:\"deactivate\",value:function(){if(this.CodeMirrorConstructor){var t=this.$codable.data(\"cmEditor\");this.$codable.val(t.getValue()),t.toTextArea()}var e=this.purify(pt.value(this.$codable,this.options.prettifyHtml)||pt.emptyPara),o=this.$editable.html()!==e;this.$editable.html(e),this.$editable.height(this.options.height?this.$codable.height():\"auto\"),this.$editor.removeClass(\"codeview\"),o&&this.context.triggerEvent(\"change\",this.$editable.html(),this.$editable),this.$editable.trigger(\"focus\"),this.context.invoke(\"toolbar.updateCodeview\",!1),this.context.invoke(\"airPopover.updateCodeview\",!1)}},{key:\"destroy\",value:function(){this.isActivated()&&this.deactivate()}}],e&&pe(t.prototype,e),o&&pe(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function ge(t){return ge=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},ge(t)}function be(t,e){for(var o=0;o0?Math.max(r,t.options.minheight):r,r=t.options.maxHeight>0?Math.min(r,t.options.maxHeight):r,a=t.options.minheight>0?Math.max(a,t.options.minheight):a,a=t.options.maxHeight>0?Math.min(a,t.options.maxHeight):a,t.$editable.height(r),t.$codable.height(a)};t.$document.on(\"mousemove touchmove\",i).one(\"mouseup touchend\",(function(){t.$document.off(\"mousemove touchmove\",i)}))}))}},{key:\"destroy\",value:function(){this.$statusbar.off(),this.$statusbar.addClass(\"locked\")}}])&&be(t.prototype,e),o&&be(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function we(t){return we=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},we(t)}function Ce(t,e){for(var o=0;o','','
','
','
','
','
',this.options.disableResizeImage?\"\":'
',\"
\",\"\"].join(\"\")).prependTo(this.$editingArea),this.$handle.on(\"mousedown\",(function(e){if(pt.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var o=t.$handle.find(\".note-control-selection\").data(\"target\"),n=o.offset(),i=t.$document.scrollTop(),r=function(e){t.context.invoke(\"editor.resizeTo\",{x:e.clientX-n.left,y:e.clientY-(n.top-i)},o,!e.shiftKey),t.update(o[0],e)};t.$document.on(\"mousemove\",r).one(\"mouseup\",(function(e){e.preventDefault(),t.$document.off(\"mousemove\",r),t.context.invoke(\"editor.afterCommand\")})),o.data(\"ratio\")||o.data(\"ratio\",o.height()/o.width())}})),this.$handle.on(\"wheel\",(function(e){e.preventDefault(),t.update()}))}},{key:\"destroy\",value:function(){this.$handle.remove()}},{key:\"update\",value:function(t,e){if(this.context.isDisabled())return!1;var o=pt.isImg(t),n=this.$handle.find(\".note-control-selection\");if(this.context.invoke(\"imagePopover.update\",t,e),o){var i=r()(t),a=this.$editingArea[0].getBoundingClientRect(),s=t.getBoundingClientRect();n.css({display:\"block\",left:s.left-a.left,top:s.top-a.top,width:s.width,height:s.height}).data(\"target\",i);var l=new Image;l.src=i.attr(\"src\");var c=s.width+\"x\"+s.height+\" (\"+this.lang.image.original+\": \"+l.width+\"x\"+l.height+\")\";n.find(\".note-control-selection-info\").text(c),this.context.invoke(\"editor.saveTarget\",t)}else this.hide();return o}},{key:\"hide\",value:function(){this.context.invoke(\"editor.clearTarget\"),this.$handle.children().hide()}}],e&&Ee(t.prototype,e),o&&Ee(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function $e(t){return $e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},$e(t)}function Ie(t,e){for(var o=0;o\").html(n).attr(\"href\",o)[0];this.context.options.linkTargetBlank&&r()(i).attr(\"target\",\"_blank\"),this.lastWordRange.insertNode(i),this.lastWordRange=null,this.context.invoke(\"editor.focus\"),this.context.triggerEvent(\"change\",this.$editable.html(),this.$editable)}}}},{key:\"handleKeydown\",value:function(t){if(C.contains([Nt.code.ENTER,Nt.code.SPACE],t.keyCode)){var e=this.context.invoke(\"editor.createRange\").getWordRange();this.lastWordRange=e}}},{key:\"handleKeyup\",value:function(t){(Nt.code.SPACE===t.keyCode||Nt.code.ENTER===t.keyCode&&!t.shiftKey)&&this.replace()}}])&&Ie(t.prototype,e),o&&Ie(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function Fe(t){return Fe=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Fe(t)}function De(t,e){for(var o=0;o'),this.$placeholder.on(\"click\",(function(){t.context.invoke(\"focus\")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:\"destroy\",value:function(){this.$placeholder.remove()}},{key:\"update\",value:function(){var t=!this.context.invoke(\"codeview.isActivated\")&&this.context.invoke(\"editor.isEmpty\");this.$placeholder.toggle(t)}}])&&We(t.prototype,e),o&&We(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function Ve(t){return Ve=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Ve(t)}function _e(t,e){for(var o=0;o',''+this.lang.color.background+\"
\",\"\",'\",\"
\",'\\x3c!-- back colors --\\x3e
',\"\",'\",'',\"
\",'',\"\"].join(\"\"):\"\")+(n?['','
'+this.lang.color.foreground+\"
\",\"
\",'\",\"
\",'
\\x3c!-- fore colors --\\x3e
',\"
\",'\",'',\"
\",'
',\"
\"].join(\"\"):\"\"),callback:function(t){t.find(\".note-holder\").each((function(t,e){var o=r()(e);o.append(i.ui.palette({colors:i.options.colors,colorsName:i.options.colorsName,eventName:o.data(\"event\"),container:i.options.container,tooltip:i.options.tooltip}).render())}));var e=[[\"#FFFFFF\",\"#FFFFFF\",\"#FFFFFF\",\"#FFFFFF\",\"#FFFFFF\",\"#FFFFFF\",\"#FFFFFF\",\"#FFFFFF\"]];t.find(\".note-holder-custom\").each((function(t,o){var n=r()(o);n.append(i.ui.palette({colors:e,colorsName:e,eventName:n.data(\"event\"),container:i.options.container,tooltip:i.options.tooltip}).render())})),t.find(\"input[type=color]\").each((function(e,o){r()(o).on(\"change\",(function(){var e=t.find(\"#\"+r()(this).data(\"event\")).find(\".note-color-btn\").first(),o=this.value.toUpperCase();e.css(\"background-color\",o).attr(\"aria-label\",o).attr(\"data-value\",o).attr(\"data-original-title\",o),e.trigger(\"click\")}))}))},click:function(e){e.stopPropagation();var o=r()(\".\"+t).find(\".note-dropdown-menu\"),n=r()(e.target),a=n.data(\"event\"),s=n.attr(\"data-value\");if(\"openPalette\"===a){var l=o.find(\"#\"+s),c=r()(o.find(\"#\"+l.data(\"event\")).find(\".note-color-row\")[0]),u=c.find(\".note-color-btn\").last().detach(),d=l.val();u.css(\"background-color\",d).attr(\"aria-label\",d).attr(\"data-value\",d).attr(\"data-original-title\",d),c.prepend(u),l.trigger(\"click\")}else{if(C.contains([\"backColor\",\"foreColor\"],a)){var f=\"backColor\"===a?\"background-color\":\"color\",h=n.closest(\".note-color\").find(\".note-recent-color\"),p=n.closest(\".note-color\").find(\".note-current-color-button\");h.css(f,s),p.attr(\"data-\"+a,s)}i.context.invoke(\"editor.\"+a,s)}}})]}).render()}},{key:\"addToolbarButtons\",value:function(){var t=this;this.context.memo(\"button.style\",(function(){return t.ui.buttonGroup([t.button({className:\"dropdown-toggle\",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),tooltip:t.lang.style.style,data:{toggle:\"dropdown\"}}),t.ui.dropdown({className:\"dropdown-style\",items:t.options.styleTags,title:t.lang.style.style,template:function(e){\"string\"==typeof e&&(e={tag:e,title:Object.prototype.hasOwnProperty.call(t.lang.style,e)?t.lang.style[e]:e});var o=e.tag,n=e.title;return\"<\"+o+(e.style?' style=\"'+e.style+'\" ':\"\")+(e.className?' class=\"'+e.className+'\"':\"\")+\">\"+n+\"\"+o+\">\"},click:t.context.createInvokeHandler(\"editor.formatBlock\")})]).render()}));for(var e=function(){var e=t.options.styleTags[o];t.context.memo(\"button.style.\"+e,(function(){return t.button({className:\"note-btn-style-\"+e,contents:''+e.toUpperCase()+\"
\",tooltip:t.lang.style[e],click:t.context.createInvokeHandler(\"editor.formatBlock\")}).render()}))},o=0,n=this.options.styleTags.length;o',t.options),tooltip:t.lang.font.name,data:{toggle:\"dropdown\"}}),t.ui.dropdownCheck({className:\"dropdown-fontname\",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),title:t.lang.font.name,template:function(t){return''+t+\"\"},click:t.context.createInvokeHandlerAndUpdateState(\"editor.fontName\")})]).render()})),this.context.memo(\"button.fontsize\",(function(){return t.ui.buttonGroup([t.button({className:\"dropdown-toggle\",contents:t.ui.dropdownButtonContents('',t.options),tooltip:t.lang.font.size,data:{toggle:\"dropdown\"}}),t.ui.dropdownCheck({className:\"dropdown-fontsize\",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,title:t.lang.font.size,click:t.context.createInvokeHandlerAndUpdateState(\"editor.fontSize\")})]).render()})),this.context.memo(\"button.fontsizeunit\",(function(){return t.ui.buttonGroup([t.button({className:\"dropdown-toggle\",contents:t.ui.dropdownButtonContents('',t.options),tooltip:t.lang.font.sizeunit,data:{toggle:\"dropdown\"}}),t.ui.dropdownCheck({className:\"dropdown-fontsizeunit\",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizeUnits,title:t.lang.font.sizeunit,click:t.context.createInvokeHandlerAndUpdateState(\"editor.fontSizeUnit\")})]).render()})),this.context.memo(\"button.color\",(function(){return t.colorPalette(\"note-color-all\",t.lang.color.recent,!0,!0)})),this.context.memo(\"button.forecolor\",(function(){return t.colorPalette(\"note-color-fore\",t.lang.color.foreground,!1,!0)})),this.context.memo(\"button.backcolor\",(function(){return t.colorPalette(\"note-color-back\",t.lang.color.background,!0,!1)})),this.context.memo(\"button.ul\",(function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut(\"insertUnorderedList\"),click:t.context.createInvokeHandler(\"editor.insertUnorderedList\")}).render()})),this.context.memo(\"button.ol\",(function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut(\"insertOrderedList\"),click:t.context.createInvokeHandler(\"editor.insertOrderedList\")}).render()}));var i=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut(\"justifyLeft\"),click:this.context.createInvokeHandler(\"editor.justifyLeft\")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut(\"justifyCenter\"),click:this.context.createInvokeHandler(\"editor.justifyCenter\")}),s=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut(\"justifyRight\"),click:this.context.createInvokeHandler(\"editor.justifyRight\")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut(\"justifyFull\"),click:this.context.createInvokeHandler(\"editor.justifyFull\")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut(\"outdent\"),click:this.context.createInvokeHandler(\"editor.outdent\")}),u=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut(\"indent\"),click:this.context.createInvokeHandler(\"editor.indent\")});this.context.memo(\"button.justifyLeft\",g.invoke(i,\"render\")),this.context.memo(\"button.justifyCenter\",g.invoke(a,\"render\")),this.context.memo(\"button.justifyRight\",g.invoke(s,\"render\")),this.context.memo(\"button.justifyFull\",g.invoke(l,\"render\")),this.context.memo(\"button.outdent\",g.invoke(c,\"render\")),this.context.memo(\"button.indent\",g.invoke(u,\"render\")),this.context.memo(\"button.paragraph\",(function(){return t.ui.buttonGroup([t.button({className:\"dropdown-toggle\",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),tooltip:t.lang.paragraph.paragraph,data:{toggle:\"dropdown\"}}),t.ui.dropdown([t.ui.buttonGroup({className:\"note-align\",children:[i,a,s,l]}),t.ui.buttonGroup({className:\"note-list\",children:[c,u]})])]).render()})),this.context.memo(\"button.height\",(function(){return t.ui.buttonGroup([t.button({className:\"dropdown-toggle\",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),tooltip:t.lang.font.height,data:{toggle:\"dropdown\"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:\"dropdown-line-height\",title:t.lang.font.height,click:t.context.createInvokeHandler(\"editor.lineHeight\")})]).render()})),this.context.memo(\"button.table\",(function(){return t.ui.buttonGroup([t.button({className:\"dropdown-toggle\",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),tooltip:t.lang.table.table,data:{toggle:\"dropdown\"}}),t.ui.dropdown({title:t.lang.table.table,className:\"note-table\",items:['\",'1 x 1
'].join(\"\")})],{callback:function(e){e.find(\".note-dimension-picker-mousecatcher\").css({width:t.options.insertTableMaxSize.col+\"em\",height:t.options.insertTableMaxSize.row+\"em\"}).on(\"mousedown\",t.context.createInvokeHandler(\"editor.insertTable\")).on(\"mousemove\",t.tableMoveHandler.bind(t))}}).render()})),this.context.memo(\"button.link\",(function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut(\"linkDialog.show\"),click:t.context.createInvokeHandler(\"linkDialog.show\")}).render()})),this.context.memo(\"button.picture\",(function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.image.image,click:t.context.createInvokeHandler(\"imageDialog.show\")}).render()})),this.context.memo(\"button.video\",(function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler(\"videoDialog.show\")}).render()})),this.context.memo(\"button.hr\",(function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut(\"insertHorizontalRule\"),click:t.context.createInvokeHandler(\"editor.insertHorizontalRule\")}).render()})),this.context.memo(\"button.fullscreen\",(function(){return t.button({className:\"btn-fullscreen note-codeview-keep\",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.lang.options.fullscreen,click:t.context.createInvokeHandler(\"fullscreen.toggle\")}).render()})),this.context.memo(\"button.codeview\",(function(){return t.button({className:\"btn-codeview note-codeview-keep\",contents:t.ui.icon(t.options.icons.code),tooltip:t.lang.options.codeview,click:t.context.createInvokeHandler(\"codeview.toggle\")}).render()})),this.context.memo(\"button.redo\",(function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut(\"redo\"),click:t.context.createInvokeHandler(\"editor.redo\")}).render()})),this.context.memo(\"button.undo\",(function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut(\"undo\"),click:t.context.createInvokeHandler(\"editor.undo\")}).render()})),this.context.memo(\"button.help\",(function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.lang.options.help,click:t.context.createInvokeHandler(\"helpDialog.show\")}).render()}))}},{key:\"addImagePopoverButtons\",value:function(){var t=this;this.context.memo(\"button.resizeFull\",(function(){return t.button({contents:'100%',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler(\"editor.resize\",\"1\")}).render()})),this.context.memo(\"button.resizeHalf\",(function(){return t.button({contents:'50%',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler(\"editor.resize\",\"0.5\")}).render()})),this.context.memo(\"button.resizeQuarter\",(function(){return t.button({contents:'25%',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler(\"editor.resize\",\"0.25\")}).render()})),this.context.memo(\"button.resizeNone\",(function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.resizeNone,click:t.context.createInvokeHandler(\"editor.resize\",\"0\")}).render()})),this.context.memo(\"button.floatLeft\",(function(){return t.button({contents:t.ui.icon(t.options.icons.floatLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler(\"editor.floatMe\",\"left\")}).render()})),this.context.memo(\"button.floatRight\",(function(){return t.button({contents:t.ui.icon(t.options.icons.floatRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler(\"editor.floatMe\",\"right\")}).render()})),this.context.memo(\"button.floatNone\",(function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler(\"editor.floatMe\",\"none\")}).render()})),this.context.memo(\"button.removeMedia\",(function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler(\"editor.removeMedia\")}).render()}))}},{key:\"addLinkPopoverButtons\",value:function(){var t=this;this.context.memo(\"button.linkDialogShow\",(function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler(\"linkDialog.show\")}).render()})),this.context.memo(\"button.unlink\",(function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler(\"editor.unlink\")}).render()}))}},{key:\"addTablePopoverButtons\",value:function(){var t=this;this.context.memo(\"button.addRowUp\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler(\"editor.addRow\",\"top\")}).render()})),this.context.memo(\"button.addRowDown\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler(\"editor.addRow\",\"bottom\")}).render()})),this.context.memo(\"button.addColLeft\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler(\"editor.addCol\",\"left\")}).render()})),this.context.memo(\"button.addColRight\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler(\"editor.addCol\",\"right\")}).render()})),this.context.memo(\"button.deleteRow\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler(\"editor.deleteRow\")}).render()})),this.context.memo(\"button.deleteCol\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler(\"editor.deleteCol\")}).render()})),this.context.memo(\"button.deleteTable\",(function(){return t.button({className:\"btn-md\",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler(\"editor.deleteTable\")}).render()}))}},{key:\"build\",value:function(t,e){for(var o=0,n=e.length;o3&&c3&&ul&&ac)&&(this.isFollowing=!1,this.$toolbar.css({position:\"relative\",top:0,width:\"100%\",zIndex:\"auto\"}),this.$editable.css({marginTop:\"\"}))}},{key:\"changeContainer\",value:function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:\"updateFullscreen\",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(\".btn-fullscreen\"),t),this.changeContainer(t)}},{key:\"updateCodeview\",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(\".btn-codeview\"),t),t?this.deactivate():this.activate()}},{key:\"activate\",value:function(t){var e=this.$toolbar.find(\"button\");t||(e=e.not(\".note-codeview-keep\")),this.ui.toggleBtn(e,!0)}},{key:\"deactivate\",value:function(t){var e=this.$toolbar.find(\"button\");t||(e=e.not(\".note-codeview-keep\")),this.ui.toggleBtn(e,!1)}}])&&Xe(t.prototype,e),o&&Xe(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function to(t){return to=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},to(t)}function eo(t,e){for(var o=0;o','\"),''),\"\",'','\"),''),\"
\",this.options.disableLinkTarget?\"\":r()(\"\").append(this.ui.checkbox({className:\"sn-checkbox-open-in-new-window\",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(\"\"),o='');this.$dialog=this.ui.dialog({className:\"link-dialog\",title:this.lang.link.insert,fade:this.options.dialogsFade,body:e,footer:o}).render().appendTo(t)}},{key:\"destroy\",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:\"bindEnterKey\",value:function(t,e){t.on(\"keypress\",(function(t){t.keyCode===Nt.code.ENTER&&(t.preventDefault(),e.trigger(\"click\"))}))}},{key:\"checkLinkUrl\",value:function(t){return no.test(t)?\"mailto://\"+t:io.test(t)?\"tel://\"+t:ro.test(t)?t:\"http://\"+t}},{key:\"onCheckLinkUrl\",value:function(t){var e=this;t.on(\"blur\",(function(t){t.target.value=\"\"==t.target.value?\"\":e.checkLinkUrl(t.target.value)}))}},{key:\"toggleLinkBtn\",value:function(t,e,o){this.ui.toggleBtn(t,e.val()&&o.val())}},{key:\"showLinkDialog\",value:function(t){var e=this;return r().Deferred((function(o){var n=e.$dialog.find(\".note-link-text\"),i=e.$dialog.find(\".note-link-url\"),r=e.$dialog.find(\".note-link-btn\"),a=e.$dialog.find(\".sn-checkbox-open-in-new-window input[type=checkbox]\");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent(\"dialog.shown\"),!t.url&&g.isValidUrl(t.text)&&(t.url=e.checkLinkUrl(t.text)),n.on(\"input paste propertychange\",(function(){var o=n.val(),a=document.createElement(\"div\");a.innerText=o,o=a.innerHTML,t.text=o,e.toggleLinkBtn(r,n,i)})).val(t.text),i.on(\"input paste propertychange\",(function(){t.text||n.val(i.val()),e.toggleLinkBtn(r,n,i)})).val(t.url),m.isSupportTouch||i.trigger(\"focus\"),e.toggleLinkBtn(r,n,i),e.bindEnterKey(i,r),e.bindEnterKey(n,r),e.onCheckLinkUrl(i);var s=void 0!==t.isNewWindow?t.isNewWindow:e.context.options.linkTargetBlank;a.prop(\"checked\",s),r.one(\"click\",(function(r){r.preventDefault(),o.resolve({range:t.range,url:i.val(),text:n.val(),isNewWindow:a.is(\":checked\")}),e.ui.hideDialog(e.$dialog)}))})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),i.off(),r.off(),\"pending\"===o.state()&&o.reject()})),e.ui.showDialog(e.$dialog)})).promise()}},{key:\"show\",value:function(){var t=this,e=this.context.invoke(\"editor.getLinkInfo\");this.context.invoke(\"editor.saveRange\"),this.showLinkDialog(e).then((function(e){t.context.invoke(\"editor.restoreRange\"),t.context.invoke(\"editor.createLink\",e)})).fail((function(){t.context.invoke(\"editor.restoreRange\")}))}}])&&eo(t.prototype,e),o&&eo(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function so(t){return so=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},so(t)}function lo(t,e){for(var o=0;o ')}}).render().appendTo(this.options.container);var t=this.$popover.find(\".popover-content,.note-popover-content\");this.context.invoke(\"buttons.build\",t,this.options.popover.link),this.$popover.on(\"mousedown\",(function(t){t.preventDefault()}))}},{key:\"destroy\",value:function(){this.$popover.remove()}},{key:\"update\",value:function(){if(this.context.invoke(\"editor.hasFocus\")){var t=this.context.invoke(\"editor.getLastRange\");if(t.isCollapsed()&&t.isOnAnchor()){var e=pt.ancestor(t.sc,pt.isAnchor),o=r()(e).attr(\"href\");this.$popover.find(\"a\").attr(\"href\",o).text(o);var n=pt.posFromPlaceholder(e),i=r()(this.options.container).offset();n.top-=i.top,n.left-=i.left,this.$popover.css({display:\"block\",left:n.left,top:n.top})}else this.hide()}else this.hide()}},{key:\"hide\",value:function(){this.$popover.hide()}}])&&lo(t.prototype,e),o&&lo(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function fo(t){return fo=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},fo(t)}function ho(t,e){for(var o=0;o\".concat(this.lang.image.maximumFileSize+\" : \"+o,\"\")}var n=this.options.dialogsInBody?this.$body:this.options.container,i=['','\",'',t,\"
\",'','\",'',\"
\"].join(\"\"),r='');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(n)}},{key:\"destroy\",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:\"bindEnterKey\",value:function(t,e){t.on(\"keypress\",(function(t){t.keyCode===Nt.code.ENTER&&(t.preventDefault(),e.trigger(\"click\"))}))}},{key:\"show\",value:function(){var t=this;this.context.invoke(\"editor.saveRange\"),this.showImageDialog().then((function(e){t.ui.hideDialog(t.$dialog),t.context.invoke(\"editor.restoreRange\"),\"string\"==typeof e?t.options.callbacks.onImageLinkInsert?t.context.triggerEvent(\"image.link.insert\",e):t.context.invoke(\"editor.insertImage\",e):t.context.invoke(\"editor.insertImagesOrCallback\",e)})).fail((function(){t.context.invoke(\"editor.restoreRange\")}))}},{key:\"showImageDialog\",value:function(){var t=this;return r().Deferred((function(e){var o=t.$dialog.find(\".note-image-input\"),n=t.$dialog.find(\".note-image-url\"),i=t.$dialog.find(\".note-image-btn\");t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent(\"dialog.shown\"),o.replaceWith(o.clone().on(\"change\",(function(t){e.resolve(t.target.files||t.target.value)})).val(\"\")),n.on(\"input paste propertychange\",(function(){t.ui.toggleBtn(i,n.val())})).val(\"\"),m.isSupportTouch||n.trigger(\"focus\"),i.on(\"click\",(function(t){t.preventDefault(),e.resolve(n.val())})),t.bindEnterKey(n,i)})),t.ui.onDialogHidden(t.$dialog,(function(){o.off(),n.off(),i.off(),\"pending\"===e.state()&&e.reject()})),t.ui.showDialog(t.$dialog)}))}}])&&ho(t.prototype,e),o&&ho(t,o),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,o}();function vo(t){return vo=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},vo(t)}function go(t,e){for(var o=0;o','\"),''),\"\"].join(\"\"),o='');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:e,footer:o}).render().appendTo(t)}},{key:\"destroy\",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:\"bindEnterKey\",value:function(t,e){t.on(\"keypress\",(function(t){t.keyCode===Nt.code.ENTER&&(t.preventDefault(),e.trigger(\"click\"))}))}},{key:\"createVideoNode\",value:function(t){var e,o=t.match(/(?:youtu\\.be\\/|youtube\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?)\\/|\\S*?[?&]v=|shorts\\/|live\\/))([^&\\n?]+)(?:.*[?&]t=([^&\\n]+))?.*/),n=t.match(/(?:\\.|\\/\\/)drive\\.google\\.com\\/file\\/d\\/(.[a-zA-Z0-9_-]*)\\/view/),i=t.match(/(?:www\\.|\\/\\/)instagram\\.com\\/(reel|p)\\/(.[a-zA-Z0-9_-]*)/),a=t.match(/\\/\\/vine\\.co\\/v\\/([a-zA-Z0-9]+)/),s=t.match(/\\/\\/(player\\.)?vimeo\\.com\\/([a-z]*\\/)*(\\d+)[?]?.*/),l=t.match(/.+dailymotion.com\\/(video|hub)\\/([^_]+)[^#]*(#video=([^_&]+))?/),c=t.match(/\\/\\/v\\.youku\\.com\\/v_show\\/id_(\\w+)=*\\.html/),u=t.match(/\\/\\/(.*)\\/videos\\/watch\\/([^?]*)(?:\\?(?:start=(\\w*))?(?:&stop=(\\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=t.match(/\\/\\/v\\.qq\\.com.*?vid=(.+)/),f=t.match(/\\/\\/v\\.qq\\.com\\/x?\\/?(page|cover).*?\\/([^\\/]+)\\.html\\??.*/),h=t.match(/^.+.(mp4|m4v)$/),p=t.match(/^.+.(ogg|ogv)$/),m=t.match(/^.+.(webm)$/),v=t.match(/(?:www\\.|\\/\\/)facebook\\.com\\/([^\\/]+)\\/videos\\/([0-9]+)/);if(o&&11===o[1].length){var g=o[1],b=0;if(void 0!==o[2]){var y=o[2].match(/^(?:(\\d+)h)?(?:(\\d+)m)?(?:(\\d+)s)?$/);if(y)for(var k=[3600,60,1],w=0,C=k.length;w\").attr(\"frameborder\",0).attr(\"src\",\"//www.youtube.com/embed/\"+g+(b>0?\"?start=\"+b:\"\")).attr(\"width\",\"640\").attr(\"height\",\"360\")}else if(n&&n[0].length)e=r()(\"