@lotte-innovate/ui-component-test 0.2.55 → 0.2.57
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lib/_virtual/_commonjsHelpers.mjs +2 -0
- package/dist/lib/_virtual/_commonjsHelpers.mjs.map +1 -0
- package/dist/lib/_virtual/model.mjs +2 -0
- package/dist/lib/_virtual/model.mjs.map +1 -0
- package/dist/lib/_virtual/model2.mjs +2 -0
- package/dist/lib/_virtual/model2.mjs.map +1 -0
- package/dist/lib/_virtual/plugin.mjs +2 -0
- package/dist/lib/_virtual/plugin.mjs.map +1 -0
- package/dist/lib/_virtual/plugin10.mjs +2 -0
- package/dist/lib/_virtual/plugin10.mjs.map +1 -0
- package/dist/lib/_virtual/plugin11.mjs +2 -0
- package/dist/lib/_virtual/plugin11.mjs.map +1 -0
- package/dist/lib/_virtual/plugin12.mjs +2 -0
- package/dist/lib/_virtual/plugin12.mjs.map +1 -0
- package/dist/lib/_virtual/plugin13.mjs +2 -0
- package/dist/lib/_virtual/plugin13.mjs.map +1 -0
- package/dist/lib/_virtual/plugin14.mjs +2 -0
- package/dist/lib/_virtual/plugin14.mjs.map +1 -0
- package/dist/lib/_virtual/plugin15.mjs +2 -0
- package/dist/lib/_virtual/plugin15.mjs.map +1 -0
- package/dist/lib/_virtual/plugin16.mjs +2 -0
- package/dist/lib/_virtual/plugin16.mjs.map +1 -0
- package/dist/lib/_virtual/plugin17.mjs +2 -0
- package/dist/lib/_virtual/plugin17.mjs.map +1 -0
- package/dist/lib/_virtual/plugin18.mjs +2 -0
- package/dist/lib/_virtual/plugin18.mjs.map +1 -0
- package/dist/lib/_virtual/plugin19.mjs +2 -0
- package/dist/lib/_virtual/plugin19.mjs.map +1 -0
- package/dist/lib/_virtual/plugin2.mjs +2 -0
- package/dist/lib/_virtual/plugin2.mjs.map +1 -0
- package/dist/lib/_virtual/plugin20.mjs +2 -0
- package/dist/lib/_virtual/plugin20.mjs.map +1 -0
- package/dist/lib/_virtual/plugin21.mjs +2 -0
- package/dist/lib/_virtual/plugin21.mjs.map +1 -0
- package/dist/lib/_virtual/plugin22.mjs +2 -0
- package/dist/lib/_virtual/plugin22.mjs.map +1 -0
- package/dist/lib/_virtual/plugin23.mjs +2 -0
- package/dist/lib/_virtual/plugin23.mjs.map +1 -0
- package/dist/lib/_virtual/plugin24.mjs +2 -0
- package/dist/lib/_virtual/plugin24.mjs.map +1 -0
- package/dist/lib/_virtual/plugin25.mjs +2 -0
- package/dist/lib/_virtual/plugin25.mjs.map +1 -0
- package/dist/lib/_virtual/plugin26.mjs +2 -0
- package/dist/lib/_virtual/plugin26.mjs.map +1 -0
- package/dist/lib/_virtual/plugin27.mjs +2 -0
- package/dist/lib/_virtual/plugin27.mjs.map +1 -0
- package/dist/lib/_virtual/plugin28.mjs +2 -0
- package/dist/lib/_virtual/plugin28.mjs.map +1 -0
- package/dist/lib/_virtual/plugin29.mjs +2 -0
- package/dist/lib/_virtual/plugin29.mjs.map +1 -0
- package/dist/lib/_virtual/plugin3.mjs +2 -0
- package/dist/lib/_virtual/plugin3.mjs.map +1 -0
- package/dist/lib/_virtual/plugin30.mjs +2 -0
- package/dist/lib/_virtual/plugin30.mjs.map +1 -0
- package/dist/lib/_virtual/plugin31.mjs +2 -0
- package/dist/lib/_virtual/plugin31.mjs.map +1 -0
- package/dist/lib/_virtual/plugin32.mjs +2 -0
- package/dist/lib/_virtual/plugin32.mjs.map +1 -0
- package/dist/lib/_virtual/plugin33.mjs +2 -0
- package/dist/lib/_virtual/plugin33.mjs.map +1 -0
- package/dist/lib/_virtual/plugin34.mjs +2 -0
- package/dist/lib/_virtual/plugin34.mjs.map +1 -0
- package/dist/lib/_virtual/plugin35.mjs +2 -0
- package/dist/lib/_virtual/plugin35.mjs.map +1 -0
- package/dist/lib/_virtual/plugin36.mjs +2 -0
- package/dist/lib/_virtual/plugin36.mjs.map +1 -0
- package/dist/lib/_virtual/plugin37.mjs +2 -0
- package/dist/lib/_virtual/plugin37.mjs.map +1 -0
- package/dist/lib/_virtual/plugin38.mjs +2 -0
- package/dist/lib/_virtual/plugin38.mjs.map +1 -0
- package/dist/lib/_virtual/plugin39.mjs +2 -0
- package/dist/lib/_virtual/plugin39.mjs.map +1 -0
- package/dist/lib/_virtual/plugin4.mjs +2 -0
- package/dist/lib/_virtual/plugin4.mjs.map +1 -0
- package/dist/lib/_virtual/plugin40.mjs +2 -0
- package/dist/lib/_virtual/plugin40.mjs.map +1 -0
- package/dist/lib/_virtual/plugin41.mjs +2 -0
- package/dist/lib/_virtual/plugin41.mjs.map +1 -0
- package/dist/lib/_virtual/plugin42.mjs +2 -0
- package/dist/lib/_virtual/plugin42.mjs.map +1 -0
- package/dist/lib/_virtual/plugin43.mjs +2 -0
- package/dist/lib/_virtual/plugin43.mjs.map +1 -0
- package/dist/lib/_virtual/plugin44.mjs +2 -0
- package/dist/lib/_virtual/plugin44.mjs.map +1 -0
- package/dist/lib/_virtual/plugin45.mjs +2 -0
- package/dist/lib/_virtual/plugin45.mjs.map +1 -0
- package/dist/lib/_virtual/plugin46.mjs +2 -0
- package/dist/lib/_virtual/plugin46.mjs.map +1 -0
- package/dist/lib/_virtual/plugin47.mjs +2 -0
- package/dist/lib/_virtual/plugin47.mjs.map +1 -0
- package/dist/lib/_virtual/plugin48.mjs +2 -0
- package/dist/lib/_virtual/plugin48.mjs.map +1 -0
- package/dist/lib/_virtual/plugin49.mjs +2 -0
- package/dist/lib/_virtual/plugin49.mjs.map +1 -0
- package/dist/lib/_virtual/plugin5.mjs +2 -0
- package/dist/lib/_virtual/plugin5.mjs.map +1 -0
- package/dist/lib/_virtual/plugin50.mjs +2 -0
- package/dist/lib/_virtual/plugin50.mjs.map +1 -0
- package/dist/lib/_virtual/plugin51.mjs +2 -0
- package/dist/lib/_virtual/plugin51.mjs.map +1 -0
- package/dist/lib/_virtual/plugin52.mjs +2 -0
- package/dist/lib/_virtual/plugin52.mjs.map +1 -0
- package/dist/lib/_virtual/plugin53.mjs +2 -0
- package/dist/lib/_virtual/plugin53.mjs.map +1 -0
- package/dist/lib/_virtual/plugin54.mjs +2 -0
- package/dist/lib/_virtual/plugin54.mjs.map +1 -0
- package/dist/lib/_virtual/plugin55.mjs +2 -0
- package/dist/lib/_virtual/plugin55.mjs.map +1 -0
- package/dist/lib/_virtual/plugin56.mjs +2 -0
- package/dist/lib/_virtual/plugin56.mjs.map +1 -0
- package/dist/lib/_virtual/plugin6.mjs +2 -0
- package/dist/lib/_virtual/plugin6.mjs.map +1 -0
- package/dist/lib/_virtual/plugin7.mjs +2 -0
- package/dist/lib/_virtual/plugin7.mjs.map +1 -0
- package/dist/lib/_virtual/plugin8.mjs +2 -0
- package/dist/lib/_virtual/plugin8.mjs.map +1 -0
- package/dist/lib/_virtual/plugin9.mjs +2 -0
- package/dist/lib/_virtual/plugin9.mjs.map +1 -0
- package/dist/lib/_virtual/theme.mjs +2 -0
- package/dist/lib/_virtual/theme.mjs.map +1 -0
- package/dist/lib/_virtual/theme2.mjs +2 -0
- package/dist/lib/_virtual/theme2.mjs.map +1 -0
- package/dist/lib/_virtual/tinymce.mjs +2 -0
- package/dist/lib/_virtual/tinymce.mjs.map +1 -0
- package/dist/lib/_virtual/tinymce2.mjs +2 -0
- package/dist/lib/_virtual/tinymce2.mjs.map +1 -0
- package/dist/lib/components/Datepicker/index.mjs +1 -1
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs +2 -0
- package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/icons/default/icons.mjs +2 -0
- package/dist/lib/node_modules/tinymce/icons/default/icons.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/models/dom/model.mjs +2 -0
- package/dist/lib/node_modules/tinymce/models/dom/model.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/accordion/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/accordion/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/advlist/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/advlist/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/anchor/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/anchor/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/autolink/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/autolink/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/autosave/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/autosave/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/charmap/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/charmap/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/code/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/code/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/codesample/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/codesample/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/directionality/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/directionality/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/emoticons/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/emoticons/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/fullscreen/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/fullscreen/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/image/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/image/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/importcss/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/importcss/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/insertdatetime/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/insertdatetime/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/link/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/link/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/lists/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/lists/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/media/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/media/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/nonbreaking/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/nonbreaking/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/pagebreak/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/pagebreak/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/preview/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/preview/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/quickbars/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/quickbars/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/save/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/save/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/searchreplace/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/searchreplace/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/table/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/table/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/template/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/template/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/visualblocks/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/visualblocks/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/visualchars/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/visualchars/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/plugins/wordcount/plugin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/plugins/wordcount/plugin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/skins/ui/oxide/skin.mjs +2 -0
- package/dist/lib/node_modules/tinymce/skins/ui/oxide/skin.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/themes/silver/theme.mjs +2 -0
- package/dist/lib/node_modules/tinymce/themes/silver/theme.mjs.map +1 -0
- package/dist/lib/node_modules/tinymce/tinymce.mjs +2 -0
- package/dist/lib/node_modules/tinymce/tinymce.mjs.map +1 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/useLoadTinyMCE.mjs +1 -1
- package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
- package/dist/lib/node_modules/@babel/runtime/helpers/esm/typeof.mjs +0 -2
- package/dist/lib/node_modules/@babel/runtime/helpers/esm/typeof.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/addLeadingZeros/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/addLeadingZeros/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/defaultLocale/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/defaultLocale/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/defaultOptions/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/defaultOptions/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/format/formatters/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/format/formatters/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/format/lightFormatters/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/format/lightFormatters/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/format/longFormatters/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/format/longFormatters/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeek/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeek/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/protectedTokens/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/protectedTokens/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/requiredArgs/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/requiredArgs/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/_lib/toInteger/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/_lib/toInteger/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/addMilliseconds/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/addMilliseconds/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/format/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/format/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/isDate/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/isDate/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/isValid/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/isValid/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/match/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/match/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/locale/en-US/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/subMilliseconds/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/subMilliseconds/index.mjs.map +0 -1
- package/dist/lib/node_modules/date-fns/esm/toDate/index.mjs +0 -2
- package/dist/lib/node_modules/date-fns/esm/toDate/index.mjs.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/directionality/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType$1 = type => value => typeOf(value) === type;\n const isSimpleType = type => value => typeof value === type;\n const isString = isType$1('string');\n const isBoolean = isSimpleType('boolean');\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n const isFunction = isSimpleType('function');\n const isNumber = isSimpleType('number');\n\n const compose1 = (fbc, fab) => a => fbc(fab(a));\n const constant = value => {\n return () => {\n return value;\n };\n };\n const never = constant(false);\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const map = (xs, f) => {\n const len = xs.length;\n const r = new Array(len);\n for (let i = 0; i < len; i++) {\n const x = xs[i];\n r[i] = f(x, i);\n }\n return r;\n };\n const each = (xs, f) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n f(x, i);\n }\n };\n const filter = (xs, pred) => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n r.push(x);\n }\n }\n return r;\n };\n\n const DOCUMENT = 9;\n const DOCUMENT_FRAGMENT = 11;\n const ELEMENT = 1;\n const TEXT = 3;\n\n const fromHtml = (html, scope) => {\n const doc = scope || document;\n const div = doc.createElement('div');\n div.innerHTML = html;\n if (!div.hasChildNodes() || div.childNodes.length > 1) {\n const message = 'HTML does not have a single root node';\n console.error(message, html);\n throw new Error(message);\n }\n return fromDom(div.childNodes[0]);\n };\n const fromTag = (tag, scope) => {\n const doc = scope || document;\n const node = doc.createElement(tag);\n return fromDom(node);\n };\n const fromText = (text, scope) => {\n const doc = scope || document;\n const node = doc.createTextNode(text);\n return fromDom(node);\n };\n const fromDom = node => {\n if (node === null || node === undefined) {\n throw new Error('Node cannot be null or undefined');\n }\n return { dom: node };\n };\n const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);\n const SugarElement = {\n fromHtml,\n fromTag,\n fromText,\n fromDom,\n fromPoint\n };\n\n const is = (element, selector) => {\n const dom = element.dom;\n if (dom.nodeType !== ELEMENT) {\n return false;\n } else {\n const elem = dom;\n if (elem.matches !== undefined) {\n return elem.matches(selector);\n } else if (elem.msMatchesSelector !== undefined) {\n return elem.msMatchesSelector(selector);\n } else if (elem.webkitMatchesSelector !== undefined) {\n return elem.webkitMatchesSelector(selector);\n } else if (elem.mozMatchesSelector !== undefined) {\n return elem.mozMatchesSelector(selector);\n } else {\n throw new Error('Browser lacks native selectors');\n }\n }\n };\n\n typeof window !== 'undefined' ? window : Function('return this;')();\n\n const name = element => {\n const r = element.dom.nodeName;\n return r.toLowerCase();\n };\n const type = element => element.dom.nodeType;\n const isType = t => element => type(element) === t;\n const isElement = isType(ELEMENT);\n const isText = isType(TEXT);\n const isDocument = isType(DOCUMENT);\n const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n const isTag = tag => e => isElement(e) && name(e) === tag;\n\n const owner = element => SugarElement.fromDom(element.dom.ownerDocument);\n const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);\n const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n const children$2 = element => map(element.dom.childNodes, SugarElement.fromDom);\n\n const rawSet = (dom, key, value) => {\n if (isString(value) || isBoolean(value) || isNumber(value)) {\n dom.setAttribute(key, value + '');\n } else {\n console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n throw new Error('Attribute value was not simple');\n }\n };\n const set = (element, key, value) => {\n rawSet(element.dom, key, value);\n };\n const remove = (element, key) => {\n element.dom.removeAttribute(key);\n };\n\n const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);\n const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;\n const getShadowRoot = e => {\n const r = getRootNode(e);\n return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n };\n const getShadowHost = e => SugarElement.fromDom(e.dom.host);\n\n const inBody = element => {\n const dom = isText(element) ? element.dom.parentNode : element.dom;\n if (dom === undefined || dom === null || dom.ownerDocument === null) {\n return false;\n }\n const doc = dom.ownerDocument;\n return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n };\n\n const ancestor$1 = (scope, predicate, isRoot) => {\n let element = scope.dom;\n const stop = isFunction(isRoot) ? isRoot : never;\n while (element.parentNode) {\n element = element.parentNode;\n const el = SugarElement.fromDom(element);\n if (predicate(el)) {\n return Optional.some(el);\n } else if (stop(el)) {\n break;\n }\n }\n return Optional.none();\n };\n\n const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is(e, selector), isRoot);\n\n const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n const get = (element, property) => {\n const dom = element.dom;\n const styles = window.getComputedStyle(dom);\n const r = styles.getPropertyValue(property);\n return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;\n };\n const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n\n const getDirection = element => get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';\n\n const children$1 = (scope, predicate) => filter(children$2(scope), predicate);\n\n const children = (scope, selector) => children$1(scope, e => is(e, selector));\n\n const getParentElement = element => parent(element).filter(isElement);\n const getNormalizedBlock = (element, isListItem) => {\n const normalizedElement = isListItem ? ancestor(element, 'ol,ul') : Optional.some(element);\n return normalizedElement.getOr(element);\n };\n const isListItem = isTag('li');\n const setDirOnElements = (dom, blocks, dir) => {\n each(blocks, block => {\n const blockElement = SugarElement.fromDom(block);\n const isBlockElementListItem = isListItem(blockElement);\n const normalizedBlock = getNormalizedBlock(blockElement, isBlockElementListItem);\n const normalizedBlockParent = getParentElement(normalizedBlock);\n normalizedBlockParent.each(parent => {\n dom.setStyle(normalizedBlock.dom, 'direction', null);\n const parentDirection = getDirection(parent);\n if (parentDirection === dir) {\n remove(normalizedBlock, 'dir');\n } else {\n set(normalizedBlock, 'dir', dir);\n }\n if (getDirection(normalizedBlock) !== dir) {\n dom.setStyle(normalizedBlock.dom, 'direction', dir);\n }\n if (isBlockElementListItem) {\n const listItems = children(normalizedBlock, 'li[dir],li[style]');\n each(listItems, listItem => {\n remove(listItem, 'dir');\n dom.setStyle(listItem.dom, 'direction', null);\n });\n }\n });\n });\n };\n const setDir = (editor, dir) => {\n if (editor.selection.isEditable()) {\n setDirOnElements(editor.dom, editor.selection.getSelectedBlocks(), dir);\n editor.nodeChanged();\n }\n };\n\n const register$1 = editor => {\n editor.addCommand('mceDirectionLTR', () => {\n setDir(editor, 'ltr');\n });\n editor.addCommand('mceDirectionRTL', () => {\n setDir(editor, 'rtl');\n });\n };\n\n const getNodeChangeHandler = (editor, dir) => api => {\n const nodeChangeHandler = e => {\n const element = SugarElement.fromDom(e.element);\n api.setActive(getDirection(element) === dir);\n api.setEnabled(editor.selection.isEditable());\n };\n editor.on('NodeChange', nodeChangeHandler);\n api.setEnabled(editor.selection.isEditable());\n return () => editor.off('NodeChange', nodeChangeHandler);\n };\n const register = editor => {\n editor.ui.registry.addToggleButton('ltr', {\n tooltip: 'Left to right',\n icon: 'ltr',\n onAction: () => editor.execCommand('mceDirectionLTR'),\n onSetup: getNodeChangeHandler(editor, 'ltr')\n });\n editor.ui.registry.addToggleButton('rtl', {\n tooltip: 'Right to left',\n icon: 'rtl',\n onAction: () => editor.execCommand('mceDirectionRTL'),\n onSetup: getNodeChangeHandler(editor, 'rtl')\n });\n };\n\n var Plugin = () => {\n global.add('directionality', editor => {\n register$1(editor);\n register(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global","tinymce","util","Tools","resolve","isSimpleType","type","value","isString","x","t","Array","isArray","o","v","proto","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isType$1","isBoolean","isNonNullable","a","isNullable","isFunction","isNumber","never","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","xs","f","i","len","length","fromDom","node","dom","SugarElement","fromHtml","html","scope","div","document","createElement","innerHTML","hasChildNodes","childNodes","console","error","fromTag","fromText","text","createTextNode","fromPoint","docElm","y","elementFromPoint","is","element","selector","nodeType","elem","undefined","matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","window","Function","isType","isElement","isText","isDocument","isDocumentFragment","children$2","r","set","key","setAttribute","rawSet","remove","removeAttribute","getRootNode","Element","attachShadow","Node","e","dos","ownerDocument","getShadowRoot","host","getShadowHost","inBody","parentNode","doc","body","contains","fbc","fab","ancestor","isRoot","stop","el","ancestor$1","getUnsafeProperty","property","style","getPropertyValue","isSupported","getDirection","getComputedStyle","get","children","pred","push","children$1","getParentElement","parent","isListItem","nodeName","toLowerCase","setDirOnElements","blocks","dir","block","blockElement","isBlockElementListItem","normalizedBlock","getNormalizedBlock","setStyle","listItems","listItem","setDir","editor","selection","isEditable","getSelectedBlocks","nodeChanged","getNodeChangeHandler","api","nodeChangeHandler","setActive","setEnabled","on","off","add","addCommand","register$1","ui","registry","addToggleButton","tooltip","icon","onAction","execCommand","onSetup","register"],"mappings":"gGAIA,WAGI,IAAIA,EAASC,QAAQC,KAAKC,MAAMC,QAAQ,yBAExC,MAqBMC,EAAeC,GAAQC,UAAgBA,IAAUD,EACjDE,EAFWF,IAAQC,GAZVE,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,IAAuCG,EAdlCC,EAcsBL,EAAeM,GAdlCC,EAcsBC,QAZZC,UAYkCH,EAAMI,cAAcN,KAThD,QAAxBO,EAAKN,EAAEE,mBAAgC,IAAPI,OAAgB,EAASA,EAAGC,QAAUL,EAAYK,MAUpF,SAEAX,EAHwC,IAACG,EAAGE,EAdtC,IAACD,EAAGE,EACfI,CAiBV,EAEsCE,CAAOf,KAAWD,EAEnCiB,CAAS,UACpBC,EAAYnB,EAAa,WAEzBoB,EAAgBC,IADHA,IAAKA,QACIC,CAAWD,GACjCE,EAAavB,EAAa,YAC1BwB,EAAWxB,EAAa,UAQxByB,GALWvB,GAKM,EAJd,IACEA,GAFMA,MAOjB,MAAMwB,EACJ,WAAAf,CAAYgB,EAAKzB,GACf0B,KAAKD,IAAMA,EACXC,KAAK1B,MAAQA,CACrB,CACM,WAAO2B,CAAK3B,GACV,OAAO,IAAIwB,GAAS,EAAMxB,EAClC,CACM,WAAO4B,GACL,OAAOJ,EAASK,aACxB,CACM,IAAAC,CAAKC,EAAQC,GACX,OAAIN,KAAKD,IACAO,EAAON,KAAK1B,OAEZ+B,GAEjB,CACM,MAAAE,GACE,OAAOP,KAAKD,GACpB,CACM,MAAAS,GACE,OAAQR,KAAKD,GACrB,CACM,GAAAU,CAAIC,GACF,OAAIV,KAAKD,IACAD,EAASG,KAAKS,EAAOV,KAAK1B,QAE1BwB,EAASI,MAE1B,CACM,IAAAS,CAAKC,GACH,OAAIZ,KAAKD,I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,EAAuB,CAACL,EAAQV,IAAQgB,IAC5C,MAAMC,EAAoBtD,IACxB,MAAM5B,EAAUrB,EAAaH,QAAQoD,EAAE5B,SACvCiF,EAAIE,UAAUhC,EAAanD,KAAaiE,GACxCgB,EAAIG,WAAWT,EAAOC,UAAUC,aAAa,EAI/C,OAFAF,EAAOU,GAAG,aAAcH,GACxBD,EAAIG,WAAWT,EAAOC,UAAUC,cACzB,IAAMF,EAAOW,IAAI,aAAcJ,EAAkB,EAkBxDjL,EAAOsL,IAAI,kBAAkBZ,IAnCZA,KACjBA,EAAOa,WAAW,mBAAmB,KACnCd,EAAOC,EAAQ,MAAM,IAEvBA,EAAOa,WAAW,mBAAmB,KACnCd,EAAOC,EAAQ,MAAM,GACrB,EA8BAc,CAAWd,GAjBEA,KACfA,EAAOe,GAAGC,SAASC,gBAAgB,MAAO,CACxCC,QAAS,gBACTC,KAAM,MACNC,SAAU,IAAMpB,EAAOqB,YAAY,mBACnCC,QAASjB,EAAqBL,EAAQ,SAExCA,EAAOe,GAAGC,SAASC,gBAAgB,MAAO,CACxCC,QAAS,gBACTC,KAAM,MACNC,SAAU,IAAMpB,EAAOqB,YAAY,mBACnCC,QAASjB,EAAqBL,EAAQ,QACtC,EAMAuB,CAASvB,EAAO,GAMvB,CAtYD"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__exports as t}from"../../../../_virtual/plugin46.mjs";var e;function o(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>t===e,o=e(null),n=e(void 0),s=()=>{},r=(t=>()=>t)(!1);class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return(t=>null==t)(t)?a.none():a.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const i=(t,e)=>{const o=t.length,n=new Array(o);for(let s=0;s<o;s++){const o=t[s];n[s]=e(o,s)}return n},l=t=>{let e=t;return{get:()=>e,set:t=>{e=t}}},c=Object.keys,u=Object.hasOwnProperty,g=(t,e)=>{const o=c(t);for(let n=0,s=o.length;n<s;n++){const s=o[n];e(t[s],s)}},m=(t,e)=>{const o={};return g(t,((t,n)=>{const s=e(t,n);o[s.k]=s.v})),o},h=(t,e)=>u.call(t,e),d=(p=(t,e)=>e,(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const e={};for(let o=0;o<t.length;o++){const n=t[o];for(const t in n)h(n,t)&&(e[t]=p(e[t],n[t]))}return e});var p;const y=()=>{const t=(t=>{const e=l(a.none()),o=()=>e.get().each(t);return{clear:()=>{o(),e.set(a.none())},isSet:()=>e.get().isSome(),get:()=>e.get(),set:t=>{o(),e.set(a.some(t))}}})(s);return{...t,on:e=>t.get().each(e)}},f=(t,e,o=0,s)=>{const r=t.indexOf(e,o);return-1!==r&&(!!n(s)||r+e.length<=s)};var v=tinymce.util.Tools.resolve("tinymce.Resource");const b=t=>e=>e.options.get(t),_=b("emoticons_database"),w=b("emoticons_database_url"),C=b("emoticons_database_id"),j=b("emoticons_append"),k=b("emoticons_images_url"),A="All",O={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},x=(t,e)=>h(t,e)?t[e]:e,E=t=>{const e=j(t);return o=t=>({keywords:[],category:"user",...t}),m(e,((t,e)=>({k:e,v:o(t,e)})));var o},S=(t,e,o)=>{const n=y(),s=y(),r=k(t),i=t=>((t,e,o)=>""===e||t.length>=e.length&&t.substr(o,o+e.length)===e)(t.char,"<img",0)?t.char.replace(/src="([^"]+)"/,((t,e)=>`src="${r}${e}"`)):t.char;t.on("init",(()=>{v.load(o,e).then((e=>{const o=E(t);(t=>{const e={},o=[];g(t,((t,n)=>{const s={title:n,keywords:t.keywords,char:i(t),category:x(O,t.category)},r=void 0!==e[s.category]?e[s.category]:[];e[s.category]=r.concat([s]),o.push(s)})),n.set(e),s.set(o)})(d(e,o))}),(t=>{console.log(`Failed to load emojis: ${t}`),n.set({}),s.set([])}))}));const l=()=>s.get().getOr([]),u=()=>n.isSet()&&s.isSet();return{listCategories:()=>[A].concat(c(n.get().getOr({}))),hasLoaded:u,waitForLoad:()=>u()?Promise.resolve(!0):new Promise(((t,o)=>{let n=15;const s=setInterval((()=>{u()?(clearInterval(s),t(!0)):(n--,n<0&&(console.log("Could not load emojis from url: "+e),clearInterval(s),o(!1)))}),100)})),listAll:l,listCategory:t=>t===A?l():n.get().bind((e=>a.from(e[t]))).getOr([])}},L=(t,e)=>f(t.title.toLowerCase(),e)||((t,e)=>{for(let o=0,n=t.length;o<n;o++)if(e(t[o],o))return!0;return!1})(t.keywords,(t=>f(t.toLowerCase(),e))),N=(t,e,o)=>{const n=[],s=e.toLowerCase(),a=o.fold((()=>r),(t=>e=>e>=t));for(let o=0;o<t.length&&(0!==e.length&&!L(t[o],s)||(n.push({value:t[o].char,text:t[o].title,icon:t[o].char}),!a(n.length)));o++);return n},T="pattern",D=(t,e)=>{const n={pattern:"",results:N(e.listAll(),"",a.some(300))},s=l(A),r=((t,e)=>{let n=null;const s=()=>{o(n)||(clearTimeout(n),n=null)};return{cancel:s,throttle:(...o)=>{s(),n=setTimeout((()=>{n=null,t.apply(null,o)}),e)}}})((t=>{(t=>{const o=t.getData(),n=s.get(),r=e.listCategory(n),i=N(r,o[T],n===A?a.some(300):a.none());t.setData({results:i})})(t)}),200),c={label:"Search",type:"input",name:T},u={type:"collection",name:"results"},g=()=>({title:"Emojis",size:"normal",body:{type:"tabpanel",tabs:i(e.listCategories(),(t=>({title:t,name:t,items:[c,u]})))},initialData:n,onTabChange:(t,e)=>{s.set(e.newTabName),r.throttle(t)},onChange:r.throttle,onAction:(e,o)=>{"results"===o.name&&(((t,e)=>{t.insertContent(e)})(t,o.value),e.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}),m=t.windowManager.open(g());m.focus(T),e.hasLoaded()||(m.block("Loading emojis..."),e.waitForLoad().then((()=>{m.redial(g()),r.throttle(m),m.focus(T),m.unblock()})).catch((t=>{m.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),m.focus(T),m.unblock()})))},F=t=>e=>{const o=()=>{e.setEnabled(t.selection.isEditable())};return t.on("NodeChange",o),o(),()=>{t.off("NodeChange",o)}};t.add("emoticons",((t,e)=>{((t,e)=>{const o=t.options.register;o("emoticons_database",{processor:"string",default:"emojis"}),o("emoticons_database_url",{processor:"string",default:`${e}/js/${_(t)}${t.suffix}.js`}),o("emoticons_database_id",{processor:"string",default:"tinymce.plugins.emoticons"}),o("emoticons_append",{processor:"object",default:{}}),o("emoticons_images_url",{processor:"string",default:"https://twemoji.maxcdn.com/v/13.0.1/72x72/"})})(t,e);const o=w(t),n=C(t),s=S(t,o,n);((t,e)=>{t.addCommand("mceEmoticons",(()=>D(t,e)))})(t,s),(t=>{const e=()=>t.execCommand("mceEmoticons");t.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:e,onSetup:F(t)}),t.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:e,onSetup:F(t)})})(t),((t,e)=>{t.ui.registry.addAutocompleter("emoticons",{trigger:":",columns:"auto",minChars:2,fetch:(t,o)=>e.waitForLoad().then((()=>{const n=e.listAll();return N(n,t,a.some(o))})),onAction:(e,o,n)=>{t.selection.setRng(o),t.insertContent(n),e.hide()}})})(t,s),(t=>{t.on("PreInit",(()=>{t.parser.addAttributeFilter("data-emoticon",(t=>{((t,e)=>{for(let o=0,n=t.length;o<n;o++)e(t[o],o)})(t,(t=>{t.attr("data-mce-resize","false"),t.attr("data-mce-placeholder","1")}))}))}))})(t)}))}()),t}export{o as __require};
|
2
|
+
//# sourceMappingURL=plugin.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/emoticons/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const eq = t => a => t === a;\n const isNull = eq(null);\n const isUndefined = eq(undefined);\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n const noop = () => {\n };\n const constant = value => {\n return () => {\n return value;\n };\n };\n const never = constant(false);\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const exists = (xs, pred) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return true;\n }\n }\n return false;\n };\n const map$1 = (xs, f) => {\n const len = xs.length;\n const r = new Array(len);\n for (let i = 0; i < len; i++) {\n const x = xs[i];\n r[i] = f(x, i);\n }\n return r;\n };\n const each$1 = (xs, f) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n f(x, i);\n }\n };\n\n const Cell = initial => {\n let value = initial;\n const get = () => {\n return value;\n };\n const set = v => {\n value = v;\n };\n return {\n get,\n set\n };\n };\n\n const last = (fn, rate) => {\n let timer = null;\n const cancel = () => {\n if (!isNull(timer)) {\n clearTimeout(timer);\n timer = null;\n }\n };\n const throttle = (...args) => {\n cancel();\n timer = setTimeout(() => {\n timer = null;\n fn.apply(null, args);\n }, rate);\n };\n return {\n cancel,\n throttle\n };\n };\n\n const insertEmoticon = (editor, ch) => {\n editor.insertContent(ch);\n };\n\n const keys = Object.keys;\n const hasOwnProperty = Object.hasOwnProperty;\n const each = (obj, f) => {\n const props = keys(obj);\n for (let k = 0, len = props.length; k < len; k++) {\n const i = props[k];\n const x = obj[i];\n f(x, i);\n }\n };\n const map = (obj, f) => {\n return tupleMap(obj, (x, i) => ({\n k: i,\n v: f(x, i)\n }));\n };\n const tupleMap = (obj, f) => {\n const r = {};\n each(obj, (x, i) => {\n const tuple = f(x, i);\n r[tuple.k] = tuple.v;\n });\n return r;\n };\n const has = (obj, key) => hasOwnProperty.call(obj, key);\n\n const shallow = (old, nu) => {\n return nu;\n };\n const baseMerge = merger => {\n return (...objects) => {\n if (objects.length === 0) {\n throw new Error(`Can't merge zero objects`);\n }\n const ret = {};\n for (let j = 0; j < objects.length; j++) {\n const curObject = objects[j];\n for (const key in curObject) {\n if (has(curObject, key)) {\n ret[key] = merger(ret[key], curObject[key]);\n }\n }\n }\n return ret;\n };\n };\n const merge = baseMerge(shallow);\n\n const singleton = doRevoke => {\n const subject = Cell(Optional.none());\n const revoke = () => subject.get().each(doRevoke);\n const clear = () => {\n revoke();\n subject.set(Optional.none());\n };\n const isSet = () => subject.get().isSome();\n const get = () => subject.get();\n const set = s => {\n revoke();\n subject.set(Optional.some(s));\n };\n return {\n clear,\n isSet,\n get,\n set\n };\n };\n const value = () => {\n const subject = singleton(noop);\n const on = f => subject.get().each(f);\n return {\n ...subject,\n on\n };\n };\n\n const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n const contains = (str, substr, start = 0, end) => {\n const idx = str.indexOf(substr, start);\n if (idx !== -1) {\n return isUndefined(end) ? true : idx + substr.length <= end;\n } else {\n return false;\n }\n };\n const startsWith = (str, prefix) => {\n return checkRange(str, prefix, 0);\n };\n\n var global = tinymce.util.Tools.resolve('tinymce.Resource');\n\n const DEFAULT_ID = 'tinymce.plugins.emoticons';\n const option = name => editor => editor.options.get(name);\n const register$2 = (editor, pluginUrl) => {\n const registerOption = editor.options.register;\n registerOption('emoticons_database', {\n processor: 'string',\n default: 'emojis'\n });\n registerOption('emoticons_database_url', {\n processor: 'string',\n default: `${ pluginUrl }/js/${ getEmojiDatabase(editor) }${ editor.suffix }.js`\n });\n registerOption('emoticons_database_id', {\n processor: 'string',\n default: DEFAULT_ID\n });\n registerOption('emoticons_append', {\n processor: 'object',\n default: {}\n });\n registerOption('emoticons_images_url', {\n processor: 'string',\n default: 'https://twemoji.maxcdn.com/v/13.0.1/72x72/'\n });\n };\n const getEmojiDatabase = option('emoticons_database');\n const getEmojiDatabaseUrl = option('emoticons_database_url');\n const getEmojiDatabaseId = option('emoticons_database_id');\n const getAppendedEmoji = option('emoticons_append');\n const getEmojiImageUrl = option('emoticons_images_url');\n\n const ALL_CATEGORY = 'All';\n const categoryNameMap = {\n symbols: 'Symbols',\n people: 'People',\n animals_and_nature: 'Animals and Nature',\n food_and_drink: 'Food and Drink',\n activity: 'Activity',\n travel_and_places: 'Travel and Places',\n objects: 'Objects',\n flags: 'Flags',\n user: 'User Defined'\n };\n const translateCategory = (categories, name) => has(categories, name) ? categories[name] : name;\n const getUserDefinedEmoji = editor => {\n const userDefinedEmoticons = getAppendedEmoji(editor);\n return map(userDefinedEmoticons, value => ({\n keywords: [],\n category: 'user',\n ...value\n }));\n };\n const initDatabase = (editor, databaseUrl, databaseId) => {\n const categories = value();\n const all = value();\n const emojiImagesUrl = getEmojiImageUrl(editor);\n const getEmoji = lib => {\n if (startsWith(lib.char, '<img')) {\n return lib.char.replace(/src=\"([^\"]+)\"/, (match, url) => `src=\"${ emojiImagesUrl }${ url }\"`);\n } else {\n return lib.char;\n }\n };\n const processEmojis = emojis => {\n const cats = {};\n const everything = [];\n each(emojis, (lib, title) => {\n const entry = {\n title,\n keywords: lib.keywords,\n char: getEmoji(lib),\n category: translateCategory(categoryNameMap, lib.category)\n };\n const current = cats[entry.category] !== undefined ? cats[entry.category] : [];\n cats[entry.category] = current.concat([entry]);\n everything.push(entry);\n });\n categories.set(cats);\n all.set(everything);\n };\n editor.on('init', () => {\n global.load(databaseId, databaseUrl).then(emojis => {\n const userEmojis = getUserDefinedEmoji(editor);\n processEmojis(merge(emojis, userEmojis));\n }, err => {\n console.log(`Failed to load emojis: ${ err }`);\n categories.set({});\n all.set([]);\n });\n });\n const listCategory = category => {\n if (category === ALL_CATEGORY) {\n return listAll();\n }\n return categories.get().bind(cats => Optional.from(cats[category])).getOr([]);\n };\n const listAll = () => all.get().getOr([]);\n const listCategories = () => [ALL_CATEGORY].concat(keys(categories.get().getOr({})));\n const waitForLoad = () => {\n if (hasLoaded()) {\n return Promise.resolve(true);\n } else {\n return new Promise((resolve, reject) => {\n let numRetries = 15;\n const interval = setInterval(() => {\n if (hasLoaded()) {\n clearInterval(interval);\n resolve(true);\n } else {\n numRetries--;\n if (numRetries < 0) {\n console.log('Could not load emojis from url: ' + databaseUrl);\n clearInterval(interval);\n reject(false);\n }\n }\n }, 100);\n });\n }\n };\n const hasLoaded = () => categories.isSet() && all.isSet();\n return {\n listCategories,\n hasLoaded,\n waitForLoad,\n listAll,\n listCategory\n };\n };\n\n const emojiMatches = (emoji, lowerCasePattern) => contains(emoji.title.toLowerCase(), lowerCasePattern) || exists(emoji.keywords, k => contains(k.toLowerCase(), lowerCasePattern));\n const emojisFrom = (list, pattern, maxResults) => {\n const matches = [];\n const lowerCasePattern = pattern.toLowerCase();\n const reachedLimit = maxResults.fold(() => never, max => size => size >= max);\n for (let i = 0; i < list.length; i++) {\n if (pattern.length === 0 || emojiMatches(list[i], lowerCasePattern)) {\n matches.push({\n value: list[i].char,\n text: list[i].title,\n icon: list[i].char\n });\n if (reachedLimit(matches.length)) {\n break;\n }\n }\n }\n return matches;\n };\n\n const patternName = 'pattern';\n const open = (editor, database) => {\n const initialState = {\n pattern: '',\n results: emojisFrom(database.listAll(), '', Optional.some(300))\n };\n const currentTab = Cell(ALL_CATEGORY);\n const scan = dialogApi => {\n const dialogData = dialogApi.getData();\n const category = currentTab.get();\n const candidates = database.listCategory(category);\n const results = emojisFrom(candidates, dialogData[patternName], category === ALL_CATEGORY ? Optional.some(300) : Optional.none());\n dialogApi.setData({ results });\n };\n const updateFilter = last(dialogApi => {\n scan(dialogApi);\n }, 200);\n const searchField = {\n label: 'Search',\n type: 'input',\n name: patternName\n };\n const resultsField = {\n type: 'collection',\n name: 'results'\n };\n const getInitialState = () => {\n const body = {\n type: 'tabpanel',\n tabs: map$1(database.listCategories(), cat => ({\n title: cat,\n name: cat,\n items: [\n searchField,\n resultsField\n ]\n }))\n };\n return {\n title: 'Emojis',\n size: 'normal',\n body,\n initialData: initialState,\n onTabChange: (dialogApi, details) => {\n currentTab.set(details.newTabName);\n updateFilter.throttle(dialogApi);\n },\n onChange: updateFilter.throttle,\n onAction: (dialogApi, actionData) => {\n if (actionData.name === 'results') {\n insertEmoticon(editor, actionData.value);\n dialogApi.close();\n }\n },\n buttons: [{\n type: 'cancel',\n text: 'Close',\n primary: true\n }]\n };\n };\n const dialogApi = editor.windowManager.open(getInitialState());\n dialogApi.focus(patternName);\n if (!database.hasLoaded()) {\n dialogApi.block('Loading emojis...');\n database.waitForLoad().then(() => {\n dialogApi.redial(getInitialState());\n updateFilter.throttle(dialogApi);\n dialogApi.focus(patternName);\n dialogApi.unblock();\n }).catch(_err => {\n dialogApi.redial({\n title: 'Emojis',\n body: {\n type: 'panel',\n items: [{\n type: 'alertbanner',\n level: 'error',\n icon: 'warning',\n text: 'Could not load emojis'\n }]\n },\n buttons: [{\n type: 'cancel',\n text: 'Close',\n primary: true\n }],\n initialData: {\n pattern: '',\n results: []\n }\n });\n dialogApi.focus(patternName);\n dialogApi.unblock();\n });\n }\n };\n\n const register$1 = (editor, database) => {\n editor.addCommand('mceEmoticons', () => open(editor, database));\n };\n\n const setup = editor => {\n editor.on('PreInit', () => {\n editor.parser.addAttributeFilter('data-emoticon', nodes => {\n each$1(nodes, node => {\n node.attr('data-mce-resize', 'false');\n node.attr('data-mce-placeholder', '1');\n });\n });\n });\n };\n\n const init = (editor, database) => {\n editor.ui.registry.addAutocompleter('emoticons', {\n trigger: ':',\n columns: 'auto',\n minChars: 2,\n fetch: (pattern, maxResults) => database.waitForLoad().then(() => {\n const candidates = database.listAll();\n return emojisFrom(candidates, pattern, Optional.some(maxResults));\n }),\n onAction: (autocompleteApi, rng, value) => {\n editor.selection.setRng(rng);\n editor.insertContent(value);\n autocompleteApi.hide();\n }\n });\n };\n\n const onSetupEditable = editor => api => {\n const nodeChanged = () => {\n api.setEnabled(editor.selection.isEditable());\n };\n editor.on('NodeChange', nodeChanged);\n nodeChanged();\n return () => {\n editor.off('NodeChange', nodeChanged);\n };\n };\n const register = editor => {\n const onAction = () => editor.execCommand('mceEmoticons');\n editor.ui.registry.addButton('emoticons', {\n tooltip: 'Emojis',\n icon: 'emoji',\n onAction,\n onSetup: onSetupEditable(editor)\n });\n editor.ui.registry.addMenuItem('emoticons', {\n text: 'Emojis...',\n icon: 'emoji',\n onAction,\n onSetup: onSetupEditable(editor)\n });\n };\n\n var Plugin = () => {\n global$1.add('emoticons', (editor, pluginUrl) => {\n register$2(editor, pluginUrl);\n const databaseUrl = getEmojiDatabaseUrl(editor);\n const databaseId = getEmojiDatabaseId(editor);\n const database = initDatabase(editor, databaseUrl, databaseId);\n register$1(editor, database);\n register(editor);\n init(editor, database);\n setup(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","eq","t","a","isNull","isUndefined","undefined","noop","never","value","constant","Optional","constructor","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","isNullable","getOrNull","getOrUndefined","each","worker","toArray","toString","map$1","xs","f","len","length","r","Array","i","x","Cell","initial","get","set","v","keys","Object","hasOwnProperty","obj","props","k","tupleMap","tuple","has","key","call","merge","merger","old","nu","objects","ret","j","curObject","subject","doRevoke","revoke","clear","isSet","s","singleton","on","contains","str","substr","start","end","idx","indexOf","global","option","name","editor","options","getEmojiDatabase","getEmojiDatabaseUrl","getEmojiDatabaseId","getAppendedEmoji","getEmojiImageUrl","ALL_CATEGORY","categoryNameMap","symbols","people","animals_and_nature","food_and_drink","activity","travel_and_places","flags","user","translateCategory","categories","getUserDefinedEmoji","userDefinedEmoticons","keywords","category","initDatabase","databaseUrl","databaseId","all","emojiImagesUrl","getEmoji","lib","checkRange","char","replace","match","url","load","then","emojis","userEmojis","cats","everything","title","entry","current","concat","push","processEmojis","err","console","log","listAll","hasLoaded","listCategories","waitForLoad","Promise","reject","numRetries","interval","setInterval","clearInterval","listCategory","emojiMatches","emoji","lowerCasePattern","toLowerCase","pred","emojisFrom","list","pattern","maxResults","matches","reachedLimit","max","size","text","icon","patternName","open","database","initialState","results","currentTab","updateFilter","fn","rate","timer","cancel","clearTimeout","throttle","args","setTimeout","apply","last","dialogApi","dialogData","getData","candidates","setData","scan","searchField","label","type","resultsField","getInitialState","body","tabs","cat","items","initialData","onTabChange","details","newTabName","onChange","onAction","actionData","ch","insertContent","insertEmoticon","close","buttons","primary","windowManager","focus","block","redial","unblock","catch","_err","level","onSetupEditable","api","nodeChanged","setEnabled","selection","isEditable","off","add","pluginUrl","registerOption","register","processor","default","suffix","register$2","addCommand","register$1","execCommand","ui","registry","addButton","tooltip","onSetup","addMenuItem","addAutocompleter","trigger","columns","minChars","fetch","autocompleteApi","rng","setRng","hide","init","parser","addAttributeFilter","nodes","each$1","node","attr","setup"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAAKC,GAAKC,GAAKD,IAAMC,EACrBC,EAASH,EAAG,MACZI,EAAcJ,OAAGK,GAIjBC,EAAO,OAOPC,EALWC,IACR,IACEA,EAGGC,EAAS,GAEvB,MAAMC,EACJ,WAAAC,CAAYC,EAAKJ,GACfK,KAAKD,IAAMA,EACXC,KAAKL,MAAQA,CACrB,CACM,WAAOM,CAAKN,GACV,OAAO,IAAIE,GAAS,EAAMF,EAClC,CACM,WAAOO,GACL,OAAOL,EAASM,aACxB,CACM,IAAAC,CAAKC,EAAQC,GACX,OAAIN,KAAKD,IACAO,EAAON,KAAKL,OAEZU,GAEjB,CACM,MAAAE,GACE,OAAOP,KAAKD,GACp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BAAgB,IAAMnE,EAAK7E,EAAQ8E,IAAU,EA+D7DmE,CAAWjJ,EAAQ8E,GAtBN9E,KACf,MAAMiH,EAAW,IAAMjH,EAAOkJ,YAAY,gBAC1ClJ,EAAOmJ,GAAGC,SAASC,UAAU,YAAa,CACxCC,QAAS,SACT3E,KAAM,QACNsC,WACAsC,QAAStB,EAAgBjI,KAE3BA,EAAOmJ,GAAGC,SAASI,YAAY,YAAa,CAC1C9E,KAAM,YACNC,KAAM,QACNsC,WACAsC,QAAStB,EAAgBjI,IACzB,EAUA2I,CAAS3I,GAlDA,EAACA,EAAQ8E,KACpB9E,EAAOmJ,GAAGC,SAASK,iBAAiB,YAAa,CAC/CC,QAAS,IACTC,QAAS,OACTC,SAAU,EACVC,MAAO,CAACzF,EAASC,IAAeS,EAASzB,cAAcjB,MAAK,KAC1D,MAAM4D,EAAalB,EAAS5B,UAC5B,OAAOgB,EAAW8B,EAAY5B,EAAS5J,EAASI,KAAKyJ,GAAY,IAEnE4C,SAAU,CAAC6C,EAAiBC,EAAKzP,KAC/B0F,EAAOqI,UAAU2B,OAAOD,GACxB/J,EAAOoH,cAAc9M,GACrBwP,EAAgBG,MAAM,GAExB,EAqCAC,CAAKlK,EAAQ8E,GA9DH9E,KACZA,EAAOX,GAAG,WAAW,KACnBW,EAAOmK,OAAOC,mBAAmB,iBAAiBC,IAxYvC,EAACvN,EAAIC,KAClB,IAAK,IAAIK,EAAI,EAAGJ,EAAMF,EAAGG,OAAQG,EAAIJ,EAAKI,IAExCL,EADUD,EAAGM,GACRA,EACb,EAqYUkN,CAAOD,GAAOE,IACZA,EAAKC,KAAK,kBAAmB,SAC7BD,EAAKC,KAAK,uBAAwB,IAAI,GACtC,GACF,GACF,EAuDAC,CAAMzK,EAAO,GAMpB,CA9kBD"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__exports as e}from"../../../../_virtual/plugin44.mjs";var t;function n(){return t||(t=1,function(){const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>({isFullscreen:()=>null!==e.get()}),o=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,o=(s=String).prototype,o.isPrototypeOf(n)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===s.name)?"string":t;var n,o;var r,s,i})(t)===e,r=e=>t=>typeof t===e,s=e=>t=>e===t,i=o("string"),l=o("object"),a=o("array"),c=s(null),u=r("boolean"),m=s(void 0),d=e=>!(e=>null==e)(e),h=r("function"),f=r("number"),g=()=>{},p=e=>()=>e;function v(e,...t){return(...n)=>{const o=t.concat(n);return e.apply(null,o)}}const w=p(!1),b=p(!0);class y{constructor(e,t){this.tag=e,this.value=t}static some(e){return new y(!0,e)}static none(){return y.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?y.some(e(this.value)):y.none()}bind(e){return this.tag?e(this.value):y.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:y.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 d(e)?y.some(e):y.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()"}}y.singletonNone=new y(!1);const S=Array.prototype.push,x=(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},E=(e,t)=>{for(let n=0,o=e.length;n<o;n++){t(e[n],n)}},F=(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},O=(e,t)=>((e,t,n)=>{for(let o=0,r=e.length;o<r;o++){const r=e[o];if(t(r,o))return y.some(r);if(n(r,o))break}return y.none()})(e,t,w),T=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!a(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);S.apply(t,e[n])}return t})(x(e,t)),k=e=>((e,t)=>t>=0&&t<e.length?y.some(e[t]):y.none())(e,0),C=t=>{const n=e(y.none()),o=()=>n.get().each(t);return{clear:()=>{o(),n.set(y.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{o(),n.set(y.some(e))}}},D=()=>C((e=>e.unbind())),A=Object.keys,R="undefined"!=typeof window?window:Function("return this;")(),L=(e,t)=>((e,t)=>{let n=null!=t?t:R;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),M=(e,t)=>{const n=((e,t)=>L(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n},P=Object.getPrototypeOf,N=e=>{const t=L("ownerDocument.defaultView",e);return l(e)&&((e=>M("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(P(e).constructor.name))},H=e=>t=>(e=>e.dom.nodeType)(t)===e,_=H(1),q=H(3),W=H(9),j=H(11),I=(e,t,n)=>{((e,t,n)=>{if(!(i(n)||u(n)||f(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)},V=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},B=(e,t)=>{e.dom.removeAttribute(t)},z=(e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!m(o)||r+t.length<=o)},$=e=>void 0!==e.style&&h(e.style.getPropertyValue),U=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},K={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return U(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return U(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return U(n)},fromDom:U,fromPoint:(e,t,n)=>y.from(e.dom.elementFromPoint(t,n)).map(U)},X=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Y=e=>K.fromDom(e.dom.ownerDocument),G=e=>(e=>y.from(e.dom.parentNode).map(K.fromDom))(e).map(J).map((t=>F(t,(t=>{return n=t,!(e.dom===n.dom);var n})))).getOr([]),J=e=>x(e.dom.childNodes,K.fromDom),Q=h(Element.prototype.attachShadow)&&h(Node.prototype.getRootNode),Z=p(Q),ee=Q?e=>K.fromDom(e.dom.getRootNode()):e=>W(e)?e:Y(e),te=e=>{const t=ee(e);return j(n=t)&&d(n.dom.host)?y.some(t):y.none();var n},ne=e=>K.fromDom(e.dom.host),oe=e=>d(e.dom.shadowRoot),re=e=>{const t=q(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return te(K.fromDom(t)).fold((()=>n.body.contains(t)),(o=re,r=ne,e=>o(r(e))));var o,r},se=(e,t,n)=>{if(!i(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);$(e)&&e.style.setProperty(t,n)},ie=(e,t,n)=>{const o=e.dom;se(o,t,n)},le=(e,t)=>{const n=e.dom;((e,t)=>{const n=A(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}})(t,((e,t)=>{se(n,t,e)}))},ae=(e,t)=>{const n=e.dom,o=window.getComputedStyle(n).getPropertyValue(t);return""!==o||re(e)?o:ce(n,t)},ce=(e,t)=>$(e)?e.style.getPropertyValue(t):"",ue=e=>{const t=K.fromDom((e=>{if(Z()&&d(e.target)){const t=K.fromDom(e.target);if(_(t)&&oe(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return k(t)}}return y.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),o=()=>e.preventDefault(),r=(s=o,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,o,r,s,i)=>({target:e,x:t,y:n,stop:o,prevent:r,kill:s,raw:i}))(t,e.clientX,e.clientY,n,o,r,e)},me=(e,t,n,o,r)=>{const s=((e,t)=>n=>{e(n)&&t(ue(n))})(n,o);return e.dom.addEventListener(t,s,r),{unbind:v(de,e,t,s,r)}},de=(e,t,n,o)=>{e.dom.removeEventListener(t,n,o)},he=b,fe=(e,t,n)=>((e,t,n,o)=>me(e,t,n,o,!1))(e,t,he,n),ge=()=>pe(0,0),pe=(e,t)=>({major:e,minor:t}),ve={nu:pe,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?ge():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const o=e[n];if(o.test(t))return o}})(e,t);if(!n)return{major:0,minor:0};const o=e=>Number(t.replace(n,"$"+e));return pe(o(1),o(2))})(e,n)},unknown:ge},we=(e,t)=>((e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return y.none()})(t.brands,(t=>{const n=t.brand.toLowerCase();return O(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:ve.nu(parseInt(t.version,10),0)})))})),be=(e,t)=>{const n=String(t).toLowerCase();return O(e,(e=>e.search(n)))},ye=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Se=e=>t=>z(t,e),xe=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>z(e,"edge/")&&z(e,"chrome")&&z(e,"safari")&&z(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ye],search:e=>z(e,"chrome")&&!z(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>z(e,"msie")||z(e,"trident")},{name:"Opera",versionRegexes:[ye,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Se("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Se("firefox")},{name:"Safari",versionRegexes:[ye,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(z(e,"safari")||z(e,"mobile/"))&&z(e,"applewebkit")}],Ee=[{name:"Windows",search:Se("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>z(e,"iphone")||z(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Se("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Se("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Se("linux"),versionRegexes:[]},{name:"Solaris",search:Se("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Se("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Se("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Fe={browsers:p(xe),oses:p(Ee)},Oe="Edge",Te="Chromium",ke="Opera",Ce="Firefox",De="Safari",Ae=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isEdge:o(Oe),isChromium:o(Te),isIE:o("IE"),isOpera:o(ke),isFirefox:o(Ce),isSafari:o(De)}},Re={unknown:()=>Ae({current:void 0,version:ve.unknown()}),nu:Ae,edge:p(Oe),chromium:p(Te),ie:p("IE"),opera:p(ke),firefox:p(Ce),safari:p(De)},Le="Windows",Me="Android",Pe="Linux",Ne="macOS",He="Solaris",_e="FreeBSD",qe="ChromeOS",We=e=>{const t=e.current,n=e.version,o=e=>()=>t===e;return{current:t,version:n,isWindows:o(Le),isiOS:o("iOS"),isAndroid:o(Me),isMacOS:o(Ne),isLinux:o(Pe),isSolaris:o(He),isFreeBSD:o(_e),isChromeOS:o(qe)}},je={unknown:()=>We({current:void 0,version:ve.unknown()}),nu:We,windows:p(Le),ios:p("iOS"),android:p(Me),linux:p(Pe),macos:p(Ne),solaris:p(He),freebsd:p(_e),chromeos:p(qe)},Ie=(e,t,n)=>{const o=Fe.browsers(),r=Fe.oses(),s=t.bind((e=>we(o,e))).orThunk((()=>((e,t)=>be(e,t).map((e=>{const n=ve.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e))).fold(Re.unknown,Re.nu),i=((e,t)=>be(e,t).map((e=>{const n=ve.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e).fold(je.unknown,je.nu),l=((e,t,n,o)=>{const r=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!r,i=e.isiOS()||e.isAndroid(),l=i||o("(pointer:coarse)"),a=r||!s&&i&&o("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),m=!c&&!a&&!u;return{isiPad:p(r),isiPhone:p(s),isTablet:p(a),isPhone:p(c),isTouch:p(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:p(u),isDesktop:p(m)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}},Ve=e=>window.matchMedia(e).matches;let Be=(e=>{let t,n=!1;return(...o)=>(n||(n=!0,t=e.apply(null,o)),t)})((()=>Ie(navigator.userAgent,y.from(navigator.userAgentData),Ve)));const ze=(e,t)=>({left:e,top:t,translate:(n,o)=>ze(e+n,t+o)}),$e=ze,Ue=e=>{const t=void 0===e?window:e;return Be().browser.isFirefox()?y.none():y.from(t.visualViewport)},Ke=(e,t,n,o)=>({x:e,y:t,width:n,height:o,right:e+n,bottom:t+o}),Xe=e=>{const t=void 0===e?window:e,n=t.document,o=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,o=t.body.scrollTop||t.documentElement.scrollTop;return $e(n,o)})(K.fromDom(n));return Ue(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,r=e.clientHeight;return Ke(o.left,o.top,n,r)}),(e=>Ke(Math.max(e.pageLeft,o.left),Math.max(e.pageTop,o.top),e.width,e.height)))},Ye=(e,t,n)=>Ue(n).map((n=>{const o=e=>t(ue(e));return n.addEventListener(e,o),{unbind:()=>n.removeEventListener(e,o)}})).getOrThunk((()=>({unbind:g})));var Ge=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Je=tinymce.util.Tools.resolve("tinymce.Env");const Qe=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},Ze=(et="fullscreen_native",e=>e.options.get(et));var et;const tt=e=>{const t=K.fromDom(e.getElement());return te(t).map(ne).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return K.fromDom(t)})(Y(t))))},nt=e=>{return e.dom===(void 0!==(t=Y(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},ot=(e,t,n)=>F(((e,t)=>{const n=h(t)?t:w;let o=e.dom;const r=[];for(;null!==o.parentNode&&void 0!==o.parentNode;){const e=o.parentNode,t=K.fromDom(e);if(r.push(t),!0===n(t))break;o=e}return r})(e,n),t),rt=e=>((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(o=n).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?[]:x(n.querySelectorAll(e),K.fromDom);var o})(e),st=(e,t,n)=>ot(e,(e=>X(e,t)),n),it=(e,t)=>((e,t)=>F(G(e),t))(e,(e=>X(e,t))),lt="data-ephox-mobile-fullscreen-style",at="position:absolute!important;",ct="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",ut=Je.os.isAndroid(),mt=(e,t,n)=>{const o=t=>n=>{const o=V(n,"style"),r=void 0===o?"no-styles":o.trim();r!==t&&(I(n,lt,r),le(n,e.parseStyle(t)))},r=st(t,"*"),s=T(r,(e=>it(e,"*:not(.tox-silver-sink)"))),i=(e=>{const t=ae(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"})(n);E(s,o("display:none!important;")),E(r,o(at+ct+i));o((!0===ut?"":at)+ct+i)(t)},dt=Ge.DOM,ht=Ue().fold((()=>({bind:g,unbind:g})),(e=>{const t=(()=>{const e=C(g);return{...e,on:t=>e.get().each(t)}})(),n=D(),o=D(),r=((e,t)=>{let n=null;return{cancel:()=>{c(n)||(clearTimeout(n),n=null)},throttle:(...o)=>{c(n)&&(n=setTimeout((()=>{n=null,e.apply(null,o)}),t))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>le(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}),50);return{bind:e=>{t.set(e),r.throttle(),n.set(Ye("resize",r.throttle)),o.set(Ye("scroll",r.throttle))},unbind:()=>{t.on((()=>{n.clear(),o.clear()})),t.clear()}}})),ft=(e,t)=>{const n=document.body,o=document.documentElement,r=e.getContainer(),s=K.fromDom(r),i=(l=s,y.from(l.dom.nextSibling).map(K.fromDom)).filter((e=>(e=>_(e)&&N(e.dom))(e)&&((e,t)=>(e=>void 0!==e.dom.classList)(e)&&e.dom.classList.contains(t))(e,"tox-silver-sink")));var l;const a=tt(e),c=t.get(),u=K.fromDom(e.getBody()),m=Je.deviceType.isTouch(),d=r.style,h=e.iframeElement,f=null==h?void 0:h.style,g=e=>{e(n,"tox-fullscreen"),e(o,"tox-fullscreen"),e(r,"tox-fullscreen"),te(s).map((e=>ne(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},p=()=>{m&&(e=>{const t=rt("["+lt+"]");E(t,(t=>{const n=V(t,lt);n&&"no-styles"!==n?le(t,e.parseStyle(n)):B(t,"style"),B(t,lt)}))})(e.dom),g(dt.removeClass),ht.unbind(),y.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(c)c.fullscreenChangeHandler.unbind(),Ze(e)&&nt(a)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(Y(a)),f.width=c.iframeWidth,f.height=c.iframeHeight,d.width=c.containerWidth,d.height=c.containerHeight,d.top=c.containerTop,d.left=c.containerLeft,w=i,b=c.sinkCssPosition,S=(e,t)=>{ie(e,"position",t)},w.isSome()&&b.isSome()?y.some(S(w.getOrDie(),b.getOrDie())):y.none(),p(),v=c.scrollPos,window.scrollTo(v.x,v.y),t.set(null),Qe(e,!1),e.off("remove",p);else{const n=fe(Y(a),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{Ze(e)&&(nt(a)||null===t.get()||ft(e,t))})),o={scrollPos:Xe(window),containerWidth:d.width,containerHeight:d.height,containerTop:d.top,containerLeft:d.left,iframeWidth:f.width,iframeHeight:f.height,fullscreenChangeHandler:n,sinkCssPosition:i.map((e=>ae(e,"position")))};m&&mt(e.dom,s,u),f.width=f.height="100%",d.width=d.height="",g(dt.addClass),i.each((e=>{ie(e,"position","fixed")})),ht.bind(s),e.on("remove",p),t.set(o),Ze(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(a),Qe(e,!0)}var v,w,b,S},gt=(e,t)=>n=>{n.setActive(null!==t.get());const o=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",o),()=>e.off("FullscreenStateChanged",o)};t.add("fullscreen",(t=>{const o=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{ft(e,t)}))})(t,o),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:gt(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:gt(e,t)})})(t,o),t.addShortcut("Meta+Shift+F","","mceFullScreen")),n(o)}))}()),e}export{n as __require};
|
2
|
+
//# sourceMappingURL=plugin.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/fullscreen/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n const Cell = initial => {\n let value = initial;\n const get = () => {\n return value;\n };\n const set = v => {\n value = v;\n };\n return {\n get,\n set\n };\n };\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const get$5 = fullscreenState => ({ isFullscreen: () => fullscreenState.get() !== null });\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType$1 = type => value => typeOf(value) === type;\n const isSimpleType = type => value => typeof value === type;\n const eq$1 = t => a => t === a;\n const isString = isType$1('string');\n const isObject = isType$1('object');\n const isArray = isType$1('array');\n const isNull = eq$1(null);\n const isBoolean = isSimpleType('boolean');\n const isUndefined = eq$1(undefined);\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n const isFunction = isSimpleType('function');\n const isNumber = isSimpleType('number');\n\n const noop = () => {\n };\n const compose = (fa, fb) => {\n return (...args) => {\n return fa(fb.apply(null, args));\n };\n };\n const compose1 = (fbc, fab) => a => fbc(fab(a));\n const constant = value => {\n return () => {\n return value;\n };\n };\n function curry(fn, ...initialArgs) {\n return (...restArgs) => {\n const all = initialArgs.concat(restArgs);\n return fn.apply(null, all);\n };\n }\n const never = constant(false);\n const always = constant(true);\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const nativePush = Array.prototype.push;\n const map = (xs, f) => {\n const len = xs.length;\n const r = new Array(len);\n for (let i = 0; i < len; i++) {\n const x = xs[i];\n r[i] = f(x, i);\n }\n return r;\n };\n const each$1 = (xs, f) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n f(x, i);\n }\n };\n const filter$1 = (xs, pred) => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n r.push(x);\n }\n }\n return r;\n };\n const findUntil = (xs, pred, until) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(x);\n } else if (until(x, i)) {\n break;\n }\n }\n return Optional.none();\n };\n const find$1 = (xs, pred) => {\n return findUntil(xs, pred, never);\n };\n const flatten = xs => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; ++i) {\n if (!isArray(xs[i])) {\n throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n }\n nativePush.apply(r, xs[i]);\n }\n return r;\n };\n const bind$3 = (xs, f) => flatten(map(xs, f));\n const get$4 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n const head = xs => get$4(xs, 0);\n const findMap = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n const r = f(arr[i], i);\n if (r.isSome()) {\n return r;\n }\n }\n return Optional.none();\n };\n\n const lift2 = (oa, ob, f) => oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();\n\n const singleton = doRevoke => {\n const subject = Cell(Optional.none());\n const revoke = () => subject.get().each(doRevoke);\n const clear = () => {\n revoke();\n subject.set(Optional.none());\n };\n const isSet = () => subject.get().isSome();\n const get = () => subject.get();\n const set = s => {\n revoke();\n subject.set(Optional.some(s));\n };\n return {\n clear,\n isSet,\n get,\n set\n };\n };\n const unbindable = () => singleton(s => s.unbind());\n const value = () => {\n const subject = singleton(noop);\n const on = f => subject.get().each(f);\n return {\n ...subject,\n on\n };\n };\n\n const first = (fn, rate) => {\n let timer = null;\n const cancel = () => {\n if (!isNull(timer)) {\n clearTimeout(timer);\n timer = null;\n }\n };\n const throttle = (...args) => {\n if (isNull(timer)) {\n timer = setTimeout(() => {\n timer = null;\n fn.apply(null, args);\n }, rate);\n }\n };\n return {\n cancel,\n throttle\n };\n };\n\n const keys = Object.keys;\n const each = (obj, f) => {\n const props = keys(obj);\n for (let k = 0, len = props.length; k < len; k++) {\n const i = props[k];\n const x = obj[i];\n f(x, i);\n }\n };\n\n const Global = typeof window !== 'undefined' ? window : Function('return this;')();\n\n const path = (parts, scope) => {\n let o = scope !== undefined && scope !== null ? scope : Global;\n for (let i = 0; i < parts.length && o !== undefined && o !== null; ++i) {\n o = o[parts[i]];\n }\n return o;\n };\n const resolve = (p, scope) => {\n const parts = p.split('.');\n return path(parts, scope);\n };\n\n const unsafe = (name, scope) => {\n return resolve(name, scope);\n };\n const getOrDie = (name, scope) => {\n const actual = unsafe(name, scope);\n if (actual === undefined || actual === null) {\n throw new Error(name + ' not available on this browser');\n }\n return actual;\n };\n\n const getPrototypeOf = Object.getPrototypeOf;\n const sandHTMLElement = scope => {\n return getOrDie('HTMLElement', scope);\n };\n const isPrototypeOf = x => {\n const scope = resolve('ownerDocument.defaultView', x);\n return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\\w*Element$/.test(getPrototypeOf(x).constructor.name));\n };\n\n const DOCUMENT = 9;\n const DOCUMENT_FRAGMENT = 11;\n const ELEMENT = 1;\n const TEXT = 3;\n\n const type = element => element.dom.nodeType;\n const isType = t => element => type(element) === t;\n const isHTMLElement = element => isElement(element) && isPrototypeOf(element.dom);\n const isElement = isType(ELEMENT);\n const isText = isType(TEXT);\n const isDocument = isType(DOCUMENT);\n const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n\n const rawSet = (dom, key, value) => {\n if (isString(value) || isBoolean(value) || isNumber(value)) {\n dom.setAttribute(key, value + '');\n } else {\n console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n throw new Error('Attribute value was not simple');\n }\n };\n const set$1 = (element, key, value) => {\n rawSet(element.dom, key, value);\n };\n const get$3 = (element, key) => {\n const v = element.dom.getAttribute(key);\n return v === null ? undefined : v;\n };\n const remove = (element, key) => {\n element.dom.removeAttribute(key);\n };\n\n const supports = element => element.dom.classList !== undefined;\n\n const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);\n\n const contains = (str, substr, start = 0, end) => {\n const idx = str.indexOf(substr, start);\n if (idx !== -1) {\n return isUndefined(end) ? true : idx + substr.length <= end;\n } else {\n return false;\n }\n };\n\n const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n const fromHtml = (html, scope) => {\n const doc = scope || document;\n const div = doc.createElement('div');\n div.innerHTML = html;\n if (!div.hasChildNodes() || div.childNodes.length > 1) {\n const message = 'HTML does not have a single root node';\n console.error(message, html);\n throw new Error(message);\n }\n return fromDom(div.childNodes[0]);\n };\n const fromTag = (tag, scope) => {\n const doc = scope || document;\n const node = doc.createElement(tag);\n return fromDom(node);\n };\n const fromText = (text, scope) => {\n const doc = scope || document;\n const node = doc.createTextNode(text);\n return fromDom(node);\n };\n const fromDom = node => {\n if (node === null || node === undefined) {\n throw new Error('Node cannot be null or undefined');\n }\n return { dom: node };\n };\n const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);\n const SugarElement = {\n fromHtml,\n fromTag,\n fromText,\n fromDom,\n fromPoint\n };\n\n const is = (element, selector) => {\n const dom = element.dom;\n if (dom.nodeType !== ELEMENT) {\n return false;\n } else {\n const elem = dom;\n if (elem.matches !== undefined) {\n return elem.matches(selector);\n } else if (elem.msMatchesSelector !== undefined) {\n return elem.msMatchesSelector(selector);\n } else if (elem.webkitMatchesSelector !== undefined) {\n return elem.webkitMatchesSelector(selector);\n } else if (elem.mozMatchesSelector !== undefined) {\n return elem.mozMatchesSelector(selector);\n } else {\n throw new Error('Browser lacks native selectors');\n }\n }\n };\n const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;\n const all$1 = (selector, scope) => {\n const base = scope === undefined ? document : scope.dom;\n return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);\n };\n\n const eq = (e1, e2) => e1.dom === e2.dom;\n\n const owner = element => SugarElement.fromDom(element.dom.ownerDocument);\n const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);\n const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n const parents = (element, isRoot) => {\n const stop = isFunction(isRoot) ? isRoot : never;\n let dom = element.dom;\n const ret = [];\n while (dom.parentNode !== null && dom.parentNode !== undefined) {\n const rawParent = dom.parentNode;\n const p = SugarElement.fromDom(rawParent);\n ret.push(p);\n if (stop(p) === true) {\n break;\n } else {\n dom = rawParent;\n }\n }\n return ret;\n };\n const siblings$2 = element => {\n const filterSelf = elements => filter$1(elements, x => !eq(element, x));\n return parent(element).map(children).map(filterSelf).getOr([]);\n };\n const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n const children = element => map(element.dom.childNodes, SugarElement.fromDom);\n\n const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);\n const isSupported = constant(supported);\n const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;\n const getShadowRoot = e => {\n const r = getRootNode(e);\n return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n };\n const getShadowHost = e => SugarElement.fromDom(e.dom.host);\n const getOriginalEventTarget = event => {\n if (isSupported() && isNonNullable(event.target)) {\n const el = SugarElement.fromDom(event.target);\n if (isElement(el) && isOpenShadowHost(el)) {\n if (event.composed && event.composedPath) {\n const composedPath = event.composedPath();\n if (composedPath) {\n return head(composedPath);\n }\n }\n }\n }\n return Optional.from(event.target);\n };\n const isOpenShadowHost = element => isNonNullable(element.dom.shadowRoot);\n\n const inBody = element => {\n const dom = isText(element) ? element.dom.parentNode : element.dom;\n if (dom === undefined || dom === null || dom.ownerDocument === null) {\n return false;\n }\n const doc = dom.ownerDocument;\n return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n };\n const getBody = doc => {\n const b = doc.dom.body;\n if (b === null || b === undefined) {\n throw new Error('Body is not available yet');\n }\n return SugarElement.fromDom(b);\n };\n\n const internalSet = (dom, property, value) => {\n if (!isString(value)) {\n console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n throw new Error('CSS value must be a string: ' + value);\n }\n if (isSupported$1(dom)) {\n dom.style.setProperty(property, value);\n }\n };\n const set = (element, property, value) => {\n const dom = element.dom;\n internalSet(dom, property, value);\n };\n const setAll = (element, css) => {\n const dom = element.dom;\n each(css, (v, k) => {\n internalSet(dom, k, v);\n });\n };\n const get$2 = (element, property) => {\n const dom = element.dom;\n const styles = window.getComputedStyle(dom);\n const r = styles.getPropertyValue(property);\n return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;\n };\n const getUnsafeProperty = (dom, property) => isSupported$1(dom) ? dom.style.getPropertyValue(property) : '';\n\n const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({\n target,\n x,\n y,\n stop,\n prevent,\n kill,\n raw\n });\n const fromRawEvent = rawEvent => {\n const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));\n const stop = () => rawEvent.stopPropagation();\n const prevent = () => rawEvent.preventDefault();\n const kill = compose(prevent, stop);\n return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);\n };\n const handle = (filter, handler) => rawEvent => {\n if (filter(rawEvent)) {\n handler(fromRawEvent(rawEvent));\n }\n };\n const binder = (element, event, filter, handler, useCapture) => {\n const wrapped = handle(filter, handler);\n element.dom.addEventListener(event, wrapped, useCapture);\n return { unbind: curry(unbind, element, event, wrapped, useCapture) };\n };\n const bind$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false);\n const unbind = (element, event, handler, useCapture) => {\n element.dom.removeEventListener(event, handler, useCapture);\n };\n\n const filter = always;\n const bind$1 = (element, event, handler) => bind$2(element, event, filter, handler);\n\n const cached = f => {\n let called = false;\n let r;\n return (...args) => {\n if (!called) {\n called = true;\n r = f.apply(null, args);\n }\n return r;\n };\n };\n\n const DeviceType = (os, browser, userAgent, mediaMatch) => {\n const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;\n const isiPhone = os.isiOS() && !isiPad;\n const isMobile = os.isiOS() || os.isAndroid();\n const isTouch = isMobile || mediaMatch('(pointer:coarse)');\n const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');\n const isPhone = isiPhone || isMobile && !isTablet;\n const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;\n const isDesktop = !isPhone && !isTablet && !iOSwebview;\n return {\n isiPad: constant(isiPad),\n isiPhone: constant(isiPhone),\n isTablet: constant(isTablet),\n isPhone: constant(isPhone),\n isTouch: constant(isTouch),\n isAndroid: os.isAndroid,\n isiOS: os.isiOS,\n isWebView: constant(iOSwebview),\n isDesktop: constant(isDesktop)\n };\n };\n\n const firstMatch = (regexes, s) => {\n for (let i = 0; i < regexes.length; i++) {\n const x = regexes[i];\n if (x.test(s)) {\n return x;\n }\n }\n return undefined;\n };\n const find = (regexes, agent) => {\n const r = firstMatch(regexes, agent);\n if (!r) {\n return {\n major: 0,\n minor: 0\n };\n }\n const group = i => {\n return Number(agent.replace(r, '$' + i));\n };\n return nu$2(group(1), group(2));\n };\n const detect$3 = (versionRegexes, agent) => {\n const cleanedAgent = String(agent).toLowerCase();\n if (versionRegexes.length === 0) {\n return unknown$2();\n }\n return find(versionRegexes, cleanedAgent);\n };\n const unknown$2 = () => {\n return nu$2(0, 0);\n };\n const nu$2 = (major, minor) => {\n return {\n major,\n minor\n };\n };\n const Version = {\n nu: nu$2,\n detect: detect$3,\n unknown: unknown$2\n };\n\n const detectBrowser$1 = (browsers, userAgentData) => {\n return findMap(userAgentData.brands, uaBrand => {\n const lcBrand = uaBrand.brand.toLowerCase();\n return find$1(browsers, browser => {\n var _a;\n return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());\n }).map(info => ({\n current: info.name,\n version: Version.nu(parseInt(uaBrand.version, 10), 0)\n }));\n });\n };\n\n const detect$2 = (candidates, userAgent) => {\n const agent = String(userAgent).toLowerCase();\n return find$1(candidates, candidate => {\n return candidate.search(agent);\n });\n };\n const detectBrowser = (browsers, userAgent) => {\n return detect$2(browsers, userAgent).map(browser => {\n const version = Version.detect(browser.versionRegexes, userAgent);\n return {\n current: browser.name,\n version\n };\n });\n };\n const detectOs = (oses, userAgent) => {\n return detect$2(oses, userAgent).map(os => {\n const version = Version.detect(os.versionRegexes, userAgent);\n return {\n current: os.name,\n version\n };\n });\n };\n\n const normalVersionRegex = /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/;\n const checkContains = target => {\n return uastring => {\n return contains(uastring, target);\n };\n };\n const browsers = [\n {\n name: 'Edge',\n versionRegexes: [/.*?edge\\/ ?([0-9]+)\\.([0-9]+)$/],\n search: uastring => {\n return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');\n }\n },\n {\n name: 'Chromium',\n brand: 'Chromium',\n versionRegexes: [\n /.*?chrome\\/([0-9]+)\\.([0-9]+).*/,\n normalVersionRegex\n ],\n search: uastring => {\n return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');\n }\n },\n {\n name: 'IE',\n versionRegexes: [\n /.*?msie\\ ?([0-9]+)\\.([0-9]+).*/,\n /.*?rv:([0-9]+)\\.([0-9]+).*/\n ],\n search: uastring => {\n return contains(uastring, 'msie') || contains(uastring, 'trident');\n }\n },\n {\n name: 'Opera',\n versionRegexes: [\n normalVersionRegex,\n /.*?opera\\/([0-9]+)\\.([0-9]+).*/\n ],\n search: checkContains('opera')\n },\n {\n name: 'Firefox',\n versionRegexes: [/.*?firefox\\/\\ ?([0-9]+)\\.([0-9]+).*/],\n search: checkContains('firefox')\n },\n {\n name: 'Safari',\n versionRegexes: [\n normalVersionRegex,\n /.*?cpu os ([0-9]+)_([0-9]+).*/\n ],\n search: uastring => {\n return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');\n }\n }\n ];\n const oses = [\n {\n name: 'Windows',\n search: checkContains('win'),\n versionRegexes: [/.*?windows\\ nt\\ ?([0-9]+)\\.([0-9]+).*/]\n },\n {\n name: 'iOS',\n search: uastring => {\n return contains(uastring, 'iphone') || contains(uastring, 'ipad');\n },\n versionRegexes: [\n /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/,\n /.*cpu os ([0-9]+)_([0-9]+).*/,\n /.*cpu iphone os ([0-9]+)_([0-9]+).*/\n ]\n },\n {\n name: 'Android',\n search: checkContains('android'),\n versionRegexes: [/.*?android\\ ?([0-9]+)\\.([0-9]+).*/]\n },\n {\n name: 'macOS',\n search: checkContains('mac os x'),\n versionRegexes: [/.*?mac\\ os\\ x\\ ?([0-9]+)_([0-9]+).*/]\n },\n {\n name: 'Linux',\n search: checkContains('linux'),\n versionRegexes: []\n },\n {\n name: 'Solaris',\n search: checkContains('sunos'),\n versionRegexes: []\n },\n {\n name: 'FreeBSD',\n search: checkContains('freebsd'),\n versionRegexes: []\n },\n {\n name: 'ChromeOS',\n search: checkContains('cros'),\n versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/]\n }\n ];\n const PlatformInfo = {\n browsers: constant(browsers),\n oses: constant(oses)\n };\n\n const edge = 'Edge';\n const chromium = 'Chromium';\n const ie = 'IE';\n const opera = 'Opera';\n const firefox = 'Firefox';\n const safari = 'Safari';\n const unknown$1 = () => {\n return nu$1({\n current: undefined,\n version: Version.unknown()\n });\n };\n const nu$1 = info => {\n const current = info.current;\n const version = info.version;\n const isBrowser = name => () => current === name;\n return {\n current,\n version,\n isEdge: isBrowser(edge),\n isChromium: isBrowser(chromium),\n isIE: isBrowser(ie),\n isOpera: isBrowser(opera),\n isFirefox: isBrowser(firefox),\n isSafari: isBrowser(safari)\n };\n };\n const Browser = {\n unknown: unknown$1,\n nu: nu$1,\n edge: constant(edge),\n chromium: constant(chromium),\n ie: constant(ie),\n opera: constant(opera),\n firefox: constant(firefox),\n safari: constant(safari)\n };\n\n const windows = 'Windows';\n const ios = 'iOS';\n const android = 'Android';\n const linux = 'Linux';\n const macos = 'macOS';\n const solaris = 'Solaris';\n const freebsd = 'FreeBSD';\n const chromeos = 'ChromeOS';\n const unknown = () => {\n return nu({\n current: undefined,\n version: Version.unknown()\n });\n };\n const nu = info => {\n const current = info.current;\n const version = info.version;\n const isOS = name => () => current === name;\n return {\n current,\n version,\n isWindows: isOS(windows),\n isiOS: isOS(ios),\n isAndroid: isOS(android),\n isMacOS: isOS(macos),\n isLinux: isOS(linux),\n isSolaris: isOS(solaris),\n isFreeBSD: isOS(freebsd),\n isChromeOS: isOS(chromeos)\n };\n };\n const OperatingSystem = {\n unknown,\n nu,\n windows: constant(windows),\n ios: constant(ios),\n android: constant(android),\n linux: constant(linux),\n macos: constant(macos),\n solaris: constant(solaris),\n freebsd: constant(freebsd),\n chromeos: constant(chromeos)\n };\n\n const detect$1 = (userAgent, userAgentDataOpt, mediaMatch) => {\n const browsers = PlatformInfo.browsers();\n const oses = PlatformInfo.oses();\n const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu);\n const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);\n const deviceType = DeviceType(os, browser, userAgent, mediaMatch);\n return {\n browser,\n os,\n deviceType\n };\n };\n const PlatformDetection = { detect: detect$1 };\n\n const mediaMatch = query => window.matchMedia(query).matches;\n let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch));\n const detect = () => platform();\n\n const r = (left, top) => {\n const translate = (x, y) => r(left + x, top + y);\n return {\n left,\n top,\n translate\n };\n };\n const SugarPosition = r;\n\n const get$1 = _DOC => {\n const doc = _DOC !== undefined ? _DOC.dom : document;\n const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;\n const y = doc.body.scrollTop || doc.documentElement.scrollTop;\n return SugarPosition(x, y);\n };\n\n const get = _win => {\n const win = _win === undefined ? window : _win;\n if (detect().browser.isFirefox()) {\n return Optional.none();\n } else {\n return Optional.from(win.visualViewport);\n }\n };\n const bounds = (x, y, width, height) => ({\n x,\n y,\n width,\n height,\n right: x + width,\n bottom: y + height\n });\n const getBounds = _win => {\n const win = _win === undefined ? window : _win;\n const doc = win.document;\n const scroll = get$1(SugarElement.fromDom(doc));\n return get(win).fold(() => {\n const html = win.document.documentElement;\n const width = html.clientWidth;\n const height = html.clientHeight;\n return bounds(scroll.left, scroll.top, width, height);\n }, visualViewport => bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height));\n };\n const bind = (name, callback, _win) => get(_win).map(visualViewport => {\n const handler = e => callback(fromRawEvent(e));\n visualViewport.addEventListener(name, handler);\n return { unbind: () => visualViewport.removeEventListener(name, handler) };\n }).getOrThunk(() => ({ unbind: noop }));\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');\n\n var global = tinymce.util.Tools.resolve('tinymce.Env');\n\n const fireFullscreenStateChanged = (editor, state) => {\n editor.dispatch('FullscreenStateChanged', { state });\n editor.dispatch('ResizeEditor');\n };\n\n const option = name => editor => editor.options.get(name);\n const register$2 = editor => {\n const registerOption = editor.options.register;\n registerOption('fullscreen_native', {\n processor: 'boolean',\n default: false\n });\n };\n const getFullscreenNative = option('fullscreen_native');\n\n const getFullscreenRoot = editor => {\n const elem = SugarElement.fromDom(editor.getElement());\n return getShadowRoot(elem).map(getShadowHost).getOrThunk(() => getBody(owner(elem)));\n };\n const getFullscreenElement = root => {\n if (root.fullscreenElement !== undefined) {\n return root.fullscreenElement;\n } else if (root.msFullscreenElement !== undefined) {\n return root.msFullscreenElement;\n } else if (root.webkitFullscreenElement !== undefined) {\n return root.webkitFullscreenElement;\n } else {\n return null;\n }\n };\n const getFullscreenchangeEventName = () => {\n if (document.fullscreenElement !== undefined) {\n return 'fullscreenchange';\n } else if (document.msFullscreenElement !== undefined) {\n return 'MSFullscreenChange';\n } else if (document.webkitFullscreenElement !== undefined) {\n return 'webkitfullscreenchange';\n } else {\n return 'fullscreenchange';\n }\n };\n const requestFullscreen = sugarElem => {\n const elem = sugarElem.dom;\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n } else if (elem.msRequestFullscreen) {\n elem.msRequestFullscreen();\n } else if (elem.webkitRequestFullScreen) {\n elem.webkitRequestFullScreen();\n }\n };\n const exitFullscreen = sugarDoc => {\n const doc = sugarDoc.dom;\n if (doc.exitFullscreen) {\n doc.exitFullscreen();\n } else if (doc.msExitFullscreen) {\n doc.msExitFullscreen();\n } else if (doc.webkitCancelFullScreen) {\n doc.webkitCancelFullScreen();\n }\n };\n const isFullscreenElement = elem => elem.dom === getFullscreenElement(owner(elem).dom);\n\n const ancestors$1 = (scope, predicate, isRoot) => filter$1(parents(scope, isRoot), predicate);\n const siblings$1 = (scope, predicate) => filter$1(siblings$2(scope), predicate);\n\n const all = selector => all$1(selector);\n const ancestors = (scope, selector, isRoot) => ancestors$1(scope, e => is(e, selector), isRoot);\n const siblings = (scope, selector) => siblings$1(scope, e => is(e, selector));\n\n const attr = 'data-ephox-mobile-fullscreen-style';\n const siblingStyles = 'display:none!important;';\n const ancestorPosition = 'position:absolute!important;';\n const ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';\n const bgFallback = 'background-color:rgb(255,255,255)!important;';\n const isAndroid = global.os.isAndroid();\n const matchColor = editorBody => {\n const color = get$2(editorBody, 'background-color');\n return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;\n };\n const clobberStyles = (dom, container, editorBody) => {\n const gatherSiblings = element => {\n return siblings(element, '*:not(.tox-silver-sink)');\n };\n const clobber = clobberStyle => element => {\n const styles = get$3(element, 'style');\n const backup = styles === undefined ? 'no-styles' : styles.trim();\n if (backup === clobberStyle) {\n return;\n } else {\n set$1(element, attr, backup);\n setAll(element, dom.parseStyle(clobberStyle));\n }\n };\n const ancestors$1 = ancestors(container, '*');\n const siblings$1 = bind$3(ancestors$1, gatherSiblings);\n const bgColor = matchColor(editorBody);\n each$1(siblings$1, clobber(siblingStyles));\n each$1(ancestors$1, clobber(ancestorPosition + ancestorStyles + bgColor));\n const containerStyles = isAndroid === true ? '' : ancestorPosition;\n clobber(containerStyles + ancestorStyles + bgColor)(container);\n };\n const restoreStyles = dom => {\n const clobberedEls = all('[' + attr + ']');\n each$1(clobberedEls, element => {\n const restore = get$3(element, attr);\n if (restore && restore !== 'no-styles') {\n setAll(element, dom.parseStyle(restore));\n } else {\n remove(element, 'style');\n }\n remove(element, attr);\n });\n };\n\n const DOM = global$1.DOM;\n const getScrollPos = () => getBounds(window);\n const setScrollPos = pos => window.scrollTo(pos.x, pos.y);\n const viewportUpdate = get().fold(() => ({\n bind: noop,\n unbind: noop\n }), visualViewport => {\n const editorContainer = value();\n const resizeBinder = unbindable();\n const scrollBinder = unbindable();\n const refreshScroll = () => {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n };\n const refreshVisualViewport = () => {\n window.requestAnimationFrame(() => {\n editorContainer.on(container => setAll(container, {\n top: visualViewport.offsetTop + 'px',\n left: visualViewport.offsetLeft + 'px',\n height: visualViewport.height + 'px',\n width: visualViewport.width + 'px'\n }));\n });\n };\n const update = first(() => {\n refreshScroll();\n refreshVisualViewport();\n }, 50);\n const bind$1 = element => {\n editorContainer.set(element);\n update.throttle();\n resizeBinder.set(bind('resize', update.throttle));\n scrollBinder.set(bind('scroll', update.throttle));\n };\n const unbind = () => {\n editorContainer.on(() => {\n resizeBinder.clear();\n scrollBinder.clear();\n });\n editorContainer.clear();\n };\n return {\n bind: bind$1,\n unbind\n };\n });\n const toggleFullscreen = (editor, fullscreenState) => {\n const body = document.body;\n const documentElement = document.documentElement;\n const editorContainer = editor.getContainer();\n const editorContainerS = SugarElement.fromDom(editorContainer);\n const sinkContainerS = nextSibling(editorContainerS).filter(elm => isHTMLElement(elm) && has(elm, 'tox-silver-sink'));\n const fullscreenRoot = getFullscreenRoot(editor);\n const fullscreenInfo = fullscreenState.get();\n const editorBody = SugarElement.fromDom(editor.getBody());\n const isTouch = global.deviceType.isTouch();\n const editorContainerStyle = editorContainer.style;\n const iframe = editor.iframeElement;\n const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;\n const handleClasses = handler => {\n handler(body, 'tox-fullscreen');\n handler(documentElement, 'tox-fullscreen');\n handler(editorContainer, 'tox-fullscreen');\n getShadowRoot(editorContainerS).map(root => getShadowHost(root).dom).each(host => {\n handler(host, 'tox-fullscreen');\n handler(host, 'tox-shadowhost');\n });\n };\n const cleanup = () => {\n if (isTouch) {\n restoreStyles(editor.dom);\n }\n handleClasses(DOM.removeClass);\n viewportUpdate.unbind();\n Optional.from(fullscreenState.get()).each(info => info.fullscreenChangeHandler.unbind());\n };\n if (!fullscreenInfo) {\n const fullscreenChangeHandler = bind$1(owner(fullscreenRoot), getFullscreenchangeEventName(), _evt => {\n if (getFullscreenNative(editor)) {\n if (!isFullscreenElement(fullscreenRoot) && fullscreenState.get() !== null) {\n toggleFullscreen(editor, fullscreenState);\n }\n }\n });\n const newFullScreenInfo = {\n scrollPos: getScrollPos(),\n containerWidth: editorContainerStyle.width,\n containerHeight: editorContainerStyle.height,\n containerTop: editorContainerStyle.top,\n containerLeft: editorContainerStyle.left,\n iframeWidth: iframeStyle.width,\n iframeHeight: iframeStyle.height,\n fullscreenChangeHandler,\n sinkCssPosition: sinkContainerS.map(elm => get$2(elm, 'position'))\n };\n if (isTouch) {\n clobberStyles(editor.dom, editorContainerS, editorBody);\n }\n iframeStyle.width = iframeStyle.height = '100%';\n editorContainerStyle.width = editorContainerStyle.height = '';\n handleClasses(DOM.addClass);\n sinkContainerS.each(elm => {\n set(elm, 'position', 'fixed');\n });\n viewportUpdate.bind(editorContainerS);\n editor.on('remove', cleanup);\n fullscreenState.set(newFullScreenInfo);\n if (getFullscreenNative(editor)) {\n requestFullscreen(fullscreenRoot);\n }\n fireFullscreenStateChanged(editor, true);\n } else {\n fullscreenInfo.fullscreenChangeHandler.unbind();\n if (getFullscreenNative(editor) && isFullscreenElement(fullscreenRoot)) {\n exitFullscreen(owner(fullscreenRoot));\n }\n iframeStyle.width = fullscreenInfo.iframeWidth;\n iframeStyle.height = fullscreenInfo.iframeHeight;\n editorContainerStyle.width = fullscreenInfo.containerWidth;\n editorContainerStyle.height = fullscreenInfo.containerHeight;\n editorContainerStyle.top = fullscreenInfo.containerTop;\n editorContainerStyle.left = fullscreenInfo.containerLeft;\n lift2(sinkContainerS, fullscreenInfo.sinkCssPosition, (elm, val) => {\n set(elm, 'position', val);\n });\n cleanup();\n setScrollPos(fullscreenInfo.scrollPos);\n fullscreenState.set(null);\n fireFullscreenStateChanged(editor, false);\n editor.off('remove', cleanup);\n }\n };\n\n const register$1 = (editor, fullscreenState) => {\n editor.addCommand('mceFullScreen', () => {\n toggleFullscreen(editor, fullscreenState);\n });\n };\n\n const makeSetupHandler = (editor, fullscreenState) => api => {\n api.setActive(fullscreenState.get() !== null);\n const editorEventCallback = e => api.setActive(e.state);\n editor.on('FullscreenStateChanged', editorEventCallback);\n return () => editor.off('FullscreenStateChanged', editorEventCallback);\n };\n const register = (editor, fullscreenState) => {\n const onAction = () => editor.execCommand('mceFullScreen');\n editor.ui.registry.addToggleMenuItem('fullscreen', {\n text: 'Fullscreen',\n icon: 'fullscreen',\n shortcut: 'Meta+Shift+F',\n onAction,\n onSetup: makeSetupHandler(editor, fullscreenState)\n });\n editor.ui.registry.addToggleButton('fullscreen', {\n tooltip: 'Fullscreen',\n icon: 'fullscreen',\n onAction,\n onSetup: makeSetupHandler(editor, fullscreenState)\n });\n };\n\n var Plugin = () => {\n global$2.add('fullscreen', editor => {\n const fullscreenState = Cell(null);\n if (editor.inline) {\n return get$5(fullscreenState);\n }\n register$2(editor);\n register$1(editor, fullscreenState);\n register(editor, fullscreenState);\n editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');\n return get$5(fullscreenState);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["Cell","initial","value","get","set","v","global$2","tinymce","util","Tools","resolve","get$5","fullscreenState","isFullscreen","isType$1","type","x","t","Array","isArray","o","proto","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isSimpleType","eq$1","a","isString","isObject","isNull","isBoolean","isUndefined","undefined","isNonNullable","isNullable","isFunction","isNumber","noop","constant","curry","fn","initialArgs","restArgs","all","concat","apply","never","always","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","nativePush","push","xs","f","len","length","r","i","each$1","filter$1","pred","find$1","until","findUntil","bind$3","flatten","head","get$4","singleton","doRevoke","subject","revoke","clear","isSet","s","unbindable","unbind","keys","Object","Global","window","Function","p","scope","parts","path","split","actual","unsafe","getPrototypeOf","sandHTMLElement","test","isType","element","dom","nodeType","isElement","isText","isDocument","isDocumentFragment","set$1","key","console","error","setAttribute","rawSet","get$3","getAttribute","remove","removeAttribute","contains","str","substr","start","end","idx","indexOf","isSupported$1","style","getPropertyValue","fromDom","node","SugarElement","fromHtml","html","div","document","createElement","innerHTML","hasChildNodes","childNodes","fromTag","fromText","text","createTextNode","fromPoint","docElm","y","elementFromPoint","is","selector","elem","matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","owner","ownerDocument","siblings$2","parentNode","parent","children","elements","e2","supported","Element","attachShadow","Node","getRootNode","isSupported","e","dos","getShadowRoot","host","getShadowHost","isOpenShadowHost","shadowRoot","inBody","doc","body","fbc","fab","internalSet","property","setProperty","setAll","css","obj","props","k","get$2","getComputedStyle","getUnsafeProperty","fromRawEvent","rawEvent","target","event","el","composed","composedPath","getOriginalEventTarget","stop","stopPropagation","prevent","preventDefault","kill","fa","fb","args","raw","mkEvent","clientX","clientY","handler","useCapture","wrapped","handle","addEventListener","removeEventListener","bind$1","bind$2","unknown$2","nu$2","major","minor","Version","nu","detect","versionRegexes","agent","cleanedAgent","toLowerCase","regexes","firstMatch","group","Number","replace","find","unknown","detectBrowser$1","browsers","userAgentData","arr","findMap","brands","uaBrand","lcBrand","brand","browser","info","current","version","parseInt","detect$2","candidates","userAgent","candidate","search","normalVersionRegex","checkContains","uastring","oses","PlatformInfo","edge","chromium","opera","firefox","safari","nu$1","isBrowser","isEdge","isChromium","isIE","isOpera","isFirefox","isSafari","Browser","ie","windows","android","linux","macos","solaris","freebsd","chromeos","isOS","isWindows","isiOS","isAndroid","isMacOS","isLinux","isSolaris","isFreeBSD","isChromeOS","OperatingSystem","ios","PlatformDetection","userAgentDataOpt","mediaMatch","detectBrowser","os","detectOs","deviceType","isiPad","isiPhone","isMobile","isTouch","isTablet","isPhone","iOSwebview","isDesktop","isWebView","DeviceType","query","matchMedia","platform","called","cached","navigator","left","top","translate","SugarPosition","_win","win","visualViewport","bounds","width","height","right","bottom","getBounds","scroll","_DOC","scrollLeft","documentElement","scrollTop","get$1","clientWidth","clientHeight","Math","max","pageLeft","pageTop","callback","global$1","global","fireFullscreenStateChanged","editor","state","dispatch","getFullscreenNative","options","getFullscreenRoot","getElement","b","getBody","isFullscreenElement","root","fullscreenElement","msFullscreenElement","webkitFullscreenElement","ancestors$1","isRoot","ret","rawParent","parents","base","childElementCount","querySelectorAll","all$1","ancestors","siblings","siblings$1","attr","ancestorPosition","ancestorStyles","clobberStyles","container","editorBody","clobber","clobberStyle","styles","backup","trim","parseStyle","bgColor","color","matchColor","DOM","viewportUpdate","editorContainer","on","resizeBinder","scrollBinder","update","rate","timer","cancel","clearTimeout","throttle","setTimeout","first","requestAnimationFrame","offsetTop","offsetLeft","toggleFullscreen","getContainer","editorContainerS","sinkContainerS","nextSibling","elm","isHTMLElement","clazz","classList","supports","has","fullscreenRoot","fullscreenInfo","editorContainerStyle","iframe","iframeElement","iframeStyle","handleClasses","cleanup","clobberedEls","restore","restoreStyles","removeClass","fullscreenChangeHandler","sugarDoc","exitFullscreen","msExitFullscreen","webkitCancelFullScreen","iframeWidth","iframeHeight","containerWidth","containerHeight","containerTop","containerLeft","oa","ob","sinkCssPosition","val","pos","scrollPos","scrollTo","off","_evt","newFullScreenInfo","addClass","sugarElem","requestFullscreen","msRequestFullscreen","webkitRequestFullScreen","makeSetupHandler","api","setActive","editorEventCallback","add","inline","registerOption","register","processor","default","register$2","addCommand","register$1","onAction","execCommand","ui","registry","addToggleMenuItem","icon","shortcut","onSetup","addToggleButton","tooltip","addShortcut"],"mappings":"gGAIA,WAGI,MAAMA,EAAOC,IACX,IAAIC,EAAQD,EAOZ,MAAO,CACLE,IAPU,IACHD,EAOPE,IALUC,IACVH,EAAQG,CAAC,EAKV,EAGH,IAAIC,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAAQC,IAAe,CAAOC,aAAc,IAAgC,OAA1BD,EAAgBT,QAsBlEW,EAAWC,GAAQb,GAZVc,KACb,MAAMC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me,CAAWvH,EAAQ5W,GAxBN,EAAC4W,EAAQ5W,KACxB,MAAMoe,EAAW,IAAMxH,EAAOyH,YAAY,iBAC1CzH,EAAO0H,GAAGC,SAASC,kBAAkB,aAAc,CACjDzU,KAAM,aACN0U,KAAM,aACNC,SAAU,eACVN,WACAO,QAASpB,GAAiB3G,EAAQ5W,KAEpC4W,EAAO0H,GAAGC,SAASK,gBAAgB,aAAc,CAC/CC,QAAS,aACTJ,KAAM,aACNL,WACAO,QAASpB,GAAiB3G,EAAQ5W,IAClC,EAWA8d,CAASlH,EAAQ5W,GACjB4W,EAAOkI,YAAY,eAAgB,GAAI,kBAL9B/e,EAAMC,EAMc,GAMpC,CA5tCD"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__exports as e}from"../../../../_virtual/plugin50.mjs";var t;function a(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>{var i;return!!a(e,t.prototype)||(null===(i=e.constructor)||void 0===i?void 0:i.name)===t.name},i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,o=e=>t=>typeof t===e,r=i("string"),s=i("object"),n=e=>((e,i)=>s(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=(m=null,e=>m===e);var m;const d=o("boolean"),g=e=>!(e=>null==e)(e),u=o("function"),p=o("number"),h=()=>{};class b{constructor(e,t){this.tag=e,this.value=t}static some(e){return new b(!0,e)}static none(){return b.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?b.some(e(this.value)):b.none()}bind(e){return this.tag?e(this.value):b.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:b.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 g(e)?b.some(e):b.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()"}}b.singletonNone=new b(!1);const v=Object.keys,y=Object.hasOwnProperty,f=(e,t,a,i)=>{((e,t)=>{const a=v(e);for(let i=0,o=a.length;i<o;i++){const o=a[i];t(e[o],o)}})(e,((e,o)=>{(t(e,o)?a:i)(e,o)}))},w=(e,t)=>y.call(e,t),A=Array.prototype.push,D=e=>{const t=[];for(let a=0,i=e.length;a<i;++a){if(!l(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);A.apply(t,e[a])}return t},_=e=>((e,t)=>t>=0&&t<e.length?b.some(e[t]):b.none())(e,0);"undefined"!=typeof window?window:Function("return this;")();const C=(e,t,a)=>{((e,t,a)=>{if(!(r(a)||d(a)||p(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)},x=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},I={fromHtml:(e,t)=>{const a=(t||document).createElement("div");if(a.innerHTML=e,!a.hasChildNodes()||a.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return x(a.childNodes[0])},fromTag:(e,t)=>{const a=(t||document).createElement(e);return x(a)},fromText:(e,t)=>{const a=(t||document).createTextNode(e);return x(a)},fromDom:x,fromPoint:(e,t,a)=>b.from(e.dom.elementFromPoint(t,a)).map(x)};var U=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S=tinymce.util.Tools.resolve("tinymce.util.URI");const N=e=>e.length>0,T=e=>t=>t.options.get(e),E=e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a<i;++a)if(!t(e[a]))return!1;return!0}return!1})(e,s)||u(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})},L=T("image_dimensions"),O=T("image_advtab"),M=T("image_uploadtab"),j=T("image_prepend_url"),P=T("image_class_list"),R=T("image_description"),k=T("image_title"),z=T("image_caption"),B=T("image_list"),H=T("a11y_advanced_options"),F=T("automatic_uploads"),G=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),W=e=>(e&&(e=e.replace(/px$/,"")),e),$=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),V=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),q=(e,t)=>{const a=e.options.get;return S.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},K=U.DOM,Z=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?W(e.style.marginLeft):"",J=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?W(e.style.marginTop):"",Q=e=>e.style.borderWidth?W(e.style.borderWidth):"",X=(e,t)=>{var a;return e.hasAttribute(t)&&null!==(a=e.getAttribute(t))&&void 0!==a?a:""},Y=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,ee=(e,t,a)=>{""===a||null===a?e.removeAttribute(t):e.setAttribute(t,a)},te=e=>{Y(e)?(e=>{const t=e.parentNode;g(t)&&(K.insertAfter(e,t),K.remove(t))})(e):(e=>{const t=K.create("figure",{class:"image"});K.insertAfter(t,e),t.appendChild(e),t.appendChild(K.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)},ae=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},ie=(e,t)=>(e,a,i)=>{const o=e.style;o[a]?(o[a]=$(i),ae(e,t)):ee(e,a,i)},oe=(e,t)=>e.style[t]?W(e.style[t]):X(e,t),re=(e,t)=>{const a=$(t);e.style.marginLeft=a,e.style.marginRight=a},se=(e,t)=>{const a=$(t);e.style.marginTop=a,e.style.marginBottom=a},ne=(e,t)=>{const a=$(t);e.style.borderWidth=a},le=(e,t)=>{e.style.borderStyle=t},ce=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},me=e=>g(e)&&"FIGURE"===e.nodeName,de=e=>0===K.getAttrib(e,"alt").length&&"presentation"===K.getAttrib(e,"role"),ge=e=>de(e)?"":X(e,"alt"),ue=(e,t)=>{var a;const i=document.createElement("img");return ee(i,"style",t.style),(Z(i)||""!==t.hspace)&&re(i,t.hspace),(J(i)||""!==t.vspace)&&se(i,t.vspace),(Q(i)||""!==t.border)&&ne(i,t.border),(ce(i)||""!==t.borderStyle)&&le(i,t.borderStyle),e(null!==(a=i.getAttribute("style"))&&void 0!==a?a:"")},pe=(e,t)=>({src:X(t,"src"),alt:ge(t),title:X(t,"title"),width:oe(t,"width"),height:oe(t,"height"),class:X(t,"class"),style:e(X(t,"style")),caption:Y(t),hspace:Z(t),vspace:J(t),border:Q(t),borderStyle:ce(t),isDecorative:de(t)}),he=(e,t,a,i,o)=>{a[i]!==t[i]&&o(e,i,String(a[i]))},be=(e,t,a)=>{if(a){K.setAttrib(e,"role","presentation");const t=I.fromDom(e);C(t,"alt","")}else{if(c(t)){const t=I.fromDom(e);i="alt",t.dom.removeAttribute(i)}else{const a=I.fromDom(e);C(a,"alt",t)}"presentation"===K.getAttrib(e,"role")&&K.setAttrib(e,"role","")}var i},ve=(e,t)=>(a,i,o)=>{e(a,o),ae(a,t)},ye=(e,t,a)=>{const i=pe(e,a);he(a,i,t,"caption",((e,t,a)=>te(e))),he(a,i,t,"src",ee),he(a,i,t,"title",ee),he(a,i,t,"width",ie(0,e)),he(a,i,t,"height",ie(0,e)),he(a,i,t,"class",ee),he(a,i,t,"style",ve(((e,t)=>ee(e,"style",t)),e)),he(a,i,t,"hspace",ve(re,e)),he(a,i,t,"vspace",ve(se,e)),he(a,i,t,"border",ve(ne,e)),he(a,i,t,"borderStyle",ve(le,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||be(e,a.alt,a.isDecorative)})(a,i,t)},fe=(e,t)=>{const a=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},we=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||V(t))?null:t},Ae=(e,t)=>{var a;const i=e.dom,o=((e,t)=>{const a={};var i;return f(e,t,(i=a,(e,t)=>{i[t]=e}),h),a})(e.schema.getTextBlockElements(),((t,a)=>!e.schema.isValidChild(a,"figure"))),r=i.getParent(t.parentNode,(e=>{return t=o,a=e.nodeName,w(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return r&&null!==(a=i.split(r,t))&&void 0!==a?a:t},De=(e,t)=>{const a=((e,t)=>{const a=document.createElement("img");if(ye(e,{...t,caption:!1},a),be(a,t.alt,t.isDecorative),t.caption){const e=K.create("figure",{class:"image"});return e.appendChild(a),e.appendChild(K.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return a})((t=>fe(e,t)),t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),me(i)){const t=Ae(e,i);e.selection.select(t)}else e.selection.select(i)},_e=(e,t)=>{const a=we(e);if(a)if(ye((t=>fe(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),me(a.parentNode)){const t=a.parentNode;Ae(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!L(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)},Ce=(e,t)=>{const a=we(e);if(a){const i={...pe((t=>fe(e,t)),a),...t},o=((e,t)=>{const a=t.src;return{...t,src:q(e,a)?a:""}})(e,i);i.src?_e(e,o):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&De(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})},xe=(Ie=(e,t)=>n(e)&&n(t)?xe(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;a<e.length;a++){const i=e[a];for(const e in i)w(i,e)&&(t[e]=Ie(t[e],i[e]))}return t});var Ie,Ue=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Se=tinymce.util.Tools.resolve("tinymce.util.Tools");const Ne=e=>r(e.value)?e.value:"",Te=(e,t)=>{const a=[];return Se.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const o=Te(e.menu,t);a.push({text:i,items:o})}else{const o=t(e);a.push({text:i,value:o})}})),a},Ee=(e=Ne)=>t=>t?b.from(t).map((t=>Te(t,e))):b.none(),Le=(e,t)=>((e,t)=>{for(let a=0;a<e.length;a++){const i=t(e[a],a);if(i.isSome())return i}return b.none()})(e,(e=>(e=>w(e,"items"))(e)?Le(e.items,t):e.value===t?b.some(e):b.none())),Oe=Ee,Me=e=>Ee(Ne)(e),je=(e,t)=>e.bind((e=>Le(e,t))),Pe=e=>({title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}),Re=e=>{const t=Oe((t=>e.convertURL(t.value||t.url||"","src"))),a=new Promise((a=>{((e,t)=>{const a=B(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):u(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>D([[{text:"None",value:""}],e]))))}))})),i=Me(P(e)),o=O(e),s=M(e),n=(e=>N(e.options.get("images_upload_url")))(e),l=(e=>g(e.options.get("images_upload_handler")))(e),c=(e=>{const t=we(e);return t?pe((t=>fe(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=R(e),d=k(e),p=L(e),h=z(e),v=H(e),y=F(e),f=b.some(j(e)).filter((e=>r(e)&&e.length>0));return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:o,hasUploadTab:s,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:d,hasDimensions:p,hasImageCaption:h,prependURL:f,hasAccessibilityOptions:v,automaticUploads:y})))},ke=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return D([[{name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(o=e.classList.isSome()&&e.hasImageCaption,o?{type:"grid",columns:2}:{type:"panel"}),items:D([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var o},ze=e=>({title:"General",name:"general",items:ke(e)}),Be=ke,He=e=>({title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}),Fe=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),Ge=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),We=(e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?b.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?b.some(e+t):b.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))},$e=(e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const o=xe({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&je(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&d(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,o,i),t.setData(o)}},Ve=(e,t,a,i)=>{We(t,i),$e(t,i),((e,t,a,i)=>{const o=i.getData(),r=o.src.value,s=o.src.meta||{};s.width||s.height||!t.hasDimensions||(N(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),o=je(e.imageList,i.src.value);t.prevImage=o,a.setData({images:o.map((e=>e.value)).getOr("")})})(t,a,i)},qe=(e,t,a,i)=>{const o=i.getData();i.block("Uploading image"),_(o.fileinput).fold((()=>{i.unblock()}),(o=>{const r=URL.createObjectURL(o),s=()=>{i.unblock(),URL.revokeObjectURL(r)},n=o=>{i.setData({src:{value:o,meta:{}}}),i.showTab("general"),Ve(e,t,a,i)};var l;(l=o,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{var e;t(null===(e=a.error)||void 0===e?void 0:e.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(o,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),s()})).catch((t=>{s(),e.alertErr(t)})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},Ke=(e,t,a)=>(i,o)=>{"src"===o.name?Ve(e,t,a,i):"images"===o.name?((e,t,a,i)=>{const o=i.getData(),r=je(t.imageList,o.images);r.each((e=>{const t=""===o.alt||a.prevImage.map((e=>e.text===o.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Ve(e,t,a,i)})(e,t,a,i):"alt"===o.name?a.prevAlt=i.getData().alt:"fileinput"===o.name?qe(e,t,a,i):"isDecorative"===o.name&&i.setEnabled("alt",!i.getData().isDecorative)},Ze=e=>()=>{e.open=!1},Je=e=>{if(e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler){return{type:"tabpanel",tabs:D([[ze(e)],e.hasAdvTab?[Pe(e)]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[He(e)]:[]])}}return{type:"panel",items:Be(e)}},Qe=(e,t,a)=>i=>{const o=xe(Fe(t.image),i.getData()),r={...o,style:ue(a.normalizeCss,Ge(o,!1))};e.execCommand("mceUpdateImage",!1,Ge(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},Xe=e=>t=>q(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.onload=a.onerror=null,a.parentNode&&a.parentNode.removeChild(a),t(e)};a.onload=()=>{const e={width:G(a.width,a.clientWidth),height:G(a.height,a.clientHeight)};i(Promise.resolve(e))},a.onerror=()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))};const o=a.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left="0px",o.width=o.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Ye=e=>(t,a,i)=>{var o;return e.editorUpload.blobCache.create({blob:t,blobUri:a,name:null===(o=t.name)||void 0===o?void 0:o.replace(/\.[^\.]+$/,""),filename:t.name,base64:i.split(",")[1]})},et=e=>t=>{e.editorUpload.blobCache.add(t)},tt=e=>t=>{e.windowManager.alert(t)},at=e=>t=>fe(e,t),it=e=>t=>e.dom.parseStyle(t),ot=e=>(t,a)=>e.dom.serializeStyle(t,a),rt=e=>t=>Ue(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),st=e=>{const t={imageSize:Xe(e),addToBlobCache:et(e),createBlobCache:Ye(e),alertErr:tt(e),normalizeCss:at(e),parseStyle:it(e),serializeStyle:ot(e),uploadImage:rt(e)};return{open:()=>{Re(e).then((a=>{const i=(e=>({prevImage:je(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Je(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Fe(a.image),onSubmit:Qe(e,a,t),onChange:Ke(t,a,i),onClose:Ze(i)}})).then(e.windowManager.open)}}},nt=e=>{const t=e.attr("class");return g(t)&&/\bimage\b/.test(t)},lt=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const o=t[a];nt(o)&&(o.attr("contenteditable",e?"false":null),Se.each(o.getAll("figcaption"),i))}},ct=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("image",(e=>{E(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",lt(!0)),e.serializer.addNodeFilter("figure",lt(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:st(e).open,onSetup:t=>{t.setActive(g(we(e)));const a=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,i=ct(e)(t);return()=>{a(),i()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:st(e).open,onSetup:ct(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(me(t)||"IMG"===t.nodeName&&!V(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",st(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>Ce(e,a)))}))})(e)}))}()),e}export{a as __require};
|
2
|
+
//# sourceMappingURL=plugin.mjs.map
|