fuck-tiny-cloud/plugins/tinymcespellchecker/plugin.min.js

10 lines
80 KiB
JavaScript
Raw Normal View History

2023-11-01 22:54:59 -04:00
/*!
* Tiny Spell Checker Pro plugin
*
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
*
* Version: 3.3.2-354
2023-11-01 22:54:59 -04:00
*/
!function(){"use strict";const e=Object.getPrototypeOf,t=(e,t,n)=>{var r;return!!n(e,t.prototype)||(null===(r=e.constructor)||void 0===r?void 0:r.name)===t.name},n=e=>n=>(e=>{const n=typeof e;return null===e?"null":"object"===n&&Array.isArray(e)?"array":"object"===n&&t(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":n})(n)===e,r=e=>t=>typeof t===e,o=e=>t=>e===t,s=n("string"),l=n("object"),a=n=>((n,r)=>l(n)&&t(n,r,((t,n)=>e(t)===n)))(n,Object),i=n("array"),c=o(null),u=r("boolean"),g=o(void 0),d=e=>null==e,p=e=>!d(e),m=r("function"),h=r("number"),f=(e,t)=>{if(i(e)){for(let n=0,r=e.length;n<r;++n)if(!t(e[n]))return!1;return!0}return!1},y=()=>{},w=(e,t)=>(...n)=>e(t.apply(null,n)),b=e=>()=>e,v=e=>e,x=(e,t)=>e===t;function k(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const S=e=>e(),T=e=>{e()},E=b(!1),O=b(!0);class C{constructor(e,t){this.tag=e,this.value=t}static some(e){return new C(!0,e)}static none(){return C.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?C.some(e(this.value)):C.none()}bind(e){return this.tag?e(this.value):C.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:C.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 p(e)?C.some(e):C.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()"}}C.singletonNone=new C(!1);const _=Array.prototype.slice,A=Array.prototype.indexOf,N=Array.prototype.push,D=(e,t)=>A.call(e,t),R=(e,t)=>D(e,t)>-1,I=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},L=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},j=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},M=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},P=(e,t,n)=>(j(e,((e,r)=>{n=t(n,e,r)})),n),B=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return C.some(o);if(n(o,r))break}return C.none()})(e,t,E),z=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return C.some(n);return C.none()},W=(e,t)=>(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!i(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);N.apply(t,e[n])}return t})(L(e,t)),F=(e,t)=>{for(let n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},q=e=>{const t=_.call(e,0);return t.reverse(),t},V=e=>[e],U=(e,t)=>t>=0&&t<e.length?C.some(e[t]):C.none(),$=e=>U(e,0),H=(e,t)=>{const n=[],r=m(t)?e=>I(n,(n=>t(n,e))):e=>R(n,e);for(let t=0,o=e.length;t<o;t++){const o=e[t];r(o)||n.push(o)}return n},J=Object.keys,K=Object.hasOwnProperty,Z=(e,t)=>{const n=J(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}},G=(e,t)=>Y(e,((e,n)=>({k:n,v:t(e,n)}))),Y=(e,t)=>{const n={};return Z(e,((e,r)=>{const o=t(e,r);n[o.k]=o.v})),n},X=(e,t)=>{const n=[];return Z(e,((e,r)=>{n.push(t(e,r))})),n},Q=(e,t)=>ee(e,t)?C.from(e[t]):C.none(),ee=(e,t)=>K.call(e,t),te="undefined"!=typeof window?window:Function("return this;")(),ne=(e,t)=>((e,t)=>{let n=null!=t?t:te;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),re=Object.getPrototypeOf,oe=e=>{const t=ne("ownerDocument.defaultView",e);return l(e)&&((e=>((e,t)=>{const n=((e,t)=>ne(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(re(e).constructor.name))},se=e=>e.dom.nodeName.toLowerCase(),le=e=>e.dom.nodeType,ae=e=>t=>le(t)===e,ie=e=>8===le(e)||"#comment"===se(e),ce=e=>ue(e)&&oe(e.dom),ue=ae(1),ge=ae(3),de=ae(9),pe=ae(11),me=e=>t=>ue(t)&&se(t)===e,he=(e,t,n)=>{if(!(s(n)||u(n)||h(n)))throw console.e