11 lines
16 KiB
JavaScript
11 lines
16 KiB
JavaScript
|
/**
|
||
|
* 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.0.12 (2019-07-18)
|
||
|
*/
|
||
|
|
||
|
!function(a){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),c=function(n){return n.target_list},l=function(n){return n.rel_list},f=function(n){return n.link_class_list},v=function(n){var t=n.link_assume_external_targets;return"boolean"==typeof t&&t?1:"string"!=typeof t||"http"!==t&&"https"!==t?0:t},s=function(n){return"boolean"==typeof n.link_context_toolbar&&n.link_context_toolbar},g=function(n){return n.link_list},y=function(n){return"string"==typeof n.default_link_target},k=function(n){return n.default_link_target},m=c,d=function(n){return!1!==c(n)},h=l,x=function(n){return l(n)!==undefined},p=f,b=function(n){return f(n)!==undefined},O=function(n){return!1!==n.link_title},w=function(n){return"boolean"==typeof n.allow_unsafe_link_target&&n.allow_unsafe_link_target},A=function(n){return!0===n.link_quicklink},C=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),_=tinymce.util.Tools.resolve("tinymce.Env"),T=function(n){if(!_.ie||10<_.ie){var t=a.document.createElement("a");t.target="_blank",t.href=n,t.rel="noreferrer noopener";var e=a.document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,a.window,0,0,0,0,0,!1,!1,!1,!1,0,null),i=t,u=e,a.document.body.appendChild(i),i.dispatchEvent(u),a.document.body.removeChild(i)}else{var r=a.window.open("","_blank");if(r){r.opener=null;var o=r.document;o.open(),o.write('<meta http-equiv="refresh" content="0; url='+C.DOM.encode(n)+'">'),o.close()}}var i,u},N=function(){},S=function(n){return function(){return n}},D=S(!1),M=S(!0),L=D,E=M,U=function(){return R},R=(r={fold:function(n,t){return n()},is:L,isSome:L,isNone:E,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:U,ap:U,each:function(){},bind:U,flatten:U,exists:L,forall:E,filter:U,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:S("none()")},Object.freeze&&Object.freeze(r),r),P=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:E,isNone:L,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return P(n(e))},ap:function(n){return n.fold(U,function(n){return P(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:R},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(L,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},z={some:P,none:U,from:function(n){return null===n||n===undefined?R:P(n)}},q=function(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}},K=q("string"),I=q("array"),j=q("function"),B=Array.prototype.slice,V=(o=Array.prototype.indexOf)===undefined?function(n,t){return W(n,t)}:function(n,t){return o.call(n,t)},F=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e,n)}},W=function(n,t){for(var e=0,r=n.length;e<r;++e)if(n[e]===t)return e;return-1},H=Array.prototype.push,$=function(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!I(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);H.apply(t,n[e])}return t},G=function(n,t){var e=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o,n)}return r}(n,t);return $(e)},J=(j(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),X=function(n){return/^\w+:/i.test(n)},Q=function(n,t){var e,r,o=["noopener"],i=n?n.split(/\s+/):[],u=function(n){return n.filter(function(n){return-1===J.inArray(o,n)})},a=t?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<a.length?(r=a,J.trim(r.sort().join("
|