@lotte-innovate/ui-component-test 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/_virtual/index11.mjs +1 -1
  2. package/_virtual/index13.mjs +1 -1
  3. package/_virtual/index15.mjs +1 -1
  4. package/_virtual/index17.mjs +1 -1
  5. package/_virtual/index19.mjs +1 -1
  6. package/_virtual/index21.mjs +1 -1
  7. package/_virtual/index3.mjs +1 -1
  8. package/_virtual/index5.mjs +1 -1
  9. package/_virtual/index7.mjs +1 -1
  10. package/_virtual/index9.mjs +1 -1
  11. package/dist/lib/components/Editor/index.mjs +1 -1
  12. package/dist/tsconfig.tsbuildinfo +1 -1
  13. package/package.json +3 -2
  14. package/public/tinymce/icons/default/index.mjs +1 -1
  15. package/public/tinymce/icons/default/index.mjs.map +1 -1
  16. package/public/tinymce/models/dom/index.mjs +1 -1
  17. package/public/tinymce/plugins/advlist/index.mjs +1 -1
  18. package/public/tinymce/plugins/advlist/plugin.mjs +1 -1
  19. package/public/tinymce/plugins/advlist/plugin.mjs.map +1 -1
  20. package/public/tinymce/plugins/code/index.mjs +1 -1
  21. package/public/tinymce/plugins/codesample/index.mjs +1 -1
  22. package/public/tinymce/plugins/codesample/index.mjs.map +1 -1
  23. package/public/tinymce/plugins/codesample/plugin.mjs +1 -1
  24. package/public/tinymce/plugins/image/index.mjs +1 -1
  25. package/public/tinymce/plugins/image/plugin.mjs +1 -1
  26. package/public/tinymce/plugins/link/index.mjs +1 -1
  27. package/public/tinymce/plugins/link/index.mjs.map +1 -1
  28. package/public/tinymce/plugins/link/plugin.mjs +1 -1
  29. package/public/tinymce/plugins/lists/index.mjs +1 -1
  30. package/public/tinymce/plugins/lists/index.mjs.map +1 -1
  31. package/public/tinymce/plugins/lists/plugin.mjs +1 -1
  32. package/public/tinymce/plugins/lists/plugin.mjs.map +1 -1
  33. package/public/tinymce/plugins/table/index.mjs +1 -1
  34. package/public/tinymce/plugins/table/plugin.mjs +1 -1
  35. package/public/tinymce/themes/silver/index.mjs +1 -1
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@lotte-innovate/ui-component-test",
3
3
  "description": "Lotte UI Library",
