card-mod-tinymce_editor 0.1 → 0.11.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/db/migrate_core_cards/20160804112560_add_tinymce_cards.rb +1 -1
  3. data/db/migrate_core_cards/20171113233151_update_tinymce_config.rb +1 -1
  4. data/db/migrate_core_cards/20190306172623_update_tinymce_config_to_v5.rb +1 -1
  5. data/db/migrate_core_cards/20190306172890_tinymce_add_nest_to_toolbar.rb +1 -1
  6. data/lib/card/reference/nest_parser.rb +79 -0
  7. data/lib/javascript/script_tinymce.js +0 -0
  8. data/lib/javascript/script_tinymce_config.js.coffee +1 -1
  9. data/public/assets/tinymce/jquery.tinymce.min.js +92 -0
  10. data/public/assets/tinymce/langs/readme.md +3 -0
  11. data/public/assets/tinymce/license.txt +504 -0
  12. data/public/assets/tinymce/plugins/advlist/plugin.min.js +9 -0
  13. data/public/assets/tinymce/plugins/anchor/plugin.min.js +9 -0
  14. data/public/assets/tinymce/plugins/autolink/plugin.min.js +9 -0
  15. data/public/assets/tinymce/plugins/autoresize/plugin.min.js +9 -0
  16. data/public/assets/tinymce/plugins/autosave/plugin.min.js +9 -0
  17. data/public/assets/tinymce/plugins/bbcode/plugin.min.js +9 -0
  18. data/public/assets/tinymce/plugins/charmap/plugin.min.js +9 -0
  19. data/public/assets/tinymce/plugins/code/plugin.min.js +9 -0
  20. data/public/assets/tinymce/plugins/codesample/plugin.min.js +9 -0
  21. data/public/assets/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  22. data/public/assets/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  23. data/public/assets/tinymce/plugins/directionality/plugin.min.js +9 -0
  24. data/public/assets/tinymce/plugins/emoticons/js/emojis.js +9015 -0
  25. data/public/assets/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  26. data/public/assets/tinymce/plugins/emoticons/plugin.min.js +9 -0
  27. data/public/assets/tinymce/plugins/fullpage/plugin.min.js +9 -0
  28. data/public/assets/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  29. data/public/assets/tinymce/plugins/help/plugin.min.js +9 -0
  30. data/public/assets/tinymce/plugins/hr/plugin.min.js +9 -0
  31. data/public/assets/tinymce/plugins/image/plugin.min.js +9 -0
  32. data/public/assets/tinymce/plugins/imagetools/plugin.min.js +9 -0
  33. data/public/assets/tinymce/plugins/importcss/plugin.min.js +9 -0
  34. data/public/assets/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  35. data/public/assets/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  36. data/public/assets/tinymce/plugins/link/plugin.min.js +9 -0
  37. data/public/assets/tinymce/plugins/lists/plugin.min.js +9 -0
  38. data/public/assets/tinymce/plugins/media/plugin.min.js +9 -0
  39. data/public/assets/tinymce/plugins/nest/plugin.min.js +1 -0
  40. data/public/assets/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  41. data/public/assets/tinymce/plugins/noneditable/plugin.min.js +9 -0
  42. data/public/assets/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  43. data/public/assets/tinymce/plugins/paste/plugin.min.js +9 -0
  44. data/public/assets/tinymce/plugins/preview/plugin.min.js +9 -0
  45. data/public/assets/tinymce/plugins/print/plugin.min.js +9 -0
  46. data/public/assets/tinymce/plugins/quickbars/plugin.min.js +9 -0
  47. data/public/assets/tinymce/plugins/save/plugin.min.js +9 -0
  48. data/public/assets/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  49. data/public/assets/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  50. data/public/assets/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  51. data/public/assets/tinymce/plugins/table/plugin.min.js +9 -0
  52. data/public/assets/tinymce/plugins/template/plugin.min.js +9 -0
  53. data/public/assets/tinymce/plugins/textcolor/plugin.min.js +9 -0
  54. data/public/assets/tinymce/plugins/textpattern/plugin.min.js +9 -0
  55. data/public/assets/tinymce/plugins/toc/plugin.min.js +9 -0
  56. data/public/assets/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  57. data/public/assets/tinymce/plugins/visualchars/plugin.min.js +9 -0
  58. data/public/assets/tinymce/plugins/wordcount/plugin.min.js +9 -0
  59. data/public/assets/tinymce/skins/content/default/content.min.css +7 -0
  60. data/public/assets/tinymce/skins/content/document/content.min.css +7 -0
  61. data/public/assets/tinymce/skins/content/writer/content.min.css +7 -0
  62. data/public/assets/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
  63. data/public/assets/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
  64. data/public/assets/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
  65. data/public/assets/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  66. data/public/assets/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
  67. data/public/assets/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
  68. data/public/assets/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
  69. data/public/assets/tinymce/skins/ui/oxide/content.min.css +7 -0
  70. data/public/assets/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
  71. data/public/assets/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  72. data/public/assets/tinymce/skins/ui/oxide/skin.min.css +7 -0
  73. data/public/assets/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
  74. data/public/assets/tinymce/themes/mobile/theme.min.js +9 -0
  75. data/public/assets/tinymce/themes/silver/theme.min.js +9 -0
  76. data/public/assets/tinymce/tinymce.min.js +9 -0
  77. data/set/all/reference_editor.rb +28 -7
  78. data/set/all/reference_editor/_nest_editor.haml +1 -1
  79. data/set/all/reference_editor/nest_editor.rb +20 -16
  80. data/set/all/reference_editor/nest_image.rb +1 -1
  81. metadata +98 -11
  82. data/set/all/reference_editor/nest_editor/nest_parser.rb +0 -71
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ */
7
+ .mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment{background-color:#fff0b7}.tox-comments-visible .tox-comment--active{background-color:#ffe168}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");background-size:100%;content:'';cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:.875rem;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:0 0!important;border:1px solid #ccc}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#a67f59;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}:not([dir=rtl]) code[class*=language-],:not([dir=rtl]) pre[class*=language-]{direction:ltr;text-align:left}[dir=rtl] code[class*=language-],[dir=rtl] pre[class*=language-]{direction:rtl;text-align:right}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentcolor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-9999999999px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px 0 2px;position:relative}.mce-preview-object .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--16by9::before,.tiny-pageembed--1by1::before,.tiny-pageembed--21by9::before,.tiny-pageembed--4by3::before{content:"";display:block}.tiny-pageembed--21by9::before{padding-top:42.857143%}.tiny-pageembed--16by9::before{padding-top:56.25%}.tiny-pageembed--4by3::before{padding-top:75%}.tiny-pageembed--1by1::before{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:10000}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:nth-of-type(1){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-clonedresizable{opacity:.5;outline:1px dashed #000;position:absolute;z-index:10000}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0,0,0,.75);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10001}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-content-body img[data-mce-selected],.mce-content-body table[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{background-color:initial!important}.mce-content-body td[data-mce-selected]::-moz-selection,.mce-content-body th[data-mce-selected]::-moz-selection{background:0 0}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mce-content-body img::-moz-selection{background:0 0}.mce-content-body img::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.5'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23008800'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{font-family:sans-serif}table{border-collapse:collapse}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ */
7
+ .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ */
7
+ .tox{box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg){background:0 0;border:0;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:1px solid #ccc;border-radius:0;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox-editor-container>:first-child{border-top:none!important}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox-silver-sink{z-index:1300}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border:1px solid #ccc;border-radius:3px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>:last-child:not(:only-child){border-color:#ccc;border-style:solid}.tox .accessibility-issue--info .accessibility-issue__description{background-color:rgba(32,122,183,.1);border-color:rgba(32,122,183,.4);color:#222f3e}.tox .accessibility-issue--info .accessibility-issue__description>:last-child{border-color:rgba(32,122,183,.4)}.tox .accessibility-issue--info h2{color:#207ab7}.tox .accessibility-issue--info .tox-icon svg{fill:#207ab7}.tox .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.1);border-color:rgba(255,165,0,.5);color:#222f3e}.tox .accessibility-issue--warn .accessibility-issue__description>:last-child{border-color:rgba(255,165,0,.5)}.tox .accessibility-issue--warn h2{color:#cc8500}.tox .accessibility-issue--warn .tox-icon svg{fill:#cc8500}.tox .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);border-color:rgba(204,0,0,.4);color:#222f3e}.tox .accessibility-issue--error .accessibility-issue__description>:last-child{border-color:rgba(204,0,0,.4)}.tox .accessibility-issue--error h2{color:#c00}.tox .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue__description h2,.tox .tox-dialog__body-content .accessibility-issue__header h1{margin-top:0}.tox:not([dir=rtl]) .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .accessibility-issue__description{padding:4px 4px 4px 8px}.tox:not([dir=rtl]) .accessibility-issue__description>:last-child{border-left-width:1px;padding-left:4px}.tox[dir=rtl] .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .accessibility-issue__description{padding:4px 8px 4px 4px}.tox[dir=rtl] .accessibility-issue__description>:last-child{border-right-width:1px;padding-right:4px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#207ab7;background-image:none;background-position:none;background-repeat:none;border-color:#207ab7;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-weight:700;letter-spacing:1;line-height:24px;margin:0;outline:0;padding:4px 16px;text-align:center;text-decoration:none;text-transform:capitalize;white-space:nowrap}.tox .tox-button[disabled]{background-color:#207ab7;background-image:none;border-color:#207ab7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:hover:not(:disabled){background-color:#1c6ca1;background-image:none;border-color:#1c6ca1;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#185d8c;background-image:none;border-color:#185d8c;box-shadow:none;color:#fff}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:none;background-repeat:none;border-color:#f0f0f0;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;outline:0;padding:4px 16px;text-decoration:none;text-transform:capitalize}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:hover:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:#e3e3e3;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:#d6d6d6;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:3px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;left:-10000px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:3px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,.3)}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#207ab7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#207ab7}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:3px;box-shadow:inset 0 0 0 1px #207ab7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#ccc;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#e6e6e6;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;color:#222f3e;cursor:pointer;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:inherit;color:contrast(inherit,#222f3e,#fff)}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#dee0e2;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--enabled{background-color:#c8cbcf;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#dee0e2;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#c8cbcf;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#dee0e2;color:#222f3e}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:default}.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item[role=menuitemcheckbox]:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;-ms-flex-preferred-size:auto;font-size:14px;font-style:normal;font-weight:400;line-height:24px;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:rgba(34,47,62,.7);display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:normal}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-icon-rtl .tox-collection__item-icon svg{transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:2px 0 3px 4px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px 0}.tox .tox-swatches__row{display:flex}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#dee0e2}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:rgba(34,47,62,.7);font-size:12px}.tox .tox-comment__body{color:#222f3e;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1103}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,.7)}.tox .tox-user__name{color:rgba(34,47,62,.7);font-size:12px;font-style:normal;font-weight:700;text-transform:uppercase}.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1101}.tox .tox-dialog{background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:1102}@media only screen and (max-width:767px){.tox .tox-dialog{align-self:flex-start;margin:8px auto;width:calc(100vw - 16px)}}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:normal}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;-ms-flex-preferred-size:auto;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:normal}@media only screen and (max-width:767px){.tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;padding:16px 16px}@media only screen and (max-width:767px){.tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;font-size:14px;line-height:1.3;margin-bottom:8px;text-decoration:none;white-space:nowrap}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #207ab7;color:#207ab7}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto;max-height:650px;overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content h1{font-size:20px;font-weight:700;margin-top:2rem}.tox .tox-dialog__body-content h2{font-size:16px;font-weight:700;margin-top:2rem}.tox .tox-dialog__body-content a{color:#207ab7;cursor:pointer;text-decoration:none}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content a:active{color:#185d8c;text-decoration:none}.tox .tox-dialog__body-content ul{display:block;list-style-type:disc;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1103}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #ccc}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}body.tox-dialog__disable-scroll{overflow:hidden}.tox.tox-platform-ie .tox-dialog-wrap{position:-ms-device-fixed}@media only screen and (max-width:767px){.tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){.tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){.tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){.tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}.tox .tox-dropzone-container{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #ccc;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{border-top:1px solid #ccc;display:flex;flex:1;-ms-flex-preferred-size:auto;overflow:hidden;position:relative}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;-ms-flex-preferred-size:auto;height:100%;position:absolute;width:100%}.tox.tox-inline-edit-area{border:1px dotted #ccc}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex}.tox .tox-color-input .tox-textfield{border-radius:3px 0 0 3px;display:flex}.tox .tox-color-input span{border-color:rgba(34,47,62,.2);border-radius:0 3px 3px 0;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;box-sizing:border-box;cursor:pointer;display:flex;width:35px}.tox .tox-color-input span:focus{border-color:#207ab7}.tox[dir=rtl] .tox-color-input .tox-textfield{border-radius:0 3px 3px 0}.tox[dir=rtl] .tox-color-input span{border-radius:3px 0 0 3px;border-width:1px 0 1px 1px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:normal;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-textarea{flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;-ms-flex-preferred-size:auto;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-selectfield select,.tox .tox-textarea,.tox .tox-textfield,.tox .tox-toolbar-textfield{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#ccc;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;outline:0;padding:5px 4.75px;resize:none;width:100%}.tox .tox-selectfield select:focus,.tox .tox-textarea:focus,.tox .tox-textfield:focus{border-color:#207ab7;box-shadow:none;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#207ab7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea{-webkit-appearance:textarea;-moz-appearance:textarea;appearance:textarea;white-space:pre-wrap}.tox-fullscreen{border:0;height:100%;left:0;margin:0;overflow:hidden;padding:0;position:fixed;top:0;width:100%}.tox-fullscreen .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-fullscreen .tox.tox-tinymce.tox-fullscreen{z-index:1200}.tox-fullscreen .tox.tox-tinymce-aux{z-index:1201}.tox .tox-image-tools{width:100%}.tox .tox-image-tools__toolbar{align-items:center;display:flex;justify-content:center}.tox .tox-image-tools__image{background-color:#666;height:380px;overflow:auto;position:relative;width:100%}.tox .tox-image-tools__image,.tox .tox-image-tools__image+.tox-image-tools__toolbar{margin-top:8px}.tox .tox-image-tools__image-bg{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools__toolbar>.tox-spacer{flex:1;-ms-flex-preferred-size:auto}.tox .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-left:8px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-left:32px}.tox:not([dir=rtl]) .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-left:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider:not(:first-of-type){margin-right:8px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-button+.tox-slider{margin-right:32px}.tox[dir=rtl] .tox-image-tools__toolbar>.tox-slider+.tox-button{margin-right:32px}.tox .tox-insert-table-picker{display:flex;flex-wrap:wrap;width:169px}.tox .tox-insert-table-picker>div{border-color:#ccc;border-style:solid;border-width:0 1px 1px 0;box-sizing:content-box;height:16px;width:16px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px 0}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:rgba(32,122,183,.5);border-color:rgba(32,122,183,.5)}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);display:inline-block;overflow:hidden;vertical-align:top;z-index:1}.tox .tox-menu.tox-collection.tox-collection--list{padding:0}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:4px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:4px}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='43px' viewBox='0 0 40 43px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='42px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;margin-bottom:-1px;padding:0 4px 0 4px}.tox .tox-mbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0 4px;text-transform:normal;width:auto}.tox .tox-mbtn[disabled]{background-color:none;border-color:none;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:hover:not(:disabled){background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-mbtn:focus:not(:disabled){background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-mbtn--active{background:#c8cbcf;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{background-color:#fffaea;border-color:#ffe89d;border-style:solid;border-width:1px;box-sizing:border-box;color:#222f3e;display:grid;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-top:5px;opacity:0;padding:5px;transition:transform .1s ease-in,opacity 150ms ease-in}.tox .tox-notification a{color:#207ab7;text-decoration:underline}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#dff0d8;border-color:#d6e9c6}.tox .tox-notification--success a{color:#486d2a}.tox .tox-notification--error{background-color:#f2dede;border-color:#ebccd1}.tox .tox-notification--error a{color:#843441}.tox .tox-notification--warn{background-color:#fcf8e3;border-color:#faebcc}.tox .tox-notification--info{background-color:#d9edf7;border-color:#779ecb}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;-ms-grid-column-span:1;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;-ms-grid-column-align:end;grid-column-end:2;-ms-grid-column-span:1;grid-column-start:1;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;-ms-grid-column-align:end;grid-column-end:4;-ms-grid-column-span:1;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{-ms-grid-column-align:center;grid-column-end:4;-ms-grid-column-span:3;grid-column-start:1;grid-row-end:3;-ms-grid-row-span:1;grid-row-start:2;justify-self:center}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar{flex-wrap:nowrap}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;position:absolute;width:0}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#ccc transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #ccc transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #ccc transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #ccc;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;min-height:0}.tox .tox-sidebar{background-color:#fff;border-top:1px solid #ccc;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-slider{align-items:center;display:flex;flex:1;-ms-flex-preferred-size:auto;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #ccc;border-radius:3px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#207ab7;border:2px solid #185d8c;border-radius:3px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:nth-child(1){animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #ccc;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:12px;font-weight:400;height:18px;overflow:hidden;padding:0 8px;position:relative;text-transform:uppercase}.tox .tox-statusbar__text-container{display:flex;flex:1 1 auto;justify-content:flex-end;overflow:hidden}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);text-decoration:none}.tox .tox-statusbar a:focus,.tox .tox-statusbar a:hover,.tox .tox-statusbar__path-item:focus,.tox .tox-statusbar__path-item:hover,.tox .tox-statusbar__wordcount:focus,.tox .tox-statusbar__wordcount:hover{cursor:pointer;text-decoration:underline}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-left:auto;margin-right:-8px;padding-left:1ch}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,.7)}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:1ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox .tox-throbber{z-index:1400}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:0 0;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:34px;justify-content:center;margin:2px 0 3px 0;outline:0;overflow:hidden;padding:0;text-transform:normal;width:34px}.tox .tox-tbtn svg{display:block;fill:#222f3e}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn--enabled{background:#c8cbcf;box-shadow:none;color:#222f3e}.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--enabled svg{fill:#222f3e}.tox .tox-tbtn:hover{background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:focus{background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-tbtn:focus svg{fill:#222f3e}.tox .tox-tbtn:active{background:#c8cbcf;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:0 0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,.5)}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:51px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:68px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tbtn--select{margin:2px 0 3px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,.7)}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:2px 0 3px 0;overflow:hidden}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #dee0e2 inset}.tox .tox-split-button:focus{background:#dee0e2;box-shadow:none;color:#222f3e}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,.7)}.tox .tox-pop .tox-split-button__chevron svg{transform:rotate(-90deg)}.tox .tox-split-button .tox-tbtn{margin:0}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:0 0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;background-color:#fff;border-top:1px solid #ccc;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;margin-bottom:-1px;padding:0 0}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}.tox.tox-tinymce-aux:not([dir=rtl]) .tox-toolbar__overflow{margin-left:4px}.tox[dir=rtl] .tox-tbtn__icon-rtl svg{transform:rotateY(180deg)}.tox[dir=rtl].tox-tinymce-aux .tox-toolbar__overflow{margin-right:4px}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 4px 0 4px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid #ccc}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid #ccc}.tox .tox-tooltip{display:inline-block;padding:8px;position:relative}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:3px;box-shadow:0 2px 4px rgba(34,47,62,.3);color:rgba(255,255,255,.75);font-size:14px;font-style:normal;font-weight:400;padding:4px 8px;text-transform:normal}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-well{border:1px solid #ccc;border-radius:3px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #ccc;border-radius:3px;display:flex;height:525px}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1;-ms-flex-preferred-size:auto}.tox .tox-image-tools-edit-panel{height:60px}.tox .tox-image-tools__sidebar{height:60px}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ */
7
+ .tinymce-mobile-outer-container{all:initial;display:block}.tinymce-mobile-outer-container *{border:0;box-sizing:initial;cursor:inherit;float:none;line-height:1;margin:0;outline:0;padding:0;-webkit-tap-highlight-color:transparent;text-shadow:none;white-space:nowrap}.tinymce-mobile-icon-arrow-back::before{content:"\e5cd"}.tinymce-mobile-icon-image::before{content:"\e412"}.tinymce-mobile-icon-cancel-circle::before{content:"\e5c9"}.tinymce-mobile-icon-full-dot::before{content:"\e061"}.tinymce-mobile-icon-align-center::before{content:"\e234"}.tinymce-mobile-icon-align-left::before{content:"\e236"}.tinymce-mobile-icon-align-right::before{content:"\e237"}.tinymce-mobile-icon-bold::before{content:"\e238"}.tinymce-mobile-icon-italic::before{content:"\e23f"}.tinymce-mobile-icon-unordered-list::before{content:"\e241"}.tinymce-mobile-icon-ordered-list::before{content:"\e242"}.tinymce-mobile-icon-font-size::before{content:"\e245"}.tinymce-mobile-icon-underline::before{content:"\e249"}.tinymce-mobile-icon-link::before{content:"\e157"}.tinymce-mobile-icon-unlink::before{content:"\eca2"}.tinymce-mobile-icon-color::before{content:"\e891"}.tinymce-mobile-icon-previous::before{content:"\e314"}.tinymce-mobile-icon-next::before{content:"\e315"}.tinymce-mobile-icon-large-font::before,.tinymce-mobile-icon-style-formats::before{content:"\e264"}.tinymce-mobile-icon-undo::before{content:"\e166"}.tinymce-mobile-icon-redo::before{content:"\e15a"}.tinymce-mobile-icon-removeformat::before{content:"\e239"}.tinymce-mobile-icon-small-font::before{content:"\e906"}.tinymce-mobile-format-matches::after,.tinymce-mobile-icon-readonly-back::before{content:"\e5ca"}.tinymce-mobile-icon-small-heading::before{content:"small"}.tinymce-mobile-icon-large-heading::before{content:"large"}.tinymce-mobile-icon-large-heading::before,.tinymce-mobile-icon-small-heading::before{font-family:sans-serif;font-size:80%}.tinymce-mobile-mask-edit-icon::before{content:"\e254"}.tinymce-mobile-icon-back::before{content:"\e5c4"}.tinymce-mobile-icon-heading::before{content:"Headings";font-family:sans-serif;font-size:80%;font-weight:700}.tinymce-mobile-icon-h1::before{content:"H1";font-weight:700}.tinymce-mobile-icon-h2::before{content:"H2";font-weight:700}.tinymce-mobile-icon-h3::before{content:"H3";font-weight:700}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask{align-items:center;display:flex;justify-content:center;background:rgba(51,51,51,.5);height:100%;position:absolute;top:0;width:100%}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container{align-items:center;border-radius:50%;display:flex;flex-direction:column;font-family:sans-serif;font-size:1em;justify-content:space-between}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .mixin-menu-item{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{align-items:center;display:flex;justify-content:center;flex-direction:column;font-size:1em}@media only screen and (min-device-width:700px){.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section{font-size:1.2em}}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon{align-items:center;display:flex;justify-content:center;border-radius:50%;height:2.1em;width:2.1em;background-color:#fff;color:#207ab7}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section .tinymce-mobile-mask-tap-icon::before{content:"\e900";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-outer-container .tinymce-mobile-disabled-mask .tinymce-mobile-content-container .tinymce-mobile-content-tap-section:not(.tinymce-mobile-mask-tap-icon-selected) .tinymce-mobile-mask-tap-icon{z-index:2}.tinymce-mobile-android-container.tinymce-mobile-android-maximized{background:#fff;border:none;bottom:0;display:flex;flex-direction:column;left:0;position:fixed;right:0;top:0}.tinymce-mobile-android-container:not(.tinymce-mobile-android-maximized){position:relative}.tinymce-mobile-android-container .tinymce-mobile-editor-socket{display:flex;flex-grow:1}.tinymce-mobile-android-container .tinymce-mobile-editor-socket iframe{display:flex!important;flex-grow:1;height:auto!important}.tinymce-mobile-android-scroll-reload{overflow:hidden}:not(.tinymce-mobile-readonly-mode)>.tinymce-mobile-android-selection-context-toolbar{margin-top:23px}.tinymce-mobile-toolstrip{background:#fff;display:flex;flex:0 0 auto;z-index:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar{align-items:center;background-color:#fff;border-bottom:1px solid #ccc;display:flex;flex:1;height:2.5em;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex-shrink:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-exit-container{background:#f44336}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group.tinymce-mobile-toolbar-scrollable-group{flex-grow:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button{align-items:center;display:flex;height:80%;margin-left:2px;margin-right:2px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item.tinymce-mobile-toolbar-button.tinymce-mobile-toolbar-button-selected{background:#c8cbcf;color:#ccc}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:first-of-type,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar:not(.tinymce-mobile-context-toolbar) .tinymce-mobile-toolbar-group:last-of-type{background:#207ab7;color:#eceff1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group{align-items:center;display:flex;height:100%;flex:1;padding-bottom:.4em;padding-top:.4em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog{display:flex;min-height:1.5em;overflow:hidden;padding-left:0;padding-right:0;position:relative;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain{display:flex;height:100%;transition:left cubic-bezier(.4,0,1,1) .15s;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen{display:flex;flex:0 0 auto;justify-content:space-between;width:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen input{font-family:Sans-serif}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container{display:flex;flex-grow:1;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container .tinymce-mobile-input-container-x{align-self:center;background:inherit;border:none;border-radius:50%;color:#888;font-size:.6em;font-weight:700;height:100%;padding-right:2px;position:absolute;right:0}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-input-container.tinymce-mobile-input-container-empty .tinymce-mobile-input-container-x{display:none}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous::before{align-items:center;display:flex;font-weight:700;height:100%;padding-left:.5em;padding-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-next.tinymce-mobile-toolbar-navigation-disabled::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serialised-dialog .tinymce-mobile-serialised-dialog-chain .tinymce-mobile-serialised-dialog-screen .tinymce-mobile-icon-previous.tinymce-mobile-toolbar-navigation-disabled::before{visibility:hidden}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item{color:#ccc;font-size:10px;line-height:10px;margin:0 2px;padding-top:3px}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-item.tinymce-mobile-dot-active{color:#c8cbcf}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-large-heading::before{margin-left:.5em;margin-right:.9em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-font::before,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-icon-small-heading::before{margin-left:.9em;margin-right:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider{display:flex;flex:1;margin-left:0;margin-right:0;padding:.28em 0;position:relative}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-size-container .tinymce-mobile-slider-size-line{background:#ccc;display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container{padding-left:2em;padding-right:2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container{align-items:center;display:flex;flex-grow:1;height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-slider-gradient-container .tinymce-mobile-slider-gradient{background:linear-gradient(to right,red 0,#feff00 17%,#0f0 33%,#00feff 50%,#00f 67%,#ff00fe 83%,red 100%);display:flex;flex:1;height:.2em;margin-bottom:.3em;margin-top:.3em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-black{background:#000;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider.tinymce-mobile-hue-slider-container .tinymce-mobile-hue-slider-white{background:#fff;height:.2em;margin-bottom:.3em;margin-top:.3em;width:1.2em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb{align-items:center;background-clip:padding-box;background-color:#455a64;border:.5em solid rgba(136,136,136,0);border-radius:3em;bottom:0;color:#fff;display:flex;height:.5em;justify-content:center;left:-10px;margin:auto;position:absolute;top:0;transition:border 120ms cubic-bezier(.39,.58,.57,1);width:.5em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-slider .tinymce-mobile-slider-thumb.tinymce-mobile-thumb-active{border:.5em solid rgba(136,136,136,.39)}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper,.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group>div{align-items:center;display:flex;height:100%;flex:1}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-serializer-wrapper{flex-direction:column;justify-content:center}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item{align-items:center;display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-toolbar-group-item:not(.tinymce-mobile-serialised-dialog){height:100%}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group .tinymce-mobile-dot-container{display:flex}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input{background:#fff;border:none;border-radius:0;color:#455a64;flex-grow:1;font-size:.85em;padding-bottom:.1em;padding-left:5px;padding-top:.1em}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::-webkit-input-placeholder{color:#888}.tinymce-mobile-toolstrip .tinymce-mobile-toolbar.tinymce-mobile-context-toolbar .tinymce-mobile-toolbar-group input::placeholder{color:#888}.tinymce-mobile-dropup{background:#fff;display:flex;overflow:hidden;width:100%}.tinymce-mobile-dropup.tinymce-mobile-dropup-shrinking{transition:height .3s ease-out}.tinymce-mobile-dropup.tinymce-mobile-dropup-growing{transition:height .3s ease-in}.tinymce-mobile-dropup.tinymce-mobile-dropup-closed{flex-grow:0}.tinymce-mobile-dropup.tinymce-mobile-dropup-open:not(.tinymce-mobile-dropup-growing){flex-grow:1}.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}@media only screen and (orientation:landscape){.tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-dropup:not(.tinymce-mobile-dropup-closed){min-height:150px}}.tinymce-mobile-styles-menu{font-family:sans-serif;outline:4px solid #000;overflow:hidden;position:relative;width:100%}.tinymce-mobile-styles-menu [role=menu]{display:flex;flex-direction:column;height:100%;position:absolute;width:100%}.tinymce-mobile-styles-menu [role=menu].transitioning{transition:transform .5s ease-in-out}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item{border-bottom:1px solid #ddd;color:#455a64;cursor:pointer;display:flex;padding:1em 1em;position:relative}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser .tinymce-mobile-styles-collapse-icon::before{color:#455a64;content:"\e314";font-family:tinymce-mobile,sans-serif}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-styles-item-is-menu::after{color:#455a64;content:"\e315";font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-item.tinymce-mobile-format-matches::after{font-family:tinymce-mobile,sans-serif;padding-left:1em;padding-right:1em;position:absolute;right:0}.tinymce-mobile-styles-menu .tinymce-mobile-styles-collapser,.tinymce-mobile-styles-menu .tinymce-mobile-styles-separator{align-items:center;background:#fff;border-top:#455a64;color:#455a64;display:flex;min-height:2.5em;padding-left:1em;padding-right:1em}.tinymce-mobile-styles-menu [data-transitioning-destination=before][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=before]{transform:translate(-100%)}.tinymce-mobile-styles-menu [data-transitioning-destination=current][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=current]{transform:translate(0)}.tinymce-mobile-styles-menu [data-transitioning-destination=after][data-transitioning-state],.tinymce-mobile-styles-menu [data-transitioning-state=after]{transform:translate(100%)}@font-face{font-family:tinymce-mobile;font-style:normal;font-weight:400;src:url(fonts/tinymce-mobile.woff?8x92w3) format('woff')}@media (min-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:25px}}@media (max-device-width:700px){.tinymce-mobile-outer-container,.tinymce-mobile-outer-container input{font-size:18px}}.tinymce-mobile-icon{font-family:tinymce-mobile,sans-serif}.mixin-flex-and-centre{align-items:center;display:flex;justify-content:center}.mixin-flex-bar{align-items:center;display:flex;height:100%}.tinymce-mobile-outer-container .tinymce-mobile-editor-socket iframe{background-color:#fff;width:100%}.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{background-color:#207ab7;border-radius:50%;bottom:1em;color:#fff;font-size:1em;height:2.1em;position:fixed;right:2em;width:2.1em;align-items:center;display:flex;justify-content:center}@media only screen and (min-device-width:700px){.tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{font-size:1.2em}}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket{height:300px;overflow:hidden}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-editor-socket iframe{height:100%}.tinymce-mobile-outer-container:not(.tinymce-mobile-fullscreen-maximized) .tinymce-mobile-toolstrip{display:none}input[type=file]::-webkit-file-upload-button{display:none}@media only screen and (min-device-width :320px) and (max-device-width :568px) and (orientation :landscape){.tinymce-mobile-ios-container .tinymce-mobile-editor-socket .tinymce-mobile-mask-edit-icon{bottom:50%}}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.0.11 (2019-07-04)
8
+ */
9
+ !function(v){"use strict";var y=function(){return(y=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function a(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}var x=function(){},p=function(t,r){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))}},h=function(n){return function(){return n}},b=function(n){return n};function l(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var n,e,t,r,o,i,u,w=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return!t.apply(null,n)}},c=function(n){return function(){throw new Error(n)}},f=function(n){return n()},s=h(!1),d=h(!0),m=s,g=d,S=function(){return O},O=(r={fold:function(n,e){return n()},is:m,isSome:m,isNone:g,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:e,map:S,ap:S,each:function(){},bind:S,flatten:S,exists:m,forall:g,filter:S,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:h("none()")},Object.freeze&&Object.freeze(r),r),T=function(t){var n=function(){return t},e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:g,isNone:m,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return T(n(t))},ap:function(n){return n.fold(S,function(n){return T(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(t)?o:O},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(m,function(n){return e(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},k={some:T,none:S,from:function(n){return null===n||n===undefined?O:T(n)}},E=Object.keys,C=Object.hasOwnProperty,D=function(n,e){for(var t=E(n),r=0,o=t.length;r<o;r++){var i=t[r];e(n[i],i,n)}},M=function(n,r){return I(n,function(n,e,t){return{k:e,v:r(n,e,t)}})},I=function(r,o){var i={};return D(r,function(n,e){var t=o(n,e,r);i[t.k]=t.v}),i},R=function(n,t){var r=[];return D(n,function(n,e){r.push(t(n,e))}),r},B=function(n,e){return C.call(n,e)},A=h("touchstart"),F=h("touchmove"),V=h("touchend"),N=h("mousedown"),j=h("mousemove"),H=h("mouseup"),z=h("mouseover"),P=h("keydown"),L=h("keyup"),G=h("input"),$=h("change"),U=h("click"),W=h("transitionend"),_=h("selectstart"),X=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},q=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return K(r(1),r(2))},Y=function(){return K(0,0)},K=function(n,e){return{major:n,minor:e}},J={nu:K,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?Y():q(n,t)},unknown:Y},Q="Edge",Z="Chrome",nn="Opera",en="Firefox",tn="Safari",rn=function(n,e){return function(){return e===n}},on=function(n){var e=n.current;return{current:e,version:n.version,isEdge:rn(Q,e),isChrome:rn(Z,e),isIE:rn("IE",e),isOpera:rn(nn,e),isFirefox:rn(en,e),isSafari:rn(tn,e)}},un={unknown:function(){return on({current:undefined,version:J.unknown()})},nu:on,edge:h(Q),chrome:h(Z),ie:h("IE"),opera:h(nn),firefox:h(en),safari:h(tn)},cn="Windows",an="Android",fn="Solaris",sn="FreeBSD",ln=function(n,e){return function(){return e===n}},dn=function(n){var e=n.current;return{current:e,version:n.version,isWindows:ln(cn,e),isiOS:ln("iOS",e),isAndroid:ln(an,e),isOSX:ln("OSX",e),isLinux:ln("Linux",e),isSolaris:ln(fn,e),isFreeBSD:ln(sn,e)}},mn={unknown:function(){return dn({current:undefined,version:J.unknown()})},nu:dn,windows:h(cn),ios:h("iOS"),android:h(an),linux:h("Linux"),osx:h("OSX"),solaris:h(fn),freebsd:h(sn)},gn=function(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e}(n)===e}},pn=gn("string"),vn=gn("object"),hn=gn("array"),bn=gn("boolean"),yn=gn("function"),xn=gn("number"),wn=Array.prototype.slice,Sn=(o=Array.prototype.indexOf)===undefined?function(n,e){return Bn(n,e)}:function(n,e){return o.call(n,e)},On=function(n,e){return-1<Sn(n,e)},Tn=function(n,e){return Rn(n,e).isSome()},kn=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var i=n[o];r[o]=e(i,o,n)}return r},En=function(n,e){for(var t=0,r=n.length;t<r;t++){e(n[t],t,n)}},Cn=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var i=n[r];e(i,r,n)&&t.push(i)}return t},Dn=function(n,e,t){return function(n,e){for(var t=n.length-1;0<=t;t--)e(n[t],t,n)}(n,function(n){t=e(t,n)}),t},Mn=function(n,e,t){return En(n,function(n){t=e(t,n)}),t},In=function(n,e){for(var t=0,r=n.length;t<r;t++){var o=n[t];if(e(o,t,n))return k.some(o)}return k.none()},Rn=function(n,e){for(var t=0,r=n.length;t<r;t++){if(e(n[t],t,n))return k.some(t)}return k.none()},Bn=function(n,e){for(var t=0,r=n.length;t<r;++t)if(n[t]===e)return t;return-1},An=Array.prototype.push,Fn=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!Array.prototype.isPrototypeOf(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);An.apply(e,n[t])}return e},Vn=function(n,e){var t=kn(n,e);return Fn(t)},Nn=function(n,e){for(var t=0,r=n.length;t<r;++t){if(!0!==e(n[t],t,n))return!1}return!0},jn=function(n){var e=wn.call(n,0);return e.reverse(),e},Hn=function(n){return[n]},zn=(yn(Array.from)&&Array.from,function(n,e){var t=String(e).toLowerCase();return In(n,function(n){return n.search(t)})}),Pn=function(n,t){return zn(n,t).map(function(n){var e=J.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Ln=function(n,t){return zn(n,t).map(function(n){var e=J.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Gn=function(n,e){return-1!==n.indexOf(e)},$n=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Un=function(e){return function(n){return Gn(n,e)}},Wn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Gn(n,"edge/")&&Gn(n,"chrome")&&Gn(n,"safari")&&Gn(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,$n],search:function(n){return Gn(n,"chrome")&&!Gn(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Gn(n,"msie")||Gn(n,"trident")}},{name:"Opera",versionRegexes:[$n,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Un("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Un("firefox")},{name:"Safari",versionRegexes:[$n,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Gn(n,"safari")||Gn(n,"mobile/"))&&Gn(n,"applewebkit")}}],_n=[{name:"Windows",search:Un("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Gn(n,"iphone")||Gn(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Un("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Un("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Un("linux"),versionRegexes:[]},{name:"Solaris",search:Un("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Un("freebsd"),versionRegexes:[]}],Xn={browsers:h(Wn),oses:h(_n)},qn=function(n){var e,t,r,o,i,u,c,a,f,s,l,d=Xn.browsers(),m=Xn.oses(),g=Pn(d,n).fold(un.unknown,un.nu),p=Ln(m,n).fold(mn.unknown,mn.nu);return{browser:g,os:p,deviceType:(t=g,r=n,o=(e=p).isiOS()&&!0===/ipad/i.test(r),i=e.isiOS()&&!o,u=e.isAndroid()&&3===e.version.major,c=e.isAndroid()&&4===e.version.major,a=o||u||c&&!0===/mobile/i.test(r),f=e.isiOS()||e.isAndroid(),s=f&&!a,l=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),{isiPad:h(o),isiPhone:h(i),isTablet:h(a),isPhone:h(s),isTouch:h(f),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:h(l)})}},Yn={detect:X(function(){var n=v.navigator.userAgent;return qn(n)})},Kn={tap:h("alloy.tap")},Jn=h("alloy.focus"),Qn=h("alloy.blur.post"),Zn=h("alloy.paste.post"),ne=h("alloy.receive"),ee=h("alloy.execute"),te=h("alloy.focus.item"),re=Kn.tap,oe=Yn.detect().deviceType.isTouch()?Kn.tap:U,ie=h("alloy.longpress"),ue=h("alloy.system.init"),ce=h("alloy.system.attached"),ae=h("alloy.system.detached"),fe=h("alloy.focusmanager.shifted"),se=h("alloy.highlight"),le=h("alloy.dehighlight"),de=function(n,e){ve(n,n.element(),e,{})},me=function(n,e,t){ve(n,n.element(),e,t)},ge=function(n){de(n,ee())},pe=function(n,e,t){ve(n,e,t,{})},ve=function(n,e,t,r){var o=y({target:e},r);n.getSystem().triggerEvent(t,e,M(o,h))},he=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:h(n)}},be={fromHtml:function(n,e){var t=(e||v.document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw v.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return he(t.childNodes[0])},fromTag:function(n,e){var t=(e||v.document).createElement(n);return he(t)},fromText:function(n,e){var t=(e||v.document).createTextNode(n);return he(t)},fromDom:he,fromPoint:function(n,e,t){var r=n.dom();return k.from(r.elementFromPoint(e,t)).map(he)}},ye=(v.Node.ATTRIBUTE_NODE,v.Node.CDATA_SECTION_NODE,v.Node.COMMENT_NODE,v.Node.DOCUMENT_NODE),xe=(v.Node.DOCUMENT_TYPE_NODE,v.Node.DOCUMENT_FRAGMENT_NODE,v.Node.ELEMENT_NODE),we=v.Node.TEXT_NODE,Se=(v.Node.PROCESSING_INSTRUCTION_NODE,v.Node.ENTITY_REFERENCE_NODE,v.Node.ENTITY_NODE,v.Node.NOTATION_NODE,function(n){return n.dom().nodeName.toLowerCase()}),Oe=function(e){return function(n){return n.dom().nodeType===e}},Te=Oe(xe),ke=Oe(we),Ee=function(n){var e=ke(n)?n.dom().parentNode:n.dom();return e!==undefined&&null!==e&&e.ownerDocument.body.contains(e)},Ce=X(function(){return De(be.fromDom(v.document))}),De=function(n){var e=n.dom().body;if(null===e||e===undefined)throw new Error("Body is not available yet");return be.fromDom(e)},Me=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return En(e,function(n,e){r[n]=h(t[e])}),r}},Ie=function(n){return n.slice(0).sort()},Re=function(e,n){if(!hn(n))throw new Error("The "+e+" fields must be an array. Was: "+n+".");En(n,function(n){if(!pn(n))throw new Error("The value "+n+" in the "+e+" fields was not a string.")})},Be=function(o,i){var t,u=o.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return Re("required",o),Re("optional",i),t=Ie(u),In(t,function(n,e){return e<t.length-1&&n===t[e+1]}).each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}),function(e){var t=E(e);Nn(o,function(n){return On(t,n)})||function(n,e){throw new Error("All required keys ("+Ie(n).join(", ")+") were not specified. Specified keys were: "+Ie(e).join(", ")+".")}(o,t);var n=Cn(t,function(n){return!On(u,n)});0<n.length&&function(n){throw new Error("Unsupported keys for object: "+Ie(n).join(", "))}(n);var r={};return En(o,function(n){r[n]=h(e[n])}),En(i,function(n){r[n]=h(Object.prototype.hasOwnProperty.call(e,n)?k.some(e[n]):k.none())}),r}},Ae="undefined"!=typeof v.window?v.window:Function("return this;")(),Fe=function(n,e){return function(n,e){for(var t=e!==undefined&&null!==e?e:Ae,r=0;r<n.length&&t!==undefined&&null!==t;++r)t=t[n[r]];return t}(n.split("."),e)},Ve={getOrDie:function(n,e){var t=Fe(n,e);if(t===undefined||null===t)throw n+" not available on this browser";return t}},Ne=function(){return Ve.getOrDie("Node")},je=function(n,e,t){return 0!=(n.compareDocumentPosition(e)&t)},He=function(n,e){return je(n,e,Ne().DOCUMENT_POSITION_CONTAINED_BY)},ze=xe,Pe=ye,Le=function(n,e){var t=n.dom();if(t.nodeType!==ze)return!1;if(t.matches!==undefined)return t.matches(e);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(e);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(e);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Ge=function(n){return n.nodeType!==ze&&n.nodeType!==Pe||0===n.childElementCount},$e=function(n,e){var t=e===undefined?v.document:e.dom();return Ge(t)?[]:kn(t.querySelectorAll(n),be.fromDom)},Ue=function(n,e){var t=e===undefined?v.document:e.dom();return Ge(t)?k.none():k.from(t.querySelector(n)).map(be.fromDom)},We=function(n,e){return n.dom()===e.dom()},_e=(Yn.detect().browser.isIE(),function(n){return be.fromDom(n.dom().ownerDocument)}),Xe=function(n){var e=n.dom();return k.from(e.parentNode).map(be.fromDom)},qe=function(n){var e=n.dom();return kn(e.childNodes,be.fromDom)},Ye=function(n,e){var t=n.dom().childNodes;return k.from(t[e]).map(be.fromDom)},Ke=(Me("element","offset"),function(e,t){Xe(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})}),Je=function(n,e){var t;(t=n.dom(),k.from(t.nextSibling).map(be.fromDom)).fold(function(){Xe(n).each(function(n){Ze(n,e)})},function(n){Ke(n,e)})},Qe=function(e,t){Ye(e,0).fold(function(){Ze(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},Ze=function(n,e){n.dom().appendChild(e.dom())},nt=function(e,n){En(n,function(n){Ze(e,n)})},et=function(n){n.dom().textContent="",En(qe(n),function(n){tt(n)})},tt=function(n){var e=n.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},rt=function(n){de(n,ae());var e=n.components();En(e,rt)},ot=function(n){var e=n.components();En(e,ot),de(n,ce())},it=function(n,e){ut(n,e,Ze)},ut=function(n,e,t){n.getSystem().addToWorld(e),t(n.element(),e.element()),Ee(n.element())&&ot(e),n.syncComponents()},ct=function(n){rt(n),tt(n.element()),n.getSystem().removeFromWorld(n)},at=function(e){var n=Xe(e.element()).bind(function(n){return e.getSystem().getByDom(n).fold(k.none,k.some)});ct(e),n.each(function(n){n.syncComponents()})},ft=function(n,e,t){t(n,e.element());var r=qe(e.element());En(r,function(n){e.getByDom(n).each(ot)})},st=function(t){return{is:function(n){return t===n},isValue:d,isError:s,getOr:h(t),getOrThunk:h(t),getOrDie:h(t),or:function(n){return st(t)},orThunk:function(n){return st(t)},fold:function(n,e){return e(t)},map:function(n){return st(n(t))},mapError:function(n){return st(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOption:function(){return k.some(t)}}},lt=function(t){return{is:s,isValue:s,isError:d,getOr:b,getOrThunk:function(n){return n()},getOrDie:function(){return c(String(t))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,e){return n(t)},map:function(n){return lt(t)},mapError:function(n){return lt(n(t))},each:x,bind:function(n){return lt(t)},exists:s,forall:d,toOption:k.none}},dt={value:st,error:lt,fromOption:function(n,e){return n.fold(function(){return lt(e)},st)}},mt=function(u){if(!hn(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var c=[],t={};return En(u,function(n,r){var e=E(n);if(1!==e.length)throw new Error("one and only one name per case");var o=e[0],i=n[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!hn(i))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+n);for(var t=new Array(n),e=0;e<t.length;e++)t[e]=arguments[e];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(n){var e=E(n);if(c.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+e.join(","));if(!Nn(c,function(n){return On(e,n)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+c.join(", "));return n[o].apply(null,t)},log:function(n){v.console.log(n,{constructors:c,constructor:o,params:t})}}}}),t},gt=Object.prototype.hasOwnProperty,pt=function(u){return function(){for(var n=new Array(arguments.length),e=0;e<n.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<n.length;r++){var o=n[r];for(var i in o)gt.call(o,i)&&(t[i]=u(t[i],o[i]))}return t}},vt=pt(function(n,e){return vn(n)&&vn(e)?vt(n,e):e}),ht=pt(function(n,e){return e}),bt=mt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),yt=function(n){return bt.defaultedThunk(h(n))},xt=bt.strict,wt=bt.asOption,St=bt.defaultedThunk,Ot=bt.mergeWithThunk,Tt=function(e){return function(n){return B(n,e)?k.from(n[e]):k.none()}},kt=function(n,e){return Tt(e)(n)},Et=function(n,e){var t={};return t[n]=e,t},Ct=(mt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(n,e){return t=e,r={},D(n,function(n,e){On(t,e)||(r[e]=n)}),r;var t,r}),Dt=function(n){return Tt(n)},Mt=function(n,e){return t=n,r=e,function(n){return B(n,t)?n[t]:r};var t,r},It=function(n,e){return kt(n,e)},Rt=function(n,e){return Et(n,e)},Bt=function(n){return e={},En(n,function(n){e[n.key]=n.value}),e;var e},At=function(n,e){var t,r,o,i,u,c=(t=[],r=[],En(n,function(n){n.fold(function(n){t.push(n)},function(n){r.push(n)})}),{errors:t,values:r});return 0<c.errors.length?(u=c.errors,p(dt.error,Fn)(u)):(i=e,0===(o=c.values).length?dt.value(i):dt.value(vt(i,ht.apply(undefined,o))))},Ft=function(n,e){return B(t=n,r=e)&&t[r]!==undefined&&null!==t[r];var t,r};(u=i||(i={}))[u.Error=0]="Error",u[u.Value=1]="Value";var Vt,Nt,jt=function(n,e,t){return n.stype===i.Error?e(n.serror):t(n.svalue)},Ht=function(n){return{stype:i.Value,svalue:n}},zt=function(n){return{stype:i.Error,serror:n}},Pt=function(n){return n.fold(zt,Ht)},Lt=function(n){return jt(n,dt.error,dt.value)},Gt=Ht,$t=function(n){var e=[],t=[];return En(n,function(n){jt(n,function(n){return t.push(n)},function(n){return e.push(n)})}),{values:e,errors:t}},Ut=zt,Wt=function(n,e){return n.stype===i.Value?e(n.svalue):n},_t=function(n,e){return n.stype===i.Error?e(n.serror):n},Xt=function(n,e){return n.stype===i.Value?{stype:i.Value,svalue:e(n.svalue)}:n},qt=function(n,e){return n.stype===i.Error?{stype:i.Error,serror:e(n.serror)}:n},Yt=function(n){return p(Ut,Fn)(n)},Kt=function(n,e){var t,r,o=$t(n);return 0<o.errors.length?Yt(o.errors):(t=o.values,r=e,0<t.length?Gt(vt(r,ht.apply(undefined,t))):Gt(r))},Jt=function(n){var e=$t(n);return 0<e.errors.length?Yt(e.errors):Gt(e.values)},Qt=mt([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),Zt=mt([{field:["name","presence","type"]},{state:["name"]}]),nr=function(){return Ve.getOrDie("JSON")},er=function(n,e,t){return nr().stringify(n,e,t)},tr=function(n){return vn(n)&&100<E(n).length?" removed due to size":er(n,null,2)},rr=function(n,e){return Ut([{path:n,getErrorInfo:e}])},or=mt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),ir=function(t,r,o){return kt(r,o).fold(function(){return n=o,e=r,rr(t,function(){return'Could not find valid *strict* value for "'+n+'" in '+tr(e)});var n,e},Gt)},ur=function(n,e,t){var r=kt(n,e).fold(function(){return t(n)},b);return Gt(r)},cr=function(c,a,n,f){return n.fold(function(o,t,n,r){var i=function(n){var e=r.extract(c.concat([o]),f,n);return Xt(e,function(n){return Et(t,f(n))})},u=function(n){return n.fold(function(){var n=Et(t,f(k.none()));return Gt(n)},function(n){var e=r.extract(c.concat([o]),f,n);return Xt(e,function(n){return Et(t,f(k.some(n)))})})};return n.fold(function(){return Wt(ir(c,a,o),i)},function(n){return Wt(ur(a,o,n),i)},function(){return Wt(Gt(kt(a,o)),u)},function(n){return Wt((t=n,r=kt(e=a,o).map(function(n){return!0===n?t(e):n}),Gt(r)),u);var e,t,r},function(n){var e=n(a),t=Xt(ur(a,o,h({})),function(n){return vt(e,n)});return Wt(t,i)})},function(n,e){var t=e(a);return Gt(Et(n,f(t)))})},ar=function(r){return{extract:function(t,n,e){return _t(r(e,n),function(n){return e=n,rr(t,function(){return e});var e})},toString:function(){return"val"},toDsl:function(){return Qt.itemOf(r)}}},fr=function(n){var a=sr(n),f=Dn(n,function(e,n){return n.fold(function(n){return vt(e,Rt(n,!0))},h(e))},{});return{extract:function(n,e,t){var r,o,i,u=bn(t)?[]:(o=E(r=t),Cn(o,function(n){return Ft(r,n)})),c=Cn(u,function(n){return!Ft(f,n)});return 0===c.length?a.extract(n,e,t):(i=c,rr(n,function(){return"There are unsupported fields: ["+i.join(", ")+"] specified"}))},toString:a.toString,toDsl:a.toDsl}},sr=function(c){return{extract:function(n,e,t){return r=n,o=t,i=e,u=kn(c,function(n){return cr(r,o,n,i)}),Kt(u,{});var r,o,i,u},toString:function(){return"obj{\n"+kn(c,function(n){return n.fold(function(n,e,t,r){return n+" -> "+r.toString()},function(n,e){return"state("+n+")"})}).join("\n")+"}"},toDsl:function(){return Qt.objOf(kn(c,function(n){return n.fold(function(n,e,t,r){return Zt.field(n,t,r)},function(n,e){return Zt.state(n)})}))}}},lr=function(t,i){var u=function(n,e){return(o=ar(t),{extract:function(t,r,n){var e=kn(n,function(n,e){return o.extract(t.concat(["["+e+"]"]),r,n)});return Jt(e)},toString:function(){return"array("+o.toString()+")"},toDsl:function(){return Qt.arrOf(o)}}).extract(n,b,e);var o};return{extract:function(t,r,o){var n=E(o),e=u(t,n);return Wt(e,function(n){var e=kn(n,function(n){return or.field(n,n,xt(),i)});return sr(e).extract(t,r,o)})},toString:function(){return"setOf("+i.toString()+")"},toDsl:function(){return Qt.setOf(t,i)}}},dr=h(ar(Gt)),mr=or.state,gr=or.field,pr=function(t,e,r,o,i){return It(o,i).fold(function(){return n=o,e=i,rr(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+tr(n)});var n,e},function(n){return sr(n).extract(t.concat(["branch: "+i]),e,r)})},vr=function(o,i){return{extract:function(e,t,r){return It(r,o).fold(function(){return n=o,rr(e,function(){return'Choice schema did not contain choice key: "'+n+'"'});var n},function(n){return pr(e,t,r,i,n)})},toString:function(){return"chooseOn("+o+"). Possible values: "+E(i)},toDsl:function(){return Qt.choiceOf(o,i)}}},hr=ar(Gt),br=function(e){return ar(function(n){return e(n).fold(Ut,Gt)})},yr=function(e,n){return lr(function(n){return Pt(e(n))},n)},xr=function(n,e,t){return Lt((r=n,o=b,i=t,u=e.extract([r],o,i),qt(u,function(n){return{input:i,errors:n}})));var r,o,i,u},wr=function(n){return n.fold(function(n){throw new Error(Or(n))},b)},Sr=function(n,e,t){return wr(xr(n,e,t))},Or=function(n){return"Errors: \n"+(e=n.errors,t=10<e.length?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,kn(t,function(n){return"Failed path: ("+n.path.join(" > ")+")\n"+n.getErrorInfo()}))+"\n\nInput object: "+tr(n.input);var e,t},Tr=function(n,e){return vr(n,e)},kr=h(hr),Er=(Vt=yn,Nt="function",ar(function(n){var e=typeof n;return Vt(n)?Gt(n):Ut("Expected type: "+Nt+" but got: "+e)})),Cr=function(n){return gr(n,n,xt(),dr())},Dr=function(n,e){return gr(n,n,xt(),e)},Mr=function(n,e){return gr(n,n,xt(),sr(e))},Ir=function(n){return gr(n,n,wt(),dr())},Rr=function(n,e){return gr(n,n,wt(),e)},Br=function(n,e){return Rr(n,sr(e))},Ar=function(n,e){return Rr(n,fr(e))},Fr=function(n,e){return gr(n,n,yt(e),dr())},Vr=function(n,e,t){return gr(n,n,yt(e),t)},Nr=function(n,e){return mr(n,e)},jr=function(n,e){return We(n.element(),e.event().target())},Hr=function(n){if(!Ft(n,"can")&&!Ft(n,"abort")&&!Ft(n,"run"))throw new Error("EventHandler defined by: "+er(n,null,2)+" does not have can, abort, or run!");return Sr("Extracting event.handler",fr([Fr("can",h(!0)),Fr("abort",h(!1)),Fr("run",x)]),n)},zr=function(t){var e,r,o,i,n=(e=t,r=function(n){return n.can},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Mn(e,function(n,e){return n&&r(e).apply(undefined,t)},!0)}),u=(o=t,i=function(n){return n.abort},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Mn(o,function(n,e){return n||i(e).apply(undefined,t)},!1)});return Hr({can:n,abort:u,run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];En(t,function(n){n.run.apply(undefined,e)})}})};function Pr(n,e,t,r,o){return n(t,r)?k.some(t):yn(o)&&o(t)?k.none():e(t,r,o)}var Lr,Gr,$r,Ur=function(n,e,t){for(var r=n.dom(),o=yn(t)?t:h(!1);r.parentNode;){r=r.parentNode;var i=be.fromDom(r);if(e(i))return k.some(i);if(o(i))break}return k.none()},Wr=function(n,e,t){return Pr(function(n){return e(n)},Ur,n,e,t)},_r=function(n,r){var o=function(n){for(var e=0;e<n.childNodes.length;e++){if(r(be.fromDom(n.childNodes[e])))return k.some(be.fromDom(n.childNodes[e]));var t=o(n.childNodes[e]);if(t.isSome())return t}return k.none()};return o(n.dom())},Xr=function(n,e,t){return Wr(n,function(n){return e(n).isSome()},t).bind(e)},qr=function(n){return Bt(n)},Yr=function(n,e){return{key:n,value:Hr({abort:e})}},Kr=function(n,e){return{key:n,value:Hr({run:e})}},Jr=function(n,e,t){return{key:n,value:Hr({run:function(n){e.apply(undefined,[n].concat(t))}})}},Qr=function(n){return function(t){return{key:n,value:Hr({run:function(n,e){jr(n,e)&&t(n,e)}})}}},Zr=function(n,e,t){var u,r,o=e.partUids[t];return r=o,Kr(u=n,function(n,i){n.getSystem().getByUid(r).each(function(n){var e,t,r,o;t=(e=n).element(),r=u,o=i,e.getSystem().triggerEvent(r,t,o.event())})})},no=function(n){return Kr(n,function(n,e){e.cut()})},eo=Qr(ce()),to=Qr(ae()),ro=Qr(ue()),oo=(Lr=ee(),function(n){return Kr(Lr,n)}),io=function(n){return kn(n,function(n){return r=e="/*",o=(t=n).length-e.length,""!==r&&(t.length<r.length||t.substr(o,o+r.length)!==r)?n:n.substring(0,n.length-"/*".length);var e,t,r,o})},uo=function(n,e){var t=n.toString(),r=t.indexOf(")")+1,o=t.indexOf("("),i=t.substring(o+1,r-1).split(/,\s*/);return n.toFunctionAnnotation=function(){return{name:e,parameters:io(i)}},n},co=function(n){return{classes:n.classes!==undefined?n.classes:[],attributes:n.attributes!==undefined?n.attributes:{},styles:n.styles!==undefined?n.styles:{}}},ao=function(t,r,o){return ro(function(n,e){o(n,t,r)})},fo=function(o,i,u){var n,e,t,r,c,a;return n=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=[t].concat(n);return t.config({name:h(o)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+o+". Using API: "+u)},function(n){var e=Array.prototype.slice.call(r,1);return i.apply(undefined,[t,n.config,n.state].concat(e))})},e=u,t=i.toString(),r=t.indexOf(")")+1,c=t.indexOf("("),a=t.substring(c+1,r-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:e,parameters:io(a.slice(0,1).concat(a.slice(3)))}},n},so=function(n){return{key:n,value:undefined}},lo=function(t,n,r,o,e,i,u){var c=function(n){return Ft(n,r)?n[r]():k.none()},a=M(e,function(n,e){return fo(r,n,e)}),f=M(i,function(n,e){return uo(n,e)}),s=y({},f,a,{revoke:l(so,r),config:function(n){var e=Sr(r+"-config",t,n);return{key:r,value:{config:e,me:s,configAsRaw:X(function(){return Sr(r+"-config",t,n)}),initialConfig:n,state:u}}},schema:function(){return n},exhibit:function(n,t){return c(n).bind(function(e){return It(o,"exhibit").map(function(n){return n(t,e.config,e.state)})}).getOr(co({}))},name:function(){return r},handlers:function(n){return c(n).map(function(n){return Mt("events",function(n,e){return{}})(o)(n.config,n.state)}).getOr({})}});return s},mo={init:function(){return go({readState:function(){return"No State required"}})}},go=function(n){return n},po=function(n){return Bt(n)},vo=fr([Cr("fields"),Cr("name"),Fr("active",{}),Fr("apis",{}),Fr("state",mo),Fr("extra",{})]),ho=function(n){var e,t,r,o,i,u,c,a,f=Sr("Creating behaviour: "+n.name,vo,n);return e=f.fields,t=f.name,r=f.active,o=f.apis,i=f.extra,u=f.state,c=fr(e),a=Br(t,[Ar("config",e)]),lo(c,a,t,r,o,i,u)},bo=fr([Cr("branchKey"),Cr("branches"),Cr("name"),Fr("active",{}),Fr("apis",{}),Fr("state",mo),Fr("extra",{})]),yo=h(undefined),xo=function(n,e,t){if(!(pn(t)||bn(t)||xn(t)))throw v.console.error("Invalid call to Attr.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")},wo=function(n,e,t){xo(n.dom(),e,t)},So=function(n,e){var t=n.dom();D(e,function(n,e){xo(t,e,n)})},Oo=function(n,e){var t=n.dom().getAttribute(e);return null===t?undefined:t},To=function(n,e){var t=n.dom();return!(!t||!t.hasAttribute)&&t.hasAttribute(e)},ko=function(n,e){n.dom().removeAttribute(e)},Eo=function(n,e){var t=Oo(n,e);return t===undefined||""===t?[]:t.split(" ")},Co=function(n){return n.dom().classList!==undefined},Do=function(n,e){return o=e,i=Eo(t=n,r="class").concat([o]),wo(t,r,i.join(" ")),!0;var t,r,o,i},Mo=function(n,e){return o=e,0<(i=Cn(Eo(t=n,r="class"),function(n){return n!==o})).length?wo(t,r,i.join(" ")):ko(t,r),!1;var t,r,o,i},Io=function(n,e){Co(n)?n.dom().classList.add(e):Do(n,e)},Ro=function(n){0===(Co(n)?n.dom().classList:Eo(n,"class")).length&&ko(n,"class")},Bo=function(n,e){Co(n)?n.dom().classList.remove(e):Mo(n,e);Ro(n)},Ao=function(n,e){return Co(n)&&n.dom().classList.contains(e)},Fo=function(n,e,t){Bo(n,t),Io(n,e)},Vo=/* */Object.freeze({toAlpha:function(n,e,t){Fo(n.element(),e.alpha,e.omega)},toOmega:function(n,e,t){Fo(n.element(),e.omega,e.alpha)},isAlpha:function(n,e,t){return Ao(n.element(),e.alpha)},isOmega:function(n,e,t){return Ao(n.element(),e.omega)},clear:function(n,e,t){Bo(n.element(),e.alpha),Bo(n.element(),e.omega)}}),No=[Cr("alpha"),Cr("omega")],jo=ho({fields:No,name:"swapping",apis:Vo}),Ho=function(n){var e=n,t=function(){return e};return{get:t,set:function(n){e=n},clone:function(){return Ho(t())}}},zo=function(n){n.dom().focus()},Po=function(n){n.dom().blur()},Lo=function(n){var e=n!==undefined?n.dom():v.document;return k.from(e.activeElement).map(be.fromDom)},Go=function(e){return Lo(_e(e)).filter(function(n){return e.dom().contains(n.dom())})},$o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Uo=tinymce.util.Tools.resolve("tinymce.ThemeManager"),Wo=function(n){var e=v.document.createElement("a");e.target="_blank",e.href=n.href,e.rel="noreferrer noopener";var t=v.document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,v.window,0,0,0,0,0,!1,!1,!1,!1,0,null),v.document.body.appendChild(e),e.dispatchEvent(t),v.document.body.removeChild(e)},_o={formatChanged:h("formatChanged"),orientationChanged:h("orientationChanged"),dropupDismissed:h("dropupDismissed")},Xo=function(n){return n.dom().innerHTML},qo=function(n,e){var t,r,o=_e(n).dom(),i=be.fromDom(o.createDocumentFragment()),u=(t=e,(r=(o||v.document).createElement("div")).innerHTML=t,qe(be.fromDom(r)));nt(i,u),et(n),Ze(n,i)},Yo=function(n){return e=n,t=!1,be.fromDom(e.dom().cloneNode(t));var e,t},Ko=function(n){var e,t,r,o=Yo(n);return e=o,t=be.fromTag("div"),r=be.fromDom(e.dom().cloneNode(!0)),Ze(t,r),Xo(t)},Jo=function(n){return Ko(n)},Qo=/* */Object.freeze({events:function(c){return qr([Kr(ne(),function(o,i){var n,e,u=c.channels,t=E(u),r=(n=t,(e=i).universal()?n:Cn(n,function(n){return On(e.channels(),n)}));En(r,function(n){var e=u[n],t=e.schema,r=Sr("channel["+n+"] data\nReceiver: "+Jo(o.element()),t,i.data());e.onReceive(o,r)})})])}}),Zo=function(n){for(var e=[],t=function(n){e.push(n)},r=0;r<n.length;r++)n[r].each(t);return e},ni=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return k.none()},ei="unknown";($r=Gr||(Gr={}))[$r.STOP=0]="STOP",$r[$r.NORMAL=1]="NORMAL",$r[$r.LOGGING=2]="LOGGING";var ti,ri=Ho({}),oi=function(e,n,t){var r,o,i,u;switch(It(ri.get(),e).orThunk(function(){var n=E(ri.get());return ni(n,function(n){return-1<e.indexOf(n)?k.some(ri.get()[n]):k.none()})}).getOr(Gr.NORMAL)){case Gr.NORMAL:return t(ci());case Gr.LOGGING:var c=(r=e,o=n,i=[],u=(new Date).getTime(),{logEventCut:function(n,e,t){i.push({outcome:"cut",target:e,purpose:t})},logEventStopped:function(n,e,t){i.push({outcome:"stopped",target:e,purpose:t})},logNoParent:function(n,e,t){i.push({outcome:"no-parent",target:e,purpose:t})},logEventNoHandlers:function(n,e){i.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(n,e,t){i.push({outcome:"response",purpose:t,target:e})},write:function(){var n=(new Date).getTime();On(["mousemove","mouseover","mouseout",ue()],r)||v.console.log(r,{event:r,time:n-u,target:o.dom(),sequence:kn(i,function(n){return On(["cut","stopped","response"],n.outcome)?"{"+n.purpose+"} "+n.outcome+" at ("+Jo(n.target)+")":n.outcome})})}}),a=t(c);return c.write(),a;case Gr.STOP:return!0}},ii=["alloy/data/Fields","alloy/debugging/Debugging"],ui=function(n,e,t){return oi(n,e,t)},ci=h({logEventCut:x,logEventStopped:x,logNoParent:x,logEventNoHandlers:x,logEventResponse:x,write:x}),ai=h([Cr("menu"),Cr("selectedMenu")]),fi=h([Cr("item"),Cr("selectedItem")]),si=(h(sr(fi().concat(ai()))),h(sr(fi()))),li=Mr("initSize",[Cr("numColumns"),Cr("numRows")]),di=function(n,e,t){!function(){var n=new Error;if(n.stack===undefined)return;var e=n.stack.split("\n");In(e,function(e){return 0<e.indexOf("alloy")&&!Tn(ii,function(n){return-1<e.indexOf(n)})}).getOr(ei)}();return gr(e,e,t,br(function(t){return dt.value(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.apply(undefined,n)})}))},mi=function(n){return di(0,n,yt(x))},gi=function(n){return di(0,n,yt(k.none))},pi=function(n){return di(0,n,xt())},vi=function(n){return di(0,n,xt())},hi=function(n,e){return Nr(n,h(e))},bi=function(n){return Nr(n,b)},yi=h(li),xi=[Dr("channels",yr(dt.value,fr([pi("onReceive"),Fr("schema",kr())])))],wi=ho({fields:xi,name:"receiving",active:Qo}),Si=function(n,e,t){var r=e.aria;r.update(n,r,t.get())},Oi=function(e,n,t){n.toggleClass.each(function(n){t.get()?Io(e.element(),n):Bo(e.element(),n)})},Ti=function(n,e,t){Ci(n,e,t,!t.get())},ki=function(n,e,t){t.set(!0),Oi(n,e,t),Si(n,e,t)},Ei=function(n,e,t){t.set(!1),Oi(n,e,t),Si(n,e,t)},Ci=function(n,e,t,r){(r?ki:Ei)(n,e,t)},Di=function(n,e,t){Ci(n,e,t,e.selected)},Mi=/* */Object.freeze({onLoad:Di,toggle:Ti,isOn:function(n,e,t){return t.get()},on:ki,off:Ei,set:Ci}),Ii=/* */Object.freeze({exhibit:function(n,e,t){return co({})},events:function(n,e){var t,r,o,i=(t=n,r=e,o=Ti,oo(function(n){o(n,t,r)})),u=ao(n,e,Di);return qr(Fn([n.toggleOnExecute?[i]:[],[u]]))}}),Ri=function(n,e,t){wo(n.element(),"aria-expanded",t)},Bi=[Fr("selected",!1),Ir("toggleClass"),Fr("toggleOnExecute",!0),Vr("aria",{mode:"none"},Tr("mode",{pressed:[Fr("syncWithExpanded",!1),hi("update",function(n,e,t){wo(n.element(),"aria-pressed",t),e.syncWithExpanded&&Ri(n,e,t)})],checked:[hi("update",function(n,e,t){wo(n.element(),"aria-checked",t)})],expanded:[hi("update",Ri)],selected:[hi("update",function(n,e,t){wo(n.element(),"aria-selected",t)})],none:[hi("update",x)]}))],Ai=ho({fields:Bi,name:"toggling",active:Ii,apis:Mi,state:(ti=!1,{init:function(){var e=Ho(ti);return{get:function(){return e.get()},set:function(n){return e.set(n)},clear:function(){return e.set(ti)},readState:function(){return e.get()}}}})}),Fi=function(t,r){return wi.config({channels:Rt(_o.formatChanged(),{onReceive:function(n,e){e.command===t&&r(n,e.state)}})})},Vi=function(n){return wi.config({channels:Rt(_o.orientationChanged(),{onReceive:n})})},Ni=function(n,e){return{key:n,value:{onReceive:e}}},ji="tinymce-mobile",Hi={resolve:function(n){return ji+"-"+n},prefix:h(ji)},zi=function(n,e){e.ignore||(zo(n.element()),e.onFocus(n))},Pi=/* */Object.freeze({focus:zi,blur:function(n,e){e.ignore||Po(n.element())},isFocused:function(n){return e=n.element(),t=_e(e).dom(),e.dom()===t.activeElement;var e,t}}),Li=/* */Object.freeze({exhibit:function(n,e){var t=e.ignore?{}:{attributes:{tabindex:"-1"}};return co(t)},events:function(t){return qr([Kr(Jn(),function(n,e){zi(n,t),e.stop()})].concat(t.stopMousedown?[Kr(N(),function(n,e){e.event().prevent()})]:[]))}}),Gi=[mi("onFocus"),Fr("stopMousedown",!1),Fr("ignore",!1)],$i=ho({fields:Gi,name:"focusing",active:Li,apis:Pi}),Ui=function(n){return n.style!==undefined&&yn(n.style.getPropertyValue)},Wi=function(n,e,t){if(!pn(t))throw v.console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);Ui(n)&&n.style.setProperty(e,t)},_i=function(n,e,t){var r=n.dom();Wi(r,e,t)},Xi=function(n,e){var t=n.dom();D(e,function(n,e){Wi(t,e,n)})},qi=function(n,e){var t=n.dom(),r=v.window.getComputedStyle(t).getPropertyValue(e),o=""!==r||Ee(n)?r:Yi(t,e);return null===o?undefined:o},Yi=function(n,e){return Ui(n)?n.style.getPropertyValue(e):""},Ki=function(n,e){var t=n.dom(),r=Yi(t,e);return k.from(r).filter(function(n){return 0<n.length})},Ji=function(n,e){var t,r,o=n.dom();r=e,Ui(t=o)&&t.style.removeProperty(r),To(n,"style")&&""===Oo(n,"style").replace(/^\s+|\s+$/g,"")&&ko(n,"style")},Qi=function(n){return n.dom().offsetWidth};function Zi(r,o){var n=function(n){var e=o(n);if(e<=0||null===e){var t=qi(n,r);return parseFloat(t)||0}return e},i=function(o,n){return Mn(n,function(n,e){var t=qi(o,e),r=t===undefined?0:parseInt(t,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!xn(e)&&!e.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+e);var t=n.dom();Ui(t)&&(t.style[r]=e+"px")},get:n,getOuter:n,aggregate:i,max:function(n,e,t){var r=i(n,t);return r<e?e-r:0}}}var nu,eu,tu=Zi("height",function(n){var e=n.dom();return Ee(n)?e.getBoundingClientRect().height:e.offsetHeight}),ru=function(n){return tu.get(n)},ou=function(n,e,t){return Cn(function(n,e){for(var t=yn(e)?e:h(!1),r=n.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=be.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o}(n,t),e)},iu=function(n,e){return Cn(Xe(t=n).map(qe).map(function(n){return Cn(n,function(n){return!We(t,n)})}).getOr([]),e);var t},uu=function(n,e){return $e(e,n)},cu=function(n){return Ue(n)},au=function(n,e,t){return Ur(n,function(n){return Le(n,e)},t)},fu=function(n,e){return Ue(e,n)},su=function(n,e,t){return Pr(Le,au,n,e,t)},lu=function(n,e,t){var r=jn(n.slice(0,e)),o=jn(n.slice(e+1));return In(r.concat(o),t)},du=function(n,e,t){var r=jn(n.slice(0,e));return In(r,t)},mu=function(n,e,t){var r=n.slice(0,e),o=n.slice(e+1);return In(o.concat(r),t)},gu=function(n,e,t){var r=n.slice(e+1);return In(r,t)},pu=function(t){return function(n){var e=n.raw();return On(t,e.which)}},vu=function(n){return function(e){return Nn(n,function(n){return n(e)})}},hu=function(n){return!0===n.raw().shiftKey},bu=function(n){return!0===n.raw().ctrlKey},yu=w(hu),xu=function(n,e){return{matches:n,classification:e}},wu=function(n,e,t,r){var o=n+e;return r<o?t:o<t?r:o},Su=function(n,e,t){return n<=e?e:t<=n?t:n},Ou=function(t,r,n,o){var e=uu(t.element(),"."+r.highlightClass);En(e,function(e){Tn(o,function(n){return n.element()===e})||(Bo(e,r.highlightClass),t.getSystem().getByDom(e).each(function(n){r.onDehighlight(t,n),de(n,le())}))})},Tu=function(n,e,t,r){Ou(n,e,0,[r]),ku(n,e,t,r)||(Io(r.element(),e.highlightClass),e.onHighlight(n,r),de(r,se()))},ku=function(n,e,t,r){return Ao(r.element(),e.highlightClass)},Eu=function(n,e,t,r){var o=uu(n.element(),"."+e.itemClass);return k.from(o[r]).fold(function(){return dt.error("No element found with index "+r)},n.getSystem().getByDom)},Cu=function(e,n,t){return fu(e.element(),"."+n.itemClass).bind(function(n){return e.getSystem().getByDom(n).toOption()})},Du=function(e,n,t){var r=uu(e.element(),"."+n.itemClass);return(0<r.length?k.some(r[r.length-1]):k.none()).bind(function(n){return e.getSystem().getByDom(n).toOption()})},Mu=function(t,e,n,r){var o=uu(t.element(),"."+e.itemClass);return Rn(o,function(n){return Ao(n,e.highlightClass)}).bind(function(n){var e=wu(n,r,0,o.length-1);return t.getSystem().getByDom(o[e]).toOption()})},Iu=function(e,n,t){var r=uu(e.element(),"."+n.itemClass);return Zo(kn(r,function(n){return e.getSystem().getByDom(n).toOption()}))},Ru=/* */Object.freeze({dehighlightAll:function(n,e,t){return Ou(n,e,0,[])},dehighlight:function(n,e,t,r){ku(n,e,t,r)&&(Bo(r.element(),e.highlightClass),e.onDehighlight(n,r),de(r,le()))},highlight:Tu,highlightFirst:function(e,t,r){Cu(e,t).each(function(n){Tu(e,t,r,n)})},highlightLast:function(e,t,r){Du(e,t).each(function(n){Tu(e,t,r,n)})},highlightAt:function(e,t,r,n){Eu(e,t,r,n).fold(function(n){throw new Error(n)},function(n){Tu(e,t,r,n)})},highlightBy:function(e,t,r,n){var o=Iu(e,t);In(o,n).each(function(n){Tu(e,t,r,n)})},isHighlighted:ku,getHighlighted:function(e,n,t){return fu(e.element(),"."+n.highlightClass).bind(function(n){return e.getSystem().getByDom(n).toOption()})},getFirst:Cu,getLast:Du,getPrevious:function(n,e,t){return Mu(n,e,0,-1)},getNext:function(n,e,t){return Mu(n,e,0,1)},getCandidates:Iu}),Bu=[Cr("highlightClass"),Cr("itemClass"),mi("onHighlight"),mi("onDehighlight")],Au=ho({fields:Bu,name:"highlighting",apis:Ru}),Fu=function(n,e,t){e.exists(function(e){return t.exists(function(n){return We(n,e)})})||me(n,fe(),{prevFocus:e,newFocus:t})},Vu=function(){var o=function(n){return Go(n.element())};return{get:o,set:function(n,e){var t=o(n);n.getSystem().triggerFocus(e,n.element());var r=o(n);Fu(n,t,r)}}};(eu=nu||(nu={})).OnFocusMode="onFocus",eu.OnEnterOrSpaceMode="onEnterOrSpace",eu.OnApiMode="onApi";var Nu,ju,Hu,zu,Pu,Lu,Gu,$u,Uu,Wu,_u=function(n,e,t,r,c){var a=function(e,t,n,r,o){var i,u,c=n(e,t,r,o);return(i=c,u=t.event(),In(i,function(n){return n.matches(u)}).map(function(n){return n.classification})).bind(function(n){return n(e,t,r,o)})},o={schema:function(){return n.concat([Fr("focusManager",Vu()),Vr("focusInside","onFocus",br(function(n){return On(["onFocus","onEnterOrSpace","onApi"],n)?dt.value(n):dt.error("Invalid value for focusInside")})),hi("handler",o),hi("state",e),hi("sendFocusIn",c)])},processKey:a,toEvents:function(i,u){var n=i.focusInside!==nu.OnFocusMode?k.none():c(i).map(function(t){return Kr(Jn(),function(n,e){t(n,i,u),e.stop()})});return qr(n.toArray().concat([Kr(P(),function(r,o){a(r,o,t,i,u).fold(function(){var e,t,n;e=r,t=o,n=pu([32].concat([13]))(t.event()),i.focusInside===nu.OnEnterOrSpaceMode&&n&&jr(e,t)&&c(i).each(function(n){n(e,i,u),t.stop()})},function(n){o.stop()})}),Kr(L(),function(n,e){a(n,e,r,i,u).each(function(n){e.stop()})})]))}};return o},Xu=function(n){var e=[Ir("onEscape"),Ir("onEnter"),Fr("selector",'[data-alloy-tabstop="true"]'),Fr("firstTabstop",0),Fr("useTabstopAt",h(!0)),Ir("visibilitySelector")].concat([n]),u=function(n,e){var t=n.visibilitySelector.bind(function(n){return su(e,n)}).getOr(e);return 0<ru(t)},t=function(e,t){var n,r,o,i;(n=e,r=t,o=uu(n.element(),r.selector),i=Cn(o,function(n){return u(r,n)}),k.from(i[r.firstTabstop])).each(function(n){t.focusManager.set(e,n)})},c=function(e,n,t,r,o){return o(n,t,function(n){return u(e=r,t=n)&&e.useTabstopAt(t);var e,t}).fold(function(){return r.cyclic?k.some(!0):k.none()},function(n){return r.focusManager.set(e,n),k.some(!0)})},i=function(e,n,t,r){var o,i,u=uu(e.element(),t.selector);return(o=e,i=t,i.focusManager.get(o).bind(function(n){return su(n,i.selector)})).bind(function(n){return Rn(u,l(We,n)).bind(function(n){return c(e,u,n,t,r)})})},r=h([xu(vu([hu,pu([9])]),function(n,e,t,r){var o=t.cyclic?lu:du;return i(n,0,t,o)}),xu(pu([9]),function(n,e,t,r){var o=t.cyclic?mu:gu;return i(n,0,t,o)}),xu(pu([27]),function(e,t,n,r){return n.onEscape.bind(function(n){return n(e,t)})}),xu(vu([yu,pu([13])]),function(e,t,n,r){return n.onEnter.bind(function(n){return n(e,t)})})]),o=h([]);return _u(e,mo.init,r,o,function(){return k.some(t)})},qu=Xu(Nr("cyclic",h(!1))),Yu=Xu(Nr("cyclic",h(!0))),Ku=function(n){return"input"===Se(n)&&"radio"!==Oo(n,"type")||"textarea"===Se(n)},Ju=function(n,e,t){return Ku(t)&&pu([32])(e.event())?k.none():(pe(n,t,ee()),k.some(!0))},Qu=function(n,e){return k.some(!0)},Zu=[Fr("execute",Ju),Fr("useSpace",!1),Fr("useEnter",!0),Fr("useControlEnter",!1),Fr("useDown",!1)],nc=function(n,e,t){return t.execute(n,e,n.element())},ec=_u(Zu,mo.init,function(n,e,t,r){var o=t.useSpace&&!Ku(n.element())?[32]:[],i=t.useEnter?[13]:[],u=t.useDown?[40]:[],c=o.concat(i).concat(u);return[xu(pu(c),nc)].concat(t.useControlEnter?[xu(vu([bu,pu([13])]),nc)]:[])},function(n,e,t,r){return t.useSpace&&!Ku(n.element())?[xu(pu([32]),Qu)]:[]},function(){return k.none()}),tc=function(n){var t=Ho(k.none());return go({readState:function(){return t.get().map(function(n){return{numRows:n.numRows(),numColumns:n.numColumns()}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,e){t.set(k.some({numRows:h(n),numColumns:h(e)}))},getNumRows:function(){return t.get().map(function(n){return n.numRows()})},getNumColumns:function(){return t.get().map(function(n){return n.numColumns()})}})},rc=/* */Object.freeze({flatgrid:tc,init:function(n){return n.state(n)}}),oc=function(e,t){return function(n){return"rtl"===ic(n)?t:e}},ic=function(n){return"rtl"===qi(n,"direction")?"rtl":"ltr"},uc=function(i){return function(n,e,t,r){var o=i(n.element());return sc(o,n,e,t,r)}},cc=function(n,e){var t=oc(n,e);return uc(t)},ac=function(n,e){var t=oc(e,n);return uc(t)},fc=function(o){return function(n,e,t,r){return sc(o,n,e,t,r)}},sc=function(e,t,n,r,o){return r.focusManager.get(t).bind(function(n){return e(t.element(),n,r,o)}).map(function(n){return r.focusManager.set(t,n),!0})},lc=fc,dc=fc,mc=fc,gc=function(n){var e,t=n.dom();return!((e=t).offsetWidth<=0&&e.offsetHeight<=0)},pc=Be(["index","candidates"],[]),vc=function(n,e,t){return hc(n,e,t)},hc=function(n,e,t,r){var o,i=l(We,e),u=uu(n,t),c=Cn(u,gc);return Rn(o=c,i).map(function(n){return pc({index:n,candidates:o})})},bc=function(n,e){return Rn(n,function(n){return We(e,n)})},yc=function(t,n,r,e){return e(Math.floor(n/r),n%r).bind(function(n){var e=n.row()*r+n.column();return 0<=e&&e<t.length?k.some(t[e]):k.none()})},xc=function(o,n,i,u,c){return yc(o,n,u,function(n,e){var t=n===i-1?o.length-n*u:u,r=wu(e,c,0,t-1);return k.some({row:h(n),column:h(r)})})},wc=function(i,n,u,c,a){return yc(i,n,c,function(n,e){var t=wu(n,a,0,u-1),r=t===u-1?i.length-t*c:c,o=Su(e,0,r-1);return k.some({row:h(t),column:h(o)})})},Sc=[Cr("selector"),Fr("execute",Ju),gi("onEscape"),Fr("captureTab",!1),yi()],Oc=function(e,t,n){fu(e.element(),t.selector).each(function(n){t.focusManager.set(e,n)})},Tc=function(o){return function(n,e,t,r){return vc(n,e,t.selector).bind(function(n){return o(n.candidates(),n.index(),r.getNumRows().getOr(t.initSize.numRows),r.getNumColumns().getOr(t.initSize.numColumns))})}},kc=function(n,e,t,r){return t.captureTab?k.some(!0):k.none()},Ec=Tc(function(n,e,t,r){return xc(n,e,t,r,-1)}),Cc=Tc(function(n,e,t,r){return xc(n,e,t,r,1)}),Dc=Tc(function(n,e,t,r){return wc(n,e,t,r,-1)}),Mc=Tc(function(n,e,t,r){return wc(n,e,t,r,1)}),Ic=h([xu(pu([37]),cc(Ec,Cc)),xu(pu([39]),ac(Ec,Cc)),xu(pu([38]),lc(Dc)),xu(pu([40]),dc(Mc)),xu(vu([hu,pu([9])]),kc),xu(vu([yu,pu([9])]),kc),xu(pu([27]),function(n,e,t,r){return t.onEscape(n,e)}),xu(pu([32].concat([13])),function(e,t,r,n){return(o=e,i=r,i.focusManager.get(o).bind(function(n){return su(n,i.selector)})).bind(function(n){return r.execute(e,t,n)});var o,i})]),Rc=h([xu(pu([32]),Qu)]),Bc=_u(Sc,tc,Ic,Rc,function(){return k.some(Oc)}),Ac=function(n,e,t,i){var u=function(n,e,t){var r,o=wu(e,i,0,t.length-1);return o===n?k.none():(r=t[o],"button"===Se(r)&&"disabled"===Oo(r,"disabled")?u(n,o,t):k.from(t[o]))};return vc(n,t,e).bind(function(n){var e=n.index(),t=n.candidates();return u(e,e,t)})},Fc=[Cr("selector"),Fr("getInitial",k.none),Fr("execute",Ju),gi("onEscape"),Fr("executeOnMove",!1),Fr("allowVertical",!0)],Vc=function(e,t,r){return(n=e,o=r,o.focusManager.get(n).bind(function(n){return su(n,o.selector)})).bind(function(n){return r.execute(e,t,n)});var n,o},Nc=function(e,t){t.getInitial(e).orThunk(function(){return fu(e.element(),t.selector)}).each(function(n){t.focusManager.set(e,n)})},jc=function(n,e,t){return Ac(n,t.selector,e,-1)},Hc=function(n,e,t){return Ac(n,t.selector,e,1)},zc=function(r){return function(n,e,t){return r(n,e,t).bind(function(){return t.executeOnMove?Vc(n,e,t):k.some(!0)})}},Pc=function(n,e,t,r){return t.onEscape(n,e)},Lc=h([xu(pu([32]),Qu)]),Gc=_u(Fc,mo.init,function(n,e,t,r){var o=[37].concat(t.allowVertical?[38]:[]),i=[39].concat(t.allowVertical?[40]:[]);return[xu(pu(o),zc(cc(jc,Hc))),xu(pu(i),zc(ac(jc,Hc))),xu(pu([13]),Vc),xu(pu([32]),Vc),xu(pu([27]),Pc)]},Lc,function(){return k.some(Nc)}),$c=Be(["rowIndex","columnIndex","cell"],[]),Uc=function(n,e,t){return k.from(n[e]).bind(function(n){return k.from(n[t]).map(function(n){return $c({rowIndex:e,columnIndex:t,cell:n})})})},Wc=function(n,e,t,r){var o=n[e].length,i=wu(t,r,0,o-1);return Uc(n,e,i)},_c=function(n,e,t,r){var o=wu(t,r,0,n.length-1),i=n[o].length,u=Su(e,0,i-1);return Uc(n,o,u)},Xc=function(n,e,t,r){var o=n[e].length,i=Su(t+r,0,o-1);return Uc(n,e,i)},qc=function(n,e,t,r){var o=Su(t+r,0,n.length-1),i=n[o].length,u=Su(e,0,i-1);return Uc(n,o,u)},Yc=[Mr("selectors",[Cr("row"),Cr("cell")]),Fr("cycles",!0),Fr("previousSelector",k.none),Fr("execute",Ju)],Kc=function(e,t){t.previousSelector(e).orThunk(function(){var n=t.selectors;return fu(e.element(),n.cell)}).each(function(n){t.focusManager.set(e,n)})},Jc=function(n,e){return function(t,r,i){var u=i.cycles?n:e;return su(r,i.selectors.row).bind(function(n){var e=uu(n,i.selectors.cell);return bc(e,r).bind(function(r){var o=uu(t,i.selectors.row);return bc(o,n).bind(function(n){var e,t=(e=i,kn(o,function(n){return uu(n,e.selectors.cell)}));return u(t,n,r).map(function(n){return n.cell()})})})})}},Qc=Jc(function(n,e,t){return Wc(n,e,t,-1)},function(n,e,t){return Xc(n,e,t,-1)}),Zc=Jc(function(n,e,t){return Wc(n,e,t,1)},function(n,e,t){return Xc(n,e,t,1)}),na=Jc(function(n,e,t){return _c(n,t,e,-1)},function(n,e,t){return qc(n,t,e,-1)}),ea=Jc(function(n,e,t){return _c(n,t,e,1)},function(n,e,t){return qc(n,t,e,1)}),ta=h([xu(pu([37]),cc(Qc,Zc)),xu(pu([39]),ac(Qc,Zc)),xu(pu([38]),lc(na)),xu(pu([40]),dc(ea)),xu(pu([32].concat([13])),function(e,t,r){return Go(e.element()).bind(function(n){return r.execute(e,t,n)})})]),ra=h([xu(pu([32]),Qu)]),oa=_u(Yc,mo.init,ta,ra,function(){return k.some(Kc)}),ia=[Cr("selector"),Fr("execute",Ju),Fr("moveOnTab",!1)],ua=function(e,t,r){return r.focusManager.get(e).bind(function(n){return r.execute(e,t,n)})},ca=function(e,t){fu(e.element(),t.selector).each(function(n){t.focusManager.set(e,n)})},aa=function(n,e,t){return Ac(n,t.selector,e,-1)},fa=function(n,e,t){return Ac(n,t.selector,e,1)},sa=h([xu(pu([38]),mc(aa)),xu(pu([40]),mc(fa)),xu(vu([hu,pu([9])]),function(n,e,t){return t.moveOnTab?mc(aa)(n,e,t):k.none()}),xu(vu([yu,pu([9])]),function(n,e,t){return t.moveOnTab?mc(fa)(n,e,t):k.none()}),xu(pu([13]),ua),xu(pu([32]),ua)]),la=h([xu(pu([32]),Qu)]),da=_u(ia,mo.init,sa,la,function(){return k.some(ca)}),ma=[gi("onSpace"),gi("onEnter"),gi("onShiftEnter"),gi("onLeft"),gi("onRight"),gi("onTab"),gi("onShiftTab"),gi("onUp"),gi("onDown"),gi("onEscape"),Fr("stopSpaceKeyup",!1),Ir("focusIn")],ga=_u(ma,mo.init,function(n,e,t){return[xu(pu([32]),t.onSpace),xu(vu([yu,pu([13])]),t.onEnter),xu(vu([hu,pu([13])]),t.onShiftEnter),xu(vu([hu,pu([9])]),t.onShiftTab),xu(vu([yu,pu([9])]),t.onTab),xu(pu([38]),t.onUp),xu(pu([40]),t.onDown),xu(pu([37]),t.onLeft),xu(pu([39]),t.onRight),xu(pu([32]),t.onSpace),xu(pu([27]),t.onEscape)]},function(n,e,t){return t.stopSpaceKeyup?[xu(pu([32]),Qu)]:[]},function(n){return n.focusIn}),pa=qu.schema(),va=Yu.schema(),ha=Gc.schema(),ba=Bc.schema(),ya=oa.schema(),xa=ec.schema(),wa=da.schema(),Sa=ga.schema(),Oa=(Wu=Sr("Creating behaviour: "+(Nu={branchKey:"mode",branches:/* */Object.freeze({acyclic:pa,cyclic:va,flow:ha,flatgrid:ba,matrix:ya,execution:xa,menu:wa,special:Sa}),name:"keying",active:{events:function(n,e){return n.handler.toEvents(n,e)}},apis:{focusIn:function(e,t,r){t.sendFocusIn(t).fold(function(){e.getSystem().triggerFocus(e.element(),e.element())},function(n){n(e,t,r)})},setGridSize:function(n,e,t,r,o){Ft(t,"setGridSize")?t.setGridSize(r,o):v.console.error("Layout does not support setGridSize")}},state:rc}).name,bo,Nu),ju=Tr(Wu.branchKey,Wu.branches),Hu=Wu.name,zu=Wu.active,Pu=Wu.apis,Lu=Wu.extra,Gu=Wu.state,Uu=Br(Hu,[Rr("config",$u=ju)]),lo($u,Uu,Hu,zu,Pu,Lu,Gu)),Ta=function(r,n){return e=r,t={},o=kn(n,function(n){return e=n.name(),t="Cannot configure "+n.name()+" for "+r,gr(e,e,wt(),ar(function(n){return Ut("The field: "+e+" is forbidden. "+t)}));var e,t}).concat([Nr("dump",b)]),Vr(e,t,sr(o));var e,t,o},ka=function(n){return n.dump},Ea=function(n,e){return y({},n.dump,po(e))},Ca=Ta,Da=Ea,Ma="placeholder",Ia=mt([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Ra=function(n,e,t,r){return t.uiType===Ma?(i=t,u=r,(o=n).exists(function(n){return n!==i.owner})?Ia.single(!0,h(i)):It(u,i.name).fold(function(){throw new Error("Unknown placeholder component: "+i.name+"\nKnown: ["+E(u)+"]\nNamespace: "+o.getOr("none")+"\nSpec: "+er(i,null,2))},function(n){return n.replace()})):Ia.single(!1,h(t));var o,i,u},Ba=function(i,u,c,a){return Ra(i,0,c,a).fold(function(n,e){var t=e(u,c.config,c.validated),r=It(t,"components").getOr([]),o=Vn(r,function(n){return Ba(i,u,n,a)});return[y({},t,{components:o})]},function(n,e){var t=e(u,c.config,c.validated);return c.validated.preprocess.getOr(b)(t)})},Aa=function(e,t,n,r){var o,i,u,c=M(r,function(n,e){return r=n,o=!1,{name:h(t=e),required:function(){return r.fold(function(n,e){return n},function(n,e){return n})},used:function(){return o},replace:function(){if(!0===o)throw new Error("Trying to use the same placeholder more than once: "+t);return o=!0,r}};var t,r,o}),a=(o=e,i=t,u=c,Vn(n,function(n){return Ba(o,i,n,u)}));return D(c,function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+er(t.components,null,2))}),a},Fa=Ia.single,Va=Ia.multiple,Na=h(Ma),ja=0,Ha=function(n){var e=(new Date).getTime();return n+"_"+Math.floor(1e9*Math.random())+ ++ja+String(e)},za=mt([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Pa=Fr("factory",{sketch:b}),La=Fr("schema",[]),Ga=Cr("name"),$a=gr("pname","pname",St(function(n){return"<alloy."+Ha(n.name)+">"}),kr()),Ua=Nr("schema",function(){return[Ir("preprocess")]}),Wa=Fr("defaults",h({})),_a=Fr("overrides",h({})),Xa=sr([Pa,La,Ga,$a,Wa,_a]),qa=sr([Pa,La,Ga,$a,Wa,_a]),Ya=sr([Pa,Ua,Ga,Cr("unit"),$a,Wa,_a]),Ka=function(n){var e=function(n){return n.name};return n.fold(e,e,e,e)},Ja=function(t,r){return function(n){var e=Sr("Converting part type",r,n);return t(e)}},Qa=Ja(za.required,Xa),Za=Ja(za.optional,qa),nf=Ja(za.group,Ya),ef=h("entirety"),tf=function(n,e,t,r){return vt(e.defaults(n,t,r),t,{uid:n.partUids[e.name]},e.overrides(n,t,r))},rf=function(o,n){var i={};return En(n,function(n){var e;(e=n,e.fold(k.some,k.none,k.some,k.some)).each(function(t){var r=of(o,t.pname);i[t.name]=function(n){var e=Sr("Part: "+t.name+" in "+o,sr(t.schema),n);return y({},r,{config:n,validated:e})}})}),i},of=function(n,e){return{uiType:Na(),owner:n,name:e}},uf=function(n,e,t){return r=e,i={},o={},En(t,function(n){n.fold(function(r){i[r.pname]=Fa(!0,function(n,e,t){return r.factory.sketch(tf(n,r,e,t))})},function(n){var e=r.parts[n.name];o[n.name]=h(n.factory.sketch(tf(r,n,e[ef()]),e))},function(r){i[r.pname]=Fa(!1,function(n,e,t){return r.factory.sketch(tf(n,r,e,t))})},function(o){i[o.pname]=Va(!0,function(e,n,t){var r=e[o.name];return kn(r,function(n){return o.factory.sketch(vt(o.defaults(e,n,t),n,o.overrides(e,n)))})})})}),{internals:h(i),externals:h(o)};var r,i,o},cf=function(n,e,t){return Aa(k.some(n),e,e.components,t)},af=function(n,e,t){var r=e.partUids[t];return n.getSystem().getByUid(r).toOption()},ff=function(n,e,t){return af(n,e,t).getOrDie("Could not find part: "+t)},sf=function(e,n){var t=kn(n,Ka);return Bt(kn(t,function(n){return{key:n,value:e+"-"+n}}))},lf=function(e){return gr("partUids","partUids",Ot(function(n){return sf(n.uid,e)}),kr())},df=Ha("alloy-premade"),mf=function(n){return Rt(df,n)},gf=function(r){return n=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return r.apply(undefined,[n.getApis()].concat([n].concat(e)))},e=r.toString(),t=e.indexOf(")")+1,o=e.indexOf("("),i=e.substring(o+1,t-1).split(/,\s*/),n.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:io(i.slice(1))}},n;var n,e,t,o,i},pf=h("alloy-id-"),vf=h("data-alloy-id"),hf=pf(),bf=vf(),yf=function(n,e){Object.defineProperty(n.dom(),bf,{value:e,writable:!0})},xf=function(n){var e=Te(n)?n.dom()[bf]:null;return k.from(e)},wf=function(n){return Ha(n)},Sf=function(n,e,t,r,o){var i,u,c=(u=o,(0<(i=r).length?[Mr("parts",i)]:[]).concat([Cr("uid"),Fr("dom",{}),Fr("components",[]),bi("originalSpec"),Fr("debug.sketcher",{})]).concat(u));return Sr(n+" [SpecSchema]",fr(c.concat(e)),t)},Of=function(n,e,t,r,o){var i=Tf(o),u=Vn(t,function(n){return n.fold(k.none,k.some,k.none,k.none).map(function(n){return Mr(n.name,n.schema.concat([bi(ef())]))}).toArray()}),c=lf(t),a=Sf(n,e,i,u,[c]),f=uf(0,a,t);return r(a,cf(n,a,f.internals()),i,f.externals())},Tf=function(n){return n.hasOwnProperty("uid")?n:y({},n,{uid:wf("uid")})};var kf=fr([Cr("name"),Cr("factory"),Cr("configFields"),Fr("apis",{}),Fr("extraApis",{})]),Ef=fr([Cr("name"),Cr("factory"),Cr("configFields"),Cr("partFields"),Fr("apis",{}),Fr("extraApis",{})]),Cf=function(n){var i=Sr("Sketcher for "+n.name,kf,n),e=M(i.apis,gf),t=M(i.extraApis,function(n,e){return uo(n,e)});return y({name:h(i.name),partFields:h([]),configFields:h(i.configFields),sketch:function(n){return e=i.name,t=i.configFields,r=i.factory,o=Tf(n),r(Sf(e,t,o,[],[]),o);var e,t,r,o}},e,t)},Df=function(n){var e=Sr("Sketcher for "+n.name,Ef,n),t=rf(e.name,e.partFields),r=M(e.apis,gf),o=M(e.extraApis,function(n,e){return uo(n,e)});return y({name:h(e.name),partFields:h(e.partFields),configFields:h(e.configFields),sketch:function(n){return Of(e.name,e.configFields,e.partFields,e.factory,n)},parts:h(t)},r,o)},Mf=Cf({name:"Button",factory:function(n){var e,t,r,o=(e=n.action,t=function(n,e){e.stop(),ge(n)},r=Yn.detect().deviceType.isTouch()?[Kr(re(),t)]:[Kr(U(),t),Kr(N(),function(n,e){e.cut()})],qr(Fn([e.map(function(t){return Kr(ee(),function(n,e){t(n),e.stop()})}).toArray(),r]))),i=n.dom.tag,u=function(e){return It(n.dom,"attributes").bind(function(n){return It(n,e)})};return{uid:n.uid,dom:n.dom,components:n.components,events:o,behaviours:Da(n.buttonBehaviours,[$i.config({}),Oa.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==i)return{role:u("role").getOr("button")};var n=u("type").getOr("button"),e=u("role").map(function(n){return{role:n}}).getOr({});return y({type:n},e)}()},eventOrder:n.eventOrder}},configFields:[Fr("uid",undefined),Cr("dom"),Fr("components",[]),Ca("buttonBehaviours",[$i,Oa]),Ir("action"),Ir("role"),Fr("eventOrder",{})]}),If=ho({fields:[],name:"unselecting",active:/* */Object.freeze({events:function(n){return qr([Yr(_(),h(!0))])},exhibit:function(n,e){return co({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Rf=function(n){var e,t,r,o=be.fromHtml(n),i=qe(o),u=(t=(e=o).dom().attributes!==undefined?e.dom().attributes:[],Mn(t,function(n,e){var t;return"class"===e.name?n:y({},n,((t={})[e.name]=e.value,t))},{})),c=(r=o,Array.prototype.slice.call(r.dom().classList,0)),a=0===i.length?{}:{innerHtml:Xo(o)};return y({tag:Se(o),classes:c,attributes:u},a)},Bf=function(n){var e,o,t=(e=n,o={prefix:Hi.prefix()},e.replace(/\$\{([^{}]*)\}/g,function(n,e){var t,r=o[e];return"string"==(t=typeof r)||"number"===t?r.toString():n}));return Rf(t)},Af=function(n){return{dom:Bf(n)}},Ff=function(n){return po([Ai.config({toggleClass:Hi.resolve("toolbar-button-selected"),toggleOnExecute:!1,aria:{mode:"pressed"}}),Fi(n,function(n,e){(e?Ai.on:Ai.off)(n)})])},Vf=function(n,e){var t=e.ui.registry.getAll().icons;return k.from(t[n]).fold(function(){return Bf('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item ${prefix}-icon-'+n+' ${prefix}-icon"></span>')},function(n){return Bf('<span class="${prefix}-toolbar-button ${prefix}-toolbar-group-item">'+n+"</span>")})},Nf=function(n,e,t,r){return Mf.sketch({dom:Vf(n,r),action:e,buttonBehaviours:vt(po([If.config({})]),t)})},jf={forToolbar:Nf,forToolbarCommand:function(n,e){return Nf(e,function(){n.execCommand(e)},{},n)},forToolbarStateAction:function(n,e,t,r){var o=Ff(t);return Nf(e,r,o,n)},forToolbarStateCommand:function(n,e){var t=Ff(e);return Nf(e,function(){n.execCommand(e)},t,n)},getToolbarIconButton:Vf},Hf=Yn.detect().deviceType.isTouch(),zf=Za({schema:[Cr("dom")],name:"label"}),Pf=function(n){return Za({name:n+"-edge",overrides:function(r){return r.model.manager.edgeActions[n].fold(function(){return{}},function(t){var n=qr([Jr(A(),t,[r])]),e=qr([Jr(N(),t,[r]),Jr(j(),function(n,e){e.mouseIsDown.get()&&t(n,e)},[r])]);return{events:Hf?n:e}})}})},Lf=Pf("top-left"),Gf=Pf("top"),$f=Pf("top-right"),Uf=Pf("right"),Wf=Pf("bottom-right"),_f=Pf("bottom"),Xf=Pf("bottom-left"),qf=[zf,Pf("left"),Uf,Gf,_f,Lf,$f,Xf,Wf,Qa({name:"thumb",defaults:h({dom:{styles:{position:"absolute"}}}),overrides:function(n){return{events:qr([Zr(A(),n,"spectrum"),Zr(F(),n,"spectrum"),Zr(V(),n,"spectrum"),Zr(N(),n,"spectrum"),Zr(j(),n,"spectrum"),Zr(H(),n,"spectrum")])}}}),Qa({schema:[Nr("mouseIsDown",function(){return Ho(!1)})],name:"spectrum",overrides:function(t){var r=t.model.manager,o=function(e,n){return r.getValueFromEvent(n).map(function(n){return r.setValueFrom(e,t,n)})},n=qr([Kr(A(),o),Kr(F(),o)]),e=qr([Kr(N(),o),Kr(j(),function(n,e){t.mouseIsDown.get()&&o(n,e)})]);return{behaviours:po(Hf?[]:[Oa.config({mode:"special",onLeft:function(n){return r.onLeft(n,t)},onRight:function(n){return r.onRight(n,t)},onUp:function(n){return r.onUp(n,t)},onDown:function(n){return r.onDown(n,t)}}),$i.config({})]),events:Hf?n:e}}})],Yf=function(n,e,t){e.store.manager.onLoad(n,e,t)},Kf=function(n,e,t){e.store.manager.onUnload(n,e,t)},Jf=/* */Object.freeze({onLoad:Yf,onUnload:Kf,setValue:function(n,e,t,r){e.store.manager.setValue(n,e,t,r)},getValue:function(n,e,t){return e.store.manager.getValue(n,e,t)},getState:function(n,e,t){return t}}),Qf=/* */Object.freeze({events:function(t,r){var n=t.resetOnDom?[eo(function(n,e){Yf(n,t,r)}),to(function(n,e){Kf(n,t,r)})]:[ao(t,r,Yf)];return qr(n)}}),Zf=function(){var n=Ho(null);return go({set:n.set,get:n.get,isNotSet:function(){return null===n.get()},clear:function(){n.set(null)},readState:function(){return{mode:"memory",value:n.get()}}})},ns=function(){var i=Ho({}),u=Ho({});return go({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(n){return It(i.get(),n).orThunk(function(){return It(u.get(),n)})},update:function(n){var e=i.get(),t=u.get(),r={},o={};En(n,function(e){r[e.value]=e,It(e,"meta").each(function(n){It(n,"text").each(function(n){o[n]=e})})}),i.set(y({},e,r)),u.set(y({},t,o))},clear:function(){i.set({}),u.set({})}})},es=/* */Object.freeze({memory:Zf,dataset:ns,manual:function(){return go({readState:function(){}})},init:function(n){return n.store.manager.state(n)}}),ts=function(n,e,t,r){var o=e.store;t.update([r]),o.setValue(n,r),e.onSetValue(n,r)},rs=[Ir("initialValue"),Cr("getFallbackEntry"),Cr("getDataKey"),Cr("setValue"),hi("manager",{setValue:ts,getValue:function(n,e,t){var r=e.store,o=r.getDataKey(n);return t.lookup(o).fold(function(){return r.getFallbackEntry(o)},function(n){return n})},onLoad:function(e,t,r){t.store.initialValue.each(function(n){ts(e,t,r,n)})},onUnload:function(n,e,t){t.clear()},state:ns})],os=[Cr("getValue"),Fr("setValue",x),Ir("initialValue"),hi("manager",{setValue:function(n,e,t,r){e.store.setValue(n,r),e.onSetValue(n,r)},getValue:function(n,e,t){return e.store.getValue(n)},onLoad:function(e,t,n){t.store.initialValue.each(function(n){t.store.setValue(e,n)})},onUnload:x,state:mo.init})],is=[Ir("initialValue"),hi("manager",{setValue:function(n,e,t,r){t.set(r),e.onSetValue(n,r)},getValue:function(n,e,t){return t.get()},onLoad:function(n,e,t){e.store.initialValue.each(function(n){t.isNotSet()&&t.set(n)})},onUnload:function(n,e,t){t.clear()},state:Zf})],us=[Vr("store",{mode:"memory"},Tr("mode",{memory:is,manual:os,dataset:rs})),mi("onSetValue"),Fr("resetOnDom",!1)],cs=ho({fields:us,name:"representing",active:Qf,apis:Jf,extra:{setValueFrom:function(n,e){var t=cs.getValue(e);cs.setValue(n,t)}},state:es}),as=function(t,r){return{left:h(t),top:h(r),translate:function(n,e){return as(t+n,r+e)}}},fs=as,ss=Yn.detect().deviceType.isTouch(),ls=h("slider.change.value"),ds=function(n){var e=n.event().raw();if(ss){var t=e;return t.touches!==undefined&&1===t.touches.length?k.some(t.touches[0]).map(function(n){return fs(n.clientX,n.clientY)}):k.none()}var r=e;return r.clientX!==undefined?k.some(r).map(function(n){return fs(n.clientX,n.clientY)}):k.none()},ms=function(n,e,t,r){return n<e?n:t<n?t:n===e?e-1:Math.max(e,n-r)},gs=function(n,e,t,r){return t<n?n:n<e?e:n===t?t+1:Math.min(t,n+r)},ps=function(n,e,t){return Math.max(e,Math.min(t,n))},vs=function(n){var e=n.min,t=n.max,r=n.range,o=n.value,i=n.step,u=n.snap,c=n.snapStart,a=n.rounded,f=n.hasMinEdge,s=n.hasMaxEdge,l=n.minBound,d=n.maxBound,m=n.screenRange,g=f?e-1:e,p=s?t+1:t;if(o<l)return g;if(d<o)return p;var v,h,b,y,x,w,S,O=(x=o,w=l,S=d,Math.min(S,Math.max(x,w))-w),T=ps(O/m*r+e,g,p);return u&&e<=T&&T<=t?(v=T,h=e,b=t,y=i,c.fold(function(){var n=v-h,e=Math.round(n/y)*y;return ps(h+e,h-1,b+1)},function(n){var e=(v-n)%y,t=Math.round(e/y),r=Math.floor((v-n)/y),o=Math.floor((b-n)/y),i=n+Math.min(o,r+t)*y;return Math.max(n,i)})):a?Math.round(T):T},hs=function(n){var e=n.min,t=n.max,r=n.range,o=n.value,i=n.hasMinEdge,u=n.hasMaxEdge,c=n.maxBound,a=n.maxOffset,f=n.centerMinEdge,s=n.centerMaxEdge;return o<e?i?0:f:t<o?u?c:s:(o-e)/r*a},bs=Zi("width",function(n){return n.dom().offsetWidth}),ys=function(n,e){bs.set(n,e)},xs=function(n){return bs.get(n)},ws=function(n){return n.model.minX},Ss=function(n){return n.model.minY},Os=function(n){return n.model.minX-1},Ts=function(n){return n.model.minY-1},ks=function(n){return n.model.maxX},Es=function(n){return n.model.maxY},Cs=function(n){return n.model.maxX+1},Ds=function(n){return n.model.maxY+1},Ms=function(n,e,t){return e(n)-t(n)},Is=function(n){return Ms(n,ks,ws)},Rs=function(n){return Ms(n,Es,Ss)},Bs=function(n){return Is(n)/2},As=function(n){return Rs(n)/2},Fs=function(n){return n.stepSize},Vs=function(n){return n.snapToGrid},Ns=function(n){return n.snapStart},js=function(n){return n.rounded},Hs=function(n,e){return n[e+"-edge"]!==undefined},zs=function(n){return Hs(n,"left")},Ps=function(n){return Hs(n,"right")},Ls=function(n){return Hs(n,"top")},Gs=function(n){return Hs(n,"bottom")},$s=function(n){return n.model.value.get()},Us=function(n){return{x:h(n)}},Ws=function(n){return{y:h(n)}},_s=function(n,e){return{x:h(n),y:h(e)}},Xs=function(n,e){me(n,ls(),{value:e})},qs="left",Ys=function(n){return n.element().dom().getBoundingClientRect()},Ks=function(n,e){return n[e]},Js=function(n){var e=Ys(n);return Ks(e,qs)},Qs=function(n){var e=Ys(n);return Ks(e,"right")},Zs=function(n){var e=Ys(n);return Ks(e,"top")},nl=function(n){var e=Ys(n);return Ks(e,"bottom")},el=function(n){var e=Ys(n);return Ks(e,"width")},tl=function(n){var e=Ys(n);return Ks(e,"height")},rl=function(n,e,t){return(n+e)/2-t},ol=function(n,e){var t=Ys(n),r=Ys(e),o=Ks(t,qs),i=Ks(t,"right"),u=Ks(r,qs);return rl(o,i,u)},il=function(n,e){var t=Ys(n),r=Ys(e),o=Ks(t,"top"),i=Ks(t,"bottom"),u=Ks(r,"top");return rl(o,i,u)},ul=function(n,e){me(n,ls(),{value:e})},cl=function(n){return{x:h(n)}},al=function(n,e,t){var r={min:ws(e),max:ks(e),range:Is(e),value:t,step:Fs(e),snap:Vs(e),snapStart:Ns(e),rounded:js(e),hasMinEdge:zs(e),hasMaxEdge:Ps(e),minBound:Js(n),maxBound:Qs(n),screenRange:el(n)};return vs(r)},fl=function(u){return function(n,e){return(t=u,r=n,o=e,i=(0<t?gs:ms)($s(o).x(),ws(o),ks(o),Fs(o)),ul(r,cl(i)),k.some(i)).map(function(){return!0});var t,r,o,i}},sl=function(n,e,t,r,o,i){var u,c,a,f,s,l,d,m,g,p=(c=i,a=t,f=r,s=o,l=el(u=e),d=f.bind(function(n){return k.some(ol(n,u))}).getOr(0),m=s.bind(function(n){return k.some(ol(n,u))}).getOr(l),g={min:ws(c),max:ks(c),range:Is(c),value:a,hasMinEdge:zs(c),hasMaxEdge:Ps(c),minBound:Js(u),minOffset:0,maxBound:Qs(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},hs(g));return Js(e)-Js(n)+p},ll=fl(-1),dl=fl(1),ml=k.none,gl=k.none,pl={"top-left":k.none(),top:k.none(),"top-right":k.none(),right:k.some(function(n,e){Xs(n,Us(Cs(e)))}),"bottom-right":k.none(),bottom:k.none(),"bottom-left":k.none(),left:k.some(function(n,e){Xs(n,Us(Os(e)))})},vl=/* */Object.freeze({setValueFrom:function(n,e,t){var r=al(n,e,t),o=cl(r);return ul(n,o),r},setToMin:function(n,e){var t=ws(e);ul(n,cl(t))},setToMax:function(n,e){var t=ks(e);ul(n,cl(t))},findValueOfOffset:al,getValueFromEvent:function(n){return ds(n).map(function(n){return n.left()})},findPositionOfValue:sl,setPositionFromValue:function(n,e,t,r){var o=$s(t),i=sl(n,r.getSpectrum(n),o.x(),r.getLeftEdge(n),r.getRightEdge(n),t),u=xs(e.element())/2;_i(e.element(),"left",i-u+"px")},onLeft:ll,onRight:dl,onUp:ml,onDown:gl,edgeActions:pl}),hl=function(n,e){me(n,ls(),{value:e})},bl=function(n){return{y:h(n)}},yl=function(n,e,t){var r={min:Ss(e),max:Es(e),range:Rs(e),value:t,step:Fs(e),snap:Vs(e),snapStart:Ns(e),rounded:js(e),hasMinEdge:Ls(e),hasMaxEdge:Gs(e),minBound:Zs(n),maxBound:nl(n),screenRange:tl(n)};return vs(r)},xl=function(u){return function(n,e){return(t=u,r=n,o=e,i=(0<t?gs:ms)($s(o).y(),Ss(o),Es(o),Fs(o)),hl(r,bl(i)),k.some(i)).map(function(){return!0});var t,r,o,i}},wl=function(n,e,t,r,o,i){var u,c,a,f,s,l,d,m,g,p=(c=i,a=t,f=r,s=o,l=tl(u=e),d=f.bind(function(n){return k.some(il(n,u))}).getOr(0),m=s.bind(function(n){return k.some(il(n,u))}).getOr(l),g={min:Ss(c),max:Es(c),range:Rs(c),value:a,hasMinEdge:Ls(c),hasMaxEdge:Gs(c),minBound:Zs(u),minOffset:0,maxBound:nl(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},hs(g));return Zs(e)-Zs(n)+p},Sl=k.none,Ol=k.none,Tl=xl(-1),kl=xl(1),El={"top-left":k.none(),top:k.some(function(n,e){Xs(n,Ws(Ts(e)))}),"top-right":k.none(),right:k.none(),"bottom-right":k.none(),bottom:k.some(function(n,e){Xs(n,Ws(Ds(e)))}),"bottom-left":k.none(),left:k.none()},Cl=/* */Object.freeze({setValueFrom:function(n,e,t){var r=yl(n,e,t),o=bl(r);return hl(n,o),r},setToMin:function(n,e){var t=Ss(e);hl(n,bl(t))},setToMax:function(n,e){var t=Es(e);hl(n,bl(t))},findValueOfOffset:yl,getValueFromEvent:function(n){return ds(n).map(function(n){return n.top()})},findPositionOfValue:wl,setPositionFromValue:function(n,e,t,r){var o=$s(t),i=wl(n,r.getSpectrum(n),o.y(),r.getTopEdge(n),r.getBottomEdge(n),t),u=ru(e.element())/2;_i(e.element(),"top",i-u+"px")},onLeft:Sl,onRight:Ol,onUp:Tl,onDown:kl,edgeActions:El}),Dl=function(n,e){me(n,ls(),{value:e})},Ml=function(n,e){return{x:h(n),y:h(e)}},Il=function(f,s){return function(n,e){return(t=f,r=s,o=n,i=e,u=0<t?gs:ms,c=r?$s(i).x():u($s(i).x(),ws(i),ks(i),Fs(i)),a=r?u($s(i).y(),Ss(i),Es(i),Fs(i)):$s(i).y(),Dl(o,Ml(c,a)),k.some(c)).map(function(){return!0});var t,r,o,i,u,c,a}},Rl=Il(-1,!1),Bl=Il(1,!1),Al=Il(-1,!0),Fl=Il(1,!0),Vl={"top-left":k.some(function(n,e){Xs(n,_s(Os(e),Ts(e)))}),top:k.some(function(n,e){Xs(n,_s(Bs(e),Ts(e)))}),"top-right":k.some(function(n,e){Xs(n,_s(Cs(e),Ts(e)))}),right:k.some(function(n,e){Xs(n,_s(Cs(e),As(e)))}),"bottom-right":k.some(function(n,e){Xs(n,_s(Cs(e),Ds(e)))}),bottom:k.some(function(n,e){Xs(n,_s(Bs(e),Ds(e)))}),"bottom-left":k.some(function(n,e){Xs(n,_s(Os(e),Ds(e)))}),left:k.some(function(n,e){Xs(n,_s(Os(e),As(e)))})},Nl=/* */Object.freeze({setValueFrom:function(n,e,t){var r=al(n,e,t.left()),o=yl(n,e,t.top()),i=Ml(r,o);return Dl(n,i),i},setToMin:function(n,e){var t=ws(e),r=Ss(e);Dl(n,Ml(t,r))},setToMax:function(n,e){var t=ks(e),r=Es(e);Dl(n,Ml(t,r))},getValueFromEvent:function(n){return ds(n)},setPositionFromValue:function(n,e,t,r){var o=$s(t),i=sl(n,r.getSpectrum(n),o.x(),r.getLeftEdge(n),r.getRightEdge(n),t),u=wl(n,r.getSpectrum(n),o.y(),r.getTopEdge(n),r.getBottomEdge(n),t),c=xs(e.element())/2,a=ru(e.element())/2;_i(e.element(),"left",i-c+"px"),_i(e.element(),"top",u-a+"px")},onLeft:Rl,onRight:Bl,onUp:Al,onDown:Fl,edgeActions:Vl}),jl=Yn.detect().deviceType.isTouch(),Hl=[Fr("stepSize",1),Fr("onChange",x),Fr("onChoose",x),Fr("onInit",x),Fr("onDragStart",x),Fr("onDragEnd",x),Fr("snapToGrid",!1),Fr("rounded",!0),Ir("snapStart"),Dr("model",Tr("mode",{x:[Fr("minX",0),Fr("maxX",100),Nr("value",function(n){return Ho(n.mode.minX)}),Cr("getInitialValue"),hi("manager",vl)],y:[Fr("minY",0),Fr("maxY",100),Nr("value",function(n){return Ho(n.mode.minY)}),Cr("getInitialValue"),hi("manager",Cl)],xy:[Fr("minX",0),Fr("maxX",100),Fr("minY",0),Fr("maxY",100),Nr("value",function(n){return Ho({x:h(n.mode.minX),y:h(n.mode.minY)})}),Cr("getInitialValue"),hi("manager",Nl)]})),Ta("sliderBehaviours",[Oa,cs])].concat(jl?[]:[Nr("mouseIsDown",function(){return Ho(!1)})]),zl=Yn.detect().deviceType.isTouch(),Pl=Df({name:"Slider",configFields:Hl,partFields:qf,factory:function(i,n,e,t){var u=function(n){return ff(n,i,"thumb")},c=function(n){return ff(n,i,"spectrum")},r=function(n){return af(n,i,"left-edge")},o=function(n){return af(n,i,"right-edge")},a=function(n){return af(n,i,"top-edge")},f=function(n){return af(n,i,"bottom-edge")},s=i.model,l=s.manager,d=function(n,e){l.setPositionFromValue(n,e,i,{getLeftEdge:r,getRightEdge:o,getTopEdge:a,getBottomEdge:f,getSpectrum:c})},m=function(n,e){s.value.set(e);var t=u(n);return d(n,t),i.onChange(n,t,e),k.some(!0)},g=[Kr(A(),function(n,e){i.onDragStart(n,u(n))}),Kr(V(),function(n,e){i.onDragEnd(n,u(n))})],p=[Kr(N(),function(n,e){e.stop(),i.onDragStart(n,u(n)),i.mouseIsDown.set(!0)}),Kr(H(),function(n,e){i.onDragEnd(n,u(n))})],v=zl?g:p;return{uid:i.uid,dom:i.dom,components:n,behaviours:Ea(i.sliderBehaviours,Fn([zl?[]:[Oa.config({mode:"special",focusIn:function(n){return af(n,i,"spectrum").map(Oa.focusIn).map(h(!0))}})],[cs.config({store:{mode:"manual",getValue:function(n){return s.value.get()}}}),wi.config({channels:{"mouse.released":{onReceive:function(t,n){var e=i.mouseIsDown.get();i.mouseIsDown.set(!1),e&&af(t,i,"thumb").each(function(n){var e=s.value.get();i.onChoose(t,n,e)})}}}})]])),events:qr([Kr(ls(),function(n,e){m(n,e.event().value())}),eo(function(n,e){var t=s.getInitialValue();s.value.set(t);var r=u(n);d(n,r);var o=c(n);i.onInit(n,r,o,s.value.get())})].concat(v)),apis:{resetToMin:function(n){l.setToMin(n,i)},resetToMax:function(n){l.setToMax(n,i)},changeValue:m,refresh:d},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(n,e){n.resetToMin(e)},resetToMax:function(n,e){n.resetToMax(e)},refresh:function(n,e){n.refresh(e)}}}),Ll=function(e,t,r,n){return jf.forToolbar(t,function(){var n=r();e.setContextToolbar([{label:t+" group",items:n}])},{},n)},Gl=function(n){return[(o=n,i=function(n){return n<0?"black":360<n?"white":"hsl("+n+", 100%, 50%)"},Pl.sketch({dom:Bf('<div class="${prefix}-slider ${prefix}-hue-slider-container"></div>'),components:[Pl.parts()["left-edge"](Af('<div class="${prefix}-hue-slider-black"></div>')),Pl.parts().spectrum({dom:Bf('<div class="${prefix}-slider-gradient-container"></div>'),components:[Af('<div class="${prefix}-slider-gradient"></div>')],behaviours:po([Ai.config({toggleClass:Hi.resolve("thumb-active")})])}),Pl.parts()["right-edge"](Af('<div class="${prefix}-hue-slider-white"></div>')),Pl.parts().thumb({dom:Bf('<div class="${prefix}-slider-thumb"></div>'),behaviours:po([Ai.config({toggleClass:Hi.resolve("thumb-active")})])})],onChange:function(n,e,t){var r=i(t.x());_i(e.element(),"background-color",r),o.onChange(n,e,r)},onDragStart:function(n,e){Ai.on(e)},onDragEnd:function(n,e){Ai.off(e)},onInit:function(n,e,t,r){var o=i(r.x());_i(e.element(),"background-color",o)},stepSize:10,model:{mode:"x",minX:0,maxX:360,getInitialValue:function(){return{x:function(){return o.getInitialValue()}}}},sliderBehaviours:po([Vi(Pl.refresh)])}))];var o,i},$l=function(n,r){var e={onChange:function(n,e,t){r.undoManager.transact(function(){r.formatter.apply("forecolor",{value:t}),r.nodeChanged()})},getInitialValue:function(){return-1}};return Ll(n,"color-levels",function(){return Gl(e)},r)},Ul=fr([Cr("getInitialValue"),Cr("onChange"),Cr("category"),Cr("sizes")]),Wl=function(n){var i=Sr("SizeSlider",Ul,n);return Pl.sketch({dom:{tag:"div",classes:[Hi.resolve("slider-"+i.category+"-size-container"),Hi.resolve("slider"),Hi.resolve("slider-size-container")]},onChange:function(n,e,t){var r,o=t.x();0<=(r=o)&&r<i.sizes.length&&i.onChange(o)},onDragStart:function(n,e){Ai.on(e)},onDragEnd:function(n,e){Ai.off(e)},model:{mode:"x",minX:0,maxX:i.sizes.length-1,getInitialValue:function(){return{x:function(){return i.getInitialValue()}}}},stepSize:1,snapToGrid:!0,sliderBehaviours:po([Vi(Pl.refresh)]),components:[Pl.parts().spectrum({dom:Bf('<div class="${prefix}-slider-size-container"></div>'),components:[Af('<div class="${prefix}-slider-size-line"></div>')]}),Pl.parts().thumb({dom:Bf('<div class="${prefix}-slider-thumb"></div>'),behaviours:po([Ai.config({toggleClass:Hi.resolve("thumb-active")})])})]})},_l=["9px","10px","11px","12px","14px","16px","18px","20px","24px","32px","36px"],Xl=function(n){var e,t,r=n.selection.getStart(),o=be.fromDom(r),i=be.fromDom(n.getBody()),u=(e=function(n){return We(i,n)},(Te(t=o)?k.some(t):Xe(t)).map(function(n){return Wr(n,function(n){return Ki(n,"font-size").isSome()},e).bind(function(n){return Ki(n,"font-size")}).getOrThunk(function(){return qi(n,"font-size")})}).getOr(""));return In(_l,function(n){return u===n}).getOr("medium")},ql={candidates:h(_l),get:function(n){var e,t=Xl(n);return(e=t,Rn(_l,function(n){return n===e})).getOr(2)},apply:function(r,n){var e;(e=n,k.from(_l[e])).each(function(n){var e,t;t=n,Xl(e=r)!==t&&e.execCommand("fontSize",!1,t)})}},Yl=ql.candidates(),Kl=function(n){return[Af('<span class="${prefix}-toolbar-button ${prefix}-icon-small-font ${prefix}-icon"></span>'),(e=n,Wl({onChange:e.onChange,sizes:Yl,category:"font",getInitialValue:e.getInitialValue})),Af('<span class="${prefix}-toolbar-button ${prefix}-icon-large-font ${prefix}-icon"></span>')];var e},Jl=function(n){var e=function t(n){return n.uid!==undefined}(n)&&Ft(n,"uid")?n.uid:wf("memento");return{get:function(n){return n.getSystem().getByUid(e).getOrDie()},getOpt:function(n){return n.getSystem().getByUid(e).fold(k.none,k.some)},asSpec:function(){return y({},n,{uid:e})}}};var Ql=window.Promise?window.Promise:function(){var i=function(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(n,r(o,this),r(c,this))},n=i.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(n){v.setTimeout(n,1)};function r(n,e){return function(){return n.apply(e,arguments)}}var t=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};function u(r){var o=this;null!==this._state?n(function(){var n=o._state?r.onFulfilled:r.onRejected;if(null!==n){var e;try{e=n(o._value)}catch(t){return void r.reject(t)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(n){try{if(n===this)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void s(r(e,n),r(o,this),r(c,this))}this._state=!0,this._value=n,a.call(this)}catch(t){c.call(this,t)}}function c(n){this._state=!1,this._value=n,a.call(this)}function a(){for(var n=0,e=this._deferreds;n<e.length;n++){var t=e[n];u.call(this,t)}this._deferreds=[]}function f(n,e,t,r){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof e?e:null,this.resolve=t,this.reject=r}function s(n,e,t){var r=!1;try{n(function(n){r||(r=!0,e(n))},function(n){r||(r=!0,t(n))})}catch(o){if(r)return;r=!0,t(o)}}return i.prototype["catch"]=function(n){return this.then(null,n)},i.prototype.then=function(t,r){var o=this;return new i(function(n,e){u.call(o,new f(t,r,n,e))})},i.all=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var a=Array.prototype.slice.call(1===n.length&&t(n[0])?n[0]:n);return new i(function(o,i){if(0===a.length)return o([]);var u=a.length;function c(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if("function"==typeof t)return void t.call(n,function(n){c(e,n)},i)}a[e]=n,0==--u&&o(a)}catch(r){i(r)}}for(var n=0;n<a.length;n++)c(n,a[n])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(n){n(e)})},i.reject=function(t){return new i(function(n,e){e(t)})},i.race=function(o){return new i(function(n,e){for(var t=0,r=o;t<r.length;t++)r[t].then(n,e)})},i}();function Zl(r){return new Ql(function(n){var e=function t(){return new(Ve.getOrDie("FileReader"))}();e.onloadend=function(){n(e.result)},e.readAsDataURL(r)})}var nd,ed,td=function(n){return function e(n){return Zl(n).then(function(n){return n.split(",")[1]})}(n)},rd=function(u){var e=Jl({dom:{tag:"input",attributes:{accept:"image/*",type:"file",title:""},styles:{visibility:"hidden",position:"absolute"}},events:qr([no(U()),Kr($(),function(n,e){var t,r,o;(t=e,r=t.event(),o=r.raw().target.files||r.raw().dataTransfer.files,k.from(o[0])).each(function(n){var o,i;o=u,td(i=n).then(function(r){o.undoManager.transact(function(){var n=o.editorUpload.blobCache,e=n.create(Ha("mceu"),i,r);n.add(e);var t=o.dom.createHTML("img",{src:e.blobUri()});o.insertContent(t)})})})})])});return Mf.sketch({dom:jf.getToolbarIconButton("image",u),components:[e.asSpec()],action:function(n){e.get(n).element().dom().click()}})},od=function(n){return n.dom().textContent},id=function(n){return 0<n.length},ud=function(n){return n===undefined||null===n?"":n},cd=function(e,t,n){return n.text.toOption().filter(id).fold(function(){return Oo(n=e,"href")===od(n)?k.some(t):k.none();var n},k.some)},ad=function(n){var e=be.fromDom(n.selection.getStart());return su(e,"a")},fd={getInfo:function(n){return ad(n).fold(function(){return{url:"",text:n.selection.getContent({format:"text"}),title:"",target:"",link:k.none()}},function(n){return t=od(e=n),r=Oo(e,"href"),o=Oo(e,"title"),i=Oo(e,"target"),{url:ud(r),text:t!==r?ud(t):"",title:ud(o),target:ud(i),link:k.some(e)};var e,t,r,o,i})},applyInfo:function(o,i){i.url.toOption().filter(id).fold(function(){var e;e=o,i.link.bind(b).each(function(n){e.execCommand("unlink")})},function(e){var n,t,r=(n=i,(t={}).href=e,n.title.toOption().filter(id).each(function(n){t.title=n}),n.target.toOption().filter(id).each(function(n){t.target=n}),t);i.link.bind(b).fold(function(){var n=i.text.toOption().filter(id).getOr(e);o.insertContent(o.dom.createHTML("a",r,o.dom.encode(n)))},function(t){var n=cd(t,e,i);So(t,r),n.each(function(n){var e;e=n,t.dom().textContent=e})})})},query:ad},sd=Yn.detect(),ld=function(n,e){var t=e.selection.getRng();n(),e.selection.setRng(t)},dd=function(n,e){(sd.os.isAndroid()?ld:f)(e,n)},md=function(n,e){var t,r;return{key:n,value:{config:{},me:(t=n,r=qr(e),ho({fields:[Cr("enabled")],name:t,active:{events:h(r)}})),configAsRaw:h({}),initialConfig:{},state:mo}}},gd=/* */Object.freeze({getCurrent:function(n,e,t){return e.find(n)}}),pd=[Cr("find")],vd=ho({fields:pd,name:"composing",apis:gd}),hd=Cf({name:"Container",factory:function(n){var e=n.dom,t=e.attributes,r=a(e,["attributes"]);return{uid:n.uid,dom:y({tag:"div",attributes:y({role:"presentation"},t)},r),components:n.components,behaviours:ka(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[Fr("components",[]),Ta("containerBehaviours",[]),Fr("events",{}),Fr("domModification",{}),Fr("eventOrder",{})]}),bd=Cf({name:"DataField",factory:function(t){return{uid:t.uid,dom:t.dom,behaviours:Da(t.dataBehaviours,[cs.config({store:{mode:"memory",initialValue:t.getInitialValue()}}),vd.config({find:k.some})]),events:qr([eo(function(n,e){cs.setValue(n,t.getInitialValue())})])}},configFields:[Cr("uid"),Cr("dom"),Cr("getInitialValue"),Ca("dataBehaviours",[cs,vd])]}),yd=function(n){return n.dom().value},xd=function(n,e){if(e===undefined)throw new Error("Value.set was undefined");n.dom().value=e},wd=h([Ir("data"),Fr("inputAttributes",{}),Fr("inputStyles",{}),Fr("tag","input"),Fr("inputClasses",[]),mi("onSetValue"),Fr("styles",{}),Fr("eventOrder",{}),Ta("inputBehaviours",[cs,$i]),Fr("selectOnFocus",!0)]),Sd=function(n){return y({},(e=n,po([$i.config({onFocus:!1===e.selectOnFocus?x:function(n){var e=n.element(),t=yd(e);e.dom().setSelectionRange(0,t.length)}})])),Ea(n.inputBehaviours,[cs.config({store:{mode:"manual",initialValue:n.data.getOr(undefined),getValue:function(n){return yd(n.element())},setValue:function(n,e){yd(n.element())!==e&&xd(n.element(),e)}},onSetValue:n.onSetValue})]));var e},Od=Cf({name:"Input",configFields:wd(),factory:function(n,e){return{uid:n.uid,dom:(t=n,{tag:t.tag,attributes:y({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}),components:[],behaviours:Sd(n),eventOrder:n.eventOrder};var t}}),Td=/* */Object.freeze({exhibit:function(n,e){return co({attributes:Bt([{key:e.tabAttr,value:"true"}])})}}),kd=[Fr("tabAttr","data-alloy-tabstop")],Ed=ho({fields:kd,name:"tabstopping",active:Td}),Cd=tinymce.util.Tools.resolve("tinymce.util.I18n"),Dd=function(n,e){var t=Jl(Od.sketch({inputAttributes:{placeholder:Cd.translate(e)},onSetValue:function(n,e){de(n,G())},inputBehaviours:po([vd.config({find:k.some}),Ed.config({}),Oa.config({mode:"execution"})]),selectOnFocus:!1})),r=Jl(Mf.sketch({dom:Bf('<button class="${prefix}-input-container-x ${prefix}-icon-cancel-circle ${prefix}-icon"></button>'),action:function(n){var e=t.get(n);cs.setValue(e,"")}}));return{name:n,spec:hd.sketch({dom:Bf('<div class="${prefix}-input-container"></div>'),components:[t.asSpec(),r.asSpec()],containerBehaviours:po([Ai.config({toggleClass:Hi.resolve("input-container-empty")}),vd.config({find:function(n){return k.some(t.get(n))}}),md("input-clearing",[Kr(G(),function(n){var e=t.get(n);(0<cs.getValue(e).length?Ai.off:Ai.on)(n)})])])})}},Md=["input","button","textarea"],Id=function(n,e,t){e.disabled&&Nd(n,e)},Rd=function(n){return On(Md,Se(n.element()))},Bd=function(n){wo(n.element(),"disabled","disabled")},Ad=function(n){ko(n.element(),"disabled")},Fd=function(n){wo(n.element(),"aria-disabled","true")},Vd=function(n){wo(n.element(),"aria-disabled","false")},Nd=function(e,n,t){n.disableClass.each(function(n){Io(e.element(),n)}),(Rd(e)?Bd:Fd)(e)},jd=function(e,n,t){n.disableClass.each(function(n){Bo(e.element(),n)}),(Rd(e)?Ad:Vd)(e)},Hd=function(n){return Rd(n)?To(n.element(),"disabled"):"true"===Oo(n.element(),"aria-disabled")},zd=/* */Object.freeze({enable:jd,disable:Nd,isDisabled:Hd,onLoad:Id,set:function(n,e,t,r){(r?Nd:jd)(n,e,t)}}),Pd=/* */Object.freeze({exhibit:function(n,e,t){return co({classes:e.disabled?e.disableClass.map(Hn).getOr([]):[]})},events:function(n,e){return qr([Yr(ee(),function(n,e){return Hd(n)}),ao(n,e,Id)])}}),Ld=[Fr("disabled",!1),Ir("disableClass")],Gd=ho({fields:Ld,name:"disabling",active:Pd,apis:zd}),$d=[Ta("formBehaviours",[cs])],Ud=function(n){return"<alloy.field."+n+">"},Wd=function(o,n,e){return{uid:o.uid,dom:o.dom,components:n,behaviours:Ea(o.formBehaviours,[cs.config({store:{mode:"manual",getValue:function(n){var e,t,r=(e=o,t=n.getSystem(),M(e.partUids,function(n,e){return h(t.getByUid(n))}));return M(r,function(n,e){return n().bind(function(n){var e,t=vd.getCurrent(n);return e="missing current",t.fold(function(){return dt.error(e)},dt.value)}).map(cs.getValue)})},setValue:function(t,n){D(n,function(e,n){af(t,o,n).each(function(n){vd.getCurrent(n).each(function(n){cs.setValue(n,e)})})})}}})]),apis:{getField:function(n,e){return af(n,o,e).bind(vd.getCurrent)}}}},_d=(gf(function(n,e,t){return n.getField(e,t)}),function(n){var i,e=(i=[],{field:function(n,e){return i.push(n),t="form",r=Ud(n),o=e,{uiType:Na(),owner:t,name:r,config:o,validated:{}};var t,r,o},record:function(){return i}}),t=n(e),r=e.record(),o=kn(r,function(n){return Qa({name:n,pname:Ud(n)})});return Of("form",$d,o,Wd,t)}),Xd=function(){var e=Ho(k.none()),t=function(){e.get().each(function(n){n.destroy()})};return{clear:function(){t(),e.set(k.none())},isSet:function(){return e.get().isSome()},set:function(n){t(),e.set(k.some(n))},run:function(n){e.get().each(n)}}},qd=function(){var e=Ho(k.none());return{clear:function(){e.set(k.none())},set:function(n){e.set(k.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}},Yd=function(n){return{xValue:n,points:[]}},Kd=function(n,e){if(e===n.xValue)return n;var t=0<e-n.xValue?1:-1,r={direction:t,xValue:e};return{xValue:e,points:(0===n.points.length?[]:n.points[n.points.length-1].direction===t?n.points.slice(0,n.points.length-1):n.points).concat([r])}},Jd=function(n){if(0===n.points.length)return 0;var e=n.points[0].direction,t=n.points[n.points.length-1].direction;return-1===e&&-1===t?-1:1===e&&1===t?1:0},Qd=function(n){var r="navigateEvent",e=sr([Cr("fields"),Fr("maxFieldIndex",n.fields.length-1),Cr("onExecute"),Cr("getInitialValue"),Nr("state",function(){return{dialogSwipeState:qd(),currentScreen:Ho(0)}})]),u=Sr("SerialisedDialog",e,n),o=function(e,n,t){return Mf.sketch({dom:Bf('<span class="${prefix}-icon-'+n+' ${prefix}-icon"></span>'),action:function(n){me(n,r,{direction:e})},buttonBehaviours:po([Gd.config({disableClass:Hi.resolve("toolbar-navigation-disabled"),disabled:!t})])})},i=function(n,o){var i=uu(n.element(),"."+Hi.resolve("serialised-dialog-screen"));fu(n.element(),"."+Hi.resolve("serialised-dialog-chain")).each(function(r){0<=u.state.currentScreen.get()+o&&u.state.currentScreen.get()+o<i.length&&(Ki(r,"left").each(function(n){var e=parseInt(n,10),t=xs(i[0]);_i(r,"left",e-o*t+"px")}),u.state.currentScreen.set(u.state.currentScreen.get()+o))})},c=function(r){var n=uu(r.element(),"input");k.from(n[u.state.currentScreen.get()]).each(function(n){r.getSystem().getByDom(n).each(function(n){var e,t;e=r,t=n.element(),e.getSystem().triggerFocus(t,e.element())})});var e=f.get(r);Au.highlightAt(e,u.state.currentScreen.get())},a=Jl(_d(function(t){return{dom:Bf('<div class="${prefix}-serialised-dialog"></div>'),components:[hd.sketch({dom:Bf('<div class="${prefix}-serialised-dialog-chain" style="left: 0px; position: absolute;"></div>'),components:kn(u.fields,function(n,e){return e<=u.maxFieldIndex?hd.sketch({dom:Bf('<div class="${prefix}-serialised-dialog-screen"></div>'),components:[o(-1,"previous",0<e),t.field(n.name,n.spec),o(1,"next",e<u.maxFieldIndex)]}):t.field(n.name,n.spec)})})],formBehaviours:po([Vi(function(n,e){var t;t=e,fu(n.element(),"."+Hi.resolve("serialised-dialog-chain")).each(function(n){_i(n,"left",-u.state.currentScreen.get()*t.width+"px")})}),Oa.config({mode:"special",focusIn:function(n){c(n)},onTab:function(n){return i(n,1),k.some(!0)},onShiftTab:function(n){return i(n,-1),k.some(!0)}}),md("form-events",[eo(function(e,n){u.state.currentScreen.set(0),u.state.dialogSwipeState.clear();var t=f.get(e);Au.highlightFirst(t),u.getInitialValue(e).each(function(n){cs.setValue(e,n)})}),oo(u.onExecute),Kr(W(),function(n,e){"left"===e.event().raw().propertyName&&c(n)}),Kr(r,function(n,e){var t=e.event().direction();i(n,t)})])])}})),f=Jl({dom:Bf('<div class="${prefix}-dot-container"></div>'),behaviours:po([Au.config({highlightClass:Hi.resolve("dot-active"),itemClass:Hi.resolve("dot-item")})]),components:Vn(u.fields,function(n,e){return e<=u.maxFieldIndex?[Af('<div class="${prefix}-dot-item ${prefix}-icon-full-dot ${prefix}-icon"></div>')]:[]})});return{dom:Bf('<div class="${prefix}-serializer-wrapper"></div>'),components:[a.asSpec(),f.asSpec()],behaviours:po([Oa.config({mode:"special",focusIn:function(n){var e=a.get(n);Oa.focusIn(e)}}),md("serializer-wrapper-events",[Kr(A(),function(n,e){var t=e.event();u.state.dialogSwipeState.set(Yd(t.raw().touches[0].clientX))}),Kr(F(),function(n,e){var t=e.event();u.state.dialogSwipeState.on(function(n){e.event().prevent(),u.state.dialogSwipeState.set(Kd(n,t.raw().touches[0].clientX))})}),Kr(V(),function(r){u.state.dialogSwipeState.on(function(n){var e=a.get(r),t=-1*Jd(n);i(e,t)})})])])}},Zd=X(function(t,r){return[{label:"the link group",items:[Qd({fields:[Dd("url","Type or paste URL"),Dd("text","Link text"),Dd("title","Link title"),Dd("target","Link target"),(n="link",{name:n,spec:bd.sketch({dom:{tag:"span",styles:{display:"none"}},getInitialValue:function(){return k.none()}})})],maxFieldIndex:["url","text","title","target"].length-1,getInitialValue:function(){return k.some(fd.getInfo(r))},onExecute:function(n){var e=cs.getValue(n);fd.applyInfo(r,e),t.restoreToolbar(),r.focus()}})]}];var n}),nm=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],em=qr([(nd=Jn(),ed=function(n,e){var t,r,o=e.event().originator(),i=e.event().target();return r=i,!(We(t=o,n.element())&&!We(t,r))||(v.console.warn(Jn()+" did not get interpreted by the desired target. \nOriginator: "+Jo(o)+"\nTarget: "+Jo(i)+"\nCheck the "+Jn()+" event handlers"),!1)},{key:nd,value:Hr({can:ed})})]),tm=/* */Object.freeze({events:em}),rm=b,om=function(e){var n=function(n){return function(){throw new Error("The component must be in a context to send: "+n+"\n"+Jo(e().element())+" is not in context.")}};return{debugInfo:h("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),isConnected:h(!1)}},im=om(),um=function(n,o){var i={};return D(n,function(n,r){D(n,function(n,e){var t=Mt(e,[])(i);i[e]=t.concat([o(r,n)])})}),i},cm=function(n,e){return t=l.apply(undefined,[n.handler].concat(e)),r=n.purpose(),{cHandler:t,purpose:h(r)};var t,r},am=function(n){return n.cHandler},fm=function(n,e){return{name:h(n),handler:h(e)}},sm=function(n,e,t){var r,o,i=y({},t,(r=n,o={},En(e,function(n){o[n.name()]=n.handlers(r)}),o));return um(i,fm)},lm=function(n){var e,i=yn(e=n)?{can:h(!0),abort:h(!1),run:e}:e;return function(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var o=[n,e].concat(t);i.abort.apply(undefined,o)?e.stop():i.can.apply(undefined,o)&&i.run.apply(undefined,o)}},dm=function(n,e,t){var r,o,i=e[t];return i?function(u,c,n,a){var e=n.slice(0);try{var t=e.sort(function(n,e){var t=n[c](),r=e[c](),o=a.indexOf(t),i=a.indexOf(r);if(-1===o)throw new Error("The ordering for "+u+" does not have an entry for "+t+".\nOrder specified: "+er(a,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+r+".\nOrder specified: "+er(a,null,2));return o<i?-1:i<o?1:0});return dt.value(t)}catch(r){return dt.error([r])}}("Event: "+t,"name",n,i).map(function(n){var e=kn(n,function(n){return n.handler()});return zr(e)}):(r=t,o=n,dt.error(["The event ("+r+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+er(kn(o,function(n){return n.name()}),null,2)]))},mm=function(n,i){var e=R(n,function(r,o){return(1===r.length?dt.value(r[0].handler()):dm(r,i,o)).map(function(n){var e=lm(n),t=1<r.length?Cn(i,function(e){return On(r,function(n){return n.name()===e})}).join(" > "):r[0].name();return Rt(o,{handler:e,purpose:h(t)})})});return At(e,{})},gm=function(n){return xr("custom.definition",sr([gr("dom","dom",xt(),sr([Cr("tag"),Fr("styles",{}),Fr("classes",[]),Fr("attributes",{}),Ir("value"),Ir("innerHtml")])),Cr("components"),Cr("uid"),Fr("events",{}),Fr("apis",{}),gr("eventOrder","eventOrder",(e={"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]},bt.mergeWithThunk(h(e))),kr()),Ir("domModification")]),n);var e},pm=function(e,n){En(n,function(n){Io(e,n)})},vm=function(e,n){En(n,function(n){Bo(e,n)})},hm=function(n,e){return t=n,o=kn(r=e,function(n){return Br(n.name(),[Cr("config"),Fr("state",mo)])}),i=xr("component.behaviours",sr(o),t.behaviours).fold(function(n){throw new Error(Or(n)+"\nComplete spec:\n"+er(t,null,2))},function(n){return n}),{list:r,data:M(i,function(n){var e=n.map(function(n){return{config:n.config,state:n.state.init(n.config)}});return function(){return e}})};var t,r,o,i},bm=function(n){var e,t,r,o=(e=n,t=Mt("behaviours",{})(e),r=Cn(E(t),function(n){return t[n]!==undefined}),kn(r,function(n){return t[n].me}));return hm(n,o)},ym=function(n,e,t){var r,o,i,u=y({},(r=n).dom,{uid:r.uid,domChildren:kn(r.components,function(n){return n.element()})}),c=n.domModification.fold(function(){return co({})},co),a={"alloy.base.modification":c},f=0<e.length?function(e,n,t,r){var o=y({},n);En(t,function(n){o[n.name()]=n.exhibit(e,r)});var i=um(o,function(n,e){return{name:n,modification:e}}),u=function(n){return Dn(n,function(n,e){return y({},e.modification,n)},{})},c=Dn(i.classes,function(n,e){return e.modification.concat(n)},[]),a=u(i.attributes),f=u(i.styles);return co({classes:c,attributes:a,styles:f})}(t,a,e,u):c;return i=f,y({},o=u,{attributes:y({},o.attributes,i.attributes),styles:y({},o.styles,i.styles),classes:o.classes.concat(i.classes)})},xm=function(n,e,t){var r,o,i,u,c,a,f={"alloy.base.behaviour":(r=n,r.events)};return(o=t,i=n.eventOrder,u=e,c=f,a=sm(o,u,c),mm(a,i)).getOrDie()},wm=function(t){var n=function(){return s},r=Ho(im),e=wr(gm(t)),o=bm(t),i=o.list,u=o.data,c=function(n){var e=be.fromTag(n.tag);So(e,n.attributes),pm(e,n.classes),Xi(e,n.styles),n.innerHtml.each(function(n){return qo(e,n)});var t=n.domChildren;return nt(e,t),n.value.each(function(n){xd(e,n)}),n.uid,yf(e,n.uid),e}(ym(e,i,u)),a=xm(e,i,u),f=Ho(e.components),s={getSystem:r.get,config:function(n){var e=u;return(yn(e[n.name()])?e[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+er(t,null,2))})()},hasConfigured:function(n){return yn(u[n.name()])},spec:h(t),readState:function(n){return u[n]().map(function(n){return n.state.readState()}).getOr("not enabled")},getApis:function(){return e.apis},connect:function(n){r.set(n)},disconnect:function(){r.set(om(n))},element:h(c),syncComponents:function(){var n=qe(c),e=Vn(n,function(n){return r.get().getByDom(n).fold(function(){return[]},function(n){return[n]})});f.set(e)},components:f.get,events:h(a)};return s},Sm=function(n){var e,t,r=rm(n),o=r.events,i=a(r,["events"]),u=(e=i,t=Mt("components",[])(e),kn(t,Em)),c=y({},i,{events:y({},tm,o),components:u});return dt.value(wm(c))},Om=function(n){var e=be.fromText(n);return Tm({element:e})},Tm=function(n){var e=Sr("external.component",fr([Cr("element"),Ir("uid")]),n),t=Ho(om());e.uid.each(function(n){yf(e.element,n)});var r={getSystem:t.get,config:k.none,hasConfigured:h(!1),connect:function(n){t.set(n)},disconnect:function(){t.set(om(function(){return r}))},getApis:function(){return{}},element:h(e.element),spec:h(n),readState:h("No state"),syncComponents:x,components:h([]),events:h({})};return mf(r)},km=wf,Em=function(e){return(n=e,It(n,df)).fold(function(){var n=e.hasOwnProperty("uid")?e:y({uid:km("")},e);return Sm(n).getOrDie()},function(n){return n});var n},Cm=mf,Dm="alloy.item-hover",Mm="alloy.item-focus",Im=function(n){(Go(n.element()).isNone()||$i.isFocused(n))&&($i.isFocused(n)||$i.focus(n),me(n,Dm,{item:n}))},Rm=function(n){me(n,Mm,{item:n})},Bm=h(Dm),Am=h(Mm),Fm=[Cr("data"),Cr("components"),Cr("dom"),Fr("hasSubmenu",!1),Ir("toggling"),Ca("itemBehaviours",[Ai,$i,Oa,cs]),Fr("ignoreFocus",!1),Fr("domModification",{}),hi("builder",function(n){return{dom:n.dom,domModification:y({},n.domModification,{attributes:y({role:n.toggling.isSome()?"menuitemcheckbox":"menuitem"},n.domModification.attributes,{"aria-haspopup":n.hasSubmenu},n.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Da(n.itemBehaviours,[n.toggling.fold(Ai.revoke,function(n){return Ai.config(y({aria:{mode:"checked"}},n))}),$i.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:function(n){Rm(n)}}),Oa.config({mode:"execution"}),cs.config({store:{mode:"memory",initialValue:n.data}}),md("item-type-events",[Kr(oe(),ge),no(N()),Kr(z(),Im),Kr(te(),$i.focus)])]),components:n.components,eventOrder:n.eventOrder}}),Fr("eventOrder",{})],Vm=[Cr("dom"),Cr("components"),hi("builder",function(n){return{dom:n.dom,components:n.components,events:qr([(e=te(),Kr(e,function(n,e){e.stop()}))])};var e})],Nm=h([Qa({name:"widget",overrides:function(e){return{behaviours:po([cs.config({store:{mode:"manual",getValue:function(n){return e.data},setValue:function(){}}})])}}})]),jm=[Cr("uid"),Cr("data"),Cr("components"),Cr("dom"),Fr("autofocus",!1),Fr("ignoreFocus",!1),Ca("widgetBehaviours",[cs,$i,Oa]),Fr("domModification",{}),lf(Nm()),hi("builder",function(t){var n=uf(0,t,Nm()),e=cf("item-widget",t,n.internals()),r=function(n){return af(n,t,"widget").map(function(n){return Oa.focusIn(n),n})},o=function(n,e){return Ku(e.event().target())||t.autofocus&&e.setSource(n.element()),k.none()};return{dom:t.dom,components:e,domModification:t.domModification,events:qr([oo(function(n,e){r(n).each(function(n){e.stop()})}),Kr(z(),Im),Kr(te(),function(n,e){t.autofocus?r(n):$i.focus(n)})]),behaviours:Da(t.widgetBehaviours,[cs.config({store:{mode:"memory",initialValue:t.data}}),$i.config({ignore:t.ignoreFocus,onFocus:function(n){Rm(n)}}),Oa.config({mode:"special",focusIn:t.autofocus?function(n){r(n)}:yo(),onLeft:o,onRight:o,onEscape:function(n,e){return $i.isFocused(n)||t.autofocus?(t.autofocus&&e.setSource(n.element()),k.none()):($i.focus(n),k.some(!0))}})])}})],Hm=Tr("type",{widget:jm,item:Fm,separator:Vm}),zm=h([nf({factory:{sketch:function(n){var e=Sr("menu.spec item",Hm,n);return e.builder(e)}},name:"items",unit:"item",defaults:function(n,e){return e.hasOwnProperty("uid")?e:y({},e,{uid:wf("item")})},overrides:function(n,e){return{type:e.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}}}})]),Pm=h([Cr("value"),Cr("items"),Cr("dom"),Cr("components"),Fr("eventOrder",{}),Ta("menuBehaviours",[Au,cs,vd,Oa]),Vr("movement",{mode:"menu",moveOnTab:!0},Tr("mode",{grid:[yi(),hi("config",function(n,e){return{mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:n.focusManager}})],matrix:[hi("config",function(n,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+n.markers.item},focusManager:n.focusManager}}),Cr("rowSelector")],menu:[Fr("moveOnTab",!0),hi("config",function(n,e){return{mode:"menu",selector:"."+n.markers.item,moveOnTab:e.moveOnTab,focusManager:n.focusManager}})]})),Dr("markers",si()),Fr("fakeFocus",!1),Fr("focusManager",Vu()),mi("onHighlight")]),Lm=h("alloy.menu-focus"),Gm=Df({name:"Menu",configFields:Pm(),partFields:zm(),factory:function(n,e,t,r){return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Ea(n.menuBehaviours,[Au.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight}),cs.config({store:{mode:"memory",initialValue:n.value}}),vd.config({find:k.some}),Oa.config(n.movement.config(n,n.movement))]),events:qr([Kr(Am(),function(e,t){var n=t.event();e.getSystem().getByDom(n.target()).each(function(n){Au.highlight(e,n),t.stop(),me(e,Lm(),{menu:e,item:n})})}),Kr(Bm(),function(n,e){var t=e.event().item();Au.highlight(n,t)})]),components:e,eventOrder:n.eventOrder,domModification:{attributes:{role:"menu"}}}}}),$m=function(n,e,t,r){var o=n.getSystem().build(r);ut(n,o,t)},Um=function(n,e,t,r){var o=Wm(n);In(o,function(n){return We(r.element(),n.element())}).each(at)},Wm=function(n,e){return n.components()},_m=function(e,n,t,o,r){var i=Wm(e);return k.from(i[o]).map(function(n){return Um(e,0,0,n),r.each(function(n){$m(e,0,function(n,e){var t,r;r=e,Ye(t=n,o).fold(function(){Ze(t,r)},function(n){Ke(n,r)})},n)}),n})},Xm=ho({fields:[],name:"replacing",apis:/* */Object.freeze({append:function(n,e,t,r){$m(n,0,Ze,r)},prepend:function(n,e,t,r){$m(n,0,Qe,r)},remove:Um,replaceAt:_m,replaceBy:function(e,n,t,r,o){var i=Wm(e);return Rn(i,r).bind(function(n){return _m(e,0,0,n,o)})},set:function(e,n,t,r){var o,i,u,c,a,f;i=(o=e).components(),En(i,ct),et(o.element()),o.syncComponents(),u=function(){var n=kn(r,e.getSystem().build);En(n,function(n){it(e,n)})},c=e.element(),a=_e(c),f=Lo(a).bind(function(e){var n=function(n){return We(e,n)};return n(c)?k.some(c):_r(c,n)}),u(c),f.each(function(e){Lo(a).filter(function(n){return We(n,e)}).fold(function(){zo(e)},x)})},contents:Wm})}),qm=function(t,r,o,n){return It(o,n).bind(function(n){return It(t,n).bind(function(n){var e=qm(t,r,o,n);return k.some([n].concat(e))})}).getOr([])},Ym=function(n,e){var t={};D(n,function(n,e){En(n,function(n){t[n]=e})});var r=e,o=I(e,function(n,e){return{k:n,v:e}}),i=M(o,function(n,e){return[e].concat(qm(t,r,o,e))});return M(t,function(n){return It(i,n).getOr([n])})},Km=function(){var i=Ho({}),u=Ho({}),c=Ho({}),a=Ho(k.none()),f=Ho({}),e=function(n){return It(u.get(),n)};return{setMenuBuilt:function(n,e){var t;u.set(y({},u.get(),((t={})[n]={type:"prepared",menu:e},t)))},setContents:function(n,e,t,r){a.set(k.some(n)),i.set(t),u.set(e),f.set(r);var o=Ym(r,t);c.set(o)},expand:function(t){return It(i.get(),t).map(function(n){var e=It(c.get(),t).getOr([]);return[n].concat(e)})},refresh:function(n){return It(c.get(),n)},collapse:function(n){return It(c.get(),n).bind(function(n){return 1<n.length?k.some(n.slice(1)):k.none()})},lookupMenu:e,otherMenus:function(n){var e,t,r=f.get();return e=E(r),t=n,Cn(e,function(n){return!On(t,n)})},getPrimary:function(){return a.get().bind(function(n){return e(n).bind(function(n){return"prepared"===n.type?k.some(n.menu):k.none()})})},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),c.set({}),a.set(k.none())},isClear:function(){return a.get().isNone()}}},Jm=h("collapse-item"),Qm=Cf({name:"TieredMenu",configFields:[vi("onExecute"),vi("onEscape"),pi("onOpenMenu"),pi("onOpenSubmenu"),mi("onCollapseMenu"),Fr("highlightImmediately",!0),Mr("data",[Cr("primary"),Cr("menus"),Cr("expansions")]),Fr("fakeFocus",!1),mi("onHighlight"),mi("onHover"),Mr("markers",[Cr("backgroundMenu")].concat(ai()).concat(fi())),Cr("dom"),Fr("navigateOnHover",!0),Fr("stayInDom",!1),Ta("tmenuBehaviours",[Oa,Au,vd,Xm]),Fr("eventOrder",{})],apis:{collapseMenu:function(n,e){n.collapseMenu(e)},highlightPrimary:function(n,e){n.highlightPrimary(e)}},factory:function(c,n){var a,e,i=Ho(k.none()),u=function(r,o,n){return M(n,function(n,e){var t=function(){return Gm.sketch(y({dom:n.dom},n,{value:e,items:n.items,markers:c.markers,fakeFocus:c.fakeFocus,onHighlight:c.onHighlight,focusManager:c.fakeFocus?(o=function(n){return Au.getHighlighted(n).map(function(n){return n.element()})},{get:o,set:function(e,n){var t=o(e);e.getSystem().getByDom(n).fold(x,function(n){Au.highlight(e,n)});var r=o(e);Fu(e,t,r)}}):Vu()}));var o};return e===o?{type:"prepared",menu:r.getSystem().build(t())}:{type:"notbuilt",nbMenu:t}})},f=Km(),s=function(n){return cs.getValue(n).value},l=function(n){return M(c.data.menus,function(n,e){return Vn(n.items,function(n){return"separator"===n.type?[]:[n.data.value]})})},d=function(e,n){Au.highlight(e,n),Au.getHighlighted(n).orThunk(function(){return Au.getFirst(n)}).each(function(n){pe(e,n.element(),te())})},m=function(e,n){return Zo(kn(n,function(n){return e.lookupMenu(n).bind(function(n){return"prepared"===n.type?k.some(n.menu):k.none()})}))},g=function(e,n,t){var r=m(n,n.otherMenus(t));En(r,function(n){vm(n.element(),[c.markers.backgroundMenu]),c.stayInDom||Xm.remove(e,n)})},p=function(n,r){var o,e=(o=n,i.get().getOrThunk(function(){var t={},n=uu(o.element(),"."+c.markers.item),e=Cn(n,function(n){return"true"===Oo(n,"aria-haspopup")});return En(e,function(n){o.getSystem().getByDom(n).each(function(n){var e=s(n);t[e]=n})}),i.set(k.some(t)),t}));D(e,function(n,e){var t=On(r,e);wo(n.element(),"aria-expanded",t)})},v=function(r,o,i){return k.from(i[0]).bind(function(n){return o.lookupMenu(n).bind(function(n){if("notbuilt"===n.type)return k.none();var e=n.menu,t=m(o,i.slice(1));return En(t,function(n){Io(n.element(),c.markers.backgroundMenu)}),Ee(e.element())||Xm.append(r,Cm(e)),vm(e.element(),[c.markers.backgroundMenu]),d(r,e),g(r,o,i),k.some(e)})})};(e=a||(a={}))[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent";var h=function(o,i,u){void 0===u&&(u=a.HighlightSubmenu);var n=s(i);return f.expand(n).bind(function(r){return p(o,r),k.from(r[0]).bind(function(t){return f.lookupMenu(t).bind(function(n){var e=function(n,e,t){if("notbuilt"!==t.type)return t.menu;var r=n.getSystem().build(t.nbMenu());return f.setMenuBuilt(e,r),r}(o,t,n);return Ee(e.element())||Xm.append(o,Cm(e)),c.onOpenSubmenu(o,i,e),u===a.HighlightSubmenu?(Au.highlightFirst(e),v(o,f,r)):(Au.dehighlightAll(e),k.some(i))})})})},r=function(e,t){var n=s(t);return f.collapse(n).bind(function(n){return p(e,n),v(e,f,n).map(function(n){return c.onCollapseMenu(e,t,n),n})})},t=function(t){return function(e,n){return su(n.getSource(),"."+c.markers.item).bind(function(n){return e.getSystem().getByDom(n).toOption().bind(function(n){return t(e,n).map(function(){return!0})})})}},o=qr([Kr(Lm(),function(e,n){var t=n.event().menu();Au.highlight(e,t);var r=s(n.event().item());f.refresh(r).each(function(n){return g(e,f,n)})}),oo(function(e,n){var t=n.event().target();e.getSystem().getByDom(t).each(function(n){0===s(n).indexOf("collapse-item")&&r(e,n),h(e,n,a.HighlightSubmenu).fold(function(){c.onExecute(e,n)},function(){})})}),eo(function(e,n){var t,r,o;(t=e,r=u(t,c.data.primary,c.data.menus),o=l(),f.setContents(c.data.primary,r,c.data.expansions,o),f.getPrimary()).each(function(n){Xm.append(e,Cm(n)),c.onOpenMenu(e,n),c.highlightImmediately&&d(e,n)})})].concat(c.navigateOnHover?[Kr(Bm(),function(n,e){var t,r,o=e.event().item();t=n,r=s(o),f.refresh(r).bind(function(n){return p(t,n),v(t,f,n)}),h(n,o,a.HighlightParent),c.onHover(n,o)})]:[])),b={collapseMenu:function(e){Au.getHighlighted(e).each(function(n){Au.getHighlighted(n).each(function(n){r(e,n)})})},highlightPrimary:function(e){f.getPrimary().each(function(n){d(e,n)})}};return{uid:c.uid,dom:c.dom,markers:c.markers,behaviours:Ea(c.tmenuBehaviours,[Oa.config({mode:"special",onRight:t(function(n,e){return Ku(e.element())?k.none():h(n,e,a.HighlightSubmenu)}),onLeft:t(function(n,e){return Ku(e.element())?k.none():r(n,e)}),onEscape:t(function(n,e){return r(n,e).orThunk(function(){return c.onEscape(n,e).map(function(){return n})})}),focusIn:function(e,n){f.getPrimary().each(function(n){pe(e,n.element(),te())})}}),Au.config({highlightClass:c.markers.selectedMenu,itemClass:c.markers.menu}),vd.config({find:function(n){return Au.getHighlighted(n)}}),Xm.config({})]),eventOrder:c.eventOrder,apis:b,events:o}},extraApis:{tieredData:function(n,e,t){return{primary:n,menus:e,expansions:t}},singleData:function(n,e){return{primary:n,menus:Rt(n,e),expansions:{}}},collapseItem:function(n){return{value:Ha(Jm()),meta:{text:n}}}}}),Zm=function(n,e,t,r){return It(e.routes,r.start).bind(function(n){return It(n,r.destination)})},ng=function(n,e,t,r){return Zm(0,e,0,r).bind(function(e){return e.transition.map(function(n){return{transition:n,route:e}})})},eg=function(t,r,n){var e,o,i;(e=t,o=r,i=n,tg(e,o).bind(function(n){return ng(e,o,i,n)})).each(function(n){var e=n.transition;Bo(t.element(),e.transitionClass),ko(t.element(),r.destinationAttr)})},tg=function(n,e,t){var r=n.element();return To(r,e.destinationAttr)?k.some({start:Oo(n.element(),e.stateAttr),destination:Oo(n.element(),e.destinationAttr)}):k.none()},rg=function(n,e,t,r){eg(n,e,t),To(n.element(),e.stateAttr)&&Oo(n.element(),e.stateAttr)!==r&&e.onFinish(n,r),wo(n.element(),e.stateAttr,r)},og=/* */Object.freeze({findRoute:Zm,disableTransition:eg,getCurrentRoute:tg,jumpTo:rg,progressTo:function(t,r,o,i){var n,e;e=r,To((n=t).element(),e.destinationAttr)&&(wo(n.element(),e.stateAttr,Oo(n.element(),e.destinationAttr)),ko(n.element(),e.destinationAttr));var u,c,a=(u=r,c=i,{start:Oo(t.element(),u.stateAttr),destination:c});ng(t,r,o,a).fold(function(){rg(t,r,o,i)},function(n){eg(t,r,o);var e=n.transition;Io(t.element(),e.transitionClass),wo(t.element(),r.destinationAttr,i)})},getState:function(n,e,t){var r=n.element();return To(r,e.stateAttr)?k.some(Oo(r,e.stateAttr)):k.none()}}),ig=/* */Object.freeze({events:function(o,i){return qr([Kr(W(),function(t,n){var r=n.event().raw();tg(t,o).each(function(e){Zm(0,o,0,e).each(function(n){n.transition.each(function(n){r.propertyName===n.property&&(rg(t,o,i,e.destination),o.onTransition(t,e))})})})}),eo(function(n,e){rg(n,o,i,o.initialState)})])}}),ug=[Fr("destinationAttr","data-transitioning-destination"),Fr("stateAttr","data-transitioning-state"),Cr("initialState"),mi("onTransition"),mi("onFinish"),Dr("routes",yr(dt.value,yr(dt.value,fr([Ar("transition",[Cr("property"),Cr("transitionClass")])]))))],cg=ho({fields:ug,name:"transitioning",active:ig,apis:og,extra:{createRoutes:function(n){var r={};return D(n,function(n,e){var t=e.split("<->");r[t[0]]=Rt(t[1],n),r[t[1]]=Rt(t[0],n)}),r},createBistate:function(n,e,t){return Bt([{key:n,value:Rt(e,t)},{key:e,value:Rt(n,t)}])},createTristate:function(n,e,t,r){return Bt([{key:n,value:Bt([{key:e,value:r},{key:t,value:r}])},{key:e,value:Bt([{key:n,value:r},{key:t,value:r}])},{key:t,value:Bt([{key:n,value:r},{key:e,value:r}])}])}}}),ag=Hi.resolve("scrollable"),fg={register:function(n){Io(n,ag)},deregister:function(n){Bo(n,ag)},scrollable:h(ag)},sg=function(n){return It(n,"format").getOr(n.title)},lg=function(n,e,t,r,o){return{data:{value:n,text:e},type:"item",dom:{tag:"div",classes:o?[Hi.resolve("styles-item-is-menu")]:[]},toggling:{toggleOnExecute:!1,toggleClass:Hi.resolve("format-matches"),selected:t},itemBehaviours:po(o?[]:[Fi(n,function(n,e){(e?Ai.on:Ai.off)(n)})]),components:[{dom:{tag:"div",attributes:{style:r},innerHtml:e}}]}},dg=function(n,e,t,r){return{value:n,dom:{tag:"div"},components:[Mf.sketch({dom:{tag:"div",classes:[Hi.resolve("styles-collapser")]},components:r?[{dom:{tag:"span",classes:[Hi.resolve("styles-collapse-icon")]}},Om(n)]:[Om(n)],action:function(n){if(r){var e=t().get(n);Qm.collapseMenu(e)}}}),{dom:{tag:"div",classes:[Hi.resolve("styles-menu-items-container")]},components:[Gm.parts().items({})],behaviours:po([md("adhoc-scrollable-menu",[eo(function(n,e){_i(n.element(),"overflow-y","auto"),_i(n.element(),"-webkit-overflow-scrolling","touch"),fg.register(n.element())}),to(function(n){Ji(n.element(),"overflow-y"),Ji(n.element(),"-webkit-overflow-scrolling"),fg.deregister(n.element())})])])}],items:e,menuBehaviours:po([cg.config({initialState:"after",routes:cg.createTristate("before","current","after",{transition:{property:"transform",transitionClass:"transitioning"}})})])}},mg=function(r){var o,i,n,e,t,u=(o=r.formats,i=function(){return c},n=dg("Styles",[].concat(kn(o.items,function(n){return lg(sg(n),n.title,n.isSelected(),n.getPreview(),Ft(o.expansions,sg(n)))})),i,!1),e=M(o.menus,function(n,e){var t=kn(n,function(n){return lg(sg(n),n.title,n.isSelected!==undefined&&n.isSelected(),n.getPreview!==undefined?n.getPreview():"",Ft(o.expansions,sg(n)))});return dg(e,t,i,!0)}),t=vt(e,Rt("styles",n)),{tmenu:Qm.tieredData("styles",t,o.expansions)}),c=Jl(Qm.sketch({dom:{tag:"div",classes:[Hi.resolve("styles-menu")]},components:[],fakeFocus:!0,stayInDom:!0,onExecute:function(n,e){var t=cs.getValue(e);return r.handle(e,t.value),k.none()},onEscape:function(){return k.none()},onOpenMenu:function(n,e){var t=xs(n.element());ys(e.element(),t),cg.jumpTo(e,"current")},onOpenSubmenu:function(n,e,t){var r=xs(n.element()),o=au(e.element(),'[role="menu"]').getOrDie("hacky"),i=n.getSystem().getByDom(o).getOrDie();ys(t.element(),r),cg.progressTo(i,"before"),cg.jumpTo(t,"after"),cg.progressTo(t,"current")},onCollapseMenu:function(n,e,t){var r=au(e.element(),'[role="menu"]').getOrDie("hacky"),o=n.getSystem().getByDom(r).getOrDie();cg.progressTo(o,"after"),cg.progressTo(t,"current")},navigateOnHover:!1,highlightImmediately:!0,data:u.tmenu,markers:{backgroundMenu:Hi.resolve("styles-background-menu"),menu:Hi.resolve("styles-menu"),selectedMenu:Hi.resolve("styles-selected-menu"),item:Hi.resolve("styles-item"),selectedItem:Hi.resolve("styles-selected-item")}}));return c.asSpec()},gg=function(n){return Ft(n,"items")?(t=vt(Ct(e=n,["items"]),{menu:!0}),r=pg(e.items),{item:t,menus:vt(r.menus,Rt(e.title,r.items)),expansions:vt(r.expansions,Rt(e.title,e.title))}):{item:n,menus:{},expansions:{}};var e,t,r},pg=function(n){return Dn(n,function(n,e){var t=gg(e);return{menus:vt(n.menus,t.menus),items:[t.item].concat(n.items),expansions:vt(n.expansions,t.expansions)}},{menus:{},expansions:{},items:[]})},vg={expand:pg},hg=function(u,n){var c=function(n){return function(){return u.formatter.match(n)}},a=function(n){return function(){return u.formatter.getCssText(n)}},e=It(n,"style_formats").getOr(nm),f=function(n){return kn(n,function(n){if(Ft(n,"items")){var e=f(n.items);return vt(vt(n,{isSelected:h(!1),getPreview:h("")}),{items:e})}return Ft(n,"format")?vt(i=n,{isSelected:c(i.format),getPreview:a(i.format)}):(r=Ha((t=n).title),o=vt(t,{format:r,isSelected:c(r),getPreview:a(r)}),u.formatter.register(r,o),o);var t,r,o,i})};return f(e)},bg=function(t,n,r){var e,o,i,u=(e=t,i=(o=function(n){return Vn(n,function(n){return n.items===undefined?!Ft(n,"format")||e.formatter.canApply(n.format)?[n]:[]:0<o(n.items).length?[n]:[]})})(n),vg.expand(i));return mg({formats:u,handle:function(n,e){t.undoManager.transact(function(){Ai.isOn(n)?t.formatter.remove(e):t.formatter.apply(e)}),r()}})},yg=["undo","bold","italic","link","image","bullist","styleselect"],xg=function(n){var e=n.replace(/\|/g," ").trim();return 0<e.length?e.split(/\s+/):[]},wg=function(n){return Vn(n,function(n){return hn(n)?wg(n):xg(n)})},Sg=function(n){var e=n.toolbar!==undefined?n.toolbar:yg;return hn(e)?wg(e):xg(e)},Og=function(r,o){var n=function(n){return function(){return jf.forToolbarCommand(o,n)}},e=function(n){return function(){return jf.forToolbarStateCommand(o,n)}},t=function(n,e,t){return function(){return jf.forToolbarStateAction(o,n,e,t)}},i=n("undo"),u=n("redo"),c=e("bold"),a=e("italic"),f=e("underline"),s=n("removeformat"),l=t("unlink","link",function(){o.execCommand("unlink",null,!1)}),d=t("unordered-list","ul",function(){o.execCommand("InsertUnorderedList",null,!1)}),m=t("ordered-list","ol",function(){o.execCommand("InsertOrderedList",null,!1)}),g=hg(o,o.settings),p=function(){return bg(o,g,function(){o.fire("scrollIntoView")})},v=function(n,e){return{isSupported:function(){var e=o.ui.registry.getAll().buttons;return n.forall(function(n){return Ft(e,n)})},sketch:e}};return{undo:v(k.none(),i),redo:v(k.none(),u),bold:v(k.none(),c),italic:v(k.none(),a),underline:v(k.none(),f),removeformat:v(k.none(),s),link:v(k.none(),function(){return e=r,t=o,jf.forToolbarStateAction(t,"link","link",function(){var n=Zd(e,t);e.setContextToolbar(n),dd(t,function(){e.focusToolbar()}),fd.query(t).each(function(n){t.selection.select(n.dom())})});var e,t}),unlink:v(k.none(),l),image:v(k.none(),function(){return rd(o)}),bullist:v(k.some("bullist"),d),numlist:v(k.some("numlist"),m),fontsizeselect:v(k.none(),function(){return n={onChange:function(n){ql.apply(e,n)},getInitialValue:function(){return ql.get(e)}},Ll(r,"font-size",function(){return Kl(n)},e=o);var e,n}),forecolor:v(k.none(),function(){return $l(r,o)}),styleselect:v(k.none(),function(){return jf.forToolbar("style-formats",function(n){o.fire("toReading"),r.dropup().appear(p,Ai.on,n)},po([Ai.config({toggleClass:Hi.resolve("toolbar-button-selected"),toggleOnExecute:!1,aria:{mode:"pressed"}}),wi.config({channels:Bt([Ni(_o.orientationChanged(),Ai.off),Ni(_o.dropupDismissed(),Ai.off)])})]),o)})}},Tg=function(n,t){var e=Sg(n),r={};return Vn(e,function(n){var e=!Ft(r,n)&&Ft(t,n)&&t[n].isSupported()?[t[n].sketch()]:[];return r[n]=!0,e})},kg=function(m,g){return function(n){if(m(n)){var e,t,r,o,i,u,c,a=be.fromDom(n.target),f=function(){n.stopPropagation()},s=function(){n.preventDefault()},l=p(s,f),d=(e=a,t=n.clientX,r=n.clientY,o=f,i=s,u=l,c=n,{target:h(e),x:h(t),y:h(r),stop:o,prevent:i,kill:u,raw:h(c)});g(d)}}},Eg=function(n,e,t,r,o){var i=kg(t,r);return n.dom().addEventListener(e,i,o),{unbind:l(Cg,n,e,i,o)}},Cg=function(n,e,t,r){n.dom().removeEventListener(e,t,r)},Dg=h(!0),Mg=function(n,e,t){return Eg(n,e,Dg,t,!1)},Ig=function(n,e,t){return Eg(n,e,Dg,t,!0)},Rg=tinymce.util.Tools.resolve("tinymce.util.Delay"),Bg=function(n){var e=n.matchMedia("(orientation: portrait)").matches;return{isPortrait:h(e)}},Ag=Bg,Fg=function(r,e){var n=be.fromDom(r),o=null,t=Mg(n,"orientationchange",function(){Rg.clearInterval(o);var n=Bg(r);e.onChange(n),i(function(){e.onReady(n)})}),i=function(n){Rg.clearInterval(o);var e=r.innerHeight,t=0;o=Rg.setInterval(function(){e!==r.innerHeight?(Rg.clearInterval(o),n(k.some(r.innerHeight))):20<t&&(Rg.clearInterval(o),n(k.none())),t++},50)};return{onAdjustment:i,destroy:function(){t.unbind()}}},Vg=function(n){var e=Yn.detect().os.isiOS(),t=Bg(n).isPortrait();return e&&!t?n.screen.height:n.screen.width};var Ng=function(n){var e=n.raw();return e.touches===undefined||1!==e.touches.length?k.none():k.some(e.touches[0])},jg=function(t){var u=Ho(k.none()),r=function n(t,r){var o=null;return{cancel:function(){null!==o&&(v.clearTimeout(o),o=null)},schedule:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];o=v.setTimeout(function(){t.apply(null,n),o=null},r)}}}(function(n){u.set(k.none()),t.triggerEvent(ie(),n)},400),o=Bt([{key:A(),value:function(t){return Ng(t).each(function(n){r.cancel();var e={x:h(n.clientX),y:h(n.clientY),target:t.target};r.schedule(t),u.set(k.some(e))}),k.none()}},{key:F(),value:function(n){return r.cancel(),Ng(n).each(function(i){u.get().each(function(n){var e,t,r,o;e=i,t=n,r=Math.abs(e.clientX-t.x()),o=Math.abs(e.clientY-t.y()),(5<r||5<o)&&u.set(k.none())})}),k.none()}},{key:V(),value:function(e){r.cancel();return u.get().filter(function(n){return We(n.target(),e.target())}).map(function(n){return t.triggerEvent(re(),e)})}}]);return{fireIfReady:function(e,n){return It(o,n).bind(function(n){return n(e)})}}},Hg=function(t){var e=jg({triggerEvent:function(n,e){t.onTapContent(e)}});return{fireTouchstart:function(n){e.fireIfReady(n,"touchstart")},onTouchend:function(){return Mg(t.body(),"touchend",function(n){e.fireIfReady(n,"touchend")})},onTouchmove:function(){return Mg(t.body(),"touchmove",function(n){e.fireIfReady(n,"touchmove")})}}},zg=6<=Yn.detect().os.version.major,Pg=function(r,e,t){var o=Hg(r),i=_e(e),u=function(n){return!We(n.start(),n.finish())||n.soffset()!==n.foffset()},n=function(){var n=r.doc().dom().hasFocus()&&r.getSelection().exists(u);t.getByDom(e).each(!0===(n||Lo(i).filter(function(n){return"input"===Se(n)}).exists(function(n){return n.dom().selectionStart!==n.dom().selectionEnd}))?Ai.on:Ai.off)},c=[Mg(r.body(),"touchstart",function(n){r.onTouchContent(),o.fireTouchstart(n)}),o.onTouchmove(),o.onTouchend(),Mg(e,"touchstart",function(n){r.onTouchToolstrip()}),r.onToReading(function(){Po(r.body())}),r.onToEditing(x),r.onScrollToCursor(function(n){n.preventDefault(),r.getCursorBox().each(function(n){var e=r.win(),t=n.top()>e.innerHeight||n.bottom()>e.innerHeight?n.bottom()-e.innerHeight+50:0;0!==t&&e.scrollTo(e.pageXOffset,e.pageYOffset+t)})})].concat(!0===zg?[]:[Mg(be.fromDom(r.win()),"blur",function(){t.getByDom(e).each(Ai.off)}),Mg(i,"select",n),Mg(r.doc(),"selectionchange",n)]);return{destroy:function(){En(c,function(n){n.unbind()})}}},Lg=function(n,e){var t=parseInt(Oo(n,e),10);return isNaN(t)?0:t};var Gg,$g=function Qh(t,r){var o=function(n){return t(n)?k.from(n.dom().nodeValue):k.none()},n=Yn.detect().browser,e=n.isIE()&&10===n.version.major?function(n){try{return o(n)}catch(e){return k.none()}}:o;return{get:function(n){if(!t(n))throw new Error("Can only get "+r+" value of a "+r+" node");return e(n).getOr("")},getOption:e,set:function(n,e){if(!t(n))throw new Error("Can only set raw "+r+" value of a "+r+" node");n.dom().nodeValue=e}}}(ke,"text"),Ug=function(n){return $g.getOption(n)},Wg=["img","br"],_g=function(n){return Ug(n).filter(function(n){return 0!==n.trim().length||-1<n.indexOf("\xa0")}).isSome()||On(Wg,Se(n))},Xg={create:Me("start","soffset","finish","foffset")},qg=mt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Yg={before:qg.before,on:qg.on,after:qg.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(b,b,b)}},Kg=mt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Jg={domRange:Kg.domRange,relative:Kg.relative,exact:Kg.exact,exactFromRange:function(n){return Kg.exact(n.start(),n.soffset(),n.finish(),n.foffset())},getWin:function(n){var e,t=n.match({domRange:function(n){return be.fromDom(n.startContainer)},relative:function(n,e){return Yg.getStart(n)},exact:function(n,e,t,r){return n}});return e=t.dom().ownerDocument.defaultView,be.fromDom(e)},range:Xg.create},Qg=function(n,e,t){var r,o,i=n.document.createRange();return r=i,e.fold(function(n){r.setStartBefore(n.dom())},function(n,e){r.setStart(n.dom(),e)},function(n){r.setStartAfter(n.dom())}),o=i,t.fold(function(n){o.setEndBefore(n.dom())},function(n,e){o.setEnd(n.dom(),e)},function(n){o.setEndAfter(n.dom())}),i},Zg=function(n,e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom(),t),i.setEnd(r.dom(),o),i},np=function(n){return{left:h(n.left),top:h(n.top),right:h(n.right),bottom:h(n.bottom),width:h(n.width),height:h(n.height)}},ep=mt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),tp=function(n,e,t){return e(be.fromDom(t.startContainer),t.startOffset,be.fromDom(t.endContainer),t.endOffset)},rp=function(n,e){var o,t,r,i=(o=n,e.match({domRange:function(n){return{ltr:h(n),rtl:k.none}},relative:function(n,e){return{ltr:X(function(){return Qg(o,n,e)}),rtl:X(function(){return k.some(Qg(o,e,n))})}},exact:function(n,e,t,r){return{ltr:X(function(){return Zg(o,n,e,t,r)}),rtl:X(function(){return k.some(Zg(o,t,r,n,e))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return ep.rtl(be.fromDom(n.endContainer),n.endOffset,be.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return tp(0,ep.ltr,r)}):tp(0,ep.ltr,r)},op=function(n,e,t){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},ip=function(t,r,n,e,o){var i,u=function(n){var e=t.dom().createRange();return e.setStart(r.dom(),n),e.collapse(!0),e},c=(i=r,$g.get(i)).length,a=function(n,e,t,r,o){if(0===o)return 0;if(e===r)return o-1;for(var i=r,u=1;u<o;u++){var c=n(u),a=Math.abs(e-c.left);if(t<=c.bottom){if(t<c.top||i<a)return u-1;i=a}}return 0}(function(n){return u(n).getBoundingClientRect()},n,e,o.right,c);return u(a)},up=function(e,t,r,o){var n=e.dom().createRange();n.selectNode(t.dom());var i=n.getClientRects();return ni(i,function(n){return op(n,r,o)?k.some(n):k.none()}).map(function(n){return ip(e,t,r,o,n)})},cp=function(e,n,t,r){var o=e.dom().createRange(),i=qe(n);return ni(i,function(n){return o.selectNode(n.dom()),op(o.getBoundingClientRect(),t,r)?ap(e,n,t,r):k.none()})},ap=function(n,e,t,r){return(ke(e)?up:cp)(n,e,t,r)},fp=function(n){return _r(n,_g)},sp=function(n){return lp(n,_g)},lp=function(n,i){var u=function(n){for(var e=qe(n),t=e.length-1;0<=t;t--){var r=e[t];if(i(r))return k.some(r);var o=u(r);if(o.isSome())return o}return k.none()};return u(n)},dp=function(n,e){return e-n.left<n.right-e},mp=function(n,e,t){var r=n.dom().createRange();return r.selectNode(e.dom()),r.collapse(t),r},gp=function(e,n,t){var r=e.dom().createRange();r.selectNode(n.dom());var o=r.getBoundingClientRect(),i=dp(o,t);return(!0===i?fp:sp)(n).map(function(n){return mp(e,n,i)})},pp=function(n,e,t){var r=e.dom().getBoundingClientRect(),o=dp(r,t);return k.some(mp(n,e,o))},vp=function(n,e,t,r){var o=n.dom().createRange();o.selectNode(e.dom());var i=o.getBoundingClientRect();return function(n,e,t,r){var o=n.dom().createRange();o.selectNode(e.dom());var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,t)),c=Math.max(i.top,Math.min(i.bottom,r));return ap(n,e,u,c)}(n,e,Math.max(i.left,Math.min(i.right,t)),Math.max(i.top,Math.min(i.bottom,r)))},hp=(document.caretPositionFromPoint||document.caretRangeFromPoint,function(n,e){var t=Se(n);return"input"===t?Yg.after(n):On(["br","img"],t)?0===e?Yg.before(n):Yg.after(n):Yg.on(n,e)}),bp=function(n,e,t,r){var o,i,u,c,a,f=(i=e,u=t,c=r,(a=_e(o=n).dom().createRange()).setStart(o.dom(),i),a.setEnd(u.dom(),c),a),s=We(n,t)&&e===r;return f.collapsed&&!s},yp=function(n,e,t,r,o){var i,u,c=Zg(n,e,t,r,o);i=n,u=c,k.from(i.getSelection()).each(function(n){n.removeAllRanges(),n.addRange(u)})},xp=function(n,e,t,r,o){var i,u,c,a,l,f=(i=r,u=o,c=hp(e,t),a=hp(i,u),Jg.relative(c,a));rp(l=n,f).match({ltr:function(n,e,t,r){yp(l,n,e,t,r)},rtl:function(n,e,t,r){var o,i,u,c,a,f=l.getSelection();if(f.setBaseAndExtent)f.setBaseAndExtent(n.dom(),e,t.dom(),r);else if(f.extend)try{i=n,u=e,c=t,a=r,(o=f).collapse(i.dom(),u),o.extend(c.dom(),a)}catch(s){yp(l,t,r,n,e)}else yp(l,t,r,n,e)}})},wp=function(n){var e=be.fromDom(n.anchorNode),t=be.fromDom(n.focusNode);return bp(e,n.anchorOffset,t,n.focusOffset)?k.some(Xg.create(e,n.anchorOffset,t,n.focusOffset)):function(n){if(0<n.rangeCount){var e=n.getRangeAt(0),t=n.getRangeAt(n.rangeCount-1);return k.some(Xg.create(be.fromDom(e.startContainer),e.startOffset,be.fromDom(t.endContainer),t.endOffset))}return k.none()}(n)},Sp=function(n){return k.from(n.getSelection()).filter(function(n){return 0<n.rangeCount}).bind(wp)},Op=function(n,e){var i,t,r,o,u=rp(i=n,e).match({ltr:function(n,e,t,r){var o=i.document.createRange();return o.setStart(n.dom(),e),o.setEnd(t.dom(),r),o},rtl:function(n,e,t,r){var o=i.document.createRange();return o.setStart(t.dom(),r),o.setEnd(n.dom(),e),o}});return r=(t=u).getClientRects(),0<(o=0<r.length?r[0]:t.getBoundingClientRect()).width||0<o.height?k.some(o).map(np):k.none()},Tp=function(n){return{left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:h(2),height:n.height}},kp=function(n){return{left:h(n.left),top:h(n.top),right:h(n.right),bottom:h(n.bottom),width:h(n.width),height:h(n.height)}},Ep=function(r){if(r.collapsed){var o=be.fromDom(r.startContainer);return Xe(o).bind(function(n){var e,t=Jg.exact(o,r.startOffset,n,"img"===Se(e=n)?1:Ug(e).fold(function(){return qe(e).length},function(n){return n.length}));return Op(r.startContainer.ownerDocument.defaultView,t).map(Tp).map(Hn)}).getOr([])}return kn(r.getClientRects(),kp)},Cp=function(n){var e=n.getSelection();return e!==undefined&&0<e.rangeCount?Ep(e.getRangeAt(0)):[]},Dp=function(n){n.focus();var e=be.fromDom(n.document.body);(Lo().exists(function(n){return On(["input","textarea"],Se(n))})?function(n){Rg.setTimeout(function(){n()},0)}:f)(function(){Lo().each(Po),zo(e)})},Mp="data-"+Hi.resolve("last-outer-height"),Ip=function(n,e){wo(n,Mp,e)},Rp=function(n){return{top:h(n.top()),bottom:h(n.top()+n.height())}},Bp=function(n,e){var t=Lg(e,Mp),r=n.innerHeight;return r<t?k.some(t-r):k.none()},Ap=function(n,u){var e=be.fromDom(u.document.body),t=Mg(be.fromDom(n),"resize",function(){Bp(n,e).each(function(i){var n,e;(n=u,e=Cp(n),0<e.length?k.some(e[0]).map(Rp):k.none()).each(function(n){var e,t,r,o=(e=u,r=i,(t=n).top()>e.innerHeight||t.bottom()>e.innerHeight?Math.min(r,t.bottom()-e.innerHeight+50):0);0!==o&&u.scrollTo(u.pageXOffset,u.pageYOffset+o)})}),Ip(e,n.innerHeight)});Ip(e,n.innerHeight);return{toEditing:function(){Dp(u)},destroy:function(){t.unbind()}}},Fp=function(n){return k.some(be.fromDom(n.dom().contentWindow.document.body))},Vp=function(n){return k.some(be.fromDom(n.dom().contentWindow.document))},Np=function(n){return k.from(n.dom().contentWindow)},jp=function(n){return Np(n).bind(Sp)},Hp=function(n){return n.getFrame()},zp=function(n,t){return function(e){return e[n].getOrThunk(function(){var n=Hp(e);return function(){return t(n)}})()}},Pp=function(n,e,t,r){return n[t].getOrThunk(function(){return function(n){return Mg(e,r,n)}})},Lp=function(n){return{left:h(n.left),top:h(n.top),right:h(n.right),bottom:h(n.bottom),width:h(n.width),height:h(n.height)}},Gp={getBody:zp("getBody",Fp),getDoc:zp("getDoc",Vp),getWin:zp("getWin",Np),getSelection:zp("getSelection",jp),getFrame:Hp,getActiveApi:function(c){var a=Hp(c);return Fp(a).bind(function(u){return Vp(a).bind(function(i){return Np(a).map(function(o){var n=be.fromDom(i.dom().documentElement),e=c.getCursorBox.getOrThunk(function(){return function(){return(n=o,Sp(n).map(function(n){return Jg.exact(n.start(),n.soffset(),n.finish(),n.foffset())})).bind(function(n){return Op(o,n).orThunk(function(){return Sp(o).filter(function(n){return We(n.start(),n.finish())&&n.soffset()===n.foffset()}).bind(function(n){var e=n.start().dom().getBoundingClientRect();return 0<e.width||0<e.height?k.some(e).map(Lp):k.none()})})});var n}}),t=c.setSelection.getOrThunk(function(){return function(n,e,t,r){xp(o,n,e,t,r)}}),r=c.clearSelection.getOrThunk(function(){return function(){o.getSelection().removeAllRanges()}});return{body:h(u),doc:h(i),win:h(o),html:h(n),getSelection:l(jp,a),setSelection:t,clearSelection:r,frame:h(a),onKeyup:Pp(c,i,"onKeyup","keyup"),onNodeChanged:Pp(c,i,"onNodeChanged","SelectionChange"),onDomChanged:c.onDomChanged,onScrollToCursor:c.onScrollToCursor,onScrollToElement:c.onScrollToElement,onToReading:c.onToReading,onToEditing:c.onToEditing,onToolbarScrollStart:c.onToolbarScrollStart,onTouchContent:c.onTouchContent,onTapContent:c.onTapContent,onTouchToolstrip:c.onTouchToolstrip,getCursorBox:e}})})})}},$p="data-ephox-mobile-fullscreen-style",Up="position:absolute!important;",Wp="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",_p=Yn.detect().os.isAndroid(),Xp=function(n,e){var t,r,o,i=function(r){return function(n){var e=Oo(n,"style"),t=e===undefined?"no-styles":e.trim();t!==r&&(wo(n,$p,t),wo(n,"style",r))}},u=(t="*",ou(n,function(n){return Le(n,t)},r)),c=Vn(u,function(n){var e;return e="*",iu(n,function(n){return Le(n,e)})}),a=(o=qi(e,"background-color"))!==undefined&&""!==o?"background-color:"+o+"!important":"background-color:rgb(255,255,255)!important;";En(c,i("display:none!important;")),En(u,i(Up+Wp+a)),i((!0===_p?"":Up)+Wp+a)(n)},qp=function(){var n=$e("["+$p+"]");En(n,function(n){var e=Oo(n,$p);"no-styles"!==e?wo(n,"style",e):ko(n,"style"),ko(n,$p)})},Yp=function(){var e=cu("head").getOrDie(),n=cu('meta[name="viewport"]').getOrThunk(function(){var n=be.fromTag("meta");return wo(n,"name","viewport"),Ze(e,n),n}),t=Oo(n,"content");return{maximize:function(){wo(n,"content","width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0")},restore:function(){t!==undefined&&null!==t&&0<t.length?wo(n,"content",t):wo(n,"content","user-scalable=yes")}}},Kp=function(e,n){var t=Yp(),r=Xd(),o=Xd();return{enter:function(){n.hide(),Io(e.container,Hi.resolve("fullscreen-maximized")),Io(e.container,Hi.resolve("android-maximized")),t.maximize(),Io(e.body,Hi.resolve("android-scroll-reload")),r.set(Ap(e.win,Gp.getWin(e.editor).getOrDie("no"))),Gp.getActiveApi(e.editor).each(function(n){Xp(e.container,n.body()),o.set(Pg(n,e.toolstrip,e.alloy))})},exit:function(){t.restore(),n.show(),Bo(e.container,Hi.resolve("fullscreen-maximized")),Bo(e.container,Hi.resolve("android-maximized")),qp(),Bo(e.body,Hi.resolve("android-scroll-reload")),o.clear(),r.clear()}}},Jp=function(t,r){var o=null;return{cancel:function(){null!==o&&(v.clearTimeout(o),o=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null!==o&&v.clearTimeout(o),o=v.setTimeout(function(){t.apply(null,n),o=null},r)}}},Qp=function(n,e){var t,r,o,i=Jl(hd.sketch({dom:Bf('<div aria-hidden="true" class="${prefix}-mask-tap-icon"></div>'),containerBehaviours:po([Ai.config({toggleClass:Hi.resolve("mask-tap-icon-selected"),toggleOnExecute:!1})])})),u=(t=n,r=200,o=null,{cancel:function(){null!==o&&(v.clearTimeout(o),o=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null===o&&(o=v.setTimeout(function(){t.apply(null,n),o=null},r))}});return hd.sketch({dom:Bf('<div class="${prefix}-disabled-mask"></div>'),components:[hd.sketch({dom:Bf('<div class="${prefix}-content-container"></div>'),components:[Mf.sketch({dom:Bf('<div class="${prefix}-content-tap-section"></div>'),components:[i.asSpec()],action:function(n){u.throttle()},buttonBehaviours:po([Ai.config({toggleClass:Hi.resolve("mask-tap-icon-selected")})])})]})]})},Zp=sr([Mr("editor",[Cr("getFrame"),Ir("getBody"),Ir("getDoc"),Ir("getWin"),Ir("getSelection"),Ir("setSelection"),Ir("clearSelection"),Ir("cursorSaver"),Ir("onKeyup"),Ir("onNodeChanged"),Ir("getCursorBox"),Cr("onDomChanged"),Fr("onTouchContent",x),Fr("onTapContent",x),Fr("onTouchToolstrip",x),Fr("onScrollToCursor",h({unbind:x})),Fr("onScrollToElement",h({unbind:x})),Fr("onToEditing",h({unbind:x})),Fr("onToReading",h({unbind:x})),Fr("onToolbarScrollStart",b)]),Cr("socket"),Cr("toolstrip"),Cr("dropup"),Cr("toolbar"),Cr("container"),Cr("alloy"),Nr("win",function(n){return _e(n.socket).dom().defaultView}),Nr("body",function(n){return be.fromDom(n.socket.dom().ownerDocument.body)}),Fr("translate",b),Fr("setReadOnly",x),Fr("readOnlyOnInit",h(!0))]),nv=function(n){var e=Sr("Getting AndroidWebapp schema",Zp,n);_i(e.toolstrip,"width","100%");var t=Em(Qp(function(){e.setReadOnly(e.readOnlyOnInit()),o.enter()},e.translate));e.alloy.add(t);var r={show:function(){e.alloy.add(t)},hide:function(){e.alloy.remove(t)}};Ze(e.container,t.element());var o=Kp(e,r);return{setReadOnly:e.setReadOnly,refreshStructure:x,enter:o.enter,exit:o.exit,destroy:x}},ev=h([Cr("dom"),Fr("shell",!0),Ta("toolbarBehaviours",[Xm])]),tv=h([Za({name:"groups",overrides:function(n){return{behaviours:po([Xm.config({})])}}})]),rv=Df({name:"Toolbar",configFields:ev(),partFields:tv(),factory:function(e,n,t,r){var o=function(n){return e.shell?k.some(n):af(n,e,"groups")},i=e.shell?{behaviours:[Xm.config({})],components:[]}:{behaviours:[],components:n};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:Ea(e.toolbarBehaviours,i.behaviours),apis:{setGroups:function(n,e){o(n).fold(function(){throw v.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(n){Xm.set(n,e)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(n,e,t){n.setGroups(e,t)}}}),ov=h([Cr("items"),(Gg=["itemSelector"],Mr("markers",kn(Gg,Cr))),Ta("tgroupBehaviours",[Oa])]),iv=h([nf({name:"items",unit:"item"})]),uv=Df({name:"ToolbarGroup",configFields:ov(),partFields:iv(),factory:function(n,e,t,r){return{uid:n.uid,dom:n.dom,components:e,behaviours:Ea(n.tgroupBehaviours,[Oa.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),cv="data-"+Hi.resolve("horizontal-scroll"),av=function(n){return"true"===Oo(n,cv)?0<(t=n).dom().scrollLeft||function(n){n.dom().scrollLeft=1;var e=0!==n.dom().scrollLeft;return n.dom().scrollLeft=0,e}(t):0<(e=n).dom().scrollTop||function(n){n.dom().scrollTop=1;var e=0!==n.dom().scrollTop;return n.dom().scrollTop=0,e}(e);var e,t},fv={exclusive:function(n,e){return Mg(n,"touchmove",function(n){su(n.target(),e).filter(av).fold(function(){n.raw().preventDefault()},x)})},markAsHorizontal:function(n){wo(n,cv,"true")}};function sv(){var e=function(n){var e=!0===n.scrollable?"${prefix}-toolbar-scrollable-group":"";return{dom:Bf('<div aria-label="'+n.label+'" class="${prefix}-toolbar-group '+e+'"></div>'),tgroupBehaviours:po([md("adhoc-scrollable-toolbar",!0===n.scrollable?[ro(function(n,e){_i(n.element(),"overflow-x","auto"),fv.markAsHorizontal(n.element()),fg.register(n.element())})]:[])]),components:[hd.sketch({components:[uv.parts().items({})]})],markers:{itemSelector:"."+Hi.resolve("toolbar-group-item")},items:n.items}},t=Em(rv.sketch({dom:Bf('<div class="${prefix}-toolbar"></div>'),components:[rv.parts().groups({})],toolbarBehaviours:po([Ai.config({toggleClass:Hi.resolve("context-toolbar"),toggleOnExecute:!1,aria:{mode:"none"}}),Oa.config({mode:"cyclic"})]),shell:!0})),n=Em(hd.sketch({dom:{classes:[Hi.resolve("toolstrip")]},components:[Cm(t)],containerBehaviours:po([Ai.config({toggleClass:Hi.resolve("android-selection-context-toolbar"),toggleOnExecute:!1})])})),r=function(){rv.setGroups(t,o.get()),Ai.off(t)},o=Ho([]);return{wrapper:h(n),toolbar:h(t),createGroups:function(n){return kn(n,p(uv.sketch,e))},setGroups:function(n){o.set(n),r()},setContextToolbar:function(n){Ai.on(t),rv.setGroups(t,n)},restoreToolbar:function(){Ai.isOn(t)&&r()},refresh:function(){},focus:function(){Oa.focusIn(t)}}}var lv,dv=function(n,e){Xm.append(n,Cm(e))},mv=function(n,e){Xm.remove(n,e)},gv=function(n){return Em(Mf.sketch({dom:Bf('<div class="${prefix}-mask-edit-icon ${prefix}-icon"></div>'),action:function(){n.run(function(n){n.setReadOnly(!1)})}}))},pv=function(){return Em(hd.sketch({dom:Bf('<div class="${prefix}-editor-socket"></div>'),components:[],containerBehaviours:po([Xm.config({})])}))},vv=function(n,e,t,r){(!0===t?jo.toAlpha:jo.toOmega)(r),(t?dv:mv)(n,e)},hv=function(e,n){return n.getAnimationRoot.fold(function(){return e.element()},function(n){return n(e)})},bv=function(n){return n.dimension.property},yv=function(n,e){return n.dimension.getDimension(e)},xv=function(n,e){var t=hv(n,e);vm(t,[e.shrinkingClass,e.growingClass])},wv=function(n,e){Bo(n.element(),e.openClass),Io(n.element(),e.closedClass),_i(n.element(),bv(e),"0px"),Qi(n.element())},Sv=function(n,e){Bo(n.element(),e.closedClass),Io(n.element(),e.openClass),Ji(n.element(),bv(e))},Ov=function(n,e,t,r){t.setCollapsed(),_i(n.element(),bv(e),yv(e,n.element())),Qi(n.element()),xv(n,e),wv(n,e),e.onStartShrink(n),e.onShrunk(n)},Tv=function(n,e,t,r){var o=r.getOrThunk(function(){return yv(e,n.element())});t.setCollapsed(),_i(n.element(),bv(e),o),Qi(n.element());var i=hv(n,e);Bo(i,e.growingClass),Io(i,e.shrinkingClass),wv(n,e),e.onStartShrink(n)},kv=function(n,e,t){var r=yv(e,n.element());("0px"===r?Ov:Tv)(n,e,t,k.some(r))},Ev=function(n,e,t){var r=hv(n,e),o=Ao(r,e.shrinkingClass),i=yv(e,n.element());Sv(n,e);var u=yv(e,n.element());(o?function(){_i(n.element(),bv(e),i),Qi(n.element())}:function(){wv(n,e)})(),Bo(r,e.shrinkingClass),Io(r,e.growingClass),Sv(n,e),_i(n.element(),bv(e),u),t.setExpanded(),e.onStartGrow(n)},Cv=function(n,e,t){var r=hv(n,e);return!0===Ao(r,e.growingClass)},Dv=function(n,e,t){var r=hv(n,e);return!0===Ao(r,e.shrinkingClass)},Mv=/* */Object.freeze({refresh:function(n,e,t){if(t.isExpanded()){Ji(n.element(),bv(e));var r=yv(e,n.element());_i(n.element(),bv(e),r)}},grow:function(n,e,t){t.isExpanded()||Ev(n,e,t)},shrink:function(n,e,t){t.isExpanded()&&kv(n,e,t)},immediateShrink:function(n,e,t){t.isExpanded()&&Ov(n,e,t)},hasGrown:function(n,e,t){return t.isExpanded()},hasShrunk:function(n,e,t){return t.isCollapsed()},isGrowing:Cv,isShrinking:Dv,isTransitioning:function(n,e,t){return!0===Cv(n,e)||!0===Dv(n,e)},toggleGrow:function(n,e,t){(t.isExpanded()?kv:Ev)(n,e,t)},disableTransitions:xv}),Iv=/* */Object.freeze({exhibit:function(n,e){var t=e.expanded;return co(t?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:Rt(e.dimension.property,"0px")})},events:function(t,r){return qr([(n=W(),e=function(n,e){e.event().raw().propertyName===t.dimension.property&&(xv(n,t),r.isExpanded()&&Ji(n.element(),t.dimension.property),(r.isExpanded()?t.onGrown:t.onShrunk)(n))},Qr(n)(e))]);var n,e}}),Rv=[Cr("closedClass"),Cr("openClass"),Cr("shrinkingClass"),Cr("growingClass"),Ir("getAnimationRoot"),mi("onShrunk"),mi("onStartShrink"),mi("onGrown"),mi("onStartGrow"),Fr("expanded",!1),Dr("dimension",Tr("property",{width:[hi("property","width"),hi("getDimension",function(n){return xs(n)+"px"})],height:[hi("property","height"),hi("getDimension",function(n){return ru(n)+"px"})]}))],Bv=ho({fields:Rv,name:"sliding",active:Iv,apis:Mv,state:/* */Object.freeze({init:function(n){var e=Ho(n.expanded);return go({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:l(e.set,!1),setExpanded:l(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),Av=function(e,t){var r=Em(hd.sketch({dom:{tag:"div",classes:[Hi.resolve("dropup")]},components:[],containerBehaviours:po([Xm.config({}),Bv.config({closedClass:Hi.resolve("dropup-closed"),openClass:Hi.resolve("dropup-open"),shrinkingClass:Hi.resolve("dropup-shrinking"),growingClass:Hi.resolve("dropup-growing"),dimension:{property:"height"},onShrunk:function(n){e(),t(),Xm.set(n,[])},onGrown:function(n){e(),t()}}),Vi(function(n,e){o(x)})])})),o=function(n){v.window.requestAnimationFrame(function(){n(),Bv.shrink(r)})};return{appear:function(n,e,t){!0===Bv.hasShrunk(r)&&!1===Bv.isTransitioning(r)&&v.window.requestAnimationFrame(function(){e(t),Xm.set(r,[n()]),Bv.grow(r)})},disappear:o,component:h(r),element:r.element}},Fv=function(n){var e,t;return 8===n.raw().which&&!On(["input","textarea"],Se(n.target()))&&(e=n.target(),!su(e,'[contenteditable="true"]',t).isSome())},Vv=Yn.detect().browser.isFirefox(),Nv=fr([(lv="triggerEvent",Dr(lv,Er)),Fr("stopBackspace",!0)]),jv=function(e,n){var t,r,o,i,u=Sr("Getting GUI events settings",Nv,n),c=Yn.detect().deviceType.isTouch()?["touchstart","touchmove","touchend","gesturestart"]:["mousedown","mouseup","mouseover","mousemove","mouseout","click"],a=jg(u),f=kn(c.concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return Mg(e,n,function(e){a.fireIfReady(e,n).each(function(n){n&&e.kill()}),u.triggerEvent(n,e)&&e.kill()})}),s=Ho(k.none()),l=Mg(e,"paste",function(e){a.fireIfReady(e,"paste").each(function(n){n&&e.kill()}),u.triggerEvent("paste",e)&&e.kill(),s.set(k.some(v.setTimeout(function(){u.triggerEvent(Zn(),e)},0)))}),d=Mg(e,"keydown",function(n){u.triggerEvent("keydown",n)?n.kill():!0===u.stopBackspace&&Fv(n)&&n.prevent()}),m=(t=e,r=function(n){u.triggerEvent("focusin",n)&&n.kill()},Vv?Ig(t,"focus",r):Mg(t,"focusin",r)),g=Ho(k.none()),p=(o=e,i=function(n){u.triggerEvent("focusout",n)&&n.kill(),g.set(k.some(v.setTimeout(function(){u.triggerEvent(Qn(),n)},0)))},Vv?Ig(o,"blur",i):Mg(o,"focusout",i));return{unbind:function(){En(f,function(n){n.unbind()}),d.unbind(),m.unbind(),p.unbind(),l.unbind(),s.get().each(v.clearTimeout),g.get().each(v.clearTimeout)}}},Hv=function(n,e){var t=It(n,"target").map(function(n){return n()}).getOr(e);return Ho(t)},zv=mt([{stopped:[]},{resume:["element"]},{complete:[]}]),Pv=function(n,r,e,t,o,i){var u,c,a,f,s=n(r,t),l=(u=e,c=o,a=Ho(!1),f=Ho(!1),{stop:function(){a.set(!0)},cut:function(){f.set(!0)},isStopped:a.get,isCut:f.get,event:h(u),setSource:c.set,getSource:c.get});return s.fold(function(){return i.logEventNoHandlers(r,t),zv.complete()},function(e){var t=e.descHandler();return am(t)(l),l.isStopped()?(i.logEventStopped(r,e.element(),t.purpose()),zv.stopped()):l.isCut()?(i.logEventCut(r,e.element(),t.purpose()),zv.complete()):Xe(e.element()).fold(function(){return i.logNoParent(r,e.element(),t.purpose()),zv.complete()},function(n){return i.logEventResponse(r,e.element(),t.purpose()),zv.resume(n)})})},Lv=function(e,t,r,n,o,i){return Pv(e,t,r,n,o,i).fold(function(){return!0},function(n){return Lv(e,t,r,n,o,i)},function(){return!1})},Gv=function(n,e,t){var r,o,i=(r=e,o=Ho(!1),{stop:function(){o.set(!0)},cut:x,isStopped:o.get,isCut:h(!1),event:h(r),setSource:c("Cannot set source of a broadcasted event"),getSource:c("Cannot get source of a broadcasted event")});return En(n,function(n){var e=n.descHandler();am(e)(i)}),i.isStopped()},$v=function(n,e,t,r,o){var i=Hv(t,r);return Lv(n,e,t,r,i,o)},Uv=Me("element","descHandler"),Wv=function(n,e){return{id:h(n),descHandler:h(e)}};function _v(){var i={};return{registerId:function(r,o,n){D(n,function(n,e){var t=i[e]!==undefined?i[e]:{};t[o]=cm(n,r),i[e]=t})},unregisterId:function(t){D(i,function(n,e){n.hasOwnProperty(t)&&delete n[t]})},filterByType:function(n){return It(i,n).map(function(n){return R(n,function(n,e){return Wv(e,n)})}).getOr([])},find:function(n,e,t){var o=Dt(e)(i);return Xr(t,function(n){return t=o,xf(r=n).fold(function(){return k.none()},function(n){var e=Dt(n);return t.bind(e).map(function(n){return Uv(r,n)})});var t,r},n)}}}function Xv(){var r=_v(),o={},i=function(r){var n=r.element();return xf(n).fold(function(){return n="uid-",e=r.element(),t=Ha(hf+n),yf(e,t),t;var n,e,t},function(n){return n})},u=function(n){xf(n.element()).each(function(n){delete o[n],r.unregisterId(n)})};return{find:function(n,e,t){return r.find(n,e,t)},filter:function(n){return r.filterByType(n)},register:function(n){var e=i(n);Ft(o,e)&&function(n,e){var t=o[e];if(t!==n)throw new Error('The tagId "'+e+'" is already used by: '+Jo(t.element())+"\nCannot use it for: "+Jo(n.element())+"\nThe conflicting element is"+(Ee(t.element())?" ":" not ")+"already in the DOM");u(n)}(n,e);var t=[n];r.registerId(t,e,n.events()),o[e]=n},unregister:u,getById:function(n){return Dt(n)(o)}}}var qv=function(t){var r=function(e){return Xe(t.element()).fold(function(){return!0},function(n){return We(e,n)})},o=Xv(),f=function(n,e){return o.find(r,n,e)},n=jv(t.element(),{triggerEvent:function(u,c){return ui(u,c.target(),function(n){return e=f,t=u,o=n,i=(r=c).target(),$v(e,t,r,i,o);var e,t,r,o,i})}}),i={debugInfo:h("real"),triggerEvent:function(e,t,r){ui(e,t,function(n){$v(f,e,r,t,n)})},triggerFocus:function(c,a){xf(c).fold(function(){zo(c)},function(n){ui(Jn(),c,function(n){var e,t,r,o,i,u;e=f,t=Jn(),r={originator:h(a),kill:x,prevent:x,target:h(c)},i=n,u=Hv(r,o=c),Pv(e,t,r,o,u,i)})})},triggerEscape:function(n,e){i.triggerEvent("keydown",n.element(),e.event())},getByUid:function(n){return g(n)},getByDom:function(n){return p(n)},build:Em,addToGui:function(n){c(n)},removeFromGui:function(n){a(n)},addToWorld:function(n){e(n)},removeFromWorld:function(n){u(n)},broadcast:function(n){l(n)},broadcastOn:function(n,e){d(n,e)},broadcastEvent:function(n,e){m(n,e)},isConnected:h(!0)},e=function(n){n.connect(i),ke(n.element())||(o.register(n),En(n.components(),e),i.triggerEvent(ue(),n.element(),{target:h(n.element())}))},u=function(n){ke(n.element())||(En(n.components(),u),o.unregister(n)),n.disconnect()},c=function(n){it(t,n)},a=function(n){at(n)},s=function(t){var n=o.filter(ne());En(n,function(n){var e=n.descHandler();am(e)(t)})},l=function(n){s({universal:h(!0),data:h(n)})},d=function(n,e){s({universal:h(!1),channels:h(n),data:h(e)})},m=function(n,e){var t=o.filter(n);return Gv(t,e)},g=function(n){return o.getById(n).fold(function(){return dt.error(new Error('Could not find component with uid: "'+n+'" in system.'))},dt.value)},p=function(n){var e=xf(n).getOr("not found");return g(e)};return e(t),{root:h(t),element:t.element,destroy:function(){n.unbind(),tt(t.element())},add:c,remove:a,getByUid:g,getByDom:p,addToWorld:e,removeFromWorld:u,broadcast:l,broadcastOn:d,broadcastEvent:m}},Yv=h(Hi.resolve("readonly-mode")),Kv=h(Hi.resolve("edit-mode"));function Jv(n){var e=Em(hd.sketch({dom:{classes:[Hi.resolve("outer-container")].concat(n.classes)},containerBehaviours:po([jo.config({alpha:Yv(),omega:Kv()})])}));return qv(e)}var Qv=function(n,e){var t=be.fromTag("input");Xi(t,{opacity:"0",position:"absolute",top:"-1000px",left:"-1000px"}),Ze(n,t),zo(t),e(t),tt(t)},Zv=function(n){var e=n.getSelection();if(0<e.rangeCount){var t=e.getRangeAt(0),r=n.document.createRange();r.setStart(t.startContainer,t.startOffset),r.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(r)}},nh=function(n,e){Lo().each(function(n){We(n,e)||Po(n)}),n.focus(),zo(be.fromDom(n.document.body)),Zv(n)},eh={stubborn:function(n,e,t,r){var o=function(){nh(e,r)},i=Mg(t,"keydown",function(n){On(["input","textarea"],Se(n.target()))||o()});return{toReading:function(){Qv(n,Po)},toEditing:o,onToolbarTouch:function(){},destroy:function(){i.unbind()}}},timid:function(n,e,t,r){var o=function(){Po(r)};return{toReading:function(){o()},toEditing:function(){nh(e,r)},onToolbarTouch:function(){o()},destroy:x}}},th=function(t,r,o,i,n){var u=function(){r.run(function(n){n.refreshSelection()})},e=function(n,e){var t=n-i.dom().scrollTop;r.run(function(n){n.scrollIntoView(t,t+e)})},c=function(){r.run(function(n){n.clearSelection()})},a=function(){t.getCursorBox().each(function(n){e(n.top(),n.height())}),r.run(function(n){n.syncHeight()})},f=Hg(t),s=Jp(a,300),l=[t.onKeyup(function(){c(),s.throttle()}),t.onNodeChanged(u),t.onDomChanged(s.throttle),t.onDomChanged(u),t.onScrollToCursor(function(n){n.preventDefault(),s.throttle()}),t.onScrollToElement(function(n){n.element(),e(r,i)}),t.onToEditing(function(){r.run(function(n){n.toEditing()})}),t.onToReading(function(){r.run(function(n){n.toReading()})}),Mg(t.doc(),"touchend",function(n){We(t.html(),n.target())||We(t.body(),n.target())}),Mg(o,"transitionend",function(n){var e;"height"===n.raw().propertyName&&(e=ru(o),r.run(function(n){n.setViewportOffset(e)}),u(),a())}),Ig(o,"touchstart",function(n){var e;r.run(function(n){n.highlightSelection()}),e=n,r.run(function(n){n.onToolbarTouch(e)}),t.onTouchToolstrip()}),Mg(t.body(),"touchstart",function(n){c(),t.onTouchContent(),f.fireTouchstart(n)}),f.onTouchmove(),f.onTouchend(),Mg(t.body(),"click",function(n){n.kill()}),Mg(o,"touchmove",function(){t.onToolbarScrollStart()})];return{destroy:function(){En(l,function(n){n.unbind()})}}};var rh=function(n){var t=k.none(),e=[],r=function(n){o()?u(n):e.push(n)},o=function(){return t.isSome()},i=function(n){En(n,u)},u=function(e){t.each(function(n){v.setTimeout(function(){e(n)},0)})};return n(function(n){t=k.some(n),i(e),e=[]}),{get:r,map:function(t){return rh(function(e){r(function(n){e(t(n))})})},isReady:o}},oh={nu:rh,pure:function(e){return rh(function(n){n(e)})}},ih=function(e){var n=function(n){var r;e((r=n,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=this;v.setTimeout(function(){r.apply(t,n)},0)}))},t=function(){return oh.nu(n)};return{map:function(r){return ih(function(t){n(function(n){var e=r(n);t(e)})})},bind:function(t){return ih(function(e){n(function(n){t(n).get(e)})})},anonBind:function(t){return ih(function(e){n(function(n){t.get(e)})})},toLazy:t,toCached:function(){var e=null;return ih(function(n){null===e&&(e=t()),e.get(n)})},get:n}},uh={nu:ih,pure:function(e){return ih(function(n){n(e)})}},ch=function(n,e,t){return Math.abs(n-e)<=t?k.none():n<e?k.some(n+t):k.some(n-t)},ah=function(){var f=null;return{animate:function(r,o,n,i,e,t){var u=!1,c=function(n){u=!0,e(n)};Rg.clearInterval(f);var a=function(n){Rg.clearInterval(f),c(n)};f=Rg.setInterval(function(){var t=r();ch(t,o,n).fold(function(){Rg.clearInterval(f),c(o)},function(n){if(i(n,a),!u){var e=r();(e!==n||Math.abs(e-o)>Math.abs(t-o))&&(Rg.clearInterval(f),c(o))}})},t)}}},fh=function(e,t){return ni([{width:320,height:480,keyboard:{portrait:300,landscape:240}},{width:320,height:568,keyboard:{portrait:300,landscape:240}},{width:375,height:667,keyboard:{portrait:305,landscape:240}},{width:414,height:736,keyboard:{portrait:320,landscape:240}},{width:768,height:1024,keyboard:{portrait:320,landscape:400}},{width:1024,height:1366,keyboard:{portrait:380,landscape:460}}],function(n){return e<=n.width&&t<=n.height?k.some(n.keyboard):k.none()}).getOr({portrait:t/5,landscape:e/4})},sh=function(n){var e,t=Ag(n).isPortrait(),r=fh((e=n).screen.width,e.screen.height),o=t?r.portrait:r.landscape;return(t?n.screen.height:n.screen.width)-n.innerHeight>o?0:o},lh=function(n,e){var t=_e(n).dom().defaultView;return ru(n)+ru(e)-sh(t)},dh=lh,mh=function(n,e,t){var r=lh(e,t),o=ru(e)+ru(t)-r;_i(n,"padding-bottom",o+"px")},gh=mt([{fixed:["element","property","offsetY"]},{scroller:["element","offsetY"]}]),ph="data-"+Hi.resolve("position-y-fixed"),vh="data-"+Hi.resolve("y-property"),hh="data-"+Hi.resolve("scrolling"),bh="data-"+Hi.resolve("last-window-height"),yh=function(n){return Lg(n,ph)},xh=function(n,e){var t=Oo(n,vh);return gh.fixed(n,t,e)},wh=function(n,e){return gh.scroller(n,e)},Sh=function(n){var e=yh(n);return("true"===Oo(n,hh)?wh:xh)(n,e)},Oh=function(n,e,t){var r=_e(n).dom().defaultView.innerHeight;return wo(n,bh,r+"px"),r-e-t},Th=function(n){var e=uu(n,"["+ph+"]");return kn(e,Sh)},kh=function(r,o,i,u){var e=_e(r).dom().defaultView,n=(y=i,x=Oo(y,"style"),Xi(y,{position:"absolute",top:"0px"}),wo(y,ph,"0px"),wo(y,vh,"top"),{restore:function(){wo(y,"style",x||""),ko(y,ph),ko(y,vh)}}),t=ru(i),c=ru(u),a=(p=t,v=Oh(r,t,c),h=r,b=Oo(h,"style"),fg.register(h),Xi(h,{position:"absolute",height:v+"px",width:"100%",top:p+"px"}),wo(h,ph,p+"px"),wo(h,hh,"true"),wo(h,vh,"top"),{restore:function(){fg.deregister(h),wo(h,"style",b||""),ko(h,ph),ko(h,hh),ko(h,vh)}}),f=(m=u,g=Oo(m,"style"),Xi(m,{position:"absolute",bottom:"0px"}),wo(m,ph,"0px"),wo(m,vh,"bottom"),{restore:function(){wo(m,"style",g||""),ko(m,ph),ko(m,vh)}}),s=!0,l=function(){var n=e.innerHeight;return Lg(r,bh)<n},d=function(){if(s){var n=ru(i),e=ru(u),t=Oh(r,n,e);wo(r,ph,n+"px"),_i(r,"height",t+"px"),mh(o,r,u)}};var m,g;var p,v,h,b;var y,x;return mh(o,r,u),{setViewportOffset:function(n){wo(r,ph,n+"px"),d()},isExpanding:l,isShrinking:w(l),refresh:d,restore:function(){s=!1,n.restore(),a.restore(),f.restore()}}},Eh=yh,Ch=ah(),Dh="data-"+Hi.resolve("last-scroll-top"),Mh=function(n){var e=Ki(n,"top").getOr("0");return parseInt(e,10)},Ih=function(n){return parseInt(n.dom().scrollTop,10)},Rh=function(n,e){var t=e+Eh(n)+"px";_i(n,"top",t)},Bh=function(t,r,o){return uh.nu(function(n){var e=l(Ih,t);Ch.animate(e,r,15,function(n){t.dom().scrollTop=n,_i(t,"top",Mh(t)+15+"px")},function(){t.dom().scrollTop=r,_i(t,"top",o+"px"),n(r)},10)})},Ah=function(o,i){return uh.nu(function(n){var e=l(Ih,o);wo(o,Dh,e());var t=Math.abs(i-e()),r=Math.ceil(t/10);Ch.animate(e,i,r,function(n,e){Lg(o,Dh)!==o.dom().scrollTop?e(o.dom().scrollTop):(o.dom().scrollTop=n,wo(o,Dh,n))},function(){o.dom().scrollTop=i,wo(o,Dh,i),n(i)},10)})},Fh=function(i,u){return uh.nu(function(n){var e=l(Mh,i),t=function(n){_i(i,"top",n+"px")},r=Math.abs(u-e()),o=Math.ceil(r/10);Ch.animate(e,u,o,t,function(){t(u),n(u)},10)})},Vh=function(e,t,r){var o=_e(e).dom().defaultView;return uh.nu(function(n){Rh(e,r),Rh(t,r),o.scrollTo(0,r),n(r)})};var Nh=function(n,e,t,r,o){var i=dh(e,t),u=l(Zv,n);i<r||i<o?Ah(e,e.dom().scrollTop-i+o).get(u):r<0&&Ah(e,e.dom().scrollTop+r).get(u)},jh=function(u,n){return n(function(r){var o=[],i=0;0===u.length?r([]):En(u,function(n,e){var t;n.get((t=e,function(n){o[t]=n,++i>=u.length&&r(o)}))})})},Hh=function(n,a){return n.fold(function(n,e,t){return _i(n,e,a+(r=t)+"px"),uh.pure(r);var r},function(n,e){return o=a+(r=e),i=Ki(t=n,"top").getOr(r),u=o-parseInt(i,10),c=t.dom().scrollTop+u,Bh(t,c,o);var t,r,o,i,u,c})},zh=function(n,e){var t=Th(n),r=kn(t,function(n){return Hh(n,e)});return jh(r,uh.nu)},Ph=function(e,t,n,r,o,i){var u=function f(t){var r=Ho(oh.pure({}));return{start:function(e){var n=oh.nu(function(n){return t(e).get(n)});r.set(n)},idle:function(n){r.get().get(function(){n()})}}}(function(n){return Vh(e,t,n)}),c=Jp(function(){u.idle(function(){zh(n,r.pageYOffset).get(function(){var n;(n=Cp(i),k.from(n[0]).bind(function(n){var e=n.top()-t.dom().scrollTop;return e>r.innerHeight+5||e<-5?k.some({top:h(e),bottom:h(e+n.height())}):k.none()})).each(function(n){t.dom().scrollTop=t.dom().scrollTop+n.top()}),u.start(0),o.refresh()})})},1e3),a=Mg(be.fromDom(r),"scroll",function(){r.pageYOffset<0||c.throttle()});return zh(n,r.pageYOffset).get(b),{unbind:a.unbind}},Lh=function(n){var t=n.cWin(),e=n.ceBody(),r=n.socket(),o=n.toolstrip(),i=n.toolbar(),u=n.contentElement(),c=n.keyboardType(),a=n.outerWindow(),f=n.dropup(),s=kh(r,e,o,f),l=c(n.outerBody(),t,Ce(),u,o,i),d=Fg(a,{onChange:x,onReady:s.refresh});d.onAdjustment(function(){s.refresh()});var m=Mg(be.fromDom(a),"resize",function(){s.isExpanding()&&s.refresh()}),g=Ph(o,r,n.outerBody(),a,s,t),p=function h(t,e){var n=t.document,r=be.fromTag("div");Io(r,Hi.resolve("unfocused-selections")),Ze(be.fromDom(n.documentElement),r);var o=Mg(r,"touchstart",function(n){n.prevent(),nh(t,e),u()}),i=function(n){var e=be.fromTag("span");return pm(e,[Hi.resolve("layer-editor"),Hi.resolve("unfocused-selection")]),Xi(e,{left:n.left()+"px",top:n.top()+"px",width:n.width()+"px",height:n.height()+"px"}),e},u=function(){et(r)};return{update:function(){u();var n=Cp(t),e=kn(n,i);nt(r,e)},isActive:function(){return 0<qe(r).length},destroy:function(){o.unbind(),tt(r)},clear:u}}(t,u),v=function(){p.clear()};return{toEditing:function(){l.toEditing(),v()},toReading:function(){l.toReading()},onToolbarTouch:function(n){l.onToolbarTouch(n)},refreshSelection:function(){p.isActive()&&p.update()},clearSelection:v,highlightSelection:function(){p.update()},scrollIntoView:function(n,e){Nh(t,r,f,n,e)},updateToolbarPadding:x,setViewportOffset:function(n){s.setViewportOffset(n),Fh(r,n).get(b)},syncHeight:function(){_i(u,"height",u.dom().contentWindow.document.body.scrollHeight+"px")},refreshStructure:s.refresh,destroy:function(){s.restore(),d.destroy(),g.unbind(),m.unbind(),l.destroy(),p.destroy(),Qv(Ce(),Po)}}},Gh=function(r,n){var o=Yp(),i=qd(),u=qd(),c=Xd(),a=Xd();return{enter:function(){n.hide();var t=be.fromDom(v.document);Gp.getActiveApi(r.editor).each(function(n){i.set({socketHeight:Ki(r.socket,"height"),iframeHeight:Ki(n.frame(),"height"),outerScroll:v.document.body.scrollTop}),u.set({exclusives:fv.exclusive(t,"."+fg.scrollable())}),Io(r.container,Hi.resolve("fullscreen-maximized")),Xp(r.container,n.body()),o.maximize(),_i(r.socket,"overflow","scroll"),_i(r.socket,"-webkit-overflow-scrolling","touch"),zo(n.body());var e=Be(["cWin","ceBody","socket","toolstrip","toolbar","dropup","contentElement","cursor","keyboardType","isScrolling","outerWindow","outerBody"],[]);c.set(Lh(e({cWin:n.win(),ceBody:n.body(),socket:r.socket,toolstrip:r.toolstrip,toolbar:r.toolbar,dropup:r.dropup.element(),contentElement:n.frame(),cursor:x,outerBody:r.body,outerWindow:r.win,keyboardType:eh.stubborn,isScrolling:function(){return u.get().exists(function(n){return n.socket.isScrolling()})}}))),c.run(function(n){n.syncHeight()}),a.set(th(n,c,r.toolstrip,r.socket,r.dropup))})},refreshStructure:function(){c.run(function(n){n.refreshStructure()})},exit:function(){o.restore(),a.clear(),c.clear(),n.show(),i.on(function(n){n.socketHeight.each(function(n){_i(r.socket,"height",n)}),n.iframeHeight.each(function(n){_i(r.editor.getFrame(),"height",n)}),v.document.body.scrollTop=n.scrollTop}),i.clear(),u.on(function(n){n.exclusives.unbind()}),u.clear(),Bo(r.container,Hi.resolve("fullscreen-maximized")),qp(),fg.deregister(r.toolbar),Ji(r.socket,"overflow"),Ji(r.socket,"-webkit-overflow-scrolling"),Po(r.editor.getFrame()),Gp.getActiveApi(r.editor).each(function(n){n.clearSelection()})}}},$h=function(n){var e=Sr("Getting IosWebapp schema",Zp,n);_i(e.toolstrip,"width","100%"),_i(e.container,"position","relative");var t=Em(Qp(function(){e.setReadOnly(e.readOnlyOnInit()),o.enter()},e.translate));e.alloy.add(t);var r={show:function(){e.alloy.add(t)},hide:function(){e.alloy.remove(t)}},o=Gh(e,r);return{setReadOnly:e.setReadOnly,refreshStructure:o.refreshStructure,enter:o.enter,exit:o.exit,destroy:x}};var Uh=tinymce.util.Tools.resolve("tinymce.EditorManager"),Wh=function(n){var e=It(n.settings,"skin_url").fold(function(){return Uh.baseURL+"/skins/ui/oxide"},function(n){return n});return{content:e+"/content.mobile.min.css",ui:e+"/skin.mobile.min.css"}},_h=function(n,e,t){n.system().broadcastOn([_o.formatChanged()],{command:e,state:t})},Xh=function(r,n){var e=E(n.formatter.get());En(e,function(e){n.formatter.formatChanged(e,function(n){_h(r,e,n)})}),En(["ul","ol"],function(t){n.selection.selectorChanged(t,function(n,e){_h(r,t,n)})})},qh=(h(["x-small","small","medium","large","x-large"]),function(n){var e=function(){n._skinLoaded=!0,n.fire("SkinLoaded")};return function(){n.initialized?e():n.on("init",e)}}),Yh=h("toReading"),Kh=h("toEditing"),Jh=function(g){return{getNotificationManagerImpl:function(){return{open:h({progressBar:{value:x},close:x,text:x}),close:x,reposition:x,getArgs:h({})}},renderUI:function(){var n=g.getElement(),e=Wh(g);0==(!1===g.settings.skin)?(g.contentCSS.push(e.content),$o.DOM.styleSheetLoader.load(e.ui,qh(g))):qh(g)();var t,r,o=function(){g.fire("ScrollIntoView")},f=Yn.detect().os.isAndroid()?function a(n){var e=Jv({classes:[Hi.resolve("android-container")]}),t=sv(),r=Xd(),o=gv(r),i=pv(),u=Av(x,n);return e.add(t.wrapper()),e.add(i),e.add(u.component()),{system:h(e),element:e.element,init:function(n){r.set(nv(n))},exit:function(){r.run(function(n){n.exit(),Xm.remove(i,o)})},setToolbarGroups:function(n){var e=t.createGroups(n);t.setGroups(e)},setContextToolbar:function(n){var e=t.createGroups(n);t.setContextToolbar(e)},focusToolbar:function(){t.focus()},restoreToolbar:function(){t.restoreToolbar()},updateMode:function(n){vv(i,o,n,e.root())},socket:h(i),dropup:h(u)}}(o):function m(n){var e=Jv({classes:[Hi.resolve("ios-container")]}),t=sv(),r=Xd(),o=gv(r),i=pv(),u=Av(function(){r.run(function(n){n.refreshStructure()})},n);return e.add(t.wrapper()),e.add(i),e.add(u.component()),{system:h(e),element:e.element,init:function(n){r.set($h(n))},exit:function(){r.run(function(n){Xm.remove(i,o),n.exit()})},setToolbarGroups:function(n){var e=t.createGroups(n);t.setGroups(e)},setContextToolbar:function(n){var e=t.createGroups(n);t.setContextToolbar(e)},focusToolbar:function(){t.focus()},restoreToolbar:function(){t.restoreToolbar()},updateMode:function(n){vv(i,o,n,e.root())},socket:h(i),dropup:h(u)}}(o),i=be.fromDom(n);t=i,r=f.system(),ft(t,r,Je);var u=n.ownerDocument.defaultView,s=Fg(u,{onChange:function(){f.system().broadcastOn([_o.orientationChanged()],{width:Vg(u)})},onReady:x}),l=function(n,e,t,r){!1===r&&g.selection.collapse();var o=c(n,e,t);f.setToolbarGroups(!0===r?o.readOnly:o.main),g.setMode(!0===r?"readonly":"design"),g.fire(!0===r?Yh():Kh()),f.updateMode(r)},c=function(n,e,t){var r=n.get();return{readOnly:r.backToMask.concat(e.get()),main:r.backToMask.concat(t.get())}},d=function(n,e){return g.on(n,e),{unbind:function(){g.off(n)}}};return g.on("init",function(){f.init({editor:{getFrame:function(){return be.fromDom(g.contentAreaContainer.querySelector("iframe"))},onDomChanged:function(){return{unbind:x}},onToReading:function(n){return d(Yh(),n)},onToEditing:function(n){return d(Kh(),n)},onScrollToCursor:function(e){return g.on("ScrollIntoView",function(n){e(n)}),{unbind:function(){g.off("ScrollIntoView"),s.destroy()}}},onTouchToolstrip:function(){t()},onTouchContent:function(){var n,e=be.fromDom(g.editorContainer.querySelector("."+Hi.resolve("toolbar")));(n=e,Go(n).bind(function(n){return f.system().getByDom(n).toOption()})).each(ge),f.restoreToolbar(),t()},onTapContent:function(n){var e=n.target();"img"===Se(e)?(g.selection.select(e.dom()),n.kill()):"a"===Se(e)&&f.system().getByDom(be.fromDom(g.editorContainer)).each(function(n){jo.isAlpha(n)&&Wo(e.dom())})}},container:be.fromDom(g.editorContainer),socket:be.fromDom(g.contentAreaContainer),toolstrip:be.fromDom(g.editorContainer.querySelector("."+Hi.resolve("toolstrip"))),toolbar:be.fromDom(g.editorContainer.querySelector("."+Hi.resolve("toolbar"))),dropup:f.dropup(),alloy:f.system(),translate:x,setReadOnly:function(n){l(a,c,u,n)},readOnlyOnInit:function(){return!1}});var t=function(){f.dropup().disappear(function(){f.system().broadcastOn([_o.dropupDismissed()],{})})},n={label:"The first group",scrollable:!1,items:[jf.forToolbar("back",function(){g.selection.collapse(),f.exit()},{},g)]},e={label:"Back to read only",scrollable:!1,items:[jf.forToolbar("readonly-back",function(){l(a,c,u,!0)},{},g)]},r=Og(f,g),o=Tg(g.settings,r),i={label:"The extra group",scrollable:!1,items:[]},u=Ho([{label:"the action group",scrollable:!0,items:o},i]),c=Ho([{label:"The read only mode group",scrollable:!0,items:[]},i]),a=Ho({backToMask:[n],backToReadOnly:[e]});Xh(f,g)}),g.on("remove",function(){f.exit()}),g.on("detach",function(){var e,n;e=f.system(),n=qe(e.element()),En(n,function(n){e.getByDom(n).each(rt)}),tt(e.element()),f.system().destroy()}),{iframeContainer:f.socket().element().dom(),editorContainer:f.element().dom()}}}};!function Zh(){Uo.add("mobile",Jh)}()}(window);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.0.11 (2019-07-04)
8
+ */
9
+ !function(H){"use strict";var tt=function(){},p=function(e,o){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(o.apply(null,t))}},nt=function(t){return function(){return t}},d=function(t){return t};function g(o){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=r.concat(t);return o.apply(null,e)}}var x=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}},u=function(t){return function(){throw new Error(t)}},t=nt(!1),n=nt(!0),e=tinymce.util.Tools.resolve("tinymce.ThemeManager"),P=function(){return(P=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)};function h(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}var o,r,i,a,c,s,f,l=t,m=n,v=function(){return b},b=(a={fold:function(t,n){return t()},is:l,isSome:l,isNone:m,getOr:i=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:i,orThunk:r,map:v,ap:v,each:function(){},bind:v,flatten:v,exists:l,forall:m,filter:v,equals:o=function(t){return t.isNone()},equals_:o,toArray:function(){return[]},toString:nt("none()")},Object.freeze&&Object.freeze(a),a),y=function(e){var t=function(){return e},n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:m,isNone:l,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return y(t(e))},ap:function(t){return t.fold(v,function(t){return y(t(e))})},each:function(t){t(e)},bind:o,flatten:t,exists:o,forall:o,filter:function(t){return t(e)?r:b},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(l,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},et={some:y,none:v,from:function(t){return null===t||t===undefined?b:y(t)}},w=function(e){return{is:function(t){return e===t},isValue:n,isError:t,getOr:nt(e),getOrThunk:nt(e),getOrDie:nt(e),or:function(t){return w(e)},orThunk:function(t){return w(e)},fold:function(t,n){return n(e)},map:function(t){return w(t(e))},mapError:function(t){return w(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return et.some(e)}}},S=function(e){return{is:t,isValue:t,isError:n,getOr:d,getOrThunk:function(t){return t()},getOrDie:function(){return u(String(e))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(t){return S(e)},mapError:function(t){return S(t(e))},each:tt,bind:function(t){return S(e)},exists:t,forall:n,toOption:et.none}},z={value:w,error:S,fromOption:function(t,n){return t.fold(function(){return S(n)},w)}},C=function(n){return function(t){return function(t){if(null===t)return"null";var n=typeof t;return"object"===n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n}(t)===n}},L=C("string"),k=C("object"),j=C("array"),O=C("boolean"),E=C("function"),U=C("number"),T=function(t,n){if(j(t)){for(var e=0,o=t.length;e<o;++e)if(!0!==n(t[e]))return!1;return!0}return!1},B=Array.prototype.slice,A=(c=Array.prototype.indexOf)===undefined?function(t,n){return X(t,n)}:function(t,n){return c.call(t,n)},D=function(t,n){return-1<A(t,n)},_=function(t,n){return G(t,n).isSome()},M=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=B.call(t,o,o+n);e.push(r)}return e},F=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r,t)}return o},W=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e,t)}},I=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o,t)&&e.push(i)}return e},R=function(t,n,e){return function(t,n){for(var e=t.length-1;0<=e;e--)n(t[e],e,t)}(t,function(t){e=n(e,t)}),e},V=function(t,n,e){return W(t,function(t){e=n(e,t)}),e},N=function(t,n){for(var e=0,o=t.length;e<o;e++){var r=t[e];if(n(r,e,t))return et.some(r)}return et.none()},G=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e,t))return et.some(e)}return et.none()},X=function(t,n){for(var e=0,o=t.length;e<o;++e)if(t[e]===n)return e;return-1},Y=Array.prototype.push,q=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!Array.prototype.isPrototypeOf(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);Y.apply(n,t[e])}return n},K=function(t,n){var e=F(t,n);return q(e)},$=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e,t))return!1}return!0},J=function(t){var n=B.call(t,0);return n.reverse(),n},Q=function(t,n){return I(t,function(t){return!D(n,t)})},Z=function(t){return[t]},ot=function(t){return 0===t.length?et.none():et.some(t[0])},rt=function(t){return 0===t.length?et.none():et.some(t[t.length-1])},it=E(Array.from)?Array.from:function(t){return B.call(t)},ut=Object.keys,at=Object.hasOwnProperty,ct=function(t,n){for(var e=ut(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i,t)}},st=function(t,o){return ft(t,function(t,n,e){return{k:n,v:o(t,n,e)}})},ft=function(o,r){var i={};return ct(o,function(t,n){var e=r(t,n,o);i[e.k]=e.v}),i},lt=function(t,e){var o=[];return ct(t,function(t,n){o.push(e(t,n))}),o},dt=function(t){return lt(t,function(t){return t})},mt=function(t,n){return gt(t,n)?et.from(t[n]):et.none()},gt=function(t,n){return at.call(t,n)},pt=function(u){if(!j(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],e={};return W(u,function(t,o){var n=ut(t);if(1!==n.length)throw new Error("one and only one name per case");var r=n[0],i=t[r];if(e[r]!==undefined)throw new Error("duplicate key detected:"+r);if("cata"===r)throw new Error("cannot have a case named cata (sorry)");if(!j(i))throw new Error("case arguments must be an array");a.push(r),e[r]=function(){var t=arguments.length;if(t!==i.length)throw new Error("Wrong number of arguments to case "+r+". Expected "+i.length+" ("+i+"), got "+t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=arguments[n];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[o].apply(null,e)},match:function(t){var n=ut(t);if(a.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+n.join(","));if(!$(a,function(t){return D(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+a.join(", "));return t[r].apply(null,e)},log:function(t){H.console.log(t,{constructors:a,constructor:r,params:e})}}}}),e},ht=Object.prototype.hasOwnProperty,vt=function(u){return function(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<t.length;o++){var r=t[o];for(var i in r)ht.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}},bt=vt(function(t,n){return k(t)&&k(n)?bt(t,n):n}),yt=vt(function(t,n){return n}),xt=function(e){var o,r=!1;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r||(r=!0,o=e.apply(null,t)),o}},wt=pt([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),St=function(t){return wt.defaultedThunk(nt(t))},Ct=wt.strict,kt=wt.asOption,Ot=wt.defaultedThunk,Et=wt.mergeWithThunk,Tt=function(n){return function(t){return gt(t,n)?et.from(t[n]):et.none()}},Bt=function(t,n){return Tt(n)(t)},At=function(t,n){var e={};return e[t]=n,e},Dt=(pt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,n){return e=n,o={},ct(t,function(t,n){D(e,n)||(o[n]=t)}),o;var e,o}),_t=function(t){return Tt(t)},Mt=function(t,n){return e=t,o=n,function(t){return gt(t,e)?t[e]:o};var e,o},Ft=function(t,n){return Bt(t,n)},It=function(t,n){return At(t,n)},Rt=function(t){return n={},W(t,function(t){n[t.key]=t.value}),n;var n},Vt=function(t,n){var e,o,r,i,u,a=(e=[],o=[],W(t,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),{errors:e,values:o});return 0<a.errors.length?(u=a.errors,p(z.error,q)(u)):(i=n,0===(r=a.values).length?z.value(i):z.value(bt(i,yt.apply(undefined,r))))},Nt=function(t,n){return gt(e=t,o=n)&&e[o]!==undefined&&null!==e[o];var e,o};(f=s||(s={}))[f.Error=0]="Error",f[f.Value=1]="Value";var Ht=function(t,n,e){return t.stype===s.Error?n(t.serror):e(t.svalue)},Pt=function(t){return{stype:s.Value,svalue:t}},zt=function(t){return{stype:s.Error,serror:t}},Lt=function(t){return t.fold(zt,Pt)},jt=function(t){return Ht(t,z.error,z.value)},Ut=Pt,Wt=function(t){var n=[],e=[];return W(t,function(t){Ht(t,function(t){return e.push(t)},function(t){return n.push(t)})}),{values:n,errors:e}},Gt=zt,Xt=function(t,n){return t.stype===s.Value?n(t.svalue):t},Yt=function(t,n){return t.stype===s.Error?n(t.serror):t},qt=function(t,n){return t.stype===s.Value?{stype:s.Value,svalue:n(t.svalue)}:t},Kt=function(t,n){return t.stype===s.Error?{stype:s.Error,serror:n(t.serror)}:t},$t=function(t){return p(Gt,q)(t)},Jt=function(t,n){var e,o,r=Wt(t);return 0<r.errors.length?$t(r.errors):(e=r.values,o=n,0<e.length?Ut(bt(o,yt.apply(undefined,e))):Ut(o))},Qt=function(t){var n=Wt(t);return 0<n.errors.length?$t(n.errors):Ut(n.values)},Zt=pt([{setOf:["validator","valueType"]},{arrOf:["valueType"]},{objOf:["fields"]},{itemOf:["validator"]},{choiceOf:["key","branches"]},{thunk:["description"]},{func:["args","outputSchema"]}]),tn=pt([{field:["name","presence","type"]},{state:["name"]}]),nn="undefined"!=typeof H.window?H.window:Function("return this;")(),en=function(t,n){return function(t,n){for(var e=n!==undefined&&null!==n?n:nn,o=0;o<t.length&&e!==undefined&&null!==e;++o)e=e[t[o]];return e}(t.split("."),n)},on={getOrDie:function(t,n){var e=en(t,n);if(e===undefined||null===e)throw t+" not available on this browser";return e}},rn=function(){return on.getOrDie("JSON")},un=function(t,n,e){return rn().stringify(t,n,e)},an=function(t){return k(t)&&100<ut(t).length?" removed due to size":un(t,null,2)},cn=function(t,n){return Gt([{path:t,getErrorInfo:n}])},sn=pt([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),fn=function(e,o,r){return Bt(o,r).fold(function(){return t=r,n=o,cn(e,function(){return'Could not find valid *strict* value for "'+t+'" in '+an(n)});var t,n},Ut)},ln=function(t,n,e){var o=Bt(t,n).fold(function(){return e(t)},d);return Ut(o)},dn=function(a,c,t,s){return t.fold(function(r,e,t,o){var i=function(t){var n=o.extract(a.concat([r]),s,t);return qt(n,function(t){return At(e,s(t))})},u=function(t){return t.fold(function(){var t=At(e,s(et.none()));return Ut(t)},function(t){var n=o.extract(a.concat([r]),s,t);return qt(n,function(t){return At(e,s(et.some(t)))})})};return t.fold(function(){return Xt(fn(a,c,r),i)},function(t){return Xt(ln(c,r,t),i)},function(){return Xt(Ut(Bt(c,r)),u)},function(t){return Xt((e=t,o=Bt(n=c,r).map(function(t){return!0===t?e(n):t}),Ut(o)),u);var n,e,o},function(t){var n=t(c),e=qt(ln(c,r,nt({})),function(t){return bt(n,t)});return Xt(e,i)})},function(t,n){var e=n(c);return Ut(At(t,s(e)))})},mn=function(o){return{extract:function(e,t,n){return Yt(o(n,t),function(t){return n=t,cn(e,function(){return n});var n})},toString:function(){return"val"},toDsl:function(){return Zt.itemOf(o)}}},gn=function(t){var c=pn(t),s=R(t,function(n,t){return t.fold(function(t){return bt(n,It(t,!0))},nt(n))},{});return{extract:function(t,n,e){var o,r,i,u=O(e)?[]:(r=ut(o=e),I(r,function(t){return Nt(o,t)})),a=I(u,function(t){return!Nt(s,t)});return 0===a.length?c.extract(t,n,e):(i=a,cn(t,function(){return"There are unsupported fields: ["+i.join(", ")+"] specified"}))},toString:c.toString,toDsl:c.toDsl}},pn=function(a){return{extract:function(t,n,e){return o=t,r=e,i=n,u=F(a,function(t){return dn(o,r,t,i)}),Jt(u,{});var o,r,i,u},toString:function(){return"obj{\n"+F(a,function(t){return t.fold(function(t,n,e,o){return t+" -> "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"},toDsl:function(){return Zt.objOf(F(a,function(t){return t.fold(function(t,n,e,o){return tn.field(t,e,o)},function(t,n){return tn.state(t)})}))}}},hn=function(r){return{extract:function(e,o,t){var n=F(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return Qt(n)},toString:function(){return"array("+r.toString()+")"},toDsl:function(){return Zt.arrOf(r)}}},vn=function(a,c){return{extract:function(e,o,r){var t,n,i=ut(r),u=(t=e,n=i,hn(mn(a)).extract(t,d,n));return Xt(u,function(t){var n=F(t,function(t){return sn.field(t,t,Ct(),c)});return pn(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"},toDsl:function(){return Zt.setOf(a,c)}}},bn=nt(mn(Ut)),yn=p(hn,pn),xn=sn.state,wn=sn.field,Sn=function(e,n,o,r,i){return Ft(r,i).fold(function(){return t=r,n=i,cn(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+an(t)});var t,n},function(t){return pn(t).extract(e.concat(["branch: "+i]),n,o)})},Cn=function(r,i){return{extract:function(n,e,o){return Ft(o,r).fold(function(){return t=r,cn(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return Sn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+ut(i)},toDsl:function(){return Zt.choiceOf(r,i)}}},kn=mn(Ut),On=function(n){return mn(function(t){return n(t).fold(Gt,Ut)})},En=function(n,t){return vn(function(t){return Lt(n(t))},t)},Tn=function(t,n,e){return jt((o=t,r=d,i=e,u=n.extract([o],r,i),Kt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},Bn=function(t){return t.fold(function(t){throw new Error(Dn(t))},d)},An=function(t,n,e){return Bn(Tn(t,n,e))},Dn=function(t){return"Errors: \n"+(n=t.errors,e=10<n.length?n.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):n,F(e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))+"\n\nInput object: "+an(t.input);var n,e},_n=function(t,n){return Cn(t,n)},Mn=nt(kn),Fn=function(e,o){return mn(function(t){var n=typeof t;return e(t)?Ut(t):Gt("Expected type: "+o+" but got: "+n)})},In=Fn(U,"number"),Rn=Fn(L,"string"),Vn=Fn(O,"boolean"),Nn=Fn(E,"function"),Hn=function(n){return On(function(t){return D(n,t)?z.value(t):z.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Pn=function(t){return wn(t,t,Ct(),bn())},zn=function(t,n){return wn(t,t,Ct(),n)},Ln=function(t){return zn(t,Rn)},jn=function(t,n){return wn(t,t,Ct(),Hn(n))},Un=function(t){return zn(t,Nn)},Wn=function(t,n){return wn(t,t,Ct(),pn(n))},Gn=function(t,n){return wn(t,t,Ct(),yn(n))},Xn=function(t,n){return wn(t,t,Ct(),hn(n))},Yn=function(t){return wn(t,t,kt(),bn())},qn=function(t,n){return wn(t,t,kt(),n)},Kn=function(t){return qn(t,In)},$n=function(t){return qn(t,Rn)},Jn=function(t){return qn(t,Nn)},Qn=function(t,n){return qn(t,pn(n))},Zn=function(t,n){return wn(t,t,St(n),bn())},te=function(t,n,e){return wn(t,t,St(n),e)},ne=function(t,n){return te(t,n,In)},ee=function(t,n){return te(t,n,Rn)},oe=function(t,n,e){return te(t,n,Hn(e))},re=function(t,n){return te(t,n,Vn)},ie=function(t,n){return te(t,n,Nn)},ue=function(t,n,e){return te(t,n,pn(e))},ae=function(t,n){return xn(t,n)},ce=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return ce(e())}}},se=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:nt(t)}},fe={fromHtml:function(t,n){var e=(n||H.document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1<e.childNodes.length)throw H.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return se(e.childNodes[0])},fromTag:function(t,n){var e=(n||H.document).createElement(t);return se(e)},fromText:function(t,n){var e=(n||H.document).createTextNode(t);return se(e)},fromDom:se,fromPoint:function(t,n,e){var o=t.dom();return et.from(o.elementFromPoint(n,e)).map(se)}},le=function(){return on.getOrDie("Node")},de=function(t,n,e){return 0!=(t.compareDocumentPosition(n)&e)},me=function(t,n){return de(t,n,le().DOCUMENT_POSITION_CONTAINED_BY)},ge=function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}return undefined}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return he(o(1),o(2))},pe=function(){return he(0,0)},he=function(t,n){return{major:t,minor:n}},ve={nu:he,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?pe():ge(t,e)},unknown:pe},be="Firefox",ye=function(t,n){return function(){return n===t}},xe=function(t){var n=t.current;return{current:n,version:t.version,isEdge:ye("Edge",n),isChrome:ye("Chrome",n),isIE:ye("IE",n),isOpera:ye("Opera",n),isFirefox:ye(be,n),isSafari:ye("Safari",n)}},we={unknown:function(){return xe({current:undefined,version:ve.unknown()})},nu:xe,edge:nt("Edge"),chrome:nt("Chrome"),ie:nt("IE"),opera:nt("Opera"),firefox:nt(be),safari:nt("Safari")},Se="Windows",Ce="Android",ke="Solaris",Oe="FreeBSD",Ee=function(t,n){return function(){return n===t}},Te=function(t){var n=t.current;return{current:n,version:t.version,isWindows:Ee(Se,n),isiOS:Ee("iOS",n),isAndroid:Ee(Ce,n),isOSX:Ee("OSX",n),isLinux:Ee("Linux",n),isSolaris:Ee(ke,n),isFreeBSD:Ee(Oe,n)}},Be={unknown:function(){return Te({current:undefined,version:ve.unknown()})},nu:Te,windows:nt(Se),ios:nt("iOS"),android:nt(Ce),linux:nt("Linux"),osx:nt("OSX"),solaris:nt(ke),freebsd:nt(Oe)},Ae=function(t,n){var e=String(n).toLowerCase();return N(t,function(t){return t.search(e)})},De=function(t,e){return Ae(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},_e=function(t,e){return Ae(t,e).map(function(t){var n=ve.detect(t.versionRegexes,e);return{current:t.name,version:n}})},Me=function(t,n){return-1!==t.indexOf(n)},Fe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ie=function(n){return function(t){return Me(t,n)}},Re=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Me(t,"edge/")&&Me(t,"chrome")&&Me(t,"safari")&&Me(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Fe],search:function(t){return Me(t,"chrome")&&!Me(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Me(t,"msie")||Me(t,"trident")}},{name:"Opera",versionRegexes:[Fe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ie("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ie("firefox")},{name:"Safari",versionRegexes:[Fe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Me(t,"safari")||Me(t,"mobile/"))&&Me(t,"applewebkit")}}],Ve=[{name:"Windows",search:Ie("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Me(t,"iphone")||Me(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ie("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ie("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ie("linux"),versionRegexes:[]},{name:"Solaris",search:Ie("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ie("freebsd"),versionRegexes:[]}],Ne={browsers:nt(Re),oses:nt(Ve)},He=function(t){var n,e,o,r,i,u,a,c,s,f,l,d=Ne.browsers(),m=Ne.oses(),g=De(d,t).fold(we.unknown,we.nu),p=_e(m,t).fold(Be.unknown,Be.nu);return{browser:g,os:p,deviceType:(e=g,o=t,r=(n=p).isiOS()&&!0===/ipad/i.test(o),i=n.isiOS()&&!r,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,c=r||u||a&&!0===/mobile/i.test(o),s=n.isiOS()||n.isAndroid(),f=s&&!c,l=e.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),{isiPad:nt(r),isiPhone:nt(i),isTablet:nt(c),isPhone:nt(f),isTouch:nt(s),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:nt(l)})}},Pe={detect:xt(function(){var t=H.navigator.userAgent;return He(t)})},ze=(H.Node.ATTRIBUTE_NODE,H.Node.CDATA_SECTION_NODE,H.Node.COMMENT_NODE,H.Node.DOCUMENT_NODE),Le=(H.Node.DOCUMENT_TYPE_NODE,H.Node.DOCUMENT_FRAGMENT_NODE,H.Node.ELEMENT_NODE),je=H.Node.TEXT_NODE,Ue=(H.Node.PROCESSING_INSTRUCTION_NODE,H.Node.ENTITY_REFERENCE_NODE,H.Node.ENTITY_NODE,H.Node.NOTATION_NODE,Le),We=ze,Ge=function(t,n){var e=t.dom();if(e.nodeType!==Ue)return!1;if(e.matches!==undefined)return e.matches(n);if(e.msMatchesSelector!==undefined)return e.msMatchesSelector(n);if(e.webkitMatchesSelector!==undefined)return e.webkitMatchesSelector(n);if(e.mozMatchesSelector!==undefined)return e.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Xe=function(t){return t.nodeType!==Ue&&t.nodeType!==We||0===t.childElementCount},Ye=function(t,n){var e=n===undefined?H.document:n.dom();return Xe(e)?[]:F(e.querySelectorAll(t),fe.fromDom)},qe=function(t,n){return t.dom()===n.dom()},Ke=(Pe.detect().browser.isIE(),function(t,n){return qe(t.element(),n.event().target())}),$e=function(t){if(!Nt(t,"can")&&!Nt(t,"abort")&&!Nt(t,"run"))throw new Error("EventHandler defined by: "+un(t,null,2)+" does not have can, abort, or run!");return An("Extracting event.handler",gn([Zn("can",nt(!0)),Zn("abort",nt(!1)),Zn("run",tt)]),t)},Je=function(e){var n,o,r,i,t=(n=e,o=function(t){return t.can},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V(n,function(t,n){return t&&o(n).apply(undefined,e)},!0)}),u=(r=e,i=function(t){return t.abort},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V(r,function(t,n){return t||i(n).apply(undefined,e)},!1)});return $e({can:t,abort:u,run:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];W(e,function(t){t.run.apply(undefined,n)})}})},Qe=nt("touchstart"),Ze=nt("touchmove"),to=nt("touchend"),no=nt("mousedown"),eo=nt("mousemove"),oo=nt("mouseout"),ro=nt("mouseup"),io=nt("mouseover"),uo=nt("focusin"),ao=nt("focusout"),co=nt("keydown"),so=nt("keyup"),fo=nt("input"),lo=nt("change"),mo=nt("click"),go=nt("transitionend"),po=nt("selectstart"),ho={tap:nt("alloy.tap")},vo=nt("alloy.focus"),bo=nt("alloy.blur.post"),yo=nt("alloy.paste.post"),xo=nt("alloy.receive"),wo=nt("alloy.execute"),So=nt("alloy.focus.item"),Co=ho.tap,ko=Pe.detect().deviceType.isTouch()?ho.tap:mo,Oo=nt("alloy.longpress"),Eo=nt("alloy.sandbox.close"),To=nt("alloy.typeahead.cancel"),Bo=nt("alloy.system.init"),Ao=nt("alloy.system.scroll"),Do=nt("alloy.system.resize"),_o=nt("alloy.system.attached"),Mo=nt("alloy.system.detached"),Fo=nt("alloy.system.dismissRequested"),Io=nt("alloy.focusmanager.shifted"),Ro=nt("alloy.slotcontainer.visibility"),Vo=nt("alloy.change.tab"),No=nt("alloy.dismiss.tab"),Ho=nt("alloy.highlight"),Po=nt("alloy.dehighlight"),zo=function(t,n){Wo(t,t.element(),n,{})},Lo=function(t,n,e){Wo(t,t.element(),n,e)},jo=function(t){zo(t,wo())},Uo=function(t,n,e){Wo(t,n,e,{})},Wo=function(t,n,e,o){var r=P({target:n},o);t.getSystem().triggerEvent(e,n,st(r,nt))},Go=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event())};function Xo(t,n,e,o,r){return t(e,o)?et.some(e):E(r)&&r(e)?et.none():n(e,o,r)}var Yo,qo,Ko,$o,Jo,Qo=function(t){return t.dom().nodeName.toLowerCase()},Zo=function(n){return function(t){return t.dom().nodeType===n}},tr=Zo(Le),nr=Zo(je),er=Zo(ze),or=function(t){var n=nr(t)?t.dom().parentNode:t.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},rr=xt(function(){return ir(fe.fromDom(H.document))}),ir=function(t){var n=t.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return fe.fromDom(n)},ur=function(t,n,e){for(var o=t.dom(),r=E(e)?e:nt(!1);o.parentNode;){o=o.parentNode;var i=fe.fromDom(o);if(n(i))return et.some(i);if(r(i))break}return et.none()},ar=function(t,n,e){return Xo(function(t){return n(t)},ur,t,n,e)},cr=function(t,o){var r=function(t){for(var n=0;n<t.childNodes.length;n++){if(o(fe.fromDom(t.childNodes[n])))return et.some(fe.fromDom(t.childNodes[n]));var e=r(t.childNodes[n]);if(e.isSome())return e}return et.none()};return r(t.dom())},sr=function(t,n,e){return ar(t,function(t){return n(t).isSome()},e).bind(n)},fr=function(t){return Rt(t)},lr=function(t,n){return{key:t,value:$e({abort:n})}},dr=function(t){return{key:t,value:$e({run:function(t,n){n.event().prevent()}})}},mr=function(t,n){return{key:t,value:$e({run:n})}},gr=function(t,n,e){return{key:t,value:$e({run:function(t){n.apply(undefined,[t].concat(e))}})}},pr=function(t){return function(e){return{key:t,value:$e({run:function(t,n){Ke(t,n)&&e(t,n)}})}}},hr=function(t,n,e){var o,r,i=n.partUids[e];return r=i,mr(o=t,function(t,n){t.getSystem().getByUid(r).each(function(t){Go(t,t.element(),o,n)})})},vr=function(t,r){return mr(t,function(n,t){var e=t.event(),o=n.getSystem().getByDom(e.target()).fold(function(){return sr(e.target(),function(t){return n.getSystem().getByDom(t).toOption()},nt(!1)).getOr(n)},function(t){return t});r(n,o,t)})},br=function(t){return mr(t,function(t,n){n.cut()})},yr=function(t){return mr(t,function(t,n){n.stop()})},xr=function(t,n){return pr(t)(n)},wr=pr(_o()),Sr=pr(Mo()),Cr=pr(Bo()),kr=(Yo=wo(),function(t){return mr(Yo,t)}),Or=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+e.length+" arguments");var o={};return W(n,function(t,n){o[t]=nt(e[n])}),o}},Er=function(t){return t.slice(0).sort()},Tr=function(n,t){if(!j(t))throw new Error("The "+n+" fields must be an array. Was: "+t+".");W(t,function(t){if(!L(t))throw new Error("The value "+t+" in the "+n+" fields was not a string.")})},Br=function(r,i){var e,u=r.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return Tr("required",r),Tr("optional",i),e=Er(u),N(e,function(t,n){return n<e.length-1&&t===e[n+1]}).each(function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+e.join(", ")+"].")}),function(n){var e=ut(n);$(r,function(t){return D(e,t)})||function(t,n){throw new Error("All required keys ("+Er(t).join(", ")+") were not specified. Specified keys were: "+Er(n).join(", ")+".")}(r,e);var t=I(e,function(t){return!D(u,t)});0<t.length&&function(t){throw new Error("Unsupported keys for object: "+Er(t).join(", "))}(t);var o={};return W(r,function(t){o[t]=nt(n[t])}),W(i,function(t){o[t]=nt(Object.prototype.hasOwnProperty.call(n,t)?et.some(n[t]):et.none())}),o}},Ar=function(t){return fe.fromDom(t.dom().ownerDocument)},Dr=function(t){var n=t.dom().ownerDocument.defaultView;return fe.fromDom(n)},_r=function(t){var n=t.dom();return et.from(n.parentNode).map(fe.fromDom)},Mr=function(t){var n=t.dom();return et.from(n.offsetParent).map(fe.fromDom)},Fr=function(t){var n=t.dom();return F(n.childNodes,fe.fromDom)},Ir=function(t,n){var e=t.dom().childNodes;return et.from(e[n]).map(fe.fromDom)},Rr=(Or("element","offset"),function(n,e){_r(n).each(function(t){t.dom().insertBefore(e.dom(),n.dom())})}),Vr=function(t,n){var e;(e=t.dom(),et.from(e.nextSibling).map(fe.fromDom)).fold(function(){_r(t).each(function(t){Hr(t,n)})},function(t){Rr(t,n)})},Nr=function(n,e){Ir(n,0).fold(function(){Hr(n,e)},function(t){n.dom().insertBefore(e.dom(),t.dom())})},Hr=function(t,n){t.dom().appendChild(n.dom())},Pr=function(n,t){W(t,function(t){Hr(n,t)})},zr=function(t){t.dom().textContent="",W(Fr(t),function(t){Lr(t)})},Lr=function(t){var n=t.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},jr=function(t){var n,e=Fr(t);0<e.length&&(n=t,W(e,function(t){Rr(n,t)})),Lr(t)},Ur=function(t){return t.dom().innerHTML},Wr=function(t,n){var e,o,r=Ar(t).dom(),i=fe.fromDom(r.createDocumentFragment()),u=(e=n,(o=(r||H.document).createElement("div")).innerHTML=e,Fr(fe.fromDom(o)));Pr(i,u),zr(t),Hr(t,i)},Gr=function(t,n,e){if(!(L(e)||O(e)||U(e)))throw H.console.error("Invalid call to Attr.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},Xr=function(t,n,e){Gr(t.dom(),n,e)},Yr=function(t,n){var e=t.dom();ct(n,function(t,n){Gr(e,n,t)})},qr=function(t,n){var e=t.dom().getAttribute(n);return null===e?undefined:e},Kr=function(t,n){var e=t.dom();return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},$r=function(t,n){t.dom().removeAttribute(n)},Jr=function(t){return n=t,e=!1,fe.fromDom(n.dom().cloneNode(e));var n,e},Qr=function(t){var n,e,o,r=Jr(t);return n=r,e=fe.fromTag("div"),o=fe.fromDom(n.dom().cloneNode(!0)),Hr(e,o),Ur(e)},Zr=function(t){return Qr(t)},ti=fr([(qo=vo(),Ko=function(t,n){var e,o,r=n.event().originator(),i=n.event().target();return o=i,!(qe(e=r,t.element())&&!qe(e,o))||(H.console.warn(vo()+" did not get interpreted by the desired target. \nOriginator: "+Zr(r)+"\nTarget: "+Zr(i)+"\nCheck the "+vo()+" event handlers"),!1)},{key:qo,value:$e({can:Ko})})]),ni=/* */Object.freeze({events:ti}),ei=0,oi=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++ei+String(n)},ri=nt("alloy-id-"),ii=nt("data-alloy-id"),ui=ri(),ai=ii(),ci=function(t,n){Object.defineProperty(t.dom(),ai,{value:n,writable:!0})},si=function(t){var n=tr(t)?t.dom()[ai]:null;return et.from(n)},fi=function(t){return oi(t)},li=d,di=function(n){var t=function(t){return function(){throw new Error("The component must be in a context to send: "+t+"\n"+Zr(n().element())+" is not in context.")}};return{debugInfo:nt("fake"),triggerEvent:t("triggerEvent"),triggerFocus:t("triggerFocus"),triggerEscape:t("triggerEscape"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),broadcast:t("broadcast"),broadcastOn:t("broadcastOn"),broadcastEvent:t("broadcastEvent"),isConnected:nt(!1)}},mi=di(),gi=function(t){return F(t,function(t){return o=n="/*",r=(e=t).length-n.length,""!==o&&(e.length<o.length||e.substr(r,r+o.length)!==o)?t:t.substring(0,t.length-"/*".length);var n,e,o,r})},pi=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:gi(i)}},t},hi=oi("alloy-premade"),vi=function(t){return It(hi,t)},bi=function(o){return t=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return o.apply(undefined,[t.getApis()].concat([t].concat(n)))},n=o.toString(),e=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,e-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:gi(i.slice(1))}},t;var t,n,e,r,i},yi={init:function(){return xi({readState:function(){return"No State required"}})}},xi=function(t){return t},wi=function(t,r){var i={};return ct(t,function(t,o){ct(t,function(t,n){var e=Mt(n,[])(i);i[n]=e.concat([r(o,t)])})}),i},Si=function(t){return{classes:t.classes!==undefined?t.classes:[],attributes:t.attributes!==undefined?t.attributes:{},styles:t.styles!==undefined?t.styles:{}}},Ci=function(t,n){return e=g.apply(undefined,[t.handler].concat(n)),o=t.purpose(),{cHandler:e,purpose:nt(o)};var e,o},ki=function(t){return t.cHandler},Oi=function(t,n){return{name:nt(t),handler:nt(n)}},Ei=function(t,n,e){var o,r,i=P({},e,(o=t,r={},W(n,function(t){r[t.name()]=t.handlers(o)}),r));return wi(i,Oi)},Ti=function(t){var n,i=E(n=t)?{can:nt(!0),abort:nt(!1),run:n}:n;return function(t,n){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var r=[t,n].concat(e);i.abort.apply(undefined,r)?n.stop():i.can.apply(undefined,r)&&i.run.apply(undefined,r)}},Bi=function(t,n,e){var o,r,i=n[e];return i?function(u,a,t,c){var n=t.slice(0);try{var e=n.sort(function(t,n){var e=t[a](),o=n[a](),r=c.indexOf(e),i=c.indexOf(o);if(-1===r)throw new Error("The ordering for "+u+" does not have an entry for "+e+".\nOrder specified: "+un(c,null,2));if(-1===i)throw new Error("The ordering for "+u+" does not have an entry for "+o+".\nOrder specified: "+un(c,null,2));return r<i?-1:i<r?1:0});return z.value(e)}catch(o){return z.error([o])}}("Event: "+e,"name",t,i).map(function(t){var n=F(t,function(t){return t.handler()});return Je(n)}):(o=e,r=t,z.error(["The event ("+o+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+un(F(r,function(t){return t.name()}),null,2)]))},Ai=function(t,i){var n=lt(t,function(o,r){return(1===o.length?z.value(o[0].handler()):Bi(o,i,r)).map(function(t){var n=Ti(t),e=1<o.length?I(i,function(n){return D(o,function(t){return t.name()===n})}).join(" > "):o[0].name();return It(r,{handler:n,purpose:nt(e)})})});return Vt(n,{})},Di=function(t){return Tn("custom.definition",pn([wn("dom","dom",Ct(),pn([Pn("tag"),Zn("styles",{}),Zn("classes",[]),Zn("attributes",{}),Yn("value"),Yn("innerHtml")])),Pn("components"),Pn("uid"),Zn("events",{}),Zn("apis",{}),wn("eventOrder","eventOrder",(n={"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]},wt.mergeWithThunk(nt(n))),Mn()),Yn("domModification")]),t);var n},_i=function(t,n){var e=qr(t,n);return e===undefined||""===e?[]:e.split(" ")},Mi=function(t){return t.dom().classList!==undefined},Fi=function(t,n){return r=n,i=_i(e=t,o="class").concat([r]),Xr(e,o,i.join(" ")),!0;var e,o,r,i},Ii=function(t,n){return r=n,0<(i=I(_i(e=t,o="class"),function(t){return t!==r})).length?Xr(e,o,i.join(" ")):$r(e,o),!1;var e,o,r,i},Ri=function(t,n){Mi(t)?t.dom().classList.add(n):Fi(t,n)},Vi=function(t){0===(Mi(t)?t.dom().classList:_i(t,"class")).length&&$r(t,"class")},Ni=function(t,n){Mi(t)?t.dom().classList.remove(n):Ii(t,n);Vi(t)},Hi=function(t,n){return Mi(t)&&t.dom().classList.contains(n)},Pi=function(n,t){W(t,function(t){Ri(n,t)})},zi=function(n,t){W(t,function(t){Ni(n,t)})},Li=function(t){return t.style!==undefined&&E(t.style.getPropertyValue)},ji=function(t,n,e){if(!L(e))throw H.console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Li(t)&&t.style.setProperty(n,e)},Ui=function(t,n){Li(t)&&t.style.removeProperty(n)},Wi=function(t,n,e){var o=t.dom();ji(o,n,e)},Gi=function(t,n){var e=t.dom();ct(n,function(t,n){ji(e,n,t)})},Xi=function(t,n){var e=t.dom(),o=H.window.getComputedStyle(e).getPropertyValue(n),r=""!==o||or(t)?o:Yi(e,n);return null===r?undefined:r},Yi=function(t,n){return Li(t)?t.style.getPropertyValue(n):""},qi=function(t,n){var e=t.dom(),o=Yi(e,n);return et.from(o).filter(function(t){return 0<t.length})},Ki=function(t,n,e){var o=fe.fromTag(t);return Wi(o,n,e),qi(o,n).isSome()},$i=function(t,n){var e=t.dom();Ui(e,n),Kr(t,"style")&&""===qr(t,"style").replace(/^\s+|\s+$/g,"")&&$r(t,"style")},Ji=function(t){return t.dom().offsetWidth},Qi=function(t){return t.dom().value},Zi=function(t,n){if(n===undefined)throw new Error("Value.set was undefined");t.dom().value=n},tu=function(t,n){return e=t,r=F(o=n,function(t){return Qn(t.name(),[Pn("config"),Zn("state",yi)])}),i=Tn("component.behaviours",pn(r),e.behaviours).fold(function(t){throw new Error(Dn(t)+"\nComplete spec:\n"+un(e,null,2))},function(t){return t}),{list:o,data:st(i,function(t){var n=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return function(){return n}})};var e,o,r,i},nu=function(t){var n,e,o,r=(n=t,e=Mt("behaviours",{})(n),o=I(ut(e),function(t){return e[t]!==undefined}),F(o,function(t){return e[t].me}));return tu(t,r)},eu=function(t,n,e){var o,r,i,u=P({},(o=t).dom,{uid:o.uid,domChildren:F(o.components,function(t){return t.element()})}),a=t.domModification.fold(function(){return Si({})},Si),c={"alloy.base.modification":a},s=0<n.length?function(n,t,e,o){var r=P({},t);W(e,function(t){r[t.name()]=t.exhibit(n,o)});var i=wi(r,function(t,n){return{name:t,modification:n}}),u=function(t){return R(t,function(t,n){return P({},n.modification,t)},{})},a=R(i.classes,function(t,n){return n.modification.concat(t)},[]),c=u(i.attributes),s=u(i.styles);return Si({classes:a,attributes:c,styles:s})}(e,c,n,u):a;return i=s,P({},r=u,{attributes:P({},r.attributes,i.attributes),styles:P({},r.styles,i.styles),classes:r.classes.concat(i.classes)})},ou=function(t,n,e){var o,r,i,u,a,c,s={"alloy.base.behaviour":(o=t,o.events)};return(r=e,i=t.eventOrder,u=n,a=s,c=Ei(r,u,a),Ai(c,i)).getOrDie()},ru=function(e){var t=function(){return f},o=ce(mi),n=Bn(Di(e)),r=nu(e),i=r.list,u=r.data,a=function(t){var n=fe.fromTag(t.tag);Yr(n,t.attributes),Pi(n,t.classes),Gi(n,t.styles),t.innerHtml.each(function(t){return Wr(n,t)});var e=t.domChildren;return Pr(n,e),t.value.each(function(t){Zi(n,t)}),t.uid,ci(n,t.uid),n}(eu(n,i,u)),c=ou(n,i,u),s=ce(n.components),f={getSystem:o.get,config:function(t){var n=u;return(E(n[t.name()])?n[t.name()]:function(){throw new Error("Could not find "+t.name()+" in "+un(e,null,2))})()},hasConfigured:function(t){return E(u[t.name()])},spec:nt(e),readState:function(t){return u[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return n.apis},connect:function(t){o.set(t)},disconnect:function(){o.set(di(t))},element:nt(a),syncComponents:function(){var t=Fr(a),n=K(t,function(t){return o.get().getByDom(t).fold(function(){return[]},function(t){return[t]})});s.set(n)},components:s.get,events:nt(c)};return f},iu=function(t){var n,e,o=li(t),r=o.events,i=h(o,["events"]),u=(n=i,e=Mt("components",[])(n),F(e,su)),a=P({},i,{events:P({},ni,r),components:u});return z.value(ru(a))},uu=function(t){var n=fe.fromText(t);return au({element:n})},au=function(t){var n=An("external.component",gn([Pn("element"),Yn("uid")]),t),e=ce(di());n.uid.each(function(t){ci(n.element,t)});var o={getSystem:e.get,config:et.none,hasConfigured:nt(!1),connect:function(t){e.set(t)},disconnect:function(){e.set(di(function(){return o}))},getApis:function(){return{}},element:nt(n.element),spec:nt(t),readState:nt("No state"),syncComponents:tt,components:nt([]),events:nt({})};return vi(o)},cu=fi,su=function(n){return(t=n,Ft(t,hi)).fold(function(){var t=n.hasOwnProperty("uid")?n:P({uid:cu("")},n);return iu(t).getOrDie()},function(t){return t});var t},fu=vi,lu=function(t,n,e){return ur(t,function(t){return Ge(t,n)},e)},du=function(t,n){return e=n,r=(o=t)===undefined?H.document:o.dom(),Xe(r)?et.none():et.from(r.querySelector(e)).map(fe.fromDom);var e,o,r},mu=function(t,n,e){return Xo(Ge,lu,t,n,e)},gu=function(){var n=oi("aria-owns");return{id:nt(n),link:function(t){Xr(t,"aria-owns",n)},unlink:function(t){$r(t,"aria-owns")}}},pu=function(n,t){return(e=t,ar(e,function(t){if(!tr(t))return!1;var n=qr(t,"id");return n!==undefined&&-1<n.indexOf("aria-owns")}).bind(function(t){var n=qr(t,"id"),e=Ar(t);return du(e,'[aria-owns="'+n+'"]')})).exists(function(t){return hu(n,t)});var e},hu=function(n,t){return e=t,r=nt(!(o=function(t){return qe(t,n.element())})),ar(e,o,r).isSome()||pu(n,t);var e,o,r},vu=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o<t.length;o++)t[o].each(e);return n},bu=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return et.none()},yu="unknown";(Jo=$o||($o={}))[Jo.STOP=0]="STOP",Jo[Jo.NORMAL=1]="NORMAL",Jo[Jo.LOGGING=2]="LOGGING";var xu=ce({}),wu=function(n,t,e){var o,r,i,u;switch(Ft(xu.get(),n).orThunk(function(){var t=ut(xu.get());return bu(t,function(t){return-1<n.indexOf(t)?et.some(xu.get()[t]):et.none()})}).getOr($o.NORMAL)){case $o.NORMAL:return e(ku());case $o.LOGGING:var a=(o=n,r=t,i=[],u=(new Date).getTime(),{logEventCut:function(t,n,e){i.push({outcome:"cut",target:n,purpose:e})},logEventStopped:function(t,n,e){i.push({outcome:"stopped",target:n,purpose:e})},logNoParent:function(t,n,e){i.push({outcome:"no-parent",target:n,purpose:e})},logEventNoHandlers:function(t,n){i.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,e){i.push({outcome:"response",purpose:e,target:n})},write:function(){var t=(new Date).getTime();D(["mousemove","mouseover","mouseout",Bo()],o)||H.console.log(o,{event:o,time:t-u,target:r.dom(),sequence:F(i,function(t){return D(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Zr(t.target)+")":t.outcome})})}}),c=e(a);return a.write(),c;case $o.STOP:return!0}},Su=["alloy/data/Fields","alloy/debugging/Debugging"],Cu=function(t,n,e){return wu(t,n,e)},ku=nt({logEventCut:tt,logEventStopped:tt,logNoParent:tt,logEventNoHandlers:tt,logEventResponse:tt,write:tt}),Ou=nt([Pn("menu"),Pn("selectedMenu")]),Eu=nt([Pn("item"),Pn("selectedItem")]),Tu=(nt(pn(Eu().concat(Ou()))),nt(pn(Eu()))),Bu=Wn("initSize",[Pn("numColumns"),Pn("numRows")]),Au=function(){return Wn("markers",[Pn("backgroundMenu")].concat(Ou()).concat(Eu()))},Du=function(t){return Wn("markers",F(t,Pn))},_u=function(t,n,e){!function(){var t=new Error;if(t.stack===undefined)return;var n=t.stack.split("\n");N(n,function(n){return 0<n.indexOf("alloy")&&!_(Su,function(t){return-1<n.indexOf(t)})}).getOr(yu)}();return wn(n,n,e,On(function(e){return z.value(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(undefined,t)})}))},Mu=function(t){return _u(0,t,St(tt))},Fu=function(t){return _u(0,t,St(et.none))},Iu=function(t){return _u(0,t,Ct())},Ru=function(t){return _u(0,t,Ct())},Vu=function(t,n){return ae(t,nt(n))},Nu=function(t){return ae(t,d)},Hu=nt(Bu),Pu=function(e,o,r){return Cr(function(t,n){r(t,e,o)})},zu=function(t,n,e,o,r,i){var u,a,c=gn(t),s=Qn(n,[(u="config",a=t,qn(u,gn(a)))]);return Uu(c,s,n,e,o,r,i)},Lu=function(r,i,u){var t,n,e,o,a,c;return t=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=[e].concat(t);return e.config({name:nt(r)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+u)},function(t){var n=Array.prototype.slice.call(o,1);return i.apply(undefined,[e,t.config,t.state].concat(n))})},n=u,e=i.toString(),o=e.indexOf(")")+1,a=e.indexOf("("),c=e.substring(a+1,o-1).split(/,\s*/),t.toFunctionAnnotation=function(){return{name:n,parameters:gi(c.slice(0,1).concat(c.slice(3)))}},t},ju=function(t){return{key:t,value:undefined}},Uu=function(e,t,o,r,n,i,u){var a=function(t){return Nt(t,o)?t[o]():et.none()},c=st(n,function(t,n){return Lu(o,t,n)}),s=st(i,function(t,n){return pi(t,n)}),f=P({},s,c,{revoke:g(ju,o),config:function(t){var n=An(o+"-config",e,t);return{key:o,value:{config:n,me:f,configAsRaw:xt(function(){return An(o+"-config",e,t)}),initialConfig:t,state:u}}},schema:function(){return t},exhibit:function(t,e){return a(t).bind(function(n){return Ft(r,"exhibit").map(function(t){return t(e,n.config,n.state)})}).getOr(Si({}))},name:function(){return o},handlers:function(t){return a(t).map(function(t){return Mt("events",function(t,n){return{}})(r)(t.config,t.state)}).getOr({})}});return f},Wu=function(t){return Rt(t)},Gu=gn([Pn("fields"),Pn("name"),Zn("active",{}),Zn("apis",{}),Zn("state",yi),Zn("extra",{})]),Xu=function(t){var n=An("Creating behaviour: "+t.name,Gu,t);return zu(n.fields,n.name,n.active,n.apis,n.extra,n.state)},Yu=gn([Pn("branchKey"),Pn("branches"),Pn("name"),Zn("active",{}),Zn("apis",{}),Zn("state",yi),Zn("extra",{})]),qu=function(t){var n,e,o,r,i,u,a,c,s=An("Creating behaviour: "+t.name,Yu,t);return n=_n(s.branchKey,s.branches),e=s.name,o=s.active,r=s.apis,i=s.extra,u=s.state,c=Qn(e,[qn("config",a=n)]),Uu(a,c,e,o,r,i,u)},Ku=nt(undefined),$u=/* */Object.freeze({events:function(a){return fr([mr(xo(),function(r,i){var t,n,u=a.channels,e=ut(u),o=(t=e,(n=i).universal()?t:I(t,function(t){return D(n.channels(),t)}));W(o,function(t){var n=u[t],e=n.schema,o=An("channel["+t+"] data\nReceiver: "+Zr(r.element()),e,i.data());n.onReceive(r,o)})})])}}),Ju=[zn("channels",En(z.value,gn([Iu("onReceive"),Zn("schema",Mn())])))],Qu=Xu({fields:Ju,name:"receiving",active:$u}),Zu=/* */Object.freeze({exhibit:function(t,n){return Si({classes:[],styles:n.useFixed?{}:{position:"relative"}})}}),ta=function(e,o){return{left:nt(e),top:nt(o),translate:function(t,n){return ta(e+t,o+n)}}},na=ta,ea=function(t,n){return t!==undefined?t:n!==undefined?n:0},oa=function(t){var n,e,o=t.dom().ownerDocument,r=o.body,i=(n=fe.fromDom(o),(e=n.dom())===e.window&&n instanceof H.Window?n:er(n)?e.defaultView||e.parentWindow:null),u=o.documentElement,a=ea(i.pageYOffset,u.scrollTop),c=ea(i.pageXOffset,u.scrollLeft),s=ea(u.clientTop,r.clientTop),f=ea(u.clientLeft,r.clientLeft);return ra(t).translate(c-f,a-s)},ra=function(t){var n,e,o,r=t.dom(),i=r.ownerDocument,u=i.body,a=fe.fromDom(i.documentElement);return u===r?na(u.offsetLeft,u.offsetTop):(n=t,e=a||fe.fromDom(H.document.documentElement),ur(n,g(qe,e)).isSome()?(o=r.getBoundingClientRect(),na(o.left,o.top)):na(0,0))},ia=(Pe.detect().browser.isSafari(),function(t){var n=t!==undefined?t.dom():H.document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return na(e,o)});function ua(o,r){var t=function(t){var n=r(t);if(n<=0||null===n){var e=Xi(t,o);return parseFloat(e)||0}return n},i=function(r,t){return V(t,function(t,n){var e=Xi(r,n),o=e===undefined?0:parseInt(e,10);return isNaN(o)?t:t+o},0)};return{set:function(t,n){if(!U(n)&&!n.match(/^[0-9]+$/))throw new Error(o+".set accepts only positive integer values. Value was "+n);var e=t.dom();Li(e)&&(e.style[o]=n+"px")},get:t,getOuter:t,aggregate:i,max:function(t,n,e){var o=i(t,e);return o<n?n-o:0}}}var aa=ua("width",function(t){return t.dom().offsetWidth}),ca=function(t){return aa.get(t)},sa=function(t){return aa.getOuter(t)},fa=ua("height",function(t){var n=t.dom();return or(t)?n.getBoundingClientRect().height:n.offsetHeight}),la=function(t){return fa.get(t)},da=function(t){return fa.getOuter(t)},ma=Br(["x","y","width","height","maxHeight","direction","classes","label","candidateYforTest"],[]),ga=Or("position","left","top","right","bottom"),pa=pt([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),ha=pa.southeast,va=pa.southwest,ba=pa.northeast,ya=pa.northwest,xa=pa.south,wa=pa.north,Sa=pa.east,Ca=pa.west,ka=Or("point","width","height"),Oa=Or("x","y","width","height"),Ea=function(t,n,e,o){return{x:nt(t),y:nt(n),width:nt(e),height:nt(o),right:nt(t+e),bottom:nt(n+o)}},Ta=function(t){var n=oa(t),e=sa(t),o=da(t);return Ea(n.left(),n.top(),e,o)},Ba=function(o,t){return o.view(t).fold(nt([]),function(t){var n=o.owner(t),e=Ba(o,n);return[t].concat(e)})},Aa=/* */Object.freeze({view:function(t){return(t.dom()===H.document?et.none():et.from(t.dom().defaultView.frameElement)).map(fe.fromDom)},owner:function(t){return Ar(t)}}),Da=function(o){var t,n,e,r,i=fe.fromDom(H.document),u=ia(i);return(t=o,e=(n=Aa).owner(t),r=Ba(n,e),et.some(r)).fold(g(oa,o),function(t){var n=ra(o),e=R(t,function(t,n){var e=ra(n);return{left:t.left+e.left(),top:t.top+e.top()}},{left:0,top:0});return na(e.left+n.left()+u.left(),e.top+n.top()+u.top())})},_a=function(){var t=H.window.innerWidth,n=H.window.innerHeight,e=fe.fromDom(H.document),o=ia(e);return Ea(o.left(),o.top(),t,n)},Ma=pt([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Fa=function(t,n,e,o,r,i){var u,a,c,s,f,l,d,m,g,p=n.x()-e,h=n.y()-o,v=r-(p+n.width()),b=i-(h+n.height()),y=et.some(p),x=et.some(h),w=et.some(v),S=et.some(b),C=et.none();return u=n.direction(),a=function(){return ga(t,y,x,C,C)},c=function(){return ga(t,C,x,w,C)},s=function(){return ga(t,y,C,C,S)},f=function(){return ga(t,C,C,w,S)},l=function(){return ga(t,y,x,C,C)},d=function(){return ga(t,y,C,C,S)},m=function(){return ga(t,y,x,C,C)},g=function(){return ga(t,C,x,w,C)},u.fold(a,c,s,f,l,d,m,g)},Ia=function(t,n){var e=g(Da,n),o=t.fold(e,e,function(){var t=ia();return Da(n).translate(-t.left(),-t.top())}),r=sa(n),i=da(n);return Ea(o.left(),o.top(),r,i)},Ra=Ma.relative,Va=Ma.fixed,Na=Or("anchorBox","origin"),Ha=pt([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Pa=function(t,N,H,P,z){var L=H.width(),j=H.height(),o=function(t,o,r,i){var n,e,u,a,c,s,f,l,d,m,g,p,h,v,b,y,x,w,S,C,k,O,E,T,B,A,D,_,M,F,I,R,V=t(N,H,P);return(e=L,u=j,a=z,d=(n=V).x(),m=n.y(),g=n.bubble().offset().left(),p=n.bubble().offset().top(),h=a.x(),v=a.y(),b=a.width(),y=a.height(),C=v<=(w=m+p),k=(S=h<=(x=d+g))&&C,O=x+e<=h+b&&w+u<=v+y,E=S?Math.min(e,h+b-x):Math.abs(h-(x+e)),T=C?Math.min(u,v+y-w):Math.abs(v-(w+u)),B=a.x()+a.width(),A=Math.max(a.x(),x),D=Math.min(A,B),M=nt((_=C?w:w+(u-T))+T-v),F=nt(v+y-_),c=n.direction(),f=s=F,l=M,I=c.fold(s,s,l,l,s,l,f,f),R=ma({x:D,y:_,width:E,height:T,maxHeight:I,direction:n.direction(),classes:{on:n.bubble().classesOn(),off:n.bubble().classesOff()},label:n.label(),candidateYforTest:w}),k&&O?Ha.fit(R):Ha.nofit(R,E,T)).fold(Ha.fit,function(t,n,e){return i<e||r<n?Ha.nofit(t,n,e):Ha.nofit(o,r,i)})};return V(t,function(t,n){var e=g(o,n);return t.fold(Ha.fit,e)},Ha.nofit(ma({x:N.x(),y:N.y(),width:H.width(),height:H.height(),maxHeight:H.height(),direction:ha(),classes:[],label:"none",candidateYforTest:N.y()}),-1,-1)).fold(d,d)},za=function(t,n,e,o){$i(n,"max-height");var r,i={width:nt(sa(r=n)),height:nt(da(r))};return Pa(o.preference(),t,i,e,o.bounds())},La=function(t,n,e){var o,r,i,u,a,c=function(t){return t+"px"},s=(o=e.origin(),r=n,o.fold(function(){return ga("absolute",et.some(r.x()),et.some(r.y()),et.none(),et.none())},function(t,n,e,o){return Fa("absolute",r,t,n,e,o)},function(t,n,e,o){return Fa("fixed",r,t,n,e,o)}));i=t,u={position:et.some(s.position()),left:s.left().map(c),top:s.top().map(c),right:s.right().map(c),bottom:s.bottom().map(c)},a=i.dom(),ct(u,function(t,n){t.fold(function(){Ui(a,n)},function(t){ji(a,n,t)})})},ja=function(t,n){var e,o,r;e=t,o=Math.floor(n),r=fa.max(e,o,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]),Wi(e,"max-height",r+"px")},Ua=nt(function(t,n){ja(t,n),Gi(t,{"overflow-x":"hidden","overflow-y":"auto"})}),Wa=nt(function(t,n){ja(t,n)}),Ga=Br(["bounds","origin","preference","maxHeightFunction"],[]),Xa=function(t,n,e,o,r,i){var u,a,c,s,f,l=(u=i,a="maxHeightFunction",c=Ua(),u[a]===undefined?c:u[a]),d=t.anchorBox(),m=t.origin(),g=Ga({bounds:(s=m,f=r,f.fold(function(){return s.fold(_a,_a,Ea)},function(t){return s.fold(t,t,Ea)})),origin:m,preference:o,maxHeightFunction:l});Ya(d,n,e,g)},Ya=function(t,n,e,o){var r,i,u,a,c=za(t,n,e,o);La(n,c,o),r=n,i=c.classes(),zi(r,i.off),Pi(r,i.on),u=n,a=c,o.maxHeightFunction()(u,a.maxHeight())},qa=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],Ka=function(t,n,e){var r=function(t){return Ft(e,t).getOr([])},o=function(t,n,e){var o=Q(qa,e);return{offset:function(){return na(t,n)},classesOn:function(){return K(e,r)},classesOff:function(){return K(o,r)}}};return{southeast:function(){return o(-t,n,["top","alignLeft"])},southwest:function(){return o(t,n,["top","alignRight"])},south:function(){return o(-t/2,n,["top","alignCentre"])},northeast:function(){return o(-t,-n,["bottom","alignLeft"])},northwest:function(){return o(t,-n,["bottom","alignRight"])},north:function(){return o(-t/2,-n,["bottom","alignCentre"])},east:function(){return o(t,-n/2,["valignCentre","left"])},west:function(){return o(-t,-n/2,["valignCentre","right"])}}},$a=function(){return Ka(0,0,{})},Ja=Or("x","y","bubble","direction","label"),Qa=function(t){return t.x()},Za=function(t,n){return t.x()+t.width()/2-n.width()/2},tc=function(t,n){return t.x()+t.width()-n.width()},nc=function(t,n){return t.y()-n.height()},ec=function(t){return t.y()+t.height()},oc=function(t,n){return t.y()+t.height()/2-n.height()/2},rc=function(t,n,e){return Ja(Qa(t),ec(t),e.southeast(),ha(),"layout-se")},ic=function(t,n,e){return Ja(tc(t,n),ec(t),e.southwest(),va(),"layout-sw")},uc=function(t,n,e){return Ja(Qa(t),nc(t,n),e.northeast(),ba(),"layout-ne")},ac=function(t,n,e){return Ja(tc(t,n),nc(t,n),e.northwest(),ya(),"layout-nw")},cc=function(t,n,e){return Ja(Za(t,n),nc(t,n),e.north(),wa(),"layout-n")},sc=function(t,n,e){return Ja(Za(t,n),ec(t),e.south(),xa(),"layout-s")},fc=function(t,n,e){return Ja((o=t).x()+o.width(),oc(t,n),e.east(),Sa(),"layout-e");var o},lc=function(t,n,e){return Ja((o=n,t.x()-o.width()),oc(t,n),e.west(),Ca(),"layout-w");var o},dc=function(){return[rc,ic,uc,ac,sc,cc,fc,lc]},mc=function(){return[ic,rc,ac,uc,sc,cc,fc,lc]},gc=function(t){return t},pc=function(n,e){return function(t){return"rtl"===hc(t)?e:n}},hc=function(t){return"rtl"===Xi(t,"direction")?"rtl":"ltr"},vc=function(){return Qn("layouts",[Pn("onLtr"),Pn("onRtl")])},bc=function(n,t,e,o){var r=t.layouts.map(function(t){return t.onLtr(n)}).getOr(e),i=t.layouts.map(function(t){return t.onRtl(n)}).getOr(o);return pc(r,i)(n)},yc=[Pn("hotspot"),Yn("bubble"),Zn("overrides",{}),vc(),Vu("placement",function(t,n,e){var o=n.hotspot,r=Ia(e,o.element()),i=bc(t.element(),n,dc(),mc());return et.some(gc({anchorBox:r,bubble:n.bubble.getOr($a()),overrides:n.overrides,layouts:i,placer:et.none()}))})],xc=[Pn("x"),Pn("y"),Zn("height",0),Zn("width",0),Zn("bubble",$a()),Zn("overrides",{}),vc(),Vu("placement",function(t,n,e){var o=Ea(n.x,n.y,n.width,n.height),r=bc(t.element(),n,dc(),mc());return et.some(gc({anchorBox:o,bubble:n.bubble,overrides:n.overrides,layouts:r,placer:et.none()}))})],wc={create:Or("start","soffset","finish","foffset")},Sc=pt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Cc=(Sc.before,Sc.on,Sc.after,function(t){return t.fold(d,d,d)}),kc=pt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Oc={domRange:kc.domRange,relative:kc.relative,exact:kc.exact,exactFromRange:function(t){return kc.exact(t.start(),t.soffset(),t.finish(),t.foffset())},getWin:function(t){var n=t.match({domRange:function(t){return fe.fromDom(t.startContainer)},relative:function(t,n){return Cc(t)},exact:function(t,n,e,o){return t}});return Dr(n)},range:wc.create},Ec=function(t,n,e){var o,r,i=t.document.createRange();return o=i,n.fold(function(t){o.setStartBefore(t.dom())},function(t,n){o.setStart(t.dom(),n)},function(t){o.setStartAfter(t.dom())}),r=i,e.fold(function(t){r.setEndBefore(t.dom())},function(t,n){r.setEnd(t.dom(),n)},function(t){r.setEndAfter(t.dom())}),i},Tc=function(t,n,e,o,r){var i=t.document.createRange();return i.setStart(n.dom(),e),i.setEnd(o.dom(),r),i},Bc=function(t){return{left:nt(t.left),top:nt(t.top),right:nt(t.right),bottom:nt(t.bottom),width:nt(t.width),height:nt(t.height)}},Ac=pt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Dc=function(t,n,e){return n(fe.fromDom(e.startContainer),e.startOffset,fe.fromDom(e.endContainer),e.endOffset)},_c=function(t,n){var r,e,o,i=(r=t,n.match({domRange:function(t){return{ltr:nt(t),rtl:et.none}},relative:function(t,n){return{ltr:xt(function(){return Ec(r,t,n)}),rtl:xt(function(){return et.some(Ec(r,n,t))})}},exact:function(t,n,e,o){return{ltr:xt(function(){return Tc(r,t,n,e,o)}),rtl:xt(function(){return et.some(Tc(r,e,o,t,n))})}}}));return(o=(e=i).ltr()).collapsed?e.rtl().filter(function(t){return!1===t.collapsed}).map(function(t){return Ac.rtl(fe.fromDom(t.endContainer),t.endOffset,fe.fromDom(t.startContainer),t.startOffset)}).getOrThunk(function(){return Dc(0,Ac.ltr,o)}):Dc(0,Ac.ltr,o)},Mc=function(t,n,e){return n>=t.left&&n<=t.right&&e>=t.top&&e<=t.bottom};var Fc=function B_(e,o){var r=function(t){return e(t)?et.from(t.dom().nodeValue):et.none()},t=Pe.detect().browser,n=t.isIE()&&10===t.version.major?function(t){try{return r(t)}catch(n){return et.none()}}:r;return{get:function(t){if(!e(t))throw new Error("Can only get "+o+" value of a "+o+" node");return n(t).getOr("")},getOption:n,set:function(t,n){if(!e(t))throw new Error("Can only set raw "+o+" value of a "+o+" node");t.dom().nodeValue=n}}}(nr,"text"),Ic=function(t){return Fc.get(t)},Rc=function(t){return Fc.getOption(t)},Vc=function(e,o,t,n,r){var i=function(t){var n=e.dom().createRange();return n.setStart(o.dom(),t),n.collapse(!0),n},u=Ic(o).length,a=function(t,n,e,o,r){if(0===r)return 0;if(n===o)return r-1;for(var i=o,u=1;u<r;u++){var a=t(u),c=Math.abs(n-a.left);if(e<=a.bottom){if(e<a.top||i<c)return u-1;i=c}}return 0}(function(t){return i(t).getBoundingClientRect()},t,n,r.right,u);return i(a)},Nc=function(n,e,o,r){var t=n.dom().createRange();t.selectNode(e.dom());var i=t.getClientRects();return bu(i,function(t){return Mc(t,o,r)?et.some(t):et.none()}).map(function(t){return Vc(n,e,o,r,t)})},Hc=function(n,t,e,o){var r=n.dom().createRange(),i=Fr(t);return bu(i,function(t){return r.selectNode(t.dom()),Mc(r.getBoundingClientRect(),e,o)?Pc(n,t,e,o):et.none()})},Pc=function(t,n,e,o){return(nr(n)?Nc:Hc)(t,n,e,o)},zc=["img","br"],Lc=function(t){return Rc(t).filter(function(t){return 0!==t.trim().length||-1<t.indexOf("\xa0")}).isSome()||D(zc,Qo(t))},jc=function(t){return cr(t,Lc)},Uc=function(t){return Wc(t,Lc)},Wc=function(t,i){var u=function(t){for(var n=Fr(t),e=n.length-1;0<=e;e--){var o=n[e];if(i(o))return et.some(o);var r=u(o);if(r.isSome())return r}return et.none()};return u(t)},Gc=function(t,n){return n-t.left<t.right-n},Xc=function(t,n,e){var o=t.dom().createRange();return o.selectNode(n.dom()),o.collapse(e),o},Yc=function(n,t,e){var o=n.dom().createRange();o.selectNode(t.dom());var r=o.getBoundingClientRect(),i=Gc(r,e);return(!0===i?jc:Uc)(t).map(function(t){return Xc(n,t,i)})},qc=function(t,n,e){var o=n.dom().getBoundingClientRect(),r=Gc(o,e);return et.some(Xc(t,n,r))},Kc=function(t,n,e,o){var r=t.dom().createRange();r.selectNode(n.dom());var i=r.getBoundingClientRect();return function(t,n,e,o){var r=t.dom().createRange();r.selectNode(n.dom());var i=r.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,e)),a=Math.max(i.top,Math.min(i.bottom,o));return Pc(t,n,u,a)}(t,n,Math.max(i.left,Math.min(i.right,e)),Math.max(i.top,Math.min(i.bottom,o)))},$c=(document.caretPositionFromPoint||document.caretRangeFromPoint,function(t,n){return Ye(n,t)}),Jc=function(t,n,e,o){var r,i,u,a,c,s=(i=n,u=e,a=o,(c=Ar(r=t).dom().createRange()).setStart(r.dom(),i),c.setEnd(u.dom(),a),c),f=qe(t,e)&&n===o;return s.collapsed&&!f},Qc=function(t){var n=fe.fromDom(t.anchorNode),e=fe.fromDom(t.focusNode);return Jc(n,t.anchorOffset,e,t.focusOffset)?et.some(wc.create(n,t.anchorOffset,e,t.focusOffset)):function(t){if(0<t.rangeCount){var n=t.getRangeAt(0),e=t.getRangeAt(t.rangeCount-1);return et.some(wc.create(fe.fromDom(n.startContainer),n.startOffset,fe.fromDom(e.endContainer),e.endOffset))}return et.none()}(t)},Zc=function(t,n){var i,e,o,r,u=_c(i=t,n).match({ltr:function(t,n,e,o){var r=i.document.createRange();return r.setStart(t.dom(),n),r.setEnd(e.dom(),o),r},rtl:function(t,n,e,o){var r=i.document.createRange();return r.setStart(e.dom(),o),r.setEnd(t.dom(),n),r}});return o=(e=u).getClientRects(),0<(r=0<o.length?o[0]:e.getBoundingClientRect()).width||0<r.height?et.some(r).map(Bc):et.none()},ts=Or("element","offset"),ns=pt([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),es=function(t){return t.fold(function(t){return t},function(t,n,e){return t.translate(-n,-e)})},os=function(t){return t.fold(function(t){return t},function(t,n,e){return t})},rs=function(t){return V(t,function(t,n){return t.translate(n.left(),n.top())},na(0,0))},is=function(t){var n=F(t,os);return rs(n)},us=ns.screen,as=ns.absolute,cs=function(t,n,e){var o,r,i,u=Ar(t.element()),a=ia(u),c=(o=t,r=e,i=Dr(r.root).dom(),et.from(i.frameElement).map(fe.fromDom).filter(function(t){var n=Ar(t),e=Ar(o.element());return qe(n,e)}).map(oa)).getOr(a);return as(c,a.left(),a.top())},ss=function(t,n,e,o){var r=t,i=n,u=e,a=o;t<0&&(r=0,u=e+t),n<0&&(i=0,a=o+n);var c=us(na(r,i));return et.some(ka(c,u,a))},fs=function(t,c,s,f,l){return t.map(function(t){var n,e,o,r=[c,t.point()],i=(n=function(){return is(r)},e=function(){return is(r)},o=function(){return t=F(r,es),rs(t);var t},f.fold(n,e,o)),u=Oa(i.left(),i.top(),t.width(),t.height()),a=bc(l,s,s.showAbove?[uc,ac,rc,ic,cc,sc]:[rc,ic,uc,ac,sc,sc],s.showAbove?[ac,uc,ic,rc,cc,sc]:[ic,rc,ac,uc,sc,cc]);return gc({anchorBox:u,bubble:s.bubble.getOr($a()),overrides:s.overrides,layouts:a,placer:et.none()})})},ls=Or("element","offset"),ds=function(t,n){return nr(t)?ls(t,n):function(t,n){var e=Fr(t);if(0===e.length)return ts(t,n);if(n<e.length)return ts(e[n],0);var o=e[e.length-1],r=nr(o)?Ic(o).length:Fr(o).length;return ts(o,r)}(t,n)},ms=function(n,t){return t.getSelection.getOrThunk(function(){return function(){return t=n,et.from(t.getSelection()).filter(function(t){return 0<t.rangeCount}).bind(Qc);var t}})().map(function(t){var n=ds(t.start(),t.soffset()),e=ds(t.finish(),t.foffset());return Oc.range(n.element(),n.offset(),e.element(),e.offset())})},gs=[Yn("getSelection"),Pn("root"),Yn("bubble"),vc(),Zn("overrides",{}),Zn("showAbove",!1),Vu("placement",function(t,n,e){var o=Dr(n.root).dom(),r=cs(t,0,n),i=ms(o,n).bind(function(t){return Zc(o,Oc.exactFromRange(t)).orThunk(function(){var n=fe.fromText("\ufeff");return Rr(t.start(),n),Zc(o,Oc.exact(n,0,n,1)).map(function(t){return Lr(n),t})}).bind(function(t){return ss(t.left(),t.top(),t.width(),t.height())})}),u=ms(o,n).bind(function(t){return tr(t.start())?et.some(t.start()):_r(t.start())}).getOr(t.element());return fs(i,r,n,e,u)})],ps=[Pn("node"),Pn("root"),Yn("bubble"),vc(),Zn("overrides",{}),Zn("showAbove",!1),Vu("placement",function(r,i,u){var a=cs(r,0,i);return i.node.bind(function(t){var n=t.dom().getBoundingClientRect(),e=ss(n.left,n.top,n.width,n.height),o=i.node.getOr(r.element());return fs(e,a,i,u,o)})})],hs=function(t){return t.x()+t.width()},vs=function(t,n){return t.x()-n.width()},bs=function(t,n){return t.y()-n.height()+t.height()},ys=function(t){return t.y()},xs=function(t,n,e){return Ja(hs(t),ys(t),e.southeast(),ha(),"link-layout-se")},ws=function(t,n,e){return Ja(vs(t,n),ys(t),e.southwest(),va(),"link-layout-sw")},Ss=function(t,n,e){return Ja(hs(t),bs(t,n),e.northeast(),ba(),"link-layout-ne")},Cs=function(t,n,e){return Ja(vs(t,n),bs(t,n),e.northwest(),ya(),"link-layout-nw")},ks=[Pn("item"),vc(),Zn("overrides",{}),Vu("placement",function(t,n,e){var o=Ia(e,n.item.element()),r=bc(t.element(),n,[xs,ws,Ss,Cs],[ws,xs,Cs,Ss]);return et.some(gc({anchorBox:o,bubble:$a(),overrides:n.overrides,layouts:r,placer:et.none()}))})],Os=_n("anchor",{selection:gs,node:ps,hotspot:yc,submenu:ks,makeshift:xc}),Es=function(t,n,e,o,r){var i,u=(i=e.anchorBox,Na(i,n));Xa(u,r.element(),e.bubble,e.layouts,o,e.overrides)},Ts=function(n,t,e,o,r,i){var u=An("positioning anchor.info",Os,o);Wi(r.element(),"position","fixed");var a=qi(r.element(),"visibility");Wi(r.element(),"visibility","hidden");var c,s,f,l=t.useFixed?Va(0,0,H.window.innerWidth,H.window.innerHeight):(s=oa((c=n).element()),f=c.element().dom().getBoundingClientRect(),Ra(s.left(),s.top(),f.width,f.height)),d=u.placement,m=i.map(function(t){return function(){return Ta(t)}}).or(t.getBounds);d(n,u,l).each(function(t){t.placer.getOr(Es)(n,l,t,m,r)}),a.fold(function(){$i(r.element(),"visibility")},function(t){Wi(r.element(),"visibility",t)}),qi(r.element(),"left").isNone()&&qi(r.element(),"top").isNone()&&qi(r.element(),"right").isNone()&&qi(r.element(),"bottom").isNone()&&qi(r.element(),"position").is("fixed")&&$i(r.element(),"position")},Bs=/* */Object.freeze({position:function(t,n,e,o,r){var i=et.none();Ts(t,n,e,o,r,i)},positionWithin:Ts,getMode:function(t,n,e){return n.useFixed?"fixed":"absolute"}}),As=[Zn("useFixed",!1),Yn("getBounds")],Ds=Xu({fields:As,name:"positioning",active:Zu,apis:Bs}),_s=function(t){zo(t,Mo());var n=t.components();W(n,_s)},Ms=function(t){var n=t.components();W(n,Ms),zo(t,_o())},Fs=function(t,n){Is(t,n,Hr)},Is=function(t,n,e){t.getSystem().addToWorld(n),e(t.element(),n.element()),or(t.element())&&Ms(n),t.syncComponents()},Rs=function(t){_s(t),Lr(t.element()),t.getSystem().removeFromWorld(t)},Vs=function(n){var t=_r(n.element()).bind(function(t){return n.getSystem().getByDom(t).fold(et.none,et.some)});Rs(n),t.each(function(t){t.syncComponents()})},Ns=function(t){var n=t.components();W(n,Rs),zr(t.element()),t.syncComponents()},Hs=function(t,n){Ps(t,n,Hr)},Ps=function(t,n,e){e(t,n.element());var o=Fr(n.element());W(o,function(t){n.getByDom(t).each(Ms)})},zs=function(n){var t=Fr(n.element());W(t,function(t){n.getByDom(t).each(_s)}),Lr(n.element())},Ls=function(t,n,e,o){var r=function(n,t,e,o){e.get().each(function(t){Ns(n)});var r=t.getAttachPoint(n);Fs(r,n);var i=n.getSystem().build(o);return Fs(n,i),e.set(i),i}(t,n,e,o);return n.onOpen(t,r),r},js=function(n,e,o){o.get().each(function(t){Ns(n),Vs(n),e.onClose(n,t),o.clear()})},Us=function(t,n,e){return e.isOpen()},Ws=function(t,n,e){var o,r,i,u,a=n.getAttachPoint(t);Wi(t.element(),"position",Ds.getMode(a)),o=t,r="visibility",i=n.cloakVisibilityAttr,u="hidden",qi(o.element(),r).fold(function(){$r(o.element(),i)},function(t){Xr(o.element(),i,t)}),Wi(o.element(),r,u)},Gs=function(t,n,e){var o;o=t.element(),_(["top","left","right","bottom"],function(t){return qi(o,t).isSome()})||$i(t.element(),"position"),function(t,n,e){if(Kr(t.element(),e)){var o=qr(t.element(),e);Wi(t.element(),n,o)}else $i(t.element(),n)}(t,"visibility",n.cloakVisibilityAttr)},Xs=/* */Object.freeze({cloak:Ws,decloak:Gs,open:Ls,openWhileCloaked:function(t,n,e,o,r){Ws(t,n),Ls(t,n,e,o),r(),Gs(t,n)},close:js,isOpen:Us,isPartOf:function(n,e,t,o){return Us(0,0,t)&&t.get().exists(function(t){return e.isPartOf(n,t,o)})},getState:function(t,n,e){return e.get()}}),Ys=/* */Object.freeze({events:function(e,o){return fr([mr(Eo(),function(t,n){js(t,e,o)})])}}),qs=[Mu("onOpen"),Mu("onClose"),Pn("isPartOf"),Pn("getAttachPoint"),Zn("cloakVisibilityAttr","data-precloak-visibility")],Ks=Xu({fields:qs,name:"sandboxing",active:Ys,apis:Xs,state:/* */Object.freeze({init:function(){var n=ce(et.none()),t=nt("not-implemented");return xi({readState:t,isOpen:function(){return n.get().isSome()},clear:function(){n.set(et.none())},set:function(t){n.set(et.some(t))},get:function(t){return n.get()}})}})}),$s=nt("dismiss.popups"),Js=nt("mouse.released"),Qs=gn([Zn("isExtraPart",nt(!1)),Qn("fireEventInstead",[Zn("event",Fo())])]),Zs=function(t){var n=tf(t);return Qu.config(n)},tf=function(t){var e=An("Dismissal",Qs,t);return{channels:It($s(),{schema:gn([Pn("target")]),onReceive:function(n,t){Ks.isOpen(n)&&(Ks.isPartOf(n,t.target)||e.isExtraPart(n,t.target)||e.fireEventInstead.fold(function(){return Ks.close(n)},function(t){return zo(n,t.event)}))}})}},nf=function(o,t){return ue(o,{},F(t,function(t){return n=t.name(),e="Cannot configure "+t.name()+" for "+o,wn(n,n,kt(),mn(function(t){return Gt("The field: "+n+" is forbidden. "+e)}));var n,e}).concat([ae("dump",d)]))},ef=function(t){return t.dump},of=function(t,n){return P({},t.dump,Wu(n))},rf=nf,uf=of,af="placeholder",cf=pt([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),sf=function(t,n,e,o){return e.uiType===af?(i=e,u=o,(r=t).exists(function(t){return t!==i.owner})?cf.single(!0,nt(i)):Ft(u,i.name).fold(function(){throw new Error("Unknown placeholder component: "+i.name+"\nKnown: ["+ut(u)+"]\nNamespace: "+r.getOr("none")+"\nSpec: "+un(i,null,2))},function(t){return t.replace()})):cf.single(!1,nt(e));var r,i,u},ff=function(i,u,a,c){return sf(i,0,a,c).fold(function(t,n){var e=n(u,a.config,a.validated),o=Ft(e,"components").getOr([]),r=K(o,function(t){return ff(i,u,t,c)});return[P({},e,{components:r})]},function(t,n){var e=n(u,a.config,a.validated);return a.validated.preprocess.getOr(d)(e)})},lf=function(n,e,t,o){var r,i,u,a=st(o,function(t,n){return o=t,r=!1,{name:nt(e=n),required:function(){return o.fold(function(t,n){return t},function(t,n){return t})},used:function(){return r},replace:function(){if(!0===r)throw new Error("Trying to use the same placeholder more than once: "+e);return r=!0,o}};var e,o,r}),c=(r=n,i=e,u=a,K(t,function(t){return ff(r,i,t,u)}));return ct(a,function(t){if(!1===t.used()&&t.required())throw new Error("Placeholder: "+t.name()+" was not found in components list\nNamespace: "+n.getOr("none")+"\nComponents: "+un(e.components,null,2))}),c},df=cf.single,mf=cf.multiple,gf=nt(af),pf=pt([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),hf=Zn("factory",{sketch:d}),vf=Zn("schema",[]),bf=Pn("name"),yf=wn("pname","pname",Ot(function(t){return"<alloy."+oi(t.name)+">"}),Mn()),xf=ae("schema",function(){return[Yn("preprocess")]}),wf=Zn("defaults",nt({})),Sf=Zn("overrides",nt({})),Cf=pn([hf,vf,bf,yf,wf,Sf]),kf=pn([hf,vf,bf,wf,Sf]),Of=pn([hf,vf,bf,yf,wf,Sf]),Ef=pn([hf,xf,bf,Pn("unit"),yf,wf,Sf]),Tf=function(t){return t.fold(et.some,et.none,et.some,et.some)},Bf=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},Af=function(e,o){return function(t){var n=An("Converting part type",o,t);return e(n)}},Df=Af(pf.required,Cf),_f=Af(pf.external,kf),Mf=Af(pf.optional,Of),Ff=Af(pf.group,Ef),If=nt("entirety"),Rf=/* */Object.freeze({required:Df,external:_f,optional:Mf,group:Ff,asNamedPart:Tf,name:Bf,asCommon:function(t){return t.fold(d,d,d,d)},original:If}),Vf=function(t,n,e,o){return bt(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},Nf=function(r,t){var n={};return W(t,function(t){Tf(t).each(function(e){var o=Hf(r,e.pname);n[e.name]=function(t){var n=An("Part: "+e.name+" in "+r,pn(e.schema),t);return P({},o,{config:t,validated:n})}})}),n},Hf=function(t,n){return{uiType:gf(),owner:t,name:n}},Pf=function(t,n,e){return{uiType:gf(),owner:t,name:n,config:e,validated:{}}},zf=function(t){return K(t,function(t){return t.fold(et.none,et.some,et.none,et.none).map(function(t){return Wn(t.name,t.schema.concat([Nu(If())]))}).toArray()})},Lf=function(t){return F(t,Bf)},jf=function(t,n,e){return o=n,i={},r={},W(e,function(t){t.fold(function(o){i[o.pname]=df(!0,function(t,n,e){return o.factory.sketch(Vf(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=nt(t.factory.sketch(Vf(o,t,n[If()]),n))},function(o){i[o.pname]=df(!1,function(t,n,e){return o.factory.sketch(Vf(t,o,n,e))})},function(r){i[r.pname]=mf(!0,function(n,t,e){var o=n[r.name];return F(o,function(t){return r.factory.sketch(bt(r.defaults(n,t,e),t,r.overrides(n,t)))})})})}),{internals:nt(i),externals:nt(r)};var o,i,r},Uf=function(t,n,e){return lf(et.some(t),n,n.components,e)},Wf=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOption()},Gf=function(t,n,e){return Wf(t,n,e).getOrDie("Could not find part: "+e)},Xf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return W(e,function(t){o[t]=i.getByUid(r[t])}),st(o,nt)},Yf=function(t,n){var e=t.getSystem();return st(n.partUids,function(t,n){return nt(e.getByUid(t))})},qf=function(t){return ut(t.partUids)},Kf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return W(e,function(t){o[t]=i.getByUid(r[t]).getOrDie()}),st(o,nt)},$f=function(n,t){var e=Lf(t);return Rt(F(e,function(t){return{key:t,value:n+"-"+t}}))},Jf=function(n){return wn("partUids","partUids",Et(function(t){return $f(t.uid,n)}),Mn())},Qf=/* */Object.freeze({generate:Nf,generateOne:Pf,schemas:zf,names:Lf,substitutes:jf,components:Uf,defaultUids:$f,defaultUidsSchema:Jf,getAllParts:Yf,getAllPartNames:qf,getPart:Wf,getPartOrDie:Gf,getParts:Xf,getPartsOrDie:Kf}),Zf=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Wn("parts",i)]:[]).concat([Pn("uid"),Zn("dom",{}),Zn("components",[]),Nu("originalSpec"),Zn("debug.sketcher",{})]).concat(u));return An(t+" [SpecSchema]",gn(a.concat(n)),e)},tl=function(t,n,e,o,r){var i=nl(r),u=zf(e),a=Jf(e),c=Zf(t,n,i,u,[a]),s=jf(0,c,e);return o(c,Uf(t,c,s.internals()),i,s.externals())},nl=function(t){return t.hasOwnProperty("uid")?t:P({},t,{uid:fi("uid")})};var el,ol,rl=gn([Pn("name"),Pn("factory"),Pn("configFields"),Zn("apis",{}),Zn("extraApis",{})]),il=gn([Pn("name"),Pn("factory"),Pn("configFields"),Pn("partFields"),Zn("apis",{}),Zn("extraApis",{})]),ul=function(t){var i=An("Sketcher for "+t.name,rl,t),n=st(i.apis,bi),e=st(i.extraApis,function(t,n){return pi(t,n)});return P({name:nt(i.name),partFields:nt([]),configFields:nt(i.configFields),sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=nl(t),o(Zf(n,e,r,[],[]),r);var n,e,o,r}},n,e)},al=function(t){var n=An("Sketcher for "+t.name,il,t),e=Nf(n.name,n.partFields),o=st(n.apis,bi),r=st(n.extraApis,function(t,n){return pi(t,n)});return P({name:nt(n.name),partFields:nt(n.partFields),configFields:nt(n.configFields),sketch:function(t){return tl(n.name,n.configFields,n.partFields,n.factory,t)},parts:nt(e)},o,r)},cl=function(t){return"input"===Qo(t)&&"radio"!==qr(t,"type")||"textarea"===Qo(t)},sl=/* */Object.freeze({getCurrent:function(t,n,e){return n.find(t)}}),fl=[Pn("find")],ll=Xu({fields:fl,name:"composing",apis:sl}),dl=function(t,n,e,o){var r=t+n;return o<r?e:r<e?o:r},ml=function(t,n,e){return t<=n?n:e<=t?e:t},gl=function(e,o,t,r){var n=$c(e.element(),"."+o.highlightClass);W(n,function(n){_(r,function(t){return t.element()===n})||(Ni(n,o.highlightClass),e.getSystem().getByDom(n).each(function(t){o.onDehighlight(e,t),zo(t,Po())}))})},pl=function(t,n,e,o){gl(t,n,0,[o]),hl(t,n,e,o)||(Ri(o.element(),n.highlightClass),n.onHighlight(t,o),zo(o,Ho()))},hl=function(t,n,e,o){return Hi(o.element(),n.highlightClass)},vl=function(t,n,e,o){var r=$c(t.element(),"."+n.itemClass);return et.from(r[o]).fold(function(){return z.error("No element found with index "+o)},t.getSystem().getByDom)},bl=function(n,t,e){return du(n.element(),"."+t.itemClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},yl=function(n,t,e){var o=$c(n.element(),"."+t.itemClass);return(0<o.length?et.some(o[o.length-1]):et.none()).bind(function(t){return n.getSystem().getByDom(t).toOption()})},xl=function(e,n,t,o){var r=$c(e.element(),"."+n.itemClass);return G(r,function(t){return Hi(t,n.highlightClass)}).bind(function(t){var n=dl(t,o,0,r.length-1);return e.getSystem().getByDom(r[n]).toOption()})},wl=function(n,t,e){var o=$c(n.element(),"."+t.itemClass);return vu(F(o,function(t){return n.getSystem().getByDom(t).toOption()}))},Sl=/* */Object.freeze({dehighlightAll:function(t,n,e){return gl(t,n,0,[])},dehighlight:function(t,n,e,o){hl(t,n,e,o)&&(Ni(o.element(),n.highlightClass),n.onDehighlight(t,o),zo(o,Po()))},highlight:pl,highlightFirst:function(n,e,o){bl(n,e).each(function(t){pl(n,e,o,t)})},highlightLast:function(n,e,o){yl(n,e).each(function(t){pl(n,e,o,t)})},highlightAt:function(n,e,o,t){vl(n,e,o,t).fold(function(t){throw new Error(t)},function(t){pl(n,e,o,t)})},highlightBy:function(n,e,o,t){var r=wl(n,e);N(r,t).each(function(t){pl(n,e,o,t)})},isHighlighted:hl,getHighlighted:function(n,t,e){return du(n.element(),"."+t.highlightClass).bind(function(t){return n.getSystem().getByDom(t).toOption()})},getFirst:bl,getLast:yl,getPrevious:function(t,n,e){return xl(t,n,0,-1)},getNext:function(t,n,e){return xl(t,n,0,1)},getCandidates:wl}),Cl=[Pn("highlightClass"),Pn("itemClass"),Mu("onHighlight"),Mu("onDehighlight")],kl=Xu({fields:Cl,name:"highlighting",apis:Sl}),Ol=function(t,n,e){var o=J(t.slice(0,n)),r=J(t.slice(n+1));return N(o.concat(r),e)},El=function(t,n,e){var o=J(t.slice(0,n));return N(o,e)},Tl=function(t,n,e){var o=t.slice(0,n),r=t.slice(n+1);return N(r.concat(o),e)},Bl=function(t,n,e){var o=t.slice(n+1);return N(o,e)},Al=function(e){return function(t){var n=t.raw();return D(e,n.which)}},Dl=function(t){return function(n){return $(t,function(t){return t(n)})}},_l=function(t){return!0===t.raw().shiftKey},Ml=function(t){return!0===t.raw().ctrlKey},Fl=x(_l),Il=function(t,n){return{matches:t,classification:n}},Rl=function(t){t.dom().focus()},Vl=function(t){var n=t!==undefined?t.dom():H.document;return et.from(n.activeElement).map(fe.fromDom)},Nl=function(n){return Vl(Ar(n)).filter(function(t){return n.dom().contains(t.dom())})},Hl=function(t,n,e){n.exists(function(n){return e.exists(function(t){return qe(t,n)})})||Lo(t,Io(),{prevFocus:n,newFocus:e})},Pl=function(){var r=function(t){return Nl(t.element())};return{get:r,set:function(t,n){var e=r(t);t.getSystem().triggerFocus(n,t.element());var o=r(t);Hl(t,e,o)}}},zl=function(){var r=function(t){return kl.getHighlighted(t).map(function(t){return t.element()})};return{get:r,set:function(n,t){var e=r(n);n.getSystem().getByDom(t).fold(tt,function(t){kl.highlight(n,t)});var o=r(n);Hl(n,e,o)}}};(ol=el||(el={})).OnFocusMode="onFocus",ol.OnEnterOrSpaceMode="onEnterOrSpace",ol.OnApiMode="onApi";var Ll,jl=function(t,n,e,o,a){var c=function(n,e,t,o,r){var i,u,a=t(n,e,o,r);return(i=a,u=e.event(),N(i,function(t){return t.matches(u)}).map(function(t){return t.classification})).bind(function(t){return t(n,e,o,r)})},r={schema:function(){return t.concat([Zn("focusManager",Pl()),te("focusInside","onFocus",On(function(t){return D(["onFocus","onEnterOrSpace","onApi"],t)?z.value(t):z.error("Invalid value for focusInside")})),Vu("handler",r),Vu("state",n),Vu("sendFocusIn",a)])},processKey:c,toEvents:function(i,u){var t=i.focusInside!==el.OnFocusMode?et.none():a(i).map(function(e){return mr(vo(),function(t,n){e(t,i,u),n.stop()})});return fr(t.toArray().concat([mr(co(),function(o,r){c(o,r,e,i,u).fold(function(){var n,e,t;n=o,e=r,t=Al([32].concat([13]))(e.event()),i.focusInside===el.OnEnterOrSpaceMode&&t&&Ke(n,e)&&a(i).each(function(t){t(n,i,u),e.stop()})},function(t){r.stop()})}),mr(so(),function(t,n){c(t,n,o,i,u).each(function(t){n.stop()})})]))}};return r},Ul=function(t){var n=[Yn("onEscape"),Yn("onEnter"),Zn("selector",'[data-alloy-tabstop="true"]'),Zn("firstTabstop",0),Zn("useTabstopAt",nt(!0)),Yn("visibilitySelector")].concat([t]),u=function(t,n){var e=t.visibilitySelector.bind(function(t){return mu(n,t)}).getOr(n);return 0<la(e)},e=function(n,e){var t,o,r,i;(t=n,o=e,r=$c(t.element(),o.selector),i=I(r,function(t){return u(o,t)}),et.from(i[o.firstTabstop])).each(function(t){e.focusManager.set(n,t)})},a=function(n,t,e,o,r){return r(t,e,function(t){return u(n=o,e=t)&&n.useTabstopAt(e);var n,e}).fold(function(){return o.cyclic?et.some(!0):et.none()},function(t){return o.focusManager.set(n,t),et.some(!0)})},i=function(n,t,e,o){var r,i,u=$c(n.element(),e.selector);return(r=n,i=e,i.focusManager.get(r).bind(function(t){return mu(t,i.selector)})).bind(function(t){return G(u,g(qe,t)).bind(function(t){return a(n,u,t,e,o)})})},o=nt([Il(Dl([_l,Al([9])]),function(t,n,e,o){var r=e.cyclic?Ol:El;return i(t,0,e,r)}),Il(Al([9]),function(t,n,e,o){var r=e.cyclic?Tl:Bl;return i(t,0,e,r)}),Il(Al([27]),function(n,e,t,o){return t.onEscape.bind(function(t){return t(n,e)})}),Il(Dl([Fl,Al([13])]),function(n,e,t,o){return t.onEnter.bind(function(t){return t(n,e)})})]),r=nt([]);return jl(n,yi.init,o,r,function(){return et.some(e)})},Wl=Ul(ae("cyclic",nt(!1))),Gl=Ul(ae("cyclic",nt(!0))),Xl=function(t,n,e){return cl(e)&&Al([32])(n.event())?et.none():(Uo(t,e,wo()),et.some(!0))},Yl=function(t,n){return et.some(!0)},ql=[Zn("execute",Xl),Zn("useSpace",!1),Zn("useEnter",!0),Zn("useControlEnter",!1),Zn("useDown",!1)],Kl=function(t,n,e){return e.execute(t,n,t.element())},$l=jl(ql,yi.init,function(t,n,e,o){var r=e.useSpace&&!cl(t.element())?[32]:[],i=e.useEnter?[13]:[],u=e.useDown?[40]:[],a=r.concat(i).concat(u);return[Il(Al(a),Kl)].concat(e.useControlEnter?[Il(Dl([Ml,Al([13])]),Kl)]:[])},function(t,n,e,o){return e.useSpace&&!cl(t.element())?[Il(Al([32]),Yl)]:[]},function(){return et.none()}),Jl=function(t){var e=ce(et.none());return xi({readState:function(){return e.get().map(function(t){return{numRows:t.numRows(),numColumns:t.numColumns()}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(t,n){e.set(et.some({numRows:nt(t),numColumns:nt(n)}))},getNumRows:function(){return e.get().map(function(t){return t.numRows()})},getNumColumns:function(){return e.get().map(function(t){return t.numColumns()})}})},Ql=/* */Object.freeze({flatgrid:Jl,init:function(t){return t.state(t)}}),Zl=function(i){return function(t,n,e,o){var r=i(t.element());return od(r,t,n,e,o)}},td=function(t,n){var e=pc(t,n);return Zl(e)},nd=function(t,n){var e=pc(n,t);return Zl(e)},ed=function(r){return function(t,n,e,o){return od(r,t,n,e,o)}},od=function(n,e,t,o,r){return o.focusManager.get(e).bind(function(t){return n(e.element(),t,o,r)}).map(function(t){return o.focusManager.set(e,t),!0})},rd=ed,id=ed,ud=ed,ad=function(t){var n,e=t.dom();return!((n=e).offsetWidth<=0&&n.offsetHeight<=0)},cd=Br(["index","candidates"],[]),sd=function(t,n,e){return fd(t,n,e)},fd=function(t,n,e,o){var r,i=g(qe,n),u=$c(t,e),a=I(u,ad);return G(r=a,i).map(function(t){return cd({index:t,candidates:r})})},ld=function(t,n){return G(t,function(t){return qe(n,t)})},dd=function(e,t,o,n){return n(Math.floor(t/o),t%o).bind(function(t){var n=t.row()*o+t.column();return 0<=n&&n<e.length?et.some(e[n]):et.none()})},md=function(r,t,i,u,a){return dd(r,t,u,function(t,n){var e=t===i-1?r.length-t*u:u,o=dl(n,a,0,e-1);return et.some({row:nt(t),column:nt(o)})})},gd=function(i,t,u,a,c){return dd(i,t,a,function(t,n){var e=dl(t,c,0,u-1),o=e===u-1?i.length-e*a:a,r=ml(n,0,o-1);return et.some({row:nt(e),column:nt(r)})})},pd=[Pn("selector"),Zn("execute",Xl),Fu("onEscape"),Zn("captureTab",!1),Hu()],hd=function(n,e,t){du(n.element(),e.selector).each(function(t){e.focusManager.set(n,t)})},vd=function(r){return function(t,n,e,o){return sd(t,n,e.selector).bind(function(t){return r(t.candidates(),t.index(),o.getNumRows().getOr(e.initSize.numRows),o.getNumColumns().getOr(e.initSize.numColumns))})}},bd=function(t,n,e,o){return e.captureTab?et.some(!0):et.none()},yd=vd(function(t,n,e,o){return md(t,n,e,o,-1)}),xd=vd(function(t,n,e,o){return md(t,n,e,o,1)}),wd=vd(function(t,n,e,o){return gd(t,n,e,o,-1)}),Sd=vd(function(t,n,e,o){return gd(t,n,e,o,1)}),Cd=nt([Il(Al([37]),td(yd,xd)),Il(Al([39]),nd(yd,xd)),Il(Al([38]),rd(wd)),Il(Al([40]),id(Sd)),Il(Dl([_l,Al([9])]),bd),Il(Dl([Fl,Al([9])]),bd),Il(Al([27]),function(t,n,e,o){return e.onEscape(t,n)}),Il(Al([32].concat([13])),function(n,e,o,t){return(r=n,i=o,i.focusManager.get(r).bind(function(t){return mu(t,i.selector)})).bind(function(t){return o.execute(n,e,t)});var r,i})]),kd=nt([Il(Al([32]),Yl)]),Od=jl(pd,Jl,Cd,kd,function(){return et.some(hd)}),Ed=function(t,n,e,i){var u=function(t,n,e){var o,r=dl(n,i,0,e.length-1);return r===t?et.none():(o=e[r],"button"===Qo(o)&&"disabled"===qr(o,"disabled")?u(t,r,e):et.from(e[r]))};return sd(t,e,n).bind(function(t){var n=t.index(),e=t.candidates();return u(n,n,e)})},Td=[Pn("selector"),Zn("getInitial",et.none),Zn("execute",Xl),Fu("onEscape"),Zn("executeOnMove",!1),Zn("allowVertical",!0)],Bd=function(n,e,o){return(t=n,r=o,r.focusManager.get(t).bind(function(t){return mu(t,r.selector)})).bind(function(t){return o.execute(n,e,t)});var t,r},Ad=function(n,e){e.getInitial(n).orThunk(function(){return du(n.element(),e.selector)}).each(function(t){e.focusManager.set(n,t)})},Dd=function(t,n,e){return Ed(t,e.selector,n,-1)},_d=function(t,n,e){return Ed(t,e.selector,n,1)},Md=function(o){return function(t,n,e){return o(t,n,e).bind(function(){return e.executeOnMove?Bd(t,n,e):et.some(!0)})}},Fd=function(t,n,e,o){return e.onEscape(t,n)},Id=nt([Il(Al([32]),Yl)]),Rd=jl(Td,yi.init,function(t,n,e,o){var r=[37].concat(e.allowVertical?[38]:[]),i=[39].concat(e.allowVertical?[40]:[]);return[Il(Al(r),Md(td(Dd,_d))),Il(Al(i),Md(nd(Dd,_d))),Il(Al([13]),Bd),Il(Al([32]),Bd),Il(Al([27]),Fd)]},Id,function(){return et.some(Ad)}),Vd=Br(["rowIndex","columnIndex","cell"],[]),Nd=function(t,n,e){return et.from(t[n]).bind(function(t){return et.from(t[e]).map(function(t){return Vd({rowIndex:n,columnIndex:e,cell:t})})})},Hd=function(t,n,e,o){var r=t[n].length,i=dl(e,o,0,r-1);return Nd(t,n,i)},Pd=function(t,n,e,o){var r=dl(e,o,0,t.length-1),i=t[r].length,u=ml(n,0,i-1);return Nd(t,r,u)},zd=function(t,n,e,o){var r=t[n].length,i=ml(e+o,0,r-1);return Nd(t,n,i)},Ld=function(t,n,e,o){var r=ml(e+o,0,t.length-1),i=t[r].length,u=ml(n,0,i-1);return Nd(t,r,u)},jd=[Wn("selectors",[Pn("row"),Pn("cell")]),Zn("cycles",!0),Zn("previousSelector",et.none),Zn("execute",Xl)],Ud=function(n,e){e.previousSelector(n).orThunk(function(){var t=e.selectors;return du(n.element(),t.cell)}).each(function(t){e.focusManager.set(n,t)})},Wd=function(t,n){return function(e,o,i){var u=i.cycles?t:n;return mu(o,i.selectors.row).bind(function(t){var n=$c(t,i.selectors.cell);return ld(n,o).bind(function(o){var r=$c(e,i.selectors.row);return ld(r,t).bind(function(t){var n,e=(n=i,F(r,function(t){return $c(t,n.selectors.cell)}));return u(e,t,o).map(function(t){return t.cell()})})})})}},Gd=Wd(function(t,n,e){return Hd(t,n,e,-1)},function(t,n,e){return zd(t,n,e,-1)}),Xd=Wd(function(t,n,e){return Hd(t,n,e,1)},function(t,n,e){return zd(t,n,e,1)}),Yd=Wd(function(t,n,e){return Pd(t,e,n,-1)},function(t,n,e){return Ld(t,e,n,-1)}),qd=Wd(function(t,n,e){return Pd(t,e,n,1)},function(t,n,e){return Ld(t,e,n,1)}),Kd=nt([Il(Al([37]),td(Gd,Xd)),Il(Al([39]),nd(Gd,Xd)),Il(Al([38]),rd(Yd)),Il(Al([40]),id(qd)),Il(Al([32].concat([13])),function(n,e,o){return Nl(n.element()).bind(function(t){return o.execute(n,e,t)})})]),$d=nt([Il(Al([32]),Yl)]),Jd=jl(jd,yi.init,Kd,$d,function(){return et.some(Ud)}),Qd=[Pn("selector"),Zn("execute",Xl),Zn("moveOnTab",!1)],Zd=function(n,e,o){return o.focusManager.get(n).bind(function(t){return o.execute(n,e,t)})},tm=function(n,e){du(n.element(),e.selector).each(function(t){e.focusManager.set(n,t)})},nm=function(t,n,e){return Ed(t,e.selector,n,-1)},em=function(t,n,e){return Ed(t,e.selector,n,1)},om=nt([Il(Al([38]),ud(nm)),Il(Al([40]),ud(em)),Il(Dl([_l,Al([9])]),function(t,n,e){return e.moveOnTab?ud(nm)(t,n,e):et.none()}),Il(Dl([Fl,Al([9])]),function(t,n,e){return e.moveOnTab?ud(em)(t,n,e):et.none()}),Il(Al([13]),Zd),Il(Al([32]),Zd)]),rm=nt([Il(Al([32]),Yl)]),im=jl(Qd,yi.init,om,rm,function(){return et.some(tm)}),um=[Fu("onSpace"),Fu("onEnter"),Fu("onShiftEnter"),Fu("onLeft"),Fu("onRight"),Fu("onTab"),Fu("onShiftTab"),Fu("onUp"),Fu("onDown"),Fu("onEscape"),Zn("stopSpaceKeyup",!1),Yn("focusIn")],am=jl(um,yi.init,function(t,n,e){return[Il(Al([32]),e.onSpace),Il(Dl([Fl,Al([13])]),e.onEnter),Il(Dl([_l,Al([13])]),e.onShiftEnter),Il(Dl([_l,Al([9])]),e.onShiftTab),Il(Dl([Fl,Al([9])]),e.onTab),Il(Al([38]),e.onUp),Il(Al([40]),e.onDown),Il(Al([37]),e.onLeft),Il(Al([39]),e.onRight),Il(Al([32]),e.onSpace),Il(Al([27]),e.onEscape)]},function(t,n,e){return e.stopSpaceKeyup?[Il(Al([32]),Yl)]:[]},function(t){return t.focusIn}),cm=Wl.schema(),sm=Gl.schema(),fm=Rd.schema(),lm=Od.schema(),dm=Jd.schema(),mm=$l.schema(),gm=im.schema(),pm=am.schema(),hm=qu({branchKey:"mode",branches:/* */Object.freeze({acyclic:cm,cyclic:sm,flow:fm,flatgrid:lm,matrix:dm,execution:mm,menu:gm,special:pm}),name:"keying",active:{events:function(t,n){return t.handler.toEvents(t,n)}},apis:{focusIn:function(n,e,o){e.sendFocusIn(e).fold(function(){n.getSystem().triggerFocus(n.element(),n.element())},function(t){t(n,e,o)})},setGridSize:function(t,n,e,o,r){Nt(e,"setGridSize")?e.setGridSize(o,r):H.console.error("Layout does not support setGridSize")}},state:Ql}),vm=function(t,n,e,o){var r=t.getSystem().build(o);Is(t,r,e)},bm=function(t,n,e,o){var r=ym(t);N(r,function(t){return qe(o.element(),t.element())}).each(Vs)},ym=function(t,n){return t.components()},xm=function(n,t,e,r,o){var i=ym(n);return et.from(i[r]).map(function(t){return bm(n,0,0,t),o.each(function(t){vm(n,0,function(t,n){var e,o;o=n,Ir(e=t,r).fold(function(){Hr(e,o)},function(t){Rr(t,o)})},t)}),t})},wm=Xu({fields:[],name:"replacing",apis:/* */Object.freeze({append:function(t,n,e,o){vm(t,0,Hr,o)},prepend:function(t,n,e,o){vm(t,0,Nr,o)},remove:bm,replaceAt:xm,replaceBy:function(n,t,e,o,r){var i=ym(n);return G(i,o).bind(function(t){return xm(n,0,0,t,r)})},set:function(n,t,e,o){var r,i,u,a;Ns(n),r=function(){var t=F(o,n.getSystem().build);W(t,function(t){Fs(n,t)})},i=n.element(),u=Ar(i),a=Vl(u).bind(function(n){var t=function(t){return qe(n,t)};return t(i)?et.some(i):cr(i,t)}),r(i),a.each(function(n){Vl(u).filter(function(t){return qe(t,n)}).fold(function(){Rl(n)},tt)})},contents:ym})}),Sm=function(t,n,e){n.store.manager.onLoad(t,n,e)},Cm=function(t,n,e){n.store.manager.onUnload(t,n,e)},km=/* */Object.freeze({onLoad:Sm,onUnload:Cm,setValue:function(t,n,e,o){n.store.manager.setValue(t,n,e,o)},getValue:function(t,n,e){return n.store.manager.getValue(t,n,e)},getState:function(t,n,e){return e}}),Om=/* */Object.freeze({events:function(e,o){var t=e.resetOnDom?[wr(function(t,n){Sm(t,e,o)}),Sr(function(t,n){Cm(t,e,o)})]:[Pu(e,o,Sm)];return fr(t)}}),Em=function(){var t=ce(null);return xi({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},Tm=function(){var i=ce({}),u=ce({});return xi({readState:function(){return{mode:"dataset",dataByValue:i.get(),dataByText:u.get()}},lookup:function(t){return Ft(i.get(),t).orThunk(function(){return Ft(u.get(),t)})},update:function(t){var n=i.get(),e=u.get(),o={},r={};W(t,function(n){o[n.value]=n,Ft(n,"meta").each(function(t){Ft(t,"text").each(function(t){r[t]=n})})}),i.set(P({},n,o)),u.set(P({},e,r))},clear:function(){i.set({}),u.set({})}})},Bm=/* */Object.freeze({memory:Em,dataset:Tm,manual:function(){return xi({readState:function(){}})},init:function(t){return t.store.manager.state(t)}}),Am=function(t,n,e,o){var r=n.store;e.update([o]),r.setValue(t,o),n.onSetValue(t,o)},Dm=[Yn("initialValue"),Pn("getFallbackEntry"),Pn("getDataKey"),Pn("setValue"),Vu("manager",{setValue:Am,getValue:function(t,n,e){var o=n.store,r=o.getDataKey(t);return e.lookup(r).fold(function(){return o.getFallbackEntry(r)},function(t){return t})},onLoad:function(n,e,o){e.store.initialValue.each(function(t){Am(n,e,o,t)})},onUnload:function(t,n,e){e.clear()},state:Tm})],_m=[Pn("getValue"),Zn("setValue",tt),Yn("initialValue"),Vu("manager",{setValue:function(t,n,e,o){n.store.setValue(t,o),n.onSetValue(t,o)},getValue:function(t,n,e){return n.store.getValue(t)},onLoad:function(n,e,t){e.store.initialValue.each(function(t){e.store.setValue(n,t)})},onUnload:tt,state:yi.init})],Mm=[Yn("initialValue"),Vu("manager",{setValue:function(t,n,e,o){e.set(o),n.onSetValue(t,o)},getValue:function(t,n,e){return e.get()},onLoad:function(t,n,e){n.store.initialValue.each(function(t){e.isNotSet()&&e.set(t)})},onUnload:function(t,n,e){e.clear()},state:Em})],Fm=[te("store",{mode:"memory"},_n("mode",{memory:Mm,manual:_m,dataset:Dm})),Mu("onSetValue"),Zn("resetOnDom",!1)],Im=Xu({fields:Fm,name:"representing",active:Om,apis:km,extra:{setValueFrom:function(t,n){var e=Im.getValue(n);Im.setValue(t,e)}},state:Bm}),Rm=function(t,n){n.ignore||(Rl(t.element()),n.onFocus(t))},Vm=/* */Object.freeze({focus:Rm,blur:function(t,n){n.ignore||t.element().dom().blur()},isFocused:function(t){return n=t.element(),e=Ar(n).dom(),n.dom()===e.activeElement;var n,e}}),Nm=/* */Object.freeze({exhibit:function(t,n){var e=n.ignore?{}:{attributes:{tabindex:"-1"}};return Si(e)},events:function(e){return fr([mr(vo(),function(t,n){Rm(t,e),n.stop()})].concat(e.stopMousedown?[mr(no(),function(t,n){n.event().prevent()})]:[]))}}),Hm=[Mu("onFocus"),Zn("stopMousedown",!1),Zn("ignore",!1)],Pm=Xu({fields:Hm,name:"focusing",active:Nm,apis:Vm}),zm=function(t,n,e){var o=n.aria;o.update(t,o,e.get())},Lm=function(n,t,e){t.toggleClass.each(function(t){e.get()?Ri(n.element(),t):Ni(n.element(),t)})},jm=function(t,n,e){Gm(t,n,e,!e.get())},Um=function(t,n,e){e.set(!0),Lm(t,n,e),zm(t,n,e)},Wm=function(t,n,e){e.set(!1),Lm(t,n,e),zm(t,n,e)},Gm=function(t,n,e,o){(o?Um:Wm)(t,n,e)},Xm=function(t,n,e){Gm(t,n,e,n.selected)},Ym=/* */Object.freeze({onLoad:Xm,toggle:jm,isOn:function(t,n,e){return e.get()},on:Um,off:Wm,set:Gm}),qm=/* */Object.freeze({exhibit:function(t,n,e){return Si({})},events:function(t,n){var e,o,r,i=(e=t,o=n,r=jm,kr(function(t){r(t,e,o)})),u=Pu(t,n,Xm);return fr(q([t.toggleOnExecute?[i]:[],[u]]))}}),Km=function(t,n,e){Xr(t.element(),"aria-expanded",e)},$m=[Zn("selected",!1),Yn("toggleClass"),Zn("toggleOnExecute",!0),te("aria",{mode:"none"},_n("mode",{pressed:[Zn("syncWithExpanded",!1),Vu("update",function(t,n,e){Xr(t.element(),"aria-pressed",e),n.syncWithExpanded&&Km(t,n,e)})],checked:[Vu("update",function(t,n,e){Xr(t.element(),"aria-checked",e)})],expanded:[Vu("update",Km)],selected:[Vu("update",function(t,n,e){Xr(t.element(),"aria-selected",e)})],none:[Vu("update",tt)]}))],Jm=Xu({fields:$m,name:"toggling",active:qm,apis:Ym,state:(Ll=!1,{init:function(){var n=ce(Ll);return{get:function(){return n.get()},set:function(t){return n.set(t)},clear:function(){return n.set(Ll)},readState:function(){return n.get()}}}})}),Qm="alloy.item-hover",Zm="alloy.item-focus",tg=function(t){(Nl(t.element()).isNone()||Pm.isFocused(t))&&(Pm.isFocused(t)||Pm.focus(t),Lo(t,Qm,{item:t}))},ng=function(t){Lo(t,Zm,{item:t})},eg=nt(Qm),og=nt(Zm),rg=function(t,n){var e,o;return{key:t,value:{config:{},me:(e=t,o=fr(n),Xu({fields:[Pn("enabled")],name:e,active:{events:nt(o)}})),configAsRaw:nt({}),initialConfig:{},state:yi}}},ig=[Pn("data"),Pn("components"),Pn("dom"),Zn("hasSubmenu",!1),Yn("toggling"),rf("itemBehaviours",[Jm,Pm,hm,Im]),Zn("ignoreFocus",!1),Zn("domModification",{}),Vu("builder",function(t){return{dom:t.dom,domModification:P({},t.domModification,{attributes:P({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes,{"aria-haspopup":t.hasSubmenu},t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:uf(t.itemBehaviours,[t.toggling.fold(Jm.revoke,function(t){return Jm.config(P({aria:{mode:"checked"}},t))}),Pm.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){ng(t)}}),hm.config({mode:"execution"}),Im.config({store:{mode:"memory",initialValue:t.data}}),rg("item-type-events",[mr(ko(),jo),br(no()),mr(io(),tg),mr(So(),Pm.focus)])]),components:t.components,eventOrder:t.eventOrder}}),Zn("eventOrder",{})],ug=[Pn("dom"),Pn("components"),Vu("builder",function(t){return{dom:t.dom,components:t.components,events:fr([yr(So())])}})],ag=nt([Df({name:"widget",overrides:function(n){return{behaviours:Wu([Im.config({store:{mode:"manual",getValue:function(t){return n.data},setValue:function(){}}})])}}})]),cg=[Pn("uid"),Pn("data"),Pn("components"),Pn("dom"),Zn("autofocus",!1),Zn("ignoreFocus",!1),rf("widgetBehaviours",[Im,Pm,hm]),Zn("domModification",{}),Jf(ag()),Vu("builder",function(e){var t=jf(0,e,ag()),n=Uf("item-widget",e,t.internals()),o=function(t){return Wf(t,e,"widget").map(function(t){return hm.focusIn(t),t})},r=function(t,n){return cl(n.event().target())||e.autofocus&&n.setSource(t.element()),et.none()};return{dom:e.dom,components:n,domModification:e.domModification,events:fr([kr(function(t,n){o(t).each(function(t){n.stop()})}),mr(io(),tg),mr(So(),function(t,n){e.autofocus?o(t):Pm.focus(t)})]),behaviours:uf(e.widgetBehaviours,[Im.config({store:{mode:"memory",initialValue:e.data}}),Pm.config({ignore:e.ignoreFocus,onFocus:function(t){ng(t)}}),hm.config({mode:"special",focusIn:e.autofocus?function(t){o(t)}:Ku(),onLeft:r,onRight:r,onEscape:function(t,n){return Pm.isFocused(t)||e.autofocus?(e.autofocus&&n.setSource(t.element()),et.none()):(Pm.focus(t),et.some(!0))}})])}})],sg=_n("type",{widget:cg,item:ig,separator:ug}),fg=nt([Ff({factory:{sketch:function(t){var n=An("menu.spec item",sg,t);return n.builder(n)}},name:"items",unit:"item",defaults:function(t,n){return n.hasOwnProperty("uid")?n:P({},n,{uid:fi("item")})},overrides:function(t,n){return{type:n.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),lg=nt([Pn("value"),Pn("items"),Pn("dom"),Pn("components"),Zn("eventOrder",{}),nf("menuBehaviours",[kl,Im,ll,hm]),te("movement",{mode:"menu",moveOnTab:!0},_n("mode",{grid:[Hu(),Vu("config",function(t,n){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:n.initSize.numColumns,numRows:n.initSize.numRows},focusManager:t.focusManager}})],matrix:[Vu("config",function(t,n){return{mode:"matrix",selectors:{row:n.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}}),Pn("rowSelector")],menu:[Zn("moveOnTab",!0),Vu("config",function(t,n){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:n.moveOnTab,focusManager:t.focusManager}})]})),zn("markers",Tu()),Zn("fakeFocus",!1),Zn("focusManager",Pl()),Mu("onHighlight")]),dg=nt("alloy.menu-focus"),mg=al({name:"Menu",configFields:lg(),partFields:fg(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:of(t.menuBehaviours,[kl.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),Im.config({store:{mode:"memory",initialValue:t.value}}),ll.config({find:et.some}),hm.config(t.movement.config(t,t.movement))]),events:fr([mr(og(),function(n,e){var t=e.event();n.getSystem().getByDom(t.target()).each(function(t){kl.highlight(n,t),e.stop(),Lo(n,dg(),{menu:n,item:t})})}),mr(eg(),function(t,n){var e=n.event().item();kl.highlight(t,e)})]),components:n,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),gg=function(e,o,r,t){return Ft(r,t).bind(function(t){return Ft(e,t).bind(function(t){var n=gg(e,o,r,t);return et.some([t].concat(n))})}).getOr([])},pg=function(t,n){var e={};ct(t,function(t,n){W(t,function(t){e[t]=n})});var o=n,r=ft(n,function(t,n){return{k:t,v:n}}),i=st(r,function(t,n){return[n].concat(gg(e,o,r,n))});return st(e,function(t){return Ft(i,t).getOr([t])})},hg=function(){var i=ce({}),u=ce({}),a=ce({}),c=ce(et.none()),s=ce({}),n=function(t){return Ft(u.get(),t)};return{setMenuBuilt:function(t,n){var e;u.set(P({},u.get(),((e={})[t]={type:"prepared",menu:n},e)))},setContents:function(t,n,e,o){c.set(et.some(t)),i.set(e),u.set(n),s.set(o);var r=pg(o,e);a.set(r)},expand:function(e){return Ft(i.get(),e).map(function(t){var n=Ft(a.get(),e).getOr([]);return[t].concat(n)})},refresh:function(t){return Ft(a.get(),t)},collapse:function(t){return Ft(a.get(),t).bind(function(t){return 1<t.length?et.some(t.slice(1)):et.none()})},lookupMenu:n,otherMenus:function(t){var n=s.get();return Q(ut(n),t)},getPrimary:function(){return c.get().bind(function(t){return n(t).bind(function(t){return"prepared"===t.type?et.some(t.menu):et.none()})})},getMenus:function(){return u.get()},clear:function(){i.set({}),u.set({}),a.set({}),c.set(et.none())},isClear:function(){return c.get().isNone()}}},vg=nt("collapse-item"),bg=ul({name:"TieredMenu",configFields:[Ru("onExecute"),Ru("onEscape"),Iu("onOpenMenu"),Iu("onOpenSubmenu"),Mu("onCollapseMenu"),Zn("highlightImmediately",!0),Wn("data",[Pn("primary"),Pn("menus"),Pn("expansions")]),Zn("fakeFocus",!1),Mu("onHighlight"),Mu("onHover"),Au(),Pn("dom"),Zn("navigateOnHover",!0),Zn("stayInDom",!1),nf("tmenuBehaviours",[hm,kl,ll,wm]),Zn("eventOrder",{})],apis:{collapseMenu:function(t,n){t.collapseMenu(n)},highlightPrimary:function(t,n){t.highlightPrimary(n)}},factory:function(a,t){var c,n,i=ce(et.none()),s=hg(),e=function(t){var o,r,n,e=(o=t,r=a.data.primary,n=a.data.menus,st(n,function(t,n){var e=function(){return mg.sketch(P({dom:t.dom},t,{value:n,items:t.items,markers:a.markers,fakeFocus:a.fakeFocus,onHighlight:a.onHighlight,focusManager:a.fakeFocus?zl():Pl()}))};return n===r?{type:"prepared",menu:o.getSystem().build(e())}:{type:"notbuilt",nbMenu:e}})),i=u();return s.setContents(a.data.primary,e,a.data.expansions,i),s.getPrimary()},f=function(t){return Im.getValue(t).value},u=function(t){return st(a.data.menus,function(t,n){return K(t.items,function(t){return"separator"===t.type?[]:[t.data.value]})})},l=function(n,t){kl.highlight(n,t),kl.getHighlighted(t).orThunk(function(){return kl.getFirst(t)}).each(function(t){Uo(n,t.element(),So())})},d=function(n,t){return vu(F(t,function(t){return n.lookupMenu(t).bind(function(t){return"prepared"===t.type?et.some(t.menu):et.none()})}))},m=function(n,t,e){var o=d(t,t.otherMenus(e));W(o,function(t){zi(t.element(),[a.markers.backgroundMenu]),a.stayInDom||wm.remove(n,t)})},g=function(t,o){var r,n=(r=t,i.get().getOrThunk(function(){var e={},t=$c(r.element(),"."+a.markers.item),n=I(t,function(t){return"true"===qr(t,"aria-haspopup")});return W(n,function(t){r.getSystem().getByDom(t).each(function(t){var n=f(t);e[n]=t})}),i.set(et.some(e)),e}));ct(n,function(t,n){var e=D(o,n);Xr(t.element(),"aria-expanded",e)})},p=function(o,r,i){return et.from(i[0]).bind(function(t){return r.lookupMenu(t).bind(function(t){if("notbuilt"===t.type)return et.none();var n=t.menu,e=d(r,i.slice(1));return W(e,function(t){Ri(t.element(),a.markers.backgroundMenu)}),or(n.element())||wm.append(o,fu(n)),zi(n.element(),[a.markers.backgroundMenu]),l(o,n),m(o,r,i),et.some(n)})})};(n=c||(c={}))[n.HighlightSubmenu=0]="HighlightSubmenu",n[n.HighlightParent=1]="HighlightParent";var h=function(r,i,u){void 0===u&&(u=c.HighlightSubmenu);var t=f(i);return s.expand(t).bind(function(o){return g(r,o),et.from(o[0]).bind(function(e){return s.lookupMenu(e).bind(function(t){var n=function(t,n,e){if("notbuilt"!==e.type)return e.menu;var o=t.getSystem().build(e.nbMenu());return s.setMenuBuilt(n,o),o}(r,e,t);return or(n.element())||wm.append(r,fu(n)),a.onOpenSubmenu(r,i,n),u===c.HighlightSubmenu?(kl.highlightFirst(n),p(r,s,o)):(kl.dehighlightAll(n),et.some(i))})})})},o=function(n,e){var t=f(e);return s.collapse(t).bind(function(t){return g(n,t),p(n,s,t).map(function(t){return a.onCollapseMenu(n,e,t),t})})},r=function(e){return function(n,t){return mu(t.getSource(),"."+a.markers.item).bind(function(t){return n.getSystem().getByDom(t).toOption().bind(function(t){return e(n,t).map(function(){return!0})})})}},v=fr([mr(dg(),function(n,t){var e=t.event().menu();kl.highlight(n,e);var o=f(t.event().item());s.refresh(o).each(function(t){return m(n,s,t)})}),kr(function(n,t){var e=t.event().target();n.getSystem().getByDom(e).each(function(t){0===f(t).indexOf("collapse-item")&&o(n,t),h(n,t,c.HighlightSubmenu).fold(function(){a.onExecute(n,t)},function(){})})}),wr(function(n,t){e(n).each(function(t){wm.append(n,fu(t)),a.onOpenMenu(n,t),a.highlightImmediately&&l(n,t)})})].concat(a.navigateOnHover?[mr(eg(),function(t,n){var e,o,r=n.event().item();e=t,o=f(r),s.refresh(o).bind(function(t){return g(e,t),p(e,s,t)}),h(t,r,c.HighlightParent),a.onHover(t,r)})]:[])),b={collapseMenu:function(n){kl.getHighlighted(n).each(function(t){kl.getHighlighted(t).each(function(t){o(n,t)})})},highlightPrimary:function(n){s.getPrimary().each(function(t){l(n,t)})}};return{uid:a.uid,dom:a.dom,markers:a.markers,behaviours:of(a.tmenuBehaviours,[hm.config({mode:"special",onRight:r(function(t,n){return cl(n.element())?et.none():h(t,n,c.HighlightSubmenu)}),onLeft:r(function(t,n){return cl(n.element())?et.none():o(t,n)}),onEscape:r(function(t,n){return o(t,n).orThunk(function(){return a.onEscape(t,n).map(function(){return t})})}),focusIn:function(n,t){s.getPrimary().each(function(t){Uo(n,t.element(),So())})}}),kl.config({highlightClass:a.markers.selectedMenu,itemClass:a.markers.menu}),ll.config({find:function(t){return kl.getHighlighted(t)}}),wm.config({})]),eventOrder:a.eventOrder,apis:b,events:v}},extraApis:{tieredData:function(t,n,e){return{primary:t,menus:n,expansions:e}},singleData:function(t,n){return{primary:t,menus:It(t,n),expansions:{}}},collapseItem:function(t){return{value:oi(vg()),meta:{text:t}}}}}),yg=ul({name:"InlineView",configFields:[Pn("lazySink"),Mu("onShow"),Mu("onHide"),Jn("onEscape"),nf("inlineBehaviours",[Ks,Qu]),Qn("fireDismissalEventInstead",[Zn("event",Fo())]),Zn("getRelated",et.none),Zn("eventOrder",et.none)],factory:function(s,t){var r=function(t,n,e,o){var r=s.lazySink(t).getOrDie();Ks.openWhileCloaked(t,e,function(){return Ds.positionWithin(r,n,t,o)}),s.onShow(t)},n={setContent:function(t,n){Ks.open(t,n)},showAt:function(t,n,e){var o=et.none();r(t,n,e,o)},showWithin:r,showMenuAt:function(t,n,e){var o,r,i,u,a,c=(o=s,r=t,i=n,u=e,a=function(){return o.lazySink(r)},bg.sketch({dom:{tag:"div"},data:u.data,markers:u.menu.markers,onEscape:function(){return Ks.close(r),o.onEscape.map(function(t){return t(r)}),et.some(!0)},onExecute:function(){return et.some(!0)},onOpenMenu:function(t,n){Ds.position(a().getOrDie(),i,n)},onOpenSubmenu:function(t,n,e){var o=a().getOrDie();Ds.position(o,{anchor:"submenu",item:n},e)}}));Ks.open(t,c),s.onShow(t)},hide:function(t){Ks.close(t),s.onHide(t)},getContent:function(t){return Ks.getState(t)},isOpen:Ks.isOpen};return{uid:s.uid,dom:s.dom,behaviours:of(s.inlineBehaviours,[Ks.config({isPartOf:function(t,n,e){return hu(n,e)||(o=t,r=e,s.getRelated(o).exists(function(t){return hu(t,r)}));var o,r},getAttachPoint:function(t){return s.lazySink(t).getOrDie()}}),Zs(P({isExtraPart:nt(!1)},s.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))]),eventOrder:s.eventOrder,apis:n}},apis:{showAt:function(t,n,e,o){t.showAt(n,e,o)},showWithin:function(t,n,e,o,r){t.showWithin(n,e,o,r)},showMenuAt:function(t,n,e,o){t.showMenuAt(n,e,o)},hide:function(t,n){t.hide(n)},isOpen:function(t,n){return t.isOpen(n)},getContent:function(t,n){return t.getContent(n)},setContent:function(t,n,e){t.setContent(n,e)}}}),xg=function(t){var n=function(t,n){n.stop(),jo(t)},e=Pe.detect().deviceType.isTouch()?[mr(Co(),n)]:[mr(mo(),n),mr(no(),function(t,n){n.cut()})];return fr(q([t.map(function(e){return mr(wo(),function(t,n){e(t),n.stop()})}).toArray(),e]))},wg=ul({name:"Button",factory:function(t){var n=xg(t.action),e=t.dom.tag,o=function(n){return Ft(t.dom,"attributes").bind(function(t){return Ft(t,n)})};return{uid:t.uid,dom:t.dom,components:t.components,events:n,behaviours:uf(t.buttonBehaviours,[Pm.config({}),hm.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"!==e)return{role:o("role").getOr("button")};var t=o("type").getOr("button"),n=o("role").map(function(t){return{role:t}}).getOr({});return P({type:t},n)}()},eventOrder:t.eventOrder}},configFields:[Zn("uid",undefined),Pn("dom"),Zn("components",[]),rf("buttonBehaviours",[Pm,hm]),Yn("action"),Yn("role"),Zn("eventOrder",{})]}),Sg=function(t){var n=function e(t){return t.uid!==undefined}(t)&&Nt(t,"uid")?t.uid:fi("memento");return{get:function(t){return t.getSystem().getByUid(n).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(n).fold(et.none,et.some)},asSpec:function(){return P({},t,{uid:n})}}},Cg=function(t){return et.from(t()["temporary-placeholder"]).getOr("!not found!")},kg=function(t,n){return et.from(n()[t]).getOrThunk(function(){return Cg(n)})},Og={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Eg=ul({name:"Notification",factory:function(n){var t,e,o=Sg({dom:{tag:"p",innerHtml:n.translationProvider(n.text)},behaviours:Wu([wm.config({})])}),r=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},i=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},u=Sg({dom:{tag:"div",classes:n.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[r(0)]},i(0)],behaviours:Wu([wm.config({})])}),a={updateProgress:function(t,n){t.getSystem().isConnected()&&u.getOpt(t).each(function(t){wm.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[r(n)]},i(n)])})},updateText:function(t,n){if(t.getSystem().isConnected()){var e=o.get(t);wm.set(e,[uu(n)])}}},c=q([n.icon.toArray(),n.level.toArray(),n.level.bind(function(t){return et.from(Og[t])}).toArray()]);return{uid:n.uid,dom:{tag:"div",attributes:{role:"alert"},classes:n.level.map(function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]}).getOr(["tox-notification","tox-notification--in"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:(t=c,e=n.iconProvider,bu(t,function(t){return et.from(e()[t])}).getOrThunk(function(){return Cg(e)}))}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[o.asSpec()],behaviours:Wu([wm.config({})])}].concat(n.progress?[u.asSpec()]:[]).concat(wg.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:kg("close",n.iconProvider),attributes:{"aria-label":n.translationProvider("Close")}}}],action:function(t){n.onAction(t)}})),apis:a}},configFields:[Yn("level"),Pn("progress"),Pn("icon"),Pn("onAction"),Pn("text"),Pn("iconProvider"),Pn("translationProvider")],apis:{updateProgress:function(t,n,e){t.updateProgress(n,e)},updateText:function(t,n,e){t.updateText(n,e)}}}),Tg=tinymce.util.Tools.resolve("tinymce.util.Delay");function Bg(r,i,u){var a=i.backstage;return{open:function(t,n){var e=function(){n(),yg.hide(r)},o=su(Eg.sketch({text:t.text,level:D(["success","error","warning","info"],t.type)?t.type:undefined,progress:!0===t.progressBar,icon:et.from(t.icon),onAction:e,iconProvider:a.shared.providers.icons,translationProvider:a.shared.providers.translate})),r=su(yg.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:i.backstage.shared.getSink,fireDismissalEventInstead:{}}));return u.add(r),t.timeout&&Tg.setTimeout(function(){e()},t.timeout),{close:e,moveTo:function(t,n){yg.showAt(r,{anchor:"makeshift",x:t,y:n},fu(o))},moveRel:function(t,n){yg.showAt(r,i.backstage.shared.anchors.banner(),fu(o))},text:function(t){Eg.updateText(o,t)},settings:t,getEl:function(){},progressBar:{value:function(t){Eg.updateProgress(o,t)}}}},close:function(t){t.close()},reposition:function(t){W(t,function(t){t.moveTo(0,0)}),function(e){if(0<e.length){var t=e.slice(0,1)[0],n=(o=r).inline?o.getElement():o.getContentAreaContainer();t.moveRel(n,"tc-tc"),W(e,function(t,n){0<n&&t.moveRel(e[n-1].getEl(),"bc-tc")})}var o}(t)},getArgs:function(t){return t.settings}}}var Ag,Dg,_g=function(e,o){var r=null;return{cancel:function(){null!==r&&(H.clearTimeout(r),r=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null!==r&&H.clearTimeout(r),r=H.setTimeout(function(){e.apply(null,t),r=null},o)}}},Mg=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Fg=pt([{aborted:[]},{edge:["element"]},{success:["info"]}]),Ig=pt([{abort:[]},{kontinue:[]},{finish:["info"]}]),Rg=function(n,e,t,o,r,i){var u=function(){return i.fold(Fg.aborted,Fg.edge)},a=function(){var t=r();return t?Rg(n,t,et.none(),o,r,et.some(e)):u()};if(n.isBlock(e))return u();if(e.nodeType!==H.Node.TEXT_NODE)return a();var c=e.textContent;return o(Ig,e,c,t).fold(Fg.aborted,function(){return a()},Fg.success)},Vg=function(t,n,e,o,r){var i=new Mg(n,r||t.getRoot());return Rg(t,n,et.some(e),o,i.prev,et.none())},Ng=function(e,n){return Hg(fe.fromDom(e.selection.getNode())).getOrThunk(function(){var t=fe.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());return Hr(t,fe.fromDom(n.extractContents())),n.insertNode(t.dom()),_r(t).each(function(t){return t.dom().normalize()}),Uc(t).map(function(t){var n;e.selection.setCursorLocation(t.dom(),"img"===Qo(n=t)?1:Rc(n).fold(function(){return Fr(n).length},function(t){return t.length}))}),t})},Hg=function(t){return mu(t,"[data-mce-autocompleter]")},Pg=/[\u00a0 \t\r\n]/,zg=function(t,n){return t.toString().substring(n.length).replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},Lg=function(t,u,a,c){if(void 0===c&&(c=0),!(n=u).collapsed||3!==n.startContainer.nodeType)return et.none();var n;return Vg(t,u.startContainer,u.startOffset,function(e,o,r,t){var i=t.getOr(r.length);return function(t,n,e,o){var r;for(r=n-1;0<=r;r--){var i=t.charAt(r);if(Pg.test(i))return et.none();if(i===e)break}return-1===r||n-r<o?et.none():et.some(t.substring(r+1,n))}(r,i,a,1).fold(function(){return r.match(Pg)?e.abort():e.kontinue()},function(t){var n=u.cloneRange();return n.setStart(o,i-t.length-1),n.setEnd(u.endContainer,u.endOffset),r.length<c?e.abort():e.finish({text:zg(n,a),range:n,triggerChar:a})})}).fold(et.none,et.none,et.some)},jg=function(e,t,o,n){return void 0===n&&(n=0),Hg(fe.fromDom(t.startContainer)).fold(function(){return Lg(e,t,o,n)},function(t){var n=e.createRng();return n.selectNode(t.dom()),et.some({range:n,text:zg(n,o),triggerChar:o})})},Ug=function(e,t){t.on("keypress compositionend",e.onKeypress.throttle),t.on("remove",e.onKeypress.cancel);var o=function(t,n){Lo(t,co(),{raw:n})};t.on("keydown",function(n){var t=function(){return e.getView().bind(kl.getHighlighted)};8===n.which&&e.onKeypress.throttle(n),e.isActive()&&(27===n.which&&e.cancelIfNecessary(),e.isMenuOpen()?13===n.which?(t().each(jo),n.preventDefault()):40===n.which?(t().fold(function(){e.getView().each(kl.highlightFirst)},function(t){o(t,n)}),n.preventDefault(),n.stopImmediatePropagation()):37!==n.which&&38!==n.which&&39!==n.which||t().each(function(t){o(t,n),n.preventDefault(),n.stopImmediatePropagation()}):13!==n.which&&38!==n.which&&40!==n.which||e.cancelIfNecessary())}),t.on("NodeChange",function(t){e.isActive()&&Hg(fe.fromDom(t.element)).isNone()&&e.cancelIfNecessary()})},Wg=tinymce.util.Tools.resolve("tinymce.util.Promise"),Gg=function(t,n){return{element:t,offset:n}},Xg=function(t){if(t.nodeType===H.Node.TEXT_NODE)return Gg(t,t.data.length);var n=t.childNodes;return 0<n.length?Xg(n[n.length-1]):Gg(t,n.length)},Yg=function(t,n){var e=t.childNodes;return 0<e.length&&n<e.length?Yg(e[n],0):0<e.length&&t.nodeType===H.Node.ELEMENT_NODE&&e.length===n?Xg(e[e.length-1]):Gg(t,n)},qg=function(n,e){var o,r,t,i=e(),u=n.selection.getRng();return(o=n.dom,r=u,t=i,bu(t.triggerChars,function(t){return jg(o,r,t)})).bind(function(t){return Kg(n,e,t)})},Kg=function(n,t,e){var o=t(),r=n.selection.getRng().startContainer.nodeValue,i=I(o.lookupByChar(e.triggerChar),function(t){return e.text.length>=t.minChars&&t.matches.getOrThunk(function(){return e=n.dom,o=function(t,n,e,o){var r=o.getOr(e.length);return 0===r?t.kontinue():t.finish(/\s/.test(e.charAt(r-1)))},function(t){var n=Yg(t.startContainer,t.startOffset);return Vg(e,n.element,n.offset,o).fold(nt(!0),nt(!0),d)};var e,o})(e.range,r,e.text)});if(0===i.length)return et.none();var u=Wg.all(F(i,function(n){return n.fetch(e.text,n.maxResults).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction}})}));return et.some({lookupData:u,context:e})},$g=pn([ae("type",function(){return"autocompleteitem"}),ae("active",function(){return!1}),ae("disabled",function(){return!1}),Zn("meta",{}),Ln("value"),$n("text"),$n("icon")]),Jg=pn([Ln("type"),Ln("ch"),ne("minChars",1),Zn("columns",1),ne("maxResults",10),Jn("matches"),Un("fetch"),Un("onAction")]),Qg=function(t){var n,e,o=t.ui.registry.getAll().popups,r=st(o,function(t){return(n=t,Tn("Autocompleter",Jg,n)).fold(function(t){throw new Error(Dn(t))},function(t){return t});var n}),i=(n=lt(r,function(t){return t.ch}),e={},W(n,function(t){e[t]={}}),ut(e)),u=dt(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return I(u,function(t){return t.ch===n})}}},Zg=[re("disabled",!1),$n("text"),$n("shortcut"),wn("value","value",Ot(function(){return oi("menuitem-value")}),Mn()),Zn("meta",{})],tp=pn([Ln("type"),ie("onSetup",function(){return tt}),ie("onAction",tt),$n("icon")].concat(Zg)),np=pn([Ln("type"),Un("getSubmenuItems"),ie("onSetup",function(){return tt}),$n("icon")].concat(Zg)),ep=pn([Ln("type"),re("active",!1),ie("onSetup",function(){return tt}),Un("onAction")].concat(Zg)),op=pn([Ln("type"),re("active",!1),$n("icon")].concat(Zg)),rp=pn([Ln("type"),$n("text")]),ip=pn([Ln("type"),jn("fancytype",["inserttable","colorswatch"]),ie("onAction",tt)]),up=function(t,o,n){var r=$c(t.element(),"."+n);if(0<r.length){var e=G(r,function(t){var n=t.dom().getBoundingClientRect().top,e=r[0].dom().getBoundingClientRect().top;return Math.abs(n-e)>o}).getOr(r.length);return et.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return et.none()},ap=function(t,n){return Wu([rg(t,n)])},cp=function(t){return ap(oi("unnamed-events"),t)},sp=[Pn("lazySink"),Pn("tooltipDom"),Zn("exclusive",!0),Zn("tooltipComponents",[]),Zn("delay",300),oe("mode","normal",["normal","follow-highlight"]),Zn("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:nt([sc,cc,rc,uc,ic,ac]),onRtl:nt([sc,cc,rc,uc,ic,ac])}}}),Mu("onHide"),Mu("onShow")],fp=/* */Object.freeze({init:function(){var e=ce(et.none()),n=ce(et.none()),o=function(){e.get().each(function(t){H.clearTimeout(t)})},t=nt("not-implemented");return xi({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(et.some(t))},clearTooltip:function(){n.set(et.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(et.some(H.setTimeout(function(){t()},n)))},readState:t})}}),lp=oi("tooltip.exclusive"),dp=oi("tooltip.show"),mp=oi("tooltip.hide"),gp=function(t,n,e){t.getSystem().broadcastOn([lp],{})},pp=/* */Object.freeze({hideAllExclusive:gp,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&wm.set(t,o)})}}),hp=Xu({fields:sp,name:"tooltipping",active:/* */Object.freeze({events:function(o,r){var e=function(n){r.getTooltip().each(function(t){Vs(t),o.onHide(n,t),r.clearTooltip()}),r.clearTimer()};return fr(q([[mr(dp,function(t){r.resetTimer(function(){!function(n){if(!r.isShowing()){gp(n);var t=o.lazySink(n).getOrDie(),e=n.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:fr("normal"===o.mode?[mr(io(),function(t){zo(n,dp)}),mr(oo(),function(t){zo(n,mp)})]:[]),behaviours:Wu([wm.config({})])});r.setTooltip(e),Fs(t,e),o.onShow(n,e),Ds.position(t,o.anchor(n),e)}}(t)},o.delay)}),mr(mp,function(t){r.resetTimer(function(){e(t)},o.delay)}),mr(xo(),function(t,n){D(n.channels(),lp)&&e(t)}),Sr(function(t){e(t)})],"normal"===o.mode?[mr(uo(),function(t){zo(t,dp)}),mr(bo(),function(t){zo(t,mp)}),mr(io(),function(t){zo(t,dp)}),mr(oo(),function(t){zo(t,mp)})]:[mr(Ho(),function(t,n){zo(t,dp)}),mr(Po(),function(t){zo(t,mp)})]]))}}),state:fp,apis:pp}),vp=function(t){var n,e,o,r=fe.fromHtml(t),i=Fr(r),u=(e=(n=r).dom().attributes!==undefined?n.dom().attributes:[],V(e,function(t,n){var e;return"class"===n.name?t:P({},t,((e={})[n.name]=n.value,e))},{})),a=(o=r,Array.prototype.slice.call(o.dom().classList,0)),c=0===i.length?{}:{innerHtml:Ur(r)};return P({tag:Qo(r),classes:a,attributes:u},c)},bp=tinymce.util.Tools.resolve("tinymce.util.I18n"),yp="tox-menu-nav__js",xp="tox-collection__item",wp="tox-swatch",Sp={normal:yp,color:wp},Cp="tox-collection__item--enabled",kp="tox-collection__item-icon",Op="tox-collection__item-label",Ep="tox-collection__item--active",Tp=function(t){return Ft(Sp,t).getOr(yp)},Bp=tinymce.util.Tools.resolve("tinymce.Env"),Ap=function(t){var e=Bp.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},n=t.split("+"),o=F(n,function(t){var n=t.toLowerCase().trim();return gt(e,n)?e[n]:t});return Bp.mac?o.join(""):o.join("+")},Dp=function(t){return{dom:{tag:"div",classes:[kp],innerHtml:t}}},_p=function(t){return{dom:{tag:"div",classes:[Op]},components:[uu(bp.translate(t))]}},Mp=function(t,n){return{dom:{tag:"div",classes:[Op]},components:[{dom:{tag:t.tag,attributes:{style:t.styleAttr}},components:[uu(bp.translate(n))]}]}},Fp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:Ap(t)}}},Ip=function(t){return{dom:{tag:"div",classes:[kp,"tox-collection__item-checkmark"],innerHtml:kg("checkmark",t)}}},Rp=function(t,n,e,o,r){var i=e?t.checkMark.orThunk(function(){return n.or(et.some("")).map(Dp)}):et.none(),u=t.ariaLabel.map(function(t){return{attributes:{title:bp.translate(t)}}}).getOr({});return{dom:yt({tag:"div",classes:[yp,xp].concat(r?["tox-collection__item-icon-rtl"]:[])},u),optComponents:[i,t.htmlContent.fold(function(){return t.textContent.map(o)},function(t){return et.some({dom:{tag:"div",classes:[Op],innerHtml:t}})}),t.shortcutContent.map(Fp),t.caret]}},Vp=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],Np=["list-bull-circle","list-bull-default","list-bull-square"],Hp=function(t,r,n,i){void 0===i&&(i=et.none());var e,o,u,a,c,s,f,l=bp.isRtl()&&t.iconContent.exists(function(t){return D(Np,t)}),d=(e=t.iconContent,e.map(function(t){return bp.isRtl()&&D(Vp,t)?t+"-rtl":t})).map(function(t){return n=t,e=r.icons,o=i,et.from(e()[n]).or(o).getOrThunk(function(){return Cg(e)});var n,e,o}),m=et.from(t.meta).fold(function(){return _p},function(t){return gt(t,"style")?g(Mp,t.style):_p});return"color"===t.presets?(o=t.ariaLabel,u=t.value,a=r,{dom:(c=wp,s=d.getOr(""),f=o.map(function(t){return' title="'+a.translate(t)+'"'}).getOr(""),vp("custom"===u?'<button class="'+c+' tox-swatches__picker-btn"'+f+">"+s+"</button>":"remove"===u?'<div class="'+c+' tox-swatch--remove"'+f+">"+s+"</div>":'<div class="'+c+'" style="background-color: '+u+'" data-mce-color="'+u+'"'+f+"></div>")),optComponents:[]}):Rp(t,d,n,m,l)},Pp=["input","button","textarea"],zp=function(t,n,e){n.disabled&&Xp(t,n)},Lp=function(t){return D(Pp,Qo(t.element()))},jp=function(t){Xr(t.element(),"disabled","disabled")},Up=function(t){$r(t.element(),"disabled")},Wp=function(t){Xr(t.element(),"aria-disabled","true")},Gp=function(t){Xr(t.element(),"aria-disabled","false")},Xp=function(n,t,e){t.disableClass.each(function(t){Ri(n.element(),t)}),(Lp(n)?jp:Wp)(n)},Yp=function(n,t,e){t.disableClass.each(function(t){Ni(n.element(),t)}),(Lp(n)?Up:Gp)(n)},qp=function(t){return Lp(t)?Kr(t.element(),"disabled"):"true"===qr(t.element(),"aria-disabled")},Kp=/* */Object.freeze({enable:Yp,disable:Xp,isDisabled:qp,onLoad:zp,set:function(t,n,e,o){(o?Xp:Yp)(t,n,e)}}),$p=/* */Object.freeze({exhibit:function(t,n,e){return Si({classes:n.disabled?n.disableClass.map(Z).getOr([]):[]})},events:function(t,n){return fr([lr(wo(),function(t,n){return qp(t)}),Pu(t,n,zp)])}}),Jp=[Zn("disabled",!1),Yn("disableClass")],Qp=Xu({fields:Jp,name:"disabling",active:$p,apis:Kp}),Zp=function(t){return Qp.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},th=function(t){return Qp.config({disabled:t})},nh=function(t){return Qp.config({disabled:t,disableClass:"tox-tbtn--disabled"})},eh=function(t,n){var e=t.getApi(n);return function(t){t(e)}},oh=function(e,o){return wr(function(t){eh(e,t)(function(t){var n=e.onSetup(t);null!==n&&n!==undefined&&o.set(n)})})},rh=function(n,e){return Sr(function(t){return eh(n,t)(e.get())})};(Dg=Ag||(Ag={}))[Dg.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",Dg[Dg.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var ih=Ag,uh={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},ah=function(t){return K(t,function(t){return t.toArray()})},ch=function(t,n,e){var o,r,i=ce(tt);return{type:"item",dom:n.dom,components:ah(n.optComponents),data:t.data,eventOrder:uh,hasSubmenu:t.triggersSubmenu,itemBehaviours:Wu([rg("item-events",[(o=t,r=e,kr(function(t,n){eh(o,t)(o.onAction),o.triggersSubmenu||r!==ih.CLOSE_ON_EXECUTE||(zo(t,Eo()),n.stop())})),oh(t,i),rh(t,i)]),Zp(t.disabled),wm.config({})].concat(t.itemBehaviours))}},sh=function(t){return{value:t.value,meta:yt({text:t.text.getOr("")},t.meta)}},fh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),lh=function(t,n){var e,o=bp.translate(t),r=(e=o,fh.DOM.encode(e));if(0<n.length){var i=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return r.replace(i,function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"})}return r},dh=nt(Nf("item-widget",ag())),mh=oi("cell-over"),gh=oi("cell-execute"),ph=function(n,e,t){var o,r=function(t){return Lo(t,gh,{row:n,col:e})};return su({dom:{tag:"div",attributes:(o={role:"button"},o["aria-labelledby"]=t,o)},behaviours:Wu([rg("insert-table-picker-cell",[mr(io(),Pm.focus),mr(wo(),r),mr(ko(),r)]),Jm.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Pm.config({onFocus:function(t){return Lo(t,mh,{row:n,col:e})}})])})};var hh=function(t){return{value:nt(t)}},vh=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,bh=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,yh=function(t){return vh.test(t)||bh.test(t)},xh=function(t){var n,e=(n=t.value().replace(vh,function(t,n,e,o){return n+n+e+e+o+o}),{value:nt(n)}),o=bh.exec(e.value());return null===o?["FFFFFF","FF","FF","FF"]:o},wh=function(t){var n=t.toString(16);return 1===n.length?"0"+n:n},Sh=function(t){var n=wh(t.red())+wh(t.green())+wh(t.blue());return hh(n)},Ch=Math.min,kh=Math.max,Oh=Math.round,Eh=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Th=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Bh=function(t,n,e,o){return{red:nt(t),green:nt(n),blue:nt(e),alpha:nt(o)}},Ah=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},Dh=function(t){var n,e,o,r=(t.hue()||0)%360,i=t.saturation()/100,u=t.value()/100;if(i=kh(0,Ch(i,1)),u=kh(0,Ch(u,1)),0===i)return n=e=o=Oh(255*u),Bh(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=Oh(255*(n+f)),e=Oh(255*(e+f)),o=Oh(255*(o+f)),Bh(n,e,o,1)},_h=function(t){var n=xh(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return Bh(e,o,r,1)},Mh=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return Bh(r,i,u,a)},Fh=function(t){return"rgba("+t.red()+","+t.green()+","+t.blue()+","+t.alpha()+")"},Ih=nt(Bh(255,0,0,1)),Rh=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Vh="tinymce-custom-colors";var Nh="choiceitem",Hh=[{type:Nh,text:"Light Green",value:"#BFEDD2"},{type:Nh,text:"Light Yellow",value:"#FBEEB8"},{type:Nh,text:"Light Red",value:"#F8CAC6"},{type:Nh,text:"Light Purple",value:"#ECCAFA"},{type:Nh,text:"Light Blue",value:"#C2E0F4"},{type:Nh,text:"Green",value:"#2DC26B"},{type:Nh,text:"Yellow",value:"#F1C40F"},{type:Nh,text:"Red",value:"#E03E2D"},{type:Nh,text:"Purple",value:"#B96AD9"},{type:Nh,text:"Blue",value:"#3598DB"},{type:Nh,text:"Dark Turquoise",value:"#169179"},{type:Nh,text:"Orange",value:"#E67E23"},{type:Nh,text:"Dark Red",value:"#BA372A"},{type:Nh,text:"Dark Purple",value:"#843FA1"},{type:Nh,text:"Dark Blue",value:"#236FA1"},{type:Nh,text:"Light Gray",value:"#ECF0F1"},{type:Nh,text:"Medium Gray",value:"#CED4D9"},{type:Nh,text:"Gray",value:"#95A5A6"},{type:Nh,text:"Dark Gray",value:"#7E8C8D"},{type:Nh,text:"Navy Blue",value:"#34495E"},{type:Nh,text:"Black",value:"#000000"},{type:Nh,text:"White",value:"#ffffff"}],Ph=function A_(r){void 0===r&&(r=10);var t,n=Rh.getItem(Vh),e=L(n)?JSON.parse(n):[],i=r-(t=e).length<0?t.slice(0,r):t,u=function(t){i.splice(t,1)};return{add:function(t){var n,e,o;(n=i,e=t,o=A(n,e),-1===o?et.none():et.some(o)).each(u),i.unshift(t),i.length>r&&i.pop(),Rh.setItem(Vh,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),zh=function(t){var n=[],u=H.document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(t,n){var e=n/255;return("0"+Math.round(t*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=t,a.fillRect(0,0,1,1);var n=a.getImageData(0,0,1,1).data,e=n[0],o=n[1],r=n[2],i=n[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o<t.length;o+=2)n.push({text:t[o+1],value:e(t[o]),type:"choiceitem"});return n},Lh=function(t){return t.getParam("color_map")},jh=function(t,n){return t.getParam("color_cols",n,"number")},Uh=function(t){return!1!==t.getParam("custom_colors")},Wh=function(t){var n=Lh(t);return n!==undefined?zh(n):Hh},Gh=function(){return F(Ph.state(),function(t){return{type:Nh,text:t,value:t}})},Xh=function(t){Ph.add(t)},Yh=function(t){return t.fire("SkinLoaded")},qh=function(t){return t.fire("ResizeEditor")},Kh=function(t){return t.fire("ResizeContent")},$h=function(t,n){t.fire("TextColorChange",n)},Jh=function(t,e){var o;return t.dom.getParents(t.selection.getStart(),function(t){var n;(n=t.style["forecolor"===e?"color":"background-color"])&&(o=o||n)}),o},Qh=function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))},Zh=function(t){var n=Wh(t),e=Qh(n.length);return jh(t,e)},tv=function(n,e,t,o){"custom"===t?uv(n)(function(t){t.each(function(t){Xh(t),n.execCommand("mceApplyTextcolor",e,t),o(t)})},"#000000"):"remove"===t?(o(""),n.execCommand("mceRemoveTextcolor",e)):(o(t),n.execCommand("mceApplyTextcolor",e,t))},nv=function(t,n){return t.concat(Gh().concat((o={type:e="choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},n?[o,{type:e,text:"Custom color",icon:"color-picker",value:"custom"}]:[o])));var e,o},ev=function(n,e){return function(t){t(nv(n,e))}},ov=function(t,n,e){var o,r;o="forecolor"===n?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",r=e,t.setIconFill(o,r),t.setIconStroke(o,r)},rv=function(o,e,r,t,i){o.ui.registry.addSplitButton(e,{tooltip:t,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){return et.from(Jh(o,r)).bind(function(t){return function(t){if("transparent"===t)return et.some(Bh(0,0,0,0));var n=Eh.exec(t);if(null!==n)return et.some(Mh(n[1],n[2],n[3],"1"));var e=Th.exec(t);return null!==e?et.some(Mh(e[1],e[2],e[3],e[4])):et.none()}(t).map(function(t){var n=Sh(t).value();return Me(e.toLowerCase(),n)})}).getOr(!1)},columns:Zh(o),fetch:ev(Wh(o),Uh(o)),onAction:function(t){null!==i.get()&&tv(o,r,i.get(),function(){})},onItemAction:function(t,n){tv(o,r,n,function(t){i.set(t),$h(o,{name:e,color:t})})},onSetup:function(n){null!==i.get()&&ov(n,e,i.get());var t=function(t){t.name===e&&ov(n,t.name,t.color)};return o.on("TextColorChange",t),function(){o.off("TextColorChange",t)}}})},iv=function(n,t,e,o){n.ui.registry.addNestedMenuItem(t,{text:o,icon:"forecolor"===t?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(t){tv(n,e,t.value,tt)}}]}})},uv=function(i){return function(t,n){var e,o={colorpicker:n},r=(e=t,function(t){var n=t.getData();e(et.from(n.colorpicker)),t.close()});i.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onAction:function(t,n){"hex-valid"===n.name&&(n.value?t.enable("ok"):t.disable("ok"))},onSubmit:r,onClose:function(){},onCancel:function(){t(et.none())}})}},av={register:function(t){var i;(i=t).addCommand("mceApplyTextcolor",function(t,n){var e,o,r;o=t,r=n,(e=i).undoManager.transact(function(){e.focus(),e.formatter.apply(o,{value:r}),e.nodeChanged()})}),i.addCommand("mceRemoveTextcolor",function(t){var n,e;e=t,(n=i).undoManager.transact(function(){n.focus(),n.formatter.remove(e,{value:null},null,!0),n.nodeChanged()})});var n=ce(null),e=ce(null);rv(t,"forecolor","forecolor","Text color",n),rv(t,"backcolor","hilitecolor","Background color",e),iv(t,"forecolor","forecolor","Text color"),iv(t,"backcolor","hilitecolor","Background color")},getColors:nv,getFetch:ev,colorPickerDialog:uv,getCurrentColor:Jh,getColorCols:Zh,calcCols:Qh},cv=function(e,o){return function(t){var n=M(t,o);return F(n,function(t){return{dom:e,components:t}})}},sv=function(n,i,t){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===n?["tox-collection--list"]:["tox-collection--grid"])},components:[mg.parts().items({preprocess:function(t){return"auto"!==n&&1<n?cv({tag:"div",classes:["tox-collection__group"]},n)(t):(e=function(t,n){return"separator"===i[n].type},o=[],r=[],W(t,function(t,n){e(t,n)?(0<r.length&&o.push(r),r=[],gt(t.dom,"innerHtml")&&r.push(t)):r.push(t)}),0<r.length&&o.push(r),F(o,function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}));var e,o,r}})]}},fv=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:(n=t,"color"===n?"tox-swatches":"tox-menu"),tieredMenu:"tox-tiered-menu"};var n},lv=function(t){var n=fv(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:Tp(t)}},dv=[mg.parts().items({})],mv=function(t,n,e){var o=fv(e);return{dom:{tag:"div",classes:q([[o.tieredMenu]])},markers:lv(e)}},gv=function(t){return t.icon!==undefined||"togglemenuitem"===t.type||"choicemenuitem"===t.type},pv=function(t){return H.console.error(Dn(t)),H.console.log(t),et.none()},hv=function(t,n,e,o,r){var i,u,a,c,s,f,l;return"color"===r?{value:t,dom:(l=(i=o,{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[mg.parts().items({preprocess:"auto"!==i?cv({tag:"div",classes:["tox-swatches__row"]},i):d})]}]})).dom,components:l.components,items:e}:"normal"===r&&"auto"===o?{value:t,dom:(l=sv(o,e)).dom,components:l.components,items:e}:"normal"===r&&1===o?{value:t,dom:(l=sv(1,e)).dom,components:l.components,items:e}:"normal"===r?{value:t,dom:(l=sv(o,e)).dom,components:l.components,items:e}:"listpreview"!==r||"auto"===o?{value:t,dom:(a=n,c=o,s=r,f=fv(s),{tag:"div",classes:q([[f.menu,"tox-menu-"+c+"-column"],a?[f.hasIcons]:[]])}),components:dv,items:e}:{value:t,dom:(l=(u=o,{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[mg.parts().items({preprocess:cv({tag:"div",classes:["tox-collection__group"]},u)})]})).dom,components:l.components,items:e}},vv=function(t,n,e,o,r,i,u,a){var c=_(n,gv),s=bv(n,e,o,"color"!==r?"normal":"color",i,u,a);return hv(t,c,s,o,r)},bv=function(t,f,l,d,m,g,p){return vu(F(t,function(s){return"choiceitem"===s.type?(t=s,Tn("choicemenuitem",op,t)).fold(pv,function(t){return et.some((n=t,e=1===l,o=d,r=f,i=g(s.value),u=m,a=p,c=Hp({presets:o,textContent:e?n.text:et.none(),htmlContent:et.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:e?n.shortcut:et.none(),checkMark:e?et.some(Ip(a.icons)):et.none(),caret:et.none(),value:n.value},a,!0),bt(ch({data:sh(n),disabled:n.disabled,getApi:function(n){return{setActive:function(t){Jm.set(n,t)},isActive:function(){return Jm.isOn(n)},isDisabled:function(){return Qp.isDisabled(n)},setDisabled:function(t){return Qp.set(n,t)}}},onAction:function(t){return r(n.value)},onSetup:function(t){return t.setActive(i),function(){}},triggersSubmenu:!1,itemBehaviours:[]},c,u),{toggling:{toggleClass:Cp,toggleOnExecute:!1,selected:n.active}})));var n,e,o,r,i,u,a,c}):et.none();var t}))},yv=function(t,n){var e=lv(n);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===n?"tox-swatches__row":"tox-collection__group")}};var xv,wv,Sv={inserttable:function D_(o){var t,n=oi("size-label"),a=function(t,n,e){for(var o=[],r=0;r<n;r++){for(var i=[],u=0;u<e;u++)i.push(ph(r,u,t));o.push(i)}return o}(n,10,10),c=Sg({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:n}},components:[uu("0x0")],behaviours:Wu([wm.config({})])});return{type:"widget",data:{value:oi("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[dh().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:(t=a,K(t,function(t){return F(t,fu)})).concat(c.asSpec()),behaviours:Wu([rg("insert-table-picker",[vr(mh,function(t,n,e){var o,r,i=e.event().row(),u=e.event().col();!function(t,n,e,o,r){for(var i=0;i<o;i++)for(var u=0;u<r;u++)Jm.set(t[i][u],i<=n&&u<=e)}(a,i,u,10,10),wm.set(c.get(t),[(o=i,r=u,uu(r+1+"x"+(o+1)))])}),vr(gh,function(t,n,e){o.onAction({numRows:e.event().row()+1,numColumns:e.event().col()+1}),zo(t,Eo())})]),hm.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function __(n,t){var e=av.getColors(t.colorinput.getColors(),t.colorinput.hasCustomColors()),o=t.colorinput.getColorCols(),r=vv(oi("menu-value"),e,function(t){n.onAction({value:t})},o,"color",ih.CLOSE_ON_EXECUTE,function(){return!1},t.shared.providers),i=bt(P({},r,{markers:lv("color"),movement:yv(o,"color")}));return{type:"widget",data:{value:oi("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[dh().widget(mg.sketch(i))]}}},Cv=function(n,e,t,o,r,i,u,a){void 0===a&&(a=!0);var c,s,f=Hp({presets:o,textContent:et.none(),htmlContent:t?n.text.map(function(t){return lh(t,e)}):et.none(),ariaLabel:n.text,iconContent:n.icon,shortcutContent:et.none(),checkMark:et.none(),caret:et.none(),value:n.value},u.providers,a,n.icon);return ch({data:sh(n),disabled:n.disabled,getApi:function(){return{}},onAction:function(t){return r(n.value,n.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:(c=n.meta,s=u,mt(c,"tooltipWorker").map(function(e){return[hp.config({lazySink:s.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{anchor:"submenu",item:t,overrides:{maxHeightFunction:Wa}}},mode:"follow-highlight",onShow:function(n,t){e(function(t){hp.setComponents(n,[au({element:fe.fromDom(t)})])})}})]}).getOr([]))},f,i)},kv=function(t){var n=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:P({tag:"div",classes:[xp,"tox-collection__group-heading"]},n),components:[]}},Ov=function(t,n,e,o){void 0===o&&(o=!0);var r=Hp({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:et.none(),ariaLabel:t.text,caret:et.none(),checkMark:et.none(),shortcutContent:t.shortcut},e,o);return ch({data:sh(t),getApi:function(n){return{isDisabled:function(){return Qp.isDisabled(n)},setDisabled:function(t){return Qp.set(n,t)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n)},Ev=function(t,n,e,o){void 0===o&&(o=!0);var r,i=(r=e.icons,{dom:{tag:"div",classes:["tox-collection__item-caret"],innerHtml:kg("chevron-right",r)}}),u=Hp({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:et.none(),ariaLabel:t.text,caret:et.some(i),checkMark:et.none(),shortcutContent:t.shortcut},e,o);return ch({data:sh(t),getApi:function(n){return{isDisabled:function(){return Qp.isDisabled(n)},setDisabled:function(t){return Qp.set(n,t)}}},disabled:t.disabled,onAction:tt,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,n)},Tv=function(t,n,e){var o=Hp({iconContent:et.none(),textContent:t.text,htmlContent:et.none(),ariaLabel:t.text,checkMark:et.some(Ip(e.icons)),caret:et.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},e,!0);return bt(ch({data:sh(t),disabled:t.disabled,getApi:function(n){return{setActive:function(t){Jm.set(n,t)},isActive:function(){return Jm.isOn(n)},isDisabled:function(){return Qp.isDisabled(n)},setDisabled:function(t){return Qp.set(n,t)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,n),{toggling:{toggleClass:Cp,toggleOnExecute:!1,selected:t.active}})},Bv=function(n,e){return(t=Sv,o=n.fancytype,Object.prototype.hasOwnProperty.call(t,o)?et.some(t[o]):et.none()).map(function(t){return t(n,e)});var t,o};(wv=xv||(xv={}))[wv.ContentFocus=0]="ContentFocus",wv[wv.UiFocus=1]="UiFocus";var Av=function(t){return t.icon!==undefined||"togglemenuitem"===t.type||"choicemenuitem"===t.type},Dv=function(t){return _(t,Av)},_v=function(t,n,e,o){void 0===o&&(o=!0);var r,i,u,a,c,s=e.shared.providers;switch(t.type){case"menuitem":return(c=t,Tn("menuitem",tp,c)).fold(pv,function(t){return et.some(Ov(t,n,s,o))});case"nestedmenuitem":return(a=t,Tn("nestedmenuitem",np,a)).fold(pv,function(t){return et.some(Ev(t,n,s,o))});case"togglemenuitem":return(u=t,Tn("togglemenuitem",ep,u)).fold(pv,function(t){return et.some(Tv(t,n,s))});case"separator":return(i=t,Tn("separatormenuitem",rp,i)).fold(pv,function(t){return et.some(kv(t))});case"fancymenuitem":return(r=t,Tn("fancymenuitem",ip,r)).fold(pv,function(t){return Bv(t,e)});default:return H.console.error("Unknown item in general menu",t),et.none()}},Mv=function(t,e,o,n,r,i){var u=1===n,a=!u||Dv(t);return vu(F(t,function(t){return(n=t,Tn("Autocompleter.Item",$g,n)).fold(pv,function(t){return et.some(Cv(t,e,u,"normal",o,r,i,a))});var n}))},Fv=function(t,n,e,o){var r=Dv(n),i=vu(F(n,function(t){var n=function(t){return _v(t,e,o,r)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?n(yt(t,{disabled:!0})):n(t)}));return hv(t,r,i,1,"normal")},Iv=function(t){return bg.singleData(t.value,t)},Rv=function(d,c){var e=ce(et.none()),m=su(yg.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:Wu([rg("dismissAutocompleter",[mr(Fo(),function(){return f()})])]),lazySink:c.getSink})),o=function(){return e.get().isSome()},s=function(){o()&&yg.hide(m)},f=function(){if(o()){var t=e.get().map(function(t){return t.element});Hg(t.getOr(fe.fromDom(d.selection.getNode()))).each(jr),s(),e.set(et.none())}},n=xt(function(){return Qg(d)}),l=function(t,n,e,o){t.matchLength=n.text.length;var r,i,u,a,c,s,f,l=bu(e,function(t){return et.from(t.columns)}).getOr(1);yg.showAt(m,{anchor:"node",root:fe.fromDom(d.getBody()),node:et.from(t.element)},mg.sketch((r=hv("autocompleter-value",!0,o,l,"normal"),i=l,u=xv.ContentFocus,a="normal",c=u===xv.ContentFocus?zl():Pl(),s=yv(i,a),f=lv(a),{dom:r.dom,components:r.components,items:r.items,value:r.value,markers:{selectedItem:f.selectedItem,item:f.item},movement:s,fakeFocus:u===xv.ContentFocus,focusManager:c,menuBehaviours:cp("auto"!==i?[]:[wr(function(o,t){up(o,4,f.item).each(function(t){var n=t.numColumns,e=t.numRows;hm.setGridSize(o,e,n)})})])}))),yg.getContent(m).each(kl.highlightFirst)},t=_g(function(t){27!==t.which&&e.get().map(function(t){return jg(d.dom,d.selection.getRng(),t.triggerChar).bind(function(t){return Kg(d,n,t)})}).getOrThunk(function(){return qg(d,n)}).fold(f,function(a){!function(t){if(!o()){var n=Ng(d,t.range);e.set(et.some({triggerChar:t.triggerChar,element:n,matchLength:t.text.length}))}}(a.context),a.lookupData.then(function(u){e.get().map(function(t){var n,e,o,r=a.context;if(t.triggerChar===r.triggerChar){var i=(n=r.triggerChar,o=bu(e=u,function(t){return et.from(t.columns)}).getOr(1),K(e,function(i){var t=i.items;return Mv(t,i.matchText,function(o,r){var t=d.selection.getRng();jg(d.dom,t,n).fold(function(){return H.console.error("Lost context. Cursor probably moved")},function(t){var n=t.range,e={hide:f};i.onAction(e,n,o,r)})},o,ih.BUBBLE_TO_SANDBOX,c)}));0<i.length?l(t,r,u,i):10<=r.text.length-t.matchLength?f():s()}})})})},50);Ug({onKeypress:t,cancelIfNecessary:f,isMenuOpen:function(){return yg.isOpen(m)},isActive:o,getView:function(){return yg.getContent(m)}},d)},Vv=function(m,g){return function(t){if(m(t)){var n,e,o,r,i,u,a,c=fe.fromDom(t.target),s=function(){t.stopPropagation()},f=function(){t.preventDefault()},l=p(f,s),d=(n=c,e=t.clientX,o=t.clientY,r=s,i=f,u=l,a=t,{target:nt(n),x:nt(e),y:nt(o),stop:r,prevent:i,kill:u,raw:nt(a)});g(d)}}},Nv=function(t,n,e,o,r){var i=Vv(e,o);return t.dom().addEventListener(n,i,r),{unbind:g(Hv,t,n,i,r)}},Hv=function(t,n,e,o){t.dom().removeEventListener(n,e,o)},Pv=nt(!0),zv=function(t,n,e){return Nv(t,n,Pv,e,!1)},Lv=function(t,n,e){return Nv(t,n,Pv,e,!0)},jv=function(t,n,e){return mu(t,n,e).isSome()};function Uv(e,o){var r=null;return{cancel:function(){null!==r&&(H.clearTimeout(r),r=null)},schedule:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r=H.setTimeout(function(){e.apply(null,t),r=null},o)}}}var Wv=function(t){var n=t.raw();return n.touches===undefined||1!==n.touches.length?et.none():et.some(n.touches[0])},Gv=function(e){var u=ce(et.none()),o=Uv(function(t){u.set(et.none()),e.triggerEvent(Oo(),t)},400),r=Rt([{key:Qe(),value:function(e){return Wv(e).each(function(t){o.cancel();var n={x:nt(t.clientX),y:nt(t.clientY),target:e.target};o.schedule(e),u.set(et.some(n))}),et.none()}},{key:Ze(),value:function(t){return o.cancel(),Wv(t).each(function(i){u.get().each(function(t){var n,e,o,r;n=i,e=t,o=Math.abs(n.clientX-e.x()),r=Math.abs(n.clientY-e.y()),(5<o||5<r)&&u.set(et.none())})}),et.none()}},{key:to(),value:function(n){o.cancel();return u.get().filter(function(t){return qe(t.target(),n.target())}).map(function(t){return e.triggerEvent(Co(),n)})}}]);return{fireIfReady:function(n,t){return Ft(r,t).bind(function(t){return t(n)})}}},Xv=Pe.detect().browser.isFirefox(),Yv=gn([Un("triggerEvent"),Zn("stopBackspace",!0)]),qv=function(n,t){var e,o,r,i,u=An("Getting GUI events settings",Yv,t),a=Pe.detect().deviceType.isTouch()?["touchstart","touchmove","touchend","gesturestart"]:["mousedown","mouseup","mouseover","mousemove","mouseout","click"],c=Gv(u),s=F(a.concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(t){return zv(n,t,function(n){c.fireIfReady(n,t).each(function(t){t&&n.kill()}),u.triggerEvent(t,n)&&n.kill()})}),f=ce(et.none()),l=zv(n,"paste",function(n){c.fireIfReady(n,"paste").each(function(t){t&&n.kill()}),u.triggerEvent("paste",n)&&n.kill(),f.set(et.some(H.setTimeout(function(){u.triggerEvent(yo(),n)},0)))}),d=zv(n,"keydown",function(t){var n;u.triggerEvent("keydown",t)?t.kill():!0!==u.stopBackspace||(8!==(n=t).raw().which||D(["input","textarea"],Qo(n.target()))||jv(n.target(),'[contenteditable="true"]'))||t.prevent()}),m=(e=n,o=function(t){u.triggerEvent("focusin",t)&&t.kill()},Xv?Lv(e,"focus",o):zv(e,"focusin",o)),g=ce(et.none()),p=(r=n,i=function(t){u.triggerEvent("focusout",t)&&t.kill(),g.set(et.some(H.setTimeout(function(){u.triggerEvent(bo(),t)},0)))},Xv?Lv(r,"blur",i):zv(r,"focusout",i));return{unbind:function(){W(s,function(t){t.unbind()}),d.unbind(),m.unbind(),p.unbind(),l.unbind(),f.get().each(H.clearTimeout),g.get().each(H.clearTimeout)}}},Kv=function(t,n){var e=Ft(t,"target").map(function(t){return t()}).getOr(n);return ce(e)},$v=pt([{stopped:[]},{resume:["element"]},{complete:[]}]),Jv=function(t,o,n,e,r,i){var u,a,c,s,f=t(o,e),l=(u=n,a=r,c=ce(!1),s=ce(!1),{stop:function(){c.set(!0)},cut:function(){s.set(!0)},isStopped:c.get,isCut:s.get,event:nt(u),setSource:a.set,getSource:a.get});return f.fold(function(){return i.logEventNoHandlers(o,e),$v.complete()},function(n){var e=n.descHandler();return ki(e)(l),l.isStopped()?(i.logEventStopped(o,n.element(),e.purpose()),$v.stopped()):l.isCut()?(i.logEventCut(o,n.element(),e.purpose()),$v.complete()):_r(n.element()).fold(function(){return i.logNoParent(o,n.element(),e.purpose()),$v.complete()},function(t){return i.logEventResponse(o,n.element(),e.purpose()),$v.resume(t)})})},Qv=function(n,e,o,t,r,i){return Jv(n,e,o,t,r,i).fold(function(){return!0},function(t){return Qv(n,e,o,t,r,i)},function(){return!1})},Zv=function(t,n,e){var o,r,i=(o=n,r=ce(!1),{stop:function(){r.set(!0)},cut:tt,isStopped:r.get,isCut:nt(!1),event:nt(o),setSource:u("Cannot set source of a broadcasted event"),getSource:u("Cannot get source of a broadcasted event")});return W(t,function(t){var n=t.descHandler();ki(n)(i)}),i.isStopped()},tb=function(t,n,e,o,r){var i=Kv(e,o);return Qv(t,n,e,o,i,r)},nb=Or("element","descHandler"),eb=function(t,n){return{id:nt(t),descHandler:nt(n)}};function ob(){var i={};return{registerId:function(o,r,t){ct(t,function(t,n){var e=i[n]!==undefined?i[n]:{};e[r]=Ci(t,o),i[n]=e})},unregisterId:function(e){ct(i,function(t,n){t.hasOwnProperty(e)&&delete t[e]})},filterByType:function(t){return Ft(i,t).map(function(t){return lt(t,function(t,n){return eb(n,t)})}).getOr([])},find:function(t,n,e){var r=_t(n)(i);return sr(e,function(t){return e=r,si(o=t).fold(function(){return et.none()},function(t){var n=_t(t);return e.bind(n).map(function(t){return nb(o,t)})});var e,o},t)}}}function rb(){var o=ob(),r={},i=function(o){var t=o.element();return si(t).fold(function(){return t="uid-",n=o.element(),e=oi(ui+t),ci(n,e),e;var t,n,e},function(t){return t})},u=function(t){si(t.element()).each(function(t){delete r[t],o.unregisterId(t)})};return{find:function(t,n,e){return o.find(t,n,e)},filter:function(t){return o.filterByType(t)},register:function(t){var n=i(t);Nt(r,n)&&function(t,n){var e=r[n];if(e!==t)throw new Error('The tagId "'+n+'" is already used by: '+Zr(e.element())+"\nCannot use it for: "+Zr(t.element())+"\nThe conflicting element is"+(or(e.element())?" ":" not ")+"already in the DOM");u(t)}(t,n);var e=[t];o.registerId(e,n,t.events()),r[n]=t},unregister:u,getById:function(t){return _t(t)(r)}}}var ib,ub,ab=ul({name:"Container",factory:function(t){var n=t.dom,e=n.attributes,o=h(n,["attributes"]);return{uid:t.uid,dom:P({tag:"div",attributes:P({role:"presentation"},e)},o),components:t.components,behaviours:ef(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[Zn("components",[]),nf("containerBehaviours",[]),Zn("events",{}),Zn("domModification",{}),Zn("eventOrder",{})]}),cb=function(e){var o=function(n){return _r(e.element()).fold(function(){return!0},function(t){return qe(n,t)})},r=rb(),s=function(t,n){return r.find(o,t,n)},t=qv(e.element(),{triggerEvent:function(u,a){return Cu(u,a.target(),function(t){return n=s,e=u,r=t,i=(o=a).target(),tb(n,e,o,i,r);var n,e,o,r,i})}}),i={debugInfo:nt("real"),triggerEvent:function(n,e,o){Cu(n,e,function(t){tb(s,n,o,e,t)})},triggerFocus:function(a,c){si(a).fold(function(){Rl(a)},function(t){Cu(vo(),a,function(t){var n,e,o,r,i,u;n=s,e=vo(),o={originator:nt(c),kill:tt,prevent:tt,target:nt(a)},i=t,u=Kv(o,r=a),Jv(n,e,o,r,u,i)})})},triggerEscape:function(t,n){i.triggerEvent("keydown",t.element(),n.event())},getByUid:function(t){return g(t)},getByDom:function(t){return p(t)},build:su,addToGui:function(t){a(t)},removeFromGui:function(t){c(t)},addToWorld:function(t){n(t)},removeFromWorld:function(t){u(t)},broadcast:function(t){l(t)},broadcastOn:function(t,n){d(t,n)},broadcastEvent:function(t,n){m(t,n)},isConnected:nt(!0)},n=function(t){t.connect(i),nr(t.element())||(r.register(t),W(t.components(),n),i.triggerEvent(Bo(),t.element(),{target:nt(t.element())}))},u=function(t){nr(t.element())||(W(t.components(),u),r.unregister(t)),t.disconnect()},a=function(t){Fs(e,t)},c=function(t){Vs(t)},f=function(e){var t=r.filter(xo());W(t,function(t){var n=t.descHandler();ki(n)(e)})},l=function(t){f({universal:nt(!0),data:nt(t)})},d=function(t,n){f({universal:nt(!1),channels:nt(t),data:nt(n)})},m=function(t,n){var e=r.filter(t);return Zv(e,n)},g=function(t){return r.getById(t).fold(function(){return z.error(new Error('Could not find component with uid: "'+t+'" in system.'))},z.value)},p=function(t){var n=si(t).getOr("not found");return g(n)};return n(e),{root:nt(e),element:e.element,destroy:function(){t.unbind(),Lr(e.element())},add:a,remove:c,getByUid:g,getByDom:p,addToWorld:n,removeFromWorld:u,broadcast:l,broadcastOn:d,broadcastEvent:m}},sb=tinymce.util.Tools.resolve("tinymce.EditorManager"),fb=function(t){return et.from(t.settings.min_width).filter(U)},lb=function(t){return et.from(t.settings.min_height).filter(U)},db=function(n){var t=ut(n.settings),e=I(t,function(t){return/^toolbar([1-9])$/.test(t)}),o=F(e,function(t){return n.getParam(t,!1,"string")}),r=I(o,function(t){return"string"==typeof t});return 0<r.length?et.some(r):et.none()},mb=function(t){return db(t).fold(function(){return 0<t.getParam("toolbar",[],"string[]").length},function(){return!0})};(ub=ib||(ib={}))["default"]="",ub.floating="floating",ub.sliding="sliding";var gb,pb,hb=function(t){return t.getParam("toolbar_drawer","","string")},vb=function(t){var n=t.getParam("fixed_toolbar_container","","string"),e=t.getParam("inline",!1,"boolean");return 0<n.length&&e?du(rr(),n):et.none()},bb=function(t){return t.getParam("inline",!1,"boolean")&&vb(t).isSome()},yb=oi("form-component-change"),xb=oi("form-close"),wb=oi("form-cancel"),Sb=oi("form-action"),Cb=oi("form-submit"),kb=oi("form-block"),Ob=oi("form-unblock"),Eb=oi("form-tabchange"),Tb=oi("form-resize"),Bb=nt([Zn("prefix","form-field"),nf("fieldBehaviours",[ll,Im])]),Ab=nt([Mf({schema:[Pn("dom")],name:"label"}),Mf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Pn("text")],name:"aria-descriptor"}),Df({factory:{sketch:function(t){var n=Dt(t,["factory"]);return t.factory.sketch(n)}},schema:[Pn("factory")],name:"field"})]),Db=al({name:"FormField",configFields:Bb(),partFields:Ab(),factory:function(r,t,n,e){var o=of(r.fieldBehaviours,[ll.config({find:function(t){return Wf(t,r,"field")}}),Im.config({store:{mode:"manual",getValue:function(t){return ll.getCurrent(t).bind(Im.getValue)},setValue:function(t,n){ll.getCurrent(t).each(function(t){Im.setValue(t,n)})}}})]),i=fr([wr(function(t,n){var o=Xf(t,r,["label","field","aria-descriptor"]);o.field().each(function(e){var n=oi(r.prefix);o.label().each(function(t){Xr(t.element(),"for",n),Xr(e.element(),"id",n)}),o["aria-descriptor"]().each(function(t){var n=oi(r.prefix);Xr(t.element(),"id",n),Xr(e.element(),"aria-describedby",n)})})})]),u={getField:function(t){return Wf(t,r,"field")},getLabel:function(t){return Wf(t,r,"label")}};return{uid:r.uid,dom:r.dom,components:t,behaviours:o,events:i,apis:u}},apis:{getField:function(t,n){return t.getField(n)},getLabel:function(t,n){return t.getLabel(n)}}}),_b=/* */Object.freeze({getCoupled:function(t,n,e,o){return e.getOrCreate(t,n,o)}}),Mb=[zn("others",En(z.value,Mn()))],Fb=Xu({fields:Mb,name:"coupling",apis:_b,state:/* */Object.freeze({init:function(t){var i={},n=nt({});return xi({readState:n,getOrCreate:function(e,o,r){var t=ut(o.others);if(t)return Ft(i,r).getOrThunk(function(){var t=Ft(o.others,r).getOrDie("No information found for coupled component: "+r)(e),n=e.getSystem().build(t);return i[r]=n});throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+un(t,null,2))}})}})}),Ib=/* */Object.freeze({events:function(t,n){var e=t.stream.streams.setup(t,n);return fr([mr(t.event,e),Sr(function(){return n.cancel()})].concat(t.cancelEvent.map(function(t){return[mr(t,function(){return n.cancel()})]}).getOr([])))}}),Rb=function(t){var n=ce(null);return xi({readState:function(){return{timer:null!==n.get()?"set":"unset"}},setTimer:function(t){n.set(t)},cancel:function(){var t=n.get();null!==t&&t.cancel()}})},Vb=/* */Object.freeze({throttle:Rb,init:function(t){return t.stream.streams.state(t)}}),Nb=[zn("stream",_n("mode",{throttle:[Pn("delay"),Zn("stopEvent",!0),Vu("streams",{setup:function(t,n){var e=t.stream,o=_g(t.onStream,e.delay);return n.setTimer(o),function(t,n){o.throttle(t,n),e.stopEvent&&n.stop()}},state:Rb})]})),Zn("event","input"),Yn("cancelEvent"),Iu("onStream")],Hb=Xu({fields:Nb,name:"streaming",active:Ib,state:Vb}),Pb=function(t){var e=et.none(),n=[],o=function(t){r()?u(t):n.push(t)},r=function(){return e.isSome()},i=function(t){W(t,u)},u=function(n){e.each(function(t){H.setTimeout(function(){n(t)},0)})};return t(function(t){e=et.some(t),i(n),n=[]}),{get:o,map:function(e){return Pb(function(n){o(function(t){n(e(t))})})},isReady:r}},zb={nu:Pb,pure:function(n){return Pb(function(t){t(n)})}},Lb=function(n){var t=function(t){var o;n((o=t,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=this;H.setTimeout(function(){o.apply(e,t)},0)}))},e=function(){return zb.nu(t)};return{map:function(o){return Lb(function(e){t(function(t){var n=o(t);e(n)})})},bind:function(e){return Lb(function(n){t(function(t){e(t).get(n)})})},anonBind:function(e){return Lb(function(n){t(function(t){e.get(n)})})},toLazy:e,toCached:function(){var n=null;return Lb(function(t){null===n&&(n=e()),n.get(t)})},get:t}},jb={nu:Lb,pure:function(n){return Lb(function(t){t(n)})}},Ub=nt("sink"),Wb=nt(Mf({name:Ub(),overrides:nt({dom:{tag:"div"},behaviours:Wu([Ds.config({useFixed:!0})]),events:fr([br(co()),br(no()),br(mo())])})}));(pb=gb||(gb={}))[pb.HighlightFirst=0]="HighlightFirst",pb[pb.HighlightNone=1]="HighlightNone";var Gb=function(t,n){var e=t.getHotspot(n).getOr(n),o=t.getAnchorOverrides();return t.layouts.fold(function(){return{anchor:"hotspot",hotspot:e,overrides:o}},function(t){return{anchor:"hotspot",hotspot:e,overrides:o,layouts:t}})},Xb=function(t,n,e,o,r,i,u){var a,c,s,f,l,d,m,g,p,h,v=Gb(t,e);return(c=v,f=o,l=r,d=u,m=n,g=s=e,p=(0,(a=t).fetch)(g).map(m),h=$b(s,a),p.map(function(t){return t.bind(function(t){return et.from(bg.sketch(P({},l.menu(),{uid:fi(""),data:t,highlightImmediately:d===gb.HighlightFirst,onOpenMenu:function(t,n){var e=h().getOrDie();Ds.position(e,c,n),Ks.decloak(f)},onOpenSubmenu:function(t,n,e){var o=h().getOrDie();Ds.position(o,{anchor:"submenu",item:n},e),Ks.decloak(f)},onEscape:function(){return Pm.focus(s),Ks.close(f),et.some(!0)}})))})})).map(function(t){return t.fold(function(){Ks.isOpen(o)&&Ks.close(o)},function(t){Ks.cloak(o),Ks.open(o,t),i(o)}),o})},Yb=function(t,n,e,o,r,i,u){return Ks.close(o),jb.pure(o)},qb=function(t,n,e,o,r,i){var u=Fb.getCoupled(e,"sandbox");return(Ks.isOpen(u)?Yb:Xb)(t,n,e,u,o,r,i)},Kb=function(t,n,e){var o,r,i=ll.getCurrent(n).getOr(n),u=ca(t.element());e?Wi(i.element(),"min-width",u+"px"):(o=i.element(),r=u,aa.set(o,r))},$b=function(n,t){return n.getSystem().getByUid(t.uid+"-"+Ub()).map(function(t){return function(){return z.value(t)}}).getOrThunk(function(){return t.lazySink.fold(function(){return function(){return z.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(t){return function(){return t(n)}})})},Jb=function(o,r,i){var u=gu(),t=$b(r,o);return{dom:{tag:"div",classes:o.sandboxClasses,attributes:{id:u.id(),role:"listbox"}},behaviours:uf(o.sandboxBehaviours,[Im.config({store:{mode:"memory",initialValue:r}}),Ks.config({onOpen:function(t,n){var e=Gb(o,r);u.link(r.element()),o.matchWidth&&Kb(e.hotspot,n,o.useMinWidth),o.onOpen(e,t,n),i!==undefined&&i.onOpen!==undefined&&i.onOpen(t,n)},onClose:function(t,n){u.unlink(r.element()),i!==undefined&&i.onClose!==undefined&&i.onClose(t,n)},isPartOf:function(t,n,e){return hu(n,e)||hu(r,e)},getAttachPoint:function(){return t().getOrDie()}}),ll.config({find:function(t){return Ks.getState(t).bind(function(t){return ll.getCurrent(t)})}}),Zs({isExtraPart:nt(!1)})])}},Qb=function(t,n,e){var o=Im.getValue(e);Im.setValue(n,o),ty(n)},Zb=function(t,n){var e=t.element(),o=Qi(e),r=e.dom();"number"!==qr(e,"type")&&n(r,o)},ty=function(t){Zb(t,function(t,n){return t.setSelectionRange(n.length,n.length)})},ny=function(t,n,o){if(t.selectsOver){var e=Im.getValue(n),r=t.getDisplayText(e),i=Im.getValue(o);return 0===t.getDisplayText(i).indexOf(r)?et.some(function(){var t,e;Qb(0,n,o),t=n,e=r.length,Zb(t,function(t,n){return t.setSelectionRange(e,n.length)})}):et.none()}return et.none()},ey=nt([Yn("data"),Zn("inputAttributes",{}),Zn("inputStyles",{}),Zn("tag","input"),Zn("inputClasses",[]),Mu("onSetValue"),Zn("styles",{}),Zn("eventOrder",{}),nf("inputBehaviours",[Im,Pm]),Zn("selectOnFocus",!0)]),oy=function(t){return Wu([Pm.config({onFocus:!1===t.selectOnFocus?tt:function(t){var n=t.element(),e=Qi(n);n.dom().setSelectionRange(0,e.length)}})])},ry=function(t){return{tag:t.tag,attributes:P({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},iy=nt("alloy.typeahead.itemexecute"),uy=function(){return[Zn("sandboxClasses",[]),rf("sandboxBehaviours",[ll,Qu,Ks,Im])]},ay=nt([Yn("lazySink"),Pn("fetch"),Zn("minChars",5),Zn("responseTime",1e3),Mu("onOpen"),Zn("getHotspot",et.some),Zn("getAnchorOverrides",nt({})),Zn("layouts",et.none()),Zn("eventOrder",{}),ue("model",{},[Zn("getDisplayText",function(t){return t.meta!==undefined&&t.meta.text!==undefined?t.meta.text:t.value}),Zn("selectsOver",!0),Zn("populateFromBrowse",!0)]),Mu("onSetValue"),Fu("onExecute"),Mu("onItemExecute"),Zn("inputClasses",[]),Zn("inputAttributes",{}),Zn("inputStyles",{}),Zn("matchWidth",!0),Zn("useMinWidth",!1),Zn("dismissOnBlur",!0),Du(["openClass"]),Yn("initialData"),nf("typeaheadBehaviours",[Pm,Im,Hb,hm,Jm,Fb]),ae("previewing",function(){return ce(!0)})].concat(ey()).concat(uy())),cy=nt([_f({schema:[Au()],name:"menu",overrides:function(o){return{fakeFocus:!0,onHighlight:function(n,e){o.previewing.get()?n.getSystem().getByUid(o.uid).each(function(t){ny(o.model,t,e).fold(function(){return kl.dehighlight(n,e)},function(t){return t()})}):n.getSystem().getByUid(o.uid).each(function(t){o.model.populateFromBrowse&&Qb(o.model,t,e)}),o.previewing.set(!1)},onExecute:function(t,n){return t.getSystem().getByUid(o.uid).toOption().map(function(t){return Lo(t,iy(),{item:n}),!0})},onHover:function(t,n){o.previewing.set(!1),t.getSystem().getByUid(o.uid).each(function(t){o.model.populateFromBrowse&&Qb(o.model,t,n)})}}}})]),sy=al({name:"Typeahead",configFields:ay(),partFields:cy(),factory:function(r,t,n,i){var e=function(t,n,e){r.previewing.set(!1);var o=Fb.getCoupled(t,"sandbox");Ks.isOpen(o)?ll.getCurrent(o).each(function(t){kl.getHighlighted(t).fold(function(){e(t)},function(){Go(o,t.element(),"keydown",n)})}):Xb(r,u(t),t,o,i,function(t){ll.getCurrent(t).each(e)},gb.HighlightFirst).get(tt)},o=oy(r),u=function(o){return function(t){return t.map(function(t){var n=dt(t.menus),e=K(n,function(t){return I(t.items,function(t){return"item"===t.type})});return Im.getState(o).update(F(e,function(t){return t.data})),t})}},a=[Pm.config({}),Im.config({onSetValue:r.onSetValue,store:P({mode:"dataset",getDataKey:function(t){return Qi(t.element())},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(t,n){Zi(t.element(),r.model.getDisplayText(n))}},r.initialData.map(function(t){return It("initialValue",t)}).getOr({}))}),Hb.config({stream:{mode:"throttle",delay:r.responseTime,stopEvent:!1},onStream:function(t,n){var e=Fb.getCoupled(t,"sandbox");if(Pm.isFocused(t)&&Qi(t.element()).length>=r.minChars){var o=ll.getCurrent(e).bind(function(t){return kl.getHighlighted(t).map(Im.getValue)});r.previewing.set(!0),Xb(r,u(t),t,e,i,function(t){ll.getCurrent(e).each(function(t){o.fold(function(){r.model.selectsOver&&kl.highlightFirst(t)},function(n){kl.highlightBy(t,function(t){return Im.getValue(t).value===n.value}),kl.getHighlighted(t).orThunk(function(){return kl.highlightFirst(t),et.none()})})})},gb.HighlightFirst).get(tt)}},cancelEvent:To()}),hm.config({mode:"special",onDown:function(t,n){return e(t,n,kl.highlightFirst),et.some(!0)},onEscape:function(t){var n=Fb.getCoupled(t,"sandbox");return Ks.isOpen(n)?(Ks.close(n),et.some(!0)):et.none()},onUp:function(t,n){return e(t,n,kl.highlightLast),et.some(!0)},onEnter:function(n){var t=Fb.getCoupled(n,"sandbox"),e=Ks.isOpen(t);if(e&&!r.previewing.get())return ll.getCurrent(t).bind(function(t){return kl.getHighlighted(t)}).map(function(t){return Lo(n,iy(),{item:t}),!0});var o=Im.getValue(n);return zo(n,To()),r.onExecute(t,n,o),e&&Ks.close(t),et.some(!0)}}),Jm.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),Fb.config({others:{sandbox:function(t){return Jb(r,t,{onOpen:function(){return Jm.on(t)},onClose:function(){return Jm.off(t)}})}}}),rg("typeaheadevents",[kr(function(t){var n=tt;qb(r,u(t),t,i,n,gb.HighlightFirst).get(tt)}),mr(iy(),function(t,n){var e=Fb.getCoupled(t,"sandbox");Qb(r.model,t,n.event().item()),zo(t,To()),r.onItemExecute(t,e,n.event().item(),Im.getValue(t)),Ks.close(e),ty(t)})].concat(r.dismissOnBlur?[mr(bo(),function(t){var n=Fb.getCoupled(t,"sandbox");Nl(n.element()).isNone()&&Ks.close(n)})]:[]))];return{uid:r.uid,dom:ry(bt(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:P({},o,of(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),fy=function(t,n,e){var o=dy(t,n,e);return Db.sketch(o)},ly=function(t,n){return fy(t,n,[])},dy=function(t,n,e){return{dom:my(e),components:t.toArray().concat([n])}},my=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},gy=function(t,n){return Db.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}})},py=function(t){return"separator"===t.type},hy={type:"separator"},vy=function(t,e){var n=V(t,function(t,n){return L(n)?""===n?t:"|"===n?0<t.length&&!py(t[t.length-1])?t.concat([hy]):t:gt(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])},[]);return 0<n.length&&py(n[n.length-1])&&n.pop(),n},by=function(t,n){return gt(t,"getSubmenuItems")?(o=n,r=(e=t).getSubmenuItems(),i=yy(r,o),{item:e,menus:bt(i.menus,It(e.value,i.items)),expansions:bt(i.expansions,It(e.value,e.value))}):{item:t,menus:{},expansions:{}};var e,o,r,i},yy=function(t,r){var n=vy(L(t)?t.split(" "):t,r);return R(n,function(t,n){var e=function(t){if(py(t))return t;var n=Ft(t,"value").getOrThunk(function(){return oi("generated-menu-item")});return bt({value:n},t)}(n),o=by(e,r);return{menus:bt(t.menus,o.menus),items:[o.item].concat(t.items),expansions:bt(t.expansions,o.expansions)}},{menus:{},expansions:{},items:[]})},xy=function(t,e,o){var n=oi("primary-menu"),r=yy(t,o.shared.providers.menuItems());if(0===r.items.length)return et.none();var i=Fv(n,r.items,e,o),u=st(r.menus,function(t,n){return Fv(n,t,e,o)}),a=bt(u,It(n,i));return et.from(bg.tieredData(n,a,r.expansions))},wy=ul({name:"Input",configFields:ey(),factory:function(t,n){return{uid:t.uid,dom:ry(t),components:[],behaviours:(e=t,P({},oy(e),of(e.inputBehaviours,[Im.config({store:{mode:"manual",initialValue:e.data.getOr(undefined),getValue:function(t){return Qi(t.element())},setValue:function(t,n){Qi(t.element())!==n&&Zi(t.element(),n)}},onSetValue:e.onSetValue})]))),eventOrder:t.eventOrder};var e}}),Sy=["input","textarea"],Cy=function(t){var n=Qo(t);return D(Sy,n)},ky=function(t,n){var e=n.getRoot(t).getOr(t.element());Ni(e,n.invalidClass),n.notify.each(function(n){Cy(t.element())&&Xr(t.element(),"aria-invalid",!1),n.getContainer(t).each(function(t){Wr(t,n.validHtml)}),n.onValid(t)})},Oy=function(n,t,e,o){var r=t.getRoot(n).getOr(n.element());Ri(r,t.invalidClass),t.notify.each(function(t){Cy(n.element())&&Xr(n.element(),"aria-invalid",!0),t.getContainer(n).each(function(t){Wr(t,o)}),t.onInvalid(n,o)})},Ey=function(n,t,e){return t.validator.fold(function(){return jb.pure(z.value(!0))},function(t){return t.validate(n)})},Ty=function(n,e,t){return e.notify.each(function(t){t.onValidate(n)}),Ey(n,e).map(function(t){return n.getSystem().isConnected()?t.fold(function(t){return Oy(n,e,0,t),z.error(t)},function(t){return ky(n,e),z.value(t)}):z.error("No longer in system")})},By=/* */Object.freeze({markValid:ky,markInvalid:Oy,query:Ey,run:Ty,isInvalid:function(t,n){var e=n.getRoot(t).getOr(t.element());return Hi(e,n.invalidClass)}}),Ay=/* */Object.freeze({events:function(n,t){return n.validator.map(function(t){return fr([mr(t.onEvent,function(t){Ty(t,n).get(d)})].concat(t.validateOnLoad?[wr(function(t){Ty(t,n).get(tt)})]:[]))}).getOr({})}}),Dy=[Pn("invalidClass"),Zn("getRoot",et.none),Qn("notify",[Zn("aria","alert"),Zn("getContainer",et.none),Zn("validHtml",""),Mu("onValid"),Mu("onInvalid"),Mu("onValidate")]),Qn("validator",[Pn("validate"),Zn("onEvent","input"),Zn("validateOnLoad",!0)])],_y=Xu({fields:Dy,name:"invalidating",active:Ay,apis:By,extra:{validation:function(e){return function(t){var n=Im.getValue(t);return jb.pure(e(n))}}}}),My=/* */Object.freeze({exhibit:function(t,n){return Si({attributes:Rt([{key:n.tabAttr,value:"true"}])})}}),Fy=[Zn("tabAttr","data-alloy-tabstop")],Iy=Xu({fields:Fy,name:"tabstopping",active:My}),Ry=nt([Pn("dom"),Pn("fetch"),Mu("onOpen"),Fu("onExecute"),Zn("getHotspot",et.some),Zn("getAnchorOverrides",nt({})),Zn("layouts",et.none()),nf("dropdownBehaviours",[Jm,Fb,hm,Pm]),Pn("toggleClass"),Zn("eventOrder",{}),Yn("lazySink"),Zn("matchWidth",!1),Zn("useMinWidth",!1),Yn("role")].concat(uy())),Vy=nt([_f({schema:[Au()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),Wb()]),Ny=al({name:"Dropdown",configFields:Ry(),partFields:Vy(),factory:function(n,t,e,o){var r,i,u=function(t){Ks.getState(t).each(function(t){bg.highlightPrimary(t)})},a={expand:function(t){Jm.isOn(t)||qb(n,function(t){return t},t,o,tt,gb.HighlightNone).get(tt)},open:function(t){Jm.isOn(t)||qb(n,function(t){return t},t,o,tt,gb.HighlightFirst).get(tt)},isOpen:Jm.isOn,close:function(t){Jm.isOn(t)&&qb(n,function(t){return t},t,o,tt,gb.HighlightFirst).get(tt)}},c=function(t,n){return jo(t),et.some(!0)};return{uid:n.uid,dom:n.dom,components:t,behaviours:of(n.dropdownBehaviours,[Jm.config({toggleClass:n.toggleClass,aria:{mode:"expanded"}}),Fb.config({others:{sandbox:function(t){return Jb(n,t,{onOpen:function(){Jm.on(t)},onClose:function(){Jm.off(t)}})}}}),hm.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t,n){if(Ny.isOpen(t)){var e=Fb.getCoupled(t,"sandbox");u(e)}else Ny.open(t);return et.some(!0)},onEscape:function(t,n){return Ny.isOpen(t)?(Ny.close(t),et.some(!0)):et.none()}}),Pm.config({})]),events:xg(et.some(function(t){qb(n,function(t){return t},t,o,u,gb.HighlightFirst).get(tt)})),eventOrder:P({},n.eventOrder,(r={},r[wo()]=["disabling","toggling","alloy.base.behaviour"],r)),apis:a,domModification:{attributes:P({"aria-haspopup":"true"},n.role.fold(function(){return{}},function(t){return{role:t}}),"button"===n.dom.tag?{type:(i="type",Ft(n.dom,"attributes").bind(function(t){return Ft(t,i)})).getOr("button")}:{})}}},apis:{open:function(t,n){return t.open(n)},expand:function(t,n){return t.expand(n)},close:function(t,n){return t.close(n)},isOpen:function(t,n){return t.isOpen(n)}}}),Hy=Xu({fields:[],name:"unselecting",active:/* */Object.freeze({events:function(t){return fr([lr(po(),nt(!0))])},exhibit:function(t,n){return Si({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}})}),Py=oi("color-input-change"),zy=oi("color-swatch-change"),Ly=oi("color-picker-cancel"),jy=function(t,n,o){var e,r,i=Db.parts().field({factory:wy,inputClasses:["tox-textfield"],onSetValue:function(t){return _y.run(t).get(function(){})},inputBehaviours:Wu([Iy.config({}),_y.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return _r(t.element())},notify:{onValid:function(t){var n=Im.getValue(t);Lo(t,Py,{color:n})}},validator:{validateOnLoad:!1,validate:function(t){var n=Im.getValue(t);if(0===n.length)return jb.pure(z.value(!0));var e=fe.fromTag("span");Wi(e,"background-color",n);var o=qi(e,"background-color").fold(function(){return z.error("blah")},function(t){return z.value(n)});return jb.pure(o)}}})]),selectOnFocus:!1}),u=t.label.map(function(t){return gy(t,n.providers)}),a=function(t,n){Lo(t,zy,{value:n})},c=Sg((e={dom:{tag:"span",attributes:{"aria-label":n.providers.translate("Color swatch")}},layouts:et.some({onRtl:function(){return[rc]},onLtr:function(){return[ic]}}),components:[],fetch:av.getFetch(o.getColors(),o.hasCustomColors()),columns:o.getColorCols(),presets:"color",onItemAction:function(t,e){c.getOpt(t).each(function(n){"custom"===e?o.colorPicker(function(t){t.fold(function(){return zo(n,Ly)},function(t){a(n,t),Xh(t)})},"#ffffff"):a(n,"remove"===e?"":e)})}},r=n,Ny.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:Wu([Hy.config({}),Iy.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:r.getSink,fetch:function(n){return jb.nu(function(t){return e.fetch(t)}).map(function(t){return et.from(Iv(bt(vv(oi("menu-value"),t,function(t){e.onItemAction(n,t)},e.columns,e.presets,ih.CLOSE_ON_EXECUTE,function(){return!1},r.providers),{movement:yv(e.columns,e.presets)})))})},parts:{menu:mv(0,0,e.presets)}})));return Db.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:u.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[i,c.asSpec()]}]),fieldBehaviours:Wu([rg("form-field-events",[mr(Py,function(t,n){c.getOpt(t).each(function(t){Wi(t.element(),"background-color",n.event().color())})}),mr(zy,function(n,e){Db.getField(n).each(function(t){Im.setValue(t,e.event().value()),ll.getCurrent(n).each(Pm.focus)})}),mr(Ly,function(n,t){Db.getField(n).each(function(t){ll.getCurrent(n).each(Pm.focus)})})])])})},Uy=function(t,n,e){return{hue:nt(t),saturation:nt(n),value:nt(e)}},Wy=nt(oi("rgb-hex-update")),Gy=nt(oi("slider-update")),Xy=nt(oi("palette-update")),Yy=Pe.detect().deviceType.isTouch(),qy=Mf({schema:[Pn("dom")],name:"label"}),Ky=function(t){return Mf({name:t+"-edge",overrides:function(o){return o.model.manager.edgeActions[t].fold(function(){return{}},function(e){var t=fr([gr(Qe(),e,[o])]),n=fr([gr(no(),e,[o]),gr(eo(),function(t,n){n.mouseIsDown.get()&&e(t,n)},[o])]);return{events:Yy?t:n}})}})},$y=Ky("top-left"),Jy=Ky("top"),Qy=Ky("top-right"),Zy=Ky("right"),tx=Ky("bottom-right"),nx=Ky("bottom"),ex=Ky("bottom-left"),ox=[qy,Ky("left"),Zy,Jy,nx,$y,Qy,ex,tx,Df({name:"thumb",defaults:nt({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:fr([hr(Qe(),t,"spectrum"),hr(Ze(),t,"spectrum"),hr(to(),t,"spectrum"),hr(no(),t,"spectrum"),hr(eo(),t,"spectrum"),hr(ro(),t,"spectrum")])}}}),Df({schema:[ae("mouseIsDown",function(){return ce(!1)})],name:"spectrum",overrides:function(e){var o=e.model.manager,r=function(n,t){return o.getValueFromEvent(t).map(function(t){return o.setValueFrom(n,e,t)})},t=fr([mr(Qe(),r),mr(Ze(),r)]),n=fr([mr(no(),r),mr(eo(),function(t,n){e.mouseIsDown.get()&&r(t,n)})]);return{behaviours:Wu(Yy?[]:[hm.config({mode:"special",onLeft:function(t){return o.onLeft(t,e)},onRight:function(t){return o.onRight(t,e)},onUp:function(t){return o.onUp(t,e)},onDown:function(t){return o.onDown(t,e)}}),Pm.config({})]),events:Yy?t:n}}})],rx=Pe.detect().deviceType.isTouch(),ix=nt("slider.change.value"),ux=function(t){var n=t.event().raw();if(rx){var e=n;return e.touches!==undefined&&1===e.touches.length?et.some(e.touches[0]).map(function(t){return na(t.clientX,t.clientY)}):et.none()}var o=n;return o.clientX!==undefined?et.some(o).map(function(t){return na(t.clientX,t.clientY)}):et.none()},ax=function(t,n,e,o){return t<n?t:e<t?e:t===n?n-1:Math.max(n,t-o)},cx=function(t,n,e,o){return e<t?t:t<n?n:t===e?e+1:Math.min(e,t+o)},sx=function(t,n,e){return Math.max(n,Math.min(e,t))},fx=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.step,u=t.snap,a=t.snapStart,c=t.rounded,s=t.hasMinEdge,f=t.hasMaxEdge,l=t.minBound,d=t.maxBound,m=t.screenRange,g=s?n-1:n,p=f?e+1:e;if(r<l)return g;if(d<r)return p;var h,v,b,y,x,w,S,C=(x=r,w=l,S=d,Math.min(S,Math.max(x,w))-w),k=sx(C/m*o+n,g,p);return u&&n<=k&&k<=e?(h=k,v=n,b=e,y=i,a.fold(function(){var t=h-v,n=Math.round(t/y)*y;return sx(v+n,v-1,b+1)},function(t){var n=(h-t)%y,e=Math.round(n/y),o=Math.floor((h-t)/y),r=Math.floor((b-t)/y),i=t+Math.min(r,o+e)*y;return Math.max(t,i)})):c?Math.round(k):k},lx=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.hasMinEdge,u=t.hasMaxEdge,a=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,f=t.centerMaxEdge;return r<n?i?0:s:e<r?u?a:f:(r-n)/o*c},dx=function(t){return t.model.minX},mx=function(t){return t.model.minY},gx=function(t){return t.model.minX-1},px=function(t){return t.model.minY-1},hx=function(t){return t.model.maxX},vx=function(t){return t.model.maxY},bx=function(t){return t.model.maxX+1},yx=function(t){return t.model.maxY+1},xx=function(t,n,e){return n(t)-e(t)},wx=function(t){return xx(t,hx,dx)},Sx=function(t){return xx(t,vx,mx)},Cx=function(t){return wx(t)/2},kx=function(t){return Sx(t)/2},Ox=function(t){return t.stepSize},Ex=function(t){return t.snapToGrid},Tx=function(t){return t.snapStart},Bx=function(t){return t.rounded},Ax=function(t,n){return t[n+"-edge"]!==undefined},Dx=function(t){return Ax(t,"left")},_x=function(t){return Ax(t,"right")},Mx=function(t){return Ax(t,"top")},Fx=function(t){return Ax(t,"bottom")},Ix=function(t){return t.model.value.get()},Rx=function(t){return{x:nt(t)}},Vx=function(t){return{y:nt(t)}},Nx=function(t,n){return{x:nt(t),y:nt(n)}},Hx=function(t,n){Lo(t,ix(),{value:n})},Px="left",zx=function(t){return t.element().dom().getBoundingClientRect()},Lx=function(t,n){return t[n]},jx=function(t){var n=zx(t);return Lx(n,Px)},Ux=function(t){var n=zx(t);return Lx(n,"right")},Wx=function(t){var n=zx(t);return Lx(n,"top")},Gx=function(t){var n=zx(t);return Lx(n,"bottom")},Xx=function(t){var n=zx(t);return Lx(n,"width")},Yx=function(t){var n=zx(t);return Lx(n,"height")},qx=function(t,n,e){return(t+n)/2-e},Kx=function(t,n){var e=zx(t),o=zx(n),r=Lx(e,Px),i=Lx(e,"right"),u=Lx(o,Px);return qx(r,i,u)},$x=function(t,n){var e=zx(t),o=zx(n),r=Lx(e,"top"),i=Lx(e,"bottom"),u=Lx(o,"top");return qx(r,i,u)},Jx=function(t,n){Lo(t,ix(),{value:n})},Qx=function(t){return{x:nt(t)}},Zx=function(t,n,e){var o={min:dx(n),max:hx(n),range:wx(n),value:e,step:Ox(n),snap:Ex(n),snapStart:Tx(n),rounded:Bx(n),hasMinEdge:Dx(n),hasMaxEdge:_x(n),minBound:jx(t),maxBound:Ux(t),screenRange:Xx(t)};return fx(o)},tw=function(u){return function(t,n){return(e=u,o=t,r=n,i=(0<e?cx:ax)(Ix(r).x(),dx(r),hx(r),Ox(r)),Jx(o,Qx(i)),et.some(i)).map(function(){return!0});var e,o,r,i}},nw=function(t,n,e,o,r,i){var u,a,c,s,f,l,d,m,g,p=(a=i,c=e,s=o,f=r,l=Xx(u=n),d=s.bind(function(t){return et.some(Kx(t,u))}).getOr(0),m=f.bind(function(t){return et.some(Kx(t,u))}).getOr(l),g={min:dx(a),max:hx(a),range:wx(a),value:c,hasMinEdge:Dx(a),hasMaxEdge:_x(a),minBound:jx(u),minOffset:0,maxBound:Ux(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},lx(g));return jx(n)-jx(t)+p},ew=tw(-1),ow=tw(1),rw=et.none,iw=et.none,uw={"top-left":et.none(),top:et.none(),"top-right":et.none(),right:et.some(function(t,n){Hx(t,Rx(bx(n)))}),"bottom-right":et.none(),bottom:et.none(),"bottom-left":et.none(),left:et.some(function(t,n){Hx(t,Rx(gx(n)))})},aw=/* */Object.freeze({setValueFrom:function(t,n,e){var o=Zx(t,n,e),r=Qx(o);return Jx(t,r),o},setToMin:function(t,n){var e=dx(n);Jx(t,Qx(e))},setToMax:function(t,n){var e=hx(n);Jx(t,Qx(e))},findValueOfOffset:Zx,getValueFromEvent:function(t){return ux(t).map(function(t){return t.left()})},findPositionOfValue:nw,setPositionFromValue:function(t,n,e,o){var r=Ix(e),i=nw(t,o.getSpectrum(t),r.x(),o.getLeftEdge(t),o.getRightEdge(t),e),u=ca(n.element())/2;Wi(n.element(),"left",i-u+"px")},onLeft:ew,onRight:ow,onUp:rw,onDown:iw,edgeActions:uw}),cw=function(t,n){Lo(t,ix(),{value:n})},sw=function(t){return{y:nt(t)}},fw=function(t,n,e){var o={min:mx(n),max:vx(n),range:Sx(n),value:e,step:Ox(n),snap:Ex(n),snapStart:Tx(n),rounded:Bx(n),hasMinEdge:Mx(n),hasMaxEdge:Fx(n),minBound:Wx(t),maxBound:Gx(t),screenRange:Yx(t)};return fx(o)},lw=function(u){return function(t,n){return(e=u,o=t,r=n,i=(0<e?cx:ax)(Ix(r).y(),mx(r),vx(r),Ox(r)),cw(o,sw(i)),et.some(i)).map(function(){return!0});var e,o,r,i}},dw=function(t,n,e,o,r,i){var u,a,c,s,f,l,d,m,g,p=(a=i,c=e,s=o,f=r,l=Yx(u=n),d=s.bind(function(t){return et.some($x(t,u))}).getOr(0),m=f.bind(function(t){return et.some($x(t,u))}).getOr(l),g={min:mx(a),max:vx(a),range:Sx(a),value:c,hasMinEdge:Mx(a),hasMaxEdge:Fx(a),minBound:Wx(u),minOffset:0,maxBound:Gx(u),maxOffset:l,centerMinEdge:d,centerMaxEdge:m},lx(g));return Wx(n)-Wx(t)+p},mw=et.none,gw=et.none,pw=lw(-1),hw=lw(1),vw={"top-left":et.none(),top:et.some(function(t,n){Hx(t,Vx(px(n)))}),"top-right":et.none(),right:et.none(),"bottom-right":et.none(),bottom:et.some(function(t,n){Hx(t,Vx(yx(n)))}),"bottom-left":et.none(),left:et.none()},bw=/* */Object.freeze({setValueFrom:function(t,n,e){var o=fw(t,n,e),r=sw(o);return cw(t,r),o},setToMin:function(t,n){var e=mx(n);cw(t,sw(e))},setToMax:function(t,n){var e=vx(n);cw(t,sw(e))},findValueOfOffset:fw,getValueFromEvent:function(t){return ux(t).map(function(t){return t.top()})},findPositionOfValue:dw,setPositionFromValue:function(t,n,e,o){var r=Ix(e),i=dw(t,o.getSpectrum(t),r.y(),o.getTopEdge(t),o.getBottomEdge(t),e),u=la(n.element())/2;Wi(n.element(),"top",i-u+"px")},onLeft:mw,onRight:gw,onUp:pw,onDown:hw,edgeActions:vw}),yw=function(t,n){Lo(t,ix(),{value:n})},xw=function(t,n){return{x:nt(t),y:nt(n)}},ww=function(s,f){return function(t,n){return(e=s,o=f,r=t,i=n,u=0<e?cx:ax,a=o?Ix(i).x():u(Ix(i).x(),dx(i),hx(i),Ox(i)),c=o?u(Ix(i).y(),mx(i),vx(i),Ox(i)):Ix(i).y(),yw(r,xw(a,c)),et.some(a)).map(function(){return!0});var e,o,r,i,u,a,c}},Sw=ww(-1,!1),Cw=ww(1,!1),kw=ww(-1,!0),Ow=ww(1,!0),Ew={"top-left":et.some(function(t,n){Hx(t,Nx(gx(n),px(n)))}),top:et.some(function(t,n){Hx(t,Nx(Cx(n),px(n)))}),"top-right":et.some(function(t,n){Hx(t,Nx(bx(n),px(n)))}),right:et.some(function(t,n){Hx(t,Nx(bx(n),kx(n)))}),"bottom-right":et.some(function(t,n){Hx(t,Nx(bx(n),yx(n)))}),bottom:et.some(function(t,n){Hx(t,Nx(Cx(n),yx(n)))}),"bottom-left":et.some(function(t,n){Hx(t,Nx(gx(n),yx(n)))}),left:et.some(function(t,n){Hx(t,Nx(gx(n),kx(n)))})},Tw=/* */Object.freeze({setValueFrom:function(t,n,e){var o=Zx(t,n,e.left()),r=fw(t,n,e.top()),i=xw(o,r);return yw(t,i),i},setToMin:function(t,n){var e=dx(n),o=mx(n);yw(t,xw(e,o))},setToMax:function(t,n){var e=hx(n),o=vx(n);yw(t,xw(e,o))},getValueFromEvent:function(t){return ux(t)},setPositionFromValue:function(t,n,e,o){var r=Ix(e),i=nw(t,o.getSpectrum(t),r.x(),o.getLeftEdge(t),o.getRightEdge(t),e),u=dw(t,o.getSpectrum(t),r.y(),o.getTopEdge(t),o.getBottomEdge(t),e),a=ca(n.element())/2,c=la(n.element())/2;Wi(n.element(),"left",i-a+"px"),Wi(n.element(),"top",u-c+"px")},onLeft:Sw,onRight:Cw,onUp:kw,onDown:Ow,edgeActions:Ew}),Bw=Pe.detect().deviceType.isTouch(),Aw=[Zn("stepSize",1),Zn("onChange",tt),Zn("onChoose",tt),Zn("onInit",tt),Zn("onDragStart",tt),Zn("onDragEnd",tt),Zn("snapToGrid",!1),Zn("rounded",!0),Yn("snapStart"),zn("model",_n("mode",{x:[Zn("minX",0),Zn("maxX",100),ae("value",function(t){return ce(t.mode.minX)}),Pn("getInitialValue"),Vu("manager",aw)],y:[Zn("minY",0),Zn("maxY",100),ae("value",function(t){return ce(t.mode.minY)}),Pn("getInitialValue"),Vu("manager",bw)],xy:[Zn("minX",0),Zn("maxX",100),Zn("minY",0),Zn("maxY",100),ae("value",function(t){return ce({x:nt(t.mode.minX),y:nt(t.mode.minY)})}),Pn("getInitialValue"),Vu("manager",Tw)]})),nf("sliderBehaviours",[hm,Im])].concat(Bw?[]:[ae("mouseIsDown",function(){return ce(!1)})]),Dw=Pe.detect().deviceType.isTouch(),_w=al({name:"Slider",configFields:Aw,partFields:ox,factory:function(i,t,n,e){var u=function(t){return Gf(t,i,"thumb")},a=function(t){return Gf(t,i,"spectrum")},o=function(t){return Wf(t,i,"left-edge")},r=function(t){return Wf(t,i,"right-edge")},c=function(t){return Wf(t,i,"top-edge")},s=function(t){return Wf(t,i,"bottom-edge")},f=i.model,l=f.manager,d=function(t,n){l.setPositionFromValue(t,n,i,{getLeftEdge:o,getRightEdge:r,getTopEdge:c,getBottomEdge:s,getSpectrum:a})},m=function(t,n){f.value.set(n);var e=u(t);return d(t,e),i.onChange(t,e,n),et.some(!0)},g=[mr(Qe(),function(t,n){i.onDragStart(t,u(t))}),mr(to(),function(t,n){i.onDragEnd(t,u(t))})],p=[mr(no(),function(t,n){n.stop(),i.onDragStart(t,u(t)),i.mouseIsDown.set(!0)}),mr(ro(),function(t,n){i.onDragEnd(t,u(t))})],h=Dw?g:p;return{uid:i.uid,dom:i.dom,components:t,behaviours:of(i.sliderBehaviours,q([Dw?[]:[hm.config({mode:"special",focusIn:function(t){return Wf(t,i,"spectrum").map(hm.focusIn).map(nt(!0))}})],[Im.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),Qu.config({channels:{"mouse.released":{onReceive:function(e,t){var n=i.mouseIsDown.get();i.mouseIsDown.set(!1),n&&Wf(e,i,"thumb").each(function(t){var n=f.value.get();i.onChoose(e,t,n)})}}}})]])),events:fr([mr(ix(),function(t,n){m(t,n.event().value())}),wr(function(t,n){var e=f.getInitialValue();f.value.set(e);var o=u(t);d(t,o);var r=a(t);i.onInit(t,o,r,f.value.get())})].concat(h)),apis:{resetToMin:function(t){l.setToMin(t,i)},resetToMax:function(t){l.setToMax(t,i)},changeValue:m,refresh:d},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(t,n){t.resetToMin(n)},resetToMax:function(t,n){t.resetToMax(n)},refresh:function(t,n){t.refresh(n)}}}),Mw=function(t,n){var e=_w.parts().spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=_w.parts().thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}});return _w.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:nt({y:nt(0)})},components:[e,o],sliderBehaviours:Wu([Pm.config({})]),onChange:function(t,n,e){Lo(t,Gy(),{value:e})}})},Fw=[nf("formBehaviours",[Im])],Iw=function(t){return"<alloy.field."+t+">"},Rw=function(o,t,n){return{uid:o.uid,dom:o.dom,components:t,behaviours:of(o.formBehaviours,[Im.config({store:{mode:"manual",getValue:function(t){var n=Yf(t,o);return st(n,function(t,n){return t().bind(function(t){var n,e=ll.getCurrent(t);return n="missing current",e.fold(function(){return z.error(n)},z.value)}).map(Im.getValue)})},setValue:function(e,t){ct(t,function(n,t){Wf(e,o,t).each(function(t){ll.getCurrent(t).each(function(t){Im.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return Wf(t,o,n).bind(ll.getCurrent)}}}},Vw={getField:bi(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),Pf("form",Iw(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=F(r,function(t){return Df({name:t,pname:Iw(t)})});return tl("form",Fw,i,Rw,o)}},Nw=oi("valid-input"),Hw=oi("invalid-input"),Pw=oi("validating-input"),zw="colorcustom.rgb.",Lw=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(zw+"range"),c=[Db.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),Db.parts().field({data:r,factory:wy,inputAttributes:P({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:Wu([(i=n,u=t,_y.config({invalidClass:m("invalid"),notify:{onValidate:function(t){Lo(t,Pw,{type:i})},onValid:function(t){Lo(t,Nw,{type:i,value:Im.getValue(t)})},onInvalid:function(t){Lo(t,Hw,{type:i,value:Im.getValue(t)})}},validator:{validate:function(t){var n=Im.getValue(t),e=u(n)?z.value(!0):z.error(d("aria.input.invalid"));return jb.pure(e)},validateOnLoad:!1}})),Iy.config({})]),onSetValue:function(t){_y.isInvalid(t)&&_y.run(t).get(tt)}})],s="hex"!==n?[Db.parts()["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}},v=function(t,n){var e=n.red(),o=n.green(),r=n.blue();Im.setValue(t,{red:e,green:o,blue:r})},b=Sg({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){Wi(t.element(),"background-color","#"+n.value())})};return ul({factory:function(){var e={red:nt(ce(et.some(255))),green:nt(ce(et.some(255))),blue:nt(ce(et.some(255))),hex:nt(ce(et.some("ffffff")))},o=function(t){return e[t]().get()},i=function(t,n){e[t]().set(n)},r=function(t){var n=t.red(),e=t.green(),o=t.blue();i("red",et.some(n)),i("green",et.some(e)),i("blue",et.some(o))},n=function(t,n){var e=n.event();"hex"!==e.type()?i(e.type(),et.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,et.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return Bh(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=Sh(t),Vw.getField(n,"hex").each(function(t){Pm.isFocused(t)||Im.setValue(n,{hex:e.value()})}),e);y(r,o)})},a=function(t,n){var e=n.event();"hex"===e.type()?function(t,n){g(t);var e=hh(n);i("hex",et.some(n));var o=_h(e);v(t,o),r(o),Lo(t,Wy(),{hex:e}),y(t,e)}(t,e.value()):u(t,e.type(),e.value())},t=function(t){return{label:d(zw+t+".label"),description:d(zw+t+".description")}},c=t("red"),s=t("green"),f=t("blue"),l=t("hex");return bt(Vw.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",Db.sketch(h(Ah,"red",c.label,c.description,255))),t.field("green",Db.sketch(h(Ah,"green",s.label,s.description,255))),t.field("blue",Db.sketch(h(Ah,"blue",f.label,f.description,255))),t.field("hex",Db.sketch(h(yh,"hex",l.label,l.description,"ffffff"))),b.asSpec()],formBehaviours:Wu([_y.config({invalidClass:m("form-invalid")}),rg("rgb-form-events",[mr(Nw,a),mr(Hw,n),mr(Pw,n)])])}}),{apis:{updateHex:function(t,n){var e,o;Im.setValue(t,{hex:n.value()}),e=t,o=_h(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},jw=function(t,o){var r=_w.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=_w.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"<div class="+o("sv-palette-inner-thumb")+' role="presentation"></div>'}}),u=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}};return ul({factory:function(t){var n=nt({x:nt(0),y:nt(0)}),e=Wu([ll.config({find:et.some}),Pm.config({})]);return _w.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[r,i],onChange:function(t,n,e){Lo(t,Xy(),{value:e})},onInit:function(t,n,e,o){u(e.element().dom(),Fh(Ih()))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,n,e){var o,r;o=e,r=n.components()[0].element().dom(),u(r,Fh(o))}},extraApis:{}})},Uw=function(c,s){return ul({name:"ColourPicker",configFields:[Pn("dom"),Zn("onValidHex",tt),Zn("onInvalidHex",tt)],factory:function(t){var a,v,e=Lw(c,s,t.onValidHex,t.onInvalidHex),o=jw(c,s),b={paletteRgba:nt(ce(Ih()))},n=Sg(o.sketch({})),r=Sg(e.sketch({})),i=function(t,e){n.getOpt(t).each(function(t){var n=_h(e);b.paletteRgba().set(n),o.setRgba(t,n)})},u=function(t,n){r.getOpt(t).each(function(t){e.updateHex(t,n)})},y=function(n,e,t){W(t,function(t){t(n,e)})};return{uid:t.uid,dom:t.dom,components:[n.asSpec(),Mw(c,s),r.asSpec()],behaviours:Wu([rg("colour-picker-events",[mr(Xy(),(v=[u],function(t,n){var e,o,r,i,u,a,c,s,f,l=n.event().value(),d=b.paletteRgba().get(),m=(i=r=0,u=(e=d).red()/255,a=e.green()/255,c=e.blue()/255,s=Math.min(u,Math.min(a,c)),f=Math.max(u,Math.max(a,c)),s===f?Uy(0,0,100*(i=s)):(r=60*((r=u===s?3:c===s?1:5)-(u===s?a-c:c===s?u-a:c-u)/(f-s)),o=(f-s)/f,i=f,Uy(Math.round(r),Math.round(100*o),Math.round(100*i)))),g=Uy(m.hue(),l.x(),100-l.y()),p=Dh(g),h=Sh(p);y(t,h,v)})),mr(Gy(),(a=[i,u],function(t,n){var e,o,r,i=n.event().value(),u=(e=i.y(),o=Uy((100-e)/100*360,100,100),r=Dh(o),Sh(r));y(t,u,a)}))]),ll.config({find:function(t){return r.getOpt(t)}}),hm.config({mode:"acyclic"})])}}})},Ww=function(){return ll.config({find:et.some})},Gw=function(t){return ll.config({find:t.getOpt})},Xw=function(t){return ll.config({find:function(n){return Ir(n.element(),t).bind(function(t){return n.getSystem().getByDom(t).toOption()})}})},Yw={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},qw=function(t){return Yw[t]},Kw=pn([Zn("preprocess",d),Zn("postprocess",d)]),$w=function(t,n,e){return Im.config(bt({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},Jw=function(t,n,e){return $w(t,function(t){return n(t.element())},function(t,n){return e(t.element(),n)})},Qw=function(r,t){var i=An("RepresentingConfigs.memento processors",Kw,t);return Im.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=Im.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);Im.setValue(o,e)}}})},Zw=$w,tS=function(t){return Jw(t,Ur,Wr)},nS=function(t){return Im.config({store:{mode:"memory",initialValue:t}})},eS=function(r,n){var e=function(t,n){n.stop()},o=function(t){return function(n,e){W(t,function(t){t(n,e)})}},i=function(t,n){if(!Qp.isDisabled(t)){var e=n.event().raw();a(t,e.dataTransfer.files)}},u=function(t,n){var e=n.event().raw().target.files;a(t,e)},a=function(t,n){var e,o;Im.setValue(t,(e=n,o=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i"),I(it(e),function(t){return o.test(t.name)}))),Lo(t,yb,{name:r.name})},c=Sg({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Wu([rg("input-file-events",[br(ko())])])}),t=r.label.map(function(t){return gy(t,n)}),s=Db.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Wu([nS([]),Ww(),Qp.config({}),Jm.config({toggleClass:"dragenter",toggleOnExecute:!1}),rg("dropzone-events",[mr("dragenter",o([e,Jm.toggle])),mr("dragleave",o([e,Jm.toggle])),mr("dragover",e),mr("drop",o([e,i])),mr(lo(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:n.translate("Drop an image here")}},wg.sketch({dom:{tag:"button",innerHtml:n.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element().dom().click()},buttonBehaviours:Wu([Iy.config({})])})]}]}}}});return fy(t,s,["tox-form__group--stretched"])},oS=oi("alloy-fake-before-tabstop"),rS=oi("alloy-fake-after-tabstop"),iS=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:Wu([Pm.config({ignore:!0}),Iy.config({})])}},uS=function(t,n){Lo(t,co(),{raw:{which:9,shiftKey:n}})},aS=function(t){return jv(t,["."+oS,"."+rS].join(","),nt(!1))},cS=function(t,n){var e=n.element();Hi(e,oS)?uS(t,!0):Hi(e,rS)&&uS(t,!1)},sS=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[iS([oS]),t,iS([rS])],behaviours:Wu([Xw(1)])}},fS=!(Pe.detect().browser.isIE()||Pe.detect().browser.isEdge()),lS=function(t,n){var o,r,e=fS&&t.sandboxed,i=P({},t.label.map(function(t){return{title:t}}).getOr({}),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=ce(""),{getValue:function(t){return r.get()},setValue:function(t,n){if(o)Xr(t.element(),"srcdoc",n);else{Xr(t.element(),"src","javascript:''");var e=t.element().dom().contentWindow.document;e.open(),e.write(n),e.close()}r.set(n)}}),a=t.label.map(function(t){return gy(t,n)}),c=Db.parts().field({factory:{sketch:function(t){return sS({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:Wu([Iy.config({}),Pm.config({}),Zw(et.none(),u.getValue,u.setValue)])})}}});return fy(a,c,["tox-form__group--stretched"])};function dS(t,n){return pS(H.document.createElement("canvas"),t,n)}function mS(t){var n=dS(t.width,t.height);return gS(n).drawImage(t,0,0),n}function gS(t){return t.getContext("2d")}function pS(t,n,e){return t.width=n,t.height=e,t}var hS={atob:function(t){return on.getOrDie("atob")(t)},requestAnimationFrame:function(t){on.getOrDie("requestAnimationFrame")(t)}};function vS(t){return t.naturalWidth||t.width}function bS(t){return t.naturalHeight||t.height}var yS=window.Promise?window.Promise:function(){var i=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(t,o(r,this),o(a,this))},t=i.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){H.setTimeout(t,1)};function o(t,n){return function(){return t.apply(n,arguments)}}var e=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function u(o){var r=this;null!==this._state?t(function(){var t=r._state?o.onFulfilled:o.onRejected;if(null!==t){var n;try{n=t(r._value)}catch(e){return void o.reject(e)}o.resolve(n)}else(r._state?o.resolve:o.reject)(r._value)}):this._deferreds.push(o)}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void f(o(n,t),o(r,this),o(a,this))}this._state=!0,this._value=t,c.call(this)}catch(e){a.call(this,e)}}function a(t){this._state=!1,this._value=t,c.call(this)}function c(){for(var t=0,n=this._deferreds;t<n.length;t++){var e=n[t];u.call(this,e)}this._deferreds=[]}function s(t,n,e,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.resolve=e,this.reject=o}function f(t,n,e){var o=!1;try{t(function(t){o||(o=!0,n(t))},function(t){o||(o=!0,e(t))})}catch(r){if(o)return;o=!0,e(r)}}return i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(e,o){var r=this;return new i(function(t,n){u.call(r,new s(e,o,t,n))})},i.all=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var c=Array.prototype.slice.call(1===t.length&&e(t[0])?t[0]:t);return new i(function(r,i){if(0===c.length)return r([]);var u=c.length;function a(n,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void e.call(t,function(t){a(n,t)},i)}c[n]=t,0==--u&&r(c)}catch(o){i(o)}}for(var t=0;t<c.length;t++)a(t,c[t])})},i.resolve=function(n){return n&&"object"==typeof n&&n.constructor===i?n:new i(function(t){t(n)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(r){return new i(function(t,n){for(var e=0,o=r;e<o.length;e++)o[e].then(t,n)})},i}();function xS(t){var n=t.split(","),e=/data:([^;]+)/.exec(n[0]);if(!e)return et.none();for(var o,r=e[1],i=n[1],u=hS.atob(i),a=u.length,c=Math.ceil(a/1024),s=new Array(c),f=0;f<c;++f){for(var l=1024*f,d=Math.min(l+1024,a),m=new Array(d-l),g=l,p=0;g<d;++p,++g)m[p]=u[g].charCodeAt(0);s[f]=(o=m,new(on.getOrDie("Uint8Array"))(o))}return et.some(function h(t,n){return new(on.getOrDie("Blob"))(t,n)}(s,{type:r}))}function wS(t,o,r){return o=o||"image/png",H.HTMLCanvasElement.prototype.toBlob?new yS(function(n,e){t.toBlob(function(t){t?n(t):e()},o,r)}):function n(e){return new yS(function(t,n){xS(e).fold(function(){n("uri is not base64: "+e)},t)})}(t.toDataURL(o,r))}function SS(t){return function n(a){return new yS(function(t,n){var e=H.URL.createObjectURL(a),o=new H.Image,r=function(){o.removeEventListener("load",i),o.removeEventListener("error",u)};function i(){r(),t(o)}function u(){r(),n("Unable to load data of type "+a.type+": "+e)}o.addEventListener("load",i),o.addEventListener("error",u),o.src=e,o.complete&&i()})}(t).then(function(t){!function e(t){H.URL.revokeObjectURL(t.src)}(t);var n=dS(vS(t),bS(t));return gS(n).drawImage(t,0,0),n})}function CS(o){return new yS(function(t){var n=function e(){return new(on.getOrDie("FileReader"))}();n.onloadend=function(){t(n.result)},n.readAsDataURL(o)})}function kS(t,n,e){var o=n.type;function r(n,e){return t.then(function(t){return function o(t,n,e){return n=n||"image/png",t.toDataURL(n,e)}(t,n,e)})}return{getType:nt(o),toBlob:function i(){return yS.resolve(n)},toDataURL:function u(){return e},toBase64:function a(){return e.split(",")[1]},toAdjustedBlob:function c(n,e){return t.then(function(t){return wS(t,n,e)})},toAdjustedDataURL:r,toAdjustedBase64:function s(t,n){return r(t,n).then(function(t){return t.split(",")[1]})},toCanvas:function f(){return t.then(mS)}}}function OS(n,t){return wS(n,t).then(function(t){return kS(yS.resolve(n),t,n.toDataURL())})}var ES=function(t){return function e(n){return CS(n).then(function(t){return kS(SS(n),n,t)})}(t)};function TS(t,n,e){var o="string"==typeof t?parseFloat(t):t;return e<o?o=e:o<n&&(o=n),o}var BS=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function AS(t,n){for(var e,o=[],r=new Array(25),i=0;i<5;i++){for(var u=0;u<5;u++)o[u]=n[u+5*i];for(u=0;u<5;u++){for(var a=e=0;a<5;a++)e+=t[u+5*a]*o[a];r[u+5*i]=e}}return r}function DS(n,e){return n.toCanvas().then(function(t){return function i(t,n,e){var o=gS(t);var r=function B(t,n){for(var e,o,r,i,u=t.data,a=n[0],c=n[1],s=n[2],f=n[3],l=n[4],d=n[5],m=n[6],g=n[7],p=n[8],h=n[9],v=n[10],b=n[11],y=n[12],x=n[13],w=n[14],S=n[15],C=n[16],k=n[17],O=n[18],E=n[19],T=0;T<u.length;T+=4)e=u[T],o=u[T+1],r=u[T+2],i=u[T+3],u[T]=e*a+o*c+r*s+i*f+l,u[T+1]=e*d+o*m+r*g+i*p+h,u[T+2]=e*v+o*b+r*y+i*x+w,u[T+3]=e*S+o*C+r*k+i*O+E;return t}(o.getImageData(0,0,t.width,t.height),e);return o.putImageData(r,0,0),OS(t,n)}(t,n.getType(),e)})}function _S(n,e){return n.toCanvas().then(function(t){return function u(t,n,e){var o=gS(t);var r=o.getImageData(0,0,t.width,t.height),i=o.getImageData(0,0,t.width,t.height);return i=function S(t,n,e){function o(t,n,e){return e<t?t=e:t<n&&(t=n),t}for(var r=Math.round(Math.sqrt(e.length)),i=Math.floor(r/2),u=t.data,a=n.data,c=t.width,s=t.height,f=0;f<s;f++)for(var l=0;l<c;l++){for(var d=0,m=0,g=0,p=0;p<r;p++)for(var h=0;h<r;h++){var v=o(l+h-i,0,c-1),b=o(f+p-i,0,s-1),y=4*(b*c+v),x=e[p*r+h];d+=u[y]*x,m+=u[y+1]*x,g+=u[y+2]*x}var w=4*(f*c+l);a[w]=o(d,0,255),a[w+1]=o(m,0,255),a[w+2]=o(g,0,255)}return n}(r,i,e),o.putImageData(i,0,0),OS(t,n)}(t,n.getType(),e)})}function MS(e){return function(t,n){return DS(t,e([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n))}}var FS=function M_(n){return function(t){return DS(t,n)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),IS=MS(function F_(t,n){return AS(t,[1,0,0,0,n=TS(255*n,-255,255),0,1,0,0,n,0,0,1,0,n,0,0,0,1,0,0,0,0,0,1])}),RS=MS(function I_(t,n){var e;return n=TS(n,-1,1),AS(t,[(e=(n*=100)<0?127+n/100*127:127*(e=0==(e=n%1)?BS[n]:BS[Math.floor(n)]*(1-e)+BS[Math.floor(n)+1]*e)+127)/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}),VS=function(t,n,e,o){return DS(t,function r(t,n,e,o){return AS(t,[n=TS(n,0,2),0,0,0,0,0,e=TS(e,0,2),0,0,0,0,0,o=TS(o,0,2),0,0,0,0,0,1,0,0,0,0,0,1])}([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n,e,o))},NS=function R_(n){return function(t){return _S(t,n)}}([0,-1,0,-1,5,-1,0,-1,0]),HS=function V_(c){return function(n,e){return n.toCanvas().then(function(t){return function(t,n,e){for(var o=gS(t),r=new Array(256),i=0;i<r.length;i++)r[i]=c(i,e);var u=function a(t,n){for(var e=t.data,o=0;o<e.length;o+=4)e[o]=n[e[o]],e[o+1]=n[e[o+1]],e[o+2]=n[e[o+2]];return t}(o.getImageData(0,0,t.width,t.height),r);return o.putImageData(u,0,0),OS(t,n)}(t,n.getType(),e)})}}(function(t,n){return 255*Math.pow(t/255,1-n)});function PS(t,n,e){var o=vS(t),r=bS(t),i=n/o,u=e/r,a=!1;(i<.5||2<i)&&(i=i<.5?.5:2,a=!0),(u<.5||2<u)&&(u=u<.5?.5:2,a=!0);var c=function f(a,c,s){return new yS(function(t){var n=vS(a),e=bS(a),o=Math.floor(n*c),r=Math.floor(e*s),i=dS(o,r),u=gS(i);u.drawImage(a,0,0,n,e,0,0,o,r),t(i)})}(t,i,u);return a?c.then(function(t){return PS(t,n,e)}):c}function zS(n,e){return n.toCanvas().then(function(t){return function a(t,n,e){var o=dS(t.width,t.height),r=gS(o),i=0,u=0;90!==(e=e<0?360+e:e)&&270!==e||pS(o,o.height,o.width);90!==e&&180!==e||(i=o.width);270!==e&&180!==e||(u=o.height);return r.translate(i,u),r.rotate(e*Math.PI/180),r.drawImage(t,0,0),OS(o,n)}(t,n.getType(),e)})}function LS(n,e){return n.toCanvas().then(function(t){return function i(t,n,e){var o=dS(t.width,t.height),r=gS(o);"v"===e?(r.scale(1,-1),r.drawImage(t,0,-o.height)):(r.scale(-1,1),r.drawImage(t,-o.width,0));return OS(o,n)}(t,n.getType(),e)})}function jS(n,e,o,r,i){return n.toCanvas().then(function(t){return function a(t,n,e,o,r,i){var u=dS(r,i);return gS(u).drawImage(t,-e,-o),OS(u,n)}(t,n.getType(),e,o,r,i)})}var US=function(t){return FS(t)},WS=function(t){return NS(t)},GS=function(t,n){return HS(t,n)},XS=function(t,n){return IS(t,n)},YS=function(t,n){return RS(t,n)},qS=function(t,n){return LS(t,n)},KS=function(t,n,e){return function r(n,e,o){return n.toCanvas().then(function(t){return PS(t,e,o).then(function(t){return OS(t,n.getType())})})}(t,n,e)},$S=function(t,n){return zS(t,n)},JS=function(t,n){return P({dom:{tag:"span",innerHtml:t,classes:["tox-icon","tox-tbtn__icon-wrap"]}},n)},QS=function(t,n){return JS(kg(t,n),{})},ZS=function(t,n){return JS(kg(t,n),{behaviours:Wu([wm.config({})])})},tC=function(t,n,e){return{dom:{tag:"span",innerHtml:e.translate(t),classes:[n+"__select-label"]},behaviours:Wu([wm.config({})])}},nC=function(t,n,e,o,r){void 0===e&&(e=[]);var i=n.fold(function(){return{}},function(t){return{action:t}}),u=P({buttonBehaviours:Wu([th(t.disabled),Iy.config({}),rg("button press",[dr("click"),dr("mousedown")])].concat(e)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},i),a=bt(u,{dom:o});return bt(a,{components:r})},eC=function(t,n,e,o){void 0===o&&(o=[]);var r={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map(function(t){return{"aria-label":e.translate(t),title:e.translate(t)}}).getOr({})},i=t.icon.map(function(t){return QS(t,e.icons)}),u=ah([i]);return nC(t,n,o,r,u)},oC=function(t,n,e,o){void 0===o&&(o=[]);var r=eC(t,et.some(n),e,o);return wg.sketch(r)},rC=function(t,n,e,o){void 0===o&&(o=[]);var r=e.translate(t.text),i=t.icon?t.icon.map(function(t){return QS(t,e.icons)}):et.none(),u=i.isSome()?ah([i]):[],a=i.isSome()?{}:{innerHtml:r},c=(t.primary?["tox-button"]:["tox-button","tox-button--secondary"]).concat(i.isSome()?["tox-button--icon"]:[]);return function(t,n,e,o,r){void 0===e&&(e=[]);var i=nC(t,et.some(n),e,o,r);return wg.sketch(i)}(t,n,o,P({tag:"button",classes:c},a,{attributes:{title:r}}),u)},iC=function(n,e){return function(t){"custom"===e?Lo(t,Sb,{name:n,value:{}}):"submit"===e?zo(t,Cb):"cancel"===e?zo(t,wb):H.console.error("Unknown button type: ",e)}},uC=function(t,n,e){var o=iC(t.name,n);return rC(t,o,e,[])},aC=nt([Zn("field1Name","field1"),Zn("field2Name","field2"),Iu("onLockedChange"),Du(["lockClass"]),Zn("locked",!1),rf("coupledFieldBehaviours",[ll,Im])]),cC=function(t,i){return Df({factory:Db,name:t,overrides:function(r){return{fieldBehaviours:Wu([rg("coupled-input-behaviour",[mr(fo(),function(e){var t,n,o;(t=e,n=r,o=i,Wf(t,n,o).bind(ll.getCurrent)).each(function(n){Wf(e,r,"lock").each(function(t){Jm.isOn(t)&&r.onLockedChange(e,n,t)})})})])])}}})},sC=nt([cC("field1","field2"),cC("field2","field1"),Df({factory:wg,schema:[Pn("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:Wu([Jm.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),fC=al({name:"FormCoupledInputs",configFields:aC(),partFields:sC(),factory:function(o,t,n,e){return{uid:o.uid,dom:o.dom,components:t,behaviours:uf(o.coupledFieldBehaviours,[ll.config({find:et.some}),Im.config({store:{mode:"manual",getValue:function(t){var n,e=Kf(t,o,["field1","field2"]);return(n={})[o.field1Name]=Im.getValue(e.field1()),n[o.field2Name]=Im.getValue(e.field2()),n},setValue:function(t,n){var e=Kf(t,o,["field1","field2"]);Nt(n,o.field1Name)&&Im.setValue(e.field1(),n[o.field1Name]),Nt(n,o.field2Name)&&Im.setValue(e.field2(),n[o.field2Name])}}})]),apis:{getField1:function(t){return Wf(t,o,"field1")},getField2:function(t){return Wf(t,o,"field2")},getLock:function(t){return Wf(t,o,"lock")}}}},apis:{getField1:function(t,n){return t.getField1(n)},getField2:function(t,n){return t.getField2(n)},getLock:function(t,n){return t.getLock(n)}}}),lC=function(t){var n=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null===n)return z.error(t);var e=parseFloat(n[1]),o=n[2];return z.value({value:e,unit:o})},dC=function(t,n){var e={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,"in":1},o=function(t){return Object.prototype.hasOwnProperty.call(e,t)};return t.unit===n?et.some(t.value):o(t.unit)&&o(n)?e[t.unit]===e[n]?et.some(t.value):et.some(t.value/e[t.unit]*e[n]):et.none()},mC=function(t){return et.none()},gC=function(t,n){return function(t,n){for(var e=[],o=0;o<t.length;o++){var r=t[o];if(!r.isSome())return et.none();e.push(r.getOrDie())}return et.some(n.apply(null,e))}([lC(t).toOption(),lC(n).toOption()],function(t,o){return dC(t,o.unit).map(function(t){return o.value/t}).map(function(t){return n=t,e=o.unit,function(t){return dC(t,e).map(function(t){return{value:t*n,unit:e}})};var n,e}).getOr(mC)}).getOr(mC)},pC=function(o,n){var a=mC,r=oi("ratio-event"),t=fC.parts().lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:n.translate(o.label.getOr("Constrain proportions"))}},components:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:kg("lock",n.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:kg("unlock",n.icons)}}],buttonBehaviours:Wu([Iy.config({})])}),e=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},i=function(e){return Db.parts().field({factory:wy,inputClasses:["tox-textfield"],inputBehaviours:Wu([Iy.config({}),rg("size-input-events",[mr(uo(),function(t,n){Lo(t,r,{isField1:e})}),mr(lo(),function(t,n){Lo(t,yb,{name:o.name})})])]),selectOnFocus:!1})},u=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}}},c=fC.parts().field1(e([Db.parts().label(u("Width")),i(!0)])),s=fC.parts().field2(e([Db.parts().label(u("Height")),i(!1)]));return fC.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,s,e([u("&nbsp;"),t])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,i,n){lC(Im.getValue(t)).each(function(t){a(t).each(function(t){var n,e,o,r;Im.setValue(i,(o={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,"in":4,"%":4},-1!==(r=(n=t).value.toFixed((e=n.unit)in o?o[e]:1)).indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+n.unit))})})},coupledFieldBehaviours:Wu([Qp.config({}),rg("size-input-events2",[mr(r,function(t,n){var e=n.event().isField1(),o=e?fC.getField1(t):fC.getField2(t),r=e?fC.getField2(t):fC.getField1(t),i=o.map(Im.getValue).getOr(""),u=r.map(Im.getValue).getOr("");a=gC(i,u)})])])})},hC={undo:nt(oi("undo")),redo:nt(oi("redo")),zoom:nt(oi("zoom")),back:nt(oi("back")),apply:nt(oi("apply")),swap:nt(oi("swap")),transform:nt(oi("transform")),tempTransform:nt(oi("temp-transform")),transformApply:nt(oi("transform-apply"))},vC=nt("save-state"),bC=nt("disable"),yC=nt("enable"),xC={formActionEvent:Sb,saveState:vC,disable:bC,enable:yC},wC=function(a,c){var t=function(t,n,e,o){return Sg(rC({name:t,text:t,disabled:e,primary:o,icon:et.none()},n,c))},n=function(t,n,e,o){return Sg(oC({name:t,icon:et.some(t),tooltip:et.some(n),disabled:o,primary:!1},e,c))},u=function(t,e){t.map(function(t){var n=t.get(e);n.hasConfigured(Qp)&&Qp.disable(n)})},s=function(t,e){t.map(function(t){var n=t.get(e);n.hasConfigured(Qp)&&Qp.enable(n)})},f={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},e=et.none(),o=tt,r=function(t,n,e){Lo(t,n,e)},i=function(t){return zo(t,xC.disable())},l=function(t){return zo(t,xC.enable())},d=function(t,n){i(t),r(t,hC.transform(),{transform:n}),l(t)},m=function(t){return function(){Z.getOpt(t).each(function(t){wm.set(t,[J])})}},g=function(t,n){i(t),r(t,hC.transformApply(),{transform:n,swap:m(t)}),l(t)},p=function(){return t("Back",function(t){return r(t,hC.back(),{swap:m(t)})},!1,!1)},h=function(){return Sg({dom:{tag:"div",classes:["tox-spacer"]},behaviours:Wu([Qp.config({})])})},v=function(){return t("Apply",function(t){return r(t,hC.apply(),{swap:m(t)})},!0,!0)},b=function(){return function(t){var n,e,o,r,i,u=a.getRect();return n=t,e=u.x,o=u.y,r=u.w,i=u.h,jS(n,e,o,r,i)}},y=[p(),h(),t("Apply",function(t){var n=b();g(t,n),a.hideCrop()},!1,!0)],x=ab.sketch({dom:f,components:y.map(function(t){return t.asSpec()}),containerBehaviours:Wu([rg("image-tools-crop-buttons-events",[mr(xC.disable(),function(t,n){u(y,t)}),mr(xC.enable(),function(t,n){s(y,t)})])])}),w=Sg(pC({name:"size",label:e,constrain:!0},c)),S=[p(),h(),w,h(),t("Apply",function(a){w.getOpt(a).each(function(t){var n,e,o=Im.getValue(t),r=parseInt(o.width,10),i=parseInt(o.height,10),u=(n=r,e=i,function(t){return KS(t,n,e)});g(a,u)})},!1,!0)],C=ab.sketch({dom:f,components:S.map(function(t){return t.asSpec()}),containerBehaviours:Wu([rg("image-tools-resize-buttons-events",[mr(xC.disable(),function(t,n){u(S,t)}),mr(xC.enable(),function(t,n){s(S,t)})])])}),k=function(n,e){return function(t){return n(t,e)}},O=k(qS,"h"),E=k(qS,"v"),T=k($S,-90),B=k($S,90),A=function(t,n){var e,o;o=n,i(e=t),r(e,hC.tempTransform(),{transform:o}),l(e)},D=[p(),h(),n("flip-horizontally","Flip horizontally",function(t){A(t,O)},!1),n("flip-vertically","Flip vertically",function(t){A(t,E)},!1),n("rotate-left","Rotate counterclockwise",function(t){A(t,T)},!1),n("rotate-right","Rotate clockwise",function(t){A(t,B)},!1),h(),v()],_=ab.sketch({dom:f,components:D.map(function(t){return t.asSpec()}),containerBehaviours:Wu([rg("image-tools-fliprotate-buttons-events",[mr(xC.disable(),function(t,n){u(D,t)}),mr(xC.enable(),function(t,n){s(D,t)})])])}),M=function(t,n,e,o,r){var i=_w.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:c.translate(t)}}),u=_w.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),a=_w.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Sg(_w.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e,maxX:r,getInitialValue:nt({x:nt(o)})},components:[i,u,a],sliderBehaviours:Wu([Pm.config({})]),onChoose:n}))},F=function(t,n,e,o,r){return[p(),(i=t,u=n,a=e,c=o,s=r,M(i,function(t,n,e){var o=k(u,e.x()/100);d(t,o)},a,c,s)),v()];var i,u,a,c,s},I=function(t,n,e,o,r){var i=F(t,n,e,o,r);return ab.sketch({dom:f,components:i.map(function(t){return t.asSpec()}),containerBehaviours:Wu([rg("image-tools-filter-panel-buttons-events",[mr(xC.disable(),function(t,n){u(i,t)}),mr(xC.enable(),function(t,n){s(i,t)})])])})},R=[p(),h(),v()],V=ab.sketch({dom:f,components:R.map(function(t){return t.asSpec()})}),N=I("Brightness",XS,-100,0,100),H=I("Contrast",YS,-100,0,100),P=I("Gamma",GS,-100,0,100),z=function(n,e,o){return function(t){return VS(t,n,e,o)}},L=function(t){return M(t,function(a,t,n){var e=j.getOpt(a),o=W.getOpt(a),r=U.getOpt(a);e.each(function(u){o.each(function(i){r.each(function(t){var n=Im.getValue(u).x()/100,e=Im.getValue(t).x()/100,o=Im.getValue(i).x()/100,r=z(n,e,o);d(a,r)})})})},0,100,200)},j=L("R"),U=L("G"),W=L("B"),G=[p(),j,U,W,v()],X=ab.sketch({dom:f,components:G.map(function(t){return t.asSpec()})}),Y=function(n,e,o){return function(t){r(t,hC.swap(),{transform:e,swap:function(){Z.getOpt(t).each(function(t){wm.set(t,[n]),o(t)})}})}},q=et.some(WS),K=et.some(US),$=[n("crop","Crop",Y(x,e,function(t){a.showCrop()}),!1),n("resize","Resize",Y(C,e,function(t){w.getOpt(t).each(function(t){var n=a.getMeasurements(),e=n.width,o=n.height;Im.setValue(t,{width:e,height:o})})}),!1),n("orientation","Orientation",Y(_,e,o),!1),n("brightness","Brightness",Y(N,e,o),!1),n("sharpen","Sharpen",Y(V,q,o),!1),n("contrast","Contrast",Y(H,e,o),!1),n("color-levels","Color levels",Y(X,e,o),!1),n("gamma","Gamma",Y(P,e,o),!1),n("invert","Invert",Y(V,K,o),!1)],J=ab.sketch({dom:f,components:$.map(function(t){return t.asSpec()})}),Q=ab.sketch({dom:{tag:"div"},components:[J],containerBehaviours:Wu([wm.config({})])}),Z=Sg(Q);return{memContainer:Z,getApplyButton:function(t){return Z.getOpt(t).map(function(t){var n=t.components()[0];return n.components()[n.components().length-1]})}}},SC=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),CC=tinymce.util.Tools.resolve("tinymce.geom.Rect"),kC=tinymce.util.Tools.resolve("tinymce.util.Observable"),OC=tinymce.util.Tools.resolve("tinymce.util.Tools"),EC=tinymce.util.Tools.resolve("tinymce.util.VK");function TC(t){var n,e;if(t.changedTouches)for(n="screenX screenY pageX pageY clientX clientY".split(" "),e=0;e<n.length;e++)t[n[e]]=t.changedTouches[0][n[e]]}function BC(t,r){var i,u,n,a,c,f,l,d=r.document||H.document;r=r||{};var m=d.getElementById(r.handle||t);n=function(t){var n,e,o=function s(t){var n,e,o,r,i,u,a,c=Math.max;return n=t.documentElement,e=t.body,o=c(n.scrollWidth,e.scrollWidth),r=c(n.clientWidth,e.clientWidth),i=c(n.offsetWidth,e.offsetWidth),u=c(n.scrollHeight,e.scrollHeight),a=c(n.clientHeight,e.clientHeight),{width:o<i?r:o,height:u<c(n.offsetHeight,e.offsetHeight)?a:u}}(d);TC(t),t.preventDefault(),u=t.button,n=m,f=t.screenX,l=t.screenY,e=H.window.getComputedStyle?H.window.getComputedStyle(n,null).getPropertyValue("cursor"):n.runtimeStyle.cursor,i=SC("<div></div>").css({position:"absolute",top:0,left:0,width:o.width,height:o.height,zIndex:2147483647,opacity:1e-4,cursor:e}).appendTo(d.body),SC(d).on("mousemove touchmove",c).on("mouseup touchend",a),r.start(t)},c=function(t){if(TC(t),t.button!==u)return a(t);t.deltaX=t.screenX-f,t.deltaY=t.screenY-l,t.preventDefault(),r.drag(t)},a=function(t){TC(t),SC(d).off("mousemove touchmove",c).off("mouseup touchend",a),i.remove(),r.stop&&r.stop(t)},this.destroy=function(){SC(m).off()},SC(m).on("mousedown touchstart",n)}var AC=0;var DC=function(n){var f=Sg({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),l=ce(1),d=ce(et.none()),m=ce({x:0,y:0,w:1,h:1}),c=ce({x:0,y:0,w:1,h:1}),s=function(t,s){g.getOpt(t).each(function(t){var e=l.get(),o=ca(t.element()),r=la(t.element()),i=s.dom().naturalWidth*e,u=s.dom().naturalHeight*e,a=Math.max(0,o/2-i/2),c=Math.max(0,r/2-u/2),n={left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px",position:"absolute"};Gi(s,n),f.getOpt(t).each(function(t){Gi(t.element(),n)}),d.get().each(function(t){var n=m.get();t.setRect({x:n.x*e+a,y:n.y*e+c,w:n.w*e,h:n.h*e}),t.setClampRect({x:a,y:c,w:i,h:u}),t.setViewPortRect({x:0,y:0,w:o,h:r})})})},e=function(t,n){var e,a=fe.fromTag("img");return Xr(a,"src",n),(e=a.dom(),new Wg(function(t){var n=function(){e.removeEventListener("load",n),t(e)};e.complete?t(e):e.addEventListener("load",n)})).then(function(){return g.getOpt(t).map(function(t){var n=au({element:a});wm.replaceAt(t,1,et.some(n));var e=c.get(),o={x:0,y:0,w:a.dom().naturalWidth,h:a.dom().naturalHeight};c.set(o);var r,u,i=CC.inflate(o,-20,-20);return m.set(i),e.w===o.w&&e.h===o.h||(r=t,u=a,g.getOpt(r).each(function(t){var n=ca(t.element()),e=la(t.element()),o=u.dom().naturalWidth,r=u.dom().naturalHeight,i=Math.min(n/o,e/r);1<=i?l.set(1):l.set(i)})),s(t,a),a})})},t=ab.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[f.asSpec(),{dom:{tag:"img",attributes:{src:n}}},{dom:{tag:"div"},behaviours:Wu([rg("image-panel-crop-events",[wr(function(t){g.getOpt(t).each(function(t){var n=function S(s,e,f,o,r){var l,u,n,i,a="tox-",c="tox-crid-"+AC++;function d(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}}function m(t,n,e,o){var r,i,u,a,c;r=n.x,i=n.y,u=n.w,a=n.h,r+=e*t.deltaX,i+=o*t.deltaY,(u+=e*t.deltaW)<20&&(u=20),(a+=o*t.deltaH)<20&&(a=20),c=s=CC.clamp({x:r,y:i,w:u,h:a},f,"move"===t.name),c=d(f,c),l.fire("updateRect",{rect:c}),h(c)}function g(n){function t(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),SC("#"+c+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})}OC.each(u,function(t){SC("#"+c+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),t("top",{x:e.x,y:e.y,w:e.w,h:n.y-e.y}),t("right",{x:n.x+n.w,y:n.y,w:e.w-n.x-n.w+e.x,h:n.h}),t("bottom",{x:e.x,y:n.y+n.h,w:e.w,h:e.h-n.y-n.h+e.y}),t("left",{x:e.x,y:n.y,w:n.x-e.x,h:n.h}),t("move",n)}function p(t){g(s=t)}function h(t){p(function e(t,n){return{x:n.x+t.x,y:n.y+t.y,w:n.w,h:n.h}}(f,t))}return u=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],i=["top","right","bottom","left"],function v(){SC('<div id="'+c+'" class="'+a+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(o),OC.each(i,function(t){SC("#"+c,o).append('<div id="'+c+"-"+t+'"class="'+a+'croprect-block" style="display: none" data-mce-bogus="all">')}),OC.each(u,function(t){SC("#"+c,o).append('<div id="'+c+"-"+t.name+'" class="'+a+"croprect-handle "+a+"croprect-handle-"+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false" title="'+t.label+'">')}),n=OC.map(u,function t(n){var e;return new BC(c,{document:o.ownerDocument,handle:c+"-"+n.name,start:function(){e=s},drag:function(t){m(n,e,t.deltaX,t.deltaY)}})}),g(s),SC(o).on("focusin focusout",function(t){SC(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")}),SC(o).on("keydown",function(n){var i;function t(t,n,e,o,r){t.stopPropagation(),t.preventDefault(),m(i,e,o,r)}switch(OC.each(u,function(t){if(n.target.id===c+"-"+t.name)return i=t,!1}),n.keyCode){case EC.LEFT:t(n,0,s,-10,0);break;case EC.RIGHT:t(n,0,s,10,0);break;case EC.UP:t(n,0,s,0,-10);break;case EC.DOWN:t(n,0,s,0,10);break;case EC.ENTER:case EC.SPACEBAR:n.preventDefault(),r()}})}(),l=OC.extend({toggleVisibility:function b(t){var n;n=OC.map(u,function(t){return"#"+c+"-"+t.name}).concat(OC.map(i,function(t){return"#"+c+"-"+t})).join(","),t?SC(n,o).show():SC(n,o).hide()},setClampRect:function y(t){f=t,g(s)},setRect:p,getInnerRect:function t(){return d(f,s)},setInnerRect:h,setViewPortRect:function x(t){e=t,g(s)},destroy:function w(){OC.each(n,function(t){t.destroy()}),n=[]}},kC)}({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},t.element().dom(),function(){});n.toggleVisibility(!1),n.on("updateRect",function(t){var n=t.rect,e=l.get(),o={x:Math.round(n.x/e),y:Math.round(n.y/e),w:Math.round(n.w/e),h:Math.round(n.h/e)};m.set(o)}),d.set(et.some(n))})})])])}],containerBehaviours:Wu([wm.config({}),rg("image-panel-events",[wr(function(t){e(t,n)})])])}),g=Sg(t);return{memContainer:g,updateSrc:e,zoom:function(t,n){var e=l.get(),o=0<n?Math.min(2,e+.1):Math.max(.1,e-.1);l.set(o),g.getOpt(t).each(function(t){var n=t.components()[1].element();s(t,n)})},showCrop:function(){d.get().each(function(t){t.toggleVisibility(!0)})},hideCrop:function(){d.get().each(function(t){t.toggleVisibility(!1)})},getRect:function(){return m.get()},getMeasurements:function(){var t=c.get();return{width:t.w,height:t.h}}}},_C=function(t,n,e,o,r){return oC({name:t,icon:et.some(n),disabled:e,tooltip:et.some(t),primary:!1},o,r)},MC=function(t,n){n?Qp.enable(t):Qp.disable(t)},FC=function(){return on.getOrDie("URL")},IC=function(t){return FC().createObjectURL(t)},RC=function(t){FC().revokeObjectURL(t)};var VC,NC,HC,PC,zC=function(t){var n=ce(t),e=ce(et.none()),r=function s(){var e=[],o=-1;function t(){return 0<o}function n(){return-1!==o&&o<e.length-1}return{data:e,add:function r(t){var n;return n=e.splice(++o),e.push(t),{state:t,removed:n}},undo:function i(){if(t())return e[--o]},redo:function u(){if(n())return e[++o]},canUndo:t,canRedo:n}}();r.add(t);var i=function(t){n.set(t)},u=function(t){return{blob:t,url:IC(t)}},a=function(t){RC(t.url)},o=function(){e.get().each(a),e.set(et.none())},c=function(t){var n=u(t);i(n);var e,o=r.add(n).removed;return e=o,OC.each(e,a),n.url};return{getBlobState:function(){return n.get()},setBlobState:i,addBlobState:c,getTempState:function(){return e.get().fold(function(){return n.get()},function(t){return t})},updateTempState:function(t){var n=u(t);return o(),e.set(et.some(n)),n.url},addTempState:function(t){var n=u(t);return e.set(et.some(n)),n.url},applyTempState:function(n){return e.get().fold(function(){},function(t){c(t.blob),n()})},destroyTempState:o,undo:function(){var t=r.undo();return i(t),t.url},redo:function(){var t=r.redo();return i(t),t.url},getHistoryStates:function(){return{undoEnabled:r.canUndo(),redoEnabled:r.canRedo()}}}},LC=function(t,n){var e,o,r,u=zC(t.currentState),i=function(t){var n=u.getHistoryStates();p.updateButtonUndoStates(t,n.undoEnabled,n.redoEnabled),Lo(t,xC.formActionEvent,{name:xC.saveState(),value:n.undoEnabled})},a=function(t){return t.toBlob()},c=function(t){Lo(t,xC.formActionEvent,{name:xC.disable(),value:{}})},s=function(t){h.getApplyButton(t).each(function(t){Qp.enable(t)}),Lo(t,xC.formActionEvent,{name:xC.enable(),value:{}})},f=function(t,n){return c(t),g.updateSrc(t,n)},l=function(n,t,e,o,r){return c(n),ES(t).then(e).then(a).then(o).then(function(t){return f(n,t).then(function(t){return i(n),r(),s(n),t})})["catch"](function(t){return H.console.log(t),s(n),t})},d=function(t,n,e){var o=u.getBlobState().blob;l(t,o,n,function(t){return u.updateTempState(t)},e)},m=function(t){var n=u.getBlobState().url;return u.destroyTempState(),i(t),n},g=DC(t.currentState.url),p=(o=Sg(_C("Undo","undo",!0,function(t){Lo(t,hC.undo(),{direction:1})},e=n)),r=Sg(_C("Redo","redo",!0,function(t){Lo(t,hC.redo(),{direction:1})},e)),{container:ab.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[o.asSpec(),r.asSpec(),_C("Zoom in","zoom-in",!1,function(t){Lo(t,hC.zoom(),{direction:1})},e),_C("Zoom out","zoom-out",!1,function(t){Lo(t,hC.zoom(),{direction:-1})},e)]}),updateButtonUndoStates:function(t,n,e){o.getOpt(t).each(function(t){MC(t,n)}),r.getOpt(t).each(function(t){MC(t,e)})}}),h=wC(g,n);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[h.memContainer.asSpec(),g.memContainer.asSpec(),p.container],behaviours:Wu([Im.config({store:{mode:"manual",getValue:function(){return u.getBlobState()}}}),rg("image-tools-events",[mr(hC.undo(),function(n,t){var e=u.undo();f(n,e).then(function(t){s(n),i(n)})}),mr(hC.redo(),function(n,t){var e=u.redo();f(n,e).then(function(t){s(n),i(n)})}),mr(hC.zoom(),function(t,n){var e=n.event().direction();g.zoom(t,e)}),mr(hC.back(),function(t,n){var e,o;o=m(e=t),f(e,o).then(function(t){s(e)}),n.event().swap()(),g.hideCrop()}),mr(hC.apply(),function(t,n){u.applyTempState(function(){m(t),n.event().swap()()})}),mr(hC.transform(),function(t,n){return d(t,n.event().transform(),tt)}),mr(hC.tempTransform(),function(t,n){return e=t,o=n.event().transform(),r=u.getTempState().blob,void l(e,r,o,function(t){return u.addTempState(t)},tt);var e,o,r}),mr(hC.transformApply(),function(t,n){return e=t,o=n.event().transform(),r=n.event().swap(),i=u.getBlobState().blob,void l(e,i,o,function(t){var n=u.addBlobState(t);return m(e),n},r);var e,o,r,i}),mr(hC.swap(),function(n,t){var e;e=n,p.updateButtonUndoStates(e,!1,!1);var o=t.event().transform(),r=t.event().swap();o.fold(function(){r()},function(t){d(n,t,r)})})]),Ww()])}},jC=ul({name:"HtmlSelect",configFields:[Pn("options"),nf("selectBehaviours",[Pm,Im]),Zn("selectClasses",[]),Zn("selectAttributes",{}),Yn("data")],factory:function(e,t){var n=F(e.options,function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}}),o=e.data.map(function(t){return It("initialValue",t)}).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:n,behaviours:of(e.selectBehaviours,[Pm.config({}),Im.config({store:P({mode:"manual",getValue:function(t){return Qi(t.element())},setValue:function(t,n){N(e.options,function(t){return t.value===n}).isSome()&&Zi(t.element(),n)}},o)})])}}}),UC=function(e,n){var t=e.label.map(function(t){return gy(t,n)}),o=[hm.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:function(t){return zo(t,Cb),et.some(!0)}}),rg("textfield-change",[mr(fo(),function(t,n){Lo(t,yb,{name:e.name})}),mr(yo(),function(t,n){Lo(t,yb,{name:e.name})})]),Iy.config({})],r=e.validation.map(function(o){return _y.config({getRoot:function(t){return _r(t.element())},invalidClass:"tox-invalid",validator:{validate:function(t){var n=Im.getValue(t),e=o.validator(n);return jb.pure(!0===e?z.value(n):z.error(e))},validateOnLoad:o.validateOnLoad}})}).toArray(),i=Db.parts().field({tag:!0===e.multiline?"textarea":"input",inputAttributes:e.placeholder.fold(function(){},function(t){return{placeholder:n.translate(t)}}),inputClasses:[e.classname],inputBehaviours:Wu(q([o,r])),selectOnFocus:!1,factory:wy}),u=e.flex?["tox-form__group--stretched"]:[];return fy(t,i,u)},WC=function(i){return P({},i,{toCached:function(){return WC(i.toCached())},bindFuture:function(n){return WC(i.bind(function(t){return t.fold(function(t){return jb.pure(z.error(t))},function(t){return n(t)})}))},bindResult:function(n){return WC(i.map(function(t){return t.bind(n)}))},mapResult:function(n){return WC(i.map(function(t){return t.map(n)}))},mapError:function(n){return WC(i.map(function(t){return t.mapError(n)}))},foldResult:function(n,e){return i.map(function(t){return t.fold(n,e)})},withTimeout:function(t,r){return WC(jb.nu(function(n){var e=!1,o=H.setTimeout(function(){e=!0,n(z.error(r()))},t);i.get(function(t){e||(H.clearTimeout(o),n(t))})}))}})},GC=function(t){return WC(jb.nu(t))},XC=GC,YC={type:"separator"},qC=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:function(){}}},KC=function(t,n){return{type:"menuitem",value:n,text:t,meta:{attach:undefined},onAction:function(){}}},$C=function(t,n){return o=t,e=I(n,function(t){return t.type===o}),F(e,qC);var e,o},JC=function(t,n){var e=t.toLowerCase();return I(n,function(t){var n=t.meta!==undefined&&t.meta.text!==undefined?t.meta.text:t.text;return Me(n.toLowerCase(),e)||Me(t.value.toLowerCase(),e)})},QC=function(c,t,s){var n=Im.getValue(t),f=n.meta.text!==undefined?n.meta.text:n.value;return s.getLinkInformation().fold(function(){return[]},function(t){var n,e,o,r,i,u,a=JC(f,(n=s.getHistory(c),F(n,function(t){return KC(t,t)})));return"file"===c?(e=[a,JC(f,(u=t,$C("header",u.targets))),JC(f,q([(i=t,et.from(i.anchorTop).map(function(t){return KC("<top>",t)}).toArray()),(r=t,$C("anchor",r.targets)),(o=t,et.from(o.anchorBottom).map(function(t){return KC("<bottom>",t)}).toArray())]))],V(e,function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(YC,n)},[])):a})},ZC=oi("aria-invalid"),tk=function(i,o,r){var t,n,e,u,a,c=o.shared.providers,s=function(t){var n=Im.getValue(t);r.addToHistory(n.value,i.filetype)},f=Db.parts().field({factory:sy,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":ZC},minChars:0,responseTime:0,fetch:function(t){var n=QC(i.filetype,t,r),e=xy(n,ih.BUBBLE_TO_SANDBOX,o);return jb.pure(e)},getHotspot:function(t){return h.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(_y)&&_y.run(t).get(tt)},typeaheadBehaviours:Wu(q([r.getValidationHandler().map(function(o){return _y.config({getRoot:function(t){return _r(t.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){d.getOpt(t).each(function(t){Xr(t.element(),"title",c.translate(n))})}},validator:{validate:function(t){var e=Im.getValue(t);return XC(function(n){o({type:i.filetype,url:e.value},function(t){n(("invalid"===t.status?z.error:z.value)(t.message))})})},validateOnLoad:!1}})}).toArray(),[Iy.config({}),rg("urlinput-events",q(["file"===i.filetype?[mr(fo(),function(t){Lo(t,yb,{name:i.name})})]:[],[mr(lo(),function(t){Lo(t,yb,{name:i.name}),s(t)}),mr(yo(),function(t){Lo(t,yb,{name:i.name}),s(t)})]]))]])),eventOrder:(t={},t[fo()]=["streaming","urlinput-events","invalidating"],t),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"dog"},lazySink:o.shared.getSink,parts:{menu:mv(0,0,"normal")},onExecute:function(t,n,e){Lo(n,Cb,{})},onItemExecute:function(t,n,e,o){s(t),Lo(t,yb,{name:i.name})}}),l=i.label.map(function(t){return gy(t,c)}),d=Sg((n="invalid",e=et.some(ZC),void 0===(u="warning")&&(u=n),void 0===a&&(a=n),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+n],innerHtml:kg(u,c.icons),attributes:P({title:c.translate(a),"aria-live":"polite"},e.fold(function(){return{}},function(t){return{id:t}}))}})),m=Sg({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=r.getUrlPicker(i.filetype),p=oi("browser.url.event"),h=Sg({dom:{tag:"div",classes:["tox-control-wrap"]},components:[f,m.asSpec()]});return Db.sketch({dom:my([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:q([[h.asSpec()],g.map(function(){return t=i.label,n=p,e="tox-browse-url",o="browse",r=c,wg.sketch({dom:{tag:"button",classes:["tox-tbtn",e],innerHtml:kg(o,r.icons),attributes:{title:r.translate(t.getOr(""))}},buttonBehaviours:Wu([Iy.config({})]),action:function(t){zo(t,n)}});var t,n,e,o,r}).toArray()])}]),fieldBehaviours:Wu([rg("url-input-events",[mr(p,function(o){ll.getCurrent(o).each(function(n){var e=Im.getValue(n);g.each(function(t){t(e).get(function(t){Im.setValue(n,t),Lo(o,yb,{name:i.name})})})})})])])})},nk=function(a,n){var t,e,o=a.label.map(function(t){return gy(t,n)}),r=function(e){return function(n,t){mu(t.event().target(),"[data-collection-item-value]").each(function(t){e(n,t,qr(t,"data-collection-item-value"))})}},i=[mr(io(),r(function(t,n){Rl(n)})),mr(ko(),r(function(t,n,e){Lo(t,Sb,{name:a.name,value:e})})),mr(uo(),r(function(t,n,e){du(t.element(),"."+Ep).each(function(t){Ni(t,Ep)}),Ri(n,Ep)})),mr(ao(),r(function(t,n,e){du(t.element(),"."+Ep).each(function(t){Ni(t,Ep)})})),kr(r(function(t,n,e){Lo(t,Sb,{name:a.name,value:e})}))],u=Db.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==a.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:d},behaviours:Wu([wm.config({}),Im.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){var n,e,r,i;n=o,e=F(t,function(t){var n,e=bp.translate(t.text),o=1===a.columns?'<div class="tox-collection__item-label">'+e+"</div>":"",r='<div class="tox-collection__item-icon">'+t.icon+"</div>",i={_:" "," - ":" ","-":" "},u=e.replace(/\_| \- |\-/g,function(t){return i[t]});return'<div class="tox-collection__item" tabindex="-1" data-collection-item-value="'+('"'===(n=t.value)?"&quot;":n)+'" title="'+u+'" aria-label="'+u+'">'+r+o+"</div>"}),r=1<a.columns&&"auto"!==a.columns?M(e,a.columns):[e],i=F(r,function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}),Wr(n.element(),i.join("")),"auto"===a.columns&&up(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;hm.setGridSize(o,n,e)}),zo(o,Tb)}}),Iy.config({}),hm.config((t=a.columns,e="normal",1===t?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===t?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===e?".tox-swatches__row":".tox-collection__group",cell:"color"===e?"."+wp:"."+xp}})),rg("collection-events",i)])});return fy(o,u,["tox-form__group--collection"])},ek=function(r){return function(n,e,o){return Ft(e,"name").fold(function(){return r(e,o)},function(t){return n.field(t,r(e,o))})}},ok={bar:ek(function(t,n){return e=t,o=n.shared,{dom:{tag:"div",classes:["tox-bar"]},components:F(e.items,o.interpreter)};var e,o}),collection:ek(function(t,n){return nk(t,n.shared.providers)}),alloy:ek(d),alertbanner:ek(function(t,n){return e=t,o=n.shared.providers,ab.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+e.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[wg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:kg(e.icon,o.icons),attributes:{title:o.translate(e.iconTooltip)}},action:function(t){Lo(t,Sb,{name:"alert-banner",value:e.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(e.text)}}]});var e,o}),input:ek(function(t,n){return e=t,o=n.shared.providers,UC({name:e.name,multiline:!1,label:e.label,placeholder:e.placeholder,flex:!1,classname:"tox-textfield",validation:et.none()},o);var e,o}),textarea:ek(function(t,n){return e=t,o=n.shared.providers,UC({name:e.name,multiline:!0,label:e.label,placeholder:e.placeholder,flex:!0,classname:"tox-textarea",validation:et.none()},o);var e,o}),listbox:ek(function(t,n){return e=t,o=n.shared.providers,r=gy(e.label,o),i=Db.parts().field({factory:jC,dom:{classes:["mce-select-field"]},selectBehaviours:Wu([Iy.config({})]),options:e.values,data:e.initialValue.getOr(undefined)}),ly(et.some(r),i);var e,o,r,i}),label:ek(function(t,n){return e=t,o=n.shared,r={dom:{tag:"label",innerHtml:o.providers.translate(e.label),classes:["tox-label"]}},i=F(e.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:Wu([Ww(),wm.config({}),tS(et.none()),hm.config({mode:"acyclic"})])};var e,o,r,i}),iframe:(VC=function(t,n){return lS(t,n.shared.providers)},function(t,n,e){var o=bt(n,{source:"dynamic"});return ek(VC)(t,o,e)}),autocomplete:ek(function(t,n){return i=n,e=gy((r=t).label.getOr("?"),i.shared.providers),o=Db.parts().field({factory:sy,dismissOnBlur:!1,inputClasses:["tox-textfield"],minChars:1,fetch:function(t){var n=Im.getValue(t),e=r.getItems(n),o=xy(e,ih.BUBBLE_TO_SANDBOX,i);return jb.pure(o)},markers:{openClass:"dog"},lazySink:i.shared.getSink,parts:{menu:mv(0,0,"normal")}}),ly(et.some(e),o);var r,i,e,o}),button:ek(function(t,n){return e=t,o=n.shared.providers,r=iC(e.name,"custom"),rC(e,r,o,[nS(""),Ww()]);var e,o,r}),checkbox:ek(function(t,n){return e=t,o=n.shared.providers,r=Im.config({store:{mode:"manual",getValue:function(t){return t.element().dom().checked},setValue:function(t,n){t.element().dom().checked=n}}}),i=function(t){return t.element().dom().click(),et.some(!0)},u=Db.parts().field({factory:{sketch:d},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Wu([Ww(),Iy.config({}),Pm.config({}),r,hm.config({mode:"special",onEnter:i,onSpace:i,stopSpaceKeyup:!0}),rg("checkbox-events",[mr(lo(),function(t,n){Lo(t,yb,{name:e.name})})])])}),a=Db.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:o.translate(e.label)},behaviours:Wu([Hy.config({})])}),s=Sg({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[(c=function(t){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t],innerHtml:kg("checked"===t?"selected":"unselected",o.icons)}}})("checked"),c("unchecked")]}),Db.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[u,s.asSpec(),a]});var e,o,r,i,u,a,c,s}),colorinput:ek(function(t,n){return jy(t,n.shared,n.colorinput)}),colorpicker:ek(function(t){var n=function(t){return"tox-"+t},e=Uw(qw,n),r=Sg(e.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(t){Lo(t,Sb,{name:"hex-valid",value:!0})},onInvalidHex:function(t){Lo(t,Sb,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:Wu([Im.config({store:{mode:"manual",getValue:function(t){var n=r.get(t);return ll.getCurrent(n).bind(function(t){return Im.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,n){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),o=r.get(t);ll.getCurrent(o).fold(function(){H.console.log("Can not find form")},function(t){Im.setValue(t,{hex:et.from(e[1]).getOr("")}),Vw.getField(t,"hex").each(function(t){zo(t,fo())})})}}}),Ww()])}}),dropzone:ek(function(t,n){return eS(t,n.shared.providers)}),grid:ek(function(t,n){return e=t,o=n.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+e.columns+"col"]},components:F(e.items,o.interpreter)};var e,o}),selectbox:ek(function(t,n){return e=t,o=n.shared.providers,r=F(e.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=e.label.map(function(t){return gy(t,o)}),u=Db.parts().field({dom:{},selectAttributes:{size:e.size},options:r,factory:jC,selectBehaviours:Wu([Iy.config({}),rg("selectbox-change",[mr(lo(),function(t,n){Lo(t,yb,{name:e.name})})])])}),a=1<e.size?et.none():et.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:kg("chevron-down",o.icons)}}),c={dom:{tag:"div",classes:["tox-selectfield"]},components:q([[u],a.toArray()])},Db.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:q([i.toArray(),[c]])});var e,o,r,i,u,a,c}),sizeinput:ek(function(t,n){return pC(t,n.shared.providers)}),urlinput:ek(function(t,n){return tk(t,n,n.urlinput)}),customeditor:ek(function(n){var e=ce(et.none()),o=Sg({dom:{tag:n.tag}}),r=ce(et.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Wu([rg("editor-foo-events",[wr(function(t){o.getOpt(t).each(function(t){n.init(t.element().dom()).then(function(n){r.get().each(function(t){n.setValue(t)}),r.set(et.none()),e.set(et.some(n))})})})]),Im.config({store:{mode:"manual",getValue:function(){return e.get().fold(function(){return r.get().getOr("")},function(t){return t.getValue()})},setValue:function(t,n){e.get().fold(function(){r.set(et.some(n))},function(t){return t.setValue(n)})}}}),Ww()]),components:[o.asSpec()]}}),htmlpanel:ek(function(t){return"presentation"===t.presets?ab.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):ab.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:Wu([Iy.config({}),Pm.config({})])})}),imagetools:ek(function(t,n){return LC(t,n.shared.providers)}),table:ek(function(t,n){return e=t,o=n.shared.providers,u=function(t){return{dom:{tag:"th",innerHtml:o.translate(t)}}},a=function(t){return{dom:{tag:"td",innerHtml:o.translate(t)}}},c=function(t){return{dom:{tag:"tr"},components:F(t,a)}},{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(i=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:F(i,u)}]}),(r=e.cells,{dom:{tag:"tbody"},components:F(r,c)})],behaviours:Wu([Iy.config({}),Pm.config({})])};var e,o,r,i,u,a,c})},rk={field:function(t,n){return n}},ik=function(n,t,e){var o=bt(e,{shared:{interpreter:function(t){return uk(n,t,o)}}});return uk(n,t,o)},uk=function(n,e,o){return Ft(ok,e.type).fold(function(){return H.console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e},function(t){return t(n,e,o)})},ak=function(t){return t.y()},ck=function(t,n,e){return Ja(t.x(),ak(t),e.northeast(),ba(),"layout-ne")},sk=function(t,n,e){return Ja((r=n,(o=t).x()+o.width()-r.width()),ak(t),e.northwest(),ya(),"layout-nw");var o,r},fk=function(t,n,e){return Ja((r=n,(o=t).x()+o.width()/2-r.width()/2),ak(t),e.north(),wa(),"layout-n");var o,r},lk={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},dk=function(t,n,e){var o,r,i,u,a,c,s,f,l,d,m=bb(t),g=function(){return fe.fromDom(t.getBody())};return{toolbar:(f=g,l=n,d=m,d?function(){return{anchor:"node",root:f(),node:et.from(f()),bubble:Ka(-12,-12,lk),layouts:{onRtl:function(){return[ck]},onLtr:function(){return[sk]}}}}:function(){return{anchor:"hotspot",hotspot:l(),bubble:Ka(-12,12,lk),layouts:{onRtl:function(){return[rc]},onLtr:function(){return[ic]}}}}),toolbarOverflow:(s=e,function(){return{anchor:"hotspot",hotspot:s(),layouts:{onRtl:function(){return[rc]},onLtr:function(){return[ic]}}}}),banner:(u=g,a=n,c=e,c?function(){return{anchor:"node",root:u(),node:et.from(u()),layouts:{onRtl:function(){return[fk]},onLtr:function(){return[fk]}}}}:function(){return{anchor:"hotspot",hotspot:a(),layouts:{onRtl:function(){return[sc]},onLtr:function(){return[sc]}}}}),cursor:(r=t,i=g,function(){return{anchor:"selection",root:i(),getSelection:function(){var t=r.selection.getRng();return et.some(Oc.range(fe.fromDom(t.startContainer),t.startOffset,fe.fromDom(t.endContainer),t.endOffset))}}}),node:(o=g,function(t){return{anchor:"node",root:o(),node:t}})}},mk=function(t){return{colorPicker:(r=t,function(t,n){av.colorPickerDialog(r)(t,n)}),hasCustomColors:(o=t,function(){return Uh(o)}),getColors:(e=t,function(){return Wh(e)}),getColorCols:(n=t,function(){return av.getColorCols(n)})};var n,e,o,r},gk=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strike-through",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}]}],pk=function(t){return V(t,function(t,n){if(gt(n,"items")){var e=pk(n.items);return{customFormats:t.customFormats.concat(e.customFormats),formats:t.formats.concat([{title:n.title,items:e.formats}])}}if(gt(n,"inline")||gt(n,"block")||gt(n,"selector")){var o="custom-"+n.title.toLowerCase();return{customFormats:t.customFormats.concat([{name:o,format:n}]),formats:t.formats.concat([{title:n.title,format:o,icon:n.icon}])}}return P({},t,{formats:t.formats.concat(n)})},{customFormats:[],formats:[]})},hk=function(i){return(t=i,et.from(t.getParam("style_formats")).filter(j)).map(function(t){var n,e,o,r=(n=i,e=pk(t),o=function(t){W(t,function(t){n.formatter.has(t.name)||n.formatter.register(t.name,t.format)})},n.formatter?o(e.customFormats):n.on("init",function(){o(e.customFormats)}),e.formats);return i.getParam("style_formats_merge",!1,"boolean")?gk.concat(r):r}).getOr(gk);var t},vk=function(t,n,e){var o={type:"formatter",isSelected:n(t.format),getStylePreview:e(t.format)};return bt(t,o)},bk=function(s,t,f,l){var d=function(t){return F(t,function(t){var n,e,o,r,i,u,a=ut(t);if(Nt(t,"items")){var c=d(t.items);return bt((i=t,u={type:"submenu",isSelected:nt(!1),getStylePreview:function(){return et.none()}},bt(i,u)),{getStyleItems:function(){return c}})}return Nt(t,"format")?vk(t,f,l):1===a.length&&D(a,"title")?bt(t,{type:"separator"}):(e=oi((n=t).title),o={type:"formatter",format:e,isSelected:f(e),getStylePreview:l(e)},r=bt(n,o),s.formatter.register(e,r),r)})};return d(t)},yk=OC.trim,xk=function(n){return function(t){if(t&&1===t.nodeType){if(t.contentEditable===n)return!0;if(t.getAttribute("data-mce-contenteditable")===n)return!0}return!1}},wk=xk("true"),Sk=xk("false"),Ck=function(t,n,e,o,r){return{type:t,title:n,url:e,level:o,attach:r}},kk=function(t){return t.innerText||t.textContent},Ok=function(t){return(n=t)&&"A"===n.nodeName&&(n.id||n.name)!==undefined&&Tk(t);var n},Ek=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},Tk=function(t){return function(t){for(;t=t.parentNode;){var n=t.contentEditable;if(n&&"inherit"!==n)return wk(t)}return!1}(t)&&!Sk(t)},Bk=function(t){return Ek(t)&&Tk(t)},Ak=function(t){var n,e,o=(n=t).id?n.id:oi("h");return Ck("header",kk(t),"#"+o,Ek(e=t)?parseInt(e.nodeName.substr(1),10):0,function(){t.id=o})},Dk=function(t){var n=t.id||t.name,e=kk(t);return Ck("anchor",e||"#"+n,"#"+n,0,tt)},_k=function(t){var n,e;return n="h1,h2,h3,h4,h5,h6,a:not([href])",e=t,F($c(fe.fromDom(e),n),function(t){return t.dom()})},Mk=function(t){return 0<yk(t.title).length},Fk=function(t){var n,e=_k(t);return I((n=e,F(I(n,Bk),Ak)).concat(F(I(e,Ok),Dk)),Mk)},Ik="tinymce-url-history",Rk=function(t){return L(t)&&/^https?/.test(t)},Vk=function(t){return k(t)&&function(t,n){for(var e=ut(t),o=0,r=e.length;o<r;o++){var i=e[o],u=t[i];if(n(u,i,t))return et.some(u)}return et.none()}(t,function(t){return!(j(n=t)&&n.length<=5&&$(n,Rk));var n}).isNone()},Nk=function(){var t,n=H.localStorage.getItem(Ik);if(null===n)return{};try{t=JSON.parse(n)}catch(e){if(e instanceof SyntaxError)return H.console.log("Local storage "+Ik+" was not valid JSON",e),{};throw e}return Vk(t)?t:(H.console.log("Local storage "+Ik+" was not valid format",t),{})},Hk=function(t){var n=Nk();return Object.prototype.hasOwnProperty.call(n,t)?n[t]:[]},Pk=function(n,t){if(Rk(n)){var e=Nk(),o=Object.prototype.hasOwnProperty.call(e,t)?e[t]:[],r=I(o,function(t){return t!==n});e[t]=[n].concat(r).slice(0,5),function(t){if(!Vk(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));H.localStorage.setItem(Ik,JSON.stringify(t))}(e)}},zk=Object.prototype.hasOwnProperty,Lk=function(t){return!!t},jk=function(t){return st(OC.makeMap(t,/[, ]/),Lk)},Uk=function(t,n,e){var o,r,i=(o=t,r=n,zk.call(o,r)?et.some(o[r]):et.none()).getOr(e);return L(i)?et.some(i):et.none()},Wk=function(t){return et.some(t.file_picker_callback).filter(E)},Gk=function(t,n){var e,o,r,i,u=(e=t,o=et.some(e.file_picker_types).filter(Lk),r=et.some(e.file_browser_callback_types).filter(Lk),i=o.or(r).map(jk),Wk(e).fold(function(){return!1},function(t){return i.fold(function(){return!0},function(t){return 0<ut(t).length&&t})}));return O(u)?u?Wk(t):et.none():u[n]?Wk(t):et.none()},Xk=function(n){return{getHistory:Hk,addToHistory:Pk,getLinkInformation:function(){return!1===(t=n).settings.typeahead_urls?et.none():et.some({targets:Fk(t.getBody()),anchorTop:Uk(t.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:Uk(t.settings,"anchor_bottom","#bottom").getOrUndefined()});var t},getValidationHandler:function(){return t=n.settings.filepicker_validator_handler,E(t)?et.some(t):et.none();var t},getUrlPicker:function(t){return i=t,Gk((r=n).settings,i).map(function(o){return function(n){return jb.nu(function(e){var t=OC.extend({filetype:i},et.from(n.meta).getOr({}));o.call(r,function(t,n){if(!L(t))throw new Error("Expected value to be string");if(n!==undefined&&!k(n))throw new Error("Expected meta to be a object");e({value:t,meta:n})},n.value,t)})}});var r,i}}},Yk=function(t,n,e,o){var r={shared:{providers:{icons:function(){return n.ui.registry.getAll().icons},menuItems:function(){return n.ui.registry.getAll().menuItems},translate:bp.translate},interpreter:function(t){return uk(rk,t,r)},anchors:dk(n,e,o),getSink:function(){return z.value(t)}},urlinput:Xk(n),styleselect:function(e){var o=function(t){return function(){return e.formatter.match(t)}},r=function(n){return function(){var t=e.formatter.get(n);return t!==undefined?et.some({tag:0<t.length&&(t[0].inline||t[0].block)||"div",styleAttr:e.formatter.getCssText(n)}):et.none()}},i=function(t){var n=t.items;return n!==undefined&&0<n.length?K(n,i):[t.format]},u=ce([]),a=ce([]),c=ce([]),s=ce([]),f=ce(!1);e.on("init",function(){var t=hk(e),n=bk(e,t,o,r);u.set(n),a.set(K(n,i))}),e.on("addStyleModifications",function(t){var n=bk(e,t.items,o,r);c.set(n),f.set(t.replace),s.set(K(n,i))});return{getData:function(){var t=f.get()?[]:u.get(),n=c.get();return t.concat(n)},getFlattenedKeys:function(){var t=f.get()?[]:a.get(),n=s.get();return t.concat(n)}}}(n),colorinput:mk(n)};return r},qk=nt([Pn("dom"),Zn("shell",!0),nf("toolbarBehaviours",[wm])]),Kk=nt([Mf({name:"groups",overrides:function(t){return{behaviours:Wu([wm.config({})])}}})]),$k=al({name:"Toolbar",configFields:qk(),partFields:Kk(),factory:function(n,t,e,o){var r=function(t){return n.shell?et.some(t):Wf(t,n,"groups")},i=n.shell?{behaviours:[wm.config({})],components:[]}:{behaviours:[],components:t};return{uid:n.uid,dom:n.dom,components:i.components,behaviours:of(n.toolbarBehaviours,i.behaviours),apis:{setGroups:function(t,n){r(t).fold(function(){throw H.console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(t){wm.set(t,n)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)}}}),Jk=Or("within","extra","withinWidth"),Qk=function(t,n,o){var e,r=(e=function(t,n){var e=o(t);return et.some({element:nt(t),start:nt(n),finish:nt(n+e),width:nt(e)})},V(t,function(n,t){return e(t,n.len).fold(nt(n),function(t){return{len:t.finish(),list:n.list.concat([t])}})},{len:0,list:[]}).list),i=I(r,function(t){return t.finish()<=n}),u=R(i,function(t,n){return t+n.width()},0),a=r.slice(i.length);return{within:nt(i),extra:nt(a),withinWidth:nt(u)}},Zk=function(t){return F(t,function(t){return t.element()})},tO=function(t,n,e,o){var r,i,u,a,c,s,f,l,d,m,g,p,h=(r=t,i=n,u=e,a=Qk(i,r,u),0===a.extra().length?et.some(a):et.none()).getOrThunk(function(){return Qk(n,t-e(o),e)}),v=h.within(),b=h.extra(),y=h.withinWidth();return 1===b.length&&b[0].width()<=e(o)?(m=b,g=y,p=Zk(v.concat(m)),Jk(p,[],g)):1<=b.length?(s=b,f=o,l=y,d=Zk(v).concat([f]),Jk(d,Zk(s),l)):(c=y,Jk(Zk(v),[],c))},nO=function(t,n){var e=F(n,function(t){return fu(t)});$k.setGroups(t,e)},eO=function(t,n,e,o){var r=Gf(t,n,"primary"),i=Wf(t,n,"overflow-button"),u=Fb.getCoupled(t,"overflowGroup");Wi(r.element(),"visibility","hidden");var a,c=(a=i,e.bind(function(n){return Nl(n.element()).bind(function(t){return n.getSystem().getByDom(t).toOption()})}).orThunk(function(){return a.filter(Pm.isFocused)}));e.each(function(t){$k.setGroups(t,[])});var s=n.builtGroups.get();nO(r,s.concat([u]));var f=ca(r.element()),l=tO(f,s,function(t){return ca(t.element())},u);0===l.extra().length?(wm.remove(r,u),e.each(function(t){$k.setGroups(t,[])})):(nO(r,l.within()),e.each(function(t){nO(t,l.extra())})),$i(r.element(),"visibility"),Ji(r.element()),e.each(function(n){i.each(function(t){return Jm.set(t,o(n))}),c.each(Pm.focus)})},oO=nt([Pn("items"),Du(["itemSelector"]),nf("tgroupBehaviours",[hm])]),rO=nt([Ff({name:"items",unit:"item"})]),iO=al({name:"ToolbarGroup",configFields:oO(),partFields:rO(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:of(t.tgroupBehaviours,[hm.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),uO=nt([nf("splitToolbarBehaviours",[]),ae("builtGroups",function(){return ce([])})]),aO=function(o,t,n,e,r){var i="alloy.toolbar.toggle";return{uid:o.uid,dom:o.dom,components:t,behaviours:of(o.splitToolbarBehaviours,[Fb.config({others:P({},r.coupling,{overflowGroup:function(n){return iO.sketch(P({},e["overflow-group"](),{items:[wg.sketch(P({},e["overflow-button"](),{action:function(t){zo(n,i)}}))]}))}})}),rg("toolbar-toggle-events",[mr(i,function(t){r.toggleToolbar(t,o,e)})])]),apis:{setGroups:function(t,n){var e;e=F(n,t.getSystem().build),o.builtGroups.set(e),r.refresh(t,o)},refresh:function(t){r.refresh(t,o)},getMoreButton:function(t){return Wf(t,o,"overflow-button")},getOverflow:function(t){return n=t,r.getOverflow(n);var n},toggle:function(t){r.toggleToolbar(t,o,e)}},domModification:{attributes:{role:"group"}}}},cO=nt([Du(["overflowToggledClass"]),Pn("getAnchor"),Pn("lazySink")].concat(uO())),sO=nt([Df({factory:$k,schema:qk(),name:"primary"}),_f({factory:$k,schema:qk(),name:"overflow",overrides:function(n){return{toolbarBehaviours:Wu([hm.config({mode:"cyclic",onEscape:function(t){return Wf(t,n,"overflow-button").each(Pm.focus),et.none()}})])}}}),_f({name:"overflow-button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Wu([Jm.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),_f({name:"overflow-group"})]),fO=function(t,n,e){var o=Fb.getCoupled(t,"sandbox");Ks.isOpen(o)?Ks.close(o):Ks.open(o,e.overflow())},lO=function(t){return t.getSystem().isConnected()},dO=function(o,r){var t=Ks.getState(Fb.getCoupled(o,"sandbox"));eO(o,r,t,lO),t.each(function(t){var n=r.lazySink(o).getOrDie(),e=r.getAnchor(o);Ds.position(n,e,t)})},mO=al({name:"SplitFloatingToolbar",configFields:cO(),partFields:sO(),factory:function(n,t,e,o){return aO(n,t,0,o,{refresh:dO,toggleToolbar:fO,getOverflow:function(t){return Ks.getState(Fb.getCoupled(t,"sandbox"))},coupling:{sandbox:function(t){return o=t,e=n,{dom:{tag:"div",attributes:{id:(r=gu()).id()}},behaviours:Wu([hm.config({mode:"special",onEscape:function(t){return Ks.close(t),et.some(!0)}}),Ks.config({onOpen:function(t,n){dO(o,e),Wf(o,e,"overflow-button").each(function(t){Jm.on(t),r.link(t.element())}),hm.focusIn(n)},onClose:function(){Wf(o,e,"overflow-button").each(function(t){Jm.off(t),Pm.focus(t),r.unlink(t.element())})},isPartOf:function(t,n,e){return hu(n,e)||hu(o,e)},getAttachPoint:function(){return e.lazySink(o).getOrDie()}})])};var o,e,r}}})},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},getMoreButton:function(t,n){return t.getMoreButton(n)},getOverflow:function(t,n){return t.getOverflow(n)},toggle:function(t,n){t.toggle(n)}}}),gO=function(n,t){return t.getAnimationRoot.fold(function(){return n.element()},function(t){return t(n)})},pO=function(t){return t.dimension.property},hO=function(t,n){return t.dimension.getDimension(n)},vO=function(t,n){var e=gO(t,n);zi(e,[n.shrinkingClass,n.growingClass])},bO=function(t,n){Ni(t.element(),n.openClass),Ri(t.element(),n.closedClass),Wi(t.element(),pO(n),"0px"),Ji(t.element())},yO=function(t,n){Ni(t.element(),n.closedClass),Ri(t.element(),n.openClass),$i(t.element(),pO(n))},xO=function(t,n,e,o){e.setCollapsed(),Wi(t.element(),pO(n),hO(n,t.element())),Ji(t.element()),vO(t,n),bO(t,n),n.onStartShrink(t),n.onShrunk(t)},wO=function(t,n,e,o){var r=o.getOrThunk(function(){return hO(n,t.element())});e.setCollapsed(),Wi(t.element(),pO(n),r),Ji(t.element());var i=gO(t,n);Ni(i,n.growingClass),Ri(i,n.shrinkingClass),bO(t,n),n.onStartShrink(t)},SO=function(t,n,e){var o=hO(n,t.element());("0px"===o?xO:wO)(t,n,e,et.some(o))},CO=function(t,n,e){var o=gO(t,n),r=Hi(o,n.shrinkingClass),i=hO(n,t.element());yO(t,n);var u=hO(n,t.element());(r?function(){Wi(t.element(),pO(n),i),Ji(t.element())}:function(){bO(t,n)})(),Ni(o,n.shrinkingClass),Ri(o,n.growingClass),yO(t,n),Wi(t.element(),pO(n),u),e.setExpanded(),n.onStartGrow(t)},kO=function(t,n,e){var o=gO(t,n);return!0===Hi(o,n.growingClass)},OO=function(t,n,e){var o=gO(t,n);return!0===Hi(o,n.shrinkingClass)},EO=/* */Object.freeze({refresh:function(t,n,e){if(e.isExpanded()){$i(t.element(),pO(n));var o=hO(n,t.element());Wi(t.element(),pO(n),o)}},grow:function(t,n,e){e.isExpanded()||CO(t,n,e)},shrink:function(t,n,e){e.isExpanded()&&SO(t,n,e)},immediateShrink:function(t,n,e){e.isExpanded()&&xO(t,n,e)},hasGrown:function(t,n,e){return e.isExpanded()},hasShrunk:function(t,n,e){return e.isCollapsed()},isGrowing:kO,isShrinking:OO,isTransitioning:function(t,n,e){return!0===kO(t,n)||!0===OO(t,n)},toggleGrow:function(t,n,e){(e.isExpanded()?SO:CO)(t,n,e)},disableTransitions:vO}),TO=/* */Object.freeze({exhibit:function(t,n){var e=n.expanded;return Si(e?{classes:[n.openClass],styles:{}}:{classes:[n.closedClass],styles:It(n.dimension.property,"0px")})},events:function(e,o){return fr([xr(go(),function(t,n){n.event().raw().propertyName===e.dimension.property&&(vO(t,e),o.isExpanded()&&$i(t.element(),e.dimension.property),(o.isExpanded()?e.onGrown:e.onShrunk)(t))})])}}),BO=[Pn("closedClass"),Pn("openClass"),Pn("shrinkingClass"),Pn("growingClass"),Yn("getAnimationRoot"),Mu("onShrunk"),Mu("onStartShrink"),Mu("onGrown"),Mu("onStartGrow"),Zn("expanded",!1),zn("dimension",_n("property",{width:[Vu("property","width"),Vu("getDimension",function(t){return ca(t)+"px"})],height:[Vu("property","height"),Vu("getDimension",function(t){return la(t)+"px"})]}))],AO=Xu({fields:BO,name:"sliding",active:TO,apis:EO,state:/* */Object.freeze({init:function(t){var n=ce(t.expanded);return xi({isExpanded:function(){return!0===n.get()},isCollapsed:function(){return!1===n.get()},setCollapsed:g(n.set,!1),setExpanded:g(n.set,!0),readState:function(){return"expanded: "+n.get()}})}})}),DO=nt([Du(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"])].concat(uO())),_O=nt([Df({factory:$k,schema:qk(),name:"primary"}),Df({factory:$k,schema:qk(),name:"overflow",overrides:function(n){return{toolbarBehaviours:Wu([AO.config({dimension:{property:"height"},closedClass:n.markers.closedClass,openClass:n.markers.openClass,shrinkingClass:n.markers.shrinkingClass,growingClass:n.markers.growingClass,onShrunk:function(t){Wf(t,n,"overflow-button").each(function(t){Jm.off(t),Pm.focus(t)})},onGrown:function(t){hm.focusIn(t)},onStartGrow:function(t){Wf(t,n,"overflow-button").each(Jm.on)}}),hm.config({mode:"acyclic",onEscape:function(t){return Wf(t,n,"overflow-button").each(Pm.focus),et.some(!0)}})])}}}),_f({name:"overflow-button",overrides:function(t){return{buttonBehaviours:Wu([Jm.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),_f({name:"overflow-group"})]),MO=function(n,e){Wf(n,e,"overflow").each(function(t){IO(n,e),AO.toggleGrow(t)})},FO=function(t){return AO.hasGrown(t)},IO=function(t,n){var e=Wf(t,n,"overflow");eO(t,n,e,FO),e.each(AO.refresh)},RO=al({name:"SplitSlidingToolbar",configFields:DO(),partFields:_O(),factory:function(n,t,e,o){return aO(n,t,0,o,{refresh:IO,toggleToolbar:MO,getOverflow:function(t){return Wf(t,n,"overflow")},coupling:{}})},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},getMoreButton:function(t,n){return t.getMoreButton(n)},getOverflow:function(t,n){return t.getOverflow(n)},toggle:function(t,n){t.toggle(n)}}}),VO="silver.readonly",NO=pn([(NC="readonly",zn(NC,Vn))]),HO=function(t,n){var e,o,r,i=t.outerContainer;o=n,r=(e=t).outerContainer.element(),o&&(e.mothership.broadcastOn([$s()],{target:r}),e.uiMothership.broadcastOn([$s()],{target:r})),e.mothership.broadcastOn([VO],{readonly:o}),e.uiMothership.broadcastOn([VO],{readonly:o}),Ye("*",i.element()).forEach(function(t){i.getSystem().getByDom(t).each(function(t){t.hasConfigured(Qp)&&Qp.set(t,n)})})},PO=function(t,n){t.on("init",function(){t.readonly&&HO(n,!0)}),t.on("SwitchMode",function(){return HO(n,t.readonly)}),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly")},zO=function(n){var t;return Qu.config({channels:(t={},t[VO]={schema:NO,onReceive:function(t,o){n(t).each(function(t){var n,e;n=t,e=o.readonly,Ye("*",n.element()).forEach(function(t){n.getSystem().getByDom(t).each(function(t){t.hasConfigured(Qp)&&Qp.set(t,e)})})})}},t)})},LO=function(t){var n=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:P({tag:"div",classes:["tox-toolbar__group"]},n),components:[iO.parts().items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:Wu([Iy.config({}),Pm.config({})])}},jO=function(t){return iO.sketch(LO(t))},UO=function(e,t,n){var o=wr(function(t){var n=F(e.initGroups,jO);$k.setGroups(t,n)});return Wu([hm.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),rg("toolbar-events",[o]),zO(n)])},WO=function(t,n){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":LO({title:et.none(),items:[]}),"overflow-button":eC({name:"more",icon:et.some("more-drawer"),disabled:!1,tooltip:et.some("More..."),primary:!1},et.none(),t.backstage.shared.providers)},splitToolbarBehaviours:UO(t,e,n)}},GO=function(t){var n=WO(t,mO.getOverflow),e=mO.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return mO.sketch(P({},n,{lazySink:t.getSink,getAnchor:function(){return t.backstage.shared.anchors.toolbarOverflow()},parts:P({},n.parts,{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"]}}}),components:[e],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},XO=function(t){var n=RO.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=RO.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=WO(t,RO.getOverflow);return RO.sketch(P({},o,{components:[n,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"}}))},YO=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return $k.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"]},components:[$k.parts().groups({})],toolbarBehaviours:UO(t,n,nt(et.none()))})},qO=[re("disabled",!1),$n("tooltip"),$n("icon"),$n("text"),ie("onSetup",function(){return tt})],KO=pn([Ln("type"),Un("onAction")].concat(qO)),$O=function(t){return Tn("toolbarbutton",KO,t)},JO=pn([Ln("type"),$n("tooltip"),$n("icon"),$n("text"),Un("fetch"),ie("onSetup",function(){return tt})]),QO=function(t){return Tn("menubutton",JO,t)},ZO=pn([Ln("type"),$n("tooltip"),$n("icon"),$n("text"),Jn("select"),Un("fetch"),ie("onSetup",function(){return tt}),oe("presets","normal",["normal","color","listpreview"]),Zn("columns",1),Un("onAction"),Un("onItemAction")]),tE=[re("active",!1)].concat(qO),nE=pn(tE.concat([Ln("type"),Un("onAction")])),eE=function(t){return Tn("ToggleButton",nE,t)},oE=[ie("predicate",function(){return!1}),oe("scope","node",["node","editor"]),oe("position","selection",["node","selection","line"])],rE=qO.concat([Zn("type","contextformbutton"),Zn("primary",!1),Un("onAction"),ae("original",d)]),iE=tE.concat([Zn("type","contextformbutton"),Zn("primary",!1),Un("onAction"),ae("original",d)]),uE=qO.concat([Zn("type","contextformbutton")]),aE=tE.concat([Zn("type","contextformtogglebutton")]),cE=_n("type",{contextformbutton:rE,contextformtogglebutton:iE}),sE=pn([Zn("type","contextform"),ie("initValue",function(){return""}),$n("label"),Xn("commands",cE),qn("launch",_n("type",{contextformbutton:uE,contextformtogglebutton:aE}))].concat(oE)),fE=pn([Zn("type","contexttoolbar"),Ln("items")].concat(oE)),lE=oi("toolbar.button.execute"),dE={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},mE=/* */Object.freeze({getState:function(t,n,e){return e}}),gE=/* */Object.freeze({events:function(r,i){var o=function(e,o){r.updateState.each(function(t){var n=t(e,o);i.set(n)}),r.renderComponents.each(function(t){var n=t(o,i.get());Ns(e),W(n,function(t){Fs(e,e.getSystem().build(t))})})};return fr([mr(xo(),function(t,n){var e=r.channel;D(n.channels(),e)&&o(t,n.data())}),wr(function(n,t){r.initialData.each(function(t){o(n,t)})})])}}),pE=/* */Object.freeze({init:function(t){var n=ce(et.none());return{readState:function(){return n.get().getOr("none")},get:function(){return n.get()},set:function(t){return n.set(t)},clear:function(){return n.set(et.none())}}}}),hE=[Pn("channel"),Yn("renderComponents"),Yn("updateState"),Yn("initialData")],vE=Xu({fields:hE,name:"reflecting",active:gE,apis:mE,state:pE}),bE=nt([Pn("toggleClass"),Pn("fetch"),Iu("onExecute"),Zn("getHotspot",et.some),Zn("getAnchorOverrides",nt({})),Zn("layouts",et.none()),Iu("onItemExecute"),Yn("lazySink"),Pn("dom"),Mu("onOpen"),nf("splitDropdownBehaviours",[Fb,hm,Pm]),Zn("matchWidth",!1),Zn("useMinWidth",!1),Zn("eventOrder",{}),Yn("role")].concat(uy())),yE=Df({factory:wg,schema:[Pn("dom")],name:"arrow",defaults:function(t){return{buttonBehaviours:Wu([Pm.revoke()])}},overrides:function(n){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(t){t.getSystem().getByUid(n.uid).each(jo)},buttonBehaviours:Wu([Jm.config({toggleOnExecute:!1,toggleClass:n.toggleClass})])}}}),xE=Df({factory:wg,schema:[Pn("dom")],name:"button",defaults:function(t){return{buttonBehaviours:Wu([Pm.revoke()])}},overrides:function(e){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(e.uid).each(function(t){e.onExecute(t,n)})}}}}),wE=nt([yE,xE,Mf({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Pn("text")],name:"aria-descriptor"}),_f({schema:[Au()],name:"menu",defaults:function(o){return{onExecute:function(n,e){n.getSystem().getByUid(o.uid).each(function(t){o.onItemExecute(t,n,e)})}}}}),Wb()]),SE=al({name:"SplitDropdown",configFields:bE(),partFields:wE(),factory:function(o,t,n,e){var r=function(t){ll.getCurrent(t).each(function(t){kl.highlightFirst(t),hm.focusIn(t)})},i=function(t){qb(o,function(t){return t},t,e,r,gb.HighlightFirst).get(tt)},u=function(t){var n=Gf(t,o,"button");return jo(n),et.some(!0)},a=yt(fr([wr(function(e,t){Wf(e,o,"aria-descriptor").each(function(t){var n=oi("aria");Xr(t.element(),"id",n),Xr(e.element(),"aria-describedby",n)})})]),xg(et.some(i)));return{uid:o.uid,dom:o.dom,components:t,eventOrder:P({},o.eventOrder,{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:a,behaviours:of(o.splitDropdownBehaviours,[Fb.config({others:{sandbox:function(t){var n=Gf(t,o,"arrow");return Jb(o,t,{onOpen:function(){Jm.on(n),Jm.on(t)},onClose:function(){Jm.off(n),Jm.off(t)}})}}}),hm.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return i(t),et.some(!0)}}),Pm.config({}),Jm.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:o.role.getOr("button"),"aria-haspopup":!0}}}}}),CE=oi("update-menu-text"),kE=oi("update-menu-icon"),OE=function(t,n,o){var e=ce(tt),r=t.text.map(function(t){return Sg(tC(t,n,o.providers))}),i=t.icon.map(function(t){return Sg(ZS(t,o.providers.icons))}),u=function(t,n){var e=Im.getValue(t);return Pm.focus(e),Lo(e,"keydown",{raw:n.event().raw()}),Ny.close(e),et.some(!0)},a=t.role.fold(function(){return{}},function(t){return{role:t}}),c=t.tooltip.fold(function(){return{}},function(t){var n=o.providers.translate(t);return{title:n,"aria-label":n}});return Sg(Ny.sketch(P({},a,{dom:{tag:"button",classes:[n,n+"--select"].concat(F(t.classes,function(t){return n+"--"+t})),attributes:P({},c)},components:ah([i.map(function(t){return t.asSpec()}),r.map(function(t){return t.asSpec()}),et.some({dom:{tag:"div",classes:[n+"__select-chevron"],innerHtml:kg("chevron-down",o.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:Wu(t.dropdownBehaviours.concat([th(t.disabled),Hy.config({}),wm.config({}),rg("dropdown-events",[oh(t,e),rh(t,e)]),rg("menubutton-update-display-text",[mr(CE,function(n,e){r.bind(function(t){return t.getOpt(n)}).each(function(t){wm.set(t,[uu(o.providers.translate(e.event().text()))])})}),mr(kE,function(n,e){i.bind(function(t){return t.getOpt(n)}).each(function(t){wm.set(t,[ZS(e.event().icon(),o.providers.icons)])})})])])),eventOrder:bt(dE,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:Wu([hm.config({mode:"special",onLeft:u,onRight:u})]),lazySink:o.getSink,toggleClass:n+"--active",parts:{menu:mv(0,t.columns,t.presets)},fetch:function(){return jb.nu(t.fetch)}}))).asSpec()},EE=function(n){return{isDisabled:function(){return Qp.isDisabled(n)},setDisabled:function(t){return Qp.set(n,t)}}},TE=function(n){return{setActive:function(t){Jm.set(n,t)},isActive:function(){return Jm.isOn(n)},isDisabled:function(){return Qp.isDisabled(n)},setDisabled:function(t){return Qp.set(n,t)}}},BE=function(e){return{isDisabled:function(){return Qp.isDisabled(e)},setDisabled:function(t){return Qp.set(e,t)},setActive:function(t){var n=e.element();t?(Ri(n,"tox-tbtn--enabled"),Xr(n,"aria-pressed",!0)):(Ni(n,"tox-tbtn--enabled"),$r(n,"aria-pressed"))},isActive:function(){return Hi(e.element(),"tox-tbtn--enabled")}}},AE=function(t,n){return t.map(function(t){return{"aria-label":n.translate(t),title:n.translate(t)}}).getOr({})},DE=oi("focus-button"),_E=["checklist","ordered-list"],ME=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],FE=function(n,e,t,o,r,i){var u,a=function(t){return bp.isRtl()&&D(_E,t)?t+"-rtl":t},c=bp.isRtl()&&n.exists(function(t){return D(ME,t)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(c?["tox-tbtn__icon-rtl"]:[]),attributes:AE(t,i)},components:ah([n.map(function(t){return QS(a(t),i.icons)}),e.map(function(t){return tC(t,"tox-tbtn",i)})]),eventOrder:(u={},u[no()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:Wu([rg("common-button-display-events",[mr(no(),function(t,n){n.event().prevent(),zo(t,DE)})])].concat(o.map(function(t){return vE.config({channel:t,initialData:{icon:n,text:e},renderComponents:function(t,n){return ah([t.icon.map(function(t){return QS(a(t),i.icons)}),t.text.map(function(t){return tC(t,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}},IE=function(t,n,e){var o,r=ce(tt),i=FE(t.icon,t.text,t.tooltip,et.none(),et.none(),e);return wg.sketch({dom:i.dom,components:i.components,eventOrder:dE,buttonBehaviours:Wu([rg("toolbar-button-events",[(o={onAction:t.onAction,getApi:n.getApi},kr(function(n,t){eh(o,n)(function(t){Lo(n,lE,{buttonApi:t}),o.onAction(t)})})),oh(n,r),rh(n,r)]),th(t.disabled)].concat(n.toolbarButtonBehaviours))})},RE=function(t,n,e){return IE(t,{toolbarButtonBehaviours:[].concat(0<e.length?[rg("toolbarButtonWith",e)]:[]),getApi:EE,onSetup:t.onSetup},n)},VE=function(t,n,e){return bt(IE(t,{toolbarButtonBehaviours:[wm.config({}),Jm.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(0<e.length?[rg("toolbarToggleButtonWith",e)]:[]),getApi:TE,onSetup:t.onSetup},n))},NE=function(n,t){var e,o,r,i,u=oi("channel-update-split-dropdown-display"),a=function(e){return{isDisabled:function(){return Qp.isDisabled(e)},setDisabled:function(t){return Qp.set(e,t)},setIconFill:function(t,n){du(e.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each(function(t){Xr(t,"fill",n)})},setIconStroke:function(t,n){du(e.element(),'svg path[id="'+t+'"], rect[id="'+t+'"]').each(function(t){Xr(t,"stroke",n)})},setActive:function(n){Xr(e.element(),"aria-pressed",n),du(e.element(),"span").each(function(t){e.getSystem().getByDom(t).each(function(t){return Jm.set(t,n)})})},isActive:function(){return du(e.element(),"span").exists(function(t){return e.getSystem().getByDom(t).exists(Jm.isOn)})}}},c=ce(tt),s={getApi:a,onSetup:n.onSetup};return SE.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:yt({"aria-pressed":!1},AE(n.tooltip,t.providers))},onExecute:function(t){n.onAction(a(t))},onItemExecute:function(t,n,e){},splitDropdownBehaviours:Wu([nh(!1),rg("split-dropdown-events",[mr(DE,Pm.focus),oh(s,c),rh(s,c)])]),eventOrder:(e={},e[_o()]=["alloy.base.behaviour","split-dropdown-events"],e),toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:(o=a,r=n,i=t.providers,function(n){return jb.nu(function(t){return r.fetch(t)}).map(function(t){return et.from(Iv(bt(vv(oi("menu-value"),t,function(t){r.onItemAction(o(n),t)},r.columns,r.presets,ih.CLOSE_ON_EXECUTE,r.select.getOr(function(){return!1}),i),{movement:yv(r.columns,r.presets),menuBehaviours:cp("auto"!==r.columns?[]:[wr(function(o,t){up(o,4,Tp(r.presets)).each(function(t){var n=t.numRows,e=t.numColumns;hm.setGridSize(o,n,e)})})])})))})}),parts:{menu:mv(0,n.columns,n.presets)},components:[SE.parts().button(FE(n.icon,n.text,et.none(),et.some(u),et.some([Jm.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),SE.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:kg("chevron-down",t.providers.icons)}}),SE.parts()["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})},HE=function(t,n,e,o){return OE({text:t.text,icon:t.icon,tooltip:t.tooltip,role:o,fetch:function(n){t.fetch(function(t){n(xy(t,ih.CLOSE_ON_EXECUTE,e))})},onSetup:t.onSetup,getApi:BE,columns:1,presets:"normal",classes:[],dropdownBehaviours:[]},n,e.shared)},PE=function(i,u){return mr(lE,function(t,n){var e,o=i.get(t),r=(e=o,{hide:function(){return zo(e,Eo())},getValue:function(){return Im.getValue(e)}});u.onAction(r,n.event().buttonApi())})},zE=function(t,n,e){var o,r,i,u,a,c,s,f,l,d,m,g,p={backstage:{shared:{providers:e}}};return"contextformtogglebutton"===n.type?(s=t,l=p,(d=(f=n).original).primary,m=h(d,["primary"]),g=Bn(eE(P({},m,{type:"togglebutton",onAction:function(){}}))),VE(g,l.backstage.shared.providers,[PE(s,f)])):(o=t,i=p,(u=(r=n).original).primary,a=h(u,["primary"]),c=Bn($O(P({},a,{type:"button",onAction:function(){}}))),RE(c,i.backstage.shared.providers,[PE(o,r)]))},LE=function(t,n){var e,o,r,i,u=t.label.fold(function(){return{}},function(t){return{"aria-label":t}}),a=Sg(wy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:u,selectOnFocus:!0,inputBehaviours:Wu([hm.config({mode:"special",onEnter:function(t){return c.findPrimary(t).map(function(t){return jo(t),!0})},onLeft:function(t,n){return n.cut(),et.none()},onRight:function(t,n){return n.cut(),et.none()}})])})),c=(e=a,o=t.commands,r=n.shared.providers,i=F(o,function(t){return Sg(zE(e,t,r))}),{asSpecs:function(){return F(i,function(t){return t.asSpec()})},findPrimary:function(e){return bu(o,function(t,n){return t.primary?et.from(i[n]).bind(function(t){return t.getOpt(e)}).filter(x(Qp.isDisabled)):et.none()})}});return YO({uid:oi("context-toolbar"),initGroups:[{title:et.none(),items:[a.asSpec()]},{title:et.none(),items:c.asSpecs()}],onEscape:et.none,cyclicKeying:!0,backstage:n,getSink:function(){return z.error("")}})},jE=oi("forward-slide"),UE=oi("backward-slide"),WE=oi("change-slide-event"),GE="tox-pop--resizing",XE=function(n,t){return bu(t,function(t){return t.predicate(n.dom())?et.some({toolbarApi:t,elem:n}):et.none()})},YE=function(n,e){var t=function(t){return t.dom()===e.getBody()},o=fe.fromDom(e.selection.getNode());return XE(o,n.inNodeScope).orThunk(function(){return XE(o,n.inEditorScope).orThunk(function(){return function(t,n,e){for(var o=t.dom(),r=E(e)?e:nt(!1);o.parentNode;){o=o.parentNode;var i=fe.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return et.none()}(o,function(t){return XE(t,n.inNodeScope)},t)})})},qE=function(e,r){var t={},i=[],u=[],a={},c={},o=function(n,e){var o=Bn(Tn("ContextForm",sE,e));(t[n]=o).launch.map(function(t){a["form:"+n]=P({},e.launch,{type:"contextformtogglebutton"===t.type?"togglebutton":"button",onAction:function(){r(o)}})}),"editor"===o.scope?u.push(o):i.push(o),c[n]=o},s=function(n,e){var t;(t=e,Tn("ContextToolbar",fE,t)).each(function(t){"editor"===e.scope?u.push(t):i.push(t),c[n]=t})},n=ut(e);return W(n,function(t){var n=e[t];"contextform"===n.type?o(t,n):"contexttoolbar"===n.type&&s(t,n)}),{forms:t,inNodeScope:i,inEditorScope:u,lookupTable:c,formNavigators:a}},KE=function(o,r){return function(n){var e=ce(et.none()),t=function(){n.setActive(o.formatter.match(r));var t=o.formatter.formatChanged(r,n.setActive).unbind;e.set(et.some(t))};return o.initialized?t():o.on("init",t),function(){return e.get().each(function(t){return t()})}}},$E=function(n){return function(t){return function(){n.undoManager.transact(function(){n.focus(),n.execCommand("mceToggleFormat",!1,t.format)})}}},JE=function(t,n,e,o){var u,a,r,c,i,s="basic"===e.type?function(){return F(e.data,function(t){return vk(t,o.isSelectedFor,o.getPreviewFor)})}:e.getData;return{items:(u=n,a=o,r=function(t,n,e,o){var r=u.shared.providers.translate(t.title);if("separator"===t.type)return et.some({type:"separator",text:r});if("submenu"!==t.type)return et.some(P({type:"togglemenuitem",text:r,active:t.isSelected(o),disabled:e,onAction:a.onAction(t)},t.getStylePreview().fold(function(){return{}},function(t){return{meta:{style:t}}})));var i=K(t.getStyleItems(),function(t){return c(t,n,o)});return 0===n&&i.length<=0?et.none():et.some({type:"nestedmenuitem",text:r,disabled:i.length<=0,getSubmenuItems:function(){return K(t.getStyleItems(),function(t){return c(t,n,o)})}})},c=function(t,n,e){var o="formatter"===t.type&&a.isInvalid(t);return 0===n?o?[]:r(t,n,!1,e).toArray():r(t,n,o,e).toArray()},i=function(t){var n=a.getCurrentValue(),e=a.shouldHide?0:1;return K(t,function(t){return c(t,e,n)})},{validateItems:i,getFetch:function(o,r){return function(t){var n=r(),e=i(n);t(xy(e,ih.CLOSE_ON_EXECUTE,o))}}}),getStyleItems:s}},QE=function(o,t,n,r){var e=JE(0,t,n,r),i=e.items,u=e.getStyleItems;return OE({text:r.icon.isSome()?et.none():et.some(""),icon:r.icon,tooltip:et.from(r.tooltip),role:et.none(),fetch:i.getFetch(t,u),onSetup:function(e){return r.setInitialValue.each(function(t){return t(e.getComponent())}),r.nodeChangeHandler.map(function(t){var n=t(e.getComponent());return o.on("NodeChange",n),function(){o.off("NodeChange",n)}}).getOr(tt)},getApi:function(t){return{getComponent:function(){return t}}},columns:1,presets:"normal",classes:r.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};(PC=HC||(HC={}))[PC.SemiColon=0]="SemiColon",PC[PC.Space=1]="Space";var ZE,tT,nT=function(t,n,e,o){var r,i,u=Ft(t.settings,n).getOr(e);return{type:"basic",data:(i=u,r=o===HC.SemiColon?i.replace(/;$/,"").split(";"):i.split(" "),F(r,function(t){var n=t,e=t,o=t.split("=");return 1<o.length&&(n=o[0],e=o[1]),{title:n,format:e}}))}},eT=[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}],oT=function(e){var n=function(t){var n=N(eT,function(t){return e.formatter.match(t.format)}).fold(function(){return"left"},function(t){return t.title.toLowerCase()});Lo(t,kE,{icon:"align-"+n})},t=et.some(function(t){return function(){return n(t)}}),o=et.some(function(t){return n(t)}),r={type:"basic",data:eT};return{tooltip:"Align",icon:et.some("align-left"),isSelectedFor:function(t){return function(){return e.formatter.match(t)}},getCurrentValue:nt(et.none()),getPreviewFor:function(t){return function(){return et.none()}},onAction:$E(e),setInitialValue:o,nodeChangeHandler:t,dataset:r,shouldHide:!1,isInvalid:function(t){return!e.formatter.canApply(t.format)}}},rT=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],iT=function(t){var n=t.split(/\s*,\s*/);return F(n,function(t){return t.replace(/^['"]+|['"]+$/g,"")})},uT=function(r){var i=function(){var e=function(t){return t?iT(t)[0]:""},t=r.queryCommandValue("FontName"),n=u.data,o=t?t.toLowerCase():"";return{matchOpt:N(n,function(t){var n=t.format;return n.toLowerCase()===o||e(n).toLowerCase()===e(o).toLowerCase()}).orThunk(function(){return 0===(t=o).indexOf("-apple-system")&&(n=iT(t.toLowerCase()),$(rT,function(t){return-1<n.indexOf(t.toLowerCase())}))?et.from({title:"System Font",format:o}):et.none();var t,n}),font:t}},n=function(t){var n=i(),e=n.matchOpt,o=n.font,r=e.fold(function(){return o},function(t){return t.title});Lo(t,CE,{text:r})},t=et.some(function(t){return function(){return n(t)}}),e=et.some(function(t){return n(t)}),u=nT(r,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",HC.SemiColon);return{tooltip:"Fonts",icon:et.none(),isSelectedFor:function(n){return function(t){return t.exists(function(t){return t.format===n})}},getCurrentValue:function(){return i().matchOpt},getPreviewFor:function(t){return function(){return et.some({tag:"div",styleAttr:-1===t.indexOf("dings")?"font-family:"+t:""})}},onAction:function(t){return function(){r.undoManager.transact(function(){r.focus(),r.execCommand("FontName",!1,t.format)})}},setInitialValue:e,nodeChangeHandler:t,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},aT={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},cT=function(t,n){return/[0-9.]+px$/.test(t)?(e=72*parseInt(t,10)/96,o=n||0,r=Math.pow(10,o),Math.round(e*r)/r+"pt"):t;var e,o,r},sT=function(e){var i=function(){var o=et.none(),r=u.data,i=e.queryCommandValue("FontSize");if(i)for(var t=function(t){var n=cT(i,t),e=mt(aT,n).getOr("");o=N(r,function(t){return t.format===i||t.format===n||t.format===e})},n=3;o.isNone()&&0<=n;n--)t(n);return{matchOpt:o,px:i}},n=function(t){var n=i(),e=n.matchOpt,o=n.px,r=e.fold(function(){return o},function(t){return t.title});Lo(t,CE,{text:r})},t=et.some(function(t){return function(){return n(t)}}),o=et.some(function(t){return n(t)}),u=nT(e,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",HC.Space);return{tooltip:"Font sizes",icon:et.none(),isSelectedFor:function(n){return function(t){return t.exists(function(t){return t.format===n})}},getPreviewFor:function(){return nt(et.none())},getCurrentValue:function(){return i().matchOpt},onAction:function(t){return function(){e.undoManager.transact(function(){e.focus(),e.execCommand("FontSize",!1,t.format)})}},setInitialValue:o,nodeChangeHandler:t,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},fT=function(e,t,n){var o=t();return bu(n,function(n){return N(o,function(t){return e.formatter.matchNode(n,t.format)})}).orThunk(function(){return e.formatter.match("p")?et.some({title:"Paragraph",format:"p"}):et.none()})},lT=function(t){var n=t.selection.getStart(!0)||t.getBody();return t.dom.getParents(n,function(){return!0},t.getBody())},dT=function(o){var e=function(t,n){var e=fT(o,function(){return r.data},t).fold(function(){return"Paragraph"},function(t){return t.title});Lo(n,CE,{text:e})},t=et.some(function(n){return function(t){return e(t.parents,n)}}),n=et.some(function(t){var n=lT(o);e(n,t)}),r=nT(o,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",HC.SemiColon);return{tooltip:"Blocks",icon:et.none(),isSelectedFor:function(t){return function(){return o.formatter.match(t)}},getCurrentValue:nt(et.none()),getPreviewFor:function(n){return function(){var t=o.formatter.get(n);return et.some({tag:0<t.length&&(t[0].inline||t[0].block)||"div",styleAttr:o.formatter.getCssText(n)})}},onAction:$E(o),setInitialValue:n,nodeChangeHandler:t,dataset:r,shouldHide:!1,isInvalid:function(t){return!o.formatter.canApply(t.format)}}},mT=function(i){var e=function(t,n){var e=function(t){var n=t.items;return n!==undefined&&0<n.length?K(n,e):[{title:t.title,format:t.format}]},o=K(hk(i),e),r=fT(i,function(){return o},t).fold(function(){return"Paragraph"},function(t){return t.title});Lo(n,CE,{text:r})},t=et.some(function(n){return function(t){return e(t.parents,n)}}),n=et.some(function(t){var n=lT(i);e(n,t)});return{tooltip:"Formats",icon:et.none(),isSelectedFor:function(t){return function(){return i.formatter.match(t)}},getCurrentValue:nt(et.none()),getPreviewFor:function(n){return function(){var t=i.formatter.get(n);return t!==undefined?et.some({tag:0<t.length&&(t[0].inline||t[0].block)||"div",styleAttr:i.formatter.getCssText(n)}):et.none()}},onAction:$E(i),setInitialValue:n,nodeChangeHandler:t,shouldHide:i.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(t){return!i.formatter.canApply(t.format)}}},gT=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],pT=function(o,r){return function(t,n){var e=o(t).mapError(function(t){return Dn(t)}).getOrDie();return r(e,n)}},hT={button:pT($O,function(t,n){return e=t,o=n.backstage.shared.providers,RE(e,o,[]);var e,o}),togglebutton:pT(eE,function(t,n){return e=t,o=n.backstage.shared.providers,VE(e,o,[]);var e,o}),menubutton:pT(QO,function(t,n){return HE(t,"tox-tbtn",n.backstage,et.none())}),splitbutton:pT(function(t){return Tn("SplitButton",ZO,t)},function(t,n){return NE(t,n.backstage.shared)}),styleSelectButton:function(t,n){return e=t,o=n.backstage,r=o.styleselect,QE(e,o,r,mT(e));var e,o,r},fontsizeSelectButton:function(t,n){return e=t,o=n.backstage,r=sT(e),QE(e,o,r.dataset,r);var e,o,r},fontSelectButton:function(t,n){return e=t,o=n.backstage,r=uT(e),QE(e,o,r.dataset,r);var e,o,r},formatButton:function(t,n){return e=t,o=n.backstage,r=dT(e),QE(e,o,r.dataset,r);var e,o,r},alignMenuButton:function(t,n){return e=t,o=n.backstage,r=oT(e),QE(e,o,r.dataset,r);var e,o,r}},vT={styleselect:hT.styleSelectButton,fontsizeselect:hT.fontsizeSelectButton,fontselect:hT.fontSelectButton,formatselect:hT.formatButton,align:hT.alignMenuButton},bT=function(t){var n,e,o,r=t.toolbar,i=t.buttons;return!1===r?[]:r===undefined||!0===r?(e=i,o=F(gT,function(t){var n=I(t.items,function(t){return gt(e,t)||gt(vT,t)});return{name:t.name,items:n}}),I(o,function(t){return 0<t.items.length})):L(r)?(n=r.split("|"),F(n,function(t){return{items:t.trim().split(" ")}})):T(r,function(t){return gt(t,"name")&&gt(t,"items")})?r:(H.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},yT=function(n,e,o,r,t){return mt(e,o.toLowerCase()).orThunk(function(){return t.bind(function(t){return bu(t,function(t){return mt(e,t+o.toLowerCase())})})}).fold(function(){return mt(vT,o.toLowerCase()).map(function(t){return t(n,r)}).orThunk(function(){return et.none()})},function(t){return e=r,mt(hT,(n=t).type).fold(function(){return H.console.error("skipping button defined by",n),et.none()},function(t){return et.some(t(n,e))});var n,e})},xT=function(e,o,r,i){var t=bT(o),n=F(t,function(t){var n=K(t.items,function(t){return 0===t.trim().length?[]:yT(e,o.buttons,t,r,i).toArray()});return{title:et.from(e.translate(t.name)),items:n}});return I(n,function(t){return 0<t.items.length})},wT=function(i,t,u,c){var e,o,s=su((e={sink:u,onEscape:function(){return i.focus(),et.some(!0)}},o=ce([]),yg.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){o.set([]),yg.getContent(t).each(function(t){$i(t.element(),"visibility")}),Ni(t.element(),GE),$i(t.element(),"width")},inlineBehaviours:Wu([rg("context-toolbar-events",[xr(go(),function(t,n){yg.getContent(t).each(function(t){}),Ni(t.element(),GE),$i(t.element(),"width")}),mr(WE,function(n,e){$i(n.element(),"width");var t=ca(n.element());yg.setContent(n,e.event().contents()),Ri(n.element(),GE);var o=ca(n.element());Wi(n.element(),"width",t+"px"),yg.getContent(n).each(function(t){e.event().focus().bind(function(t){return Rl(t),Nl(n.element())}).orThunk(function(){return hm.focusIn(t),Vl()})}),Tg.setTimeout(function(){Wi(n.element(),"width",o+"px")},0)}),mr(jE,function(t,n){yg.getContent(t).each(function(t){o.set(o.get().concat([{bar:t,focus:Vl()}]))}),Lo(t,WE,{contents:n.event().forwardContents(),focus:et.none()})}),mr(UE,function(n,t){rt(o.get()).each(function(t){o.set(o.get().slice(0,o.get().length-1)),Lo(n,WE,{contents:fu(t.bar),focus:t.focus})})})]),hm.config({mode:"special",onEscape:function(n){return rt(o.get()).fold(function(){return e.onEscape()},function(t){return zo(n,UE),et.some(!0)})}})]),lazySink:function(){return z.value(e.sink)}}))),f=function(){return et.some(fe.fromDom(i.contentAreaContainer))};i.on("init",function(){var t=i.getBody().ownerDocument.defaultView,n=zv(fe.fromDom(t),"scroll",function(){l.get().each(function(t){var n=d.get().getOr(i.selection.getNode()).getBoundingClientRect(),e=i.contentAreaContainer.getBoundingClientRect(),o=n.bottom<0,r=n.top>e.height;o||r?Wi(s.element(),"display","none"):($i(s.element(),"display"),Ds.positionWithin(u,t,s,f()))})});i.on("remove",function(){n.unbind()})});var l=ce(et.none()),d=ce(et.none()),n=ce(null),m=function(t){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:Wu([hm.config({mode:"acyclic"}),rg("pop-dialog-wrap-events",[wr(function(t){i.shortcuts.add("ctrl+F9","focus statusbar",function(){return hm.focusIn(t)})}),Sr(function(t){i.shortcuts.remove("ctrl+F9")})])])}},a=xt(function(){return qE(t,function(t){var n=g(t);Lo(s,jE,{forwardContents:m(n)})})}),g=function(t){var n,e,o=i.ui.registry.getAll().buttons,r=a();return"contexttoolbar"===t.type?(n=yt(o,r.formNavigators),e=xT(i,{buttons:n,toolbar:t.items},c,et.some(["form:"])),YO({uid:oi("context-toolbar"),initGroups:e,onEscape:et.none,cyclicKeying:!0,backstage:c.backstage,getSink:function(){return z.error("")}})):LE(t,c.backstage)};i.on("contexttoolbar-show",function(n){var t=a();Ft(t.lookupTable,n.toolbarKey).each(function(t){b(t,n.target===i?et.none():et.some(n)),yg.getContent(s).each(hm.focusIn)})});var r={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},p={maxHeightFunction:Wa()},h={bubble:Ka(12,0,r),layouts:{onLtr:function(){return[fc]},onRtl:function(){return[lc]}},overrides:p},v={bubble:Ka(0,12,r),layouts:{onLtr:function(){return[cc,sc,uc,rc,ac,ic]},onRtl:function(){return[cc,sc,ac,ic,uc,rc]}},overrides:p},b=function(t,n){x();var e,o,r,i=g(t),u=n.map(fe.fromDom),a=(e=t.position,o=u,r="node"===e?c.backstage.shared.anchors.node(o):c.backstage.shared.anchors.cursor(),bt(r,"line"===e?h:v));l.set(et.some(a)),d.set(n),yg.showWithin(s,a,m(i),f()),$i(s.element(),"display")},y=function(){var t=a();YE(t,i).fold(function(){l.set(et.none()),yg.hide(s)},function(t){b(t.toolbarApi,et.some(t.elem.dom()))})},x=function(){var t=n.get();null!==t&&(Tg.clearTimeout(t),n.set(null))},w=function(t){x(),n.set(t)};i.on("init",function(){i.on("click keyup SetContent ObjectResized ResizeEditor",function(t){w(Tg.setEditorTimeout(i,y,0))}),i.on("focusout",function(t){Tg.setEditorTimeout(i,function(){Nl(u.element()).isNone()&&Nl(s.element()).isNone()&&(l.set(et.none()),yg.hide(s))},0)}),i.on("SwitchMode",function(){i.readonly&&(l.set(et.none()),yg.hide(s))}),i.on("NodeChange",function(t){Nl(s.element()).fold(function(){w(Tg.setEditorTimeout(i,y,0))},function(t){})})})},ST=function(t,e,o){var n=zv(fe.fromDom(H.document),"mousedown",function(n){W([e,o],function(t){t.broadcastOn([$s()],{target:n.target()})})}),r=zv(fe.fromDom(H.document),"touchstart",function(n){W([e,o],function(t){t.broadcastOn([$s()],{target:n.target()})})}),i=zv(fe.fromDom(H.document),"mouseup",function(n){0===n.raw().button&&W([e,o],function(t){t.broadcastOn([Js()],{target:n.target()})})}),u=function(n){W([e,o],function(t){t.broadcastOn([$s()],{target:fe.fromDom(n.target)})})};t.on("mousedown",u),t.on("touchstart",u);var a=function(n){0===n.button&&W([e,o],function(t){t.broadcastOn([Js()],{target:fe.fromDom(n.target)})})};t.on("mouseup",a);var c=function(n){W([e,o],function(t){t.broadcastEvent(Ao(),n)})};t.on("ScrollWindow",c);var s=function(n){W([e,o],function(t){t.broadcastEvent(Do(),n)})};t.on("ResizeWindow",s),t.on("remove",function(){t.off("mousedown",u),t.off("touchstart",u),t.off("mouseup",a),t.off("ResizeWindow",s),t.off("ScrollWindow",c),n.unbind(),r.unbind(),i.unbind()}),t.on("detach",function(){zs(e),zs(o),e.destroy(),o.destroy()})},CT=nt([Zn("shell",!1),Pn("makeItem"),Zn("setupItem",tt),rf("listBehaviours",[wm])]),kT=Mf({name:"items",overrides:function(t){return{behaviours:Wu([wm.config({})])}}}),OT=nt([kT]),ET=al({name:nt("CustomList")(),configFields:CT(),partFields:OT(),factory:function(s,t,n,e){var o=s.shell?{behaviours:[wm.config({})],components:[]}:{behaviours:[],components:t},r=function(t){return s.shell?et.some(t):Wf(t,s,"items")};return{uid:s.uid,dom:s.dom,components:o.components,behaviours:of(s.listBehaviours,o.behaviours),apis:{setItems:function(a,c){r(a).fold(function(){throw H.console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},function(n){var t=wm.contents(n),e=c.length,o=e-t.length,r=0<o?function(t,n){for(var e=[],o=0;o<t;o++)e.push(n(o));return e}(o,function(){return s.makeItem()}):[],i=t.slice(e);W(i,function(t){return wm.remove(n,t)}),W(r,function(t){return wm.append(n,t)});var u=wm.contents(n);W(u,function(t,n){s.setupItem(a,t,c[n],n)})})}}}},apis:{setItems:function(t,n,e){t.setItems(n,e)}}}),TT=Qf,BT=Rf,AT=ul({factory:function(n,o){var t={focus:hm.focusIn,setMenus:function(t,n){var e=F(n,function(n){var t={type:"menubutton",text:n.text,fetch:function(t){t(n.getItems())}},e=QO(t).mapError(function(t){return Dn(t)}).getOrDie();return HE(e,"tox-mbtn",o.backstage,et.some("menuitem"))});wm.set(t,e)}};return{uid:n.uid,dom:n.dom,components:[],behaviours:Wu([wm.config({}),rg("menubar-events",[wr(function(t){n.onSetup(t)}),mr(io(),function(e,t){du(e.element(),".tox-mbtn--active").each(function(n){mu(t.event().target(),".tox-mbtn").each(function(t){qe(n,t)||e.getSystem().getByDom(n).each(function(n){e.getSystem().getByDom(t).each(function(t){Ny.expand(t),Ny.close(n),Pm.focus(t)})})})})}),mr(Io(),function(e,t){t.event().prevFocus().bind(function(t){return e.getSystem().getByDom(t).toOption()}).each(function(n){t.event().newFocus().bind(function(t){return e.getSystem().getByDom(t).toOption()}).each(function(t){Ny.isOpen(n)&&(Ny.expand(t),Ny.close(n))})})})]),hm.config({mode:"flow",selector:".tox-mbtn",onEscape:function(t){return n.onEscape(t),et.some(!0)}}),Iy.config({})]),apis:t,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[Pn("dom"),Pn("uid"),Pn("onEscape"),Pn("backstage"),Zn("onSetup",tt)],apis:{focus:function(t,n){t.focus(n)},setMenus:function(t,n,e){t.setMenus(n,e)}}}),DT="container",_T=[nf("slotBehaviours",[])],MT=function(t){return"<alloy.field."+t+">"},FT=function(r,t,n){var e,o=function(t){return qf(r)},i=function(e,o){return void 0===o&&(o=undefined),function(t,n){return Wf(t,r,n).map(function(t){return e(t,n)}).getOr(o)}},u=function(t,n){return"true"!==qr(t.element(),"aria-hidden")},a=i(u,!1),c=i(function(t,n){if(u(t)){var e=t.element();Wi(e,"display","none"),Xr(e,"aria-hidden","true"),Lo(t,Ro(),{name:n,visible:!1})}}),s=(e=c,function(n,t){W(t,function(t){return e(n,t)})}),f=i(function(t,n){if(!u(t)){var e=t.element();$i(e,"display"),$r(e,"aria-hidden"),Lo(t,Ro(),{name:n,visible:!0})}}),l={getSlotNames:o,getSlot:function(t,n){return Wf(t,r,n)},isShowing:a,hideSlot:c,hideAllSlots:function(t){return s(t,o())},showSlot:f};return{uid:r.uid,dom:r.dom,components:t,behaviours:ef(r.slotBehaviours),apis:l}},IT=st({getSlotNames:function(t,n){return t.getSlotNames(n)},getSlot:function(t,n,e){return t.getSlot(n,e)},isShowing:function(t,n,e){return t.isShowing(n,e)},hideSlot:function(t,n,e){return t.hideSlot(n,e)},hideAllSlots:function(t,n){return t.hideAllSlots(n)},showSlot:function(t,n,e){return t.showSlot(n,e)}},bi),RT=P({},IT,{sketch:function(t){var e,n=(e=[],{slot:function(t,n){return e.push(t),Pf(DT,MT(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=F(r,function(t){return Df({name:t,pname:MT(t)})});return tl(DT,_T,i,FT,o)}}),VT=pn([$n("icon"),$n("tooltip"),ie("onShow",tt),ie("onHide",tt),ie("onSetup",function(){return tt})]),NT=function(t){return{element:function(){return t.element().dom()}}},HT=function(e,o){var r=F(ut(o),function(t){var n=o[t],e=Bn(Tn("sidebar",VT,n));return{name:t,getApi:NT,onSetup:e.onSetup,onShow:e.onShow,onHide:e.onHide}});return F(r,function(t){var n=ce(tt);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:cp([oh(t,n),rh(t,n),mr(Ro(),function(n,t){var e=t.event();N(r,function(t){return t.name===e.name()}).each(function(t){(e.visible()?t.onShow:t.onHide)(t.getApi(n))})})])})})},PT=function(t,e){ll.getCurrent(t).each(function(t){return wm.set(t,[(n=e,RT.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:HT(t,n),slotBehaviours:cp([wr(function(t){return RT.hideAllSlots(t)})])}}))]);var n})},zT=function(t){return ll.getCurrent(t).bind(function(t){return AO.isGrowing(t)||AO.hasGrown(t)?ll.getCurrent(t).bind(function(n){return N(RT.getSlotNames(n),function(t){return RT.isShowing(n,t)})}):et.none()})},LT=oi("FixSizeEvent"),jT=oi("AutoSizeEvent"),UT=function(t,n,e){var o,r=t.element();!0===n?(wm.set(t,[(o=e,{dom:{tag:"div",attributes:{"aria-label":o.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:vp('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:Wu([hm.config({mode:"special",onTab:function(){return et.some(!0)},onShiftTab:function(){return et.some(!0)}}),Pm.config({})])})]),$i(r,"display"),$r(r,"aria-hidden")):(wm.set(t,[]),Wi(r,"display","none"),Xr(r,"aria-hidden","true"))},WT=BT.optional({factory:AT,name:"menubar",schema:[Pn("backstage")]}),GT=BT.optional({factory:{sketch:function(t){return ET.sketch({uid:t.uid,dom:t.dom,listBehaviours:Wu([hm.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return YO({uid:oi("multiple-toolbar-item"),backstage:t.backstage,cyclicKeying:!1,getSink:t.getSink,initGroups:[],onEscape:function(){return et.none()}})},setupItem:function(t,n,e,o){$k.setGroups(n,e)},shell:!0})}},name:"multiple-toolbar",schema:[Pn("dom"),Pn("onEscape")]}),XT=BT.optional({factory:{sketch:function(t){var n;return((n=t).split===ib.sliding?XO:n.split===ib.floating?GO:YO)({uid:t.uid,onEscape:function(){return t.onEscape(),et.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,backstage:t.backstage,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton}})}},name:"toolbar",schema:[Pn("dom"),Pn("onEscape"),Pn("getSink")]}),YT=BT.optional({name:"socket",schema:[Pn("dom")]}),qT=BT.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Wu([Iy.config({}),Pm.config({}),AO.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){ll.getCurrent(t).each(RT.hideAllSlots),zo(t,jT)},onGrown:function(t){zo(t,jT)},onStartGrow:function(t){Lo(t,LT,{width:qi(t.element(),"width").getOr("")})},onStartShrink:function(t){Lo(t,LT,{width:ca(t.element())+"px"})}}),wm.config({}),ll.config({find:function(t){var n=wm.contents(t);return ot(n)}})])}],behaviours:Wu([Xw(0),rg("sidebar-sliding-events",[mr(LT,function(t,n){Wi(t.element(),"width",n.event().width())}),mr(jT,function(t,n){$i(t.element(),"width")})])])}}},name:"sidebar",schema:[Pn("dom")]}),KT=BT.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Wu([wm.config({})]),components:[]}}},name:"throbber",schema:[Pn("dom")]}),$T=al({name:"OuterContainer",factory:function(e,t,n){var o={getSocket:function(t){return TT.getPart(t,e,"socket")},setSidebar:function(t,n){TT.getPart(t,e,"sidebar").each(function(t){return PT(t,n)})},toggleSidebar:function(t,o){TT.getPart(t,e,"sidebar").each(function(t){return n=t,e=o,void ll.getCurrent(n).each(function(n){ll.getCurrent(n).each(function(t){AO.hasGrown(n)?RT.isShowing(t,e)?AO.shrink(n):(RT.hideAllSlots(t),RT.showSlot(t,e)):(RT.hideAllSlots(t),RT.showSlot(t,e),AO.grow(n))})});var n,e})},whichSidebar:function(t){return TT.getPart(t,e,"sidebar").bind(zT).getOrNull()},getToolbar:function(t){return TT.getPart(t,e,"toolbar")},setToolbar:function(t,n){TT.getPart(t,e,"toolbar").each(function(t){t.getApis().setGroups(t,n)})},setToolbars:function(t,n){TT.getPart(t,e,"multiple-toolbar").each(function(t){ET.setItems(t,n)})},refreshToolbar:function(t){TT.getPart(t,e,"toolbar").each(function(t){return t.getApis().refresh(t)})},getMoreButton:function(t){return TT.getPart(t,e,"toolbar").bind(function(t){return t.getApis().getMoreButton(t)})},getThrobber:function(t){return TT.getPart(t,e,"throbber")},focusToolbar:function(t){TT.getPart(t,e,"toolbar").orThunk(function(){return TT.getPart(t,e,"multiple-toolbar")}).each(function(t){hm.focusIn(t)})},setMenubar:function(t,n){TT.getPart(t,e,"menubar").each(function(t){AT.setMenus(t,n)})},focusMenubar:function(t){TT.getPart(t,e,"menubar").each(function(t){AT.focus(t)})}};return{uid:e.uid,dom:e.dom,components:t,apis:o,behaviours:e.behaviours}},configFields:[Pn("dom"),Pn("behaviours")],partFields:[WT,XT,GT,YT,qT,KT],apis:{getSocket:function(t,n){return t.getSocket(n)},setSidebar:function(t,n,e){t.setSidebar(n,e)},toggleSidebar:function(t,n,e){t.toggleSidebar(n,e)},whichSidebar:function(t,n){return t.whichSidebar(n)},getToolbar:function(t,n){return t.getToolbar(n)},setToolbar:function(t,n,e){var o=F(e,function(t){return jO(t)});t.setToolbar(n,o)},setToolbars:function(t,n,e){var o=F(e,function(t){return F(t,jO)});t.setToolbars(n,o)},getMoreButton:function(t,n){return t.getMoreButton(n)},refreshToolbar:function(t,n){return t.refreshToolbar(n)},getThrobber:function(t,n){return t.getThrobber(n)},setMenubar:function(t,n,e){t.setMenubar(n,e)},focusMenubar:function(t,n){t.focusMenubar(n)},focusToolbar:function(t,n){t.focusToolbar(n)}}}),JT={file:{title:"File",items:"newdocument restoredraft | preview | print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable tableprops deletetable row column cell"},help:{title:"Help",items:"help"}},QT=function(t){return"string"==typeof t?t.split(" "):t},ZT=function(u,a){var c=yt(JT,a.menus),n=0<ut(a.menus).length,t=a.menubar===undefined||!0===a.menubar?QT("file edit view insert format tools table help"):QT(!1===a.menubar?"":a.menubar),e=I(t,function(t){return n&&a.menus.hasOwnProperty(t)&&a.menus[t].hasOwnProperty("items")||JT.hasOwnProperty(t)}),o=F(e,function(t){var n,e,o,r,i=c[t];return n={title:i.title,items:QT(i.items)},e=a,r=(o=u,o.getParam("removed_menuitems","")).split(/[ ,]/),{text:n.title,getItems:function(){return K(n.items,function(t){var n=t.toLowerCase();return 0===n.trim().length?[]:_(r,function(t){return t===n})?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]})}}});return I(o,function(t){return 0<t.getItems().length&&_(t.getItems(),function(t){return"separator"!==t.type})})},tB=function(t){var n=function(){t._skinLoaded=!0,Yh(t)};return function(){t.initialized?n():t.on("init",n)}},nB=function(t,n){var e,o=function(t){var n=t.settings,e=n.skin,o=n.skin_url;if(!1!==e){var r=e||"oxide";o=o?t.documentBaseURI.toAbsolute(o):sb.baseURL+"/skins/ui/"+r}return o}(n);o&&(e=o+"/skin.min.css",n.contentCSS.push(o+(t?"/content.inline":"/content")+".min.css")),!1==(!1===n.getParam("skin"))&&e?fh.DOM.styleSheetLoader.load(e,tB(n)):tB(n)()},eB=g(nB,!1),oB=g(nB,!0),rB=function(n,t,e,o){var r=t.outerContainer,i=e.toolbar,u=e.buttons;if(T(i,L)){var a=i.map(function(t){return xT(n,{toolbar:t,buttons:u},{backstage:o},et.none())});$T.setToolbars(r,a)}else $T.setToolbar(r,xT(n,e,{backstage:o},et.none()))},iB=fh.DOM,uB={render:function(e,o,t,n,r){var i,u,a=ce(0);eB(e),i=fe.fromDom(r.targetNode),u=o.mothership,Ps(i,u,Vr),Hs(rr(),o.uiMothership),e.on("init",function(){rB(e,o,t,n),a.set(e.getWin().innerWidth),$T.setMenubar(o.outerContainer,ZT(e,t)),$T.setSidebar(o.outerContainer,t.sidebar),function(o){var r=o.getWin(),t=o.getDoc().documentElement,i=ce(na(r.innerWidth,r.innerHeight)),u=ce(na(t.offsetWidth,t.offsetHeight)),n=function(){var t=o.getDoc().documentElement,n=i.get(),e=u.get();n.left()!==r.innerWidth||n.top()!==r.innerHeight?(i.set(na(r.innerWidth,r.innerHeight)),Kh(o)):e.left()===t.offsetWidth&&e.top()===t.offsetHeight||(u.set(na(t.offsetWidth,t.offsetHeight)),Kh(o))};iB.bind(r,"resize",n);var e=Lv(fe.fromDom(o.getBody()),"load",n);o.on("remove",function(){e.unbind(),iB.unbind(r,"resize",n)})}(e)});var c=$T.getSocket(o.outerContainer).getOrDie("Could not find expected socket element");PO(e,o),e.addCommand("ToggleSidebar",function(t,n){$T.toggleSidebar(o.outerContainer,n),e.fire("ToggleSidebar")}),e.addQueryValueHandler("ToggleSidebar",function(){return $T.whichSidebar(o.outerContainer)});var s=hb(e);return s!==ib.sliding&&s!==ib.floating||e.on("ResizeContent",function(){var t=e.getWin().innerWidth;t!==a.get()&&$T.refreshToolbar(o.outerContainer),a.set(t)}),{iframeContainer:c.element().dom(),editorContainer:o.outerContainer.element().dom()}},getBehaviours:function(t){return[]}},aB=function(e,n){return Mr(e).orThunk(function(){var t=fe.fromTag("span");Rr(e,t);var n=Mr(t);return Lr(t),n}).map(function(t){return oa(t).translate(-n.left(),-n.top())}).getOrThunk(function(){return na(0,0)})},cB=pt([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),sB=function(n){return function(t){return t.translate(-n.left(),-n.top())}},fB=function(n){return function(t){return t.translate(n.left(),n.top())}},lB=function(e){return function(t,n){return V(e,function(t,n){return n(t)},na(t,n))}},dB=function(t,n,e){return t.fold(lB([fB(e),sB(n)]),lB([sB(n)]),lB([]))},mB=function(t,n,e){return t.fold(lB([fB(e)]),lB([]),lB([fB(n)]))},gB=function(t,n,e){return t.fold(lB([]),lB([sB(e)]),lB([fB(n),sB(e)]))},pB=function(t,n,e){return t.fold(function(t,n){return{position:"absolute",left:t+"px",top:n+"px"}},function(t,n){return{position:"absolute",left:t-e.left()+"px",top:n-e.top()+"px"}},function(t,n){return{position:"fixed",left:t+"px",top:n+"px"}})},hB=cB.offset,vB=cB.absolute,bB=cB.fixed,yB=function(t,n){Ri(t.element(),n.transitionClass),Ni(t.element(),n.fadeOutClass),Ri(t.element(),n.fadeInClass)},xB=function(t,n){Ri(t.element(),n.transitionClass),Ni(t.element(),n.fadeInClass),Ri(t.element(),n.fadeOutClass)},wB=function(t,n){return t.y()>=n.y()&&t.bottom()<=n.bottom()},SB=function(t,n){return Kr(t,n)?et.some(parseInt(qr(t,n),10)):et.none()},CB=function(o,r,i){return(u=o,t=r,n=u.element(),SB(n,t.leftAttr).bind(function(o){return SB(n,t.topAttr).map(function(t){var n=ca(u.element()),e=la(u.element());return Ea(o,t,n,e)})})).bind(function(t){return wB(t,i)?(n=r,e=o.element(),$r(e,n.leftAttr),$r(e,n.topAttr),et.some(vB(t.x(),t.y()))):et.none();var n,e});var u,t,n},kB=function(t,n,e,o,r){var i=oa(t.element()),u=Ea(i.left(),i.top(),ca(t.element()),la(t.element()));if(wB(u,e))return et.none();a=t,c=n,s=i.left(),f=i.top(),l=a.element(),Xr(l,c.leftAttr,s),Xr(l,c.topAttr,f);var a,c,s,f,l,d=vB(i.left(),i.top()),m=dB(d,o,r),g=vB(e.x(),e.y()),p=dB(g,o,r),h=u.y()<=e.y()?p.top():p.top()+e.height()-u.height();return et.some(bB(m.left(),h))},OB=function(i,t,n){var u=t.lazyViewport(i);t.contextual.each(function(r){r.lazyContext(i).each(function(t){var n,e,o=Ta(t);((e=u,(n=o).y()<e.bottom()&&n.bottom()>e.y())?yB:xB)(i,r)})});var e,o,r,a,c,s=Ar(i.element()),f=ia(s),l=aB(i.element(),f);(e=i,o=t,r=u,a=f,c=l,qi(e.element(),"position").is("fixed")?CB(e,o,r):kB(e,o,r,a,c)).each(function(t){var n=pB(t,0,l);Gi(i.element(),n)})},EB=/* */Object.freeze({refresh:OB}),TB=/* */Object.freeze({events:function(o,t){return fr([mr(go(),function(n,e){o.contextual.each(function(t){qe(n.element(),e.event().target())&&(Ni(n.element(),t.transitionClass),e.stop())})}),mr(Ao(),function(t,n){OB(t,o)})])}}),BB=[Qn("contextual",[Pn("fadeInClass"),Pn("fadeOutClass"),Pn("transitionClass"),Pn("lazyContext")]),Zn("lazyViewport",function(t){var n=ia();return Ea(n.left(),n.top(),H.window.innerWidth,H.window.innerHeight)}),Pn("leftAttr"),Pn("topAttr")],AB=Xu({fields:BB,name:"docking",active:TB,apis:EB}),DB={render:function(o,n,e,r,t){var i,u=fh.DOM,a=bb(o),c=hb(o),s=c===ib.sliding||c===ib.floating;oB(o);var f=function(t){var n=qi(i.element(),"position").is("fixed"),e=function(t){void 0===t&&(t=0);var n=oa(fe.fromDom(o.getBody()));return{top:Math.round(n.top()-la(i.element()))+t,left:Math.round(n.left())}}(s?t.fold(function(){return 0},function(t){return 1<t.components().length?la(t.components()[1].element()):0}):0);n?Yr(i.element(),ft(e,function(t,n){return{k:"data-dock-"+n,v:t}})):Gi(i.element(),st(e,function(t){return t+"px"})),AB.refresh(i)},l=function(){var t=$T.getToolbar(n.outerContainer);s&&$T.refreshToolbar(n.outerContainer),a||f(t)},d=function(){Wi(n.outerContainer.element(),"display","flex"),u.addClass(o.getBody(),"mce-edit-focus"),$i(n.uiMothership.element(),"display"),l()},m=function(){n.outerContainer&&(Wi(n.outerContainer.element(),"display","none"),u.removeClass(o.getBody(),"mce-edit-focus")),Wi(n.uiMothership.element(),"display","none")},g=function(){if(i)d();else{i=n.outerContainer;var t=vb(o).getOr(rr());Hs(t,n.mothership),Hs(t,n.uiMothership),rB(o,n,e,r),$T.setMenubar(n.outerContainer,ZT(o,e)),a||Wi(i.element(),"position","absolute"),l(),d(),o.on("NodeChange ResizeWindow",l),o.on("activate",d),o.on("deactivate",m),o.nodeChanged()}};return o.on("focus",g),o.on("blur hide",m),o.on("init",function(){o.hasFocus()&&g()}),PO(o,n),{editorContainer:n.outerContainer.element().dom()}},getBehaviours:function(n){return bb(n)?[]:[AB.config({leftAttr:"data-dock-left",topAttr:"data-dock-top",contextual:{lazyContext:function(t){return et.from(n).map(function(t){return fe.fromDom(t.getBody())})},fadeInClass:"tox-toolbar-dock-fadein",fadeOutClass:"tox-toolbar-dock-fadeout",transitionClass:"tox-toolbar-dock-transition"}}),Pm.config({})]}},_B=function(n){OC.each([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],function(t){n.ui.registry.addToggleButton(t.name,{tooltip:t.text,onAction:function(){return n.execCommand(t.cmd)},icon:t.icon,onSetup:KE(n,t.name)})});var t="alignnone",e="No alignment",o="JustifyNone",r="align-none";n.ui.registry.addButton(t,{tooltip:e,onAction:function(){return n.execCommand(o)},icon:r})},MB=function(t,n){return function(){t.execCommand("mceToggleFormat",!1,n)}},FB=function(t){var n,e;!function(e){OC.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],function(t,n){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:KE(e,t.name),onAction:MB(e,t.name)})});for(var t=1;t<=6;t++){var n="h"+t;e.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+t,onSetup:KE(e,n),onAction:MB(e,n)})}}(t),n=t,OC.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],function(t){n.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return n.execCommand(t.action)}})}),e=t,OC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(t){e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:function(){return e.execCommand(t.action)},onSetup:KE(e,t.name)})})},IB=function(t){var n;FB(t),n=t,OC.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],function(t){n.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:function(){return n.execCommand(t.action)}})}),n.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:MB(n,"code")})},RB=function(t,n,e){var o=function(){return!!n.undoManager&&n.undoManager[e]()},r=function(){t.setDisabled(n.readonly||!o())};return t.setDisabled(!o()),n.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r),function(){return n.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",r)}},VB=function(t){var n,e;(n=t).ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(t){return RB(t,n,"hasUndo")},onAction:function(){return n.execCommand("undo")}}),n.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(t){return RB(t,n,"hasRedo")},onAction:function(){return n.execCommand("redo")}}),(e=t).ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(t){return RB(t,e,"hasUndo")},onAction:function(){return e.execCommand("undo")}}),e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(t){return RB(t,e,"hasRedo")},onAction:function(){return e.execCommand("redo")}})},NB=function(t){var n,e;(n=t).ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return n.execCommand("mceToggleVisualAid")}}),(e=t).ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(t){return function(n,t){n.setActive(t.hasVisual);var e=function(t){n.setActive(t.hasVisual)};return t.on("VisualAid",e),function(){return t.off("VisualAid",e)}}(t,e)},onAction:function(){e.execCommand("mceToggleVisualAid")}})},HB=function(t){var n;(n=t).ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(t){return function(t,n){t.setDisabled(!n.queryCommandState("outdent"));var e=function(){t.setDisabled(!n.queryCommandState("outdent"))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}(t,n)},onAction:function(){return n.execCommand("outdent")}}),n.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return n.execCommand("indent")}})},PB=function(t,n){var e,o,r,i,u,a,c,s,f,l,d,m,g,p,h,v,b,y,x,w;o=n,r=oT(e=t),i=JE(0,o,r.dataset,r),e.ui.registry.addNestedMenuItem("align",{text:o.shared.providers.translate("Align"),getSubmenuItems:function(){return i.items.validateItems(i.getStyleItems())}}),a=n,c=uT(u=t),s=JE(0,a,c.dataset,c),u.ui.registry.addNestedMenuItem("fontformats",{text:a.shared.providers.translate("Fonts"),getSubmenuItems:function(){return s.items.validateItems(s.getStyleItems())}}),f=t,d=(l=n).styleselect,m=JE(0,l,d,mT(f)),f.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return m.items.validateItems(m.getStyleItems())}}),p=n,h=dT(g=t),v=JE(0,p,h.dataset,h),g.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return v.items.validateItems(v.getStyleItems())}}),y=n,x=sT(b=t),w=JE(0,y,x.dataset,x),b.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return w.items.validateItems(w.getStyleItems())}})},zB=function(t,n){_B(t),IB(t),PB(t,n),VB(t),av.register(t),NB(t),HB(t)},LB=function(t,n){return{anchor:"makeshift",x:t,y:n}},jB=function(t,n){var e,o,r,i=fh.DOM.getPos(t);return e=n,o=i.x,r=i.y,LB(e.x+o,e.y+r)},UB=function(t,n){return"contextmenu"===n.type?t.inline?LB((o=n).pageX,o.pageY):jB(t.getContentAreaContainer(),LB((e=n).clientX,e.clientY)):WB(t);var e,o},WB=function(t){return{anchor:"selection",root:fe.fromDom(t.selection.getNode())}},GB=function(t){return"string"==typeof t?t.split(/[ ,]/):t},XB=function(t){return t.settings.contextmenu_never_use_native||!1},YB=function(t){return e="contextmenu",o="link linkchecker image imagetools table spellchecker configurepermanentpen",r=(n=t).ui.registry.getAll().contextMenus,mt(n.settings,e).map(GB).getOrThunk(function(){return I(GB(o),function(t){return gt(r,t)})});var n,e,o,r},qB=function(t){return!1===t.getParam("contextmenu")},KB=function(t){return L(t)?"|"===t:"separator"===t.type},$B={type:"separator"},JB=function(n){if(L(n))return n;switch(n.type){case"separator":return $B;case"submenu":return{type:"nestedmenuitem",text:n.text,icon:n.icon,getSubmenuItems:function(){var t=n.getSubmenuItems();return L(t)?t:F(t,JB)}};default:return{type:"menuitem",text:n.text,icon:n.icon,onAction:(t=n.onAction,function(){return t()})}}var t},QB=function(t,n){if(0===n.length)return t;var e=rt(t).filter(function(t){return!KB(t)}).fold(function(){return[]},function(t){return[$B]});return t.concat(e).concat(n).concat([$B])},ZB=function(d,t,m){var g=su(yg.sketch({dom:{tag:"div"},lazySink:t,onEscape:function(){return d.focus()},fireDismissalEventInstead:{},inlineBehaviours:Wu([rg("dismissContextMenu",[mr(Fo(),function(t,n){Ks.close(t),d.focus()})])])}));d.on("init",function(){d.on("contextmenu",function(n){if(XB(d)&&n.preventDefault(),t=d,!(n.ctrlKey&&!XB(t)||qB(d))){var t,e,r,i,o,u=2!==n.button||n.target===d.getBody(),a=u?(e=d,{anchor:"node",node:et.some(fe.fromDom(e.selection.getNode())),root:fe.fromDom(e.getBody())}):UB(d,n),c=d.ui.registry.getAll(),s=YB(d),f=u?d.selection.getStart(!0):n.target,l=(r=c.contextMenus,i=f,0<(o=V(s,function(t,n){if(gt(r,n)){var e=r[n].update(i);if(L(e))return QB(t,e.split(" "));if(0<e.length){var o=F(e,JB);return QB(t,o)}return t}return t.concat([n])},[])).length&&KB(o[o.length-1])&&o.pop(),o);xy(l,ih.CLOSE_ON_EXECUTE,m).map(function(t){n.preventDefault(),yg.showMenuAt(g,a,{menu:{markers:lv("normal")},data:t})})}})})},tA=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?et.some(parseInt(t,10)):et.none()},nA=function(t){return U(t)?t+"px":t},eA="data-initial-z-index",oA=function(t,n){var e;t.getSystem().addToGui(n),_r((e=n).element()).each(function(n){qi(n,"z-index").each(function(t){Xr(n,eA,t)}),Wi(n,"z-index",Xi(e.element(),"z-index"))})},rA=function(t){_r(t.element()).each(function(t){var n=qr(t,eA);Kr(t,eA)?Wi(t,"z-index",n):$i(t,"z-index"),$r(t,eA)}),t.getSystem().removeFromGui(t)},iA=function(t,n,e,o){return(r=t,i=n,u=r.element(),a=parseInt(qr(u,i.leftAttr),10),c=parseInt(qr(u,i.topAttr),10),isNaN(a)||isNaN(c)?et.none():et.some(na(a,c))).fold(function(){return e},function(t){return bB(t.left()+o.left(),t.top()+o.top())});var r,i,u,a,c},uA=function(t,n,e,o,r,i){var u,a,c,s=iA(t,n,e,o),f=cA(t,n,s,r,i),l=dB(s,r,i);return u=n,a=l,c=t.element(),Xr(c,u.leftAttr,a.left()+"px"),Xr(c,u.topAttr,a.top()+"px"),f.fold(function(){return{coord:bB(l.left(),l.top()),extra:et.none()}},function(t){return{coord:t.output(),extra:t.extra()}})},aA=function(t,n){var e,o;e=n,o=t.element(),$r(o,e.leftAttr),$r(o,e.topAttr)},cA=function(t,n,p,h,v){var e=n.getSnapPoints(t);return bu(e,function(t){var n,e,o,r,i,u,a,c,s,f,l,d,m,g=t.sensor();return(n=p,e=g,o=t.range().left(),r=t.range().top(),a=mB(n,i=h,u=v),c=mB(e,i,u),Math.abs(a.left()-c.left())<=o&&Math.abs(a.top()-c.top())<=r)?et.some({output:nt((s=t.output(),f=p,l=h,d=v,m=function(o,r){return function(t,n){var e=o(f,l,d);return r(t.getOr(e.left()),n.getOr(e.top()))}},s.fold(m(gB,cB.offset),m(mB,cB.absolute),m(dB,cB.fixed)))),extra:t.extra}):et.none()})},sA=function(e,t,i,u,a,c){return t.fold(function(){var t,e,o,n=(t=i,e=c.left(),o=c.top(),t.fold(function(t,n){return cB.offset(t+e,n+o)},function(t,n){return cB.absolute(t+e,n+o)},function(t,n){return cB.fixed(t+e,n+o)})),r=dB(n,u,a);return bB(r.left(),r.top())},function(n){var t=uA(e,n,i,c,u,a);return t.extra.each(function(t){n.onSensor(e,t)}),t.coord})},fA=function(t,n,e){var o,r=n.getTarget(t.element());if(n.repositionTarget){var i=Ar(t.element()),u=ia(i),a=aB(r,u),c=qi(o=r,"left").bind(function(e){return qi(o,"top").bind(function(n){return qi(o,"position").map(function(t){return("fixed"===t?bB:hB)(parseInt(e,10),parseInt(n,10))})})}).getOrThunk(function(){var t=oa(o);return vB(t.left(),t.top())}),s=sA(t,n.snaps,c,u,a,e),f=pB(s,0,a);Gi(r,f)}n.onDrag(t,r,e)},lA=Qn("snaps",[Pn("getSnapPoints"),Mu("onSensor"),Pn("leftAttr"),Pn("topAttr"),Zn("lazyViewport",function(){var t=ia();return{x:t.left,y:t.top,width:nt(H.window.innerWidth),height:nt(H.window.innerHeight),bottom:nt(t.top()+H.window.innerHeight),right:nt(t.left()+H.window.innerWidth)}})]),dA=/* */Object.freeze({getData:function(t){return et.from(na(t.x(),t.y()))},getDelta:function(t,n){return na(n.left()-t.left(),n.top()-t.top())}}),mA=[Zn("useFixed",!1),Pn("blockerClass"),Zn("getTarget",d),Zn("onDrag",tt),Zn("repositionTarget",!0),Mu("onDrop"),lA,Vu("dragger",{handlers:function(a,c){return fr([mr(no(),function(n,t){if(0===t.event().raw().button){t.stop();var e,o={drop:function(){i()},delayDrop:function(){u.schedule()},forceDrop:function(){i()},move:function(t){u.cancel(),c.update(dA,t).each(function(t){fA(n,a,t)})}},r=n.getSystem().build(ab.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[a.blockerClass]},events:(e=o,fr([mr(no(),e.forceDrop),mr(ro(),e.drop),mr(eo(),function(t,n){e.move(n.event())}),mr(oo(),e.delayDrop)]))})),i=function(){rA(r),a.snaps.each(function(t){aA(n,t)});var t=a.getTarget(n.element());a.onDrop(n,t)},u=Uv(i,200);c.reset(),oA(n,r)}})])}})],gA=/* */Object.freeze({getData:function(t){var n,e=t.raw().touches;return 1===e.length?(n=e[0],et.some(na(n.clientX,n.clientY))):et.none()},getDelta:function(t,n){return na(n.left()-t.left(),n.top()-t.top())}}),pA=mA,hA=[Zn("useFixed",!1),Zn("getTarget",d),Zn("onDrag",tt),Zn("repositionTarget",!0),Zn("onDrop",tt),lA,Vu("dragger",{handlers:function(o,r){return fr([yr(Qe()),mr(Ze(),function(n,t){t.stop(),r.update(gA,t.event()).each(function(t){fA(n,o,t)})}),mr(to(),function(n,t){o.snaps.each(function(t){aA(n,t)});var e=o.getTarget(n.element());r.reset(),o.onDrop(n,e)})])}})],vA=/* */Object.freeze({mouse:pA,touch:hA}),bA=/* */Object.freeze({init:function(){var i=et.none(),t=nt({});return xi({readState:t,reset:function(){i=et.none()},update:function(r,t){return r.getData(t).bind(function(t){return n=r,e=t,o=i.map(function(t){return n.getDelta(t,e)}),i=et.some(e),o;var n,e,o})}})}}),yA=qu({branchKey:"mode",branches:vA,name:"dragging",active:{events:function(t,n){return t.dragger.handlers(t,n)}},extra:{snap:Br(["sensor","range","output"],["extra"])},state:bA});(tT=ZE||(ZE={}))[tT.None=0]="None",tT[tT.Both=1]="Both",tT[tT.Vertical=2]="Vertical";var xA,wA,SA,CA,kA,OA,EA,TA=function(t,n,e,o){var r=t+n,i=e.filter(function(t){return r<t}),u=o.filter(function(t){return t<r});return i.or(u).getOr(r)},BA=function(t,n,e,o,r){var i,u,a={};return a.height=TA(o,n.top(),lb(t),(i=t,et.from(i.getParam("max_height")).filter(U))),e===ZE.Both&&(a.width=TA(r,n.left(),fb(t),(u=t,et.from(u.getParam("max_width")).filter(U)))),a},AA=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},DA=function(i,u){u.delimiter||(u.delimiter="\xbb");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Wu([hm.config({mode:"flow",selector:"div[role=button]"}),Iy.config({}),wm.config({}),rg("elementPathEvents",[wr(function(r,t){i.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return hm.focusIn(r)}),i.on("NodeChange",function(t){var n,o,e=function(t){for(var n=[],e=t.length;0<e--;){var o=t[e];if(1===o.nodeType&&!AA(o)){var r=i.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(r.isDefaultPrevented()||n.push({name:r.name,element:o}),r.isPropagationStopped())break}}return n}(t.parents);0<e.length&&wm.set(r,(n=F(e||[],function(n,t){return wg.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":t,"tab-index":-1,"aria-level":t+1},innerHtml:n.name},action:function(t){i.focus(),i.selection.select(n.element),i.nodeChanged()}})}),o={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+u.delimiter+" "}},V(n.slice(1),function(t,n){var e=t;return e.push(o),e.push(n),e},[n[0]])))})})])]),components:[]}},_A=function(s,u){var t,n,e,o,r,i=function(c){return{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:u.translate("Resize")},innerHtml:kg("resize-handle",u.icons)},behaviours:Wu([yA.config({mode:"mouse",repositionTarget:!1,onDrag:function(t,n,e){var o,r,i,u,a;o=s,r=e,i=c,u=fe.fromDom(o.getContainer()),a=BA(o,r,i,la(u),ca(u)),ct(a,function(t,n){return Wi(u,n,nA(t))}),qh(o)},blockerClass:"tox-blocker"})])}};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(o=function(){var t,o,n,r,e,i=[];return s.getParam("elementpath",!0,"boolean")&&i.push(DA(s,{})),Me(s.settings.plugins,"wordcount")&&i.push((t=s,o=u,r=function(t,n,e){return wm.set(t,[uu(o.translate(["{0} "+e,n[e]]))])},wg.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Wu([Iy.config({}),wm.config({}),Im.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),rg("wordcount-events",[mr(ko(),function(t){var n=Im.getValue(t),e="words"===n.mode?"characters":"words";Im.setValue(t,{mode:e,count:n.count}),r(t,n.count,e)}),wr(function(e){t.on("wordCountUpdate",function(t){var n=Im.getValue(e).mode;Im.setValue(e,{mode:n,count:t.wordCount}),r(e,t.wordCount,n)})})])]),eventOrder:(n={},n[ko()]=["wordcount-events","alloy.base.behaviour"],n)}))),s.getParam("branding",!0,"boolean")&&i.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(e=bp.translate(["Powered by {0}","Tiny"]))+'">'+e+"</a>"}}),0<i.length?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:i}]:[]}(),n=!Me((t=s).settings.plugins,"autoresize"),r=!1===(e=t.getParam("resize",n))?ZE.None:"both"===e?ZE.Both:ZE.Vertical,r!==ZE.None&&o.push(i(r)),o)}},MA=function(y){var t,n,e,o,r,i=y.getParam("inline",!1,"boolean"),x=i?DB:uB,u=et.none(),a=Pe.detect().browser.isIE()?["tox-platform-ie"]:[],c=bp.isRtl()?{attributes:{dir:"rtl"}}:{},w=su({dom:P({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(a)},c),behaviours:Wu([Ds.config({useFixed:!1})])}),s=Sg({dom:{tag:"div",classes:["tox-anchorbar"]}}),f=function(){return u.bind(function(t){return $T.getMoreButton(t)}).getOrDie("Could not find more button element")},S=function(){return u.bind(function(t){return $T.getThrobber(t)}).getOrDie("Could not find throbber element")},C=Yk(w,y,function(){return u.bind(function(t){return s.getOpt(t)}).getOrDie("Could not find a anchor bar element")},f),k=function(){return z.value(w)},l=$T.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:C,onEscape:function(){y.focus()}}),d=function(t){return hb(t)},m=$T.parts().toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:k,backstage:C,onEscape:function(){y.focus()},split:d(y),lazyToolbar:function(){return u.bind(function(t){return $T.getToolbar(t)}).getOrDie("Could not find more toolbar element")},lazyMoreButton:f}),g=$T.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},onEscape:function(){}}),p=$T.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),h=$T.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),v=$T.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:C}),b=y.getParam("statusbar",!0,"boolean")&&!i?et.some(_A(y,C.shared.providers)):et.none(),O={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[p,h]},E=mb(y),T=(n=(t=y).getParam("toolbar",!0),e=!0===n,o=L(n),r=j(n)&&0<n.length,!mb(t)&&(r||o||e)),B=!1!==y.getParam("menubar",!0,"boolean"),A=d(y)!==ib["default"],D=q([B?[l]:[],E?(A&&H.console.warn("Toolbar drawer cannot be applied when multiple toolbars are active"),[g]):T?[m]:[],bb(y)?[]:[s.asSpec()],i?[]:[O]]),_=q([[{dom:{tag:"div",classes:["tox-editor-container"]},components:D}],i?[]:b.toArray(),[v]]),M=i&&!B&&!T&&!E,F=P({role:"application"},bp.isRtl()?{dir:"rtl"}:{},M?{"aria-hidden":"true"}:{}),I=su($T.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(i?["tox-tinymce-inline"]:[]).concat(a),styles:P({visibility:"hidden"},M?{opacity:"0",border:"0"}:{}),attributes:F},components:_,behaviours:Wu(x.getBehaviours(y).concat([hm.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a"})]))}));u=et.some(I),y.shortcuts.add("alt+F9","focus menubar",function(){$T.focusMenubar(I)}),y.shortcuts.add("alt+F10","focus toolbar",function(){$T.focusToolbar(I)});var R=cb(I),V=cb(w);ST(y,R,V);var N=function(t){var n,e=fh.DOM,o=y.getParam("width",e.getStyle(t,"width")),r=(n=y).getParam("height",Math.max(n.getElement().offsetHeight,200)),i=fb(y),u=lb(y),a=tA(o).bind(function(n){return nA(i.map(function(t){return Math.max(n,t)}))}).getOr(nA(o)),c=tA(r).bind(function(n){return u.map(function(t){return Math.max(n,t)})}).getOr(r),s=nA(a);if(Ki("div","width",s)&&Wi(I.element(),"width",s),!y.inline){var f=nA(c);Ki("div","height",f)?Wi(I.element(),"height",f):Wi(I.element(),"height","200px")}return c};return{mothership:R,uiMothership:V,backstage:C,renderUI:function(){var o,r,e,n,i,u,a,c;zB(y,C),ZB(y,k,C),r=(o=y).ui.registry.getAll().sidebars,W(ut(r),function(n){var t=r[n],e=function(){return et.from(o.queryCommandValue("ToggleSidebar")).is(n)};o.ui.registry.addToggleButton(n,{icon:t.icon,tooltip:t.tooltip,onAction:function(t){o.execCommand("ToggleSidebar",!1,n),t.setActive(e())},onSetup:function(t){var n=function(){return t.setActive(e())};return o.on("ToggleSidebar",n),function(){o.off("ToggleSidebar",n)}}})}),e=y,n=S,i=C.shared,u=ce(!1),a=ce(et.none()),c=function(t){t!==u.get()&&(UT(n(),t,i.providers),u.set(t))},e.on("ProgressState",function(t){if(a.get().each(Tg.clearTimeout),U(t.time)){var n=Tg.setEditorTimeout(e,function(){return c(t.state)},t.time);a.set(et.some(n))}else c(t.state),a.set(et.none())});var t=y.ui.registry.getAll(),s=t.buttons,f=t.menuItems,l=t.contextToolbars,d=t.sidebars,m=db(y),g={menuItems:f,menus:y.settings.menu?st(y.settings.menu,function(t){return yt(t,{items:t.items})}):{},menubar:y.settings.menubar,toolbar:m.getOrThunk(function(){return y.getParam("toolbar",!0)}),buttons:s,sidebar:d};wT(y,l,w,{backstage:C});var p=y.getElement(),h=N(p),v={mothership:R,uiMothership:V,outerContainer:I},b={targetNode:p,height:h};return x.render(y,v,g,C,b)},getUi:function(){return{channels:{broadcastAll:V.broadcast,broadcastOn:V.broadcastOn,register:function(){}}}}}},FA=function(t,n){var e=et.from(qr(t,"id")).fold(function(){var t=oi("dialog-label");return Xr(n,"id",t),t},d);Xr(t,"aria-labelledby",e)},IA=nt([Pn("lazySink"),Yn("dragBlockClass"),Zn("useTabstopAt",nt(!0)),Zn("eventOrder",{}),nf("modalBehaviours",[hm]),Fu("onExecute"),Ru("onEscape")]),RA={sketch:d},VA=nt([Mf({name:"draghandle",overrides:function(t,n){return{behaviours:Wu([yA.config({mode:"mouse",getTarget:function(t){return lu(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+un(n,null,2)).message)})])}}}),Df({schema:[Pn("dom")],name:"title"}),Df({factory:RA,schema:[Pn("dom")],name:"close"}),Df({factory:RA,schema:[Pn("dom")],name:"body"}),Mf({factory:RA,schema:[Pn("dom")],name:"footer"}),_f({factory:{sketch:function(t,n){return P({},t,{dom:n.dom,components:n.components})}},schema:[Zn("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Zn("components",[])],name:"blocker"})]),NA=al({name:"ModalDialog",configFields:IA(),partFields:VA(),factory:function(r,t,n,o){var a=oi("alloy.dialog.busy"),c=oi("alloy.dialog.idle"),s=Wu([hm.config({mode:"special",onTab:function(){return et.some(!0)},onShiftTab:function(){return et.some(!0)}}),Pm.config({})]),e=oi("modal-events"),i=P({},r.eventOrder,{"alloy.system.attached":[e].concat(r.eventOrder["alloy.system.attached"]||[])});return{uid:r.uid,dom:r.dom,components:t,apis:{show:function(i){var t=r.lazySink(i).getOrDie(),u=ce(et.none()),n=o.blocker(),e=t.getSystem().build(P({},n,{components:n.components.concat([fu(i)]),behaviours:Wu([rg("dialog-blocker-events",[mr(c,function(t,n){Kr(i.element(),"aria-busy")&&($r(i.element(),"aria-busy"),u.get().each(function(t){return wm.remove(i,t)}))}),mr(a,function(t,n){Xr(i.element(),"aria-busy","true");var e=n.event().getBusySpec();u.get().each(function(t){wm.remove(i,t)});var o=e(i,s),r=t.getSystem().build(o);u.set(et.some(r)),wm.append(i,fu(r)),r.hasConfigured(hm)&&hm.focusIn(r)})])])}));Fs(t,e),hm.focusIn(i)},hide:function(n){_r(n.element()).each(function(t){n.getSystem().getByDom(t).each(function(t){Vs(t)})})},getBody:function(t){return Gf(t,r,"body")},getFooter:function(t){return Gf(t,r,"footer")},setIdle:function(t){zo(t,c)},setBusy:function(t,n){Lo(t,a,{getBusySpec:n})}},eventOrder:i,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:of(r.modalBehaviours,[wm.config({}),hm.config({mode:"cyclic",onEnter:r.onExecute,onEscape:r.onEscape,useTabstopAt:r.useTabstopAt}),rg(e,[wr(function(t){var n,e,o;FA(t.element(),Gf(t,r,"title").element()),n=t.element(),e=Gf(t,r,"body").element(),o=et.from(qr(n,"id")).fold(function(){var t=oi("dialog-describe");return Xr(e,"id",t),t},d),Xr(n,"aria-describedby",o)})])])}},apis:{show:function(t,n){t.show(n)},hide:function(t,n){t.hide(n)},getBody:function(t,n){return t.getBody(n)},getFooter:function(t,n){return t.getFooter(n)},setBusy:function(t,n,e){t.setBusy(n,e)},setIdle:function(t,n){t.setIdle(n)}}}),HA=[Ln("type"),Ln("text"),jn("level",["info","warn","error","success"]),Ln("icon"),Zn("url","")],PA=[Ln("type"),Ln("text"),re("disabled",!1),re("primary",!1),wn("name","name",Ot(function(){return oi("button-name")}),Rn),$n("icon")],zA=[Ln("type"),Ln("name"),Ln("label")],LA=Vn,jA=[Ln("type"),Ln("name")],UA=jA.concat([$n("label")]),WA=UA,GA=Rn,XA=UA,YA=Rn,qA=UA,KA=hn(kn),$A=UA.concat([re("sandboxed",!0)]),JA=Rn,QA=UA.concat([$n("placeholder")]),ZA=Rn,tD=UA.concat([Gn("items",[Ln("text"),Ln("value")]),ne("size",1)]),nD=Rn,eD=UA.concat([re("constrain",!0)]),oD=pn([Ln("width"),Ln("height")]),rD=UA.concat([$n("placeholder")]),iD=Rn,uD=UA.concat([oe("filetype","file",["image","media","file"])]),aD=pn([Ln("value"),Zn("meta",{})]),cD=jA.concat([ee("tag","textarea"),Un("init")]),sD=Rn,fD=[Ln("type"),Ln("html"),oe("presets","presentation",["presentation","document"])],lD=UA.concat([zn("currentState",pn([Pn("blob"),Ln("url")]))]),dD=UA.concat([Zn("columns","auto")]),mD=(xA=[Ln("value"),Ln("text"),Ln("icon")],yn(xA)),gD=[Ln("type"),Xn("header",Rn),Xn("cells",hn(Rn))],pD=function(n){return wn("items","items",Ct(),hn(On(function(t){return Tn("Checking item of "+n,hD,t).fold(function(t){return z.error(Dn(t))},function(t){return z.value(t)})})))},hD=_n("type",{alertbanner:HA,bar:(kA=pD("bar"),[Ln("type"),kA]),button:PA,checkbox:zA,colorinput:WA,colorpicker:XA,dropzone:qA,grid:(SA=pD("grid"),[Ln("type"),(CA="columns",zn(CA,In)),SA]),iframe:$A,input:QA,selectbox:tD,sizeinput:eD,textarea:rD,urlinput:uD,customeditor:cD,htmlpanel:fD,imagetools:lD,collection:dD,label:(wA=pD("label"),[Ln("type"),Ln("label"),wA]),table:gD}),vD=[Ln("type"),Xn("items",hD)],bD=[wn("name","name",Ot(function(){return oi("tab-name")}),Rn),Ln("title"),Xn("items",hD)],yD=[Ln("type"),Gn("tabs",bD)],xD=[wn("name","name",Ot(function(){return oi("button-name")}),Rn),Ln("text"),$n("icon"),oe("align","end",["start","end"]),re("primary",!1),re("disabled",!1)],wD=pn([jn("type",["submit","cancel","custom"])].concat(xD)),SD=pn([Ln("title"),zn("body",_n("type",{panel:vD,tabpanel:yD})),ee("size","normal"),Xn("buttons",wD),Zn("initialData",{}),ie("onAction",tt),ie("onChange",tt),ie("onSubmit",tt),ie("onClose",tt),ie("onCancel",tt),Zn("onTabChange",tt)]),CD=function(t){return k(t)?[t].concat(K(dt(t),CD)):j(t)?K(t,CD):[]},kD=function(t){return L(t.type)&&L(t.name)},OD={checkbox:LA,colorinput:GA,colorpicker:YA,dropzone:KA,input:ZA,iframe:JA,sizeinput:oD,selectbox:nD,size:oD,textarea:iD,urlinput:aD,customeditor:sD,collection:mD},ED=function(t){var n=K(I(CD(t),kD),function(n){return(t=n,et.from(OD[t.type])).fold(function(){return[]},function(t){return[zn(n.name,t)]});var t});return pn(n)},TD=pn([jn("type",["cancel","custom"])].concat(xD)),BD=pn([Ln("title"),Ln("url"),Kn("height"),Kn("width"),(OA="buttons",EA=TD,qn(OA,hn(EA))),ie("onAction",tt),ie("onCancel",tt),ie("onClose",tt),ie("onMessage",tt)]),AD=function(t){return{internalDialog:Bn(Tn("dialog",SD,t)),dataValidator:ED(t),initialData:t.initialData}},DD={open:function(t,n){var e=AD(n);return t(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(t,n){return t(Bn(Tn("dialog",BD,n)))},redial:function(t){return AD(t)}},_D=function(t){var e=[],o={};return ct(t,function(t,n){t.fold(function(){e.push(n)},function(t){o[n]=t})}),0<e.length?z.error(e):z.value(o)},MD=ul({name:"TabButton",configFields:[Zn("uid",undefined),Pn("value"),wn("dom","dom",Et(function(t){return{attributes:{role:"tab",id:oi("aria"),"aria-selected":"false"}}}),Mn()),Yn("action"),Zn("domModification",{}),nf("tabButtonBehaviours",[Pm,hm,Im]),Pn("view")],factory:function(t,n){return{uid:t.uid,dom:t.dom,components:t.components,events:xg(t.action),behaviours:of(t.tabButtonBehaviours,[Pm.config({}),hm.config({mode:"execution",useSpace:!0,useEnter:!0}),Im.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),FD=nt([Pn("tabs"),Pn("dom"),Zn("clickToDismiss",!1),nf("tabbarBehaviours",[kl,hm]),Du(["tabClass","selectedClass"])]),ID=Ff({factory:MD,name:"tabs",unit:"tab",overrides:function(o,t){var r=function(t,n){kl.dehighlight(t,n),Lo(t,No(),{tabbar:t,button:n})},i=function(t,n){kl.highlight(t,n),Lo(t,Vo(),{tabbar:t,button:n})};return{action:function(t){var n=t.getSystem().getByUid(o.uid).getOrDie(),e=kl.isHighlighted(n,t);(e&&o.clickToDismiss?r:e?tt:i)(n,t)},domModification:{classes:[o.markers.tabClass]}}}}),RD=nt([ID]),VD=al({name:"Tabbar",configFields:FD(),partFields:RD(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:of(t.tabbarBehaviours,[kl.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,n){Xr(n.element(),"aria-selected","true")},onDehighlight:function(t,n){Xr(n.element(),"aria-selected","false")}}),hm.config({mode:"flow",getInitial:function(t){return kl.getHighlighted(t).map(function(t){return t.element()})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),ND=ul({name:"Tabview",configFields:[nf("tabviewBehaviours",[wm])],factory:function(t,n){return{uid:t.uid,dom:t.dom,behaviours:of(t.tabviewBehaviours,[wm.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),HD=nt([Zn("selectFirst",!0),Mu("onChangeTab"),Mu("onDismissTab"),Zn("tabs",[]),nf("tabSectionBehaviours",[])]),PD=Df({factory:VD,schema:[Pn("dom"),Wn("markers",[Pn("tabClass"),Pn("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),zD=Df({factory:ND,name:"tabview"}),LD=nt([PD,zD]),jD=al({name:"TabSection",configFields:HD(),partFields:LD(),factory:function(i,t,n,e){var o=function(t,n){Wf(t,i,"tabbar").each(function(t){n(t).each(jo)})};return{uid:i.uid,dom:i.dom,components:t,behaviours:ef(i.tabSectionBehaviours),events:fr(q([i.selectFirst?[wr(function(t,n){o(t,kl.getFirst)})]:[],[mr(Vo(),function(t,n){var o,r,e=n.event().button();o=e,r=Im.getValue(o),Wf(o,i,"tabview").each(function(e){N(i.tabs,function(t){return t.value===r}).each(function(t){var n=t.view();Xr(e.element(),"aria-labelledby",qr(o.element(),"id")),wm.set(e,n),i.onChangeTab(e,o,n)})})}),mr(No(),function(t,n){var e=n.event().button();i.onDismissTab(t,e)})]])),apis:{getViewItems:function(t){return Wf(t,i,"tabview").map(function(t){return wm.contents(t)}).getOr([])},showTab:function(t,e){o(t,function(n){var t=kl.getCandidates(n);return N(t,function(t){return Im.getValue(t)===e}).filter(function(t){return!kl.isHighlighted(n,t)})})}}}},apis:{getViewItems:function(t,n){return t.getViewItems(n)},showTab:function(t,n,e){t.showTab(n,e)}}}),UD=function(t){return ot((n=t,e=function(t,n){return n<t?-1:t<n?1:0},(o=B.call(n,0)).sort(e),o));var n,e,o},WD=function(i,u,t){lu(i,'[role="dialog"]').each(function(r){t.get().map(function(t){return Wi(u,"height","0"),Math.min(t,(e=i,o=lu(n=r,".tox-dialog-wrap").getOr(n),("fixed"===Xi(o,"position")?Math.max(H.document.documentElement.clientHeight,H.window.innerHeight):Math.max(H.document.documentElement.offsetHeight,H.document.documentElement.scrollHeight))-(n.dom().getBoundingClientRect().height-e.dom().getBoundingClientRect().height)));var n,e,o}).each(function(t){Wi(u,"height",t+"px")})})},GD=function(a){var c;return{smartTabHeight:(c=ce(et.none()),{extraEvents:[wr(function(t){du(t.element(),'[role="tabpanel"]').each(function(u){var n;Wi(u,"visibility","hidden"),t.getSystem().getByDom(u).toOption().each(function(t){var o,r,i,n=(r=u,i=t,F(o=a,function(t,n){wm.set(i,o[n].view());var e=r.dom().getBoundingClientRect();return wm.set(i,[]),e.height})),e=UD(n);c.set(e)}),WD(t.element(),u,c),$i(u,"visibility"),n=t,ot(a).each(function(t){return jD.showTab(n,t.value)}),Tg.requestAnimationFrame(function(){WD(t.element(),u,c)})})}),mr(Do(),function(n){du(n.element(),'[role="tabpanel"]').each(function(t){WD(n.element(),t,c)})}),mr(Tb,function(r,t){du(r.element(),'[role="tabpanel"]').each(function(n){var t=Vl();Wi(n,"visibility","hidden");var e=qi(n,"height").map(function(t){return parseInt(t,10)});$i(n,"height");var o=n.dom().getBoundingClientRect().height;e.forall(function(t){return t<o})?(c.set(et.from(o)),WD(r.element(),n,c)):e.each(function(t){Wi(n,"height",t+"px")}),$i(n,"visibility"),t.each(Rl)})})],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}},XD="send-data-to-section",YD="send-data-to-view",qD=oi("update-dialog"),KD=oi("update-title"),$D=oi("update-body"),JD=oi("update-footer"),QD=oi("body-send-message"),ZD=function(t,n,d,e){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:P({},n.map(function(t){return{id:t}}).getOr({}),e?{"aria-live":"polite"}:{})},components:[],behaviours:Wu([Xw(0),vE.config({channel:$D,updateState:function(t,n){return et.some({isTabPanel:function(){return"tabpanel"===n.body.type}})},renderComponents:function(t){switch(t.body.type){case"tabpanel":return[(r={tabs:t.body.tabs},i=d,u=ce({}),a=function(t){var n=Im.getValue(t),e=_D(n).getOr({}),o=u.get(),r=bt(o,e);u.set(r)},c=function(t){var n=u.get();Im.setValue(t,n)},s=ce(null),f=F(r.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:i.shared.providers.translate(t.title)},view:function(){return[Vw.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"]},components:F(t.items,function(t){return ik(n,t,i)}),formBehaviours:Wu([hm.config({mode:"acyclic",useTabstopAt:x(aS)}),rg("TabView.form.events",[wr(c),Sr(a)]),Qu.config({channels:Rt([{key:XD,value:{onReceive:a}},{key:YD,value:{onReceive:c}}])})])}})]}}}),l=GD(f).smartTabHeight,jD.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,n,e){var o=Im.getValue(n);Lo(t,Eb,{name:o,oldName:s.get()}),s.set(o)},tabs:f,components:[jD.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[VD.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Wu([Iy.config({})])}),jD.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:l.selectFirst,tabSectionBehaviours:Wu([rg("tabpanel",l.extraEvents),hm.config({mode:"acyclic"}),ll.config({find:function(t){return ot(jD.getViewItems(t))}}),Im.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([XD],{}),u.get()},setValue:function(t,n){u.set(n),t.getSystem().broadcastOn([YD],{})}}})])}))];default:return[(e={items:t.body.items},o=d,n=Sg(Vw.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"]},components:F(e.items,function(t){return ik(n,t,o)})}})),{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:Wu([hm.config({mode:"acyclic",useTabstopAt:x(aS)}),Gw(n),Qw(n,{postprocess:function(t){return _D(t).fold(function(t){return H.console.error(t),{}},function(t){return t})}})])})]}var e,o,n,r,i,u,a,c,s,f,l},initialData:t})])}},t_=function(t,e){return[vr(uo(),cS),t(xb,function(t,n){e.onClose(),n.onClose()}),t(wb,function(t,n,e,o){n.onCancel(t),zo(o,xb)}),mr(Ob,function(t,n){return e.onUnblock()}),mr(kb,function(t,n){return e.onBlock(n.event())})]},n_=function(i,t){var n=function(t,r){return mr(t,function(e,o){u(e,function(t,n){r(i(),t,o.event(),e)})})},u=function(n,e){vE.getState(n).get().each(function(t){e(t,n)})};return t_(n,t).concat([n(Sb,function(t,n,e){n.onAction(t,{name:e.name()})})])},e_=function(i,t){var n=function(t,r){return mr(t,function(e,o){u(e,function(t,n){r(i(),t,o.event(),e)})})},u=function(n,e){vE.getState(n).get().each(function(t){e(t.internalDialog,n)})};return t_(n,t).concat([n(Cb,function(t,n){return n.onSubmit(t)}),n(yb,function(t,n,e){n.onChange(t,{name:e.name()})}),n(Sb,function(t,n,e){n.onAction(t,{name:e.name(),value:e.value()})}),n(Eb,function(t,n,e){n.onTabChange(t,{newTabName:e.name(),oldTabName:e.oldName()})}),Sr(function(t){var n=i();Im.setValue(t,n.getData())})])},o_=function(t,n){var e=function(t,n){for(var e=[],o=[],r=0,i=t.length;r<i;r++){var u=t[r];(n(u,r,t)?e:o).push(u)}return{pass:e,fail:o}}(n.map(function(t){return t.footerButtons}).getOr([]),function(t){return"start"===t.align}),o=function(t,n){return ab.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:F(n,function(t){return t.memento.asSpec()})})};return[o("start",e.pass),o("end",e.fail)]},r_=function(t,i){return{dom:vp('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Wu([vE.config({channel:JD,initialData:t,updateState:function(t,n){var r=F(n.buttons,function(t){var n,e,o=Sg((e=i,uC(n=t,n.type,e)));return{name:t.name,align:t.align,memento:o}});return et.some({lookupByName:function(t,n){return e=t,o=n,N(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(e)});var e,o},footerButtons:r})},renderComponents:o_})])}},i_=function(t,n){return NA.parts().footer(r_(t,n))},u_=function(n,e){if(n.getRoot().getSystem().isConnected()){var o=ll.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return Vw.getField(o,e).fold(function(){var t=n.getFooter();return vE.getState(t).get().bind(function(t){return t.lookupByName(o,e)})},function(t){return et.some(t)})}return et.none()},a_=function(c,o){var t=function(t){var n=c.getRoot();n.getSystem().isConnected()&&t(n)},s={getData:function(){var t=c.getRoot(),n=t.getSystem().isConnected()?c.getFormWrapper():t;return Im.getValue(n)},setData:function(a){t(function(t){var n,e,o=s.getData(),r=yt(o,a),i=(n=r,e=c.getRoot(),vE.getState(e).get().map(function(t){return Bn(Tn("data",t.dataValidator,n))}).getOr(n)),u=c.getFormWrapper();Im.setValue(u,i)})},disable:function(t){u_(c,t).each(Qp.disable)},enable:function(t){u_(c,t).each(Qp.enable)},focus:function(t){u_(c,t).each(Pm.focus)},block:function(n){if(!L(n))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){Lo(t,kb,{message:n})})},unblock:function(){t(function(t){zo(t,Ob)})},showTab:function(e){t(function(t){var n=c.getBody();vE.getState(n).get().exists(function(t){return t.isTabPanel()})&&ll.getCurrent(n).each(function(t){jD.showTab(t,e)})})},redial:function(e){t(function(t){var n=o(e);t.getSystem().broadcastOn([qD],n),t.getSystem().broadcastOn([KD],n.internalDialog),t.getSystem().broadcastOn([$D],n.internalDialog),t.getSystem().broadcastOn([JD],n.internalDialog),s.setData(n.initialData)})},close:function(){t(function(t){zo(t,xb)})}};return s},c_=function(t){return wg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(t){zo(t,wb)}})},s_=function(t,n,e){var o=function(t){return[uu(e.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:P({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:Wu([vE.config({channel:KD,renderComponents:o})])}},f_=function(t,n){return e={title:n.shared.providers.translate(t),draggable:!0},o=n.shared.providers,r=NA.parts().title(s_(e,et.none(),o)),i=NA.parts().draghandle({dom:vp('<div class="tox-dialog__draghandle"></div>')}),u=NA.parts().close(c_(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),ab.sketch({dom:vp('<div class="tox-dialog__header"></div>'),components:a});var e,o,r,i,u,a},l_=function(t,n){return{onClose:function(){return n.closeWindow()},onBlock:function(e){NA.setBusy(t(),function(t,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:vp('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})},onUnblock:function(){NA.setIdle(t())}}},d_=function(t,n,e,o){var r;return su(NA.sketch({lazySink:o.shared.getSink,onEscape:function(t){return zo(t,wb),et.some(!0)},useTabstopAt:function(t){return!aS(t)&&("button"!==Qo(t)||"disabled"!==qr(t,"disabled"))},modalBehaviours:Wu([vE.config({channel:qD,updateState:function(t,n){return et.some(n)},initialData:n}),nS({}),Pm.config({}),rg("execute-on-form",e.concat([xr(uo(),function(t,n){hm.focusIn(t)})])),rg("scroll-lock",[wr(function(){Ri(rr(),"tox-dialog__disable-scroll")}),Sr(function(){Ni(rr(),"tox-dialog__disable-scroll")})])].concat(t.extraBehaviours)),eventOrder:(r={},r[wo()]=["execute-on-form"],r[xo()]=["reflecting","receiving"],r[_o()]=["scroll-lock","reflecting","messages","execute-on-form","alloy.base.behaviour"],r[Mo()]=["alloy.base.behaviour","execute-on-form","messages","reflecting","scroll-lock"],r),dom:{tag:"div",classes:["tox-dialog"].concat(t.extraClasses),styles:P({position:"relative"},t.extraStyles)},components:[t.header,t.body].concat(t.footer.toArray()),dragBlockClass:"tox-dialog-wrap",parts:{blocker:{dom:vp('<div class="tox-dialog-wrap"></div>'),components:[{dom:{tag:"div",classes:["tox-dialog-wrap__backdrop"]}}]}}}))},m_=function(t,n,e){var o,r,i,u=f_(t.internalDialog.title,e),a=(o={body:t.internalDialog.body},r=e,i=ZD(o,et.none(),r,!1),NA.parts().body(i)),c=i_({buttons:t.internalDialog.buttons},e.shared.providers),s=e_(function(){return m},l_(function(){return d},n)),f="normal"!==t.internalDialog.size?"large"===t.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],l={header:u,body:a,footer:et.some(c),extraClasses:f,extraBehaviours:[],extraStyles:{}},d=d_(l,t,s,e),m=a_({getRoot:function(){return d},getBody:function(){return NA.getBody(d)},getFooter:function(){return NA.getFooter(d)},getFormWrapper:function(){var t=NA.getBody(d);return ll.getCurrent(t).getOr(t)}},n.redial);return{dialog:d,instanceApi:m}},g_=tinymce.util.Tools.resolve("tinymce.util.URI"),p_=["insertContent","setContent","execCommand","close","block","unblock"],h_=function(t){return k(t)&&-1!==p_.indexOf(t.mceAction)},v_=function(o,t,r,n){var e,i,u,a,c=f_(o.title,n),s=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[sS({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:Wu([Iy.config({}),Pm.config({})])})]}],behaviours:Wu([hm.config({mode:"acyclic",useTabstopAt:x(aS)})])},NA.parts().body(i)),f=o.buttons.bind(function(t){return 0===t.length?et.none():et.some(i_({buttons:t},n.shared.providers))}),l=n_(function(){return y},l_(function(){return b},t)),d=P({},o.height.fold(function(){return{}},function(t){return{height:t+"px","max-height":t+"px"}}),o.width.fold(function(){return{}},function(t){return{width:t+"px","max-width":t+"px"}})),m=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],g=new g_(o.url,{base_uri:new g_(H.window.location.href)}),p=g.protocol+"://"+g.host+(g.port?":"+g.port:""),h=ce(et.none()),v=[rg("messages",[wr(function(){var t=zv(fe.fromDom(H.window),"message",function(t){if(g.isSameOrigin(new g_(t.raw().origin))){var n=t.raw().data;h_(n)?function(t,n,e){switch(e.mceAction){case"insertContent":t.insertContent(e.content);break;case"setContent":t.setContent(e.content);break;case"execCommand":var o=!!O(e.ui)&&e.ui;t.execCommand(e.cmd,o,e.value);break;case"close":n.close();break;case"block":n.block(e.message);break;case"unblock":n.unblock()}}(r,y,n):!h_(e=n)&&k(e)&&gt(e,"mceAction")&&o.onMessage(y,n)}var e});h.set(et.some(t))}),Sr(function(){h.get().each(function(t){return t.unbind()})})]),Qu.config({channels:(e={},e[QD]={onReceive:function(t,n){du(t.element(),"iframe").each(function(t){t.dom().contentWindow.postMessage(n,p)})}},e)})],b=d_({header:c,body:s,footer:f,extraClasses:m,extraBehaviours:v,extraStyles:d},o,l,n),y=(u=b,a=function(t){u.getSystem().isConnected()&&t(u)},{block:function(n){if(!L(n))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");a(function(t){Lo(t,kb,{message:n})})},unblock:function(){a(function(t){zo(t,Ob)})},close:function(){a(function(t){zo(t,xb)})},sendMessage:function(n){a(function(t){t.getSystem().broadcastOn([QD],n)})}});return{dialog:b,instanceApi:y}},b_=function(t,n,e,o){var r,i,u,a,c,s,f,l,d,m,g,p=oi("dialog-label"),h=oi("dialog-content"),v=Sg((u={title:t.internalDialog.title,draggable:!0},a=p,c=e.shared.providers,ab.sketch({dom:vp('<div class="tox-dialog__header"></div>'),components:[s_(u,et.some(a),c),c_(c)],containerBehaviours:Wu([yA.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return mu(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),b=Sg((s={body:t.internalDialog.body},f=h,l=e,d=o,ZD(s,et.some(f),l,d))),y=Sg((m={buttons:t.internalDialog.buttons},g=e.shared.providers,r_(m,g))),x=e_(function(){return S},{onBlock:function(){},onUnblock:function(){},onClose:function(){return n.closeWindow()}}),w=su({dom:{tag:"div",classes:["tox-dialog"],attributes:(r={role:"dialog"},r["aria-labelledby"]=p,r["aria-describedby"]=""+h,r)},eventOrder:(i={},i[xo()]=[vE.name(),Qu.name()],i[wo()]=["execute-on-form"],i[_o()]=["reflecting","execute-on-form"],i),behaviours:Wu([hm.config({mode:"cyclic",onEscape:function(t){return zo(t,xb),et.some(!0)},useTabstopAt:function(t){return!aS(t)&&("button"!==Qo(t)||"disabled"!==qr(t,"disabled"))}}),vE.config({channel:qD,updateState:function(t,n){return et.some(n)},initialData:t}),rg("execute-on-form",x),nS({})]),components:[v.asSpec(),b.asSpec(),y.asSpec()]}),S=a_({getRoot:function(){return w},getFooter:function(){return y.get(w)},getBody:function(){return b.get(w)},getFormWrapper:function(){var t=b.get(w);return ll.getCurrent(t).getOr(t)}},n.redial);return{dialog:w,instanceApi:S}},y_={dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]}},x_={dom:{tag:"div",classes:["tox-dialog__header"]}},w_=function(t,n){return NA.parts().close(wg.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close")}},action:t,buttonBehaviours:Wu([Iy.config({})])}))},S_=function(){return NA.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},C_=function(t,n){return NA.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:vp("<p>"+n.translate(t)+"</p>")}]}]})},k_=function(t){return NA.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},O_=function(t,n){return[ab.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),ab.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]},E_=function(e){return NA.sketch({lazySink:e.lazySink,onEscape:function(){return e.onCancel(),et.some(!0)},dom:{tag:"div",classes:["tox-dialog"].concat(e.extraClasses)},components:[bt(e.headerOverride.getOr(x_),{components:[e.partSpecs.title,e.partSpecs.close]}),e.partSpecs.body,e.partSpecs.footer],parts:{blocker:{dom:vp('<div class="tox-dialog-wrap"></div>'),components:[{dom:{tag:"div",classes:["tox-dialog-wrap__backdrop"]}}]}},modalBehaviours:Wu([rg("basic-dialog-events",[mr(wb,function(t,n){e.onCancel()}),mr(Cb,function(t,n){e.onSubmit()})])])})},T_=function(s){var u,a,e=(u=s.backstage.shared,{open:function(t,n){var e=function(){NA.hide(r),n()},o=Sg(uC({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:et.none()},"cancel",u.providers)),r=su(E_({lazySink:function(){return u.getSink()},headerOverride:et.some(y_),partSpecs:{title:S_(),close:w_(function(){e()},u.providers),body:C_(t,u.providers),footer:k_(O_([],[o.asSpec()]))},onCancel:function(){return e()},onSubmit:tt,extraClasses:["tox-alert-dialog"]}));NA.show(r);var i=o.get(r);Pm.focus(i)}}),o=(a=s.backstage.shared,{open:function(t,n){var e=function(t){NA.hide(i),n(t)},o=Sg(uC({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:et.none()},"submit",a.providers)),r=uC({name:"no",text:"No",primary:!0,align:"end",disabled:!1,icon:et.none()},"cancel",a.providers),i=su(E_({lazySink:function(){return a.getSink()},headerOverride:et.some(y_),partSpecs:{title:S_(),close:w_(function(){e(!1)},a.providers),body:C_(t,a.providers),footer:k_(O_([],[r,o.asSpec()]))},onCancel:function(){return e(!1)},onSubmit:function(){return e(!0)},extraClasses:["tox-confirm-dialog"]}));NA.show(i);var u=o.get(i);Pm.focus(u)}}),r=function(t,e){return DD.openUrl(function(t){var n=v_(t,{closeWindow:function(){NA.hide(n.dialog),e(n.instanceApi)}},s.editor,s.backstage);return NA.show(n.dialog),n.instanceApi},t)},i=function(t,i){return DD.open(function(t,n,e){var o=n,r=m_({dataValidator:e,initialData:o,internalDialog:t},{redial:DD.redial,closeWindow:function(){NA.hide(r.dialog),i(r.instanceApi)}},s.backstage);return NA.show(r.dialog),r.instanceApi.setData(o),r.instanceApi},t)},c=function(t,u,a,c){return DD.open(function(t,n,e){var o=Bn(Tn("data",e,n)),r=b_({dataValidator:e,initialData:o,internalDialog:t},{redial:DD.redial,closeWindow:function(){yg.hide(i),a(r.instanceApi)}},s.backstage,c),i=su(yg.sketch({lazySink:s.backstage.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},inlineBehaviours:Wu([rg("window-manager-inline-events",[mr(Fo(),function(t,n){zo(r.dialog,wb)})])])}));return yg.showAt(i,u,fu(r.dialog)),r.instanceApi.setData(o),hm.focusIn(r.dialog),r.instanceApi},t)};return{open:function(t,n,e){return n!==undefined&&"toolbar"===n.inline?c(t,s.backstage.shared.anchors.toolbar(),e,n.ariaAttrs):n!==undefined&&"cursor"===n.inline?c(t,s.backstage.shared.anchors.cursor(),e,n.ariaAttrs):i(t,e)},openUrl:function(t,n){return r(t,n)},alert:function(t,n){e.open(t,function(){n()})},close:function(t){t.close()},confirm:function(t,n){o.open(t,function(t){n(t)})}}};!function N_(){e.add("silver",function(t){var n=MA(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;Rv(t,o.shared);var u=T_({editor:t,backstage:o});return{renderUI:r,getWindowManagerImpl:nt(u),getNotificationManagerImpl:function(){return Bg(t,{backstage:o},e)},ui:i()}})}()}(window);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.0.11 (2019-07-04)
8
+ */
9
+ !function(j){"use strict";var i=function(){},q=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},$=function(e){return function(){return e}},W=function(e){return e};function d(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var e,t,n,r,o,s=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}},l=$(!1),a=$(!0),u=l,c=a,f=function(){return h},h=(r={fold:function(e,t){return e()},is:u,isSome:u,isNone:c,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:t,map:f,ap:f,each:function(){},bind:f,flatten:f,exists:u,forall:c,filter:f,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:$("none()")},Object.freeze&&Object.freeze(r),r),m=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:c,isNone:u,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return m(e(n))},ap:function(e){return e.fold(f,function(e){return m(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:h},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(u,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:m,none:f,from:function(e){return null===e||e===undefined?h:m(e)}},g=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},K=g("string"),x=g("object"),p=g("array"),v=g("null"),y=g("boolean"),b=g("function"),C=g("number"),w=Array.prototype.slice,z=(o=Array.prototype.indexOf)===undefined?function(e,t){return B(e,t)}:function(e,t){return o.call(e,t)},N=function(e,t){return-1<z(e,t)},E=function(e,t){return D(e,t).isSome()},X=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},A=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n,e)}},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o,e)?n:r).push(a)}return{pass:n,fail:r}},S=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r,e)&&n.push(i)}return n},k=function(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n,e)}(e,function(e){n=t(n,e)}),n},M=function(e,t,n){return A(e,function(e){n=t(n,e)}),n},R=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return T.some(o)}return T.none()},D=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n,e))return T.some(n)}return T.none()},B=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},O=Array.prototype.push,H=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Array.prototype.isPrototypeOf(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);O.apply(t,e[n])}return t}(X(e,t))},_=function(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n,e))return!1}return!0},L=function(e,t){return S(e,function(e){return!N(t,e)})},P=function(e){return 0===e.length?T.none():T.some(e[0])},V=function(e){return 0===e.length?T.none():T.some(e[e.length-1])},I=b(Array.from)?Array.from:function(e){return w.call(e)},G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var F,U,J,Q,Z,ee,te,ne,re,oe,ie,ae,ue="undefined"!=typeof j.window?j.window:Function("return this;")(),se=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:ue,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},le={getOrDie:function(e,t){var n=se(e,t);if(n===undefined||null===n)throw e+" not available on this browser";return n}},ce=function(){return le.getOrDie("URL")},fe=function(e){return ce().createObjectURL(e)},de=function(e){ce().revokeObjectURL(e)},he=j.navigator,me=he.userAgent,ge=function(e){return"matchMedia"in j.window&&j.matchMedia(e).matches};ne=/Android/.test(me),U=(U=!(F=/WebKit/.test(me))&&/MSIE/gi.test(me)&&/Explorer/gi.test(he.appName))&&/MSIE (\w+)\./.exec(me)[1],J=-1!==me.indexOf("Trident/")&&(-1!==me.indexOf("rv:")||-1!==he.appName.indexOf("Netscape"))&&11,Q=-1!==me.indexOf("Edge/")&&!U&&!J&&12,U=U||J||Q,Z=!F&&!J&&/Gecko/.test(me),ee=-1!==me.indexOf("Mac"),te=/(iPad|iPhone)/.test(me),re="FormData"in j.window&&"FileReader"in j.window&&"URL"in j.window&&!!fe,oe=ge("only screen and (max-device-width: 480px)")&&(ne||te),ie=ge("only screen and (min-width: 800px)")&&(ne||te),ae=-1!==me.indexOf("Windows Phone"),Q&&(F=!1);var pe,ve,ye,be,Ce,we,xe,ze,Ne,Ee,Se,ke,Te,Ae,Me,Re,De,Be,Oe,He={opera:!1,webkit:F,ie:U,gecko:Z,mac:ee,iOS:te,android:ne,contentEditable:!te||re||534<=parseInt(me.match(/AppleWebKit\/(\d*)/)[1],10),transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!==U,range:j.window.getSelection&&"Range"in j.window,documentMode:U&&!Q?j.document.documentMode||7:10,fileApi:re,ceFalse:!1===U||8<U,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!1===U||11<U,desktop:!oe&&!ie,windowsPhone:ae},_e=window.Promise?window.Promise:function(){function r(e,t){return function(){e.apply(t,arguments)}}var e=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],c(e,r(o,this),r(u,this))},t=i.immediateFn||"function"==typeof j.setImmediate&&j.setImmediate||function(e){j.setTimeout(e,1)};function a(r){var o=this;null!==this._state?t(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void c(r(t,e),r(o,this),r(u,this))}this._state=!0,this._value=e,s.call(this)}catch(n){u.call(this,n)}}function u(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function l(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function c(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}return i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(n,r){var o=this;return new i(function(e,t){a.call(o,new l(n,r,e,t))})},i.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&e(arguments[0])?arguments[0]:arguments);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i}(),Le=function(e,t){return"number"!=typeof t&&(t=0),j.setTimeout(e,t)},Pe=function(e,t){return"number"!=typeof t&&(t=1),j.setInterval(e,t)},Ve=function(n,r){var o,e;return(e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];j.clearTimeout(o),o=Le(function(){n.apply(this,e)},r)}).stop=function(){j.clearTimeout(o)},e},Ie={requestAnimationFrame:function(e,t){pe?pe.then(e):pe=new _e(function(e){t||(t=j.document.body),function(e,t){var n,r=j.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=j.window[o[n]+"RequestAnimationFrame"];r||(r=function(e){j.window.setTimeout(e,0)}),r(e,t)}(e,t)}).then(e)},setTimeout:Le,setInterval:Pe,setEditorTimeout:function(e,t,n){return Le(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=Pe(function(){e.removed?j.clearInterval(r):t()},n)},debounce:Ve,throttle:Ve,clearInterval:function(e){return j.clearInterval(e)},clearTimeout:function(e){return j.clearTimeout(e)}},Fe=/^(?:mouse|contextmenu)|click/,Ue={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1},je=function(){return!1},qe=function(){return!0},$e=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},We=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},Ke=function(e,t){var n,r,o=t||{};for(n in e)Ue[n]||(o[n]=e[n]);if(o.target||(o.target=o.srcElement||j.document),He.experimentalShadowDom&&(o.target=function(e,t){if(e.composedPath){var n=e.composedPath();if(n&&0<n.length)return n[0]}return t}(e,o.target)),e&&Fe.test(e.type)&&e.pageX===undefined&&e.clientX!==undefined){var i=o.target.ownerDocument||j.document,a=i.documentElement,u=i.body;o.pageX=e.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=qe,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=qe,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},!(o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=qe,o.stopPropagation()})==((r=o).isDefaultPrevented===qe||r.isDefaultPrevented===je)&&(o.isDefaultPrevented=je,o.isPropagationStopped=je,o.isImmediatePropagationStopped=je),"undefined"==typeof o.metaKey&&(o.metaKey=!1),o},Xe=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},a=function(){We(e,"DOMContentLoaded",a),We(e,"load",a),n.domLoaded||(n.domLoaded=!0,t(o))},u=function(){i()&&(We(r,"readystatechange",u),a())},s=function(){try{r.documentElement.doScroll("left")}catch(e){return void Ie.setTimeout(s)}a()};!r.addEventListener||He.ie&&He.ie<11?($e(r,"readystatechange",u),r.documentElement.doScroll&&e.self===e.top&&s()):i()?a():$e(e,"DOMContentLoaded",a),$e(e,"load",a)}},Ye=function(){function e(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in j.document.documentElement,this.hasFocusIn="onfocusin"in j.document.documentElement,this.count=1}return e.prototype.bind=function(e,t,n,r){var o,i,a,u,s,l,c,f=this,d=j.window,h=function(e){f.executeHandlers(Ke(e||d.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){e[f.expando]?o=e[f.expando]:(o=f.count++,e[f.expando]=o,f.events[o]={}),r=r||e;var m=t.split(" ");for(a=m.length;a--;)l=h,s=c=!1,"DOMContentLoaded"===(u=m[a])&&(u="ready"),f.domLoaded&&"ready"===u&&"complete"===e.readyState?n.call(r,Ke({type:u})):(f.hasMouseEnterLeave||(s=f.mouseEnterLeave[u])&&(l=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Ke(e||d.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,f.executeHandlers(e,o))}),f.hasFocusIn||"focusin"!==u&&"focusout"!==u||(c=!0,s="focusin"===u?"focus":"blur",l=function(e){(e=Ke(e||d.event)).type="focus"===e.type?"focusin":"focusout",f.executeHandlers(e,o)}),(i=f.events[o][u])?"ready"===u&&f.domLoaded?n(Ke({type:u})):i.push({func:n,scope:r}):(f.events[o][u]=i=[{func:n,scope:r}],i.fakeName=s,i.capture=c,i.nativeHandler=l,"ready"===u?Xe(e,l,f):$e(e,s||u,l,c)));return e=i=0,n}},e.prototype.unbind=function(e,t,n){var r,o,i,a,u,s;if(!e||3===e.nodeType||8===e.nodeType)return this;if(r=e[this.expando]){if(s=this.events[r],t){var l=t.split(" ");for(i=l.length;i--;)if(o=s[u=l[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var c=o.nativeHandler,f=o.fakeName,d=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=c,o.fakeName=f,o.capture=d,s[u]=o}n&&0!==o.length||(delete s[u],We(e,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in s)o=s[u],We(e,o.fakeName||u,o.nativeHandler,o.capture);s={}}for(u in s)return this;delete this.events[r];try{delete e[this.expando]}catch(h){e[this.expando]=null}}return this},e.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=Ke(null,n);for(o.type=t,o.target=e;(r=e[this.expando])&&this.executeHandlers(o,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!o.isPropagationStopped(););return this},e.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},e.prototype.destroy=function(){this.events={}},e.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},e.prototype.executeHandlers=function(e,t){var n,r,o,i,a=this.events[t];if(n=a&&a[e.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return},e.Event=new e,e}(),Ge="sizzle"+-new Date,Je=j.window.document,Qe=0,Ze=0,et=Dt(),tt=Dt(),nt=Dt(),rt=function(e,t){return e===t&&(ke=!0),0},ot=typeof undefined,it={}.hasOwnProperty,at=[],ut=at.pop,st=at.push,lt=at.push,ct=at.slice,ft=at.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},dt="[\\x20\\t\\r\\n\\f]",ht="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",mt="\\["+dt+"*("+ht+")(?:"+dt+"*([*^$|!~]?=)"+dt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ht+"))|)"+dt+"*\\]",gt=":("+ht+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+mt+")*)|.*)\\)|)",pt=new RegExp("^"+dt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+dt+"+$","g"),vt=new RegExp("^"+dt+"*,"+dt+"*"),yt=new RegExp("^"+dt+"*([>+~]|"+dt+")"+dt+"*"),bt=new RegExp("="+dt+"*([^\\]'\"]*?)"+dt+"*\\]","g"),Ct=new RegExp(gt),wt=new RegExp("^"+ht+"$"),xt={ID:new RegExp("^#("+ht+")"),CLASS:new RegExp("^\\.("+ht+")"),TAG:new RegExp("^("+ht+"|[*])"),ATTR:new RegExp("^"+mt),PSEUDO:new RegExp("^"+gt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+dt+"*(even|odd|(([+-]|)(\\d*)n|)"+dt+"*(?:([+-]|)"+dt+"*(\\d+)|))"+dt+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+dt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+dt+"*((?:-\\d)?\\d*)"+dt+"*\\)|)(?=[^-]|$)","i")},zt=/^(?:input|select|textarea|button)$/i,Nt=/^h\d$/i,Et=/^[^{]+\{\s*\[native \w/,St=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,kt=/[+~]/,Tt=/'|\\/g,At=new RegExp("\\\\([\\da-f]{1,6}"+dt+"?|("+dt+")|.)","ig"),Mt=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{lt.apply(at=ct.call(Je.childNodes),Je.childNodes),at[Je.childNodes.length].nodeType}catch(eE){lt={apply:at.length?function(e,t){st.apply(e,ct.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var Rt=function(e,t,n,r){var o,i,a,u,s,l,c,f,d,h;if((t?t.ownerDocument||t:Je)!==Ae&&Te(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Ae).nodeType)&&9!==u)return[];if(Re&&!r){if(o=St.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Oe(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return lt.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&ye.getElementsByClassName)return lt.apply(n,t.getElementsByClassName(a)),n}if(ye.qsa&&(!De||!De.test(e))){if(f=c=Ge,d=t,h=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(l=xe(e),(c=t.getAttribute("id"))?f=c.replace(Tt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=l.length;s--;)l[s]=f+It(l[s]);d=kt.test(e)&&Pt(t.parentNode)||t,h=l.join(",")}if(h)try{return lt.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return Ne(e.replace(pt,"$1"),t,n,r)};function Dt(){var n=[];return function r(e,t){return n.push(e+" ")>be.cacheLength&&delete r[n.shift()],r[e+" "]=t}}function Bt(e){return e[Ge]=!0,e}function Ot(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function Ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function _t(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function Lt(a){return Bt(function(i){return i=+i,Bt(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function Pt(e){return e&&typeof e.getElementsByTagName!==ot&&e}for(ve in ye=Rt.support={},we=Rt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Te=Rt.setDocument=function(e){var t,s=e?e.ownerDocument||e:Je,n=s.defaultView;return s!==Ae&&9===s.nodeType&&s.documentElement?(Me=(Ae=s).documentElement,Re=!we(s),n&&n!==function r(e){try{return e.top}catch(t){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){Te()},!1):n.attachEvent&&n.attachEvent("onunload",function(){Te()})),ye.attributes=!0,ye.getElementsByTagName=!0,ye.getElementsByClassName=Et.test(s.getElementsByClassName),ye.getById=!0,be.find.ID=function(e,t){if(typeof t.getElementById!==ot&&Re){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},be.filter.ID=function(e){var t=e.replace(At,Mt);return function(e){return e.getAttribute("id")===t}},be.find.TAG=ye.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==ot)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},be.find.CLASS=ye.getElementsByClassName&&function(e,t){if(Re)return t.getElementsByClassName(e)},Be=[],De=[],ye.disconnectedMatch=!0,De=De.length&&new RegExp(De.join("|")),Be=Be.length&&new RegExp(Be.join("|")),t=Et.test(Me.compareDocumentPosition),Oe=t||Et.test(Me.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},rt=t?function(e,t){if(e===t)return ke=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!ye.sortDetached&&t.compareDocumentPosition(e)===n?e===s||e.ownerDocument===Je&&Oe(Je,e)?-1:t===s||t.ownerDocument===Je&&Oe(Je,t)?1:Se?ft.call(Se,e)-ft.call(Se,t):0:4&n?-1:1)}:function(e,t){if(e===t)return ke=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===s?-1:t===s?1:o?-1:i?1:Se?ft.call(Se,e)-ft.call(Se,t):0;if(o===i)return Ot(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?Ot(a[r],u[r]):a[r]===Je?-1:u[r]===Je?1:0},s):Ae},Rt.matches=function(e,t){return Rt(e,null,null,t)},Rt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Ae&&Te(e),t=t.replace(bt,"='$1']"),ye.matchesSelector&&Re&&(!Be||!Be.test(t))&&(!De||!De.test(t)))try{var n=(void 0).call(e,t);if(n||ye.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(eE){}return 0<Rt(t,Ae,null,[e]).length},Rt.contains=function(e,t){return(e.ownerDocument||e)!==Ae&&Te(e),Oe(e,t)},Rt.attr=function(e,t){(e.ownerDocument||e)!==Ae&&Te(e);var n=be.attrHandle[t.toLowerCase()],r=n&&it.call(be.attrHandle,t.toLowerCase())?n(e,t,!Re):undefined;return r!==undefined?r:ye.attributes||!Re?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},Rt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},Rt.uniqueSort=function(e){var t,n=[],r=0,o=0;if(ke=!ye.detectDuplicates,Se=!ye.sortStable&&e.slice(0),e.sort(rt),ke){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Se=null,e},Ce=Rt.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Ce(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=Ce(t);return n},(be=Rt.selectors={cacheLength:50,createPseudo:Bt,match:xt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(At,Mt),e[3]=(e[3]||e[4]||e[5]||"").replace(At,Mt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Rt.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Rt.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return xt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Ct.test(n)&&(t=xe(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(At,Mt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=et[e+" "];return t||(t=new RegExp("(^|"+dt+")"+e+"("+dt+"|$)"))&&et(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==ot&&e.getAttribute("class")||"")})},ATTR:function(n,r,o){return function(e){var t=Rt.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===o:"!="===r?t!==o:"^="===r?o&&0===t.indexOf(o):"*="===r?o&&-1<t.indexOf(o):"$="===r?o&&t.slice(-o.length)===o:"~="===r?-1<(" "+t+" ").indexOf(o):"|="===r&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(h,e,t,m,g){var p="nth"!==h.slice(0,3),v="last"!==h.slice(-4),y="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,o,i,a,u,s,l=p!==v?"nextSibling":"previousSibling",c=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y;if(c){if(p){for(;l;){for(i=e;i=i[l];)if(y?i.nodeName.toLowerCase()===f:1===i.nodeType)return!1;s=l="only"===h&&!s&&"nextSibling"}return!0}if(s=[v?c.firstChild:c.lastChild],v&&d){for(u=(r=(o=c[Ge]||(c[Ge]={}))[h]||[])[0]===Qe&&r[1],a=r[0]===Qe&&r[2],i=u&&c.childNodes[u];i=++u&&i&&i[l]||(a=u=0)||s.pop();)if(1===i.nodeType&&++a&&i===e){o[h]=[Qe,u,a];break}}else if(d&&(r=(e[Ge]||(e[Ge]={}))[h])&&r[0]===Qe)a=r[1];else for(;(i=++u&&i&&i[l]||(a=u=0)||s.pop())&&((y?i.nodeName.toLowerCase()!==f:1!==i.nodeType)||!++a||(d&&((i[Ge]||(i[Ge]={}))[h]=[Qe,a]),i!==e)););return(a-=g)===m||a%m==0&&0<=a/m}}},PSEUDO:function(e,i){var t,a=be.pseudos[e]||be.setFilters[e.toLowerCase()]||Rt.error("unsupported pseudo: "+e);return a[Ge]?a(i):1<a.length?(t=[e,e,"",i],be.setFilters.hasOwnProperty(e.toLowerCase())?Bt(function(e,t){for(var n,r=a(e,i),o=r.length;o--;)e[n=ft.call(e,r[o])]=!(t[n]=r[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:Bt(function(e){var r=[],o=[],u=ze(e.replace(pt,"$1"));return u[Ge]?Bt(function(e,t,n,r){for(var o,i=u(e,null,r,[]),a=e.length;a--;)(o=i[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return r[0]=e,u(r,null,n,o),!o.pop()}}),has:Bt(function(t){return function(e){return 0<Rt(t,e).length}}),contains:Bt(function(t){return t=t.replace(At,Mt),function(e){return-1<(e.textContent||e.innerText||Ce(e)).indexOf(t)}}),lang:Bt(function(n){return wt.test(n||"")||Rt.error("unsupported lang: "+n),n=n.replace(At,Mt).toLowerCase(),function(e){var t;do{if(t=Re?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=j.window.location&&j.window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===Me},focus:function(e){return e===Ae.activeElement&&(!Ae.hasFocus||Ae.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!be.pseudos.empty(e)},header:function(e){return Nt.test(e.nodeName)},input:function(e){return zt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:Lt(function(){return[0]}),last:Lt(function(e,t){return[t-1]}),eq:Lt(function(e,t,n){return[n<0?n+t:n]}),even:Lt(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Lt(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Lt(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:Lt(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=be.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})be.pseudos[ve]=Ht(ve);for(ve in{submit:!0,reset:!0})be.pseudos[ve]=_t(ve);function Vt(){}function It(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Ft(a,e,t){var u=e.dir,s=t&&"parentNode"===u,l=Ze++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||s)return a(e,t,n)}:function(e,t,n){var r,o,i=[Qe,l];if(n){for(;e=e[u];)if((1===e.nodeType||s)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||s){if((r=(o=e[Ge]||(e[Ge]={}))[u])&&r[0]===Qe&&r[1]===l)return i[2]=r[2];if((o[u]=i)[2]=a(e,t,n))return!0}}}function Ut(o){return 1<o.length?function(e,t,n){for(var r=o.length;r--;)if(!o[r](e,t,n))return!1;return!0}:o[0]}function jt(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,l=null!=t;u<s;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),l&&t.push(u)));return a}function qt(m,g,p,v,y,e){return v&&!v[Ge]&&(v=qt(v)),y&&!y[Ge]&&(y=qt(y,e)),Bt(function(e,t,n,r){var o,i,a,u=[],s=[],l=t.length,c=e||function h(e,t,n){for(var r=0,o=t.length;r<o;r++)Rt(e,t[r],n);return n}(g||"*",n.nodeType?[n]:n,[]),f=!m||!e&&g?c:jt(c,u,m,n,r),d=p?y||(e?m:l||v)?[]:t:f;if(p&&p(f,d,n,r),v)for(o=jt(d,s),v(o,[],n,r),i=o.length;i--;)(a=o[i])&&(d[s[i]]=!(f[s[i]]=a));if(e){if(y||m){if(y){for(o=[],i=d.length;i--;)(a=d[i])&&o.push(f[i]=a);y(null,d=[],o,r)}for(i=d.length;i--;)(a=d[i])&&-1<(o=y?ft.call(e,a):u[i])&&(e[o]=!(t[o]=a))}}else d=jt(d===t?d.splice(l,d.length):d),y?y(null,t,d,r):lt.apply(t,d)})}function $t(e){for(var r,t,n,o=e.length,i=be.relative[e[0].type],a=i||be.relative[" "],u=i?1:0,s=Ft(function(e){return e===r},a,!0),l=Ft(function(e){return-1<ft.call(r,e)},a,!0),c=[function(e,t,n){return!i&&(n||t!==Ee)||((r=t).nodeType?s(e,t,n):l(e,t,n))}];u<o;u++)if(t=be.relative[e[u].type])c=[Ft(Ut(c),t)];else{if((t=be.filter[e[u].type].apply(null,e[u].matches))[Ge]){for(n=++u;n<o&&!be.relative[e[n].type];n++);return qt(1<u&&Ut(c),1<u&&It(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(pt,"$1"),t,u<n&&$t(e.slice(u,n)),n<o&&$t(e=e.slice(n)),n<o&&It(e))}c.push(t)}return Ut(c)}Vt.prototype=be.filters=be.pseudos,be.setFilters=new Vt,xe=Rt.tokenize=function(e,t){var n,r,o,i,a,u,s,l=tt[e+" "];if(l)return t?0:l.slice(0);for(a=e,u=[],s=be.preFilter;a;){for(i in n&&!(r=vt.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=yt.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(pt," ")}),a=a.slice(n.length)),be.filter)be.filter.hasOwnProperty(i)&&(!(r=xt[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?Rt.error(e):tt(e,u).slice(0)},ze=Rt.compile=function(e,t){var n,r=[],o=[],i=nt[e+" "];if(!i){for(t||(t=xe(e)),n=t.length;n--;)(i=$t(t[n]))[Ge]?r.push(i):o.push(i);(i=nt(e,function a(p,v){var y=0<v.length,b=0<p.length,e=function(e,t,n,r,o){var i,a,u,s=0,l="0",c=e&&[],f=[],d=Ee,h=e||b&&be.find.TAG("*",o),m=Qe+=null==d?1:Math.random()||.1,g=h.length;for(o&&(Ee=t!==Ae&&t);l!==g&&null!=(i=h[l]);l++){if(b&&i){for(a=0;u=p[a++];)if(u(i,t,n)){r.push(i);break}o&&(Qe=m)}y&&((i=!u&&i)&&s--,e&&c.push(i))}if(s+=l,y&&l!==s){for(a=0;u=v[a++];)u(c,f,t,n);if(e){if(0<s)for(;l--;)c[l]||f[l]||(f[l]=ut.call(r));f=jt(f)}lt.apply(r,f),o&&!e&&0<f.length&&1<s+v.length&&Rt.uniqueSort(r)}return o&&(Qe=m,Ee=d),c};return y?Bt(e):e}(o,r))).selector=e}return i},Ne=Rt.select=function(e,t,n,r){var o,i,a,u,s,l="function"==typeof e&&e,c=!r&&xe(e=l.selector||e);if(n=n||[],1===c.length){if(2<(i=c[0]=c[0].slice(0)).length&&"ID"===(a=i[0]).type&&ye.getById&&9===t.nodeType&&Re&&be.relative[i[1].type]){if(!(t=(be.find.ID(a.matches[0].replace(At,Mt),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=xt.needsContext.test(e)?0:i.length;o--&&(a=i[o],!be.relative[u=a.type]);)if((s=be.find[u])&&(r=s(a.matches[0].replace(At,Mt),kt.test(i[0].type)&&Pt(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&It(i)))return lt.apply(n,r),n;break}}return(l||ze(e,c))(r,t,!Re,n,kt.test(e)&&Pt(t.parentNode)||t),n},ye.sortStable=Ge.split("").sort(rt).join("")===Ge,ye.detectDuplicates=!!ke,Te(),ye.sortDetached=!0;var Wt=Array.isArray,Kt=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},Xt=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},Yt={isArray:Wt,toArray:function(e){var t,n,r=e;if(!Wt(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:Kt,map:function(n,r){var o=[];return Kt(n,function(e,t){o.push(r(e,t,n))}),o},filter:function(n,r){var o=[];return Kt(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},findIndex:Xt,find:function(e,t,n){var r=Xt(e,t,n);return-1!==r?e[r]:undefined},last:function(e){return e[e.length-1]}},Gt=/^\s*|\s*$/g,Jt=function(e){return null===e||e===undefined?"":(""+e).replace(Gt,"")},Qt=function(e,t){return t?!("array"!==t||!Yt.isArray(e))||typeof e===t:e!==undefined},Zt=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),Yt.each(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;Zt(e,n,r,o)}))},en={trim:Jt,isArray:Yt.isArray,is:Qt,toArray:Yt.toArray,makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:Yt.each,map:Yt.map,grep:Yt.filter,inArray:Yt.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in t=s[n])t.hasOwnProperty(o)&&(u=t[o])!==undefined&&(e[o]=u);return e},create:function(e,t,n){var r,o,i,a,u,s=this,l=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},l=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=l?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:Zt,createNS:function(e,t){var n,r;for(t=t||j.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||j.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||Qt(e,"array")?e:Yt.map(e.split(t||","),Jt)},_addCacheSuffix:function(e){var t=He.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},tn=j.document,nn=Array.prototype.push,rn=Array.prototype.slice,on=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,an=Ye.Event,un=en.makeMap("children,contents,next,prev"),sn=function(e){return void 0!==e},ln=function(e){return"string"==typeof e},cn=function(e,t){var n,r,o;for(o=(t=t||tn).createElement("div"),n=t.createDocumentFragment(),o.innerHTML=e;r=o.firstChild;)n.appendChild(r);return n},fn=function(e,t,n,r){var o;if(ln(t))t=cn(t,En(e[0]));else if(t.length&&!t.nodeType){if(t=Bn.makeArray(t),r)for(o=t.length-1;0<=o;o--)fn(e,t[o],n,r);else for(o=0;o<t.length;o++)fn(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},dn=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},hn=function(e,t,n){var r,o;return t=Bn(t)[0],e.each(function(){var e=this;n&&r===e.parentNode||(r=e.parentNode,o=t.cloneNode(!1),e.parentNode.insertBefore(o,e)),o.appendChild(e)}),e},mn=en.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),gn=en.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),pn={"for":"htmlFor","class":"className",readonly:"readOnly"},vn={"float":"cssFloat"},yn={},bn={},Cn=function(e,t){return new Bn.fn.init(e,t)},wn=/^\s*|\s*$/g,xn=function(e){return null===e||e===undefined?"":(""+e).replace(wn,"")},zn=function(e,t){var n,r,o,i;if(e)if((n=e.length)===undefined){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},Nn=function(e,n){var r=[];return zn(e,function(e,t){n(t,e)&&r.push(t)}),r},En=function(e){return e?9===e.nodeType?e:e.ownerDocument:tn};Cn.fn=Cn.prototype={constructor:Cn,selector:"",context:null,length:0,init:function(e,t){var n,r,o=this;if(!e)return o;if(e.nodeType)return o.context=o[0]=e,o.length=1,o;if(t&&t.nodeType)o.context=t;else{if(t)return Bn(e).attr(t);o.context=t=j.document}if(ln(e)){if(!(n="<"===(o.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:on.exec(e)))return Bn(t).find(e);if(n[1])for(r=cn(e,En(t)).firstChild;r;)nn.call(o,r),r=r.nextSibling;else{if(!(r=En(t).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(e);o.length=1,o[0]=r}}else this.add(e,!1);return o},toArray:function(){return en.toArray(this)},add:function(e,t){var n,r,o=this;if(ln(e))return o.add(Bn(e));if(!1!==t)for(n=Bn.unique(o.toArray().concat(Bn.makeArray(e))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else nn.apply(o,Bn.makeArray(e));return o},attr:function(t,n){var e,r=this;if("object"==typeof t)zn(t,function(e,t){r.attr(e,t)});else{if(!sn(n)){if(r[0]&&1===r[0].nodeType){if((e=yn[t])&&e.get)return e.get(r[0],t);if(gn[t])return r.prop(t)?t:undefined;null===(n=r[0].getAttribute(t,2))&&(n=undefined)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=yn[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=pn[e]||e))zn(e,function(e,t){n.prop(e,t)});else{if(!sn(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(n,r){var e,o,i=this,t=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof n)zn(n,function(e,t){i.css(e,t)});else if(sn(r))n=t(n),"number"!=typeof r||mn[n]||(r=r.toString()+"px"),i.each(function(){var e=this.style;if((o=bn[n])&&o.set)o.set(this,r);else{try{this.style[vn[n]||n]=r}catch(t){}null!==r&&""!==r||(e.removeProperty?e.removeProperty(a(n)):e.removeAttribute(n))}});else{if(e=i[0],(o=bn[n])&&o.get)return o.get(e);if(!e.ownerDocument.defaultView)return e.currentStyle?e.currentStyle[t(n)]:"";try{return e.ownerDocument.defaultView.getComputedStyle(e,null).getPropertyValue(a(n))}catch(u){return undefined}}return i},remove:function(){for(var e,t=this.length;t--;)e=this[t],an.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t,n=this;if(sn(e)){t=n.length;try{for(;t--;)n[t].innerHTML=e}catch(r){Bn(n[t]).empty().append(e)}return n}return n[0]?n[0].innerHTML:""},text:function(e){var t,n=this;if(sn(e)){for(t=n.length;t--;)"innerText"in n[t]?n[t].innerText=e:n[0].textContent=e;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return fn(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return fn(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?fn(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?fn(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return Bn(e).append(this),this},prependTo:function(e){return Bn(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return hn(this,e)},wrapAll:function(e){return hn(this,e,!0)},wrapInner:function(e){return this.each(function(){Bn(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){Bn(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),Bn(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(o,i){var e=this;return"string"!=typeof o||(-1!==o.indexOf(" ")?zn(o.split(" "),function(){e.toggleClass(this,i)}):e.each(function(e,t){var n,r;(r=dn(t,o))!==i&&(n=t.className,r?t.className=xn((" "+n+" ").replace(" "+o+" "," ")):t.className+=n?" "+o:o)})),e},hasClass:function(e){return dn(this[0],e)},each:function(e){return zn(this,e)},on:function(e,t){return this.each(function(){an.bind(this,e,t)})},off:function(e,t){return this.each(function(){an.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?an.fire(this,e.type,e):an.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new Bn(rn.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)Bn.find(e,this[t],r);return Bn(r)},filter:function(n){return Bn("function"==typeof n?Nn(this.toArray(),function(e,t){return n(t,e)}):Bn.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof Bn&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&Bn(t).is(n)){r.push(t);break}if(t===n){r.push(t);break}t=t.parentNode}}),Bn(r)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:nn,sort:Array.prototype.sort,splice:Array.prototype.splice},en.extend(Cn,{extend:en.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:en.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:en.isArray,each:zn,trim:xn,grep:Nn,find:Rt,expr:Rt.selectors,unique:Rt.uniqueSort,text:Rt.getText,contains:Rt.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?Bn.find.matchesSelector(t[0],e)?[t[0]]:[]:Bn.find.matches(e,t)}});var Sn=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof Bn&&(n=n[0]);o&&9!==o.nodeType;){if(n!==undefined){if(o===n)break;if("string"==typeof n&&Bn(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},kn=function(e,t,n,r){var o=[];for(r instanceof Bn&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==undefined){if(e===r)break;if("string"==typeof r&&Bn(e).is(r))break}o.push(e)}return o},Tn=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};zn({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Sn(e,"parentNode")},next:function(e){return Tn(e,"nextSibling",1)},prev:function(e){return Tn(e,"previousSibling",1)},children:function(e){return kn(e.firstChild,"nextSibling",1)},contents:function(e){return en.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(r,o){Cn.fn[r]=function(t){var n=[];this.each(function(){var e=o.call(n,this,t,n);e&&(Bn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(un[r]||(n=Bn.unique(n)),0===r.indexOf("parents")&&(n=n.reverse()));var e=Bn(n);return t?e.filter(t):e}}),zn({parentsUntil:function(e,t){return Sn(e,"parentNode",t)},nextUntil:function(e,t){return kn(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return kn(e,"previousSibling",1,t).slice(1)}},function(o,i){Cn.fn[o]=function(t,e){var n=[];this.each(function(){var e=i.call(n,this,t,n);e&&(Bn.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=Bn.unique(n),0!==o.indexOf("parents")&&"prevUntil"!==o||(n=n.reverse()));var r=Bn(n);return e?r.filter(e):r}}),Cn.fn.is=function(e){return!!e&&0<this.filter(e).length},Cn.fn.init.prototype=Cn.fn,Cn.overrideDefaults=function(n){var r,o=function(e,t){return r=r||n(),0===arguments.length&&(e=r.element),t||(t=r.context),new o.fn.init(e,t)};return Bn.extend(o,this),o};var An=function(n,r,e){zn(e,function(e,t){n[e]=n[e]||{},n[e][r]=t})};He.ie&&He.ie<8&&(An(yn,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?undefined:t},size:function(e){var t=e.size;return 20===t?undefined:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?undefined:t}}),An(yn,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),He.ie&&He.ie<9&&(vn["float"]="styleFloat",An(bn,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),Cn.attrHooks=yn,Cn.cssHooks=bn;var Mn,Rn,Dn,Bn=Cn,On=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return _n(r(1),r(2))},Hn=function(){return _n(0,0)},_n=function(e,t){return{major:e,minor:t}},Ln={nu:_n,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Hn():On(e,n)},unknown:Hn},Pn="Firefox",Vn=function(e,t){return function(){return t===e}},In=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Vn("Edge",t),isChrome:Vn("Chrome",t),isIE:Vn("IE",t),isOpera:Vn("Opera",t),isFirefox:Vn(Pn,t),isSafari:Vn("Safari",t)}},Fn={unknown:function(){return In({current:undefined,version:Ln.unknown()})},nu:In,edge:$("Edge"),chrome:$("Chrome"),ie:$("IE"),opera:$("Opera"),firefox:$(Pn),safari:$("Safari")},Un="Windows",jn="Android",qn="Solaris",$n="FreeBSD",Wn=function(e,t){return function(){return t===e}},Kn=function(e){var t=e.current;return{current:t,version:e.version,isWindows:Wn(Un,t),isiOS:Wn("iOS",t),isAndroid:Wn(jn,t),isOSX:Wn("OSX",t),isLinux:Wn("Linux",t),isSolaris:Wn(qn,t),isFreeBSD:Wn($n,t)}},Xn={unknown:function(){return Kn({current:undefined,version:Ln.unknown()})},nu:Kn,windows:$(Un),ios:$("iOS"),android:$(jn),linux:$("Linux"),osx:$("OSX"),solaris:$(qn),freebsd:$($n)},Yn=function(e,t){var n=String(t).toLowerCase();return R(e,function(e){return e.search(n)})},Gn=function(e,n){return Yn(e,n).map(function(e){var t=Ln.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Jn=function(e,n){return Yn(e,n).map(function(e){var t=Ln.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Qn=function(e,t){return-1!==e.indexOf(t)},Zn=function(e,t){return n=e,o=0,""===(r=t)||!(n.length<r.length)&&n.substr(o,o+r.length)===r;var n,r,o},er=function(e){return e.replace(/^\s+|\s+$/g,"")},tr=function(e){return e.replace(/\s+$/g,"")},nr=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,rr=function(t){return function(e){return Qn(e,t)}},or=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Qn(e,"edge/")&&Qn(e,"chrome")&&Qn(e,"safari")&&Qn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,nr],search:function(e){return Qn(e,"chrome")&&!Qn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Qn(e,"msie")||Qn(e,"trident")}},{name:"Opera",versionRegexes:[nr,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:rr("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:rr("firefox")},{name:"Safari",versionRegexes:[nr,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Qn(e,"safari")||Qn(e,"mobile/"))&&Qn(e,"applewebkit")}}],ir=[{name:"Windows",search:rr("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Qn(e,"iphone")||Qn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:rr("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:rr("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:rr("linux"),versionRegexes:[]},{name:"Solaris",search:rr("sunos"),versionRegexes:[]},{name:"FreeBSD",search:rr("freebsd"),versionRegexes:[]}],ar={browsers:$(or),oses:$(ir)},ur=function(e){var t,n,r,o,i,a,u,s,l,c,f,d=ar.browsers(),h=ar.oses(),m=Gn(d,e).fold(Fn.unknown,Fn.nu),g=Jn(h,e).fold(Xn.unknown,Xn.nu);return{browser:m,os:g,deviceType:(n=m,r=e,o=(t=g).isiOS()&&!0===/ipad/i.test(r),i=t.isiOS()&&!o,a=t.isAndroid()&&3===t.version.major,u=t.isAndroid()&&4===t.version.major,s=o||a||u&&!0===/mobile/i.test(r),l=t.isiOS()||t.isAndroid(),c=l&&!s,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(r),{isiPad:$(o),isiPhone:$(i),isTablet:$(s),isPhone:$(c),isTouch:$(l),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:$(f)})}},sr={detect:(Dn=!(Mn=function(){var e=j.navigator.userAgent;return ur(e)}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Dn||(Dn=!0,Rn=Mn.apply(null,e)),Rn})},lr=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:$(e)}},cr={fromHtml:function(e,t){var n=(t||j.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw j.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return lr(n.childNodes[0])},fromTag:function(e,t){var n=(t||j.document).createElement(e);return lr(n)},fromText:function(e,t){var n=(t||j.document).createTextNode(e);return lr(n)},fromDom:lr,fromPoint:function(e,t,n){var r=e.dom();return T.from(r.elementFromPoint(t,n)).map(lr)}},fr=(j.Node.ATTRIBUTE_NODE,j.Node.CDATA_SECTION_NODE,j.Node.COMMENT_NODE,j.Node.DOCUMENT_NODE),dr=(j.Node.DOCUMENT_TYPE_NODE,j.Node.DOCUMENT_FRAGMENT_NODE,j.Node.ELEMENT_NODE),hr=j.Node.TEXT_NODE,mr=(j.Node.PROCESSING_INSTRUCTION_NODE,j.Node.ENTITY_REFERENCE_NODE,j.Node.ENTITY_NODE,j.Node.NOTATION_NODE,function(e){return e.dom().nodeName.toLowerCase()}),gr=function(t){return function(e){return e.dom().nodeType===t}},pr=gr(dr),vr=gr(hr),yr=gr(fr),br=Object.keys,Cr=Object.hasOwnProperty,wr=function(e,t){for(var n=br(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i,e)}},xr=function(e,r){return zr(e,function(e,t,n){return{k:t,v:r(e,t,n)}})},zr=function(r,o){var i={};return wr(r,function(e,t){var n=o(e,t,r);i[n.k]=n.v}),i},Nr=function(e,n){var r={},o={};return wr(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}},Er=function(e,t){return Sr(e,t)?T.from(e[t]):T.none()},Sr=function(e,t){return Cr.call(e,t)},kr=function(e){return e.style!==undefined&&b(e.style.getPropertyValue)},Tr=function(e){var t=vr(e)?e.dom().parentNode:e.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)},Ar=function(e,t,n){if(!(K(n)||y(n)||C(n)))throw j.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Mr=function(e,t,n){Ar(e.dom(),t,n)},Rr=function(e,t){var n=e.dom();wr(t,function(e,t){Ar(n,t,e)})},Dr=function(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n},Br=function(e,t){e.dom().removeAttribute(t)},Or=function(e,t){var n=e.dom(),r=j.window.getComputedStyle(n).getPropertyValue(t),o=""!==r||Tr(e)?r:Hr(n,t);return null===o?undefined:o},Hr=function(e,t){return kr(e)?e.style.getPropertyValue(t):""},_r=function(e,t){var n=e.dom(),r=Hr(n,t);return T.from(r).filter(function(e){return 0<e.length})},Lr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return A(t,function(e,t){r[e]=$(n[t])}),r}},Pr=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},Vr=function(){return le.getOrDie("Node")},Ir=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},Fr=function(e,t){return Ir(e,t,Vr().DOCUMENT_POSITION_CONTAINED_BY)},Ur=dr,jr=fr,qr=function(e,t){var n=e.dom();if(n.nodeType!==Ur)return!1;if(n.matches!==undefined)return n.matches(t);if(n.msMatchesSelector!==undefined)return n.msMatchesSelector(t);if(n.webkitMatchesSelector!==undefined)return n.webkitMatchesSelector(t);if(n.mozMatchesSelector!==undefined)return n.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},$r=function(e){return e.nodeType!==Ur&&e.nodeType!==jr||0===e.childElementCount},Wr=function(e,t){return e.dom()===t.dom()},Kr=sr.detect().browser.isIE()?function(e,t){return Fr(e.dom(),t.dom())}:function(e,t){var n=e.dom(),r=t.dom();return n!==r&&n.contains(r)},Xr=function(e){return cr.fromDom(e.dom().ownerDocument)},Yr=function(e){var t=e.dom().ownerDocument.defaultView;return cr.fromDom(t)},Gr=function(e){var t=e.dom();return T.from(t.parentNode).map(cr.fromDom)},Jr=function(e){var t=e.dom();return T.from(t.previousSibling).map(cr.fromDom)},Qr=function(e){var t=e.dom();return T.from(t.nextSibling).map(cr.fromDom)},Zr=function(e){return t=Pr(e,Jr),(n=w.call(t,0)).reverse(),n;var t,n},eo=function(e){return Pr(e,Qr)},to=function(e){var t=e.dom();return X(t.childNodes,cr.fromDom)},no=function(e,t){var n=e.dom().childNodes;return T.from(n[t]).map(cr.fromDom)},ro=function(e){return no(e,0)},oo=function(e){return no(e,e.dom().childNodes.length-1)},io=(Lr("element","offset"),sr.detect().browser),ao=function(e){return R(e,pr)},uo=function(e,t){return e.children&&N(e.children,t)},so={getPos:function(e,t,n){var r,o,i,a=0,u=0,s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===Or(cr.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,y:u=o.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!uo(r,n);)a+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!uo(r,n);)a-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;u+=(i=cr.fromDom(t),io.isFirefox()&&"table"===mr(i)?ao(to(i)).filter(function(e){return"caption"===mr(e)}).bind(function(o){return ao(eo(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0)}return{x:a,y:u}}},lo=function(e){var n=T.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){A(e,a)},a=function(t){n.each(function(e){j.setTimeout(function(){t(e)},0)})};return e(function(e){n=T.some(e),i(t),t=[]}),{get:r,map:function(n){return lo(function(t){r(function(e){t(n(e))})})},isReady:o}},co={nu:lo,pure:function(t){return lo(function(e){e(t)})}},fo=function(t){var e=function(e){var r;t((r=e,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this;j.setTimeout(function(){r.apply(n,e)},0)}))},n=function(){return co.nu(e)};return{map:function(r){return fo(function(n){e(function(e){var t=r(e);n(t)})})},bind:function(n){return fo(function(t){e(function(e){n(e).get(t)})})},anonBind:function(n){return fo(function(t){e(function(e){n.get(t)})})},toLazy:n,toCached:function(){var t=null;return fo(function(e){null===t&&(t=n()),t.get(e)})},get:e}},ho={nu:fo,pure:function(t){return fo(function(e){e(t)})}},mo=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):A(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},go=function(e){return mo(e,ho.nu)},po=function(n){return{is:function(e){return n===e},isValue:a,isError:l,getOr:$(n),getOrThunk:$(n),getOrDie:$(n),or:function(e){return po(n)},orThunk:function(e){return po(n)},fold:function(e,t){return t(n)},map:function(e){return po(e(n))},mapError:function(e){return po(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return T.some(n)}}},vo=function(n){return{is:l,isValue:l,isError:a,getOr:W,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(n),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return vo(n)},mapError:function(e){return vo(e(n))},each:i,bind:function(e){return vo(n)},exists:l,forall:a,toOption:T.none}},yo={value:po,error:vo,fromOption:function(e,t){return e.fold(function(){return vo(t)},po)}};var bo,Co,wo,xo=function(t){return function(e){return!!e&&e.nodeType===t}},zo=xo(1),No=function(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return N(n,t)}return!1}},Eo=function(t){return function(e){if(zo(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},So=No(["textarea","input"]),ko=xo(3),To=xo(8),Ao=xo(9),Mo=xo(11),Ro=No(["br"]),Do=Eo("true"),Bo=Eo("false"),Oo={isText:ko,isElement:zo,isComment:To,isDocument:Ao,isDocumentFragment:Mo,isBr:Ro,isContentEditableTrue:Do,isContentEditableFalse:Bo,isRestrictedNode:function(e){return!!e&&!Object.getPrototypeOf(e)},matchNodeNames:No,hasPropValue:function(t,n){return function(e){return zo(e)&&e[t]===n}},hasAttribute:function(t,e){return function(e){return zo(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,n){return function(e){return zo(e)&&e.getAttribute(t)===n}},matchStyleValues:function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if(zo(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},isBogus:function(e){return zo(e)&&e.hasAttribute("data-mce-bogus")},isBogusAll:function(e){return zo(e)&&"all"===e.getAttribute("data-mce-bogus")},isTable:function(e){return zo(e)&&"TABLE"===e.tagName},isTextareaOrInput:So},Ho=function(){function e(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return e.prototype.current=function(){return this.node},e.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},e.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},e.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},e.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},e.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==this.rootNode)return i}},e}(),_o=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,$(!0))).hasOwnProperty(mr(e))}},Lo=_o(["h1","h2","h3","h4","h5","h6"]),Po=_o(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),Vo=function(e){return pr(e)&&!Po(e)},Io=function(e){return pr(e)&&"br"===mr(e)},Fo=_o(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Uo=_o(["ul","ol","dl"]),jo=_o(["li","dd","dt"]),qo=_o(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),$o=_o(["thead","tbody","tfoot"]),Wo=_o(["td","th"]),Ko=_o(["pre","script","textarea","style"]),Xo=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Yo=function(e,t){var n,r=t.childNodes;if(!Oo.isElement(t)||!Xo(t)){for(n=r.length-1;0<=n;n--)Yo(e,r[n]);if(!1===Oo.isDocument(t)){if(Oo.isText(t)&&0<t.nodeValue.length){var o=en.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,u=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&u))return}else if(Oo.isElement(t)&&(1===(r=t.childNodes).length&&Xo(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||qo(cr.fromDom(t))))return;e.remove(t)}var i,a,u;return t}},Go={trimNode:Yo},Jo=en.makeMap,Qo=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Zo=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ei=/[<>&\"\']/g,ti=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,ni={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};Co={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},wo={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var ri=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),Co[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};bo=ri("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var oi=function(e,t){return e.replace(t?Qo:Zo,function(e){return Co[e]||e})},ii=function(e,t){return e.replace(t?Qo:Zo,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":Co[e]||"&#"+e.charCodeAt(0)+";"})},ai=function(e,t,n){return n=n||bo,e.replace(t?Qo:Zo,function(e){return Co[e]||n[e]||e})},ui={encodeRaw:oi,encodeAllRaw:function(e){return(""+e).replace(ei,function(e){return Co[e]||e})},encodeNumeric:ii,encodeNamed:ai,getEncodeFunc:function(e,t){var n=ri(t)||bo,r=Jo(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Qo:Zo,function(e){return Co[e]!==undefined?Co[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return ai(e,t,n)}:ai:r.numeric?ii:oi},decode:function(e){return e.replace(ti,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):ni[t]||String.fromCharCode(t):wo[e]||bo[e]||(n=e,(r=cr.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},si={},li={},ci=en.makeMap,fi=en.each,di=en.extend,hi=en.explode,mi=en.inArray,gi=function(e,t){return(e=en.trim(e))?e.split(t||" "):[]},pi=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(t=t||"","string"==typeof(n=n||[])&&(n=gi(n)),r=(e=gi(e)).length;r--;)i={attributes:a(o=gi([u,t].join(" "))),attributesOrder:o,children:a(n,li)},s[e[r]]=i},l=function(e,t){var n,r,o,i;for(n=(e=gi(e)).length,t=gi(t);n--;)for(r=s[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return si[e]?si[e]:(u="id accesskey class dir lang style tabindex title role",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure main header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",n=[n,i="acronym applet basefont big font strike tt"].join(" "),fi(gi(i),function(e){a(e,"",n)}),t=[t,o="center dir isindex noframes"].join(" "),r=[t,n].join(" "),fi(gi(o),function(e){a(e,"",r)})),r=r||[t,n].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),a("address dt dd div caption","",r),a("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",n),a("blockquote","cite",r),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",r),a("dl","","dt dd"),a("a","href target rel media hreflang type",n),a("q","cite",n),a("ins del","cite datetime",r),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",r),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),a("param","name value"),a("map","name",[r,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",r),a("th","colspan rowspan headers scope abbr",r),a("form","accept-charset action autocomplete enctype method name novalidate target",r),a("fieldset","disabled form name",[r,"legend"].join(" ")),a("label","form for",n),a("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?r:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[r,"li"].join(" ")),a("noscript","",r),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",r),a("mark rt rp summary bdi","",n),a("canvas","width height",r),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",r),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[r,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",r),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[r,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(l("script","language xml:space"),l("style","xml:space"),l("object","declare classid code codebase codetype archive standby align border hspace vspace"),l("embed","align name hspace vspace"),l("param","valuetype type"),l("a","charset name rev shape coords"),l("br","clear"),l("applet","codebase archive code object alt name width height align hspace vspace"),l("img","name longdesc align border hspace vspace"),l("iframe","longdesc frameborder marginwidth marginheight scrolling align"),l("font basefont","size color face"),l("input","usemap align"),l("select","onchange"),l("textarea"),l("h1 h2 h3 h4 h5 h6 div p legend caption","align"),l("ul","type compact"),l("li","type"),l("ol dl menu dir","compact"),l("pre","width xml:space"),l("hr","align noshade size width"),l("isindex","prompt"),l("table","summary width frame rules cellspacing cellpadding align bgcolor"),l("col","width align char charoff valign"),l("colgroup","width align char charoff valign"),l("thead","align char charoff valign"),l("tr","align char charoff valign bgcolor"),l("th","axis align char charoff valign nowrap bgcolor width height"),l("form","accept"),l("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),l("tfoot","align char charoff valign"),l("tbody","align char charoff valign"),l("area","nohref"),l("body","background bgcolor text link vlink alink")),"html4"!==e&&(l("input button select textarea","autofocus"),l("input textarea","placeholder"),l("a","download"),l("link script img","crossorigin"),l("iframe","sandbox seamless allowfullscreen")),fi(gi("a form meter progress dfn"),function(e){s[e]&&delete s[e].children[e]}),delete s.caption.children.table,delete s.script,si[e]=s)},vi=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),fi(e,function(e,t){r[t]=r[t.toUpperCase()]="map"===n?ci(e,/[, ]/):hi(e,/[, ]/)})),r};function yi(i){var e,t,n,r,o,a,u,s,l,c,f,d,h,z={},m={},N=[],g={},p={},v=function(e,t,n){var r=i[e];return r?r=ci(r,/[, ]/,ci(r.toUpperCase(),/[, ]/)):(r=si[e])||(r=ci(t," ",ci(t.toUpperCase()," ")),r=di(r,n),si[e]=r),r};n=pi((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),e=vi(i.valid_styles),t=vi(i.invalid_styles,"map"),s=vi(i.valid_classes,"map"),r=v("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),u=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),c=v("non_empty_elements","td th iframe video audio object script pre code",a),f=v("move_caret_before_on_enter_elements","table",c),d=v("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),l=v("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",d),h=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),fi((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){p[e]=new RegExp("</"+e+"[^>]*>","gi")});var E=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},y=function(e){var t,n,r,o,i,a,u,s,l,c,f,d,h,m,g,p,v,y,b,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,w=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,x=/[*?+]/;if(e)for(e=gi(e,","),z["@"]&&(p=z["@"].attributes,v=z["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=C.exec(e[t])){if(m=i[1],l=i[2],g=i[3],s=i[5],a={attributes:d={},attributesOrder:h=[]},"#"===m&&(a.paddEmpty=!0),"-"===m&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),p){for(y in p)d[y]=p[y];h.push.apply(h,v)}if(s)for(r=0,o=(s=gi(s,"|")).length;r<o;r++)if(i=w.exec(s[r])){if(u={},f=i[1],c=i[2].replace(/[\\:]:/g,":"),m=i[3],b=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(c),u.required=!0),"-"===f){delete d[c],h.splice(mi(h,c),1);continue}m&&("="===m&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:c,value:b}),u.defaultValue=b),":"===m&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:c,value:b}),u.forcedValue=b),"<"===m&&(u.validValues=ci(b,"?"))),x.test(c)?(a.attributePatterns=a.attributePatterns||[],u.pattern=E(c),a.attributePatterns.push(u)):(d[c]||h.push(c),d[c]=u)}p||"@"!==l||(p=d,v=h),g&&(a.outputName=l,z[g]=a),x.test(l)?(a.pattern=E(l),N.push(a)):z[l]=a}},b=function(e){z={},N=[],y(e),fi(n,function(e,t){m[t]=e.children})},C=function(e){var a=/^(~)?(.+)$/;e&&(si.text_block_elements=si.block_elements=null,fi(gi(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",o=t[2];if(m[o]=m[r],g[o]=r,n||(l[o.toUpperCase()]={},l[o]={}),!z[o]){var i=z[r];delete(i=di({},i)).removeEmptyAttrs,delete i.removeEmpty,z[o]=i}fi(m,function(e,t){e[r]&&(m[t]=e=di({},m[t]),e[o]=e[r])})}))},w=function(e){var o=/^([+\-]?)(\w+)\[([^\]]+)\]$/;si[i.schema]=null,e&&fi(gi(e,","),function(e){var t,n,r=o.exec(e);r&&(n=r[1],t=n?m[r[2]]:m[r[2]]={"#comment":{}},t=m[r[2]],fi(gi(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})},x=function(e){var t,n=z[e];if(n)return n;for(t=N.length;t--;)if((n=N[t]).pattern.test(e))return n};i.valid_elements?b(i.valid_elements):(fi(n,function(e,t){z[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},m[t]=e.children}),"html5"!==i.schema&&fi(gi("strong/b em/i"),function(e){e=gi(e,"/"),z[e[1]].outputName=e[0]}),fi(gi("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){z[e]&&(z[e].removeEmpty=!0)}),fi(gi("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){z[e].paddEmpty=!0}),fi(gi("span"),function(e){z[e].removeEmptyAttrs=!0})),C(i.custom_elements),w(i.valid_children),y(i.extended_valid_elements),w("+ol[ul|ol],+ul[ul|ol]"),fi({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){z[t]&&(z[t].parentsRequired=gi(e))}),i.invalid_elements&&fi(hi(i.invalid_elements),function(e){z[e]&&delete z[e]}),x("span")||y("span[!data-mce-type|*]");return{children:m,elements:z,getValidStyles:function(){return e},getValidClasses:function(){return s},getBlockElements:function(){return l},getInvalidStyles:function(){return t},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return h},getBoolAttrs:function(){return u},getElementRule:x,getSelfClosingElements:function(){return o},getNonEmptyElements:function(){return c},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return r},getSpecialElements:function(){return p},isValidChild:function(e,t){var n=m[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=x(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:function(){return g},addValidElements:y,setValidElements:b,addCustomElements:C,addValidChildren:w}}var bi,Ci=function(e,t,n,r){var o=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+o(t)+o(n)+o(r)},wi=function(b,e){var C,t,l,c,w=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,x=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,z=/\s*([^:]+):\s*([^;]+);?/g,N=/\s+$/,E={},S="\ufeff";for(b=b||{},e&&(l=e.getValidStyles(),c=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+S).split(" "),C=0;C<t.length;C++)E[t[C]]=S+C,E[S+C]=t[C];return{toHex:function(e){return e.replace(w,Ci)},parse:function(e){var t,n,r,o,i,a,u,s,l={},c=b.url_converter,f=b.url_converter_scope||this,d=function(e,t,n){var r,o,i,a;if((r=l[e+"-top"+t])&&(o=l[e+"-right"+t])&&(i=l[e+"-bottom"+t])&&(a=l[e+"-left"+t])){var u=[r,o,i,a];for(C=u.length-1;C--&&u[C]===u[C+1];);-1<C&&n||(l[e+t]=-1===C?u[0]:u.join(" "),delete l[e+"-top"+t],delete l[e+"-right"+t],delete l[e+"-bottom"+t],delete l[e+"-left"+t])}},h=function(e){var t,n=l[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return l[e]=n[0],!0}},m=function(e){return o=!0,E[e]},g=function(e,t){return o&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return E[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},p=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},v=function(e){return e.replace(/\\[0-9a-f]+/gi,p)},y=function(e,t,n,r,o,i){if(o=o||i)return"'"+(o=g(o)).replace(/\'/g,"\\'")+"'";if(t=g(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return c&&(t=c.call(f,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,m).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,m)});t=z.exec(e);)if(z.lastIndex=t.index+t[0].length,n=t[1].replace(N,"").toLowerCase(),r=t[2].replace(N,""),n&&r){if(n=v(n),r=v(r),-1!==n.indexOf(S)||-1!==n.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"===n||/expression\s*\(|\/\*|\*\//.test(r)))continue;"font-weight"===n&&"700"===r?r="bold":"color"!==n&&"background-color"!==n||(r=r.toLowerCase()),r=(r=r.replace(w,Ci)).replace(x,y),l[n]=o?g(r,!0):r}d("border","",!0),d("border","-width"),d("border","-color"),d("border","-style"),d("padding",""),d("margin",""),i="border",u="border-style",s="border-color",h(a="border-width")&&h(u)&&h(s)&&(l[i]=l[a]+" "+l[u]+" "+l[s],delete l[a],delete l[u],delete l[s]),"medium none"===l.border&&delete l.border,"none"===l["border-image"]&&delete l["border-image"]}return l},serialize:function(i,e){var t,n,r,o,a,u="",s=function(e){var t,n,r,o;if(t=l[e])for(n=0,r=t.length;n<r;n++)e=t[n],(o=i[e])&&(u+=(0<u.length?" ":"")+e+": "+o+";")};if(e&&l)s("*"),s(e);else for(t in i)!(n=i[t])||c&&(r=t,o=e,a=void 0,(a=c["*"])&&a[r]||(a=c[o])&&a[r])||(u+=(0<u.length?" ":"")+t+": "+n+";");return u}}},xi=en.each,zi=en.grep,Ni=He.ie,Ei=/^([a-z0-9],?)+$/i,Si=/^[ \t\r\n]*$/,ki=function(n,r,o){var i=r.keep_values,e={set:function(e,t,n){r.url_converter&&(t=r.url_converter.call(r.url_converter_scope||o(),t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},t={style:{set:function(e,t){null===t||"object"!=typeof t?(i&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return t=n.serialize(n.parse(t),e[0].nodeName)}}};return i&&(t.href=t.src=e),t},Ti=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},Ai=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o};function Mi(a,u){var s,l=this;void 0===u&&(u={});var r={},c=j.window,o={},t=0,e=function U(m,g){void 0===g&&(g={});var p,v=0,y={};p=g.maxLoadTime||5e3;var b=function(e){m.getElementsByTagName("head")[0].appendChild(e)},n=function(e,t,n){var o,r,i,a,u=function(e){a.status=e,a.passed=[],a.failed=[],o&&(o.onload=null,o.onerror=null,o=null)},s=function(){for(var e=a.passed,t=e.length;t--;)e[t]();u(2)},l=function(){for(var e=a.failed,t=e.length;t--;)e[t]();u(3)},c=function(e,t){e()||((new Date).getTime()-i<p?Ie.setTimeout(t):l())},f=function(){c(function(){for(var e,t,n=m.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===o.id)return s(),!0},f)},d=function(){c(function(){try{var e=r.sheet.cssRules;return s(),!!e}catch(t){}},d)};if(e=en._addCacheSuffix(e),y[e]?a=y[e]:(a={passed:[],failed:[]},y[e]=a),t&&a.passed.push(t),n&&a.failed.push(n),1!==a.status)if(2!==a.status)if(3!==a.status){if(a.status=1,(o=m.createElement("link")).rel="stylesheet",o.type="text/css",o.id="u"+v++,o.async=!1,o.defer=!1,i=(new Date).getTime(),g.contentCssCors&&(o.crossOrigin="anonymous"),"onload"in o&&!((h=j.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(h[1],10)<536))o.onload=f,o.onerror=l;else{if(0<j.navigator.userAgent.indexOf("Firefox"))return(r=m.createElement("style")).textContent='@import "'+e+'"',d(),void b(r);f()}var h;b(o),o.href=e}else l();else s()},t=function(t){return ho.nu(function(e){n(t,q(e,$(yo.value(t))),q(e,$(yo.error(t))))})},o=function(e){return e.fold(W,W)};return{load:n,loadAll:function(e,n,r){go(X(e,t)).get(function(e){var t=Y(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})}}}(a,{contentCssCors:u.contentCssCors}),f=[],d=u.schema?u.schema:yi({}),i=wi({url_converter:u.url_converter,url_converter_scope:u.url_converter_scope},u.schema),h=u.ownEvents?new Ye:Ye.Event,n=d.getBlockElements(),m=Bn.overrideDefaults(function(){return{context:a,element:F.getRoot()}}),g=function(e){if(e&&a&&"string"==typeof e){var t=a.getElementById(e);return t&&t.id!==e?a.getElementsByName(e)[1]:t}return e},p=function(e){return"string"==typeof e&&(e=g(e)),m(e)},v=function(e,t,n){var r,o,i=p(e);return i.length&&(o=(r=s[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},y=function(e){var t=g(e);return t?t.attributes:[]},b=function(e,t,n){var r,o;""===n&&(n=null);var i=p(e);r=i.attr(t),i.length&&((o=s[t])&&o.set?o.set(i,n,t):i.attr(t,n),r!==n&&u.onSetAttrib&&u.onSetAttrib({attrElm:i,attrName:t,attrValue:n}))},C=function(){return u.root_element||a.body},w=function(e,t){return so.getPos(a.body,g(e),t)},x=function(e,t,n){var r=p(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=He.ie&&He.ie<12?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:undefined)},z=function(e){var t,n;return e=g(e),t=x(e,"width"),n=x(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},N=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(Ei.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;0<=n;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return 0<Rt(t,i[0].ownerDocument||i[0],null,i).length},E=function(e,t,n,r){var o,i=[],a=g(e);for(r=r===undefined,n=n||("BODY"!==C().nodeName?C().parentNode:null),en.is(t,"string")&&(t="*"===(o=t)?function(e){return 1===e.nodeType}:function(e){return N(e,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},S=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return N(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null},k=function(e,n,r){var o,t="string"==typeof e?g(e):e;if(!t)return!1;if(en.isArray(t)&&(t.length||0===t.length))return o=[],xi(t,function(e,t){e&&("string"==typeof e&&(e=g(e)),o.push(n.call(r,e,t)))}),o;var i=r||l;return n.call(i,t)},T=function(e,t){p(e).each(function(e,n){xi(t,function(e,t){b(n,t,e)})})},A=function(e,r){var t=p(e);Ni?t.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+r,t.removeChild(t.firstChild)}catch(n){Bn("<div></div>").html("<br>"+r).contents().slice(1).appendTo(t)}return r}}):t.html(r)},M=function(e,n,r,o,i){return k(e,function(e){var t="string"==typeof n?a.createElement(n):n;return T(t,r),o&&("string"!=typeof o&&o.nodeType?t.appendChild(o):"string"==typeof o&&A(t,o)),i?t:e.appendChild(t)})},R=function(e,t,n){return M(a.createElement(e),e,t,n,!0)},D=ui.decode,B=ui.encodeAllRaw,O=function(e,t){var n=p(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),1<n.length?n.toArray():n[0]},H=function(e,t,n){p(e).toggleClass(t,n).each(function(){""===this.className&&Bn(this).attr("class",null)})},_=function(t,e,n){return k(e,function(e){return en.is(e,"array")&&(t=t.cloneNode(!0)),n&&xi(zi(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},L=function(){return a.createRange()},P=function(e,t,n,r){if(en.isArray(e)){for(var o=e.length,i=[];o--;)i[o]=P(e[o],t,n,r);return i}return!u.collect||e!==a&&e!==c||f.push([e,t,n,r]),h.bind(e,t,n,r||F)},V=function(e,t,n){var r;if(en.isArray(e)){r=e.length;for(var o=[];r--;)o[r]=V(e[r],t,n);return o}if(f&&(e===a||e===c))for(r=f.length;r--;){var i=f[r];e!==i[0]||t&&t!==i[1]||n&&n!==i[2]||h.unbind(i[0],i[1],i[2])}return h.unbind(e,t,n)},I=function(e){if(e&&Oo.isElement(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},F={doc:a,settings:u,win:c,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:e,boundEvents:f,styles:i,schema:d,events:h,isBlock:function(e){if("string"==typeof e)return!!n[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!n[e.nodeName])}return!1},$:m,$$:p,root:null,clone:function(t,e){if(!Ni||1!==t.nodeType||e)return t.cloneNode(e);if(e)return null;var n=a.createElement(t.nodeName);return xi(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),n},getRoot:C,getViewPort:function(e){var t=e||c,n=t.document.documentElement;return{x:t.pageXOffset||n.scrollLeft,y:t.pageYOffset||n.scrollTop,w:t.innerWidth||n.clientWidth,h:t.innerHeight||n.clientHeight}},getRect:function(e){var t,n;return e=g(e),t=w(e),n=z(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:z,getParent:function(e,t,n){var r=E(e,t,n,!1);return r&&0<r.length?r[0]:null},getParents:E,get:g,getNext:function(e,t){return S(e,t,"nextSibling")},getPrev:function(e,t){return S(e,t,"previousSibling")},select:function(e,t){return Rt(e,g(t)||u.root_element||a,[])},is:N,add:M,create:R,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&"undefined"!=typeof t[r]&&(o+=" "+r+'="'+B(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(e){var t,n=a.createElement("div"),r=a.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r},remove:O,setStyle:function(e,t,n){var r=K(t)?p(e).css(t,n):p(e).css(t);u.update_styles&&Ti(i,r)},getStyle:x,setStyles:function(e,t){var n=p(e).css(t);u.update_styles&&Ti(i,n)},removeAllAttribs:function(e){return k(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:b,setAttribs:T,getAttrib:v,getPos:w,parseStyle:function(e){return i.parse(e)},serializeStyle:function(e,t){return i.serialize(e,t)},addStyle:function(e){var t,n;if(F!==Mi.DOM&&a===j.document){if(r[e])return;r[e]=!0}(n=a.getElementById("mceDefaultStyles"))||((n=a.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=a.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(a.createTextNode(e))},loadCSS:function(e){var n;F===Mi.DOM||a!==j.document?(e||(e=""),n=a.getElementsByTagName("head")[0],xi(e.split(","),function(e){var t;e=en._addCacheSuffix(e),o[e]||(o[e]=!0,t=R("link",G({rel:"stylesheet",type:"text/css",href:e},u.contentCssCors?{crossOrigin:"anonymous"}:{})),n.appendChild(t))})):Mi.DOM.loadCSS(e)},addClass:function(e,t){p(e).addClass(t)},removeClass:function(e,t){H(e,t,!1)},hasClass:function(e,t){return p(e).hasClass(t)},toggleClass:H,show:function(e){p(e).show()},hide:function(e){p(e).hide()},isHidden:function(e){return"none"===p(e).css("display")},uniqueId:function(e){return(e||"mce_")+t++},setHTML:A,getOuterHTML:function(e){var t="string"==typeof e?g(e):e;return Oo.isElement(t)?t.outerHTML:Bn("<div></div>").append(Bn(t).clone()).html()},setOuterHTML:function(e,t){p(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}O(Bn(this).html(t),!0)})},decode:D,encode:B,insertAfter:function(e,t){var r=g(t);return k(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:_,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=R(e),xi(y(t),function(e){b(n,e.nodeName,v(t,e.nodeName))}),_(n,t,!0)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return i.toHex(en.trim(e))},run:k,getAttribs:y,isEmpty:function(e,t){var n,r,o,i,a=0;if(e=e.firstChild){var u=new Ho(e,e.parentNode),s=d?d.getWhiteSpaceElements():{};t=t||(d?d.getNonEmptyElements():null);do{if(o=e.nodeType,Oo.isElement(e)){var l=e.getAttribute("data-mce-bogus");if(l){e=u.next("all"===l);continue}if(i=e.nodeName.toLowerCase(),t&&t[i]){if("br"!==i)return!1;a++,e=u.next();continue}for(n=(r=y(e)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!Si.test(e.nodeValue))return!1;if(3===o&&e.parentNode&&s[e.parentNode.nodeName]&&Si.test(e.nodeValue))return!1;e=u.next()}while(e)}return a<=1},createRng:L,nodeIndex:Ai,split:function(e,t,n){var r,o,i,a=L();if(e&&t)return a.setStart(e.parentNode,Ai(e)),a.setEnd(t.parentNode,Ai(t)),r=a.extractContents(),(a=L()).setStart(t.parentNode,Ai(t)+1),a.setEnd(e.parentNode,Ai(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Go.trimNode(F,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Go.trimNode(F,o),e),O(e),n||t},bind:P,unbind:V,fire:function(e,t,n){return h.fire(e,t,n)},getContentEditable:I,getContentEditableParent:function(e){for(var t=C(),n=null;e&&e!==t&&null===(n=I(e));e=e.parentNode);return n},destroy:function(){if(f)for(var e=f.length;e--;){var t=f[e];h.unbind(t[0],t[1],t[2])}Rt.setDocument&&Rt.setDocument()},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}};return s=ki(i,u,function(){return F}),F}(bi=Mi||(Mi={})).DOM=bi(j.document),bi.nodeIndex=Ai;var Ri,Di=Mi,Bi=Di.DOM,Oi=en.each,Hi=en.grep,_i=function(){function e(){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0}return e.prototype.loadScript=function(e,t,n){var r,o,i=Bi;o=i.uniqueId(),(r=j.document.createElement("script")).id=o,r.type="text/javascript",r.src=en._addCacheSuffix(e),r.onload=function(){i.remove(o),r&&(r.onreadystatechange=r.onload=r=null),t()},r.onerror=function(){b(n)?n():"undefined"!=typeof j.console&&j.console.log&&j.console.log("Failed to load script: "+e)},(j.document.getElementsByTagName("head")[0]||j.document.body).appendChild(r)},e.prototype.isDone=function(e){return 2===this.states[e]},e.prototype.markDone=function(e){this.states[e]=2},e.prototype.add=function(e,t,n,r){this.states[e]===undefined&&(this.queue.push(e),this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},e.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},e.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},e.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},e.prototype.loadScripts=function(n,e,t,r){var o,i=this,a=[],u=function(t,e){Oi(i.scriptLoadedCallbacks[e],function(e){b(e[t])&&e[t].call(e.scope)}),i.scriptLoadedCallbacks[e]=undefined};i.queueLoadedCallbacks.push({success:e,failure:r,scope:t||this}),(o=function(){var e=Hi(n);if(n.length=0,Oi(e,function(e){2!==i.states[e]?3!==i.states[e]?1!==i.states[e]&&(i.states[e]=1,i.loading++,i.loadScript(e,function(){i.states[e]=2,i.loading--,u("success",e),o()},function(){i.states[e]=3,i.loading--,a.push(e),u("failure",e),o()})):u("failure",e):u("success",e)}),!i.loading){var t=i.queueLoadedCallbacks.slice(0);i.queueLoadedCallbacks.length=0,Oi(t,function(e){0===a.length?b(e.success)&&e.success.call(e.scope):b(e.failure)&&e.failure.call(e.scope,a)})}})()},e.ScriptLoader=new e,e}(),Li=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return Li(n())}}},Pi={},Vi=Li("en"),Ii={getData:function(){return xr(Pi,function(e){return G({},e)})},setCode:function(e){e&&Vi.set(e)},getCode:function(){return Vi.get()},add:function(e,t){var n=Pi[e];for(var r in n||(Pi[e]=n={}),t)n[r.toLowerCase()]=t[r]},translate:function(e){var t,n,r=Pi[Vi.get()]||{},o=function(e){return b(e)?Object.prototype.toString.call(e):i(e)?"":""+e},i=function(e){return""===e||null===e||e===undefined},a=function(e){var t=o(e),n=t.toLowerCase();return Sr(r,n)?o(r[n]):t},u=function(e){return e.replace(/{context:\w+}$/,"")},s=function(e){return e};if(i(e))return s("");if(x(t=e)&&Sr(t,"raw"))return s(o(e.raw));if(p(n=e)&&1<n.length){var l=e.slice(1);return s(u(a(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return Sr(l,t)?o(l[t]):e})))}return s(u(a(e)))},isRtl:function(){return Er(Pi,Vi.get()).bind(function(e){return Er(e,"_dir")}).exists(function(e){return"rtl"===e})},hasCode:function(e){return Sr(Pi,e)}},Fi=en.each;function Ui(){var r=this,o=[],a={},u={},i=[],s=function(e){var t;return u[e]&&(t=u[e].dependencies),t||[]},l=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},c=function(e,n,t,r){var o=s(e);Fi(o,function(e){var t=l(n,e);f(t.resource,t,undefined,undefined)}),t&&(r?t.call(r):t.call(_i))},f=function(e,t,n,r,o){if(!a[e]){var i="string"==typeof t?t:t.prefix+t.resource+t.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=Ui.baseURL+"/"+i),a[e]=i.substring(0,i.lastIndexOf("/")),u[e]?c(e,t,n,r):_i.ScriptLoader.add(i,function(){return c(e,t,n,r)},r,o)}};return{items:o,urls:a,lookup:u,_listeners:i,get:function(e){return u[e]?u[e].instance:undefined},dependencies:s,requireLangPack:function(e,t){var n=Ii.getCode();if(n&&!1!==Ui.languageLoad){if(t)if(-1!==(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1===t.indexOf(","+n+","))return;_i.ScriptLoader.add(a[e]+"/langs/"+n+".js")}},add:function(t,e,n){o.push(e),u[t]={instance:e,dependencies:n};var r=Y(i,function(e){return e.name===t});return i=r.fail,Fi(r.pass,function(e){e.callback()}),e},remove:function(e){delete a[e],delete u[e]},createUrl:l,addComponents:function(e,t){var n=r.urls[e];Fi(t,function(e){_i.ScriptLoader.add(n+"/"+e)})},load:f,waitFor:function(e,t){u.hasOwnProperty(e)?t():i.push({name:e,callback:t})}}}(Ri=Ui||(Ui={})).PluginManager=Ri(),Ri.ThemeManager=Ri();var ji=Ui,qi=function(t,n){Gr(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},$i=function(e,t){Qr(e).fold(function(){Gr(e).each(function(e){Ki(e,t)})},function(e){qi(e,t)})},Wi=function(t,n){ro(t).fold(function(){Ki(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},Ki=function(e,t){e.dom().appendChild(t.dom())},Xi=function(t,e){A(e,function(e){Ki(t,e)})},Yi=function(e){e.dom().textContent="",A(to(e),function(e){Gi(e)})},Gi=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},Ji=function(e){var t,n=to(e);0<n.length&&(t=e,A(n,function(e){qi(t,e)})),Gi(e)},Qi=function(n,r){var o=null;return{cancel:function(){null!==o&&(j.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null===o&&(o=j.setTimeout(function(){n.apply(null,e),o=null},r))}}},Zi=function(e,t){var n=Dr(e,t);return n===undefined||""===n?[]:n.split(" ")},ea=function(e){return e.dom().classList!==undefined},ta=function(e,t){return o=t,i=Zi(n=e,r="class").concat([o]),Mr(n,r,i.join(" ")),!0;var n,r,o,i},na=function(e,t){return o=t,0<(i=S(Zi(n=e,r="class"),function(e){return e!==o})).length?Mr(n,r,i.join(" ")):Br(n,r),!1;var n,r,o,i},ra=function(e,t){ea(e)?e.dom().classList.add(t):ta(e,t)},oa=function(e){0===(ea(e)?e.dom().classList:Zi(e,"class")).length&&Br(e,"class")},ia=function(e,t){return ea(e)&&e.dom().classList.contains(t)},aa=function(e,t){var n=[];return A(to(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(aa(e,t))}),n},ua=function(e,t){return n=t,o=(r=e)===undefined?j.document:r.dom(),$r(o)?[]:X(o.querySelectorAll(n),cr.fromDom);var n,r,o};function sa(e,t,n,r,o){return e(n,r)?T.some(n):b(o)&&o(n)?T.none():t(n,r,o)}var la,ca=function(e,t,n){for(var r=e.dom(),o=b(n)?n:$(!1);r.parentNode;){r=r.parentNode;var i=cr.fromDom(r);if(t(i))return T.some(i);if(o(i))break}return T.none()},fa=function(e,t,n){return sa(function(e){return t(e)},ca,e,t,n)},da=function(e,t,n){return ca(e,function(e){return qr(e,t)},n)},ha=function(e,t){return n=t,o=(r=e)===undefined?j.document:r.dom(),$r(o)?T.none():T.from(o.querySelector(n)).map(cr.fromDom);var n,r,o},ma=function(e,t,n){return sa(qr,da,e,t,n)},ga=$("mce-annotation"),pa=$("data-mce-annotation"),va=$("data-mce-annotation-uid"),ya=function(r,e){var t=r.selection.getRng(),n=cr.fromDom(t.startContainer),o=cr.fromDom(r.getBody()),i=e.fold(function(){return"."+ga()},function(e){return"["+pa()+'="'+e+'"]'}),a=no(n,t.startOffset).getOr(n),u=ma(a,i,function(e){return Wr(e,o)}),s=function(e,t){return n=t,(r=e.dom())&&r.hasAttribute&&r.hasAttribute(n)?T.some(Dr(e,t)):T.none();var n,r};return u.bind(function(e){return s(e,""+va()).bind(function(n){return s(e,""+pa()).map(function(e){var t=ba(r,n);return{uid:n,name:e,elements:t}})})})},ba=function(e,t){var n=cr.fromDom(e.getBody());return ua(n,"["+va()+'="'+t+'"]')},Ca=function(i,e){var n,r,o,a=Li({}),l=function(e,t){u(e,function(e){return t(e),e})},u=function(e,t){var n=a.get(),r=t(n.hasOwnProperty(e)?n[e]:{listeners:[],previous:Li(T.none())});n[e]=r,a.set(n)},t=(n=function(){var e,t,n,r=a.get(),o=(e=br(r),(n=w.call(e,0)).sort(t),n);A(o,function(e){u(e,function(u){var s=u.previous.get();return ya(i,T.some(e)).fold(function(){var t;s.isSome()&&(l(t=e,function(e){A(e.listeners,function(e){return e(!1,t)})}),u.previous.set(T.none()))},function(e){var t,n,r,o=e.uid,i=e.name,a=e.elements;s.is(o)||(n=o,r=a,l(t=i,function(e){A(e.listeners,function(e){return e(!0,t,{uid:n,nodes:X(r,function(e){return e.dom()})})})}),u.previous.set(T.some(o)))}),{previous:u.previous,listeners:u.listeners}})})},r=30,o=null,{cancel:function(){null!==o&&(j.clearTimeout(o),o=null)},throttle:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null!==o&&j.clearTimeout(o),o=j.setTimeout(function(){n.apply(null,e),o=null},r)}});i.on("remove",function(){t.cancel()}),i.on("NodeChange",function(){t.throttle()});return{addListener:function(e,t){u(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},wa=function(e,n){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){A(e,function(t){var e;(e=t,T.from(e.attr(pa())).bind(n.lookup)).each(function(e){!1===e.persistent&&t.unwrap()})})})})},xa=0,za=function(e,t){return cr.fromDom(e.dom().cloneNode(t))},Na=function(e){return za(e,!1)},Ea=function(e){return za(e,!0)},Sa=function(e,t){var n,r,o=Xr(e).dom(),i=cr.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||j.document).createElement("div")).innerHTML=n,to(cr.fromDom(r)));Xi(i,a),Yi(e),Ki(e,i)},ka="\ufeff",Ta=function(e){return e===ka},Aa=ka,Ma=function(e){return e.replace(new RegExp(ka,"g"),"")},Ra=Oo.isElement,Da=Oo.isText,Ba=function(e){return Da(e)&&(e=e.parentNode),Ra(e)&&e.hasAttribute("data-mce-caret")},Oa=function(e){return Da(e)&&Ta(e.data)},Ha=function(e){return Ba(e)||Oa(e)},_a=function(e){return e.firstChild!==e.lastChild||!Oo.isBr(e.firstChild)},La=function(e){var t=e.container();return!(!e||!Oo.isText(t))&&(t.data.charAt(e.offset())===Aa||e.isAtStart()&&Oa(t.previousSibling))},Pa=function(e){var t=e.container();return!(!e||!Oo.isText(t))&&(t.data.charAt(e.offset()-1)===Aa||e.isAtEnd()&&Oa(t.nextSibling))},Va=function(e,t,n){var r,o,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(((i=j.document.createElement("br")).setAttribute("data-mce-bogus","1"),i)),o=t.parentNode,n?o.insertBefore(r,t):t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r),r},Ia=function(e){return Da(e)&&e.data[0]===Aa},Fa=function(e){return Da(e)&&e.data[e.data.length-1]===Aa},Ua=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],Oo.isBogus(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},ja=Oo.isContentEditableTrue,qa=Oo.isContentEditableFalse,$a=Oo.isBr,Wa=Oo.isText,Ka=Oo.matchNodeNames(["script","style","textarea"]),Xa=Oo.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),Ya=Oo.matchNodeNames(["table"]),Ga=Ha,Ja=function(e){return!Ga(e)&&(Wa(e)?!Ka(e.parentNode):Xa(e)||$a(e)||Ya(e)||Qa(e))},Qa=function(e){return!1===(t=e,Oo.isElement(t)&&"true"===t.getAttribute("unselectable"))&&qa(e);var t},Za=function(e,t){return Ja(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Qa(e))return!1;if(ja(e))return!0}return!0}(e,t)},eu=Math.round,tu=function(e){return e?{left:eu(e.left),top:eu(e.top),bottom:eu(e.bottom),right:eu(e.right),width:eu(e.width),height:eu(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},nu=function(e,t){return e=tu(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},ru=function(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2},ou=function(e,t){return e.bottom-e.height/2<t.top||!(e.top>t.bottom)&&ru(t.top-e.bottom,e,t)},iu=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&ru(t.bottom-e.top,e,t)},au=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},uu=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},su=function(e,t){return 1===e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},lu=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]"),cu=function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&lu.test(e)},fu=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(!o.isSome())return T.none();n.push(o.getOrDie())}return T.some(t.apply(null,n))},du=[].slice,hu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=du.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},mu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=du.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},gu=Oo.isElement,pu=Ja,vu=Oo.matchStyleValues("display","block table"),yu=Oo.matchStyleValues("float","left right"),bu=hu(gu,pu,s(yu)),Cu=s(Oo.matchStyleValues("white-space","pre pre-line pre-wrap")),wu=Oo.isText,xu=Oo.isBr,zu=Di.nodeIndex,Nu=su,Eu=function(e){return"createRange"in e?e.createRange():Di.DOM.createRng()},Su=function(e){return e&&/[\r\n\t ]/.test(e)},ku=function(e){return!!e.setStart&&!!e.setEnd},Tu=function(e){var t,n=e.startContainer,r=e.startOffset;return!!(Su(e.toString())&&Cu(n.parentNode)&&Oo.isText(n)&&(t=n.data,Su(t[r-1])||Su(t[r+1])))},Au=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},Mu=function(e){var t,n,r,o,i,a,u,s;return t=0<(n=e.getClientRects()).length?tu(n[0]):tu(e.getBoundingClientRect()),!ku(e)&&xu(e)&&Au(t)?(i=(r=e).ownerDocument,a=Eu(i),u=i.createTextNode("\xa0"),(s=r.parentNode).insertBefore(u,r),a.setStart(u,0),a.setEnd(u,1),o=tu(a.getBoundingClientRect()),s.removeChild(u),o):Au(t)&&ku(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&Oo.isText(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),Mu(i)}return null}(e):t},Ru=function(e,t){var n=nu(e,t);return n.width=1,n.right=n.left+1,n},Du=function(e){var t,n,r=[],o=function(e){var t,n;0!==e.height&&(0<r.length&&(t=e,n=r[r.length-1],t.left===n.left&&t.top===n.top&&t.bottom===n.bottom&&t.right===n.right)||r.push(e))},i=function(e,t){var n=Eu(e.ownerDocument);if(t<e.data.length){if(cu(e.data[t]))return r;if(cu(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Tu(n)))return o(Ru(Mu(n),!1)),r}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),Tu(n)||o(Ru(Mu(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Tu(n)||o(Ru(Mu(n),!0)))};if(wu(e.container()))return i(e.container(),e.offset()),r;if(gu(e.container()))if(e.isAtEnd())n=Nu(e.container(),e.offset()),wu(n)&&i(n,n.data.length),bu(n)&&!xu(n)&&o(Ru(Mu(n),!1));else{if(n=Nu(e.container(),e.offset()),wu(n)&&i(n,0),bu(n)&&e.isAtEnd())return o(Ru(Mu(n),!1)),r;t=Nu(e.container(),e.offset()-1),bu(t)&&!xu(t)&&(vu(t)||vu(n)||!bu(n))&&o(Ru(Mu(t),!1)),bu(n)&&o(Ru(Mu(n),!0))}return r};function Bu(t,n,e){var r=function(){return e||(e=Du(Bu(t,n))),e};return{container:$(t),offset:$(n),toRange:function(){var e;return(e=Eu(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return wu(t),0===n},isAtEnd:function(){return wu(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return Nu(t,e?n-1:n)}}}(la=Bu||(Bu={})).fromRangeStart=function(e){return la(e.startContainer,e.startOffset)},la.fromRangeEnd=function(e){return la(e.endContainer,e.endOffset)},la.after=function(e){return la(e.parentNode,zu(e)+1)},la.before=function(e){return la(e.parentNode,zu(e))},la.isAbove=function(e,t){return fu([P(t.getClientRects()),V(e.getClientRects())],ou).getOr(!1)},la.isBelow=function(e,t){return fu([V(t.getClientRects()),P(e.getClientRects())],iu).getOr(!1)},la.isAtStart=function(e){return!!e&&e.isAtStart()},la.isAtEnd=function(e){return!!e&&e.isAtEnd()},la.isTextPosition=function(e){return!!e&&Oo.isText(e.container())},la.isElementPosition=function(e){return!1===la.isTextPosition(e)};var Ou,Hu,_u=Bu,Lu=Oo.isText,Pu=Oo.isBogus,Vu=Di.nodeIndex,Iu=function(e){var t=e.parentNode;return Pu(t)?Iu(t):t},Fu=function(e){return e?Yt.reduce(e.childNodes,function(e,t){return Pu(t)&&"BR"!==t.nodeName?e=e.concat(Fu(t)):e.push(t),e},[]):[]},Uu=function(t){return function(e){return t===e}},ju=function(e){var t,r,n,o;return(Lu(e)?"text()":e.nodeName.toLowerCase())+"["+(r=Fu(Iu(t=e)),n=Yt.findIndex(r,Uu(t),t),r=r.slice(0,n+1),o=Yt.reduce(r,function(e,t,n){return Lu(t)&&Lu(r[n-1])&&e++,e},0),r=Yt.filter(r,Oo.matchNodeNames([t.nodeName])),(n=Yt.findIndex(r,Uu(t),t))-o)+"]"},qu=function(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),Lu(n)?o=function(e,t){for(;(e=e.previousSibling)&&Lu(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(ju(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=Yt.filter(a,s(Oo.isBogus)),(u=u.concat(Yt.map(a,function(e){return ju(e)}))).reverse().join("/")+","+o},$u=function(e,t){var n,r,o;return t?(t=(n=t.split(","))[0].split("/"),o=1<n.length?n[1]:"before",(r=Yt.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),n=e,r=t[1],o=parseInt(t[2],10),i=Fu(n),i=Yt.filter(i,function(e,t){return!Lu(e)||!Lu(i[t-1])}),(i=Yt.filter(i,Oo.matchNodeNames([r])))[o]):null;var n,r,o,i},e))?Lu(r)?function(e,t){for(var n,r=e,o=0;Lu(r);){if(n=r.data.length,o<=t&&t<=o+n){e=r,t-=o;break}if(!Lu(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return Lu(e)&&t>e.data.length&&(t=e.data.length),_u(e,t)}(r,parseInt(o,10)):(o="after"===o?Vu(r)+1:Vu(r),_u(r.parentNode,o)):null):null},Wu=function(e,t){Oo.isText(t)&&0===t.data.length&&e.remove(t)},Ku=function(e,t,n){var r,o,i,a,u,s,l;Oo.isDocumentFragment(n)?(i=e,a=t,u=n,s=T.from(u.firstChild),l=T.from(u.lastChild),a.insertNode(u),s.each(function(e){return Wu(i,e.previousSibling)}),l.each(function(e){return Wu(i,e.nextSibling)})):(r=e,o=n,t.insertNode(o),Wu(r,o.previousSibling),Wu(r,o.nextSibling))},Xu=Oo.isContentEditableFalse,Yu=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],l=0,c=e.getRoot();for(Oo.isText(a)?s.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Oo.isText(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(l=1,u=Math.max(0,i.length-1)),s.push(e.nodeIndex(i[u],n)+l));a&&a!==c;a=a.parentNode)s.push(e.nodeIndex(a,n));return s},Gu=function(e,t,n){var r=0;return en.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},Ju=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],Oo.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},Qu=function(e){return Ju(e,!0),Ju(e,!1),e},Zu=function(e,t){var n;if(Oo.isElement(e)&&(e=su(e,t),Xu(e)))return e;if(Ha(e)){if(Oo.isText(e)&&Ba(e)&&(e=e.parentNode),n=e.previousSibling,Xu(n))return n;if(n=e.nextSibling,Xu(n))return n}},es=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Xu(r)||"IMG"===o)return{name:o,index:Gu(n.dom,o,r)};var a,u,s,l,c,f,d,h=Zu((a=i).startContainer,a.startOffset)||Zu(a.endContainer,a.endOffset);return h?{name:o=h.tagName,index:Gu(n.dom,o,h)}:(u=e,l=t,c=i,f=(s=n).dom,(d={}).start=Yu(f,u,l,c,!0),s.isCollapsed()||(d.end=Yu(f,u,l,c,!1)),d)},ts=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},ns=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Gu(n,u,a)};var s=Qu(r.cloneRange());if(!i){s.collapse(!1);var l=ts(n,o+"_end",t);Ku(n,s,l)}(r=Qu(r)).collapse(!0);var c=ts(n,o+"_start",t);return Ku(n,r,c),e.moveToBookmark({id:o,keep:1}),{id:o}},rs={getBookmark:function(e,t,n){return 2===t?es(Ma,n,e):3===t?(o=(r=e).getRng(),{start:qu(r.dom.getRoot(),_u.fromRangeStart(o)),end:qu(r.dom.getRoot(),_u.fromRangeEnd(o))}):t?{rng:e.getRng()}:ns(e,!1);var r,o},getUndoBookmark:d(es,W,!0),getPersistentBookmark:ns},os="_mce_caret",is=function(e){return Oo.isElement(e)&&e.id===os},as=function(e,t){for(;t&&t!==e;){if(t.id===os)return t;t=t.parentNode}return null},us=Oo.isElement,ss=Oo.isText,ls=function(e){var t=e.parentNode;t&&t.removeChild(e)},cs=function(e,t){0===t.length?ls(e):e.nodeValue=t},fs=function(e){var t=Ma(e);return{count:e.length-t.length,text:t}},ds=function(e,t){return gs(e),t},hs=function(e,t){var n,r,o,i=t.container(),a=(n=I(i.childNodes),r=e,o=z(n,r),-1===o?T.none():T.some(o)).map(function(e){return e<t.offset()?_u(i,t.offset()-1):t}).getOr(t);return gs(e),a},ms=function(e,t){return ss(e)&&t.container()===e?(r=t,o=fs((n=e).data.substr(0,r.offset())),i=fs(n.data.substr(r.offset())),0<(a=o.text+i.text).length?(cs(n,a),_u(n,r.offset()-o.count)):r):ds(e,t);var n,r,o,i,a},gs=function(e){if(us(e)&&Ha(e)&&(_a(e)?e.removeAttribute("data-mce-caret"):ls(e)),ss(e)){var t=Ma(function(e){try{return e.nodeValue}catch(t){return""}}(e));cs(e,t)}},ps={removeAndReposition:function(e,t){return _u.isTextPosition(t)?ms(e,t):(n=e,(r=t).container()===n.parentNode?hs(n,r):ds(n,r));var n,r},remove:gs},vs=sr.detect().browser,ys=Oo.isContentEditableFalse,bs=function(e,t,n){var r,o,i,a,u,s=nu(t.getBoundingClientRect(),n);return i="BODY"===e.tagName?(r=e.ownerDocument.documentElement,o=e.scrollLeft||r.scrollLeft,e.scrollTop||r.scrollTop):(u=e.getBoundingClientRect(),o=e.scrollLeft-u.left,e.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,0<(a=t.offsetWidth-t.clientWidth)&&(n&&(a*=-1),s.left+=a,s.right+=a),s},Cs=function(a,u,e){var t,s,l=Li(T.none()),c=function(){!function(e){var t,n,r,o,i;for(t=Bn("*[contentEditable=false]",e),o=0;o<t.length;o++)r=(n=t[o]).previousSibling,Fa(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,Ia(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(a),s&&(ps.remove(s),s=null),l.get().each(function(e){Bn(e.caret).remove(),l.set(T.none())}),Ie.clearInterval(t)},f=function(){t=Ie.setInterval(function(){e()?Bn("div.mce-visual-caret",a).toggleClass("mce-visual-caret-hidden"):Bn("div.mce-visual-caret",a).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,e){var n,r,o;if(c(),o=e,Oo.isElement(o)&&/^(TD|TH)$/i.test(o.tagName))return null;if(!u(e))return s=function(e,t){var n,r,o;if(r=e.ownerDocument.createTextNode(Aa),o=e.parentNode,t){if(n=e.previousSibling,Da(n)){if(Ha(n))return n;if(Fa(n))return n.splitText(n.data.length-1)}o.insertBefore(r,e)}else{if(n=e.nextSibling,Da(n)){if(Ha(n))return n;if(Ia(n))return n.splitText(1),n}e.nextSibling?o.insertBefore(r,e.nextSibling):o.appendChild(r)}return r}(e,t),r=e.ownerDocument.createRange(),ys(s.nextSibling)?(r.setStart(s,0),r.setEnd(s,0)):(r.setStart(s,1),r.setEnd(s,1)),r;s=Va("p",e,t),n=bs(a,e,t),Bn(s).css("top",n.top);var i=Bn('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(a)[0];return l.set(T.some({caret:i,element:e,before:t})),l.get().each(function(e){t&&Bn(e.caret).addClass("mce-visual-caret-before")}),f(),(r=e.ownerDocument.createRange()).setStart(s,0),r.setEnd(s,0),r},hide:c,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){l.get().each(function(e){var t=bs(a,e.element,e.before);Bn(e.caret).css(G({},t))})},destroy:function(){return Ie.clearInterval(t)}}},ws=function(){return vs.isIE()||vs.isEdge()||vs.isFirefox()},xs=function(e){return ys(e)||Oo.isTable(e)&&ws()},zs=Oo.isContentEditableFalse,Ns=Oo.matchStyleValues("display","block table table-cell table-caption list-item"),Es=Ha,Ss=Ba,ks=Oo.isElement,Ts=Ja,As=function(e){return 0<e},Ms=function(e){return e<0},Rs=function(e,t){for(var n;n=e(t);)if(!Ss(n))return n;return null},Ds=function(e,t,n,r,o){var i=new Ho(e,r);if(Ms(t)){if((zs(e)||Ss(e))&&n(e=Rs(i.prev,!0)))return e;for(;e=Rs(i.prev,o);)if(n(e))return e}if(As(t)){if((zs(e)||Ss(e))&&n(e=Rs(i.next,!0)))return e;for(;e=Rs(i.next,o);)if(n(e))return e}return null},Bs=function(e,t){for(;e&&e!==t;){if(Ns(e))return e;e=e.parentNode}return null},Os=function(e,t,n){return Bs(e.container(),n)===Bs(t.container(),n)},Hs=function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),ks(n)?n.childNodes[r+e]:null):null},_s=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Ls=function(e,t,n){var r,o,i,a;for(o=e?"previousSibling":"nextSibling";n&&n!==t;){if(r=n[o],Es(r)&&(r=r[o]),zs(r)){if(a=n,Bs(r,i=t)===Bs(a,i))return r;break}if(Ts(r))break;n=n.parentNode}return null},Ps=d(_s,!0),Vs=d(_s,!1),Is=function(e,t,n){var r,o,i,a,u=d(Ls,!0,t),s=d(Ls,!1,t);if(o=n.startContainer,i=n.startOffset,Ba(o)){if(ks(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,xs(r)))return Ps(r);if("after"===a&&(r=o.previousSibling,xs(r)))return Vs(r)}if(!n.collapsed)return n;if(Oo.isText(o)){if(Es(o)){if(1===e){if(r=s(o))return Ps(r);if(r=u(o))return Vs(r)}if(-1===e){if(r=u(o))return Vs(r);if(r=s(o))return Ps(r)}return n}if(Fa(o)&&i>=o.data.length-1)return 1===e&&(r=s(o))?Ps(r):n;if(Ia(o)&&i<=1)return-1===e&&(r=u(o))?Vs(r):n;if(i===o.data.length)return(r=s(o))?Ps(r):n;if(0===i)return(r=u(o))?Vs(r):n}return n},Fs=function(e,t){return T.from(Hs(e?0:-1,t)).filter(zs)},Us=function(e,t,n){var r=Is(e,t,n);return-1===e?Bu.fromRangeStart(r):Bu.fromRangeEnd(r)},js=function(e){return T.from(e.getNode()).map(cr.fromDom)},qs=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},$s=function(e,t){var n=Os(e,t);return!(n||!Oo.isBr(e.getNode()))||n};(Hu=Ou||(Ou={}))[Hu.Backwards=-1]="Backwards",Hu[Hu.Forwards=1]="Forwards";var Ws=Oo.isContentEditableFalse,Ks=Oo.isText,Xs=Oo.isElement,Ys=Oo.isBr,Gs=Ja,Js=function(e){return Xa(e)||!!Qa(t=e)&&!0!==M(I(t.getElementsByTagName("*")),function(e,t){return e||ja(t)},!1);var t},Qs=Za,Zs=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},el=function(e,t){if(As(e)){if(Gs(t.previousSibling)&&!Ks(t.previousSibling))return _u.before(t);if(Ks(t))return _u(t,0)}if(Ms(e)){if(Gs(t.nextSibling)&&!Ks(t.nextSibling))return _u.after(t);if(Ks(t))return _u(t,t.data.length)}return Ms(e)?Ys(t)?_u.before(t):_u.after(t):_u.before(t)},tl=function(e,t,n){var r,o,i,a,u;if(!Xs(n)||!t)return null;if(t.isEqual(_u.after(n))&&n.lastChild){if(u=_u.after(n.lastChild),Ms(e)&&Gs(n.lastChild)&&Xs(n.lastChild))return Ys(n.lastChild)?_u.before(n.lastChild):u}else u=t;var s,l,c,f=u.container(),d=u.offset();if(Ks(f)){if(Ms(e)&&0<d)return _u(f,--d);if(As(e)&&d<f.length)return _u(f,++d);r=f}else{if(Ms(e)&&0<d&&(o=Zs(f,d-1),Gs(o)))return!Js(o)&&(i=Ds(o,e,Qs,o))?Ks(i)?_u(i,i.data.length):_u.after(i):Ks(o)?_u(o,o.data.length):_u.before(o);if(As(e)&&d<f.childNodes.length&&(o=Zs(f,d),Gs(o)))return Ys(o)?(s=n,(c=(l=o).nextSibling)&&Gs(c)?Ks(c)?_u(c,0):_u.before(c):tl(Ou.Forwards,_u.after(l),s)):!Js(o)&&(i=Ds(o,e,Qs,o))?Ks(i)?_u(i,0):_u.before(i):Ks(o)?_u(o,0):_u.after(o);r=o||u.getNode()}return(As(e)&&u.isAtEnd()||Ms(e)&&u.isAtStart())&&(r=Ds(r,e,$(!0),n,!0),Qs(r,n))?el(e,r):(o=Ds(r,e,Qs,n),!(a=Yt.last(S(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(f,n),Ws)))||o&&a.contains(o)?o?el(e,o):null:u=As(e)?_u.after(a):_u.before(a))},nl=function(t){return{next:function(e){return tl(Ou.Forwards,e,t)},prev:function(e){return tl(Ou.Backwards,e,t)}}},rl=function(e){return _u.isTextPosition(e)?0===e.offset():Ja(e.getNode())},ol=function(e){if(_u.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Ja(e.getNode(!0))},il=function(e,t){return!_u.isTextPosition(e)&&!_u.isTextPosition(t)&&e.getNode()===t.getNode(!0)},al=function(e,t,n){return e?!il(t,n)&&(r=t,!(!_u.isTextPosition(r)&&Oo.isBr(r.getNode())))&&ol(t)&&rl(n):!il(n,t)&&rl(t)&&ol(n);var r},ul=function(e,t,n){var r=nl(t);return T.from(e?r.next(n):r.prev(n))},sl=function(t,n,r){return ul(t,n,r).bind(function(e){return Os(r,e,n)&&al(t,r,e)?ul(t,n,e):T.some(e)})},ll=function(t,n,e,r){return sl(t,n,e).bind(function(e){return r(e)?ll(t,n,e,r):T.some(e)})},cl=function(e,t){var n,r,o,i,a,u=e?t.firstChild:t.lastChild;return Oo.isText(u)?T.some(_u(u,e?0:u.data.length)):u?Ja(u)?T.some(e?_u.before(u):(a=u,Oo.isBr(a)?_u.before(a):_u.after(a))):(r=t,o=u,i=(n=e)?_u.before(o):_u.after(o),ul(n,r,i)):T.none()},fl=d(ul,!0),dl=d(ul,!1),hl={fromPosition:ul,nextPosition:fl,prevPosition:dl,navigate:sl,navigateIgnore:ll,positionIn:cl,firstPositionIn:d(cl,!0),lastPositionIn:d(cl,!1)},ml=function(e,t){return!e.isBlock(t)||t.innerHTML||He.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t},gl=function(e,t){return hl.lastPositionIn(e).fold(function(){return!1},function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},pl=function(e,t,n){return!(!1!==t.hasChildNodes()||!as(e,t))&&(o=n,i=(r=t).ownerDocument.createTextNode(Aa),r.appendChild(i),o.setStart(i,0),o.setEnd(i,0),!0);var r,o,i},vl=function(e,t,n,r){var o,i,a,u,s=n[t?"start":"end"],l=e.getRoot();if(s){for(a=s[0],i=l,o=s.length-1;1<=o;o--){if(u=i.childNodes,pl(l,i,r))return!0;if(s[o]>u.length-1)return!!pl(l,i,r)||gl(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},yl=function(e){return Oo.isText(e)&&0<e.data.length},bl=function(e,t,n){var r,o,i,a,u,s,l=e.get(n.id+"_"+t),c=n.keep;if(l){if(r=l.parentNode,s=(u=(o="start"===t?c?l.hasChildNodes()?(r=l.firstChild,1):yl(l.nextSibling)?(r=l.nextSibling,0):yl(l.previousSibling)?(r=l.previousSibling,l.previousSibling.data.length):(r=l.parentNode,e.nodeIndex(l)+1):e.nodeIndex(l):c?l.hasChildNodes()?(r=l.firstChild,1):yl(l.previousSibling)?(r=l.previousSibling,l.previousSibling.data.length):(r=l.parentNode,e.nodeIndex(l)):e.nodeIndex(l),r),o),!c){for(a=l.previousSibling,i=l.nextSibling,en.each(en.grep(l.childNodes),function(e){Oo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});l=e.get(n.id+"_"+t);)e.remove(l,!0);a&&i&&a.nodeType===i.nodeType&&Oo.isText(a)&&!He.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),s=(u=a,o))}return T.some(_u(u,s))}return T.none()},Cl=function(e,t){var n,r,o,i,a,u,s,l,c,f,d,h,m,g,p,v,y=e.dom;if(t){if(v=t,en.isArray(v.start))return g=t,p=(m=y).createRng(),vl(m,!0,g,p)&&vl(m,!1,g,p)?T.some(p):T.none();if("string"==typeof t.start)return T.some((f=t,d=(c=y).createRng(),h=$u(c.getRoot(),f.start),d.setStart(h.container(),h.offset()),h=$u(c.getRoot(),f.end),d.setEnd(h.container(),h.offset()),d));if(t.hasOwnProperty("id"))return s=bl(o=y,"start",i=t),l=bl(o,"end",i),fu([s,(a=l,u=s,a.isSome()?a:u)],function(e,t){var n=o.createRng();return n.setStart(ml(o,e.container()),e.offset()),n.setEnd(ml(o,t.container()),t.offset()),n});if(t.hasOwnProperty("name"))return n=y,r=t,T.from(n.select(r.name)[r.index]).map(function(e){var t=n.createRng();return t.selectNode(e),t});if(t.hasOwnProperty("rng"))return T.some(t.rng)}return T.none()},wl=function(e,t,n){return rs.getBookmark(e,t,n)},xl=function(t,e){Cl(t,e).each(function(e){t.setRng(e)})},zl=function(e){return Oo.isElement(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Nl=function(e){return e&&/^(IMG)$/.test(e.nodeName)},El=function(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)},Sl=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},kl={isInlineBlock:Nl,moveStart:function(e,t,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!Nl(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?(u=i[a],r=new Ho(u,e.getParent(u,e.isBlock))):(u=i[i.length-1],(r=new Ho(u,e.getParent(u,e.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!El(o))return n.setStart(o,0),void t.setRng(n)},getNonWhiteSpaceSibling:function(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1===e.nodeType||!El(e))return e},isTextBlock:function(e,t){return t.nodeType&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},isValid:function(e,t,n){return e.schema.isValidChild(t,n)},isWhiteSpaceNode:El,replaceVars:function(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e},isEq:function(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},normalizeStyleValue:Sl,getStyle:function(e,t,n){return Sl(e,e.getStyle(t,n),n)},getTextDecoration:function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},getParents:function(e,t,n){return e.getParents(t,n,e.getRoot())}},Tl=zl,Al=kl.getParents,Ml=kl.isWhiteSpaceNode,Rl=kl.isTextBlock,Dl=function(e,t){for(void 0===t&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}},Bl=function(e,t){for(var n=t;n;){if(1===n.nodeType&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},Ol=function(e,t,n,r){var o,i,a=n.nodeValue;return void 0===r&&(r=e?a.length:0),e?(o=a.lastIndexOf(" ",r),-1!==(o=(i=a.lastIndexOf("\xa0",r))<o?o:i)&&!t&&(o<r||!e)&&o<=a.length&&o++):(o=a.indexOf(" ",r),i=a.indexOf("\xa0",r),o=-1!==o&&(-1===i||o<i)?o:i),o},Hl=function(e,t,n,r,o,i){var a,u,s;if(3===n.nodeType){if(-1!==(u=Ol(o,i,n,r)))return{container:n,offset:u};s=n}for(var l=new Ho(n,e.getParent(n,e.isBlock)||t);a=l[o?"prev":"next"]();)if(3!==a.nodeType||Tl(a.parentNode)){if(e.isBlock(a)||kl.isEq(a,"BR"))break}else if(-1!==(u=Ol(o,i,s=a)))return{container:a,offset:u};if(s)return{container:s,offset:r=o?0:s.length}},_l=function(e,t,n,r,o){var i,a,u,s;for(3===r.nodeType&&0===r.nodeValue.length&&r[o]&&(r=r[o]),i=Al(e,r),a=0;a<i.length;a++)for(u=0;u<t.length;u++)if(!("collapsed"in(s=t[u])&&s.collapsed!==n.collapsed)&&e.is(i[a],s.selector))return i[a];return r},Ll=function(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(3===n.nodeType?n.parentNode:n,function(e){return e!==a&&Rl(t,e)},u)}if(o&&e[0].wrapper&&(o=Al(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!kl.isEq(o,"br")););return o||n},Pl=function(e,t,n,r,o,i,a){var u,s,l,c,f,d;if(u=s=a?n:o,c=a?"previousSibling":"nextSibling",f=e.getRoot(),3===u.nodeType&&!Ml(u)&&(a?0<r:i<u.nodeValue.length))return u;for(;;){if(!t[0].block_expand&&e.isBlock(s))return s;for(l=s[c];l;l=l[c])if(!Tl(l)&&!Ml(l)&&("BR"!==(d=l).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u},Vl=function(e,t,n,r){var o,i=t.startContainer,a=t.startOffset,u=t.endContainer,s=t.endOffset,l=e.dom;return 1===i.nodeType&&i.hasChildNodes()&&3===(i=su(i,a)).nodeType&&(a=0),1===u.nodeType&&u.hasChildNodes()&&3===(u=su(u,t.collapsed?s:s-1)).nodeType&&(s=u.nodeValue.length),i=Bl(l,i),u=Bl(l,u),(Tl(i.parentNode)||Tl(i))&&(i=Tl(i)?i:i.parentNode,3===(i=t.collapsed?i.previousSibling||i:i.nextSibling||i).nodeType&&(a=t.collapsed?i.length:0)),(Tl(u.parentNode)||Tl(u))&&(u=Tl(u)?u:u.parentNode,3===(u=t.collapsed?u.nextSibling||u:u.previousSibling||u).nodeType&&(s=t.collapsed?0:u.length)),t.collapsed&&((o=Hl(l,e.getBody(),i,a,!0,r))&&(i=o.container,a=o.offset),(o=Hl(l,e.getBody(),u,s,!1,r))&&(u=o.container,s=o.offset)),n[0].inline&&(u=r?u:function(e,t){var n=Dl(e,t);if(n.node){for(;n.node&&0===n.offset&&n.node.previousSibling;)n=Dl(n.node.previousSibling);n.node&&0<n.offset&&3===n.node.nodeType&&" "===n.node.nodeValue.charAt(n.offset-1)&&1<n.offset&&(e=n.node).splitText(n.offset-1)}return e}(u,s)),(n[0].inline||n[0].block_expand)&&(n[0].inline&&3===i.nodeType&&0!==a||(i=Pl(l,n,i,a,u,s,!0)),n[0].inline&&3===u.nodeType&&s!==u.nodeValue.length||(u=Pl(l,n,i,a,u,s,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(i=_l(l,n,t,i,"previousSibling"),u=_l(l,n,t,u,"nextSibling")),(n[0].block||n[0].selector)&&(i=Ll(e,n,i,"previousSibling"),u=Ll(e,n,u,"nextSibling"),n[0].block&&(l.isBlock(i)||(i=Pl(l,n,i,a,u,s,!0)),l.isBlock(u)||(u=Pl(l,n,i,a,u,s,!1)))),1===i.nodeType&&(a=l.nodeIndex(i),i=i.parentNode),1===u.nodeType&&(s=l.nodeIndex(u)+1,u=u.parentNode),{startContainer:i,startOffset:a,endContainer:u,endOffset:s}},Il=en.each,Fl=function(e,t,o){var n,r,i,a,u,s,l,c=t.startContainer,f=t.startOffset,d=t.endContainer,h=t.endOffset;if(0<(l=e.select("td[data-mce-selected],th[data-mce-selected]")).length)Il(l,function(e){o([e])});else{var m,g,p,v=function(e){var t;return 3===(t=e[0]).nodeType&&t===c&&f>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===h&&0<e.length&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e},y=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},b=function(e,t){do{if(e.parentNode===t)return e;e=e.parentNode}while(e)},C=function(e,t,n){var r=n?"nextSibling":"previousSibling";for(u=(a=e).parentNode;a&&a!==t;a=u)u=a.parentNode,(s=y(a===e?a:a[r],r)).length&&(n||s.reverse(),o(v(s)))};if(1===c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[f]),1===d.nodeType&&d.hasChildNodes()&&(g=h,p=(m=d).childNodes,--g>p.length-1?g=p.length-1:g<0&&(g=0),d=p[g]||m),c===d)return o(v([c]));for(n=e.findCommonAncestor(c,d),a=c;a;a=a.parentNode){if(a===d)return C(c,n,!0);if(a===n)break}for(a=d;a;a=a.parentNode){if(a===c)return C(d,n);if(a===n)break}r=b(c,n)||c,i=b(d,n)||d,C(c,r,!0),(s=y(r===c?r:r.nextSibling,"nextSibling",i===d?i.nextSibling:i)).length&&o(v(s)),C(d,i)}};var Ul=function tE(n,r){var t=function(e){return n(e)?T.from(e.dom().nodeValue):T.none()},e=sr.detect().browser,o=e.isIE()&&10===e.version.major?function(e){try{return t(e)}catch(eE){return T.none()}}:t;return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return o(e).getOr("")},getOption:o,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}(vr,"text"),jl=function(e){return Ul.get(e)},ql=function(r,o,i,a){return Gr(o).fold(function(){return"skipping"},function(e){return"br"===a||vr(n=o)&&"\ufeff"===jl(n)?"valid":pr(t=o)&&ia(t,ga())?"existing":is(o)?"caret":kl.isValid(r,i,a)&&kl.isValid(r,mr(e),i)?"valid":"invalid-child";var t,n})},$l=function(e,t,n,r){var o,i,a=t.uid,u=void 0===a?(o="mce-annotation",i=(new Date).getTime(),o+"_"+Math.floor(1e9*Math.random())+ ++xa+String(i)):a,s=function p(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),l=cr.fromTag("span",e);ra(l,ga()),Mr(l,""+va(),u),Mr(l,""+pa(),n);var c,f=r(u,s),d=f.attributes,h=void 0===d?{}:d,m=f.classes,g=void 0===m?[]:m;return Rr(l,h),c=l,A(g,function(e){ra(c,e)}),l},Wl=function(i,e,t,n,r){var a=[],u=$l(i.getDoc(),r,t,n),s=Li(T.none()),l=function(){s.set(T.none())},c=function(e){A(e,o)},o=function(e){var t,n;switch(ql(i,e,"span",mr(e))){case"invalid-child":l();var r=to(e);c(r),l();break;case"valid":var o=s.get().getOrThunk(function(){var e=Na(u);return a.push(e),s.set(T.some(e)),e});qi(t=e,n=o),Ki(n,t)}};return Fl(i.dom,e,function(e){var t;l(),t=X(e,cr.fromDom),c(t)}),a},Kl=function(s,l,c,f){s.undoManager.transact(function(){var e,t,n,r,o=s.selection.getRng();if(o.collapsed&&(r=Vl(e=s,t=o,[{inline:!0}],3===(n=t).startContainer.nodeType&&n.startContainer.nodeValue.length>=n.startOffset&&"\xa0"===n.startContainer.nodeValue[n.startOffset]),t.setStart(r.startContainer,r.startOffset),t.setEnd(r.endContainer,r.endOffset),e.selection.setRng(t)),s.selection.getRng().collapsed){var i=$l(s.getDoc(),f,l,c.decorate);Sa(i,"\xa0"),s.selection.getRng().insertNode(i.dom()),s.selection.select(i.dom())}else{var a=rs.getPersistentBookmark(s.selection,!1),u=s.selection.getRng();Wl(s,u,l,c.decorate,f),s.selection.moveToBookmark(a)}})},Xl=function(u){var n,r=(n={},{register:function(e,t){n[e]={name:e,settings:t}},lookup:function(e){return n.hasOwnProperty(e)?T.from(n[e]).map(function(e){return e.settings}):T.none()}});wa(u,r);var o=Ca(u);return{register:function(e,t){r.register(e,t)},annotate:function(t,n){r.lookup(t).each(function(e){Kl(u,t,e,n)})},annotationChanged:function(e,t){o.addListener(e,t)},remove:function(e){ya(u,T.some(e)).each(function(e){var t=e.elements;A(t,Ji)})},getAll:function(e){var t,n,r,o,i,a=(t=u,n=e,r=cr.fromDom(t.getBody()),o=ua(r,"["+pa()+'="'+n+'"]'),i={},A(o,function(e){var t=Dr(e,va()),n=i.hasOwnProperty(t)?i[t]:[];i[t]=n.concat([e])}),i);return xr(a,function(e){return X(e,function(e){return e.dom()})})}}},Yl=/^[ \t\r\n]*$/,Gl={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Jl=function(e,t,n){var r,o,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(r=e[a])return r;for(o=e.parent;o&&o!==t;o=o.parent)if(r=o[a])return r}},Ql=function(){function a(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}return a.create=function(e,t){var n,r;if(n=new a(e,Gl[e]||1),t)for(r in t)n.attr(r,t[r]);return n},a.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},a.prototype.attr=function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(t===undefined)return n.map[e];if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}},a.prototype.clone=function(){var e,t,n,r,o,i=new a(this.name,this.type);if(n=this.attributes){for((o=[]).map={},e=0,t=n.length;e<t;e++)"id"!==(r=n[e]).name&&(o[o.length]={name:r.name,value:r.value},o.map[r.name]=r.value);i.attributes=o}return i.value=this.value,i.shortEnded=this.shortEnded,i},a.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},a.prototype.unwrap=function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},a.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},a.prototype.append=function(e){var t;return e.parent&&e.remove(),(t=this.lastChild)?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},a.prototype.insert=function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},a.prototype.getAll=function(e){var t,n=[];for(t=this.firstChild;t;t=Jl(t,this))t.name===e&&n.push(t);return n},a.prototype.empty=function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=Jl(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},a.prototype.isEmpty=function(e,t,n){var r,o,i=this.firstChild;if(t=t||{},i)do{if(1===i.type){if(i.attr("data-mce-bogus"))continue;if(e[i.name])return!1;for(r=i.attributes.length;r--;)if("name"===(o=i.attributes[r].name)||0===o.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!Yl.test(i.value))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&Yl.test(i.value))return!1;if(n&&n(i))return!1}while(i=Jl(i,this));return!0},a.prototype.walk=function(e){return Jl(this,null,e)},a}(),Zl=function(e,t,n){var r,o,i,a,u=1;for(a=e.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(t);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},ec=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null};function tc(V,I){void 0===I&&(I=yi());var e=function(){};!1!==(V=V||{}).fix_self_closing&&(V.fix_self_closing=!0);var F=V.comment?V.comment:e,U=V.cdata?V.cdata:e,j=V.text?V.text:e,q=V.start?V.start:e,$=V.end?V.end:e,W=V.pi?V.pi:e,K=V.doctype?V.doctype:e;return{parse:function(e){var t,n,r,d,o,i,a,h,u,s,m,l,g,c,f,p,v,y,b,C,w,x,z,N,E,S,k,T,A,M=0,R=[],D=0,B=ui.decode,O=en.makeMap("src,href,data,background,formaction,poster,xlink:href"),H=/((java|vb)script|mhtml):/i,_=function(e){var t,n;for(t=R.length;t--&&R[t].name!==e;);if(0<=t){for(n=R.length-1;t<=n;n--)(e=R[n]).valid&&$(e.name);R.length=t}},L=function(e,t,n,r,o){var i,a,u,s,l;if(n=(t=t.toLowerCase())in m?t:B(n||r||o||""),g&&!h&&0==(0===(u=t).indexOf("data-")||0===u.indexOf("aria-"))){if(!(i=y[t])&&b){for(a=b.length;a--&&!(i=b[a]).pattern.test(t););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}if(O[t]&&!V.allow_script_urls){var c=n.replace(/[\s\u0000-\u001F]+/g,"");try{c=decodeURIComponent(c)}catch(f){c=unescape(c)}if(H.test(c))return;if(l=c,!(s=V).allow_html_data_urls&&(/^data:image\//i.test(l)?!1===s.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(l):/^data:/i.test(l)))return}h&&(t in O||0===t.indexOf("on"))||(d.map[t]=n,d.push({name:t,value:n}))};for(E=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),S=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,s=I.getShortEndedElements(),N=V.self_closing_elements||I.getSelfClosingElements(),m=I.getBoolAttrs(),g=V.validate,u=V.remove_internals,A=V.fix_self_closing,k=I.getSpecialElements(),z=e+">";t=E.exec(z);){if(M<t.index&&j(B(e.substr(M,t.index-M))),n=t[6])":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),_(n);else if(n=t[7]){if(t.index+t[0].length>e.length){j(B(e.substr(t.index))),M=t.index+t[0].length;continue}":"===(n=n.toLowerCase()).charAt(0)&&(n=n.substr(1)),l=n in s,A&&N[n]&&0<R.length&&R[R.length-1].name===n&&_(n);var P=ec(S,t[8]);if(null!==P){if("all"===P){M=Zl(I,e,E.lastIndex),E.lastIndex=M;continue}f=!1}if(!g||(c=I.getElementRule(n))){if(f=!0,g&&(y=c.attributes,b=c.attributePatterns),(v=t[8])?((h=-1!==v.indexOf("data-mce-type"))&&u&&(f=!1),(d=[]).map={},v.replace(S,L)):(d=[]).map={},g&&!h){if(C=c.attributesRequired,w=c.attributesDefault,x=c.attributesForced,c.removeEmptyAttrs&&!d.length&&(f=!1),x)for(o=x.length;o--;)a=(p=x[o]).name,"{$uid}"===(T=p.value)&&(T="mce_"+D++),d.map[a]=T,d.push({name:a,value:T});if(w)for(o=w.length;o--;)(a=(p=w[o]).name)in d.map||("{$uid}"===(T=p.value)&&(T="mce_"+D++),d.map[a]=T,d.push({name:a,value:T}));if(C){for(o=C.length;o--&&!(C[o]in d.map););-1===o&&(f=!1)}if(p=d.map["data-mce-bogus"]){if("all"===p){M=Zl(I,e,E.lastIndex),E.lastIndex=M;continue}f=!1}}f&&q(n,d,l)}else f=!1;if(r=k[n]){r.lastIndex=M=t.index+t[0].length,M=(t=r.exec(e))?(f&&(i=e.substr(M,t.index-M)),t.index+t[0].length):(i=e.substr(M),e.length),f&&(0<i.length&&j(i,!0),$(n)),E.lastIndex=M;continue}l||(v&&v.indexOf("/")===v.length-1?f&&$(n):R.push({name:n,valid:f}))}else(n=t[1])?(">"===n.charAt(0)&&(n=" "+n),V.allow_conditional_comments||"[if"!==n.substr(0,3).toLowerCase()||(n=" "+n),F(n)):(n=t[2])?U(n.replace(/<!--|-->/g,"")):(n=t[3])?K(n):(n=t[4])&&W(n,t[5]);M=t.index+t[0].length}for(M<e.length&&j(B(e.substr(M))),o=R.length-1;0<=o;o--)(n=R[o]).valid&&$(n.name)}}}(tc||(tc={})).findEndTag=Zl;var nc,rc=tc,oc=function(e,t){var n,r,o,i,a,u,s,l,c=t,f=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,d=e.schema;for(u=e.getTempAttrs(),s=c,l=new RegExp(["\\s?("+u.join("|")+')="[^"]+"'].join("|"),"gi"),c=s.replace(l,""),a=d.getShortEndedElements();i=f.exec(c);)r=f.lastIndex,o=i[0].length,n=a[i[1]]?r:rc.findEndTag(d,c,r),c=c.substring(0,r-o)+c.substring(n),f.lastIndex=r-o;return Ma(c)},ic={trimExternal:oc,trimInternal:oc},ac=function(e,t,n){var r=e.getParam(t,n);if(-1===r.indexOf("="))return r;var o=e.getParam(t,"","hash");return o.hasOwnProperty(e.id)?o[e.id]:n},uc=function(e){return e.getParam("iframe_attrs",{})},sc=function(e){return e.getParam("doctype","<!DOCTYPE html>")},lc=function(e){return e.getParam("document_base_url","")},cc=function(e){return ac(e,"body_id","tinymce")},fc=function(e){return ac(e,"body_class","")},dc=function(e){return e.getParam("content_security_policy","")},hc=function(e){return e.getParam("br_in_pre",!0)},mc=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},gc=function(e){return e.getParam("forced_root_block_attrs",{})},pc=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},vc=function(e){return e.getParam("no_newline_selector","")},yc=function(e){return e.getParam("keep_styles",!0)},bc=function(e){return e.getParam("end_container_on_empty_block",!1)},Cc=function(e){return en.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},wc=function(e){return en.explode(e.getParam("font_size_classes",""))},xc=function(e){return e.getParam("icons","","string")},zc=function(e){return e.getParam("icons_url","","string")},Nc=function(e){return e.getParam("images_dataimg_filter",$(!0),"function")},Ec=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Sc=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},kc=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Tc=function(e){return e.getParam("images_upload_url","","string")},Ac=function(e){return e.getParam("images_upload_base_path","","string")},Mc=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Rc=function(e){return e.getParam("images_upload_handler",null,"function")},Dc=function(e){return e.getParam("content_css_cors",!1,"boolean")},Bc=function(e){return e.getParam("language","en","string")},Oc=function(e){return e.getParam("language_url","","string")},Hc=function(e){return e.getParam("indent_use_margin",!1)},_c=function(e){return e.getParam("indentation","40px","string")},Lc=function(e){var t=e.settings.content_css;return K(t)?X(t.split(","),er):p(t)?t:!1===t||e.inline?[]:["default"]},Pc=function(e){return e.getParam("directionality",Ii.isRtl()?"rtl":undefined)},Vc=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Ic=function(e,t,n){var r,o,i,a,u;if(t.format=t.format?t.format:"html",t.get=!0,t.getInner=!0,t.no_events||e.fire("BeforeGetContent",t),"raw"===t.format)r=en.trim(ic.trimExternal(e.serializer,n.innerHTML));else if("text"===t.format)r=Ma(n.innerText||n.textContent);else{if("tree"===t.format)return e.serializer.serialize(n,t);i=(o=e).serializer.serialize(n,t),a=mc(o),u=new RegExp("^(<"+a+"[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/"+a+">[\r\n]*|<br \\/>[\r\n]*)$"),r=i.replace(u,"")}return"text"===t.format||Ko(cr.fromDom(n))?t.content=r:t.content=en.trim(r),t.no_events||e.fire("GetContent",t),t.content},Fc=en.makeMap,Uc=function(e){var u,s,l,c,f,d=[];return u=(e=e||{}).indent,s=Fc(e.indent_before||""),l=Fc(e.indent_after||""),c=ui.getEncodeFunc(e.entity_encoding||"raw",e.entities),f="html"===e.element_format,{start:function(e,t,n){var r,o,i,a;if(u&&s[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n"),d.push("<",e),t)for(r=0,o=t.length;r<o;r++)i=t[r],d.push(" ",i.name,'="',c(i.value,!0),'"');d[d.length]=!n||f?">":" />",n&&u&&l[e]&&0<d.length&&0<(a=d[d.length-1]).length&&"\n"!==a&&d.push("\n")},end:function(e){var t;d.push("</",e,">"),u&&l[e]&&0<d.length&&0<(t=d[d.length-1]).length&&"\n"!==t&&d.push("\n")},text:function(e,t){0<e.length&&(d[d.length]=t?e:c(e))},cdata:function(e){d.push("<![CDATA[",e,"]]>")},comment:function(e){d.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?d.push("<?",e," ",c(t),"?>"):d.push("<?",e,"?>"),u&&d.push("\n")},doctype:function(e){d.push("<!DOCTYPE",e,">",u?"\n":"")},reset:function(){d.length=0},getContent:function(){return d.join("").replace(/\n$/,"")}}},jc=function(t,m){void 0===m&&(m=yi());var g=Uc(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(e){var f,d;d=t.validate,f={3:function(e){g.text(e.value,e.raw)},8:function(e){g.comment(e.value)},7:function(e){g.pi(e.name,e.value)},10:function(e){g.doctype(e.value)},4:function(e){g.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;h(e),e=e.next;);}},g.reset();var h=function(e){var t,n,r,o,i,a,u,s,l,c=f[e.type];if(c)c(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,d&&r&&1<r.length&&((a=[]).map={},l=m.getElementRule(e.name))){for(u=0,s=l.attributesOrder.length;u<s;u++)(o=l.attributesOrder[u])in r.map&&(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));for(u=0,s=r.length;u<s;u++)(o=r[u].name)in a.map||(i=r.map[o],a.map[o]=i,a.push({name:o,value:i}));r=a}if(g.start(e.name,r,n),!n){if(e=e.firstChild)for(;h(e),e=e.next;);g.end(t)}}};return 1!==e.type||t.inner?f[11](e):h(e),g.getContent()}}},qc=function(e,t){t(e),e.firstChild&&qc(e.firstChild,t),e.next&&qc(e.next,t)},$c=function(e,t,n){var r=function(e,n,t){var r={},o={},i=[];for(var a in t.firstChild&&qc(t.firstChild,function(t){A(e,function(e){e.name===t.name&&(r[e.name]?r[e.name].nodes.push(t):r[e.name]={filter:e,nodes:[t]})}),A(n,function(e){"string"==typeof t.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(t):o[e.name]={filter:e,nodes:[t]})})}),r)r.hasOwnProperty(a)&&i.push(r[a]);for(var a in o)o.hasOwnProperty(a)&&i.push(o[a]);return i}(e,t,n);A(r,function(t){A(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})},Wc=function(e){var t=Xr(e).dom();return e.dom()===t.activeElement},Kc=function(e){var t=e!==undefined?e.dom():j.document;return T.from(t.activeElement).map(cr.fromDom)},Xc=function(a){if(!p(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return A(a,function(e,r){var t=br(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(n[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!p(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=br(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!_(u,function(e){return N(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){j.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},Yc={create:Lr("start","soffset","finish","foffset")},Gc=Xc([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Jc=(Gc.before,Gc.on,Gc.after,function(e){return e.fold(W,W,W)}),Qc=Xc([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Zc={domRange:Qc.domRange,relative:Qc.relative,exact:Qc.exact,exactFromRange:function(e){return Qc.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t=e.match({domRange:function(e){return cr.fromDom(e.startContainer)},relative:function(e,t){return Jc(e)},exact:function(e,t,n,r){return e}});return Yr(t)},range:Yc.create},ef=sr.detect().browser,tf=function(e,t){var n=vr(t)?jl(t).length:to(t).length+1;return n<e?n:e<0?0:e},nf=function(e){return Zc.range(e.start(),tf(e.soffset(),e.start()),e.finish(),tf(e.foffset(),e.finish()))},rf=function(e,t){return!Oo.isRestrictedNode(t.dom())&&(Kr(e,t)||Wr(e,t))},of=function(t){return function(e){return rf(t,e.start())&&rf(t,e.finish())}},af=function(e){return!0===e.inline||ef.isIE()},uf=function(e){return Zc.range(cr.fromDom(e.startContainer),e.startOffset,cr.fromDom(e.endContainer),e.endOffset)},sf=function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?T.from(t.getRangeAt(0)):T.none()).map(uf)},lf=function(e){var t=Yr(e);return sf(t.dom()).filter(of(e))},cf=function(e,t){return T.from(t).filter(of(e)).map(nf)},ff=function(e){var t=j.document.createRange();try{return t.setStart(e.start().dom(),e.soffset()),t.setEnd(e.finish().dom(),e.foffset()),T.some(t)}catch(n){return T.none()}},df=function(e){return(e.bookmark?e.bookmark:T.none()).bind(d(cf,cr.fromDom(e.getBody()))).bind(ff)},hf=function(e){var t=af(e)?lf(cr.fromDom(e.getBody())):T.none();e.bookmark=t.isSome()?t:e.bookmark},mf=function(t){df(t).each(function(e){t.selection.setRng(e)})},gf=df,pf={isEditorUIElement:function(e){return-1!==e.className.toString().indexOf("tox-")||-1!==e.className.toString().indexOf("mce-")}},vf=function(n,e){var t,r;sr.detect().browser.isIE()?(r=n).on("focusout",function(){hf(r)}):(t=e,n.on("mouseup touchend",function(e){t.throttle()})),n.on("keyup NodeChange",function(e){var t;"nodechange"===(t=e).type&&t.selectionChange||hf(n)})},yf=function(e){var t,n,r,o=Qi(function(){hf(e)},0);e.inline&&(t=e,n=o,r=function(){n.throttle()},Di.DOM.bind(j.document,"mouseup",r),t.on("remove",function(){Di.DOM.unbind(j.document,"mouseup",r)})),e.on("init",function(){vf(e,o)}),e.on("remove",function(){o.cancel()})},bf=Di.DOM,Cf=function(e){return pf.isEditorUIElement(e)},wf=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==bf.getParent(e,function(e){return Cf(e)||!!n&&t.dom.is(e,n)})},xf=function(r,e){var t=e.editor;yf(t),t.on("focusin",function(){var e=r.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),r.setActive(this),(r.focusedEditor=this).fire("focus",{blurredEditor:e}),this.focus(!0))}),t.on("focusout",function(){var t=this;Ie.setEditorTimeout(t,function(){var e=r.focusedEditor;wf(t,function(){try{return j.document.activeElement}catch(e){return j.document.body}}())||e!==t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null)})}),nc||(nc=function(e){var t,n=r.activeEditor;t=e.target,n&&t.ownerDocument===j.document&&(t===j.document.body||wf(n,t)||r.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),r.focusedEditor=null))},bf.bind(j.document,"focusin",nc))},zf=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(bf.unbind(j.document,"focusin",nc),nc=null)},Nf=function(e){e.on("AddEditor",d(xf,e)),e.on("RemoveEditor",d(zf,e))},Ef=wf,Sf=function(t,e){return(n=e,n.collapsed?T.from(su(n.startContainer,n.startOffset)).map(cr.fromDom):T.none()).bind(function(e){return $o(e)?T.some(e):!1===Kr(t,e)?T.some(t):T.none()});var n},kf=function(t,e){Sf(cr.fromDom(t.getBody()),e).bind(function(e){return hl.firstPositionIn(e.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},Tf=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},Af=function(e){return Wc(e)||(t=e,Kc(Xr(t)).filter(function(e){return t.dom().contains(e.dom())})).isSome();var t},Mf=function(e){return e.inline?(n=e.getBody())&&Af(cr.fromDom(n)):(t=e).iframeElement&&Wc(cr.fromDom(t.iframeElement));var t,n},Rf=function(e){return e.editorManager.setActive(e)},Df=function(e,t){e.removed||(t?Rf(e):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable();var o,i,a=(o=t,i=e.getNode(),o.dom.getParent(i,function(e){return"true"===o.dom.getContentEditable(e)}));if(t.$.contains(n,a))return Tf(a),kf(t,r),Rf(t);t.bookmark!==undefined&&!1===Mf(t)&&gf(t).each(function(e){t.selection.setRng(e),r=e}),t.inline||(He.opera||Tf(n),t.getWin().focus()),(He.gecko||t.inline)&&(Tf(n),kf(t,r)),Rf(t)}(e))},Bf=Mf,Of=function(e){return Mf(e)||(t=e,Af(cr.fromDom(t.getContainer()))||Kc().filter(function(e){return Ef(t,e.dom())}).isSome());var t},Hf=function(e){return e instanceof Ql},_f=function(e,t){var r;e.dom.setHTML(e.getBody(),t),Bf(r=e)&&hl.firstPositionIn(r.getBody()).each(function(e){var t=e.getNode(),n=Oo.isTable(t)?hl.firstPositionIn(t).getOr(e):e;r.selection.setRng(n.toRange())})},Lf=function(u,s,l){return void 0===l&&(l={}),l.format=l.format?l.format:"html",l.set=!0,l.content=Hf(s)?"":s,Hf(s)||l.no_events||(u.fire("BeforeSetContent",l),s=l.content),T.from(u.getBody()).fold($(s),function(e){return Hf(s)?function(e,t,n,r){$c(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=jc({validate:e.validate},e.schema).serialize(n);return r.content=Ko(cr.fromDom(t))?o:en.trim(o),_f(e,r.content),r.no_events||e.fire("SetContent",r),n}(u,e,s,l):(t=u,n=e,o=l,0===(r=s).length||/^\s+$/.test(r)?(a='<br data-mce-bogus="1">',"TABLE"===n.nodeName?r="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(n.nodeName)&&(r="<li>"+a+"</li>"),(i=mc(t))&&t.schema.isValidChild(n.nodeName.toLowerCase(),i.toLowerCase())?(r=a,r=t.dom.createHTML(i,t.settings.forced_root_block_attrs,r)):r||(r='<br data-mce-bogus="1">'),_f(t,r),t.fire("SetContent",o)):("raw"!==o.format&&(r=jc({validate:t.validate},t.schema).serialize(t.parser.parse(r,{isRootContent:!0,insert:!0}))),o.content=Ko(cr.fromDom(n))?r:en.trim(r),_f(t,o.content),o.no_events||t.fire("SetContent",o)),o.content);var t,n,r,o,i,a})},Pf=function(e,t){return e.fire("PreProcess",t)},Vf=function(e,t){return e.fire("PostProcess",t)},If=function(e){return e.fire("remove")},Ff=function(e){return e.fire("detach")},Uf=function(e,t){return e.fire("SwitchMode",{mode:t})},jf=function(e,t,n,r){e.fire("ObjectResizeStart",{target:t,width:n,height:r})},qf=function(e,t,n,r){e.fire("ObjectResized",{target:t,width:n,height:r})},$f=Di.DOM,Wf=function(e){return T.from(e).each(function(e){return e.destroy()})},Kf=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&$f.remove(o.nextSibling),If(e),e.editorManager.remove(e),!e.inline&&r&&(i=e,$f.setStyle(i.id,"display",i.orgDisplay)),Ff(e),$f.remove(e.getContainer()),Wf(t),Wf(n),e.destroy()}var i},Xf=function(e,t){var n,r,o,i=e.selection,a=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Wf(i),Wf(a)),(r=(n=e).formElement)&&(r._mceOldSubmit&&(r.submit=r._mceOldSubmit,r._mceOldSubmit=null),$f.unbind(r,"submit reset",n.formEventDelegate)),(o=e).contentAreaContainer=o.formElement=o.container=o.editorContainer=null,o.bodyElement=o.contentDocument=o.contentWindow=null,o.iframeElement=o.targetElm=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),e.destroyed=!0):e.remove())},Yf=Lr("sections","settings"),Gf=sr.detect(),Jf=Gf.deviceType.isTouch(),Qf=Gf.deviceType.isPhone(),Zf=["lists","autolink","autosave"],ed=Qf?{theme:"mobile"}:{},td=function(e){var t=p(e)?e.join(" "):e,n=X(K(t)?t.split(" "):[],er);return S(n,function(e){return 0<e.length})},nd=function(e,t,n,r){var o,i,a=td(n.forced_plugins),u=td(r.plugins),s=e&&(o="mobile",t.sections().hasOwnProperty(o))?S(u,d(N,Zf)):u,l=(i=s,[].concat(td(a)).concat(td(i)));return en.extend(r,{plugins:l.join(" ")})},rd=function(e,t,n,r){var o,i,a,u,s,l,c,f,d,h,m,g=(o=["mobile"],i=Nr(r,function(e,t){return N(o,t)}),Yf(i.t,i.f)),p=en.extend(t,n,g.settings(),(h=e,m=g.settings().inline,h&&!m?(l="mobile",c=ed,f=g.sections(),d=f.hasOwnProperty(l)?f[l]:{},en.extend({},c,d)):{}),{validate:!0,external_plugins:(a=n,u=g.settings(),s=u.external_plugins?u.external_plugins:{},a&&a.external_plugins?en.extend({},a.external_plugins,s):s)});return nd(e,g,n,p)},od=function(e,t,n){return T.from(t.settings[n]).filter(e)},id=function(e,t,n,r){var o,i,a,u=t in e.settings?e.settings[t]:n;return"hash"===r?(a={},"string"==typeof(i=u)?A(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){var t=e.split("=");1<t.length?a[en.trim(t[0])]=en.trim(t[1]):a[en.trim(t[0])]=en.trim(t[0])}):a=i,a):"string"===r?od(K,e,t).getOr(n):"number"===r?od(C,e,t).getOr(n):"boolean"===r?od(y,e,t).getOr(n):"object"===r?od(x,e,t).getOr(n):"array"===r?od(p,e,t).getOr(n):"string[]"===r?od((o=K,function(e){return p(e)&&_(e,o)}),e,t).getOr(n):"function"===r?od(b,e,t).getOr(n):u},ad=function(e,t){return t.dom()[e]},ud=function(e,t){return parseInt(Or(t,e),10)},sd=d(ad,"clientWidth"),ld=d(ad,"clientHeight"),cd=d(ud,"margin-top"),fd=d(ud,"margin-left"),dd=function(e,t,n){var r,o,i,a,u,s,l,c,f,d,h,m=cr.fromDom(e.getBody()),g=e.inline?m:(r=m,cr.fromDom(r.dom().ownerDocument.documentElement)),p=(o=e.inline,a=t,u=n,s=(i=g).dom().getBoundingClientRect(),{x:a-(o?s.left+i.dom().clientLeft+fd(i):0),y:u-(o?s.top+i.dom().clientTop+cd(i):0)});return c=p.x,f=p.y,d=sd(l=g),h=ld(l),0<=c&&0<=f&&c<=d&&f<=h},hd=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,T.from(t).map(cr.fromDom)).map(function(e){return Kr(Xr(e),e)}).getOr(!1)};function md(n){var t,o=[],i=function(){var e=n.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():function t(){var e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,reposition:e,getArgs:e}}()},a=function(){0<o.length&&i().reposition(o)},u=function(t){D(o,function(e){return e===t}).each(function(e){o.splice(e,1)})},r=function(r){if(!n.removed&&hd(n))return R(o,function(e){return t=i().getArgs(e),n=r,!(t.type!==n.type||t.text!==n.text||t.progressBar||t.timeout||n.progressBar||n.timeout);var t,n}).getOrThunk(function(){n.editorManager.setActive(n);var e,t=i().open(r,function(){u(t),a()});return e=t,o.push(e),a(),t})};return(t=n).on("SkinLoaded",function(){var e=t.settings.service_message;e&&r({text:e,type:"warn",timeout:0})}),t.on("ResizeEditor ResizeWindow NodeChange",function(){Ie.requestAnimationFrame(a)}),t.on("remove",function(){A(o.slice(),function(e){i().close(e)})}),{open:r,close:function(){T.from(o[0]).each(function(e){i().close(e),u(e),a()})},getNotifications:function(){return o}}}var gd,pd=function(n){var r=[],o=function(){var e=n.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():function t(){var e=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}()},i=function(e,t){return function(){return t?t.apply(e,arguments):undefined}},a=function(e){var t;r.push(e),t=e,n.fire("OpenWindow",{dialog:t})},u=function(t){var e;e=t,n.fire("CloseWindow",{dialog:e}),0===(r=S(r,function(e){return e!==t})).length&&n.focus()},s=function(e){n.editorManager.setActive(n),hf(n);var t=e();return a(t),t};return n.on("remove",function(){A(r,function(e){o().close(e)})}),{open:function(e,t){return s(function(){return o().open(e,t,u)})},openUrl:function(e){return s(function(){return o().openUrl(e,u)})},alert:function(e,t,n){o().alert(e,i(n||this,t))},confirm:function(e,t,n){o().confirm(e,i(n||this,t))},close:function(){T.from(r[r.length-1]).each(function(e){o().close(e),u(e)})}}},vd=function(e,t){e.notificationManager.open({type:"error",text:t})},yd=function(e,t){e._skinLoaded?vd(e,t):e.on("SkinLoaded",function(){vd(e,t)})},bd=function(e){j.console.error(e)},Cd=function(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t},wd=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=j.window.console;r&&(r.error?r.error.apply(r,arguments):r.log.apply(r,arguments))},xd={pluginLoadError:function(e,t){bd(Cd("plugin",e,t))},iconsLoadError:function(e,t){bd(Cd("icons",e,t))},languageLoadError:function(e,t){bd(Cd("language",e,t))},pluginInitError:function(e,t,n){var r=Ii.translate(["Failed to initialize plugin: {0}",t]);wd(r,n),yd(e,r)},uploadError:function(e,t){yd(e,Ii.translate(["Failed to upload image: {0}",t]))},displayError:yd,initError:wd},zd=(gd={},{add:function(e,t){gd[e]=t},get:function(e){return gd[e]?gd[e]:{icons:{}}},has:function(e){return Sr(gd,e)}}),Nd=ji.PluginManager,Ed=ji.ThemeManager;function Sd(){return new(le.getOrDie("XMLHttpRequest"))}function kd(u,s){var r={},n=function(e,r,o,t){var i,n;(i=Sd()).open("POST",s.url),i.withCredentials=s.credentials,i.upload.onprogress=function(e){t(e.loaded/e.total*100)},i.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e,t,n;i.status<200||300<=i.status?o("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?r((t=s.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):o("Invalid JSON: "+i.responseText)},(n=new j.FormData).append("file",e.blob(),e.filename()),i.send(n)},l=function(e,t){return{url:t,blobInfo:e,status:!0}},c=function(e,t){return{url:"",blobInfo:e,status:!1,error:t}},f=function(e,t){en.each(r[e],function(e){e(t)}),delete r[e]},o=function(e,n){return e=en.grep(e,function(e){return!u.isUploaded(e.blobUri())}),_e.all(en.map(e,function(e){return u.isPending(e.blobUri())?(t=e.blobUri(),new _e(function(e){r[t]=r[t]||[],r[t].push(e)})):(o=e,i=s.handler,a=n,u.markPending(o.blobUri()),new _e(function(t){var n;try{var r=function(){n&&n.close()};i(o,function(e){r(),u.markUploaded(o.blobUri(),e),f(o.blobUri(),l(o,e)),t(l(o,e))},function(e){r(),u.removeFailed(o.blobUri()),f(o.blobUri(),c(o,e)),t(c(o,e))},function(e){e<0||100<e||(n||(n=a()),n.progressBar.value(e))})}catch(e){t(c(o,e.message))}}));var o,i,a,t}))};return!1===b(s.handler)&&(s.handler=n),{upload:function(e,t){return s.url||s.handler!==n?o(e,t):new _e(function(e){e([])})}}}var Td=function(e){return le.getOrDie("atob")(e)},Ad=function(e){var t,n,r=decodeURIComponent(e).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(t=n[1]),{type:t,data:r[1]}},Md=function(a){return new _e(function(e){var t,n,r,o=Ad(a);try{t=Td(o.data)}catch(eE){return void e(new j.Blob([]))}for(n=function i(e){return new(le.getOrDie("Uint8Array"))(e)}(t.length),r=0;r<n.length;r++)n[r]=t.charCodeAt(r);e(new j.Blob([n],{type:o.type}))})},Rd=function(e){return 0===e.indexOf("blob:")?(i=e,new _e(function(e,t){var n=function(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")};try{var r=Sd();r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200===this.status?e(this.response):n()},r.onerror=n,r.send()}catch(o){n()}})):0===e.indexOf("data:")?Md(e):null;var i},Dd=function(r){return new _e(function(e){var t=function n(){return new(le.getOrDie("FileReader"))}();t.onloadend=function(){e(t.result)},t.readAsDataURL(r)})},Bd=Ad,Od=0,Hd=function(e){return(e||"blobid")+Od++};function _d(i,l){var a={};return{findAll:function(e,n){var t,r;n||(n=$(!0)),t=S((r=e)?I(r.getElementsByTagName("img")):[],function(e){var t=e.src;return!!He.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!t||t===He.transparentSrc)&&(0===t.indexOf("blob:")?!i.isUploaded(t)&&n(e):0===t.indexOf("data:")&&n(e))});var o=X(t,function(s){if(a[s.src])return new _e(function(t){a[s.src].then(function(e){if("string"==typeof e)return e;t({image:s,blobInfo:e.blobInfo})})});var e=new _e(function(e,t){var n,r,o,i,a,u;n=l,o=e,i=t,0!==(r=s).src.indexOf("blob:")?(a=Bd(r.src).data,(u=n.findFirst(function(e){return e.base64()===a}))?o({image:r,blobInfo:u}):Rd(r.src).then(function(e){u=n.create(Hd(),e,a),n.add(u),o({image:r,blobInfo:u})},function(e){i(e)})):(u=n.getByUri(r.src))?o({image:r,blobInfo:u}):Rd(r.src).then(function(t){Dd(t).then(function(e){a=Bd(e).data,u=n.create(Hd(),t,a),n.add(u),o({image:r,blobInfo:u})})},function(e){i(e)})}).then(function(e){return delete a[e.image.src],e})["catch"](function(e){return delete a[s.src],e});return a[s.src]=e});return _e.all(o)}}}var Ld=0,Pd=function(e){return e+Ld+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t};var Vd,Id,Fd=function(o){var n,i,t,e,a,r,u=(n=[],i=function(e){var t,n,r;if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return t=e.id||Pd("blobid"),n=e.name||t,{id:$(t),name:$(n),filename:$(n+"."+(r=e.blob.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[r.toLowerCase()]||"dat")),blob:$(e.blob),base64:$(e.base64),blobUri:$(e.blobUri||fe(e.blob)),uri:$(e.uri)}},{create:function(e,t,n,r){if(K(e))return i({id:e,name:r,blob:t,base64:n});if(x(e))return i(e);throw new Error("Unknown input type")},add:function(e){t(e.id())||n.push(e)},get:t=function(t){return e(function(e){return e.id()===t})},getByUri:function(t){return e(function(e){return e.blobUri()===t})},findFirst:e=function(e){return S(n,e)[0]},removeByUri:function(t){n=S(n,function(e){return e.blobUri()!==t||(de(e.blobUri()),!1)})},destroy:function(){A(n,function(e){de(e.blobUri())}),n=[]}}),s=function w(){var n={},r=function(e,t){return{status:e,resultUri:t}},t=function(e){return e in n};return{hasBlobUri:t,getResultUri:function(e){var t=n[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===n[e].status},isUploaded:function(e){return!!t(e)&&2===n[e].status},markPending:function(e){n[e]=r(1,null)},markUploaded:function(e,t){n[e]=r(2,t)},removeFailed:function(e){delete n[e]},destroy:function(){n={}}}}(),l=[],c=function(t){return function(e){return o.selection?t(e):[]}},f=function(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e},d=function(e,t,n){return e=f(e,'src="'+t+'"','src="'+n+'"'),e=f(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},h=function(t,n){A(o.undoManager.data,function(e){"fragmented"===e.type?e.fragments=X(e.fragments,function(e){return d(e,t,n)}):e.content=d(e.content,t,n)})},m=function(){return o.notificationManager.open({text:o.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},g=function(e,t){u.removeByUri(e.src),h(e.src,t),o.$(e).attr({src:Sc(o)?t+"?"+(new Date).getTime():t,"data-mce-src":o.convertURL(t,"src")})},p=function(n){return a||(a=kd(s,{url:Tc(o),basePath:Ac(o),credentials:Mc(o),handler:Rc(o)})),b().then(c(function(r){var e;return e=X(r,function(e){return e.blobInfo}),a.upload(e,m).then(c(function(e){var t=X(e,function(e,t){var n=r[t].image;return e.status&&kc(o)?g(n,e.url):e.error&&xd.uploadError(o,e.error),{element:n,status:e.status}});return n&&n(t),t}))}))},v=function(e){if(Ec(o))return p(e)},y=function(t){return!1!==_(l,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||Nc(o)(t))},b=function(){return r||(r=_d(s,u)),r.findAll(o.getBody(),y).then(c(function(e){return e=S(e,function(e){return"string"!=typeof e||(xd.displayError(o,e),!1)}),A(e,function(e){h(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))},C=function(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=s.getResultUri(n);if(t)return'src="'+t+'"';var r=u.getByUri(n);return r||(r=M(o.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),r?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})};return o.on("SetContent",function(){Ec(o)?v():b()}),o.on("RawSaveContent",function(e){e.content=C(e.content)}),o.on("GetContent",function(e){e.source_view||"raw"===e.format||(e.content=C(e.content))}),o.on("PostRender",function(){o.parser.addNodeFilter("img",function(e){A(e,function(e){var t=e.attr("src");if(!u.getByUri(t)){var n=s.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:u,addFilter:function(e){l.push(e)},uploadImages:p,uploadImagesAuto:v,scanForImages:b,destroy:function(){u.destroy(),s.destroy(),r=a=null}}},Ud=function(e,t,n){return Kr(t,e)?function(e,t){for(var n=b(t)?t:$(!1),r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,a=cr.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||Wr(e,t)}).slice(0,-1):[]},jd=function(e,t){return Ud(e,t,$(!1))},qd=jd,$d=function(e,t){return[e].concat(jd(e,t))},Wd=function(e,t){return e.hasOwnProperty(t.nodeName)},Kd=function(e,t){if(Oo.isText(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||Wd(e,t.nextSibling)))return!0}return!1},Xd=function(e){var t,n,r,o,i,a,u,s,l,c,f=e.dom,d=e.selection,h=e.schema,m=h.getBlockElements(),g=d.getStart(),p=e.getBody(),v=mc(e);if(g&&Oo.isElement(g)&&v&&(c=p.nodeName.toLowerCase(),h.isValidChild(c,v.toLowerCase())&&(y=m,b=p,C=g,!E(qd(cr.fromDom(C),cr.fromDom(b)),function(e){return Wd(y,e.dom())})))){var y,b,C,w,x;for(n=(t=d.getRng()).startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,l=Bf(e),g=p.firstChild;g;)if(w=m,x=g,Oo.isText(x)||Oo.isElement(x)&&!Wd(w,x)&&!zl(x)){if(Kd(m,g)){g=(u=g).nextSibling,f.remove(u);continue}a||(a=f.create(v,gc(e)),g.parentNode.insertBefore(a,g),s=!0),g=(u=g).nextSibling,a.appendChild(u)}else a=null,g=g.nextSibling;s&&l&&(t.setStart(n,r),t.setEnd(o,i),d.setRng(t),e.nodeChanged())}},Yd=function(e){mc(e)&&e.on("NodeChange",d(Xd,e))},Gd=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},Jd=function(t){return ro(t).fold($([t]),function(e){return[t].concat(Jd(e))})},Qd=function(t){return oo(t).fold($([t]),function(e){return"br"===mr(e)?Jr(e).map(function(e){return[t].concat(Qd(e))}).getOr([]):[t].concat(Qd(e))})},Zd=function(o,e){return fu([(i=e,a=i.startContainer,u=i.startOffset,Oo.isText(a)?0===u?T.some(cr.fromDom(a)):T.none():T.from(a.childNodes[u]).map(cr.fromDom)),(t=e,n=t.endContainer,r=t.endOffset,Oo.isText(n)?r===n.data.length?T.some(cr.fromDom(n)):T.none():T.from(n.childNodes[r-1]).map(cr.fromDom))],function(e,t){var n=R(Jd(o),d(Wr,e)),r=R(Qd(o),d(Wr,t));return n.isSome()&&r.isSome()}).getOr(!1);var t,n,r,i,a,u},eh=function(e,t,n,r){var o=n,i=new Ho(n,o),a=e.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==en.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(He.ie&&He.ie<11&&e.isBlock(n)&&e.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},th=function(e){var t=e.selection.getSel();return t&&0<t.rangeCount},nh=function(){function e(r){var o;this.lastPath=[],this.editor=r;var t=this;"onselectionchange"in r.getDoc()||r.on("NodeChange click mouseup keyup focus",function(e){var t,n;n={startContainer:(t=r.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!==e.type&&Gd(n,o)||r.fire("SelectionChange"),o=n}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!e||!He.range&&r.selection.isCollapsed()||th(r)&&!t.isSameElementPath(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("mouseup",function(e){!e.isDefaultPrevented()&&th(r)&&("IMG"===r.selection.getNode().nodeName?Ie.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())})}return e.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},e.prototype.isSameElementPath=function(e){var t,n;if((n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e)).length===this.lastPath.length){for(t=n.length;0<=t&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},e}(),rh=function(e){var t,n,r,o;return o=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},oh=function(e,t){return n=(u=e).inline?rh(u.getBody()):{left:0,top:0},a=(i=e).getBody(),r=i.inline?{left:a.scrollLeft,top:a.scrollTop}:{left:0,top:0},{pageX:(o=function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n,r,o,i,a,u=rh(e.getContentAreaContainer()),s=(r=(n=e).getBody(),o=n.getDoc().documentElement,i={left:r.scrollLeft,top:r.scrollTop},a={left:r.scrollLeft||o.scrollLeft,top:r.scrollTop||o.scrollTop},n.inline?i:a);return{left:t.pageX-u.left+s.left,top:t.pageY-u.top+s.top}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o,i,a,u},ih=Oo.isContentEditableFalse,ah=Oo.isContentEditableTrue,uh=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},sh=function(u,s){return function(e){if(0===e.button){var t=R(s.dom.getParents(e.target),mu(ih,ah)).getOr(null);if(i=s.getBody(),ih(a=t)&&a!==i){var n=s.dom.getPos(t),r=s.getBody(),o=s.getDoc().documentElement;u.element=t,u.screenX=e.screenX,u.screenY=e.screenY,u.maxX=(s.inline?r.scrollWidth:o.offsetWidth)-2,u.maxY=(s.inline?r.scrollHeight:o.offsetHeight)-2,u.relX=e.pageX-n.x,u.relY=e.pageY-n.y,u.width=t.offsetWidth,u.height=t.offsetHeight,u.ghost=function(e,t,n,r){var o=t.cloneNode(!0);e.dom.setStyles(o,{width:n,height:r}),e.dom.setAttrib(o,"data-mce-selected",null);var i=e.dom.create("div",{"class":"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(s,t,u.width,u.height)}}var i,a}},lh=function(c,f){return function(e){if(c.dragging&&(s=(i=f).selection,l=s.getSel().getRangeAt(0).startContainer,a=3===l.nodeType?l.parentNode:l,u=c.element,a!==u&&!i.dom.isChildOf(a,u)&&!ih(a))){var t=(r=c.element,(o=r.cloneNode(!0)).removeAttribute("data-mce-selected"),o),n=f.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,f.undoManager.transact(function(){uh(c.element),f.insertContent(f.dom.getOuterHTML(t)),f._selectionOverrides.hideFakeCaret()}))}var r,o,i,a,u,s,l;ch(c)}},ch=function(e){e.dragging=!1,e.element=null,uh(e.ghost)},fh=function(e){var t,n,r,o,i,a,g,p,v,u,s,l={};t=Di.DOM,a=j.document,n=sh(l,e),g=l,p=e,v=Ie.throttle(function(e,t){p._selectionOverrides.hideFakeCaret(),p.selection.placeCaretAt(e,t)},0),r=function(e){var t,n,r,o,i,a,u,s,l,c,f,d,h=Math.max(Math.abs(e.screenX-g.screenX),Math.abs(e.screenY-g.screenY));if(g.element&&!g.dragging&&10<h){if(p.fire("dragstart",{target:g.element}).isDefaultPrevented())return;g.dragging=!0,p.focus()}if(g.dragging){var m=(f=g,{pageX:(d=oh(p,e)).pageX-f.relX,pageY:d.pageY+5});l=g.ghost,c=p.getBody(),l.parentNode!==c&&c.appendChild(l),t=g.ghost,n=m,r=g.width,o=g.height,i=g.maxX,a=g.maxY,s=u=0,t.style.left=n.pageX+"px",t.style.top=n.pageY+"px",n.pageX+r>i&&(u=n.pageX+r-i),n.pageY+o>a&&(s=n.pageY+o-a),t.style.width=r-u+"px",t.style.height=o-s+"px",v(e.clientX,e.clientY)}},o=lh(l,e),u=l,i=function(){u.dragging&&s.fire("dragend"),ch(u)},(s=e).on("mousedown",n),e.on("mousemove",r),e.on("mouseup",o),t.bind(a,"mousemove",r),t.bind(a,"mouseup",i),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",i)})},dh=function(e){var n;fh(e),(n=e).on("drop",function(e){var t="undefined"!=typeof e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(ih(t)||ih(n.dom.getContentEditableParent(t)))&&e.preventDefault()})},hh=function(e){return M(e,function(e,t){return e.concat(function(t){var e=function(e){return X(e,function(e){return(e=tu(e)).node=t,e})};if(Oo.isElement(t))return e(t.getClientRects());if(Oo.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(t))},[])};(Id=Vd||(Vd={}))[Id.Up=-1]="Up",Id[Id.Down=1]="Down";var mh,gh,ph,vh=function(o,i,a,e,u,t){var n,s,l=0,c=[],r=function(e){var t,n,r;for(r=hh([e]),-1===o&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,s)){if(0<c.length&&i(n,Yt.last(c))&&l++,n.line=l,u(n))return!0;c.push(n)}};return(s=Yt.last(t.getClientRects()))&&(r(n=t.getNode()),function(e,t,n,r){for(;r=Ds(r,e,Za,t);)if(n(r))return}(o,e,r,n)),c},yh=d(vh,Vd.Up,ou,iu),bh=d(vh,Vd.Down,iu,ou),Ch=function(n){return function(e){return t=n,e.line>t;var t}},wh=function(n){return function(e){return t=n,e.line===t;var t}},xh=Oo.isContentEditableFalse,zh=Ds,Nh=function(e,t){return Math.abs(e.left-t)},Eh=function(e,t){return Math.abs(e.right-t)},Sh=function(e,t){return e>=t.left&&e<=t.right},kh=function(e,o){return Yt.reduce(e,function(e,t){var n,r;return n=Math.min(Nh(e,o),Eh(e,o)),r=Math.min(Nh(t,o),Eh(t,o)),Sh(o,t)?t:Sh(o,e)?e:r===n&&xh(t.node)?t:r<n?t:e})},Th=function(e,t,n,r){for(;r=zh(r,e,Za,t);)if(n(r))return},Ah=function(e,t,n){var r,o,i,a,u,s,l,c=hh(S(I(e.getElementsByTagName("*")),xs)),f=S(c,function(e){return n>=e.top&&n<=e.bottom});return(r=kh(f,t))&&(r=kh((a=e,l=function(t,e){var n;return n=S(hh([e]),function(e){return!t(e,u)}),s=s.concat(n),0===n.length},(s=[]).push(u=r),Th(Vd.Up,a,d(l,ou),u.node),Th(Vd.Down,a,d(l,iu),u.node),s),t))&&xs(r.node)?(i=t,{node:(o=r).node,before:Nh(o,i)<Eh(o,i)}):null},Mh=function(t,n,e){if(e.collapsed)return!1;if(He.ie&&He.ie<=11&&e.startOffset===e.endOffset-1&&e.startContainer===e.endContainer){var r=e.startContainer.childNodes[e.startOffset];if(Oo.isElement(r))return E(r.getClientRects(),function(e){return au(e,t,n)})}return E(e.getClientRects(),function(e){return au(e,t,n)})},Rh=Oo.isContentEditableTrue,Dh=Oo.isContentEditableFalse,Bh=function(e,t,n,r,o){return t._selectionOverrides.showCaret(e,n,r,o)},Oh=function(e,t){var n,r;return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?null:((r=(n=t).ownerDocument.createRange()).selectNode(n),r)},Hh=function(e,t,n){var r=Is(1,e.getBody(),t),o=_u.fromRangeStart(r),i=o.getNode();if(Dh(i))return Bh(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Dh(a))return Bh(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return Dh(e)||Rh(e)});return Dh(u)?Bh(1,e,u,!1,n):null},_h=function(e,t,n){if(!t||!t.collapsed)return t;var r=Hh(e,t,n);return r||t},Lh=function(t){var e=Qi(function(){if(!t.removed&&t.getBody().contains(j.document.activeElement)&&t.selection.getRng().collapsed){var e=_h(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Ph={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return He.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Vh=(mh="\xa0",function(e){return mh===e}),Ih=function(e){return/^[\r\n\t ]$/.test(e)},Fh=function(e){return!Ih(e)&&!Vh(e)},Uh=function(n,r,o){return T.from(o.container()).filter(Oo.isText).exists(function(e){var t=n?0:-1;return r(e.data.charAt(o.offset()+t))})},jh=d(Uh,!0,Ih),qh=d(Uh,!1,Ih),$h=function(e){var t=e.container();return Oo.isText(t)&&0===t.data.length},Wh=function(t,n){return function(e){return T.from(Hs(t?0:-1,e)).filter(n).isSome()}},Kh=function(e){return"IMG"===e.nodeName&&"block"===Or(cr.fromDom(e),"display")},Xh=function(e){return Oo.isContentEditableFalse(e)&&!Oo.isBogusAll(e)},Yh=Wh(!0,Kh),Gh=Wh(!1,Kh),Jh=Wh(!0,Oo.isTable),Qh=Wh(!1,Oo.isTable),Zh=Wh(!0,Xh),em=Wh(!1,Xh),tm=Oo.isContentEditableTrue,nm=Oo.isContentEditableFalse,rm=function(e,t){for(var n=e.getBody();t&&t!==n;){if(tm(t)||nm(t))return t;t=t.parentNode}return null},om=function(m){var g,a=m.getBody(),o=Cs(m.getBody(),function(e){return m.dom.isBlock(e)},function(){return Bf(m)}),p="sel-"+m.dom.uniqueId(),u=function(e){e&&m.selection.setRng(e)},s=function(){return m.selection.getRng()},v=function(e,t,n,r){return void 0===r&&(r=!0),m.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(r&&m.selection.scrollIntoView(t,-1===e),o.show(n,t))},y=function(e,t){return t=Is(e,a,t),-1===e?_u.fromRangeStart(t):_u.fromRangeEnd(t)},t=function(e){return Ha(e)||Ia(e)||Fa(e)},b=function(e){return t(e.startContainer)||t(e.endContainer)},l=function(e,t){var n,r,o,i,a,u,s,l,c,f,d=m.$,h=m.dom;if(!e)return null;if(e.collapsed){if(!b(e))if(!1===t){if(l=y(-1,e),xs(l.getNode(!0)))return v(-1,l.getNode(!0),!1,!1);if(xs(l.getNode()))return v(-1,l.getNode(),!l.isAtEnd(),!1)}else{if(l=y(1,e),xs(l.getNode()))return v(1,l.getNode(),!l.isAtEnd(),!1);if(xs(l.getNode(!0)))return v(1,l.getNode(!0),!1,!1)}return null}return i=e.startContainer,a=e.startOffset,u=e.endOffset,3===i.nodeType&&0===a&&nm(i.parentNode)&&(i=i.parentNode,a=h.nodeIndex(i),i=i.parentNode),1!==i.nodeType?null:(u===a+1&&i===e.endContainer&&(n=i.childNodes[a]),nm(n)?(c=f=n.cloneNode(!0),(s=m.fire("ObjectSelected",{target:n,targetClone:c})).isDefaultPrevented()?null:(r=ha(cr.fromDom(m.getBody()),"#"+p).fold(function(){return d([])},function(e){return d([e.dom()])}),c=s.targetClone,0===r.length&&(r=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",p)).appendTo(m.getBody()),e=m.dom.createRng(),c===f&&He.ie?(r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(c),e.setStartAfter(r[0].firstChild.firstChild),e.setEndAfter(c)):(r.empty().append("\xa0").append(c).append("\xa0"),e.setStart(r[0].firstChild,1),e.setEnd(r[0].lastChild,0)),r.css({top:h.getPos(n,m.getBody()).y}),r[0].focus(),(o=m.selection.getSel()).removeAllRanges(),o.addRange(e),A(ua(cr.fromDom(m.getBody()),"*[data-mce-selected]"),function(e){Br(e,"data-mce-selected")}),n.setAttribute("data-mce-selected","1"),g=n,C(),e)):null)},c=function(){g&&(g.removeAttribute("data-mce-selected"),ha(cr.fromDom(m.getBody()),"#"+p).each(Gi),g=null),ha(cr.fromDom(m.getBody()),"#"+p).each(Gi),g=null},C=function(){o.hide()};return He.ceFalse&&function(){m.on("mouseup",function(e){var t=s();t.collapsed&&dd(m,e.clientX,e.clientY)&&u(Hh(m,t,!1))}),m.on("click",function(e){var t;(t=rm(m,e.target))&&(nm(t)&&(e.preventDefault(),m.focus()),tm(t)&&m.dom.isChildOf(t,m.selection.getNode())&&c())}),m.on("blur NewBlock",function(){c()}),m.on("ResizeWindow FullscreenStateChanged",function(){return o.reposition()});var n,r,i=function(e,t){var n,r,o=m.dom.getParent(e,m.dom.isBlock),i=m.dom.getParent(t,m.dom.isBlock);return!(!o||!m.dom.isChildOf(o,i)||!1!==nm(rm(m,o)))||o&&(n=o,r=i,!(m.dom.getParent(n,m.dom.isBlock)===m.dom.getParent(r,m.dom.isBlock)))&&function(e){var t=nl(e);if(!e.firstChild)return!1;var n=_u.before(e.firstChild),r=t.next(n);return r&&!Zh(r)&&!em(r)}(o)};r=!1,(n=m).on("touchstart",function(){r=!1}),n.on("touchmove",function(){r=!0}),n.on("touchend",function(e){var t=rm(n,e.target);nm(t)&&(r||(e.preventDefault(),l(Oh(n,t))))}),m.on("mousedown",function(e){var t,n=e.target;if((n===a||"HTML"===n.nodeName||m.dom.isChildOf(n,a))&&!1!==dd(m,e.clientX,e.clientY))if(t=rm(m,n))nm(t)?(e.preventDefault(),l(Oh(m,t))):(c(),tm(t)&&e.shiftKey||Mh(e.clientX,e.clientY,m.selection.getRng())||(C(),m.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===xs(n)){c(),C();var r=Ah(a,e.clientX,e.clientY);if(r&&!i(e.target,r.node)){e.preventDefault();var o=v(1,r.node,r.before,!1);m.getBody().focus(),u(o)}}}),m.on("keypress",function(e){Ph.modifierPressed(e)||(e.keyCode,nm(m.selection.getNode())&&e.preventDefault())}),m.on("GetSelectionRange",function(e){var t=e.range;if(g){if(!g.parentNode)return void(g=null);(t=t.cloneRange()).selectNode(g),e.range=t}}),m.on("SetSelectionRange",function(e){var t;(t=l(e.range,e.forward))&&(e.range=t)});m.on("AfterSetSelectionRange",function(e){var t,n=e.range;b(n)||"mcepastebin"===n.startContainer.parentNode.id||C(),t=n.startContainer.parentNode,m.dom.hasClass(t,"mce-offscreen-selection")||c()}),m.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!He.ie){var r=(t=m.dom.get(p))?t.getElementsByTagName("*")[0]:t;r&&(e.preventDefault(),n.clearData(),n.setData("text/html",r.outerHTML),n.setData("text/plain",r.outerText))}}),dh(m),Lh(m)}(),{showCaret:v,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(Ua(e),u(s()),m.selection.scrollIntoView(e[0]))},hideFakeCaret:C,destroy:function(){o.destroy(),g=null}}},im=0,am=2,um=1,sm=function(m,g){var e=m.length+g.length+2,p=new Array(e),v=new Array(e),l=function(e,t,n,r,o){var i=c(e,t,n,r);if(null===i||i.start===t&&i.diag===t-r||i.end===e&&i.diag===e-n)for(var a=e,u=n;a<t||u<r;)a<t&&u<r&&m[a]===g[u]?(o.push([0,m[a]]),++a,++u):r-n<t-e?(o.push([2,m[a]]),++a):(o.push([1,g[u]]),++u);else{l(e,i.start,n,i.start-i.diag,o);for(var s=i.start;s<i.end;++s)o.push([0,m[s]]);l(i.end,t,i.end-i.diag,r,o)}},y=function(e,t,n,r){for(var o=e;o-t<r&&o<n&&m[o]===g[o-t];)++o;return{start:e,end:o,diag:t}},c=function(e,t,n,r){var o=t-e,i=r-n;if(0===o||0===i)return null;var a,u,s,l,c,f=o-i,d=i+o,h=(d%2==0?d:d+1)/2;for(p[1+h]=e,v[1+h]=t+1,a=0;a<=h;++a){for(u=-a;u<=a;u+=2){for(s=u+h,u===-a||u!==a&&p[s-1]<p[s+1]?p[s]=p[s+1]:p[s]=p[s-1]+1,c=(l=p[s])-e+n-u;l<t&&c<r&&m[l]===g[c];)p[s]=++l,++c;if(f%2!=0&&f-a<=u&&u<=f+a&&v[s-f]<=p[s])return y(v[s-f],u+e-n,t,r)}for(u=f-a;u<=f+a;u+=2){for(s=u+h-f,u===f-a||u!==f+a&&v[s+1]<=v[s-1]?v[s]=v[s+1]-1:v[s]=v[s-1],c=(l=v[s]-1)-e+n-u;e<=l&&n<=c&&m[l]===g[c];)v[s]=l--,c--;if(f%2==0&&-a<=u&&u<=a&&v[s]<=p[s+f])return y(v[s],u+e-n,t,r)}}},t=[];return l(0,m.length,0,g.length,t),t},lm=function(e){return Oo.isElement(e)?e.outerHTML:Oo.isText(e)?ui.encodeRaw(e.data,!1):Oo.isComment(e)?"\x3c!--"+e.data+"--\x3e":""},cm=function(e,t,n){var r=function(e){var t,n,r;for(r=j.document.createElement("div"),t=j.document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},fm=function(e){return S(X(I(e.childNodes),lm),function(e){return 0<e.length})},dm=function(e,t){var n,r,o,i=X(I(t.childNodes),lm);return n=sm(i,e),r=t,o=0,A(n,function(e){e[0]===im?o++:e[0]===um?(cm(r,e[1],o),o++):e[0]===am&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(r,o)}),t},hm=Li(T.none()),mm=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},gm=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},pm=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},vm=function(e){var t=cr.fromTag("body",hm.get().getOrThunk(function(){var e=j.document.implementation.createHTMLDocument("undo");return hm.set(T.some(e)),e}));return Sa(t,pm(e)),A(ua(t,"*[data-mce-bogus]"),Ji),t.dom().innerHTML},ym=function(n){var e,t,r;return e=fm(n.getBody()),t=(r=H(e,function(e){var t=ic.trimInternal(n.serializer,e);return 0<t.length?[t]:[]})).join(""),-1!==t.indexOf("</iframe>")?mm(r):gm(t)},bm=function(e,t,n){"fragmented"===t.type?dm(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},Cm=function(e,t){return!(!e||!t)&&(r=t,pm(e)===pm(r)||(n=t,vm(e)===vm(n)));var n,r},wm=function(u){var s,r,o=this,l=0,c=[],t=0,f=function(){return 0===t},i=function(e){f()&&(o.typing=e)},d=function(e){u.setDirty(e)},a=function(e){i(!1),o.add({},e)},n=function(){o.typing&&(i(!1),o.add())};u.on("init",function(){o.add()}),u.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),o.beforeChange())}),u.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&a(e)}),u.on("ObjectResizeStart cut",function(){o.beforeChange()}),u.on("SaveContent ObjectResized blur",a),u.on("dragend",a),u.on("keyup",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(a(),u.nodeChanged()),46!==t&&8!==t||u.nodeChanged(),r&&o.typing&&!1===Cm(ym(u),c[0])&&(!1===u.isDirty()&&(d(!0),u.fire("change",{level:c[0],lastLevel:null})),u.fire("TypingUndo"),r=!1,u.nodeChanged()))}),u.on("keydown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented())if(33<=t&&t<=36||37<=t&&t<=40||45===t)o.typing&&a(e);else{var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||o.typing||n||(o.beforeChange(),i(!0),o.add({},e),r=!0)}}),u.on("mousedown",function(e){o.typing&&a(e)});return u.on("input",function(e){var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data)&&a(e)}),u.addShortcut("meta+z","","Undo"),u.addShortcut("meta+y,meta+shift+z","","Redo"),u.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||u.nodeChanged()}),o={data:c,typing:!1,beforeChange:function(){f()&&(s=rs.getUndoBookmark(u.selection))},add:function(e,t){var n,r,o,i=u.settings;if(o=ym(u),e=e||{},e=en.extend(e,o),!1===f()||u.removed)return null;if(r=c[l],u.fire("BeforeAddUndo",{level:e,lastLevel:r,originalEvent:t}).isDefaultPrevented())return null;if(r&&Cm(r,e))return null;if(c[l]&&(c[l].beforeBookmark=s),i.custom_undo_redo_levels&&c.length>i.custom_undo_redo_levels){for(n=0;n<c.length-1;n++)c[n]=c[n+1];c.length--,l=c.length}e.bookmark=rs.getUndoBookmark(u.selection),l<c.length-1&&(c.length=l+1),c.push(e),l=c.length-1;var a={level:e,lastLevel:r,originalEvent:t};return u.fire("AddUndo",a),0<l&&(d(!0),u.fire("change",a)),e},undo:function(){var e;return o.typing&&(o.add(),o.typing=!1,i(!1)),0<l&&(e=c[--l],bm(u,e,!0),d(!0),u.fire("Undo",{level:e})),e},redo:function(){var e;return l<c.length-1&&(e=c[++l],bm(u,e,!1),d(!0),u.fire("Redo",{level:e})),e},clear:function(){c=[],l=0,o.typing=!1,o.data=c,u.fire("ClearUndos")},reset:function(){o.clear(),o.add()},hasUndo:function(){return 0<l||o.typing&&c[0]&&!Cm(ym(u),c[0])},hasRedo:function(){return l<c.length-1&&!o.typing},transact:function(e){return n(),o.beforeChange(),o.ignore(e),o.add()},ignore:function(e){try{t++,e()}finally{t--}},extra:function(e,t){var n,r;o.transact(e)&&(r=c[l].bookmark,n=c[l-1],bm(u,n,!0),o.transact(t)&&(c[l-1].beforeBookmark=r))}}},xm=function(e){var t=ua(e,"br"),n=S(function(e){for(var t=[],n=e.dom();n;)t.push(cr.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),Io);t.length===n.length&&A(n,Gi)},zm=function(e){Yi(e),Ki(e,cr.fromHtml('<br data-mce-bogus="1">'))},Nm=function(n){oo(n).each(function(t){Jr(t).each(function(e){Po(n)&&Io(t)&&Po(e)&&Gi(t)})})},Em=kl.isEq,Sm=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&e.dom.is(t,r[o].selector))return!0;return!1},km=function(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!Sm(t,e,n)||(e.parentNode===o||!!Mm(t,e,n,r,!0))}),Mm(t,e,n,r))},Tm=function(e,t,n){return!!Em(t,n.inline)||(!!Em(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0))},Am=function(e,t,n,r,o,i){var a,u,s,l=n[r];if(n.onmatch)return n.onmatch(t,n,r);if(l)if("undefined"==typeof l.length){for(a in l)if(l.hasOwnProperty(a)){if(u="attributes"===r?e.getAttrib(t,a):kl.getStyle(e,t,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!Em(u,kl.normalizeStyleValue(e,kl.replaceVars(l[a],i),a)))return}}else for(s=0;s<l.length;s++)if("attributes"===r?e.getAttrib(t,l[s]):kl.getStyle(e,t,l[s]))return n;return n},Mm=function(e,t,n,r,o){var i,a,u,s,l=e.formatter.get(n),c=e.dom;if(l&&t)for(a=0;a<l.length;a++)if(i=l[a],Tm(e.dom,t,i)&&Am(c,t,i,"attributes",o,r)&&Am(c,t,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!e.dom.hasClass(t,s[u]))return;return i}},Rm={matchNode:Mm,matchName:Tm,match:function(e,t,n,r){var o;return r?km(e,r,t,n):(r=e.selection.getNode(),!!km(e,r,t,n)||!((o=e.selection.getStart())===r||!km(e,o,t,n)))},matchAll:function(r,o,i){var e,a=[],u={};return e=r.selection.getStart(),r.dom.getParent(e,function(e){var t,n;for(t=0;t<o.length;t++)n=o[t],!u[n]&&Mm(r,e,n,i)&&(u[n]=!0,a.push(n))},r.dom.getRoot()),a},canApply:function(e,t){var n,r,o,i,a,u=e.formatter.get(t),s=e.dom;if(u)for(n=e.selection.getStart(),r=kl.getParents(s,n),i=u.length-1;0<=i;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;0<=o;o--)if(s.is(r[o],a))return!0}return!1},matchesUnInheritedFormatSelector:Sm},Dm=function(e,t){return e.splitText(t)},Bm=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&Oo.isText(t)?0<n&&n<t.nodeValue.length&&(t=(r=Dm(t,n)).previousSibling,n<o?(t=r=Dm(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Oo.isText(t)&&0<n&&n<t.nodeValue.length&&(t=Dm(t,n),n=0),Oo.isText(r)&&0<o&&o<r.nodeValue.length&&(o=(r=Dm(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},Om=function(e,t,n){if(0!==n){var r,o,i,a=e.data.slice(t,t+n),u=t+n>=e.data.length,s=0===t;e.replaceData(t,n,(o=s,i=u,M(r=a,function(e,t){return-1!==" \f\n\r\t\x0B".indexOf(t)||"\xa0"===t?e.previousCharIsSpace||""===e.str&&o||e.str.length===r.length-1&&i?{previousCharIsSpace:!1,str:e.str+"\xa0"}:{previousCharIsSpace:!0,str:e.str+" "}:{previousCharIsSpace:!1,str:e.str+t}},{previousCharIsSpace:!1,str:""}).str))}},Hm=function(e,t){var n,r=e.data.slice(t),o=r.length-(n=r,n.replace(/^\s+/g,"")).length;return Om(e,t,o)},_m=function(e,t){var n,r,o,i=cr.fromDom(e),a=cr.fromDom(t);return n=a,r="pre,code",o=d(Wr,i),da(n,r,o).isSome()},Lm=function(e,t){return Ja(t)&&!1===(r=e,o=t,Oo.isText(o)&&/^[ \t\r\n]*$/.test(o.data)&&!1===_m(r,o))||(n=t,Oo.isElement(n)&&"A"===n.nodeName&&n.hasAttribute("name"))||Pm(t);var n,r,o},Pm=Oo.hasAttribute("data-mce-bookmark"),Vm=Oo.hasAttribute("data-mce-bogus"),Im=Oo.hasAttributeValue("data-mce-bogus","all"),Fm=function(e){return function(e){var t,n=0;if(Lm(e,e))return!1;if(!(t=e.firstChild))return!0;var r=new Ho(t,e);do{if(Im(t))t=r.next(!0);else if(Vm(t))t=r.next();else if(Oo.isBr(t))n++,t=r.next();else{if(Lm(e,t))return!1;t=r.next()}}while(t);return n<=1}(e.dom())},Um=function(e,t){return r=e,o=(n=t).container(),i=n.offset(),!1===_u.isTextPosition(n)&&o===r.parentNode&&i>_u.before(r).offset()?_u(t.container(),t.offset()-1):t;var n,r,o,i},jm=function(e){return Ja(e.previousSibling)?T.some((t=e.previousSibling,Oo.isText(t)?_u(t,t.data.length):_u.after(t))):e.previousSibling?hl.lastPositionIn(e.previousSibling):T.none();var t},qm=function(e){return Ja(e.nextSibling)?T.some((t=e.nextSibling,Oo.isText(t)?_u(t,0):_u.before(t))):e.nextSibling?hl.firstPositionIn(e.nextSibling):T.none();var t},$m=function(r,o){return jm(o).orThunk(function(){return qm(o)}).orThunk(function(){return e=r,t=o,n=_u.before(t.previousSibling?t.previousSibling:t.parentNode),hl.prevPosition(e,n).fold(function(){return hl.nextPosition(e,_u.after(t))},T.some);var e,t,n})},Wm=function(n,r){return qm(r).orThunk(function(){return jm(r)}).orThunk(function(){return e=n,t=r,hl.nextPosition(e,_u.after(t)).fold(function(){return hl.prevPosition(e,_u.before(t))},T.some);var e,t})},Km=function(e,t,n){return(r=e,o=t,i=n,r?Wm(o,i):$m(o,i)).map(d(Um,n));var r,o,i},Xm=function(t,n,e){e.fold(function(){t.focus()},function(e){t.selection.setRng(e.toRange(),n)})},Ym=function(e,t){return t&&e.schema.getBlockElements().hasOwnProperty(mr(t))},Gm=function(e){if(Fm(e)){var t=cr.fromHtml('<br data-mce-bogus="1">');return Yi(e),Ki(e,t),T.some(_u.before(t.dom()))}return T.none()},Jm=function(e,t,c){var n=Jr(e).filter(function(e){return Oo.isText(e.dom())}),r=Qr(e).filter(function(e){return Oo.isText(e.dom())});return Gi(e),fu([n,r,t],function(e,t,n){var r,o,i,a,u=e.dom(),s=t.dom(),l=u.data.length;return o=s,i=c,a=tr((r=u).data).length,r.appendData(o.data),Gi(cr.fromDom(o)),i&&Hm(r,a),n.container()===s?_u(u,l):n}).orThunk(function(){return c&&(n.each(function(e){return t=e.dom(),n=e.dom().length,r=t.data.slice(0,n),o=r.length-tr(r).length,Om(t,n-o,o);var t,n,r,o}),r.each(function(e){return Hm(e.dom(),0)})),t})},Qm=function(t,n,e,r){void 0===r&&(r=!0);var o,i,a=Km(n,t.getBody(),e.dom()),u=ca(e,d(Ym,t),(o=t.getBody(),function(e){return e.dom()===o})),s=Jm(e,a,(i=e,Sr(t.schema.getTextInlineElements(),mr(i))));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):u.bind(Gm).fold(function(){r&&Xm(t,n,s)},function(e){r&&Xm(t,n,T.some(e))})},Zm=Aa,eg="_mce_caret",tg=function(e){return 0<function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==Zm||1<e.childNodes.length)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length},ng=function(e){if(e){var t=new Ho(e,e);for(e=t.current();e;e=t.next())if(3===e.nodeType)return e}return null},rg=function(e){var t=cr.fromTag("span");return Rr(t,{id:eg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&Ki(t,cr.fromText(Zm)),t},og=function(e,t,n){void 0===n&&(n=!0);var r,o=e.dom,i=e.selection;if(tg(t))Qm(e,!1,cr.fromDom(t),n);else{var a=i.getRng(),u=o.getParent(t,o.isBlock),s=((r=ng(t))&&r.nodeValue.charAt(0)===Zm&&r.deleteData(0,1),r);a.startContainer===s&&0<a.startOffset&&a.setStart(s,a.startOffset-1),a.endContainer===s&&0<a.endOffset&&a.setEnd(s,a.endOffset-1),o.remove(t,!0),u&&o.isEmpty(u)&&zm(cr.fromDom(u)),i.setRng(a)}},ig=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)og(e,t,n);else if(!(t=as(e.getBody(),o.getStart())))for(;t=r.get(eg);)og(e,t,!1)},ag=function(e,t,n){var r=e.dom,o=r.getParent(n,d(kl.isTextBlock,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(xm(cr.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},ug=function(e,t){return e.appendChild(t),t},sg=function(e,t){var n=k(e,function(e,t){return ug(e,t.cloneNode(!1))},t);return ug(n,n.ownerDocument.createTextNode(Zm))},lg=function(i){i.on("mouseup keydown",function(e){var t,n,r,o;t=i,n=e.keyCode,r=t.selection,o=t.getBody(),ig(t,null,!1),8!==n&&46!==n||!r.isCollapsed()||r.getStart().innerHTML!==Zm||ig(t,as(o,r.getStart())),37!==n&&39!==n||ig(t,as(o,r.getStart()))})},cg=function(e,t){return e.schema.getTextInlineElements().hasOwnProperty(mr(t))&&!is(t.dom())&&!Oo.isBogus(t.dom())},fg={},dg=Yt.filter,hg=Yt.each;ph=function(e){var t,n,r=e.selection.getRng();t=Oo.matchNodeNames(["pre"]),r.collapsed||(n=e.selection.getSelectedBlocks(),hg(dg(dg(n,t),function(e){return t(e.previousSibling)&&-1!==Yt.indexOf(n,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,Bn(n=e).remove(),Bn(t).append("<br><br>").append(n.childNodes)}))},fg[gh="pre"]||(fg[gh]=[]),fg[gh].push(ph);var mg=function(e,t){hg(fg[e],function(e){e(t)})},gg=en.each,pg=function(o){this.compare=function(e,t){if(e.nodeName!==t.nodeName)return!1;var n=function(n){var r={};return gg(o.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=o.getAttrib(n,t))}),r},r=function(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0};return!!r(n(e),n(t))&&(!!r(o.parseStyle(o.getAttrib(e,"style")),o.parseStyle(o.getAttrib(t,"style")))&&(!zl(e)&&!zl(t)))}},vg=/^(src|href|style)$/,yg=en.each,bg=kl.isEq,Cg=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},wg=function(e,t,n){var r,o,i;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],Oo.isElement(r)&&(i=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[i<o?i:o]),Oo.isText(r)&&n&&o>=r.nodeValue.length&&(r=new Ho(r,e.getBody()).next()||r),Oo.isText(r)&&!n&&0===o&&(r=new Ho(r,e.getBody()).prev()||r),r},xg=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},zg=function(e,t,n,r,o){var i=cr.fromDom(t),a=cr.fromDom(e.create(r,o)),u=n?eo(i):Zr(i);return Xi(a,u),n?(qi(i,a),Wi(a,i)):($i(i,a),Ki(a,i)),a.dom()},Ng=function(e,t,n,r){return!(t=kl.getNonWhiteSpaceSibling(t,n,r))||"BR"===t.nodeName||e.isBlock(t)},Eg=function(e,r,o,i,a){var t,n,u,s,l,c,f,d,h,m,g,p,v,y,b=e.dom;if(!(l=b,bg(c=i,(f=r).inline)||bg(c,f.block)||(f.selector?Oo.isElement(c)&&l.is(c,f.selector):void 0)||(s=i,r.links&&"A"===s.tagName)))return!1;if("all"!==r.remove)for(yg(r.styles,function(e,t){e=kl.normalizeStyleValue(b,kl.replaceVars(e,o),t),"number"==typeof t&&(t=e,a=0),(r.remove_similar||!a||bg(kl.getStyle(b,a,t),e))&&b.setStyle(i,t,""),u=1}),u&&""===b.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),yg(r.attributes,function(e,t){var n;if(e=kl.replaceVars(e,o),"number"==typeof t&&(t=e,a=0),r.remove_similar||!a||bg(b.getAttrib(a,t),e)){if("class"===t&&(e=b.getAttrib(i,t))&&(n="",yg(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n))return void b.setAttrib(i,t,n);"class"===t&&i.removeAttribute("className"),vg.test(t)&&i.removeAttribute("data-mce-"+t),i.removeAttribute(t)}}),yg(r.classes,function(e){e=kl.replaceVars(e,o),a&&!b.hasClass(a,e)||b.removeClass(i,e)}),n=b.getAttribs(i),t=0;t<n.length;t++){var C=n[t].nodeName;if(0!==C.indexOf("_")&&0!==C.indexOf("data-"))return!1}return"none"!==r.remove?(d=e,m=r,p=(h=i).parentNode,v=d.dom,y=mc(d),m.block&&(y?p===v.getRoot()&&(m.list_block&&bg(h,m.list_block)||yg(en.grep(h.childNodes),function(e){kl.isValid(d,y,e.nodeName.toLowerCase())?g?g.appendChild(e):(g=xg(v,e,y),v.setAttribs(g,d.settings.forced_root_block_attrs)):g=0})):v.isBlock(h)&&!v.isBlock(p)&&(Ng(v,h,!1)||Ng(v,h.firstChild,!0,1)||h.insertBefore(v.create("br"),h.firstChild),Ng(v,h,!0)||Ng(v,h.lastChild,!1,1)||h.appendChild(v.create("br")))),m.selector&&m.inline&&!bg(m.inline,h)||v.remove(h,1),!0):void 0},Sg=Eg,kg=function(s,l,c,e,f){var t,n,d=s.formatter.get(l),h=d[0],a=!0,u=s.dom,r=s.selection,i=function(e){var n,t,r,o,i,a,u=(n=s,t=e,r=l,o=c,i=f,yg(kl.getParents(n.dom,t.parentNode).reverse(),function(e){var t;a||"_start"===e.id||"_end"===e.id||(t=Rm.matchNode(n,e,r,o,i))&&!1!==t.split&&(a=e)}),a);return function(e,t,n,r,o,i,a,u){var s,l,c,f,d,h,m=e.dom;if(n){for(h=n.parentNode,s=r.parentNode;s&&s!==h;s=s.parentNode){for(l=m.clone(s,!1),d=0;d<t.length;d++)if(Eg(e,t[d],u,l,l)){l=0;break}l&&(c&&l.appendChild(c),f||(f=l),c=l)}!i||a.mixed&&m.isBlock(n)||(r=m.split(n,r)),c&&(o.parentNode.insertBefore(c,o),f.appendChild(o))}return r}(s,d,u,e,e,!0,h,c)},m=function(e){var t,n,r,o,i;if(Oo.isElement(e)&&u.getContentEditable(e)&&(o=a,a="true"===u.getContentEditable(e),i=!0),t=en.grep(e.childNodes),a&&!i)for(n=0,r=d.length;n<r&&!Eg(s,d[n],c,e,e);n++);if(h.deep&&t.length){for(n=0,r=t.length;n<r;n++)m(t[n]);i&&(a=o)}},g=function(e){var t,n=u.get(e?"_start":"_end"),r=n[e?"firstChild":"lastChild"];return zl(t=r)&&Oo.isElement(t)&&("_start"===t.id||"_end"===t.id)&&(r=r[e?"firstChild":"lastChild"]),Oo.isText(r)&&0===r.data.length&&(r=e?n.previousSibling||n.nextSibling:n.nextSibling||n.previousSibling),u.remove(n,!0),r},o=function(e){var t,n,r=e.commonAncestorContainer;if(e=Vl(s,e,d,!0),h.split){if(e=Bm(e),(t=wg(s,e,!0))!==(n=wg(s,e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"===t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&/^(TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n=n.firstChild||n),Cg(u,t,n)){var o=T.from(t.firstChild).getOr(t);return i(zg(u,o,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void g(!0)}if(Cg(u,n,t))return o=T.from(n.lastChild).getOr(n),i(zg(u,o,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void g(!1);t=xg(u,t,"span",{id:"_start","data-mce-type":"bookmark"}),n=xg(u,n,"span",{id:"_end","data-mce-type":"bookmark"}),i(t),i(n),t=g(!0),n=g()}else t=n=i(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=u.nodeIndex(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=u.nodeIndex(n)+1}Fl(u,e,function(e){yg(e,function(e){m(e),Oo.isElement(e)&&"underline"===s.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===kl.getTextDecoration(u,e.parentNode)&&Eg(s,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})};if(e)e.nodeType?((n=u.createRng()).setStartBefore(e),n.setEndAfter(e),o(n)):o(e);else if("false"!==u.getContentEditable(r.getNode()))r.isCollapsed()&&h.inline&&!u.select("td[data-mce-selected],th[data-mce-selected]").length?function(e,t,n,r){var o,i,a,u,s,l,c,f=e.dom,d=e.selection,h=[],m=d.getRng();for(o=m.startContainer,i=m.startOffset,3===(s=o).nodeType&&(i!==o.nodeValue.length&&(u=!0),s=s.parentNode);s;){if(Rm.matchNode(e,s,t,n,r)){l=s;break}s.nextSibling&&(u=!0),h.push(s),s=s.parentNode}if(l)if(u){a=d.getBookmark(),m.collapse(!0);var g=Vl(e,m,e.formatter.get(t),!0);g=Bm(g),e.formatter.remove(t,n,g),d.moveToBookmark(a)}else{c=as(e.getBody(),l);var p=rg(!1).dom(),v=sg(h,p);ag(e,p,c||l),og(e,c,!1),d.setCursorLocation(v,1),f.isEmpty(l)&&f.remove(l)}}(s,l,c,f):(t=rs.getPersistentBookmark(s.selection,!0),o(r.getRng()),r.moveToBookmark(t),h.inline&&Rm.match(s,l,c,r.getStart())&&kl.moveStart(u,r,r.getRng()),s.nodeChanged());else{e=r.getNode();for(var p=0,v=d.length;p<v&&(!d[p].ceFalseOverride||!Eg(s,d[p],c,e,e));p++);}},Tg=en.each,Ag=function(e){return e&&1===e.nodeType&&!zl(e)&&!is(e)&&!Oo.isBogus(e)},Mg=function(e,t){var n;for(n=e;n;n=n[t]){if(3===n.nodeType&&0!==n.nodeValue.length)return e;if(1===n.nodeType&&!zl(n))return n}return e},Rg=function(e,t,n){var r,o,i=new pg(e);if(t&&n&&(t=Mg(t,"previousSibling"),n=Mg(n,"nextSibling"),i.compare(t,n))){for(r=t.nextSibling;r&&r!==n;)r=(o=r).nextSibling,t.appendChild(o);return e.remove(n),en.each(en.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},Dg=function(e,t,n){Tg(e.childNodes,function(e){Ag(e)&&(t(e)&&n(e),e.hasChildNodes()&&Dg(e,t,n))})},Bg=function(n,e){return d(function(e,t){return!(!t||!kl.getStyle(n,t,e))},e)},Og=function(r,e,t){return d(function(e,t,n){r.setStyle(n,e,t),""===n.getAttribute("style")&&n.removeAttribute("style"),Hg(r,n)},e,t)},Hg=function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)},_g=function(e,t){var n;1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType&&(n=kl.getTextDecoration(e,t.parentNode),e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null))},Lg=function(n,e,r,o){Tg(e,function(t){Tg(n.dom.select(t.inline,o),function(e){Ag(e)&&Sg(n,t,r,e,t.exact?e:null)}),function(r,e,t){if(e.clear_child_styles){var n=e.links?"*:not(a)":"*";Tg(r.select(n,t),function(n){Ag(n)&&Tg(e.styles,function(e,t){r.setStyle(n,t,"")})})}}(n.dom,t,o)})},Pg=function(e,t,n,r){(t.styles.color||t.styles.textDecoration)&&(en.walk(r,d(_g,e),"childNodes"),_g(e,r))},Vg=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Dg(r,Bg(e,"fontSize"),Og(e,"backgroundColor",kl.replaceVars(t.styles.backgroundColor,n)))},Ig=function(e,t,n,r){"sub"!==t.inline&&"sup"!==t.inline||(Dg(r,Bg(e,"fontSize"),Og(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))},Fg=function(e,t,n,r){r&&!1!==t.merge_siblings&&(r=Rg(e,kl.getNonWhiteSpaceSibling(r),r),r=Rg(e,r,kl.getNonWhiteSpaceSibling(r,!0)))},Ug=function(t,n,r,o,i){Rm.matchNode(t,i.parentNode,r,o)&&Sg(t,n,o,i)||n.merge_with_parents&&t.dom.getParent(i.parentNode,function(e){if(Rm.matchNode(t,e,r,o))return Sg(t,n,o,i),!0})},jg=function(a){var u=_u.fromRangeStart(a),s=_u.fromRangeEnd(a),l=a.commonAncestorContainer;return hl.fromPosition(!1,l,s).map(function(e){return!Os(u,s,l)&&Os(u,e,l)?(t=u.container(),n=u.offset(),r=e.container(),o=e.offset(),(i=j.document.createRange()).setStart(t,n),i.setEnd(r,o),i):a;var t,n,r,o,i}).getOr(a)},qg=function(e){return e.collapsed?e:jg(e)},$g=en.each,Wg=function(m,g,p,r){var e,t,v=m.formatter.get(g),y=v[0],o=!r&&m.selection.isCollapsed(),i=m.dom,n=m.selection,b=function(n,e){if(e=e||y,n){if(e.onformat&&e.onformat(n,e,p,r),$g(e.styles,function(e,t){i.setStyle(n,t,kl.replaceVars(e,p))}),e.styles){var t=i.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}$g(e.attributes,function(e,t){i.setAttrib(n,t,kl.replaceVars(e,p))}),$g(e.classes,function(e){e=kl.replaceVars(e,p),i.hasClass(n,e)||i.addClass(n,e)})}},C=function(e,t){var n=!1;return!!y.selector&&($g(e,function(e){if(!("collapsed"in e&&e.collapsed!==o))return i.is(t,e.selector)&&!is(t)?(b(t,e),!(n=!0)):void 0}),n)},a=function(s,e,t,l){var c,f,d=[],h=!0;c=y.inline||y.block,f=s.create(c),b(f),Fl(s,e,function(e){var a,u=function(e){var t,n,r,o;if(o=h,t=e.nodeName.toLowerCase(),n=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&s.getContentEditable(e)&&(o=h,h="true"===s.getContentEditable(e),r=!0),kl.isEq(t,"br"))return a=0,void(y.block&&s.remove(e));if(y.wrapper&&Rm.matchNode(m,e,g,p))a=0;else{if(h&&!r&&y.block&&!y.wrapper&&kl.isTextBlock(m,t)&&kl.isValid(m,n,c))return e=s.rename(e,c),b(e),d.push(e),void(a=0);if(y.selector){var i=C(v,e);if(!y.inline||i)return void(a=0)}!h||r||!kl.isValid(m,c,t)||!kl.isValid(m,n,c)||!l&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||is(e)||y.inline&&s.isBlock(e)?(a=0,$g(en.grep(e.childNodes),u),r&&(h=o),a=0):(a||(a=s.clone(f,!1),e.parentNode.insertBefore(a,e),d.push(a)),a.appendChild(e))}};$g(e,u)}),!0===y.links&&$g(d,function(e){var t=function(e){"A"===e.nodeName&&b(e,y),$g(en.grep(e.childNodes),t)};t(e)}),$g(d,function(e){var t,n,r,o,i,a=function(e){var n=!1;return $g(e.childNodes,function(e){if((t=e)&&1===t.nodeType&&!zl(t)&&!is(t)&&!Oo.isBogus(t))return n=e,!1;var t}),n};(n=0,$g(e.childNodes,function(e){kl.isWhiteSpaceNode(e)||zl(e)||n++}),t=n,!(1<d.length)&&s.isBlock(e)||0!==t)?(y.inline||y.wrapper)&&(y.exact||1!==t||((o=a(r=e))&&!zl(o)&&Rm.matchName(s,o,y)&&(i=s.clone(o,!1),b(i),s.replace(i,r,!0),s.remove(o,1)),e=i||r),Lg(m,v,p,e),Ug(m,y,g,p,e),Vg(s,y,p,e),Ig(s,y,p,e),Fg(s,y,p,e)):s.remove(e,1)})};if("false"!==i.getContentEditable(n.getNode())){if(y){if(r)r.nodeType?C(v,r)||((t=i.createRng()).setStartBefore(r),t.setEndAfter(r),a(i,Vl(m,t,v),0,!0)):a(i,r,0,!0);else if(o&&y.inline&&!i.select("td[data-mce-selected],th[data-mce-selected]").length)!function(e,t,n){var r,o,i,a,u,s,l=e.selection;a=(r=l.getRng()).startOffset,s=r.startContainer.nodeValue,(o=as(e.getBody(),l.getStart()))&&(i=ng(o));var c,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&0<a&&a<s.length&&d.test(s.charAt(a))&&d.test(s.charAt(a-1))?(u=l.getBookmark(),r.collapse(!0),r=Vl(e,r,e.formatter.get(t)),r=Bm(r),e.formatter.apply(t,n,r),l.moveToBookmark(u)):(o&&i.nodeValue===Zm||(c=e.getDoc(),f=rg(!0).dom(),i=(o=c.importNode(f,!0)).firstChild,r.insertNode(o),a=1),e.formatter.apply(t,n,o),l.setCursorLocation(i,a))}(m,g,p);else{var u=m.selection.getNode();m.settings.forced_root_block||!v[0].defaultBlock||i.getParent(u,i.isBlock)||Wg(m,v[0].defaultBlock),m.selection.setRng(qg(m.selection.getRng())),e=rs.getPersistentBookmark(m.selection,!0),a(i,Vl(m,n.getRng(),v)),y.styles&&Pg(i,y,p,u),n.moveToBookmark(e),kl.moveStart(i,n,n.getRng()),m.nodeChanged()}mg(g,m)}}else{r=n.getNode();for(var s=0,l=v.length;s<l;s++)if(v[s].ceFalseOverride&&i.is(r,v[s].selector))return void b(r,v[s])}},Kg={applyFormat:Wg},Xg=function(r,e,t,n){var o=br(t.get()),i={},a={},u=S(kl.getParents(r.dom,e),function(e){return 1===e.nodeType&&!e.getAttribute("data-mce-bogus")});wr(n,function(e,n){en.each(u,function(t){return r.formatter.matchNode(t,n,{},e.similar)?(-1===o.indexOf(n)&&(A(e.callbacks,function(e){e(!0,{node:t,format:n,parents:u})}),i[n]=e.callbacks),a[n]=e.callbacks,!1):!Rm.matchesUnInheritedFormatSelector(r,t,n)&&void 0})});var s=Yg(t.get(),a,e,u);t.set(G({},i,s))},Yg=function(e,n,r,o){return Nr(e,function(e,t){return!!Sr(n,t)||(A(e,function(e){e(!1,{node:r,format:t,parents:o})}),!1)}).t},Gg=function(e,o,i,a,t){var n,r,u,s,l,c,f,d;return null===o.get()&&(n=o,r=e,u=Li({}),n.set({}),r.on("NodeChange",function(e){Xg(r,e.element,u,n.get())})),l=i,c=a,f=t,d=(s=o).get(),A(l.split(","),function(e){d[e]||(d[e]={similar:f,callbacks:[]}),d[e].callbacks.push(c)}),s.set(d),{unbind:function(){return t=i,n=a,r=(e=o).get(),A(t.split(","),function(e){r[e].callbacks=S(r[e].callbacks,function(e){return e!==n}),0===r[e].callbacks.length&&delete r[e]}),void e.set(r);var e,t,n,r}}},Jg=function(r){var t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){en.each(t,function(e,t){r.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return en.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t};var Qg,Zg=en.each,ep=Di.DOM,tp=function(e,t){var n,o,r,h=t&&t.schema||yi({}),m=function(e){var t,n,r;return o="string"==typeof e?{name:e,classes:[],attrs:{}}:e,t=ep.create(o.name),n=t,(r=o).classes.length&&ep.addClass(n,r.classes.join(" ")),ep.setAttribs(n,r.attrs),t},g=function(n,e,t){var r,o,i,a,u,s,l,c,f=0<e.length&&e[0],d=f&&f.name;if(u=d,s="string"!=typeof(a=n)?a.nodeName.toLowerCase():a,l=h.getElementRule(s),i=!(!(c=l&&l.parentsRequired)||!c.length)&&(u&&-1!==en.inArray(c,u)?u:c[0]))d===i?(o=e[0],e=e.slice(1)):o=i;else if(f)o=e[0],e=e.slice(1);else if(!t)return n;return o&&(r=m(o)).appendChild(n),t&&(r||(r=ep.create("div")).appendChild(n),en.each(t,function(e){var t=m(e);r.insertBefore(t,n)})),g(r,e,o&&o.siblings)};return e&&e.length?(o=e[0],n=m(o),(r=ep.create("div")).appendChild(g(n,e.slice(1),o.siblings)),r):""},np=function(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=en.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,o){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==en.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["===r){var i=o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);i&&(a.attrs[i[1]]=i[2])}return""})),a.name=t||"div",a},rp=function(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),en.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=en.map(e.split(/(?:~\+|~|\+)/),np),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]},op=function(n,e){var t,r,o,i,a,u,s="";if(!1===(u=n.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var l=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(t=e.block||e.inline||"span",r=(i=rp(e.selector)).length?(i[0].name||(i[0].name=t),t=e.selector,tp(i,n)):tp([t],n),o=ep.select(t,r)[0]||r.firstChild,Zg(e.styles,function(e,t){(e=l(e))&&ep.setStyle(o,t,e)}),Zg(e.attributes,function(e,t){(e=l(e))&&ep.setAttrib(o,t,e)}),Zg(e.classes,function(e){e=l(e),ep.hasClass(o,e)||ep.addClass(o,e)}),n.fire("PreviewFormats"),ep.setStyles(r,{position:"absolute",left:-65535}),n.getBody().appendChild(r),a=ep.getStyle(n.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Zg(u.split(" "),function(e){var t=ep.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=ep.getStyle(n.getBody(),e,!0),"#ffffff"===ep.toHex(t).toLowerCase())||"color"===e&&"#000000"===ep.toHex(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===a)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*a+"px"}"border"===e&&t&&(s+="padding:0 2px;"),s+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),ep.remove(r),s)},ip=function(e,t,n,r,o){var i=t.get(n);!Rm.match(e,n,r,o)||"toggle"in i[0]&&!i[0].toggle?Kg.applyFormat(e,n,r,o):kg(e,n,r,o)},ap=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},up=function(e){var t=function o(e){var n={},r=function(e,t){e&&("string"!=typeof e?en.each(e,function(e,t){r(t,e)}):(p(t)||(t=[t]),en.each(t,function(e){"undefined"==typeof e.deep&&(e.deep=!e.selector),"undefined"==typeof e.split&&(e.split=!e.selector||e.inline),"undefined"==typeof e.remove&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),n[e]=t))};return r(Jg(e.dom)),r(e.settings.formats),{get:function(e){return e?n[e]:n},has:function(e){return Sr(n,e)},register:r,unregister:function(e){return e&&n[e]&&delete n[e],n}}}(e),n=Li(null);return ap(e),lg(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:d(Kg.applyFormat,e),remove:d(kg,e),toggle:d(ip,e,t),match:d(Rm.match,e),matchAll:d(Rm.matchAll,e),matchNode:d(Rm.matchNode,e),canApply:d(Rm.canApply,e),formatChanged:d(Gg,e,n),getCssText:d(op,e)}},sp=Object.prototype.hasOwnProperty,lp=(Qg=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)sp.call(o,i)&&(n[i]=Qg(n[i],o[i]))}return n}),cp=function(t,s,l){t.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(t,null)}),t.addAttributeFilter("src,href,style",function(e,t){for(var n,r,o=e.length,i="data-mce-"+t,a=s.url_converter,u=s.url_converter_scope;o--;)(r=(n=e[o]).attr(i))!==undefined?(n.attr(t,0<r.length?r:null),n.attr(i,null)):(r=n.attr(t),"style"===t?r=l.serializeStyle(l.parseStyle(r),n.name):a&&(r=a.call(u,r,t,n.name)),n.attr(t,0<r.length?r:null))}),t.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),t.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,o=e.length;o--;)"bookmark"!==(r=e[o]).attr("data-mce-type")||n.cleanup||(T.from(r.firstChild).exists(function(e){return!Ta(e.value)})?r.unwrap():r.remove())}),t.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=ui.decode(t.value))}),t.addNodeFilter("script,style",function(e,t){for(var n,r,o,i=e.length,a=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")};i--;)r=(n=e[i]).firstChild?n.firstChild.value:"","script"===t?((o=n.attr("type"))&&n.attr("type","mce-no/type"===o?null:o.replace(/^mce\-/,"")),"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="// <![CDATA[\n"+a(r)+"\n// ]]>")):"xhtml"===s.element_format&&0<r.length&&(n.firstChild.value="\x3c!--\n"+a(r)+"\n--\x3e")}),t.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),t.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){A(e,function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())})}),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})},fp=function(e){var t,n,r=function(e){return e&&"br"===e.name};r(t=e.lastChild)&&r(n=t.prev)&&(t.remove(),n.remove())},dp=function(e,t,n){return f=n,(c=e)&&c.hasEventListeners("PreProcess")&&!f.no_events?(o=t,i=n,l=(r=e).dom,o=o.cloneNode(!0),(a=j.document.implementation).createHTMLDocument&&(u=a.createHTMLDocument(""),en.each("BODY"===o.nodeName?o.childNodes:[o],function(e){u.body.appendChild(u.importNode(e,!0))}),o="BODY"!==o.nodeName?u.body.firstChild:u.body,s=l.doc,l.doc=u),Pf(r,lp(i,{node:o})),s&&(l.doc=s),o):t;var r,o,i,a,u,s,l,c,f},hp=function(e,a,u){e.addNodeFilter("font",function(e){A(e,function(e){var t,n=a.parse(e.attr("style")),r=e.attr("color"),o=e.attr("face"),i=e.attr("size");r&&(n.color=r),o&&(n["font-family"]=o),i&&(n["font-size"]=u[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",a.serialize(n)),t=e,A(["color","face","size"],function(e){t.attr(e,null)})})})},mp=function(e,t){var n,r=wi();t.convert_fonts_to_spans&&hp(e,r,en.explode(t.font_size_legacy_values)),n=r,e.addNodeFilter("strike",function(e){A(e,function(e){var t=n.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",n.serialize(t))})})},gp=function(e,t){t.inline_styles&&mp(e,t)},pp=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new Ql("br",1)).shortEnded=!0:r.empty().append(new Ql("#text",3)).value="\xa0"},vp=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},yp=function(r,e,t,n){return n.isEmpty(e,t,function(e){return t=e,(n=r.getElementRule(t.name))&&n.paddEmpty;var t,n})},bp=en.makeMap,Cp=en.each,wp=en.explode,xp=en.extend,zp=function(T,A){void 0===A&&(A=yi());var M={},R=[],D={},B={};(T=T||{}).validate=!("validate"in T)||T.validate,T.root_name=T.root_name||"body";var e,g,p,O=function(e){var t,n,r;(n=e.name)in M&&((r=D[n])?r.push(e):D[n]=[e]),t=R.length;for(;t--;)(n=R[t].name)in e.attributes.map&&((r=B[n])?r.push(e):B[n]=[e]);return e},t={schema:A,addAttributeFilter:function(e,n){Cp(wp(e),function(e){var t;for(t=0;t<R.length;t++)if(R[t].name===e)return void R[t].callbacks.push(n);R.push({name:e,callbacks:[n]})})},getAttributeFilters:function(){return[].concat(R)},addNodeFilter:function(e,n){Cp(wp(e),function(e){var t=M[e];t||(M[e]=t=[]),t.push(n)})},getNodeFilters:function(){var e=[];for(var t in M)M.hasOwnProperty(t)&&e.push({name:t,callbacks:M[t]});return e},filterNode:O,parse:function(e,u){var t,n,r,o,i,a,s,l,c,f,d,h=[];u=u||{},D={},B={},c=xp(bp("script,style,head,html,body,title,meta,param"),A.getBlockElements());var m,g=A.getNonEmptyElements(),p=A.children,v=T.validate,y="forced_root_block"in u?u.forced_root_block:T.forced_root_block,b=!1===(m=y)?"":!0===m?"p":m,C=A.getWhiteSpaceElements(),w=/^[ \t\r\n]+/,x=/[ \t\r\n]+$/,z=/[ \t\r\n]+/g,N=/^[ \t\r\n]+$/;f=C.hasOwnProperty(u.context)||C.hasOwnProperty(T.root_name);var E=function(e,t){var n,r=new Ql(e,t);return e in M&&((n=D[e])?n.push(r):D[e]=[r]),r},S=function(e){var t,n,r,o,i=A.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(x,"")).length)return void(t.value=r);if(n=t.next){if(3===n.type&&n.value.length){t=t.prev;continue}if(!i[n.name]&&"script"!==n.name&&"style"!==n.name){t=t.prev;continue}}o=t.prev,t.remove(),t=o}};t=rc({validate:v,allow_script_urls:T.allow_script_urls,allow_conditional_comments:T.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!==t&&(n[t]=e[t]);return n}(A.getSelfClosingElements()),cdata:function(e){d.append(E("#cdata",4)).value=e},text:function(e,t){var n,r,o;f||(e=e.replace(z," "),r=d.lastChild,o=c,r&&(o[r.name]||"br"===r.name)&&(e=e.replace(w,""))),0!==e.length&&((n=E("#text",3)).raw=!!t,d.append(n).value=e)},comment:function(e){d.append(E("#comment",8)).value=e},pi:function(e,t){d.append(E(e,7)).value=t,S(d)},doctype:function(e){d.append(E("#doctype",10)).value=e,S(d)},start:function(e,t,n){var r,o,i,a,u;if(i=v?A.getElementRule(e):{}){for((r=E(i.outputName||e,1)).attributes=t,r.shortEnded=n,d.append(r),(u=p[d.name])&&p[r.name]&&!u[r.name]&&h.push(r),o=R.length;o--;)(a=R[o].name)in t.map&&((s=B[a])?s.push(r):B[a]=[r]);c[e]&&S(r),n||(d=r),!f&&C[e]&&(f=!0)}},end:function(e){var t,n,r,o,i,a;if(n=v?A.getElementRule(e):{}){if(c[e]&&!f){if((t=d.firstChild)&&3===t.type)if(0<(r=t.value.replace(w,"")).length)t.value=r,t=t.next;else for(o=t.next,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.next,(0===r.length||N.test(r))&&(t.remove(),t=o),t=o;if((t=d.lastChild)&&3===t.type)if(0<(r=t.value.replace(x,"")).length)t.value=r,t=t.prev;else for(o=t.prev,t.remove(),t=o;t&&3===t.type;)r=t.value,o=t.prev,(0===r.length||N.test(r))&&(t.remove(),t=o),t=o}if(f&&C[e]&&(f=!1),n.removeEmpty&&yp(A,g,C,d)&&!d.attr("name")&&!d.attr("id"))return i=d.parent,c[d.name]?d.empty().remove():d.unwrap(),void(d=i);n.paddEmpty&&(vp(a=d,"#text")&&"\xa0"===a.firstChild.value||yp(A,g,C,d))&&pp(T,u,c,d),d=d.parent}}},A);var k=d=new Ql(u.context||T.root_name,11);if(t.parse(e),v&&h.length&&(u.context?u.invalid=!0:function(e){var t,n,r,o,i,a,u,s,l,c,f,d,h,m,g,p;for(d=bp("tr,td,th,tbody,thead,tfoot,table"),c=A.getNonEmptyElements(),f=A.getWhiteSpaceElements(),h=A.getTextBlockElements(),m=A.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(h[n.name]&&"li"===n.parent.name){for(g=n.next;g&&h[g.name];)g.name="li",g.fixed=!0,n.parent.insert(g,n.parent),g=g.next;n.unwrap(n)}else{for(o=[n],r=n.parent;r&&!A.isValidChild(r.name,n.name)&&!d[r.name];r=r.parent)o.push(r);if(r&&1<o.length){for(o.reverse(),i=a=O(o[0].clone()),l=0;l<o.length-1;l++){for(A.isValidChild(a.name,o[l].name)?(u=O(o[l].clone()),a.append(u)):u=a,s=o[l].firstChild;s&&s!==o[l+1];)p=s.next,u.append(s),s=p;a=u}yp(A,c,f,i)?r.insert(n,o[0],!0):(r.insert(i,o[0],!0),r.insert(n,i)),r=o[0],(yp(A,c,f,r)||vp(r,"br"))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((g=n.prev)&&("ul"===g.name||"ul"===g.name)){g.append(n);continue}if((g=n.next)&&("ul"===g.name||"ul"===g.name)){g.insert(n,g.firstChild,!0);continue}n.wrap(O(new Ql("ul",1)));continue}A.isValidChild(n.parent.name,"div")&&A.isValidChild("div",n.name)?n.wrap(O(new Ql("div",1))):m[n.name]?n.empty().remove():n.unwrap()}}}(h)),b&&("body"===k.name||u.isRootContent)&&function(){var e,t,n=k.firstChild,r=function(e){e&&((n=e.firstChild)&&3===n.type&&(n.value=n.value.replace(w,"")),(n=e.lastChild)&&3===n.type&&(n.value=n.value.replace(x,"")))};if(A.isValidChild(k.name,b.toLowerCase())){for(;n;)e=n.next,3===n.type||1===n.type&&"p"!==n.name&&!c[n.name]&&!n.attr("data-mce-type")?(t||((t=E(b,1)).attr(T.forced_root_block_attrs),k.insert(t,n)),t.append(n)):(r(t),t=null),n=e;r(t)}}(),!u.invalid){for(l in D)if(D.hasOwnProperty(l)){for(s=M[l],i=(n=D[l]).length;i--;)n[i].parent||n.splice(i,1);for(r=0,o=s.length;r<o;r++)s[r](n,l,u)}for(r=0,o=R.length;r<o;r++)if((s=R[r]).name in B){for(i=(n=B[s.name]).length;i--;)n[i].parent||n.splice(i,1);for(i=0,a=s.callbacks.length;i<a;i++)s.callbacks[i](n,s.name,u)}}return k}};return p=(e=t).schema,(g=T).remove_trailing_brs&&e.addNodeFilter("br",function(e,t,n){var r,o,i,a,u,s,l,c,f=e.length,d=en.extend({},p.getBlockElements()),h=p.getNonEmptyElements(),m=p.getNonEmptyElements();for(d.body=1,r=0;r<f;r++)if(i=(o=e[r]).parent,d[o.parent.name]&&o===i.lastChild){for(u=o.prev;u;){if("span"!==(s=u.name)||"bookmark"!==u.attr("data-mce-type")){if("br"!==s)break;if("br"===s){o=null;break}}u=u.prev}o&&(o.remove(),yp(p,h,m,i)&&(l=p.getElementRule(i.name))&&(l.removeEmpty?i.remove():l.paddEmpty&&pp(g,n,d,i)))}else{for(a=o;i&&i.firstChild===a&&i.lastChild===a&&!d[(a=i).name];)i=i.parent;a===i&&!0!==g.padd_empty_with_br&&((c=new Ql("#text",3)).value="\xa0",o.replace(c))}}),e.addAttributeFilter("href",function(e){var t,n,r,o=e.length;if(!g.allow_unsafe_link_target)for(;o--;)"a"===(t=e[o]).name&&"_blank"===t.attr("target")&&t.attr("rel",(n=t.attr("rel"),r=n?en.trim(n):"",/\b(noopener)\b/g.test(r)?r:r.split(" ").filter(function(e){return 0<e.length}).concat(["noopener"]).sort().join(" ")))}),g.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href"))for(r=o.parent,t=o.lastChild;n=t.prev,r.insert(t,o),t=n;);}),g.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new Ql("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),g.validate&&p.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t,n,r,o,i,a,u,s=e.length,l=p.getValidClasses();s--;){for(n=(t=e[s]).attr("class").split(" "),i="",r=0;r<n.length;r++)o=n[r],u=!1,(a=l["*"])&&a[o]&&(u=!0),a=l[t.name],!u&&a&&a[o]&&(u=!0),u&&(i&&(i+=" "),i+=o);i.length||(i=null),t.attr("class",i)}}),gp(t,T),t},Np=function(e,t,n){-1===en.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},Ep=function(e,t,n,r,o){var i,a,u,s,l=(i=r,jc(t,n).serialize(i));return a=e,s=l,(u=o).no_events||!a?s:Vf(a,lp(u,{content:s})).content},Sp=function(g,p){var v,y,b,e=["data-mce-selected"];v=p&&p.dom?p.dom:Di.DOM,y=p&&p.schema?p.schema:yi(g),g.entity_encoding=g.entity_encoding||"named",g.remove_trailing_brs=!("remove_trailing_brs"in g)||g.remove_trailing_brs,b=zp(g,y),cp(b,g,v);return{schema:y,addNodeFilter:b.addNodeFilter,addAttributeFilter:b.addAttributeFilter,serialize:function(e,t){var n,r,o,i,a,u,s,l,c,f=lp({format:"html"},t||{}),d=dp(p,e,f),h=(n=v,r=d,i=Ma((o=f).getInner?r.innerHTML:n.getOuterHTML(r)),o.selection||Ko(cr.fromDom(r))?i:en.trim(i)),m=(a=b,u=h,l=(s=f).selection?lp({forced_root_block:!1},s):s,c=a.parse(u,l),fp(c),c);return"tree"===f.format?m:Ep(p,g,y,m,f)},addRules:function(e){y.addValidElements(e)},setRules:function(e){y.setValidElements(e)},addTempAttr:d(Np,b,e),getTempAttrs:function(){return e}}},kp=function(e,t){var n=Sp(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs}};function Tp(e){return{getBookmark:d(wl,e),moveToBookmark:d(xl,e)}}(Tp||(Tp={})).isBookmarkNode=zl;var Ap=Tp,Mp=Oo.isContentEditableFalse,Rp=Oo.isContentEditableTrue,Dp=function(r,a){var u,s,l,c,f,d,h,m,g,p,v,y,i,b,C,w,x,z=a.dom,N=en.each,E=a.getDoc(),S=j.document,k=Math.abs,T=Math.round,A=a.getBody();c={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var M=function(e){return e&&("IMG"===e.nodeName||a.dom.is(e,"figure.image"))},e=function(e){var t,n,r=e.target;t=e,n=a.selection.getRng(),!M(t.target)||Mh(t.clientX,t.clientY,n)||e.isDefaultPrevented()||a.selection.select(r)},R=function(e){return a.dom.is(e,"figure.image")?e.querySelector("img"):e},D=function(e){var t=a.settings.object_resizing;return!1!==t&&!He.iOS&&("string"!=typeof t&&(t="table,img,figure.image,div"),"false"!==e.getAttribute("data-mce-resize")&&(e!==a.getBody()&&qr(cr.fromDom(e),t)))},B=function(e){var t,n,r,o;t=e.screenX-d,n=e.screenY-h,b=t*f[2]+p,C=n*f[3]+v,b=b<5?5:b,C=C<5?5:C,(M(u)&&!1!==a.settings.resize_img_proportional?!Ph.modifierPressed(e):Ph.modifierPressed(e)||M(u)&&f[2]*f[3]!=0)&&(k(t)>k(n)?(C=T(b*y),b=T(C/y)):(b=T(C/y),C=T(b*y))),z.setStyles(R(s),{width:b,height:C}),r=0<(r=f.startPos.x+t)?r:0,o=0<(o=f.startPos.y+n)?o:0,z.setStyles(l,{left:r,top:o,display:"block"}),l.innerHTML=b+" &times; "+C,f[2]<0&&s.clientWidth<=b&&z.setStyle(s,"left",m+(p-b)),f[3]<0&&s.clientHeight<=C&&z.setStyle(s,"top",g+(v-C)),(t=A.scrollWidth-w)+(n=A.scrollHeight-x)!==0&&z.setStyles(l,{left:r-t,top:o-n}),i||(jf(a,u,p,v),i=!0)},O=function(){i=!1;var e=function(e,t){t&&(u.style[e]||!a.schema.isValid(u.nodeName.toLowerCase(),e)?z.setStyle(R(u),e,t):z.setAttrib(R(u),e,t))};e("width",b),e("height",C),z.unbind(E,"mousemove",B),z.unbind(E,"mouseup",O),S!==E&&(z.unbind(S,"mousemove",B),z.unbind(S,"mouseup",O)),z.remove(s),z.remove(l),o(u),qf(a,u,b,C),z.setAttrib(u,"style",z.getAttrib(u,"style")),a.nodeChanged()},o=function(e){var t,r,o,n,i;H(),L(),t=z.getPos(e,A),m=t.x,g=t.y,i=e.getBoundingClientRect(),r=i.width||i.right-i.left,o=i.height||i.bottom-i.top,u!==e&&(u=e,b=C=0),n=a.fire("ObjectSelected",{target:e}),D(e)&&!n.isDefaultPrevented()?N(c,function(n,e){var t;(t=z.get("mceResizeHandle"+e))&&z.remove(t),t=z.add(A,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===He.ie&&(t.contentEditable=!1),z.bind(t,"mousedown",function(e){var t;e.stopImmediatePropagation(),e.preventDefault(),d=(t=e).screenX,h=t.screenY,p=R(u).clientWidth,v=R(u).clientHeight,y=v/p,(f=n).startPos={x:r*n[0]+m,y:o*n[1]+g},w=A.scrollWidth,x=A.scrollHeight,s=u.cloneNode(!0),z.addClass(s,"mce-clonedresizable"),z.setAttrib(s,"data-mce-bogus","all"),s.contentEditable=!1,s.unSelectabe=!0,z.setStyles(s,{left:m,top:g,margin:0}),s.removeAttribute("data-mce-selected"),A.appendChild(s),z.bind(E,"mousemove",B),z.bind(E,"mouseup",O),S!==E&&(z.bind(S,"mousemove",B),z.bind(S,"mouseup",O)),l=z.add(A,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},p+" &times; "+v)}),n.elm=t,z.setStyles(t,{left:r*n[0]+m-t.offsetWidth/2,top:o*n[1]+g-t.offsetHeight/2})}):H(),u.setAttribute("data-mce-selected","1")},H=function(){var e,t;for(e in L(),u&&u.removeAttribute("data-mce-selected"),c)(t=z.get("mceResizeHandle"+e))&&(z.unbind(t),z.remove(t))},n=function(e){var t,n=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};i||a.removed||(N(z.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),t="mousedown"===e.type?e.target:r.getNode(),n(t=z.$(t).closest("table,img,figure.image,hr")[0],A)&&(P(),n(r.getStart(!0),t)&&n(r.getEnd(!0),t))?o(t):H())},_=function(e){return Mp(function(e,t){for(;t&&t!==e;){if(Rp(t)||Mp(t))return t;t=t.parentNode}return null}(a.getBody(),e))},L=function(){for(var e in c){var t=c[e];t.elm&&(z.unbind(t.elm),delete t.elm)}},P=function(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}};a.on("init",function(){P(),He.ie&&11<=He.ie&&(a.on("mousedown click",function(e){var t=e.target,n=t.nodeName;i||!/^(TABLE|IMG|HR)$/.test(n)||_(t)||(2!==e.button&&a.selection.select(t,"TABLE"===n),"mousedown"===e.type&&a.nodeChanged())}),a.dom.bind(A,"mscontrolselect",function(e){var t=function(e){Ie.setEditorTimeout(a,function(){a.selection.select(e)})};if(_(e.target))return e.preventDefault(),void t(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&t(e.target))}));var t=Ie.throttle(function(e){a.composing||n(e)});a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",t),a.on("keyup compositionend",function(e){u&&"TABLE"===u.nodeName&&t(e)}),a.on("hide blur",H),a.on("contextmenu",e,!0)}),a.on("remove",L);return{isResizable:D,showResizeRect:o,hideResizeRect:H,updateResizeRect:n,destroy:function(){u=s=null}}};var Bp=function nE(r,o){var e=function(e){var t=o(e);if(t<=0||null===t){var n=Or(e,r);return parseFloat(n)||0}return t},i=function(o,e){return M(e,function(e,t){var n=Or(o,t),r=n===undefined?0:parseInt(n,10);return isNaN(r)?e:e+r},0)};return{set:function(e,t){if(!C(t)&&!t.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+t);var n=e.dom();kr(n)&&(n.style[r]=t+"px")},get:e,getOuter:e,aggregate:i,max:function(e,t,n){var r=i(e,n);return r<t?t-r:0}}}("height",function(e){var t=e.dom();return Tr(e)?t.getBoundingClientRect().height:t.offsetHeight}),Op=function(n,r){return{left:$(n),top:$(r),translate:function(e,t){return Op(n+e,r+t)}}},Hp=Op,_p=function(e,t){return e!==undefined?e:t!==undefined?t:0},Lp=function(e){var t,n,r=e.dom().ownerDocument,o=r.body,i=(t=cr.fromDom(r),(n=t.dom())===n.window&&t instanceof j.Window?t:yr(t)?n.defaultView||n.parentWindow:null),a=r.documentElement,u=_p(i.pageYOffset,a.scrollTop),s=_p(i.pageXOffset,a.scrollLeft),l=_p(a.clientTop,o.clientTop),c=_p(a.clientLeft,o.clientLeft);return Pp(e).translate(s-c,u-l)},Pp=function(e){var t,n,r,o=e.dom(),i=o.ownerDocument,a=i.body,u=cr.fromDom(i.documentElement);return a===o?Hp(a.offsetLeft,a.offsetTop):(t=e,n=u||cr.fromDom(j.document.documentElement),ca(t,d(Wr,n)).isSome()?(r=o.getBoundingClientRect(),Hp(r.left,r.top)):Hp(0,0))},Vp=sr.detect().browser.isSafari(),Ip=function(e){var t=e!==undefined?e.dom():j.document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Hp(n,r)},Fp=function(e,t,n){(n!==undefined?n.dom():j.document).defaultView.scrollTo(e,t)},Up=function(e,t){Vp&&b(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)},jp=function(r,e){return r.view(e).fold($([]),function(e){var t=r.owner(e),n=jp(r,t);return[e].concat(n)})},qp=/* */Object.freeze({view:function(e){return(e.dom()===j.document?T.none():T.from(e.dom().defaultView.frameElement)).map(cr.fromDom)},owner:function(e){return Xr(e)}}),$p=function(e){var t,n,r,o=cr.fromDom(j.document),i=Ip(o),a=(t=e,r=(n=qp).owner(t),jp(n,r)),u=Pp(e),s=k(a,function(e,t){var n=Pp(t);return{left:e.left+n.left(),top:e.top+n.top()}},{left:0,top:0});return Hp(s.left+u.left()+i.left(),s.top+u.top()+i.top())},Wp=function(e){return"textarea"===mr(e)},Kp=function(e,t){var n,r=Lp(e),o=(n=e,Bp.get(n));return{element:e,bottom:r.top()+o,pos:r,cleanup:t}},Xp=function(e,t){var n=function(e,t){var n=to(e);if(0===n.length||Wp(e))return{element:e,offset:t};if(t<n.length&&!Wp(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return Wp(r)?{element:e,offset:t}:"img"===mr(r)?{element:r,offset:1}:vr(r)?{element:r,offset:jl(r).length}:{element:r,offset:to(r).length}}(e,t),r=cr.fromHtml('<span data-mce-bogus="all">'+Aa+"</span>");return qi(n.element,r),Kp(r,function(){return Gi(r)})},Yp=function(e){return Kp(cr.fromDom(e),i)},Gp=function(n,r,o,i){Zp(n,function(e,t){return Jp(n,r,o,i)},o)},Jp=function(e,t,n,r){var o=cr.fromDom(e.getBody()),i=cr.fromDom(e.getDoc());o.dom().offsetWidth;var a=Ip(i).top(),u=Xp(cr.fromDom(n.startContainer),n.startOffset);t(i,a,u,r),u.cleanup()},Qp=function(e,t,n,r){var o=cr.fromDom(e.getDoc());n(o,Ip(o).top(),t,r)},Zp=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(cr.fromDom(r),cr.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},ev=function(e,t,n,r){var o=e.pos;if(n)Fp(o.left(),o.top(),r);else{var i=o.top()-t+(e.bottom-o.top());Fp(o.left(),i,r)}},tv=function(e,t,n,r,o){r.pos.top()<t?ev(r,n,!1!==o,e):r.bottom>n+t&&ev(r,n,!0===o,e)},nv=function(e,t,n,r){var o=e.dom().defaultView.innerHeight;tv(e,t,o,n,r)},rv=function(e,t,n,r,o){var i=t.dom().defaultView.innerHeight;tv(t,n,i,r,o);var a=$p(r.element),u=Ip().top(),s=j.window.innerHeight+u;a.top()<u?Up(r.element,!1!==o):a.top()>s&&Up(r.element,!0===o)},ov=function(e,t,n){return Gp(e,d(nv),t,n)},iv=function(e,t,n){return Qp(e,Yp(t),d(nv),n)},av=function(e,t,n){return Gp(e,d(rv,e),t,n)},uv=function(e,t,n){return Qp(e,Yp(t),d(rv,e),n)},sv=function(e,t,n){var r,o;r=t,o=n,e.fire("ScrollIntoView",{elm:r,alignToTop:o}).isDefaultPrevented()||(e.inline?iv:uv)(e,t,n)},lv=function(e,t,n){(e.inline?ov:av)(e,t,n)},cv=function(e){return Oo.isContentEditableTrue(e)||Oo.isContentEditableFalse(e)},fv=function(e,t,n){var r,o,i,a,u,s=n;if(s.caretPositionFromPoint)(o=s.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(s.body.createTextRange){r=s.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(l){r=function(e,n,t){var r,o,i;if(r=t.elementFromPoint(e,n),o=t.body.createTextRange(),r&&"HTML"!==r.tagName||(r=t.body),o.moveToElementText(r),0<(i=(i=en.toArray(o.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(e,n),o.collapse(!0),o}catch(a){}}return null}(e,t,n)}return i=r,a=n.body,u=i&&i.parentElement?i.parentElement():null,Oo.isContentEditableFalse(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(u,a,cv))?null:i}return r},dv=function(n,e){return X(e,function(e){var t=n.fire("GetSelectionRange",{range:e});return t.range!==e?t.range:e})},hv=function(e,t){var n=(t||j.document).createDocumentFragment();return A(e,function(e){n.appendChild(e.dom())}),cr.fromDom(n)},mv=Lr("element","width","rows"),gv=Lr("element","cells"),pv=Lr("x","y"),vv=function(e,t){var n=parseInt(Dr(e,t),10);return isNaN(n)?1:n},yv=function(e){return M(e,function(e,t){return t.cells().length>e?t.cells().length:e},0)},bv=function(e,t){for(var n=e.rows(),r=0;r<n.length;r++)for(var o=n[r].cells(),i=0;i<o.length;i++)if(Wr(o[i],t))return T.some(pv(i,r));return T.none()},Cv=function(e,t,n,r,o){for(var i=[],a=e.rows(),u=n;u<=o;u++){var s=a[u].cells(),l=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(gv(a[u].element(),l))}return i},wv=function(e){var o=mv(Na(e),0,[]);return A(ua(e,"tr"),function(n,r){A(ua(n,"td,th"),function(e,t){!function(e,t,n,r,o){for(var i=vv(o,"rowspan"),a=vv(o,"colspan"),u=e.rows(),s=n;s<n+i;s++){u[s]||(u[s]=gv(Ea(r),[]));for(var l=t;l<t+a;l++)u[s].cells()[l]=s===n&&l===t?o:Na(o)}}(o,function(e,t,n){for(;r=t,o=n,i=void 0,((i=e.rows())[o]?i[o].cells():[])[r];)t++;var r,o,i;return t}(o,t,r),r,n,e)})}),mv(o.element(),yv(o.rows()),o.rows())},xv=function(e){return n=X((t=e).rows(),function(e){var t=X(e.cells(),function(e){var t=Ea(e);return Br(t,"colspan"),Br(t,"rowspan"),t}),n=Na(e.element());return Xi(n,t),n}),r=Na(t.element()),o=cr.fromTag("tbody"),Xi(o,n),Ki(r,o),r;var t,n,r,o},zv=function(c,e,t){return bv(c,e).bind(function(l){return bv(c,t).map(function(e){return t=c,r=e,o=(n=l).x(),i=n.y(),a=r.x(),u=r.y(),s=i<u?Cv(t,o,i,a,u):Cv(t,o,u,a,i),mv(t.element(),yv(s),s);var t,n,r,o,i,a,u,s})})},Nv=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Ev=Nv,Sv=function(e){return H(e,function(e){var t=uu(e);return t?[cr.fromDom(t)]:[]})},kv=function(e){return 1<Nv(e).length},Tv=function(e){return S(Sv(e),Wo)},Av=function(e){return ua(e,"td[data-mce-selected],th[data-mce-selected]")},Mv=function(e,t){var n=Av(t),r=Tv(e);return 0<n.length?n:r},Rv=Mv,Dv=function(e){return Mv(Ev(e.selection.getSel()),cr.fromDom(e.getBody()))},Bv=function(n,t){return R(n,function(e){return"li"===mr(e)&&Zd(e,t)}).fold($([]),function(e){return(t=n,R(t,function(e){return"ul"===mr(e)||"ol"===mr(e)})).map(function(e){return[cr.fromTag("li"),cr.fromTag(mr(e))]}).getOr([]);var t})},Ov=function(e,t){var n,r=cr.fromDom(t.commonAncestorContainer),o=$d(r,e),i=S(o,function(e){return Vo(e)||Lo(e)}),a=Bv(o,t),u=i.concat(a.length?a:jo(n=r)?Gr(n).filter(Uo).fold($([]),function(e){return[n,e]}):Uo(n)?[n]:[]);return X(u,Na)},Hv=function(){return hv([])},_v=function(e,t){return n=cr.fromDom(t.cloneContents()),r=Ov(e,t),o=M(r,function(e,t){return Ki(t,e),t},n),0<r.length?hv([o]):o;var n,r,o},Lv=function(e,o){return(t=e,n=o[0],da(n,"table",d(Wr,t))).bind(function(e){var t=o[0],n=o[o.length-1],r=wv(e);return zv(r,t,n).map(function(e){return hv([xv(e)])})}).getOrThunk(Hv);var t,n},Pv=function(e,t){var n,r,o=Rv(t,e);return 0<o.length?Lv(e,o):(n=e,0<(r=t).length&&r[0].collapsed?Hv():_v(n,r[0]))},Vv=function(e,t){if(void 0===t&&(t={}),t.get=!0,t.format=t.format||"html",t.selection=!0,(t=e.fire("BeforeGetContent",t)).isDefaultPrevented())return e.fire("GetContent",t),t.content;if("text"===t.format)return l=e,T.from(l.selection.getRng()).map(function(e){var t=l.dom.add(l.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),n=Ma(t.innerText);return l.dom.remove(t),n}).getOr("");t.getInner=!0;var n,r,o,i,a,u,s,l,c=(r=t,i=(n=e).selection.getRng(),a=n.dom.create("body"),u=n.selection.getSel(),s=dv(n,Ev(u)),(o=r.contextual?Pv(cr.fromDom(n.getBody()),s).dom():i.cloneContents())&&a.appendChild(o),n.selection.serializer.serialize(a,r));return"tree"===t.format?c:(t.content=e.selection.isCollapsed()?"":c,e.fire("GetContent",t),t.content)},Iv=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)},Fv=function(e,t,n){return Iv(e,t,function(e){return e.nodeName===n})},Uv=function(e){return e&&"TABLE"===e.nodeName},jv=function(e,t,n){for(var r=new Ho(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Oo.isBr(t))return!0},qv=function(e,t,n,r,o){var i,a,u=e.getRoot(),s=e.schema.getNonEmptyElements(),l=e.getParent(o.parentNode,e.isBlock)||u;if(r&&Oo.isBr(o)&&t&&e.isEmpty(l))return T.some(Bu(o.parentNode,e.nodeIndex(o)));for(var c,f,d=new Ho(o,l);a=d[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||(f=u,Ha(c=a)&&!1===Iv(c,f,is)))return T.none();if(Oo.isText(a)&&0<a.nodeValue.length)return!1===Fv(a,u,"A")?T.some(Bu(a,r?a.nodeValue.length:0)):T.none();if(e.isBlock(a)||s[a.nodeName.toLowerCase()])return T.none();i=a}return n&&i?T.some(Bu(i,0)):T.none()},$v=function(e,t,n,r){var o,i,a,u,s,l,c,f,d,h=e.getRoot(),m=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],l=Oo.isElement(o)&&i===o.childNodes.length,u=e.schema.getNonEmptyElements(),s=n,Ha(o))return T.none();if(Oo.isElement(o)&&i>o.childNodes.length-1&&(s=!1),Oo.isDocument(o)&&(o=h,i=0),o===h){if(s&&(a=o.childNodes[0<i?i-1:0])){if(Ha(a))return T.none();if(u[a.nodeName]||Uv(a))return T.none()}if(o.hasChildNodes()){if(i=Math.min(!s&&0<i?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Oo.isText(o)&&l?o.data.length:0,!t&&o===h.lastChild&&Uv(o))return T.none();if(function(e,t){for(;t&&t!==e;){if(Oo.isContentEditableFalse(t))return!0;t=t.parentNode}return!1}(h,o)||Ha(o))return T.none();if(o.hasChildNodes()&&!1===Uv(o)){var g=new Ho(a=o,h);do{if(Oo.isContentEditableFalse(a)||Ha(a)){m=!1;break}if(Oo.isText(a)&&0<a.nodeValue.length){i=s?0:a.nodeValue.length,o=a,m=!0;break}if(u[a.nodeName.toLowerCase()]&&(!(c=a)||!/^(TD|TH|CAPTION)$/.test(c.nodeName))){i=e.nodeIndex(a),o=a.parentNode,s||i++,m=!0;break}}while(a=s?g.next():g.prev())}}}return t&&(Oo.isText(o)&&0===i&&qv(e,l,t,!0,o).each(function(e){o=e.container(),i=e.offset(),m=!0}),Oo.isElement(o)&&((a=o.childNodes[i])||(a=o.childNodes[i-1]),!a||!Oo.isBr(a)||(d="A",(f=a).previousSibling&&f.previousSibling.nodeName===d)||jv(e,a,!1)||jv(e,a,!0)||qv(e,l,t,!0,a).each(function(e){o=e.container(),i=e.offset(),m=!0}))),s&&!t&&Oo.isText(o)&&i===o.nodeValue.length&&qv(e,l,t,!1,o).each(function(e){o=e.container(),i=e.offset(),m=!0}),m?T.some(Bu(o,i)):T.none()},Wv=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=Bu.fromRangeStart(t);return $v(e,n,!0,r).each(function(e){n&&Bu.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||$v(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Gd(t,r)?T.none():T.some(r)},Kv=function(e){return 0===e.dom().length?(Gi(e),T.none()):T.some(e)},Xv=function(e,t,n){var r,o;if(o=t,(r=(r=n)||{format:"html"}).set=!0,r.selection=!0,r.content=o,(n=r).no_events||!(n=e.fire("BeforeSetContent",n)).isDefaultPrevented()){var i=e.selection.getRng();!function(r,e){var t=T.from(e.firstChild).map(cr.fromDom),n=T.from(e.lastChild).map(cr.fromDom);r.deleteContents(),r.insertNode(e);var o=t.bind(Jr).filter(vr).bind(Kv),i=n.bind(Qr).filter(vr).bind(Kv);fu([o,t.filter(vr)],function(e,t){var n,r;n=t.dom(),r=e.dom().data,n.insertData(0,r),Gi(e)}),fu([i,n.filter(vr)],function(e,t){var n=t.dom().length;t.dom().appendData(e.dom().data),r.setEnd(t.dom(),n),Gi(e)}),r.collapse(!1)}(i,i.createContextualFragment(n.content)),e.selection.setRng(i),lv(e,i),n.no_events||e.fire("SetContent",n)}else e.fire("SetContent",n)},Yv=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return T.from(i).map(cr.fromDom).map(function(e){return r&&t.collapsed?e:no(e,o(e,a)).getOr(e)}).bind(function(e){return pr(e)?T.some(e):Gr(e)}).map(function(e){return e.dom()}).getOr(e)},Gv=function(e,t,n){return Yv(e,t,!0,n,function(e,t){return Math.min(e.dom().childNodes.length,t)})},Jv=function(e,t,n){return Yv(e,t,!1,n,function(e,t){return 0<t?t-1:t})},Qv=function(e,t){for(var n=e;e&&Oo.isText(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},Zv=function(e,t,n){if(e&&e.hasOwnProperty(t)){var r=S(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}};var ey,ty,ny=function(e){return!!e.select},ry=function(e){return!(!e||!e.ownerDocument)&&Kr(cr.fromDom(e.ownerDocument),cr.fromDom(e))},oy=function(u,s,e,l){var n,t,c,f,r=function p(i,n){var a,u;return{selectorChangedWithUnbind:function(e,t){return a||(a={},u={},n.on("NodeChange",function(e){var n=e.element,r=i.getParents(n,null,i.getRoot()),o={};en.each(a,function(e,n){en.each(r,function(t){if(i.is(t,n))return u[n]||(en.each(e,function(e){e(!0,{node:t,selector:n,parents:r})}),u[n]=e),o[n]=e,!1})}),en.each(u,function(e,t){o[t]||(delete u[t],en.each(e,function(e){e(!1,{node:n,selector:t,parents:r})}))})})),a[e]||(a[e]=[]),a[e].push(t),{unbind:function(){Zv(a,e,t),Zv(u,e,t)}}}}}(u,l).selectorChangedWithUnbind,o=function(e,t){return Xv(l,e,t)},i=function(e){var t=h();t.collapse(!!e),a(t)},d=function(){return s.getSelection?s.getSelection():s.document.selection},h=function(){var e,t,n,r,o=function(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}};if(!s)return null;if(null==(r=s.document))return null;if(l.bookmark!==undefined&&!1===Bf(l)){var i=gf(l);if(i.isSome())return i.map(function(e){return dv(l,[e])[0]}).getOr(r.createRange())}try{(e=d())&&!Oo.isRestrictedNode(e.anchorNode)&&(t=0<e.rangeCount?e.getRangeAt(0):e.createRange?e.createRange():r.createRange())}catch(a){}return(t=dv(l,[t])[0])||(t=r.createRange?r.createRange():r.body.createTextRange()),t.setStart&&9===t.startContainer.nodeType&&t.collapsed&&(n=u.getRoot(),t.setStart(n,0),t.setEnd(n,0)),c&&f&&(0===o(t.START_TO_START,t,c)&&0===o(t.END_TO_END,t,c)?t=f:f=c=null),t},a=function(e,t){var n,r;if((o=e)&&(ny(o)||ry(o.startContainer)&&ry(o.endContainer))){var o,i=ny(e)?e:null;if(i){f=null;try{i.select()}catch(a){}}else{if(n=d(),e=l.fire("SetSelectionRange",{range:e,forward:t}).range,n){f=e;try{n.removeAllRanges(),n.addRange(e)}catch(a){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),c=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!n.setBaseAndExtent||He.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(r=e.startContainer.childNodes[e.startOffset])&&"IMG"===r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1)),l.fire("AfterSetSelectionRange",{range:e,forward:t})}}},m=function(){var e,t,n=d();return!(n&&n.anchorNode&&n.focusNode)||((e=u.createRng()).setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),(t=u.createRng()).setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},g={bookmarkManager:null,controlSelection:null,dom:u,win:s,serializer:e,editor:l,collapse:i,setCursorLocation:function(e,t){var n=u.createRng();e?(n.setStart(e,t),n.setEnd(e,t),a(n),i(!1)):(eh(u,n,l.getBody(),!0),a(n))},getContent:function(e){return Vv(l,e)},setContent:o,getBookmark:function(e,t){return n.getBookmark(e,t)},moveToBookmark:function(e){return n.moveToBookmark(e)},select:function(e,t){var r,n,o;return(r=u,n=e,o=t,T.from(n).map(function(e){var t=r.nodeIndex(e),n=r.createRng();return n.setStart(e.parentNode,t),n.setEnd(e.parentNode,t+1),o&&(eh(r,n,e,!0),eh(r,n,e,!1)),n})).each(a),e},isCollapsed:function(){var e=h(),t=d();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:m,setNode:function(e){return o(u.getOuterHTML(e)),e},getNode:function(){return e=l.getBody(),(t=h())?(r=t.startContainer,o=t.endContainer,i=t.startOffset,a=t.endOffset,n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?Qv(r.nextSibling,!0):r.parentNode,o=0===a?Qv(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n):e;var e,t,n,r,o,i,a},getSel:d,setRng:a,getRng:h,getStart:function(e){return Gv(l.getBody(),h(),e)},getEnd:function(e){return Jv(l.getBody(),h(),e)},getSelectedBlocks:function(e,t){return function(e,t,n,r){var o,i,a=[];if(i=e.getRoot(),n=e.getParent(n||Gv(i,t,t.collapsed),e.isBlock),r=e.getParent(r||Jv(i,t,t.collapsed),e.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r)for(var u=new Ho(o=n,i);(o=u.next())&&o!==r;)e.isBlock(o)&&a.push(o);return r&&n!==r&&r!==i&&a.push(r),a}(u,h(),e,t)},normalize:function(){var e=h(),t=d();if(kv(t)||!th(l))return e;var n=Wv(u,e);return n.each(function(e){a(e,m())}),n.getOr(e)},selectorChanged:function(e,t){return r(e,t),g},selectorChangedWithUnbind:r,getScrollContainer:function(){for(var e,t=u.getRoot();t&&"BODY"!==t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){return sv(l,e,t)},placeCaretAt:function(e,t){return a(fv(e,t,l.getDoc()))},getBoundingClientRect:function(){var e=h();return e.collapsed?_u.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){s=c=f=null,t.destroy()}};return n=Ap(g),t=Dp(g,l),g.bookmarkManager=n,g.controlSelection=t,g},iy=Oo.isText,ay=function(e){return iy(e)&&e.data[0]===Aa},uy=function(e){return iy(e)&&e.data[e.data.length-1]===Aa},sy=function(e){return e.ownerDocument.createTextNode(Aa)},ly=function(e,t){return e?function(e){if(iy(e.previousSibling))return uy(e.previousSibling)||e.previousSibling.appendData(Aa),e.previousSibling;if(iy(e))return ay(e)||e.insertData(0,Aa),e;var t=sy(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(iy(e.nextSibling))return ay(e.nextSibling)||e.nextSibling.insertData(0,Aa),e.nextSibling;if(iy(e))return uy(e)||e.appendData(Aa),e;var t=sy(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},cy=d(ly,!0),fy=d(ly,!1),dy=function(e,t){return Oo.isText(e.container())?ly(t,e.container()):ly(t,e.getNode())},hy=function(e,t){var n=t.get();return n&&e.container()===n&&Oa(n)},my=function(n,e){return e.fold(function(e){ps.remove(n.get());var t=cy(e);return n.set(t),T.some(_u(t,t.length-1))},function(e){return hl.firstPositionIn(e).map(function(e){if(hy(e,n))return _u(n.get(),1);ps.remove(n.get());var t=dy(e,!0);return n.set(t),_u(t,1)})},function(e){return hl.lastPositionIn(e).map(function(e){if(hy(e,n))return _u(n.get(),n.get().length-1);ps.remove(n.get());var t=dy(e,!1);return n.set(t),_u(t,t.length-1)})},function(e){ps.remove(n.get());var t=fy(e);return n.set(t),T.some(_u(t,1))})},gy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,py=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?Oa(n)?Oo.isText(n.nextSibling)?_u(n.nextSibling,0):_u.after(n):La(t)?_u(n,r+1):t:Oa(n)?Oo.isText(n.previousSibling)?_u(n.previousSibling,n.previousSibling.data.length):_u.before(n):Pa(t)?_u(n,r-1):t},vy={isInlineTarget:function(e,t){return qr(cr.fromDom(t),Vc(e))},findRootInline:function(e,t,n){var r,o,i,a=(r=e,o=t,i=n,S(Di.DOM.getParents(i.container(),"*",o),r));return T.from(a[a.length-1])},isRtl:function(e){return"rtl"===Di.DOM.getStyle(e,"direction",!0)||(t=e.textContent,gy.test(t));var t},isAtZwsp:function(e){return La(e)||Pa(e)},normalizePosition:py,normalizeForwards:d(py,!0),normalizeBackwards:d(py,!1),hasSameParentBlock:function(e,t,n){var r=Bs(t,e),o=Bs(n,e);return r&&r===o}},yy=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return T.none()},by=Xc([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Cy=function(e,t){var n=Bs(t,e);return n||e},wy=function(e,t,n){var r=vy.normalizeForwards(n),o=Cy(t,r.container());return vy.findRootInline(e,o,r).fold(function(){return hl.nextPosition(o,r).bind(d(vy.findRootInline,e,o)).map(function(e){return by.before(e)})},T.none)},xy=function(e,t){return null===as(e,t)},zy=function(e,t,n){return vy.findRootInline(e,t,n).filter(d(xy,t))},Ny=function(e,t,n){var r=vy.normalizeBackwards(n);return zy(e,t,r).bind(function(e){return hl.prevPosition(e,r).isNone()?T.some(by.start(e)):T.none()})},Ey=function(e,t,n){var r=vy.normalizeForwards(n);return zy(e,t,r).bind(function(e){return hl.nextPosition(e,r).isNone()?T.some(by.end(e)):T.none()})},Sy=function(e,t,n){var r=vy.normalizeBackwards(n),o=Cy(t,r.container());return vy.findRootInline(e,o,r).fold(function(){return hl.prevPosition(o,r).bind(d(vy.findRootInline,e,o)).map(function(e){return by.after(e)})},T.none)},ky=function(e){return!1===vy.isRtl(Ay(e))},Ty=function(e,t,n){return yy([wy,Ny,Ey,Sy],[e,t,n]).filter(ky)},Ay=function(e){return e.fold(W,W,W,W)},My=function(e){return e.fold($("before"),$("start"),$("end"),$("after"))},Ry=function(e){return e.fold(by.before,by.before,by.after,by.after)},Dy=function(n,e,r,t,o,i){return fu([vy.findRootInline(e,r,t),vy.findRootInline(e,r,o)],function(e,t){return e!==t&&vy.hasSameParentBlock(r,e,t)?by.after(n?e:t):i}).getOr(i)},By=function(e,r){return e.fold($(!0),function(e){return n=r,!(My(t=e)===My(n)&&Ay(t)===Ay(n));var t,n})},Oy=function(e,t){return e?t.fold(q(T.some,by.start),T.none,q(T.some,by.after),T.none):t.fold(T.none,q(T.some,by.before),T.none,q(T.some,by.end))},Hy=function(a,u,s,l){var e=vy.normalizePosition(a,l),c=Ty(u,s,e);return Ty(u,s,e).bind(d(Oy,a)).orThunk(function(){return t=a,n=u,r=s,o=c,e=l,i=vy.normalizePosition(t,e),hl.fromPosition(t,r,i).map(d(vy.normalizePosition,t)).fold(function(){return o.map(Ry)},function(e){return Ty(n,r,e).map(d(Dy,t,n,r,i,e)).filter(d(By,o))}).filter(ky);var t,n,r,o,e,i})},_y=Ty,Ly=Hy,Py=(d(Hy,!1),d(Hy,!0),Ry),Vy=function(e){return e.fold(by.start,by.start,by.end,by.end)},Iy=function(e){return b(e.selection.getSel().modify)},Fy=function(e,t,n){var r=e?1:-1;return t.setRng(_u(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},Uy=function(e,t){var n=t.selection.getRng(),r=e?_u.fromRangeEnd(n):_u.fromRangeStart(n);return!!Iy(t)&&(e&&La(r)?Fy(!0,t.selection,r):!(e||!Pa(r))&&Fy(!1,t.selection,r))},jy=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},qy=function(e){return!1!==e.settings.inline_boundaries},$y=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Wy=function(t,e,n){return my(e,n).map(function(e){return jy(t,e),n})},Ky=function(e,t,n){return function(){return!!qy(t)&&Uy(e,t)}},Xy={move:function(a,u,s){return function(){return!!qy(a)&&(t=a,n=u,e=s,r=t.getBody(),o=_u.fromRangeStart(t.selection.getRng()),i=d(vy.isInlineTarget,t),Ly(e,i,r,o).bind(function(e){return Wy(t,n,e)})).isSome();var t,n,e,r,o,i}},moveNextWord:d(Ky,!0),movePrevWord:d(Ky,!1),setupSelectedState:function(a){var u=Li(null),s=d(vy.isInlineTarget,a);return a.on("NodeChange",function(e){var t,n,r,o,i;qy(a)&&(t=s,n=a.dom,r=e.parents,o=S(n.select('*[data-mce-selected="inline-boundary"]'),t),i=S(r,t),A(L(o,i),d($y,!1)),A(L(i,o),d($y,!0)),function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=_u.fromRangeStart(e.selection.getRng());_u.isTextPosition(n)&&!1===vy.isAtZwsp(n)&&(jy(e,ps.removeAndReposition(t.get(),n)),t.set(null))}}(a,u),function(n,r,o,e){if(r.selection.isCollapsed()){var t=S(e,n);A(t,function(e){var t=_u.fromRangeStart(r.selection.getRng());_y(n,r.getBody(),t).bind(function(e){return Wy(r,o,e)})})}}(s,a,u,e.parents))}),u},setCaretPosition:jy};(ty=ey||(ey={}))[ty.Br=0]="Br",ty[ty.Block=1]="Block",ty[ty.Wrap=2]="Wrap",ty[ty.Eol=3]="Eol";var Yy,Gy,Jy,Qy=function(e,t){return e===Ou.Backwards?t.reverse():t},Zy=function(e,t,n,r){for(var o,i,a,u,s,l,c=nl(n),f=r,d=[];f&&(s=c,l=f,o=t===Ou.Forwards?s.next(l):s.prev(l));){if(Oo.isBr(o.getNode(!1)))return t===Ou.Forwards?{positions:Qy(t,d).concat([o]),breakType:ey.Br,breakAt:T.some(o)}:{positions:Qy(t,d),breakType:ey.Br,breakAt:T.some(o)};if(o.isVisible()){if(e(f,o)){var h=(i=t,a=f,u=o,Oo.isBr(u.getNode(i===Ou.Forwards))?ey.Br:!1===Os(a,u)?ey.Block:ey.Wrap);return{positions:Qy(t,d),breakType:h,breakAt:T.some(o)}}d.push(o),f=o}else f=o}return{positions:Qy(t,d),breakType:ey.Eol,breakAt:T.none()}},eb=function(n,r,o,e){return r(o,e).breakAt.map(function(e){var t=r(o,e).positions;return n===Ou.Backwards?t.concat(e):[e].concat(t)}).getOr([])},tb=function(e,i){return M(e,function(e,o){return e.fold(function(){return T.some(o)},function(r){return fu([P(r.getClientRects()),P(o.getClientRects())],function(e,t){var n=Math.abs(i-e.left);return Math.abs(i-t.left)<=n?o:r}).or(e)})},T.none())},nb=function(t,e){return P(e.getClientRects()).bind(function(e){return tb(t,e.left)})},rb=d(Zy,Bu.isAbove,-1),ob=d(Zy,Bu.isBelow,1),ib=d(eb,-1,rb),ab=d(eb,1,ob),ub=Oo.isContentEditableFalse,sb=uu,lb=function(e,t,n,r){var o=e===Ou.Forwards,i=o?Zh:em;if(!r.collapsed){var a=sb(r);if(ub(a))return Bh(e,t,a,e===Ou.Backwards,!0)}var u=Ba(r.startContainer),s=Us(e,t.getBody(),r);if(i(s))return Oh(t,s.getNode(!o));var l=vy.normalizePosition(o,n(s));if(!l)return u?r:null;if(i(l))return Bh(e,t,l.getNode(!o),o,!0);var c=n(l);return c&&i(c)&&$s(l,c)?Bh(e,t,c.getNode(!o),o,!0):u?_h(t,l.toRange(),!0):null},cb=function(e,t,n,r){var o,i,a,u,s,l,c,f,d;if(d=sb(r),o=Us(e,t.getBody(),r),i=n(t.getBody(),Ch(1),o),a=S(i,wh(1)),s=Yt.last(o.getClientRects()),(Zh(o)||Jh(o))&&(d=o.getNode()),(em(o)||Qh(o))&&(d=o.getNode(!0)),!s)return null;if(l=s.left,(u=kh(a,l))&&ub(u.node))return c=Math.abs(l-u.left),f=Math.abs(l-u.right),Bh(e,t,u.node,c<f,!0);if(d){var h=function(e,t,n,r){var o,i,a,u,s,l,c=nl(t),f=[],d=0,h=function(e){return Yt.last(e.getClientRects())};l=h(u=1===e?(o=c.next,i=iu,a=ou,_u.after(r)):(o=c.prev,i=ou,a=iu,_u.before(r)));do{if(u.isVisible()&&!a(s=h(u),l)){if(0<f.length&&i(s,Yt.last(f))&&d++,(s=tu(s)).position=u,s.line=d,n(s))return f;f.push(s)}}while(u=o(u));return f}(e,t.getBody(),Ch(1),d);if(u=kh(S(h,wh(1)),l))return _h(t,u.position.toRange(),!0);if(u=Yt.last(S(h,wh(0))))return _h(t,u.position.toRange(),!0)}},fb=function(e,t,n){var r,o,i,a,u=nl(e.getBody()),s=d(qs,u.next),l=d(qs,u.prev);if(n.collapsed&&e.settings.forced_root_block){if(!(r=e.dom.getParent(n.startContainer,"PRE")))return;(1===t?s(_u.fromRangeStart(n)):l(_u.fromRangeStart(n)))||(a=(i=e).dom.create(mc(i)),(!He.ie||11<=He.ie)&&(a.innerHTML='<br data-mce-bogus="1">'),o=a,1===t?e.$(r).after(o):e.$(r).before(o),e.selection.select(o,!0),e.selection.collapse())}},db=function(c,f){return function(){var e,t,n,r,o,i,a,u,s,l=(t=f,r=nl((e=c).getBody()),o=d(qs,r.next),i=d(qs,r.prev),a=t?Ou.Forwards:Ou.Backwards,u=t?o:i,s=e.selection.getRng(),(n=lb(a,e,u,s))?n:(n=fb(e,a,s))||null);return!!l&&(c.selection.setRng(l),!0)}},hb=function(u,s){return function(){var e,t,n,r,o,i,a=(r=(t=s)?1:-1,o=t?bh:yh,i=(e=u).selection.getRng(),(n=cb(r,e,o,i))?n:(n=fb(e,r,i))||null);return!!a&&(u.selection.setRng(a),!0)}},mb=function(r,o){return function(){var t,e=o?_u.fromRangeEnd(r.selection.getRng()):_u.fromRangeStart(r.selection.getRng()),n=o?ob(r.getBody(),e):rb(r.getBody(),e);return(o?V(n.positions):P(n.positions)).filter((t=o,function(e){return t?em(e):Zh(e)})).fold($(!1),function(e){return r.selection.setRng(e.toRange()),!0})}},gb=function(e,t,n,r,o){var i,a,u,s,l=ua(cr.fromDom(n),"td,th,caption").map(function(e){return e.dom()}),c=S((i=e,H(l,function(e){var t,n,r=(t=tu(e.getBoundingClientRect()),n=-1,{left:t.left-n,top:t.top-n,right:t.right+2*n,bottom:t.bottom+2*n,width:t.width+n,height:t.height+n});return[{x:r.left,y:i(r),cell:e},{x:r.right,y:i(r),cell:e}]})),function(e){return t(e,o)});return(a=c,u=r,s=o,M(a,function(e,r){return e.fold(function(){return T.some(r)},function(e){var t=Math.sqrt(Math.abs(e.x-u)+Math.abs(e.y-s)),n=Math.sqrt(Math.abs(r.x-u)+Math.abs(r.y-s));return T.some(n<t?r:e)})},T.none())).map(function(e){return e.cell})},pb=d(gb,function(e){return e.bottom},function(e,t){return e.y<t}),vb=d(gb,function(e){return e.top},function(e,t){return e.y>t}),yb=function(t,n){return P(n.getClientRects()).bind(function(e){return pb(t,e.left,e.top)}).bind(function(e){return nb((t=e,hl.lastPositionIn(t).map(function(e){return rb(t,e).positions.concat(e)}).getOr([])),n);var t})},bb=function(t,n){return V(n.getClientRects()).bind(function(e){return vb(t,e.left,e.top)}).bind(function(e){return nb((t=e,hl.firstPositionIn(t).map(function(e){return[e].concat(ob(t,e).positions)}).getOr([])),n);var t})},Cb=function(e,t){e.selection.setRng(t),lv(e,t)},wb=function(e,t,n){var r,o,i,a,u=e(t,n);return(a=u).breakType===ey.Wrap&&0===a.positions.length||!Oo.isBr(n.getNode())&&((i=u).breakType===ey.Br&&1===i.positions.length)?(r=e,o=t,!u.breakAt.map(function(e){return r(o,e).breakAt.isSome()}).getOr(!1)):u.breakAt.isNone()},xb=d(wb,rb),zb=d(wb,ob),Nb=function(e,t,n,r){var o,i,a,u,s=e.selection.getRng(),l=t?1:-1;if(ws()&&(o=t,i=s,a=n,u=_u.fromRangeStart(i),hl.positionIn(!o,a).map(function(e){return e.isEqual(u)}).getOr(!1))){var c=Bh(l,e,n,!t,!0);return Cb(e,c),!0}return!1},Eb=function(e,t){var n=t.getNode(e);return Oo.isElement(n)&&"TABLE"===n.nodeName?T.some(n):T.none()},Sb=function(u,s,l){var e=Eb(!!s,l),t=!1===s;e.fold(function(){return Cb(u,l.toRange())},function(a){return hl.positionIn(t,u.getBody()).filter(function(e){return e.isEqual(l)}).fold(function(){return Cb(u,l.toRange())},function(e){return n=s,o=a,t=l,void((i=mc(r=u))?r.undoManager.transact(function(){var e=cr.fromTag(i);Rr(e,gc(r)),Ki(e,cr.fromTag("br")),n?$i(cr.fromDom(o),e):qi(cr.fromDom(o),e);var t=r.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),Cb(r,t)}):Cb(r,t.toRange()));var n,r,o,t,i})})},kb=function(e,t,n,r){var o,i,a,u,s,l,c=e.selection.getRng(),f=_u.fromRangeStart(c),d=e.getBody();if(!t&&xb(r,f)){var h=(u=d,yb(s=n,l=f).orThunk(function(){return P(l.getClientRects()).bind(function(e){return tb(ib(u,_u.before(s)),e.left)})}).getOr(_u.before(s)));return Sb(e,t,h),!0}if(t&&zb(r,f)){h=(o=d,bb(i=n,a=f).orThunk(function(){return P(a.getClientRects()).bind(function(e){return tb(ab(o,_u.after(i)),e.left)})}).getOr(_u.after(i)));return Sb(e,t,h),!0}return!1},Tb=function(t,n){return function(){return T.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(e){return T.from(t.dom.getParent(e,"table")).map(function(e){return Nb(t,n,e)})}).getOr(!1)}},Ab=function(n,r){return function(){return T.from(n.dom.getParent(n.selection.getNode(),"td,th")).bind(function(t){return T.from(n.dom.getParent(t,"table")).map(function(e){return kb(n,r,e,t)})}).getOr(!1)}},Mb=function(e){return N(["figcaption"],mr(e))},Rb=function(e){var t=j.document.createRange();return t.setStartBefore(e.dom()),t.setEndBefore(e.dom()),t},Db=function(e,t,n){n?Ki(e,t):Wi(e,t)},Bb=function(e,t,n,r){return""===t?(c=e,f=r,d=cr.fromTag("br"),Db(c,d,f),Rb(d)):(o=e,i=r,a=t,u=n,s=cr.fromTag(a),l=cr.fromTag("br"),Rr(s,u),Ki(s,l),Db(o,s,i),Rb(l));var o,i,a,u,s,l,c,f,d},Ob=function(e,t,n){return t?(o=e.dom(),ob(o,n).breakAt.isNone()):(r=e.dom(),rb(r,n).breakAt.isNone());var r,o},Hb=function(t,n){var e,r,o,i=cr.fromDom(t.getBody()),a=_u.fromRangeStart(t.selection.getRng()),u=mc(t),s=gc(t);return(e=a,r=i,o=d(Wr,r),fa(cr.fromDom(e.container()),Po,o).filter(Mb)).exists(function(){if(Ob(i,n,a)){var e=Bb(i,u,s,n);return t.selection.setRng(e),!0}return!1})},_b=function(e,t){return function(){return!!e.selection.isCollapsed()&&Hb(e,t)}},Lb=function(e,r){return H(X(e,function(e){return lp({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:i},e)}),function(e){return t=e,(n=r).keyCode===t.keyCode&&n.shiftKey===t.shiftKey&&n.altKey===t.altKey&&n.ctrlKey===t.ctrlKey&&n.metaKey===t.metaKey?[e]:[];var t,n})},Pb=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}},Vb=function(e,t){return R(Lb(e,t),function(e){return e.action()})},Ib=function(i,a){i.on("keydown",function(e){var t,n,r,o;!1===e.isDefaultPrevented()&&(t=i,n=a,r=e,o=sr.detect().os,Vb([{keyCode:Ph.RIGHT,action:db(t,!0)},{keyCode:Ph.LEFT,action:db(t,!1)},{keyCode:Ph.UP,action:hb(t,!1)},{keyCode:Ph.DOWN,action:hb(t,!0)},{keyCode:Ph.RIGHT,action:Tb(t,!0)},{keyCode:Ph.LEFT,action:Tb(t,!1)},{keyCode:Ph.UP,action:Ab(t,!1)},{keyCode:Ph.DOWN,action:Ab(t,!0)},{keyCode:Ph.RIGHT,action:Xy.move(t,n,!0)},{keyCode:Ph.LEFT,action:Xy.move(t,n,!1)},{keyCode:Ph.RIGHT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Xy.moveNextWord(t,n)},{keyCode:Ph.LEFT,ctrlKey:!o.isOSX(),altKey:o.isOSX(),action:Xy.movePrevWord(t,n)},{keyCode:Ph.UP,action:_b(t,!1)},{keyCode:Ph.DOWN,action:_b(t,!0)}],r).each(function(e){r.preventDefault()}))})},Fb=function(e,t){return Kr(e,t)?fa(t,function(e){return Fo(e)||jo(e)},(n=e,function(e){return Wr(n,cr.fromDom(e.dom().parentNode))})):T.none();var n},Ub=function(e){var t,n,r;e.dom.isEmpty(e.getBody())&&(e.setContent(""),n=(t=e).getBody(),r=n.firstChild&&t.dom.isBlock(n.firstChild)?n.firstChild:n,t.selection.setCursorLocation(r,0))},jb=function(i,a,u){return fu([hl.firstPositionIn(u),hl.lastPositionIn(u)],function(e,t){var n=vy.normalizePosition(!0,e),r=vy.normalizePosition(!1,t),o=vy.normalizePosition(!1,a);return i?hl.nextPosition(u,o).map(function(e){return e.isEqual(r)&&a.isEqual(n)}).getOr(!1):hl.prevPosition(u,o).map(function(e){return e.isEqual(n)&&a.isEqual(r)}).getOr(!1)}).getOr(!0)},qb=Lr("block","position"),$b=Lr("from","to"),Wb=function(e,t){var n=cr.fromDom(e),r=cr.fromDom(t.container());return Fb(n,r).map(function(e){return qb(e,t)})},Kb=function(o,i,e){var t=Wb(o,_u.fromRangeStart(e)),n=t.bind(function(e){return hl.fromPosition(i,o,e.position()).bind(function(e){return Wb(o,e).map(function(e){return t=o,n=i,r=e,Oo.isBr(r.position().getNode())&&!1===Fm(r.block())?hl.positionIn(!1,r.block().dom()).bind(function(e){return e.isEqual(r.position())?hl.fromPosition(n,t,e).bind(function(e){return Wb(t,e)}):T.some(r)}).getOr(r):r;var t,n,r})})});return fu([t,n],$b).filter(function(e){return!1===Wr((r=e).from().block(),r.to().block())&&Gr((n=e).from().block()).bind(function(t){return Gr(n.to().block()).filter(function(e){return Wr(t,e)})}).isSome()&&(t=e,!1===Oo.isContentEditableFalse(t.from().block())&&!1===Oo.isContentEditableFalse(t.to().block()));var t,n,r})},Xb=function(e,t,n){return n.collapsed?Kb(e,t,n):T.none()},Yb=function(e){var t,n=(t=to(e),D(t,Po).fold(function(){return t},function(e){return t.slice(0,e)}));return A(n,Gi),n},Gb=function(e,t){var n=$d(t,e);return R(n.reverse(),Fm).each(Gi)},Jb=function(e,t,n,r){if(Fm(n))return zm(n),hl.firstPositionIn(n.dom());0===S(Zr(r),function(e){return!Fm(e)}).length&&Fm(t)&&qi(r,cr.fromTag("br"));var o=hl.prevPosition(n.dom(),_u.before(r.dom()));return A(Yb(t),function(e){qi(r,e)}),Gb(e,t),o},Qb=function(e,t,n){if(Fm(n))return Gi(n),Fm(t)&&zm(t),hl.firstPositionIn(t.dom());var r=hl.lastPositionIn(n.dom());return A(Yb(t),function(e){Ki(n,e)}),Gb(e,t),r},Zb=function(e,t){return Kr(t,e)?(n=$d(e,t),T.from(n[n.length-1])):T.none();var n},eC=function(e,t){hl.positionIn(e,t.dom()).map(function(e){return e.getNode()}).map(cr.fromDom).filter(Io).each(Gi)},tC=function(e,t,n){return eC(!0,t),eC(!1,n),Zb(t,n).fold(d(Qb,e,t,n),d(Jb,e,t,n))},nC=function(e,t,n,r){return t?tC(e,r,n):tC(e,n,r)},rC=function(t,n){var e,r=cr.fromDom(t.getBody());return(e=Xb(r.dom(),n,t.selection.getRng()).bind(function(e){return nC(r,n,e.from().block(),e.to().block())})).each(function(e){t.selection.setRng(e.toRange())}),e.isSome()},oC=function(e,t){var n=cr.fromDom(t),r=d(Wr,e);return ca(n,Wo,r).isSome()},iC=function(e,t){var n,r,o=hl.prevPosition(e.dom(),_u.fromRangeStart(t)).isNone(),i=hl.nextPosition(e.dom(),_u.fromRangeEnd(t)).isNone();return!(oC(n=e,(r=t).startContainer)||oC(n,r.endContainer))&&o&&i},aC=function(e){var n,r,o,t,i=cr.fromDom(e.getBody()),a=e.selection.getRng();return iC(i,a)?((t=e).setContent(""),t.selection.setCursorLocation(),!0):(n=i,r=e.selection,o=r.getRng(),fu([Fb(n,cr.fromDom(o.startContainer)),Fb(n,cr.fromDom(o.endContainer))],function(e,t){return!1===Wr(e,t)&&(o.deleteContents(),nC(n,!0,e,t).each(function(e){r.setRng(e.toRange())}),!0)}).getOr(!1))},uC=function(e,t){return!e.selection.isCollapsed()&&aC(e)},sC=function(e){return js(e).exists(Io)},lC=function(e,t,n){var r=S($d(cr.fromDom(n.container()),t),Po),o=P(r).getOr(t);return hl.fromPosition(e,o.dom(),n).filter(sC)},cC=function(e,t){return js(t).exists(Io)||lC(!0,e,t).isSome()},fC=function(e,t){return(n=t,T.from(n.getNode(!0)).map(cr.fromDom)).exists(Io)||lC(!1,e,t).isSome();var n},dC=d(lC,!1),hC=d(lC,!0),mC=Xc([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),gC=function(e,t,n,r){var o=r.getNode(!1===t);return Fb(cr.fromDom(e),cr.fromDom(n.getNode())).map(function(e){return Fm(e)?mC.remove(e.dom()):mC.moveToElement(o)}).orThunk(function(){return T.some(mC.moveToElement(o))})},pC=function(u,s,l){return hl.fromPosition(s,u,l).bind(function(e){return a=e.getNode(),Wo(cr.fromDom(a))||jo(cr.fromDom(a))?T.none():(t=u,o=e,i=function(e){return Vo(cr.fromDom(e))&&!Os(r,o,t)},Fs(!(n=s),r=l).fold(function(){return Fs(n,o).fold($(!1),i)},i)?T.none():s&&Oo.isContentEditableFalse(e.getNode())?gC(u,s,l,e):!1===s&&Oo.isContentEditableFalse(e.getNode(!0))?gC(u,s,l,e):s&&em(l)?T.some(mC.moveToPosition(e)):!1===s&&Zh(l)?T.some(mC.moveToPosition(e)):T.none());var t,n,r,o,i,a})},vC=function(r,e,o){return i=e,a=o.getNode(!1===i),u=i?"after":"before",Oo.isElement(a)&&a.getAttribute("data-mce-caret")===u?(t=e,n=o.getNode(!1===e),t&&Oo.isContentEditableFalse(n.nextSibling)?T.some(mC.moveToElement(n.nextSibling)):!1===t&&Oo.isContentEditableFalse(n.previousSibling)?T.some(mC.moveToElement(n.previousSibling)):T.none()).fold(function(){return pC(r,e,o)},T.some):pC(r,e,o).bind(function(e){return t=r,n=o,e.fold(function(e){return T.some(mC.remove(e))},function(e){return T.some(mC.moveToElement(e))},function(e){return Os(n,e,t)?T.none():T.some(mC.moveToPosition(e))});var t,n});var t,n,i,a,u},yC=function(a,u){var e,t,n,r,o,i;return(e=a.getBody(),t=u,n=a.selection.getRng(),r=Is(t?1:-1,e,n),o=_u.fromRangeStart(r),i=cr.fromDom(e),!1===t&&em(o)?T.some(mC.remove(o.getNode(!0))):t&&Zh(o)?T.some(mC.remove(o.getNode())):!1===t&&Zh(o)&&fC(i,o)?dC(i,o).map(function(e){return mC.remove(e.getNode())}):t&&em(o)&&cC(i,o)?hC(i,o).map(function(e){return mC.remove(e.getNode())}):vC(e,t,o)).map(function(e){return e.fold((o=a,i=u,function(e){return o._selectionOverrides.hideFakeCaret(),Qm(o,i,cr.fromDom(e)),!0}),(n=a,r=u,function(e){var t=r?_u.before(e):_u.after(e);return n.selection.setRng(t.toRange()),!0}),(t=a,function(e){return t.selection.setRng(e.toRange()),!0}));var t,n,r,o,i}).getOr(!1)},bC=function(e,t){var n,r=e.selection.getNode();return!!Oo.isContentEditableFalse(r)&&(n=cr.fromDom(e.getBody()),A(ua(n,".mce-offscreen-selection"),Gi),Qm(e,t,cr.fromDom(e.selection.getNode())),Ub(e),!0)},CC=function(e,t){return e.selection.isCollapsed()?yC(e,t):bC(e,t)},wC=function(e){var t,n=function(e,t){for(;t&&t!==e;){if(Oo.isContentEditableTrue(t)||Oo.isContentEditableFalse(t))return t;t=t.parentNode}return null}(e.getBody(),e.selection.getNode());return Oo.isContentEditableTrue(n)&&e.dom.isBlock(n)&&e.dom.isEmpty(n)&&(t=e.dom.create("br",{"data-mce-bogus":"1"}),e.dom.setHTML(n,""),n.appendChild(t),e.selection.setRng(_u.before(t).toRange())),!0},xC=function(e,t,n,r,o,i){var a,u,s=Bh(r,e,i.getNode(!o),o,!0);if(t.collapsed){var l=t.cloneRange();o?l.setEnd(s.startContainer,s.startOffset):l.setStart(s.endContainer,s.endOffset),l.deleteContents()}else t.deleteContents();return e.selection.setRng(s),a=e.dom,u=n,Oo.isText(u)&&0===u.data.length&&a.remove(u),!0},zC=function(e,t){return function(e,t){var n=e.selection.getRng();if(!Oo.isText(n.commonAncestorContainer))return!1;var r=t?Ou.Forwards:Ou.Backwards,o=nl(e.getBody()),i=d(qs,o.next),a=d(qs,o.prev),u=t?i:a,s=t?Zh:em,l=Us(r,e.getBody(),n),c=vy.normalizePosition(t,u(l));if(!c)return!1;if(s(c))return xC(e,n,l.getNode(),r,t,c);var f=u(c);return!!(f&&s(f)&&$s(c,f))&&xC(e,n,l.getNode(),r,t,f)}(e,t)},NC=function(t,n){return function(e){return my(n,e).map(function(e){return Xy.setCaretPosition(t,e),!0}).getOr(!1)}},EC=function(r,o,i,a){var u=r.getBody(),s=d(vy.isInlineTarget,r);r.undoManager.ignore(function(){var e,t,n;r.selection.setRng((e=i,t=a,(n=j.document.createRange()).setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n)),r.execCommand("Delete"),_y(s,u,_u.fromRangeStart(r.selection.getRng())).map(Vy).map(NC(r,o))}),r.nodeChanged()},SC=function(n,r,i,o){var e,t,a=(e=n.getBody(),t=o.container(),Bs(t,e)||e),u=d(vy.isInlineTarget,n),s=_y(u,a,o);return s.bind(function(e){return i?e.fold($(T.some(Vy(e))),T.none,$(T.some(Py(e))),T.none):e.fold(T.none,$(T.some(Py(e))),T.none,$(T.some(Vy(e))))}).map(NC(n,r)).getOrThunk(function(){var t=hl.navigate(i,a,o),e=t.bind(function(e){return _y(u,a,e)});return s.isSome()&&e.isSome()?vy.findRootInline(u,a,o).map(function(e){return o=e,!!fu([hl.firstPositionIn(o),hl.lastPositionIn(o)],function(e,t){var n=vy.normalizePosition(!0,e),r=vy.normalizePosition(!1,t);return hl.nextPosition(o,n).map(function(e){return e.isEqual(r)}).getOr(!0)}).getOr(!0)&&(Qm(n,i,cr.fromDom(e)),!0);var o}).getOr(!1):e.bind(function(e){return t.map(function(e){return i?EC(n,r,o,e):EC(n,r,e,o),!0})}).getOr(!1)})},kC=function(e,t,n){if(e.selection.isCollapsed()&&!1!==e.settings.inline_boundaries){var r=_u.fromRangeStart(e.selection.getRng());return SC(e,t,n,r)}return!1},TC=function(e){return 1===to(e).length},AC=function(e,t,n,r){var o,i,a,u,s=d(cg,t),l=X(S(r,s),function(e){return e.dom()});if(0===l.length)Qm(t,e,n);else{var c=(o=n.dom(),i=l,a=rg(!1),u=sg(i,a.dom()),qi(cr.fromDom(o),a),Gi(cr.fromDom(o)),_u(u,0));t.selection.setRng(c.toRange())}},MC=function(r,o){var t,e=cr.fromDom(r.getBody()),n=cr.fromDom(r.selection.getStart()),i=S((t=$d(n,e),D(t,Po).fold($(t),function(e){return t.slice(0,e)})),TC);return V(i).map(function(e){var t,n=_u.fromRangeStart(r.selection.getRng());return!(!jb(o,n,e.dom())||is((t=e).dom())&&tg(t.dom()))&&(AC(o,r,e,i),!0)}).getOr(!1)},RC=function(e,t){return!!e.selection.isCollapsed()&&MC(e,t)},DC=Lr("start","end"),BC=Lr("rng","table","cells"),OC=Xc([{removeTable:["element"]},{emptyCells:["cells"]}]),HC=function(e,t){return ma(cr.fromDom(e),"td,th",t)},_C=function(e,t){return da(e,"table",t)},LC=function(e){return!1===Wr(e.start(),e.end())},PC=function(e,n){return _C(e.start(),n).bind(function(t){return _C(e.end(),n).bind(function(e){return Wr(t,e)?T.some(t):T.none()})})},VC=function(e){return ua(e,"td,th")},IC=function(r,e){var t=HC(e.startContainer,r),n=HC(e.endContainer,r);return e.collapsed?T.none():fu([t,n],DC).fold(function(){return t.fold(function(){return n.bind(function(t){return _C(t,r).bind(function(e){return P(VC(e)).map(function(e){return DC(e,t)})})})},function(t){return _C(t,r).bind(function(e){return V(VC(e)).map(function(e){return DC(t,e)})})})},function(e){return FC(r,e)?T.none():(n=r,_C((t=e).start(),n).bind(function(e){return V(VC(e)).map(function(e){return DC(t.start(),e)})}));var t,n})},FC=function(e,t){return PC(t,e).isSome()},UC=function(e,t){var n,r,o,i,a=d(Wr,e);return(n=t,r=a,o=HC(n.startContainer,r),i=HC(n.endContainer,r),fu([o,i],DC).filter(LC).filter(function(e){return FC(r,e)}).orThunk(function(){return IC(r,n)})).bind(function(e){return PC(t=e,a).map(function(e){return BC(t,e,VC(e))});var t})},jC=function(e,t){return D(e,function(e){return Wr(e,t)})},qC=function(n){return(r=n,fu([jC(r.cells(),r.rng().start()),jC(r.cells(),r.rng().end())],function(e,t){return r.cells().slice(e,t+1)})).map(function(e){var t=n.cells();return e.length===t.length?OC.removeTable(n.table()):OC.emptyCells(e)});var r},$C=function(e,t){return UC(e,t).bind(qC)},WC=function(e,t){return A(t,zm),e.selection.setCursorLocation(t[0].dom(),0),!0},KC=function(e,t){return Qm(e,!1,t),!0},XC=function(n,e,r,t){return GC(e,t).fold(function(){return t=n,$C(e,r).map(function(e){return e.fold(d(KC,t),d(WC,t))});var t},function(e){return JC(n,e)}).getOr(!1)},YC=function(e,t){return R($d(t,e),Wo)},GC=function(e,t){return R($d(t,e),function(e){return"caption"===mr(e)})},JC=function(e,t){return zm(t),e.selection.setCursorLocation(t.dom(),0),T.some(!0)},QC=function(u,s,l,c,f){return hl.navigate(l,u.getBody(),f).bind(function(e){return r=c,o=l,i=f,a=e,hl.firstPositionIn(r.dom()).bind(function(t){return hl.lastPositionIn(r.dom()).map(function(e){return o?i.isEqual(t)&&a.isEqual(e):i.isEqual(e)&&a.isEqual(t)})}).getOr(!0)?JC(u,c):(t=c,n=e,GC(s,cr.fromDom(n.getNode())).map(function(e){return!1===Wr(e,t)}));var t,n,r,o,i,a}).or(T.some(!0))},ZC=function(a,u,s,e){var l=_u.fromRangeStart(a.selection.getRng());return YC(s,e).bind(function(e){return Fm(e)?JC(a,e):(t=a,n=s,r=u,o=e,i=l,hl.navigate(r,t.getBody(),i).bind(function(e){return YC(n,cr.fromDom(e.getNode())).map(function(e){return!1===Wr(e,o)})}));var t,n,r,o,i}).getOr(!1)},ew=function(e,t){return e?Jh(t):Qh(t)},tw=function(a,u,r){var s=cr.fromDom(a.getBody());return GC(s,r).fold(function(){return ZC(a,u,s,r)||(e=a,t=u,n=_u.fromRangeStart(e.selection.getRng()),ew(t,n)||hl.fromPosition(t,e.getBody(),n).map(function(e){return ew(t,e)}).getOr(!1));var e,t,n},function(e){return(t=a,n=u,r=s,o=e,i=_u.fromRangeStart(t.selection.getRng()),Fm(o)?JC(t,o):QC(t,r,n,o,i)).getOr(!1);var t,n,r,o,i})},nw=function(e,t){var n,r,o,i,a,u=cr.fromDom(e.selection.getStart(!0)),s=Dv(e);return e.selection.isCollapsed()&&0===s.length?tw(e,t,u):(n=e,r=u,o=cr.fromDom(n.getBody()),i=n.selection.getRng(),0!==(a=Dv(n)).length?WC(n,a):XC(n,o,i,r))},rw=function(e,t){return!!e.selection.isCollapsed()&&(n=e,r=t,o=_u.fromRangeStart(n.selection.getRng()),hl.fromPosition(r,n.getBody(),o).filter(function(e){return r?Yh(e):Gh(e)}).bind(function(e){return T.from(Hs(r?0:-1,e))}).map(function(e){return n.selection.select(e),!0}).getOr(!1));var n,r,o},ow=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},iw=function(e,t){return(e||"table"===mr(t)?"margin":"padding")+("rtl"===Or(t,"direction")?"-right":"-left")},aw=function(e){var r,t=sw(e);return!0!==e.readonly&&(1<t.length||(r=e,_(t,function(e){var t=iw(Hc(r),e),n=_r(e,t).map(ow).getOr(0);return"false"!==r.dom.getContentEditable(e.dom())&&0<n})))},uw=function(e){return Uo(e)||jo(e)},sw=function(e){return S(X(e.selection.getSelectedBlocks(),cr.fromDom),function(e){return!uw(e)&&!Gr(e).map(uw).getOr(!1)&&fa(e,function(e){return Oo.isContentEditableTrue(e.dom())||Oo.isContentEditableFalse(e.dom())}).exists(function(e){return Oo.isContentEditableTrue(e.dom())})})},lw=function(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=_c(e),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=Hc(e),l=mc(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==l||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),A(sw(e),function(e){!function(e,t,n,r,o,i){var a=iw(n,cr.fromDom(i));if("outdent"===t){var u=Math.max(0,ow(i.style[a])-r);e.setStyle(i,a,u?u+o:"")}else u=ow(i.style[a])+r+o,e.setStyle(i,a,u)}(n,t,s,u,a,e.dom())})},cw=function(e,t,n){return hl.navigateIgnore(e,t,n,$h)},fw=function(e,t){return R($d(cr.fromDom(t.container()),e),Po)},dw=function(e,n,r){return cw(e,n.dom(),r).forall(function(t){return fw(n,r).fold(function(){return!1===Os(t,r,n.dom())},function(e){return!1===Os(t,r,n.dom())&&Kr(e,cr.fromDom(t.container()))})})},hw=function(t,n,r){return fw(n,r).fold(function(){return cw(t,n.dom(),r).forall(function(e){return!1===Os(e,r,n.dom())})},function(e){return cw(t,e.dom(),r).isNone()})},mw=d(hw,!1),gw=d(hw,!0),pw=d(dw,!1),vw=d(dw,!0),yw=function(e,t,n){if(e.selection.isCollapsed()&&aw(e)){var r=e.dom,o=e.selection.getRng(),i=_u.fromRangeStart(o),a=cr.fromDom(r.getParent(o.startContainer,r.isBlock));if(mw(a,i))return lw(e,"outdent"),!0}return!1},bw=function(o,i){o.on("keydown",function(e){var t,n,r;!1===e.isDefaultPrevented()&&(t=o,n=i,r=e,Vb([{keyCode:Ph.BACKSPACE,action:Pb(yw,t,!1)},{keyCode:Ph.BACKSPACE,action:Pb(CC,t,!1)},{keyCode:Ph.DELETE,action:Pb(CC,t,!0)},{keyCode:Ph.BACKSPACE,action:Pb(zC,t,!1)},{keyCode:Ph.DELETE,action:Pb(zC,t,!0)},{keyCode:Ph.BACKSPACE,action:Pb(kC,t,n,!1)},{keyCode:Ph.DELETE,action:Pb(kC,t,n,!0)},{keyCode:Ph.BACKSPACE,action:Pb(nw,t,!1)},{keyCode:Ph.DELETE,action:Pb(nw,t,!0)},{keyCode:Ph.BACKSPACE,action:Pb(rw,t,!1)},{keyCode:Ph.DELETE,action:Pb(rw,t,!0)},{keyCode:Ph.BACKSPACE,action:Pb(uC,t,!1)},{keyCode:Ph.DELETE,action:Pb(uC,t,!0)},{keyCode:Ph.BACKSPACE,action:Pb(rC,t,!1)},{keyCode:Ph.DELETE,action:Pb(rC,t,!0)},{keyCode:Ph.BACKSPACE,action:Pb(RC,t,!1)},{keyCode:Ph.DELETE,action:Pb(RC,t,!0)}],r).each(function(e){r.preventDefault()}))}),o.on("keyup",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=o,n=e,Vb([{keyCode:Ph.BACKSPACE,action:Pb(wC,t)},{keyCode:Ph.DELETE,action:Pb(wC,t)}],n))})},Cw=function(e){return T.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},ww=function(e,t){var n,r,o=t,i=e.dom,a=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var u=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&t.insertBefore(i.doc.createTextNode("\xa0"),t.firstChild)}if(r=i.createRng(),t.normalize(),t.hasChildNodes()){for(var s=new Ho(t,t);n=s.current();){if(Oo.isText(n)){r.setStart(n,0),r.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=s.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else Oo.isBr(t)?t.nextSibling&&i.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),e.selection.scrollIntoView(t)}},xw=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},zw=Cw,Nw=function(e){return Cw(e).fold($(""),function(e){return e.nodeName.toUpperCase()})},Ew=function(e){return Cw(e).filter(function(e){return jo(cr.fromDom(e))}).isSome()},Sw=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},kw=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},Tw=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},Aw=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!Oo.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},Mw=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var u;kw(u=n)&&kw(u.parentNode)&&(o="LI");var s,l,c=o?t(o):i.create("BR");if(Aw(n,r,!0)&&Aw(n,r,!1))Sw(n,"LI")?i.insertAfter(c,Tw(n)):i.replace(c,n);else if(Aw(n,r,!0))Sw(n,"LI")?(i.insertAfter(c,Tw(n)),c.appendChild(i.doc.createTextNode(" ")),c.appendChild(n)):n.parentNode.insertBefore(c,n);else if(Aw(n,r,!1))i.insertAfter(c,Tw(n));else{n=Tw(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var d=f.extractContents();"LI"===o&&(l="LI",(s=d).firstChild&&s.firstChild.nodeName===l)?(c=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(c,n))}i.remove(r),ww(e,c)}},Rw=function(e){e.innerHTML='<br data-mce-bogus="1">'},Dw=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},Bw=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},Ow=function(e,t,n){return!1===Oo.isText(t)?n:e?1===n&&t.data.charAt(n-1)===Aa?0:n:n===t.data.length-1&&t.data.charAt(n)===Aa?t.data.length:n},Hw=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},_w=function(e,t){var n=mc(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&e.dom.setAttribs(t,gc(e))},Lw=function(a,e){var t,u,s,i,l,n,r,o,c,f,d,h,m,g=a.dom,p=a.schema,v=p.getNonEmptyElements(),y=a.selection.getRng(),b=function(e){var t,n,r,o=s,i=p.getTextInlineElements();if(e||"TABLE"===f||"HR"===f?(t=g.create(e||h),_w(a,t)):t=l.cloneNode(!1),r=t,!1===yc(a))g.setAttrib(t,"style",null),g.setAttrib(t,"class",null);else do{if(i[o.nodeName]){if(is(o)||zl(o))continue;n=o.cloneNode(!1),g.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((o=o.parentNode)&&o!==u);return Rw(r),t},C=function(e){var t,n,r=Ow(e,s,i);if(Oo.isText(s)&&(e?0<r:r<s.nodeValue.length))return!1;if(s.parentNode===l&&m&&!e)return!0;if(e&&Oo.isElement(s)&&s===l.firstChild)return!0;if(Dw(s,"TABLE")||Dw(s,"HR"))return m&&!e||!m&&e;var o=new Ho(s,l);for(Oo.isText(s)&&(e&&0===r?o.prev():e||r!==s.nodeValue.length||o.next());t=o.current();){if(Oo.isElement(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),v[n]&&"br"!==n))return!1}else if(Oo.isText(t)&&!/^[ \t\r\n]*$/.test(t.nodeValue))return!1;e?o.prev():o.next()}return!0},w=function(){r=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?b(h):b(),bc(a)&&Bw(g,c)&&g.isEmpty(l)?r=g.split(c,l):g.insertAfter(r,l),ww(a,r)};Wv(g,y).each(function(e){y.setStart(e.startContainer,e.startOffset),y.setEnd(e.endContainer,e.endOffset)}),s=y.startContainer,i=y.startOffset,h=mc(a),n=!(!e||!e.shiftKey);var x,z,N,E,S,k,T=!(!e||!e.ctrlKey);Oo.isElement(s)&&s.hasChildNodes()&&(m=i>s.childNodes.length-1,s=s.childNodes[Math.min(i,s.childNodes.length-1)]||s,i=m&&Oo.isText(s)?s.nodeValue.length:0),(u=Hw(g,s))&&((h&&!n||!h&&n)&&(s=function(e,t,n,r,o){var i,a,u,s,l,c,f,d=t||"P",h=e.dom,m=Hw(h,r);if(!(a=h.getParent(r,h.isBlock))||!Bw(h,a)){if(c=(a=a||m)===e.getBody()||(f=a)&&/^(TD|TH|CAPTION)$/.test(f.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=h.create(d),_w(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!h.isBlock(s);)s=(u=s).previousSibling;if(u&&e.schema.isValidChild(c,d.toLowerCase())){for(i=h.create(d),_w(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!h.isBlock(s);)l=s.nextSibling,i.appendChild(s),s=l;n.setStart(r,o),n.setEnd(r,o)}}return r}(a,h,y,s,i)),l=g.getParent(s,g.isBlock),c=l?g.getParent(l.parentNode,g.isBlock):null,f=l?l.nodeName.toUpperCase():"","LI"!==(d=c?c.nodeName.toUpperCase():"")||T||(c=(l=c).parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&g.isEmpty(l)?Mw(a,b,c,l,h):h&&l===a.getBody()||(h=h||"P",Ba(l)?(r=Ua(l),g.isEmpty(l)&&Rw(l),ww(a,r)):C()?w():C(!0)?(r=l.parentNode.insertBefore(b(),l),ww(a,Dw(l,"HR")?r:l)):((t=(S=y,k=S.cloneRange(),k.setStart(S.startContainer,Ow(!0,S.startContainer,S.startOffset)),k.setEnd(S.endContainer,Ow(!1,S.endContainer,S.endOffset)),k).cloneRange()).setEndAfter(l),o=t.extractContents(),E=o,A(aa(cr.fromDom(E),vr),function(e){var t=e.dom();t.nodeValue=Ma(t.nodeValue)}),function(e){for(;Oo.isText(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(o),r=o.firstChild,g.insertAfter(o,l),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;Oo.isElement(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):(a=e,(u=o)&&"A"===u.nodeName&&a.isEmpty(u)&&e.remove(o));var a,u}}(g,v,r),x=g,(z=l).normalize(),(N=z.lastChild)&&!/^(left|right)$/gi.test(x.getStyle(N,"float",!0))||x.add(z,"br"),g.isEmpty(l)&&Rw(l),r.normalize(),g.isEmpty(r)?(g.remove(r),w()):ww(a,r)),g.setAttrib(r,"id",""),a.fire("NewBlock",{newBlock:r})))},Pw=function(e,t,n){var r=e.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),t.scrollIntoView(r),e.remove(r)},Vw=function(e,t,n,r){var o=e.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),t.setRng(o)},Iw=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();Wv(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var l=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=l&&3===s.nodeType?s.nodeValue.length:0}var c=i.getParent(s,i.isBlock),f=c?i.getParent(c.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",h=!(!t||!t.ctrlKey);"LI"!==d||h||(c=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(e,t,n){for(var r,o=new Ho(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||0<r.length)return!0}(e.schema,s,c)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),Ku(i,a,n),Pw(i,o,n),Vw(i,o,n,r),e.undoManager.add()},Fw=function(e,t){var n=cr.fromTag("br");qi(cr.fromDom(t),n),e.undoManager.add()},Uw=function(e,t){jw(e.getBody(),t)||$i(cr.fromDom(t),cr.fromTag("br"));var n=cr.fromTag("br");$i(cr.fromDom(t),n),Pw(e.dom,e.selection,n.dom()),Vw(e.dom,e.selection,n.dom(),!1),e.undoManager.add()},jw=function(e,t){return n=_u.after(t),!!Oo.isBr(n.getNode())||hl.nextPosition(e,_u.after(t)).map(function(e){return Oo.isBr(e.getNode())}).getOr(!1);var n},qw=function(e){return e&&"A"===e.nodeName&&"href"in e},$w=function(e){return e.fold($(!1),qw,qw,$(!1))},Ww=function(e,t){t.fold(i,d(Fw,e),d(Uw,e),i)},Kw=function(e,t){var n,r,o,i=(n=e,r=d(vy.isInlineTarget,n),o=_u.fromRangeStart(n.selection.getRng()),_y(r,n.getBody(),o).filter($w));i.isSome()?i.each(d(Ww,e)):Iw(e,t)},Xw=function(e,t){return zw(e).filter(function(e){return 0<t.length&&qr(cr.fromDom(e),t)}).isSome()},Yw=function(e){return Xw(e,pc(e))},Gw=function(e){return Xw(e,vc(e))},Jw=Xc([{br:[]},{block:[]},{none:[]}]),Qw=function(e,t){return Gw(e)},Zw=function(n){return function(e,t){return""===mc(e)===n}},ex=function(n){return function(e,t){return Ew(e)===n}},tx=function(n,r){return function(e,t){return Nw(e)===n.toUpperCase()===r}},nx=function(e){return tx("pre",e)},rx=function(n){return function(e,t){return hc(e)===n}},ox=function(e,t){return Yw(e)},ix=function(e,t){return t},ax=function(e){var t=mc(e),n=xw(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},ux=function(e,t){return function(n,r){return M(e,function(e,t){return e&&t(n,r)},!0)?T.some(t):T.none()}},sx=function(e,t){return yy([ux([Qw],Jw.none()),ux([tx("summary",!0)],Jw.br()),ux([nx(!0),rx(!1),ix],Jw.br()),ux([nx(!0),rx(!1)],Jw.block()),ux([nx(!0),rx(!0),ix],Jw.block()),ux([nx(!0),rx(!0)],Jw.br()),ux([ex(!0),ix],Jw.br()),ux([ex(!0)],Jw.block()),ux([Zw(!0),ix,ax],Jw.block()),ux([Zw(!0)],Jw.br()),ux([ox],Jw.br()),ux([Zw(!1),ix],Jw.br()),ux([ax],Jw.block())],[e,!(!t||!t.shiftKey)]).getOr(Jw.none())},lx=function(e,t){sx(e,t).fold(function(){Kw(e,t)},function(){Lw(e,t)},i)},cx=function(o){o.on("keydown",function(e){var t,n,r;e.keyCode===Ph.ENTER&&(t=o,(n=e).isDefaultPrevented()||(n.preventDefault(),(r=t.undoManager).typing&&(r.typing=!1,r.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),lx(t,n)})))})},fx=function(n,r){var e=r.container(),t=r.offset();return Oo.isText(e)?(e.insertData(t,n),T.some(Bu(e,t+n.length))):js(r).map(function(e){var t=cr.fromText(n);return r.isAtEnd()?$i(e,t):qi(e,t),Bu(t.dom(),n.length)})},dx=d(fx,"\xa0"),hx=d(fx," "),mx=function(e){return Bu.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},gx=function(e,t){var n=S($d(cr.fromDom(t.container()),e),Po);return P(n).getOr(e)},px=function(e,t){return mx(t)?qh(t):qh(t)||hl.prevPosition(gx(e,t).dom(),t).exists(qh)},vx=function(e,t){return mx(t)?jh(t):jh(t)||hl.nextPosition(gx(e,t).dom(),t).exists(jh)},yx=function(e){return js(e).bind(function(e){return fa(e,pr)}).exists(function(e){return t=Or(e,"white-space"),N(["pre","pre-wrap"],t);var t})},bx=function(e,t){return o=e,i=t,hl.prevPosition(o.dom(),i).isNone()||(n=e,r=t,hl.nextPosition(n.dom(),r).isNone())||mw(e,t)||gw(e,t)||fC(e,t)||cC(e,t);var n,r,o,i},Cx=function(e,t){var n,r,o,i=(r=(n=t).container(),o=n.offset(),Oo.isText(r)&&o<r.data.length?Bu(r,o+1):n);return!yx(i)&&(gw(e,i)||vw(e,i)||cC(e,i)||vx(e,i))},wx=function(e,t){return n=e,!yx(r=t)&&(mw(n,r)||pw(n,r)||fC(n,r)||px(n,r))||Cx(e,t);var n,r},xx=function(e,t){return Vh(e.charAt(t))},zx=function(e){var t=e.container();return Oo.isText(t)&&Qn(t.data,"\xa0")},Nx=function(e){var t=e.data,n=X(t.split(""),function(e,t,n){return Vh(e)&&0<t&&t<n.length-1&&Fh(n[t-1])&&Fh(n[t+1])?" ":e}).join("");return n!==t&&(e.data=n,!0)},Ex=function(c,e){return T.some(e).filter(zx).bind(function(e){var t,n,r,o,i,a,u,s,l=e.container();return(i=c,u=(a=l).data,s=Bu(a,0),!(!xx(u,0)||wx(i,s)||(a.data=" "+u.slice(1),0))||Nx(l)||(t=c,r=(n=l).data,o=Bu(n,r.length-1),!(!xx(r,r.length-1)||wx(t,o)||(n.data=r.slice(0,-1)+" ",0))))?T.some(e):T.none()})},Sx=function(t){var e=cr.fromDom(t.getBody());t.selection.isCollapsed()&&Ex(e,Bu.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})},kx=function(r,o){return function(e){return t=r,!yx(n=e)&&(bx(t,n)||px(t,n)||vx(t,n))?dx(o):hx(o);var t,n}},Tx=function(e){var t,n,r=_u.fromRangeStart(e.selection.getRng()),o=cr.fromDom(e.getBody());if(e.selection.isCollapsed()){var i=d(vy.isInlineTarget,e),a=_u.fromRangeStart(e.selection.getRng());return _y(i,e.getBody(),a).bind((n=o,function(e){return e.fold(function(e){return hl.prevPosition(n.dom(),_u.before(e))},function(e){return hl.firstPositionIn(e)},function(e){return hl.lastPositionIn(e)},function(e){return hl.nextPosition(n.dom(),_u.after(e))})})).bind(kx(o,r)).exists((t=e,function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}))}return!1},Ax=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,Vb([{keyCode:Ph.SPACEBAR,action:Pb(Tx,t)}],n).each(function(e){n.preventDefault()}))})},Mx=function(e,t){var n;t.hasAttribute("data-mce-caret")&&(Ua(t),(n=e).selection.setRng(n.selection.getRng()),e.selection.scrollIntoView(t))},Rx=function(e,t){var n,r=(n=e,ha(cr.fromDom(n.getBody()),"*[data-mce-caret]").fold($(null),function(e){return e.dom()}));if(r)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Mx(e,r)):void(_a(r)&&(Mx(e,r),e.undoManager.add()))},Dx=function(e){e.on("keyup compositionstart",d(Rx,e))},Bx=sr.detect().browser,Ox=function(t){var e,n;e=t,n=Qi(function(){e.composing||Sx(e)},0),Bx.isIE()&&(e.on("keypress",function(e){n.throttle()}),e.on("remove",function(e){n.cancel()})),t.on("input",function(e){!1===e.isComposing&&Sx(t)})},Hx=function(r){r.on("keydown",function(e){var t,n;!1===e.isDefaultPrevented()&&(t=r,n=e,Vb([{keyCode:Ph.END,action:mb(t,!0)},{keyCode:Ph.HOME,action:mb(t,!1)}],n).each(function(e){n.preventDefault()}))})},_x=function(e){var t=Xy.setupSelectedState(e);Dx(e),Ib(e,t),bw(e,t),cx(e),Ax(e),Ox(e),Hx(e)},Lx=function(u){var s,n,r,o=en.each,l=Ph.BACKSPACE,c=Ph.DELETE,f=u.dom,d=u.selection,e=u.settings,t=u.parser,i=He.gecko,a=He.ie,h=He.webkit,m="data:text/mce-internal,",g=a?"Text":"URL",p=function(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}},v=function(e){return e.isDefaultPrevented()},y=function(){u.shortcuts.add("meta+a",null,"SelectAll")},b=function(){u.on("keydown",function(e){if(!v(e)&&e.keyCode===l&&d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},C=function(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"===e.target.nodeName){if(11<He.ie)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))};return u.on("keydown",function(e){var t,n,r,o,i;if(!v(e)&&e.keyCode===Ph.BACKSPACE&&(n=(t=d.getRng()).startContainer,r=t.startOffset,o=f.getRoot(),i=n,t.collapsed&&0===r)){for(;i&&i.parentNode&&i.parentNode.firstChild===i&&i.parentNode!==o;)i=i.parentNode;"BLOCKQUOTE"===i.tagName&&(u.formatter.toggle("blockquote",null,i),(t=f.createRng()).setStart(n,0),t.setEnd(n,0),d.setRng(t))}}),s=function(e){var t=f.create("body"),n=e.cloneContents();return t.appendChild(n),d.serializer.serialize(t,{format:"html"})},u.on("keydown",function(e){var t,n,r,o,i,a=e.keyCode;if(!v(e)&&(a===c||a===l)){if(t=u.selection.isCollapsed(),n=u.getBody(),t&&!f.isEmpty(n))return;if(!t&&(r=u.selection.getRng(),o=s(r),(i=f.createRng()).selectNode(u.getBody()),o!==s(i)))return;e.preventDefault(),u.setContent(""),n.firstChild&&f.isBlock(n.firstChild)?u.selection.setCursorLocation(n.firstChild,0):u.selection.setCursorLocation(n,0),u.nodeChanged()}}),He.windowsPhone||u.on("keyup focusin mouseup",function(e){Ph.modifierPressed(e)||d.normalize()},!0),h&&(u.inline||f.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target===u.getDoc().documentElement)if(t=d.getRng(),u.getBody().focus(),"mousedown"===e.type){if(Ha(t.startContainer))return;d.placeCaretAt(e.clientX,e.clientY)}else d.setRng(t)}),u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==f.getContentEditableParent(t)&&(e.preventDefault(),u.selection.select(t),u.nodeChanged()),"A"===t.nodeName&&f.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),d.select(t))}),e.forced_root_block&&u.on("init",function(){p("DefaultParagraphSeparator",mc(u))}),u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})}),b(),t.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),He.iOS?(u.inline||u.on("keydown",function(){j.document.activeElement===j.document.body&&u.getWin().focus()}),C(),u.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),u.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):y()),11<=He.ie&&(C(),b()),He.ie&&(y(),p("AutoUrlDetect",!1),u.on("dragstart",function(e){var t,n,r;(t=e).dataTransfer&&(u.selection.isCollapsed()&&"IMG"===t.target.tagName&&d.select(t.target),0<(n=u.selection.getContent()).length&&(r=m+escape(u.id)+","+escape(n),t.dataTransfer.setData(g,r)))}),u.on("drop",function(e){if(!v(e)){var t=(i=e).dataTransfer&&(a=i.dataTransfer.getData(g))&&0<=a.indexOf(m)?(a=a.substr(m.length).split(","),{id:unescape(a[0]),html:unescape(a[1])}):null;if(t&&t.id!==u.id){e.preventDefault();var n=fv(e.x,e.y,u.getDoc());d.setRng(n),r=t.html,o=!0,u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:r,internal:o}):u.execCommand("mceInsertContent",!1,r)}}var r,o,i,a})),i&&(u.on("keydown",function(e){if(!v(e)&&e.keyCode===l){if(!u.getBody().getElementsByTagName("hr").length)return;if(d.isCollapsed()&&0===d.getRng().startOffset){var t=d.getNode(),n=t.previousSibling;if("HR"===t.nodeName)return f.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(f.remove(n),e.preventDefault())}}}),j.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!v(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),Ie.setEditorTimeout(u,function(){t.focus()})}}),n=function(){var e=f.getAttribs(d.getStart().cloneNode(!1));return function(){var t=d.getStart();t!==u.getBody()&&(f.setAttrib(t,"style",null),o(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}},r=function(){return!d.isCollapsed()&&f.getParent(d.getStart(),f.isBlock)!==f.getParent(d.getEnd(),f.isBlock)},u.on("keypress",function(e){var t;if(!v(e)&&(8===e.keyCode||46===e.keyCode)&&r())return t=n(),u.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),f.bind(u.getDoc(),"cut",function(e){var t;!v(e)&&r()&&(t=n(),Ie.setEditorTimeout(u,function(){t()}))}),e.readonly||u.on("BeforeExecCommand mousedown",function(){p("StyleWithCSS",!1),p("enableInlineTableEditing",!1),e.object_resizing||p("enableObjectResizing",!1)}),u.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||o(f.select("a"),function(e){var t=e.parentNode,n=f.getRoot();if(t.lastChild===e){for(;t&&!f.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}f.add(t,"br",{"data-mce-bogus":1})}})}),u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),He.mac&&u.on("keydown",function(e){!Ph.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),u.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),b()),{refreshContentEditable:function(){},isHidden:function(){var e;return!(!i||u.removed||(e=u.selection.getSel())&&e.rangeCount&&0!==e.rangeCount)}}},Px=function(e){return Oo.isElement(e)&&Fo(cr.fromDom(e))},Vx=function(t){t.on("click",function(e){3<=e.detail&&function(e){var t=e.selection.getRng(),n=Bu.fromRangeStart(t),r=Bu.fromRangeEnd(t);if(Bu.isElementPosition(n)){var o=n.container();Px(o)&&hl.firstPositionIn(o).each(function(e){return t.setStart(e.container(),e.offset())})}Bu.isElementPosition(r)&&(o=n.container(),Px(o)&&hl.lastPositionIn(o).each(function(e){return t.setEnd(e.container(),e.offset())}));e.selection.setRng(qg(t))}(t)})},Ix=function(e){var t,n;(t=e).on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}),(n=e).parser.addNodeFilter("details",function(e){A(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),n.serializer.addNodeFilter("details",function(e){A(e,function(e){var t=e.attr("data-mce-open");e.attr("open",K(t)?t:null),e.attr("data-mce-open",null)})})},Fx=Di.DOM,Ux=function(e){var t;e.bindPendingEventDelegates(),e.initialized=!0,e.fire("init"),e.focus(!0),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),(t=e).settings.auto_focus&&Ie.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)},jx=function(t,e){var n,r,u,o,i=t.settings,a=t.getElement(),s=t.getDoc();i.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(s.open(),s.write(t.iframeHTML),s.close()),t.inline&&(t.on("remove",function(){var e=this.getBody();Fx.removeClass(e,"mce-content-body"),Fx.removeClass(e,"mce-edit-focus"),Fx.setAttrib(e,"contentEditable",null)}),Fx.addClass(a,"mce-content-body"),t.contentDocument=s=j.document,t.contentWindow=j.window,t.bodyElement=a,t.contentAreaContainer=a,i.root_name=a.nodeName.toLowerCase()),(n=t.getBody()).disabled=!0,t.readonly=i.readonly,t.readonly||(t.inline&&"static"===Fx.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=t.getParam("content_editable_state",!0)),n.disabled=!1,t.editorUpload=Fd(t),t.schema=yi(i),t.dom=Di(s,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:i.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:Dc(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=((o=zp((u=t).settings,u.schema)).addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,o,i=e.length,a=u.dom;i--;)if(r=(n=e[i]).attr(t),o="data-mce-"+t,!n.attr(o)){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(o,r),n.attr(t,r)):"tabindex"===t?(n.attr(o,r),n.attr(t,null)):n.attr(o,u.convertURL(r,t,n.name))}}),o.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),o.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),o.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=u.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new Ql("br",1)).shortEnded=!0)}),o),t.serializer=kp(i,t),t.selection=oy(t.dom,t.getWin(),t.serializer,t),t.annotator=Xl(t),t.formatter=up(t),t.undoManager=wm(t),t._nodeChangeDispatcher=new nh(t),t._selectionOverrides=om(t),Ix(t),Vx(t),_x(t),Yd(t),t.fire("PreInit"),i.browser_spellcheck||i.gecko_spellcheck||(s.body.spellcheck=!1,Fx.setAttrib(n,"spellcheck","false")),t.quirks=Lx(t),t.fire("PostRender");var l,c,f,d,h,m=Pc(t);m!==undefined&&(n.dir=m),i.protect&&t.on("BeforeSetContent",function(t){en.each(i.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),0<t.contentStyles.length&&(r="",en.each(t.contentStyles,function(e){r+=e+"\r\n"}),t.dom.addStyle(r)),(l=t,l.inline?Fx.styleSheetLoader:l.dom.styleSheetLoader).loadAll(t.contentCSS,function(e){Ux(t)},function(e){Ux(t)}),i.content_style&&(c=t,f=i.content_style,d=cr.fromDom(c.getDoc().head),h=cr.fromTag("style"),Mr(h,"type","text/css"),Ki(h,cr.fromText(f)),Ki(d,h))},qx=Di.DOM,$x=function(e,t){var n,r,o,i,a=e.editorManager.translate("Rich Text Area. Press ALT-0 for help."),u=(n=e.id,r=a,t.height,o=uc(e),i=cr.fromTag("iframe"),Rr(i,o),Rr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),ra(i,"tox-edit-area__iframe"),i).dom();u.onload=function(){u.onload=null,e.fire("load")};var s,l,c,f,d=function(e,t){if(j.document.domain!==j.window.location.hostname&&He.ie&&He.ie<12){var n=Pd("mce");e[n]=function(){jx(e)};var r='javascript:(function(){document.open();document.domain="'+j.document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return qx.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=(f=sc(s=e)+"<html><head>",lc(s)!==s.documentBaseUrl&&(f+='<base href="'+s.documentBaseURI.getURI()+'" />'),f+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',l=cc(s),c=fc(s),dc(s)&&(f+='<meta http-equiv="Content-Security-Policy" content="'+dc(s)+'" />'),f+='</head><body id="'+l+'" class="mce-content-body '+c+'" data-id="'+s.id+'"><br></body></html>'),qx.add(t.iframeContainer,u),d},Wx=function(e,t){var n=$x(e,t);t.editorContainer&&(qx.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=qx.isHidden(t.editorContainer)),e.getElement().style.display="none",qx.setAttrib(e.id,"aria-hidden","true"),n||jx(e)},Kx=function(e){var t,n,r,o,i;e.contentCSS=e.contentCSS.concat((n=Lc(t=e),r=t.editorManager.baseURL+"/skins/content",o="content"+t.editorManager.suffix+".css",i=!0===t.inline,X(n,function(e){return/^[a-z0-9\-]+$/i.test(e)&&!i?r+"/"+e+"/"+o:t.documentBaseURI.toAbsolute(e)})))},Xx=Di.DOM,Yx=function(t,n,e){var r=Nd.get(e),o=Nd.urls[e]||t.documentBaseUrl.replace(/\/$/,"");if(e=en.trim(e),r&&-1===en.inArray(n,e)){if(en.each(Nd.dependencies(e),function(e){Yx(t,n,e)}),t.plugins[e])return;try{var i=new r(t,o,t.$);(t.plugins[e]=i).init&&(i.init(t,o),n.push(e))}catch(eE){xd.pluginInitError(t,e,eE)}}},Gx=function(e){return e.replace(/^\-/,"")},Jx=function(e){return{editorContainer:e,iframeContainer:e}},Qx=function(e){var t,n,r=e.getElement();return e.inline?Jx(null):(t=r,n=Xx.create("div"),Xx.insertAfter(n,t),Jx(n))},Zx=function(e){var n,t,r,o,i,a;e.fire("ScriptsLoaded"),n=e,t=en.trim(n.settings.icons),r=n.ui.registry.getAll().icons,o=G({},{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 1 1 0-2h9.2zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h6.8zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h4.4zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 0 1 0-2h2zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1z" fill-rule="nonzero"/></svg>',"border-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 1 1 0-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0zm-10-7l-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8zM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9zM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13z" fill-rule="nonzero"/></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2zm14-2v2h2a2 2 0 0 0-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 0 0 2-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2zm2 14h-2v2a2 2 0 0 0 2-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1zM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2.1 2a2 2 0 1 0 2.7 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19zm-1 8.8l.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5z" fill-rule="evenodd"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><g fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke="#000" stroke-width="2"><path d="M12 5v14M5 12h14"/></g></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8zM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7zM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 0 0-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 0 0 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-cell-properties":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm10 10h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10 0v3h4v-3h-4zm0-1h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><path d="M12.5 5.5v6h6v-6h-6zm-1 0h-6v6h6v-6zm1 13h6v-6h-6v6zm-1 0v-6h-6v6h6zm-7-14h15v15h-15v-15z" fill-rule="nonzero"/></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5.5 5.5v13h13v-13h-13zm-1-1h15v15h-15v-15z" opacity=".2"/><path d="M11.5 11.5v-7h1v7h7v1h-7v7h-1v-7h-7v-1h7z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path d="M9 11.2l1 1v.2l-1 1v-2.2zm5 1l1-1v2.2l-1-1v-.2zM20 5v14H4V5h16zm-1 2h-4v.8l-.2-.2-.8.8V7h-4v1.4l-.8-.8-.2.2V7H5v11h4v-1.8l.5.5.5-.4V18h4v-1.8l.8.8.2-.3V18h4V7zm-3.9 3.4l-1.8 1.9 1.8 1.9c.4.3.4.9 0 1.2-.3.3-.8.3-1.2 0L12 13.5l-1.8 1.9a.8.8 0 0 1-1.2 0 .9.9 0 0 1 0-1.2l1.8-1.9-1.9-2a.9.9 0 0 1 1.2-1.2l2 2 1.8-1.8c.3-.4.9-.4 1.2 0a.8.8 0 0 1 0 1.1z" fill-rule="evenodd"/></svg>',"table-delete-row":'<svg width="24" height="24"><path d="M16.7 8.8l1.1 1.2-2.4 2.5L18 15l-1.2 1.2-2.5-2.5-2.4 2.5-1.3-1.2 2.5-2.5-2.5-2.5 1.2-1.3 2.6 2.6 2.4-2.5zM4 5h16v14H4V5zm15 5V7H5v3h4.8l1 1H5v3h5.8l-1 1H5v3h14v-3h-.4l-1-1H19v-3h-1.3l1-1h.3z" fill-rule="evenodd"/></svg>',"table-delete-table":'<svg width="24" height="26"><path d="M4 6h16v14H4V6zm1 2v11h14V8H5zm11.7 8.7l-1.5 1.5L12 15l-3.3 3.2-1.4-1.5 3.2-3.2-3.3-3.2 1.5-1.5L12 12l3.2-3.2 1.5 1.5-3.2 3.2 3.2 3.2z" fill-rule="evenodd"/></svg>',"table-insert-column-after":'<svg width="24" height="24"><path d="M14.3 9c.4 0 .7.3.7.6v2.2h2.1c.4 0 .7.3.7.7 0 .4-.3.7-.7.7H15v2.2c0 .3-.3.6-.7.6a.7.7 0 0 1-.6-.6v-2.2h-2.2a.7.7 0 0 1 0-1.4h2.2V9.6c0-.3.3-.6.6-.6zM4 5h16v14H4V5zm5 13v-3H5v3h4zm0-4v-3H5v3h4zm0-4V7H5v3h4zm10 8V7h-9v11h9z" fill-rule="evenodd"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path d="M9.7 16a.7.7 0 0 1-.7-.6v-2.2H6.9a.7.7 0 0 1 0-1.4H9V9.6c0-.3.3-.6.7-.6.3 0 .6.3.6.6v2.2h2.2c.4 0 .8.3.8.7 0 .4-.4.7-.8.7h-2.2v2.2c0 .3-.3.6-.6.6zM4 5h16v14H4V5zm10 13V7H5v11h9zm5 0v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V7h-4v3h4z" fill-rule="evenodd"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path d="M14.8 10.5c0 .3-.2.5-.5.5h-1.8v1.8c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.6V11H9.7a.5.5 0 0 1 0-1h1.8V8.3c0-.3.2-.6.5-.6s.5.3.5.6V10h1.8c.3 0 .5.2.5.5zM4 5h16v14H4V5zm5 13v-3H5v3h4zm5 0v-3h-4v3h4zm5 0v-3h-4v3h4zm0-4V7H5v7h14z" fill-rule="evenodd"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path d="M9.2 14.5c0-.3.2-.5.5-.5h1.8v-1.8c0-.3.2-.5.5-.5s.5.2.5.6V14h1.8c.3 0 .5.2.5.5s-.2.5-.5.5h-1.8v1.7c0 .3-.2.6-.5.6a.5.5 0 0 1-.5-.6V15H9.7a.5.5 0 0 1-.5-.5zM4 5h16v14H4V5zm6 2v3h4V7h-4zM5 7v3h4V7H5zm14 11v-7H5v7h14zm0-8V7h-4v3h4z" fill-rule="evenodd"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M4 5h16v13H4V5zm10 12v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V6h-4v3h4zm5 8v-3h-4v3h4zm0-4v-3h-4v3h4zm0-4V6h-4v3h4z" fill-rule="evenodd"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 13h9v-7h-9v7zm4-11h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10-1h4V7h-4v3zM5 15v3h4v-3H5z" fill-rule="evenodd"/></svg>',"table-row-properties":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm10 10h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm6 3h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',"table-split-cells":'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 2v3h4V7h-4zM9 18v-3H5v3h4zm0-4v-3H5v3h4zm0-4V7H5v3h4zm10 8v-7h-9v7h9zm0-8V7h-4v3h4zm-3.5 4.5l1.5 1.6c.3.2.3.7 0 1-.2.2-.7.2-1 0l-1.5-1.6-1.6 1.5c-.2.3-.7.3-1 0a.7.7 0 0 1 0-1l1.6-1.5-1.5-1.6a.7.7 0 0 1 1-1l1.5 1.6 1.6-1.5c.2-.3.7-.3 1 0 .2.2.2.7 0 1l-1.6 1.5z" fill-rule="evenodd"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M4 5h16v13H4V5zm5 12v-3H5v3h4zm0-4v-3H5v3h4zm5 4v-3h-4v3h4zm0-4v-3h-4v3h4zm5 4v-3h-4v3h4zm0-4v-3h-4v3h4z" fill-rule="evenodd"/></svg>',table:'<svg width="24" height="24"><path d="M4 5h16v14H4V5zm6 9h4v-3h-4v3zm4 1h-4v3h4v-3zm0-8h-4v3h4V7zM9 7H5v3h4V7zm-4 4v3h4v-3H5zm10 0v3h4v-3h-4zm0-1h4V7h-4v3zM5 15v3h4v-3H5zm10 3h4v-3h-4v3z" fill-rule="evenodd"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 1 1 2 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2zM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1zM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12zM11 6.4L8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>'},zd.get(t).icons),wr(o,function(e,t){Sr(r,t)||n.ui.registry.addIcon(t,e)}),function(e){var t=e.settings.theme;if(K(t)){e.settings.theme=Gx(t);var n=Ed.get(t);e.theme=new n(e,Ed.urls[t]),e.theme.init&&e.theme.init(e,Ed.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),i=e,a=[],en.each(i.settings.plugins.split(/[ ,]/),function(e){Yx(i,a,Gx(e))});var u,s,l,c,f,d=(f=(u=e).getElement(),u.orgDisplay=f.style.display,K(u.settings.theme)?u.theme.renderUI():b(u.settings.theme)?(l=(s=u).getElement(),(c=(0,s.settings.theme)(s,l)).editorContainer.nodeType&&(c.editorContainer.id=c.editorContainer.id||s.id+"_parent"),c.iframeContainer&&c.iframeContainer.nodeType&&(c.iframeContainer.id=c.iframeContainer.id||s.id+"_iframecontainer"),c.height=c.iframeHeight?c.iframeHeight:l.offsetHeight,c):Qx(u));return e.editorContainer=d.editorContainer?d.editorContainer:null,Kx(e),e.inline?jx(e):Wx(e,d)},ez=Di.DOM,tz=function(e){return"-"===e.charAt(0)},nz=function(t,e){var n;(n=e,T.from(zc(n)).filter(function(e){return 0<e.length}).map(function(e){return{url:e,name:T.none()}})).orThunk(function(){return t=e,T.from(xc(t)).filter(function(e){return 0<e.length&&!zd.has(e)}).map(function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons.js",name:T.some(e)}});var t}).each(function(e){t.add(e.url,i,undefined,function(){xd.iconsLoadError(e.url,e.name.getOrUndefined())})})},rz=function(e,t){var o=_i.ScriptLoader;!function(e,t,n,r){var o=t.settings,i=o.theme;if(K(i)){if(!tz(i)&&!Ed.urls.hasOwnProperty(i)){var a=o.theme_url;a?Ed.load(i,t.documentBaseURI.toAbsolute(a)):Ed.load(i,"themes/"+i+"/theme"+n+".js")}e.loadQueue(function(){Ed.waitFor(i,r)})}else r()}(o,e,t,function(){var n,r;!function(e,t){var n=Bc(t),r=Oc(t);if(!1===Ii.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,i,undefined,function(){xd.languageLoadError(o,n)})}}(o,e),nz(o,e),n=e.settings,r=t,p(n.plugins)&&(n.plugins=n.plugins.join(" ")),en.each(n.external_plugins,function(e,t){Nd.load(t,e,i,undefined,function(){xd.pluginLoadError(t,e)}),n.plugins+=" "+t}),en.each(n.plugins.split(/[ ,]/),function(e){if((e=en.trim(e))&&!Nd.urls[e])if(tz(e)){e=e.substr(1,e.length);var t=Nd.dependencies(e);en.each(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=Nd.createUrl(t,e),Nd.load(e.resource,e,i,undefined,function(){xd.pluginLoadError(e.prefix+e.resource+e.suffix,e.resource)})})}else{var n={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};Nd.load(e,n,i,undefined,function(){xd.pluginLoadError(n.prefix+n.resource+n.suffix,e)})}}),o.loadQueue(function(){e.removed||Zx(e)},e,function(){e.removed||Zx(e)})})},oz=function(t){var e=t.settings,n=t.id;Ii.setCode(Bc(t));var r=function(){ez.unbind(j.window,"ready",r),t.render()};if(Ye.Event.domLoaded){if(t.getElement()&&He.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||ez.getParent(n,"form");o&&(t.formElement=o,e.hidden_input&&!Oo.isTextareaOrInput(t.getElement())&&(ez.insertAfter(ez.create("input",{type:"hidden",name:n}),n),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},ez.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=pd(t),t.notificationManager=md(t),"xml"===e.encoding&&t.on("GetContent",function(e){e.save&&(e.content=ez.encode(e.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),rz(t,t.suffix)}}else ez.bind(j.window,"ready",r)},iz="data-mce-contenteditable",az=function(e,t,n){ia(e,t)&&!1===n?function(e,t){ea(e)?e.dom().classList.remove(t):na(e,t);oa(e)}(e,t):n&&ra(e,t)},uz=function(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},sz=function(e,t){e.dom().contentEditable=t?"true":"false"},lz=function(e,t){var n,r,o=cr.fromDom(e.getBody());az(o,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),r=e,T.from(r.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")}),e.readonly=!0,sz(o,!1),A(ua(o,'*[contenteditable="true"]'),function(e){Mr(e,iz,"true"),sz(e,!1)})):(e.readonly=!1,sz(o,!0),A(ua(o,"*["+iz+'="true"]'),function(e){Br(e,iz),sz(e,!0)}),uz(e,"StyleWithCSS",!1),uz(e,"enableInlineTableEditing",!1),uz(e,"enableObjectResizing",!1),Of(e)&&e.focus(),(n=e).selection.setRng(n.selection.getRng()),e.nodeChanged())},cz=function(e){return!0===e.readonly},fz=function(t){t.parser.addAttributeFilter("contenteditable",function(e){cz(t)&&A(e,function(e){e.attr(iz,e.attr("contenteditable")),e.attr("contenteditable","false")})}),t.serializer.addAttributeFilter(iz,function(e){cz(t)&&A(e,function(e){e.attr("contenteditable",e.attr(iz))})}),t.serializer.addTempAttr(iz)},dz=["design","readonly"],hz=function(e,t,n,r){var o=n[t.get()],i=n[r];try{i.activate()}catch(eE){return void j.console.error("problem while activating editor mode "+r+":",eE)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&lz(e,i.editorReadOnly),t.set(r),Uf(e,r)},mz=function(t){var e,n,r=Li("design"),o=Li({design:{activate:i,deactivate:i,editorReadOnly:!1},readonly:{activate:i,deactivate:i,editorReadOnly:!0}});return(e=t).serializer?fz(e):e.on("PreInit",function(){fz(e)}),(n=t).on("ShowCaret",function(e){cz(n)&&e.preventDefault()}),n.on("ObjectSelected",function(e){cz(n)&&e.preventDefault()}),{isReadOnly:function(){return cz(t)},set:function(e){return function(e,t,n,r){if(r!==n.get()){if(!Sr(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?hz(e,n,t,r):e.on("init",function(){return hz(e,n,t,r)})}}(t,o.get(),r,e)},get:function(){return r.get()},register:function(e,t){o.set(function(e,t,n){var r;if(N(dz,t))throw new Error("Cannot override default mode "+t);return G({},e,((r={})[t]=G({},n,{deactivate:function(){try{n.deactivate()}catch(eE){j.console.error("problem while deactivating editor mode "+t+":"),j.console.error(eE)}}}),r))}(o.get(),e,t))}}},gz=function(e){return en.grep(e.childNodes,function(e){return"LI"===e.nodeName})},pz=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&("\xa0"===(t=e.firstChild).data||Oo.isBr(t));var t},vz=function(e){return 0<e.length&&(!(t=e[e.length-1]).firstChild||pz(t))?e.slice(0,-1):e;var t},yz=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},bz=function(e,t){var n=_u.after(e),r=nl(t).prev(n);return r?r.toRange():null},Cz=function(t,e,n){var r,o,i,a,u=t.parentNode;return en.each(e,function(e){u.insertBefore(e,t)}),r=t,o=n,i=_u.before(r),(a=nl(o).next(i))?a.toRange():null},wz=function(e,t){var n,r,o,i,a,u,s=t.firstChild,l=t.lastChild;return s&&"meta"===s.name&&(s=s.next),l&&"mce_marker"===l.attr("id")&&(l=l.prev),r=l,u=(n=e).getNonEmptyElements(),r&&(r.isEmpty(u)||(o=r,n.getBlockElements()[o.name]&&(a=o).firstChild&&a.firstChild===a.lastChild&&("br"===(i=o.firstChild).name||"\xa0"===i.value)))&&(l=l.prev),!(!s||s!==l||"ul"!==s.name&&"ol"!==s.name)},xz=function(e,o,i,t){var n,r,a,u,s,l,c,f,d,h,m,g,p,v,y,b,C,w,x,z=(n=o,r=t,l=e.serialize(r),c=n.createFragment(l),u=(a=c).firstChild,s=a.lastChild,u&&"META"===u.nodeName&&u.parentNode.removeChild(u),s&&"mce_marker"===s.id&&s.parentNode.removeChild(s),a),N=yz(o,i.startContainer),E=vz(gz(z.firstChild)),S=o.getRoot(),k=function(e){var t=_u.fromRangeStart(i),n=nl(o.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||yz(o,r.getNode())!==N};return k(1)?Cz(N,E,S):k(2)?(f=N,d=E,h=S,o.insertAfter(d.reverse(),f),bz(d[0],h)):(g=E,p=S,v=m=N,b=(y=i).cloneRange(),C=y.cloneRange(),b.setStartBefore(v),C.setEndAfter(v),w=[b.cloneContents(),C.cloneContents()],(x=m.parentNode).insertBefore(w[0],m),en.each(g,function(e){x.insertBefore(e,m)}),x.insertBefore(w[1],m),x.removeChild(m),bz(g[g.length-1],p))},zz=function(e,t){return!!yz(e,t)},Nz=Oo.matchNodeNames(["td","th"]),Ez=function(e,t){var n,r,o=e.selection.getRng(),i=o.startContainer,a=o.startOffset;o.collapsed&&(n=i,r=a,Oo.isText(n)&&"\xa0"===n.nodeValue[r-1])&&Oo.isText(i)&&(i.insertData(a-1," "),i.deleteData(a,1),o.setStart(i,a),o.setEnd(i,a),e.selection.setRng(o)),e.selection.setContent(t)},Sz=function(e,t,n){var r,o,i,a,u,s,l,c,f,d,h,m=e.selection,g=e.dom;if(/^ | $/.test(t)&&(t=function(e,t){var n,r;n=e.startContainer,r=e.startOffset;var o=function(e){return n[e]&&3===n[e].nodeType};return 3===n.nodeType&&(0<r?t=t.replace(/^&nbsp;/," "):o("previousSibling")||(t=t.replace(/^ /,"&nbsp;")),r<n.length?t=t.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(t=t.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),t}(m.getRng(),t)),r=e.parser,h=n.merge,o=jc({validate:e.settings.validate},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:t,format:"html",selection:!0,paste:n.paste},(s=e.fire("BeforeSetContent",s)).isDefaultPrevented())e.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(t=s.content).indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);var p,v,y,b,C,w,x=(c=m.getRng()).startContainer||(c.parentElement?c.parentElement():null),z=e.getBody();x===z&&m.isCollapsed()&&g.isBlock(z.firstChild)&&(p=e,(v=z.firstChild)&&!p.schema.getShortEndedElements()[v.nodeName])&&g.isEmpty(z.firstChild)&&((c=g.createRng()).setStart(z.firstChild,0),c.setEnd(z.firstChild,0),m.setRng(c)),m.isCollapsed()||(e.selection.setRng(qg(e.selection.getRng())),e.getDoc().execCommand("Delete",!1,null),y=e.selection.getRng(),b=t,C=y.startContainer,w=y.startOffset,3===C.nodeType&&y.collapsed&&("\xa0"===C.data[w]?(C.deleteData(w,1),/[\u00a0| ]$/.test(b)||(b+=" ")):"\xa0"===C.data[w-1]&&(C.deleteData(w-1,1),/[\u00a0| ]$/.test(b)||(b=" "+b))),t=b);var N,E,S,k={context:(i=m.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(t,k),!0===n.paste&&wz(e.schema,u)&&zz(g,i))return c=xz(o,g,e.selection.getRng(),u),e.selection.setRng(c),void e.fire("SetContent",s);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(u),"mce_marker"===(f=u.lastChild).attr("id"))for(f=(l=f).prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){e.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(l,f,"br"===f.name);break}if(e._selectionOverrides.showBlockCaretContainer(i),k.invalid){for(Ez(e,d),i=m.getNode(),a=e.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)f=(i=f).parentNode;t=i===a?a.innerHTML:g.getOuterHTML(i),t=o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,t):g.setOuterHTML(i,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):Ez(e,t)}}(e,t=o.serialize(u),i);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=new pg(r);en.each(r.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!==o;t=t.parentNode)n[e.nodeName.toLowerCase()]&&i.compare(t,e)&&r.remove(e,!0)})}}(e,h),function(n,e){var t,r,o,i,a,u=n.dom,s=n.selection;if(e){if(n.selection.scrollIntoView(e),t=function(e){for(var t=n.getBody();e&&e!==t;e=e.parentNode)if("false"===n.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),s.select(t);var l=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(l.setStart(i,i.nodeValue.length),He.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(l.setStartBefore(e),l.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(n.$(r).empty(),l.setStart(r,0),l.setEnd(r,0),Nz(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var t=_u.fromRangeStart(e);if(t=nl(n.getBody()).next(t))return t.toRange()}(l))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(l=o,u.remove(r))),s.setRng(l)}}(e,g.get("mce_marker")),N=e.getBody(),en.each(N.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),E=e.dom,S=e.selection.getStart(),T.from(E.getParent(S,"td,th")).map(cr.fromDom).each(Nm),e.fire("SetContent",s),e.addVisual()}},kz=function(e,t){var n,r,o="string"!=typeof(n=t)?(r=en.extend({paste:n.paste,data:{paste:n.paste}},n),{content:n.content,details:r}):{content:n,details:{}};Sz(e,o.content,o.details)},Tz=function(e,t){e.getDoc().execCommand(t,!1,null)},Az=function(e){yw(e,!1)||CC(e,!1)||zC(e,!1)||kC(e,!1)||rC(e,!1)||nw(e)||uC(e,!1)||RC(e,!1)||(Tz(e,"Delete"),Ub(e))},Mz=function(e){CC(e,!0)||zC(e,!0)||kC(e,!0)||rC(e,!0)||nw(e)||uC(e,!0)||RC(e,!0)||Tz(e,"ForwardDelete")},Rz=function(s){return function(u,e){return T.from(e).map(cr.fromDom).filter(pr).bind(function(e){return(r=s,o=u,i=e.dom(),a=function(e){return _r(e,r)},fa(cr.fromDom(i),function(e){return a(e).isSome()},function(e){return Wr(cr.fromDom(o),e)}).bind(a)).or((t=s,n=e.dom(),T.from(Di.DOM.getStyle(n,t,!0))));var t,n,r,o,i,a}).getOr("")}},Dz={getFontSize:Rz("font-size"),getFontFamily:q(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},Rz("font-family")),toPt:function(e,t){return/[0-9.]+px$/.test(e)?(n=72*parseInt(e,10)/96,r=t||0,o=Math.pow(10,r),Math.round(n*o)/o+"pt"):e;var n,r,o}},Bz=function(e){return hl.firstPositionIn(e.getBody()).map(function(e){var t=e.container();return Oo.isText(t)?t.parentNode:t})},Oz=function(o){return T.from(o.selection.getRng()).bind(function(e){var t,n,r=o.getBody();return n=r,(t=e).startContainer===n&&0===t.startOffset?T.none():T.from(o.selection.getStart(!0))})},Hz=function(e,t){if(/^[0-9\.]+$/.test(t)){var n=parseInt(t,10);if(1<=n&&n<=7){var r=Cc(e),o=wc(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},_z=function(e,t){var n,r,o=Hz(e,t);e.formatter.toggle("fontname",{value:(n=o,r=n.split(/\s*,\s*/),X(r,function(e){return-1===e.indexOf(" ")||Zn(e,'"')||Zn(e,"'")?e:'"'+e+'"'}).join(","))}),e.nodeChanged()},Lz=en.each,Pz=en.map,Vz=en.inArray,Iz=function(){function e(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}return e.prototype.execCommand=function(t,n,r,e){var o,i,a=!1,u=this;if(!u.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus?mf(u.editor):u.editor.focus(),(e=u.editor.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=u.commands.exec[i])return o(i,n,r),u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(Lz(this.editor.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=u.editor.getDoc().execCommand(t,n,r)}catch(s){}return!!a&&(u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0)}},e.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},e.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},e.prototype.addCommands=function(e,n){var r=this;n=n||"exec",Lz(e,function(t,e){Lz(e.toLowerCase().split(","),function(e){r.commands[n][e]=t})})},e.prototype.addCommand=function(e,o,i){var a=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,t,n,r){return o.call(i||a.editor,t,n,r)}},e.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},e.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},e.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},e.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},e.prototype.execNativeCommand=function(e,t,n){return t===undefined&&(t=!1),n===undefined&&(n=null),this.editor.getDoc().execCommand(e,t,n)},e.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},e.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t?{value:t}:undefined),this.editor.nodeChanged()},e.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},e.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},e.prototype.setupCommands=function(i){var a=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=i.getDoc();try{a.execNativeCommand(e)}catch(o){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=i.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");He.mac&&(r=r.replace(/Ctrl\+/g,"\u2318+")),i.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(i.selection.isCollapsed()){var e=i.dom.getParent(i.selection.getStart(),"a");e&&i.dom.remove(e,!0)}else i.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"===t&&(t="justify"),Lz("left,center,right,justify".split(","),function(e){t!==e&&i.formatter.remove("align"+e)}),"none"!==t&&a.toggleFormat("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;a.execNativeCommand(e),(t=i.dom.getParent(i.selection.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(a.storeSelection(),i.dom.split(n,t),a.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){a.toggleFormat(e)},"ForeColor,HiliteColor":function(e,t,n){a.toggleFormat(e,n)},FontName:function(e,t,n){_z(i,n)},FontSize:function(e,t,n){var r,o;o=n,(r=i).formatter.toggle("fontsize",{value:Hz(r,o)}),r.nodeChanged()},RemoveFormat:function(e){i.formatter.remove(e)},mceBlockQuote:function(){a.toggleFormat("blockquote")},FormatBlock:function(e,t,n){return a.toggleFormat(n||"p")},mceCleanup:function(){var e=i.selection.getBookmark();i.setContent(i.getContent()),i.selection.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||i.selection.getNode();r!==i.getBody()&&(a.storeSelection(),i.dom.remove(r,!0),a.restoreSelection())},mceSelectNodeDepth:function(e,t,n){var r=0;i.dom.getParent(i.selection.getNode(),function(e){if(1===e.nodeType&&r++===n)return i.selection.select(e),!1},i.getBody())},mceSelectNode:function(e,t,n){i.selection.select(n)},mceInsertContent:function(e,t,n){kz(i,n)},mceInsertRawHTML:function(e,t,n){i.selection.setContent("tiny_mce_marker");var r=i.getContent();i.setContent(r.replace(/tiny_mce_marker/g,function(){return n}))},mceInsertNewLine:function(e,t,n){lx(i,n)},mceToggleFormat:function(e,t,n){a.toggleFormat(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){lw(i,e)},mceRepaint:function(){},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,i.selection.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=i.dom.getParent(i.selection.getNode(),"a"),n.href=n.href.replace(/ /g,"%20"),r&&n.href||i.formatter.remove("link"),n.href&&i.formatter.apply("link",n,r)},selectAll:function(){var e=i.dom.getParent(i.selection.getStart(),Oo.isContentEditableTrue);if(e){var t=i.dom.createRng();t.selectNodeContents(e),i.selection.setRng(t)}},"delete":function(){Az(i)},forwardDelete:function(){Mz(i)},mceNewDocument:function(){i.setContent("")},InsertLineBreak:function(e,t,n){return Kw(i,n),!0}});var e=function(n){return function(){var e=i.selection.isCollapsed()?[i.dom.getParent(i.selection.getNode(),i.dom.isBlock)]:i.selection.getSelectedBlocks(),t=Pz(e,function(e){return!!i.formatter.matchNode(e,n)});return-1!==Vz(t,!0)}};a.addCommands({JustifyLeft:e("alignleft"),JustifyCenter:e("aligncenter"),JustifyRight:e("alignright"),JustifyFull:e("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return a.isFormatMatch(e)},mceBlockQuote:function(){return a.isFormatMatch("blockquote")},Outdent:function(){return aw(i)},"InsertUnorderedList,InsertOrderedList":function(e){var t=i.dom.getParent(i.selection.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),a.addCommands({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}}),a.addQueryValueHandler("FontName",function(){return Oz(t=i).fold(function(){return Bz(t).map(function(e){return Dz.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return Dz.getFontFamily(t.getBody(),e)});var t},this),a.addQueryValueHandler("FontSize",function(){return Oz(t=i).fold(function(){return Bz(t).map(function(e){return Dz.getFontSize(t.getBody(),e)}).getOr("")},function(e){return Dz.getFontSize(t.getBody(),e)});var t},this)},e}(),Fz=en.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," "),Uz=function(){function e(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||l}return e.isNative=function(e){return!!Fz[e.toLowerCase()]},e.prototype.fire=function(e,t){var n,r,o,i;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=this.scope),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=a},t.stopPropagation=function(){t.isPropagationStopped=a},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=a},t.isDefaultPrevented=l,t.isPropagationStopped=l,t.isImmediatePropagationStopped=l),this.settings.beforeFire&&this.settings.beforeFire(t),n=this.bindings[e])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&this.off(e,i.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===i.func.call(this.scope,t))return t.preventDefault(),t}return t},e.prototype.on=function(e,t,n,r){var o,i,a;if(!1===t&&(t=l),t){var u={func:t};for(r&&en.extend(u,r),a=(i=e.toLowerCase().split(" ")).length;a--;)e=i[a],(o=this.bindings[e])||(o=this.bindings[e]=[],this.toggleEvent(e,!0)),n?o.unshift(u):o.push(u)}return this},e.prototype.off=function(e,t){var n,r,o,i,a;if(e)for(n=(i=e.toLowerCase().split(" ")).length;n--;){if(e=i[n],r=this.bindings[e],!e){for(o in this.bindings)this.toggleEvent(o,!1),delete this.bindings[o];return this}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),this.bindings[e]=r);else r.length=0;r.length||(this.toggleEvent(e,!1),delete this.bindings[e])}}else{for(e in this.bindings)this.toggleEvent(e,!1);this.bindings={}}return this},e.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},e.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},e}(),jz=function(n){return n._eventDispatcher||(n._eventDispatcher=new Uz({scope:n,toggleEvent:function(e,t){Uz.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher},qz={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=jz(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return jz(this).on(e,t,n)},off:function(e,t){return jz(this).off(e,t)},once:function(e,t){return jz(this).once(e,t)},hasEventListeners:function(e){return jz(this).has(e)}},$z=Di.DOM,Wz=function(e,t){return"selectionchange"===t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=$z.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()},Kz=function(e,t,n){var r,o,i;(i=e).hidden||cz(i)?cz(e)&&(o=(r=n).target,"click"===r.type&&"A"===o.tagName&&r.preventDefault()):e.fire(t,n)},Xz=function(i,a){var e,t;if(i.delegates||(i.delegates={}),!i.delegates[a]&&!i.removed)if(e=Wz(i,a),i.settings.event_root){if(Yy||(Yy={},i.editorManager.on("removeEditor",function(){var e;if(!i.editorManager.activeEditor&&Yy){for(e in Yy)i.dom.unbind(Wz(i,e));Yy=null}})),Yy[a])return;t=function(e){for(var t=e.target,n=i.editorManager.get(),r=n.length;r--;){var o=n[r].getBody();(o===t||$z.isChildOf(t,o))&&Kz(n[r],a,e)}},Yy[a]=t,$z.bind(e,a,t)}else t=function(e){Kz(i,a,e)},$z.bind(e,a,t),i.delegates[a]=t},Yz=G({},qz,{bindPendingEventDelegates:function(){var t=this;en.each(t._pendingNativeEvents,function(e){Xz(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!==e&&"blur"!==e&&(t?n.initialized?Xz(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(Wz(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this,n=t.getBody(),r=t.dom;if(t.delegates){for(e in t.delegates)t.dom.unbind(Wz(t,e),e,t.delegates[e]);delete t.delegates}!t.inline&&n&&r&&(n.onload=null,r.unbind(t.getWin()),r.unbind(t.getDoc())),r&&(r.unbind(n),r.unbind(t.getContainer()))}}),Gz=en.each,Jz=en.explode,Qz={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},Zz=en.makeMap("alt,ctrl,shift,meta,access"),eN=function(){function e(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var n=this;e.on("keyup keypress keydown",function(t){!n.hasModifier(t)&&!n.isFunctionKey(t)||t.isDefaultPrevented()||(Gz(n.shortcuts,function(e){if(n.matchShortcut(t,e))return n.pendingPatterns=e.subpatterns.slice(0),"keydown"===t.type&&n.executeShortcutAction(e),!0}),n.matchShortcut(t,n.pendingPatterns[0])&&(1===n.pendingPatterns.length&&"keydown"===t.type&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}return e.prototype.add=function(e,n,r,o){var t,i=this;return"string"==typeof(t=r)?r=function(){i.editor.execCommand(t,!1,null)}:en.isArray(t)&&(r=function(){i.editor.execCommand(t[0],t[1],t[2])}),Gz(Jz(en.trim(e.toLowerCase())),function(e){var t=i.createShortcut(e,n,r,o);i.shortcuts[t.id]=t}),!0},e.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},e.prototype.parseShortcut=function(e){var t,n,r={};for(n in Gz(Jz(e,"+"),function(e){e in Zz?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=Qz[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],Zz)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,He.mac?r.ctrl=!0:r.shift=!0),r.meta&&(He.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},e.prototype.createShortcut=function(e,t,n,r){var o;return(o=en.map(Jz(e,">"),this.parseShortcut))[o.length-1]=en.extend(o[o.length-1],{func:n,scope:r||this.editor}),en.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},e.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},e.prototype.isFunctionKey=function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123},e.prototype.matchShortcut=function(e,t){return!!t&&(t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&(t.alt===e.altKey&&t.shift===e.shiftKey&&(!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0))))},e.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},e}(),tN=en.each,nN=en.trim,rN="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),oN={ftp:21,http:80,https:443,mailto:25},iN=function(){function s(e,t){e=nN(e),this.settings=t||{};var n=this.settings.base_uri,r=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))r.source=e;else{var o=0===e.indexOf("//");if(0!==e.indexOf("/")||o||(e=(n&&n.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var i=this.settings.base_uri?this.settings.base_uri.path:new s(j.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+r.toAbsPath(i,e);else{var a=/([^#?]*)([#?]?.*)/.exec(e);e=(n&&n.protocol||"http")+"://mce_host"+r.toAbsPath(i,a[1])+a[2]}}e=e.replace(/@@/g,"(mce_at)");var u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);tN(rN,function(e,t){var n=u[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),r[e]=n}),n&&(r.protocol||(r.protocol=n.protocol),r.userInfo||(r.userInfo=n.userInfo),r.port||"mce_host"!==r.host||(r.port=n.port),r.host&&"mce_host"!==r.host||(r.host=n.host),r.source=""),o&&(r.protocol="")}}return s.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},s.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},s.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},s.prototype.toRelative=function(e){var t;if("./"===e)return e;var n=new s(e,{base_uri:this});if("mce_host"!==n.host&&this.host!==n.host&&n.host||this.port!==n.port||this.protocol!==n.protocol&&""!==n.protocol)return n.getURI();var r=this.getURI(),o=n.getURI();return r===o||"/"===r.charAt(r.length-1)&&r.substr(0,r.length-1)===o?r:(t=this.toRelPath(this.path,n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),t)},s.prototype.toAbsolute=function(e,t){var n=new s(e,{base_uri:this});return n.getURI(t&&this.isSameOrigin(n))},s.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=oN[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},s.prototype.toRelPath=function(e,t){var n,r,o,i=0,a="",u=e.substring(0,e.lastIndexOf("/")).split("/");if(n=t.split("/"),u.length>=n.length)for(r=0,o=u.length;r<o;r++)if(r>=n.length||u[r]!==n[r]){i=r+1;break}if(u.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return t;for(r=0,o=u.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},s.prototype.toAbsPath=function(e,t){var n,r,o,i=0,a=[];r=/\/$/.test(t)?"/":"";var u=e.split("/"),s=t.split("/");for(tN(u,function(e){e&&a.push(e)}),u=a,n=s.length-1,a=[];0<=n;n--)0!==s[n].length&&"."!==s[n]&&(".."!==s[n]?0<i?i--:a.push(s[n]):i++);return 0!==(o=(n=u.length-i)<=0?a.reverse().join("/"):u.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},s.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},s}(),aN=function(){var e,t,n,r,o,i,a,u,s=(t={},n={},r={},o={},i={},a={},{addButton:(u=function(n,r){return function(e,t){return n[e.toLowerCase()]=lp({type:r},t)}})(e={},"button"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(e,t){return r[e.toLowerCase()]=t},getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}});return{addAutocompleter:s.addAutocompleter,addButton:s.addButton,addContextForm:s.addContextForm,addContextMenu:s.addContextMenu,addContextToolbar:s.addContextToolbar,addIcon:s.addIcon,addMenuButton:s.addMenuButton,addMenuItem:s.addMenuItem,addNestedMenuItem:s.addNestedMenuItem,addSidebar:s.addSidebar,addSplitButton:s.addSplitButton,addToggleButton:s.addToggleButton,addToggleMenuItem:s.addToggleMenuItem,getAll:s.getAll}},uN=Di.DOM,sN=en.extend,lN=en.each,cN=en.resolve,fN=He.ie,dN=function(){function e(e,t,n){var r,o,i,a,u,s,l,c=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,sN(this,Yz),this.settings=(o=e,i=(r=this).documentBaseUrl,a=n.defaultSettings,u=t,l={id:o,theme:"silver",plugins:"",document_base_url:i,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:(s=r).convertURL,url_converter_scope:s},rd(Jf,l,a,u)),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,ji.languageLoad=this.settings.language_load,ji.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new iN(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=this.settings.inline,this.shortcuts=new eN(this),this.editorCommands=new Iz(this),this.settings.cache_suffix&&(He.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:aN()};var f=mz(this);this.mode=f,this.setMode=f.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Bn.overrideDefaults(function(){return{context:c.inline?c.getBody():c.getDoc(),element:c.getBody()}})}return e.prototype.render=function(){oz(this)},e.prototype.focus=function(e){Df(this,e)},e.prototype.hasFocus=function(){return Bf(this)},e.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?cN(r):0,o=cN(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,Array.prototype.slice.call(arguments,1))},e.prototype.translate=function(e){return Ii.translate(e)},e.prototype.getParam=function(e,t,n){return id(this,e,t,n)},e.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},e.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},e.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},e.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},e.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},e.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},e.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},e.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},e.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},e.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(uN.show(this.getContainer()),uN.hide(this.id)),this.load(),this.fire("show"))},e.prototype.hide=function(){var e=this,t=e.getDoc();e.hidden||(fN&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(uN.hide(e.getContainer()),uN.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},e.prototype.isHidden=function(){return!!this.hidden},e.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},e.prototype.load=function(e){var t,n=this.getElement();if(this.removed)return"";if(n){(e=e||{}).load=!0;var r=Oo.isTextareaOrInput(n)?n.value:n.innerHTML;return t=this.setContent(r,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t}},e.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,Oo.isTextareaOrInput(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=uN.getParent(r.id,"form"))&&lN(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},e.prototype.setContent=function(e,t){return Lf(this,e,t)},e.prototype.getContent=function(e){return t=this,void 0===(n=e)&&(n={}),T.from(t.getBody()).fold($("tree"===n.format?new Ql("body",11):""),function(e){return Ic(t,n,e)});var t,n},e.prototype.insertContent=function(e,t){t&&(e=sN({content:e},t)),this.execCommand("mceInsertContent",!1,e)},e.prototype.resetContent=function(e){e===undefined?Lf(this,this.startContent,{format:"raw"}):Lf(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},e.prototype.isDirty=function(){return!this.isNotDirty},e.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},e.prototype.getContainer=function(){return this.container||(this.container=uN.get(this.editorContainer||this.id+"_parent")),this.container},e.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},e.prototype.getElement=function(){return this.targetElm||(this.targetElm=uN.get(this.id)),this.targetElm},e.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},e.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},e.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},e.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},e.prototype.addVisual=function(e){var n,r=this,o=r.settings,i=r.dom;e=e||r.getBody(),r.hasVisual===undefined&&(r.hasVisual=o.visual),lN(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=o.visual_table_class||"mce-item-table",void((t=i.getAttrib(e,"border"))&&"0"!==t||!r.hasVisual?i.removeClass(e,n):i.addClass(e,n));case"A":return void(i.getAttrib(e,"href")||(t=i.getAttrib(e,"name")||e.id,n=o.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?i.addClass(e,n):i.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},e.prototype.remove=function(){Kf(this)},e.prototype.destroy=function(e){Xf(this,e)},e.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},e.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},e.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},e.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},e.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},e.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},e}(),hN=Di.DOM,mN=en.explode,gN=en.each,pN=en.extend,vN=0,yN=!1,bN=[],CN=[],wN=function(t){var n=t.type;gN(EN.get(),function(e){switch(n){case"scroll":e.fire("ScrollWindow",t);break;case"resize":e.fire("ResizeWindow",t)}})},xN=function(e){e!==yN&&(e?Bn(window).on("resize scroll",wN):Bn(window).off("resize scroll",wN),yN=e)},zN=function(t){var e=CN;delete bN[t.id];for(var n=0;n<bN.length;n++)if(bN[n]===t){bN.splice(n,1);break}return CN=S(CN,function(e){return t!==e}),EN.activeEditor===t&&(EN.activeEditor=0<CN.length?CN[0]:null),EN.focusedEditor===t&&(EN.focusedEditor=null),e.length!==CN.length},NN="CSS1Compat"!==j.document.compatMode,EN=G({},qz,{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Bn,majorVersion:"5",minorVersion:"0.11",releaseDate:"2019-07-04",editors:bN,i18n:Ii,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t,n,r,o="";if(t=iN.getDocumentBaseUrl(j.document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,o=n.suffix;else{for(var i=j.document.getElementsByTagName("script"),a=0;a<i.length;a++){var u=(r=i[a].src).substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!==u.indexOf(".min")&&(o=".min"),e=r.substring(0,r.lastIndexOf("/"));break}}!e&&j.document.currentScript&&(-1!==(r=j.document.currentScript.src).indexOf(".min")&&(o=".min"),e=r.substring(0,r.lastIndexOf("/")))}this.baseURL=new iN(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new iN(this.baseURL),this.suffix=o,Nf(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&this._setBaseUrl(t),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var o in r)ji.PluginManager.urls[o]=r[o]},init:function(r){var n,u,s=this;u=en.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");var l=function(e){var t=e.id;return t||(t=(t=e.name)&&!hN.get(t)?e.name:hN.uniqueId(),e.setAttribute("id",t)),t},c=function(e,t){return t.constructor===RegExp?t.test(e.className):hN.hasClass(e,t)},f=function(e){n=e},e=function(){var o,i=0,a=[],n=function(e,t,n){var r=new dN(e,t,s);a.push(r),r.on("init",function(){++i===o.length&&f(a)}),r.targetElm=r.targetElm||n,r.render()};hN.unbind(window,"ready",e),function(e){var t=r[e];if(t)t.apply(s,Array.prototype.slice.call(arguments,2))}("onpageload"),o=Bn.unique(function(t){var e,n=[];if(He.ie&&He.ie<11)return xd.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(NN)return xd.initError("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return gN(t.types,function(e){n=n.concat(hN.select(e.selector))}),n;if(t.selector)return hN.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&gN(mN(e),function(t){var e;(e=hN.get(t))?n.push(e):gN(j.document.forms,function(e){gN(e.elements,function(e){e.name===t&&(t="mce_editor_"+vN++,hN.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":gN(hN.select("textarea"),function(e){t.editor_deselector&&c(e,t.editor_deselector)||t.editor_selector&&!c(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?gN(r.types,function(t){en.each(o,function(e){return!hN.is(e,t.selector)||(n(l(e),pN({},r,t),e),!1)})}):(en.each(o,function(e){var t;(t=s.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(zN(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(o=en.grep(o,function(e){return!s.get(e.id)})).length?f([]):gN(o,function(e){var t;t=e,r.inline&&t.tagName.toLowerCase()in u?xd.initError("Could not initialize inline editor on invalid inline target element",e):n(l(e),r,e)}))};return s.settings=r,hN.bind(window,"ready",e),new _e(function(t){n?t(n):f=function(e){t(e)}})},get:function(t){return 0===arguments.length?CN.slice(0):K(t)?R(CN,function(e){return e.id===t}).getOr(null):C(t)&&CN[t]?CN[t]:null},add:function(e){var n=this;return bN[e.id]===e||(null===n.get(e.id)&&("length"!==e.id&&(bN[e.id]=e),bN.push(e),CN.push(e)),xN(!0),n.activeEditor=e,n.fire("AddEditor",{editor:e}),Gy||(Gy=function(e){var t=n.fire("BeforeUnload");if(t.returnValue)return e.preventDefault(),e.returnValue=t.returnValue,t.returnValue},window.addEventListener("beforeunload",Gy))),e},createEditor:function(e,t){return this.add(new dN(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!K(e))return n=e,v(r.get(n.id))?null:(zN(n)&&r.fire("RemoveEditor",{editor:n}),0===CN.length&&window.removeEventListener("beforeunload",Gy),n.remove(),xN(0<CN.length),n);gN(hN.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=CN.length-1;0<=t;t--)r.remove(CN[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new dN(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){gN(CN,function(e){e.save()})},addI18n:function(e,t){Ii.add(e,t)},translate:function(e){return Ii.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl:function(e){this.baseURL=new iN(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new iN(this.baseURL)}});function SN(n){return{walk:function(e,t){return Fl(n,e,t)},split:Bm,normalize:function(t){return Wv(n,t).fold($(!1),function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}}EN.setup(),(Jy=SN||(SN={})).compareRanges=Gd,Jy.getCaretRangeFromPoint=fv,Jy.getSelectedNode=uu,Jy.getNode=su;var kN,TN,AN=SN,MN=Math.min,RN=Math.max,DN=Math.round,BN=function(e,t,n){var r,o,i,a,u,s;return r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,s=t.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=DN(s/2)),"c"===n[1]&&(r+=DN(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=DN(a/2)),"c"===n[4]&&(r-=DN(i/2)),ON(r,o,i,a)},ON=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},HN={inflate:function(e,t,n){return ON(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:BN,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=BN(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n,r,o,i;return n=RN(e.x,t.x),r=RN(e.y,t.y),o=MN(e.x+e.w,t.x+t.w),i=MN(e.y+e.h,t.y+t.h),o-n<0||i-r<0?null:ON(n,r,o-n,i-r)},clamp:function(e,t,n){var r,o,i,a,u,s,l,c,f,d;return u=e.x,s=e.y,l=e.x+e.w,c=e.y+e.h,f=t.x+t.w,d=t.y+t.h,r=RN(0,t.x-u),o=RN(0,t.y-s),i=RN(0,l-f),a=RN(0,c-d),u+=r,s+=o,n&&(l+=r,c+=o,u-=i,s-=a),ON(u,s,(l-=i)-u,(c-=a)-s)},create:ON,fromClientRect:function(e){return ON(e.left,e.top,e.width,e.height)}},_N=en.each,LN=en.extend,PN=function(){};PN.extend=kN=function(n){var e,t,r,o=this.prototype,i=function(){var e,t,n;if(!TN&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},a=function(){return this},u=function(n,r){return function(){var e,t=this._super;return this._super=o[n],e=r.apply(this,arguments),this._super=t,e}};for(t in TN=!0,e=new this,TN=!1,n.Mixins&&(_N(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),o.Mixins&&(n.Mixins=o.Mixins.concat(n.Mixins))),n.Methods&&_N(n.Methods.split(","),function(e){n[e]=a}),n.Properties&&_N(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return e!==undefined?(this[t]=e,this):this[t]}}),n.Statics&&_N(n.Statics,function(e,t){i[t]=e}),n.Defaults&&o.Defaults&&(n.Defaults=LN({},o.Defaults,n.Defaults)),n)"function"==typeof(r=n[t])&&o[t]?e[t]=u(t,r):e[t]=r;return i.prototype=e,(i.constructor=i).extend=kN,i};var VN,IN,FN,UN,jN=Math.min,qN=Math.max,$N=Math.round,WN={serialize:function(e){var t=JSON.stringify(e);return K(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},KN={callbacks:{},count:0,send:function(t){var n=this,r=Di.DOM,o=t.count!==undefined?t.count:n.count,i="tinymce_jsonp_"+o;n.callbacks[o]=function(e){r.remove(i),delete n.callbacks[o],t.callback(e)},r.add(r.doc.body,"script",{id:i,src:t.url,type:"text/javascript"}),n.count++}},XN=G({},qz,{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||1e4<n++?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,1e4<n?"TIMED_OUT":"GENERAL",t,e),t=null):Ie.setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",XN.fire("beforeInitialize",{settings:e}),t=Sd()){if(t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&en.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=XN.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();Ie.setTimeout(r,10)}}}),YN=en.extend,GN=function(){function t(e){this.settings=YN({},e),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(e){var n=e.error,r=e.success,o=YN(this.settings,e);o.success=function(e,t){void 0===(e=WN.parse(e))&&(e={error:"JSON Parse error."}),e.error?n.call(o.error_scope||o.scope,e.error,t):r.call(o.success_scope||o.scope,e.result)},o.error=function(e,t){n&&n.call(o.error_scope||o.scope,e,t)},o.data=WN.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),o.content_type="application/json",XN.send(o)},t}();try{VN=j.window.localStorage}catch(eE){IN={},FN=[],UN={getItem:function(e){var t=IN[e];return t||null},setItem:function(e,t){FN.push(e),IN[e]=String(t)},key:function(e){return FN[e]},removeItem:function(t){FN=FN.filter(function(e){return e===t}),delete IN[t]},clear:function(){FN=[],IN={}},length:0},Object.defineProperty(UN,"length",{get:function(){return FN.length},configurable:!1,enumerable:!1}),VN=UN}var JN,QN={geom:{Rect:HN},util:{Promise:_e,Delay:Ie,Tools:en,VK:Ph,URI:iN,Class:PN,EventDispatcher:Uz,Observable:qz,I18n:Ii,XHR:XN,JSON:WN,JSONRequest:GN,JSONP:KN,LocalStorage:VN,Color:function(e){var n={},u=0,s=0,l=0,t=function(e){var t;return"object"==typeof e?"r"in e?(u=e.r,s=e.g,l=e.b):"v"in e&&function(e,t,n){var r,o,i,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=qN(0,jN(t,1)),n=qN(0,jN(n,1)),0!==t){switch(r=e/60,i=(o=n*t)*(1-Math.abs(r%2-1)),a=n-o,Math.floor(r)){case 0:u=o,s=i,l=0;break;case 1:u=i,s=o,l=0;break;case 2:u=0,s=o,l=i;break;case 3:u=0,s=i,l=o;break;case 4:u=i,s=0,l=o;break;case 5:u=o,s=0,l=i;break;default:u=s=l=0}u=$N(255*(u+a)),s=$N(255*(s+a)),l=$N(255*(l+a))}else u=s=l=$N(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(u=parseInt(t[1],10),s=parseInt(t[2],10),l=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(u=parseInt(t[1],16),s=parseInt(t[2],16),l=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(u=parseInt(t[1]+t[1],16),s=parseInt(t[2]+t[2],16),l=parseInt(t[3]+t[3],16)),u=u<0?0:255<u?255:u,s=s<0?0:255<s?255:s,l=l<0?0:255<l?255:l,n};return e&&t(e),n.toRgb=function(){return{r:u,g:s,b:l}},n.toHsv=function(){return e=u,t=s,n=l,o=0,(i=jN(e/=255,jN(t/=255,n/=255)))===(a=qN(e,qN(t,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,{h:$N(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/((o=a)-i))),s:$N(100*r),v:$N(100*o)});var e,t,n,r,o,i,a},n.toHex=function(){var e=function(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e};return"#"+e(u)+e(s)+e(l)},n.parse=t,n}},dom:{EventUtils:Ye,Sizzle:Rt,DomQuery:Bn,TreeWalker:Ho,DOMUtils:Di,ScriptLoader:_i,RangeUtils:AN,Serializer:kp,ControlSelection:Dp,BookmarkManager:Ap,Selection:oy,Event:Ye.Event},html:{Styles:wi,Entities:ui,Node:Ql,Schema:yi,SaxParser:rc,DomParser:zp,Writer:Uc,Serializer:jc},Env:He,AddOnManager:ji,Annotator:Xl,Formatter:up,UndoManager:wm,EditorCommands:Iz,WindowManager:pd,NotificationManager:md,EditorObservable:Yz,Shortcuts:eN,Editor:dN,FocusManager:pf,EditorManager:EN,DOM:Di.DOM,ScriptLoader:_i.ScriptLoader,PluginManager:ji.PluginManager,ThemeManager:ji.ThemeManager,IconManager:zd,trim:en.trim,isArray:en.isArray,is:en.is,toArray:en.toArray,makeMap:en.makeMap,each:en.each,map:en.map,grep:en.grep,inArray:en.inArray,extend:en.extend,create:en.create,walk:en.walk,createNS:en.createNS,resolve:en.resolve,explode:en.explode,_addCacheSuffix:en._addCacheSuffix,isOpera:He.opera,isWebKit:He.webkit,isIE:He.ie,isGecko:He.gecko,isMac:He.mac},ZN=en.extend(EN,QN);JN=ZN,window.tinymce=JN,window.tinyMCE=JN,function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(ZN)}(window);
@@ -5,13 +5,7 @@ format :html do
5
5
  params[:tinymce_id]
6
6
  end
7
7
 
8
- def apply_tm_snippet_data snippet
9
- data = { "data-tinymce-id": tinymce_id }
10
- data[:"data-tm-snippet-start"] = tm_param(:start) if tm_param(:start).present?
11
- data[:"data-tm-snippet-size"] = snippet.raw.size if tm_param(:raw).present?
12
- data["data-dismiss"] = "modal" if modal_tm_snippet_editor?
13
- data
14
- end
8
+ private
15
9
 
16
10
  def tm_param key
17
11
  params[:"tm_snippet_#{key}"]
@@ -20,4 +14,31 @@ format :html do
20
14
  def modal_tm_snippet_editor?
21
15
  @tm_snippet_editor_mode != :overlay
22
16
  end
17
+
18
+ def apply_tm_snippet_data snippet
19
+ { "data-tinymce-id": tinymce_id }.tap do |data|
20
+ apply_tm_snippet_vars data, snippet
21
+ apply_tm_data_dismiss data
22
+ apply_tm_data_index data
23
+ end
24
+ end
25
+
26
+ def apply_tm_data_dismiss data
27
+ data["data-dismiss"] = "modal" if modal_tm_snippet_editor?
28
+ end
29
+
30
+ def apply_tm_data_index data
31
+ data["data-index"] = params["index"] if params["index"].present?
32
+ end
33
+
34
+ def apply_tm_snippet_vars data, snippet
35
+ apply_tm_snippet_var(data, :start) { tm_param :start }
36
+ apply_tm_snippet_var(data, :size, :raw) { snippet.raw.size }
37
+ end
38
+
39
+ def apply_tm_snippet_var data, varname, paramname=nil
40
+ return unless tm_param(paramname || varname).present?
41
+
42
+ data[:"data-tm-snippet-#{varname}"] = yield
43
+ end
23
44
  end
@@ -7,7 +7,7 @@
7
7
  +
8
8
  = text_field_tag "nest_name", snippet.name, class: "form-control _nest-name",
9
9
  "data-left-name" => card.name,
10
- "data-left-type" => left_type_for_nest_editor_set_selection,
10
+ "data-left-type" => card.left_type_for_nest_editor_set_selection,
11
11
  placeholder: "Card name"
12
12
  .col-3
13
13
  = check_box_tag :field, "field", snippet.field?,
@@ -1,5 +1,9 @@
1
+
2
+ def left_type_for_nest_editor_set_selection
3
+ type_name
4
+ end
5
+
1
6
  format :html do
2
- NEST_OPTIONS = %i[view title show hide wrap help variant size params].freeze
3
7
  # Card::View::Options.shark_keys - %i[nest_syntax nest_name items cache]
4
8
  # TODO: connect to Card::View::Options
5
9
  # (that way a mod can add an option that becomes available to nests)
@@ -87,18 +91,15 @@ format :html do
87
91
  end
88
92
 
89
93
  def nest_snippet
90
- @nest_snippet ||= NestParser.new params[:tm_snippet_raw],
91
- default_nest_view, default_item_view
92
- end
93
-
94
- def left_type_for_nest_editor_set_selection
95
- card.type_name
94
+ @nest_snippet ||=
95
+ Card::Reference::NestParser.new params[:tm_snippet_raw],
96
+ default_nest_view, default_item_view
96
97
  end
97
98
 
98
99
  def set_name_for_nest_rules
99
100
  nest_name = nest_snippet.name
100
- if left_type_for_nest_editor_set_selection
101
- [left_type_for_nest_editor_set_selection, nest_name, :type_plus_right]
101
+ if (type_name = card.left_type_for_nest_editor_set_selection)
102
+ [type_name, nest_name, :type_plus_right]
102
103
  else
103
104
  [nest_name, :right]
104
105
  end
@@ -120,7 +121,7 @@ format :html do
120
121
 
121
122
  def nest_option_name_select_options selected, level
122
123
  options = selected ? [] : ["--"]
123
- options += NEST_OPTIONS
124
+ options += Card::Reference::NestParser::NEST_OPTIONS
124
125
  options_for_select(
125
126
  options, disabled: nest_option_name_disabled(selected, level),
126
127
  selected: selected
@@ -128,17 +129,20 @@ format :html do
128
129
  end
129
130
 
130
131
  def nest_option_name_disabled selected, level
131
- disabled = if level == 0
132
- nest_snippet.options
133
- else
134
- nest_snippet.item_options[level - 1] || default_nest_editor_item_options
135
- end
136
-
132
+ disabled = nest_option_name_disabled_options level
137
133
  disabled = disabled&.map(&:first)
138
134
  disabled&.delete selected if selected
139
135
  disabled
140
136
  end
141
137
 
138
+ def nest_option_name_disabled_options level
139
+ if level == 0
140
+ nest_snippet.options
141
+ else
142
+ nest_snippet.item_options[level - 1] || default_nest_editor_item_options
143
+ end
144
+ end
145
+
142
146
  def nest_apply_opts
143
147
  apply_tm_snippet_data nest_snippet
144
148
  end
@@ -27,7 +27,7 @@ format :html do
27
27
  @nest_content_tab = nest(nest_name, view: :new_image, type: :image, hide: :guide)
28
28
 
29
29
  image_name = nest_name.to_name.right
30
- @nest_snippet = NestEditor::NestParser.new_image image_name
30
+ @nest_snippet = Card::Reference::NestParser.new_image image_name
31
31
  end
32
32
 
33
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-tinymce_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,22 +10,36 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-19 00:00:00.000000000 Z
13
+ date: 2021-05-05 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: card
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - '='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.101.4
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - '='
27
+ - !ruby/object:Gem::Version
28
+ version: 1.101.4
15
29
  - !ruby/object:Gem::Dependency
16
30
  name: card-mod-edit
17
31
  requirement: !ruby/object:Gem::Requirement
18
32
  requirements:
19
33
  - - '='
20
34
  - !ruby/object:Gem::Version
21
- version: '0.1'
35
+ version: 0.11.4
22
36
  type: :runtime
23
37
  prerelease: false
24
38
  version_requirements: !ruby/object:Gem::Requirement
25
39
  requirements:
26
40
  - - '='
27
41
  - !ruby/object:Gem::Version
28
- version: '0.1'
42
+ version: 0.11.4
29
43
  description: ''
30
44
  email:
31
45
  - info@decko.org
@@ -37,8 +51,77 @@ files:
37
51
  - db/migrate_core_cards/20171113233151_update_tinymce_config.rb
38
52
  - db/migrate_core_cards/20190306172623_update_tinymce_config_to_v5.rb
39
53
  - db/migrate_core_cards/20190306172890_tinymce_add_nest_to_toolbar.rb
54
+ - lib/card/reference/nest_parser.rb
40
55
  - lib/javascript/script_tinymce.js
41
56
  - lib/javascript/script_tinymce_config.js.coffee
57
+ - public/assets/tinymce/jquery.tinymce.min.js
58
+ - public/assets/tinymce/langs/readme.md
59
+ - public/assets/tinymce/license.txt
60
+ - public/assets/tinymce/plugins/advlist/plugin.min.js
61
+ - public/assets/tinymce/plugins/anchor/plugin.min.js
62
+ - public/assets/tinymce/plugins/autolink/plugin.min.js
63
+ - public/assets/tinymce/plugins/autoresize/plugin.min.js
64
+ - public/assets/tinymce/plugins/autosave/plugin.min.js
65
+ - public/assets/tinymce/plugins/bbcode/plugin.min.js
66
+ - public/assets/tinymce/plugins/charmap/plugin.min.js
67
+ - public/assets/tinymce/plugins/code/plugin.min.js
68
+ - public/assets/tinymce/plugins/codesample/plugin.min.js
69
+ - public/assets/tinymce/plugins/colorpicker/plugin.min.js
70
+ - public/assets/tinymce/plugins/contextmenu/plugin.min.js
71
+ - public/assets/tinymce/plugins/directionality/plugin.min.js
72
+ - public/assets/tinymce/plugins/emoticons/js/emojis.js
73
+ - public/assets/tinymce/plugins/emoticons/js/emojis.min.js
74
+ - public/assets/tinymce/plugins/emoticons/plugin.min.js
75
+ - public/assets/tinymce/plugins/fullpage/plugin.min.js
76
+ - public/assets/tinymce/plugins/fullscreen/plugin.min.js
77
+ - public/assets/tinymce/plugins/help/plugin.min.js
78
+ - public/assets/tinymce/plugins/hr/plugin.min.js
79
+ - public/assets/tinymce/plugins/image/plugin.min.js
80
+ - public/assets/tinymce/plugins/imagetools/plugin.min.js
81
+ - public/assets/tinymce/plugins/importcss/plugin.min.js
82
+ - public/assets/tinymce/plugins/insertdatetime/plugin.min.js
83
+ - public/assets/tinymce/plugins/legacyoutput/plugin.min.js
84
+ - public/assets/tinymce/plugins/link/plugin.min.js
85
+ - public/assets/tinymce/plugins/lists/plugin.min.js
86
+ - public/assets/tinymce/plugins/media/plugin.min.js
87
+ - public/assets/tinymce/plugins/nest/plugin.min.js
88
+ - public/assets/tinymce/plugins/nonbreaking/plugin.min.js
89
+ - public/assets/tinymce/plugins/noneditable/plugin.min.js
90
+ - public/assets/tinymce/plugins/pagebreak/plugin.min.js
91
+ - public/assets/tinymce/plugins/paste/plugin.min.js
92
+ - public/assets/tinymce/plugins/preview/plugin.min.js
93
+ - public/assets/tinymce/plugins/print/plugin.min.js
94
+ - public/assets/tinymce/plugins/quickbars/plugin.min.js
95
+ - public/assets/tinymce/plugins/save/plugin.min.js
96
+ - public/assets/tinymce/plugins/searchreplace/plugin.min.js
97
+ - public/assets/tinymce/plugins/spellchecker/plugin.min.js
98
+ - public/assets/tinymce/plugins/tabfocus/plugin.min.js
99
+ - public/assets/tinymce/plugins/table/plugin.min.js
100
+ - public/assets/tinymce/plugins/template/plugin.min.js
101
+ - public/assets/tinymce/plugins/textcolor/plugin.min.js
102
+ - public/assets/tinymce/plugins/textpattern/plugin.min.js
103
+ - public/assets/tinymce/plugins/toc/plugin.min.js
104
+ - public/assets/tinymce/plugins/visualblocks/plugin.min.js
105
+ - public/assets/tinymce/plugins/visualchars/plugin.min.js
106
+ - public/assets/tinymce/plugins/wordcount/plugin.min.js
107
+ - public/assets/tinymce/skins/content/default/content.min.css
108
+ - public/assets/tinymce/skins/content/document/content.min.css
109
+ - public/assets/tinymce/skins/content/writer/content.min.css
110
+ - public/assets/tinymce/skins/ui/oxide-dark/content.inline.min.css
111
+ - public/assets/tinymce/skins/ui/oxide-dark/content.min.css
112
+ - public/assets/tinymce/skins/ui/oxide-dark/content.mobile.min.css
113
+ - public/assets/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff
114
+ - public/assets/tinymce/skins/ui/oxide-dark/skin.min.css
115
+ - public/assets/tinymce/skins/ui/oxide-dark/skin.mobile.min.css
116
+ - public/assets/tinymce/skins/ui/oxide/content.inline.min.css
117
+ - public/assets/tinymce/skins/ui/oxide/content.min.css
118
+ - public/assets/tinymce/skins/ui/oxide/content.mobile.min.css
119
+ - public/assets/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff
120
+ - public/assets/tinymce/skins/ui/oxide/skin.min.css
121
+ - public/assets/tinymce/skins/ui/oxide/skin.mobile.min.css
122
+ - public/assets/tinymce/themes/mobile/theme.min.js
123
+ - public/assets/tinymce/themes/silver/theme.min.js
124
+ - public/assets/tinymce/tinymce.min.js
42
125
  - set/all/reference_editor.rb
43
126
  - set/all/reference_editor/_link_editor.haml
44
127
  - set/all/reference_editor/_nest_editor.haml
@@ -49,18 +132,22 @@ files:
49
132
  - set/all/reference_editor/nest_editor/_options.haml
50
133
  - set/all/reference_editor/nest_editor/_options_select.haml
51
134
  - set/all/reference_editor/nest_editor/_options_select_row.haml
52
- - set/all/reference_editor/nest_editor/nest_parser.rb
53
135
  - set/all/reference_editor/nest_image.rb
54
136
  - set/all/reference_editor/reference_editor.haml
55
137
  - set/all/tinymce_editor.rb
56
138
  - set/self/script_tinymce.rb
57
139
  - set/self/script_tinymce_config.rb
58
140
  - set/self/tiny_mce.rb
59
- homepage: http://decko.org
141
+ homepage: https://decko.org
60
142
  licenses:
61
- - GPL-2.0
62
143
  - GPL-3.0
63
- metadata: {}
144
+ metadata:
145
+ source_code_uri: https://github.com/decko-commons/decko
146
+ homepage_uri: https://decko.org
147
+ bug_tracker_uri: https://github.com/decko-commons/decko/issues
148
+ wiki_uri: https://decko.org
149
+ documentation_url: http://docs.decko.org/
150
+ card-mod: tinymce_editor
64
151
  post_install_message:
65
152
  rdoc_options: []
66
153
  require_paths:
@@ -69,15 +156,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
156
  requirements:
70
157
  - - ">="
71
158
  - !ruby/object:Gem::Version
72
- version: 2.3.0
159
+ version: '2.5'
73
160
  required_rubygems_version: !ruby/object:Gem::Requirement
74
161
  requirements:
75
162
  - - ">="
76
163
  - !ruby/object:Gem::Version
77
164
  version: '0'
78
165
  requirements: []
79
- rubygems_version: 3.0.3
166
+ rubygems_version: 3.1.4
80
167
  signing_key:
81
168
  specification_version: 4
82
- summary: Calendar editor
169
+ summary: TinyMCE editor
83
170
  test_files: []
@@ -1,71 +0,0 @@
1
- #! no set module
2
-
3
- # Extracts all information needed to generate the nest editor form
4
- # from a nest syntax string
5
- class NestParser
6
- attr_reader :name, :options, :item_options, :raw
7
-
8
- def self.new nest_string, default_view, default_item_view
9
- return super if nest_string.is_a? String
10
-
11
- OpenStruct.new(name: "", field?: true,
12
- options: [[:view, default_view]], item_options: [],
13
- raw: "{{+|view: #{default_view}}}")
14
- end
15
-
16
- def self.new_image name
17
- OpenStruct.new(name: name, field?: true,
18
- options: [%i[view content], %i[size medium]],
19
- item_options: [],
20
- raw: "{{+#{name}|view: content; size: medium}}")
21
- end
22
-
23
- def field?
24
- @field
25
- end
26
-
27
- def initialize nest_string, _default_view, default_item_view
28
- @raw = nest_string
29
- @default_item_view = default_item_view
30
- nest = Card::Content::Chunk::Nest.new nest_string, nil
31
- init_name nest.name
32
- extract_item_options nest.options
33
- @options = extract_options nest.options
34
- end
35
-
36
- private
37
-
38
- def init_name name
39
- @field = name.to_name.simple_relative?
40
- @name = @field ? name.to_s[1..-1] : name
41
- end
42
-
43
- def extract_options options
44
- Card::Set::All::ReferenceEditor::NestEditor::NEST_OPTIONS
45
- .each_with_object([]) do |key, res|
46
- next unless options[key]
47
-
48
- if key.in? %i[show hide]
49
- values = Card::View.normalize_list(options[key])
50
- res.concat(values.map { |val| [key, val] })
51
- else
52
- res << [key, options[key]]
53
- end
54
- end
55
- end
56
-
57
- def extract_item_options options
58
- @item_options = []
59
- item_options = options[:items]
60
- while item_options
61
- next_item_options = item_options[:items]
62
- @item_options << extract_options(item_options)
63
- item_options = next_item_options
64
- end
65
- # @item_options << default_item_options
66
- end
67
-
68
- def default_item_options
69
- [:view, @default_item_view]
70
- end
71
- end