/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.1.2 (2019-11-19) */ !function(c){"use strict";function n(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===t}}function u(){}function i(n){return function(){return n}}function t(){return O}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),a=n("string"),f=n("array"),l=n("boolean"),s=n("function"),d=function(n){var t=n.getParam("link_assume_external_targets",!1);return l(t)&&t?1:!a(t)||"http"!==t&&"https"!==t?0:t},m=function(n){return n.getParam("link_context_toolbar",!1,"boolean")},h=function(n){return n.getParam("link_list")},p=function(n){return n.getParam("default_link_target")},g=function(n){return n.getParam("target_list",!0)},v=function(n){return n.getParam("rel_list",[],"array")},y=function(n){return n.getParam("link_class_list",[],"array")},w=function(n){return n.getParam("link_title",!0,"boolean")},x=function(n){return n.getParam("allow_unsafe_link_target",!1,"boolean")},k=function(n){return n.getParam("link_quicklink",!1,"boolean")},b=function(n){var t=c.document.createElement("a");t.target="_blank",t.href=n,t.rel="noreferrer noopener";var e=c.document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,c.window,0,0,0,0,0,!1,!1,!1,!1,0,null),function(n,t){c.document.body.appendChild(n),n.dispatchEvent(t),c.document.body.removeChild(n)}(t,e)},_=i(!1),T=i(!0),O=(e={fold:function(n,t){return n()},is:_,isSome:_,isNone:T,getOr:P,getOrThunk:C,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:P,orThunk:C,map:t,each:u,bind:t,exists:_,forall:T,filter:t,equals:A,equals_:A,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(e),e);function A(n){return n.isNone()}function C(n){return n()}function P(n){return n}function N(n,t){return-1]+>[^<]+<\/a>$/.test(n)||-1===n.indexOf("href=")))},cn=L,an=function(n,t){return function(n){return n.replace(/\uFEFF/g,"")}(t?t.innerText||t.textContent:n.getContent({format:"text"}))},fn=F,ln=j,sn={sanitize:function(n){return z(M)(n)},sanitizeWith:z,createUi:function(t,e){return function(n){return{name:t,type:"selectbox",label:e,items:n}}},getValue:M},dn=function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return dn(t())}}},mn=function(n,r){function e(n,t){var e=function(n,t){return"link"===t?n.catalogs.link:"anchor"===t?n.catalogs.anchor:$.none()}(r,t.name).getOr([]);return q(o.get(),t.name,e,n)}var o=dn(n.text);return{onChange:function(n,t){return"url"===t.name?function(n){if(o.get().length<=0){var t=n.url.meta.text!==undefined?n.url.meta.text:n.url.value;return $.some({text:t})}return $.none()}(n()):N(["anchor","link"],t.name)?e(n(),t):("text"===t.name&&o.set(n().text),$.none())}}},hn=function(){return(hn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e