4
- "version": "0.2.4",
4
+ "version": "0.2.6",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "files": [
8
- "public/tinymce**/*",
8
+ "public/tinymce/**/*",
9
+ "node_modules/react/**",
9
10
  "_virtual",
10
11
  "dist"
11
12
  ],
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index14.mjs";import{__require as e}from"./icons.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
1
+ import{__exports as r}from"../../../../_virtual/index6.mjs";import{__require as e}from"./icons.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/icons/default/index.js"],"sourcesContent":["// Exports the \"default\" icons for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/icons/default')\n// ES2015:\n// import 'tinymce/icons/default'\nrequire('./icons.js');"],"names":["require$$0"],"mappings":"uIAMqBA"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/icons/default/index.js"],"sourcesContent":["// Exports the \"default\" icons for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/icons/default')\n// ES2015:\n// import 'tinymce/icons/default'\nrequire('./icons.js');"],"names":["require$$0"],"mappings":"sIAMqBA"}
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index20.mjs";import{__require as e}from"./model.mjs";var o;function i(){return o||(o=1,e()),r}export{i as __require};
1
+ import{__exports as r}from"../../../../_virtual/index22.mjs";import{__require as e}from"./model.mjs";var o;function i(){return o||(o=1,e()),r}export{i as __require};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index8.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
1
+ import{__exports as r}from"../../../../_virtual/index4.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{__exports as t}from"../../../../_virtual/plugin3.mjs";var e;function s(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");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 l(t)?a.some(t):a.none()}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 u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=(t,e,s)=>((t,e,s)=>{for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e(n,r))return a.some(n);if(s(n,r))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))),h=t=>i(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(c(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),p=(t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=h(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:m(t,i)})},v=(t,s,r,n,i,l)=>{l.length>1?p(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,h(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{v(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()),t}export{s as __require};
1
+ import{__exports as t}from"../../../../_virtual/plugin.mjs";var e;function s(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");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 l(t)?a.some(t):a.none()}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 u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=(t,e,s)=>((t,e,s)=>{for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e(n,r))return a.some(n);if(s(n,r))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))),h=t=>i(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(c(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),p=(t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=h(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:m(t,i)})},v=(t,s,r,n,i,l)=>{l.length>1?p(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,h(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{v(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()),t}export{s as __require};
2
2
  //# sourceMappingURL=plugin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","sources":["../../../../../../public/tinymce/plugins/advlist/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 applyListFormat = (editor, listName, styleValue) => {\n const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';\n editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });\n };\n\n const register$2 = editor => {\n editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {\n applyListFormat(editor, 'UL', value['list-style-type']);\n });\n editor.addCommand('ApplyOrderedListStyle', (ui, value) => {\n applyListFormat(editor, 'OL', value['list-style-type']);\n });\n };\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n registerOption('advlist_number_styles', {\n processor: 'string[]',\n default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')\n });\n registerOption('advlist_bullet_styles', {\n processor: 'string[]',\n default: 'default,circle,square'.split(',')\n });\n };\n const getNumberStyles = option('advlist_number_styles');\n const getBulletStyles = option('advlist_bullet_styles');\n\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\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 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\n const isCustomList = list => /\\btox\\-/.test(list.className);\n const isChildOfBody = (editor, elm) => {\n return editor.dom.isChildOf(elm, editor.getBody());\n };\n const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);\n const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));\n const getSelectedStyleType = editor => {\n const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');\n const style = editor.dom.getStyle(listElm, 'listStyleType');\n return Optional.from(style);\n };\n const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n const isWithinNonEditableList = (editor, element) => {\n const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();\n };\n const setNodeChangeHandler = (editor, nodeChangeHandler) => {\n const initialNode = editor.selection.getNode();\n nodeChangeHandler({\n parents: editor.dom.getParents(initialNode),\n element: initialNode\n });\n editor.on('NodeChange', nodeChangeHandler);\n return () => editor.off('NodeChange', nodeChangeHandler);\n };\n\n const styleValueToText = styleValue => {\n return styleValue.replace(/\\-/g, ' ').replace(/\\b\\w/g, chr => {\n return chr.toUpperCase();\n });\n };\n const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;\n const makeSetupHandler = (editor, nodeName) => api => {\n const updateButtonState = (editor, parents) => {\n const element = editor.selection.getStart(true);\n api.setActive(inList(editor, parents, nodeName));\n api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());\n };\n const nodeChangeHandler = e => updateButtonState(editor, e.parents);\n return setNodeChangeHandler(editor, nodeChangeHandler);\n };\n const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {\n editor.ui.registry.addSplitButton(id, {\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n presets: 'listpreview',\n columns: 3,\n fetch: callback => {\n const items = global.map(styles, styleValue => {\n const iconStyle = nodeName === 'OL' ? 'num' : 'bull';\n const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;\n const itemValue = normalizeStyleValue(styleValue);\n const displayText = styleValueToText(styleValue);\n return {\n type: 'choiceitem',\n value: itemValue,\n icon: 'list-' + iconStyle + '-' + iconName,\n text: displayText\n };\n });\n callback(items);\n },\n onAction: () => editor.execCommand(cmd),\n onItemAction: (_splitButtonApi, value) => {\n applyListFormat(editor, nodeName, value);\n },\n select: value => {\n const listStyleType = getSelectedStyleType(editor);\n return listStyleType.map(listStyle => value === listStyle).getOr(false);\n },\n onSetup: makeSetupHandler(editor, nodeName)\n });\n };\n const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {\n editor.ui.registry.addToggleButton(id, {\n active: false,\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n onSetup: makeSetupHandler(editor, nodeName),\n onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)\n });\n };\n const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {\n if (styles.length > 1) {\n addSplitButton(editor, id, tooltip, cmd, nodeName, styles);\n } else {\n addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));\n }\n };\n const register = editor => {\n addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));\n addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));\n };\n\n var Plugin = () => {\n global$1.add('advlist', editor => {\n if (editor.hasPlugin('lists')) {\n register$1(editor);\n register(editor);\n register$2(editor);\n } else {\n console.error('Please use the Lists plugin together with the Advanced List plugin.');\n }\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","applyListFormat","editor","listName","styleValue","cmd","execCommand","option","name","options","get","getNumberStyles","getBulletStyles","isNullable","a","isNonNullable","global","Optional","constructor","tag","value","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","matchNodeNames","regex","node","test","nodeName","isListNode","isTableCellNode","inList","parents","xs","pred","until","i","len","length","x","findUntil","parent","className","list","elm","dom","isChildOf","getBody","isChildOfBody","normalizeStyleValue","makeSetupHandler","api","nodeChangeHandler","initialNode","selection","getNode","getParents","element","on","off","setNodeChangeHandler","e","getStart","setActive","setEnabled","parentList","getParent","isEditable","isWithinNonEditable","isWithinNonEditableList","updateButtonState","addSplitButton","id","tooltip","styles","ui","registry","icon","presets","columns","fetch","callback","iconStyle","iconName","itemValue","displayText","replace","chr","toUpperCase","styleValueToText","type","text","onAction","onItemAction","_splitButtonApi","select","listStyleType","listElm","style","getStyle","getSelectedStyleType","listStyle","onSetup","addControl","addToggleButton","active","queryCommandState","addButton","add","hasPlugin","registerOption","register","processor","default","split","register$1","addCommand","register$2","console","error"],"mappings":"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"}
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../public/tinymce/plugins/advlist/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 applyListFormat = (editor, listName, styleValue) => {\n const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';\n editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });\n };\n\n const register$2 = editor => {\n editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {\n applyListFormat(editor, 'UL', value['list-style-type']);\n });\n editor.addCommand('ApplyOrderedListStyle', (ui, value) => {\n applyListFormat(editor, 'OL', value['list-style-type']);\n });\n };\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n registerOption('advlist_number_styles', {\n processor: 'string[]',\n default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')\n });\n registerOption('advlist_bullet_styles', {\n processor: 'string[]',\n default: 'default,circle,square'.split(',')\n });\n };\n const getNumberStyles = option('advlist_number_styles');\n const getBulletStyles = option('advlist_bullet_styles');\n\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\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 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\n const isCustomList = list => /\\btox\\-/.test(list.className);\n const isChildOfBody = (editor, elm) => {\n return editor.dom.isChildOf(elm, editor.getBody());\n };\n const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);\n const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));\n const getSelectedStyleType = editor => {\n const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');\n const style = editor.dom.getStyle(listElm, 'listStyleType');\n return Optional.from(style);\n };\n const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n const isWithinNonEditableList = (editor, element) => {\n const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();\n };\n const setNodeChangeHandler = (editor, nodeChangeHandler) => {\n const initialNode = editor.selection.getNode();\n nodeChangeHandler({\n parents: editor.dom.getParents(initialNode),\n element: initialNode\n });\n editor.on('NodeChange', nodeChangeHandler);\n return () => editor.off('NodeChange', nodeChangeHandler);\n };\n\n const styleValueToText = styleValue => {\n return styleValue.replace(/\\-/g, ' ').replace(/\\b\\w/g, chr => {\n return chr.toUpperCase();\n });\n };\n const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;\n const makeSetupHandler = (editor, nodeName) => api => {\n const updateButtonState = (editor, parents) => {\n const element = editor.selection.getStart(true);\n api.setActive(inList(editor, parents, nodeName));\n api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());\n };\n const nodeChangeHandler = e => updateButtonState(editor, e.parents);\n return setNodeChangeHandler(editor, nodeChangeHandler);\n };\n const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {\n editor.ui.registry.addSplitButton(id, {\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n presets: 'listpreview',\n columns: 3,\n fetch: callback => {\n const items = global.map(styles, styleValue => {\n const iconStyle = nodeName === 'OL' ? 'num' : 'bull';\n const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;\n const itemValue = normalizeStyleValue(styleValue);\n const displayText = styleValueToText(styleValue);\n return {\n type: 'choiceitem',\n value: itemValue,\n icon: 'list-' + iconStyle + '-' + iconName,\n text: displayText\n };\n });\n callback(items);\n },\n onAction: () => editor.execCommand(cmd),\n onItemAction: (_splitButtonApi, value) => {\n applyListFormat(editor, nodeName, value);\n },\n select: value => {\n const listStyleType = getSelectedStyleType(editor);\n return listStyleType.map(listStyle => value === listStyle).getOr(false);\n },\n onSetup: makeSetupHandler(editor, nodeName)\n });\n };\n const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {\n editor.ui.registry.addToggleButton(id, {\n active: false,\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n onSetup: makeSetupHandler(editor, nodeName),\n onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)\n });\n };\n const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {\n if (styles.length > 1) {\n addSplitButton(editor, id, tooltip, cmd, nodeName, styles);\n } else {\n addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));\n }\n };\n const register = editor => {\n addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));\n addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));\n };\n\n var Plugin = () => {\n global$1.add('advlist', editor => {\n if (editor.hasPlugin('lists')) {\n register$1(editor);\n register(editor);\n register$2(editor);\n } else {\n console.error('Please use the Lists plugin together with the Advanced List plugin.');\n }\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","applyListFormat","editor","listName","styleValue","cmd","execCommand","option","name","options","get","getNumberStyles","getBulletStyles","isNullable","a","isNonNullable","global","Optional","constructor","tag","value","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","matchNodeNames","regex","node","test","nodeName","isListNode","isTableCellNode","inList","parents","xs","pred","until","i","len","length","x","findUntil","parent","className","list","elm","dom","isChildOf","getBody","isChildOfBody","normalizeStyleValue","makeSetupHandler","api","nodeChangeHandler","initialNode","selection","getNode","getParents","element","on","off","setNodeChangeHandler","e","getStart","setActive","setEnabled","parentList","getParent","isEditable","isWithinNonEditable","isWithinNonEditableList","updateButtonState","addSplitButton","id","tooltip","styles","ui","registry","icon","presets","columns","fetch","callback","iconStyle","iconName","itemValue","displayText","replace","chr","toUpperCase","styleValueToText","type","text","onAction","onItemAction","_splitButtonApi","select","listStyleType","listElm","style","getStyle","getSelectedStyleType","listStyle","onSetup","addControl","addToggleButton","active","queryCommandState","addButton","add","hasPlugin","registerOption","register","processor","default","split","register$1","addCommand","register$2","console","error"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index18.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
1
+ import{__exports as r}from"../../../../_virtual/index20.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index6.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
1
+ import{__exports as r}from"../../../../_virtual/index14.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/plugins/codesample/index.js"],"sourcesContent":["// Exports the \"codesample\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/codesample')\n// ES2015:\n// import 'tinymce/plugins/codesample'\nrequire('./plugin.js');"],"names":["require$$0"],"mappings":"uIAMsBA"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/plugins/codesample/index.js"],"sourcesContent":["// Exports the \"codesample\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/codesample')\n// ES2015:\n// import 'tinymce/plugins/codesample'\nrequire('./plugin.js');"],"names":["require$$0"],"mappings":"wIAMsBA"}
@@ -1,2 +1,2 @@
1
- import{__exports as e}from"../../../../_virtual/plugin2.mjs";var t;function n(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>!(e=>null==e)(e),n=()=>{};class a{constructor(e,t){this.tag=e,this.value=t}static some(e){return new a(!0,e)}static none(){return a.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?a.some(e(this.value)):a.none()}bind(e){return this.tag?e(this.value):a.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:a.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 t(e)?a.some(e):a.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()"}}a.singletonNone=new a(!1);const s=e=>((e,t)=>t>=0&&t<e.length?a.some(e[t]):a.none())(e,0);var r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");const i="undefined"!=typeof window?window:Function("return this;")(),o=function(e,t){const n=window.Prism;window.Prism={manual:!0};var a=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},s={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof r?new r(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var a,r;switch(n=n||{},s.util.type(t)){case"Object":if(r=s.util.objId(t),n[r])return n[r];for(var i in a={},n[r]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return r=s.util.objId(t),n[r]?n[r]:(a=[],n[r]=a,t.forEach((function(t,s){a[s]=e(t,n)})),a);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(a){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var a="no-"+t;e;){var s=e.classList;if(s.contains(t))return!0;if(s.contains(a))return!1;e=e.parentElement}return!!n}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(e,t){var n=s.util.clone(s.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var r=(a=a||s.languages)[e],i={};for(var o in r)if(r.hasOwnProperty(o)){if(o==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(o)||(i[o]=r[o])}var u=a[e];return a[e]=i,s.languages.DFS(s.languages,(function(t,n){n===u&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,r){r=r||{};var i=s.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],a||o);var l=t[o],u=s.util.type(l);"Object"!==u||r[i(l)]?"Array"!==u||r[i(l)]||(r[i(l)]=!0,e(l,n,o,r)):(r[i(l)]=!0,e(l,n,null,r))}}},plugins:{},highlightAll:function(e,t){s.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),s.hooks.run("before-all-elements-highlight",a);for(var r,i=0;r=a.elements[i++];)s.highlightElement(r,!0===t,a.callback)},highlightElement:function(t,n,a){var r=s.util.getLanguage(t),i=s.languages[r];s.util.setLanguage(t,r);var o=t.parentElement;o&&"pre"===o.nodeName.toLowerCase()&&s.util.setLanguage(o,r);var l={element:t,language:r,grammar:i,code:t.textContent};function u(e){l.highlightedCode=e,s.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,s.hooks.run("after-highlight",l),s.hooks.run("complete",l),a&&a.call(l.element)}if(s.hooks.run("before-sanity-check",l),(o=l.element.parentElement)&&"pre"===o.nodeName.toLowerCase()&&!o.hasAttribute("tabindex")&&o.setAttribute("tabindex","0"),!l.code)return s.hooks.run("complete",l),void(a&&a.call(l.element));if(s.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var c=new Worker(s.filename);c.onmessage=function(e){u(e.data)},c.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else u(s.highlight(l.code,l.grammar,l.language));else u(s.util.encode(l.code))},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(s.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=s.tokenize(a.code,a.grammar),s.hooks.run("after-tokenize",a),r.stringify(s.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var a in n)t[a]=n[a];delete t.rest}var s=new l;return u(s,s.head,e),o(e,s,t,s.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(s)},hooks:{all:{},add:function(e,t){var n=s.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=s.hooks.all[e];if(n&&n.length)for(var a,r=0;a=n[r++];)a(t)}},Token:r};function r(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function i(e,t,n,a){e.lastIndex=t;var s=e.exec(n);if(s&&a&&s[1]){var r=s[1].length;s.index+=r,s[0]=s[0].slice(r)}return s}function o(e,t,n,a,l,d){for(var g in n)if(n.hasOwnProperty(g)&&n[g]){var p=n[g];p=Array.isArray(p)?p:[p];for(var b=0;b<p.length;++b){if(d&&d.cause==g+","+b)return;var h=p[b],f=h.inside,m=!!h.lookbehind,y=!!h.greedy,w=h.alias;if(y&&!h.pattern.global){var k=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,k+"g")}for(var v=h.pattern||h,_=a.next,x=l;_!==t.tail&&!(d&&x>=d.reach);x+=_.value.length,_=_.next){var F=_.value;if(t.length>e.length)return;if(!(F instanceof r)){var A,S=1;if(y){if(!(A=i(v,x,e,m))||A.index>=e.length)break;var $=A.index,z=A.index+A[0].length,E=x;for(E+=_.value.length;$>=E;)E+=(_=_.next).value.length;if(x=E-=_.value.length,_.value instanceof r)continue;for(var C=_;C!==t.tail&&(E<z||"string"==typeof C.value);C=C.next)S++,E+=C.value.length;S--,F=e.slice(x,E),A.index-=x}else if(!(A=i(v,0,F,m)))continue;$=A.index;var j=A[0],B=F.slice(0,$),P=F.slice($+j.length),T=x+F.length;d&&T>d.reach&&(d.reach=T);var O=_.prev;if(B&&(O=u(t,O,B),x+=B.length),c(t,O,S),_=u(t,O,new r(g,f?s.tokenize(j,f):j,w,j)),P&&u(t,_,P),S>1){var N={cause:g+","+b,reach:T};o(e,t,n,_.prev,x,N),d&&N.reach>d.reach&&(d.reach=N.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var a=t.next,s={value:n,prev:t,next:a};return t.next=s,a.prev=s,e.length++,s}function c(e,t,n){for(var a=t.next,s=0;s<n&&a!==e.tail;s++)a=a.next;t.next=a,a.prev=t,e.length-=s}if(e.Prism=s,r.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var r={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(r.classes,i):r.classes.push(i)),s.hooks.run("wrap",r);var o="";for(var l in r.attributes)o+=" "+l+'="'+(r.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+o+">"+r.content+"</"+r.tag+">"},!e.document)return e.addEventListener?(s.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),a=n.language,r=n.code,i=n.immediateClose;e.postMessage(s.highlight(r,s.languages[a],a)),i&&e.close()}),!1),s):s;var d=s.util.currentScript();function g(){s.manual||s.highlightAll()}if(d&&(s.filename=d.src,d.hasAttribute("data-manual")&&(s.manual=!0)),!s.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return s}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});return void 0!==t&&t.exports&&(t.exports=a),void 0!==e&&(e.Prism=a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,a,s,r){if(n.language===a){var i=n.tokenStack=[];n.code=n.code.replace(s,(function(e){if("function"==typeof r&&!r(e))return e;for(var s,o=i.length;-1!==n.code.indexOf(s=t(a,o));)++o;return i[o]=e,s})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,a){if(n.language===a&&n.tokenStack){n.grammar=e.languages[a];var s=0,r=Object.keys(n.tokenStack);!function i(o){for(var l=0;l<o.length&&!(s>=r.length);l++){var u=o[l];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=r[s],d=n.tokenStack[c],g="string"==typeof u?u:u.content,p=t(a,c),b=g.indexOf(p);if(b>-1){++s;var h=g.substring(0,b),f=new e.Token(a,e.tokenize(d,n.grammar),"language-"+a,d),m=g.substring(b+p.length),y=[];h&&y.push.apply(y,i([h])),y.push(f),m&&y.push.apply(y,i([m])),"string"==typeof u?o.splice.apply(o,[l,1].concat(y)):u.content=y}}else u.content&&i(u.content)}return o}(n.tokens)}}}})}(a),a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,a){return RegExp(t(e,n),a||"")}function a(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var s="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var u=l(r),c=RegExp(l(s+" "+r+" "+i+" "+o)),d=l(r+" "+i+" "+o),g=l(s+" "+r+" "+o),p=a(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),b=a(/\((?:[^()]|<<self>>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,f=t(/<<0>>(?:\s*<<1>>)?/.source,[h,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,f]),y=/\[\s*(?:,\s*)*\]/.source,w=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),k=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,b,y]),v=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[k]),_=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[v,m,y]),x={keyword:c,punctuation:/[<>()?,.:[\]]/},F=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,S=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,_]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[u,f]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[w]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[_,g,h]),inside:x}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[b]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[_,m]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[_]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,p]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(p),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,f,h,_,c.source,b,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(_),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=A+"|"+F,z=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[$]),E=a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[z]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,j=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,E]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[E]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var B=/:[^}\r\n]+/.source,P=a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[z]),2),T=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,B]),O=a(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[$]),2),N=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[O,B]);function R(t,a){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[a,B]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[T]),lookbehind:!0,greedy:!0,inside:R(T,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:R(N,O)}],char:{pattern:RegExp(F),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[a,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:a.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:a.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:a.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,a.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};s["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:s},a.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],a=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,s=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,r=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:a,operator:s,punctuation:r};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},o=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];e.languages.insertBefore("php","variable",{string:o,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:o,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:a,operator:s,punctuation:r}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(a),a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",a=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+a),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+a+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(a),window.Prism=n,a}(void 0,void 0),l=e=>t=>t.options.get(e),u=l("codesample_languages"),c=l("codesample_global_prismjs"),d=e=>i.Prism&&c(e)?i.Prism:o,g=e=>t(e)&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-"),p=e=>{const t=e.selection?e.selection.getNode():null;return g(t)?a.some(t):a.none()},b=e=>{const t=(e=>{const t=u(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]})(e),n=s(t).fold((i="",()=>i),(e=>e.value));var i;const o=((e,t)=>p(e).fold((()=>t),(e=>{const n=e.className.match(/language-(\w+)/);return n?n[1]:t})))(e,n),l=(e=>p(e).bind((e=>a.from(e.textContent))).getOr(""))(e);e.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"listbox",name:"language",label:"Language",items:t},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:o,code:l},onSubmit:t=>{const n=t.getData();((e,t,n)=>{const a=e.dom;e.undoManager.transact((()=>{const s=p(e);return n=r.DOM.encode(n),s.fold((()=>{e.insertContent('<pre id="__new" class="language-'+t+'">'+n+"</pre>");const s=a.select("#__new")[0];a.setAttrib(s,"id",null),e.selection.select(s)}),(s=>{a.setAttrib(s,"class","language-"+t),s.innerHTML=n,d(e).highlightElement(s),e.selection.select(s)}))}))})(e,n.language,n.code),t.close()}})},h=(f=/^\s+|\s+$/g,e=>e.replace(f,""));var f,m=tinymce.util.Tools.resolve("tinymce.util.Tools");const y=(e,t=n)=>n=>{const a=()=>{n.setEnabled(e.selection.isEditable()),t(n)};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("codesample",(e=>{(e=>{const t=e.options.register;t("codesample_languages",{processor:"object[]"}),t("codesample_global_prismjs",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreProcess",(t=>{const n=e.dom,a=n.select("pre[contenteditable=false]",t.node);m.each(m.grep(a,g),(e=>{const t=e.textContent;let a;for(n.setAttrib(e,"class",h(n.getAttrib(e,"class"))),n.setAttrib(e,"contentEditable",null),n.setAttrib(e,"data-mce-highlighted",null);a=e.firstChild;)e.removeChild(a);n.add(e,"code").textContent=t}))})),e.on("SetContent",(()=>{const t=e.dom,n=m.grep(t.select("pre"),(e=>g(e)&&"true"!==t.getAttrib(e,"data-mce-highlighted")));n.length&&e.undoManager.transact((()=>{m.each(n,(n=>{var a;m.each(t.select("br",n),(n=>{t.replace(e.getDoc().createTextNode("\n"),n)})),n.innerHTML=t.encode(null!==(a=n.textContent)&&void 0!==a?a:""),d(e).highlightElement(n),t.setAttrib(n,"data-mce-highlighted",!0),n.className=h(n.className)}))}))})),e.on("PreInit",(()=>{e.parser.addNodeFilter("pre",(e=>{var t;for(let n=0,a=e.length;n<a;n++){const a=e[n];-1!==(null!==(t=a.attr("class"))&&void 0!==t?t:"").indexOf("language-")&&(a.attr("contenteditable","false"),a.attr("data-mce-highlighted","false"))}}))}))})(e),(e=>{const t=()=>e.execCommand("codesample");e.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:t,onSetup:y(e,(t=>{t.setActive((e=>{const t=e.selection.getStart();return e.dom.is(t,'pre[class*="language-"]')})(e))}))}),e.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:t,onSetup:y(e)})})(e),(e=>{e.addCommand("codesample",(()=>{const t=e.selection.getNode();e.selection.isCollapsed()||g(t)?b(e):e.formatter.toggle("code")}))})(e),e.on("dblclick",(t=>{g(t.target)&&b(e)}))}))}()),e}export{n as __require};
1
+ import{__exports as e}from"../../../../_virtual/plugin5.mjs";var t;function n(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>!(e=>null==e)(e),n=()=>{};class a{constructor(e,t){this.tag=e,this.value=t}static some(e){return new a(!0,e)}static none(){return a.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?a.some(e(this.value)):a.none()}bind(e){return this.tag?e(this.value):a.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:a.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 t(e)?a.some(e):a.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()"}}a.singletonNone=new a(!1);const s=e=>((e,t)=>t>=0&&t<e.length?a.some(e[t]):a.none())(e,0);var r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");const i="undefined"!=typeof window?window:Function("return this;")(),o=function(e,t){const n=window.Prism;window.Prism={manual:!0};var a=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},s={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof r?new r(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var a,r;switch(n=n||{},s.util.type(t)){case"Object":if(r=s.util.objId(t),n[r])return n[r];for(var i in a={},n[r]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return r=s.util.objId(t),n[r]?n[r]:(a=[],n[r]=a,t.forEach((function(t,s){a[s]=e(t,n)})),a);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(a){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var a="no-"+t;e;){var s=e.classList;if(s.contains(t))return!0;if(s.contains(a))return!1;e=e.parentElement}return!!n}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(e,t){var n=s.util.clone(s.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var r=(a=a||s.languages)[e],i={};for(var o in r)if(r.hasOwnProperty(o)){if(o==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(o)||(i[o]=r[o])}var u=a[e];return a[e]=i,s.languages.DFS(s.languages,(function(t,n){n===u&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,r){r=r||{};var i=s.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],a||o);var l=t[o],u=s.util.type(l);"Object"!==u||r[i(l)]?"Array"!==u||r[i(l)]||(r[i(l)]=!0,e(l,n,o,r)):(r[i(l)]=!0,e(l,n,null,r))}}},plugins:{},highlightAll:function(e,t){s.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),s.hooks.run("before-all-elements-highlight",a);for(var r,i=0;r=a.elements[i++];)s.highlightElement(r,!0===t,a.callback)},highlightElement:function(t,n,a){var r=s.util.getLanguage(t),i=s.languages[r];s.util.setLanguage(t,r);var o=t.parentElement;o&&"pre"===o.nodeName.toLowerCase()&&s.util.setLanguage(o,r);var l={element:t,language:r,grammar:i,code:t.textContent};function u(e){l.highlightedCode=e,s.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,s.hooks.run("after-highlight",l),s.hooks.run("complete",l),a&&a.call(l.element)}if(s.hooks.run("before-sanity-check",l),(o=l.element.parentElement)&&"pre"===o.nodeName.toLowerCase()&&!o.hasAttribute("tabindex")&&o.setAttribute("tabindex","0"),!l.code)return s.hooks.run("complete",l),void(a&&a.call(l.element));if(s.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var c=new Worker(s.filename);c.onmessage=function(e){u(e.data)},c.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else u(s.highlight(l.code,l.grammar,l.language));else u(s.util.encode(l.code))},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(s.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=s.tokenize(a.code,a.grammar),s.hooks.run("after-tokenize",a),r.stringify(s.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var a in n)t[a]=n[a];delete t.rest}var s=new l;return u(s,s.head,e),o(e,s,t,s.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(s)},hooks:{all:{},add:function(e,t){var n=s.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=s.hooks.all[e];if(n&&n.length)for(var a,r=0;a=n[r++];)a(t)}},Token:r};function r(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function i(e,t,n,a){e.lastIndex=t;var s=e.exec(n);if(s&&a&&s[1]){var r=s[1].length;s.index+=r,s[0]=s[0].slice(r)}return s}function o(e,t,n,a,l,d){for(var g in n)if(n.hasOwnProperty(g)&&n[g]){var p=n[g];p=Array.isArray(p)?p:[p];for(var b=0;b<p.length;++b){if(d&&d.cause==g+","+b)return;var h=p[b],f=h.inside,m=!!h.lookbehind,y=!!h.greedy,w=h.alias;if(y&&!h.pattern.global){var k=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,k+"g")}for(var v=h.pattern||h,_=a.next,x=l;_!==t.tail&&!(d&&x>=d.reach);x+=_.value.length,_=_.next){var F=_.value;if(t.length>e.length)return;if(!(F instanceof r)){var A,S=1;if(y){if(!(A=i(v,x,e,m))||A.index>=e.length)break;var $=A.index,z=A.index+A[0].length,E=x;for(E+=_.value.length;$>=E;)E+=(_=_.next).value.length;if(x=E-=_.value.length,_.value instanceof r)continue;for(var C=_;C!==t.tail&&(E<z||"string"==typeof C.value);C=C.next)S++,E+=C.value.length;S--,F=e.slice(x,E),A.index-=x}else if(!(A=i(v,0,F,m)))continue;$=A.index;var j=A[0],B=F.slice(0,$),P=F.slice($+j.length),T=x+F.length;d&&T>d.reach&&(d.reach=T);var O=_.prev;if(B&&(O=u(t,O,B),x+=B.length),c(t,O,S),_=u(t,O,new r(g,f?s.tokenize(j,f):j,w,j)),P&&u(t,_,P),S>1){var N={cause:g+","+b,reach:T};o(e,t,n,_.prev,x,N),d&&N.reach>d.reach&&(d.reach=N.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var a=t.next,s={value:n,prev:t,next:a};return t.next=s,a.prev=s,e.length++,s}function c(e,t,n){for(var a=t.next,s=0;s<n&&a!==e.tail;s++)a=a.next;t.next=a,a.prev=t,e.length-=s}if(e.Prism=s,r.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var r={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(r.classes,i):r.classes.push(i)),s.hooks.run("wrap",r);var o="";for(var l in r.attributes)o+=" "+l+'="'+(r.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+o+">"+r.content+"</"+r.tag+">"},!e.document)return e.addEventListener?(s.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),a=n.language,r=n.code,i=n.immediateClose;e.postMessage(s.highlight(r,s.languages[a],a)),i&&e.close()}),!1),s):s;var d=s.util.currentScript();function g(){s.manual||s.highlightAll()}if(d&&(s.filename=d.src,d.hasAttribute("data-manual")&&(s.manual=!0)),!s.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return s}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});return void 0!==t&&t.exports&&(t.exports=a),void 0!==e&&(e.Prism=a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,a,s,r){if(n.language===a){var i=n.tokenStack=[];n.code=n.code.replace(s,(function(e){if("function"==typeof r&&!r(e))return e;for(var s,o=i.length;-1!==n.code.indexOf(s=t(a,o));)++o;return i[o]=e,s})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,a){if(n.language===a&&n.tokenStack){n.grammar=e.languages[a];var s=0,r=Object.keys(n.tokenStack);!function i(o){for(var l=0;l<o.length&&!(s>=r.length);l++){var u=o[l];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=r[s],d=n.tokenStack[c],g="string"==typeof u?u:u.content,p=t(a,c),b=g.indexOf(p);if(b>-1){++s;var h=g.substring(0,b),f=new e.Token(a,e.tokenize(d,n.grammar),"language-"+a,d),m=g.substring(b+p.length),y=[];h&&y.push.apply(y,i([h])),y.push(f),m&&y.push.apply(y,i([m])),"string"==typeof u?o.splice.apply(o,[l,1].concat(y)):u.content=y}}else u.content&&i(u.content)}return o}(n.tokens)}}}})}(a),a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,a){return RegExp(t(e,n),a||"")}function a(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var s="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var u=l(r),c=RegExp(l(s+" "+r+" "+i+" "+o)),d=l(r+" "+i+" "+o),g=l(s+" "+r+" "+o),p=a(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),b=a(/\((?:[^()]|<<self>>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,f=t(/<<0>>(?:\s*<<1>>)?/.source,[h,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,f]),y=/\[\s*(?:,\s*)*\]/.source,w=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),k=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,b,y]),v=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[k]),_=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[v,m,y]),x={keyword:c,punctuation:/[<>()?,.:[\]]/},F=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,S=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,_]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[u,f]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[w]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[_,g,h]),inside:x}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[b]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[_,m]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[_]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,p]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(p),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,f,h,_,c.source,b,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(_),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=A+"|"+F,z=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[$]),E=a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[z]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,j=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,E]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[E]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var B=/:[^}\r\n]+/.source,P=a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[z]),2),T=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,B]),O=a(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[$]),2),N=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[O,B]);function R(t,a){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[a,B]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[T]),lookbehind:!0,greedy:!0,inside:R(T,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:R(N,O)}],char:{pattern:RegExp(F),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[a,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:a.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:a.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:a.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,a.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};s["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:s},a.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],a=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,s=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,r=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:a,operator:s,punctuation:r};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},o=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];e.languages.insertBefore("php","variable",{string:o,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:o,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:a,operator:s,punctuation:r}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(a),a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",a=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+a),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+a+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(a),window.Prism=n,a}(void 0,void 0),l=e=>t=>t.options.get(e),u=l("codesample_languages"),c=l("codesample_global_prismjs"),d=e=>i.Prism&&c(e)?i.Prism:o,g=e=>t(e)&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-"),p=e=>{const t=e.selection?e.selection.getNode():null;return g(t)?a.some(t):a.none()},b=e=>{const t=(e=>{const t=u(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]})(e),n=s(t).fold((i="",()=>i),(e=>e.value));var i;const o=((e,t)=>p(e).fold((()=>t),(e=>{const n=e.className.match(/language-(\w+)/);return n?n[1]:t})))(e,n),l=(e=>p(e).bind((e=>a.from(e.textContent))).getOr(""))(e);e.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"listbox",name:"language",label:"Language",items:t},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:o,code:l},onSubmit:t=>{const n=t.getData();((e,t,n)=>{const a=e.dom;e.undoManager.transact((()=>{const s=p(e);return n=r.DOM.encode(n),s.fold((()=>{e.insertContent('<pre id="__new" class="language-'+t+'">'+n+"</pre>");const s=a.select("#__new")[0];a.setAttrib(s,"id",null),e.selection.select(s)}),(s=>{a.setAttrib(s,"class","language-"+t),s.innerHTML=n,d(e).highlightElement(s),e.selection.select(s)}))}))})(e,n.language,n.code),t.close()}})},h=(f=/^\s+|\s+$/g,e=>e.replace(f,""));var f,m=tinymce.util.Tools.resolve("tinymce.util.Tools");const y=(e,t=n)=>n=>{const a=()=>{n.setEnabled(e.selection.isEditable()),t(n)};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("codesample",(e=>{(e=>{const t=e.options.register;t("codesample_languages",{processor:"object[]"}),t("codesample_global_prismjs",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreProcess",(t=>{const n=e.dom,a=n.select("pre[contenteditable=false]",t.node);m.each(m.grep(a,g),(e=>{const t=e.textContent;let a;for(n.setAttrib(e,"class",h(n.getAttrib(e,"class"))),n.setAttrib(e,"contentEditable",null),n.setAttrib(e,"data-mce-highlighted",null);a=e.firstChild;)e.removeChild(a);n.add(e,"code").textContent=t}))})),e.on("SetContent",(()=>{const t=e.dom,n=m.grep(t.select("pre"),(e=>g(e)&&"true"!==t.getAttrib(e,"data-mce-highlighted")));n.length&&e.undoManager.transact((()=>{m.each(n,(n=>{var a;m.each(t.select("br",n),(n=>{t.replace(e.getDoc().createTextNode("\n"),n)})),n.innerHTML=t.encode(null!==(a=n.textContent)&&void 0!==a?a:""),d(e).highlightElement(n),t.setAttrib(n,"data-mce-highlighted",!0),n.className=h(n.className)}))}))})),e.on("PreInit",(()=>{e.parser.addNodeFilter("pre",(e=>{var t;for(let n=0,a=e.length;n<a;n++){const a=e[n];-1!==(null!==(t=a.attr("class"))&&void 0!==t?t:"").indexOf("language-")&&(a.attr("contenteditable","false"),a.attr("data-mce-highlighted","false"))}}))}))})(e),(e=>{const t=()=>e.execCommand("codesample");e.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:t,onSetup:y(e,(t=>{t.setActive((e=>{const t=e.selection.getStart();return e.dom.is(t,'pre[class*="language-"]')})(e))}))}),e.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:t,onSetup:y(e)})})(e),(e=>{e.addCommand("codesample",(()=>{const t=e.selection.getNode();e.selection.isCollapsed()||g(t)?b(e):e.formatter.toggle("code")}))})(e),e.on("dblclick",(t=>{g(t.target)&&b(e)}))}))}()),e}export{n as __require};
2
2
  //# sourceMappingURL=plugin.mjs.map
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index12.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
1
+ import{__exports as r}from"../../../../_virtual/index10.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{__exports as e}from"../../../../_virtual/plugin5.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};
1
+ import{__exports as e}from"../../../../_virtual/plugin3.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
2
  //# sourceMappingURL=plugin.mjs.map
@@ -1,2 +1,2 @@
1
- import{__exports as r}from"../../../../_virtual/index10.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
1
+ import{__exports as r}from"../../../../_virtual/index8.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
2
  //# sourceMappingURL=index.mjs.map