fuck-tiny-cloud/tinymce.min.js

40 lines
441 KiB
JavaScript
Raw Permalink Normal View History

/*!
* TinyMCE
*
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
*
* Version: 6.8.2
2023-10-09 16:16:12 -04:00
*/
!function(){"use strict";var e=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},n=t((function(e,t){return e===t})),o=function(e){return t((function(t,n){if(t.length!==n.length)return!1;for(var o=t.length,r=0;r<o;r++)if(!e.eq(t[r],n[r]))return!1;return!0}))},r=function(e){return t((function(r,s){var a=Object.keys(r),i=Object.keys(s);if(!function(e,n){return function(e,n){return t((function(t,o){return e.eq(n(t),n(o))}))}(o(e),(function(e){return function(e,t){return Array.prototype.slice.call(e).sort(t)}(e,n)}))}(n).eq(a,i))return!1;for(var l=a.length,d=0;d<l;d++){var c=a[d];if(!e.eq(r[c],s[c]))return!1}return!0}))},s=t((function(t,n){if(t===n)return!0;var a=e(t);return a===e(n)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(a)?t===n:"array"===a?o(s).eq(t,n):"object"===a&&r(s).eq(t,n))}));const a=Object.getPrototypeOf,i=(e,t,n)=>{var o;return!!n(e,t.prototype)||(null===(o=e.constructor)||void 0===o?void 0:o.name)===t.name},l=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&i(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,d=e=>t=>typeof t===e,c=e=>t=>e===t,u=(e,t)=>f(e)&&i(e,t,((e,t)=>a(e)===t)),m=l("string"),f=l("object"),g=e=>u(e,Object),p=l("array"),h=c(null),b=d("boolean"),v=c(void 0),y=e=>null==e,C=e=>!y(e),w=d("function"),x=d("number"),E=(e,t)=>{if(p(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},_=()=>{},k=(e,t)=>(...n)=>e(t.apply(null,n)),S=(e,t)=>n=>e(t(n)),N=e=>()=>e,R=e=>e,A=(e,t)=>e===t;function T(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const O=e=>t=>!e(t),B=e=>()=>{throw new Error(e)},P=e=>e(),D=e=>{e()},L=N(!1),M=N(!0);class I{constructor(e,t){this.tag=e,this.value=t}static some(e){return new I(!0,e)}static none(){return I.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?I.some(e(this.value)):I.none()}bind(e){return this.tag?e(this.value):I.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:I.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return C(e)?I.some(e):I.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}I.singletonNone=new I(!1);const F=Array.prototype.slice,U=Array.prototype.indexOf,z=Array.prototype.push,j=(e,t)=>U.call(e,t),H=(e,t)=>j(e,t)>-1,$=(e,t)=>{for(let n=0,o=e.length;n<o;n++)if(t(e[n],n))return!0;return!1},q=(e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o},V=(e,t)=>{for(let n=0,o=e.length;n<o;n++)t(e[n],n)},W=(e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)},K=(e,t)=>{const n=[],o=[];for(let r=0,s=e.length;r<s;r++){const s=e[r];(t(s,r)?n:o).push(s)}return{pass:n,fail:o}},Y=(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=e[o];t(r,o)&&n.push(r)}return n},G=(e,t,n)=>(W(e,((e,o)=>{n=t(n,e,o)})),n),X=(e,t,n)=>(V(e,((e,o)=>{n=t(n,e,o)})),n),Q=(e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return I.some(r);if(n(r,o))break}return I.none()},J=(e,t)=>Q(e,t,L),Z=(e,t)=>{for(let n=0,o=e.length;n<o;n++)if(t(e[n],n))return I.some(n);return I.none()},ee=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!p(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);z.apply(t,e[n])}return t},te=(e,t)=>ee(q(e,t)),ne=(e,t)=>{for(
/* Ephox Fluffy plugin
*
* Copyright 2010-2016 Ephox Corporation. All rights reserved.
*
* Version: 2.8.0-17
*/
!function(){"use strict";function n(r){return function(n){return t=typeof(n=n),(null===n?"null":"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)===r;var t}}function t(n,t){return{isRequired:n,applyPatch:t}}function u(e,i){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=i.apply(this,n),r=v(r)?n:r;return e.apply(this,r)}}function r(){return p}function o(n,t){for(var r=0,e=n.length;r<e;r++)t(n[r],r)}function e(n,t){for(var r=function(n,t){for(var r=n.length,e=new Array(r),i=0;i<r;i++){var o=n[i];e[i]=t(o,i)}return e}(n,t),e=[],i=0,o=r.length;i<o;++i){if(!g(r[i]))throw new Error("Arr.flatten item "+i+" was not an array, input: "+r);w.apply(e,r[i])}return e}function a(r){return function(n,t){r[t]=n}}function i(c){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var r,e,i={},o=0;o<n.length;o++){var u,a=n[o];for(u in a)r=a,e=u,U.call(r,e)&&(i[u]=c(i[u],a[u]))}return i}}function c(n){var t;return null!=(t=n.defaultOptions)?t:n.defaultSettings}function f(n,t){var n=x(n,t),r=M(t.plugins),e=n.custom_plugin_urls||{},e=k(e,function(n,t){return L(r,t)}),n=n.external_plugins||{},i={},e=(E(e.t,function(n,t){i[t]=n}),A(i,n)),n=0===b(e).length?{}:{external_plugins:e};return A(t,n)}var l,s,p,d=n("object"),g=n("array"),v=(l=void 0,function(n){return l===n}),y=(s="function",function(n){return typeof n===s}),m="undefined"!=typeof window?window:Function("return this;")(),h=(p=!0,Array.prototype.indexOf),w=Array.prototype.push,L=function(n,t){return-1<h.call(n,t)},b=Object.keys,U=Object.hasOwnProperty,E=function(n,t){for(var r=b(n),e=0,i=r.length;e<i;e++){var o=r[e];t(n[o],o)}},k=function(n,t){var r,e,i,o={},u={};return r=t,e=a(o),i=a(u),E(n,function(n,t){(r(n,t)?e:i)(n,t)}),{t:o,f:u}},x=i(function(n,t){return d(n)&&d(t)?x(n,t):t}),A=i(function(n,t){return t}),M=function(n){if(v(n)||""===n)return[];n=g(n)?e(n,function(n){return n.split(/[\s+,]/)}):n.split(/[\s+,]/);return e(n,function(n){return 0<n.length?[n.trim()]:[]})},q=t(r,function(r){var n=r.EditorManager;n.init=u(n.init,function(n){return[f(c(r),n)]}),n.createEditor=u(n.createEditor,function(n,t){return[n,f(c(r),t)]})});function j(n,t,r){if(r||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||((e=e||Array.prototype.slice.call(t,0,i))[i]=t[i]);return n.concat(e||Array.prototype.slice.call(t))}function S(n){return parseInt(n,10)}function I(n,t){return 0==(n-=t)?0:0<n?1:-1}function _(n,t,r){return{major:n,minor:t,patch:r}}function O(e,i){return function(n){var t=M(n.plugins),r=$(i),r=0<r.length?t.concat(r):t;return[e.util.Tools.extend({},n,{plugins:r})]}}function N(n,t){D(t,".tox-notifications-container","block"),T(n,"6.0.0")&&D(t,".tox-notification","-ms-grid"),D(t,".tox-notification","grid"),D(t,".mce-notification","block")}function R(){return(new Date).getTime()}function V(r){return function(){n="position";var n,t=(((t=r).currentStyle||window.getComputedStyle(t,null))[n]||"").toLowerCase();return"absolute"===t||"fixed"===t}}function C(n){n.parentNode.removeChild(n)}function z(n){var t=n,r=[H,W,X,G,q];if(t)for(var e=0;e<r.length;e++)r[e].isRequired(t)&&r[e].applyPatch(t)}var P=function(n){n=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(n);return n?_(S(n[1]),S(n[2]),S(n[3])):_(0,0,0)},B=function(n,t){var r=I(n.major,t.major);if(0!==r)return r;r=I(n.minor,t.minor);if(0!==r)return r;r=I(n.patch,t.patch);return 0!==r?r:0},F=function(n){return P([n.majorVersion,n.minorVersion].join(".").split(".").slice(0,3).join("."))},T=function(n,t){return!!n&&-1===B(F(n),P(t))},$=function(n){n=c(n).forced_plugins;return n||[]},G=t(function(n){return T(n,"4.7.0")},function(n){var r=n,e=r.EditorManager;e.init=u(e.init,O(r,e)),e.createEditor=u(e.createEditor,function(n,t){return j([n],O(r,e)(t),!0)})}),D=function(e,n,i){n=document.querySelectorAll(n);o(n,function(n){var t,r;"none"===window.getComputedStyle(n).dis
(function(cloudSettings) {
var entryUrl =
document.currentScript != null &&
typeof document.currentScript.src === "string"
? document.currentScript.src
: null;
cloudSettings["tiny_cloud_entry_url"] = entryUrl;
tinymce.overrideDefaults(cloudSettings);
})({"rtc_tenant_id":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","editimage_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","imagetools_proxy":"https://imageproxy.tiny.cloud/2/image","autocorrect_service_url":"https://spelling.tiny.cloud","suffix":".min","linkchecker_service_url":"https://hyperlinking.tiny.cloud","spellchecker_rpc_url":"https://spelling.tiny.cloud","spellchecker_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","tinydrive_service_url":"https://catalog.tiny.cloud","api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","imagetools_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","tinydrive_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","export_image_proxy_service_url":"https://imageproxy.tiny.cloud","forced_plugins":["chiffer"],"referrer_policy":"origin","content_css_cors":true,"custom_plugin_urls":{},"chiffer_snowplow_service_url":"https://sp.tinymce.com/i","mediaembed_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","promotion":false,"rtc_service_url":"https://rtc.tiny.cloud","editimage_proxy_service_url":"https://imageproxy.tiny.cloud","linkchecker_api_key":"qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc","chiffer_cdp_init_service_url":"https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/6.8.2-45/cdn-init","mediaembed_service_url":"https://hyperlinking.tiny.cloud"});
tinymce.baseURL = "https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/6.8.2-45"
/*!
* Tiny Chiffer plugin
*
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
*
* Version: 3.1.0-23
*/
!function(){"use strict";function e(t){return function(e){return n=typeof(e=e),(null===e?"null":"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)===t;var n}}function n(n){return function(e){return typeof e===n}}function a(e){return!(null==e)}function o(){}function i(e){return function(){return e}}function t(e){return e}var r,s=e("string"),u=e("object"),c=n("boolean"),l=function(e){return r===e},f=n("function"),C=n("number"),d=i(!1),m=i(!(r=void 0)),p=function(){return(p=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function g(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function v(){return y}var F=function(e){var e=e.chiffer_cdp_init_service_url,n=tinymce.baseURI;return s(e)?e:n.toAbsolute("cdn-init")},y={fold:function(e,n){return e()},isSome:d,isNone:m,getOr:t,getOrThunk:h,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:t,orThunk:h,map:v,each:o,bind:v,exists:d,forall:m,filter:function(){return y},toArray:function(){return[]},toString:i("none()")};function h(e){return e()}function b(t){function e(){return o}function n(e){return e(t)}var r=i(t),o={fold:function(e,n){return n(t)},isSome:m,isNone:d,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return b(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?o:y},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o}function N(e,t,r,o){for(var n=e,i=function(e,n){(t(e,n)?r:o)(e,n)},c=R(n),a=0,u=c.length;a<u;a++){var s=c[a];i(n[s],s)}}function _(e,n){var t,r={};return N(e,n,(t=r,function(e,n){t[n]=e}),o),r}function z(){return(new Date).getTime()}function w(e){return parseInt(e,10)}function L(e,n,t){return{major:e,minor:n,patch:t}}function M(e){return se(e.editorManager)}function H(e,n){return-1<fe.call(e,n)}function S(i,c){return function(e){var n=e.options,t=c.processor,r=c.legacyProcessor,o=c.defaultValue;return(a(n)?(n.isSet(i)?T.from(n.get(i)):T.none()).bind(t):r(e.getParam(i))).getOr(o)}}function K(e){return ge(e,"/")}function J(n){return function(e){return n(e)?T.some(e):T.none()}}function k(e){return E(e).filter((n=K,function(e){return!n(e)}));var n}function O(e){return s(e)?T.some(e):c(e)||C(e)?T.some(e.toString()):T.none()}function W(e){return e=e.plugins,e=_(e,function(e,n){var t=H(me,n),e=!!e.isStub;return!!n&&!e&&!("chiffer"===n)&&t}),0<(e=R(e)).length?e:void 0}function Z(e){var n,t,r=tinymce.Env,o=ue(),i="unknown",r=(u(r.os)&&(n={name:r.os.current||i,version:null==(n=r.os.version)?void 0:n.major.toString()}),u(r.os)&&(t={name:r.browser.current||i,version:null==(i=r.browser.version)?void 0:i.major.toString()}),null==o?void 0:o.timeZone),i=null==o?void 0:o.locale,o={width:window.innerWidth,height:window.innerHeight,density:window.devicePixelRatio},c=navigator.userAgent,a=function(){var e;try{return null==(e=navigator.userAgentData)?void 0:e.toJSON()}catch(e){}}();return p(p({},e),{browser:t,os:n,timezone:r,locale:i,screen:o,userAgent:c,userAgentData:a})}function q(e,n){var t=function(e){e=M(e);return"".concat(e.major,".").concat(e.minor,".").concat(e.patch)}(e),r=pe.getIdForEditor(e);return{apiKey:n.apiKey,pageId:n.pageId,editorId:r,editorVersion:t,editorOptions:function(e){var n,t,r,o,i,c,a,u,s,l,f;if(!le(e))return n=ve(e),t=Se(e),r=ye(e),o=he(e),i=be(e),c=we(e),a=_e(e),u=Pe(e),s=ke(e),l=Oe(e),f=Ie(e),{plugins:W(e),icons:i,inline:n,language:t,readonly:r,resize:o,skin:c,theme:a,height:u,toolbarMode:s,toolbarLocation:l,uiMode:f}}(e)}}function B(e){return"plugin_".concat(e,"_loaded")}var G,Q,I,X,P,Y,$,ee,j,ne,x,A,T={some:b,none:v,from:function(e){return null==e?y:b(e)}