11 lines
9.7 KiB
JavaScript
11 lines
9.7 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.16 (2019-09-24)
|
||
|
*/
|
||
|
|
||
|
!function(a){"use strict";function e(){}function d(e){return function(){return e}}function n(){return c}var r,t=function(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(n())}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return{isFullscreen:function(){return null!==e.get()}}},u=d(!1),s=d(!0),c=(r={fold:function(e,n){return e()},is:u,isSome:u,isNone:s,getOr:m,getOrThunk:l,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:m,orThunk:l,map:n,each:e,bind:n,exists:u,forall:s,filter:n,equals:f,equals_:f,toArray:function(){return[]},toString:d("none()")},Object.freeze&&Object.freeze(r),r);function f(e){return e.isNone()}function l(e){return e()}function m(e){return e}function h(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}}function g(e,n){return-1!==e.indexOf(n)}function v(e,n,r){if(!D(r))throw a.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);!function(e){return e.style!==undefined&&F(e.style.getPropertyValue)}(e)||e.style.setProperty(n,r)}function O(e,n){var r=e.dom();!function(e,n){for(var r=R(e),t=0,o=r.length;t<o;t++){var i=r[t];n(e[i],i)}}(n,function(e,n){v(r,n,e)})}function S(e,n){var r=function(e,n){for(var r=0;r<e.length;r++){var t=e[r];if(t.test(n))return t}return undefined}(e,n);if(!r)return{major:0,minor:0};function t(e){return Number(n.replace(r,"$"+e))}return j(t(1),t(2))}function w(e,n){return function(){return n===e}}function x(e,n){return function(){return n===e}}function E(e,n){var r=String(n).toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++){var o=e[r];if(n(o,r))return A.some(o)}return A.none()}(e,function(e){return e.search(r)})}function p(n){return function(e){return g(e,n)}}var N,T,y,C,b=function(r){function e(){return o}function n(e){return e(r)}var t=d(r),o={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:s,isNone:u,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(e){return b(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){return e(r)?o:c},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(u,function(e){return n(r,e)})}};return o},A={some:b,none:n,from:function(e){return null===e||e===undefined?c:b(e)}},D=h("string"),F=h("function"),_=Array.prototype.slice,R=(F(Array.from)&&Array.from,Object.keys),M=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:d(e)}},P={fromHtml:function(e,n){var r=(n||a.document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||1<r.childNodes.length)throw a.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return M(r.childNodes[0])},fromTag:function(e,n){var r=(n||a.document).createElement(e);return M(r)},fromText:function(e,n){var r=(n||a.document).createTextNode(e);return M(r)},fromDom:M,fromPoint:function(e,n,r){var t=e.dom();return A.from(t.elementFromPoint(n,r)).map(M)}},L=(a.Node.ATTRIBUTE_NODE,a.Node.CDATA_SECTION_NODE,a.Node.COMMENT_NODE,a.Node.DOCUMENT_NODE,a.Node.DOCUMENT_TYPE_NODE,a.Node.DOCUMENT_FRAGMENT_NODE,a.Node.ELEMENT_NODE,a.Node.TEXT_NODE,a.Node.PROCESSING_INSTRUCTION_NODE,a.Node.ENTITY_REFERENCE_NODE,a.Node.ENTITY_NODE,a.Node.NOTATION_NODE,"undefined"!=typeof a.window?a.window:Function("return this;")(),tinymce.util.Tools.resolve("tinymce.dom.DOMUtils")),k=function(e,n){e.fire("FullscreenStateChanged",{state:n})},I=function(){return j(0,0)},j=function(e,n){return{major:e,minor:n}},H={nu:j,detect:function(e,n){var r=String(n).toLowerCase();return 0===e.length?I():S(e,r)},unknown:I},W="Fir
|