summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/ui/composer/content/ComposerCommands.js3900
-rw-r--r--editor/ui/composer/content/EditorContent.css62
-rw-r--r--editor/ui/composer/content/editor.js3226
-rw-r--r--editor/ui/composer/content/editorApplicationOverlay.js161
-rw-r--r--editor/ui/composer/content/editorMailOverlay.xul27
-rw-r--r--editor/ui/composer/content/editorNavigatorOverlay.xul27
-rw-r--r--editor/ui/composer/content/editorSmileyOverlay.xul108
-rw-r--r--editor/ui/composer/content/editorTasksOverlay.xul32
-rw-r--r--editor/ui/composer/content/editorUtilities.js987
-rw-r--r--editor/ui/composer/content/images/tag-anchor.gifbin127 -> 0 bytes
-rw-r--r--editor/ui/dialogs/content/EdAEAttributes.js1811
-rw-r--r--editor/ui/dialogs/content/EdAECSSAttributes.js144
-rw-r--r--editor/ui/dialogs/content/EdAEHTMLAttributes.js366
-rw-r--r--editor/ui/dialogs/content/EdAEJSEAttributes.js192
-rw-r--r--editor/ui/dialogs/content/EdAdvancedEdit.js333
-rw-r--r--editor/ui/dialogs/content/EdAdvancedEdit.xul183
-rw-r--r--editor/ui/dialogs/content/EdButtonProps.js146
-rw-r--r--editor/ui/dialogs/content/EdButtonProps.xul84
-rw-r--r--editor/ui/dialogs/content/EdColorPicker.js306
-rw-r--r--editor/ui/dialogs/content/EdColorPicker.xul67
-rw-r--r--editor/ui/dialogs/content/EdColorProps.js428
-rw-r--r--editor/ui/dialogs/content/EdColorProps.xul118
-rw-r--r--editor/ui/dialogs/content/EdConvertToTable.js330
-rw-r--r--editor/ui/dialogs/content/EdConvertToTable.xul47
-rw-r--r--editor/ui/dialogs/content/EdDialogCommon.js1001
-rw-r--r--editor/ui/dialogs/content/EdDialogOverlay.xul76
-rw-r--r--editor/ui/dialogs/content/EdDialogTemplate.js44
-rw-r--r--editor/ui/dialogs/content/EdDialogTemplate.xul26
-rw-r--r--editor/ui/dialogs/content/EdDictionary.js183
-rw-r--r--editor/ui/dialogs/content/EdDictionary.xul58
-rw-r--r--editor/ui/dialogs/content/EdFieldSetProps.js182
-rw-r--r--editor/ui/dialogs/content/EdFieldSetProps.xul59
-rw-r--r--editor/ui/dialogs/content/EdFormProps.js128
-rw-r--r--editor/ui/dialogs/content/EdFormProps.xul88
-rw-r--r--editor/ui/dialogs/content/EdHLineProps.js195
-rw-r--r--editor/ui/dialogs/content/EdHLineProps.xul69
-rw-r--r--editor/ui/dialogs/content/EdImageOverlay.js598
-rw-r--r--editor/ui/dialogs/content/EdImageOverlay.xul267
-rw-r--r--editor/ui/dialogs/content/EdImageProps.js316
-rw-r--r--editor/ui/dialogs/content/EdImageProps.xul70
-rw-r--r--editor/ui/dialogs/content/EdInputImage.js179
-rw-r--r--editor/ui/dialogs/content/EdInputImage.xul71
-rw-r--r--editor/ui/dialogs/content/EdInputProps.js327
-rw-r--r--editor/ui/dialogs/content/EdInputProps.xul124
-rw-r--r--editor/ui/dialogs/content/EdInsSrc.js142
-rw-r--r--editor/ui/dialogs/content/EdInsSrc.xul44
-rw-r--r--editor/ui/dialogs/content/EdInsertChars.js409
-rw-r--r--editor/ui/dialogs/content/EdInsertChars.xul57
-rw-r--r--editor/ui/dialogs/content/EdInsertMath.js314
-rw-r--r--editor/ui/dialogs/content/EdInsertMath.xul63
-rw-r--r--editor/ui/dialogs/content/EdInsertTOC.js378
-rw-r--r--editor/ui/dialogs/content/EdInsertTOC.xul227
-rw-r--r--editor/ui/dialogs/content/EdInsertTable.js220
-rw-r--r--editor/ui/dialogs/content/EdInsertTable.xul72
-rw-r--r--editor/ui/dialogs/content/EdLabelProps.js108
-rw-r--r--editor/ui/dialogs/content/EdLabelProps.xul58
-rw-r--r--editor/ui/dialogs/content/EdLinkProps.js340
-rw-r--r--editor/ui/dialogs/content/EdLinkProps.xul42
-rw-r--r--editor/ui/dialogs/content/EdListProps.js441
-rw-r--r--editor/ui/dialogs/content/EdListProps.xul59
-rw-r--r--editor/ui/dialogs/content/EdNamedAnchorProps.js164
-rw-r--r--editor/ui/dialogs/content/EdNamedAnchorProps.xul35
-rw-r--r--editor/ui/dialogs/content/EdPageProps.js166
-rw-r--r--editor/ui/dialogs/content/EdPageProps.xul57
-rw-r--r--editor/ui/dialogs/content/EdReplace.js380
-rw-r--r--editor/ui/dialogs/content/EdReplace.xul66
-rw-r--r--editor/ui/dialogs/content/EdSelectProps.js752
-rw-r--r--editor/ui/dialogs/content/EdSelectProps.xul129
-rw-r--r--editor/ui/dialogs/content/EdSpellCheck.js522
-rw-r--r--editor/ui/dialogs/content/EdSpellCheck.xul115
-rw-r--r--editor/ui/dialogs/content/EdTableProps.js1273
-rw-r--r--editor/ui/dialogs/content/EdTableProps.xul266
-rw-r--r--editor/ui/dialogs/content/EdTextAreaProps.js168
-rw-r--r--editor/ui/dialogs/content/EdTextAreaProps.xul103
-rw-r--r--editor/ui/editorUtilities.jsm13
-rw-r--r--editor/ui/jar.mn81
-rw-r--r--editor/ui/locales/en-US/chrome/composer/editor.properties208
-rw-r--r--editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd346
-rw-r--r--editor/ui/locales/en-US/chrome/composer/editorSmileyOverlay.dtd58
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EdAdvancedEdit.dtd18
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EdColorPicker.dtd22
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EdConvertToTable.dtd15
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EdDialogOverlay.dtd18
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EdNamedAnchorProperties.dtd10
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorButtonProperties.dtd27
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorColorProperties.dtd28
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorFieldSetProperties.dtd20
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorFormProperties.dtd21
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorHLineProperties.dtd27
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorImageProperties.dtd79
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorInputProperties.dtd50
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorInsertChars.dtd19
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorInsertMath.dtd21
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorInsertSource.dtd15
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorInsertTOC.dtd16
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorInsertTable.dtd18
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorLabelProperties.dtd18
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorLinkProperties.dtd6
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorListProperties.dtd20
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorPersonalDictionary.dtd20
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorReplace.dtd26
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorSelectProperties.dtd48
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorSpellCheck.dtd38
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorTableProperties.dtd75
-rw-r--r--editor/ui/locales/en-US/chrome/dialogs/EditorTextAreaProperties.dtd33
-rw-r--r--editor/ui/locales/jar.mn38
-rw-r--r--editor/ui/moz.build8
-rw-r--r--editor/ui/texzilla/content/TeXZilla.js815
-rw-r--r--mail/app.mozbuild4
-rw-r--r--navigator/app.mozbuild7
-rw-r--r--navigator/modules/PolyGHL.jsm7
m---------platform0
-rw-r--r--xpfe/components/autocomplete/jar.mn9
-rw-r--r--xpfe/components/autocomplete/moz.build (renamed from xptoolkit/components/preferences/moz.build)4
-rw-r--r--xpfe/components/autocomplete/resources/content/autocomplete.css46
-rw-r--r--xpfe/components/autocomplete/resources/content/autocomplete.xml1646
-rw-r--r--xpfe/components/devtools/content/devtoolsOverlay.js (renamed from xptoolkit/components/devtools/content/devtoolsOverlay.js)0
-rw-r--r--xpfe/components/devtools/content/devtoolsOverlay.xul (renamed from xptoolkit/components/devtools/content/devtoolsOverlay.xul)0
-rw-r--r--xpfe/components/devtools/content/scratchpad/scratchpad.js (renamed from xptoolkit/components/devtools/content/scratchpad/scratchpad.js)0
-rw-r--r--xpfe/components/devtools/content/scratchpad/scratchpad.xul (renamed from xptoolkit/components/devtools/content/scratchpad/scratchpad.xul)0
-rw-r--r--xpfe/components/devtools/devtools-prefs.js (renamed from xptoolkit/components/devtools/devtools-prefs.js)0
-rw-r--r--xpfe/components/devtools/jar.mn (renamed from xptoolkit/components/devtools/jar.mn)0
-rw-r--r--xpfe/components/devtools/locale/devtoolsOverlay.dtd (renamed from xptoolkit/components/devtools/locale/devtoolsOverlay.dtd)0
-rw-r--r--xpfe/components/devtools/locale/scratchpad.dtd (renamed from xptoolkit/components/devtools/locale/scratchpad.dtd)0
-rw-r--r--xpfe/components/devtools/locale/scratchpad.properties (renamed from xptoolkit/components/devtools/locale/scratchpad.properties)0
-rw-r--r--xpfe/components/devtools/modules/PropertyPanel.jsm (renamed from xptoolkit/components/devtools/modules/PropertyPanel.jsm)0
-rw-r--r--xpfe/components/devtools/moz.build (renamed from xptoolkit/components/devtools/moz.build)0
-rw-r--r--xpfe/components/downloads/content/DownloadProgressListener.js (renamed from xptoolkit/components/downloads/content/DownloadProgressListener.js)0
-rw-r--r--xpfe/components/downloads/content/downloadmanager.js (renamed from xptoolkit/components/downloads/content/downloadmanager.js)0
-rw-r--r--xpfe/components/downloads/content/downloadmanager.xul (renamed from xptoolkit/components/downloads/content/downloadmanager.xul)0
-rw-r--r--xpfe/components/downloads/content/progressDialog.js (renamed from xptoolkit/components/downloads/content/progressDialog.js)0
-rw-r--r--xpfe/components/downloads/content/progressDialog.xul (renamed from xptoolkit/components/downloads/content/progressDialog.xul)0
-rw-r--r--xpfe/components/downloads/content/treeView.js (renamed from xptoolkit/components/downloads/content/treeView.js)0
-rw-r--r--xpfe/components/downloads/content/uploadProgress.js (renamed from xptoolkit/components/downloads/content/uploadProgress.js)0
-rw-r--r--xpfe/components/downloads/content/uploadProgress.xul (renamed from xptoolkit/components/downloads/content/uploadProgress.xul)0
-rw-r--r--xpfe/components/downloads/download-prefs.js (renamed from xptoolkit/components/downloads/download-prefs.js)0
-rw-r--r--xpfe/components/downloads/jar.mn (renamed from xptoolkit/components/downloads/jar.mn)0
-rw-r--r--xpfe/components/downloads/locale/downloadmanager.dtd (renamed from xptoolkit/components/downloads/locale/downloadmanager.dtd)0
-rw-r--r--xpfe/components/downloads/locale/downloadmanager.properties (renamed from xptoolkit/components/downloads/locale/downloadmanager.properties)0
-rw-r--r--xpfe/components/downloads/locale/progressDialog.dtd (renamed from xptoolkit/components/downloads/locale/progressDialog.dtd)0
-rw-r--r--xpfe/components/downloads/moz.build (renamed from xptoolkit/components/downloads/moz.build)8
-rw-r--r--xpfe/components/downloads/nsSuiteDownloadManager.manifest (renamed from xptoolkit/components/downloads/nsSuiteDownloadManager.manifest)0
-rw-r--r--xpfe/components/downloads/public/nsISuiteDownloadManagerUI.idl (renamed from xptoolkit/components/downloads/public/nsISuiteDownloadManagerUI.idl)0
-rw-r--r--xpfe/components/downloads/skin/dl-remove.png (renamed from xptoolkit/components/downloads/skin/dl-remove.png)bin385 -> 385 bytes
-rw-r--r--xpfe/components/downloads/skin/downloadButtons.png (renamed from xptoolkit/components/downloads/skin/downloadButtons.png)bin952 -> 952 bytes
-rw-r--r--xpfe/components/downloads/skin/downloadmanager.css (renamed from xptoolkit/components/downloads/skin/downloadmanager.css)0
-rw-r--r--xpfe/components/downloads/skin/mac/downloadButtons.png (renamed from xptoolkit/components/downloads/skin/mac/downloadButtons.png)bin762 -> 762 bytes
-rw-r--r--xpfe/components/downloads/skin/mac/downloadmanager.css (renamed from xptoolkit/components/downloads/skin/mac/downloadmanager.css)0
-rw-r--r--xpfe/components/downloads/skin/mac/progressBg.png (renamed from xptoolkit/components/downloads/skin/mac/progressBg.png)bin136 -> 136 bytes
-rw-r--r--xpfe/components/downloads/src/nsDownloadsStartup.js (renamed from xptoolkit/components/downloads/src/nsDownloadsStartup.js)0
-rw-r--r--xpfe/components/downloads/src/nsSuiteDownloadManagerUI.js (renamed from xptoolkit/components/downloads/src/nsSuiteDownloadManagerUI.js)0
-rw-r--r--xpfe/components/eula/content/eula.js (renamed from xptoolkit/components/eula/content/eula.js)0
-rw-r--r--xpfe/components/eula/content/eula.xul (renamed from xptoolkit/components/eula/content/eula.xul)0
-rw-r--r--xpfe/components/eula/jar.mn (renamed from xptoolkit/components/eula/jar.mn)0
-rw-r--r--xpfe/components/eula/locale/eula.dtd (renamed from xptoolkit/components/eula/locale/eula.dtd)0
-rw-r--r--xpfe/components/eula/moz.build (renamed from xptoolkit/components/eula/moz.build)0
-rw-r--r--xpfe/components/eula/skin/eula.css (renamed from xptoolkit/components/eula/skin/eula.css)0
-rw-r--r--xpfe/components/moz.build (renamed from xptoolkit/components/moz.build)15
-rw-r--r--xpfe/components/preferences/content/pref-advanced.xul (renamed from xptoolkit/components/preferences/content/pref-advanced.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-applicationManager.js (renamed from xptoolkit/components/preferences/content/pref-applicationManager.js)0
-rw-r--r--xpfe/components/preferences/content/pref-applicationManager.xul (renamed from xptoolkit/components/preferences/content/pref-applicationManager.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-applications.js (renamed from xptoolkit/components/preferences/content/pref-applications.js)0
-rw-r--r--xpfe/components/preferences/content/pref-applications.xul (renamed from xptoolkit/components/preferences/content/pref-applications.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-certs.js (renamed from xptoolkit/components/preferences/content/pref-certs.js)0
-rw-r--r--xpfe/components/preferences/content/pref-certs.xul (renamed from xptoolkit/components/preferences/content/pref-certs.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-download.js (renamed from xptoolkit/components/preferences/content/pref-download.js)0
-rw-r--r--xpfe/components/preferences/content/pref-download.xul (renamed from xptoolkit/components/preferences/content/pref-download.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-http.js (renamed from xptoolkit/components/preferences/content/pref-http.js)0
-rw-r--r--xpfe/components/preferences/content/pref-http.xul (renamed from xptoolkit/components/preferences/content/pref-http.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-masterpass.js (renamed from xptoolkit/components/preferences/content/pref-masterpass.js)0
-rw-r--r--xpfe/components/preferences/content/pref-masterpass.xul (renamed from xptoolkit/components/preferences/content/pref-masterpass.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-proxies-advanced.xul (renamed from xptoolkit/components/preferences/content/pref-proxies-advanced.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-proxies.js (renamed from xptoolkit/components/preferences/content/pref-proxies.js)0
-rw-r--r--xpfe/components/preferences/content/pref-proxies.xul (renamed from xptoolkit/components/preferences/content/pref-proxies.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-smartupdate.js (renamed from xptoolkit/components/preferences/content/pref-smartupdate.js)0
-rw-r--r--xpfe/components/preferences/content/pref-smartupdate.xul (renamed from xptoolkit/components/preferences/content/pref-smartupdate.xul)0
-rw-r--r--xpfe/components/preferences/content/pref-ssl.js (renamed from xptoolkit/components/preferences/content/pref-ssl.js)0
-rw-r--r--xpfe/components/preferences/content/pref-ssl.xul (renamed from xptoolkit/components/preferences/content/pref-ssl.xul)0
-rw-r--r--xpfe/components/preferences/content/preferences.js (renamed from xptoolkit/components/preferences/content/preferences.js)0
-rw-r--r--xpfe/components/preferences/content/preferences.xul (renamed from xptoolkit/components/preferences/content/preferences.xul)0
-rw-r--r--xpfe/components/preferences/content/prefpanels.css (renamed from xptoolkit/components/preferences/content/prefpanels.css)0
-rw-r--r--xpfe/components/preferences/content/prefpanels.xml (renamed from xptoolkit/components/preferences/content/prefpanels.xml)0
-rw-r--r--xpfe/components/preferences/content/prefwindow.xml (renamed from xptoolkit/components/preferences/content/prefwindow.xml)0
-rw-r--r--xpfe/components/preferences/jar.mn (renamed from xptoolkit/components/preferences/jar.mn)0
-rw-r--r--xpfe/components/preferences/locale/pref-advanced.dtd (renamed from xptoolkit/components/preferences/locale/pref-advanced.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-applicationManager.dtd (renamed from xptoolkit/components/preferences/locale/pref-applicationManager.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-applicationManager.properties (renamed from xptoolkit/components/preferences/locale/pref-applicationManager.properties)0
-rw-r--r--xpfe/components/preferences/locale/pref-applications.dtd (renamed from xptoolkit/components/preferences/locale/pref-applications.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-applications.properties (renamed from xptoolkit/components/preferences/locale/pref-applications.properties)0
-rw-r--r--xpfe/components/preferences/locale/pref-certs.dtd (renamed from xptoolkit/components/preferences/locale/pref-certs.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-download.dtd (renamed from xptoolkit/components/preferences/locale/pref-download.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-http.dtd (renamed from xptoolkit/components/preferences/locale/pref-http.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-masterpass.dtd (renamed from xptoolkit/components/preferences/locale/pref-masterpass.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-proxies-advanced.dtd (renamed from xptoolkit/components/preferences/locale/pref-proxies-advanced.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-proxies.dtd (renamed from xptoolkit/components/preferences/locale/pref-proxies.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-smartupdate.dtd (renamed from xptoolkit/components/preferences/locale/pref-smartupdate.dtd)0
-rw-r--r--xpfe/components/preferences/locale/pref-ssl.dtd (renamed from xptoolkit/components/preferences/locale/pref-ssl.dtd)0
-rw-r--r--xpfe/components/preferences/locale/preferences.dtd (renamed from xptoolkit/components/preferences/locale/preferences.dtd)0
-rw-r--r--xpfe/components/preferences/locale/prefutilities.dtd (renamed from xptoolkit/components/preferences/locale/prefutilities.dtd)0
-rw-r--r--xpfe/components/preferences/locale/prefutilities.properties (renamed from xptoolkit/components/preferences/locale/prefutilities.properties)0
-rw-r--r--xpfe/components/preferences/moz.build (renamed from editor/ui/locales/moz.build)0
-rw-r--r--xpfe/components/preferences/skin/preferences.css (renamed from xptoolkit/components/preferences/skin/preferences.css)0
-rw-r--r--xpfe/components/preferences/skin/prefpanels.css (renamed from xptoolkit/components/preferences/skin/prefpanels.css)0
-rw-r--r--xpfe/components/profile/content/profileSelection.js (renamed from xptoolkit/components/profile/content/profileSelection.js)0
-rw-r--r--xpfe/components/profile/content/profileSelection.xul (renamed from xptoolkit/components/profile/content/profileSelection.xul)0
-rw-r--r--xpfe/components/profile/jar.mn (renamed from xptoolkit/components/profile/jar.mn)0
-rw-r--r--xpfe/components/profile/locale/profileSelection.dtd (renamed from xptoolkit/components/profile/locale/profileSelection.dtd)0
-rw-r--r--xpfe/components/profile/locale/profileSelection.properties (renamed from xptoolkit/components/profile/locale/profileSelection.properties)0
-rw-r--r--xpfe/components/profile/moz.build (renamed from xptoolkit/components/profile/moz.build)0
-rw-r--r--xpfe/components/profile/skin/migrate.gif (renamed from xptoolkit/components/profile/skin/migrate.gif)bin135 -> 135 bytes
-rw-r--r--xpfe/components/profile/skin/profile.css (renamed from xptoolkit/components/profile/skin/profile.css)0
-rw-r--r--xpfe/components/profile/skin/profileManager.css (renamed from xptoolkit/components/profile/skin/profileManager.css)0
-rw-r--r--xpfe/components/profile/skin/profileicon-large.gif (renamed from xptoolkit/components/profile/skin/profileicon-large.gif)bin76 -> 76 bytes
-rw-r--r--xpfe/content/communicator.css (renamed from xptoolkit/content/communicator.css)0
-rw-r--r--xpfe/content/jar.mn (renamed from xptoolkit/content/jar.mn)0
-rw-r--r--xpfe/content/moz.build (renamed from xptoolkit/content/moz.build)0
-rw-r--r--xpfe/modules/Communicator.jsm (renamed from xptoolkit/modules/Communicator.jsm)0
-rw-r--r--xpfe/modules/moz.build (renamed from xptoolkit/modules/moz.build)0
-rw-r--r--xpfe/moz.build (renamed from xptoolkit/moz.build)10
-rw-r--r--xpfe/searchplugins/duckduckgo-palemoon.xml (renamed from xptoolkit/searchplugins/duckduckgo-palemoon.xml)0
-rw-r--r--xpfe/searchplugins/ecosia.xml (renamed from xptoolkit/searchplugins/ecosia.xml)0
-rw-r--r--xpfe/searchplugins/ekoru.xml (renamed from xptoolkit/searchplugins/ekoru.xml)0
-rw-r--r--xpfe/searchplugins/moz.build (renamed from xptoolkit/searchplugins/moz.build)0
-rw-r--r--xpfe/searchplugins/wikipedia.xml (renamed from xptoolkit/searchplugins/wikipedia.xml)0
-rw-r--r--xpfe/xpfe.mozbuild (renamed from xptoolkit/xptoolkit.mozbuild)15
225 files changed, 1730 insertions, 26632 deletions
diff --git a/editor/ui/composer/content/ComposerCommands.js b/editor/ui/composer/content/ComposerCommands.js
deleted file mode 100644
index 1dfbe03b7..000000000
--- a/editor/ui/composer/content/ComposerCommands.js
+++ /dev/null
@@ -1,3900 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Implementations of nsIControllerCommand for composer commands */
-
-var gComposerJSCommandControllerID = 0;
-
-
-//-----------------------------------------------------------------------------------
-function SetupHTMLEditorCommands()
-{
- var commandTable = GetComposerCommandTable();
- if (!commandTable)
- return;
-
- // Include everthing a text editor does
- SetupTextEditorCommands();
-
- //dump("Registering HTML editor commands\n");
-
- commandTable.registerCommand("cmd_renderedHTMLEnabler", nsDummyHTMLCommand);
-
- commandTable.registerCommand("cmd_grid", nsGridCommand);
-
- commandTable.registerCommand("cmd_listProperties", nsListPropertiesCommand);
- commandTable.registerCommand("cmd_pageProperties", nsPagePropertiesCommand);
- commandTable.registerCommand("cmd_colorProperties", nsColorPropertiesCommand);
- commandTable.registerCommand("cmd_increaseFontStep", nsIncreaseFontCommand);
- commandTable.registerCommand("cmd_decreaseFontStep", nsDecreaseFontCommand);
- commandTable.registerCommand("cmd_advancedProperties", nsAdvancedPropertiesCommand);
- commandTable.registerCommand("cmd_objectProperties", nsObjectPropertiesCommand);
- commandTable.registerCommand("cmd_removeNamedAnchors", nsRemoveNamedAnchorsCommand);
- commandTable.registerCommand("cmd_editLink", nsEditLinkCommand);
-
- commandTable.registerCommand("cmd_form", nsFormCommand);
- commandTable.registerCommand("cmd_inputtag", nsInputTagCommand);
- commandTable.registerCommand("cmd_inputimage", nsInputImageCommand);
- commandTable.registerCommand("cmd_textarea", nsTextAreaCommand);
- commandTable.registerCommand("cmd_select", nsSelectCommand);
- commandTable.registerCommand("cmd_button", nsButtonCommand);
- commandTable.registerCommand("cmd_label", nsLabelCommand);
- commandTable.registerCommand("cmd_fieldset", nsFieldSetCommand);
- commandTable.registerCommand("cmd_isindex", nsIsIndexCommand);
- commandTable.registerCommand("cmd_image", nsImageCommand);
- commandTable.registerCommand("cmd_hline", nsHLineCommand);
- commandTable.registerCommand("cmd_link", nsLinkCommand);
- commandTable.registerCommand("cmd_anchor", nsAnchorCommand);
- commandTable.registerCommand("cmd_insertHTMLWithDialog", nsInsertHTMLWithDialogCommand);
- commandTable.registerCommand("cmd_insertMathWithDialog", nsInsertMathWithDialogCommand);
- commandTable.registerCommand("cmd_insertBreak", nsInsertBreakCommand);
- commandTable.registerCommand("cmd_insertBreakAll",nsInsertBreakAllCommand);
-
- commandTable.registerCommand("cmd_table", nsInsertOrEditTableCommand);
- commandTable.registerCommand("cmd_editTable", nsEditTableCommand);
- commandTable.registerCommand("cmd_SelectTable", nsSelectTableCommand);
- commandTable.registerCommand("cmd_SelectRow", nsSelectTableRowCommand);
- commandTable.registerCommand("cmd_SelectColumn", nsSelectTableColumnCommand);
- commandTable.registerCommand("cmd_SelectCell", nsSelectTableCellCommand);
- commandTable.registerCommand("cmd_SelectAllCells", nsSelectAllTableCellsCommand);
- commandTable.registerCommand("cmd_InsertTable", nsInsertTableCommand);
- commandTable.registerCommand("cmd_InsertRowAbove", nsInsertTableRowAboveCommand);
- commandTable.registerCommand("cmd_InsertRowBelow", nsInsertTableRowBelowCommand);
- commandTable.registerCommand("cmd_InsertColumnBefore", nsInsertTableColumnBeforeCommand);
- commandTable.registerCommand("cmd_InsertColumnAfter", nsInsertTableColumnAfterCommand);
- commandTable.registerCommand("cmd_InsertCellBefore", nsInsertTableCellBeforeCommand);
- commandTable.registerCommand("cmd_InsertCellAfter", nsInsertTableCellAfterCommand);
- commandTable.registerCommand("cmd_DeleteTable", nsDeleteTableCommand);
- commandTable.registerCommand("cmd_DeleteRow", nsDeleteTableRowCommand);
- commandTable.registerCommand("cmd_DeleteColumn", nsDeleteTableColumnCommand);
- commandTable.registerCommand("cmd_DeleteCell", nsDeleteTableCellCommand);
- commandTable.registerCommand("cmd_DeleteCellContents", nsDeleteTableCellContentsCommand);
- commandTable.registerCommand("cmd_JoinTableCells", nsJoinTableCellsCommand);
- commandTable.registerCommand("cmd_SplitTableCell", nsSplitTableCellCommand);
- commandTable.registerCommand("cmd_TableOrCellColor", nsTableOrCellColorCommand);
- commandTable.registerCommand("cmd_NormalizeTable", nsNormalizeTableCommand);
- commandTable.registerCommand("cmd_smiley", nsSetSmiley);
- commandTable.registerCommand("cmd_ConvertToTable", nsConvertToTable);
-}
-
-function SetupTextEditorCommands()
-{
- var commandTable = GetComposerCommandTable();
- if (!commandTable)
- return;
-
- //dump("Registering plain text editor commands\n");
-
- commandTable.registerCommand("cmd_findReplace",nsFindReplaceCommand);
- commandTable.registerCommand("cmd_find", nsFindCommand);
- commandTable.registerCommand("cmd_findNext", nsFindAgainCommand);
- commandTable.registerCommand("cmd_findPrev", nsFindAgainCommand);
- commandTable.registerCommand("cmd_rewrap", nsRewrapCommand);
- commandTable.registerCommand("cmd_spelling", nsSpellingCommand);
- commandTable.registerCommand("cmd_validate", nsValidateCommand);
- commandTable.registerCommand("cmd_checkLinks", nsCheckLinksCommand);
- commandTable.registerCommand("cmd_insertChars", nsInsertCharsCommand);
-}
-
-function SetupComposerWindowCommands()
-{
- // Don't need to do this if already done
- if (gComposerWindowControllerID)
- return;
-
- // Create a command controller and register commands
- // specific to Web Composer window (file-related commands, HTML Source...)
- // We can't use the composer controller created on the content window else
- // we can't process commands when in HTMLSource editor
- // IMPORTANT: For each of these commands, the doCommand method
- // must first call SetEditMode(gPreviousNonSourceDisplayMode);
- // to go from HTML Source mode to any other edit mode
-
- var windowControllers = window.controllers;
-
- if (!windowControllers) return;
-
- var commandTable;
- var composerController;
- var editorController;
- try {
- composerController = Components.classes["@mozilla.org/embedcomp/base-command-controller;1"].createInstance();
-
- editorController = composerController.QueryInterface(Components.interfaces.nsIControllerContext);
- editorController.init(null); // init it without passing in a command table
-
- // Get the nsIControllerCommandTable interface we need to register commands
- var interfaceRequestor = composerController.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
- commandTable = interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandTable);
- }
- catch (e)
- {
- dump("Failed to create composerController\n");
- return;
- }
-
-
- if (!commandTable)
- {
- dump("Failed to get interface for nsIControllerCommandManager\n");
- return;
- }
-
- // File-related commands
- commandTable.registerCommand("cmd_open", nsOpenCommand);
- commandTable.registerCommand("cmd_save", nsSaveCommand);
- commandTable.registerCommand("cmd_saveAs", nsSaveAsCommand);
- commandTable.registerCommand("cmd_exportToText", nsExportToTextCommand);
- commandTable.registerCommand("cmd_saveAndChangeEncoding", nsSaveAndChangeEncodingCommand);
- commandTable.registerCommand("cmd_publish", nsPublishCommand);
- commandTable.registerCommand("cmd_publishAs", nsPublishAsCommand);
- commandTable.registerCommand("cmd_publishSettings",nsPublishSettingsCommand);
- commandTable.registerCommand("cmd_revert", nsRevertCommand);
- commandTable.registerCommand("cmd_openRemote", nsOpenRemoteCommand);
- commandTable.registerCommand("cmd_preview", nsPreviewCommand);
- commandTable.registerCommand("cmd_editSendPage", nsSendPageCommand);
- commandTable.registerCommand("cmd_print", nsPrintCommand);
- commandTable.registerCommand("cmd_printpreview", nsPrintPreviewCommand);
- commandTable.registerCommand("cmd_printSetup", nsPrintSetupCommand);
- commandTable.registerCommand("cmd_close", nsCloseCommand);
- commandTable.registerCommand("cmd_preferences", nsPreferencesCommand);
-
- // Edit Mode commands
- if (GetCurrentEditorType() == "html")
- {
- commandTable.registerCommand("cmd_NormalMode", nsNormalModeCommand);
- commandTable.registerCommand("cmd_AllTagsMode", nsAllTagsModeCommand);
- commandTable.registerCommand("cmd_HTMLSourceMode", nsHTMLSourceModeCommand);
- commandTable.registerCommand("cmd_PreviewMode", nsPreviewModeCommand);
- commandTable.registerCommand("cmd_FinishHTMLSource", nsFinishHTMLSource);
- commandTable.registerCommand("cmd_CancelHTMLSource", nsCancelHTMLSource);
- commandTable.registerCommand("cmd_updateStructToolbar", nsUpdateStructToolbarCommand);
- }
-
- windowControllers.insertControllerAt(0, editorController);
-
- // Store the controller ID so we can be sure to get the right one later
- gComposerWindowControllerID = windowControllers.getControllerId(editorController);
-}
-
-//-----------------------------------------------------------------------------------
-function GetComposerCommandTable()
-{
- var controller;
- if (gComposerJSCommandControllerID)
- {
- try {
- controller = window.content.controllers.getControllerById(gComposerJSCommandControllerID);
- } catch (e) {}
- }
- if (!controller)
- {
- //create it
- controller = Components.classes["@mozilla.org/embedcomp/base-command-controller;1"].createInstance();
-
- var editorController = controller.QueryInterface(Components.interfaces.nsIControllerContext);
- editorController.init(null);
- editorController.setCommandContext(GetCurrentEditorElement());
- window.content.controllers.insertControllerAt(0, controller);
-
- // Store the controller ID so we can be sure to get the right one later
- gComposerJSCommandControllerID = window.content.controllers.getControllerId(controller);
- }
-
- if (controller)
- {
- var interfaceRequestor = controller.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
- return interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandTable);
- }
- return null;
-}
-
-//-----------------------------------------------------------------------------------
-function goUpdateCommandState(command)
-{
- try
- {
- var controller = top.document.commandDispatcher.getControllerForCommand(command);
- if (!(controller instanceof Components.interfaces.nsICommandController))
- return;
-
- var params = newCommandParams();
- if (!params) return;
-
- controller.getCommandStateWithParams(command, params);
-
- switch (command)
- {
- case "cmd_bold":
- case "cmd_italic":
- case "cmd_underline":
- case "cmd_var":
- case "cmd_samp":
- case "cmd_code":
- case "cmd_acronym":
- case "cmd_abbr":
- case "cmd_cite":
- case "cmd_strong":
- case "cmd_em":
- case "cmd_superscript":
- case "cmd_subscript":
- case "cmd_strikethrough":
- case "cmd_tt":
- case "cmd_nobreak":
- case "cmd_ul":
- case "cmd_ol":
- pokeStyleUI(command, params.getBooleanValue("state_all"));
- break;
-
- case "cmd_paragraphState":
- case "cmd_align":
- case "cmd_highlight":
- case "cmd_backgroundColor":
- case "cmd_fontColor":
- case "cmd_fontFace":
- case "cmd_fontSize":
- case "cmd_absPos":
- pokeMultiStateUI(command, params);
- break;
-
- case "cmd_decreaseZIndex":
- case "cmd_increaseZIndex":
- case "cmd_indent":
- case "cmd_outdent":
- case "cmd_increaseFont":
- case "cmd_decreaseFont":
- case "cmd_increaseFontStep":
- case "cmd_decreaseFontStep":
- case "cmd_removeStyles":
- case "cmd_smiley":
- break;
-
- default: dump("no update for command: " +command+"\n");
- }
- }
- catch (e) { dump("An error occurred updating the "+command+" command: \n"+e+"\n"); }
-}
-
-function goUpdateComposerMenuItems(commandset)
-{
- //dump("Updating commands for " + commandset.id + "\n");
-
- for (var i = 0; i < commandset.childNodes.length; i++)
- {
- var commandNode = commandset.childNodes[i];
- var commandID = commandNode.id;
- if (commandID)
- {
- goUpdateCommand(commandID); // enable or disable
- if (commandNode.hasAttribute("state"))
- goUpdateCommandState(commandID);
- }
- }
-}
-
-//-----------------------------------------------------------------------------------
-function goDoCommandParams(command, params)
-{
- try
- {
- var controller = top.document.commandDispatcher.getControllerForCommand(command);
- if (controller && controller.isCommandEnabled(command))
- {
- if (controller instanceof Components.interfaces.nsICommandController)
- {
- controller.doCommandWithParams(command, params);
-
- // the following two lines should be removed when we implement observers
- if (params)
- controller.getCommandStateWithParams(command, params);
- }
- else
- {
- controller.doCommand(command);
- }
- ResetStructToolbar();
- }
- }
- catch (e)
- {
- dump("An error occurred executing the "+command+" command\n");
- }
-}
-
-function pokeStyleUI(uiID, aDesiredState)
-{
- try {
- var commandNode = top.document.getElementById(uiID);
- if (!commandNode)
- return;
-
- var uiState = ("true" == commandNode.getAttribute("state"));
- if (aDesiredState != uiState)
- {
- commandNode.setAttribute("state", aDesiredState ? "true" : "false");
- }
- } catch(e) { dump("poking UI for "+uiID+" failed: "+e+"\n"); }
-}
-
-function doStyleUICommand(cmdStr)
-{
- try
- {
- var cmdParams = newCommandParams();
- goDoCommandParams(cmdStr, cmdParams);
- if (cmdParams)
- pokeStyleUI(cmdStr, cmdParams.getBooleanValue("state_all"));
-
- ResetStructToolbar();
- } catch(e) {}
-}
-
-// Copied from jsmime.js.
-function stringToTypedArray(buffer) {
- var typedarray = new Uint8Array(buffer.length);
- for (var i = 0; i < buffer.length; i++) {
- typedarray[i] = buffer.charCodeAt(i);
- }
- return typedarray;
-}
-
-function pokeMultiStateUI(uiID, cmdParams)
-{
- try
- {
- var commandNode = document.getElementById(uiID);
- if (!commandNode)
- return;
-
- var isMixed = cmdParams.getBooleanValue("state_mixed");
- var desiredAttrib;
- if (isMixed)
- desiredAttrib = "mixed";
- else {
- var valuetype = cmdParams.getValueType("state_attribute");
- if (valuetype == Components.interfaces.nsICommandParams.eStringType) {
- desiredAttrib = cmdParams.getCStringValue("state_attribute");
- // Decode UTF-8, for example for font names in Japanese.
- desiredAttrib = new TextDecoder("UTF-8").decode(stringToTypedArray(desiredAttrib));
- } else {
- desiredAttrib = cmdParams.getStringValue("state_attribute");
- }
-
- }
-
- var uiState = commandNode.getAttribute("state");
- if (desiredAttrib != uiState)
- {
- commandNode.setAttribute("state", desiredAttrib);
- }
- } catch(e) {}
-}
-
-function doStatefulCommand(commandID, newState)
-{
- var commandNode = document.getElementById(commandID);
- if (commandNode)
- commandNode.setAttribute("state", newState);
- gContentWindow.focus(); // needed for command dispatch to work
-
- try
- {
- var cmdParams = newCommandParams();
- if (!cmdParams) return;
-
- cmdParams.setStringValue("state_attribute", newState);
- goDoCommandParams(commandID, cmdParams);
-
- pokeMultiStateUI(commandID, cmdParams);
-
- ResetStructToolbar();
- } catch(e) { dump("error thrown in doStatefulCommand: "+e+"\n"); }
-}
-
-//-----------------------------------------------------------------------------------
-function PrintObject(obj)
-{
- dump("-----" + obj + "------\n");
- var names = "";
- for (var i in obj)
- {
- if (i == "value")
- names += i + ": " + obj.value + "\n";
- else if (i == "id")
- names += i + ": " + obj.id + "\n";
- else
- names += i + "\n";
- }
-
- dump(names + "-----------\n");
-}
-
-//-----------------------------------------------------------------------------------
-function PrintNodeID(id)
-{
- PrintObject(document.getElementById(id));
-}
-
-//-----------------------------------------------------------------------------------
-var nsDummyHTMLCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // do nothing
- dump("Hey, who's calling the dummy command?\n");
- }
-
-};
-
-//-----------------------------------------------------------------------------------
-var nsOpenCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true; // we can always do this
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var fileType = IsHTMLEditor() ? "html" : "text";
- var title = GetString(IsHTMLEditor() ? "OpenHTMLFile" : "OpenTextFile");
-
- var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
- fp.init(window, title, nsIFilePicker.modeOpen);
-
- SetFilePickerDirectory(fp, fileType);
-
- // Direct user to prefer HTML files and/or text files depending on whether
- // loading into Composer or Text editor, so we call separately to control
- // the order of the filter list.
- if (fileType == "html")
- fp.appendFilters(nsIFilePicker.filterHTML);
- fp.appendFilters(nsIFilePicker.filterText);
- fp.appendFilters(nsIFilePicker.filterAll);
-
- /* doesn't handle *.shtml files */
- if (fp.show() == nsIFilePicker.returnCancel)
- return;
-
- // editPage checks for already open window and activates it.
- if (fp.fileURL.spec) {
- SaveFilePickerDirectory(fp, fileType);
- editPage(fp.fileURL.spec, fileType);
- }
- }
-};
-
-// STRUCTURE TOOLBAR
-//
-var nsUpdateStructToolbarCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- UpdateStructToolbar();
- return true;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
- doCommand: function(aCommand) {}
-}
-
-// ******* File output commands and utilities ******** //
-//-----------------------------------------------------------------------------------
-var nsSaveCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- // Always allow saving when editing a remote document,
- // otherwise the document modified state would prevent that
- // when you first open a remote file.
- try {
- var docUrl = GetDocumentUrl();
- return IsDocumentEditable() &&
- (IsDocumentModified() || IsHTMLSourceChanged() ||
- IsUrlAboutBlank(docUrl) || GetScheme(docUrl) != "file");
- } catch (e) {return false;}
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var result = false;
- var editor = GetCurrentEditor();
- if (editor)
- {
- if (IsHTMLEditor())
- SetEditMode(gPreviousNonSourceDisplayMode);
- result = SaveDocument(IsUrlAboutBlank(GetDocumentUrl()), false, editor.contentsMIMEType);
- }
- return result;
- }
-}
-
-var nsSaveAsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var result = false;
- var editor = GetCurrentEditor();
- if (editor)
- {
- if (IsHTMLEditor())
- SetEditMode(gPreviousNonSourceDisplayMode);
- result = SaveDocument(true, false, editor.contentsMIMEType);
- }
- return result;
- }
-}
-
-var nsExportToTextCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- if (GetCurrentEditor())
- {
- SetEditMode(gPreviousNonSourceDisplayMode);
- var result = SaveDocument(true, true, "text/plain");
- return result;
- }
- return false;
- }
-}
-
-var nsSaveAndChangeEncodingCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- SetEditMode(gPreviousNonSourceDisplayMode);
- window.ok = false;
- window.exportToText = false;
- var oldTitle = GetDocumentTitle();
- window.openDialog("chrome://editor/content/EditorSaveAsCharset.xul","_blank", "chrome,close,titlebar,modal,resizable=yes");
-
- if (GetDocumentTitle() != oldTitle)
- UpdateWindowTitle();
-
- if (window.ok)
- {
- if (window.exportToText)
- {
- window.ok = SaveDocument(true, true, "text/plain");
- }
- else
- {
- var editor = GetCurrentEditor();
- window.ok = SaveDocument(true, false, editor ? editor.contentsMIMEType : null);
- }
- }
-
- return window.ok;
- }
-};
-
-var nsPublishCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- if (IsDocumentEditable())
- {
- // Always allow publishing when editing a local document,
- // otherwise the document modified state would prevent that
- // when you first open any local file.
- try {
- var docUrl = GetDocumentUrl();
- return IsDocumentModified() || IsHTMLSourceChanged()
- || IsUrlAboutBlank(docUrl) || GetScheme(docUrl) == "file";
- } catch (e) {return false;}
- }
- return false;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- if (GetCurrentEditor())
- {
- let docUrl = GetDocumentUrl();
- let filename = GetFilename(docUrl);
- let publishData;
-
- // First check pref to always show publish dialog
- let showPublishDialog = Services.prefs.getBoolPref("editor.always_show_publish_dialog");
-
- if (!showPublishDialog && filename)
- {
- // Try to get publish data from the document url
- publishData = CreatePublishDataFromUrl(docUrl);
-
- // If none, use default publishing site? Need a pref for this
- //if (!publishData)
- // publishData = GetPublishDataFromSiteName(GetDefaultPublishSiteName(), filename);
- }
-
- if (showPublishDialog || !publishData)
- {
- // Show the publish dialog
- publishData = {};
- window.ok = false;
- let oldTitle = GetDocumentTitle();
- window.openDialog("chrome://editor/content/EditorPublish.xul","_blank",
- "chrome,close,titlebar,modal", "", "", publishData);
- if (GetDocumentTitle() != oldTitle)
- UpdateWindowTitle();
-
- if (!window.ok)
- return false;
- }
- if (publishData)
- {
- SetEditMode(gPreviousNonSourceDisplayMode);
- return Publish(publishData);
- }
- }
- return false;
- }
-}
-
-var nsPublishAsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- if (GetCurrentEditor())
- {
- SetEditMode(gPreviousNonSourceDisplayMode);
-
- window.ok = false;
- var publishData = {};
- var oldTitle = GetDocumentTitle();
- window.openDialog("chrome://editor/content/EditorPublish.xul","_blank",
- "chrome,close,titlebar,modal", "", "", publishData);
- if (GetDocumentTitle() != oldTitle)
- UpdateWindowTitle();
-
- if (window.ok)
- return Publish(publishData);
- }
- return false;
- }
-}
-
-// ------- output utilites ----- //
-
-// returns a fileExtension string
-function GetExtensionBasedOnMimeType(aMIMEType)
-{
- try {
- var mimeService = null;
- mimeService = Components.classes["@mozilla.org/mime;1"]
- .getService(Components.interfaces.nsIMIMEService);
-
- var fileExtension = mimeService.getPrimaryExtension(aMIMEType, null);
-
- // the MIME service likes to give back ".htm" for text/html files,
- // so do a special-case fix here.
- if (fileExtension == "htm")
- fileExtension = "html";
-
- return fileExtension;
- }
- catch (e) {}
- return "";
-}
-
-function GetSuggestedFileName(aDocumentURLString, aMIMEType)
-{
- var extension = GetExtensionBasedOnMimeType(aMIMEType);
- if (extension)
- extension = "." + extension;
-
- // check for existing file name we can use
- if (aDocumentURLString && !IsUrlAboutBlank(aDocumentURLString))
- {
- try {
- let docURI = Services.io.newURI(aDocumentURLString,
- GetCurrentEditor().documentCharacterSet, null);
- docURI = docURI.QueryInterface(Components.interfaces.nsIURL);
-
- // grab the file name
- let url = validateFileName(decodeURIComponent(docURI.fileBaseName));
- if (url)
- return url + extension;
- } catch(e) {}
- }
-
- // Check if there is a title we can use to generate a valid filename,
- // if we can't, use the default filename.
- var title = validateFileName(GetDocumentTitle()) ||
- GetString("untitledDefaultFilename");
- return title + extension;
-}
-
-// returns file picker result
-function PromptForSaveLocation(aDoSaveAsText, aEditorType, aMIMEType, aDocumentURLString)
-{
- var dialogResult = {};
- dialogResult.filepickerClick = nsIFilePicker.returnCancel;
- dialogResult.resultingURI = "";
- dialogResult.resultingLocalFile = null;
-
- var fp = null;
- try {
- fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
- } catch (e) {}
- if (!fp) return dialogResult;
-
- // determine prompt string based on type of saving we'll do
- var promptString;
- if (aDoSaveAsText || aEditorType == "text")
- promptString = GetString("SaveTextAs");
- else
- promptString = GetString("SaveDocumentAs");
-
- fp.init(window, promptString, nsIFilePicker.modeSave);
-
- // Set filters according to the type of output
- if (aDoSaveAsText)
- fp.appendFilters(nsIFilePicker.filterText);
- else
- fp.appendFilters(nsIFilePicker.filterHTML);
- fp.appendFilters(nsIFilePicker.filterAll);
-
- // now let's actually set the filepicker's suggested filename
- var suggestedFileName = GetSuggestedFileName(aDocumentURLString, aMIMEType);
- if (suggestedFileName)
- fp.defaultString = suggestedFileName;
-
- // set the file picker's current directory
- // assuming we have information needed (like prior saved location)
- try {
- var fileHandler = GetFileProtocolHandler();
-
- var isLocalFile = true;
- try {
- let docURI = Services.io.newURI(aDocumentURLString, GetCurrentEditor().documentCharacterSet, null);
- isLocalFile = docURI.schemeIs("file");
- }
- catch (e) {}
-
- var parentLocation = null;
- if (isLocalFile)
- {
- var fileLocation = fileHandler.getFileFromURLSpec(aDocumentURLString); // this asserts if url is not local
- parentLocation = fileLocation.parent;
- }
- if (parentLocation)
- {
- // Save current filepicker's default location
- if ("gFilePickerDirectory" in window)
- gFilePickerDirectory = fp.displayDirectory;
-
- fp.displayDirectory = parentLocation;
- }
- else
- {
- // Initialize to the last-used directory for the particular type (saved in prefs)
- SetFilePickerDirectory(fp, aEditorType);
- }
- }
- catch(e) {}
-
- dialogResult.filepickerClick = fp.show();
- if (dialogResult.filepickerClick != nsIFilePicker.returnCancel)
- {
- // reset urlstring to new save location
- dialogResult.resultingURIString = fileHandler.getURLSpecFromFile(fp.file);
- dialogResult.resultingLocalFile = fp.file;
- SaveFilePickerDirectory(fp, aEditorType);
- }
- else if ("gFilePickerDirectory" in window && gFilePickerDirectory)
- fp.displayDirectory = gFilePickerDirectory;
-
- return dialogResult;
-}
-
-/**
- * If needed, prompt for document title and set the document title to the
- * preferred value.
- * @return true if the title was set up successfully;
- * false if the user cancelled the title prompt
- */
-function PromptAndSetTitleIfNone()
-{
- if (GetDocumentTitle()) // we have a title; no need to prompt!
- return true;
-
- let result = {value:null};
- let captionStr = GetString("DocumentTitle");
- let msgStr = GetString("NeedDocTitle") + '\n' + GetString("DocTitleHelp");
- let confirmed = Services.prompt.prompt(window, captionStr, msgStr, result, null, {value:0});
- if (confirmed)
- SetDocumentTitle(TrimString(result.value));
-
- return confirmed;
-}
-
-var gPersistObj;
-
-// Don't forget to do these things after calling OutputFileWithPersistAPI:
-// we need to update the uri before notifying listeners
-// if (doUpdateURI)
-// SetDocumentURI(docURI);
-// UpdateWindowTitle();
-// if (!aSaveCopy)
-// editor.resetModificationCount();
- // this should cause notification to listeners that document has changed
-
-const webPersist = Components.interfaces.nsIWebBrowserPersist;
-function OutputFileWithPersistAPI(editorDoc, aDestinationLocation, aRelatedFilesParentDir, aMimeType)
-{
- gPersistObj = null;
- var editor = GetCurrentEditor();
- try {
- var imeEditor = editor.QueryInterface(Components.interfaces.nsIEditorIMESupport);
- imeEditor.forceCompositionEnd();
- } catch (e) {}
-
- var isLocalFile = false;
- try {
- var tmp1 = aDestinationLocation.QueryInterface(Components.interfaces.nsIFile);
- isLocalFile = true;
- }
- catch (e) {
- try {
- var tmp = aDestinationLocation.QueryInterface(Components.interfaces.nsIURI);
- isLocalFile = tmp.schemeIs("file");
- }
- catch (e) {}
- }
-
- try {
- // we should supply a parent directory if/when we turn on functionality to save related documents
- var persistObj = Components.classes["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"].createInstance(webPersist);
- persistObj.progressListener = gEditorOutputProgressListener;
-
- var wrapColumn = GetWrapColumn();
- var outputFlags = GetOutputFlags(aMimeType, wrapColumn);
-
- // for 4.x parity as well as improving readability of file locally on server
- // this will always send crlf for upload (http/ftp)
- if (!isLocalFile) // if we aren't saving locally then send both cr and lf
- {
- outputFlags |= webPersist.ENCODE_FLAGS_CR_LINEBREAKS | webPersist.ENCODE_FLAGS_LF_LINEBREAKS;
-
- // we want to serialize the output for all remote publishing
- // some servers can handle only one connection at a time
- // some day perhaps we can make this user-configurable per site?
- persistObj.persistFlags = persistObj.persistFlags | webPersist.PERSIST_FLAGS_SERIALIZE_OUTPUT;
- }
-
- // note: we always want to set the replace existing files flag since we have
- // already given user the chance to not replace an existing file (file picker)
- // or the user picked an option where the file is implicitly being replaced (save)
- persistObj.persistFlags = persistObj.persistFlags
- | webPersist.PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS
- | webPersist.PERSIST_FLAGS_REPLACE_EXISTING_FILES
- | webPersist.PERSIST_FLAGS_DONT_FIXUP_LINKS
- | webPersist.PERSIST_FLAGS_DONT_CHANGE_FILENAMES
- | webPersist.PERSIST_FLAGS_FIXUP_ORIGINAL_DOM;
- persistObj.saveDocument(editorDoc, aDestinationLocation, aRelatedFilesParentDir,
- aMimeType, outputFlags, wrapColumn);
- gPersistObj = persistObj;
- }
- catch(e) { dump("caught an error, bail\n"); return false; }
-
- return true;
-}
-
-// returns output flags based on mimetype, wrapCol and prefs
-function GetOutputFlags(aMimeType, aWrapColumn)
-{
- var outputFlags = 0;
- var editor = GetCurrentEditor();
- var outputEntity = (editor && editor.documentCharacterSet == "ISO-8859-1")
- ? webPersist.ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES
- : webPersist.ENCODE_FLAGS_ENCODE_BASIC_ENTITIES;
- if (aMimeType == "text/plain")
- {
- // When saving in "text/plain" format, always do formatting
- outputFlags |= webPersist.ENCODE_FLAGS_FORMATTED;
- }
- else
- {
- // Should we prettyprint? Check the pref
- if (Services.prefs.getBoolPref("editor.prettyprint"))
- outputFlags |= webPersist.ENCODE_FLAGS_FORMATTED;
-
- try {
- // How much entity names should we output? Check the pref
- switch (Services.prefs.getCharPref("editor.encode_entity")) {
- case "basic" : outputEntity = webPersist.ENCODE_FLAGS_ENCODE_BASIC_ENTITIES; break;
- case "latin1" : outputEntity = webPersist.ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES; break;
- case "html" : outputEntity = webPersist.ENCODE_FLAGS_ENCODE_HTML_ENTITIES; break;
- case "none" : outputEntity = 0; break;
- }
- }
- catch (e) {}
- }
- outputFlags |= outputEntity;
-
- if (aWrapColumn > 0)
- outputFlags |= webPersist.ENCODE_FLAGS_WRAP;
-
- return outputFlags;
-}
-
-// returns number of column where to wrap
-const nsIWebBrowserPersist = Components.interfaces.nsIWebBrowserPersist;
-function GetWrapColumn()
-{
- try {
- return GetCurrentEditor().wrapWidth;
- } catch (e) {}
- return 0;
-}
-
-const gShowDebugOutputStateChange = false;
-const gShowDebugOutputProgress = false;
-const gShowDebugOutputStatusChange = false;
-
-const gShowDebugOutputLocationChange = false;
-const gShowDebugOutputSecurityChange = false;
-
-const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
-const nsIChannel = Components.interfaces.nsIChannel;
-
-const kErrorBindingAborted = 2152398850;
-const kErrorBindingRedirected = 2152398851;
-const kFileNotFound = 2152857618;
-
-var gEditorOutputProgressListener =
-{
- onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)
- {
- var editor = GetCurrentEditor();
-
- // Use this to access onStateChange flags
- var requestSpec;
- try {
- var channel = aRequest.QueryInterface(nsIChannel);
- requestSpec = StripUsernamePasswordFromURI(channel.URI);
- } catch (e) {
- if (gShowDebugOutputStateChange)
- dump("***** onStateChange; NO REQUEST CHANNEL\n");
- }
-
- var pubSpec;
- if (gPublishData)
- pubSpec = gPublishData.publishUrl + gPublishData.docDir + gPublishData.filename;
-
- if (gShowDebugOutputStateChange)
- {
- dump("\n***** onStateChange request: " + requestSpec + "\n");
- dump(" state flags: ");
-
- if (aStateFlags & nsIWebProgressListener.STATE_START)
- dump(" STATE_START, ");
- if (aStateFlags & nsIWebProgressListener.STATE_STOP)
- dump(" STATE_STOP, ");
- if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK)
- dump(" STATE_IS_NETWORK ");
-
- dump("\n * requestSpec="+requestSpec+", pubSpec="+pubSpec+", aStatus="+aStatus+"\n");
-
- DumpDebugStatus(aStatus);
- }
- // The rest only concerns publishing, so bail out if no dialog
- if (!gProgressDialog)
- return;
-
- // Detect start of file upload of any file:
- // (We ignore any START messages after gPersistObj says publishing is finished
- if ((aStateFlags & nsIWebProgressListener.STATE_START)
- && gPersistObj && requestSpec
- && (gPersistObj.currentState != gPersistObj.PERSIST_STATE_FINISHED))
- {
- try {
- // Add url to progress dialog's list showing each file uploading
- gProgressDialog.SetProgressStatus(GetFilename(requestSpec), "busy");
- } catch(e) {}
- }
-
- // Detect end of file upload of any file:
- if (aStateFlags & nsIWebProgressListener.STATE_STOP)
- {
- // ignore aStatus == kErrorBindingAborted; check http response for possible errors
- try {
- // check http channel for response: 200 range is ok; other ranges are not
- var httpChannel = aRequest.QueryInterface(Components.interfaces.nsIHttpChannel);
- var httpResponse = httpChannel.responseStatus;
- if (httpResponse < 200 || httpResponse >= 300)
- aStatus = httpResponse; // not a real error but enough to pass check below
- else if (aStatus == kErrorBindingAborted)
- aStatus = 0;
-
- if (gShowDebugOutputStateChange)
- dump("http response is: "+httpResponse+"\n");
- }
- catch(e)
- {
- if (aStatus == kErrorBindingAborted)
- aStatus = 0;
- }
-
- // We abort publishing for all errors except if image src file is not found
- var abortPublishing = (aStatus != 0 && aStatus != kFileNotFound);
-
- // Notify progress dialog when we receive the STOP
- // notification for a file if there was an error
- // or a successful finish
- // (Check requestSpec to be sure message is for destination url)
- if (aStatus != 0
- || (requestSpec && requestSpec.startsWith(GetScheme(gPublishData.publishUrl))))
- {
- try {
- gProgressDialog.SetProgressFinished(GetFilename(requestSpec), aStatus);
- } catch(e) {}
- }
-
-
- if (abortPublishing)
- {
- // Cancel publishing
- gPersistObj.cancelSave();
-
- // Don't do any commands after failure
- gCommandAfterPublishing = null;
-
- // Restore original document to undo image src url adjustments
- if (gRestoreDocumentSource)
- {
- try {
- editor.rebuildDocumentFromSource(gRestoreDocumentSource);
-
- // Clear transaction cache since we just did a potentially
- // very large insert and this will eat up memory
- editor.transactionManager.clear();
- }
- catch (e) {}
- }
-
- // Notify progress dialog that we're finished
- // and keep open to show error
- gProgressDialog.SetProgressFinished(null, 0);
-
- // We don't want to change location or reset mod count, etc.
- return;
- }
-
- //XXX HACK: "file://" protocol is not supported in network code
- // (bug 151867 filed to add this support, bug 151869 filed
- // to remove this and other code in nsIWebBrowserPersist)
- // nsIWebBrowserPersist *does* copy the file(s), but we don't
- // get normal onStateChange messages.
-
- // Case 1: If images are included, we get fairly normal
- // STATE_START/STATE_STOP & STATE_IS_NETWORK messages associated with the image files,
- // thus we must finish HTML file progress below
-
- // Case 2: If just HTML file is uploaded, we get STATE_START and STATE_STOP
- // notification with a null "requestSpec", and
- // the gPersistObj is destroyed before we get here!
- // So create an new object so we can flow through normal processing below
- if (!requestSpec && GetScheme(gPublishData.publishUrl) == "file"
- && (!gPersistObj || gPersistObj.currentState == nsIWebBrowserPersist.PERSIST_STATE_FINISHED))
- {
- aStateFlags |= nsIWebProgressListener.STATE_IS_NETWORK;
- if (!gPersistObj)
- {
- gPersistObj =
- {
- result : aStatus,
- currentState : nsIWebBrowserPersist.PERSIST_STATE_FINISHED
- }
- }
- }
-
- // STATE_IS_NETWORK signals end of publishing, as does the gPersistObj.currentState
- if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK
- && gPersistObj.currentState == nsIWebBrowserPersist.PERSIST_STATE_FINISHED)
- {
- if (GetScheme(gPublishData.publishUrl) == "file")
- {
- //XXX "file://" hack: We don't get notified about the HTML file, so end progress for it
- // (This covers both "Case 1 and 2" described above)
- gProgressDialog.SetProgressFinished(gPublishData.filename, gPersistObj.result);
- }
-
- if (gPersistObj.result == 0)
- {
- // All files are finished and publishing succeeded (some images may have failed)
- try {
- // Make a new docURI from the "browse location" in case "publish location" was FTP
- // We need to set document uri before notifying listeners
- var docUrl = GetDocUrlFromPublishData(gPublishData);
- SetDocumentURI(Services.io.newURI(docUrl, editor.documentCharacterSet, null));
-
- UpdateWindowTitle();
-
- // this should cause notification to listeners that doc has changed
- editor.resetModificationCount();
-
- // Set UI based on whether we're editing a remote or local url
- SetSaveAndPublishUI(urlstring);
-
- } catch (e) {}
-
- // Save publishData to prefs
- if (gPublishData)
- {
- if (gPublishData.savePublishData)
- {
- // We published successfully, so we can safely
- // save docDir and otherDir to prefs
- gPublishData.saveDirs = true;
- SavePublishDataToPrefs(gPublishData);
- }
- else
- SavePassword(gPublishData);
- }
-
- // Ask progress dialog to close, but it may not
- // if user checked checkbox to keep it open
- gProgressDialog.RequestCloseDialog();
- }
- else
- {
- // We previously aborted publishing because of error:
- // Calling gPersistObj.cancelSave() resulted in a non-zero gPersistObj.result,
- // so notify progress dialog we're finished
- gProgressDialog.SetProgressFinished(null, 0);
- }
- }
- }
- },
-
- onProgressChange : function(aWebProgress, aRequest, aCurSelfProgress,
- aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
- {
- if (!gPersistObj)
- return;
-
- if (gShowDebugOutputProgress)
- {
- dump("\n onProgressChange: gPersistObj.result="+gPersistObj.result+"\n");
- try {
- var channel = aRequest.QueryInterface(nsIChannel);
- dump("***** onProgressChange request: " + channel.URI.spec + "\n");
- }
- catch (e) {}
- dump("***** self: "+aCurSelfProgress+" / "+aMaxSelfProgress+"\n");
- dump("***** total: "+aCurTotalProgress+" / "+aMaxTotalProgress+"\n\n");
-
- if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_READY)
- dump(" Persister is ready to save data\n\n");
- else if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_SAVING)
- dump(" Persister is saving data.\n\n");
- else if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_FINISHED)
- dump(" PERSISTER HAS FINISHED SAVING DATA\n\n\n");
- }
- },
-
- onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags)
- {
- if (gShowDebugOutputLocationChange)
- {
- dump("***** onLocationChange: "+aLocation.spec+"\n");
- try {
- var channel = aRequest.QueryInterface(nsIChannel);
- dump("***** request: " + channel.URI.spec + "\n");
- }
- catch(e) {}
- }
- },
-
- onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
- {
- if (gShowDebugOutputStatusChange)
- {
- dump("***** onStatusChange: "+aMessage+"\n");
- try {
- var channel = aRequest.QueryInterface(nsIChannel);
- dump("***** request: " + channel.URI.spec + "\n");
- }
- catch (e) { dump(" couldn't get request\n"); }
-
- DumpDebugStatus(aStatus);
-
- if (gPersistObj)
- {
- if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_READY)
- dump(" Persister is ready to save data\n\n");
- else if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_SAVING)
- dump(" Persister is saving data.\n\n");
- else if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_FINISHED)
- dump(" PERSISTER HAS FINISHED SAVING DATA\n\n\n");
- }
- }
- },
-
- onSecurityChange : function(aWebProgress, aRequest, state)
- {
- if (gShowDebugOutputSecurityChange)
- {
- try {
- var channel = aRequest.QueryInterface(nsIChannel);
- dump("***** onSecurityChange request: " + channel.URI.spec + "\n");
- } catch (e) {}
- }
- },
-
- QueryInterface : function(aIID)
- {
- if (aIID.equals(Components.interfaces.nsIWebProgressListener)
- || aIID.equals(Components.interfaces.nsISupports)
- || aIID.equals(Components.interfaces.nsISupportsWeakReference)
- || aIID.equals(Components.interfaces.nsIPrompt)
- || aIID.equals(Components.interfaces.nsIAuthPrompt))
- return this;
- throw Components.results.NS_NOINTERFACE;
- },
-
-// nsIPrompt
- alert : function(dlgTitle, text)
- {
- Services.prompt.alert(gProgressDialog ? gProgressDialog : window, dlgTitle, text);
- },
- alertCheck : function(dialogTitle, text, checkBoxLabel, checkObj)
- {
- Services.prompt.alert(window, dialogTitle, text);
- },
- confirm : function(dlgTitle, text)
- {
- return ConfirmWithTitle(dlgTitle, text, null, null);
- },
- confirmCheck : function(dlgTitle, text, checkBoxLabel, checkObj)
- {
- Services.prompt.confirmEx(window, dlgTitle, text, nsIPromptService.STD_OK_CANCEL_BUTTONS,
- "", "", "", checkBoxLabel, checkObj);
- },
- confirmEx : function(dlgTitle, text, btnFlags, btn0Title, btn1Title, btn2Title, checkBoxLabel, checkVal)
- {
- return Services.prompt.confirmEx(window, dlgTitle, text, btnFlags,
- btn0Title, btn1Title, btn2Title,
- checkBoxLabel, checkVal);
- },
-
- /*************************************************************************
- * gEditorOutputProgressListener needs to implement both nsIPrompt *
- * (providing alert) and nsIAuthPrompt (providing password saving). *
- * Unfortunately, both interfaces specify prompt/promptPassword/ *
- * promptUsernameAndPassword, albeit with conflicting method signatures. *
- * Luckily, though, we only make use of their nsIAuthPrompt variants, *
- * hence we can comment out the nsIPrompt ones here to avoid JavaScript *
- * strict mode clutter. See bug 371174 for more information. *
- *************************************************************************
- prompt : function(dlgTitle, text, inoutText, checkBoxLabel, checkObj)
- {
- return Services.prompt.prompt(window, dlgTitle, text, inoutText, checkBoxLabel, checkObj);
- },
- promptPassword : function(dlgTitle, text, pwObj, checkBoxLabel, savePWObj)
- {
- var ret = false;
- try {
- // Note difference with nsIAuthPrompt::promptPassword, which has
- // just "in" savePassword param, while nsIPrompt is "inout"
- // Initialize with user's previous preference for this site
- if (gPublishData)
- savePWObj.value = gPublishData.savePassword;
-
- ret = Services.prompt.promptPassword(gProgressDialog ? gProgressDialog : window,
- dlgTitle, text, pwObj, checkBoxLabel, savePWObj);
-
- if (!ret)
- setTimeout(CancelPublishing, 0);
-
- if (ret && gPublishData)
- UpdateUsernamePasswordFromPrompt(gPublishData, gPublishData.username, pwObj.value, savePWObj.value);
- } catch(e) {}
-
- return ret;
- },
- promptUsernameAndPassword : function(dlgTitle, text, userObj, pwObj, checkBoxLabel, savePWObj)
- {
- var ret = PromptUsernameAndPassword(dlgTitle, text, savePWObj.value, userObj, pwObj);
- if (!ret)
- setTimeout(CancelPublishing, 0);
-
- return ret;
- },
- *************************************************************************/
-
- select : function(dlgTitle, text, count, selectList, outSelection)
- {
- return Services.prompt.select(window, dlgTitle, text, count, selectList, outSelection);
- },
-
-// nsIAuthPrompt
- prompt : function(dlgTitle, text, pwrealm, savePW, defaultText, result)
- {
- var ret = Services.prompt.prompt(gProgressDialog ? gProgressDialog : window,
- dlgTitle, text, defaultText, pwrealm, savePWObj);
- if (!ret)
- setTimeout(CancelPublishing, 0);
- return ret;
- },
-
- promptUsernameAndPassword : function(dlgTitle, text, pwrealm, savePW, userObj, pwObj)
- {
- var ret = PromptUsernameAndPassword(dlgTitle, text, savePW, userObj, pwObj);
- if (!ret)
- setTimeout(CancelPublishing, 0);
- return ret;
- },
-
- promptPassword : function(dlgTitle, text, pwrealm, savePW, pwObj)
- {
- var ret = false;
- try {
- // Note difference with nsIPrompt::promptPassword, which has
- // "inout" savePassword param, while nsIAuthPrompt is just "in"
- // Also nsIAuth doesn't supply "checkBoxLabel"
- // Initialize with user's previous preference for this site
- var savePWObj = {value:savePW};
- // Initialize with user's previous preference for this site
- if (gPublishData)
- savePWObj.value = gPublishData.savePassword;
-
- ret = Services.prompt.promptPassword(gProgressDialog ? gProgressDialog : window,
- dlgTitle, text, pwObj, GetString("SavePassword"), savePWObj);
-
- if (!ret)
- setTimeout(CancelPublishing, 0);
-
- if (ret && gPublishData)
- UpdateUsernamePasswordFromPrompt(gPublishData, gPublishData.username, pwObj.value, savePWObj.value);
- } catch(e) {}
-
- return ret;
- }
-}
-
-function PromptUsernameAndPassword(dlgTitle, text, savePW, userObj, pwObj)
-{
- // HTTP prompts us twice even if user Cancels from 1st attempt!
- // So never put up dialog if there's no publish data
- if (!gPublishData)
- return false
-
- var ret = false;
- try {
-
- var savePWObj = {value:savePW};
-
- // Initialize with user's previous preference for this site
- if (gPublishData)
- {
- // HTTP put uses this dialog if either username or password is bad,
- // so prefill username input field with the previous value for modification
- savePWObj.value = gPublishData.savePassword;
- if (!userObj.value)
- userObj.value = gPublishData.username;
- }
-
- ret = Services.prompt.promptUsernameAndPassword(gProgressDialog ? gProgressDialog : window,
- dlgTitle, text, userObj, pwObj,
- GetString("SavePassword"), savePWObj);
- if (ret && gPublishData)
- UpdateUsernamePasswordFromPrompt(gPublishData, userObj.value, pwObj.value, savePWObj.value);
-
- } catch (e) {}
-
- return ret;
-}
-
-function DumpDebugStatus(aStatus)
-{
- // see nsError.h and netCore.h and ftpCore.h
-
- if (aStatus == kErrorBindingAborted)
- dump("***** status is NS_BINDING_ABORTED\n");
- else if (aStatus == kErrorBindingRedirected)
- dump("***** status is NS_BINDING_REDIRECTED\n");
- else if (aStatus == 2152398859) // in netCore.h 11
- dump("***** status is ALREADY_CONNECTED\n");
- else if (aStatus == 2152398860) // in netCore.h 12
- dump("***** status is NOT_CONNECTED\n");
- else if (aStatus == 2152398861) // in nsISocketTransportService.idl 13
- dump("***** status is CONNECTION_REFUSED\n");
- else if (aStatus == 2152398862) // in nsISocketTransportService.idl 14
- dump("***** status is NET_TIMEOUT\n");
- else if (aStatus == 2152398863) // in netCore.h 15
- dump("***** status is IN_PROGRESS\n");
- else if (aStatus == 2152398864) // 0x804b0010 in netCore.h 16
- dump("***** status is OFFLINE\n");
- else if (aStatus == 2152398865) // in netCore.h 17
- dump("***** status is NO_CONTENT\n");
- else if (aStatus == 2152398866) // in netCore.h 18
- dump("***** status is UNKNOWN_PROTOCOL\n");
- else if (aStatus == 2152398867) // in netCore.h 19
- dump("***** status is PORT_ACCESS_NOT_ALLOWED\n");
- else if (aStatus == 2152398868) // in nsISocketTransportService.idl 20
- dump("***** status is NET_RESET\n");
- else if (aStatus == 2152398869) // in ftpCore.h 21
- dump("***** status is FTP_LOGIN\n");
- else if (aStatus == 2152398870) // in ftpCore.h 22
- dump("***** status is FTP_CWD\n");
- else if (aStatus == 2152398871) // in ftpCore.h 23
- dump("***** status is FTP_PASV\n");
- else if (aStatus == 2152398872) // in ftpCore.h 24
- dump("***** status is FTP_PWD\n");
- else if (aStatus == 2152857601)
- dump("***** status is UNRECOGNIZED_PATH\n");
- else if (aStatus == 2152857602)
- dump("***** status is UNRESOLABLE SYMLINK\n");
- else if (aStatus == 2152857604)
- dump("***** status is UNKNOWN_TYPE\n");
- else if (aStatus == 2152857605)
- dump("***** status is DESTINATION_NOT_DIR\n");
- else if (aStatus == 2152857606)
- dump("***** status is TARGET_DOES_NOT_EXIST\n");
- else if (aStatus == 2152857608)
- dump("***** status is ALREADY_EXISTS\n");
- else if (aStatus == 2152857609)
- dump("***** status is INVALID_PATH\n");
- else if (aStatus == 2152857610)
- dump("***** status is DISK_FULL\n");
- else if (aStatus == 2152857612)
- dump("***** status is NOT_DIRECTORY\n");
- else if (aStatus == 2152857613)
- dump("***** status is IS_DIRECTORY\n");
- else if (aStatus == 2152857614)
- dump("***** status is IS_LOCKED\n");
- else if (aStatus == 2152857615)
- dump("***** status is TOO_BIG\n");
- else if (aStatus == 2152857616)
- dump("***** status is NO_DEVICE_SPACE\n");
- else if (aStatus == 2152857617)
- dump("***** status is NAME_TOO_LONG\n");
- else if (aStatus == 2152857618) // 80520012
- dump("***** status is FILE_NOT_FOUND\n");
- else if (aStatus == 2152857619)
- dump("***** status is READ_ONLY\n");
- else if (aStatus == 2152857620)
- dump("***** status is DIR_NOT_EMPTY\n");
- else if (aStatus == 2152857621)
- dump("***** status is ACCESS_DENIED\n");
- else if (aStatus == 2152398878)
- dump("***** status is ? (No connection or time out?)\n");
- else
- dump("***** status is " + aStatus + "\n");
-}
-
-// Update any data that the user supplied in a prompt dialog
-function UpdateUsernamePasswordFromPrompt(publishData, username, password, savePassword)
-{
- if (!publishData)
- return;
-
- // Set flag to save publish data after publishing if it changed in dialog
- // and the "SavePassword" checkbox was checked
- // or we already had site data for this site
- // (Thus we don't automatically create a site until user brings up Publish As dialog)
- publishData.savePublishData = (gPublishData.username != username || gPublishData.password != password)
- && (savePassword || !publishData.notInSiteData);
-
- publishData.username = username;
- publishData.password = password;
- publishData.savePassword = savePassword;
-}
-
-const kSupportedTextMimeTypes =
-[
- "text/plain",
- "text/css",
- "text/rdf",
- "text/xsl",
- "text/javascript",
- "text/ecmascript",
- "application/javascript",
- "application/ecmascript",
- "application/x-javascript",
- "text/xul",
- "application/vnd.mozilla.xul+xml"
-];
-
-function IsSupportedTextMimeType(aMimeType)
-{
- for (var i = 0; i < kSupportedTextMimeTypes.length; i++)
- {
- if (kSupportedTextMimeTypes[i] == aMimeType)
- return true;
- }
- return false;
-}
-
-// throws an error or returns true if user attempted save; false if user canceled save
-function SaveDocument(aSaveAs, aSaveCopy, aMimeType)
-{
- var editor = GetCurrentEditor();
- if (!aMimeType || aMimeType == "" || !editor)
- throw Components.results.NS_ERROR_NOT_INITIALIZED;
-
- var editorDoc = editor.document;
- if (!editorDoc)
- throw Components.results.NS_ERROR_NOT_INITIALIZED;
-
- // if we don't have the right editor type bail (we handle text and html)
- var editorType = GetCurrentEditorType();
- if (["text", "html", "htmlmail", "textmail"].indexOf(editorType) == -1)
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-
- var saveAsTextFile = IsSupportedTextMimeType(aMimeType);
-
- // check if the file is to be saved is a format we don't understand; if so, bail
- if (aMimeType != kHTMLMimeType && aMimeType != kXHTMLMimeType && !saveAsTextFile)
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-
- if (saveAsTextFile)
- aMimeType = "text/plain";
-
- var urlstring = GetDocumentUrl();
- var mustShowFileDialog = (aSaveAs || IsUrlAboutBlank(urlstring) || (urlstring == ""));
-
- // If editing a remote URL, force SaveAs dialog
- if (!mustShowFileDialog && GetScheme(urlstring) != "file")
- mustShowFileDialog = true;
-
- var replacing = !aSaveAs;
- var titleChanged = false;
- var doUpdateURI = false;
- var tempLocalFile = null;
-
- if (mustShowFileDialog)
- {
- try {
- // Prompt for title if we are saving to HTML
- if (!saveAsTextFile && (editorType == "html"))
- {
- var userContinuing = PromptAndSetTitleIfNone(); // not cancel
- if (!userContinuing)
- return false;
- }
-
- var dialogResult = PromptForSaveLocation(saveAsTextFile, editorType, aMimeType, urlstring);
- if (dialogResult.filepickerClick == nsIFilePicker.returnCancel)
- return false;
-
- replacing = (dialogResult.filepickerClick == nsIFilePicker.returnReplace);
- urlstring = dialogResult.resultingURIString;
- tempLocalFile = dialogResult.resultingLocalFile;
-
- // update the new URL for the webshell unless we are saving a copy
- if (!aSaveCopy)
- doUpdateURI = true;
- } catch (e) {
- Components.utils.reportError(e);
- return false;
- }
- } // mustShowFileDialog
-
- var success = true;
- try {
- // if somehow we didn't get a local file but we did get a uri,
- // attempt to create the localfile if it's a "file" url
- var docURI;
- if (!tempLocalFile)
- {
- docURI = Services.io.newURI(urlstring, editor.documentCharacterSet, null);
-
- if (docURI.schemeIs("file"))
- {
- var fileHandler = GetFileProtocolHandler();
- tempLocalFile = fileHandler.getFileFromURLSpec(urlstring).QueryInterface(Components.interfaces.nsILocalFile);
- }
- }
-
- // this is the location where the related files will go
- var relatedFilesDir = null;
-
- // Only change links or move files if pref is set
- // and we are saving to a new location
- if (Services.prefs.getBoolPref("editor.save_associated_files") && aSaveAs)
- {
- try {
- if (tempLocalFile)
- {
- // if we are saving to the same parent directory, don't set relatedFilesDir
- // grab old location, chop off file
- // grab new location, chop off file, compare
- var oldLocation = GetDocumentUrl();
- var oldLocationLastSlash = oldLocation.lastIndexOf("\/");
- if (oldLocationLastSlash != -1)
- oldLocation = oldLocation.slice(0, oldLocationLastSlash);
-
- var relatedFilesDirStr = urlstring;
- var newLocationLastSlash = relatedFilesDirStr.lastIndexOf("\/");
- if (newLocationLastSlash != -1)
- relatedFilesDirStr = relatedFilesDirStr.slice(0, newLocationLastSlash);
- if (oldLocation == relatedFilesDirStr || IsUrlAboutBlank(oldLocation))
- relatedFilesDir = null;
- else
- relatedFilesDir = tempLocalFile.parent;
- }
- else
- {
- var lastSlash = urlstring.lastIndexOf("\/");
- if (lastSlash != -1)
- {
- var relatedFilesDirString = urlstring.slice(0, lastSlash + 1); // include last slash
- relatedFilesDir = Services.io.newURI(relatedFilesDirString, editor.documentCharacterSet, null);
- }
- }
- } catch(e) { relatedFilesDir = null; }
- }
-
- let destinationLocation = tempLocalFile ? tempLocalFile : docURI;
-
- success = OutputFileWithPersistAPI(editorDoc, destinationLocation, relatedFilesDir, aMimeType);
- }
- catch (e)
- {
- success = false;
- }
-
- if (success)
- {
- try {
- if (doUpdateURI)
- {
- // If a local file, we must create a new uri from nsILocalFile
- if (tempLocalFile)
- docURI = GetFileProtocolHandler().newFileURI(tempLocalFile);
-
- // We need to set new document uri before notifying listeners
- SetDocumentURI(docURI);
- }
-
- // Update window title to show possibly different filename
- // This also covers problem that after undoing a title change,
- // window title loses the extra [filename] part that this adds
- UpdateWindowTitle();
-
- if (!aSaveCopy)
- editor.resetModificationCount();
- // this should cause notification to listeners that document has changed
-
- // Set UI based on whether we're editing a remote or local url
- SetSaveAndPublishUI(urlstring);
- } catch (e) {}
- }
- else
- {
- Services.prompt.alert(window, GetString("SaveDocument"), GetString("SaveFileFailed"));
- }
- return success;
-}
-
-function SetDocumentURI(uri)
-{
- try {
- // XXX WE'LL NEED TO GET "CURRENT" CONTENT FRAME ONCE MULTIPLE EDITORS ARE ALLOWED
- GetCurrentEditorElement().docShell.setCurrentURI(uri);
- } catch (e) { dump("SetDocumentURI:\n"+e +"\n"); }
-}
-
-
-//------------------------------- Publishing
-var gPublishData;
-var gProgressDialog;
-var gCommandAfterPublishing = null;
-var gRestoreDocumentSource;
-
-function Publish(publishData)
-{
- if (!publishData)
- return false;
-
- // Set data in global for username password requests
- // and to do "post saving" actions after monitoring nsIWebProgressListener messages
- // and we are sure file transfer was successful
- gPublishData = publishData;
-
- gPublishData.docURI = CreateURIFromPublishData(publishData, true);
- if (!gPublishData.docURI)
- {
- Services.prompt.alert(window, GetString("Publish"), GetString("PublishFailed"));
- return false;
- }
-
- if (gPublishData.publishOtherFiles)
- gPublishData.otherFilesURI = CreateURIFromPublishData(publishData, false);
- else
- gPublishData.otherFilesURI = null;
-
- if (gShowDebugOutputStateChange)
- {
- dump("\n *** publishData: PublishUrl="+publishData.publishUrl+", BrowseUrl="+publishData.browseUrl+
- ", Username="+publishData.username+", Dir="+publishData.docDir+
- ", Filename="+publishData.filename+"\n");
- dump(" * gPublishData.docURI.spec w/o pass="+StripPassword(gPublishData.docURI.spec)+", PublishOtherFiles="+gPublishData.publishOtherFiles+"\n");
- }
-
- // XXX Missing username will make FTP fail
- // and it won't call us for prompt dialog (bug 132320)
- // (It does prompt if just password is missing)
- // So we should do the prompt ourselves before trying to publish
- if (GetScheme(publishData.publishUrl) == "ftp" && !publishData.username)
- {
- var message = GetString("PromptFTPUsernamePassword").replace(/%host%/, GetHost(publishData.publishUrl));
- var savePWobj = {value:publishData.savePassword};
- var userObj = {value:publishData.username};
- var pwObj = {value:publishData.password};
- if (!PromptUsernameAndPassword(GetString("Prompt"), message, savePWobj, userObj, pwObj))
- return false; // User canceled out of dialog
-
- // Reset data in URI objects
- gPublishData.docURI.username = publishData.username;
- gPublishData.docURI.password = publishData.password;
-
- if (gPublishData.otherFilesURI)
- {
- gPublishData.otherFilesURI.username = publishData.username;
- gPublishData.otherFilesURI.password = publishData.password;
- }
- }
-
- try {
- // We launch dialog as a dependent
- // Don't allow editing document!
- SetDocumentEditable(false);
-
- // Start progress monitoring
- gProgressDialog =
- window.openDialog("chrome://editor/content/EditorPublishProgress.xul", "_blank",
- "chrome,dependent,titlebar", gPublishData, gPersistObj);
-
- } catch (e) {}
-
- // Network transfer is often too quick for the progress dialog to be initialized
- // and we can completely miss messages for quickly-terminated bad URLs,
- // so we can't call OutputFileWithPersistAPI right away.
- // StartPublishing() is called at the end of the dialog's onload method
- return true;
-}
-
-function StartPublishing()
-{
- var editor = GetCurrentEditor();
- if (editor && gPublishData && gPublishData.docURI && gProgressDialog)
- {
- gRestoreDocumentSource = null;
-
- // Save backup document since nsIWebBrowserPersist changes image src urls
- // but we only need to do this if publishing images and other related files
- if (gPublishData.otherFilesURI)
- {
- try {
- gRestoreDocumentSource =
- editor.outputToString(editor.contentsMIMEType, kOutputEncodeW3CEntities);
- } catch (e) {}
- }
-
- OutputFileWithPersistAPI(editor.document,
- gPublishData.docURI, gPublishData.otherFilesURI,
- editor.contentsMIMEType);
- return gPersistObj;
- }
- return null;
-}
-
-function CancelPublishing()
-{
- try {
- gPersistObj.cancelSave();
- gProgressDialog.SetProgressStatusCancel();
- } catch (e) {}
-
- // If canceling publishing do not do any commands after this
- gCommandAfterPublishing = null;
-
- if (gProgressDialog)
- {
- // Close Progress dialog
- // (this will call FinishPublishing())
- gProgressDialog.CloseDialog();
- }
- else
- FinishPublishing();
-}
-
-function FinishPublishing()
-{
- SetDocumentEditable(true);
- gProgressDialog = null;
- gPublishData = null;
- gRestoreDocumentSource = null;
-
- if (gCommandAfterPublishing)
- {
- // Be sure to null out the global now incase of trouble when executing command
- var command = gCommandAfterPublishing;
- gCommandAfterPublishing = null;
- goDoCommand(command);
- }
-}
-
-// Create a nsIURI object filled in with all required publishing info
-function CreateURIFromPublishData(publishData, doDocUri)
-{
- if (!publishData || !publishData.publishUrl)
- return null;
-
- var URI;
- try {
- var spec = publishData.publishUrl;
- if (doDocUri)
- spec += FormatDirForPublishing(publishData.docDir) + publishData.filename;
- else
- spec += FormatDirForPublishing(publishData.otherDir);
-
- URI = Services.io.newURI(spec, GetCurrentEditor().documentCharacterSet, null);
-
- if (publishData.username)
- URI.username = publishData.username;
- if (publishData.password)
- URI.password = publishData.password;
- }
- catch (e) {}
-
- return URI;
-}
-
-// Resolve the correct "http:" document URL when publishing via ftp
-function GetDocUrlFromPublishData(publishData)
-{
- if (!publishData || !publishData.filename || !publishData.publishUrl)
- return "";
-
- // If user was previously editing an "ftp" url, then keep that as the new scheme
- var url;
- var docScheme = GetScheme(GetDocumentUrl());
-
- // Always use the "HTTP" address if available
- // XXX Should we do some more validation here for bad urls???
- // Let's at least check for a scheme!
- if (!GetScheme(publishData.browseUrl))
- url = publishData.publishUrl;
- else
- url = publishData.browseUrl;
-
- url += FormatDirForPublishing(publishData.docDir) + publishData.filename;
-
- if (GetScheme(url) == "ftp")
- url = InsertUsernameIntoUrl(url, publishData.username);
-
- return url;
-}
-
-function SetSaveAndPublishUI(urlstring)
-{
- // Be sure enabled state of toolbar buttons are correct
- goUpdateCommand("cmd_save");
- goUpdateCommand("cmd_publish");
-}
-
-function SetDocumentEditable(isDocEditable)
-{
- var editor = GetCurrentEditor();
- if (editor && editor.document)
- {
- try {
- var flags = editor.flags;
- editor.flags = isDocEditable ?
- flags &= ~nsIPlaintextEditor.eEditorReadonlyMask :
- flags | nsIPlaintextEditor.eEditorReadonlyMask;
- } catch(e) {}
-
- // update all commands
- window.updateCommands("create");
- }
-}
-
-// ****** end of save / publish **********//
-
-//-----------------------------------------------------------------------------------
-var nsPublishSettingsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- if (GetCurrentEditor())
- {
- // Launch Publish Settings dialog
-
- window.ok = window.openDialog("chrome://editor/content/EditorPublishSettings.xul","_blank", "chrome,close,titlebar,modal", "");
- return window.ok;
- }
- return false;
- }
-}
-
-//-----------------------------------------------------------------------------------
-var nsRevertCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() &&
- IsDocumentModified() &&
- !IsUrlAboutBlank(GetDocumentUrl()));
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Confirm with the user to abandon current changes
- // Put the page title in the message string
- let title = GetDocumentTitle();
- let msg = GetString("AbandonChanges").replace(/%title%/,title);
-
- let result = Services.prompt.confirmEx(window, GetString("RevertCaption"), msg,
- (Services.prompt.BUTTON_TITLE_REVERT * Services.prompt.BUTTON_POS_0) +
- (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1),
- null, null, null, null, {value:0});
-
- // Reload page if first button (Revert) was pressed
- if (result == 0)
- {
- CancelHTMLSource();
- EditorLoadUrl(GetDocumentUrl());
- }
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsCloseCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return GetCurrentEditor() != null;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- CloseWindow();
- }
-};
-
-function CloseWindow()
-{
- // Check to make sure document is saved. "true" means allow "Don't Save" button,
- // so user can choose to close without saving
- if (CheckAndSaveDocument("cmd_close", true))
- {
- if (window.InsertCharWindow)
- SwitchInsertCharToAnotherEditorOrClose();
-
- try {
- var basewin = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebNavigation)
- .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
- .treeOwner
- .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIBaseWindow);
- basewin.destroy();
- } catch (e) {}
- }
-}
-
-//-----------------------------------------------------------------------------------
-var nsOpenRemoteCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true; // we can always do this
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var params = { action: "2", url: "" };
- openDialog("chrome://communicator/content/openLocation.xul", "_blank", "chrome,modal,titlebar", params);
- var win = getTopWin();
- switch (params.action) {
- case "0": // current window
- win.focus();
- win.loadURI(params.url, null, null, true);
- break;
- case "1": // new window
- openDialog(getBrowserURL(), "_blank", "all,dialog=no", params.url, null,
- null, null, true);
- break;
- case "2": // edit
- editPage(params.url);
- break;
- case "3": // new tab
- win.focus();
- var browser = win.getBrowser();
- browser.selectedTab = browser.addTab(params.url, {allowThirdPartyFixup: true});
- break;
- case "4": // private
- openNewPrivateWith(params.url);
- break;
- default:
- break;
- }
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsPreviewCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() &&
- IsHTMLEditor() &&
- (DocumentHasBeenSaved() || IsDocumentModified()));
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Don't continue if user canceled during prompt for saving
- // DocumentHasBeenSaved will test if we have a URL and suppress "Don't Save" button if not
- if (!CheckAndSaveDocument("cmd_preview", DocumentHasBeenSaved()))
- return;
-
- // Check if we saved again just in case?
- if (DocumentHasBeenSaved())
- {
- let browser;
- try {
- // Find a browser with this URL
- let enumerator = Services.wm.getEnumerator("navigator:browser");
-
- var documentURI = GetDocumentUrl();
- while (enumerator.hasMoreElements())
- {
- browser = enumerator.getNext();
- if (browser && (documentURI == browser.getBrowser().currentURI.spec))
- break;
-
- browser = null;
- }
- }
- catch (ex) {}
-
- // If none found, open a new browser
- if (!browser)
- {
- browser = window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", documentURI);
- }
- else
- {
- try {
- browser.BrowserReloadSkipCache();
- browser.focus();
- } catch (ex) {}
- }
- }
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsSendPageCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() &&
- (DocumentHasBeenSaved() || IsDocumentModified()));
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Don't continue if user canceled during prompt for saving
- // DocumentHasBeenSaved will test if we have a URL and suppress "Don't Save" button if not
- if (!CheckAndSaveDocument("cmd_editSendPage", DocumentHasBeenSaved()))
- return;
-
- // Check if we saved again just in case?
- if (DocumentHasBeenSaved())
- {
- // Launch Messenger Composer window with current page as contents
- try
- {
- openComposeWindow(GetDocumentUrl(), GetDocumentTitle());
- } catch (ex) { dump("Cannot Send Page: " + ex + "\n"); }
- }
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsPrintCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true; // we can always do this
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // In editor.js
- SetEditMode(gPreviousNonSourceDisplayMode);
- try {
- let browser = GetCurrentEditorElement();
- PrintUtils.printWindow(browser.outerWindowID, browser);
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsPrintPreviewCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true; // we can always do this
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // In editor.js
- SetEditMode(gPreviousNonSourceDisplayMode);
- try {
- PrintUtils.printPreview(PrintPreviewListener);
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsPrintSetupCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true; // we can always do this
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // In editor.js
- SetEditMode(gPreviousNonSourceDisplayMode);
- PrintUtils.showPageSetup();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsFindReplaceCommand =
-{
- isCommandEnabled: function(aCommand, editorElement)
- {
- return editorElement.getEditor(editorElement.contentWindow) != null;
- },
-
- getCommandStateParams: function(aCommand, aParams, editorElement) {},
- doCommandParams: function(aCommand, aParams, editorElement) {},
-
- doCommand: function(aCommand, editorElement)
- {
- window.openDialog("chrome://editor/content/EdReplace.xul", "_blank",
- "chrome,modal,titlebar", editorElement);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsFindCommand =
-{
- isCommandEnabled: function(aCommand, editorElement)
- {
- return editorElement.getEditor(editorElement.contentWindow) != null;
- },
-
- getCommandStateParams: function(aCommand, aParams, editorElement) {},
- doCommandParams: function(aCommand, aParams, editorElement) {},
-
- doCommand: function(aCommand, editorElement)
- {
- document.getElementById("FindToolbar").onFindCommand();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsFindAgainCommand =
-{
- isCommandEnabled: function(aCommand, editorElement)
- {
- // we can only do this if the search pattern is non-empty. Not sure how
- // to get that from here
- return editorElement.getEditor(editorElement.contentWindow) != null;
- },
-
- getCommandStateParams: function(aCommand, aParams, editorElement) {},
- doCommandParams: function(aCommand, aParams, editorElement) {},
-
- doCommand: function(aCommand, editorElement)
- {
- let findPrev = (aCommand == "cmd_findPrev");
- document.getElementById("FindToolbar").onFindAgainCommand(findPrev);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsRewrapCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && !IsInHTMLSourceMode() &&
- GetCurrentEditor() instanceof Components.interfaces.nsIEditorMailSupport);
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- GetCurrentEditor().QueryInterface(Components.interfaces.nsIEditorMailSupport).rewrap(false);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsSpellingCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() &&
- !IsInHTMLSourceMode() && IsSpellCheckerInstalled());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.cancelSendMessage = false;
- try {
- var skipBlockQuotes = (window.document.documentElement.getAttribute("windowtype") == "msgcompose");
- window.openDialog("chrome://editor/content/EdSpellCheck.xul", "_blank",
- "dialog,close,titlebar,modal,resizable", false, skipBlockQuotes, true);
- }
- catch(ex) {}
- }
-};
-
-// Validate using http://validator.w3.org/file-upload.html
-var URL2Validate;
-var nsValidateCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return GetCurrentEditor() != null;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // If the document hasn't been modified,
- // then just validate the current url.
- if (IsDocumentModified() || IsHTMLSourceChanged())
- {
- if (!CheckAndSaveDocument("cmd_validate", false))
- return;
-
- // Check if we saved again just in case?
- if (!DocumentHasBeenSaved()) // user hit cancel?
- return;
- }
-
- URL2Validate = GetDocumentUrl();
- // See if it's a file:
- var ifile;
- try {
- var fileHandler = GetFileProtocolHandler();
- ifile = fileHandler.getFileFromURLSpec(URL2Validate);
- // nsIFile throws an exception if it's not a file url
- } catch (e) { ifile = null; }
- if (ifile)
- {
- URL2Validate = ifile.path;
- var vwin = window.open("http://validator.w3.org/file-upload.html",
- "EditorValidate");
- // Window loads asynchronously, so pass control to the load listener:
- vwin.addEventListener("load", this.validateFilePageLoaded, false);
- }
- else
- {
- var vwin2 = window.open("http://validator.w3.org/check?uri="
- + URL2Validate
- + "&doctype=Inline",
- "EditorValidate");
- // This does the validation, no need to wait for page loaded.
- }
- },
- validateFilePageLoaded: function(event)
- {
- event.target.forms[0].uploaded_file.value = URL2Validate;
- }
-};
-
-var nsCheckLinksCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdLinkChecker.xul","_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsFormCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdFormProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInputTagCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdInputProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInputImageCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdInputImage.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsTextAreaCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdTextAreaProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsSelectCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdSelectProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsButtonCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdButtonProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsLabelCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var tagName = "label";
- try {
- var editor = GetCurrentEditor();
- // Find selected label or if start/end of selection is in label
- var labelElement = editor.getSelectedElement(tagName);
- if (!labelElement)
- labelElement = editor.getElementOrParentByTagName(tagName, editor.selection.anchorNode);
- if (!labelElement)
- labelElement = editor.getElementOrParentByTagName(tagName, editor.selection.focusNode);
- if (labelElement) {
- // We only open the dialog for an existing label
- window.openDialog("chrome://editor/content/EdLabelProps.xul", "_blank", "chrome,close,titlebar,modal", labelElement);
- } else {
- EditorSetTextProperty(tagName, "", "");
- }
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsFieldSetCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdFieldSetProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsIsIndexCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- var editor = GetCurrentEditor();
- var isindexElement = editor.createElementWithDefaults("isindex");
- isindexElement.setAttribute("prompt", editor.outputToString("text/plain", kOutputSelectionOnly));
- editor.insertElementAtSelection(isindexElement, true);
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsImageCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdImageProps.xul","_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsHLineCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Inserting an HLine is different in that we don't use properties dialog
- // unless we are editing an existing line's attributes
- // We get the last-used attributes from the prefs and insert immediately
-
- var tagName = "hr";
- var editor = GetCurrentEditor();
-
- var hLine;
- try {
- hLine = editor.getSelectedElement(tagName);
- } catch (e) {return;}
-
- if (hLine)
- {
- // We only open the dialog for an existing HRule
- window.openDialog("chrome://editor/content/EdHLineProps.xul", "_blank", "chrome,close,titlebar,modal");
- }
- else
- {
- try {
- hLine = editor.createElementWithDefaults(tagName);
-
- // We change the default attributes to those saved in the user prefs
- let align = Services.prefs.getIntPref("editor.hrule.align");
- if (align == 0)
- editor.setAttributeOrEquivalent(hLine, "align", "left", true);
- else if (align == 2)
- editor.setAttributeOrEquivalent(hLine, "align", "right", true);
-
- //Note: Default is center (don't write attribute)
-
- let width = Services.prefs.getIntPref("editor.hrule.width");
- if (Services.prefs.getBoolPref("editor.hrule.width_percent"))
- width = width +"%";
-
- editor.setAttributeOrEquivalent(hLine, "width", width, true);
-
- let height = Services.prefs.getIntPref("editor.hrule.height");
- editor.setAttributeOrEquivalent(hLine, "size", String(height), true);
-
- if (Services.prefs.getBoolPref("editor.hrule.shading"))
- hLine.removeAttribute("noshade");
- else
- hLine.setAttribute("noshade", "noshade");
-
- editor.insertElementAtSelection(hLine, true);
-
- } catch (e) {}
- }
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsLinkCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // If selected element is an image, launch that dialog instead
- // since last tab panel handles link around an image
- var element = GetObjectForProperties();
- if (element && element.nodeName.toLowerCase() == "img")
- window.openDialog("chrome://editor/content/EdImageProps.xul","_blank", "chrome,close,titlebar,modal", null, true);
- else
- window.openDialog("chrome://editor/content/EdLinkProps.xul","_blank", "chrome,close,titlebar,modal");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsAnchorCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdNamedAnchorProps.xul", "_blank", "chrome,close,titlebar,modal", "");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertHTMLWithDialogCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdInsSrc.xul","_blank", "chrome,close,titlebar,modal,resizable", "");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertMathWithDialogCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdInsertMath.xul", "_blank", "chrome,close,titlebar,modal,resizable", "");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertCharsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- EditorFindOrCreateInsertCharWindow();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertBreakCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentEditor().insertHTML("<br>");
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertBreakAllCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentEditor().insertHTML("<br clear='all'>");
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsGridCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdSnapToGrid.xul","_blank", "chrome,close,titlebar,modal");
- }
-};
-
-
-//-----------------------------------------------------------------------------------
-var nsListPropertiesCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdListProps.xul","_blank", "chrome,close,titlebar,modal");
- }
-};
-
-
-//-----------------------------------------------------------------------------------
-var nsPagePropertiesCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var oldTitle = GetDocumentTitle();
- window.openDialog("chrome://editor/content/EdPageProps.xul","_blank", "chrome,close,titlebar,modal", "");
-
- // Update main window title and
- // recent menu data in prefs if doc title changed
- if (GetDocumentTitle() != oldTitle)
- UpdateWindowTitle();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsObjectPropertiesCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- var isEnabled = false;
- if (IsDocumentEditable() && IsEditingRenderedHTML())
- {
- isEnabled = (GetObjectForProperties() != null ||
- GetCurrentEditor().getSelectedElement("href") != null);
- }
- return isEnabled;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Launch Object properties for appropriate selected element
- var element = GetObjectForProperties();
- if (element)
- {
- var name = element.nodeName.toLowerCase();
- switch (name)
- {
- case 'img':
- goDoCommand("cmd_image");
- break;
- case 'hr':
- goDoCommand("cmd_hline");
- break;
- case 'form':
- goDoCommand("cmd_form");
- break;
- case 'input':
- var type = element.getAttribute("type");
- if (type && type.toLowerCase() == "image")
- goDoCommand("cmd_inputimage");
- else
- goDoCommand("cmd_inputtag");
- break;
- case 'textarea':
- goDoCommand("cmd_textarea");
- break;
- case 'select':
- goDoCommand("cmd_select");
- break;
- case 'button':
- goDoCommand("cmd_button");
- break;
- case 'label':
- goDoCommand("cmd_label");
- break;
- case 'fieldset':
- goDoCommand("cmd_fieldset");
- break;
- case 'table':
- EditorInsertOrEditTable(false);
- break;
- case 'td':
- case 'th':
- EditorTableCellProperties();
- break;
- case 'ol':
- case 'ul':
- case 'dl':
- case 'li':
- goDoCommand("cmd_listProperties");
- break;
- case 'a':
- if (element.name)
- {
- goDoCommand("cmd_anchor");
- }
- else if (element.href)
- {
- goDoCommand("cmd_link");
- }
- break;
- case 'math':
- goDoCommand("cmd_insertMathWithDialog");
- break;
- default:
- doAdvancedProperties(element);
- break;
- }
- } else {
- // We get a partially-selected link if asked for specifically
- try {
- element = GetCurrentEditor().getSelectedElement("href");
- } catch (e) {}
- if (element)
- goDoCommand("cmd_link");
- }
- }
-};
-
-
-//-----------------------------------------------------------------------------------
-var nsSetSmiley =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon)
- {
- var smileyCode = aParams.getStringValue("state_attribute");
-
- var strSml;
- switch(smileyCode)
- {
- case ":-)": strSml="s1";
- break;
- case ":-(": strSml="s2";
- break;
- case ";-)": strSml="s3";
- break;
- case ":-P":
- case ":-p":
- case ":-b": strSml="s4";
- break;
- case ":-D": strSml="s5";
- break;
- case ":-[": strSml="s6";
- break;
- case ":-/":
- case ":/":
- case ":-\\":
- case ":\\": strSml="s7";
- break;
- case "=-O":
- case "=-o": strSml="s8";
- break;
- case ":-*": strSml="s9";
- break;
- case ">:o":
- case ">:-o": strSml="s10";
- break;
- case "8-)": strSml="s11";
- break;
- case ":-$": strSml="s12";
- break;
- case ":-!": strSml="s13";
- break;
- case "O:-)":
- case "o:-)": strSml="s14";
- break;
- case ":'(": strSml="s15";
- break;
- case ":-X":
- case ":-x": strSml="s16";
- break;
- default: strSml="";
- break;
- }
-
- try
- {
- var editor = GetCurrentEditor();
- var selection = editor.selection;
- var extElement = editor.createElementWithDefaults("span");
- extElement.setAttribute("class", "moz-smiley-" + strSml);
-
- var intElement = editor.createElementWithDefaults("span");
- if (!intElement)
- return;
-
- var txtElement = editor.document.createTextNode(smileyCode);
- if (!txtElement)
- return;
-
- intElement.appendChild (txtElement);
- extElement.appendChild (intElement);
-
-
- editor.insertElementAtSelection(extElement,true);
- window.content.focus();
-
- }
- catch (e)
- {
- dump("Exception occured in smiley InsertElementAtSelection\n");
- }
- },
- // This is now deprecated in favor of "doCommandParams"
- doCommand: function(aCommand) {}
-};
-
-
-function doAdvancedProperties(element)
-{
- if (element)
- {
- window.openDialog("chrome://editor/content/EdAdvancedEdit.xul", "_blank", "chrome,close,titlebar,modal,resizable=yes", "", element);
- }
-}
-
-var nsAdvancedPropertiesCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Launch AdvancedEdit dialog for the selected element
- try {
- var element = GetCurrentEditor().getSelectedElement("");
- doAdvancedProperties(element);
- } catch (e) {}
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsColorPropertiesCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- window.openDialog("chrome://editor/content/EdColorProps.xul","_blank", "chrome,close,titlebar,modal", "");
- UpdateDefaultColors();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsIncreaseFontCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- if (!(IsDocumentEditable() && IsEditingRenderedHTML()))
- return false;
- var setIndex = getFontSizeIndex();
- return (setIndex >= 0 && setIndex < 5);
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var setIndex = getFontSizeIndex();
- if (setIndex < 0 || setIndex >= 5)
- return;
- var sizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large' ];
- EditorSetFontSize(sizes[setIndex+1]);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsDecreaseFontCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- if (!(IsDocumentEditable() && IsEditingRenderedHTML()))
- return false;
- var setIndex = getFontSizeIndex();
- return (setIndex > 0);
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var setIndex = getFontSizeIndex();
- if (setIndex <= 0)
- return;
- var sizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large' ];
- EditorSetFontSize(sizes[setIndex-1]);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsRemoveNamedAnchorsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- // We could see if there's any link in selection, but it doesn't seem worth the work!
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- EditorRemoveTextProperty("name", "");
- window.content.focus();
- }
-};
-
-
-//-----------------------------------------------------------------------------------
-var nsEditLinkCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- // Not really used -- this command is only in context menu, and we do enabling there
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- var element = GetCurrentEditor().getSelectedElement("href");
- if (element)
- editPage(element.href);
- } catch (e) {}
- window.content.focus();
- }
-};
-
-
-//-----------------------------------------------------------------------------------
-var nsNormalModeCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsHTMLEditor() && IsDocumentEditable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- SetEditMode(kDisplayModeNormal);
- }
-};
-
-var nsAllTagsModeCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsHTMLEditor());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- SetEditMode(kDisplayModeAllTags);
- }
-};
-
-var nsHTMLSourceModeCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsHTMLEditor());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- SetEditMode(kDisplayModeSource);
- }
-};
-
-var nsPreviewModeCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsHTMLEditor());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- SetEditMode(kDisplayModePreview);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertOrEditTableCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return (IsDocumentEditable() && IsEditingRenderedHTML());
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- if (IsInTableCell())
- EditorTableCellProperties();
- else
- EditorInsertOrEditTable(true);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsEditTableCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- EditorInsertOrEditTable(false);
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsSelectTableCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().selectTable();
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsSelectTableRowCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().selectTableRow();
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsSelectTableColumnCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().selectTableColumn();
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsSelectTableCellCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().selectTableCell();
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsSelectAllTableCellsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().selectAllTableCells();
- } catch(e) {}
- window.content.focus();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsInsertTableCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsDocumentEditable() && IsEditingRenderedHTML();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- EditorInsertTable();
- }
-};
-
-var nsInsertTableRowAboveCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().insertTableRow(1, false);
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsInsertTableRowBelowCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().insertTableRow(1, true);
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsInsertTableColumnBeforeCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().insertTableColumn(1, false);
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsInsertTableColumnAfterCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().insertTableColumn(1, true);
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsInsertTableCellBeforeCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().insertTableCell(1, false);
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsInsertTableCellAfterCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().insertTableCell(1, true);
- } catch(e) {}
- window.content.focus();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsDeleteTableCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().deleteTable();
- } catch(e) {}
- window.content.focus();
- }
-};
-
-var nsDeleteTableRowCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var rows = GetNumberOfContiguousSelectedRows();
- // Delete at least one row
- if (rows == 0)
- rows = 1;
-
- try {
- var editor = GetCurrentTableEditor();
- editor.beginTransaction();
-
- // Loop to delete all blocks of contiguous, selected rows
- while (rows)
- {
- editor.deleteTableRow(rows);
- rows = GetNumberOfContiguousSelectedRows();
- }
- } finally { editor.endTransaction(); }
- window.content.focus();
- }
-};
-
-var nsDeleteTableColumnCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- var columns = GetNumberOfContiguousSelectedColumns();
- // Delete at least one column
- if (columns == 0)
- columns = 1;
-
- try {
- var editor = GetCurrentTableEditor();
- editor.beginTransaction();
-
- // Loop to delete all blocks of contiguous, selected columns
- while (columns)
- {
- editor.deleteTableColumn(columns);
- columns = GetNumberOfContiguousSelectedColumns();
- }
- } finally { editor.endTransaction(); }
- window.content.focus();
- }
-};
-
-var nsDeleteTableCellCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().deleteTableCell(1);
- } catch (e) {}
- window.content.focus();
- }
-};
-
-var nsDeleteTableCellContentsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTableCell();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().deleteTableCellContents();
- } catch (e) {}
- window.content.focus();
- }
-};
-
-
-//-----------------------------------------------------------------------------------
-var nsNormalizeTableCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Use nullptr to let editor find table enclosing current selection
- try {
- GetCurrentTableEditor().normalizeTable(null);
- } catch (e) {}
- window.content.focus();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsJoinTableCellsCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- if (IsDocumentEditable() && IsEditingRenderedHTML())
- {
- try {
- var editor = GetCurrentTableEditor();
- var tagNameObj = { value: "" };
- var countObj = { value: 0 };
- var cell = editor.getSelectedOrParentTableElement(tagNameObj, countObj);
-
- // We need a cell and either > 1 selected cell or a cell to the right
- // (this cell may originate in a row spanned from above current row)
- // Note that editor returns "td" for "th" also.
- // (this is a pain! Editor and gecko use lowercase tagNames, JS uses uppercase!)
- if (cell && (tagNameObj.value == "td"))
- {
- // Selected cells
- if (countObj.value > 1) return true;
-
- var colSpan = cell.getAttribute("colspan");
-
- // getAttribute returns string, we need number
- // no attribute means colspan = 1
- if (!colSpan)
- colSpan = Number(1);
- else
- colSpan = Number(colSpan);
-
- var rowObj = { value: 0 };
- var colObj = { value: 0 };
- editor.getCellIndexes(cell, rowObj, colObj);
-
- // Test if cell exists to the right of current cell
- // (cells with 0 span should never have cells to the right
- // if there is, user can select the 2 cells to join them)
- return (colSpan && editor.getCellAt(null, rowObj.value,
- colObj.value + colSpan));
- }
- } catch (e) {}
- }
- return false;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // Param: Don't merge non-contiguous cells
- try {
- GetCurrentTableEditor().joinTableCells(false);
- } catch (e) {}
- window.content.focus();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsSplitTableCellCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- if (IsDocumentEditable() && IsEditingRenderedHTML())
- {
- var tagNameObj = { value: "" };
- var countObj = { value: 0 };
- var cell;
- try {
- cell = GetCurrentTableEditor().getSelectedOrParentTableElement(tagNameObj, countObj);
- } catch (e) {}
-
- // We need a cell parent and there's just 1 selected cell
- // or selection is entirely inside 1 cell
- if ( cell && (tagNameObj.value == "td") &&
- countObj.value <= 1 &&
- IsSelectionInOneCell() )
- {
- var colSpan = cell.getAttribute("colspan");
- var rowSpan = cell.getAttribute("rowspan");
- if (!colSpan) colSpan = 1;
- if (!rowSpan) rowSpan = 1;
- return (colSpan > 1 || rowSpan > 1 ||
- colSpan == 0 || rowSpan == 0);
- }
- }
- return false;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- try {
- GetCurrentTableEditor().splitTableCell();
- } catch (e) {}
- window.content.focus();
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsTableOrCellColorCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return IsInTable();
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- EditorSelectColor("TableOrCell");
- }
-};
-
-//-----------------------------------------------------------------------------------
-var nsPreferencesCommand =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- goPreferences('composer_pane');
- }
-};
-
-
-var nsFinishHTMLSource =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // In editor.js
- SetEditMode(gPreviousNonSourceDisplayMode);
- }
-};
-
-var nsCancelHTMLSource =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- return true;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- // In editor.js
- CancelHTMLSource();
- }
-};
-
-var nsConvertToTable =
-{
- isCommandEnabled: function(aCommand, dummy)
- {
- if (IsDocumentEditable() && IsEditingRenderedHTML())
- {
- var selection;
- try {
- selection = GetCurrentEditor().selection;
- } catch (e) {}
-
- if (selection && !selection.isCollapsed)
- {
- // Don't allow if table or cell is the selection
- var element;
- try {
- element = GetCurrentEditor().getSelectedElement("");
- } catch (e) {}
- if (element)
- {
- var name = element.nodeName.toLowerCase();
- if (name == "td" ||
- name == "th" ||
- name == "caption" ||
- name == "table")
- return false;
- }
-
- // Selection start and end must be in the same cell
- // in same cell or both are NOT in a cell
- if ( GetParentTableCell(selection.focusNode) !=
- GetParentTableCell(selection.anchorNode) )
- return false
-
- return true;
- }
- }
- return false;
- },
-
- getCommandStateParams: function(aCommand, aParams, aRefCon) {},
- doCommandParams: function(aCommand, aParams, aRefCon) {},
-
- doCommand: function(aCommand)
- {
- if (this.isCommandEnabled())
- {
- window.openDialog("chrome://editor/content/EdConvertToTable.xul","_blank", "chrome,close,titlebar,modal")
- }
- }
-};
-
diff --git a/editor/ui/composer/content/EditorContent.css b/editor/ui/composer/content/EditorContent.css
deleted file mode 100644
index 941b6ad03..000000000
--- a/editor/ui/composer/content/EditorContent.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Styles to alter look of things in the Editor content window
- * for the "Normal Edit Mode" These settings will be removed
- * when we display in completely WYSIWYG "Edit Preview" mode
- * Anything that should never change, like cursors, should be
- * place in EditorOverride.css, instead of here.
-*/
-
-@import url(chrome://communicator/skin/smileys.css);
-
-a[name] {
- min-height: 17px; margin-left: 2px; margin-top: 2px;
- padding-left: 20px;
- background-image: url(chrome://editor/content/images/tag-anchor.gif);
- background-repeat: no-repeat;
- background-position: top left;
-}
-
-/* Force border display for empty cells
- and tables with 0 border
-*/
-table {
- empty-cells: show;
-}
-
-/* give a red dotted border to tables and cells with no border
- otherwise they are invisible
-*/
-table[empty-cells],
- table[border="0"],
- /* next two selectors on line below for the case where tbody is omitted */
- table[border="0"] > tr > td, table[border="0"] > tr > th,
- table[border="0"] > thead > tr > td, table[border="0"] > tbody > tr > td, table[border="0"] > tfoot > tr > td,
- table[border="0"] > thead > tr > th, table[border="0"] > tbody > tr > th, table[border="0"] > tfoot > tr > th,
- table:not([border]),
- /* next two selectors on line below for the case where tbody is omitted */
- table:not([border]) > tr > td, table:not([border]) > tr > th,
- table:not([border]) > thead > tr > td, table:not([border]) > tbody > tr > td, table:not([border]) > tfoot > tr > td,
- table:not([border]) > thead > tr > th, table:not([border]) > tbody > tr > th, table:not([border]) > tfoot > tr > th
-{
- border: 1px dotted red;
-}
-
-/* give a green dashed border to forms otherwise they are invisible
-*/
-form
-{
- border: 2px dashed green;
-}
-/* give a green dotted border to labels otherwise they are invisible
-*/
-label
-{
- border: 1px dotted green;
-}
-
-img {
- -moz-force-broken-image-icon: 1;
-}
diff --git a/editor/ui/composer/content/editor.js b/editor/ui/composer/content/editor.js
deleted file mode 100644
index 8209abdd6..000000000
--- a/editor/ui/composer/content/editor.js
+++ /dev/null
@@ -1,3226 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource:///modules/editorUtilities.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-
-/* Main Composer window UI control */
-
-var gComposerWindowControllerID = 0;
-var prefAuthorString = "";
-
-var kDisplayModeNormal = 0;
-var kDisplayModeAllTags = 1;
-var kDisplayModeSource = 2;
-var kDisplayModePreview = 3;
-
-const kDisplayModeMenuIDs = ["viewNormalMode", "viewAllTagsMode", "viewSourceMode", "viewPreviewMode"];
-const kDisplayModeTabIDS = ["NormalModeButton", "TagModeButton", "SourceModeButton", "PreviewModeButton"];
-const kNormalStyleSheet = "chrome://editor/content/EditorContent.css";
-const kAllTagsStyleSheet = "chrome://editor/content/EditorAllTags.css";
-const kContentEditableStyleSheet = "resource://gre/res/contenteditable.css";
-
-var kTextMimeType = "text/plain";
-var kHTMLMimeType = "text/html";
-var kXHTMLMimeType = "application/xhtml+xml";
-
-var gPreviousNonSourceDisplayMode = 1;
-var gEditorDisplayMode = -1;
-var gDocWasModified = false; // Check if clean document, if clean then unload when user "Opens"
-var gContentWindow = 0;
-var gSourceContentWindow = 0;
-var gSourceTextEditor = null;
-var gContentWindowDeck;
-var gFormatToolbar;
-var gFormatToolbarHidden = false;
-var gViewFormatToolbar;
-var gChromeState;
-var gColorObj = { LastTextColor:"", LastBackgroundColor:"", LastHighlightColor:"",
- Type:"", SelectedType:"", NoDefault:false, Cancel:false,
- HighlightColor:"", BackgroundColor:"", PageColor:"",
- TextColor:"", TableColor:"", CellColor:""
- };
-var gDefaultTextColor = "";
-var gDefaultBackgroundColor = "";
-var gCSSPrefListener;
-var gEditorToolbarPrefListener;
-var gReturnInParagraphPrefListener;
-var gLocalFonts = null;
-
-var gLastFocusNode = null;
-var gLastFocusNodeWasSelected = false;
-
-// These must be kept in synch with the XUL <options> lists
-var gFontSizeNames = ["xx-small","x-small","small","medium","large","x-large","xx-large"];
-
-var nsIFilePicker = Components.interfaces.nsIFilePicker;
-
-var kEditorToolbarPrefs = "editor.toolbars.showbutton.";
-var kUseCssPref = "editor.use_css";
-var kCRInParagraphsPref = "editor.CR_creates_new_p";
-
-function ShowHideToolbarSeparators(toolbar) {
- // Make sure the toolbar actually exists.
- if (!toolbar)
- return;
- var childNodes = toolbar.childNodes;
- var separator = null;
- var hideSeparator = true;
- for (var i = 0; childNodes[i].localName != "spacer"; i++) {
- if (childNodes[i].localName == "toolbarseparator") {
- if (separator)
- separator.hidden = true;
- separator = childNodes[i];
- } else if (!childNodes[i].hidden) {
- if (separator)
- separator.hidden = hideSeparator;
- separator = null;
- hideSeparator = false;
- }
- }
-}
-
-function ShowHideToolbarButtons()
-{
- let array = Services.prefs.getChildList(kEditorToolbarPrefs);
- for (let i in array) {
- let prefName = array[i];
- let id = prefName.substr(kEditorToolbarPrefs.length);
- let button = document.getElementById(id + "Button") ||
- document.getElementById(id + "-button");
- if (button)
- button.hidden = !Services.prefs.getBoolPref(prefName);
- }
- ShowHideToolbarSeparators(document.getElementById("EditToolbar"));
- ShowHideToolbarSeparators(document.getElementById("FormatToolbar"));
-}
-
-function nsPrefListener(prefName)
-{
- this.startup(prefName);
-}
-
-// implements nsIObserver
-nsPrefListener.prototype =
-{
- domain: "",
- startup: function(prefName)
- {
- this.domain = prefName;
- try {
- Services.prefs.addObserver(this.domain, this, false);
- } catch(ex) {
- dump("Failed to observe prefs: " + ex + "\n");
- }
- },
- shutdown: function()
- {
- try {
- Services.prefs.removeObserver(this.domain, this);
- } catch(ex) {
- dump("Failed to remove pref observers: " + ex + "\n");
- }
- },
- observe: function(subject, topic, prefName)
- {
- if (!IsHTMLEditor())
- return;
- // verify that we're changing a button pref
- if (topic != "nsPref:changed")
- return;
-
- let editor = GetCurrentEditor();
- if (prefName == kUseCssPref)
- {
- let cmd = document.getElementById("cmd_highlight");
- if (cmd) {
- let useCSS = Services.prefs.getBoolPref(prefName);
-
- if (useCSS && editor) {
- let mixedObj = {};
- let state = editor.getHighlightColorState(mixedObj);
- cmd.setAttribute("state", state);
- cmd.collapsed = false;
- }
- else {
- cmd.setAttribute("state", "transparent");
- cmd.collapsed = true;
- }
-
- if (editor)
- editor.isCSSEnabled = useCSS;
- }
- }
- else if (prefName.startsWith(kEditorToolbarPrefs))
- {
- let id = prefName.substr(kEditorToolbarPrefs.length) + "Button";
- let button = document.getElementById(id);
- if (button) {
- button.hidden = !Services.prefs.getBoolPref(prefName);
- ShowHideToolbarSeparators(button.parentNode);
- }
- }
- else if (editor && (prefName == kCRInParagraphsPref))
- editor.returnInParagraphCreatesNewParagraph = Services.prefs.getBoolPref(prefName);
- }
-}
-
-const gSourceTextListener =
-{
- NotifyDocumentCreated: function NotifyDocumentCreated() {},
- NotifyDocumentWillBeDestroyed: function NotifyDocumentWillBeDestroyed() {},
- NotifyDocumentStateChanged: function NotifyDocumentStateChanged(isChanged)
- {
- window.updateCommands("save");
- }
-};
-
-const gSourceTextObserver =
-{
- observe: function observe(aSubject, aTopic, aData)
- {
- // we currently only use this to update undo
- window.updateCommands("undo");
- }
-};
-
-// This should be called by all editor users when they close their window.
-function EditorCleanup()
-{
- SwitchInsertCharToAnotherEditorOrClose();
-}
-
-var DocumentReloadListener =
-{
- NotifyDocumentCreated: function() {},
- NotifyDocumentWillBeDestroyed: function() {},
-
- NotifyDocumentStateChanged:function( isNowDirty )
- {
- var editor = GetCurrentEditor();
- try {
- // unregister the listener to prevent multiple callbacks
- editor.removeDocumentStateListener( DocumentReloadListener );
-
- var charset = editor.documentCharacterSet;
-
- // update the META charset with the current presentation charset
- editor.documentCharacterSet = charset;
-
- } catch (e) {}
- }
-};
-
-// implements nsIObserver
-var gEditorDocumentObserver =
-{
- observe: function(aSubject, aTopic, aData)
- {
- // Should we allow this even if NOT the focused editor?
- var commandManager = GetCurrentCommandManager();
- if (commandManager != aSubject)
- return;
-
- var editor = GetCurrentEditor();
- switch(aTopic)
- {
- case "obs_documentCreated":
- // Just for convenience
- gContentWindow = window.content;
-
- // Get state to see if document creation succeeded
- var params = newCommandParams();
- if (!params)
- return;
-
- try {
- commandManager.getCommandState(aTopic, gContentWindow, params);
- var errorStringId = 0;
- var editorStatus = params.getLongValue("state_data");
- if (!editor && editorStatus == nsIEditingSession.eEditorOK)
- {
- dump("\n ****** NO EDITOR BUT NO EDITOR ERROR REPORTED ******* \n\n");
- editorStatus = nsIEditingSession.eEditorErrorUnknown;
- }
-
- switch (editorStatus)
- {
- case nsIEditingSession.eEditorErrorCantEditFramesets:
- errorStringId = "CantEditFramesetMsg";
- break;
- case nsIEditingSession.eEditorErrorCantEditMimeType:
- errorStringId = "CantEditMimeTypeMsg";
- break;
- case nsIEditingSession.eEditorErrorUnknown:
- errorStringId = "CantEditDocumentMsg";
- break;
- // Note that for "eEditorErrorFileNotFound,
- // network code popped up an alert dialog, so we don't need to
- }
- if (errorStringId)
- Services.prompt.alert(window, "", GetString(errorStringId));
- } catch(e) { dump("EXCEPTION GETTING obs_documentCreated state "+e+"\n"); }
-
- // We have a bad editor -- nsIEditingSession will rebuild an editor
- // with a blank page, so simply abort here
- if (editorStatus)
- return;
-
- if (!("InsertCharWindow" in window))
- window.InsertCharWindow = null;
-
- try {
- editor.QueryInterface(nsIEditorStyleSheets);
-
- // and extra styles for showing anchors, table borders, smileys, etc
- editor.addOverrideStyleSheet(kNormalStyleSheet);
-
- // remove contenteditable stylesheets if they were applied by the
- // editingSession
- editor.removeOverrideStyleSheet(kContentEditableStyleSheet);
- } catch (e) {}
-
- // Things for just the Web Composer application
- if (IsWebComposer())
- {
- InlineSpellCheckerUI.init(editor);
- document.getElementById('menu_inlineSpellCheck').setAttribute('disabled', !InlineSpellCheckerUI.canSpellCheck);
-
- editor.returnInParagraphCreatesNewParagraph = Services.prefs.getBoolPref(kCRInParagraphsPref);
-
- // Set focus to content window if not a mail composer
- // Race conditions prevent us from setting focus here
- // when loading a url into blank window
- setTimeout(SetFocusOnStartup, 0);
-
- // Call EditorSetDefaultPrefsAndDoctype first so it gets the default author before initing toolbars
- editor.enableUndo(false);
- EditorSetDefaultPrefsAndDoctype();
- editor.resetModificationCount();
- editor.enableUndo(true);
-
- // We may load a text document into an html editor,
- // so be sure editortype is set correctly
- // XXX We really should use the "real" plaintext editor for this!
- if (editor.contentsMIMEType == "text/plain")
- {
- try {
- GetCurrentEditorElement().editortype = "text";
- } catch (e) { dump (e)+"\n"; }
-
- // Hide or disable UI not used for plaintext editing
- HideItem("FormatToolbar");
- HideItem("EditModeToolbar");
- HideItem("formatMenu");
- HideItem("tableMenu");
- HideItem("menu_validate");
- HideItem("sep_validate");
- HideItem("previewButton");
- HideItem("imageButton");
- HideItem("linkButton");
- HideItem("namedAnchorButton");
- HideItem("hlineButton");
- HideItem("tableButton");
-
- HideItem("fileExportToText");
- HideItem("previewInBrowser");
-
-/* XXX When paste actually converts formatted rich text to pretty formatted plain text
- and pasteNoFormatting is fixed to paste the text without formatting (what paste
- currently does), then this item shouldn't be hidden: */
- HideItem("menu_pasteNoFormatting");
-
- HideItem("cmd_viewFormatToolbar");
- HideItem("cmd_viewEditModeToolbar");
-
- HideItem("viewSep1");
- HideItem("viewNormalMode");
- HideItem("viewAllTagsMode");
- HideItem("viewSourceMode");
- HideItem("viewPreviewMode");
-
- HideItem("structSpacer");
-
- // Hide everything in "Insert" except for "Symbols"
- let menuPopupChildren = document.querySelectorAll('[id="insertMenuPopup"] > :not(#insertChars)');
- for (let i = 0; i < menuPopupChildren.length; i++)
- menuPopupChildren.item(i).hidden = true;
- }
-
- // Set window title
- UpdateWindowTitle();
-
- // We must wait until document is created to get proper Url
- // (Windows may load with local file paths)
- SetSaveAndPublishUI(GetDocumentUrl());
-
- // Start in "Normal" edit mode
- SetDisplayMode(kDisplayModeNormal);
- }
-
- // Add mouse click watcher if right type of editor
- if (IsHTMLEditor())
- {
- // Force color widgets to update
- onFontColorChange();
- onBackgroundColorChange();
- }
- break;
-
- case "cmd_setDocumentModified":
- window.updateCommands("save");
- break;
-
- case "obs_documentWillBeDestroyed":
- dump("obs_documentWillBeDestroyed notification\n");
- break;
-
- case "obs_documentLocationChanged":
- // Ignore this when editor doesn't exist,
- // which happens once when page load starts
- if (editor)
- try {
- editor.updateBaseURL();
- } catch(e) { dump (e); }
- break;
-
- case "cmd_bold":
- // Update all style items
- // cmd_bold is a proxy; see EditorSharedStartup (above) for details
- window.updateCommands("style");
- window.updateCommands("undo");
- break;
- }
- }
-}
-
-function SetFocusOnStartup()
-{
- gContentWindow.focus();
-}
-
-function EditorLoadUrl(url)
-{
- try {
- if (url)
- GetCurrentEditorElement().webNavigation.loadURI(url, // uri string
- Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE, // load flags
- null, // referrer
- null, // post-data stream
- null);
- } catch (e) { dump(" EditorLoadUrl failed: "+e+"\n"); }
-}
-
-// This should be called by all Composer types
-function EditorSharedStartup()
-{
- // Just for convenience
- gContentWindow = window.content;
-
- // Disable DNS Prefetching on the docshell - we don't need it for composer
- // type windows.
- GetCurrentEditorElement().docShell.allowDNSPrefetch = false;
-
- // Set up the mime type and register the commands.
- if (IsHTMLEditor())
- SetupHTMLEditorCommands();
- else
- SetupTextEditorCommands();
-
- // add observer to be called when document is really done loading
- // and is modified
- // Note: We're really screwed if we fail to install this observer!
- try {
- var commandManager = GetCurrentCommandManager();
- commandManager.addCommandObserver(gEditorDocumentObserver, "obs_documentCreated");
- commandManager.addCommandObserver(gEditorDocumentObserver, "cmd_setDocumentModified");
- commandManager.addCommandObserver(gEditorDocumentObserver, "obs_documentWillBeDestroyed");
- commandManager.addCommandObserver(gEditorDocumentObserver, "obs_documentLocationChanged");
-
- // Until nsIControllerCommandGroup-based code is implemented,
- // we will observe just the bold command to trigger update of
- // all toolbar style items
- commandManager.addCommandObserver(gEditorDocumentObserver, "cmd_bold");
- } catch (e) { dump(e); }
-
- var isMac = AppConstants.platform == "macosx";
-
- // Set platform-specific hints for how to select cells
- // Mac uses "Cmd", all others use "Ctrl"
- var tableKey = GetString(isMac ? "XulKeyMac" : "TableSelectKey");
- var dragStr = tableKey+GetString("Drag");
- var clickStr = tableKey+GetString("Click");
-
- var delStr = GetString(isMac ? "Clear" : "Del");
-
- SafeSetAttribute("menu_SelectCell", "acceltext", clickStr);
- SafeSetAttribute("menu_SelectRow", "acceltext", dragStr);
- SafeSetAttribute("menu_SelectColumn", "acceltext", dragStr);
- SafeSetAttribute("menu_SelectAllCells", "acceltext", dragStr);
- // And add "Del" or "Clear"
- SafeSetAttribute("menu_DeleteCellContents", "acceltext", delStr);
-
- // Set text for indent, outdent keybinding
-
- // hide UI that we don't have components for
- RemoveInapplicableUIElements();
-
- // Use browser colors as initial values for editor's default colors
- var BrowserColors = GetDefaultBrowserColors();
- if (BrowserColors)
- {
- gDefaultTextColor = BrowserColors.TextColor;
- gDefaultBackgroundColor = BrowserColors.BackgroundColor;
- }
-
- // For new window, no default last-picked colors
- gColorObj.LastTextColor = "";
- gColorObj.LastBackgroundColor = "";
- gColorObj.LastHighlightColor = "";
-}
-
-function SafeSetAttribute(nodeID, attributeName, attributeValue)
-{
- var theNode = document.getElementById(nodeID);
- if (theNode)
- theNode.setAttribute(attributeName, attributeValue);
-}
-
-function DocumentHasBeenSaved()
-{
- var fileurl = "";
- try {
- fileurl = GetDocumentUrl();
- } catch (e) {
- return false;
- }
-
- if (!fileurl || IsUrlAboutBlank(fileurl))
- return false;
-
- // We have a file URL already
- return true;
-}
-
-function CheckAndSaveDocument(command, allowDontSave)
-{
- var document;
- try {
- // if we don't have an editor or an document, bail
- var editor = GetCurrentEditor();
- document = editor.document;
- if (!document)
- return true;
- } catch (e) { return true; }
-
- if (!IsDocumentModified() && !IsHTMLSourceChanged())
- return true;
-
- // call window.focus, since we need to pop up a dialog
- // and therefore need to be visible (to prevent user confusion)
- top.document.commandDispatcher.focusedWindow.focus();
-
- var scheme = GetScheme(GetDocumentUrl());
- var doPublish = (scheme && scheme != "file");
-
- var strID;
- switch (command)
- {
- case "cmd_close":
- strID = "BeforeClosing";
- break;
- case "cmd_preview":
- strID = "BeforePreview";
- break;
- case "cmd_editSendPage":
- strID = "SendPageReason";
- break;
- case "cmd_validate":
- strID = "BeforeValidate";
- break;
- }
-
- var reasonToSave = strID ? GetString(strID) : "";
-
- var title = document.title || GetString("untitledDefaultFilename");
-
- var dialogTitle = GetString(doPublish ? "PublishPage" : "SaveDocument");
- var dialogMsg = GetString(doPublish ? "PublishPrompt" : "SaveFilePrompt");
- dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave);
-
- let result = {value:0};
- let promptFlags = Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1;
- let button1Title = null;
- let button3Title = null;
-
- if (doPublish)
- {
- promptFlags += Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0;
- button1Title = GetString("Publish");
- button3Title = GetString("DontPublish");
- }
- else
- {
- promptFlags += Services.prompt.BUTTON_TITLE_SAVE * Services.prompt.BUTTON_POS_0;
- }
-
- // If allowing "Don't..." button, add that
- if (allowDontSave)
- promptFlags += doPublish ?
- (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2)
- : (Services.prompt.BUTTON_TITLE_DONT_SAVE * Services.prompt.BUTTON_POS_2);
-
- result = Services.prompt.confirmEx(window, dialogTitle, dialogMsg, promptFlags,
- button1Title, null, button3Title, null, {value:0});
-
- if (result == 0)
- {
- // Save, but first finish HTML source mode
- SetEditMode(gPreviousNonSourceDisplayMode);
- if (doPublish)
- {
- // We save the command the user wanted to do in a global
- // and return as if user canceled because publishing is asynchronous
- // This command will be fired when publishing finishes
- gCommandAfterPublishing = command;
- goDoCommand("cmd_publish");
- return false;
- }
-
- // Save to local disk
- return SaveDocument(false, false, editor.contentsMIMEType);
- }
-
- if (result == 2) // "Don't Save"
- return true;
-
- // Default or result == 1 (Cancel)
- return false;
-}
-
-// --------------------------- View menu ---------------------------
-
-function EditorSetCharacterSet(aEvent)
-{
- try {
- var editor = GetCurrentEditor();
- if (aEvent.target.hasAttribute("charset"))
- editor.documentCharacterSet = aEvent.target.getAttribute("charset");
- var docUrl = GetDocumentUrl();
- if( !IsUrlAboutBlank(docUrl))
- {
- // reloading the document will reverse any changes to the META charset,
- // we need to put them back in, which is achieved by a dedicated listener
- editor.addDocumentStateListener( DocumentReloadListener );
- EditorLoadUrl(docUrl);
- }
- } catch (e) {}
-}
-
-// --------------------------- Text style ---------------------------
-
-function onParagraphFormatChange(paraMenuList, commandID)
-{
- if (!paraMenuList)
- return;
-
- var commandNode = document.getElementById(commandID);
- var state = commandNode.getAttribute("state");
-
- // force match with "normal"
- if (state == "body")
- state = "";
-
- if (state == "mixed")
- {
- //Selection is the "mixed" ( > 1 style) state
- paraMenuList.selectedItem = null;
- paraMenuList.setAttribute("label",GetString('Mixed'));
- }
- else
- {
- var menuPopup = document.getElementById("ParagraphPopup");
- var menuItems = menuPopup.childNodes;
- for (var i=0; i < menuItems.length; i++)
- {
- var menuItem = menuItems.item(i);
- if ("value" in menuItem && menuItem.value == state)
- {
- paraMenuList.selectedItem = menuItem;
- break;
- }
- }
- }
-}
-
-/**
- * Selects the current font face in the menulist.
- *
- * @param fontFaceMenuList The menulist element containing the list of fonts.
- * @param commandID The commandID which holds the current font name
- * in its "state" attribute.
- */
-function onFontFaceChange(fontFaceMenuList, commandID)
-{
- var commandNode = document.getElementById(commandID);
- var editorFont = commandNode.getAttribute("state");
-
- // Strip quotes in font names. Experiments have shown that we only
- // ever get double quotes around the font name, never single quotes,
- // even if they were in the HTML source. Also single or double
- // quotes within the font name are never returned.
- editorFont = editorFont.replace(/"/g, "");
-
- switch (editorFont) {
- case "mixed":
- // Selection is the "mixed" ( > 1 style) state.
- fontFaceMenuList.selectedItem = null;
- fontFaceMenuList.setAttribute("label",GetString('Mixed'));
- return;
- case "":
- case "serif":
- case "sans-serif":
- // Generic variable width.
- fontFaceMenuList.selectedIndex = 0;
- return;
- case "tt":
- case "monospace":
- // Generic fixed width.
- fontFaceMenuList.selectedIndex = 1;
- return;
- default:
- }
-
- let menuPopup = fontFaceMenuList.menupopup;
- let menuItems = menuPopup.childNodes;
-
- const genericFamilies = [ "serif", "sans-serif", "monospace", "fantasy", "cursive" ];
- // Bug 1139524: Normalise before we compare: Make it lower case
- // and replace ", " with "," so that entries like
- // "Helvetica, Arial, sans-serif" are always recognised correctly
- let editorFontToLower = editorFont.toLowerCase().replace(/, /g, ",");
- let foundFont = null;
- let exactMatch = false;
- let usedFontsSep = menuPopup.querySelector("menuseparator.fontFaceMenuAfterUsedFonts");
- let editorFontOptions = editorFontToLower.split(",");
- let editorOptionsCount = editorFontOptions.length;
- let matchedFontIndex = editorOptionsCount; // initialise to high invalid value
-
- // The font menu has this structure:
- // 0: Variable Width
- // 1: Fixed Width
- // 2: Separator
- // 3: Helvetica, Arial (stored as Helvetica, Arial, sans-serif)
- // 4: Times (stored as Times New Roman, Times, serif)
- // 5: Courier (stored as Courier New, Courier, monospace)
- // 6: Separator, "menuseparator.fontFaceMenuAfterDefaultFonts"
- // from 7: Used Font Section (for quick selection)
- // followed by separator, "menuseparator.fontFaceMenuAfterUsedFonts"
- // followed by all other available fonts.
- // The following variable keeps track of where we are when we loop over the menu.
- let afterUsedFontSection = false;
-
- // The menu items not only have "label" and "value", but also some other attributes:
- // "value_parsed": Is the toLowerCase() and space-stripped value.
- // "value_cache": Is a concatenation of all editor fonts that were ever mapped
- // onto this menu item. This is done for optimization.
- // "used": This item is in the used font section.
-
- for (let i = 0; i < menuItems.length; i++)
- {
- let menuItem = menuItems.item(i);
- if (menuItem.hasAttribute("label") && menuItem.hasAttribute("value_parsed"))
- {
- // The element seems to represent a font <menuitem>.
- let fontMenuValue = menuItem.getAttribute("value_parsed");
- if (fontMenuValue == editorFontToLower ||
- (menuItem.hasAttribute("value_cache") &&
- menuItem.getAttribute("value_cache").split("|").includes(editorFontToLower)))
- {
- // This menuitem contains the font we are looking for.
- foundFont = menuItem;
- exactMatch = true;
- break;
- }
- else if (editorOptionsCount > 1 && afterUsedFontSection)
- {
- // Once we are in the list of all other available fonts,
- // we will find the one that best matches one of the options.
- let matchPos = editorFontOptions.indexOf(fontMenuValue);
- if (matchPos >= 0 && matchPos < matchedFontIndex)
- {
- // This menu font comes earlier in the list of options,
- // so prefer it.
- matchedFontIndex = matchPos;
- foundFont = menuItem;
- // If we matched the first option, we don't need to look for
- // a better match.
- if (matchPos == 0)
- break;
- }
- }
- }
- else
- {
- // Some other element type.
- if (menuItem == usedFontsSep)
- {
- // We have now passed the section of used fonts and are now in the list of all.
- afterUsedFontSection = true;
- }
- }
- }
-
- if (foundFont)
- {
- let defaultFontsSep = menuPopup.querySelector("menuseparator.fontFaceMenuAfterDefaultFonts");
- if (exactMatch)
- {
- if (afterUsedFontSection)
- {
- // Copy the matched font into the section of used fonts.
- // We insert after the separator following the default fonts,
- // so right at the beginning of the used fonts section.
- let copyItem = foundFont.cloneNode(true);
- menuPopup.insertBefore(copyItem, defaultFontsSep.nextSibling);
- usedFontsSep.hidden = false;
- foundFont = copyItem;
- foundFont.setAttribute("used", "true");
- }
- }
- else
- {
- // Keep only the found font and generic families in the font string.
- editorFont = editorFont.replace(/, /g, ",").split(",").filter(
- font => ((font.toLowerCase() == foundFont.getAttribute("value_parsed")) ||
- genericFamilies.includes(font))).join(",");
-
- // Check if such an item is already in the used font section.
- if (afterUsedFontSection)
- foundFont = menuPopup.querySelector('menuitem[used="true"][value_parsed="'+
- editorFont.toLowerCase()+'"]');
- // If not, create a new entry which will be inserted into that section.
- if (!foundFont)
- foundFont = createFontFaceMenuitem(editorFont, editorFont, menuPopup);
-
- // Add the editor font string into the 'cache' attribute in the element
- // so we can later find it quickly without building the reduced string again.
- let fontCache = "";
- if (foundFont.hasAttribute("value_cache"))
- fontCache = foundFont.getAttribute("value_cache");
- foundFont.setAttribute("value_cache", fontCache + "|" + editorFontToLower);
-
- // If we created a new item, set it up and insert.
- if (!foundFont.hasAttribute("used")) {
- foundFont.setAttribute("used", "true");
- usedFontsSep.hidden = false;
- menuPopup.insertBefore(foundFont, defaultFontsSep.nextSibling);
- }
- }
- }
- else
- {
- // The editor encountered a font that is not installed on this system.
- // Add it to the font menu now, in the used-fonts section right at the
- // bottom before the separator of the section.
- let fontLabel = GetFormattedString("NotInstalled", editorFont);
- foundFont = createFontFaceMenuitem(fontLabel, editorFont, menuPopup);
- foundFont.setAttribute("used", "true");
- usedFontsSep.hidden = false;
- menuPopup.insertBefore(foundFont, usedFontsSep);
- }
- fontFaceMenuList.selectedItem = foundFont;
-}
-
-/**
- * Clears the used fonts list from all the font face menulists.
- */
-function ClearUsedFonts()
-{
- let userFontSeps = document.querySelectorAll("menuseparator.fontFaceMenuAfterDefaultFonts");
- for (let userFontSep of userFontSeps) {
- let parentList = userFontSep.parentNode;
- while (true) {
- let nextNode = userFontSep.nextSibling;
- if (nextNode.tagName != "menuseparator") {
- nextNode.remove();
- } else {
- if (nextNode.classList.contains("fontFaceMenuAfterUsedFonts")) {
- nextNode.hidden = true;
- break;
- }
- }
- }
- }
-}
-
-function EditorSelectFontSize()
-{
- var select = document.getElementById("FontSizeSelect");
- if (select)
- {
- if (select.selectedIndex == -1)
- return;
-
- EditorSetFontSize(gFontSizeNames[select.selectedIndex]);
- }
-}
-
-function onFontSizeChange(fontSizeMenulist, commandID)
-{
- // If we don't match anything, set to "0 (normal)"
- var newIndex = 2;
- var size = fontSizeMenulist.getAttribute("size");
- if ( size == "mixed")
- {
- // No single type selected
- newIndex = -1;
- }
- else
- {
- for (var i = 0; i < gFontSizeNames.length; i++)
- {
- if( gFontSizeNames[i] == size )
- {
- newIndex = i;
- break;
- }
- }
- }
- if (fontSizeMenulist.selectedIndex != newIndex)
- fontSizeMenulist.selectedIndex = newIndex;
-}
-
-function EditorSetFontSize(size)
-{
- if( size == "0" || size == "normal" ||
- size == "medium" )
- {
- EditorRemoveTextProperty("font", "size");
- // Also remove big and small,
- // else it will seem like size isn't changing correctly
- EditorRemoveTextProperty("small", "");
- EditorRemoveTextProperty("big", "");
- } else {
- // Temp: convert from new CSS size strings to old HTML size strings
- switch (size)
- {
- case "xx-small":
- case "x-small":
- size = "-2";
- break;
- case "small":
- size = "-1";
- break;
- case "large":
- size = "+1";
- break;
- case "x-large":
- size = "+2";
- break;
- case "xx-large":
- size = "+3";
- break;
- }
- EditorSetTextProperty("font", "size", size);
- }
- gContentWindow.focus();
-}
-
-function initFontFaceMenu(menuPopup)
-{
- initLocalFontFaceMenu(menuPopup);
-
- if (menuPopup)
- {
- var children = menuPopup.childNodes;
- if (!children) return;
-
- var mixed = { value: false };
- var editorFont = GetCurrentEditor().getFontFaceState(mixed);
-
- // Strip quotes in font names. Experiments have shown that we only
- // ever get double quotes around the font name, never single quotes,
- // even if they were in the HTML source. Also single or double
- // quotes within the font name are never returned.
- editorFont = editorFont.replace(/"/g, "");
-
- if (!mixed.value)
- {
- switch (editorFont)
- {
- case "":
- case "serif":
- case "sans-serif":
- // Generic variable width.
- editorFont = "";
- break;
- case "tt":
- case "monospace":
- // Generic fixed width.
- editorFont = "tt";
- break;
- default:
- editorFont = editorFont.toLowerCase().replace(/, /g, ","); // bug 1139524
- }
- }
-
- var editorFontOptions = editorFont.split(',');
- var matchedOption = editorFontOptions.length; // initialise to high invalid value
- for (var i = 0; i < children.length; i++)
- {
- var menuItem = children[i];
- if (menuItem.localName == "menuitem")
- {
- var matchFound = false;
- if (!mixed.value)
- {
- var menuFont = menuItem.getAttribute("value").toLowerCase().replace(/, /g, ",");
-
- // First compare the entire font string to match items that contain commas.
- if (menuFont == editorFont)
- {
- menuItem.setAttribute("checked", "true");
- break;
- }
-
- // Next compare the individual options.
- else if (editorFontOptions.length > 1)
- {
- var matchPos = editorFontOptions.indexOf(menuFont);
- if (matchPos >= 0 && matchPos < matchedOption) {
- // This menu font comes earlier in the list of options,
- // so prefer it.
- menuItem.setAttribute("checked", "true");
-
- // If we matched the first option, we don't need to look for
- // a better match.
- if (matchPos == 0)
- break;
-
- matchedOption = matchPos;
- matchFound = true;
- }
- }
- }
-
- // In case this item doesn't match, make sure we've cleared the checkmark.
- if (!matchFound)
- menuItem.removeAttribute("checked");
- }
- }
- }
-}
-
-// Number of fixed font face menuitems, these are:
-// Variable Width
-// Fixed Width
-// ==separator
-// Helvetica, Arial
-// Times
-// Courier
-// ==separator
-// ==separator
-const kFixedFontFaceMenuItems = 8;
-
-function initLocalFontFaceMenu(menuPopup)
-{
- if (!gLocalFonts)
- {
- // Build list of all local fonts once per editor
- try
- {
- var enumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
- .getService(Components.interfaces.nsIFontEnumerator);
- var localFontCount = { value: 0 }
- gLocalFonts = enumerator.EnumerateAllFonts(localFontCount);
- }
- catch(e) { }
- }
-
- // Don't use radios for menulists.
- let useRadioMenuitems = (menuPopup.parentNode.localName == "menu");
- menuPopup.setAttribute("useRadios", useRadioMenuitems);
- if (menuPopup.childNodes.length == kFixedFontFaceMenuItems)
- {
- if (gLocalFonts.length == 0) {
- menuPopup.querySelector(".fontFaceMenuAfterDefaultFonts").hidden = true;
- }
- for (let i = 0; i < gLocalFonts.length; ++i)
- {
- // Remove Linux system generic fonts that collide with CSS generic fonts.
- if (gLocalFonts[i] != "" &&
- gLocalFonts[i] != "serif" &&
- gLocalFonts[i] != "sans-serif" &&
- gLocalFonts[i] != "monospace")
- {
- let itemNode = createFontFaceMenuitem(gLocalFonts[i], gLocalFonts[i], menuPopup);
- menuPopup.appendChild(itemNode);
- }
- }
- }
-}
-
-/**
- * Creates a menuitem element for the font faces menulist. Returns the menuitem
- * but does not add it automatically to the menupopup.
- *
- * @param aFontLabel Label to be displayed for the item.
- * @param aFontName The font face value to be used for the item.
- * Will be used in <font face="value"> in the edited document.
- * @param aMenuPopup The menupopup for which this menuitem is created.
- */
-function createFontFaceMenuitem(aFontLabel, aFontName, aMenuPopup)
-{
- let itemNode = document.createElementNS(XUL_NS, "menuitem");
- itemNode.setAttribute("label", aFontLabel);
- itemNode.setAttribute("value", aFontName);
- itemNode.setAttribute("value_parsed", aFontName.toLowerCase().replace(/, /g, ","));
- itemNode.setAttribute("tooltiptext", aFontLabel);
- if (aMenuPopup.getAttribute("useRadios") == "true") {
- itemNode.setAttribute("type", "radio");
- itemNode.setAttribute("observes", "cmd_renderedHTMLEnabler");
- }
- return itemNode;
-}
-
-/**
- * Helper function
- */
-function getFontSizeIndex()
-{
- var firstHas = { value: false };
- var anyHas = { value: false };
- var allHas = { value: false };
-
- var fontSize = EditorGetTextProperty("font", "size", null, firstHas, anyHas, allHas);
-
- // If the element has no size attribute and no size was found at all,
- // we assume "medium" size. This is highly problematic since
- // CSS sizes are not recognised and will show as "medium" as well.
- // Currently we can't distinguish between "no attribute" which
- // can imply "medium" and "CSS attribute present" which should not
- // imply "medium".
- if (!anyHas.value)
- return 2;
-
- // Mixed selection.
- if (!allHas.value)
- return -1;
-
- switch (fontSize)
- {
- case "-3":
- case "-2":
- case "0":
- case "1":
- // x-small.
- return 0;
- case "-1":
- case "2":
- // small.
- return 1;
- case "3":
- // medium.
- return 2;
- case "+1":
- case "4":
- // large.
- return 3;
- case "+2":
- case "5":
- // x-large.
- return 4;
- case "+3":
- case "+4":
- case "6":
- case "7":
- // xx-large.
- return 5;
- }
-
- // We shouldn't get here. All the selection has a value we don't understand.
- return -1;
-}
-
-function initFontSizeMenu(menuPopup, fullMenu)
-{
- if (menuPopup)
- {
- var children = menuPopup.childNodes;
- if (!children)
- return;
-
- // Fixed size items start after menu separator depending on whether it is
- // a full menu.
- var menuIndex = fullMenu ? 3 : 0;
-
- var setIndex = getFontSizeIndex();
- if (setIndex >= 0)
- {
- children[menuIndex + setIndex].setAttribute("checked", true);
- }
- else
- {
- // In case of mixed, clear all items.
- for (var i = menuIndex; i < children.length; i++) {
- children[i].setAttribute("checked", false);
- }
- }
-
- // Some configurations might not have the "small/big" indicator as
- // last item. If there is no indicator, we are done.
- if (!menuPopup.lastChild.id.includes("smallBigInfo"))
- return;
-
- // While it would be better to show the number of levels,
- // at least this tells user if either of them are set.
- var firstHas = { value: false };
- var anyHas = { value: false };
- var allHas = { value: false };
-
- // Show "small"/"big" indicator.
- var htmlInfo = "";
- EditorGetTextProperty("small", "", "", firstHas, anyHas, allHas);
- if (anyHas.value)
- htmlInfo = "<small>";
- EditorGetTextProperty("big", "", "", firstHas, anyHas, allHas);
- if (anyHas.value)
- htmlInfo += "<big>";
-
- if (htmlInfo)
- {
- menuPopup.lastChild.hidden = false;
- menuPopup.lastChild.setAttribute("label", "HTML: " + htmlInfo);
- menuPopup.lastChild.setAttribute("checked", true);
- }
- else
- {
- menuPopup.lastChild.hidden = true;
- }
- }
-}
-
-function onHighlightColorChange()
-{
- ChangeButtonColor("cmd_highlight", "HighlightColorButton",
- "transparent");
-}
-
-function onFontColorChange()
-{
- ChangeButtonColor("cmd_fontColor", "TextColorButton",
- gDefaultTextColor);
-}
-
-function onBackgroundColorChange()
-{
- ChangeButtonColor("cmd_backgroundColor", "BackgroundColorButton",
- gDefaultBackgroundColor);
-}
-
-/* Helper function that changes the button color.
- * commandID - The ID of the command element.
- * id - The ID of the button needing to be changed.
- * defaultColor - The default color the button gets set to.
- */
-function ChangeButtonColor(commandID, id, defaultColor) {
- var commandNode = document.getElementById(commandID);
- if (commandNode)
- {
- var color = commandNode.getAttribute("state");
- var button = document.getElementById(id);
- if (button)
- {
- button.setAttribute("color", color);
-
- // No color or a mixed color - get color set on page or other defaults.
- if (!color || color == "mixed")
- color = defaultColor;
-
- button.setAttribute("style", "background-color:" + color + " !important");
- }
- }
-}
-
-// Call this when user changes text and/or background colors of the page
-function UpdateDefaultColors()
-{
- var BrowserColors = GetDefaultBrowserColors();
- var bodyelement = GetBodyElement();
- var defTextColor = gDefaultTextColor;
- var defBackColor = gDefaultBackgroundColor;
-
- if (bodyelement)
- {
- var color = bodyelement.getAttribute("text");
- if (color)
- gDefaultTextColor = color;
- else if (BrowserColors)
- gDefaultTextColor = BrowserColors.TextColor;
-
- color = bodyelement.getAttribute("bgcolor");
- if (color)
- gDefaultBackgroundColor = color;
- else if (BrowserColors)
- gDefaultBackgroundColor = BrowserColors.BackgroundColor;
- }
-
- // Trigger update on toolbar
- if (defTextColor != gDefaultTextColor)
- {
- goUpdateCommandState("cmd_fontColor");
- onFontColorChange();
- }
- if (defBackColor != gDefaultBackgroundColor)
- {
- goUpdateCommandState("cmd_backgroundColor");
- onBackgroundColorChange();
- }
-}
-
-function GetBackgroundElementWithColor()
-{
- var editor = GetCurrentTableEditor();
- if (!editor)
- return null;
-
- gColorObj.Type = "";
- gColorObj.PageColor = "";
- gColorObj.TableColor = "";
- gColorObj.CellColor = "";
- gColorObj.BackgroundColor = "";
- gColorObj.SelectedType = "";
-
- var tagNameObj = { value: "" };
- var element;
- try {
- element = editor.getSelectedOrParentTableElement(tagNameObj, {value:0});
- }
- catch(e) {}
-
- if (element && tagNameObj && tagNameObj.value)
- {
- gColorObj.BackgroundColor = GetHTMLOrCSSStyleValue(element, "bgcolor", "background-color");
- gColorObj.BackgroundColor = ConvertRGBColorIntoHEXColor(gColorObj.BackgroundColor);
- if (tagNameObj.value.toLowerCase() == "td")
- {
- gColorObj.Type = "Cell";
- gColorObj.CellColor = gColorObj.BackgroundColor;
-
- // Get any color that might be on parent table
- var table = GetParentTable(element);
- gColorObj.TableColor = GetHTMLOrCSSStyleValue(table, "bgcolor", "background-color");
- gColorObj.TableColor = ConvertRGBColorIntoHEXColor(gColorObj.TableColor);
- }
- else
- {
- gColorObj.Type = "Table";
- gColorObj.TableColor = gColorObj.BackgroundColor;
- }
- gColorObj.SelectedType = gColorObj.Type;
- }
- else
- {
- let IsCSSPrefChecked = Services.prefs.getBoolPref(kUseCssPref);
- if (IsCSSPrefChecked && IsHTMLEditor())
- {
- let selection = editor.selection;
- if (selection)
- {
- element = selection.focusNode;
- while (!editor.nodeIsBlock(element))
- element = element.parentNode;
- }
- else
- {
- element = GetBodyElement();
- }
- }
- else
- {
- element = GetBodyElement();
- }
- if (element)
- {
- gColorObj.Type = "Page";
- gColorObj.BackgroundColor = GetHTMLOrCSSStyleValue(element, "bgcolor", "background-color");
- if (gColorObj.BackgroundColor == "")
- {
- gColorObj.BackgroundColor = "transparent";
- }
- else
- {
- gColorObj.BackgroundColor = ConvertRGBColorIntoHEXColor(gColorObj.BackgroundColor);
- }
- gColorObj.PageColor = gColorObj.BackgroundColor;
- }
- }
- return element;
-}
-
-function SetSmiley(smileyText)
-{
- try {
- GetCurrentEditor().insertText(smileyText);
- gContentWindow.focus();
- }
- catch(e) {}
-}
-
-function EditorSelectColor(colorType, mouseEvent)
-{
- var editor = GetCurrentEditor();
- if (!editor || !gColorObj)
- return;
-
- // Shift + mouse click automatically applies last color, if available
- var useLastColor = mouseEvent ? ( mouseEvent.button == 0 && mouseEvent.shiftKey ) : false;
- var element;
- var table;
- var currentColor = "";
- var commandNode;
-
- if (!colorType)
- colorType = "";
-
- if (colorType == "Text")
- {
- gColorObj.Type = colorType;
-
- // Get color from command node state
- commandNode = document.getElementById("cmd_fontColor");
- currentColor = commandNode.getAttribute("state");
- currentColor = ConvertRGBColorIntoHEXColor(currentColor);
- gColorObj.TextColor = currentColor;
-
- if (useLastColor && gColorObj.LastTextColor )
- gColorObj.TextColor = gColorObj.LastTextColor;
- else
- useLastColor = false;
- }
- else if (colorType == "Highlight")
- {
- gColorObj.Type = colorType;
-
- // Get color from command node state
- commandNode = document.getElementById("cmd_highlight");
- currentColor = commandNode.getAttribute("state");
- currentColor = ConvertRGBColorIntoHEXColor(currentColor);
- gColorObj.HighlightColor = currentColor;
-
- if (useLastColor && gColorObj.LastHighlightColor )
- gColorObj.HighlightColor = gColorObj.LastHighlightColor;
- else
- useLastColor = false;
- }
- else
- {
- element = GetBackgroundElementWithColor();
- if (!element)
- return;
-
- // Get the table if we found a cell
- if (gColorObj.Type == "Table")
- table = element;
- else if (gColorObj.Type == "Cell")
- table = GetParentTable(element);
-
- // Save to avoid resetting if not necessary
- currentColor = gColorObj.BackgroundColor;
-
- if (colorType == "TableOrCell" || colorType == "Cell")
- {
- if (gColorObj.Type == "Cell")
- gColorObj.Type = colorType;
- else if (gColorObj.Type != "Table")
- return;
- }
- else if (colorType == "Table" && gColorObj.Type == "Page")
- return;
-
- if (colorType == "" && gColorObj.Type == "Cell")
- {
- // Using empty string for requested type means
- // we can let user select cell or table
- gColorObj.Type = "TableOrCell";
- }
-
- if (useLastColor && gColorObj.LastBackgroundColor )
- gColorObj.BackgroundColor = gColorObj.LastBackgroundColor;
- else
- useLastColor = false;
- }
- // Save the type we are really requesting
- colorType = gColorObj.Type;
-
- if (!useLastColor)
- {
- // Avoid the JS warning
- gColorObj.NoDefault = false;
-
- // Launch the ColorPicker dialog
- // TODO: Figure out how to position this under the color buttons on the toolbar
- window.openDialog("chrome://editor/content/EdColorPicker.xul", "_blank", "chrome,close,titlebar,modal", "", gColorObj);
-
- // User canceled the dialog
- if (gColorObj.Cancel)
- return;
- }
-
- if (gColorObj.Type == "Text")
- {
- if (currentColor != gColorObj.TextColor)
- {
- if (gColorObj.TextColor)
- EditorSetTextProperty("font", "color", gColorObj.TextColor);
- else
- EditorRemoveTextProperty("font", "color");
- }
- // Update the command state (this will trigger color button update)
- goUpdateCommandState("cmd_fontColor");
- }
- else if (gColorObj.Type == "Highlight")
- {
- if (currentColor != gColorObj.HighlightColor)
- {
- if (gColorObj.HighlightColor)
- EditorSetTextProperty("font", "bgcolor", gColorObj.HighlightColor);
- else
- EditorRemoveTextProperty("font", "bgcolor");
- }
- // Update the command state (this will trigger color button update)
- goUpdateCommandState("cmd_highlight");
- }
- else if (element)
- {
- if (gColorObj.Type == "Table")
- {
- // Set background on a table
- // Note that we shouldn't trust "currentColor" because of "TableOrCell" behavior
- if (table)
- {
- var bgcolor = table.getAttribute("bgcolor");
- if (bgcolor != gColorObj.BackgroundColor)
- try {
- if (gColorObj.BackgroundColor)
- editor.setAttributeOrEquivalent(table, "bgcolor", gColorObj.BackgroundColor, false);
- else
- editor.removeAttributeOrEquivalent(table, "bgcolor", false);
- } catch (e) {}
- }
- }
- else if (currentColor != gColorObj.BackgroundColor && IsHTMLEditor())
- {
- editor.beginTransaction();
- try
- {
- editor.setBackgroundColor(gColorObj.BackgroundColor);
-
- if (gColorObj.Type == "Page" && gColorObj.BackgroundColor)
- {
- // Set all page colors not explicitly set,
- // else you can end up with unreadable pages
- // because viewer's default colors may not be same as page author's
- var bodyelement = GetBodyElement();
- if (bodyelement)
- {
- var defColors = GetDefaultBrowserColors();
- if (defColors)
- {
- if (!bodyelement.getAttribute("text"))
- editor.setAttributeOrEquivalent(bodyelement, "text", defColors.TextColor, false);
-
- // The following attributes have no individual CSS declaration counterparts
- // Getting rid of them in favor of CSS implies CSS rules management
- if (!bodyelement.getAttribute("link"))
- editor.setAttribute(bodyelement, "link", defColors.LinkColor);
-
- if (!bodyelement.getAttribute("alink"))
- editor.setAttribute(bodyelement, "alink", defColors.ActiveLinkColor);
-
- if (!bodyelement.getAttribute("vlink"))
- editor.setAttribute(bodyelement, "vlink", defColors.VisitedLinkColor);
- }
- }
- }
- }
- catch(e) {}
-
- editor.endTransaction();
- }
-
- goUpdateCommandState("cmd_backgroundColor");
- }
- gContentWindow.focus();
-}
-
-function GetParentTable(element)
-{
- var node = element;
- while (node)
- {
- if (node.nodeName.toLowerCase() == "table")
- return node;
-
- node = node.parentNode;
- }
- return node;
-}
-
-function GetParentTableCell(element)
-{
- var node = element;
- while (node)
- {
- if (node.nodeName.toLowerCase() == "td" || node.nodeName.toLowerCase() == "th")
- return node;
-
- node = node.parentNode;
- }
- return node;
-}
-
-function EditorDblClick(event)
-{
- // We check event.explicitOriginalTarget here because .target will never
- // be a textnode (bug 193689)
- if (event.explicitOriginalTarget)
- {
- // Only bring up properties if clicked on an element or selected link
- var element;
- try {
- element = event.explicitOriginalTarget.QueryInterface(
- Components.interfaces.nsIDOMElement);
- } catch (e) {}
-
- // We use "href" instead of "a" to not be fooled by named anchor
- if (!element)
- try {
- element = GetCurrentEditor().getSelectedElement("href");
- } catch (e) {}
-
- // Don't fire for body/p and other block elements.
- // It's common that people try to double-click
- // to select a word, but the click hits an empty area.
- if (element &&
- !["body","p","h1","h2","h3","h4","h5","h6","blockquote","div","pre"]
- .includes(element.nodeName.toLowerCase()))
- {
- goDoCommand("cmd_objectProperties");
- event.preventDefault();
- }
- }
-}
-
-function EditorClick(event)
-{
- // For Web Composer: In Show All Tags Mode,
- // single click selects entire element,
- // except for body and table elements
- if (gEditorDisplayMode == kDisplayModeAllTags)
- {
- try
- {
- // We check event.explicitOriginalTarget here because .target will never
- // be a textnode (bug 193689)
- var element = event.explicitOriginalTarget.QueryInterface(
- Components.interfaces.nsIDOMElement);
- var name = element.localName;
- if (!["body", "caption", "table", "td", "th", "tr"].includes(name))
- {
- GetCurrentEditor().selectElement(event.explicitOriginalTarget);
- event.preventDefault();
- }
- } catch (e) {}
- }
-}
-
-/*TODO: We need an oncreate hook to do enabling/disabling for the
- Format menu. There should be code like this for the
- object-specific "Properties" item
-*/
-// For property dialogs, we want the selected element,
-// but will accept a parent link, list, or table cell if inside one
-function GetObjectForProperties()
-{
- var editor = GetCurrentEditor();
- if (!editor || !IsHTMLEditor())
- return null;
-
- var element;
- try {
- element = editor.getSelectedElement("");
- } catch (e) {}
- if (element) {
- if (element.namespaceURI == "http://www.w3.org/1998/Math/MathML") {
- // If the object is a MathML element, we collapse the selection on it and
- // we return its <math> ancestor. Hence the math dialog will be used.
- GetCurrentEditor().selection.collapse(element, 0);
- } else
- return element;
- }
-
- // Find nearest parent of selection anchor node
- // that is a link, list, table cell, or table
-
- var anchorNode
- var node;
- try {
- anchorNode = editor.selection.anchorNode;
- if (anchorNode.firstChild)
- {
- // Start at actual selected node
- var offset = editor.selection.anchorOffset;
- // Note: If collapsed, offset points to element AFTER caret,
- // thus node may be null
- node = anchorNode.childNodes.item(offset);
- }
- if (!node)
- node = anchorNode;
- } catch (e) {}
-
- while (node)
- {
- if (node.nodeName)
- {
- var nodeName = node.nodeName.toLowerCase();
-
- // Done when we hit the body
- if (nodeName == "body") break;
-
- if ((nodeName == "a" && node.href) ||
- nodeName == "ol" || nodeName == "ul" || nodeName == "dl" ||
- nodeName == "td" || nodeName == "th" ||
- nodeName == "table" || nodeName == "math")
- {
- return node;
- }
- }
- node = node.parentNode;
- }
- return null;
-}
-
-function SetEditMode(mode)
-{
- if (!IsHTMLEditor())
- return;
-
- var bodyElement = GetBodyElement();
- if (!bodyElement)
- {
- dump("SetEditMode: We don't have a body node!\n");
- return;
- }
-
- // must have editor if here!
- var editor = GetCurrentEditor();
- var inlineSpellCheckItem = document.getElementById('menu_inlineSpellCheck');
-
- // Switch the UI mode before inserting contents
- // so user can't type in source window while new window is being filled
- var previousMode = gEditorDisplayMode;
- if (!SetDisplayMode(mode))
- return;
-
- if (mode == kDisplayModeSource)
- {
- // Display the DOCTYPE as a non-editable string above edit area
- var domdoc;
- try { domdoc = editor.document; } catch (e) { dump( e + "\n");}
- if (domdoc)
- {
- var doctypeNode = document.getElementById("doctype-text");
- var dt = domdoc.doctype;
- if (doctypeNode)
- {
- if (dt)
- {
- doctypeNode.collapsed = false;
- var doctypeText = "<!DOCTYPE " + domdoc.doctype.name;
- if (dt.publicId)
- doctypeText += " PUBLIC \"" + domdoc.doctype.publicId;
- if (dt.systemId)
- doctypeText += " \"" + dt.systemId;
- doctypeText += "\">"
- doctypeNode.setAttribute("value", doctypeText);
- }
- else
- doctypeNode.collapsed = true;
- }
- }
- // Get the entire document's source string
-
- var flags = (editor.documentCharacterSet == "ISO-8859-1")
- ? kOutputEncodeLatin1Entities
- : kOutputEncodeBasicEntities;
- try {
- let encodeEntity = Services.prefs.getCharPref("editor.encode_entity");
- switch (encodeEntity) {
- case "basic" : flags = kOutputEncodeBasicEntities; break;
- case "latin1" : flags = kOutputEncodeLatin1Entities; break;
- case "html" : flags = kOutputEncodeHTMLEntities; break;
- case "none" : flags = 0; break;
- }
- } catch (e) { }
-
- if (Services.prefs.getBoolPref("editor.prettyprint"))
- flags |= kOutputFormatted;
-
- flags |= kOutputLFLineBreak;
- var source = editor.outputToString(editor.contentsMIMEType, flags);
- var start = source.search(/<html/i);
- if (start == -1) start = 0;
- gSourceTextEditor.insertText(source.slice(start));
- gSourceTextEditor.resetModificationCount();
- gSourceTextEditor.addDocumentStateListener(gSourceTextListener);
- gSourceTextEditor.enableUndo(true);
- gSourceContentWindow.commandManager.addCommandObserver(gSourceTextObserver, "cmd_undo");
- gSourceContentWindow.contentWindow.focus();
- goDoCommand("cmd_moveTop");
- }
- else if (previousMode == kDisplayModeSource)
- {
- // Only rebuild document if a change was made in source window
- if (IsHTMLSourceChanged())
- {
- // Disable spell checking when rebuilding source
- InlineSpellCheckerUI.enabled = false;
- inlineSpellCheckItem.removeAttribute('checked');
-
- // Reduce the undo count so we don't use too much memory
- // during multiple uses of source window
- // (reinserting entire doc caches all nodes)
- try {
- editor.transactionManager.maxTransactionCount = 1;
- } catch (e) {}
-
- editor.beginTransaction();
- try {
- // We are coming from edit source mode,
- // so transfer that back into the document
- source = gSourceTextEditor.outputToString(kTextMimeType, kOutputLFLineBreak).trim();
- if (editor.contentsMIMEType != kXHTMLMimeType)
- editor.rebuildDocumentFromSource(source);
- else {
- var fragment = editor.document.createRange().createContextualFragment(source);
- editor.enableUndo(false);
- GetBodyElement().remove();
- editor.document.replaceChild(fragment.firstChild, editor.document.documentElement);
- editor.enableUndo(true);
- }
-
- // Get the text for the <title> from the newly-parsed document
- // (must do this for proper conversion of "escaped" characters)
- let titleNode = editor.document.querySelector("title");
- SetDocumentTitle(titleNode ? titleNode.textContent : "");
-
- } catch (ex) {
- dump(ex);
- }
- editor.endTransaction();
-
- // Restore unlimited undo count
- try {
- editor.transactionManager.maxTransactionCount = -1;
- } catch (e) {}
- }
-
- // Clear out the string buffers
- gSourceContentWindow.commandManager.removeCommandObserver(gSourceTextObserver, "cmd_undo");
- gSourceTextEditor.removeDocumentStateListener(gSourceTextListener);
- gSourceTextEditor.enableUndo(false);
- gSourceTextEditor.selectAll();
- gSourceTextEditor.deleteSelection(gSourceTextEditor.eNone,
- gSourceTextEditor.eStrip);
- gSourceTextEditor.resetModificationCount();
-
- gContentWindow.focus();
- //goDoCommand("cmd_moveTop");
- }
-
- switch (mode) {
- case kDisplayModePreview:
- // Disable spell checking when previewing
- InlineSpellCheckerUI.enabled = false;
- inlineSpellCheckItem.removeAttribute('checked');
- // fall through
- case kDisplayModeSource:
- inlineSpellCheckItem.setAttribute('disabled', 'true');
- break;
- default:
- inlineSpellCheckItem.setAttribute('disabled', !InlineSpellCheckerUI.canSpellCheck);
- break;
- }
-}
-
-function CancelHTMLSource()
-{
- // Don't convert source text back into the DOM document
- gSourceTextEditor.resetModificationCount();
- SetDisplayMode(gPreviousNonSourceDisplayMode);
-}
-
-function SetDisplayMode(mode)
-{
- if (!IsHTMLEditor())
- return false;
-
- // Already in requested mode:
- // return false to indicate we didn't switch
- if (mode == gEditorDisplayMode)
- return false;
-
- var previousMode = gEditorDisplayMode;
- gEditorDisplayMode = mode;
-
- ResetStructToolbar();
- if (mode == kDisplayModeSource)
- {
- // Switch to the sourceWindow (second in the deck)
- gContentWindowDeck.selectedIndex = 1;
-
- //Hide the formatting toolbar if not already hidden
- gFormatToolbarHidden = gFormatToolbar.hidden;
- gFormatToolbar.hidden = true;
- gViewFormatToolbar.hidden = true;
-
- gSourceContentWindow.contentWindow.focus();
- }
- else
- {
- // Save the last non-source mode so we can cancel source editing easily
- gPreviousNonSourceDisplayMode = mode;
-
- // Load/unload appropriate override style sheet
- try {
- var editor = GetCurrentEditor();
- editor.QueryInterface(nsIEditorStyleSheets);
- editor instanceof Components.interfaces.nsIHTMLObjectResizer;
-
- switch (mode)
- {
- case kDisplayModePreview:
- // Disable all extra "edit mode" style sheets
- editor.enableStyleSheet(kNormalStyleSheet, false);
- editor.enableStyleSheet(kAllTagsStyleSheet, false);
- editor.objectResizingEnabled = true;
- break;
-
- case kDisplayModeNormal:
- editor.addOverrideStyleSheet(kNormalStyleSheet);
- // Disable ShowAllTags mode
- editor.enableStyleSheet(kAllTagsStyleSheet, false);
- editor.objectResizingEnabled = true;
- break;
-
- case kDisplayModeAllTags:
- editor.addOverrideStyleSheet(kNormalStyleSheet);
- editor.addOverrideStyleSheet(kAllTagsStyleSheet);
- // don't allow resizing in AllTags mode because the visible tags
- // change the computed size of images and tables...
- if (editor.resizedObject) {
- editor.hideResizers();
- }
- editor.objectResizingEnabled = false;
- break;
- }
- } catch(e) {}
-
- // Switch to the normal editor (first in the deck)
- gContentWindowDeck.selectedIndex = 0;
-
- // Restore menus and toolbars
- gFormatToolbar.hidden = gFormatToolbarHidden;
- gViewFormatToolbar.hidden = false;
-
- gContentWindow.focus();
- }
-
- // update commands to disable or re-enable stuff
- window.updateCommands("mode_switch");
-
- // Set the selected tab at bottom of window:
- // (Note: Setting "selectedIndex = mode" won't redraw tabs when menu is used.)
- document.getElementById("EditModeTabs").selectedItem = document.getElementById(kDisplayModeTabIDS[mode]);
-
- // Uncheck previous menuitem and set new check since toolbar may have been used
- if (previousMode >= 0)
- document.getElementById(kDisplayModeMenuIDs[previousMode]).setAttribute("checked","false");
- document.getElementById(kDisplayModeMenuIDs[mode]).setAttribute("checked","true");
-
-
- return true;
-}
-
-function UpdateWindowTitle()
-{
- try {
- var filename = "";
- var windowTitle = "";
- var title = GetDocumentTitle();
-
- // Append just the 'leaf' filename to the Doc. Title for the window caption
- var docUrl = GetDocumentUrl();
- if (docUrl && !IsUrlAboutBlank(docUrl))
- {
- var scheme = GetScheme(docUrl);
- filename = GetFilename(docUrl);
- if (filename)
- windowTitle = " [" + scheme + ":/.../" + filename + "]";
-
- var fileType = IsHTMLEditor() ? "html" : "text";
- // Save changed title in the recent pages data in prefs
- SaveRecentFilesPrefs(title, fileType);
- }
-
- // Set window title with " - Composer" or " - Text Editor" appended.
- var xulWin = document.documentElement;
-
- document.title = (title || filename || gUntitledString) +
- windowTitle +
- xulWin.getAttribute("titlemenuseparator") +
- xulWin.getAttribute("titlemodifier");
- } catch (e) { dump(e); }
-}
-
-function SaveRecentFilesPrefs(aTitle, aFileType)
-{
- var curUrl = StripPassword(GetDocumentUrl());
- var historyCount = Services.prefs.getIntPref("editor.history.url_maximum");
-
- var titleArray = [];
- var urlArray = [];
- var typeArray = [];
-
- if (historyCount && !IsUrlAboutBlank(curUrl) && GetScheme(curUrl) != "data")
- {
- titleArray.push(aTitle);
- urlArray.push(curUrl);
- typeArray.push(aFileType);
- }
-
- for (let i = 0; i < historyCount && urlArray.length < historyCount; i++)
- {
- let url = GetStringPref("editor.history_url_" + i);
-
- // Continue if URL pref is missing because
- // a URL not found during loading may have been removed
-
- // Skip over current an "data" URLs
- if (url && url != curUrl && GetScheme(url) != "data")
- {
- let title = GetStringPref("editor.history_title_" + i);
- let fileType = GetStringPref("editor.history_type_" + i);
- titleArray.push(title);
- urlArray.push(url);
- typeArray.push(fileType);
- }
- }
-
- // Resave the list back to prefs in the new order
- for (let i = 0; i < urlArray.length; i++)
- {
- SetStringPref("editor.history_title_" + i, titleArray[i]);
- SetStringPref("editor.history_url_" + i, urlArray[i]);
- SetStringPref("editor.history_type_" + i, typeArray[i]);
- }
-}
-
-function EditorInitFormatMenu()
-{
- try {
- InitObjectPropertiesMenuitem();
- InitRemoveStylesMenuitems("removeStylesMenuitem", "removeLinksMenuitem", "removeNamedAnchorsMenuitem");
- } catch(ex) {}
-}
-
-function InitObjectPropertiesMenuitem()
-{
- // Set strings and enable for the [Object] Properties item
- // Note that we directly do the enabling instead of
- // using goSetCommandEnabled since we already have the command.
- var cmd = document.getElementById("cmd_objectProperties");
- if (!cmd)
- return null;
-
- var element;
- var menuStr = GetString("AdvancedProperties");
- var name;
-
- if (IsEditingRenderedHTML())
- element = GetObjectForProperties();
-
- if (element && element.nodeName)
- {
- var objStr = "";
- cmd.removeAttribute("disabled");
- name = element.nodeName.toLowerCase();
- switch (name)
- {
- case "img":
- // Check if img is enclosed in link
- // (use "href" to not be fooled by named anchor)
- try
- {
- if (GetCurrentEditor().getElementOrParentByTagName("href", element))
- {
- objStr = GetString("ImageAndLink");
- // Return "href" so it is detected as a link.
- name = "href";
- }
- } catch(e) {}
-
- if (objStr == "")
- objStr = GetString("Image");
- break;
- case "hr":
- objStr = GetString("HLine");
- break;
- case "table":
- objStr = GetString("Table");
- break;
- case "th":
- name = "td";
- case "td":
- objStr = GetString("TableCell");
- break;
- case "ol":
- case "ul":
- case "dl":
- objStr = GetString("List");
- break;
- case "li":
- objStr = GetString("ListItem");
- break;
- case "form":
- objStr = GetString("Form");
- break;
- case "input":
- var type = element.getAttribute("type");
- if (type && type.toLowerCase() == "image")
- objStr = GetString("InputImage");
- else
- objStr = GetString("InputTag");
- break;
- case "textarea":
- objStr = GetString("TextArea");
- break;
- case "select":
- objStr = GetString("Select");
- break;
- case "button":
- objStr = GetString("Button");
- break;
- case "label":
- objStr = GetString("Label");
- break;
- case "fieldset":
- objStr = GetString("FieldSet");
- break;
- case "a":
- if (element.name)
- {
- objStr = GetString("NamedAnchor");
- name = "anchor";
- }
- else if(element.href)
- {
- objStr = GetString("Link");
- name = "href";
- }
- break;
- }
- if (objStr)
- menuStr = GetString("ObjectProperties").replace(/%obj%/,objStr);
- }
- else
- {
- // We show generic "Properties" string, but disable the command.
- cmd.setAttribute("disabled", "true");
- }
- cmd.setAttribute("label", menuStr);
- cmd.setAttribute("accesskey", GetString("ObjectPropertiesAccessKey"));
- return name;
-}
-
-function InitParagraphMenu()
-{
- var mixedObj = { value: null };
- var state;
- try {
- state = GetCurrentEditor().getParagraphState(mixedObj);
- }
- catch(e) {}
- var IDSuffix;
-
- // PROBLEM: When we get blockquote, it masks other styles contained by it
- // We need a separate method to get blockquote state
-
- // We use "x" as uninitialized paragraph state
- if (!state || state == "x")
- IDSuffix = "bodyText" // No paragraph container
- else
- IDSuffix = state;
-
- // Set "radio" check on one item, but...
- var menuItem = document.getElementById("menu_"+IDSuffix);
- menuItem.setAttribute("checked", "true");
-
- // ..."bodyText" is returned if mixed selection, so remove checkmark
- if (mixedObj.value)
- menuItem.setAttribute("checked", "false");
-}
-
-function GetListStateString()
-{
- try {
- var editor = GetCurrentEditor();
-
- var mixedObj = { value: null };
- var hasOL = { value: false };
- var hasUL = { value: false };
- var hasDL = { value: false };
- editor.getListState(mixedObj, hasOL, hasUL, hasDL);
-
- if (mixedObj.value)
- return "mixed";
- if (hasOL.value)
- return "ol";
- if (hasUL.value)
- return "ul";
-
- if (hasDL.value)
- {
- var hasLI = { value: false };
- var hasDT = { value: false };
- var hasDD = { value: false };
- editor.getListItemState(mixedObj, hasLI, hasDT, hasDD);
- if (mixedObj.value)
- return "mixed";
- if (hasLI.value)
- return "li";
- if (hasDT.value)
- return "dt";
- if (hasDD.value)
- return "dd";
- }
- } catch (e) {}
-
- // return "noList" if we aren't in a list at all
- return "noList";
-}
-
-function InitListMenu()
-{
- if (!IsHTMLEditor())
- return;
-
- var IDSuffix = GetListStateString();
-
- // Set enable state for the "None" menuitem
- goSetCommandEnabled("cmd_removeList", IDSuffix != "noList");
-
- // Set "radio" check on one item, but...
- // we won't find a match if it's "mixed"
- var menuItem = document.getElementById("menu_"+IDSuffix);
- if (menuItem)
- menuItem.setAttribute("checked", "true");
-}
-
-function GetAlignmentString()
-{
- var mixedObj = { value: null };
- var alignObj = { value: null };
- try {
- GetCurrentEditor().getAlignment(mixedObj, alignObj);
- } catch (e) {}
-
- if (mixedObj.value)
- return "mixed";
- if (alignObj.value == nsIHTMLEditor.eLeft)
- return "left";
- if (alignObj.value == nsIHTMLEditor.eCenter)
- return "center";
- if (alignObj.value == nsIHTMLEditor.eRight)
- return "right";
- if (alignObj.value == nsIHTMLEditor.eJustify)
- return "justify";
-
- // return "left" if we got here
- return "left";
-}
-
-function InitAlignMenu()
-{
- if (!IsHTMLEditor())
- return;
-
- var IDSuffix = GetAlignmentString();
-
- // we won't find a match if it's "mixed"
- var menuItem = document.getElementById("menu_"+IDSuffix);
- if (menuItem)
- menuItem.setAttribute("checked", "true");
-}
-
-function EditorSetDefaultPrefsAndDoctype()
-{
- var editor = GetCurrentEditor();
-
- var domdoc;
- try {
- domdoc = editor.document;
- } catch (e) { dump( e + "\n"); }
- if ( !domdoc )
- {
- dump("EditorSetDefaultPrefsAndDoctype: EDITOR DOCUMENT NOT FOUND\n");
- return;
- }
-
- // Insert a doctype element
- // if it is missing from existing doc
- if (!domdoc.doctype)
- {
- var newdoctype = domdoc.implementation.createDocumentType("HTML", "-//W3C//DTD HTML 4.01 Transitional//EN","");
- if (newdoctype)
- domdoc.insertBefore(newdoctype, domdoc.firstChild);
- }
-
- // search for head; we'll need this for meta tag additions
- let headelement = domdoc.querySelector("head");
- if (!headelement)
- {
- headelement = domdoc.createElement("head");
- if (headelement)
- domdoc.insertAfter(headelement, domdoc.firstChild);
- }
-
- /* only set default prefs for new documents */
- if (!IsUrlAboutBlank(GetDocumentUrl()))
- return;
-
- // search for author meta tag.
- // if one is found, don't do anything.
- // if not, create one and make it a child of the head tag
- // and set its content attribute to the value of the editor.author preference.
-
- if (domdoc.querySelector("meta"))
- {
- // we should do charset first since we need to have charset before
- // hitting other 8-bit char in other meta tags
- // grab charset pref and make it the default charset
- var element;
- var prefCharsetString = Services.prefs.getCharPref("intl.charset.fallback.override");
- if (prefCharsetString)
- editor.documentCharacterSet = prefCharsetString;
-
- // let's start by assuming we have an author in case we don't have the pref
-
- var prefAuthorString = null;
- let authorFound = domdoc.querySelector('meta[name="author"]');
- try
- {
- prefAuthorString = Services.prefs.getComplexValue("editor.author",
- Components.interfaces.nsISupportsString).data;
- }
- catch (ex) {}
- if (prefAuthorString && prefAuthorString != 0 && !authorFound && headelement)
- {
- // create meta tag with 2 attributes
- element = domdoc.createElement("meta");
- if (element)
- {
- element.setAttribute("name", "author");
- element.setAttribute("content", prefAuthorString);
- headelement.appendChild(element);
- }
- }
- }
-
- // add title tag if not present
- if (headelement && !editor.document.querySelector("title"))
- {
- var titleElement = domdoc.createElement("title");
- if (titleElement)
- headelement.appendChild(titleElement);
- }
-
- // find body node
- var bodyelement = GetBodyElement();
- if (bodyelement)
- {
- if (Services.prefs.getBoolPref("editor.use_custom_colors"))
- {
- let text_color = Services.prefs.getCharPref("editor.text_color");
- let background_color = Services.prefs.getCharPref("editor.background_color");
-
- // add the color attributes to the body tag.
- // and use them for the default text and background colors if not empty
- editor.setAttributeOrEquivalent(bodyelement, "text", text_color, true);
- gDefaultTextColor = text_color;
- editor.setAttributeOrEquivalent(bodyelement, "bgcolor", background_color, true);
- gDefaultBackgroundColor = background_color
- bodyelement.setAttribute("link", Services.prefs.getCharPref("editor.link_color"));
- bodyelement.setAttribute("alink", Services.prefs.getCharPref("editor.active_link_color"));
- bodyelement.setAttribute("vlink", Services.prefs.getCharPref("editor.followed_link_color"));
- }
- // Default image is independent of Custom colors???
- try {
- let background_image = Services.prefs.getCharPref("editor.default_background_image");
- if (background_image)
- editor.setAttributeOrEquivalent(bodyelement, "background", background_image, true);
- } catch (e) {dump("BACKGROUND EXCEPTION: "+e+"\n"); }
-
- }
- // auto-save???
-}
-
-function GetBodyElement()
-{
- try {
- return GetCurrentEditor().rootElement;
- }
- catch (ex) {
- dump("no body tag found?!\n");
- // better have one, how can we blow things up here?
- }
- return null;
-}
-
-// --------------------------- Logging stuff ---------------------------
-
-function EditorGetNodeFromOffsets(offsets)
-{
- var node = null;
- try {
- node = GetCurrentEditor().document;
-
- for (var i = 0; i < offsets.length; i++)
- node = node.childNodes[offsets[i]];
- } catch (e) {}
- return node;
-}
-
-function EditorSetSelectionFromOffsets(selRanges)
-{
- try {
- var editor = GetCurrentEditor();
- var selection = editor.selection;
- selection.removeAllRanges();
-
- var rangeArr, start, end, node, offset;
- for (var i = 0; i < selRanges.length; i++)
- {
- rangeArr = selRanges[i];
- start = rangeArr[0];
- end = rangeArr[1];
-
- var range = editor.document.createRange();
-
- node = EditorGetNodeFromOffsets(start[0]);
- offset = start[1];
-
- range.setStart(node, offset);
-
- node = EditorGetNodeFromOffsets(end[0]);
- offset = end[1];
-
- range.setEnd(node, offset);
-
- selection.addRange(range);
- }
- } catch (e) {}
-}
-
-//--------------------------------------------------------------------
-function initFontStyleMenu(menuPopup)
-{
- for (var i = 0; i < menuPopup.childNodes.length; i++)
- {
- var menuItem = menuPopup.childNodes[i];
- var theStyle = menuItem.getAttribute("state");
- if (theStyle)
- {
- menuItem.setAttribute("checked", theStyle);
- }
- }
-}
-
-//--------------------------------------------------------------------
-function onButtonUpdate(button, commmandID)
-{
- var commandNode = document.getElementById(commmandID);
- var state = commandNode.getAttribute("state");
- button.checked = state == "true";
-}
-
-//--------------------------------------------------------------------
-function onStateButtonUpdate(button, commmandID, onState)
-{
- var commandNode = document.getElementById(commmandID);
- var state = commandNode.getAttribute("state");
-
- button.checked = state == onState;
-}
-
-// --------------------------- Status calls ---------------------------
-function getColorAndSetColorWell(ColorPickerID, ColorWellID)
-{
- var colorWell;
- if (ColorWellID)
- colorWell = document.getElementById(ColorWellID);
-
- var colorPicker = document.getElementById(ColorPickerID);
- if (colorPicker)
- {
- // Extract color from colorPicker and assign to colorWell.
- var color = colorPicker.getAttribute("color");
-
- if (colorWell && color)
- {
- // Use setAttribute so colorwell can be a XUL element, such as button
- colorWell.setAttribute("style", "background-color: " + color);
- }
- }
- return color;
-}
-
-//-----------------------------------------------------------------------------------
-function IsSpellCheckerInstalled()
-{
- return "@mozilla.org/spellchecker;1" in Components.classes;
-}
-
-//-----------------------------------------------------------------------------------
-function IsFindInstalled()
-{
- return "@mozilla.org/embedcomp/rangefind;1" in Components.classes
- && "@mozilla.org/find/find_service;1" in Components.classes;
-}
-
-//-----------------------------------------------------------------------------------
-function RemoveInapplicableUIElements()
-{
- // For items that are in their own menu block, remove associated separator
- // (we can't use "hidden" since class="hide-in-IM" CSS rule interferes)
-
- // if no find, remove find ui
- if (!IsFindInstalled())
- {
- HideItem("menu_find");
- HideItem("menu_findnext");
- HideItem("menu_replace");
- HideItem("menu_find");
- RemoveItem("sep_find");
- }
-
- // if no spell checker, remove spell checker ui
- if (!IsSpellCheckerInstalled())
- {
- HideItem("spellingButton");
- HideItem("menu_checkspelling");
- RemoveItem("sep_checkspelling");
- }
-
- // Remove menu items (from overlay shared with HTML editor) in non-HTML.
- if (!IsHTMLEditor())
- {
- HideItem("insertAnchor");
- HideItem("insertImage");
- HideItem("insertHline");
- HideItem("insertTable");
- HideItem("insertHTML");
- HideItem("insertFormMenu");
- HideItem("fileExportToText");
- HideItem("viewFormatToolbar");
- HideItem("viewEditModeToolbar");
- }
-}
-
-function HideItem(id)
-{
- var item = document.getElementById(id);
- if (item)
- item.hidden = true;
-}
-
-function RemoveItem(id)
-{
- var item = document.getElementById(id);
- if (item)
- item.remove();
-}
-
-// Command Updating Strategy:
-// Don't update on on selection change, only when menu is displayed,
-// with this "oncreate" hander:
-function EditorInitTableMenu()
-{
- try {
- InitJoinCellMenuitem("menu_JoinTableCells");
- } catch (ex) {}
-
- // Set enable states for all table commands
- goUpdateTableMenuItems(document.getElementById("composerTableMenuItems"));
-}
-
-function InitJoinCellMenuitem(id)
-{
- // Change text on the "Join..." item depending if we
- // are joining selected cells or just cell to right
- // TODO: What to do about normal selection that crosses
- // table border? Try to figure out all cells
- // included in the selection?
- var menuText;
- var menuItem = document.getElementById(id);
- if (!menuItem) return;
-
- // Use "Join selected cells if there's more than 1 cell selected
- var numSelected;
- var foundElement;
-
- try {
- var tagNameObj = {};
- var countObj = {value:0}
- foundElement = GetCurrentTableEditor().getSelectedOrParentTableElement(tagNameObj, countObj);
- numSelected = countObj.value
- }
- catch(e) {}
- if (foundElement && numSelected > 1)
- menuText = GetString("JoinSelectedCells");
- else
- menuText = GetString("JoinCellToRight");
-
- menuItem.setAttribute("label",menuText);
- menuItem.setAttribute("accesskey",GetString("JoinCellAccesskey"));
-}
-
-function InitRemoveStylesMenuitems(removeStylesId, removeLinksId, removeNamedAnchorsId)
-{
- var editor = GetCurrentEditor();
- if (!editor)
- return;
-
- // Change wording of menuitems depending on selection
- var stylesItem = document.getElementById(removeStylesId);
- var linkItem = document.getElementById(removeLinksId);
-
- var isCollapsed = editor.selection.isCollapsed;
- if (stylesItem)
- {
- stylesItem.setAttribute("label", isCollapsed ? GetString("StopTextStyles") : GetString("RemoveTextStyles"));
- stylesItem.setAttribute("accesskey", GetString("RemoveTextStylesAccesskey"));
- }
- if (linkItem)
- {
- linkItem.setAttribute("label", isCollapsed ? GetString("StopLinks") : GetString("RemoveLinks"));
- linkItem.setAttribute("accesskey", GetString("RemoveLinksAccesskey"));
- // Note: disabling text style is a pain since there are so many - forget it!
-
- // Disable if not in a link, but always allow "Remove"
- // if selection isn't collapsed since we only look at anchor node
- try {
- SetElementEnabled(linkItem, !isCollapsed ||
- editor.getElementOrParentByTagName("href", null));
- } catch(e) {}
- }
- // Disable if selection is collapsed
- SetElementEnabledById(removeNamedAnchorsId, !isCollapsed);
-}
-
-function goUpdateTableMenuItems(commandset)
-{
- var editor = GetCurrentTableEditor();
- if (!editor)
- {
- dump("goUpdateTableMenuItems: too early, not initialized\n");
- return;
- }
-
- var enabled = false;
- var enabledIfTable = false;
-
- var flags = editor.flags;
- if (!(flags & nsIPlaintextEditor.eEditorReadonlyMask) &&
- IsEditingRenderedHTML())
- {
- var tagNameObj = { value: "" };
- var element;
- try {
- element = editor.getSelectedOrParentTableElement(tagNameObj, {value:0});
- }
- catch(e) {}
-
- if (element)
- {
- // Value when we need to have a selected table or inside a table
- enabledIfTable = true;
-
- // All others require being inside a cell or selected cell
- enabled = (tagNameObj.value == "td");
- }
- }
-
- // Loop through command nodes
- for (var i = 0; i < commandset.childNodes.length; i++)
- {
- var commandID = commandset.childNodes[i].getAttribute("id");
- if (commandID)
- {
- if (commandID == "cmd_InsertTable" ||
- commandID == "cmd_JoinTableCells" ||
- commandID == "cmd_SplitTableCell" ||
- commandID == "cmd_ConvertToTable")
- {
- // Call the update method in the command class
- goUpdateCommand(commandID);
- }
- // Directly set with the values calculated here
- else if (commandID == "cmd_DeleteTable" ||
- commandID == "cmd_NormalizeTable" ||
- commandID == "cmd_editTable" ||
- commandID == "cmd_TableOrCellColor" ||
- commandID == "cmd_SelectTable")
- {
- goSetCommandEnabled(commandID, enabledIfTable);
- } else {
- goSetCommandEnabled(commandID, enabled);
- }
- }
- }
-}
-
-//-----------------------------------------------------------------------------------
-// Helpers for inserting and editing tables:
-
-function IsInTable()
-{
- var editor = GetCurrentEditor();
- try {
- var flags = editor.flags;
- return (IsHTMLEditor() &&
- !(flags & nsIPlaintextEditor.eEditorReadonlyMask) &&
- IsEditingRenderedHTML() &&
- null != editor.getElementOrParentByTagName("table", null));
- } catch (e) {}
- return false;
-}
-
-function IsInTableCell()
-{
- try {
- var editor = GetCurrentEditor();
- var flags = editor.flags;
- return (IsHTMLEditor() &&
- !(flags & nsIPlaintextEditor.eEditorReadonlyMask) &&
- IsEditingRenderedHTML() &&
- null != editor.getElementOrParentByTagName("td", null));
- } catch (e) {}
- return false;
-
-}
-
-function IsSelectionInOneCell()
-{
- try {
- var editor = GetCurrentEditor();
- var selection = editor.selection;
-
- if (selection.rangeCount == 1)
- {
- // We have a "normal" single-range selection
- if (!selection.isCollapsed &&
- selection.anchorNode != selection.focusNode)
- {
- // Check if both nodes are within the same cell
- var anchorCell = editor.getElementOrParentByTagName("td", selection.anchorNode);
- var focusCell = editor.getElementOrParentByTagName("td", selection.focusNode);
- return (focusCell != null && anchorCell != null && (focusCell == anchorCell));
- }
- // Collapsed selection or anchor == focus (thus must be in 1 cell)
- return true;
- }
- } catch (e) {}
- return false;
-}
-
-// Call this with insertAllowed = true to allow inserting if not in existing table,
-// else use false to do nothing if not in a table
-function EditorInsertOrEditTable(insertAllowed)
-{
- if (IsInTable())
- {
- // Edit properties of existing table
- window.openDialog("chrome://editor/content/EdTableProps.xul", "_blank", "chrome,close,titlebar,modal", "","TablePanel");
- gContentWindow.focus();
- }
- else if (insertAllowed)
- {
- try {
- if (GetCurrentEditor().selection.isCollapsed)
- // If we have a caret, insert a blank table...
- EditorInsertTable();
- else
- // else convert the selection into a table
- goDoCommand("cmd_ConvertToTable");
- } catch (e) {}
- }
-}
-
-function EditorInsertTable()
-{
- // Insert a new table
- window.openDialog("chrome://editor/content/EdInsertTable.xul", "_blank", "chrome,close,titlebar,modal", "");
- gContentWindow.focus();
-}
-
-function EditorTableCellProperties()
-{
- if (!IsHTMLEditor())
- return;
-
- try {
- var cell = GetCurrentEditor().getElementOrParentByTagName("td", null);
- if (cell) {
- // Start Table Properties dialog on the "Cell" panel
- window.openDialog("chrome://editor/content/EdTableProps.xul", "_blank", "chrome,close,titlebar,modal", "", "CellPanel");
- gContentWindow.focus();
- }
- } catch (e) {}
-}
-
-function GetNumberOfContiguousSelectedRows()
-{
- if (!IsHTMLEditor())
- return 0;
-
- var rows = 0;
- try {
- var editor = GetCurrentTableEditor();
- var rowObj = { value: 0 };
- var colObj = { value: 0 };
- var cell = editor.getFirstSelectedCellInTable(rowObj, colObj);
- if (!cell)
- return 0;
-
- // We have at least one row
- rows++;
-
- var lastIndex = rowObj.value;
- do {
- cell = editor.getNextSelectedCell({value:0});
- if (cell)
- {
- editor.getCellIndexes(cell, rowObj, colObj);
- var index = rowObj.value;
- if (index == lastIndex + 1)
- {
- lastIndex = index;
- rows++;
- }
- }
- }
- while (cell);
- } catch (e) {}
-
- return rows;
-}
-
-function GetNumberOfContiguousSelectedColumns()
-{
- if (!IsHTMLEditor())
- return 0;
-
- var columns = 0;
- try {
- var editor = GetCurrentTableEditor();
- var colObj = { value: 0 };
- var rowObj = { value: 0 };
- var cell = editor.getFirstSelectedCellInTable(rowObj, colObj);
- if (!cell)
- return 0;
-
- // We have at least one column
- columns++;
-
- var lastIndex = colObj.value;
- do {
- cell = editor.getNextSelectedCell({value:0});
- if (cell)
- {
- editor.getCellIndexes(cell, rowObj, colObj);
- var index = colObj.value;
- if (index == lastIndex +1)
- {
- lastIndex = index;
- columns++;
- }
- }
- }
- while (cell);
- } catch (e) {}
-
- return columns;
-}
-
-function EditorOnFocus()
-{
- // Current window already has the InsertCharWindow
- if ("InsertCharWindow" in window && window.InsertCharWindow) return;
-
- // Find window with an InsertCharsWindow and switch association to this one
- var windowWithDialog = FindEditorWithInsertCharDialog();
- if (windowWithDialog)
- {
- // Switch the dialog to current window
- // this sets focus to dialog, so bring focus back to editor window
- if (SwitchInsertCharToThisWindow(windowWithDialog))
- top.document.commandDispatcher.focusedWindow.focus();
- }
-}
-
-function SwitchInsertCharToThisWindow(windowWithDialog)
-{
- if (windowWithDialog && "InsertCharWindow" in windowWithDialog &&
- windowWithDialog.InsertCharWindow)
- {
- // Move dialog association to the current window
- window.InsertCharWindow = windowWithDialog.InsertCharWindow;
- windowWithDialog.InsertCharWindow = null;
-
- // Switch the dialog's opener to current window's
- window.InsertCharWindow.opener = window;
-
- // Bring dialog to the forground
- window.InsertCharWindow.focus();
- return true;
- }
- return false;
-}
-
-function FindEditorWithInsertCharDialog()
-{
- try {
- // Find window with an InsertCharsWindow and switch association to this one
- let enumerator = Services.wm.getEnumerator(null);
-
- while (enumerator.hasMoreElements())
- {
- var tempWindow = enumerator.getNext();
-
- if (tempWindow != window && "InsertCharWindow" in tempWindow &&
- tempWindow.InsertCharWindow)
- {
- return tempWindow;
- }
- }
- }
- catch(e) {}
- return null;
-}
-
-function EditorFindOrCreateInsertCharWindow()
-{
- if ("InsertCharWindow" in window && window.InsertCharWindow)
- window.InsertCharWindow.focus();
- else
- {
- // Since we switch the dialog during EditorOnFocus(),
- // this should really never be found, but it's good to be sure
- var windowWithDialog = FindEditorWithInsertCharDialog();
- if (windowWithDialog)
- {
- SwitchInsertCharToThisWindow(windowWithDialog);
- }
- else
- {
- // The dialog will set window.InsertCharWindow to itself
- window.openDialog("chrome://editor/content/EdInsertChars.xul", "_blank", "chrome,close,titlebar", "");
- }
- }
-}
-
-// Find another HTML editor window to associate with the InsertChar dialog
-// or close it if none found (May be a mail composer)
-function SwitchInsertCharToAnotherEditorOrClose()
-{
- if ("InsertCharWindow" in window && window.InsertCharWindow)
- {
- var enumerator;
- try {
- enumerator = Services.wm.getEnumerator(null);
- }
- catch(e) {}
- if (!enumerator) return;
-
- // TODO: Fix this to search for command controllers and look for "cmd_InsertChars"
- // For now, detect just Web Composer and HTML Mail Composer
- while ( enumerator.hasMoreElements() )
- {
- var tempWindow = enumerator.getNext();
- if (tempWindow != window && tempWindow != window.InsertCharWindow &&
- "GetCurrentEditor" in tempWindow && tempWindow.GetCurrentEditor())
- {
- tempWindow.InsertCharWindow = window.InsertCharWindow;
- window.InsertCharWindow = null;
- tempWindow.InsertCharWindow.opener = tempWindow;
- return;
- }
- }
- // Didn't find another editor - close the dialog
- window.InsertCharWindow.close();
- }
-}
-
-function ResetStructToolbar()
-{
- gLastFocusNode = null;
- UpdateStructToolbar();
-}
-
-function newCommandListener(element)
-{
- return function() { return SelectFocusNodeAncestor(element); };
-}
-
-function newContextmenuListener(button, element)
-{
- return function() { return InitStructBarContextMenu(button, element); };
-}
-
-function UpdateStructToolbar()
-{
- var editor = GetCurrentEditor();
- if (!editor) return;
-
- var mixed = GetSelectionContainer();
- if (!mixed) return;
- var element = mixed.node;
- var oneElementSelected = mixed.oneElementSelected;
-
- if (!element) return;
-
- if (element == gLastFocusNode &&
- oneElementSelected == gLastFocusNodeWasSelected)
- return;
-
- gLastFocusNode = element;
- gLastFocusNodeWasSelected = mixed.oneElementSelected;
-
- var toolbar = document.getElementById("structToolbar");
- if (!toolbar) return;
- // We need to leave the <label> to flex the buttons to the left.
- for (let node of toolbar.querySelectorAll("toolbarbutton")) {
- node.remove();
- }
-
- toolbar.removeAttribute("label");
-
- if ( IsInHTMLSourceMode() ) {
- // we have destroyed the contents of the status bar and are
- // about to recreate it ; but we don't want to do that in
- // Source mode
- return;
- }
-
- var tag, button;
- var bodyElement = GetBodyElement();
- var isFocusNode = true;
- var tmp;
- do {
- tag = element.nodeName.toLowerCase();
-
- button = document.createElementNS(XUL_NS, "toolbarbutton");
- button.setAttribute("label", "<" + tag + ">");
- button.setAttribute("value", tag);
- button.setAttribute("context", "structToolbarContext");
- button.className = "struct-button";
-
- toolbar.insertBefore(button, toolbar.firstChild);
-
- button.addEventListener("command", newCommandListener(element), false);
-
- button.addEventListener("contextmenu", newContextmenuListener(button, element), false);
-
- if (isFocusNode && oneElementSelected) {
- button.setAttribute("checked", "true");
- isFocusNode = false;
- }
-
- tmp = element;
- element = element.parentNode;
-
- } while (tmp != bodyElement);
-}
-
-function SelectFocusNodeAncestor(element)
-{
- var editor = GetCurrentEditor();
- if (editor) {
- if (element == GetBodyElement())
- editor.selectAll();
- else
- editor.selectElement(element);
- }
- ResetStructToolbar();
-}
-
-function GetSelectionContainer()
-{
- var editor = GetCurrentEditor();
- if (!editor) return null;
-
- try {
- var selection = editor.selection;
- if (!selection) return null;
- }
- catch (e) { return null; }
-
- var result = { oneElementSelected:false };
-
- if (selection.isCollapsed) {
- result.node = selection.focusNode;
- }
- else {
- var rangeCount = selection.rangeCount;
- if (rangeCount == 1) {
- result.node = editor.getSelectedElement("");
- var range = selection.getRangeAt(0);
-
- // check for a weird case : when we select a piece of text inside
- // a text node and apply an inline style to it, the selection starts
- // at the end of the text node preceding the style and ends after the
- // last char of the style. Assume the style element is selected for
- // user's pleasure
- if (!result.node &&
- range.startContainer.nodeType == Node.TEXT_NODE &&
- range.startOffset == range.startContainer.length &&
- range.endContainer.nodeType == Node.TEXT_NODE &&
- range.endOffset == range.endContainer.length &&
- range.endContainer.nextSibling == null &&
- range.startContainer.nextSibling == range.endContainer.parentNode)
- result.node = range.endContainer.parentNode;
-
- if (!result.node) {
- // let's rely on the common ancestor of the selection
- result.node = range.commonAncestorContainer;
- }
- else {
- result.oneElementSelected = true;
- }
- }
- else {
- // assume table cells !
- var i, container = null;
- for (i = 0; i < rangeCount; i++) {
- range = selection.getRangeAt(i);
- if (!container) {
- container = range.startContainer;
- }
- else if (container != range.startContainer) {
- // all table cells don't belong to same row so let's
- // select the parent of all rows
- result.node = container.parentNode;
- break;
- }
- result.node = container;
- }
- }
- }
-
- // make sure we have an element here
- while (result.node.nodeType != Node.ELEMENT_NODE)
- result.node = result.node.parentNode;
-
- // and make sure the element is not a special editor node like
- // the <br> we insert in blank lines
- // and don't select anonymous content !!! (fix for bug 190279)
- while (result.node.hasAttribute("_moz_editor_bogus_node") ||
- editor.isAnonymousElement(result.node))
- result.node = result.node.parentNode;
-
- return result;
-}
-
-function FillInHTMLTooltipEditor(tooltip)
-{
- const XLinkNS = "http://www.w3.org/1999/xlink";
- var tooltipText = null;
- var node;
- if (IsInPreviewMode()) {
- for (node = document.tooltipNode; node; node = node.parentNode) {
- if (node.nodeType == Node.ELEMENT_NODE) {
- tooltipText = node.getAttributeNS(XLinkNS, "title");
- if (tooltipText && /\S/.test(tooltipText)) {
- tooltip.setAttribute("label", tooltipText);
- return true;
- }
- tooltipText = node.getAttribute("title");
- if (tooltipText && /\S/.test(tooltipText)) {
- tooltip.setAttribute("label", tooltipText);
- return true;
- }
- }
- }
- } else {
- for (node = document.tooltipNode; node; node = node.parentNode) {
- if (node instanceof Components.interfaces.nsIDOMHTMLImageElement ||
- node instanceof Components.interfaces.nsIDOMHTMLInputElement)
- tooltipText = node.getAttribute("src");
- else if (node instanceof Components.interfaces.nsIDOMHTMLAnchorElement)
- tooltipText = node.getAttribute("href") || node.name;
- if (tooltipText) {
- tooltip.setAttribute("label", tooltipText);
- return true;
- }
- }
- }
- return false;
-}
-
-function UpdateTOC()
-{
- window.openDialog("chrome://editor/content/EdInsertTOC.xul",
- "_blank", "chrome,close,modal,titlebar");
- window.content.focus();
-}
-
-function InitTOCMenu()
-{
- var elt = GetCurrentEditor().document.getElementById("mozToc");
- var createMenuitem = document.getElementById("insertTOCMenuitem");
- var updateMenuitem = document.getElementById("updateTOCMenuitem");
- var removeMenuitem = document.getElementById("removeTOCMenuitem");
- if (removeMenuitem && createMenuitem && updateMenuitem) {
- if (elt) {
- createMenuitem.setAttribute("disabled", "true");
- updateMenuitem.removeAttribute("disabled");
- removeMenuitem.removeAttribute("disabled");
- }
- else {
- createMenuitem.removeAttribute("disabled");
- removeMenuitem.setAttribute("disabled", "true");
- updateMenuitem.setAttribute("disabled", "true");
- }
- }
-}
-
-function RemoveTOC()
-{
- var theDocument = GetCurrentEditor().document;
- var elt = theDocument.getElementById("mozToc");
- if (elt) {
- elt.remove();
- }
-
- let anchorNodes = theDocument.querySelectorAll('a[name^="mozTocId"]');
- for (let node of anchorNodes) {
- if (node.parentNode) {
- node.remove();
- }
- }
-}
diff --git a/editor/ui/composer/content/editorApplicationOverlay.js b/editor/ui/composer/content/editorApplicationOverlay.js
deleted file mode 100644
index 131b81d0e..000000000
--- a/editor/ui/composer/content/editorApplicationOverlay.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Implementations of nsIControllerCommand for composer commands */
-
-function initEditorContextMenuItems(aEvent)
-{
- var shouldShowEditPage = !gContextMenu.onImage && !gContextMenu.onLink && !gContextMenu.onTextInput && !gContextMenu.inDirList;
- gContextMenu.showItem( "context-editpage", shouldShowEditPage );
-
- var shouldShowEditLink = gContextMenu.onSaveableLink;
- gContextMenu.showItem( "context-editlink", shouldShowEditLink );
-
- // Hide the applications separator if there's no add-on apps present.
- gContextMenu.showItem("context-sep-apps", gContextMenu.shouldShowSeparator("context-sep-apps"));
-}
-
-function initEditorContextMenuListener(aEvent)
-{
- var popup = document.getElementById("contentAreaContextMenu");
- if (popup)
- popup.addEventListener("popupshowing", initEditorContextMenuItems, false);
-}
-
-addEventListener("load", initEditorContextMenuListener, false);
-
-function editDocument(aDocument)
-{
- if (!aDocument)
- aDocument = window.content.document;
-
- editPage(aDocument.URL);
-}
-
-function editPageOrFrame()
-{
- var focusedWindow = document.commandDispatcher.focusedWindow;
-
- // if the uri is a specific frame, grab it, else use the frameset uri
- // and let Composer handle error if necessary
- editPage(getContentFrameURI(focusedWindow));
-}
-
-function getContentFrameURI(aFocusedWindow)
-{
- var contentFrame = isContentFrame(aFocusedWindow) ?
- aFocusedWindow : window.content;
- return contentFrame.location.href;
-}
-
-// Any non-editor window wanting to create an editor with a URL
-// should use this instead of "window.openDialog..."
-// We must always find an existing window with requested URL
-function editPage(url, aFileType)
-{
- // aFileType is optional and needs to default to html.
- aFileType = aFileType || "html";
-
- // Always strip off "view-source:" and #anchors
- url = url.replace(/^view-source:/, "").replace(/#.*/, "");
-
- // if the current window is a browser window, then extract the current charset menu setting from the current
- // document and use it to initialize the new composer window...
-
- var wintype = document.documentElement.getAttribute('windowtype');
- var charsetArg;
-
- if (wintype == "navigator:browser" && content.document)
- charsetArg = "charset=" + content.document.characterSet;
-
- try {
- let uri = createURI(url, null, null);
-
- let enumerator = Services.wm.getEnumerator("composer:" + aFileType);
- let emptyWindow;
- while ( enumerator.hasMoreElements() )
- {
- var win = enumerator.getNext();
- if ( win && win.IsWebComposer())
- {
- if (CheckOpenWindowForURIMatch(uri, win))
- {
- // We found an editor with our url
- win.focus();
- return;
- }
- else if (!emptyWindow && win.PageIsEmptyAndUntouched())
- {
- emptyWindow = win;
- }
- }
- }
-
- if (emptyWindow)
- {
- // we have an empty window we can use
- if (aFileType == "html" && emptyWindow.IsInHTMLSourceMode())
- emptyWindow.SetEditMode(emptyWindow.PreviousNonSourceDisplayMode);
- emptyWindow.EditorLoadUrl(url);
- emptyWindow.focus();
- emptyWindow.SetSaveAndPublishUI(url);
- return;
- }
-
- // Create new Composer / Text Editor window.
- if (aFileType == "text" && ("EditorNewPlaintext" in window))
- EditorNewPlaintext(url, charsetArg);
- else
- NewEditorWindow(url, charsetArg);
-
- } catch(e) {}
-}
-
-function createURI(urlstring)
-{
- try {
- return Services.io.newURI(urlstring, null, null);
- } catch (e) {}
-
- return null;
-}
-
-function CheckOpenWindowForURIMatch(uri, win)
-{
- try {
- var contentWindow = win.content;
- var contentDoc = contentWindow.document;
- var htmlDoc = contentDoc.QueryInterface(Components.interfaces.nsIDOMHTMLDocument);
- var winuri = createURI(htmlDoc.URL);
- return winuri.equals(uri);
- } catch (e) {}
-
- return false;
-}
-
-function toEditor()
-{
- if (!CycleWindow("composer:html"))
- NewEditorWindow();
-}
-
-function NewEditorWindow(aUrl, aCharsetArg)
-{
- window.openDialog("chrome://editor/content",
- "_blank",
- "chrome,all,dialog=no",
- aUrl || "about:blank",
- aCharsetArg);
-}
-
-function NewEditorFromTemplate()
-{
- // XXX not implemented
-}
-
-function NewEditorFromDraft()
-{
- // XXX not implemented
-}
diff --git a/editor/ui/composer/content/editorMailOverlay.xul b/editor/ui/composer/content/editorMailOverlay.xul
deleted file mode 100644
index a52937149..000000000
--- a/editor/ui/composer/content/editorMailOverlay.xul
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- retrieve generic commands -->
-<?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
-
-<overlay id="editorMailOverlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- navigator specific commands -->
- <commandset id="tasksCommands">
- <!-- XXX insert commands here -->
- </commandset>
-
- <!-- navigator specific UI items -->
- <menupopup id="menu_NewPopup">
- <!-- XXX insert File->New Menu add-ins here -->
- </menupopup>
-
- <menupopup id="menu_FilePopup">
- <!-- XXX insert File Menu add-ins here -->
- </menupopup>
-</overlay>
-
diff --git a/editor/ui/composer/content/editorNavigatorOverlay.xul b/editor/ui/composer/content/editorNavigatorOverlay.xul
deleted file mode 100644
index f9907c7bd..000000000
--- a/editor/ui/composer/content/editorNavigatorOverlay.xul
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- retrieve generic commands -->
-<!-- <?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?> -->
-
-<overlay id="editorNavigatorOverlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- navigator specific commands -->
- <commandset id="tasksCommands">
- <!-- XXX insert commands here -->
- </commandset>
-
- <!-- navigator specific UI items -->
- <menupopup id="menu_NewPopup">
- <!-- XXX insert File->New Menu add-ins here -->
- </menupopup>
-
- <menupopup id="menu_FilePopup">
- <!-- XXX insert File Menu add-ins here -->
- </menupopup>
-</overlay>
-
diff --git a/editor/ui/composer/content/editorSmileyOverlay.xul b/editor/ui/composer/content/editorSmileyOverlay.xul
deleted file mode 100644
index 86441bc4b..000000000
--- a/editor/ui/composer/content/editorSmileyOverlay.xul
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE overlay SYSTEM "chrome://editor/locale/editorSmileyOverlay.dtd">
-
-<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <!-- smiley menu -->
- <toolbarbutton id="smileButtonMenu"
- class="formatting-button"
- tooltiptext="&SmileButton.tooltip;"
- type="menu"
- observes="cmd_smiley">
- <menupopup id="smilyPopup">
- <menuitem class="smiley insert-smile menuitem-iconic" label="&smiley1Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-)' )"
- tooltiptext="&smiley1Cmd.tooltip;" />
- <menuitem class="smiley insert-frown menuitem-iconic" label="&smiley2Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-(' )"
- tooltiptext="&smiley2Cmd.tooltip;" />
- <menuitem class="smiley insert-wink menuitem-iconic" label="&smiley3Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ';-)' )"
- tooltiptext="&smiley3Cmd.tooltip;" />
- <menuitem class="smiley insert-tongue menuitem-iconic" label="&smiley4Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-P' )"
- tooltiptext="&smiley4Cmd.tooltip;" />
- <menuitem class="smiley insert-laughing menuitem-iconic" label="&smiley5Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-D' )"
- tooltiptext="&smiley5Cmd.tooltip;" />
- <menuitem class="smiley insert-embarrassed menuitem-iconic" label="&smiley6Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-[' )"
- tooltiptext="&smiley6Cmd.tooltip;" />
- <menuitem class="smiley insert-undecided menuitem-iconic" label="&smiley7Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-\\' )"
- tooltiptext="&smiley7Cmd.tooltip;" />
- <menuitem class="smiley insert-surprise menuitem-iconic" label="&smiley8Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', '=-O' )"
- tooltiptext="&smiley8Cmd.tooltip;" />
- <menuitem class="smiley insert-kiss menuitem-iconic" label="&smiley9Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-*' )"
- tooltiptext="&smiley9Cmd.tooltip;" />
- <menuitem class="smiley insert-yell menuitem-iconic" label="&smiley10Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', '>:o' )"
- tooltiptext="&smiley10Cmd.tooltip;" />
- <menuitem class="smiley insert-cool menuitem-iconic" label="&smiley11Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', '8-)' )"
- tooltiptext="&smiley11Cmd.tooltip;" />
- <menuitem class="smiley insert-money menuitem-iconic" label="&smiley12Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-$' )"
- tooltiptext="&smiley12Cmd.tooltip;" />
- <menuitem class="smiley insert-foot menuitem-iconic" label="&smiley13Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-!' )"
- tooltiptext="&smiley13Cmd.tooltip;" />
- <menuitem class="smiley insert-innocent menuitem-iconic" label="&smiley14Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', 'O:-)' )"
- tooltiptext="&smiley14Cmd.tooltip;" />
- <menuitem class="smiley insert-cry menuitem-iconic" label="&smiley15Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':\'(' )"
- tooltiptext="&smiley15Cmd.tooltip;" />
- <menuitem class="smiley insert-sealed menuitem-iconic" label="&smiley16Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-X' )"
- tooltiptext="&smiley16Cmd.tooltip;" />
-
- </menupopup>
- </toolbarbutton>
-
- <menu id="insertMenu">
- <menupopup id="insertMenuPopup">
- <menu id="insertSmiley" label="&insertSmiley.label;" accesskey="&insertSmiley.accesskey;" insertbefore="insertMenuSeparator">
- <menupopup id="smilyMenuPopup">
- <menuitem class="smiley insert-smile menuitem-iconic" label="&smiley1Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-)' )" accesskey="&smiley1Cmd.accesskey;"/>
- <menuitem class="smiley insert-frown menuitem-iconic" label="&smiley2Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-(' )" accesskey="&smiley2Cmd.accesskey;"/>
- <menuitem class="smiley insert-wink menuitem-iconic" label="&smiley3Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ';-)' )" accesskey="&smiley3Cmd.accesskey;"/>
- <menuitem class="smiley insert-tongue menuitem-iconic" label="&smiley4Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-P' )" accesskey="&smiley4Cmd.accesskey;"/>
- <menuitem class="smiley insert-laughing menuitem-iconic" label="&smiley5Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-D' )" accesskey="&smiley5Cmd.accesskey;"/>
- <menuitem class="smiley insert-embarrassed menuitem-iconic" label="&smiley6Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-[' )" accesskey="&smiley6Cmd.accesskey;"/>
- <menuitem class="smiley insert-undecided menuitem-iconic" label="&smiley7Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-\\' )" accesskey="&smiley7Cmd.accesskey;"/>
- <menuitem class="smiley insert-surprise menuitem-iconic" label="&smiley8Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', '=-O' )" accesskey="&smiley8Cmd.accesskey;"/>
- <menuitem class="smiley insert-kiss menuitem-iconic" label="&smiley9Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-*' )" accesskey="&smiley9Cmd.accesskey;"/>
- <menuitem class="smiley insert-yell menuitem-iconic" label="&smiley10Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', '>:o' )" accesskey="&smiley10Cmd.accesskey;"/>
- <menuitem class="smiley insert-cool menuitem-iconic" label="&smiley11Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', '8-)' )" accesskey="&smiley11Cmd.accesskey;"/>
- <menuitem class="smiley insert-money menuitem-iconic" label="&smiley12Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-$' )" accesskey="&smiley12Cmd.accesskey;"/>
- <menuitem class="smiley insert-foot menuitem-iconic" label="&smiley13Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-!' )" accesskey="&smiley13Cmd.accesskey;"/>
- <menuitem class="smiley insert-innocent menuitem-iconic" label="&smiley14Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', 'O:-)' )" accesskey="&smiley14Cmd.accesskey;"/>
- <menuitem class="smiley insert-cry menuitem-iconic" label="&smiley15Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':\'(' )" accesskey="&smiley15Cmd.accesskey;"/>
- <menuitem class="smiley insert-sealed menuitem-iconic" label="&smiley16Cmd.label;"
- oncommand="doStatefulCommand('cmd_smiley', ':-X' )" accesskey="&smiley16Cmd.accesskey;"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
-</overlay>
diff --git a/editor/ui/composer/content/editorTasksOverlay.xul b/editor/ui/composer/content/editorTasksOverlay.xul
deleted file mode 100644
index 1a70d8c58..000000000
--- a/editor/ui/composer/content/editorTasksOverlay.xul
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE overlay SYSTEM "chrome://communicator/locale/tasksOverlay.dtd">
-
-<overlay id="editorTasksOverlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://editor/content/editorApplicationOverlay.js"/>
-
- <keyset id="tasksKeys">
- <key id="key_editor" key="&editorCmd.commandkey;" command="Tasks:Editor" modifiers="accel"/>
- </keyset>
-
- <commandset id="tasksCommands">
- <command id="Tasks:Editor" oncommand="toEditor();"/>
- </commandset>
-
- <statusbarpanel id="component-bar">
- <toolbarbutton class="taskbutton" id="mini-comp" command="Tasks:Editor"
- tooltiptext="&taskComposer.tooltip;" insertafter="mini-nav"/>
- </statusbarpanel>
-
- <menupopup id="windowPopup">
- <menuitem label="&editorCmd.label;" accesskey="&editorCmd.accesskey;" key="key_editor" command="Tasks:Editor" id="tasksMenuEditor" insertafter="IMMenuItem,tasksMenuNavigator" class="menuitem-iconic icon-composer16 menu-iconic"/>
- </menupopup>
-
-</overlay>
-
diff --git a/editor/ui/composer/content/editorUtilities.js b/editor/ui/composer/content/editorUtilities.js
deleted file mode 100644
index cd57e8d72..000000000
--- a/editor/ui/composer/content/editorUtilities.js
+++ /dev/null
@@ -1,987 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-
-/**** NAMESPACES ****/
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-// Each editor window must include this file
-// Variables shared by all dialogs:
-
-// Object to attach commonly-used widgets (all dialogs should use this)
-var gDialog = {};
-
-var kOutputEncodeBasicEntities = Components.interfaces.nsIDocumentEncoder.OutputEncodeBasicEntities;
-var kOutputEncodeHTMLEntities = Components.interfaces.nsIDocumentEncoder.OutputEncodeHTMLEntities;
-var kOutputEncodeLatin1Entities = Components.interfaces.nsIDocumentEncoder.OutputEncodeLatin1Entities;
-var kOutputEncodeW3CEntities = Components.interfaces.nsIDocumentEncoder.OutputEncodeW3CEntities;
-var kOutputFormatted = Components.interfaces.nsIDocumentEncoder.OutputFormatted;
-var kOutputLFLineBreak = Components.interfaces.nsIDocumentEncoder.OutputLFLineBreak;
-var kOutputSelectionOnly = Components.interfaces.nsIDocumentEncoder.OutputSelectionOnly;
-var kOutputWrap = Components.interfaces.nsIDocumentEncoder.OutputWrap;
-
-var gStringBundle;
-var gFilePickerDirectory;
-
-/************* Message dialogs ***************/
-
-// Optional: Caller may supply text to substitue for "Ok" and/or "Cancel"
-function ConfirmWithTitle(title, message, okButtonText, cancelButtonText)
-{
- let okFlag = okButtonText ? Services.prompt.BUTTON_TITLE_IS_STRING : Services.prompt.BUTTON_TITLE_OK;
- let cancelFlag = cancelButtonText ? Services.prompt.BUTTON_TITLE_IS_STRING : Services.prompt.BUTTON_TITLE_CANCEL;
-
- return Services.prompt.confirmEx(window, title, message,
- (okFlag * Services.prompt.BUTTON_POS_0) +
- (cancelFlag * Services.prompt.BUTTON_POS_1),
- okButtonText, cancelButtonText, null, null, {value:0}) == 0;
-}
-
-/************* String Utilities ***************/
-
-function GetString(name)
-{
- if (!gStringBundle)
- {
- try {
- gStringBundle = Services.strings.createBundle("chrome://editor/locale/editor.properties");
- } catch (ex) {}
- }
- if (gStringBundle)
- {
- try {
- return gStringBundle.GetStringFromName(name);
- } catch (e) {}
- }
- return null;
-}
-
-function GetFormattedString(aName, aVal)
-{
- if (!gStringBundle)
- {
- try {
- gStringBundle = Services.strings.createBundle("chrome://editor/locale/editor.properties");
- } catch (ex) {}
- }
- if (gStringBundle)
- {
- try {
- return gStringBundle.formatStringFromName(aName, [aVal], 1);
- } catch (e) {}
- }
- return null;
-}
-
-function TrimStringLeft(string)
-{
- if (!string)
- return "";
- return string.trimLeft();
-}
-
-function TrimStringRight(string)
-{
- if (!string)
- return "";
- return string.trimRight();
-}
-
-// Remove whitespace from both ends of a string
-function TrimString(string)
-{
- if (!string)
- return "";
- return string.trim();
-}
-
-function TruncateStringAtWordEnd(string, maxLength, addEllipses)
-{
- // Return empty if string is null, undefined, or the empty string
- if (!string)
- return "";
-
- // We assume they probably don't want whitespace at the beginning
- string = string.trimLeft();
- if (string.length <= maxLength)
- return string;
-
- // We need to truncate the string to maxLength or fewer chars
- if (addEllipses)
- maxLength -= 3;
- string = string.replace(RegExp("(.{0," + maxLength + "})\\s.*"), "$1")
-
- if (string.length > maxLength)
- string = string.slice(0, maxLength);
-
- if (addEllipses)
- string += "...";
- return string;
-}
-
-// Replace all whitespace characters with supplied character
-// E.g.: Use charReplace = " ", to "unwrap" the string by removing line-end chars
-// Use charReplace = "_" when you don't want spaces (like in a URL)
-function ReplaceWhitespace(string, charReplace)
-{
- return string.trim().replace(/\s+/g, charReplace);
-}
-
-// Replace whitespace with "_" and allow only HTML CDATA
-// characters: "a"-"z","A"-"Z","0"-"9", "_", ":", "-", ".",
-// and characters above ASCII 127
-function ConvertToCDATAString(string)
-{
- return string.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_\.\-\:\u0080-\uFFFF]+/g,'');
-}
-
-function GetSelectionAsText()
-{
- try {
- return GetCurrentEditor().outputToString("text/plain", kOutputSelectionOnly);
- } catch (e) {}
-
- return "";
-}
-
-
-/************* Get Current Editor and associated interfaces or info ***************/
-const nsIPlaintextEditor = Components.interfaces.nsIPlaintextEditor;
-const nsIHTMLEditor = Components.interfaces.nsIHTMLEditor;
-const nsITableEditor = Components.interfaces.nsITableEditor;
-const nsIEditorStyleSheets = Components.interfaces.nsIEditorStyleSheets;
-const nsIEditingSession = Components.interfaces.nsIEditingSession;
-
-function GetCurrentEditor()
-{
- // Get the active editor from the <editor> tag
- // XXX This will probably change if we support > 1 editor in main Composer window
- // (e.g. a plaintext editor for HTMLSource)
-
- // For dialogs: Search up parent chain to find top window with editor
- var editor;
- try {
- var editorElement = GetCurrentEditorElement();
- editor = editorElement.getEditor(editorElement.contentWindow);
-
- // Do QIs now so editor users won't have to figure out which interface to use
- // Using "instanceof" does the QI for us.
- editor instanceof Components.interfaces.nsIPlaintextEditor;
- editor instanceof Components.interfaces.nsIHTMLEditor;
- } catch (e) { dump (e)+"\n"; }
-
- return editor;
-}
-
-function GetCurrentTableEditor()
-{
- var editor = GetCurrentEditor();
- return (editor && (editor instanceof nsITableEditor)) ? editor : null;
-}
-
-function GetCurrentEditorElement()
-{
- var tmpWindow = window;
-
- do {
- // Get the <editor> element(s)
- let editorItem = tmpWindow.document.querySelector("editor");
-
- // This will change if we support > 1 editor element
- if (editorItem)
- return editorItem;
-
- tmpWindow = tmpWindow.opener;
- }
- while (tmpWindow);
-
- return null;
-}
-
-function GetCurrentCommandManager()
-{
- try {
- return GetCurrentEditorElement().commandManager;
- } catch (e) { dump (e)+"\n"; }
-
- return null;
-}
-
-function GetCurrentEditorType()
-{
- try {
- return GetCurrentEditorElement().editortype;
- } catch (e) { dump (e)+"\n"; }
-
- return "";
-}
-
-function IsHTMLEditor()
-{
- // We don't have an editorElement, just return false
- if (!GetCurrentEditorElement())
- return false;
-
- var editortype = GetCurrentEditorType();
- switch (editortype)
- {
- case "html":
- case "htmlmail":
- return true;
-
- case "text":
- case "textmail":
- return false
-
- default:
- dump("INVALID EDITOR TYPE: " + editortype + "\n");
- break;
- }
- return false;
-}
-
-function PageIsEmptyAndUntouched()
-{
- return IsDocumentEmpty() && !IsDocumentModified() && !IsHTMLSourceChanged();
-}
-
-function IsInHTMLSourceMode()
-{
- return (gEditorDisplayMode == kDisplayModeSource);
-}
-
-function IsInPreviewMode()
-{
- return (gEditorDisplayMode == kDisplayModePreview);
-}
-
-// are we editing HTML (i.e. neither in HTML source mode, nor editing a text file)
-function IsEditingRenderedHTML()
-{
- return IsHTMLEditor() && !IsInHTMLSourceMode();
-}
-
-function IsWebComposer()
-{
- return document.documentElement.id == "editorWindow";
-}
-
-function IsDocumentEditable()
-{
- try {
- return GetCurrentEditor().isDocumentEditable;
- } catch (e) {}
- return false;
-}
-
-function IsDocumentEmpty()
-{
- try {
- return GetCurrentEditor().documentIsEmpty;
- } catch (e) {}
- return false;
-}
-
-function IsDocumentModified()
-{
- try {
- return GetCurrentEditor().documentModified;
- } catch (e) {}
- return false;
-}
-
-function IsHTMLSourceChanged()
-{
- // gSourceTextEditor will not be defined if we're just a text editor.
- return gSourceTextEditor ? gSourceTextEditor.documentModified : false;
-}
-
-function newCommandParams()
-{
- try {
- return Components.classes["@mozilla.org/embedcomp/command-params;1"].createInstance(Components.interfaces.nsICommandParams);
- }
- catch(e) { dump("error thrown in newCommandParams: "+e+"\n"); }
- return null;
-}
-
-/************* General editing command utilities ***************/
-
-function GetDocumentTitle()
-{
- try {
- return new XPCNativeWrapper(GetCurrentEditor().document, "title").title;
- } catch (e) {}
-
- return "";
-}
-
-function SetDocumentTitle(title)
-{
-
- try {
- GetCurrentEditor().setDocumentTitle(title);
-
- // Update window title (doesn't work if called from a dialog)
- if ("UpdateWindowTitle" in window)
- window.UpdateWindowTitle();
- } catch (e) {}
-}
-
-var gAtomService;
-function GetAtomService()
-{
- gAtomService = Components.classes["@mozilla.org/atom-service;1"].getService(Components.interfaces.nsIAtomService);
-}
-
-function EditorGetTextProperty(property, attribute, value, firstHas, anyHas, allHas)
-{
- try {
- if (!gAtomService) GetAtomService();
- var propAtom = gAtomService.getAtom(property);
-
- return GetCurrentEditor().getInlinePropertyWithAttrValue(propAtom,
- attribute, value, firstHas, anyHas, allHas);
- }
- catch(e) {}
-}
-
-function EditorSetTextProperty(property, attribute, value)
-{
- try {
- if (!gAtomService) GetAtomService();
- var propAtom = gAtomService.getAtom(property);
-
- GetCurrentEditor().setInlineProperty(propAtom, attribute, value);
- if ("gContentWindow" in window)
- window.gContentWindow.focus();
- }
- catch(e) {}
-}
-
-function EditorRemoveTextProperty(property, attribute)
-{
- try {
- if (!gAtomService) GetAtomService();
- var propAtom = gAtomService.getAtom(property);
-
- GetCurrentEditor().removeInlineProperty(propAtom, attribute);
- if ("gContentWindow" in window)
- window.gContentWindow.focus();
- }
- catch(e) {}
-}
-
-/************* Element enbabling/disabling ***************/
-
-// this function takes an elementID and a flag
-// if the element can be found by ID, then it is either enabled (by removing "disabled" attr)
-// or disabled (setAttribute) as specified in the "doEnable" parameter
-function SetElementEnabledById(elementID, doEnable)
-{
- SetElementEnabled(document.getElementById(elementID), doEnable);
-}
-
-function SetElementEnabled(element, doEnable)
-{
- if ( element )
- {
- if ( doEnable )
- element.removeAttribute("disabled");
- else
- element.setAttribute("disabled", "true");
- }
- else
- {
- dump("Element not found in SetElementEnabled\n");
- }
-}
-
-/************* Services / Prefs ***************/
-
-function GetFileProtocolHandler()
-{
- let handler = Services.io.getProtocolHandler("file");
- return handler.QueryInterface(Components.interfaces.nsIFileProtocolHandler);
-}
-
-function GetStringPref(name)
-{
- try {
- return Services.prefs.getComplexValue(name, Components.interfaces.nsISupportsString).data;
- } catch (e) {}
- return "";
-}
-
-function SetStringPref(aPrefName, aPrefValue)
-{
- try {
- let str = Components.classes["@mozilla.org/supports-string;1"]
- .createInstance(Components.interfaces.nsISupportsString);
- str.data = aPrefValue;
- Services.prefs.setComplexValue(aPrefName, Components.interfaces.nsISupportsString, str);
- }
- catch(e) {}
-}
-
-// Set initial directory for a filepicker from URLs saved in prefs
-function SetFilePickerDirectory(filePicker, fileType)
-{
- if (filePicker)
- {
- try {
- // Save current directory so we can reset it in SaveFilePickerDirectory
- gFilePickerDirectory = filePicker.displayDirectory;
-
- let location = Services.prefs.getComplexValue("editor.lastFileLocation."+fileType,
- Components.interfaces.nsILocalFile);
- if (location)
- filePicker.displayDirectory = location;
- }
- catch(e) {}
- }
-}
-
-// Save the directory of the selected file to prefs
-function SaveFilePickerDirectory(filePicker, fileType)
-{
- if (filePicker && filePicker.file)
- {
- try {
- var fileDir;
- if (filePicker.file.parent)
- fileDir = filePicker.file.parent.QueryInterface(Components.interfaces.nsILocalFile);
-
- Services.prefs.setComplexValue("editor.lastFileLocation." + fileType,
- Components.interfaces.nsILocalFile, fileDir);
-
- Services.prefs.savePrefFile(null);
- } catch (e) {}
- }
-
- // Restore the directory used before SetFilePickerDirectory was called;
- // This reduces interference with Browser and other module directory defaults
- if (gFilePickerDirectory)
- filePicker.displayDirectory = gFilePickerDirectory;
-
- gFilePickerDirectory = null;
-}
-
-function GetDefaultBrowserColors()
-{
- var colors = { TextColor:0, BackgroundColor:0, LinkColor:0, ActiveLinkColor:0 , VisitedLinkColor:0 };
- var useSysColors = false;
- try { useSysColors = Services.prefs.getBoolPref("browser.display.use_system_colors"); } catch (e) {}
-
- if (!useSysColors)
- {
- try { colors.TextColor = Services.prefs.getCharPref("browser.display.foreground_color"); } catch (e) {}
-
- try { colors.BackgroundColor = Services.prefs.getCharPref("browser.display.background_color"); } catch (e) {}
- }
- // Use OS colors for text and background if explicitly asked or pref is not set
- if (!colors.TextColor)
- colors.TextColor = "windowtext";
-
- if (!colors.BackgroundColor)
- colors.BackgroundColor = "window";
-
- colors.LinkColor = Services.prefs.getCharPref("browser.anchor_color");
- colors.ActiveLinkColor = Services.prefs.getCharPref("browser.active_color");
- colors.VisitedLinkColor = Services.prefs.getCharPref("browser.visited_color");
-
- return colors;
-}
-
-/************* URL handling ***************/
-
-function TextIsURI(selectedText)
-{
- return selectedText && /^http:\/\/|^https:\/\/|^file:\/\/|^ftp:\/\/|^about:|^mailto:|^news:|^snews:|^telnet:|^ldap:|^ldaps:|^gopher:|^finger:|^javascript:/i.test(selectedText);
-}
-
-function IsUrlAboutBlank(urlString)
-{
- return (urlString == "about:blank");
-}
-
-function MakeRelativeUrl(url)
-{
- let inputUrl = url.trim();
- if (!inputUrl)
- return inputUrl;
-
- // Get the filespec relative to current document's location
- // NOTE: Can't do this if file isn't saved yet!
- var docUrl = GetDocumentBaseUrl();
- var docScheme = GetScheme(docUrl);
-
- // Can't relativize if no doc scheme (page hasn't been saved)
- if (!docScheme)
- return inputUrl;
-
- var urlScheme = GetScheme(inputUrl);
-
- // Do nothing if not the same scheme or url is already relativized
- if (docScheme != urlScheme)
- return inputUrl;
-
- // Host must be the same
- var docHost = GetHost(docUrl);
- var urlHost = GetHost(inputUrl);
- if (docHost != urlHost)
- return inputUrl;
-
-
- // Get just the file path part of the urls
- // XXX Should we use GetCurrentEditor().documentCharacterSet for 2nd param ?
- let docPath = Services.io.newURI(docUrl, GetCurrentEditor().documentCharacterSet, null).path;
- let urlPath = Services.io.newURI(inputUrl, GetCurrentEditor().documentCharacterSet, null).path;
-
- // We only return "urlPath", so we can convert the entire docPath for
- // case-insensitive comparisons.
- var doCaseInsensitive = (docScheme == "file" &&
- AppConstants.platform == "win");
-
- if (doCaseInsensitive)
- docPath = docPath.toLowerCase();
-
- // Get document filename before we start chopping up the docPath
- var docFilename = GetFilename(docPath);
-
- // Both url and doc paths now begin with "/"
- // Look for shared dirs starting after that
- urlPath = urlPath.slice(1);
- docPath = docPath.slice(1);
-
- var firstDirTest = true;
- var nextDocSlash = 0;
- var done = false;
-
- // Remove all matching subdirs common to both doc and input urls
- do {
- nextDocSlash = docPath.indexOf("\/");
- var nextUrlSlash = urlPath.indexOf("\/");
-
- if (nextUrlSlash == -1)
- {
- // We're done matching and all dirs in url
- // what's left is the filename
- done = true;
-
- // Remove filename for named anchors in the same file
- if (nextDocSlash == -1 && docFilename)
- {
- var anchorIndex = urlPath.indexOf("#");
- if (anchorIndex > 0)
- {
- var urlFilename = doCaseInsensitive ? urlPath.toLowerCase() : urlPath;
-
- if (urlFilename.startsWith(docFilename))
- urlPath = urlPath.slice(anchorIndex);
- }
- }
- }
- else if (nextDocSlash >= 0)
- {
- // Test for matching subdir
- var docDir = docPath.slice(0, nextDocSlash);
- var urlDir = urlPath.slice(0, nextUrlSlash);
- if (doCaseInsensitive)
- urlDir = urlDir.toLowerCase();
-
- if (urlDir == docDir)
- {
- // Remove matching dir+"/" from each path
- // and continue to next dir.
- docPath = docPath.slice(nextDocSlash+1);
- urlPath = urlPath.slice(nextUrlSlash+1);
- }
- else
- {
- // No match, we're done.
- done = true;
-
- // Be sure we are on the same local drive or volume
- // (the first "dir" in the path) because we can't
- // relativize to different drives/volumes.
- // UNIX doesn't have volumes, so we must not do this else
- // the first directory will be misinterpreted as a volume name.
- if (firstDirTest && docScheme == "file" &&
- AppConstants.platform != "unix")
- return inputUrl;
- }
- }
- else // No more doc dirs left, we're done
- done = true;
-
- firstDirTest = false;
- }
- while (!done);
-
- // Add "../" for each dir left in docPath
- while (nextDocSlash > 0)
- {
- urlPath = "../" + urlPath;
- nextDocSlash = docPath.indexOf("\/", nextDocSlash+1);
- }
- return urlPath;
-}
-
-function MakeAbsoluteUrl(url)
-{
- let resultUrl = TrimString(url);
- if (!resultUrl)
- return resultUrl;
-
- // Check if URL is already absolute, i.e., it has a scheme
- let urlScheme = GetScheme(resultUrl);
-
- if (urlScheme)
- return resultUrl;
-
- let docUrl = GetDocumentBaseUrl();
- let docScheme = GetScheme(docUrl);
-
- // Can't relativize if no doc scheme (page hasn't been saved)
- if (!docScheme)
- return resultUrl;
-
- // Make a URI object to use its "resolve" method
- let absoluteUrl = resultUrl;
- let docUri = Services.io.newURI(docUrl, GetCurrentEditor().documentCharacterSet, null);
-
- try {
- absoluteUrl = docUri.resolve(resultUrl);
- // This is deprecated and buggy!
- // If used, we must make it a path for the parent directory (remove filename)
- //absoluteUrl = IOService.resolveRelativePath(resultUrl, docUrl);
- } catch (e) {}
-
- return absoluteUrl;
-}
-
-// Get the HREF of the page's <base> tag or the document location
-// returns empty string if no base href and document hasn't been saved yet
-function GetDocumentBaseUrl()
-{
- try {
- var docUrl;
-
- // if document supplies a <base> tag, use that URL instead
- let base = GetCurrentEditor().document.querySelector("base");
- if (base)
- docUrl = base.getAttribute("href");
- if (!docUrl)
- docUrl = GetDocumentUrl();
-
- if (!IsUrlAboutBlank(docUrl))
- return docUrl;
- } catch (e) {}
- return "";
-}
-
-function GetDocumentUrl()
-{
- try {
- var aDOMHTMLDoc = GetCurrentEditor().document.QueryInterface(Components.interfaces.nsIDOMHTMLDocument);
- return aDOMHTMLDoc.URL;
- }
- catch (e) {}
- return "";
-}
-
-// Extract the scheme (e.g., 'file', 'http') from a URL string
-function GetScheme(urlspec)
-{
- var resultUrl = TrimString(urlspec);
- // Unsaved document URL has no acceptable scheme yet
- if (!resultUrl || IsUrlAboutBlank(resultUrl))
- return "";
-
- var scheme = "";
- try {
- // This fails if there's no scheme
- scheme = Services.io.extractScheme(resultUrl);
- } catch (e) {}
-
- return scheme ? scheme.toLowerCase() : "";
-}
-
-function GetHost(urlspec)
-{
- if (!urlspec)
- return "";
-
- var host = "";
- try {
- host = Services.io.newURI(urlspec, null, null).host;
- } catch (e) {}
-
- return host;
-}
-
-function GetUsername(urlspec)
-{
- if (!urlspec)
- return "";
-
- var username = "";
- try {
- username = Services.io.newURI(urlspec, null, null).username;
- } catch (e) {}
-
- return username;
-}
-
-function GetFilename(urlspec)
-{
- if (!urlspec || IsUrlAboutBlank(urlspec))
- return "";
-
- var filename;
-
- try {
- let uri = Services.io.newURI(urlspec, null, null);
- if (uri)
- {
- let url = uri.QueryInterface(Components.interfaces.nsIURL);
- if (url)
- filename = url.fileName;
- }
- } catch (e) {}
-
- return filename ? filename : "";
-}
-
-// Return the url without username and password
-// Optional output objects return extracted username and password strings
-// This uses just string routines via nsIIOServices
-function StripUsernamePassword(urlspec, usernameObj, passwordObj)
-{
- urlspec = TrimString(urlspec);
- if (!urlspec || IsUrlAboutBlank(urlspec))
- return urlspec;
-
- if (usernameObj)
- usernameObj.value = "";
- if (passwordObj)
- passwordObj.value = "";
-
- // "@" must exist else we will never detect username or password
- var atIndex = urlspec.indexOf("@");
- if (atIndex > 0)
- {
- try {
- let uri = Services.io.newURI(urlspec, null, null);
- let username = uri.username;
- let password = uri.password;
-
- if (usernameObj && username)
- usernameObj.value = username;
- if (passwordObj && password)
- passwordObj.value = password;
- if (username)
- {
- let usernameStart = urlspec.indexOf(username);
- if (usernameStart != -1)
- return urlspec.slice(0, usernameStart) + urlspec.slice(atIndex+1);
- }
- } catch (e) {}
- }
- return urlspec;
-}
-
-function StripPassword(urlspec, passwordObj)
-{
- urlspec = TrimString(urlspec);
- if (!urlspec || IsUrlAboutBlank(urlspec))
- return urlspec;
-
- if (passwordObj)
- passwordObj.value = "";
-
- // "@" must exist else we will never detect password
- var atIndex = urlspec.indexOf("@");
- if (atIndex > 0)
- {
- try {
- let password = Services.io.newURI(urlspec, null, null).password;
-
- if (passwordObj && password)
- passwordObj.value = password;
- if (password)
- {
- // Find last ":" before "@"
- let colon = urlspec.lastIndexOf(":", atIndex);
- if (colon != -1)
- {
- // Include the "@"
- return urlspec.slice(0, colon) + urlspec.slice(atIndex);
- }
- }
- } catch (e) {}
- }
- return urlspec;
-}
-
-// Version to use when you have an nsIURI object
-function StripUsernamePasswordFromURI(uri)
-{
- var urlspec = "";
- if (uri)
- {
- try {
- urlspec = uri.spec;
- var userPass = uri.userPass;
- if (userPass)
- {
- start = urlspec.indexOf(userPass);
- urlspec = urlspec.slice(0, start) + urlspec.slice(start+userPass.length+1);
- }
- } catch (e) {}
- }
- return urlspec;
-}
-
-function InsertUsernameIntoUrl(urlspec, username)
-{
- if (!urlspec || !username)
- return urlspec;
-
- try {
- let URI = Services.io.newURI(urlspec, GetCurrentEditor().documentCharacterSet, null);
- URI.username = username;
- return URI.spec;
- } catch (e) {}
-
- return urlspec;
-}
-
-function ConvertRGBColorIntoHEXColor(color)
-{
- if ( /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.test(color) ) {
- var r = Number(RegExp.$1).toString(16);
- if (r.length == 1) r = "0"+r;
- var g = Number(RegExp.$2).toString(16);
- if (g.length == 1) g = "0"+g;
- var b = Number(RegExp.$3).toString(16);
- if (b.length == 1) b = "0"+b;
- return "#"+r+g+b;
- }
- else
- {
- return color;
- }
-}
-
-/************* CSS ***************/
-
-function GetHTMLOrCSSStyleValue(element, attrName, cssPropertyName)
-{
- var value;
- if (Services.prefs.getBoolPref("editor.use_css") && IsHTMLEditor())
- value = element.style.getPropertyValue(cssPropertyName);
-
- if (!value)
- value = element.getAttribute(attrName);
-
- if (!value)
- return "";
-
- return value;
-}
-
-/************* Miscellaneous ***************/
-// Clone simple JS objects
-function Clone(obj)
-{
- var clone = {};
- for (var i in obj)
- {
- if (typeof obj[i] == 'object')
- clone[i] = Clone(obj[i]);
- else
- clone[i] = obj[i];
- }
- return clone;
-}
-
-/**
- * Utility funtions to handle shortended data: URLs in EdColorProps.js and EdImageOverlay.js.
- */
-
-/**
- * Is the passed in image URI a shortened data URI?
- * @return {bool}
- */
-function isImageDataShortened(aImageData) {
- return (/^data:/i.test(aImageData) && aImageData.includes("…"));
-}
-
-/**
- * Event handler for Copy or Cut
- * @param aEvent the event
- */
-function onCopyOrCutShortened(aEvent) {
- // Put the original data URI onto the clipboard in case the value
- // is a shortened data URI.
- let field = aEvent.target;
- let startPos = field.selectionStart;
- if (startPos == undefined)
- return;
- let endPos = field.selectionEnd;
- let selection = field.value.substring(startPos, endPos).trim();
-
- // Test that a) the user selected the whole value,
- // b) the value is a data URI,
- // c) it contains the ellipsis we added. Otherwise it could be
- // a new value that the user pasted in.
- if (selection == field.value.trim() && isImageDataShortened(selection)) {
- aEvent.clipboardData.setData("text/plain", field.fullDataURI);
- if (aEvent.type == "cut") {
- // We have to cut the selection manually. Since we tested that
- // everything was selected, we can just reset the field.
- field.value = "";
- }
- aEvent.preventDefault();
- }
-}
-
-/**
- * Set up element showing an image URI with a shortened version.
- * and add event handler for Copy or Cut.
- *
- * @param aImageData the data: URL of the image to be shortened.
- * Note: Original stored in 'aDialogField.fullDataURI'.
- * @param aDialogField The field of the dialog to contain the data.
- * @return {bool} URL was shortened?
- */
-function shortenImageData(aImageData, aDialogField) {
- let shortened = false;
- aDialogField.value = aImageData.replace(/^(data:.+;base64,)(.*)/i,
- function(match, nonDataPart, dataPart) {
- if (dataPart.length <= 35)
- return match;
-
- shortened = true;
- aDialogField.addEventListener("copy", onCopyOrCutShortened);
- aDialogField.addEventListener("cut", onCopyOrCutShortened);
- aDialogField.fullDataURI = aImageData;
- return nonDataPart + dataPart.substring(0, 5) + "…" +
- dataPart.substring(dataPart.length - 30);
- });
- return shortened;
-}
-
-/**
- * Return full data URIs for a shortened element.
- *
- * @param aDialogField The field of the dialog containing the data.
- */
-function restoredImageData(aDialogField) {
- return aDialogField.fullDataURI;
-}
diff --git a/editor/ui/composer/content/images/tag-anchor.gif b/editor/ui/composer/content/images/tag-anchor.gif
deleted file mode 100644
index ccb809b50..000000000
--- a/editor/ui/composer/content/images/tag-anchor.gif
+++ /dev/null
Binary files differ
diff --git a/editor/ui/dialogs/content/EdAEAttributes.js b/editor/ui/dialogs/content/EdAEAttributes.js
deleted file mode 100644
index a92a7b093..000000000
--- a/editor/ui/dialogs/content/EdAEAttributes.js
+++ /dev/null
@@ -1,1811 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// HTML Attributes object for "Name" menulist
-var gHTMLAttr = {};
-
-// JS Events Attributes object for "Name" menulist
-var gJSAttr = {};
-
-
-// Core HTML attribute values //
-// This is appended to Name menulist when "_core" is attribute name
-var gCoreHTMLAttr =
-[
- "^id",
- "class",
- "title"
-];
-
-// Core event attribute values //
-// This is appended to all JS menulists
-// except those elements having "noJSEvents"
-// as a value in their gJSAttr array.
-var gCoreJSEvents =
-[
- "onclick",
- "ondblclick",
- "onmousedown",
- "onmouseup",
- "onmouseover",
- "onmousemove",
- "onmouseout",
- "-",
- "onkeypress",
- "onkeydown",
- "onkeyup"
-];
-
-// Following are commonly-used strings
-
-// Alse accept: sRGB: #RRGGBB //
-var gHTMLColors =
-[
- "Aqua",
- "Black",
- "Blue",
- "Fuchsia",
- "Gray",
- "Green",
- "Lime",
- "Maroon",
- "Navy",
- "Olive",
- "Purple",
- "Red",
- "Silver",
- "Teal",
- "White",
- "Yellow"
-];
-
-var gHAlign =
-[
- "left",
- "center",
- "right"
-];
-
-var gHAlignJustify =
-[
- "left",
- "center",
- "right",
- "justify"
-];
-
-var gHAlignTableContent =
-[
- "left",
- "center",
- "right",
- "justify",
- "char"
-];
-
-var gVAlignTable =
-[
- "top",
- "middle",
- "bottom",
- "baseline"
-];
-
-var gTarget =
-[
- "_blank",
- "_self",
- "_parent",
- "_top"
-];
-
-// ================ HTML Attributes ================ //
-/* For each element, there is an array of attributes,
- whose name is the element name,
- used to fill the "Attribute Name" menulist.
- For each of those attributes, if they have a specific
- set of values, those are listed in an array named:
- "elementName_attName".
-
- In each values string, the following characters
- are signal to do input filtering:
- "#" Allow only integer values
- "%" Allow integer values or a number ending in "%"
- "+" Allow integer values and allow "+" or "-" as first character
- "!" Allow only one character
- "^" The first character can be only be A-Z, a-z, hyphen, underscore, colon or period
- "$" is an attribute required by HTML DTD
-*/
-
-/*
- Most elements have the "dir" attribute,
- so we use this value array
- for all elements instead of specifying
- separately for each element
-*/
-gHTMLAttr.all_dir =
-[
- "ltr",
- "rtl"
-];
-
-
-gHTMLAttr.a =
-[
- "charset",
- "type",
- "name",
- "href",
- "^hreflang",
- "target",
- "rel",
- "rev",
- "!accesskey",
- "shape", // with imagemap //
- "coords", // with imagemap //
- "#tabindex",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.a_target = gTarget;
-
-gHTMLAttr.a_rel =
-[
- "alternate",
- "stylesheet",
- "start",
- "next",
- "prev",
- "contents",
- "index",
- "glossary",
- "copyright",
- "chapter",
- "section",
- "subsection",
- "appendix",
- "help",
- "bookmark"
-];
-
-gHTMLAttr.a_rev =
-[
- "alternate",
- "stylesheet",
- "start",
- "next",
- "prev",
- "contents",
- "index",
- "glossary",
- "copyright",
- "chapter",
- "section",
- "subsection",
- "appendix",
- "help",
- "bookmark"
-];
-
-gHTMLAttr.a_shape =
-[
- "rect",
- "circle",
- "poly",
- "default"
-];
-
-gHTMLAttr.abbr =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.acronym =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.address =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-// this is deprecated //
-gHTMLAttr.applet =
-[
- "codebase",
- "archive",
- "code",
- "object",
- "alt",
- "name",
- "%$width",
- "%$height",
- "align",
- "#hspace",
- "#vspace",
- "-",
- "_core"
-];
-
-gHTMLAttr.applet_align =
-[
- "top",
- "middle",
- "bottom",
- "left",
- "right"
-];
-
-gHTMLAttr.area =
-[
- "shape",
- "coords",
- "href",
- "nohref",
- "target",
- "$alt",
- "#tabindex",
- "!accesskey",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.area_target = gTarget;
-
-gHTMLAttr.area_shape =
-[
- "rect",
- "circle",
- "poly",
- "default"
-];
-
-gHTMLAttr.area_nohref =
-[
- "nohref"
-];
-
-gHTMLAttr.b =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.base =
-[
- "href",
- "target"
-];
-
-gHTMLAttr.base_target = gTarget;
-
-// this is deprecated //
-gHTMLAttr.basefont =
-[
- "^id",
- "$size",
- "color",
- "face"
-];
-
-gHTMLAttr.basefont_color = gHTMLColors;
-
-gHTMLAttr.bdo =
-[
- "_core",
- "-",
- "^lang",
- "$dir"
-];
-
-gHTMLAttr.bdo_dir =
-[
- "ltr",
- "rtl"
-];
-
-gHTMLAttr.big =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.blockquote =
-[
- "cite",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.body =
-[
- "background",
- "bgcolor",
- "text",
- "link",
- "vlink",
- "alink",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.body_bgcolor = gHTMLColors;
-
-gHTMLAttr.body_text = gHTMLColors;
-
-gHTMLAttr.body_link = gHTMLColors;
-
-gHTMLAttr.body_vlink = gHTMLColors;
-
-gHTMLAttr.body_alink = gHTMLColors;
-
-gHTMLAttr.br =
-[
- "clear",
- "-",
- "_core"
-];
-
-gHTMLAttr.br_clear =
-[
- "none",
- "left",
- "all",
- "right"
-];
-
-gHTMLAttr.button =
-[
- "name",
- "value",
- "$type",
- "disabled",
- "#tabindex",
- "!accesskey",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.button_type =
-[
- "submit",
- "button",
- "reset"
-];
-
-gHTMLAttr.button_disabled =
-[
- "disabled"
-];
-
-gHTMLAttr.caption =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.caption_align =
-[
- "top",
- "bottom",
- "left",
- "right"
-];
-
-
-// this is deprecated //
-gHTMLAttr.center =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.cite =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.code =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.col =
-[
- "#$span",
- "%width",
- "align",
- "!char",
- "#charoff",
- "valign",
- "char",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.col_span =
-[
- "1" // default
-];
-
-gHTMLAttr.col_align = gHAlignTableContent;
-
-gHTMLAttr.col_valign =
-[
- "top",
- "middle",
- "bottom",
- "baseline"
-];
-
-
-gHTMLAttr.colgroup =
-[
- "#$span",
- "%width",
- "align",
- "!char",
- "#charoff",
- "valign",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.colgroup_span =
-[
- "1" // default
-];
-
-gHTMLAttr.colgroup_align = gHAlignTableContent;
-
-gHTMLAttr.colgroup_valign =
-[
- "top",
- "middle",
- "bottom",
- "baseline"
-];
-
-gHTMLAttr.dd =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.del =
-[
- "cite",
- "datetime",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.dfn =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-// this is deprecated //
-gHTMLAttr.dir =
-[
- "compact",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.dir_compact =
-[
- "compact"
-];
-
-gHTMLAttr.div =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.div_align = gHAlignJustify;
-
-gHTMLAttr.dl =
-[
- "compact",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.dl_compact =
-[
- "compact"
-];
-
-
-gHTMLAttr.dt =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.em =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.fieldset =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-// this is deprecated //
-gHTMLAttr.font =
-[
- "+size",
- "color",
- "face",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.font_color = gHTMLColors;
-
-gHTMLAttr.form =
-[
- "$action",
- "$method",
- "enctype",
- "accept",
- "name",
- "accept-charset",
- "target",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.form_method =
-[
- "get",
- "post"
-];
-
-gHTMLAttr.form_enctype =
-[
- "application/x-www-form-urlencoded"
-];
-
-gHTMLAttr.form_target = gTarget;
-
-gHTMLAttr.frame =
-[
- "longdesc",
- "name",
- "src",
- "#frameborder",
- "#marginwidth",
- "#marginheight",
- "noresize",
- "$scrolling"
-];
-
-gHTMLAttr.frame_frameborder =
-[
- "1",
- "0"
-];
-
-gHTMLAttr.frame_noresize =
-[
- "noresize"
-];
-
-gHTMLAttr.frame_scrolling =
-[
- "auto",
- "yes",
- "no"
-];
-
-
-gHTMLAttr.frameset =
-[
- "rows",
- "cols",
- "-",
- "_core"
-];
-
-gHTMLAttr.h1 =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.h1_align = gHAlignJustify;
-
-gHTMLAttr.h2 =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.h2_align = gHAlignJustify;
-
-gHTMLAttr.h3 =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.h3_align = gHAlignJustify;
-
-gHTMLAttr.h4 =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.h4_align = gHAlignJustify;
-
-
-gHTMLAttr.h5 =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.h5_align = gHAlignJustify;
-
-gHTMLAttr.h6 =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.h6_align = gHAlignJustify;
-
-gHTMLAttr.head =
-[
- "profile",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.hr =
-[
- "align",
- "noshade",
- "#size",
- "%width",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.hr_align = gHAlign;
-
-gHTMLAttr.hr_noshade =
-[
- "noshade"
-];
-
-
-gHTMLAttr.html =
-[
- "version",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.i =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.iframe =
-[
- "longdesc",
- "name",
- "src",
- "$frameborder",
- "marginwidth",
- "marginheight",
- "$scrolling",
- "align",
- "%height",
- "%width",
- "-",
- "_core"
-];
-
-gHTMLAttr.iframe_frameborder =
-[
- "1",
- "0"
-];
-
-gHTMLAttr.iframe_scrolling =
-[
- "auto",
- "yes",
- "no"
-];
-
-gHTMLAttr.iframe_align =
-[
- "top",
- "middle",
- "bottom",
- "left",
- "right"
-];
-
-gHTMLAttr.img =
-[
- "$src",
- "$alt",
- "longdesc",
- "name",
- "%height",
- "%width",
- "usemap",
- "ismap",
- "align",
- "#border",
- "#hspace",
- "#vspace",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.img_ismap =
-[
- "ismap"
-];
-
-gHTMLAttr.img_align =
-[
- "top",
- "middle",
- "bottom",
- "left",
- "right"
-];
-
-gHTMLAttr.input =
-[
- "$type",
- "name",
- "value",
- "checked",
- "disabled",
- "readonly",
- "#size",
- "#maxlength",
- "src",
- "alt",
- "usemap",
- "ismap",
- "#tabindex",
- "!accesskey",
- "accept",
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.input_type =
-[
- "text",
- "password",
- "checkbox",
- "radio",
- "submit",
- "reset",
- "file",
- "hidden",
- "image",
- "button"
-];
-
-gHTMLAttr.input_checked =
-[
- "checked"
-];
-
-gHTMLAttr.input_disabled =
-[
- "disabled"
-];
-
-gHTMLAttr.input_readonly =
-[
- "readonly"
-];
-
-
-gHTMLAttr.input_ismap =
-[
- "ismap"
-];
-
-
-gHTMLAttr.input_align =
-[
- "top",
- "middle",
- "bottom",
- "left",
- "right"
-];
-
-gHTMLAttr.ins =
-[
- "cite",
- "datetime",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.isindex =
-[
- "prompt",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.kbd =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.label =
-[
- "for",
- "!accesskey",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.legend =
-[
- "!accesskey",
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.legend_align =
-[
- "top",
- "bottom",
- "left",
- "right"
-];
-
-gHTMLAttr.li =
-[
- "type",
- "#value",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.li_type =
-[
- "disc",
- "square",
- "circle",
- "-",
- "1",
- "a",
- "A",
- "i",
- "I"
-];
-
-gHTMLAttr.link =
-[
- "charset",
- "href",
- "^hreflang",
- "type",
- "rel",
- "rev",
- "media",
- "target",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.link_target = gTarget;
-
-gHTMLAttr.link_rel =
-[
- "alternate",
- "stylesheet",
- "start",
- "next",
- "prev",
- "contents",
- "index",
- "glossary",
- "copyright",
- "chapter",
- "section",
- "subsection",
- "appendix",
- "help",
- "bookmark"
-];
-
-gHTMLAttr.link_rev =
-[
- "alternate",
- "stylesheet",
- "start",
- "next",
- "prev",
- "contents",
- "index",
- "glossary",
- "copyright",
- "chapter",
- "section",
- "subsection",
- "appendix",
- "help",
- "bookmark"
-];
-
-gHTMLAttr.map =
-[
- "$name",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.menu =
-[
- "compact",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.menu_compact =
-[
- "compact"
-];
-
-gHTMLAttr.meta =
-[
- "http-equiv",
- "name",
- "$content",
- "scheme",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.noframes =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.noscript =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.object =
-[
- "declare",
- "classid",
- "codebase",
- "data",
- "type",
- "codetype",
- "archive",
- "standby",
- "%height",
- "%width",
- "usemap",
- "name",
- "#tabindex",
- "align",
- "#border",
- "#hspace",
- "#vspace",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.object_declare =
-[
- "declare"
-];
-
-gHTMLAttr.object_align =
-[
- "top",
- "middle",
- "bottom",
- "left",
- "right"
-];
-
-gHTMLAttr.ol =
-[
- "type",
- "compact",
- "#start",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.ol_type =
-[
- "1",
- "a",
- "A",
- "i",
- "I"
-];
-
-gHTMLAttr.ol_compact =
-[
- "compact"
-];
-
-
-gHTMLAttr.optgroup =
-[
- "disabled",
- "$label",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.optgroup_disabled =
-[
- "disabled"
-];
-
-
-gHTMLAttr.option =
-[
- "selected",
- "disabled",
- "label",
- "value",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.option_selected =
-[
- "selected"
-];
-
-gHTMLAttr.option_disabled =
-[
- "disabled"
-];
-
-
-gHTMLAttr.p =
-[
- "align",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.p_align = gHAlignJustify;
-
-gHTMLAttr.param =
-[
- "^id",
- "$name",
- "value",
- "$valuetype",
- "type"
-];
-
-gHTMLAttr.param_valuetype =
-[
- "data",
- "ref",
- "object"
-];
-
-
-gHTMLAttr.pre =
-[
- "%width",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.q =
-[
- "cite",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.s =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.samp =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.script =
-[
- "charset",
- "$type",
- "language",
- "src",
- "defer"
-];
-
-gHTMLAttr.script_defer =
-[
- "defer"
-];
-
-
-gHTMLAttr.select =
-[
- "name",
- "#size",
- "multiple",
- "disabled",
- "#tabindex",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.select_multiple =
-[
- "multiple"
-];
-
-gHTMLAttr.select_disabled =
-[
- "disabled"
-];
-
-gHTMLAttr.small =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.span =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.strike =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.strong =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.style =
-[
- "$type",
- "media",
- "title",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.sub =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.sup =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.table =
-[
- "summary",
- "%width",
- "#border",
- "frame",
- "rules",
- "#cellspacing",
- "#cellpadding",
- "align",
- "bgcolor",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.table_frame =
-[
- "void",
- "above",
- "below",
- "hsides",
- "lhs",
- "rhs",
- "vsides",
- "box",
- "border"
-];
-
-gHTMLAttr.table_rules =
-[
- "none",
- "groups",
- "rows",
- "cols",
- "all"
-];
-
-// Note; This is alignment of the table,
-// not table contents, like all other table child elements
-gHTMLAttr.table_align = gHAlign;
-
-gHTMLAttr.table_bgcolor = gHTMLColors;
-
-gHTMLAttr.tbody =
-[
- "align",
- "!char",
- "#charoff",
- "valign",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.tbody_align = gHAlignTableContent;
-
-gHTMLAttr.tbody_valign = gVAlignTable;
-
-gHTMLAttr.td =
-[
- "abbr",
- "axis",
- "headers",
- "scope",
- "$#rowspan",
- "$#colspan",
- "align",
- "!char",
- "#charoff",
- "valign",
- "nowrap",
- "bgcolor",
- "%width",
- "%height",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.td_scope =
-[
- "row",
- "col",
- "rowgroup",
- "colgroup"
-];
-
-gHTMLAttr.td_rowspan =
-[
- "1" // default
-];
-
-gHTMLAttr.td_colspan =
-[
- "1" // default
-];
-
-gHTMLAttr.td_align = gHAlignTableContent;
-
-gHTMLAttr.td_valign = gVAlignTable;
-
-gHTMLAttr.td_nowrap =
-[
- "nowrap"
-];
-
-gHTMLAttr.td_bgcolor = gHTMLColors;
-
-gHTMLAttr.textarea =
-[
- "name",
- "$#rows",
- "$#cols",
- "disabled",
- "readonly",
- "#tabindex",
- "!accesskey",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.textarea_disabled =
-[
- "disabled"
-];
-
-gHTMLAttr.textarea_readonly =
-[
- "readonly"
-];
-
-
-gHTMLAttr.tfoot =
-[
- "align",
- "!char",
- "#charoff",
- "valign",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.tfoot_align = gHAlignTableContent;
-
-gHTMLAttr.tfoot_valign = gVAlignTable;
-
-gHTMLAttr.th =
-[
- "abbr",
- "axis",
- "headers",
- "scope",
- "$#rowspan",
- "$#colspan",
- "align",
- "!char",
- "#charoff",
- "valign",
- "nowrap",
- "bgcolor",
- "%width",
- "%height",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.th_scope =
-[
- "row",
- "col",
- "rowgroup",
- "colgroup"
-];
-
-gHTMLAttr.th_rowspan =
-[
- "1" // default
-];
-
-gHTMLAttr.th_colspan =
-[
- "1" // default
-];
-
-gHTMLAttr.th_align = gHAlignTableContent;
-
-gHTMLAttr.th_valign = gVAlignTable;
-
-gHTMLAttr.th_nowrap =
-[
- "nowrap"
-];
-
-gHTMLAttr.th_bgcolor = gHTMLColors;
-
-gHTMLAttr.thead =
-[
- "align",
- "!char",
- "#charoff",
- "valign",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.thead_align = gHAlignTableContent;
-
-gHTMLAttr.thead_valign = gVAlignTable;
-
-gHTMLAttr.title =
-[
- "^lang",
- "dir"
-];
-
-gHTMLAttr.tr =
-[
- "align",
- "!char",
- "#charoff",
- "valign",
- "bgcolor",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.tr_align = gHAlignTableContent;
-
-gHTMLAttr.tr_valign = gVAlignTable;
-
-gHTMLAttr.tr_bgcolor = gHTMLColors;
-
-gHTMLAttr.tt =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.u =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-gHTMLAttr.ul =
-[
- "type",
- "compact",
- "-",
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-gHTMLAttr.ul_type =
-[
- "disc",
- "square",
- "circle"
-];
-
-gHTMLAttr.ul_compact =
-[
- "compact"
-];
-
-
-// Prefix with "_" since this is reserved (it's stripped out)
-gHTMLAttr._var =
-[
- "_core",
- "-",
- "^lang",
- "dir"
-];
-
-// ================ JS Attributes ================ //
-// These are element specif even handlers.
-/* Most all elements use gCoreJSEvents, so those
- are assumed except for those listed here with "noEvents"
-*/
-
-gJSAttr.a =
-[
- "onfocus",
- "onblur"
-];
-
-gJSAttr.area =
-[
- "onfocus",
- "onblur"
-];
-
-gJSAttr.body =
-[
- "onload",
- "onupload"
-];
-
-gJSAttr.button =
-[
- "onfocus",
- "onblur"
-];
-
-gJSAttr.form =
-[
- "onsubmit",
- "onreset"
-];
-
-gJSAttr.frameset =
-[
- "onload",
- "onunload"
-];
-
-gJSAttr.input =
-[
- "onfocus",
- "onblur",
- "onselect",
- "onchange"
-];
-
-gJSAttr.label =
-[
- "onfocus",
- "onblur"
-];
-
-gJSAttr.select =
-[
- "onfocus",
- "onblur",
- "onchange"
-];
-
-gJSAttr.textarea =
-[
- "onfocus",
- "onblur",
- "onselect",
- "onchange"
-];
-
-// Elements that don't have JSEvents:
-gJSAttr.font =
-[
- "noJSEvents"
-];
-
-gJSAttr.applet =
-[
- "noJSEvents"
-];
-
-gJSAttr.isindex =
-[
- "noJSEvents"
-];
-
-gJSAttr.iframe =
-[
- "noJSEvents"
-];
-
diff --git a/editor/ui/dialogs/content/EdAECSSAttributes.js b/editor/ui/dialogs/content/EdAECSSAttributes.js
deleted file mode 100644
index 9cb05c9a1..000000000
--- a/editor/ui/dialogs/content/EdAECSSAttributes.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// build attribute list in tree form from element attributes
-function BuildCSSAttributeTable()
-{
- var style = gElement.style;
- if (style == undefined)
- {
- dump("Inline styles undefined\n");
- return;
- }
-
- var declLength = style.length;
-
- if (declLength == undefined || declLength == 0)
- {
- if (declLength == undefined) {
- dump("Failed to query the number of inline style declarations\n");
- }
-
- return;
- }
-
- if (declLength > 0)
- {
- for (var i = 0; i < declLength; ++i)
- {
- var name = style.item(i);
- var value = style.getPropertyValue(name);
- AddTreeItem( name, value, "CSSAList", CSSAttrs );
- }
- }
-
- ClearCSSInputWidgets();
-}
-
-function onChangeCSSAttribute()
-{
- var name = TrimString(gDialog.AddCSSAttributeNameInput.value);
- if ( !name )
- return;
-
- var value = TrimString(gDialog.AddCSSAttributeValueInput.value);
-
- // First try to update existing attribute
- // If not found, add new attribute
- if ( !UpdateExistingAttribute( name, value, "CSSAList" ) && value)
- AddTreeItem( name, value, "CSSAList", CSSAttrs );
-}
-
-function ClearCSSInputWidgets()
-{
- gDialog.AddCSSAttributeTree.view.selection.clearSelection();
- gDialog.AddCSSAttributeNameInput.value ="";
- gDialog.AddCSSAttributeValueInput.value = "";
- SetTextboxFocus(gDialog.AddCSSAttributeNameInput);
-}
-
-function onSelectCSSTreeItem()
-{
- if (!gDoOnSelectTree)
- return;
-
- var tree = gDialog.AddCSSAttributeTree;
- if (tree && tree.view.selection.count)
- {
- gDialog.AddCSSAttributeNameInput.value = GetTreeItemAttributeStr(getSelectedItem(tree));
- gDialog.AddCSSAttributeValueInput.value = GetTreeItemValueStr(getSelectedItem(tree));
- }
-}
-
-function onInputCSSAttributeName()
-{
- var attName = TrimString(gDialog.AddCSSAttributeNameInput.value).toLowerCase();
- var newValue = "";
-
- var existingValue = GetAndSelectExistingAttributeValue(attName, "CSSAList");
- if (existingValue)
- newValue = existingValue;
-
- gDialog.AddCSSAttributeValueInput.value = newValue;
-}
-
-function editCSSAttributeValue(targetCell)
-{
- if (IsNotTreeHeader(targetCell))
- gDialog.AddCSSAttributeValueInput.inputField.select();
-}
-
-function UpdateCSSAttributes()
-{
- var CSSAList = document.getElementById("CSSAList");
- var styleString = "";
- for(var i = 0; i < CSSAList.childNodes.length; i++)
- {
- var item = CSSAList.childNodes[i];
- var name = GetTreeItemAttributeStr(item);
- var value = GetTreeItemValueStr(item);
- // this code allows users to be sloppy in typing in values, and enter
- // things like "foo: " and "bar;". This will trim off everything after the
- // respective character.
- if (name.includes(":"))
- name = name.substring(0, name.lastIndexOf(":"));
- if (value.includes(";"))
- value = value.substring(0, value.lastIndexOf(";"));
- if (i == (CSSAList.childNodes.length - 1))
- styleString += name + ": " + value + ";"; // last property
- else
- styleString += name + ": " + value + "; ";
- }
- if (styleString)
- {
- // Use editor transactions if modifying the element directly in the document
- doRemoveAttribute("style");
- doSetAttribute("style", styleString); // NOTE BUG 18894!!!
- }
- else if (gElement.getAttribute("style"))
- doRemoveAttribute("style");
-}
-
-function RemoveCSSAttribute()
-{
- // We only allow 1 selected item
- if (gDialog.AddCSSAttributeTree.view.selection.count)
- {
- // Remove the item from the tree
- // We always rebuild complete "style" string,
- // so no list of "removed" items
- getSelectedItem(gDialog.AddCSSAttributeTree).remove();
-
- ClearCSSInputWidgets();
- }
-}
-
-function SelectCSSTree( index )
-{
- gDoOnSelectTree = false;
- try {
- gDialog.AddCSSAttributeTree.selectedIndex = index;
- } catch (e) {}
- gDoOnSelectTree = true;
-}
diff --git a/editor/ui/dialogs/content/EdAEHTMLAttributes.js b/editor/ui/dialogs/content/EdAEHTMLAttributes.js
deleted file mode 100644
index a0a0d450d..000000000
--- a/editor/ui/dialogs/content/EdAEHTMLAttributes.js
+++ /dev/null
@@ -1,366 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function BuildHTMLAttributeNameList()
-{
- gDialog.AddHTMLAttributeNameInput.removeAllItems();
-
- var elementName = gElement.localName;
- var attNames = gHTMLAttr[elementName];
-
- if (attNames && attNames.length)
- {
- var menuitem;
-
- for (var i = 0; i < attNames.length; i++)
- {
- var name = attNames[i];
-
- if (name == "_core")
- {
- // Signal to append the common 'core' attributes.
- for (var j = 0; j < gCoreHTMLAttr.length; j++)
- {
- name = gCoreHTMLAttr[j];
-
- // only filtering rule used for core attributes as of 8-20-01
- // Add more rules if necessary.
- if (name.includes("^"))
- {
- menuitem = gDialog.AddHTMLAttributeNameInput.appendItem(name.replace(/\^/g, ""));
- menuitem.setAttribute("limitFirstChar", "true");
- }
- else
- gDialog.AddHTMLAttributeNameInput.appendItem(name);
- }
- }
- else if (name == "-")
- {
- // Signal for separator
- var popup = gDialog.AddHTMLAttributeNameInput.firstChild;
- if (popup)
- {
- var sep = document.createElementNS(XUL_NS, "menuseparator");
- if (sep)
- popup.appendChild(sep);
- }
- }
- else
- {
- // Get information about value filtering
- let forceOneChar = name.includes("!");
- let forceInteger = name.includes("#");
- let forceSignedInteger = name.includes("+");
- let forceIntOrPercent = name.includes("%");
- let limitFirstChar = name.includes("\^");
- //let required = name.includes("$");
-
- // Strip flag characters
- name = name.replace(/[!^#%$+]/g, "");
-
- menuitem = gDialog.AddHTMLAttributeNameInput.appendItem(name);
- if (menuitem)
- {
- // Signify "required" attributes by special style
- //TODO: Don't do this until next version, when we add
- // explanatory text and an 'Autofill Required Attributes' button
- //if (required)
- // menuitem.setAttribute("class", "menuitem-highlight-1");
-
- // Set flags to filter value input
- if (forceOneChar)
- menuitem.setAttribute("forceOneChar","true");
- if (limitFirstChar)
- menuitem.setAttribute("limitFirstChar", "true");
- if (forceInteger)
- menuitem.setAttribute("forceInteger", "true");
- if (forceSignedInteger)
- menuitem.setAttribute("forceSignedInteger", "true");
- if (forceIntOrPercent)
- menuitem.setAttribute("forceIntOrPercent", "true");
- }
- }
- }
- }
-}
-
-// build attribute list in tree form from element attributes
-function BuildHTMLAttributeTable()
-{
- var nodeMap = gElement.attributes;
- var i;
- if (nodeMap.length > 0)
- {
- var added = false;
- for(i = 0; i < nodeMap.length; i++)
- {
- let name = nodeMap[i].name.trim().toLowerCase();
- if ( CheckAttributeNameSimilarity( nodeMap[i].nodeName, HTMLAttrs ) ||
- name.startsWith("on") || name == "style" ) {
- continue; // repeated or non-HTML attribute, ignore this one and go to next
- }
- if (!name.startsWith("_moz") &&
- AddTreeItem(name, nodeMap[i].value, "HTMLAList", HTMLAttrs))
- {
- added = true;
- }
- }
-
- if (added)
- SelectHTMLTree(0);
- }
-}
-
-function ClearHTMLInputWidgets()
-{
- gDialog.AddHTMLAttributeTree.view.selection.clearSelection();
- gDialog.AddHTMLAttributeNameInput.value ="";
- gDialog.AddHTMLAttributeValueInput.value = "";
- SetTextboxFocus(gDialog.AddHTMLAttributeNameInput);
-}
-
-function onSelectHTMLTreeItem()
-{
- if (!gDoOnSelectTree)
- return;
-
- var tree = gDialog.AddHTMLAttributeTree;
- if (tree && tree.view.selection.count)
- {
- var inputName = TrimString(gDialog.AddHTMLAttributeNameInput.value).toLowerCase();
- var selectedItem = getSelectedItem(tree);
- var selectedName = selectedItem.firstChild.firstChild.getAttribute("label");
-
- if (inputName == selectedName)
- {
- // Already editing selected name - just update the value input
- gDialog.AddHTMLAttributeValueInput.value = GetTreeItemValueStr(selectedItem);
- }
- else
- {
- gDialog.AddHTMLAttributeNameInput.value = selectedName;
-
- // Change value input based on new selected name
- onInputHTMLAttributeName();
- }
- }
-}
-
-function onInputHTMLAttributeName()
-{
- let attName = gDialog.AddHTMLAttributeNameInput.value.toLowerCase().trim();
-
- // Clear value widget, but prevent triggering update in tree
- gUpdateTreeValue = false;
- gDialog.AddHTMLAttributeValueInput.value = "";
- gUpdateTreeValue = true;
-
- if (attName)
- {
- // Get value list for current attribute name
- var valueListName;
-
- // Most elements have the "dir" attribute,
- // so we have just one array for the allowed values instead
- // requiring duplicate entries for each element in EdAEAttributes.js
- if (attName == "dir")
- valueListName = "all_dir";
- else
- valueListName = gElement.localName + "_" + attName;
-
- // Strip off leading "_" we sometimes use (when element name is reserved word)
- if (valueListName.startsWith("_"))
- valueListName = valueListName.slice(1);
-
- var newValue = "";
- var listLen = 0;
-
- // Index to which widget we were using to edit the value
- var deckIndex = gDialog.AddHTMLAttributeValueDeck.getAttribute("selectedIndex");
-
- if (valueListName in gHTMLAttr)
- {
- var valueList = gHTMLAttr[valueListName];
-
- listLen = valueList.length;
- if (listLen == 1)
- newValue = valueList[0];
-
- // Note: For case where "value list" is actually just
- // one (default) item, don't use menulist for that
- if (listLen > 1)
- {
- gDialog.AddHTMLAttributeValueMenulist.removeAllItems();
-
- if (deckIndex != "1")
- {
- // Switch to using editable menulist
- gDialog.AddHTMLAttributeValueInput = gDialog.AddHTMLAttributeValueMenulist;
- gDialog.AddHTMLAttributeValueDeck.setAttribute("selectedIndex", "1");
- }
- // Rebuild the list
- for (var i = 0; i < listLen; i++)
- {
- if (valueList[i] == "-")
- {
- // Signal for separator
- var popup = gDialog.AddHTMLAttributeValueInput.firstChild;
- if (popup)
- {
- var sep = document.createElementNS(XUL_NS, "menuseparator");
- if (sep)
- popup.appendChild(sep);
- }
- } else {
- gDialog.AddHTMLAttributeValueMenulist.appendItem(valueList[i]);
- }
- }
- }
- }
-
- if (listLen <= 1 && deckIndex != "0")
- {
- // No list: Use textbox for input instead
- gDialog.AddHTMLAttributeValueInput = gDialog.AddHTMLAttributeValueTextbox;
- gDialog.AddHTMLAttributeValueDeck.setAttribute("selectedIndex", "0");
- }
-
- // If attribute already exists in tree, use associated value,
- // else use default found above
- var existingValue = GetAndSelectExistingAttributeValue(attName, "HTMLAList");
- if (existingValue)
- newValue = existingValue;
-
- gDialog.AddHTMLAttributeValueInput.value = newValue;
-
- if (!existingValue)
- onInputHTMLAttributeValue();
- }
-}
-
-function onInputHTMLAttributeValue()
-{
- if (!gUpdateTreeValue)
- return;
-
- var name = TrimString(gDialog.AddHTMLAttributeNameInput.value);
- if (!name)
- return;
-
- // Trim spaces only from left since we must allow spaces within the string
- // (we always reset the input field's value below)
- var value = TrimStringLeft(gDialog.AddHTMLAttributeValueInput.value);
- if (value)
- {
- // Do value filtering based on type of attribute
- // (Do not use "forceInteger()" to avoid multiple
- // resetting of input's value and flickering)
- var selectedItem = gDialog.AddHTMLAttributeNameInput.selectedItem;
-
- if (selectedItem)
- {
- if ( selectedItem.getAttribute("forceOneChar") == "true" &&
- value.length > 1 )
- value = value.slice(0, 1);
-
- if ( selectedItem.getAttribute("forceIntOrPercent") == "true" )
- {
- // Allow integer with optional "%" as last character
- var percent = TrimStringRight(value).slice(-1);
- value = value.replace(/\D+/g,"");
- if (percent == "%")
- value += percent;
- }
- else if ( selectedItem.getAttribute("forceInteger") == "true" )
- {
- value = value.replace(/\D+/g,"");
- }
- else if ( selectedItem.getAttribute("forceSignedInteger") == "true" )
- {
- // Allow integer with optional "+" or "-" as first character
- var sign = value[0];
- value = value.replace(/\D+/g,"");
- if (sign == "+" || sign == "-")
- value = sign + value;
- }
-
- // Special case attributes
- if (selectedItem.getAttribute("limitFirstChar") == "true")
- {
- // Limit first character to letter, and all others to
- // letters, numbers, and a few others
- value = value.replace(/^[^a-zA-Z\u0080-\uFFFF]/, "").replace(/[^a-zA-Z0-9_\.\-\:\u0080-\uFFFF]+/g,'');
- }
-
- // Update once only if it changed
- if (value != gDialog.AddHTMLAttributeValueInput.value)
- gDialog.AddHTMLAttributeValueInput.value = value;
- }
- }
-
- // Update value in the tree list
- // If not found, add new attribute
- if (!UpdateExistingAttribute(name, value, "HTMLAList") && value)
- AddTreeItem(name, value, "HTMLAList", HTMLAttrs);
-}
-
-function editHTMLAttributeValue(targetCell)
-{
- if (IsNotTreeHeader(targetCell))
- gDialog.AddHTMLAttributeValueInput.inputField.select();
-}
-
-
-// update the object with added and removed attributes
-function UpdateHTMLAttributes()
-{
- var HTMLAList = document.getElementById("HTMLAList");
- var i;
-
- // remove removed attributes
- for (i = 0; i < HTMLRAttrs.length; i++)
- {
- var name = HTMLRAttrs[i];
-
- if (gElement.hasAttribute(name))
- doRemoveAttribute(name);
- }
-
- // Set added or changed attributes
- for( i = 0; i < HTMLAList.childNodes.length; i++)
- {
- var item = HTMLAList.childNodes[i];
- doSetAttribute( GetTreeItemAttributeStr(item), GetTreeItemValueStr(item));
- }
-}
-
-function RemoveHTMLAttribute()
-{
- // We only allow 1 selected item
- if (gDialog.AddHTMLAttributeTree.view.selection.count)
- {
- var item = getSelectedItem(gDialog.AddHTMLAttributeTree);
- var attr = GetTreeItemAttributeStr(item);
-
- // remove the item from the attribute array
- HTMLRAttrs[HTMLRAttrs.length] = attr;
- RemoveNameFromAttArray(attr, HTMLAttrs);
-
- // Remove the item from the tree
- item.remove();
-
- // Clear inputs and selected item in tree
- ClearHTMLInputWidgets();
- }
-}
-
-function SelectHTMLTree( index )
-{
-
- gDoOnSelectTree = false;
- try {
- gDialog.AddHTMLAttributeTree.selectedIndex = index;
- } catch (e) {}
- gDoOnSelectTree = true;
-}
diff --git a/editor/ui/dialogs/content/EdAEJSEAttributes.js b/editor/ui/dialogs/content/EdAEJSEAttributes.js
deleted file mode 100644
index e1894a8a6..000000000
--- a/editor/ui/dialogs/content/EdAEJSEAttributes.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function BuildJSEAttributeNameList()
-{
- gDialog.AddJSEAttributeNameList.removeAllItems();
-
- // Get events specific to current element
- var elementName = gElement.localName;
- if (elementName in gJSAttr)
- {
- var attNames = gJSAttr[elementName];
- var i;
- var popup;
- var sep;
-
- if (attNames && attNames.length)
- {
- // Since we don't allow user-editable JS events yet (but we will soon)
- // simply remove the JS tab to not allow adding JS events
- if (attNames[0] == "noJSEvents")
- {
- var tab = document.getElementById("tabJSE");
- if (tab)
- tab.remove();
-
- return;
- }
-
- for (i = 0; i < attNames.length; i++)
- gDialog.AddJSEAttributeNameList.appendItem(attNames[i], attNames[i]);
-
- popup = gDialog.AddJSEAttributeNameList.firstChild;
- if (popup)
- {
- sep = document.createElementNS(XUL_NS, "menuseparator");
- if (sep)
- popup.appendChild(sep);
- }
- }
- }
-
- // Always add core JS events unless we aborted above
- for (i = 0; i < gCoreJSEvents.length; i++)
- {
- if (gCoreJSEvents[i] == "-")
- {
- if (!popup)
- popup = gDialog.AddJSEAttributeNameList.firstChild;
-
- sep = document.createElementNS(XUL_NS, "menuseparator");
-
- if (popup && sep)
- popup.appendChild(sep);
- }
- else
- gDialog.AddJSEAttributeNameList.appendItem(gCoreJSEvents[i], gCoreJSEvents[i]);
- }
-
- gDialog.AddJSEAttributeNameList.selectedIndex = 0;
-
- // Use current name and value of first tree item if it exists
- onSelectJSETreeItem();
-}
-
-// build attribute list in tree form from element attributes
-function BuildJSEAttributeTable()
-{
- var nodeMap = gElement.attributes;
- if (nodeMap.length > 0)
- {
- var added = false;
- for (var i = 0; i < nodeMap.length; i++)
- {
- let name = nodeMap[i].nodeName.toLowerCase();
- if( CheckAttributeNameSimilarity( nodeMap[i].nodeName, JSEAttrs ) )
- continue; // repeated or non-JS handler, ignore this one and go to next
- if (!name.startsWith("on"))
- continue; // attribute isn't an event handler.
- var value = gElement.getAttribute(nodeMap[i].nodeName);
- if (AddTreeItem( name, value, "JSEAList", JSEAttrs )) // add item to tree
- added = true;
- }
-
- // Select first item
- if (added)
- gDialog.AddJSEAttributeTree.selectedIndex = 0;
- }
-}
-
-function onSelectJSEAttribute()
-{
- if(!gDoOnSelectTree)
- return;
-
- gDialog.AddJSEAttributeValueInput.value =
- GetAndSelectExistingAttributeValue(gDialog.AddJSEAttributeNameList.label, "JSEAList");
-}
-
-function onSelectJSETreeItem()
-{
- var tree = gDialog.AddJSEAttributeTree;
- if (tree && tree.view.selection.count)
- {
- // Select attribute name in list
- gDialog.AddJSEAttributeNameList.value = GetTreeItemAttributeStr(getSelectedItem(tree));
-
- // Set value input to that in tree (no need to update this in the tree)
- gUpdateTreeValue = false;
- gDialog.AddJSEAttributeValueInput.value = GetTreeItemValueStr(getSelectedItem(tree));
- gUpdateTreeValue = true;
- }
-}
-
-function onInputJSEAttributeValue()
-{
- if (gUpdateTreeValue)
- {
-
- var name = TrimString(gDialog.AddJSEAttributeNameList.label);
- var value = TrimString(gDialog.AddJSEAttributeValueInput.value);
-
- // Update value in the tree list
- // Since we have a non-editable menulist,
- // we MUST automatically add the event attribute if it doesn't exist
- if (!UpdateExistingAttribute( name, value, "JSEAList" ) && value)
- AddTreeItem( name, value, "JSEAList", JSEAttrs );
- }
-}
-
-function editJSEAttributeValue(targetCell)
-{
- if (IsNotTreeHeader(targetCell))
- gDialog.AddJSEAttributeValueInput.inputField.select();
-}
-
-function UpdateJSEAttributes()
-{
- var JSEAList = document.getElementById("JSEAList");
- var i;
-
- // remove removed attributes
- for (i = 0; i < JSERAttrs.length; i++)
- {
- var name = JSERAttrs[i];
-
- if (gElement.hasAttribute(name))
- doRemoveAttribute(name);
- }
-
- // Add events
- for (i = 0; i < JSEAList.childNodes.length; i++)
- {
- var item = JSEAList.childNodes[i];
-
- // set the event handler
- doSetAttribute( GetTreeItemAttributeStr(item), GetTreeItemValueStr(item) );
- }
-}
-
-function RemoveJSEAttribute()
-{
- // This differs from HTML and CSS panels:
- // We reselect after removing, because there is not
- // editable attribute name input, so we can't clear that
- // like we do in other panels
- var newIndex = gDialog.AddJSEAttributeTree.selectedIndex;
-
- // We only allow 1 selected item
- if (gDialog.AddJSEAttributeTree.view.selection.count)
- {
- var item = getSelectedItem(gDialog.AddJSEAttributeTree);
-
- // Name is the text of the treecell
- var attr = GetTreeItemAttributeStr(item);
-
- // remove the item from the attribute array
- if (newIndex >= (JSEAttrs.length-1))
- newIndex--;
-
- // remove the item from the attribute array
- JSERAttrs[JSERAttrs.length] = attr;
- RemoveNameFromAttArray(attr, JSEAttrs);
-
- // Remove the item from the tree
- item.remove();
-
- // Reselect an item
- gDialog.AddJSEAttributeTree.selectedIndex = newIndex;
- }
-}
diff --git a/editor/ui/dialogs/content/EdAdvancedEdit.js b/editor/ui/dialogs/content/EdAdvancedEdit.js
deleted file mode 100644
index 47135e589..000000000
--- a/editor/ui/dialogs/content/EdAdvancedEdit.js
+++ /dev/null
@@ -1,333 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/************** GLOBALS **************/
-var gElement = null; // handle to actual element edited
-
-var HTMLAttrs = []; // html attributes
-var CSSAttrs = []; // css attributes
-var JSEAttrs = []; // js events
-
-var HTMLRAttrs = []; // removed html attributes
-var JSERAttrs = []; // removed js events
-
-/* Set false to allow changing selection in tree
- without doing "onselect" handler actions
-*/
-var gDoOnSelectTree = true;
-var gUpdateTreeValue = true;
-
-/************** INITIALISATION && SETUP **************/
-
-/**
- * function : void Startup();
- * parameters : none
- * returns : none
- * desc. : startup and initialisation, prepares dialog.
- **/
-function Startup()
-{
- var editor = GetCurrentEditor();
-
- // Element to edit is passed in
- if (!editor || !window.arguments[1])
- {
- dump("Advanced Edit: No editor or element to edit not supplied\n");
- window.close();
- return;
- }
- // This is the return value for the parent,
- // who only needs to know if OK was clicked
- window.opener.AdvancedEditOK = false;
-
- // The actual element edited (not a copy!)
- gElement = window.arguments[1];
-
- // place the tag name in the header
- var tagLabel = document.getElementById("tagLabel");
- tagLabel.setAttribute("value", ("<" + gElement.localName + ">"));
-
- // Create dialog object to store controls for easy access
- gDialog.AddHTMLAttributeNameInput = document.getElementById("AddHTMLAttributeNameInput");
-
- // We use a <deck> to switch between editable menulist and textbox
- gDialog.AddHTMLAttributeValueDeck = document.getElementById("AddHTMLAttributeValueDeck");
- gDialog.AddHTMLAttributeValueMenulist = document.getElementById("AddHTMLAttributeValueMenulist");
- gDialog.AddHTMLAttributeValueTextbox = document.getElementById("AddHTMLAttributeValueTextbox");
- gDialog.AddHTMLAttributeValueInput = gDialog.AddHTMLAttributeValueTextbox;
-
- gDialog.AddHTMLAttributeTree = document.getElementById("HTMLATree");
- gDialog.AddCSSAttributeNameInput = document.getElementById("AddCSSAttributeNameInput");
- gDialog.AddCSSAttributeValueInput = document.getElementById("AddCSSAttributeValueInput");
- gDialog.AddCSSAttributeTree = document.getElementById("CSSATree");
- gDialog.AddJSEAttributeNameList = document.getElementById("AddJSEAttributeNameList");
- gDialog.AddJSEAttributeValueInput = document.getElementById("AddJSEAttributeValueInput");
- gDialog.AddJSEAttributeTree = document.getElementById("JSEATree");
- gDialog.okButton = document.documentElement.getButton("accept");
-
- // build the attribute trees
- BuildHTMLAttributeTable();
- BuildCSSAttributeTable();
- BuildJSEAttributeTable();
-
- // Build attribute name arrays for menulists
- BuildJSEAttributeNameList();
- BuildHTMLAttributeNameList();
- // No menulists for CSS panel (yet)
-
- // Set focus to Name editable menulist in HTML panel
- SetTextboxFocus(gDialog.AddHTMLAttributeNameInput);
-
- // size the dialog properly
- window.sizeToContent();
-
- SetWindowLocation();
-}
-
-/**
- * function : bool onAccept ( void );
- * parameters : none
- * returns : boolean true to close the window
- * desc. : event handler for ok button
- **/
-function onAccept()
-{
- var editor = GetCurrentEditor();
- editor.beginTransaction();
- try {
- // Update our gElement attributes
- UpdateHTMLAttributes();
- UpdateCSSAttributes();
- UpdateJSEAttributes();
- } catch(ex) {
- dump(ex);
- }
- editor.endTransaction();
-
- window.opener.AdvancedEditOK = true;
- SaveWindowLocation();
-
- return true; // do close the window
-}
-
-// Helpers for removing and setting attributes
-// Use editor transactions if modifying the element already in the document
-// (Temporary element from a property dialog won't have a parent node)
-function doRemoveAttribute(attrib)
-{
- try {
- var editor = GetCurrentEditor();
- if (gElement.parentNode)
- editor.removeAttribute(gElement, attrib);
- else
- gElement.removeAttribute(attrib);
- } catch(ex) {}
-}
-
-function doSetAttribute(attrib, value)
-{
- try {
- var editor = GetCurrentEditor();
- if (gElement.parentNode)
- editor.setAttribute(gElement, attrib, value);
- else
- gElement.setAttribute(attrib, value);
- } catch(ex) {}
-}
-
-/**
- * function : bool CheckAttributeNameSimilarity ( string attName, array attArray );
- * parameters : attribute to look for, array of current attributes
- * returns : true if attribute already exists, false if it does not
- * desc. : checks to see if any other attributes by the same name as the arg supplied
- * already exist.
- **/
-function CheckAttributeNameSimilarity(attName, attArray)
-{
- for (var i = 0; i < attArray.length; i++)
- {
- if (attName.toLowerCase() == attArray[i].toLowerCase())
- return true;
- }
- return false;
-}
-
-/**
- * function : bool UpdateExistingAttribute ( string attName, string attValue, string treeChildrenId );
- * parameters : attribute to look for, new value, ID of <treeChildren> node in XUL tree
- * returns : true if attribute already exists in tree, false if it does not
- * desc. : checks to see if any other attributes by the same name as the arg supplied
- * already exist while setting the associated value if different from current value
- **/
-function UpdateExistingAttribute( attName, attValue, treeChildrenId )
-{
- var treeChildren = document.getElementById(treeChildrenId);
- if (!treeChildren)
- return false;
-
- var name;
- var i;
- attName = TrimString(attName).toLowerCase();
- attValue = TrimString(attValue);
-
- for (i = 0; i < treeChildren.childNodes.length; i++)
- {
- var item = treeChildren.childNodes[i];
- name = GetTreeItemAttributeStr(item);
- if (name.toLowerCase() == attName)
- {
- // Set the text in the "value' column treecell
- SetTreeItemValueStr(item, attValue);
-
- // Select item just changed,
- // but don't trigger the tree's onSelect handler
- gDoOnSelectTree = false;
- try {
- selectTreeItem(treeChildren, item);
- } catch (e) {}
- gDoOnSelectTree = true;
-
- return true;
- }
- }
- return false;
-}
-
-/**
- * function : string GetAndSelectExistingAttributeValue ( string attName, string treeChildrenId );
- * parameters : attribute to look for, ID of <treeChildren> node in XUL tree
- * returns : value in from the tree or empty string if name not found
- **/
-function GetAndSelectExistingAttributeValue( attName, treeChildrenId )
-{
- if (!attName)
- return "";
-
- var treeChildren = document.getElementById(treeChildrenId);
- var name;
- var i;
-
- for (i = 0; i < treeChildren.childNodes.length; i++)
- {
- var item = treeChildren.childNodes[i];
- name = GetTreeItemAttributeStr(item);
- if (name.toLowerCase() == attName.toLowerCase())
- {
- // Select item in the tree
- // but don't trigger the tree's onSelect handler
- gDoOnSelectTree = false;
- try {
- selectTreeItem(treeChildren, item);
- } catch (e) {}
- gDoOnSelectTree = true;
-
- // Get the text in the "value' column treecell
- return GetTreeItemValueStr(item);
- }
- }
-
- // Attribute doesn't exist in tree, so remove selection
- gDoOnSelectTree = false;
- try {
- treeChildren.parentNode.view.selection.clearSelection();
- } catch (e) {}
- gDoOnSelectTree = true;
-
- return "";
-}
-
-/* Tree structure:
- <treeItem>
- <treeRow>
- <treeCell> // Name Cell
- <treeCell // Value Cell
-*/
-function GetTreeItemAttributeStr(treeItem)
-{
- if (treeItem)
- return TrimString(treeItem.firstChild.firstChild.getAttribute("label"));
-
- return "";
-}
-
-function GetTreeItemValueStr(treeItem)
-{
- if (treeItem)
- return TrimString(treeItem.firstChild.lastChild.getAttribute("label"));
-
- return "";
-}
-
-function SetTreeItemValueStr(treeItem, value)
-{
- if (treeItem && GetTreeItemValueStr(treeItem) != value)
- treeItem.firstChild.lastChild.setAttribute("label", value);
-}
-
-function IsNotTreeHeader(treeCell)
-{
- if (treeCell)
- return (treeCell.parentNode.parentNode.nodeName != "treehead");
-
- return false;
-}
-
-function RemoveNameFromAttArray(attName, attArray)
-{
- for (var i=0; i < attArray.length; i++)
- {
- if (attName.toLowerCase() == attArray[i].toLowerCase())
- {
- // Remove 1 array item
- attArray.splice(i,1);
- break;
- }
- }
-}
-
-// adds a generalised treeitem.
-function AddTreeItem ( name, value, treeChildrenId, attArray )
-{
- attArray[attArray.length] = name;
- var treeChildren = document.getElementById ( treeChildrenId );
- var treeitem = document.createElementNS ( XUL_NS, "treeitem" );
- var treerow = document.createElementNS ( XUL_NS, "treerow" );
-
- var attrCell = document.createElementNS ( XUL_NS, "treecell" );
- attrCell.setAttribute( "class", "propertylist" );
- attrCell.setAttribute( "label", name );
-
- var valueCell = document.createElementNS ( XUL_NS, "treecell" );
- valueCell.setAttribute( "class", "propertylist" );
- valueCell.setAttribute( "label", value );
-
- treerow.appendChild ( attrCell );
- treerow.appendChild ( valueCell );
- treeitem.appendChild ( treerow );
- treeChildren.appendChild ( treeitem );
-
- // Select item just added,
- // but suppress calling the onSelect handler
- gDoOnSelectTree = false;
- try {
- selectTreeItem(treeChildren, treeitem);
- } catch (e) {}
- gDoOnSelectTree = true;
-
- return treeitem;
-}
-
-function selectTreeItem(treeChildren, item)
-{
- var index = treeChildren.parentNode.contentView.getIndexOfItem(item);
- treeChildren.parentNode.view.selection.select(index);
-}
-
-function getSelectedItem(tree)
-{
- if (tree.view.selection.count == 1)
- return tree.contentView.getItemAtIndex(tree.currentIndex);
- else
- return null;
-}
diff --git a/editor/ui/dialogs/content/EdAdvancedEdit.xul b/editor/ui/dialogs/content/EdAdvancedEdit.xul
deleted file mode 100644
index f6eded080..000000000
--- a/editor/ui/dialogs/content/EdAdvancedEdit.xul
+++ /dev/null
@@ -1,183 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- first checkin of the year 2000! -->
-<!-- Ben Goodger, 12:50AM, 01/00/00 NZST -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<!-- May not need this here -->
-<!-- <?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?> -->
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdAdvancedEdit.dtd">
-<dialog title="&WindowTitle.label;"
- id="advancedEditDlg"
- style="width: 40em;"
- xmlns ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <!-- element page functions -->
- <script type="application/javascript" src="chrome://editor/content/EdAEHTMLAttributes.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdAECSSAttributes.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdAEJSEAttributes.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdAEAttributes.js"/>
-
- <!-- global dialog functions -->
- <script type="application/javascript" src="chrome://editor/content/EdAdvancedEdit.js"/>
-
- <broadcaster id="args" value=""/>
-
- <hbox>
- <label value="&currentattributesfor.label;"/>
- <label class="header" id="tagLabel"/>
- </hbox>
-
- <separator class="thin"/>
-
- <tabbox flex="1">
- <tabs>
- <tab label="&tabHTML.label;"/>
- <tab label="&tabCSS.label;"/>
- <tab label="&tabJSE.label;" id="tabJSE"/>
- </tabs>
- <tabpanels flex="1">
- <!-- ============================================================== -->
- <!-- HTML Attributes -->
- <!-- ============================================================== -->
- <vbox>
- <tree id="HTMLATree" class="AttributesTree" flex="1"
- hidecolumnpicker="true" seltype="single"
- onselect="onSelectHTMLTreeItem();"
- onclick="onSelectHTMLTreeItem();"
- ondblclick="editHTMLAttributeValue(event.target);">
- <treecols>
- <treecol id="HTMLAttrCol" flex="35" label="&tree.attributeHeader.label;"/>
- <splitter class="tree-splitter"/>
- <treecol id="HTMLValCol" flex="65" label="&tree.valueHeader.label;"/>
- </treecols>
- <treechildren id="HTMLAList" class="gridlines" flex="1"/>
- </tree>
- <hbox align="center">
- <label value="&editAttribute.label;"/>
- <spacer flex="1"/>
- <button label="&removeAttribute.label;" oncommand="RemoveHTMLAttribute();"/>
- </hbox>
- <grid>
- <columns>
- <column flex="1"/><column flex="1"/>
- </columns>
- <rows>
- <row equalsize="always">
- <label control="AddHTMLAttributeNameInput" value="&AttName.label;"/>
- <label control="AddHTMLAttributeValueInput" value="&AttValue.label;"/>
- </row>
- <row align="top" equalsize="always">
- <!-- Lists are built at runtime -->
- <menulist id="AddHTMLAttributeNameInput" editable="true" flex="1"
- oninput="onInputHTMLAttributeName();"
- oncommand="onInputHTMLAttributeName();"/>
- <deck id="AddHTMLAttributeValueDeck" selectedIndex="0">
- <hbox align="top">
- <textbox id="AddHTMLAttributeValueTextbox" flex="1"
- oninput="onInputHTMLAttributeValue();"/>
- </hbox>
- <hbox align="top">
- <menulist id="AddHTMLAttributeValueMenulist" editable="true" flex="1"
- oninput="onInputHTMLAttributeValue();"
- oncommand="onInputHTMLAttributeValue();"/>
- </hbox>
- </deck>
- </row>
- </rows>
- </grid>
- </vbox>
- <!-- ============================================================== -->
- <!-- CSS Attributes -->
- <!-- ============================================================== -->
- <vbox>
- <tree id="CSSATree" class="AttributesTree" flex="1"
- hidecolumnpicker="true" seltype="single"
- onselect="onSelectCSSTreeItem();"
- onclick="onSelectCSSTreeItem();"
- ondblclick="editCSSAttributeValue(event.target);">
- <treecols>
- <treecol id="CSSPropCol" flex="35" label="&tree.propertyHeader.label;"/>
- <splitter class="tree-splitter"/>
- <treecol id="CSSValCol" flex="65" label="&tree.valueHeader.label;"/>
- </treecols>
- <treechildren id="CSSAList" class="gridlines" flex="1"/>
- </tree>
- <hbox align="center">
- <label value="&editAttribute.label;"/>
- <spacer flex="1"/>
- <button label="&removeAttribute.label;" oncommand="RemoveCSSAttribute();"/>
- </hbox>
- <grid>
- <columns>
- <column flex="1"/><column flex="1"/>
- </columns>
- <rows>
- <row equalsize="always">
- <label value="&PropertyName.label;"/>
- <label value="&AttValue.label;"/>
- </row>
- <row align="top" equalsize="always">
- <textbox id="AddCSSAttributeNameInput" flex="1"
- oninput="onInputCSSAttributeName();"/>
- <textbox id="AddCSSAttributeValueInput" flex="1"
- oninput="onChangeCSSAttribute();"/>
- </row>
- </rows>
- </grid>
- </vbox>
- <!-- ============================================================== -->
- <!-- JavaScript Event Handlers -->
- <!-- ============================================================== -->
- <vbox>
- <tree id="JSEATree" class="AttributesTree" flex="1"
- hidecolumnpicker="true" seltype="single"
- onselect="onSelectJSETreeItem();"
- onclick="onSelectJSETreeItem();"
- ondblclick="editJSEAttributeValue(event.target);">
- <treecols>
- <treecol id="AttrCol" flex="35" label="&tree.attributeHeader.label;"/>
- <splitter class="tree-splitter"/>
- <treecol id="HeaderCol" flex="65" label="&tree.valueHeader.label;"/>
- </treecols>
- <treechildren id="JSEAList" class="gridlines" flex="1"/>
- </tree>
- <hbox align="center">
- <label value="&editAttribute.label;"/>
- <spacer flex="1"/>
- <button label="&removeAttribute.label;" oncommand="RemoveJSEAttribute()"/>
- </hbox>
- <grid>
- <columns>
- <column flex="1"/><column flex="1"/>
- </columns>
- <rows>
- <row equalsize="always">
- <label value="&AttName.label;"/>
- <label value="&AttValue.label;"/>
- </row>
- <row align="top" equalsize="always">
- <!-- List is built at runtime -->
- <menulist id="AddJSEAttributeNameList" flex="1"
- oncommand="onSelectJSEAttribute();"/>
- <textbox id="AddJSEAttributeValueInput" flex="1"
- oninput="onInputJSEAttributeValue();"/>
- </row>
- </rows>
- </grid>
- </vbox>
- </tabpanels>
- </tabbox>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdButtonProps.js b/editor/ui/dialogs/content/EdButtonProps.js
deleted file mode 100644
index 493ebd7df..000000000
--- a/editor/ui/dialogs/content/EdButtonProps.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var insertNew;
-var buttonElement;
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- gDialog = {
- buttonType: document.getElementById("ButtonType"),
- buttonName: document.getElementById("ButtonName"),
- buttonValue: document.getElementById("ButtonValue"),
- buttonDisabled: document.getElementById("ButtonDisabled"),
- buttonTabIndex: document.getElementById("ButtonTabIndex"),
- buttonAccessKey: document.getElementById("ButtonAccessKey"),
- MoreSection: document.getElementById("MoreSection"),
- MoreFewerButton: document.getElementById("MoreFewerButton"),
- RemoveButton: document.getElementById("RemoveButton")
- };
-
- // Get a single selected button element
- const kTagName = "button";
- try {
- buttonElement = editor.getSelectedElement(kTagName);
- } catch (e) {}
-
- if (buttonElement)
- // We found an element and don't need to insert one
- insertNew = false;
- else
- {
- insertNew = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- buttonElement = editor.createElementWithDefaults(kTagName);
- } catch (e) {}
-
- if (!buttonElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- // Hide button removing existing button
- gDialog.RemoveButton.hidden = true;
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = buttonElement.cloneNode(false);
-
- InitDialog();
-
- InitMoreFewer();
-
- gDialog.buttonType.focus();
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- var type = globalElement.getAttribute("type");
- var index = 0;
- switch (type)
- {
- case "button":
- index = 2;
- break;
- case "reset":
- index = 1;
- break;
- }
- gDialog.buttonType.selectedIndex = index;
- gDialog.buttonName.value = globalElement.getAttribute("name");
- gDialog.buttonValue.value = globalElement.getAttribute("value");
- gDialog.buttonDisabled.setAttribute("checked", globalElement.hasAttribute("disabled"));
- gDialog.buttonTabIndex.value = globalElement.getAttribute("tabindex");
- gDialog.buttonAccessKey.value = globalElement.getAttribute("accesskey");
-}
-
-function RemoveButton()
-{
- RemoveContainer(buttonElement);
- SaveWindowLocation();
- window.close();
-}
-
-function ValidateData()
-{
- var attributes = {
- type: ["", "reset", "button"][gDialog.buttonType.selectedIndex],
- name: gDialog.buttonName.value,
- value: gDialog.buttonValue.value,
- tabindex: gDialog.buttonTabIndex.value,
- accesskey: gDialog.buttonAccessKey.value
- };
- for (var a in attributes)
- {
- if (attributes[a])
- globalElement.setAttribute(a, attributes[a]);
- else
- globalElement.removeAttribute(a);
- }
- if (gDialog.buttonDisabled.checked)
- globalElement.setAttribute("disabled", "");
- else
- globalElement.removeAttribute("disabled");
- return true;
-}
-
-function onAccept()
-{
- // All values are valid - copy to actual element in doc or
- // element created to insert
- ValidateData();
-
- var editor = GetCurrentEditor();
-
- editor.cloneAttributes(buttonElement, globalElement);
-
- if (insertNew)
- {
- if (!InsertElementAroundSelection(buttonElement))
- {
- buttonElement.innerHTML = editor.outputToString("text/html", kOutputSelectionOnly);
- editor.insertElementAtSelection(buttonElement, true);
- }
- }
-
- SaveWindowLocation();
-
- return true;
-}
-
diff --git a/editor/ui/dialogs/content/EdButtonProps.xul b/editor/ui/dialogs/content/EdButtonProps.xul
deleted file mode 100644
index 822ca46b2..000000000
--- a/editor/ui/dialogs/content/EdButtonProps.xul
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorButtonProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdButtonProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption label="&Settings.label;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label control="ButtonType" value="&ButtonType.label;" accesskey="&ButtonType.accesskey;"/>
- <menulist id="ButtonType">
- <menupopup>
- <menuitem label="&submit.value;"/>
- <menuitem label="&reset.value;"/>
- <menuitem label="&button.value;"/>
- </menupopup>
- </menulist>
- </row>
- <row align="center">
- <label control="ButtonName" value="&ButtonName.label;" accesskey="&ButtonName.accesskey;"/>
- <textbox id="ButtonName"/>
- </row>
- <row align="center">
- <label control="ButtonValue" value="&ButtonValue.label;" accesskey="&ButtonValue.accesskey;"/>
- <textbox id="ButtonValue"/>
- </row>
- </rows>
- </grid>
- <hbox>
- <button id="MoreFewerButton" oncommand="onMoreFewer();" persist="more"/>
- </hbox>
- <grid id="MoreSection"><columns><column/><column/></columns>
- <rows>
- <row>
- <spacer/>
- <checkbox id="ButtonDisabled" label="&ButtonDisabled.label;" accesskey="&ButtonDisabled.accesskey;"/>
- </row>
- <row align="center">
- <label control="ButtonTabIndex" value="&tabIndex.label;" accesskey="&tabIndex.accesskey;"/>
- <hbox>
- <textbox id="ButtonTabIndex" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- <row align="center">
- <label control="ButtonAccessKey" value="&AccessKey.label;" accesskey="&AccessKey.accesskey;"/>
- <hbox>
- <textbox id="ButtonAccessKey" class="narrow"/>
- </hbox>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <!-- from EdDialogOverlay -->
- <hbox flex="1" style="margin-top: 0.2em">
- <button id="RemoveButton" label="&RemoveButton.label;" accesskey="&RemoveButton.accesskey;" oncommand="RemoveButton();"/>
- <!-- This will right-align the button -->
- <spacer flex="1"/>
- <button id="AdvancedEditButton"/>
- </hbox>
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdColorPicker.js b/editor/ui/dialogs/content/EdColorPicker.js
deleted file mode 100644
index e82d44440..000000000
--- a/editor/ui/dialogs/content/EdColorPicker.js
+++ /dev/null
@@ -1,306 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-//Cancel() is in EdDialogCommon.js
-
-var insertNew = true;
-var tagname = "TAG NAME"
-var gColor = "";
-var LastPickedColor = "";
-var ColorType = "Text";
-var TextType = false;
-var HighlightType = false;
-var TableOrCell = false;
-var LastPickedIsDefault = true;
-var NoDefault = false;
-var gColorObj;
-
-// dialog initialization code
-function Startup()
-{
- if (!window.arguments[1])
- {
- dump("EdColorPicker: Missing color object param\n");
- return;
- }
-
- // window.arguments[1] is object to get initial values and return color data
- gColorObj = window.arguments[1];
- gColorObj.Cancel = false;
-
- gDialog.ColorPicker = document.getElementById("ColorPicker");
- gDialog.ColorInput = document.getElementById("ColorInput");
- gDialog.LastPickedButton = document.getElementById("LastPickedButton");
- gDialog.LastPickedColor = document.getElementById("LastPickedColor");
- gDialog.CellOrTableGroup = document.getElementById("CellOrTableGroup");
- gDialog.TableRadio = document.getElementById("TableRadio");
- gDialog.CellRadio = document.getElementById("CellRadio");
- gDialog.ColorSwatch = document.getElementById("ColorPickerSwatch");
- gDialog.Ok = document.documentElement.getButton("accept");
-
- // The type of color we are setting:
- // text: Text, Link, ActiveLink, VisitedLink,
- // or background: Page, Table, or Cell
- if (gColorObj.Type)
- {
- ColorType = gColorObj.Type;
- // Get string for dialog title from passed-in type
- // (note constraint on editor.properties string name)
- let IsCSSPrefChecked = Services.prefs.getBoolPref("editor.use_css");
-
- if (GetCurrentEditor())
- {
- if (ColorType == "Page" && IsCSSPrefChecked && IsHTMLEditor())
- document.title = GetString("BlockColor");
- else
- document.title = GetString(ColorType + "Color");
- }
- }
-
- gDialog.ColorInput.value = "";
- var tmpColor;
- var haveTableRadio = false;
-
- switch (ColorType)
- {
- case "Page":
- tmpColor = gColorObj.PageColor;
- if (tmpColor && tmpColor.toLowerCase() != "window")
- gColor = tmpColor;
- break;
- case "Table":
- if (gColorObj.TableColor)
- gColor = gColorObj.TableColor;
- break;
- case "Cell":
- if (gColorObj.CellColor)
- gColor = gColorObj.CellColor;
- break;
- case "TableOrCell":
- TableOrCell = true;
- document.getElementById("TableOrCellGroup").collapsed = false;
- haveTableRadio = true;
- if (gColorObj.SelectedType == "Cell")
- {
- gColor = gColorObj.CellColor;
- gDialog.CellOrTableGroup.selectedItem = gDialog.CellRadio;
- gDialog.CellRadio.focus();
- }
- else
- {
- gColor = gColorObj.TableColor;
- gDialog.CellOrTableGroup.selectedItem = gDialog.TableRadio;
- gDialog.TableRadio.focus();
- }
- break;
- case "Highlight":
- HighlightType = true;
- if (gColorObj.HighlightColor)
- gColor = gColorObj.HighlightColor;
- break;
- default:
- // Any other type will change some kind of text,
- TextType = true;
- tmpColor = gColorObj.TextColor;
- if (tmpColor && tmpColor.toLowerCase() != "windowtext")
- gColor = gColorObj.TextColor;
- break;
- }
-
- // Set initial color in input field and in the colorpicker
- SetCurrentColor(gColor);
- gDialog.ColorPicker.initColor(gColor);
-
- // Use last-picked colors passed in, or those persistent on dialog
- if (TextType)
- {
- if ( !("LastTextColor" in gColorObj) || !gColorObj.LastTextColor)
- gColorObj.LastTextColor = gDialog.LastPickedColor.getAttribute("LastTextColor");
- LastPickedColor = gColorObj.LastTextColor;
- }
- else if (HighlightType)
- {
- if ( !("LastHighlightColor" in gColorObj) || !gColorObj.LastHighlightColor)
- gColorObj.LastHighlightColor = gDialog.LastPickedColor.getAttribute("LastHighlightColor");
- LastPickedColor = gColorObj.LastHighlightColor;
- }
- else
- {
- if ( !("LastBackgroundColor" in gColorObj) || !gColorObj.LastBackgroundColor)
- gColorObj.LastBackgroundColor = gDialog.LastPickedColor.getAttribute("LastBackgroundColor");
- LastPickedColor = gColorObj.LastBackgroundColor;
- }
-
- // Set method to detect clicking on OK button
- // so we don't get fooled by changing "default" behavior
- gDialog.Ok.setAttribute("onclick", "SetDefaultToOk()");
-
- if (!LastPickedColor) {
- // Hide the button, as there is no last color available.
- gDialog.LastPickedButton.hidden = true;
- } else {
- gDialog.LastPickedColor.setAttribute("style", "background-color: " + LastPickedColor);
-
- // Make "Last-picked" the default button, until the user selects a color.
- gDialog.Ok.removeAttribute("default");
- gDialog.LastPickedButton.setAttribute("default", "true");
- }
-
- // Caller can prevent user from submitting an empty, i.e., default color
- NoDefault = gColorObj.NoDefault;
- if (NoDefault)
- {
- // Hide the "Default button -- user must pick a color
- document.getElementById("DefaultColorButton").collapsed = true;
- }
-
- // Set focus to colorpicker if not set to table radio buttons above
- if (!haveTableRadio)
- gDialog.ColorPicker.focus();
-
- SetWindowLocation();
-}
-
-function ChangePalette(palette)
-{
- gDialog.ColorPicker.setAttribute("palettename", palette);
- window.sizeToContent();
-}
-
-function SelectColor()
-{
- var color = gDialog.ColorPicker.color;
- if (color)
- SetCurrentColor(color);
-}
-
-function RemoveColor()
-{
- SetCurrentColor("");
- gDialog.ColorInput.focus();
- SetDefaultToOk();
-}
-
-function SelectColorByKeypress(aEvent)
-{
- if (aEvent.charCode == aEvent.DOM_VK_SPACE)
- {
- SelectColor();
- SetDefaultToOk();
- }
-}
-
-function SelectLastPickedColor()
-{
- SetCurrentColor(LastPickedColor);
- if ( onAccept() )
- //window.close();
- return true;
-
- return false;
-}
-
-function SetCurrentColor(color)
-{
- // TODO: Validate color?
- if(!color) color = "";
- gColor = TrimString(color).toLowerCase();
- if (gColor == "mixed")
- gColor = "";
- gDialog.ColorInput.value = gColor;
- SetColorSwatch();
-}
-
-function SetColorSwatch()
-{
- // TODO: DON'T ALLOW SPACES?
- var color = TrimString(gDialog.ColorInput.value);
- if (color)
- {
- gDialog.ColorSwatch.setAttribute("style",("background-color:"+color));
- gDialog.ColorSwatch.removeAttribute("default");
- }
- else
- {
- gDialog.ColorSwatch.setAttribute("style",("background-color:inherit"));
- gDialog.ColorSwatch.setAttribute("default","true");
- }
-}
-
-function SetDefaultToOk()
-{
- gDialog.LastPickedButton.removeAttribute("default");
- gDialog.Ok.setAttribute("default","true");
- LastPickedIsDefault = false;
-}
-
-function ValidateData()
-{
- if (LastPickedIsDefault)
- gColor = LastPickedColor;
- else
- gColor = gDialog.ColorInput.value;
-
- gColor = TrimString(gColor).toLowerCase();
-
- // TODO: Validate the color string!
-
- if (NoDefault && !gColor)
- {
- ShowInputErrorMessage(GetString("NoColorError"));
- SetTextboxFocus(gDialog.ColorInput);
- return false;
- }
- return true;
-}
-
-function onAccept()
-{
- if (!ValidateData())
- return false;
-
- // Set return values and save in persistent color attributes
- if (TextType)
- {
- gColorObj.TextColor = gColor;
- if (gColor.length > 0)
- {
- gDialog.LastPickedColor.setAttribute("LastTextColor", gColor);
- gColorObj.LastTextColor = gColor;
- }
- }
- else if (HighlightType)
- {
- gColorObj.HighlightColor = gColor;
- if (gColor.length > 0)
- {
- gDialog.LastPickedColor.setAttribute("LastHighlightColor", gColor);
- gColorObj.LastHighlightColor = gColor;
- }
- }
- else
- {
- gColorObj.BackgroundColor = gColor;
- if (gColor.length > 0)
- {
- gDialog.LastPickedColor.setAttribute("LastBackgroundColor", gColor);
- gColorObj.LastBackgroundColor = gColor;
- }
- // If table or cell requested, tell caller which element to set on
- if (TableOrCell && gDialog.TableRadio.selected)
- gColorObj.Type = "Table";
- }
- SaveWindowLocation();
-
- return true; // do close the window
-}
-
-function onCancelColor()
-{
- // Tells caller that user canceled
- gColorObj.Cancel = true;
- SaveWindowLocation();
- return true;
-}
diff --git a/editor/ui/dialogs/content/EdColorPicker.xul b/editor/ui/dialogs/content/EdColorPicker.xul
deleted file mode 100644
index daf57de1e..000000000
--- a/editor/ui/dialogs/content/EdColorPicker.xul
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdColorPicker.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancelColor();">
-
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdColorPicker.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <hbox id="TableOrCellGroup" align="center" collapsed="true">
- <label control="CellOrTableGroup" value="&background.label;" accesskey="&background.accessKey;"/>
- <radiogroup id="CellOrTableGroup" orient="horizontal">
- <radio id="TableRadio" label="&table.label;" accesskey="&table.accessKey;"/>
- <radio id="CellRadio" label="&cell.label;" accesskey="&cell.accessKey;"/>
- </radiogroup>
- </hbox>
- <colorpicker id="ColorPicker" palettename="standard"
- persist="palettename"
- onclick="SetDefaultToOk();"
- ondblclick="if (onAccept()) window.close();"
- onkeypress="SelectColorByKeypress(event);"
- onselect="SelectColor();"/>
-<!-- Web palette is not implemented???
- <hbox align="center">
- <label value="&palette.label;"/>
- <radio id="StandardPalette" label="&standardPalette.label;" oncommand="ChangePalette('standard')"/>
- <radio id="WebPalette" label="&webPalette.label;" oncommand="ChangePalette('web')"/>
- </hbox>
--->
- <spacer class="spacer"/>
- <vbox flex="1">
- <button id="LastPickedButton" crop="right" oncommand="SelectLastPickedColor();">
- <spacer id="LastPickedColor"
- LastTextColor="" LastBackgroundColor=""
- persist="LastTextColor LastBackgroundColor"/>
- <label value="&lastPickedColor.label;" accesskey="&lastPickedColor.accessKey;" flex="1" style="text-align: center;"/>
- </button>
- <label value="&setColor1.label;"/>
- <label value="&setColor2.label;" accesskey="&setColor2.accessKey;" control="ColorInput"/>
- <label value="&setColorExample.label;"/>
- <hbox align="center" flex="1=">
- <textbox id="ColorInput" style="width: 8em" oninput="SetColorSwatch(); SetDefaultToOk();"/>
- <spacer flex="1"/>
- <spacer id="ColorPickerSwatch"/>
- <spacer flex="1"/>
- <button id="DefaultColorButton" label="&default.label;" accesskey="&default.accessKey;"
- style="margin-right:0px;" oncommand="RemoveColor()"/>
- </hbox>
- </vbox>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdColorProps.js b/editor/ui/dialogs/content/EdColorProps.js
deleted file mode 100644
index aa3062833..000000000
--- a/editor/ui/dialogs/content/EdColorProps.js
+++ /dev/null
@@ -1,428 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- Behavior notes:
- Radio buttons select "UseDefaultColors" vs. "UseCustomColors" modes.
- If any color attribute is set in the body, mode is "Custom Colors",
- even if 1 or more (but not all) are actually null (= "use default")
- When in "Custom Colors" mode, all colors will be set on body tag,
- even if they are just default colors, to assure compatable colors in page.
- User cannot select "use default" for individual colors
-*/
-
-//Cancel() is in EdDialogCommon.js
-
-var gBodyElement;
-var prefs;
-var gBackgroundImage;
-
-// Initialize in case we can't get them from prefs???
-var defaultTextColor="#000000";
-var defaultLinkColor="#000099";
-var defaultActiveColor="#000099";
-var defaultVisitedColor="#990099";
-var defaultBackgroundColor="#FFFFFF";
-const styleStr = "style";
-const textStr = "text";
-const linkStr = "link";
-const vlinkStr = "vlink";
-const alinkStr = "alink";
-const bgcolorStr = "bgcolor";
-const backgroundStr = "background";
-const cssColorStr = "color";
-const cssBackgroundColorStr = "background-color";
-const cssBackgroundImageStr = "background-image";
-const colorStyle = cssColorStr + ": ";
-const backColorStyle = cssBackgroundColorStr + ": ";
-const backImageStyle = "; " + cssBackgroundImageStr + ": url(";
-
-var customTextColor;
-var customLinkColor;
-var customActiveColor;
-var customVisitedColor;
-var customBackgroundColor;
-var previewBGColor;
-var gHaveDocumentUrl = false;
-
-// dialog initialization code
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- gDialog.ColorPreview = document.getElementById("ColorPreview");
- gDialog.NormalText = document.getElementById("NormalText");
- gDialog.LinkText = document.getElementById("LinkText");
- gDialog.ActiveLinkText = document.getElementById("ActiveLinkText");
- gDialog.VisitedLinkText = document.getElementById("VisitedLinkText");
- gDialog.PageColorGroup = document.getElementById("PageColorGroup");
- gDialog.DefaultColorsRadio = document.getElementById("DefaultColorsRadio");
- gDialog.CustomColorsRadio = document.getElementById("CustomColorsRadio");
- gDialog.BackgroundImageInput = document.getElementById("BackgroundImageInput");
-
- try {
- gBodyElement = editor.rootElement;
- } catch (e) {}
-
- if (!gBodyElement)
- {
- dump("Failed to get BODY element!\n");
- window.close();
- }
-
- // Set element we will edit
- globalElement = gBodyElement.cloneNode(false);
-
- // Initialize default colors from browser prefs
- var browserColors = GetDefaultBrowserColors();
- if (browserColors)
- {
- // Use author's browser pref colors passed into dialog
- defaultTextColor = browserColors.TextColor;
- defaultLinkColor = browserColors.LinkColor;
- defaultActiveColor = browserColors.ActiveLinkColor;
- defaultVisitedColor = browserColors.VisitedLinkColor;
- defaultBackgroundColor= browserColors.BackgroundColor;
- }
-
- // We only need to test for this once per dialog load
- gHaveDocumentUrl = GetDocumentBaseUrl();
-
- InitDialog();
-
- gDialog.PageColorGroup.focus();
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- // Get image from document
- gBackgroundImage = GetHTMLOrCSSStyleValue(globalElement, backgroundStr, cssBackgroundImageStr);
- if (/url\((.*)\)/.test( gBackgroundImage ))
- gBackgroundImage = RegExp.$1;
-
- if (gBackgroundImage) {
- // Shorten data URIs for display.
- shortenImageData(gBackgroundImage, gDialog.BackgroundImageInput);
- gDialog.ColorPreview.setAttribute(styleStr, backImageStyle+gBackgroundImage+");");
- }
-
- SetRelativeCheckbox();
-
- customTextColor = GetHTMLOrCSSStyleValue(globalElement, textStr, cssColorStr);
- customTextColor = ConvertRGBColorIntoHEXColor(customTextColor);
- customLinkColor = globalElement.getAttribute(linkStr);
- customActiveColor = globalElement.getAttribute(alinkStr);
- customVisitedColor = globalElement.getAttribute(vlinkStr);
- customBackgroundColor = GetHTMLOrCSSStyleValue(globalElement, bgcolorStr, cssBackgroundColorStr);
- customBackgroundColor = ConvertRGBColorIntoHEXColor(customBackgroundColor);
-
- var haveCustomColor =
- customTextColor ||
- customLinkColor ||
- customVisitedColor ||
- customActiveColor ||
- customBackgroundColor;
-
- // Set default color explicitly for any that are missing
- // PROBLEM: We are using "windowtext" and "window" for the Windows OS
- // default color values. This works with CSS in preview window,
- // but we should NOT use these as values for HTML attributes!
-
- if (!customTextColor) customTextColor = defaultTextColor;
- if (!customLinkColor) customLinkColor = defaultLinkColor;
- if (!customActiveColor) customActiveColor = defaultActiveColor;
- if (!customVisitedColor) customVisitedColor = defaultVisitedColor;
- if (!customBackgroundColor) customBackgroundColor = defaultBackgroundColor;
-
- if (haveCustomColor)
- {
- // If any colors are set, then check the "Custom" radio button
- gDialog.PageColorGroup.selectedItem = gDialog.CustomColorsRadio;
- UseCustomColors();
- }
- else
- {
- gDialog.PageColorGroup.selectedItem = gDialog.DefaultColorsRadio;
- UseDefaultColors();
- }
-}
-
-function GetColorAndUpdate(ColorWellID)
-{
- // Only allow selecting when in custom mode
- if (!gDialog.CustomColorsRadio.selected) return;
-
- var colorWell = document.getElementById(ColorWellID);
- if (!colorWell) return;
-
- // Don't allow a blank color, i.e., using the "default"
- var colorObj = { NoDefault:true, Type:"", TextColor:0, PageColor:0, Cancel:false };
-
- switch( ColorWellID )
- {
- case "textCW":
- colorObj.Type = "Text";
- colorObj.TextColor = customTextColor;
- break;
- case "linkCW":
- colorObj.Type = "Link";
- colorObj.TextColor = customLinkColor;
- break;
- case "activeCW":
- colorObj.Type = "ActiveLink";
- colorObj.TextColor = customActiveColor;
- break;
- case "visitedCW":
- colorObj.Type = "VisitedLink";
- colorObj.TextColor = customVisitedColor;
- break;
- case "backgroundCW":
- colorObj.Type = "Page";
- colorObj.PageColor = customBackgroundColor;
- break;
- }
-
- window.openDialog("chrome://editor/content/EdColorPicker.xul", "_blank", "chrome,close,titlebar,modal", "", colorObj);
-
- // User canceled the dialog
- if (colorObj.Cancel)
- return;
-
- var color = "";
- switch( ColorWellID )
- {
- case "textCW":
- color = customTextColor = colorObj.TextColor;
- break;
- case "linkCW":
- color = customLinkColor = colorObj.TextColor;
- break;
- case "activeCW":
- color = customActiveColor = colorObj.TextColor;
- break;
- case "visitedCW":
- color = customVisitedColor = colorObj.TextColor;
- break;
- case "backgroundCW":
- color = customBackgroundColor = colorObj.BackgroundColor;
- break;
- }
-
- setColorWell(ColorWellID, color);
- SetColorPreview(ColorWellID, color);
-}
-
-function SetColorPreview(ColorWellID, color)
-{
- switch( ColorWellID )
- {
- case "textCW":
- gDialog.NormalText.setAttribute(styleStr,colorStyle+color);
- break;
- case "linkCW":
- gDialog.LinkText.setAttribute(styleStr,colorStyle+color);
- break;
- case "activeCW":
- gDialog.ActiveLinkText.setAttribute(styleStr,colorStyle+color);
- break;
- case "visitedCW":
- gDialog.VisitedLinkText.setAttribute(styleStr,colorStyle+color);
- break;
- case "backgroundCW":
- // Must combine background color and image style values
- var styleValue = backColorStyle+color;
- if (gBackgroundImage)
- styleValue += ";"+backImageStyle+gBackgroundImage+");";
-
- gDialog.ColorPreview.setAttribute(styleStr,styleValue);
- previewBGColor = color;
- break;
- }
-}
-
-function UseCustomColors()
-{
- SetElementEnabledById("TextButton", true);
- SetElementEnabledById("LinkButton", true);
- SetElementEnabledById("ActiveLinkButton", true);
- SetElementEnabledById("VisitedLinkButton", true);
- SetElementEnabledById("BackgroundButton", true);
- SetElementEnabledById("Text", true);
- SetElementEnabledById("Link", true);
- SetElementEnabledById("Active", true);
- SetElementEnabledById("Visited", true);
- SetElementEnabledById("Background", true);
-
- SetColorPreview("textCW", customTextColor);
- SetColorPreview("linkCW", customLinkColor);
- SetColorPreview("activeCW", customActiveColor);
- SetColorPreview("visitedCW", customVisitedColor);
- SetColorPreview("backgroundCW", customBackgroundColor);
-
- setColorWell("textCW", customTextColor);
- setColorWell("linkCW", customLinkColor);
- setColorWell("activeCW", customActiveColor);
- setColorWell("visitedCW", customVisitedColor);
- setColorWell("backgroundCW", customBackgroundColor);
-}
-
-function UseDefaultColors()
-{
- SetColorPreview("textCW", defaultTextColor);
- SetColorPreview("linkCW", defaultLinkColor);
- SetColorPreview("activeCW", defaultActiveColor);
- SetColorPreview("visitedCW", defaultVisitedColor);
- SetColorPreview("backgroundCW", defaultBackgroundColor);
-
- // Setting to blank color will remove color from buttons,
- setColorWell("textCW", "");
- setColorWell("linkCW", "");
- setColorWell("activeCW", "");
- setColorWell("visitedCW", "");
- setColorWell("backgroundCW", "");
-
- // Disable color buttons and labels
- SetElementEnabledById("TextButton", false);
- SetElementEnabledById("LinkButton", false);
- SetElementEnabledById("ActiveLinkButton", false);
- SetElementEnabledById("VisitedLinkButton", false);
- SetElementEnabledById("BackgroundButton", false);
- SetElementEnabledById("Text", false);
- SetElementEnabledById("Link", false);
- SetElementEnabledById("Active", false);
- SetElementEnabledById("Visited", false);
- SetElementEnabledById("Background", false);
-}
-
-function chooseFile()
-{
- // Get a local image file, converted into URL format
- var fileName = GetLocalFileURL("img");
- if (fileName)
- {
- // Always try to relativize local file URLs
- if (gHaveDocumentUrl)
- fileName = MakeRelativeUrl(fileName);
-
- gDialog.BackgroundImageInput.value = fileName;
-
- SetRelativeCheckbox();
-
- ValidateAndPreviewImage(true);
- }
- SetTextboxFocus(gDialog.BackgroundImageInput);
-}
-
-function ChangeBackgroundImage()
-{
- // Don't show error message for image while user is typing
- ValidateAndPreviewImage(false);
- SetRelativeCheckbox();
-}
-
-function ValidateAndPreviewImage(ShowErrorMessage)
-{
- // First make a string with just background color
- var styleValue = backColorStyle+previewBGColor+";";
-
- var retVal = true;
- var image = TrimString(gDialog.BackgroundImageInput.value);
- if (image)
- {
- if (isImageDataShortened(image))
- {
- gBackgroundImage = restoredImageData(gDialog.BackgroundImageInput);
- }
- else
- {
- gBackgroundImage = image;
-
- // Display must use absolute URL if possible
- var displayImage = gHaveDocumentUrl ? MakeAbsoluteUrl(image) : image;
- styleValue += backImageStyle+displayImage+");";
- }
- }
- else
- {
- gBackgroundImage = null;
- }
-
- // Set style on preview (removes image if not valid)
- gDialog.ColorPreview.setAttribute(styleStr, styleValue);
-
- // Note that an "empty" string is valid
- return retVal;
-}
-
-function ValidateData()
-{
- var editor = GetCurrentEditor();
- try {
- // Colors values are updated as they are picked, no validation necessary
- if (gDialog.DefaultColorsRadio.selected)
- {
- editor.removeAttributeOrEquivalent(globalElement, textStr, true);
- globalElement.removeAttribute(linkStr);
- globalElement.removeAttribute(vlinkStr);
- globalElement.removeAttribute(alinkStr);
- editor.removeAttributeOrEquivalent(globalElement, bgcolorStr, true);
- }
- else
- {
- //Do NOT accept the CSS "WindowsOS" color strings!
- // Problem: We really should try to get the actual color values
- // from windows, but I don't know how to do that!
- var tmpColor = customTextColor.toLowerCase();
- if (tmpColor != "windowtext")
- editor.setAttributeOrEquivalent(globalElement, textStr,
- customTextColor, true);
- else
- editor.removeAttributeOrEquivalent(globalElement, textStr, true);
-
- tmpColor = customBackgroundColor.toLowerCase();
- if (tmpColor != "window")
- editor.setAttributeOrEquivalent(globalElement, bgcolorStr, customBackgroundColor, true);
- else
- editor.removeAttributeOrEquivalent(globalElement, bgcolorStr, true);
-
- globalElement.setAttribute(linkStr, customLinkColor);
- globalElement.setAttribute(vlinkStr, customVisitedColor);
- globalElement.setAttribute(alinkStr, customActiveColor);
- }
-
- if (ValidateAndPreviewImage(true))
- {
- // A valid image may be null for no image
- if (gBackgroundImage)
- globalElement.setAttribute(backgroundStr, gBackgroundImage);
- else
- editor.removeAttributeOrEquivalent(globalElement, backgroundStr, true);
-
- return true;
- }
- } catch (e) {}
- return false;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- // Copy attributes to element we are changing
- try {
- GetCurrentEditor().cloneAttributes(gBodyElement, globalElement);
- } catch (e) {}
-
- SaveWindowLocation();
- return true; // do close the window
- }
- return false;
-}
diff --git a/editor/ui/dialogs/content/EdColorProps.xul b/editor/ui/dialogs/content/EdColorProps.xul
deleted file mode 100644
index 9a3a55e2b..000000000
--- a/editor/ui/dialogs/content/EdColorProps.xul
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorColorProperties.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdColorProps.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-
- <groupbox align="start">
- <caption label="&pageColors.label;"/>
- <radiogroup id="PageColorGroup">
- <radio id="DefaultColorsRadio" label="&defaultColorsRadio.label;" oncommand="UseDefaultColors()"
- accesskey="&defaultColorsRadio.accessKey;"
- tooltiptext="&defaultColorsRadio.tooltip;" />
- <radio id="CustomColorsRadio" label="&customColorsRadio.label;" oncommand="UseCustomColors()"
- accesskey="&customColorsRadio.accessKey;"
- tooltiptext="&customColorsRadio.tooltip;" />
- </radiogroup>
- <hbox class="indent">
- <grid>
- <columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label id="Text" control="TextButton"
- value="&normalText.label;&colon.character;"
- accesskey="&normalText.accessKey;"/>
- <button id="TextButton" class="color-button" oncommand="GetColorAndUpdate('textCW');">
- <spacer id="textCW" class="color-well"/>
- </button>
- </row>
- <row align="center">
- <label id="Link" control="LinkButton"
- value="&linkText.label;&colon.character;"
- accesskey="&linkText.accessKey;"/>
- <button id="LinkButton" class="color-button" oncommand="GetColorAndUpdate('linkCW');">
- <spacer id="linkCW" class="color-well"/>
- </button>
- </row>
- <row align="center">
- <label id="Active" control="ActiveLinkButton"
- value="&activeLinkText.label;&colon.character;"
- accesskey="&activeLinkText.accessKey;"/>
- <button id="ActiveLinkButton" class="color-button" oncommand="GetColorAndUpdate('activeCW');">
- <spacer id="activeCW" class="color-well"/>
- </button>
- </row>
- <row align="center">
- <label id="Visited" control="VisitedLinkButton"
- value="&visitedLinkText.label;&colon.character;"
- accesskey="&visitedLinkText.accessKey;"/>
- <button id="VisitedLinkButton" class="color-button" oncommand="GetColorAndUpdate('visitedCW');">
- <spacer id="visitedCW" class="color-well"/>
- </button>
- </row>
- <row align="center">
- <label id="Background" control="BackgroundButton"
- value="&background.label;"
- accesskey="&background.accessKey;"/>
- <button id="BackgroundButton" class="color-button" oncommand="GetColorAndUpdate('backgroundCW');">
- <spacer id="backgroundCW" class="color-well"/>
- </button>
- </row>
- </rows>
- </grid>
- <vbox id="ColorPreview" flex="1">
- <spacer flex="1"/>
- <label class="larger" id="NormalText" value="&normalText.label;"/>
- <spacer flex="1"/>
- <label class="larger" id="LinkText" value="&linkText.label;"/>
- <spacer flex="1"/>
- <label class="larger" id="ActiveLinkText" value="&activeLinkText.label;"/>
- <spacer flex="1"/>
- <label class="larger" id="VisitedLinkText" value="&visitedLinkText.label;"/>
- <spacer flex="1"/>
- </vbox>
- <spacer flex="1"/>
- </hbox>
- <spacer class="spacer"/>
- </groupbox>
- <spacer class="spacer"/>
- <label control="BackgroundImageInput"
- value="&backgroundImage.label;"
- accesskey="&backgroundImage.accessKey;"/>
- <textbox id="BackgroundImageInput" class="uri-element" oninput="ChangeBackgroundImage()"
- tooltiptext="&backgroundImage.tooltip;" flex="1"/>
- <hbox align="center">
- <!-- from EdDialogOverlay.xul 'for' identifies the textfield to get URL from -->
- <checkbox id="MakeRelativeCheckbox" for="BackgroundImageInput"/>
- <spacer flex="1"/>
- <!-- from EdDialogOverlay.xul -->
- <button id="ChooseFile"/>
- </hbox>
- <spacer class="smallspacer"/>
- <hbox>
- <spacer flex="1"/>
- <!-- from EdDialogOverlay.xul -->
- <button id="AdvancedEditButton"/>
- </hbox>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdConvertToTable.js b/editor/ui/dialogs/content/EdConvertToTable.js
deleted file mode 100644
index 6e24b6f2d..000000000
--- a/editor/ui/dialogs/content/EdConvertToTable.js
+++ /dev/null
@@ -1,330 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gIndex;
-var gCommaIndex = "0";
-var gSpaceIndex = "1";
-var gOtherIndex = "2";
-
-// dialog initialization code
-function Startup()
-{
- if (!GetCurrentEditor())
- {
- window.close();
- return;
- }
-
- gDialog.sepRadioGroup = document.getElementById("SepRadioGroup");
- gDialog.sepCharacterInput = document.getElementById("SepCharacterInput");
- gDialog.deleteSepCharacter = document.getElementById("DeleteSepCharacter");
- gDialog.collapseSpaces = document.getElementById("CollapseSpaces");
-
- // We persist the user's separator character
- gDialog.sepCharacterInput.value = gDialog.sepRadioGroup.getAttribute("character");
-
- gIndex = gDialog.sepRadioGroup.getAttribute("index");
-
- switch (gIndex)
- {
- case gCommaIndex:
- default:
- gDialog.sepRadioGroup.selectedItem = document.getElementById("comma");
- break;
- case gSpaceIndex:
- gDialog.sepRadioGroup.selectedItem = document.getElementById("space");
- break;
- case gOtherIndex:
- gDialog.sepRadioGroup.selectedItem = document.getElementById("other");
- break;
- }
-
- // Set initial enable state on character input and "collapse" checkbox
- SelectCharacter(gIndex);
-
- SetWindowLocation();
-}
-
-function InputSepCharacter()
-{
- var str = gDialog.sepCharacterInput.value;
-
- // Limit input to 1 character
- if (str.length > 1)
- str = str.slice(0,1);
-
- // We can never allow tag or entity delimiters for separator character
- if (str == "<" || str == ">" || str == "&" || str == ";" || str == " ")
- str = "";
-
- gDialog.sepCharacterInput.value = str;
-}
-
-function SelectCharacter(radioGroupIndex)
-{
- gIndex = radioGroupIndex;
- SetElementEnabledById("SepCharacterInput", gIndex == gOtherIndex);
- SetElementEnabledById("CollapseSpaces", gIndex == gSpaceIndex);
-}
-
-function onAccept()
-{
- var sepCharacter = "";
- switch (gIndex)
- {
- case gCommaIndex:
- sepCharacter = ",";
- break;
- case gSpaceIndex:
- sepCharacter = " ";
- break;
- case gOtherIndex:
- sepCharacter = gDialog.sepCharacterInput.value.slice(0,1);
- break;
- }
-
- var editor = GetCurrentEditor();
- var str;
- try {
- str = editor.outputToString("text/html", kOutputLFLineBreak | kOutputSelectionOnly);
- } catch (e) {}
- if (!str)
- {
- SaveWindowLocation();
- return true;
- }
-
- // Replace nbsp with spaces:
- str = str.replace(/\u00a0/g, " ");
-
- // Strip out </p> completely
- str = str.replace(/\s*<\/p>\s*/g, "");
-
- // Trim whitespace adjacent to <p> and <br> tags
- // and replace <p> with <br>
- // (which will be replaced with </tr> below)
- str = str.replace(/\s*<p>\s*|\s*<br>\s*/g, "<br>");
-
- // Trim leading <br>s
- str = str.replace(/^(<br>)+/, "");
-
- // Trim trailing <br>s
- str = str.replace(/(<br>)+$/, "");
-
- // Reduce multiple internal <br> to just 1
- // TODO: Maybe add a checkbox to let user decide
- //str = str.replace(/(<br>)+/g, "<br>");
-
- // Trim leading and trailing spaces
- str = str.trim();
-
- // Remove all tag contents so we don't replace
- // separator character within tags
- // Also converts lists to something usefull
- var stack = [];
- var start;
- var end;
- var searchStart = 0;
- var listSeparator = "";
- var listItemSeparator = "";
- var endList = false;
-
- do {
- start = str.indexOf("<", searchStart);
-
- if (start >= 0)
- {
- end = str.indexOf(">", start+1);
- if (end > start)
- {
- let tagContent = str.slice(start + 1, end).trim();
-
- if (/^ol|^ul|^dl/.test(tagContent))
- {
- // Replace list tag with <BR> to start new row
- // at begining of second or greater list tag
- str = str.slice(0, start) + listSeparator + str.slice(end+1);
- if (listSeparator == "")
- listSeparator = "<br>";
-
- // Reset for list item separation into cells
- listItemSeparator = "";
- }
- else if (/^li|^dt|^dd/.test(tagContent))
- {
- // Start a new row if this is first item after the ending the last list
- if (endList)
- listItemSeparator = "<br>";
-
- // Start new cell at begining of second or greater list items
- str = str.slice(0, start) + listItemSeparator + str.slice(end+1);
-
- if (endList || listItemSeparator == "")
- listItemSeparator = sepCharacter;
-
- endList = false;
- }
- else
- {
- // Find end tags
- endList = /^\/ol|^\/ul|^\/dl/.test(tagContent);
- if (endList || /^\/li|^\/dt|^\/dd/.test(tagContent))
- {
- // Strip out tag
- str = str.slice(0, start) + str.slice(end+1);
- }
- else
- {
- // Not a list-related tag: Store tag contents in an array
- stack.push(tagContent);
-
- // Keep the "<" and ">" while removing from source string
- start++;
- str = str.slice(0, start) + str.slice(end);
- }
- }
- }
- searchStart = start + 1;
- }
- } while (start >= 0);
-
- // Replace separator characters with table cells
- var replaceString;
- if (gDialog.deleteSepCharacter.checked)
- {
- replaceString = "";
- }
- else
- {
- // Don't delete separator character,
- // so include it at start of string to replace
- replaceString = sepCharacter;
- }
-
- replaceString += "<td>";
-
- if (sepCharacter.length > 0)
- {
- var tempStr = sepCharacter;
- var regExpChars = ".!@#$%^&*-+[]{}()\|\\\/";
- if (regExpChars.includes(sepCharacter))
- tempStr = "\\" + sepCharacter;
-
- if (gIndex == gSpaceIndex)
- {
- // If checkbox is checked,
- // one or more adjacent spaces are one separator
- if (gDialog.collapseSpaces.checked)
- tempStr = "\\s+"
- else
- tempStr = "\\s";
- }
- var pattern = new RegExp(tempStr, "g");
- str = str.replace(pattern, replaceString);
- }
-
- // Put back tag contents that we removed above
- searchStart = 0;
- var stackIndex = 0;
- do {
- start = str.indexOf("<", searchStart);
- end = start + 1;
- if (start >= 0 && str.charAt(end) == ">")
- {
- // We really need a FIFO stack!
- str = str.slice(0, end) + stack[stackIndex++] + str.slice(end);
- }
- searchStart = end;
-
- } while (start >= 0);
-
- // End table row and start another for each br or p
- str = str.replace(/\s*<br>\s*/g, "</tr>\n<tr><td>");
-
- // Add the table tags and the opening and closing tr/td tags
- // Default table attributes should be same as those used in nsHTMLEditor::CreateElementWithDefaults()
- // (Default width="100%" is used in EdInsertTable.js)
- str = "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"2\">\n<tr><td>" + str + "</tr>\n</table>\n";
-
- editor.beginTransaction();
-
- // Delete the selection -- makes it easier to find where table will insert
- var nodeBeforeTable = null;
- var nodeAfterTable = null;
- try {
- editor.deleteSelection(editor.eNone, editor.eStrip);
-
- var anchorNodeBeforeInsert = editor.selection.anchorNode;
- var offset = editor.selection.anchorOffset;
- if (anchorNodeBeforeInsert.nodeType == Node.TEXT_NODE)
- {
- // Text was split. Table should be right after the first or before
- nodeBeforeTable = anchorNodeBeforeInsert.previousSibling;
- nodeAfterTable = anchorNodeBeforeInsert;
- }
- else
- {
- // Table should be inserted right after node pointed to by selection
- if (offset > 0)
- nodeBeforeTable = anchorNodeBeforeInsert.childNodes.item(offset - 1);
-
- nodeAfterTable = anchorNodeBeforeInsert.childNodes.item(offset);
- }
-
- editor.insertHTML(str);
- } catch (e) {}
-
- var table = null;
- if (nodeAfterTable)
- {
- var previous = nodeAfterTable.previousSibling;
- if (previous && previous.nodeName.toLowerCase() == "table")
- table = previous;
- }
- if (!table && nodeBeforeTable)
- {
- var next = nodeBeforeTable.nextSibling;
- if (next && next.nodeName.toLowerCase() == "table")
- table = next;
- }
-
- if (table)
- {
- // Fixup table only if pref is set
- var firstRow;
- try {
- if (Services.prefs.getBoolPref("editor.table.maintain_structure"))
- editor.normalizeTable(table);
-
- firstRow = editor.getFirstRow(table);
- } catch(e) {}
-
- // Put caret in first cell
- if (firstRow)
- {
- var node2 = firstRow.firstChild;
- do {
- if (node2.nodeName.toLowerCase() == "td" ||
- node2.nodeName.toLowerCase() == "th")
- {
- try {
- editor.selection.collapse(node2, 0);
- } catch(e) {}
- break;
- }
- node2 = node.nextSibling;
- } while (node2);
- }
- }
-
- editor.endTransaction();
-
- // Save persisted attributes
- gDialog.sepRadioGroup.setAttribute("index", gIndex);
- if (gIndex == gOtherIndex)
- gDialog.sepRadioGroup.setAttribute("character", sepCharacter);
-
- SaveWindowLocation();
- return true;
-}
diff --git a/editor/ui/dialogs/content/EdConvertToTable.xul b/editor/ui/dialogs/content/EdConvertToTable.xul
deleted file mode 100644
index 2a8eb3817..000000000
--- a/editor/ui/dialogs/content/EdConvertToTable.xul
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdConvertToTable.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();"
- style="min-width:20em">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <!--- Element-specific methods -->
- <script type="application/javascript" src="chrome://editor/content/EdConvertToTable.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <description class="wrap" flex="1">&instructions1.label;</description>
- <description class="wrap" flex="1">&instructions2.label;</description>
- <radiogroup id="SepRadioGroup" persist="index character" index="0" character="">
- <radio id="comma" label="&commaRadio.label;" oncommand="SelectCharacter('0');"/>
- <radio id="space" label="&spaceRadio.label;" oncommand="SelectCharacter('1');"/>
- <hbox>
- <spacer class="radio-spacer"/>
- <checkbox id="CollapseSpaces" label="&collapseSpaces.label;"
- checked="true" persist="checked"
- tooltiptext="&collapseSpaces.tooltip;"/>
- </hbox>
- <hbox align="center">
- <radio id="other" label="&otherRadio.label;" oncommand="SelectCharacter('2');"/>
- <textbox class="narrow" id="SepCharacterInput" oninput="InputSepCharacter()"/>
- </hbox>
- </radiogroup>
- <spacer class="spacer"/>
- <checkbox id="DeleteSepCharacter" label="&deleteCharCheck.label;" persist="checked"/>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdDialogCommon.js b/editor/ui/dialogs/content/EdDialogCommon.js
deleted file mode 100644
index 570189ae4..000000000
--- a/editor/ui/dialogs/content/EdDialogCommon.js
+++ /dev/null
@@ -1,1001 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Each editor window must include this file
-
-// Object to attach commonly-used widgets (all dialogs should use this)
-var gDialog = {};
-
-var gValidationError = false;
-
-// Use for 'defaultIndex' param in InitPixelOrPercentMenulist
-const gPixel = 0;
-const gPercent = 1;
-
-const gMaxPixels = 100000; // Used for image size, borders, spacing, and padding
-// Gecko code uses 1000 for maximum rowspan, colspan
-// Also, editing performance is really bad above this
-const gMaxRows = 1000;
-const gMaxColumns = 1000;
-const gMaxTableSize = 1000000; // Width or height of table or cells
-
-// For dialogs that expand in size. Default is smaller size see "onMoreFewer()" below
-var SeeMore = false;
-
-// A XUL element with id="location" for managing
-// dialog location relative to parent window
-var gLocation;
-
-// The element being edited - so AdvancedEdit can have access to it
-var globalElement;
-
-/* Validate contents of an input field
- *
- * inputWidget The 'textbox' XUL element for text input of the attribute's value
- * listWidget The 'menulist' XUL element for choosing "pixel" or "percent"
- * May be null when no pixel/percent is used.
- * minVal minimum allowed for input widget's value
- * maxVal maximum allowed for input widget's value
- * (when "listWidget" is used, maxVal is used for "pixel" maximum,
- * 100% is assumed if "percent" is the user's choice)
- * element The DOM element that we set the attribute on. May be null.
- * attName Name of the attribute to set. May be null or ignored if "element" is null
- * mustHaveValue If true, error dialog is displayed if "value" is empty string
- *
- * This calls "ValidateNumberRange()", which puts up an error dialog to inform the user.
- * If error, we also:
- * Shift focus and select contents of the inputWidget,
- * Switch to appropriate panel of tabbed dialog if user implements "SwitchToValidate()",
- * and/or will expand the dialog to full size if "More / Fewer" feature is implemented
- *
- * Returns the "value" as a string, or "" if error or input contents are empty
- * The global "gValidationError" variable is set true if error was found
- */
-function ValidateNumber(inputWidget, listWidget, minVal, maxVal, element, attName, mustHaveValue, mustShowMoreSection)
-{
- if (!inputWidget)
- {
- gValidationError = true;
- return "";
- }
-
- // Global error return value
- gValidationError = false;
- var maxLimit = maxVal;
- var isPercent = false;
-
- var numString = TrimString(inputWidget.value);
- if (numString || mustHaveValue)
- {
- if (listWidget)
- isPercent = (listWidget.selectedIndex == 1);
- if (isPercent)
- maxLimit = 100;
-
- // This method puts up the error message
- numString = ValidateNumberRange(numString, minVal, maxLimit, mustHaveValue);
- if(!numString)
- {
- // Switch to appropriate panel for error reporting
- SwitchToValidatePanel();
-
- // or expand dialog for users of "More / Fewer" button
- if ("dialog" in window && dialog &&
- "MoreSection" in gDialog && gDialog.MoreSection)
- {
- if ( !SeeMore )
- onMoreFewer();
- }
-
- // Error - shift to offending input widget
- SetTextboxFocus(inputWidget);
- gValidationError = true;
- }
- else
- {
- if (isPercent)
- numString += "%";
- if (element)
- GetCurrentEditor().setAttributeOrEquivalent(element, attName, numString, true);
- }
- } else if (element) {
- GetCurrentEditor().removeAttributeOrEquivalent(element, attName, true)
- }
- return numString;
-}
-
-/* Validate contents of an input field
- *
- * value number to validate
- * minVal minimum allowed for input widget's value
- * maxVal maximum allowed for input widget's value
- * (when "listWidget" is used, maxVal is used for "pixel" maximum,
- * 100% is assumed if "percent" is the user's choice)
- * mustHaveValue If true, error dialog is displayed if "value" is empty string
- *
- * If inputWidget's value is outside of range, or is empty when "mustHaveValue" = true,
- * an error dialog is popuped up to inform the user. The focus is shifted
- * to the inputWidget.
- *
- * Returns the "value" as a string, or "" if error or input contents are empty
- * The global "gValidationError" variable is set true if error was found
- */
-function ValidateNumberRange(value, minValue, maxValue, mustHaveValue)
-{
- // Initialize global error flag
- gValidationError = false;
- value = TrimString(String(value));
-
- // We don't show error for empty string unless caller wants to
- if (!value && !mustHaveValue)
- return "";
-
- var numberStr = "";
-
- if (value.length > 0)
- {
- // Extract just numeric characters
- var number = Number(value.replace(/\D+/g, ""));
- if (number >= minValue && number <= maxValue )
- {
- // Return string version of the number
- return String(number);
- }
- numberStr = String(number);
- }
-
- var message = "";
-
- if (numberStr.length > 0)
- {
- // We have a number from user outside of allowed range
- message = GetString( "ValidateRangeMsg");
- message = message.replace(/%n%/, numberStr);
- message += "\n ";
- }
- message += GetString( "ValidateNumberMsg");
-
- // Replace variable placeholders in message with number values
- message = message.replace(/%min%/, minValue).replace(/%max%/, maxValue);
- ShowInputErrorMessage(message);
-
- // Return an empty string to indicate error
- gValidationError = true;
- return "";
-}
-
-function SetTextboxFocusById(id)
-{
- SetTextboxFocus(document.getElementById(id));
-}
-
-function SetTextboxFocus(textbox)
-{
- if (textbox)
- {
- //XXX Using the setTimeout is hacky workaround for bug 103197
- // Must create a new function to keep "textbox" in scope
- setTimeout( function(textbox) { textbox.focus(); textbox.select(); }, 0, textbox );
- }
-}
-
-function ShowInputErrorMessage(message)
-{
- Services.prompt.alert(window, GetString("InputError"), message);
- window.focus();
-}
-
-// Get the text appropriate to parent container
-// to determine what a "%" value is referring to.
-// elementForAtt is element we are actually setting attributes on
-// (a temporary copy of element in the doc to allow canceling),
-// but elementInDoc is needed to find parent context in document
-function GetAppropriatePercentString(elementForAtt, elementInDoc)
-{
- var editor = GetCurrentEditor();
- try {
- var name = elementForAtt.nodeName.toLowerCase();
- if ( name == "td" || name == "th")
- return GetString("PercentOfTable");
-
- // Check if element is within a table cell
- if (editor.getElementOrParentByTagName("td", elementInDoc))
- return GetString("PercentOfCell");
- else
- return GetString("PercentOfWindow");
- } catch (e) { return "";}
-}
-
-function ClearListbox(listbox)
-{
- if (listbox)
- {
- listbox.clearSelection();
- while (listbox.hasChildNodes())
- listbox.lastChild.remove();
- }
-}
-
-function forceInteger(elementID)
-{
- var editField = document.getElementById( elementID );
- if ( !editField )
- return;
-
- var stringIn = editField.value;
- if (stringIn && stringIn.length > 0)
- {
- // Strip out all nonnumeric characters
- stringIn = stringIn.replace(/\D+/g,"");
- if (!stringIn) stringIn = "";
-
- // Write back only if changed
- if (stringIn != editField.value)
- editField.value = stringIn;
- }
-}
-
-function InitPixelOrPercentMenulist(elementForAtt, elementInDoc, attribute, menulistID, defaultIndex)
-{
- if (!defaultIndex) defaultIndex = gPixel;
-
- // var size = elementForAtt.getAttribute(attribute);
- var size = GetHTMLOrCSSStyleValue(elementForAtt, attribute, attribute)
- var menulist = document.getElementById(menulistID);
- var pixelItem;
- var percentItem;
-
- if (!menulist)
- {
- dump("NO MENULIST found for ID="+menulistID+"\n");
- return size;
- }
-
- menulist.removeAllItems();
- pixelItem = menulist.appendItem(GetString("Pixels"));
-
- if (!pixelItem) return 0;
-
- percentItem = menulist.appendItem(GetAppropriatePercentString(elementForAtt, elementInDoc));
- if (size && size.length > 0)
- {
- // Search for a "%" or "px"
- if (size.includes("%"))
- {
- // Strip out the %
- size = size.substr(0, size.indexOf("%"));
- if (percentItem)
- menulist.selectedItem = percentItem;
- }
- else
- {
- if (size.includes("px"))
- // Strip out the px
- size = size.substr(0, size.indexOf("px"));
- menulist.selectedItem = pixelItem;
- }
- }
- else
- menulist.selectedIndex = defaultIndex;
-
- return size;
-}
-
-function onAdvancedEdit()
-{
- // First validate data from widgets in the "simpler" property dialog
- if (ValidateData())
- {
- // Set true if OK is clicked in the Advanced Edit dialog
- window.AdvancedEditOK = false;
- // Open the AdvancedEdit dialog, passing in the element to be edited
- // (the copy named "globalElement")
- window.openDialog("chrome://editor/content/EdAdvancedEdit.xul", "_blank", "chrome,close,titlebar,modal,resizable=yes", "", globalElement);
- window.focus();
- if (window.AdvancedEditOK)
- {
- // Copy edited attributes to the dialog widgets:
- InitDialog();
- }
- }
-}
-
-function getColor(ColorPickerID)
-{
- var colorPicker = document.getElementById(ColorPickerID);
- var color;
- if (colorPicker)
- {
- // Extract color from colorPicker and assign to colorWell.
- color = colorPicker.getAttribute("color");
- if (color && color == "")
- return null;
- // Clear color so next if it's called again before
- // color picker is actually used, we dedect the "don't set color" state
- colorPicker.setAttribute("color","");
- }
-
- return color;
-}
-
-function setColorWell(ColorWellID, color)
-{
- var colorWell = document.getElementById(ColorWellID);
- if (colorWell)
- {
- if (!color || color == "")
- {
- // Don't set color (use default)
- // Trigger change to not show color swatch
- colorWell.setAttribute("default","true");
- // Style in CSS sets "background-color",
- // but color won't clear unless we do this:
- colorWell.removeAttribute("style");
- }
- else
- {
- colorWell.removeAttribute("default");
- // Use setAttribute so colorwell can be a XUL element, such as button
- colorWell.setAttribute("style", "background-color:"+color);
- }
- }
-}
-
-function getColorAndSetColorWell(ColorPickerID, ColorWellID)
-{
- var color = getColor(ColorPickerID);
- setColorWell(ColorWellID, color);
- return color;
-}
-
-function InitMoreFewer()
-{
- // Set SeeMore bool to the OPPOSITE of the current state,
- // which is automatically saved by using the 'persist="more"'
- // attribute on the gDialog.MoreFewerButton button
- // onMoreFewer will toggle it and redraw the dialog
- SeeMore = (gDialog.MoreFewerButton.getAttribute("more") != "1");
- onMoreFewer();
- gDialog.MoreFewerButton.setAttribute("accesskey",GetString("PropertiesAccessKey"));
-}
-
-function onMoreFewer()
-{
- if (SeeMore)
- {
- gDialog.MoreSection.collapsed = true;
- gDialog.MoreFewerButton.setAttribute("more","0");
- gDialog.MoreFewerButton.setAttribute("label",GetString("MoreProperties"));
- SeeMore = false;
- }
- else
- {
- gDialog.MoreSection.collapsed = false;
- gDialog.MoreFewerButton.setAttribute("more","1");
- gDialog.MoreFewerButton.setAttribute("label",GetString("FewerProperties"));
- SeeMore = true;
- }
- window.sizeToContent();
-}
-
-function SwitchToValidatePanel()
-{
- // no default implementation
- // Only EdTableProps.js currently implements this
-}
-
-const nsIFilePicker = Components.interfaces.nsIFilePicker;
-
-function GetLocalFileURL(filterType)
-{
- var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
- var fileType = "html";
-
- if (filterType == "img")
- {
- fp.init(window, GetString("SelectImageFile"), nsIFilePicker.modeOpen);
- fp.appendFilters(nsIFilePicker.filterImages);
- fileType = "image";
- }
- // Current usage of this is in Link dialog,
- // where we always want HTML first
- else if (filterType.startsWith("html"))
- {
- fp.init(window, GetString("OpenHTMLFile"), nsIFilePicker.modeOpen);
-
- // When loading into Composer, direct user to prefer HTML files and text files,
- // so we call separately to control the order of the filter list
- fp.appendFilters(nsIFilePicker.filterHTML);
- fp.appendFilters(nsIFilePicker.filterText);
-
- // Link dialog also allows linking to images
- if (filterType.includes("img", 1))
- fp.appendFilters(nsIFilePicker.filterImages);
-
- }
- // Default or last filter is "All Files"
- fp.appendFilters(nsIFilePicker.filterAll);
-
- // set the file picker's current directory to last-opened location saved in prefs
- SetFilePickerDirectory(fp, fileType);
-
-
- /* doesn't handle *.shtml files */
- try {
- var ret = fp.show();
- if (ret == nsIFilePicker.returnCancel)
- return null;
- }
- catch (ex) {
- dump("filePicker.chooseInputFile threw an exception\n");
- return null;
- }
- SaveFilePickerDirectory(fp, fileType);
-
- var fileHandler = GetFileProtocolHandler();
- return fp.file ? fileHandler.getURLSpecFromFile(fp.file) : null;
-}
-
-function GetMetaElementByAttribute(name, value)
-{
- if (name)
- {
- name = name.toLowerCase();
- let editor = GetCurrentEditor();
- try {
- return editor.document.querySelector('meta[' + name + '="' + value + '"]');
- } catch (e) {}
- }
- return null;
-}
-
-function CreateMetaElementWithAttribute(name, value)
-{
- let editor = GetCurrentEditor();
- try {
- let metaElement = editor.createElementWithDefaults("meta");
- if (name) {
- metaElement.setAttribute(name, value);
- }
- return metaElement;
- } catch (e) {}
- return null;
-}
-
-// Change "content" attribute on a META element,
-// or delete entire element it if content is empty
-// This uses undoable editor transactions
-function SetMetaElementContent(metaElement, content, insertNew, prepend)
-{
- if (metaElement)
- {
- var editor = GetCurrentEditor();
- try {
- if(!content || content == "")
- {
- if (!insertNew)
- editor.deleteNode(metaElement);
- }
- else
- {
- if (insertNew)
- {
- metaElement.setAttribute("content", content);
- if (prepend)
- PrependHeadElement(metaElement);
- else
- AppendHeadElement(metaElement);
- }
- else
- editor.setAttribute(metaElement, "content", content);
- }
- } catch (e) {}
- }
-}
-
-function GetHeadElement()
-{
- var editor = GetCurrentEditor();
- try {
- return editor.document.querySelector("head");
- } catch (e) {}
-
- return null;
-}
-
-function PrependHeadElement(element)
-{
- var head = GetHeadElement();
- if (head)
- {
- var editor = GetCurrentEditor();
- try {
- // Use editor's undoable transaction
- // Last param "true" says "don't change the selection"
- editor.insertNode(element, head, 0, true);
- } catch (e) {}
- }
-}
-
-function AppendHeadElement(element)
-{
- var head = GetHeadElement();
- if (head)
- {
- var position = 0;
- if (head.hasChildNodes())
- position = head.childNodes.length;
-
- var editor = GetCurrentEditor();
- try {
- // Use editor's undoable transaction
- // Last param "true" says "don't change the selection"
- editor.insertNode(element, head, position, true);
- } catch (e) {}
- }
-}
-
-function SetWindowLocation()
-{
- gLocation = document.getElementById("location");
- if (gLocation)
- {
- window.screenX = Math.max(0, Math.min(window.opener.screenX + Number(gLocation.getAttribute("offsetX")),
- screen.availWidth - window.outerWidth));
- window.screenY = Math.max(0, Math.min(window.opener.screenY + Number(gLocation.getAttribute("offsetY")),
- screen.availHeight - window.outerHeight));
- }
-}
-
-function SaveWindowLocation()
-{
- if (gLocation)
- {
- var newOffsetX = window.screenX - window.opener.screenX;
- var newOffsetY = window.screenY - window.opener.screenY;
- gLocation.setAttribute("offsetX", window.screenX - window.opener.screenX);
- gLocation.setAttribute("offsetY", window.screenY - window.opener.screenY);
- }
-}
-
-function onCancel()
-{
- SaveWindowLocation();
- // Close dialog by returning true
- return true;
-}
-
-function SetRelativeCheckbox(checkbox)
-{
- if (!checkbox) {
- checkbox = document.getElementById("MakeRelativeCheckbox");
- if (!checkbox)
- return;
- }
-
- var editor = GetCurrentEditor();
- // Mail never allows relative URLs, so hide the checkbox
- if (editor && (editor.flags & Components.interfaces.nsIPlaintextEditor.eEditorMailMask))
- {
- checkbox.collapsed = true;
- return;
- }
-
- var input = document.getElementById(checkbox.getAttribute("for"));
- if (!input)
- return;
-
- var url = TrimString(input.value);
- var urlScheme = GetScheme(url);
-
- // Check it if url is relative (no scheme).
- checkbox.checked = url.length > 0 && !urlScheme;
-
- // Now do checkbox enabling:
- var enable = false;
-
- var docUrl = GetDocumentBaseUrl();
- var docScheme = GetScheme(docUrl);
-
- if (url && docUrl && docScheme)
- {
- if (urlScheme)
- {
- // Url is absolute
- // If we can make a relative URL, then enable must be true!
- // (this lets the smarts of MakeRelativeUrl do all the hard work)
- enable = (GetScheme(MakeRelativeUrl(url)).length == 0);
- }
- else
- {
- // Url is relative
- // Check if url is a named anchor
- // but document doesn't have a filename
- // (it's probably "index.html" or "index.htm",
- // but we don't want to allow a malformed URL)
- if (url[0] == "#")
- {
- var docFilename = GetFilename(docUrl);
- enable = docFilename.length > 0;
- }
- else
- {
- // Any other url is assumed
- // to be ok to try to make absolute
- enable = true;
- }
- }
- }
-
- SetElementEnabled(checkbox, enable);
-}
-
-// oncommand handler for the Relativize checkbox in EditorOverlay.xul
-function MakeInputValueRelativeOrAbsolute(checkbox)
-{
- var input = document.getElementById(checkbox.getAttribute("for"));
- if (!input)
- return;
-
- var docUrl = GetDocumentBaseUrl();
- if (!docUrl)
- {
- // Checkbox should be disabled if not saved,
- // but keep this error message in case we change that
- Services.prompt.alert(window, "", GetString("SaveToUseRelativeUrl"));
- window.focus();
- }
- else
- {
- // Note that "checked" is opposite of its last state,
- // which determines what we want to do here
- if (checkbox.checked)
- input.value = MakeRelativeUrl(input.value);
- else
- input.value = MakeAbsoluteUrl(input.value);
-
- // Reset checkbox to reflect url state
- SetRelativeCheckbox(checkbox);
- }
-}
-
-var IsBlockParent = [
- "applet",
- "blockquote",
- "body",
- "center",
- "dd",
- "div",
- "form",
- "li",
- "noscript",
- "object",
- "td",
- "th",
-];
-
-var NotAnInlineParent = [
- "col",
- "colgroup",
- "dl",
- "dir",
- "menu",
- "ol",
- "table",
- "tbody",
- "tfoot",
- "thead",
- "tr",
- "ul",
-];
-
-function nodeIsBreak(editor, node)
-{
- // XXX This doesn't work because .localName is lowercase (see bug 1306060).
- return !node || node.localName == 'BR' || editor.nodeIsBlock(node);
-}
-
-function InsertElementAroundSelection(element)
-{
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- try {
- // First get the selection as a single range
- var range, start, end, offset;
- var count = editor.selection.rangeCount;
- if (count == 1)
- range = editor.selection.getRangeAt(0).cloneRange();
- else
- {
- range = editor.document.createRange();
- start = editor.selection.getRangeAt(0)
- range.setStart(start.startContainer, start.startOffset);
- end = editor.selection.getRangeAt(--count);
- range.setEnd(end.endContainer, end.endOffset);
- }
-
- // Flatten the selection to child nodes of the common ancestor
- while (range.startContainer != range.commonAncestorContainer)
- range.setStartBefore(range.startContainer);
- while (range.endContainer != range.commonAncestorContainer)
- range.setEndAfter(range.endContainer);
-
- if (editor.nodeIsBlock(element))
- // Block element parent must be a valid block
- while (!IsBlockParent.includes(range.commonAncestorContainer.localName))
- range.selectNode(range.commonAncestorContainer);
- else
- {
- // Fail if we're not inserting a block (use setInlineProperty instead)
- if (!nodeIsBreak(editor, range.commonAncestorContainer))
- return false;
- else if (NotAnInlineParent.includes(range.commonAncestorContainer.localName))
- // Inline element parent must not be an invalid block
- do range.selectNode(range.commonAncestorContainer);
- while (NotAnInlineParent.includes(range.commonAncestorContainer.localName));
- else
- // Further insert block check
- for (var i = range.startOffset; ; i++)
- if (i == range.endOffset)
- return false;
- else if (nodeIsBreak(editor, range.commonAncestorContainer.childNodes[i]))
- break;
- }
-
- // The range may be contained by body text, which should all be selected.
- offset = range.startOffset;
- start = range.startContainer.childNodes[offset];
- if (!nodeIsBreak(editor, start))
- {
- while (!nodeIsBreak(editor, start.previousSibling))
- {
- start = start.previousSibling;
- offset--;
- }
- }
- end = range.endContainer.childNodes[range.endOffset];
- if (end && !nodeIsBreak(editor, end.previousSibling))
- {
- while (!nodeIsBreak(editor, end))
- end = end.nextSibling;
- }
-
- // Now insert the node
- editor.insertNode(element, range.commonAncestorContainer, offset, true);
- offset = element.childNodes.length;
- if (!editor.nodeIsBlock(element))
- editor.setShouldTxnSetSelection(false);
-
- // Move all the old child nodes to the element
- var empty = true;
- while (start != end)
- {
- var next = start.nextSibling;
- editor.deleteNode(start);
- editor.insertNode(start, element, element.childNodes.length);
- empty = false;
- start = next;
- }
- if (!editor.nodeIsBlock(element))
- editor.setShouldTxnSetSelection(true);
- else
- {
- // Also move a trailing <br>
- // XXX This doesn't work because .localName is lowercase (see bug 1306060).
- if (start && start.localName == 'BR')
- {
- editor.deleteNode(start);
- editor.insertNode(start, element, element.childNodes.length);
- empty = false;
- }
- // Still nothing? Insert a <br> so the node is not empty
- if (empty)
- editor.insertNode(editor.createElementWithDefaults("br"), element, element.childNodes.length);
-
- // Hack to set the selection just inside the element
- editor.insertNode(editor.document.createTextNode(""), element, offset);
- }
- }
- finally {
- editor.endTransaction();
- }
-
- return true;
-}
-
-function nodeIsBlank(node)
-{
- return node && node.nodeType == Node.TEXT_NODE && !/\S/.test(node.data);
-}
-
-function nodeBeginsBlock(editor, node)
-{
- while (nodeIsBlank(node))
- node = node.nextSibling;
- return nodeIsBreak(editor, node);
-}
-
-function nodeEndsBlock(editor, node)
-{
- while (nodeIsBlank(node))
- node = node.previousSibling;
- return nodeIsBreak(editor, node);
-}
-
-// C++ function isn't exposed to JS :-(
-function RemoveBlockContainer(element)
-{
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- try {
- var range = editor.document.createRange();
- range.selectNode(element);
- var offset = range.startOffset;
- var parent = element.parentNode;
-
- // May need to insert a break after the removed element
- if (!nodeBeginsBlock(editor, element.nextSibling) &&
- !nodeEndsBlock(editor, element.lastChild))
- editor.insertNode(editor.createElementWithDefaults("br"), parent, range.endOffset);
-
- // May need to insert a break before the removed element, or if it was empty
- if (!nodeEndsBlock(editor, element.previousSibling) &&
- !nodeBeginsBlock(editor, element.firstChild || element.nextSibling))
- editor.insertNode(editor.createElementWithDefaults("br"), parent, offset++);
-
- // Now remove the element
- editor.deleteNode(element);
-
- // Need to copy the contained nodes?
- for (var i = 0; i < element.childNodes.length; i++)
- editor.insertNode(element.childNodes[i].cloneNode(true), parent, offset++);
- }
- finally {
- editor.endTransaction();
- }
-}
-
-// C++ function isn't exposed to JS :-(
-function RemoveContainer(element)
-{
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- try {
- var range = editor.document.createRange();
- var parent = element.parentNode;
- // Allow for automatic joining of text nodes
- // so we can't delete the container yet
- // so we need to copy the contained nodes
- for (var i = 0; i < element.childNodes.length; i++) {
- range.selectNode(element);
- editor.insertNode(element.childNodes[i].cloneNode(true), parent, range.startOffset);
- }
- // Now remove the element
- editor.deleteNode(element);
- }
- finally {
- editor.endTransaction();
- }
-}
-
-function FillLinkMenulist(linkMenulist, headingsArray)
-{
- var menupopup = linkMenulist.firstChild;
- var editor = GetCurrentEditor();
- try {
- var treeWalker = editor.document.createTreeWalker(editor.document, 1, null, true);
- var headingList = [];
- var anchorList = []; // for sorting
- var anchorMap = {}; // for weeding out duplicates and making heading anchors unique
- var anchor;
- var i;
- for (var element = treeWalker.nextNode(); element; element = treeWalker.nextNode())
- {
- // grab headings
- // Skip headings that already have a named anchor as their first child
- // (this may miss nearby anchors, but at least we don't insert another
- // under the same heading)
- if (element instanceof HTMLHeadingElement && element.textContent &&
- !(element.firstChild instanceof HTMLAnchorElement && element.firstChild.name))
- headingList.push(element);
-
- // grab named anchors
- if (element instanceof HTMLAnchorElement && element.name)
- {
- anchor = '#' + element.name;
- if (!(anchor in anchorMap))
- {
- anchorList.push({anchor: anchor, sortkey: anchor.toLowerCase()});
- anchorMap[anchor] = true;
- }
- }
-
- // grab IDs
- if (element.id)
- {
- anchor = '#' + element.id;
- if (!(anchor in anchorMap))
- {
- anchorList.push({anchor: anchor, sortkey: anchor.toLowerCase()});
- anchorMap[anchor] = true;
- }
- }
- }
- // add anchor for headings
- for (i = 0; i < headingList.length; i++)
- {
- var heading = headingList[i];
-
- // Use just first 40 characters, don't add "...",
- // and replace whitespace with "_" and strip non-word characters
- anchor = '#' + ConvertToCDATAString(TruncateStringAtWordEnd(heading.textContent, 40, false));
-
- // Append "_" to any name already in the list
- while (anchor in anchorMap)
- anchor += "_";
- anchorList.push({anchor: anchor, sortkey: anchor.toLowerCase()});
- anchorMap[anchor] = true;
-
- // Save nodes in an array so we can create anchor node under it later
- headingsArray[anchor] = heading;
- }
- if (anchorList.length)
- {
- // case insensitive sort
- anchorList.sort(function compare(a, b) {
- if (a.sortkey < b.sortkey) return -1;
- if (a.sortkey > b.sortkey) return 1;
- return 0;
- });
-
- for (i = 0; i < anchorList.length; i++)
- createMenuItem(menupopup,anchorList[i].anchor);
- }
- else
- {
- // Don't bother with named anchors in Mail.
- if (editor && (editor.flags & Components.interfaces.nsIPlaintextEditor.eEditorMailMask))
- {
- menupopup.remove();
- linkMenulist.removeAttribute("enablehistory");
- return;
- }
- var item = createMenuItem(menupopup, GetString("NoNamedAnchorsOrHeadings"));
- item.setAttribute("disabled", "true");
- }
- } catch (e) {}
-}
-
-function createMenuItem(aMenuPopup, aLabel)
-{
- var menuitem = document.createElement("menuitem");
- menuitem.setAttribute("label", aLabel);
- aMenuPopup.appendChild(menuitem);
- return menuitem;
-}
-
-// Shared by Image and Link dialogs for the "Choose" button for links
-function chooseLinkFile()
-{
- // Get a local file, converted into URL format
- var fileName = GetLocalFileURL("html, img");
- if (fileName)
- {
- // Always try to relativize local file URLs
- if (gHaveDocumentUrl)
- fileName = MakeRelativeUrl(fileName);
-
- gDialog.hrefInput.value = fileName;
-
- // Do stuff specific to a particular dialog
- // (This is defined separately in Image and Link dialogs)
- ChangeLinkLocation();
- }
- // Put focus into the input field
- SetTextboxFocus(gDialog.hrefInput);
-}
-
diff --git a/editor/ui/dialogs/content/EdDialogOverlay.xul b/editor/ui/dialogs/content/EdDialogOverlay.xul
deleted file mode 100644
index 8c3308071..000000000
--- a/editor/ui/dialogs/content/EdDialogOverlay.xul
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE overlay SYSTEM "chrome://editor/locale/EdDialogOverlay.dtd">
-
-<overlay id="EdDialogOverlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<vbox id="AdvancedEdit">
- <hbox flex="1" style="margin-top: 0.2em" align="center">
- <!-- This will right-align the button -->
- <spacer flex="1"/>
- <button id="AdvancedEditButton1" oncommand="onAdvancedEdit()" label="&AdvancedEditButton.label;"
- accesskey="&AdvancedEditButton.accessKey;" tooltiptext="&AdvancedEditButton.tooltip;"/>
- </hbox>
- <separator id="advancedSeparator" class="groove"/>
-</vbox>
-
-<!-- Extra buttons to use when just button is needed
- E.g. Image Properties Dialog switches position between 2 locations
- Placed here to use same attributes as AdvancedEditButton button
--->
-<button
- id = "AdvancedEditButton"
- oncommand = "onAdvancedEdit();"
- label = "&AdvancedEditButton.label;"
- accesskey = "&AdvancedEditButton.accessKey;"
- tooltiptext="&AdvancedEditButton.tooltip;"/>
-
-<button
- id = "AdvancedEditButton2"
- oncommand = "onAdvancedEdit()"
- label = "&AdvancedEditButton.label;"
- accesskey = "&AdvancedEditButton.accessKey;"
- tooltiptext="&AdvancedEditButton.tooltip;"/>
-
-<button
- id = "ChooseFile"
- oncommand = "chooseFile()"
- label = "&chooseFileButton.label;"
- accesskey = "&chooseFileButton.accessKey;"/>
-
-<checkbox
- id = "MakeRelativeCheckbox"
- label = "&makeUrlRelative.label;"
- accesskey = "&makeUrlRelative.accessKey;"
- oncommand = "MakeInputValueRelativeOrAbsolute(this);"
- tooltiptext = "&makeUrlRelative.tooltip;"/>
-
-<vbox id="LinkLocationBox">
- <label control="hrefInput" accesskey="&LinkURLEditField.accessKey;" width="1">&LinkURLEditField.label;</label>
- <textbox id="hrefInput" type="autocomplete"
- autocompletesearch="unifiedcomplete" timeout="50" maxrows="6"
- enablehistory="true" class="uri-element padded"
- oninput="ChangeLinkLocation();">
- <menupopup class="autocomplete-history-popup"
- popupalign="topleft" popupanchor="bottomleft"
- oncommand="this.parentNode.value = event.target.getAttribute('label'); ChangeLinkLocation();"/>
- </textbox>
- <hbox align="center">
- <!-- from EdDialogOverlay.xul 'for' identifies the textfield to get URL from -->
- <checkbox id="MakeRelativeLink"
- for="hrefInput"
- label="&makeUrlRelative.label;"
- accesskey="&makeUrlRelative.accessKey;"
- oncommand="MakeInputValueRelativeOrAbsolute(this);"
- tooltiptext="&makeUrlRelative.tooltip;"/>
- <spacer flex="1"/>
- <button label="&chooseFileLinkButton.label;" accesskey="&chooseFileLinkButton.accessKey;" oncommand="chooseLinkFile();"/>
- </hbox>
-</vbox>
-
-</overlay>
diff --git a/editor/ui/dialogs/content/EdDialogTemplate.js b/editor/ui/dialogs/content/EdDialogTemplate.js
deleted file mode 100644
index 1a29c25f8..000000000
--- a/editor/ui/dialogs/content/EdDialogTemplate.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-//Cancel() is in EdDialogCommon.js
-var insertNew = true;
-var tagname = "TAG NAME"
-
-// dialog initialization code
-function Startup()
-{
- if (!GetCurrentEditor())
- {
- window.close();
- return;
- }
- // gDialog is declared in EdDialogCommon.js
- // Set commonly-used widgets like this:
- gDialog.fooButton = document.getElementById("fooButton");
-
- initDialog();
-
- // Set window location relative to parent window (based on persisted attributes)
- SetWindowLocation();
-
- // Set focus to first widget in dialog, e.g.:
- SetTextboxFocus(gDialog.fooButton);
-}
-
-function InitDialog()
-{
- // Initialize all dialog widgets here,
- // e.g., get attributes from an element for property dialog
-}
-
-function onAccept()
-{
- // Validate all user data and set attributes and possibly insert new element here
- // If there's an error the user must correct, return false to keep dialog open.
-
- SaveWindowLocation();
- return true; // do close the window
-}
diff --git a/editor/ui/dialogs/content/EdDialogTemplate.xul b/editor/ui/dialogs/content/EdDialogTemplate.xul
deleted file mode 100644
index 0422b5b30..000000000
--- a/editor/ui/dialogs/content/EdDialogTemplate.xul
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/Ed?????????.dtd">
-<!-- dialog containing a control requiring initial setup -->
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/Ed?????.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdDictionary.js b/editor/ui/dialogs/content/EdDictionary.js
deleted file mode 100644
index 77c575c2b..000000000
--- a/editor/ui/dialogs/content/EdDictionary.js
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gSpellChecker;
-var gWordToAdd;
-
-function Startup()
-{
- if (!GetCurrentEditor())
- {
- window.close();
- return;
- }
- // Get the SpellChecker shell
- if ("gSpellChecker" in window.opener && window.opener.gSpellChecker)
- gSpellChecker = window.opener.gSpellChecker;
-
- if (!gSpellChecker)
- {
- dump("SpellChecker not found!!!\n");
- window.close();
- return;
- }
- // The word to add word is passed as the 2nd extra parameter in window.openDialog()
- gWordToAdd = window.arguments[1];
-
- gDialog.WordInput = document.getElementById("WordInput");
- gDialog.DictionaryList = document.getElementById("DictionaryList");
-
- gDialog.WordInput.value = gWordToAdd;
- FillDictionaryList();
-
- // Select the supplied word if it is already in the list
- SelectWordToAddInList();
- SetTextboxFocus(gDialog.WordInput);
-}
-
-function ValidateWordToAdd()
-{
- gWordToAdd = TrimString(gDialog.WordInput.value);
- if (gWordToAdd.length > 0)
- {
- return true;
- } else {
- return false;
- }
-}
-
-function SelectWordToAddInList()
-{
- for (var i = 0; i < gDialog.DictionaryList.getRowCount(); i++)
- {
-
- var wordInList = gDialog.DictionaryList.getItemAtIndex(i);
- if (wordInList && gWordToAdd == wordInList.label)
- {
- gDialog.DictionaryList.selectedIndex = i;
- break;
- }
- }
-}
-
-function AddWord()
-{
- if (ValidateWordToAdd())
- {
- try {
- gSpellChecker.AddWordToDictionary(gWordToAdd);
- }
- catch (e) {
- dump("Exception occured in gSpellChecker.AddWordToDictionary\nWord to add probably already existed\n");
- }
-
- // Rebuild the dialog list
- FillDictionaryList();
-
- SelectWordToAddInList();
- gDialog.WordInput.value = "";
- }
-}
-
-function ReplaceWord()
-{
- if (ValidateWordToAdd())
- {
- var selItem = gDialog.DictionaryList.selectedItem;
- if (selItem)
- {
- try {
- gSpellChecker.RemoveWordFromDictionary(selItem.label);
- } catch (e) {}
-
- try {
- // Add to the dictionary list
- gSpellChecker.AddWordToDictionary(gWordToAdd);
-
- // Just change the text on the selected item
- // instead of rebuilding the list
- selItem.label = gWordToAdd;
- } catch (e) {
- // Rebuild list and select the word - it was probably already in the list
- dump("Exception occured adding word in ReplaceWord\n");
- FillDictionaryList();
- SelectWordToAddInList();
- }
- }
- }
-}
-
-function RemoveWord()
-{
- var selIndex = gDialog.DictionaryList.selectedIndex;
- if (selIndex >= 0)
- {
- var word = gDialog.DictionaryList.selectedItem.label;
-
- // Remove word from list
- gDialog.DictionaryList.removeItemAt(selIndex);
-
- // Remove from dictionary
- try {
- //Not working: BUG 43348
- gSpellChecker.RemoveWordFromDictionary(word);
- }
- catch (e)
- {
- dump("Failed to remove word from dictionary\n");
- }
-
- ResetSelectedItem(selIndex);
- }
-}
-
-function FillDictionaryList()
-{
- var selIndex = gDialog.DictionaryList.selectedIndex;
-
- // Clear the current contents of the list
- ClearListbox(gDialog.DictionaryList);
-
- // Get the list from the spell checker
- gSpellChecker.GetPersonalDictionary()
-
- var haveList = false;
-
- // Get words until an empty string is returned
- do {
- var word = gSpellChecker.GetPersonalDictionaryWord();
- if (word != "")
- {
- gDialog.DictionaryList.appendItem(word, "");
- haveList = true;
- }
- } while (word != "");
-
- //XXX: BUG 74467: If list is empty, it doesn't layout to full height correctly
- // (ignores "rows" attribute) (bug is latered, so we are fixing here for now)
- if (!haveList)
- gDialog.DictionaryList.appendItem("", "");
-
- ResetSelectedItem(selIndex);
-}
-
-function ResetSelectedItem(index)
-{
- var lastIndex = gDialog.DictionaryList.getRowCount() - 1;
- if (index > lastIndex)
- index = lastIndex;
-
- // If we didn't have a selected item,
- // set it to the first item
- if (index == -1 && lastIndex >= 0)
- index = 0;
-
- gDialog.DictionaryList.selectedIndex = index;
-}
-
-function onClose()
-{
- return true;
-}
diff --git a/editor/ui/dialogs/content/EdDictionary.xul b/editor/ui/dialogs/content/EdDictionary.xul
deleted file mode 100644
index 837607c65..000000000
--- a/editor/ui/dialogs/content/EdDictionary.xul
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPersonalDictionary.dtd">
-<dialog buttons="cancel" title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- persist="screenX screenY"
- onload = "Startup()"
- ondialogcancel="return onClose();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDictionary.js"/>
-
- <broadcaster id="args" value=""/>
- <grid>
- <columns><column style="width: 15em" flex="1"/><column flex="1"/></columns>
- <rows>
- <row>
- <label value="&wordEditField.label;"
- control="WordInput"
- accesskey="&wordEditField.accessKey;"/>
- <spacer/>
- </row>
- <row>
- <textbox id="WordInput" flex="1"/>
- <button id="AddWord" oncommand="AddWord()" label="&AddButton.label;"
- accesskey="&AddButton.accessKey;"/>
- </row>
- <row>
- <label value="&DictionaryList.label;"
- control="DictionaryList"
- accesskey="&DictionaryList.accessKey;"/>
- <spacer/>
- </row>
- <row>
- <listbox rows="8" id="DictionaryList" flex="1"/>
- <vbox flex="1">
- <button id="ReplaceWord" oncommand="ReplaceWord()" label="&ReplaceButton.label;"
- accesskey="&ReplaceButton.accessKey;"/>
- <spacer class="spacer"/>
- <button id="RemoveWord" oncommand="RemoveWord()" label="&RemoveButton.label;"
- accesskey="&RemoveButton.accessKey;"/>
- <spacer class="spacer"/>
- <spacer flex="1"/>
- <button dlgtype="cancel" class="exit-dialog" id="close" label="&CloseButton.label;"
- default="true" oncommand="onClose();"
- accesskey="&CloseButton.accessKey;"/>
- </vbox>
- </row>
- </rows>
- </grid>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdFieldSetProps.js b/editor/ui/dialogs/content/EdFieldSetProps.js
deleted file mode 100644
index c84b2d48c..000000000
--- a/editor/ui/dialogs/content/EdFieldSetProps.js
+++ /dev/null
@@ -1,182 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var insertNew;
-var fieldsetElement;
-var newLegend;
-var legendElement;
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- gDialog.editText = document.getElementById("EditText");
- gDialog.legendText = document.getElementById("LegendText");
- gDialog.legendAlign = document.getElementById("LegendAlign");
- gDialog.RemoveFieldSet = document.getElementById("RemoveFieldSet");
-
- // Get a single selected field set element
- const kTagName = "fieldset";
- try {
- // Find a selected fieldset, or if one is at start or end of selection.
- fieldsetElement = editor.getSelectedElement(kTagName);
- if (!fieldsetElement)
- fieldsetElement = editor.getElementOrParentByTagName(kTagName, editor.selection.anchorNode);
- if (!fieldsetElement)
- fieldsetElement = editor.getElementOrParentByTagName(kTagName, editor.selection.focusNode);
- } catch (e) {}
-
- if (fieldsetElement)
- // We found an element and don't need to insert one
- insertNew = false;
- else
- {
- insertNew = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- fieldsetElement = editor.createElementWithDefaults(kTagName);
- } catch (e) {}
-
- if (!fieldsetElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- // Hide button removing existing fieldset
- gDialog.RemoveFieldSet.hidden = true;
- }
-
- legendElement = fieldsetElement.querySelector("legend");
- if (legendElement)
- {
- newLegend = false;
- var range = editor.document.createRange();
- range.selectNode(legendElement);
- gDialog.legendText.value = range.toString();
- if (legendElement.innerHTML.includes("<"))
- {
- gDialog.editText.checked = false;
- gDialog.editText.disabled = false;
- gDialog.legendText.disabled = true;
- gDialog.editText.addEventListener("command",
- () => Services.prompt.alert(window, GetString("Alert"), GetString("EditTextWarning")),
- {capture: false, once: true});
- gDialog.RemoveFieldSet.focus();
- }
- else
- SetTextboxFocus(gDialog.legendText);
- }
- else
- {
- newLegend = true;
-
- // We don't have an element selected,
- // so create one with default attributes
-
- legendElement = editor.createElementWithDefaults("legend");
- if (!legendElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- SetTextboxFocus(gDialog.legendText);
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = legendElement.cloneNode(false);
-
- InitDialog();
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- gDialog.legendAlign.value = GetHTMLOrCSSStyleValue(globalElement, "align", "caption-side");
-}
-
-function RemoveFieldSet()
-{
- var editor = GetCurrentEditor();
- editor.beginTransaction();
- try {
- if (!newLegend)
- editor.deleteNode(legendElement);
- RemoveBlockContainer(fieldsetElement);
- } finally {
- editor.endTransaction();
- }
- SaveWindowLocation();
- window.close();
-}
-
-function ValidateData()
-{
- if (gDialog.legendAlign.value)
- globalElement.setAttribute("align", gDialog.legendAlign.value);
- else
- globalElement.removeAttribute("align");
- return true;
-}
-
-function onAccept()
-{
- // All values are valid - copy to actual element in doc
- ValidateData();
-
- var editor = GetCurrentEditor();
-
- editor.beginTransaction();
-
- try {
- editor.cloneAttributes(legendElement, globalElement);
-
- if (insertNew)
- {
- if (gDialog.legendText.value)
- {
- fieldsetElement.appendChild(legendElement);
- legendElement.appendChild(editor.document.createTextNode(gDialog.legendText.value));
- }
- InsertElementAroundSelection(fieldsetElement);
- }
- else if (gDialog.editText.checked)
- {
- editor.setShouldTxnSetSelection(false);
-
- if (gDialog.legendText.value)
- {
- if (newLegend)
- editor.insertNode(legendElement, fieldsetElement, 0, true);
- else while (legendElement.firstChild)
- editor.deleteNode(legendElement.lastChild);
- editor.insertNode(editor.document.createTextNode(gDialog.legendText.value), legendElement, 0);
- }
- else if (!newLegend)
- editor.deleteNode(legendElement);
-
- editor.setShouldTxnSetSelection(true);
- }
- }
- finally {
- editor.endTransaction();
- }
-
- SaveWindowLocation();
-
- return true;
-}
-
diff --git a/editor/ui/dialogs/content/EdFieldSetProps.xul b/editor/ui/dialogs/content/EdFieldSetProps.xul
deleted file mode 100644
index 41860a6eb..000000000
--- a/editor/ui/dialogs/content/EdFieldSetProps.xul
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorFieldSetProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdFieldSetProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption label="&Legend.label;" accesskey="&Legend.accesskey;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <checkbox id="EditText" label="&EditLegendText.label;" accesskey="&EditLegendText.accesskey;" checked="true" disabled="true"
- oncommand="gDialog.legendText.disabled = !gDialog.editText.checked;"/>
- <textbox id="LegendText" accesskey="&Legend.accesskey;"/>
- </row>
- <row align="center">
- <label control="LegendAlign" value="&LegendAlign.label;" accesskey="&LegendAlign.accesskey;"/>
- <menulist id="LegendAlign">
- <menupopup>
- <menuitem label="&AlignDefault.label;"/>
- <menuitem label="&AlignLeft.label;" value="left"/>
- <menuitem label="&AlignCenter.label;" value="center"/>
- <menuitem label="&AlignRight.label;" value="right"/>
- </menupopup>
- </menulist>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <!-- from EdDialogOverlay -->
- <hbox flex="1" style="margin-top: 0.2em">
- <button id="RemoveFieldSet" label="&RemoveFieldSet.label;" accesskey="&RemoveFieldSet.accesskey;" oncommand="RemoveFieldSet();"/>
- <!-- This will right-align the button -->
- <spacer flex="1"/>
- <button id="AdvancedEditButton"/>
- </hbox>
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdFormProps.js b/editor/ui/dialogs/content/EdFormProps.js
deleted file mode 100644
index 83ac19df8..000000000
--- a/editor/ui/dialogs/content/EdFormProps.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gForm;
-var insertNew;
-var formElement;
-var formActionWarning;
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- gForm = {
- Name: document.getElementById("FormName"),
- Action: document.getElementById("FormAction"),
- Method: document.getElementById("FormMethod"),
- EncType: document.getElementById("FormEncType"),
- Target: document.getElementById("FormTarget")
- }
- gDialog.MoreSection = document.getElementById("MoreSection");
- gDialog.MoreFewerButton = document.getElementById("MoreFewerButton");
- gDialog.RemoveForm = document.getElementById("RemoveForm")
-
- // Get a single selected form element
- const kTagName = "form";
- try {
- formElement = editor.getSelectedElement(kTagName);
- if (!formElement)
- formElement = editor.getElementOrParentByTagName(kTagName, editor.selection.anchorNode);
- if (!formElement)
- formElement = editor.getElementOrParentByTagName(kTagName, editor.selection.focusNode);
- } catch (e) {}
-
- if (formElement)
- {
- // We found an element and don't need to insert one
- insertNew = false;
- formActionWarning = formElement.hasAttribute("action");
- }
- else
- {
- insertNew = true;
- formActionWarning = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- formElement = editor.createElementWithDefaults(kTagName);
- } catch (e) {}
-
- if (!formElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- // Hide button removing existing form
- gDialog.RemoveForm.hidden = true;
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = formElement.cloneNode(false);
-
- InitDialog();
-
- InitMoreFewer();
-
- SetTextboxFocus(gForm.Name);
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- for (var attribute in gForm)
- gForm[attribute].value = globalElement.getAttribute(attribute);
-}
-
-function RemoveForm()
-{
- RemoveBlockContainer(formElement);
- SaveWindowLocation();
- window.close();
-}
-
-function ValidateData()
-{
- for (var attribute in gForm)
- {
- if (gForm[attribute].value)
- globalElement.setAttribute(attribute, gForm[attribute].value);
- else
- globalElement.removeAttribute(attribute);
- }
- return true;
-}
-
-function onAccept()
-{
- if (formActionWarning && !gForm.Action.value)
- {
- Services.prompt.alert(window, GetString("Alert"), GetString("NoFormAction"));
- gForm.Action.focus();
- formActionWarning = false;
- return false;
- }
- // All values are valid - copy to actual element in doc or
- // element created to insert
- ValidateData();
-
- var editor = GetCurrentEditor();
-
- editor.cloneAttributes(formElement, globalElement);
-
- if (insertNew)
- InsertElementAroundSelection(formElement);
-
- SaveWindowLocation();
-
- return true;
-}
diff --git a/editor/ui/dialogs/content/EdFormProps.xul b/editor/ui/dialogs/content/EdFormProps.xul
deleted file mode 100644
index 7cf6c23d0..000000000
--- a/editor/ui/dialogs/content/EdFormProps.xul
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorFormProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdFormProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption label="&Settings.label;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label control="FormName" value="&FormName.label;" accesskey="&FormName.accesskey;"/>
- <textbox id="FormName"/>
- </row>
- <row align="center">
- <label control="FormAction" value="&FormAction.label;" accesskey="&FormAction.accesskey;"/>
- <textbox id="FormAction"/>
- </row>
- <row align="center">
- <label control="FormMethod" value="&FormMethod.label;" accesskey="&FormMethod.accesskey;"/>
- <hbox>
- <menulist id="FormMethod" editable="true" autoSelectMenuitem="true">
- <menupopup>
- <menuitem label="GET"/>
- <menuitem label="POST"/>
- </menupopup>
- </menulist>
- </hbox>
- </row>
- <hbox>
- <button id="MoreFewerButton" oncommand="onMoreFewer();" persist="more"/>
- </hbox>
- <rows id="MoreSection">
- <row align="center">
- <label control="FormEncType" value="&FormEncType.label;" accesskey="&FormEncType.accesskey;"/>
- <menulist id="FormEncType" editable="true" autoSelectMenuitem="true">
- <menupopup>
- <menuitem label="application/x-www-form-urlencoded"/>
- <menuitem label="multipart/form-data"/>
- <menuitem label="text/plain"/>
- </menupopup>
- </menulist>
- </row>
- <row align="center">
- <label control="FormTarget" value="&FormTarget.label;" accesskey="&FormTarget.accesskey;"/>
- <menulist id="FormTarget" editable="true" autoSelectMenuitem="true">
- <menupopup>
- <menuitem label="_blank"/>
- <menuitem label="_self"/>
- <menuitem label="_parent"/>
- <menuitem label="_top"/>
- </menupopup>
- </menulist>
- </row>
- </rows>
- </rows>
- </grid>
- </groupbox>
-
- <!-- from EdDialogOverlay -->
- <hbox flex="1" style="margin-top: 0.2em">
- <button id="RemoveForm" label="&RemoveForm.label;" accesskey="&RemoveForm.accesskey;" oncommand="RemoveForm();"/>
- <!-- This will right-align the button -->
- <spacer flex="1"/>
- <button id="AdvancedEditButton"/>
- </hbox>
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdHLineProps.js b/editor/ui/dialogs/content/EdHLineProps.js
deleted file mode 100644
index 1a38a351d..000000000
--- a/editor/ui/dialogs/content/EdHLineProps.js
+++ /dev/null
@@ -1,195 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var tagName = "hr";
-var gHLineElement;
-var width;
-var height;
-var align;
-var shading;
-const gMaxHRSize = 1000; // This is hard-coded in nsHTMLHRElement::StringToAttribute()
-
-// dialog initialization code
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
- try {
- // Get the selected horizontal line
- gHLineElement = editor.getSelectedElement(tagName);
- } catch (e) {}
-
- if (!gHLineElement) {
- // We should never be here if not editing an existing HLine
- window.close();
- return;
- }
- gDialog.heightInput = document.getElementById("height");
- gDialog.widthInput = document.getElementById("width");
- gDialog.leftAlign = document.getElementById("leftAlign");
- gDialog.centerAlign = document.getElementById("centerAlign");
- gDialog.rightAlign = document.getElementById("rightAlign");
- gDialog.alignGroup = gDialog.rightAlign.radioGroup;
- gDialog.shading = document.getElementById("3dShading");
- gDialog.pixelOrPercentMenulist = document.getElementById("pixelOrPercentMenulist");
-
- // Make a copy to use for AdvancedEdit and onSaveDefault
- globalElement = gHLineElement.cloneNode(false);
-
- // Initialize control values based on existing attributes
- InitDialog()
-
- // SET FOCUS TO FIRST CONTROL
- SetTextboxFocus(gDialog.widthInput);
-
- // Resize window
- window.sizeToContent();
-
- SetWindowLocation();
-}
-
-// Set dialog widgets with attribute data
-// We get them from globalElement copy so this can be used
-// by AdvancedEdit(), which is shared by all property dialogs
-function InitDialog()
-{
- // Just to be confusing, "size" is used instead of height because it does
- // not accept % values, only pixels
- var height = GetHTMLOrCSSStyleValue(globalElement, "size", "height")
- if (height.includes("px")) {
- height = height.substr(0, height.indexOf("px"));
- }
- if(!height) {
- height = 2; //Default value
- }
-
- // We will use "height" here and in UI
- gDialog.heightInput.value = height;
-
- // Get the width attribute of the element, stripping out "%"
- // This sets contents of menulist (adds pixel and percent menuitems elements)
- gDialog.widthInput.value = InitPixelOrPercentMenulist(globalElement, gHLineElement, "width","pixelOrPercentMenulist");
-
- var marginLeft = GetHTMLOrCSSStyleValue(globalElement, "align", "margin-left").toLowerCase();
- var marginRight = GetHTMLOrCSSStyleValue(globalElement, "align", "margin-right").toLowerCase();
- align = marginLeft + " " + marginRight;
- gDialog.leftAlign.checked = (align == "left left" || align == "0px auto");
- gDialog.centerAlign.checked = (align == "center center" || align == "auto auto" || align == " ");
- gDialog.rightAlign.checked = (align == "right right" || align == "auto 0px");
-
- if (gDialog.centerAlign.checked) {
- gDialog.alignGroup.selectedItem = gDialog.centerAlign;
- }
- else if (gDialog.rightAlign.checked) {
- gDialog.alignGroup.selectedItem = gDialog.rightAlign;
- }
- else {
- gDialog.alignGroup.selectedItem = gDialog.leftAlign;
- }
-
- gDialog.shading.checked = !globalElement.hasAttribute("noshade");
-}
-
-function onSaveDefault()
-{
- // "false" means set attributes on the globalElement,
- // not the real element being edited
- if (ValidateData()) {
- var alignInt;
- if (align == "left") {
- alignInt = 0;
- } else if (align == "right") {
- alignInt = 2;
- } else {
- alignInt = 1;
- }
- Services.prefs.setIntPref("editor.hrule.align", alignInt);
-
- var percent;
- var widthInt;
- var heightInt;
-
- if (width)
- {
- if (width.includes("%")) {
- percent = true;
- widthInt = Number(width.substr(0, width.indexOf("%")));
- } else {
- percent = false;
- widthInt = Number(width);
- }
- }
- else
- {
- percent = true;
- widthInt = Number(100);
- }
-
- heightInt = height ? Number(height) : 2;
-
- Services.prefs.setIntPref("editor.hrule.width", widthInt);
- Services.prefs.setBoolPref("editor.hrule.width_percent", percent);
- Services.prefs.setIntPref("editor.hrule.height", heightInt);
- Services.prefs.setBoolPref("editor.hrule.shading", shading);
-
- // Write the prefs out NOW!
- Services.prefs.savePrefFile(null);
- }
-}
-
-// Get and validate data from widgets.
-// Set attributes on globalElement so they can be accessed by AdvancedEdit()
-function ValidateData()
-{
- // Height is always pixels
- height = ValidateNumber(gDialog.heightInput, null, 1, gMaxHRSize,
- globalElement, "size", false);
- if (gValidationError)
- return false;
-
- width = ValidateNumber(gDialog.widthInput, gDialog.pixelOrPercentMenulist, 1, gMaxPixels,
- globalElement, "width", false);
- if (gValidationError)
- return false;
-
- align = "left";
- if (gDialog.centerAlign.selected) {
- // Don't write out default attribute
- align = "";
- } else if (gDialog.rightAlign.selected) {
- align = "right";
- }
- if (align)
- globalElement.setAttribute("align", align);
- else
- try {
- GetCurrentEditor().removeAttributeOrEquivalent(globalElement, "align", true);
- } catch (e) {}
-
- if (gDialog.shading.checked) {
- shading = true;
- globalElement.removeAttribute("noshade");
- } else {
- shading = false;
- globalElement.setAttribute("noshade", "noshade");
- }
- return true;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- // Copy attributes from the globalElement to the document element
- try {
- GetCurrentEditor().cloneAttributes(gHLineElement, globalElement);
- } catch (e) {}
- return true;
- }
- return false;
-}
diff --git a/editor/ui/dialogs/content/EdHLineProps.xul b/editor/ui/dialogs/content/EdHLineProps.xul
deleted file mode 100644
index 1a4d8fa14..000000000
--- a/editor/ui/dialogs/content/EdHLineProps.xul
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorHLineProperties.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <!--- Element-specific methods -->
- <script type="application/javascript" src="chrome://editor/content/EdHLineProps.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption label="&dimensionsBox.label;"/>
- <grid>
- <columns><column/><column/><column /></columns>
- <rows>
- <row align="center">
- <label control="width"
- value="&widthEditField.label;"
- accesskey="&widthEditField.accessKey;"/>
- <textbox class="narrow" id="width" flex="1" oninput="forceInteger('width')"/>
- <menulist id="pixelOrPercentMenulist" />
- <!-- menupopup and menuitems added by JS -->
- </row>
- <row align="center">
- <label control="height"
- value="&heightEditField.label;"
- accesskey="&heightEditField.accessKey;"/>
- <textbox class="narrow" id="height" oninput="forceInteger('height')"/>
- <label value="&pixelsPopup.value;" />
- </row>
- </rows>
- </grid>
- <checkbox id="3dShading" label="&threeDShading.label;" accesskey="&threeDShading.accessKey;"/>
- </groupbox>
- <groupbox><caption label="&alignmentBox.label;"/>
- <radiogroup id="alignmentGroup" orient="horizontal">
- <spacer class="spacer"/>
- <radio id="leftAlign" label="&leftRadio.label;" accesskey="&leftRadio.accessKey;"/>
- <radio id="centerAlign" label="&centerRadio.label;" accesskey="&centerRadio.accessKey;"/>
- <radio id="rightAlign" label="&rightRadio.label;" accesskey="&rightRadio.accessKey;"/>
- </radiogroup>
- </groupbox>
- <spacer class="spacer"/>
- <hbox>
- <button id="SaveDefault" label="&saveSettings.label;"
- accesskey="&saveSettings.accessKey;"
- oncommand="onSaveDefault()"
- tooltiptext="&saveSettings.tooltip;" />
- <spacer flex="1"/>
- <button id="AdvancedEditButton"/>
- </hbox>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdImageOverlay.js b/editor/ui/dialogs/content/EdImageOverlay.js
deleted file mode 100644
index 175cab791..000000000
--- a/editor/ui/dialogs/content/EdImageOverlay.js
+++ /dev/null
@@ -1,598 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- Note: We encourage non-empty alt text for images inserted into a page.
- When there's no alt text, we always write 'alt=""' as the attribute, since "alt" is a required attribute.
- We allow users to not have alt text by checking a "Don't use alterate text" radio button,
- and we don't accept spaces as valid alt text. A space used to be required to avoid the error message
- if user didn't enter alt text, but is unnecessary now that we no longer annoy the user
- with the error dialog if alt="" is present on an img element.
- We trim all spaces at the beginning and end of user's alt text
-*/
-
-var gInsertNewImage = true;
-var gDoAltTextError = false;
-var gConstrainOn = false;
-// Note used in current version, but these are set correctly
-// and could be used to reset width and height used for constrain ratio
-var gConstrainWidth = 0;
-var gConstrainHeight = 0;
-var imageElement;
-var gImageMap = 0;
-var gCanRemoveImageMap = false;
-var gRemoveImageMap = false;
-var gImageMapDisabled = false;
-var gActualWidth = "";
-var gActualHeight = "";
-var gOriginalSrc = "";
-var gHaveDocumentUrl = false;
-var gTimerID;
-var gValidateTab;
-
-// These must correspond to values in EditorDialog.css for each theme
-// (unfortunately, setting "style" attribute here doesn't work!)
-var gPreviewImageWidth = 80;
-var gPreviewImageHeight = 50;
-
-// dialog initialization code
-
-function ImageStartup()
-{
- gDialog.tabBox = document.getElementById( "TabBox" );
- gDialog.tabLocation = document.getElementById( "imageLocationTab" );
- gDialog.tabDimensions = document.getElementById( "imageDimensionsTab" );
- gDialog.tabBorder = document.getElementById( "imageBorderTab" );
- gDialog.srcInput = document.getElementById( "srcInput" );
- gDialog.titleInput = document.getElementById( "titleInput" );
- gDialog.altTextInput = document.getElementById( "altTextInput" );
- gDialog.altTextRadioGroup = document.getElementById( "altTextRadioGroup" );
- gDialog.altTextRadio = document.getElementById( "altTextRadio" );
- gDialog.noAltTextRadio = document.getElementById( "noAltTextRadio" );
- gDialog.actualSizeRadio = document.getElementById( "actualSizeRadio" );
- gDialog.constrainCheckbox = document.getElementById( "constrainCheckbox" );
- gDialog.widthInput = document.getElementById( "widthInput" );
- gDialog.heightInput = document.getElementById( "heightInput" );
- gDialog.widthUnitsMenulist = document.getElementById( "widthUnitsMenulist" );
- gDialog.heightUnitsMenulist = document.getElementById( "heightUnitsMenulist" );
- gDialog.imagelrInput = document.getElementById( "imageleftrightInput" );
- gDialog.imagetbInput = document.getElementById( "imagetopbottomInput" );
- gDialog.border = document.getElementById( "border" );
- gDialog.alignTypeSelect = document.getElementById( "alignTypeSelect" );
- gDialog.ImageHolder = document.getElementById( "preview-image-holder" );
- gDialog.PreviewWidth = document.getElementById( "PreviewWidth" );
- gDialog.PreviewHeight = document.getElementById( "PreviewHeight" );
- gDialog.PreviewSize = document.getElementById( "PreviewSize" );
- gDialog.PreviewImage = null;
- gDialog.OkButton = document.documentElement.getButton("accept");
-}
-
-// Set dialog widgets with attribute data
-// We get them from globalElement copy so this can be used
-// by AdvancedEdit(), which is shared by all property dialogs
-function InitImage()
-{
- // Set the controls to the image's attributes
- var src = globalElement.getAttribute("src");
-
- // For image insertion the 'src' attribute is null.
- if (src) {
- // Shorten data URIs for display.
- if (shortenImageData(src, gDialog.srcInput)) {
- gDialog.srcInput.removeAttribute("tooltiptext");
- gDialog.srcInput.setAttribute("tooltip", "shortenedDataURI");
- }
- }
-
- // Set "Relativize" checkbox according to current URL state
- SetRelativeCheckbox();
-
- // Force loading of image from its source and show preview image
- LoadPreviewImage();
-
- gDialog.titleInput.value = globalElement.getAttribute("title");
-
- var hasAltText = globalElement.hasAttribute("alt");
- var altText = globalElement.getAttribute("alt");
- gDialog.altTextInput.value = altText;
- if (altText || (!hasAltText && globalElement.hasAttribute("src")))
- {
- gDialog.altTextRadioGroup.selectedItem = gDialog.altTextRadio;
- }
- else if (hasAltText)
- {
- gDialog.altTextRadioGroup.selectedItem = gDialog.noAltTextRadio;
- }
- SetAltTextDisabled(gDialog.altTextRadioGroup.selectedItem == gDialog.noAltTextRadio);
-
- // setup the height and width widgets
- var width = InitPixelOrPercentMenulist(globalElement,
- gInsertNewImage ? null : imageElement,
- "width", "widthUnitsMenulist", gPixel);
- var height = InitPixelOrPercentMenulist(globalElement,
- gInsertNewImage ? null : imageElement,
- "height", "heightUnitsMenulist", gPixel);
-
- // Set actual radio button if both set values are the same as actual
- SetSizeWidgets(width, height);
-
- gDialog.widthInput.value = gConstrainWidth = width ? width : (gActualWidth ? gActualWidth : "");
- gDialog.heightInput.value = gConstrainHeight = height ? height : (gActualHeight ? gActualHeight : "");
-
- // set spacing editfields
- gDialog.imagelrInput.value = globalElement.getAttribute("hspace");
- gDialog.imagetbInput.value = globalElement.getAttribute("vspace");
-
- // dialog.border.value = globalElement.getAttribute("border");
- var bv = GetHTMLOrCSSStyleValue(globalElement, "border", "border-top-width");
- if (bv.includes("px"))
- {
- // Strip out the px
- bv = bv.substr(0, bv.indexOf("px"));
- }
- else if (bv == "thin")
- {
- bv = "1";
- }
- else if (bv == "medium")
- {
- bv = "3";
- }
- else if (bv == "thick")
- {
- bv = "5";
- }
- gDialog.border.value = bv;
-
- // Get alignment setting
- var align = globalElement.getAttribute("align");
- if (align)
- align = align.toLowerCase();
-
- var imgClass;
- var textID;
-
- switch ( align )
- {
- case "top":
- case "middle":
- case "right":
- case "left":
- gDialog.alignTypeSelect.value = align;
- break;
- default: // Default or "bottom"
- gDialog.alignTypeSelect.value = "bottom";
- }
-
- // Get image map for image
- gImageMap = GetImageMap();
-
- doOverallEnabling();
- doDimensionEnabling();
-}
-
-function SetSizeWidgets(width, height)
-{
- if (!(width || height) || (gActualWidth && gActualHeight && width == gActualWidth && height == gActualHeight))
- gDialog.actualSizeRadio.radioGroup.selectedItem = gDialog.actualSizeRadio;
-
- if (!gDialog.actualSizeRadio.selected)
- {
- // Decide if user's sizes are in the same ratio as actual sizes
- if (gActualWidth && gActualHeight)
- {
- if (gActualWidth > gActualHeight)
- gDialog.constrainCheckbox.checked = (Math.round(gActualHeight * width / gActualWidth) == height);
- else
- gDialog.constrainCheckbox.checked = (Math.round(gActualWidth * height / gActualHeight) == width);
- }
- }
-}
-
-// Disable alt text input when "Don't use alt" radio is checked
-function SetAltTextDisabled(disable)
-{
- gDialog.altTextInput.disabled = disable;
-}
-
-function GetImageMap()
-{
- var usemap = globalElement.getAttribute("usemap");
- if (usemap)
- {
- gCanRemoveImageMap = true;
- let mapname = usemap.substr(1);
- try {
- return GetCurrentEditor().document.querySelector('[name="' + mapname + '"]');
- } catch (e) {}
- }
- else
- {
- gCanRemoveImageMap = false;
- }
-
- return null;
-}
-
-function chooseFile()
-{
- if (gTimerID)
- clearTimeout(gTimerID);
- // Get a local file, converted into URL format
- var fileName = GetLocalFileURL("img");
- if (fileName)
- {
- // Always try to relativize local file URLs
- if (gHaveDocumentUrl)
- fileName = MakeRelativeUrl(fileName);
-
- gDialog.srcInput.value = fileName;
-
- SetRelativeCheckbox();
- doOverallEnabling();
- }
- LoadPreviewImage();
-
- // Put focus into the input field
- SetTextboxFocus(gDialog.srcInput);
-}
-
-function PreviewImageLoaded()
-{
- if (gDialog.PreviewImage)
- {
- // Image loading has completed -- we can get actual width
- gActualWidth = gDialog.PreviewImage.naturalWidth;
- gActualHeight = gDialog.PreviewImage.naturalHeight;
-
- if (gActualWidth && gActualHeight)
- {
- // Use actual size or scale to fit preview if either dimension is too large
- var width = gActualWidth;
- var height = gActualHeight;
- if (gActualWidth > gPreviewImageWidth)
- {
- width = gPreviewImageWidth;
- height = gActualHeight * (gPreviewImageWidth / gActualWidth);
- }
- if (height > gPreviewImageHeight)
- {
- height = gPreviewImageHeight;
- width = gActualWidth * (gPreviewImageHeight / gActualHeight);
- }
- gDialog.PreviewImage.width = width;
- gDialog.PreviewImage.height = height;
-
- gDialog.PreviewWidth.setAttribute("value", gActualWidth);
- gDialog.PreviewHeight.setAttribute("value", gActualHeight);
-
- gDialog.PreviewSize.collapsed = false;
- gDialog.ImageHolder.collapsed = false;
-
- SetSizeWidgets(gDialog.widthInput.value, gDialog.heightInput.value);
- }
-
- if (gDialog.actualSizeRadio.selected)
- SetActualSize();
- }
-}
-
-function LoadPreviewImage()
-{
- gDialog.PreviewSize.collapsed = true;
- // XXXbz workaround for bug 265416 / bug 266284
- gDialog.ImageHolder.collapsed = true;
-
- var imageSrc = TrimString(gDialog.srcInput.value);
- if (!imageSrc)
- return;
- if (isImageDataShortened(imageSrc))
- {
- imageSrc = restoredImageData(gDialog.srcInput);
- }
-
- try {
- // Remove the image URL from image cache so it loads fresh
- // (if we don't do this, loads after the first will always use image cache
- // and we won't see image edit changes or be able to get actual width and height)
-
- // We must have an absolute URL to preview it or remove it from the cache
- imageSrc = MakeAbsoluteUrl(imageSrc);
-
- if (GetScheme(imageSrc))
- {
- let uri = Services.io.newURI(imageSrc, null, null);
- if (uri)
- {
- let imgCache = Components.classes["@mozilla.org/image/cache;1"]
- .getService(Components.interfaces.imgICache);
-
- // This returns error if image wasn't in the cache; ignore that
- imgCache.removeEntry(uri);
- }
- }
- } catch(e) {}
-
- if (gDialog.PreviewImage)
- removeEventListener("load", PreviewImageLoaded, true);
-
- if (gDialog.ImageHolder.hasChildNodes())
- gDialog.ImageHolder.firstChild.remove();
-
- gDialog.PreviewImage = document.createElementNS("http://www.w3.org/1999/xhtml", "html:img");
- if (gDialog.PreviewImage)
- {
- // set the src before appending to the document -- see bug 198435 for why
- // this is needed.
- // XXXbz that bug is long-since fixed. Is this still needed?
- gDialog.PreviewImage.addEventListener("load", PreviewImageLoaded, true);
- gDialog.PreviewImage.src = imageSrc;
- gDialog.ImageHolder.appendChild(gDialog.PreviewImage);
- }
-}
-
-function SetActualSize()
-{
- gDialog.widthInput.value = gActualWidth ? gActualWidth : "";
- gDialog.widthUnitsMenulist.selectedIndex = 0;
- gDialog.heightInput.value = gActualHeight ? gActualHeight : "";
- gDialog.heightUnitsMenulist.selectedIndex = 0;
- doDimensionEnabling();
-}
-
-function ChangeImageSrc()
-{
- if (gTimerID)
- clearTimeout(gTimerID);
-
- gTimerID = setTimeout(LoadPreviewImage, 800);
-
- SetRelativeCheckbox();
- doOverallEnabling();
-}
-
-function doDimensionEnabling()
-{
- // Enabled unless "Actual Size" is selected
- var enable = !gDialog.actualSizeRadio.selected;
-
- // BUG 74145: After input field is disabled,
- // setting it enabled causes blinking caret to appear
- // even though focus isn't set to it.
- SetElementEnabledById( "heightInput", enable );
- SetElementEnabledById( "heightLabel", enable );
- SetElementEnabledById( "heightUnitsMenulist", enable );
-
- SetElementEnabledById( "widthInput", enable );
- SetElementEnabledById( "widthLabel", enable);
- SetElementEnabledById( "widthUnitsMenulist", enable );
-
- var constrainEnable = enable
- && ( gDialog.widthUnitsMenulist.selectedIndex == 0 )
- && ( gDialog.heightUnitsMenulist.selectedIndex == 0 );
-
- SetElementEnabledById( "constrainCheckbox", constrainEnable );
-}
-
-function doOverallEnabling()
-{
- var enabled = TrimString(gDialog.srcInput.value) != "";
-
- SetElementEnabled(gDialog.OkButton, enabled);
- SetElementEnabledById("AdvancedEditButton1", enabled);
- SetElementEnabledById("imagemapLabel", enabled);
- SetElementEnabledById("removeImageMap", gCanRemoveImageMap);
-}
-
-function ToggleConstrain()
-{
- // If just turned on, save the current width and height as basis for constrain ratio
- // Thus clicking on/off lets user say "Use these values as aspect ration"
- if (gDialog.constrainCheckbox.checked && !gDialog.constrainCheckbox.disabled
- && (gDialog.widthUnitsMenulist.selectedIndex == 0)
- && (gDialog.heightUnitsMenulist.selectedIndex == 0))
- {
- gConstrainWidth = Number(TrimString(gDialog.widthInput.value));
- gConstrainHeight = Number(TrimString(gDialog.heightInput.value));
- }
-}
-
-function constrainProportions( srcID, destID )
-{
- var srcElement = document.getElementById(srcID);
- if (!srcElement)
- return;
-
- var destElement = document.getElementById(destID);
- if (!destElement)
- return;
-
- // always force an integer (whether we are constraining or not)
- forceInteger(srcID);
-
- if (!gActualWidth || !gActualHeight ||
- !(gDialog.constrainCheckbox.checked && !gDialog.constrainCheckbox.disabled))
- return;
-
- // double-check that neither width nor height is in percent mode; bail if so!
- if ( (gDialog.widthUnitsMenulist.selectedIndex != 0)
- || (gDialog.heightUnitsMenulist.selectedIndex != 0) )
- return;
-
- // This always uses the actual width and height ratios
- // which is kind of funky if you change one number without the constrain
- // and then turn constrain on and change a number
- // I prefer the old strategy (below) but I can see some merit to this solution
- if (srcID == "widthInput")
- destElement.value = Math.round( srcElement.value * gActualHeight / gActualWidth );
- else
- destElement.value = Math.round( srcElement.value * gActualWidth / gActualHeight );
-
-/*
- // With this strategy, the width and height ratio
- // can be reset to whatever the user entered.
- if (srcID == "widthInput")
- destElement.value = Math.round( srcElement.value * gConstrainHeight / gConstrainWidth );
- else
- destElement.value = Math.round( srcElement.value * gConstrainWidth / gConstrainHeight );
-*/
-}
-
-function removeImageMap()
-{
- gRemoveImageMap = true;
- gCanRemoveImageMap = false;
- SetElementEnabledById("removeImageMap", false);
-}
-
-function SwitchToValidatePanel()
-{
- if (gDialog.tabBox && gValidateTab && gDialog.tabBox.selectedTab != gValidateTab)
- gDialog.tabBox.selectedTab = gValidateTab;
-}
-
-// Get data from widgets, validate, and set for the global element
-// accessible to AdvancedEdit() [in EdDialogCommon.js]
-function ValidateImage()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- return false;
-
- gValidateTab = gDialog.tabLocation;
- if (!gDialog.srcInput.value)
- {
- Services.prompt.alert(window, GetString("Alert"), GetString("MissingImageError"));
- SwitchToValidatePanel();
- gDialog.srcInput.focus();
- return false;
- }
-
- // We must convert to "file:///" or "http://" format else image doesn't load!
- let src = gDialog.srcInput.value.trim();
-
- if (isImageDataShortened(src))
- {
- src = restoredImageData(gDialog.srcInput);
- }
- else
- {
- var checkbox = document.getElementById("MakeRelativeCheckbox");
- try
- {
- if (checkbox && !checkbox.checked)
- {
- src = Services.uriFixup.createFixupURI(src, Components.interfaces.nsIURIFixup.FIXUP_FLAG_NONE).spec;
- }
- } catch (e) { }
-
- globalElement.setAttribute("src", src);
- }
-
- let title = gDialog.titleInput.value.trim();
- if (title)
- globalElement.setAttribute("title", title);
- else
- globalElement.removeAttribute("title");
-
- // Force user to enter Alt text only if "Alternate text" radio is checked
- // Don't allow just spaces in alt text
- var alt = "";
- var useAlt = gDialog.altTextRadioGroup.selectedItem == gDialog.altTextRadio;
- if (useAlt)
- alt = TrimString(gDialog.altTextInput.value);
-
- if (alt || !useAlt)
- {
- globalElement.setAttribute("alt", alt);
- }
- else if (!gDoAltTextError)
- {
- globalElement.removeAttribute("alt");
- }
- else
- {
- Services.prompt.alert(window, GetString("Alert"), GetString("NoAltText"));
- SwitchToValidatePanel();
- gDialog.altTextInput.focus();
- return false;
- }
-
- var width = "";
- var height = "";
-
- gValidateTab = gDialog.tabDimensions;
- if (!gDialog.actualSizeRadio.selected)
- {
- // Get user values for width and height
- width = ValidateNumber(gDialog.widthInput, gDialog.widthUnitsMenulist, 1, gMaxPixels,
- globalElement, "width", false, true);
- if (gValidationError)
- return false;
-
- height = ValidateNumber(gDialog.heightInput, gDialog.heightUnitsMenulist, 1, gMaxPixels,
- globalElement, "height", false, true);
- if (gValidationError)
- return false;
- }
-
- // We always set the width and height attributes, even if same as actual.
- // This speeds up layout of pages since sizes are known before image is loaded
- if (!width)
- width = gActualWidth;
- if (!height)
- height = gActualHeight;
-
- // Remove existing width and height only if source changed
- // and we couldn't obtain actual dimensions
- var srcChanged = (src != gOriginalSrc);
- if (width)
- editor.setAttributeOrEquivalent(globalElement, "width", width, true);
- else if (srcChanged)
- editor.removeAttributeOrEquivalent(globalElement, "width", true);
-
- if (height)
- editor.setAttributeOrEquivalent(globalElement, "height", height, true);
- else if (srcChanged)
- editor.removeAttributeOrEquivalent(globalElement, "height", true);
-
- // spacing attributes
- gValidateTab = gDialog.tabBorder;
- ValidateNumber(gDialog.imagelrInput, null, 0, gMaxPixels,
- globalElement, "hspace", false, true, true);
- if (gValidationError)
- return false;
-
- ValidateNumber(gDialog.imagetbInput, null, 0, gMaxPixels,
- globalElement, "vspace", false, true);
- if (gValidationError)
- return false;
-
- // note this is deprecated and should be converted to stylesheets
- ValidateNumber(gDialog.border, null, 0, gMaxPixels,
- globalElement, "border", false, true);
- if (gValidationError)
- return false;
-
- // Default or setting "bottom" means don't set the attribute
- // Note that the attributes "left" and "right" are opposite
- // of what we use in the UI, which describes where the TEXT wraps,
- // not the image location (which is what the HTML describes)
- switch ( gDialog.alignTypeSelect.value )
- {
- case "top":
- case "middle":
- case "right":
- case "left":
- editor.setAttributeOrEquivalent( globalElement, "align",
- gDialog.alignTypeSelect.value , true);
- break;
- default:
- try {
- editor.removeAttributeOrEquivalent(globalElement, "align", true);
- } catch (e) {}
- }
-
- return true;
-}
diff --git a/editor/ui/dialogs/content/EdImageOverlay.xul b/editor/ui/dialogs/content/EdImageOverlay.xul
deleted file mode 100644
index 90d360e2e..000000000
--- a/editor/ui/dialogs/content/EdImageOverlay.xul
+++ /dev/null
@@ -1,267 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE overlay SYSTEM "chrome://editor/locale/EditorImageProperties.dtd">
-
-<overlay id="EdImageOverlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://editor/content/EdImageOverlay.js"/>
-
- <tab id="imageInputTab" label="&imageInputTab.label;"/>
- <tab id="imageLocationTab" label="&imageLocationTab.label;"/>
- <tab id="imageDimensionsTab" label="&imageDimensionsTab.label;"/>
- <tab id="imageAppearanceTab" label="&imageAppearanceTab.label;"/>
- <tab id="imageLinkTab" label="&imageLinkTab.label;"/>
-
- <vbox id="imageLocation">
- <spacer class="spacer"/>
- <label control = "srcInput"
- value = "&locationEditField.label;"
- accesskey="&locationEditField.accessKey;"
- tooltiptext="&locationEditField.tooltip;"
- />
- <tooltip id="shortenedDataURI">
- <label value="&locationEditField.shortenedDataURI;"/>
- </tooltip>
- <textbox id="srcInput" oninput="ChangeImageSrc();" tabindex="1" class="uri-element"
- tooltiptext="&locationEditField.tooltip;"/>
- <hbox id="MakeRelativeHbox">
- <checkbox
- id = "MakeRelativeCheckbox"
- for = "srcInput"
- tabindex="2"/>
- <!-- mail compose will insert custom item here defined in mailComposeEditorOverlay.xul -->
- <spacer flex="1"/>
- <!-- from EdDialogOverlay.xul -->
- <button id="ChooseFile" tabindex="3"/>
- </hbox>
- <spacer class="spacer"/>
- <radiogroup id="altTextRadioGroup" flex="1">
- <grid>
- <columns><column/><column flex="1"/></columns>
- <rows>
- <row align="center">
- <label
- style = "margin-left: 26px"
- control = "titleInput"
- accesskey = "&title.accessKey;"
- value ="&title.label;"
- tooltiptext="&title.tooltip;"
- for = "titleInput"/>
- <textbox flex="1"
- id = "titleInput"
- class = "MinWidth20em"
- tooltiptext="&title.tooltip;"
- tabindex="4"/>
- </row>
- <row align="center">
- <radio id = "altTextRadio"
- label = "&altText.label;"
- accesskey = "&altText.accessKey;"
- tooltiptext="&altTextEditField.tooltip;"
- oncommand = "SetAltTextDisabled(false);"
- tabindex="5"/>
- <textbox flex="1"
- id = "altTextInput"
- class = "MinWidth20em"
- tooltiptext="&altTextEditField.tooltip;"
- oninput = "SetAltTextDisabled(false);"
- tabindex="6"/>
- </row>
- </rows>
- </grid>
-
- <radio id = "noAltTextRadio"
- label = "&noAltText.label;"
- accesskey = "&noAltText.accessKey;"
- oncommand = "SetAltTextDisabled(true);"/>
- </radiogroup>
- </vbox>
-
- <groupbox id="imagePreview" orient="horizontal" flex="1">
- <caption label="&previewBox.label;"/>
- <hbox id="preview-image-box" align="center">
- <spacer flex="1"/>
- <description id="preview-image-holder"/>
- <spacer flex="1"/>
- </hbox>
- <vbox id="PreviewSize" collapsed="true">
- <spacer flex="1"/>
- <label value="&actualSize.label;"/>
- <hbox>
- <label value="&widthEditField.label;"/>
- <spacer flex="1"/>
- <label id="PreviewWidth"/>
- </hbox>
- <hbox>
- <label value="&heightEditField.label;"/>
- <spacer flex="1"/>
- <label id="PreviewHeight"/>
- </hbox>
- <spacer flex="1"/>
- </vbox>
- </groupbox>
-
- <vbox id="imageDimensions" align="start">
- <spacer class="spacer"/>
- <hbox>
- <radiogroup id="imgSizeGroup">
- <radio
- id = "actualSizeRadio"
- label = "&actualSizeRadio.label;"
- accesskey = "&actualSizeRadio.accessKey;"
- tooltiptext="&actualSizeRadio.tooltip;"
- oncommand = "SetActualSize()"/>
- <radio
- id = "customSizeRadio"
- label = "&customSizeRadio.label;"
- selected = "true"
- accesskey = "&customSizeRadio.accessKey;"
- tooltiptext="&customSizeRadio.tooltip;"
- oncommand = "doDimensionEnabling();" />
- </radiogroup>
- <spacer flex="1"/>
- <vbox>
- <spacer flex="1"/>
- <checkbox id="constrainCheckbox" label="&constrainCheckbox.label;"
- accesskey="&constrainCheckbox.accessKey;"
- oncommand="ToggleConstrain()"
- tooltiptext="&constrainCheckbox.tooltip;"/>
- </vbox>
- <spacer flex="1"/>
- </hbox>
- <spacer class="spacer"/>
- <grid class="indent">
- <columns><column/><column/><column flex="1"/></columns>
- <rows>
- <row align="center">
- <label id = "widthLabel"
- control = "widthInput"
- accesskey = "&widthEditField.accessKey;"
- value = "&widthEditField.label;" />
- <textbox
- id = "widthInput"
- class = "narrow"
- oninput = "constrainProportions(this.id, 'heightInput')"/>
- <menulist id = "widthUnitsMenulist"
- oncommand = "doDimensionEnabling();" />
- <!-- contents are appended by JS -->
- </row>
- <row align="center">
- <label id = "heightLabel"
- control = "heightInput"
- accesskey = "&heightEditField.accessKey;"
- value = "&heightEditField.label;" />
- <textbox
- id = "heightInput"
- class = "narrow"
- oninput = "constrainProportions(this.id, 'widthInput')"/>
- <menulist id = "heightUnitsMenulist"
- oncommand = "doDimensionEnabling();" />
- <!-- contents are appended by JS -->
- </row>
- </rows>
- </grid>
- <spacer flex="1"/>
- </vbox>
-
- <hbox id="imageAppearance">
- <groupbox>
- <caption id="spacingLabel" label="&spacingBox.label;"/>
- <grid>
- <columns><column/><column/><column/></columns>
- <rows>
- <row align="center">
- <label
- class = "align-right"
- id = "leftrightLabel"
- control = "imageleftrightInput"
- accesskey = "&leftRightEditField.accessKey;"
- value = "&leftRightEditField.label;"/>
- <textbox
- class = "narrow"
- id = "imageleftrightInput"
- oninput = "forceInteger(this.id)"/>
- <label
- id = "leftrighttypeLabel"
- value = "&pixelsPopup.value;" />
- </row>
- <spacer class="spacer"/>
- <row align="center">
- <label
- class = "align-right"
- id = "topbottomLabel"
- control = "imagetopbottomInput"
- accesskey = "&topBottomEditField.accessKey;"
- value = "&topBottomEditField.label;"/>
- <textbox
- class = "narrow"
- id = "imagetopbottomInput"
- oninput = "forceInteger(this.id)"/>
- <label
- id = "topbottomtypeLabel"
- value = "&pixelsPopup.value;" />
- </row>
- <spacer class="spacer"/>
- <row align="center">
- <label class = "align-right"
- id = "borderLabel"
- control = "border"
- accesskey = "&borderEditField.accessKey;"
- value = "&borderEditField.label;"/>
- <textbox
- class = "narrow"
- id = "border"
- oninput = "forceInteger(this.id)"/>
- <label
- id = "bordertypeLabel"
- value = "&pixelsPopup.value;" />
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <vbox>
- <groupbox align="start">
- <caption id="alignLabel" label="&alignment.label;"/>
- <menulist id="alignTypeSelect" class="align-menu">
- <menupopup>
- <menuitem class="align-menu menuitem-iconic"
- value="top"
- label="&topPopup.value;"/>
- <menuitem class="align-menu menuitem-iconic"
- value="middle"
- label="&centerPopup.value;"/>
- <menuitem class="align-menu menuitem-iconic"
- value="bottom"
- label="&bottomPopup.value;"/>
- <!-- HTML attribute value is opposite of the button label on purpose -->
- <menuitem class="align-menu menuitem-iconic"
- value="right"
- label="&wrapLeftPopup.value;"/>
- <menuitem class="align-menu menuitem-iconic"
- value="left"
- label="&wrapRightPopup.value;"/>
- </menupopup>
- </menulist>
- </groupbox>
-
- <groupbox>
- <caption id="imagemapLabel" label="&imagemapBox.label;"/>
- <hbox equalsize="always">
- <button
- id = "removeImageMap"
- oncommand = "removeImageMap()"
- accesskey = "&removeImageMapButton.accessKey;"
- label = "&removeImageMapButton.label;"
- flex = "1"/>
- <spacer flex="1"/><!-- remove when we restore Image Map Editor -->
- </hbox>
- </groupbox>
- </vbox>
- </hbox>
-
-</overlay>
diff --git a/editor/ui/dialogs/content/EdImageProps.js b/editor/ui/dialogs/content/EdImageProps.js
deleted file mode 100644
index 1c0e7002c..000000000
--- a/editor/ui/dialogs/content/EdImageProps.js
+++ /dev/null
@@ -1,316 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gAnchorElement = null;
-var gLinkElement = null;
-var gOriginalHref = "";
-var gHNodeArray = {};
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- ImageStartup();
- gDialog.hrefInput = document.getElementById("hrefInput");
- gDialog.makeRelativeLink = document.getElementById("MakeRelativeLink");
- gDialog.showLinkBorder = document.getElementById("showLinkBorder");
- gDialog.linkTab = document.getElementById("imageLinkTab");
- gDialog.linkAdvanced = document.getElementById("LinkAdvancedEditButton");
-
- // Get a single selected image element
- var tagName = "img";
- if ("arguments" in window && window.arguments[0])
- {
- imageElement = window.arguments[0];
- // We've been called from form field properties, so we can't insert a link
- gDialog.linkTab.remove();
- gDialog.linkTab = null;
- }
- else
- {
- // First check for <input type="image">
- try {
- imageElement = editor.getSelectedElement("input");
-
- if (!imageElement || imageElement.getAttribute("type") != "image") {
- // Get a single selected image element
- imageElement = editor.getSelectedElement(tagName);
- if (imageElement)
- gAnchorElement = editor.getElementOrParentByTagName("href", imageElement);
- }
- } catch (e) {}
-
- }
-
- if (imageElement)
- {
- // We found an element and don't need to insert one
- if (imageElement.hasAttribute("src"))
- {
- gInsertNewImage = false;
- gActualWidth = imageElement.naturalWidth;
- gActualHeight = imageElement.naturalHeight;
- }
- }
- else
- {
- gInsertNewImage = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- imageElement = editor.createElementWithDefaults(tagName);
- } catch(e) {}
-
- if (!imageElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- try {
- gAnchorElement = editor.getSelectedElement("href");
- } catch (e) {}
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = imageElement.cloneNode(false);
-
- // We only need to test for this once per dialog load
- gHaveDocumentUrl = GetDocumentBaseUrl();
-
- InitDialog();
- if (gAnchorElement)
- {
- gOriginalHref = gAnchorElement.getAttribute("href");
- // Make a copy to use for AdvancedEdit
- gLinkElement = gAnchorElement.cloneNode(false);
- }
- else
- {
- gLinkElement = editor.createElementWithDefaults("a");
- }
- gDialog.hrefInput.value = gOriginalHref;
-
- FillLinkMenulist(gDialog.hrefInput, gHNodeArray);
- ChangeLinkLocation();
-
- // Save initial source URL
- gOriginalSrc = gDialog.srcInput.value;
-
- // By default turn constrain on, but both width and height must be in pixels
- gDialog.constrainCheckbox.checked =
- gDialog.widthUnitsMenulist.selectedIndex == 0 &&
- gDialog.heightUnitsMenulist.selectedIndex == 0;
-
- // Start in "Link" tab if 2nd arguement is true
- if (gDialog.linkTab && "arguments" in window && window.arguments[1])
- {
- document.getElementById("TabBox").selectedTab = gDialog.linkTab;
- SetTextboxFocus(gDialog.hrefInput);
- }
- else
- SetTextboxFocus(gDialog.srcInput);
-
- // Hide the separator from EdDialogOverlay.xul as we show our own
- document.getElementById("advancedSeparator").hidden = true;
-
- SetWindowLocation();
-}
-
-// Set dialog widgets with attribute data
-// We get them from globalElement copy so this can be used
-// by AdvancedEdit(), which is shared by all property dialogs
-function InitDialog()
-{
- InitImage();
- var border = TrimString(gDialog.border.value);
- gDialog.showLinkBorder.checked = border != "" && border > 0;
-}
-
-function ChangeLinkLocation()
-{
- var href = TrimString(gDialog.hrefInput.value);
- SetRelativeCheckbox(gDialog.makeRelativeLink);
- gDialog.showLinkBorder.disabled = !href;
- gDialog.linkAdvanced.disabled = !href;
- gLinkElement.setAttribute("href", href);
-}
-
-function ToggleShowLinkBorder()
-{
- if (gDialog.showLinkBorder.checked)
- {
- var border = TrimString(gDialog.border.value);
- if (!border || border == "0")
- gDialog.border.value = "2";
- }
- else
- {
- gDialog.border.value = "0";
- }
-}
-
-// Get data from widgets, validate, and set for the global element
-// accessible to AdvancedEdit() [in EdDialogCommon.js]
-function ValidateData()
-{
- return ValidateImage();
-}
-
-function onAccept()
-{
- // Use this now (default = false) so Advanced Edit button dialog doesn't trigger error message
- gDoAltTextError = true;
-
- if (ValidateData())
- {
- if ("arguments" in window && window.arguments[0])
- {
- SaveWindowLocation();
- return true;
- }
-
- var editor = GetCurrentEditor();
-
- editor.beginTransaction();
-
- try
- {
- if (gRemoveImageMap)
- {
- globalElement.removeAttribute("usemap");
- if (gImageMap)
- {
- editor.deleteNode(gImageMap);
- gInsertNewIMap = true;
- gImageMap = null;
- }
- }
- else if (gImageMap)
- {
- // un-comment to see that inserting image maps does not work!
- /*
- gImageMap = editor.createElementWithDefaults("map");
- gImageMap.setAttribute("name", "testing");
- var testArea = editor.createElementWithDefaults("area");
- testArea.setAttribute("shape", "circle");
- testArea.setAttribute("coords", "86,102,52");
- testArea.setAttribute("href", "test");
- gImageMap.appendChild(testArea);
- */
-
- // Assign to map if there is one
- var mapName = gImageMap.getAttribute("name");
- if (mapName != "")
- {
- globalElement.setAttribute("usemap", ("#"+mapName));
- if (globalElement.getAttribute("border") == "")
- globalElement.setAttribute("border", 0);
- }
- }
-
- // Create or remove the link as appropriate
- var href = gDialog.hrefInput.value;
- if (href != gOriginalHref)
- {
- if (href && !gInsertNewImage)
- {
- EditorSetTextProperty("a", "href", href);
- // gAnchorElement is needed for cloning attributes later.
- if (!gAnchorElement)
- gAnchorElement = editor.getElementOrParentByTagName("href", imageElement);
- }
- else
- {
- EditorRemoveTextProperty("href", "");
- }
- }
-
- // If inside a link, always write the 'border' attribute
- if (href)
- {
- if (gDialog.showLinkBorder.checked)
- {
- // Use default = 2 if border attribute is empty
- if (!globalElement.hasAttribute("border"))
- globalElement.setAttribute("border", "2");
- }
- else
- globalElement.setAttribute("border", "0");
- }
-
- if (gInsertNewImage)
- {
- if (href) {
- gLinkElement.appendChild(imageElement);
- editor.insertElementAtSelection(gLinkElement, true);
- }
- else
- // 'true' means delete the selection before inserting
- editor.insertElementAtSelection(imageElement, true);
- }
-
- // Check to see if the link was to a heading
- // Do this last because it moves the caret (BAD!)
- if (href in gHNodeArray)
- {
- var anchorNode = editor.createElementWithDefaults("a");
- if (anchorNode)
- {
- anchorNode.name = href.substr(1);
- // Remember to use editor method so it is undoable!
- editor.insertNode(anchorNode, gHNodeArray[href], 0, false);
- }
- }
- // All values are valid - copy to actual element in doc or
- // element we just inserted
- editor.cloneAttributes(imageElement, globalElement);
- if (gAnchorElement)
- editor.cloneAttributes(gAnchorElement, gLinkElement);
-
- // If document is empty, the map element won't insert,
- // so always insert the image first
- if (gImageMap && gInsertNewIMap)
- {
- // Insert the ImageMap element at beginning of document
- var body = editor.rootElement;
- editor.setShouldTxnSetSelection(false);
- editor.insertNode(gImageMap, body, 0);
- editor.setShouldTxnSetSelection(true);
- }
- }
- catch (e)
- {
- dump(e);
- }
-
- editor.endTransaction();
-
- SaveWindowLocation();
- return true;
- }
-
- gDoAltTextError = false;
-
- return false;
-}
-
-function onLinkAdvancedEdit()
-{
- window.AdvancedEditOK = false;
- window.openDialog("chrome://editor/content/EdAdvancedEdit.xul", "_blank",
- "chrome,close,titlebar,modal,resizable=yes", "",
- gLinkElement);
- window.focus();
- if (window.AdvancedEditOK)
- gDialog.hrefInput.value = gLinkElement.getAttribute("href");
-}
diff --git a/editor/ui/dialogs/content/EdImageProps.xul b/editor/ui/dialogs/content/EdImageProps.xul
deleted file mode 100644
index c2ddfeba0..000000000
--- a/editor/ui/dialogs/content/EdImageProps.xul
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdImageOverlay.xul"?>
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorImageProperties.dtd">
-
-
-<!-- dialog containing a control requiring initial setup -->
-<dialog id="imageDlg" title="&windowTitle.label;"
- xmlns ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdImageProps.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-
- <tabbox id="TabBox">
- <tabs flex="1">
- <tab id="imageLocationTab"/>
- <tab id="imageDimensionsTab"/>
- <tab id="imageAppearanceTab"/>
- <tab id="imageLinkTab"/>
- </tabs>
- <tabpanels>
- <!-- panels overlayed from EdImageOverlay.xul -->
- <vbox id="imageLocation"/>
- <vbox id="imageDimensions"/>
- <hbox id="imageAppearance"/>
- <vbox>
- <spacer class="spacer"/>
- <vbox id="LinkLocationBox"/>
- <spacer class="spacer"/>
- <hbox>
- <checkbox id="showLinkBorder"
- label="&showImageLinkBorder.label;"
- accesskey="&showImageLinkBorder.accessKey;"
- oncommand="ToggleShowLinkBorder();"/>
- <spacer flex="1"/>
- <button id="LinkAdvancedEditButton"
- label="&LinkAdvancedEditButton.label;"
- accesskey="&LinkAdvancedEditButton.accessKey;"
- tooltiptext="&LinkAdvancedEditButton.tooltip;"
- oncommand="onLinkAdvancedEdit();"/>
- </hbox>
- </vbox>
- </tabpanels>
- </tabbox>
-
- <hbox align="end">
- <groupbox id="imagePreview"/>
-
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
- </hbox>
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInputImage.js b/editor/ui/dialogs/content/EdInputImage.js
deleted file mode 100644
index bf9abcae3..000000000
--- a/editor/ui/dialogs/content/EdInputImage.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- gDialog = {
- inputName: document.getElementById( "InputName" ),
- inputDisabled: document.getElementById( "InputDisabled" ),
- inputTabIndex: document.getElementById( "InputTabIndex" )
- };
-
- ImageStartup();
-
- // Get a single selected input element
- var tagName = "input";
- try {
- imageElement = editor.getSelectedElement(tagName);
- } catch (e) {}
-
- if (imageElement)
- {
- // We found an element and don't need to insert one
- gInsertNewImage = false;
- }
- else
- {
- gInsertNewImage = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- imageElement = editor.createElementWithDefaults(tagName);
- } catch(e) {}
-
- if (!imageElement )
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- var imgElement;
- try {
- imgElement = editor.getSelectedElement("img");
- } catch(e) {}
-
- if (imgElement)
- {
- // We found an image element, convert it to an input type="image"
- var attributes = ["src", "alt", "width", "height", "hspace", "vspace", "border", "align", "usemap", "ismap"];
- for (i in attributes)
- imageElement.setAttribute(attributes[i], imgElement.getAttribute(attributes[i]));
- }
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = imageElement.cloneNode(false);
-
- // We only need to test for this once per dialog load
- gHaveDocumentUrl = GetDocumentBaseUrl();
-
- InitDialog();
-
- // Save initial source URL
- gOriginalSrc = gDialog.srcInput.value;
-
- // By default turn constrain on, but both width and height must be in pixels
- gDialog.constrainCheckbox.checked =
- gDialog.widthUnitsMenulist.selectedIndex == 0 &&
- gDialog.heightUnitsMenulist.selectedIndex == 0;
-
- SetTextboxFocus(gDialog.inputName);
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- InitImage();
- gDialog.inputName.value = globalElement.getAttribute("name");
- gDialog.inputDisabled.setAttribute("checked", globalElement.hasAttribute("disabled"));
- gDialog.inputTabIndex.value = globalElement.getAttribute("tabindex");
-}
-
-function ValidateData()
-{
- if (!ValidateImage())
- return false;
- if (gDialog.inputName.value)
- globalElement.setAttribute("name", gDialog.inputName.value);
- else
- globalElement.removeAttribute("name");
- if (gDialog.inputTabIndex.value)
- globalElement.setAttribute("tabindex", gDialog.inputTabIndex.value);
- else
- globalElement.removeAttribute("tabindex");
- if (gDialog.inputDisabled.checked)
- globalElement.setAttribute("disabled", "");
- else
- globalElement.removeAttribute("disabled");
- globalElement.setAttribute("type", "image");
- return true;
-}
-
-function onAccept()
-{
- // Show alt text error only once
- // (we don't initialize doAltTextError=true
- // so Advanced edit button dialog doesn't trigger that error message)
- // Use this now (default = false) so Advanced Edit button dialog doesn't trigger error message
- gDoAltTextError = true;
-
- if (ValidateData())
- {
-
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- try {
- if (gRemoveImageMap)
- {
- globalElement.removeAttribute("usemap");
- if (gImageMap)
- {
- editor.deleteNode(gImageMap);
- gInsertNewIMap = true;
- gImageMap = null;
- }
- }
- else if (gImageMap)
- {
- // Assign to map if there is one
- var mapName = gImageMap.getAttribute("name");
- if (mapName != "")
- {
- globalElement.setAttribute("usemap", ("#"+mapName));
- if (globalElement.getAttribute("border") == "")
- globalElement.setAttribute("border", 0);
- }
- }
-
- if (gInsertNewImage)
- {
- // 'true' means delete the selection before inserting
- // in case were are converting an image to an input type="image"
- editor.insertElementAtSelection(imageElement, true);
- }
- editor.cloneAttributes(imageElement, globalElement);
-
- // If document is empty, the map element won't insert,
- // so always insert the image element first
- if (gImageMap && gInsertNewIMap)
- {
- // Insert the ImageMap element at beginning of document
- var body = editor.rootElement;
- editor.setShouldTxnSetSelection(false);
- editor.insertNode(gImageMap, body, 0);
- editor.setShouldTxnSetSelection(true);
- }
- } catch (e) {}
-
- editor.endTransaction();
-
- SaveWindowLocation();
-
- return true;
- }
- return false;
-}
-
diff --git a/editor/ui/dialogs/content/EdInputImage.xul b/editor/ui/dialogs/content/EdInputImage.xul
deleted file mode 100644
index 026982f85..000000000
--- a/editor/ui/dialogs/content/EdInputImage.xul
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdImageOverlay.xul"?>
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInputProperties.dtd">
-<dialog title="&windowTitleImage.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdInputImage.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <tabbox id="TabBox">
- <tabs flex="1">
- <tab id="imageInputTab"/>
- <tab id="imageLocationTab"/>
- <tab id="imageDimensionsTab"/>
- <tab id="imageAppearanceTab"/>
- </tabs>
- <tabpanels>
- <groupbox><caption label="&InputSettings.label;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label value="&InputName.label;"/>
- <textbox id="InputName"/>
- </row>
- <row>
- <spacer/>
- <checkbox id="InputDisabled" label="&InputDisabled.label;"/>
- </row>
- <row align="center">
- <label value="&tabIndex.label;"/>
- <hbox>
- <textbox id="InputTabIndex" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <!-- panels overlayed from EdImageOverlay.xul -->
- <vbox id="imageLocation"/>
- <vbox id="imageDimensions"/>
- <hbox id="imageAppearance"/>
-
- </tabpanels>
- </tabbox>
-
- <hbox align="end">
- <groupbox id="imagePreview"/>
-
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
- </hbox>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInputProps.js b/editor/ui/dialogs/content/EdInputProps.js
deleted file mode 100644
index 430e6f3a0..000000000
--- a/editor/ui/dialogs/content/EdInputProps.js
+++ /dev/null
@@ -1,327 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var insertNew;
-var inputElement;
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- gDialog = {
- accept: document.documentElement.getButton("accept"),
- inputType: document.getElementById("InputType"),
- inputNameDeck: document.getElementById("InputNameDeck"),
- inputName: document.getElementById("InputName"),
- inputValueDeck: document.getElementById("InputValueDeck"),
- inputValue: document.getElementById("InputValue"),
- inputDeck: document.getElementById("InputDeck"),
- inputChecked: document.getElementById("InputChecked"),
- inputSelected: document.getElementById("InputSelected"),
- inputReadOnly: document.getElementById("InputReadOnly"),
- inputDisabled: document.getElementById("InputDisabled"),
- inputTabIndex: document.getElementById("InputTabIndex"),
- inputAccessKey: document.getElementById("InputAccessKey"),
- inputSize: document.getElementById("InputSize"),
- inputMaxLength: document.getElementById("InputMaxLength"),
- inputAccept: document.getElementById("InputAccept"),
- MoreSection: document.getElementById("MoreSection"),
- MoreFewerButton: document.getElementById("MoreFewerButton"),
- AdvancedEditButton: document.getElementById("AdvancedEditButton"),
- AdvancedEditDeck: document.getElementById("AdvancedEditDeck")
- };
-
- // Get a single selected input element
- const kTagName = "input";
- try {
- inputElement = editor.getSelectedElement(kTagName);
- } catch (e) {}
-
- if (inputElement)
- // We found an element and don't need to insert one
- insertNew = false;
- else
- {
- insertNew = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- inputElement = editor.createElementWithDefaults(kTagName);
- } catch (e) {}
-
- if (!inputElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
-
- var imgElement = editor.getSelectedElement("img");
- if (imgElement)
- {
- // We found an image element, convert it to an input type="image"
- inputElement.setAttribute("type", "image");
-
- var attributes = ["src", "alt", "width", "height", "hspace", "vspace", "border", "align"];
- for (i in attributes)
- inputElement.setAttribute(attributes[i], imgElement.getAttribute(attributes[i]));
- }
- else
- inputElement.setAttribute("value", GetSelectionAsText());
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = inputElement.cloneNode(false);
-
- InitDialog();
-
- InitMoreFewer();
-
- gDialog.inputType.focus();
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- var type = globalElement.getAttribute("type");
- var index = 0;
- switch (type)
- {
- case "button":
- index = 9;
- break;
- case "checkbox":
- index = 2;
- break;
- case "file":
- index = 6;
- break;
- case "hidden":
- index = 7;
- break;
- case "image":
- index = 8;
- break;
- case "password":
- index = 1;
- break;
- case "radio":
- index = 3;
- break;
- case "reset":
- index = 5;
- break;
- case "submit":
- index = 4;
- break;
- }
- gDialog.inputType.selectedIndex = index;
- gDialog.inputName.value = globalElement.getAttribute("name");
- gDialog.inputValue.value = globalElement.getAttribute("value");
- gDialog.inputChecked.setAttribute("checked", globalElement.hasAttribute("checked"));
- gDialog.inputSelected.setAttribute("checked", globalElement.hasAttribute("checked"));
- gDialog.inputReadOnly.setAttribute("checked", globalElement.hasAttribute("readonly"));
- gDialog.inputDisabled.setAttribute("checked", globalElement.hasAttribute("disabled"));
- gDialog.inputTabIndex.value = globalElement.getAttribute("tabindex");
- gDialog.inputAccessKey.value = globalElement.getAttribute("accesskey");
- gDialog.inputSize.value = globalElement.getAttribute("size");
- gDialog.inputMaxLength.value = globalElement.getAttribute("maxlength");
- gDialog.inputAccept.value = globalElement.getAttribute("accept");
- SelectInputType();
-}
-
-function SelectInputType()
-{
- var index = gDialog.inputType.selectedIndex;
- gDialog.AdvancedEditDeck.setAttribute("selectedIndex", 0);
- gDialog.inputNameDeck.setAttribute("selectedIndex", 0);
- gDialog.inputValueDeck.setAttribute("selectedIndex", 0);
- gDialog.inputValue.disabled = false;
- gDialog.inputChecked.disabled = index != 2;
- gDialog.inputSelected.disabled = index != 3;
- gDialog.inputReadOnly.disabled = index > 1;
- gDialog.inputTabIndex.disabled = index == 7;
- gDialog.inputAccessKey.disabled = index == 7;
- gDialog.inputSize.disabled = index > 1;
- gDialog.inputMaxLength.disabled = index > 1;
- gDialog.inputAccept.disabled = index != 6;
- switch (index)
- {
- case 0:
- case 1:
- gDialog.inputValueDeck.setAttribute("selectedIndex", 1);
- gDialog.inputDeck.setAttribute("selectedIndex", 2);
- break;
- case 2:
- gDialog.inputDeck.setAttribute("selectedIndex", 0);
- break;
- case 3:
- gDialog.inputDeck.setAttribute("selectedIndex", 1);
- gDialog.inputNameDeck.setAttribute("selectedIndex", 1);
- break;
- case 6:
- gDialog.inputValue.disabled = true;
- gDialog.inputAccept.disabled = false;
- break;
- case 8:
- gDialog.inputValue.disabled = true;
- gDialog.AdvancedEditDeck.setAttribute("selectedIndex", 1);
- gDialog.inputName.removeEventListener("input", onInput, false);
- break;
- case 7:
- gDialog.inputValueDeck.setAttribute("selectedIndex", 1);
- break;
- }
- onInput();
-}
-
-function onInput()
-{
- var disabled = false;;
- switch (gDialog.inputType.selectedIndex)
- {
- case 3:
- disabled = disabled || !gDialog.inputValue.value;
- case 4:
- case 5:
- break;
- case 8:
- disabled = !globalElement.hasAttribute("src");
- break;
- default:
- disabled = !gDialog.inputName.value
- break;
- }
- if (gDialog.accept.disabled != disabled)
- {
- gDialog.accept.disabled = disabled;
- gDialog.AdvancedEditButton.disabled = disabled;
- }
-}
-
-function doImageProperties()
-{
- window.openDialog("chrome://editor/content/EdImageProps.xul",
- "_blank", "chrome,close,titlebar,modal", globalElement);
- window.focus();
- onInput();
-}
-
-function ValidateData()
-{
- var attributes = {
- type: "",
- name: gDialog.inputName.value,
- value: gDialog.inputValue.value,
- tabindex: gDialog.inputTabIndex.value,
- accesskey: "",
- size: "",
- maxlength: "",
- accept: ""
- };
- var index = gDialog.inputType.selectedIndex;
- var flags = {
- checked: false,
- readonly: false,
- disabled: gDialog.inputDisabled.checked
- };
- switch (index)
- {
- case 1:
- attributes.type = "password";
- case 0:
- flags.readonly = gDialog.inputReadOnly.checked;
- attributes.size = gDialog.inputSize.value;
- attributes.maxlength = gDialog.inputMaxLength.value;
- break;
- case 2:
- attributes.type = "checkbox";
- flags.checked = gDialog.inputChecked.checked;
- break;
- case 3:
- attributes.type = "radio";
- flags.checked = gDialog.inputSelected.checked;
- break;
- case 4:
- attributes.type = "submit";
- attributes.accesskey = gDialog.inputAccessKey.value;
- break;
- case 5:
- attributes.type = "reset";
- attributes.accesskey = gDialog.inputAccessKey.value;
- break;
- case 6:
- attributes.type = "file";
- attributes.accept = gDialog.inputAccept.value;
- attributes.value = "";
- break;
- case 7:
- attributes.type = "hidden";
- attributes.tabindex = "";
- break;
- case 8:
- attributes.type = "image";
- attributes.value = "";
- break;
- case 9:
- attributes.type = "button";
- attributes.accesskey = gDialog.inputAccessKey.value;
- break;
- }
- for (var a in attributes)
- {
- if (attributes[a])
- globalElement.setAttribute(a, attributes[a]);
- else
- globalElement.removeAttribute(a);
- }
- for (var f in flags)
- {
- if (flags[f])
- globalElement.setAttribute(f, "");
- else
- globalElement.removeAttribute(f);
- }
- return true;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- // All values are valid - copy to actual element in doc or
- // element created to insert
-
- var editor = GetCurrentEditor();
-
- editor.cloneAttributes(inputElement, globalElement);
-
- if (insertNew)
- {
- try {
- // 'true' means delete the selection before inserting
- // in case were are converting an image to an input type="image"
- editor.insertElementAtSelection(inputElement, true);
- } catch (e) {
- dump(e);
- }
- }
-
- SaveWindowLocation();
-
- return true;
- }
- return false;
-}
-
diff --git a/editor/ui/dialogs/content/EdInputProps.xul b/editor/ui/dialogs/content/EdInputProps.xul
deleted file mode 100644
index 5b03eae74..000000000
--- a/editor/ui/dialogs/content/EdInputProps.xul
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInputProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdInputProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption><label control="InputType" value="&InputType.label;" accesskey="&InputType.accesskey;"/></caption>
- <menulist id="InputType" oncommand="SelectInputType();">
- <menupopup>
- <menuitem label="&text.value;"/>
- <menuitem label="&password.value;"/>
- <menuitem label="&checkbox.value;"/>
- <menuitem label="&radio.value;"/>
- <menuitem label="&submit.value;"/>
- <menuitem label="&reset.value;"/>
- <menuitem label="&file.value;"/>
- <menuitem label="&hidden.value;"/>
- <menuitem label="&image.value;"/>
- <menuitem label="&button.value;"/>
- </menupopup>
- </menulist>
- </groupbox>
-
- <groupbox><caption label="&InputSettings.label;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <deck id="InputNameDeck">
- <label control="InputName" value="&InputName.label;" accesskey="&InputName.accesskey;"/>
- <label control="InputName" value="&GroupName.label;" accesskey="&GroupName.accesskey;"/>
- </deck>
- <textbox id="InputName" oninput="onInput();"/>
- </row>
- <row align="center">
- <deck id="InputValueDeck">
- <label control="InputValue" value="&InputValue.label;" accesskey="&InputValue.accesskey;"/>
- <label control="InputValue" value="&InitialValue.label;" accesskey="&InitialValue.accesskey;"/>
- </deck>
- <textbox id="InputValue" oninput="onInput();"/>
- </row>
- <row>
- <spacer/>
- <deck id="InputDeck" persist="index">
- <checkbox id="InputChecked" label="&InputChecked.label;" accesskey="&InputChecked.accesskey;"/>
- <checkbox id="InputSelected" label="&InputSelected.label;" accesskey="&InputSelected.accesskey;"/>
- <checkbox id="InputReadOnly" label="&InputReadOnly.label;" accesskey="&InputReadOnly.accesskey;"/>
- </deck>
- </row>
- </rows>
- </grid>
- <hbox>
- <button id="MoreFewerButton" oncommand="onMoreFewer();" persist="more"/>
- </hbox>
- <grid id="MoreSection" align="start">
- <columns><column/><column/></columns>
- <rows>
- <row>
- <spacer/>
- <checkbox id="InputDisabled" label="&InputDisabled.label;" accesskey="&InputDisabled.accesskey;"/>
- </row>
- <row align="center">
- <label control="InputTabIndex" value="&tabIndex.label;" accesskey="&tabIndex.accesskey;"/>
- <hbox>
- <textbox id="InputTabIndex" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- <row align="center">
- <label control="InputAccessKey" value="&AccessKey.label;" accesskey="&AccessKey.accesskey;"/>
- <hbox>
- <textbox id="InputAccessKey" class="narrow"/>
- </hbox>
- </row>
- <row align="center">
- <label control="InputSize" value="&TextSize.label;" accesskey="&TextSize.accesskey;"/>
- <hbox>
- <textbox id="InputSize" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- <row align="center">
- <label control="InputMaxLength" value="&TextLength.label;" accesskey="&TextLength.accesskey;"/>
- <hbox>
- <textbox id="InputMaxLength" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- <row align="center">
- <label control="InputAccept" value="&Accept.label;" accesskey="&Accept.accesskey;"/>
- <textbox id="InputAccept"/>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <!-- from EdDialogOverlay -->
- <hbox flex="1" style="margin-top: 0.2em">
- <!-- This will right-align the button -->
- <spacer flex="1"/>
- <deck id="AdvancedEditDeck">
- <button id="AdvancedEditButton"/>
- <button label="&ImageProperties.label;" accesskey="&ImageProperties.accesskey;" oncommand="doImageProperties();"/>
- </deck>
- </hbox>
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInsSrc.js b/editor/ui/dialogs/content/EdInsSrc.js
deleted file mode 100644
index afa2e31e2..000000000
--- a/editor/ui/dialogs/content/EdInsSrc.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Insert Source HTML dialog */
-
-var gFullDataStrings = new Map();
-var gShortDataStrings = new Map();
-var gListenerAttached = false;
-
-function Startup()
-{
- let editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- document.documentElement.getButton("accept").removeAttribute("default");
-
- // Create dialog object to store controls for easy access
- gDialog.srcInput = document.getElementById("srcInput");
-
- // Attach a paste listener so we can detect pasted data URIs we need to shorten.
- gDialog.srcInput.addEventListener("paste", onPaste);
-
- let selection;
- try {
- selection = editor.outputToString("text/html", kOutputFormatted | kOutputSelectionOnly | kOutputWrap);
- } catch (e) {}
- if (selection)
- {
- selection = (selection.replace(/<body[^>]*>/,"")).replace(/<\/body>/,"");
-
- // Shorten data URIs for display.
- selection = replaceDataURIs(selection);
-
- if (selection)
- gDialog.srcInput.value = selection;
- }
- // Set initial focus
- gDialog.srcInput.focus();
- // Note: We can't set the caret location in a multiline textbox
- SetWindowLocation();
-}
-
-function replaceDataURIs(input)
-{
- return input.replace(/(data:.+;base64,)([^"' >]+)/gi,
- function(match, nonDataPart, dataPart) {
-
- if (gShortDataStrings.has(dataPart)) {
- // We found the exact same data URI, just return the shortened URI.
- return nonDataPart + gShortDataStrings.get(dataPart);
- }
-
- let l = 5;
- // Normally we insert the ellipsis after five characters but if it's not unique
- // we include more data.
- do {
- key = dataPart.substr(0, l) + "…" + dataPart.substr(dataPart.length - 10);
- l++;
- } while (gFullDataStrings.has(key) && l < dataPart.length - 10);
- gFullDataStrings.set(key, dataPart);
- gShortDataStrings.set(dataPart, key);
-
- // Attach listeners. In case anyone copies/cuts from the HTML window,
- // we want to restore the data URI on the clipboard.
- if (!gListenerAttached) {
- gDialog.srcInput.addEventListener("copy", onCopyOrCut);
- gDialog.srcInput.addEventListener("cut", onCopyOrCut);
- gListenerAttached = true;
- }
-
- return nonDataPart + key;
- });
-}
-
-function onCopyOrCut(event)
-{
- let startPos = gDialog.srcInput.selectionStart;
- if (startPos == undefined)
- return;
- let endPos = gDialog.srcInput.selectionEnd;
- let clipboard = gDialog.srcInput.value.substring(startPos, endPos);
-
- // Add back the original data URIs we stashed away earlier.
- clipboard = clipboard.replace(/(data:.+;base64,)([^"' >]+)/gi,
- function(match, nonDataPart, key) {
- if (!gFullDataStrings.has(key))
- return match; // user changed data URI
- return nonDataPart + gFullDataStrings.get(key);
- });
- event.clipboardData.setData("text/plain", clipboard);
- if (event.type == "cut") {
- // We have to cut the selection manually.
- gDialog.srcInput.value = gDialog.srcInput.value.substr(0, startPos) +
- gDialog.srcInput.value.substr(endPos);
- }
- event.preventDefault();
-}
-
-function onPaste(event)
-{
- let startPos = gDialog.srcInput.selectionStart;
- if (startPos == undefined)
- return;
- let endPos = gDialog.srcInput.selectionEnd;
- let clipboard = event.clipboardData.getData("text/plain");
-
- // We do out own paste by replacing the selection with the pre-processed
- // clipboard data.
- gDialog.srcInput.value = gDialog.srcInput.value.substr(0, startPos) +
- replaceDataURIs(clipboard) +
- gDialog.srcInput.value.substr(endPos);
- event.preventDefault();
-}
-
-function onAccept()
-{
- let html = gDialog.srcInput.value;
- if (!html)
- return false;
-
- // Add back the original data URIs we stashed away earlier.
- html = html.replace(/(data:.+;base64,)([^"' >]+)/gi,
- function(match, nonDataPart, key) {
- if (!gFullDataStrings.has(key))
- return match; // user changed data URI
- return nonDataPart + gFullDataStrings.get(key);
- });
-
- try {
- GetCurrentEditor().insertHTML(html);
- } catch (e) {}
- SaveWindowLocation();
-
- return true;
-}
-
diff --git a/editor/ui/dialogs/content/EdInsSrc.xul b/editor/ui/dialogs/content/EdInsSrc.xul
deleted file mode 100644
index a0b02b3df..000000000
--- a/editor/ui/dialogs/content/EdInsSrc.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertSource.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- buttonlabelaccept="&insertButton.label;"
- buttonaccesskeyaccept="&insertButton.accesskey;"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdInsSrc.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-
- <label id="srcMessage" value="&sourceEditField.label;"/>
- <vbox flex="1" style="width: 30em; height: 20em;">
- <textbox id="srcInput" multiline="true" rows="1" style="width: 1em" flex="1" class="uri-element"/>
- </vbox>
- <!-- Will this accept the embedded HTML tags? -->
- <hbox>
- <spacer class="bigspacer"/>
- <label value="&example.label;"/>
- <label class="bold" value="&exampleOpenTag.label;"/>
- <label class="bold italic" value="&exampleText.label;"/>
- <label class="bold" value="&exampleCloseTag.label;"/>
- </hbox>
- <spacer class="spacer"/>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInsertChars.js b/editor/ui/dialogs/content/EdInsertChars.js
deleted file mode 100644
index 24a1172d6..000000000
--- a/editor/ui/dialogs/content/EdInsertChars.js
+++ /dev/null
@@ -1,409 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-//------------------------------------------------------------------
-// From Unicode 3.0 Page 54. 3.11 Conjoining Jamo Behavior
-var SBase = 0xac00;
-var LBase = 0x1100;
-var VBase = 0x1161;
-var TBase = 0x11A7;
-var LCount = 19;
-var VCount = 21;
-var TCount = 28;
-var NCount = VCount * TCount;
-// End of Unicode 3.0
-
-// dialog initialization code
-function Startup()
-{
- if (!GetCurrentEditor())
- {
- window.close();
- return;
- }
-
- StartupLatin();
-
- // Set a variable on the opener window so we
- // can track ownership of close this window with it
- window.opener.InsertCharWindow = window;
- window.sizeToContent();
-
- SetWindowLocation();
-}
-
-function onAccept()
-{
- // Insert the character
- try {
- GetCurrentEditor().insertText(LatinM.label);
- } catch(e) {}
-
- // Set persistent attributes to save
- // which category, letter, and character modifier was used
- CategoryGroup.setAttribute("category", category);
- CategoryGroup.setAttribute("letter_index", indexL);
- CategoryGroup.setAttribute("char_index", indexM);
-
- // Don't close the dialog
- return false;
-}
-
-// Don't allow inserting in HTML Source Mode
-function onFocus()
-{
- var enable = true;
- if ("gEditorDisplayMode" in window.opener)
- enable = !window.opener.IsInHTMLSourceMode();
-
- SetElementEnabled(document.documentElement.getButton("accept"), enable);
-}
-
-function onClose()
-{
- window.opener.InsertCharWindow = null;
- SaveWindowLocation();
- return true;
-}
-
-//------------------------------------------------------------------
-var LatinL;
-var LatinM;
-var LatinL_Label;
-var LatinM_Label;
-var indexL=0;
-var indexM=0;
-var indexM_AU=0;
-var indexM_AL=0;
-var indexM_U=0;
-var indexM_L=0;
-var indexM_S=0;
-var LItems=0;
-var category;
-var CategoryGroup;
-var initialize = true;
-
-function StartupLatin()
-{
-
- LatinL = document.getElementById("LatinL");
- LatinM = document.getElementById("LatinM");
- LatinL_Label = document.getElementById("LatinL_Label");
- LatinM_Label = document.getElementById("LatinM_Label");
-
- var Symbol = document.getElementById("Symbol");
- var AccentUpper = document.getElementById("AccentUpper");
- var AccentLower = document.getElementById("AccentLower");
- var Upper = document.getElementById("Upper");
- var Lower = document.getElementById("Lower");
- CategoryGroup = document.getElementById("CatGrp");
-
- // Initialize which radio button is set from persistent attribute...
- var category = CategoryGroup.getAttribute("category");
-
- // ...as well as indexes into the letter and character lists
- var index = Number(CategoryGroup.getAttribute("letter_index"));
- if (index && index >= 0)
- indexL = index;
- index = Number(CategoryGroup.getAttribute("char_index"));
- if (index && index >= 0)
- indexM = index;
-
-
- switch (category)
- {
- case "AccentUpper": // Uppercase Diacritical
- CategoryGroup.selectedItem = AccentUpper;
- indexM_AU = indexM;
- break;
- case "AccentLower": // Lowercase Diacritical
- CategoryGroup.selectedItem = AccentLower;
- indexM_AL = indexM;
- break;
- case "Upper": // Uppercase w/o Diacritical
- CategoryGroup.selectedItem = Upper;
- indexM_U = indexM;
- break;
- case "Lower": // Lowercase w/o Diacritical
- CategoryGroup.selectedItem = Lower;
- indexM_L = indexM;
- break;
- default:
- category = "Symbol";
- CategoryGroup.selectedItem = Symbol;
- indexM_S = indexM;
- break;
- }
-
- ChangeCategory(category);
- initialize = false;
-}
-
-function ChangeCategory(newCategory)
-{
- if (category != newCategory || initialize)
- {
- category = newCategory;
- // Note: Must do L before M to set LatinL.selectedIndex
- UpdateLatinL();
- UpdateLatinM();
- UpdateCharacter();
- }
-}
-
-function SelectLatinLetter()
-{
- if(LatinL.selectedIndex != indexL )
- {
- indexL = LatinL.selectedIndex;
- UpdateLatinM();
- UpdateCharacter();
- }
-}
-
-function SelectLatinModifier()
-{
- if(LatinM.selectedIndex != indexM )
- {
- indexM = LatinM.selectedIndex;
- UpdateCharacter();
- }
-}
-function DisableLatinL(disable)
-{
- if (disable) {
- LatinL_Label.setAttribute("disabled", "true");
- LatinL.setAttribute("disabled", "true");
- } else {
- LatinL_Label.removeAttribute("disabled");
- LatinL.removeAttribute("disabled");
- }
-}
-
-function UpdateLatinL()
-{
- LatinL.removeAllItems();
- if (category == "AccentUpper" || category == "AccentLower")
- {
- DisableLatinL(false);
- // No Q or q
- var alphabet = category == "AccentUpper" ? "ABCDEFGHIJKLMNOPRSTUVWXYZ" : "abcdefghijklmnoprstuvwxyz";
- for (var letter = 0; letter < alphabet.length; letter++)
- LatinL.appendItem(alphabet.charAt(letter));
-
- LatinL.selectedIndex = indexL;
- }
- else
- {
- // Other categories don't hinge on a "letter"
- DisableLatinL(true);
- // Note: don't change the indexL so it can be used next time
- }
-}
-
-function UpdateLatinM()
-{
- LatinM.removeAllItems();
- var i, accent;
- switch(category)
- {
- case "AccentUpper": // Uppercase Diacritical
- accent = upper[indexL];
- for(i=0; i < accent.length; i++)
- LatinM.appendItem(accent.charAt(i));
-
- if(indexM_AU < accent.length)
- indexM = indexM_AU;
- else
- indexM = accent.length - 1;
- indexM_AU = indexM;
- break;
-
- case "AccentLower": // Lowercase Diacritical
- accent = lower[indexL];
- for(i=0; i < accent.length; i++)
- LatinM.appendItem(accent.charAt(i));
-
- if(indexM_AL < accent.length)
- indexM = indexM_AL;
- else
- indexM = lower[indexL].length - 1;
- indexM_AL = indexM;
- break;
-
- case "Upper": // Uppercase w/o Diacritical
- for(i=0; i < otherupper.length; i++)
- LatinM.appendItem(otherupper.charAt(i));
-
- if(indexM_U < otherupper.length)
- indexM = indexM_U;
- else
- indexM = otherupper.length - 1;
- indexM_U = indexM;
- break;
-
- case "Lower": // Lowercase w/o Diacritical
- for(i=0; i < otherlower.length; i++)
- LatinM.appendItem(otherlower.charAt(i));
-
- if(indexM_L < otherlower.length)
- indexM = indexM_L;
- else
- indexM = otherlower.length - 1;
- indexM_L = indexM;
- break;
-
- case "Symbol": // Symbol
- for(i=0; i < symbol.length; i++)
- LatinM.appendItem(symbol.charAt(i));
-
- if(indexM_S < symbol.length)
- indexM = indexM_S;
- else
- indexM = symbol.length - 1;
- indexM_S = indexM;
- break;
- }
- LatinM.selectedIndex = indexM;
-}
-
-function UpdateCharacter()
-{
- indexM = LatinM.selectedIndex;
-
- switch(category)
- {
- case "AccentUpper": // Uppercase Diacritical
- indexM_AU = indexM;
- break;
- case "AccentLower": // Lowercase Diacritical
- indexM_AL = indexM;
- break;
- case "Upper": // Uppercase w/o Diacritical
- indexM_U = indexM;
- break;
- case "Lower": // Lowercase w/o Diacritical
- indexM_L = indexM;
- break;
- case "Symbol":
- indexM_S = indexM;
- break;
- }
-//dump("Letter Index="+indexL+", Character Index="+indexM+", Character = "+LatinM.label+"\n");
-}
-
-const upper=[
- // A
- "\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u0100\u0102\u0104\u01cd\u01de\u01de\u01e0\u01fa\u0200\u0202\u0226\u1e00\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6",
- // B
- "\u0181\u0182\u0184\u1e02\u1e04\u1e06",
- // C
- "\u00c7\u0106\u0108\u010a\u010c\u0187\u1e08",
- // D
- "\u010e\u0110\u0189\u018a\u1e0a\u1e0c\u1e0e\u1e10\u1e12",
- // E
- "\u00C8\u00C9\u00CA\u00CB\u0112\u0114\u0116\u0118\u011A\u0204\u0206\u0228\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6",
- // F
- "\u1e1e",
- // G
- "\u011c\u011E\u0120\u0122\u01e4\u01e6\u01f4\u1e20",
- // H
- "\u0124\u0126\u021e\u1e22\u1e24\u1e26\u1e28\u1e2a",
- // I
- "\u00CC\u00CD\u00CE\u00CF\u0128\u012a\u012C\u012e\u0130\u0208\u020a\u1e2c\u1e2e\u1ec8\u1eca",
- // J
- "\u0134\u01f0",
- // K
- "\u0136\u0198\u01e8\u1e30\u1e32\u1e34",
- // L
- "\u0139\u013B\u013D\u013F\u0141\u1e36\u1e38\u1e3a\u1e3c",
- // M
- "\u1e3e\u1e40\u1e42",
- // N
- "\u00D1\u0143\u0145\u0147\u014A\u01F8\u1e44\u1e46\u1e48\u1e4a",
- // O
- "\u00D2\u00D3\u00D4\u00D5\u00D6\u014C\u014E\u0150\u01ea\u01ec\u020c\u020e\u022A\u022C\u022E\u0230\u1e4c\u1e4e\u1e50\u1e52\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2",
- // P
- "\u1e54\u1e56",
- // No Q
- // R
- "\u0154\u0156\u0158\u0210\u0212\u1e58\u1e5a\u1e5c\u1e5e",
- // S
- "\u015A\u015C\u015E\u0160\u0218\u1e60\u1e62\u1e64\u1e66\u1e68",
- // T
- "\u0162\u0164\u0166\u021A\u1e6a\u1e6c\u1e6e\u1e70",
- // U
- "\u00D9\u00DA\u00DB\u00DC\u0168\u016A\u016C\u016E\u0170\u0172\u0214\u0216\u1e72\u1e74\u1e76\u1e78\u1e7a\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0",
- // V
- "\u1e7c\u1e7e",
- // W
- "\u0174\u1e80\u1e82\u1e84\u1e86\u1e88",
- // X
- "\u1e8a\u1e8c",
- // Y
- "\u00DD\u0176\u0178\u0232\u1e8e\u1ef2\u1ef4\u1ef6\u1ef8",
- // Z
- "\u0179\u017B\u017D\u0224\u1e90\u1e92\u1e94"
-];
-
-const lower=[
- // a
- "\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u0101\u0103\u0105\u01ce\u01df\u01e1\u01fb\u0201\u0203\u0227\u1e01\u1e9a\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7",
- // b
- "\u0180\u0183\u0185\u1e03\u1e05\u1e07",
- // c
- "\u00e7\u0107\u0109\u010b\u010d\u0188\u1e09",
- // d
- "\u010f\u0111\u1e0b\u1e0d\u1e0f\u1e11\u1e13",
- // e
- "\u00e8\u00e9\u00ea\u00eb\u0113\u0115\u0117\u0119\u011b\u0205\u0207\u0229\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7",
- // f
- "\u1e1f",
- // g
- "\u011d\u011f\u0121\u0123\u01e5\u01e7\u01f5\u1e21",
- // h
- "\u0125\u0127\u021f\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e96",
- // i
- "\u00ec\u00ed\u00ee\u00ef\u0129\u012b\u012d\u012f\u0131\u01d0\u0209\u020b\u1e2d\u1e2f\u1ec9\u1ecb",
- // j
- "\u0135",
- // k
- "\u0137\u0138\u01e9\u1e31\u1e33\u1e35",
- // l
- "\u013a\u013c\u013e\u0140\u0142\u1e37\u1e39\u1e3b\u1e3d",
- // m
- "\u1e3f\u1e41\u1e43",
- // n
- "\u00f1\u0144\u0146\u0148\u0149\u014b\u01f9\u1e45\u1e47\u1e49\u1e4b",
- // o
- "\u00f2\u00f3\u00f4\u00f5\u00f6\u014d\u014f\u0151\u01d2\u01eb\u01ed\u020d\u020e\u022b\u022d\u022f\u0231\u1e4d\u1e4f\u1e51\u1e53\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3",
- // p
- "\u1e55\u1e57",
- // No q
- // r
- "\u0155\u0157\u0159\u0211\u0213\u1e59\u1e5b\u1e5d\u1e5f",
- // s
- "\u015b\u015d\u015f\u0161\u0219\u1e61\u1e63\u1e65\u1e67\u1e69",
- // t
- "\u0162\u0163\u0165\u0167\u021b\u1e6b\u1e6d\u1e6f\u1e71\u1e97",
- // u
- "\u00f9\u00fa\u00fb\u00fc\u0169\u016b\u016d\u016f\u0171\u0173\u01d4\u01d6\u01d8\u01da\u01dc\u0215\u0217\u1e73\u1e75\u1e77\u1e79\u1e7b\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1",
- // v
- "\u1e7d\u1e7f",
- // w
- "\u0175\u1e81\u1e83\u1e85\u1e87\u1e89\u1e98",
- // x
- "\u1e8b\u1e8d",
- // y
- "\u00fd\u00ff\u0177\u0233\u1e8f\u1e99\u1ef3\u1ef5\u1ef7\u1ef9",
- // z
- "\u017a\u017c\u017e\u0225\u1e91\u1e93\u1e95"
-];
-
-
-const symbol = "\u00a1\u00a2\u00a3\u00a4\u00a5\u20ac\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00d7\u00f7";
-
-const otherupper = "\u00c6\u00d0\u00d8\u00de\u0132\u0152\u0186\u01c4\u01c5\u01c7\u01c8\u01ca\u01cb\u01F1\u01f2";
-
-const otherlower = "\u00e6\u00f0\u00f8\u00fe\u00df\u0133\u0153\u01c6\u01c9\u01cc\u01f3";
diff --git a/editor/ui/dialogs/content/EdInsertChars.xul b/editor/ui/dialogs/content/EdInsertChars.xul
deleted file mode 100644
index 3a2836af6..000000000
--- a/editor/ui/dialogs/content/EdInsertChars.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertChars.dtd">
-
-<dialog id="insertCharsDlg" title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- onfocus = "onFocus()"
- buttonlabelaccept="&insertButton.label;"
- buttonlabelcancel="&closeButton.label;"
- ondialogaccept = "return onAccept();"
- ondialogcancel = "return onClose();"
- style = "width: 20em">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdInsertChars.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-
- <groupbox><caption label="&category.label;"/>
- <radiogroup id="CatGrp" persist="category letter_index char_index">
- <radio id="AccentUpper" label="&accentUpper.label;" oncommand="ChangeCategory(this.id)"/>
- <radio id="AccentLower" label="&accentLower.label;" oncommand="ChangeCategory(this.id)"/>
- <radio id="Upper" label="&otherUpper.label;" oncommand="ChangeCategory(this.id)"/>
- <radio id="Lower" label="&otherLower.label;" oncommand="ChangeCategory(this.id)"/>
- <radio id="Symbol" label="&commonSymbols.label;" oncommand="ChangeCategory(this.id)"/>
- </radiogroup>
- <spacer class="spacer"/>
- </groupbox>
- <hbox equalsize="always">
- <vbox flex="1">
- <!-- value is set in JS from editor.properties strings -->
- <label id="LatinL_Label" control="LatinL" value="&letter.label;" accesskey="&letter.accessKey;"/>
- <menulist class="larger" flex="1" id="LatinL" oncommand="SelectLatinLetter()">
- <menupopup/>
- </menulist>
- </vbox>
- <vbox flex="1">
- <label id="LatinM_Label" control="LatinM" value="&character.label;" accesskey="&character.accessKey;"/>
- <menulist class="larger" flex="1" id="LatinM" oncommand="SelectLatinModifier()">
- <menupopup/>
- </menulist>
- </vbox>
- </hbox>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInsertMath.js b/editor/ui/dialogs/content/EdInsertMath.js
deleted file mode 100644
index c8c10b158..000000000
--- a/editor/ui/dialogs/content/EdInsertMath.js
+++ /dev/null
@@ -1,314 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* Insert MathML dialog */
-
-var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor) {
- window.close();
- return;
- }
-
- // Create dialog object for easy access
- gDialog.accept = document.documentElement.getButton("accept");
- gDialog.mode = document.getElementById("optionMode");
- gDialog.direction = document.getElementById("optionDirection");
- gDialog.input = document.getElementById("input");
- gDialog.output = document.getElementById("output");
- gDialog.tabbox = document.getElementById("tabboxInsertLaTeXCommand");
-
- // Set initial focus
- gDialog.input.focus();
-
- // Load TeXZilla
- // TeXZilla.js contains non-ASCII characters and explicitly sets
- // window.TeXZilla, so we have to specify the charset parameter but don't
- // need to worry about the targetObj parameter.
- Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Components.interfaces.mozIJSSubScriptLoader)
- .loadSubScript("chrome://editor/content/TeXZilla.js", {}, "UTF-8");
-
- // Verify if the selection is on a <math> and initialize the dialog.
- gDialog.oldMath = editor.getElementOrParentByTagName("math", null);
- if (gDialog.oldMath) {
- // When these attributes are absent or invalid, they default to "inline" and "ltr" respectively.
- gDialog.mode.selectedIndex = gDialog.oldMath.getAttribute("display") == "block" ? 1 : 0;
- gDialog.direction.selectedIndex = gDialog.oldMath.getAttribute("dir") == "rtl" ? 1 : 0;
- gDialog.input.value = TeXZilla.getTeXSource(gDialog.oldMath);
- }
-
- // Create the tabbox with LaTeX commands.
- createCommandPanel({
- "√⅗²": ["{⋯}^{⋯}",
- "{⋯}_{⋯}",
- "{⋯}_{⋯}^{⋯}",
- "\\underset{⋯}{⋯}",
- "\\overset{⋯}{⋯}",
- "\\underoverset{⋯}{⋯}{⋯}",
- "\\left(⋯\\right)",
- "\\left[⋯\\right]",
- "\\frac{⋯}{⋯}",
- "\\binom{⋯}{⋯}",
- "\\sqrt{⋯}",
- "\\sqrt[⋯]{⋯}",
- "\\cos\\left({⋯}\\right)",
- "\\sin\\left({⋯}\\right)",
- "\\tan\\left({⋯}\\right)",
- "\\exp\\left({⋯}\\right)",
- "\\ln\\left({⋯}\\right)",
- "\\underbrace{⋯}",
- "\\underline{⋯}",
- "\\overbrace{⋯}",
- "\\widevec{⋯}",
- "\\widetilde{⋯}",
- "\\widehat{⋯}",
- "\\widecheck{⋯}",
- "\\widebar{⋯}",
- "\\dot{⋯}",
- "\\ddot{⋯}",
- "\\boxed{⋯}",
- "\\slash{⋯}"
- ],
- "(▦)": ["\\begin{matrix} ⋯ & ⋯ \\\\ ⋯ & ⋯ \\end{matrix}",
- "\\begin{pmatrix} ⋯ & ⋯ \\\\ ⋯ & ⋯ \\end{pmatrix}",
- "\\begin{bmatrix} ⋯ & ⋯ \\\\ ⋯ & ⋯ \\end{bmatrix}",
- "\\begin{Bmatrix} ⋯ & ⋯ \\\\ ⋯ & ⋯ \\end{Bmatrix}",
- "\\begin{vmatrix} ⋯ & ⋯ \\\\ ⋯ & ⋯ \\end{vmatrix}",
- "\\begin{Vmatrix} ⋯ & ⋯ \\\\ ⋯ & ⋯ \\end{Vmatrix}",
- "\\begin{cases} ⋯ \\\\ ⋯ \\end{cases}",
- "\\begin{aligned} ⋯ &= ⋯ \\\\ ⋯ &= ⋯ \\end{aligned}"
- ]
- });
- createSymbolPanels([
- "∏∐∑∫∬∭⨌∮⊎⊕⊖⊗⊘⊙⋀⋁⋂⋃⌈⌉⌊⌋⎰⎱⟨⟩⟪⟫∥⫼⨀⨁⨂⨄⨅⨆ðıȷℏℑℓ℘ℜℵℶ",
- "∀∃∄∅∉∊∋∌⊂⊃⊄⊅⊆⊇⊈⊈⊉⊊⊊⊋⊋⊏⊐⊑⊒⊓⊔⊥⋐⋑⋔⫅⫆⫋⫋⫌⫌…⋮⋯⋰⋱♭♮♯∂∇",
- "±×÷†‡•∓∔∗∘∝∠∡∢∧∨∴∵∼∽≁≃≅≇≈≈≊≍≎≏≐≑≒≓≖≗≜≡≢≬⊚⊛⊞⊡⊢⊣⊤⊥",
- "⊨⊩⊪⊫⊬⊭⊯⊲⊲⊳⊴⊵⊸⊻⋄⋅⋇⋈⋉⋊⋋⋌⋍⋎⋏⋒⋓⌅⌆⌣△▴▵▸▹▽▾▿◂◃◊○★♠♡♢♣⧫",
- "≦≧≨≩≩≪≫≮≯≰≱≲≳≶≷≺≻≼≽≾≿⊀⊁⋖⋗⋘⋙⋚⋛⋞⋟⋦⋧⋨⋩⩽⩾⪅⪆⪇⪈⪉⪊⪋⪌⪕⪯⪰⪷⪸⪹⪺",
- "←↑→↓↔↕↖↗↘↙↜↝↞↠↢↣↦↩↪↫↬↭↭↰↱↼↽↾↿⇀⇁⇂⇃⇄⇆⇇⇈⇉⇊⇋⇌⇐⇑⇒⇓⇕⇖⇗⇘⇙⟺",
- "αβγδϵ϶εζηθϑικϰλμνξℴπϖρϱσςτυϕφχψωΓΔΘΛΞΠΣϒΦΨΩϝ℧",
- "𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ",
- "𝒶𝒷𝒸𝒹ℯ𝒻ℊ𝒽𝒾𝒿𝓀𝓁𝓂𝓃ℴ𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵",
- "𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ"
- ]);
- gDialog.tabbox.selectedIndex = 0;
-
- updateMath();
-
- SetWindowLocation();
-}
-
-function insertLaTeXCommand(aButton)
-{
- gDialog.input.focus();
-
- // For a single math symbol, just use the insertText command.
- if (aButton.label) {
- gDialog.input.editor.QueryInterface(Components.interfaces.nsIPlaintextEditor).insertText(aButton.label);
- return;
- }
-
- // Otherwise, it's a LaTeX command with at least one argument...
- var latex = TeXZilla.getTeXSource(aButton.firstChild);
- var selectionStart = gDialog.input.selectionStart;
- var selectionEnd = gDialog.input.selectionEnd;
-
- // If the selection is not empty, we replace the first argument of the LaTeX
- // command with the current selection.
- var selection = gDialog.input.value.substring(selectionStart, selectionEnd);
- if (selection != "") {
- latex = latex.replace("⋯", selection);
- }
-
- // Try and move to the next position.
- var latexNewStart = latex.indexOf("⋯"), latexNewEnd;
- if (latexNewStart == -1) {
- // This is a unary function and the selection was used as an argument above.
- // We select the expression again so that one can choose to apply further
- // command to it or just move the caret after that text.
- latexNewStart = 0;
- latexNewEnd = latex.length;
- } else {
- // Otherwise, select the dots representing the next argument.
- latexNewEnd = latexNewStart + 1;
- }
-
- // Update the input text and selection.
- gDialog.input.editor.QueryInterface(Components.interfaces.nsIPlaintextEditor).insertText(latex);
- gDialog.input.setSelectionRange(selectionStart + latexNewStart,
- selectionStart + latexNewEnd);
-
- updateMath();
-}
-
-function createCommandPanel(aCommandPanelList)
-{
- const columnCount = 10;
-
- for (var label in aCommandPanelList) {
-
- var commands = aCommandPanelList[label];
-
- // Create a <rows> element with some LaTeX commands.
- var rows = document.createElementNS(XULNS, "rows");
-
- var i = 0, row;
- for (var command of commands) {
- if (i % columnCount == 0) {
- // Create a new row.
- row = document.createElementNS(XULNS, "row");
- rows.appendChild(row);
- }
-
- // Create a new button to insert the symbol.
- var button = document.createElementNS(XULNS, "toolbarbutton");
- button.setAttribute("class", "tabbable");
- button.appendChild(TeXZilla.toMathML(command));
- row.appendChild(button);
-
- i++;
- }
-
- // Create a <columns> element with the desired number of columns.
- var columns = document.createElementNS(XULNS, "columns");
- for (i = 0; i < columnCount; i++) {
- var column = document.createElementNS(XULNS, "column");
- column.setAttribute("flex", "1");
- columns.appendChild(column);
- }
-
- // Create the <grid> element with the <rows> and <columns> children.
- var grid = document.createElementNS(XULNS, "grid");
- grid.appendChild(columns);
- grid.appendChild(rows);
-
- // Create a new <tab> element.
- var tab = document.createElementNS(XULNS, "tab");
- tab.setAttribute("label", label);
- gDialog.tabbox.tabs.appendChild(tab);
-
- // Append the new tab panel.
- gDialog.tabbox.tabpanels.appendChild(grid);
- }
-}
-
-function createSymbolPanels(aSymbolPanelList)
-{
- const columnCount = 13, tabLabelLength = 3
-
- for (var symbols of aSymbolPanelList) {
-
- // Create a <rows> element with the symbols of the i-th panel.
- var rows = document.createElementNS(XULNS, "rows");
- var i = 0, tabLabel = "", row;
- for (var symbol of symbols) {
- if (i % columnCount == 0) {
- // Create a new row.
- row = document.createElementNS(XULNS, "row");
- rows.appendChild(row);
- }
-
- // Build the tab label from the first symbols of this tab.
- if (i < tabLabelLength) {
- tabLabel += symbol;
- }
-
- // Create a new button to insert the symbol.
- var button = document.createElementNS(XULNS, "toolbarbutton");
- button.setAttribute("label", symbol);
- button.setAttribute("class", "tabbable");
- row.appendChild(button);
-
- i++;
- }
-
- // Create a <columns> element with the desired number of columns.
- var columns = document.createElementNS(XULNS, "columns");
- for (i = 0; i < columnCount; i++) {
- var column = document.createElementNS(XULNS, "column");
- column.setAttribute("flex", "1");
- columns.appendChild(column);
- }
-
- // Create the <grid> element with the <rows> and <columns> children.
- var grid = document.createElementNS(XULNS, "grid");
- grid.appendChild(columns);
- grid.appendChild(rows);
-
- // Create a new <tab> element with the label determined above.
- var tab = document.createElementNS(XULNS, "tab");
- tab.setAttribute("label", tabLabel);
- gDialog.tabbox.tabs.appendChild(tab);
-
- // Append the new tab panel.
- gDialog.tabbox.tabpanels.appendChild(grid);
- }
-}
-
-function onAccept()
-{
- if (gDialog.output.firstChild)
- {
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- try {
- var newMath = editor.document.importNode(gDialog.output.firstChild, true);
- if (gDialog.oldMath) {
- // Replace the old <math> element with the new one.
- editor.selectElement(gDialog.oldMath);
- editor.insertElementAtSelection(newMath, true);
- } else {
- // Insert the new <math> element.
- editor.insertElementAtSelection(newMath, false);
- }
- } catch (e) {}
-
- editor.endTransaction();
- }
- else
- {
- dump("Null value -- not inserting in MathML Source dialog\n");
- return false;
- }
- SaveWindowLocation();
-
- return true;
-}
-
-function updateMath()
-{
- // Remove the preview, if any.
- if (gDialog.output.firstChild)
- gDialog.output.firstChild.remove();
-
- // Try to convert the LaTeX source into MathML using TeXZilla.
- // We use the placeholder text if no input is provided.
- try {
- var input = gDialog.input.value || gDialog.input.placeholder;
- var newMath = TeXZilla.toMathML(input, gDialog.mode.selectedIndex, gDialog.direction.selectedIndex, true);
- gDialog.output.appendChild(document.importNode(newMath, true));
- gDialog.output.style.opacity = gDialog.input.value ? 1 : .5;
- } catch (e) {
- }
- // Disable the accept button if parsing fails or when the placeholder is used.
- gDialog.accept.disabled = !gDialog.input.value || !gDialog.output.firstChild;
-}
-
-function updateMode()
-{
- if (gDialog.output.firstChild)
- gDialog.output.firstChild.setAttribute("display", gDialog.mode.selectedIndex ? "block" : "inline");
-}
-
-function updateDirection()
-{
- if (gDialog.output.firstChild)
- gDialog.output.firstChild.setAttribute("dir", gDialog.direction.selectedIndex ? "rtl" : "ltr");
-}
diff --git a/editor/ui/dialogs/content/EdInsertMath.xul b/editor/ui/dialogs/content/EdInsertMath.xul
deleted file mode 100644
index 93ae0e4bc..000000000
--- a/editor/ui/dialogs/content/EdInsertMath.xul
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertMath.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttonlabelaccept="&insertButton.label;"
- buttonaccesskeyaccept="&insertButton.accesskey;"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript"
- src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript"
- src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript"
- src="chrome://editor/content/EdInsertMath.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-
- <label id="srcMessage" value="&sourceEditField.label;"/>
- <textbox id="input" rows="5" multiline="true" oninput="updateMath();"
- placeholder="\sqrt{x_1} + \frac{π^3}{2}"/>
- <vbox flex="1" style="overflow: auto; width: 30em; height: 5em;">
- <description id="output"/>
- </vbox>
- <tabbox id="tabboxInsertLaTeXCommand">
- <tabs/>
- <tabpanels oncommand="insertLaTeXCommand(event.target);"/>
- </tabbox>
- <spacer class="spacer"/>
- <groupbox>
- <caption label="&options.label;"/>
- <hbox>
- <radiogroup id="optionMode" oncommand="updateMode();">
- <radio label="&optionInline.label;"
- accesskey="&optionInline.accesskey;"/>
- <radio label="&optionDisplay.label;"
- accesskey="&optionDisplay.accesskey;"/>
- </radiogroup>
- <radiogroup id="optionDirection" oncommand="updateDirection();">
- <radio label="&optionLTR.label;"
- accesskey="&optionLTR.accesskey;"/>
- <radio label="&optionRTL.label;"
- accesskey="&optionRTL.accesskey;"/>
- </radiogroup>
- </hbox>
- </groupbox>
- <spacer class="spacer"/>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInsertTOC.js b/editor/ui/dialogs/content/EdInsertTOC.js
deleted file mode 100644
index 21b307135..000000000
--- a/editor/ui/dialogs/content/EdInsertTOC.js
+++ /dev/null
@@ -1,378 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// tocHeadersArray is the array containing the pairs tag/class
-// defining TOC entries
-var tocHeadersArray = new Array(6);
-
-// a global used when building the TOC
-var currentHeaderLevel = 0;
-
-// a global set to true if the TOC is to be readonly
-var readonly = false;
-
-// a global set to true if user wants indexes in the TOC
-var orderedList = true;
-
-// constants
-const kMozToc = "mozToc";
-const kMozTocLength = 6;
-const kMozTocIdPrefix = "mozTocId";
-const kMozTocIdPrefixLength = 8;
-const kMozTocClassPrefix = "mozToc";
-const kMozTocClassPrefixLength = 6;
-
-// Startup() is called when EdInsertTOC.xul is opened
-function Startup()
-{
- // early way out if if we have no editor
- if (!GetCurrentEditor()) {
- window.close();
- return;
- }
-
- var i, j;
- // clean the table of tag/class pairs we look for
- for (i = 0; i < 6; ++i)
- tocHeadersArray[i] = [ "", "" ];
-
- // reset all settings
- for (i = 1; i < 7; ++i) {
- var menulist = document.getElementById("header" + i + "Menulist");
- var menuitem = document.getElementById("header" + i + "none");
- var textbox = document.getElementById("header" + i + "Class");
- menulist.selectedItem = menuitem;
- textbox.setAttribute("disabled", "true");
- }
-
- var theDocument = GetCurrentEditor().document;
-
- // do we already have a TOC in the document ? It should have "mozToc" ID
- var toc = theDocument.getElementById(kMozToc);
-
- // default TOC definition, use h1-h6 for TOC entry levels 1-6
- var headers = "h1 1 h2 2 h3 3 h4 4 h5 5 h6 6";
-
- var orderedListCheckbox = document.getElementById("orderedListCheckbox");
- orderedListCheckbox.checked = true;
-
- if (toc) {
- // man, there is already a TOC here
-
- if (toc.getAttribute("class") == "readonly") {
- // and it's readonly
- var checkbox = document.getElementById("readOnlyCheckbox");
- checkbox.checked = true;
- readonly = true;
- }
-
- // let's see if it's an OL or an UL
- orderedList = (toc.nodeName.toLowerCase() == "ol");
- orderedListCheckbox.checked = orderedList;
-
- var nodeList = toc.childNodes;
- // let's look at the children of the TOC ; if we find a comment beginning
- // with "mozToc", it contains the TOC definition
- for (i = 0; i< nodeList.length; ++i) {
- if (nodeList.item(i).nodeType == Node.COMMENT_NODE &&
- nodeList.item(i).data.startsWith(kMozToc)) {
- // yep, there is already a definition here; parse it !
- headers = nodeList.item(i).data.substr(kMozTocLength + 1,
- nodeList.item(i).length - kMozTocLength - 1);
- break;
- }
- }
- }
-
- // let's get an array filled with the (tag.class, index level) pairs
- var headersArray = headers.split(" ");
-
- for (i = 0; i < headersArray.length; i += 2) {
- var tag = headersArray[i], className = "";
- var index = headersArray[i + 1];
- menulist = document.getElementById("header" + index + "Menulist");
- if (menulist) {
- var sep = tag.indexOf(".");
- if (sep != -1) {
- // the tag variable contains in fact "tag.className", let's parse
- // the class and get the real tag name
- var tmp = tag.substr(0, sep);
- className = tag.substr(sep + 1, tag.length - sep - 1);
- tag = tmp;
- }
-
- // update the dialog
- menuitem = document.getElementById("header" + index +
- tag.toUpperCase());
- textbox = document.getElementById("header" + index + "Class");
- menulist.selectedItem = menuitem;
- if (tag != "") {
- textbox.removeAttribute("disabled");
- }
- if (className != "") {
- textbox.value = className;
- }
- tocHeadersArray[index - 1] = [ tag, className ];
- }
- }
-}
-
-
-function BuildTOC(update)
-{
- // controlClass() is a node filter that accepts a node if
- // (a) we don't look for a class (b) we look for a class and
- // node has it
- function controlClass(node, index)
- {
- currentHeaderLevel = index + 1;
- if (tocHeadersArray[index][1] == "") {
- // we are not looking for a specific class, this node is ok
- return NodeFilter.FILTER_ACCEPT;
- }
- if (node.getAttribute("class")) {
- // yep, we look for a class, let's look at all the classes
- // the node has
- var classArray = node.getAttribute("class").split(" ");
- for (var j = 0; j < classArray.length; j++) {
- if (classArray[j] == tocHeadersArray[index][1]) {
- // hehe, we found it...
- return NodeFilter.FILTER_ACCEPT;
- }
- }
- }
- return NodeFilter.FILTER_SKIP;
- }
-
- // the main node filter for our node iterator
- // it selects the tag names as specified in the dialog
- // then calls the controlClass filter above
- function acceptNode(node)
- {
- switch (node.nodeName.toLowerCase())
- {
- case tocHeadersArray[0][0]:
- return controlClass(node, 0);
- break;
- case tocHeadersArray[1][0]:
- return controlClass(node, 1);
- break;
- case tocHeadersArray[2][0]:
- return controlClass(node, 2);
- break;
- case tocHeadersArray[3][0]:
- return controlClass(node, 3);
- break;
- case tocHeadersArray[4][0]:
- return controlClass(node, 4);
- break;
- case tocHeadersArray[5][0]:
- return controlClass(node, 5);
- break;
- default:
- return NodeFilter.FILTER_SKIP;
- break;
- }
- return NodeFilter.FILTER_SKIP; // placate the js compiler
- }
-
- var editor = GetCurrentEditor();
- var theDocument = editor.document;
- // let's create a TreeWalker to look for our nodes
- var treeWalker = theDocument.createTreeWalker(theDocument.documentElement,
- NodeFilter.SHOW_ELEMENT,
- acceptNode,
- true);
- // we need an array to store all TOC entries we find in the document
- var tocArray = new Array();
- if (treeWalker) {
- var tocSourceNode = treeWalker.nextNode();
- while (tocSourceNode) {
- var headerIndex = currentHeaderLevel;
-
- // we have a node, we need to get all its textual contents
- var textTreeWalker = theDocument.createTreeWalker(tocSourceNode,
- NodeFilter.SHOW_TEXT,
- null,
- true);
- var textNode = textTreeWalker.nextNode(), headerText = "";
- while (textNode) {
- headerText += textNode.data;
- textNode = textTreeWalker.nextNode();
- }
-
- var anchor = tocSourceNode.firstChild, id;
- // do we have a named anchor as 1st child of our node ?
- if (anchor.nodeName.toLowerCase() == "a" &&
- anchor.hasAttribute("name") &&
- anchor.getAttribute("name").startsWith(kMozTocIdPrefix)) {
- // yep, get its name
- id = anchor.getAttribute("name");
- }
- else {
- // no we don't and we need to create one
- anchor = theDocument.createElement("a");
- tocSourceNode.insertBefore(anchor, tocSourceNode.firstChild);
- // let's give it a random ID
- var c = 1000000 * Math.random();
- id = kMozTocIdPrefix + Math.round(c);
- anchor.setAttribute("name", id);
- anchor.setAttribute("class", kMozTocClassPrefix +
- tocSourceNode.nodeName.toUpperCase());
- }
- // and store that new entry in our array
- tocArray.push(headerIndex, headerText, id);
- tocSourceNode = treeWalker.nextNode();
- }
- }
-
- /* generate the TOC itself */
- headerIndex = 0;
- var item, toc;
- for (var i = 0; i < tocArray.length; i += 3) {
- if (!headerIndex) {
- // do we need to create an ol/ul container for the first entry ?
- ++headerIndex;
- toc = theDocument.getElementById(kMozToc);
- if (!toc || !update) {
- // we need to create a list container for the table of contents
- toc = GetCurrentEditor().createElementWithDefaults(orderedList ? "ol" : "ul");
- // grrr, we need to create a LI inside the list otherwise
- // Composer will refuse an empty list and will remove it !
- var pit = theDocument.createElement("li");
- toc.appendChild(pit);
- GetCurrentEditor().insertElementAtSelection(toc, true);
- // ah, now it's inserted so let's remove the useless list item...
- toc.removeChild(pit);
- // we need to recognize later that this list is our TOC
- toc.setAttribute("id", kMozToc);
- }
- else {
- // we have to update an existing TOC, is the existing TOC of the
- // desired type (ordered or not) ?
- if (orderedList != (toc.nodeName.toLowerCase() == "ol")) {
- // nope, we have to recreate the list
- var newToc = GetCurrentEditor().createElementWithDefaults(orderedList ? "ol" : "ul");
- toc.parentNode.insertBefore(newToc, toc);
- // and remove the old one
- toc.remove();
- toc = newToc;
- toc.setAttribute("id", kMozToc);
- }
- else {
- // we can keep the list itself but let's get rid of the TOC entries
- while (toc.hasChildNodes())
- toc.lastChild.remove();
- }
- }
- var commentText = "mozToc ";
- for (var j = 0; j < 6; j++) {
- if (tocHeadersArray[j][0] != "") {
- commentText += tocHeadersArray[j][0];
- if (tocHeadersArray[j][1] != "") {
- commentText += "." + tocHeadersArray[j][1];
- }
- commentText += " " + (j + 1) + " ";
- }
- }
- // important, we have to remove trailing spaces
- commentText = TrimStringRight(commentText);
-
- // forge a comment we'll insert in the TOC ; that comment will hold
- // the TOC definition for us
- var ct = theDocument.createComment(commentText);
- toc.appendChild(ct);
-
- // assign a special class to the TOC top element if the TOC is readonly
- // the definition of this class is in EditorOverride.css
- if (readonly) {
- toc.setAttribute("class", "readonly");
- }
- else {
- toc.removeAttribute("class");
- }
-
- // We need a new variable to hold the local ul/ol container
- // The toplevel TOC element is not the parent element of a
- // TOC entry if its depth is > 1...
- var tocList = toc;
- // create a list item
- var tocItem = theDocument.createElement("li");
- // and an anchor in this list item
- var tocAnchor = theDocument.createElement("a");
- // make it target the source of the TOC entry
- tocAnchor.setAttribute("href", "#" + tocArray[i + 2]);
- // and put the textual contents of the TOC entry in that anchor
- var tocEntry = theDocument.createTextNode(tocArray[i + 1]);
- // now, insert everything where it has to be inserted
- tocAnchor.appendChild(tocEntry);
- tocItem.appendChild(tocAnchor);
- tocList.appendChild(tocItem);
- item = tocList;
- }
- else {
- if (tocArray[i] < headerIndex) {
- // if the depth of the new TOC entry is less than the depth of the
- // last entry we created, find the good ul/ol ancestor
- for (j = headerIndex - tocArray[i]; j > 0; --j) {
- if (item != toc) {
- item = item.parentNode.parentNode;
- }
- }
- tocItem = theDocument.createElement("li");
- }
- else if (tocArray[i] > headerIndex) {
- // to the contrary, it's deeper than the last one
- // we need to create sub ul/ol's and li's
- for (j = tocArray[i] - headerIndex; j > 0; --j) {
- tocList = theDocument.createElement(orderedList ? "ol" : "ul");
- item.lastChild.appendChild(tocList);
- tocItem = theDocument.createElement("li");
- tocList.appendChild(tocItem);
- item = tocList;
- }
- }
- else {
- tocItem = theDocument.createElement("li");
- }
- tocAnchor = theDocument.createElement("a");
- tocAnchor.setAttribute("href", "#" + tocArray[i + 2]);
- tocEntry = theDocument.createTextNode(tocArray[i + 1]);
- tocAnchor.appendChild(tocEntry);
- tocItem.appendChild(tocAnchor);
- item.appendChild(tocItem);
- headerIndex = tocArray[i];
- }
- }
- SaveWindowLocation();
- return true;
-}
-
-function selectHeader(elt, index)
-{
- var tag = elt.value;
- tocHeadersArray[index - 1][0] = tag;
- var textbox = document.getElementById("header" + index + "Class");
- if (tag == "") {
- textbox.setAttribute("disabled", "true");
- }
- else {
- textbox.removeAttribute("disabled");
- }
-}
-
-function changeClass(elt, index)
-{
- tocHeadersArray[index - 1][1] = elt.value;
-}
-
-function ToggleReadOnlyToc(elt)
-{
- readonly = elt.checked;
-}
-
-function ToggleOrderedList(elt)
-{
- orderedList = elt.checked;
-}
diff --git a/editor/ui/dialogs/content/EdInsertTOC.xul b/editor/ui/dialogs/content/EdInsertTOC.xul
deleted file mode 100644
index b4d5697a3..000000000
--- a/editor/ui/dialogs/content/EdInsertTOC.xul
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertTOC.dtd">
-
-<dialog title="&Window.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- onload="Startup();"
- ondialogaccept="return BuildTOC(true);"
- oncancel="window.close(); return true;">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
-
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdInsertTOC.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <spacer id="dummy" style="display:none"/>
- <broadcaster id="args" value=""/>
- <vbox flex="1">
- <groupbox><caption label="&buildToc.label;"/>
- <grid>
- <columns><column/><column style="min-width: 6em"/><column/></columns>
- <rows>
- <row align="center">
- <spacer/>
- <label value="&tag.label;"/>
- <label value="&class.label;"/>
- </row>
- <row align="center">
- <label value="&header1.label;"/>
- <menulist id="header1Menulist">
- <menupopup>
- <menuitem id="header1none" label="--" value=""
- oncommand="selectHeader(this, 1)"/>
- <menuseparator/>
- <menuitem id="header1H1" label="h1" value="h1"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1H2" label="h2" value="h2"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1H3" label="h3" value="h3"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1H4" label="h4" value="h4"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1H5" label="h5" value="h5"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1H6" label="h6" value="h6"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1DIV" label="div" value="div"
- oncommand="selectHeader(this, 1)"/>
- <menuitem id="header1P" label="p" value="p"
- oncommand="selectHeader(this, 1)"/>
- </menupopup>
- </menulist>
- <textbox id="header1Class" size="10"
- oninput="changeClass(this, 1)"/>
- </row>
-
- <row align="center">
- <label value="&header2.label;"/>
- <menulist id="header2Menulist">
- <menupopup>
- <menuitem id="header2none" label="--" value=""
- oncommand="selectHeader(this, 2)"/>
- <menuseparator/>
- <menuitem id="header2H1" label="h1" value="h1"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2H2" label="h2" value="h2"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2H3" label="h3" value="h3"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2H4" label="h4" value="h4"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2H5" label="h5" value="h5"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2H6" label="h6" value="h6"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2DIV" label="div" value="div"
- oncommand="selectHeader(this, 2)"/>
- <menuitem id="header2P" label="p" value="p"
- oncommand="selectHeader(this, 2)"/>
- </menupopup>
- </menulist>
- <textbox id="header2Class" size="10"
- oninput="changeClass(this, 2)"/>
- </row>
-
- <row align="center">
- <label value="&header3.label;"/>
- <menulist id="header3Menulist">
- <menupopup>
- <menuitem id="header3none" label="--" value=""
- oncommand="selectHeader(this, 3)"/>
- <menuseparator/>
- <menuitem id="header3H1" label="h1" value="h1"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3H2" label="h2" value="h2"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3H3" label="h3" value="h3"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3H4" label="h4" value="h4"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3H5" label="h5" value="h5"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3H6" label="h6" value="h6"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3DIV" label="div" value="div"
- oncommand="selectHeader(this, 3)"/>
- <menuitem id="header3P" label="p" value="p"
- oncommand="selectHeader(this, 3)"/>
- </menupopup>
- </menulist>
- <textbox id="header3Class" size="10"
- oninput="changeClass(this, 3)"/>
- </row>
-
- <row align="center">
- <label value="&header4.label;"/>
- <menulist id="header4Menulist">
- <menupopup>
- <menuitem id="header4none" label="--" value=""
- oncommand="selectHeader(this, 4)"/>
- <menuseparator/>
- <menuitem id="header4H1" label="h1" value="h1"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4H2" label="h2" value="h2"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4H3" label="h3" value="h3"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4H4" label="h4" value="h4"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4H5" label="h5" value="h5"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4H6" label="h6" value="h6"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4DIV" label="div" value="div"
- oncommand="selectHeader(this, 4)"/>
- <menuitem id="header4P" label="p" value="p"
- oncommand="selectHeader(this, 4)"/>
- </menupopup>
- </menulist>
- <textbox id="header4Class" size="10"
- oninput="changeClass(this, 4)"/>
- </row>
-
- <row align="center">
- <label value="&header5.label;"/>
- <menulist id="header5Menulist">
- <menupopup>
- <menuitem id="header5none" label="--" value=""
- oncommand="selectHeader(this, 5)"/>
- <menuseparator/>
- <menuitem id="header5H1" label="h1" value="h1"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5H2" label="h2" value="h2"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5H3" label="h3" value="h3"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5H4" label="h4" value="h4"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5H5" label="h5" value="h5"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5H6" label="h6" value="h6"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5DIV" label="div" value="div"
- oncommand="selectHeader(this, 5)"/>
- <menuitem id="header5P" label="p" value="p"
- oncommand="selectHeader(this, 5)"/>
- </menupopup>
- </menulist>
- <textbox id="header5Class" size="10"
- oninput="changeClass(this, 5)"/>
- </row>
-
- <row align="center">
- <label value="&header6.label;"/>
- <menulist id="header6Menulist">
- <menupopup>
- <menuitem id="header6none" label="--" value=""
- oncommand="selectHeader(this, 6)"/>
- <menuseparator/>
- <menuitem id="header6H1" label="h1" value="h1"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6H2" label="h2" value="h2"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6H3" label="h3" value="h3"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6H4" label="h4" value="h4"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6H5" label="h5" value="h5"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6H6" label="h6" value="h6"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6DIV" label="div" value="div"
- oncommand="selectHeader(this, 6)"/>
- <menuitem id="header6P" label="p" value="p"
- oncommand="selectHeader(this, 6)"/>
- </menupopup>
- </menulist>
- <textbox id="header6Class" size="10"
- oninput="changeClass(this, 6)"/>
- </row>
- </rows>
- </grid>
- </groupbox>
- <vbox>
- <checkbox id="orderedListCheckbox"
- label="&orderedList.label;"
- oncommand="ToggleOrderedList(this)"/>
- <checkbox id="readOnlyCheckbox"
- label="&makeReadOnly.label;"
- oncommand="ToggleReadOnlyToc(this)"/>
- </vbox>
- <separator class="groove"/>
- </vbox>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdInsertTable.js b/editor/ui/dialogs/content/EdInsertTable.js
deleted file mode 100644
index fbbad4cc5..000000000
--- a/editor/ui/dialogs/content/EdInsertTable.js
+++ /dev/null
@@ -1,220 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-//Cancel() is in EdDialogCommon.js
-
-var gTableElement = null;
-var gRows;
-var gColumns;
-var gActiveEditor;
-
-// dialog initialization code
-function Startup()
-{
- gActiveEditor = GetCurrentTableEditor();
- if (!gActiveEditor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- try {
- gTableElement = gActiveEditor.createElementWithDefaults("table");
- } catch (e) {}
-
- if(!gTableElement)
- {
- dump("Failed to create a new table!\n");
- window.close();
- return;
- }
- gDialog.rowsInput = document.getElementById("rowsInput");
- gDialog.columnsInput = document.getElementById("columnsInput");
- gDialog.widthInput = document.getElementById("widthInput");
- gDialog.borderInput = document.getElementById("borderInput");
- gDialog.widthPixelOrPercentMenulist = document.getElementById("widthPixelOrPercentMenulist");
- gDialog.OkButton = document.documentElement.getButton("accept");
-
- // Make a copy to use for AdvancedEdit
- globalElement = gTableElement.cloneNode(false);
- try {
- if (Services.prefs.getBoolPref("editor.use_css") && IsHTMLEditor()
- && !(gActiveEditor.flags & Components.interfaces.nsIPlaintextEditor.eEditorMailMask))
- {
- // only for Composer and not for htmlmail
- globalElement.setAttribute("style", "text-align: left;");
- }
- } catch (e) {}
-
- // Initialize all widgets with image attributes
- InitDialog();
-
- // Set initial number to 2 rows, 2 columns:
- // Note, these are not attributes on the table,
- // so don't put them in InitDialog(),
- // else the user's values will be trashed when they use
- // the Advanced Edit dialog
- gDialog.rowsInput.value = 2;
- gDialog.columnsInput.value = 2;
-
- // If no default value on the width, set to 100%
- if (gDialog.widthInput.value.length == 0)
- {
- gDialog.widthInput.value = "100";
- gDialog.widthPixelOrPercentMenulist.selectedIndex = 1;
- }
-
- SetTextboxFocusById("rowsInput");
-
- SetWindowLocation();
-}
-
-// Set dialog widgets with attribute data
-// We get them from globalElement copy so this can be used
-// by AdvancedEdit(), which is shared by all property dialogs
-function InitDialog()
-{
- // Get default attributes set on the created table:
- // Get the width attribute of the element, stripping out "%"
- // This sets contents of menu combobox list
- // 2nd param = null: Use current selection to find if parent is table cell or window
- gDialog.widthInput.value = InitPixelOrPercentMenulist(globalElement, null, "width", "widthPixelOrPercentMenulist", gPercent);
- gDialog.borderInput.value = globalElement.getAttribute("border");
-}
-
-function ChangeRowOrColumn(id)
-{
- // Allow only integers
- forceInteger(id);
-
- // Enable OK only if both rows and columns have a value > 0
- var enable = gDialog.rowsInput.value.length > 0 &&
- gDialog.rowsInput.value > 0 &&
- gDialog.columnsInput.value.length > 0 &&
- gDialog.columnsInput.value > 0;
-
- SetElementEnabled(gDialog.OkButton, enable);
- SetElementEnabledById("AdvancedEditButton1", enable);
-}
-
-
-// Get and validate data from widgets.
-// Set attributes on globalElement so they can be accessed by AdvancedEdit()
-function ValidateData()
-{
- gRows = ValidateNumber(gDialog.rowsInput, null, 1, gMaxRows, null, null, true)
- if (gValidationError)
- return false;
-
- gColumns = ValidateNumber(gDialog.columnsInput, null, 1, gMaxColumns, null, null, true)
- if (gValidationError)
- return false;
-
- // Set attributes: NOTE: These may be empty strings (last param = false)
- ValidateNumber(gDialog.borderInput, null, 0, gMaxPixels, globalElement, "border", false);
- // TODO: Deal with "BORDER" without value issue
- if (gValidationError) return false;
-
- ValidateNumber(gDialog.widthInput, gDialog.widthPixelOrPercentMenulist,
- 1, gMaxTableSize, globalElement, "width", false);
- if (gValidationError)
- return false;
-
- return true;
-}
-
-
-function onAccept()
-{
- if (ValidateData())
- {
- gActiveEditor.beginTransaction();
- try {
- gActiveEditor.cloneAttributes(gTableElement, globalElement);
-
- // Create necessary rows and cells for the table
- var tableBody = gActiveEditor.createElementWithDefaults("tbody");
- if (tableBody)
- {
- gTableElement.appendChild(tableBody);
-
- // Create necessary rows and cells for the table
- for (var i = 0; i < gRows; i++)
- {
- var newRow = gActiveEditor.createElementWithDefaults("tr");
- if (newRow)
- {
- tableBody.appendChild(newRow);
- for (var j = 0; j < gColumns; j++)
- {
- var newCell = gActiveEditor.createElementWithDefaults("td");
- if (newCell)
- {
- newRow.appendChild(newCell);
- }
- }
- }
- }
- }
- // Detect when entire cells are selected:
- // Get number of cells selected
- var tagNameObj = { value: "" };
- var countObj = { value: 0 };
- var element = gActiveEditor.getSelectedOrParentTableElement(tagNameObj, countObj);
- var deletePlaceholder = false;
-
- if (tagNameObj.value == "table")
- {
- //Replace entire selected table with new table, so delete the table
- gActiveEditor.deleteTable();
- }
- else if (tagNameObj.value == "td")
- {
- if (countObj.value >= 1)
- {
- if (countObj.value > 1)
- {
- // Assume user wants to replace a block of
- // contiguous cells with a table, so
- // join the selected cells
- gActiveEditor.joinTableCells(false);
-
- // Get the cell everything was merged into
- element = gActiveEditor.getFirstSelectedCell();
-
- // Collapse selection into just that cell
- gActiveEditor.selection.collapse(element,0);
- }
-
- if (element)
- {
- // Empty just the contents of the cell
- gActiveEditor.deleteTableCellContents();
-
- // Collapse selection to start of empty cell...
- gActiveEditor.selection.collapse(element,0);
- // ...but it will contain a <br> placeholder
- deletePlaceholder = true;
- }
- }
- }
-
- // true means delete selection when inserting
- gActiveEditor.insertElementAtSelection(gTableElement, true);
-
- if (deletePlaceholder && gTableElement && gTableElement.nextSibling)
- {
- // Delete the placeholder <br>
- gActiveEditor.deleteNode(gTableElement.nextSibling);
- }
- } catch (e) {}
-
- gActiveEditor.endTransaction();
-
- SaveWindowLocation();
- return true;
- }
- return false;
-}
diff --git a/editor/ui/dialogs/content/EdInsertTable.xul b/editor/ui/dialogs/content/EdInsertTable.xul
deleted file mode 100644
index a360cd19e..000000000
--- a/editor/ui/dialogs/content/EdInsertTable.xul
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorInsertTable.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdInsertTable.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
- <groupbox><caption label="&size.label;"/>
- <grid>
- <columns>
- <column flex="1"/>
- <column flex="1"/>
- <column flex="6"/>
- </columns>
- <rows>
- <row align="center">
- <label control="rowsInput" class="align-right"
- value="&numRowsEditField.label;"
- accesskey="&numRowsEditField.accessKey;"/>
- <textbox class="narrow" id="rowsInput" oninput="ChangeRowOrColumn(this.id)" />
- <spacer/>
- </row>
- <row align="center">
- <label control="columnsInput" class="align-right"
- value="&numColumnsEditField.label;"
- accesskey="&numColumnsEditField.accessKey;"/>
- <textbox class="narrow" id="columnsInput" oninput="ChangeRowOrColumn(this.id)" />
- <spacer/>
- </row>
- <row align="center">
- <label control="widthInput" class="align-right"
- value="&widthEditField.label;"
- accesskey="&widthEditField.accessKey;"/>
- <textbox class="narrow" id="widthInput" oninput="forceInteger(this.id)" />
- <menulist id="widthPixelOrPercentMenulist" flex="1"/>
- <!-- child elements are appended by JS -->
- </row>
- </rows>
- </grid>
- <spacer class="spacer"/>
- </groupbox>
- <spacer class="spacer"/>
- <hbox align="center">
- <label control="borderInput" class="align-right"
- value="&borderEditField.label;"
- accesskey="&borderEditField.accessKey;"
- tooltiptext="&borderEditField.tooltip;" />
- <textbox class="narrow" id="borderInput" oninput="forceInteger(this.id)" />
- <label value="&pixels.label;"/>
- </hbox>
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdLabelProps.js b/editor/ui/dialogs/content/EdLabelProps.js
deleted file mode 100644
index 98e3eddf8..000000000
--- a/editor/ui/dialogs/content/EdLabelProps.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var labelElement;
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- gDialog.editText = document.getElementById("EditText");
- gDialog.labelText = document.getElementById("LabelText");
- gDialog.labelFor = document.getElementById("LabelFor");
- gDialog.labelAccessKey = document.getElementById("LabelAccessKey");
-
- labelElement = window.arguments[0];
-
- // Make a copy to use for AdvancedEdit
- globalElement = labelElement.cloneNode(false);
-
- InitDialog();
-
- var range = editor.document.createRange();
- range.selectNode(labelElement);
- gDialog.labelText.value = range.toString();
-
- if (labelElement.innerHTML.includes("<"))
- {
- gDialog.editText.checked = false;
- gDialog.editText.disabled = false;
- gDialog.labelText.disabled = true;
- gDialog.editText.addEventListener("command",
- () => Services.prompt.alert(window, GetString("Alert"), GetString("EditTextWarning")),
- {capture: false, once: true});
- SetTextboxFocus(gDialog.labelFor);
- }
- else
- SetTextboxFocus(gDialog.labelText);
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- gDialog.labelFor.value = globalElement.getAttribute("for");
- gDialog.labelAccessKey.value = globalElement.getAttribute("accesskey");
-}
-
-function RemoveLabel()
-{
- RemoveContainer(labelElement);
- SaveWindowLocation();
- window.close();
-}
-
-function ValidateData()
-{
- if (gDialog.labelFor.value)
- globalElement.setAttribute("for", gDialog.labelFor.value);
- else
- globalElement.removeAttribute("for");
- if (gDialog.labelAccessKey.value)
- globalElement.setAttribute("accesskey", gDialog.labelAccessKey.value);
- else
- globalElement.removeAttribute("accesskey");
- return true;
-}
-
-function onAccept()
-{
- // All values are valid - copy to actual element in doc
- ValidateData();
-
- var editor = GetCurrentEditor();
-
- editor.beginTransaction();
-
- try {
- if (gDialog.editText.checked)
- {
- editor.setShouldTxnSetSelection(false);
-
- while (labelElement.firstChild)
- editor.deleteNode(labelElement.firstChild);
- if (gDialog.labelText.value)
- editor.insertNode(editor.document.createTextNode(gDialog.labelText.value), labelElement, 0);
-
- editor.setShouldTxnSetSelection(true);
- }
-
- editor.cloneAttributes(labelElement, globalElement);
- } catch(e) {}
-
- editor.endTransaction();
-
- SaveWindowLocation();
-
- return true;
-}
-
diff --git a/editor/ui/dialogs/content/EdLabelProps.xul b/editor/ui/dialogs/content/EdLabelProps.xul
deleted file mode 100644
index cb4a6c028..000000000
--- a/editor/ui/dialogs/content/EdLabelProps.xul
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorLabelProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdLabelProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption label="&Settings.label;" accesskey="&Settings.accesskey;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <checkbox id="EditText" label="&EditLabelText.label;" accesskey="&EditLabelText.accesskey;" checked="true" disabled="true"
- oncommand="gDialog.labelText.disabled = !gDialog.editText.checked;"/>
- <textbox id="LabelText" accesskey="&Settings.accesskey;"/>
- </row>
- <row align="center">
- <label control="LabelFor" value="&LabelFor.label;" accesskey="&LabelFor.accesskey;"/>
- <textbox id="LabelFor"/>
- </row>
- <row align="center">
- <label control="LabelAccessKey" value="&AccessKey.label;" accesskey="&AccessKey.accesskey;"/>
- <hbox>
- <textbox id="LabelAccessKey" class="narrow"/>
- </hbox>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <!-- from EdDialogOverlay -->
- <hbox flex="1" style="margin-top: 0.2em">
- <button id="RemoveLabel" label="&RemoveLabel.label;" accesskey="&RemoveLabel.accesskey;" oncommand="RemoveLabel();"/>
- <!-- This will right-align the button -->
- <spacer flex="1"/>
- <button id="AdvancedEditButton"/>
- </hbox>
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdLinkProps.js b/editor/ui/dialogs/content/EdLinkProps.js
deleted file mode 100644
index 89d188246..000000000
--- a/editor/ui/dialogs/content/EdLinkProps.js
+++ /dev/null
@@ -1,340 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gActiveEditor;
-var anchorElement = null;
-var imageElement = null;
-var insertNew = false;
-var replaceExistingLink = false;
-var insertLinkAtCaret;
-var needLinkText = false;
-var href;
-var newLinkText;
-var gHNodeArray = {};
-var gHaveNamedAnchors = false;
-var gHaveHeadings = false;
-var gCanChangeHeadingSelected = true;
-var gCanChangeAnchorSelected = true;
-var gHaveDocumentUrl = false;
-
-// NOTE: Use "href" instead of "a" to distinguish from Named Anchor
-// The returned node is has an "a" tagName
-var tagName = "href";
-
-// dialog initialization code
-function Startup()
-{
- gActiveEditor = GetCurrentEditor();
- if (!gActiveEditor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
- // Message was wrapped in a <label> or <div>, so actual text is a child text node
- gDialog.linkTextCaption = document.getElementById("linkTextCaption");
- gDialog.linkTextMessage = document.getElementById("linkTextMessage");
- gDialog.linkTextInput = document.getElementById("linkTextInput");
- gDialog.hrefInput = document.getElementById("hrefInput");
- gDialog.makeRelativeLink = document.getElementById("MakeRelativeLink");
- gDialog.AdvancedEditSection = document.getElementById("AdvancedEdit");
-
- // See if we have a single selected image
- imageElement = gActiveEditor.getSelectedElement("img");
-
- if (imageElement)
- {
- // Get the parent link if it exists -- more efficient than GetSelectedElement()
- anchorElement = gActiveEditor.getElementOrParentByTagName("href", imageElement);
- if (anchorElement)
- {
- if (anchorElement.childNodes.length > 1)
- {
- // If there are other children, then we want to break
- // this image away by inserting a new link around it,
- // so make a new node and copy existing attributes
- anchorElement = anchorElement.cloneNode(false);
- //insertNew = true;
- replaceExistingLink = true;
- }
- }
- }
- else
- {
- // Get an anchor element if caret or
- // entire selection is within the link.
- anchorElement = gActiveEditor.getSelectedElement(tagName);
-
- if (anchorElement)
- {
- // Select the entire link
- gActiveEditor.selectElement(anchorElement);
- }
- else
- {
- // If selection starts in a link, but extends beyond it,
- // the user probably wants to extend existing link to new selection,
- // so check if either end of selection is within a link
- // POTENTIAL PROBLEM: This prevents user from selecting text in an existing
- // link and making 2 links.
- // Note that this isn't a problem with images, handled above
-
- anchorElement = gActiveEditor.getElementOrParentByTagName("href", gActiveEditor.selection.anchorNode);
- if (!anchorElement)
- anchorElement = gActiveEditor.getElementOrParentByTagName("href", gActiveEditor.selection.focusNode);
-
- if (anchorElement)
- {
- // But clone it for reinserting/merging around existing
- // link that only partially overlaps the selection
- anchorElement = anchorElement.cloneNode(false);
- //insertNew = true;
- replaceExistingLink = true;
- }
- }
- }
-
- if(!anchorElement)
- {
- // No existing link -- create a new one
- anchorElement = gActiveEditor.createElementWithDefaults(tagName);
- insertNew = true;
- // Hide message about removing existing link
- //document.getElementById("RemoveLinkMsg").hidden = true;
- }
- if(!anchorElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
-
- // We insert at caret only when nothing is selected
- insertLinkAtCaret = gActiveEditor.selection.isCollapsed;
-
- var selectedText;
- if (insertLinkAtCaret)
- {
- // Groupbox caption:
- gDialog.linkTextCaption.setAttribute("label", GetString("LinkText"));
-
- // Message above input field:
- gDialog.linkTextMessage.setAttribute("value", GetString("EnterLinkText"));
- gDialog.linkTextMessage.setAttribute("accesskey", GetString("EnterLinkTextAccessKey"));
- }
- else
- {
- if (!imageElement)
- {
- // We get here if selection is exactly around a link node
- // Check if selection has some text - use that first
- selectedText = GetSelectionAsText();
- if (!selectedText)
- {
- // No text, look for first image in the selection
- var children = anchorElement.childNodes;
- if (children)
- {
- for(var i=0; i < children.length; i++)
- {
- var nodeName = children.item(i).nodeName.toLowerCase();
- if (nodeName == "img")
- {
- imageElement = children.item(i);
- break;
- }
- }
- }
- }
- }
- // Set "caption" for link source and the source text or image URL
- if (imageElement)
- {
- gDialog.linkTextCaption.setAttribute("label", GetString("LinkImage"));
- // Link source string is the source URL of image
- // TODO: THIS DOESN'T HANDLE MULTIPLE SELECTED IMAGES!
- gDialog.linkTextMessage.setAttribute("value", imageElement.src);
- } else {
- gDialog.linkTextCaption.setAttribute("label", GetString("LinkText"));
- if (selectedText)
- {
- // Use just the first 60 characters and add "..."
- gDialog.linkTextMessage.setAttribute("value", TruncateStringAtWordEnd(ReplaceWhitespace(selectedText, " "), 60, true));
- } else {
- gDialog.linkTextMessage.setAttribute("value", GetString("MixedSelection"));
- }
- }
- }
-
- // Make a copy to use for AdvancedEdit and onSaveDefault
- globalElement = anchorElement.cloneNode(false);
-
- // Get the list of existing named anchors and headings
- FillLinkMenulist(gDialog.hrefInput, gHNodeArray);
-
- // We only need to test for this once per dialog load
- gHaveDocumentUrl = GetDocumentBaseUrl();
-
- // Set data for the dialog controls
- InitDialog();
-
- // Search for a URI pattern in the selected text
- // as candidate href
- selectedText = TrimString(selectedText);
- if (!gDialog.hrefInput.value && TextIsURI(selectedText))
- gDialog.hrefInput.value = selectedText;
-
- // Set initial focus
- if (insertLinkAtCaret) {
- // We will be using the HREF inputbox, so text message
- SetTextboxFocus(gDialog.linkTextInput);
- } else {
- SetTextboxFocus(gDialog.hrefInput);
-
- // We will not insert a new link at caret, so remove link text input field
- gDialog.linkTextInput.hidden = true;
- gDialog.linkTextInput = null;
- }
-
- // This sets enable state on OK button
- doEnabling();
-
- SetWindowLocation();
-}
-
-// Set dialog widgets with attribute data
-// We get them from globalElement copy so this can be used
-// by AdvancedEdit(), which is shared by all property dialogs
-function InitDialog()
-{
- // Must use getAttribute, not "globalElement.href",
- // or foreign chars aren't coverted correctly!
- gDialog.hrefInput.value = globalElement.getAttribute("href");
-
- // Set "Relativize" checkbox according to current URL state
- SetRelativeCheckbox(gDialog.makeRelativeLink);
-}
-
-function doEnabling()
-{
- // We disable Ok button when there's no href text only if inserting a new link
- var enable = insertNew ? (TrimString(gDialog.hrefInput.value).length > 0) : true;
-
- // anon. content, so can't use SetElementEnabledById here
- var dialogNode = document.getElementById("linkDlg");
- dialogNode.getButton("accept").disabled = !enable;
-
- SetElementEnabledById( "AdvancedEditButton1", enable);
-}
-
-function ChangeLinkLocation()
-{
- SetRelativeCheckbox(gDialog.makeRelativeLink);
- // Set OK button enable state
- doEnabling();
-}
-
-// Get and validate data from widgets.
-// Set attributes on globalElement so they can be accessed by AdvancedEdit()
-function ValidateData()
-{
- href = TrimString(gDialog.hrefInput.value);
- if (href)
- {
- // Set the HREF directly on the editor document's anchor node
- // or on the newly-created node if insertNew is true
- globalElement.setAttribute("href",href);
- }
- else if (insertNew)
- {
- // We must have a URL to insert a new link
- //NOTE: We accept an empty HREF on existing link to indicate removing the link
- ShowInputErrorMessage(GetString("EmptyHREFError"));
- return false;
- }
- if (gDialog.linkTextInput)
- {
- // The text we will insert isn't really an attribute,
- // but it makes sense to validate it
- newLinkText = TrimString(gDialog.linkTextInput.value);
- if (!newLinkText)
- {
- if (href)
- newLinkText = href
- else
- {
- ShowInputErrorMessage(GetString("EmptyLinkTextError"));
- SetTextboxFocus(gDialog.linkTextInput);
- return false;
- }
- }
- }
- return true;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- if (href.length > 0)
- {
- // Copy attributes to element we are changing or inserting
- gActiveEditor.cloneAttributes(anchorElement, globalElement);
-
- // Coalesce into one undo transaction
- gActiveEditor.beginTransaction();
-
- // Get text to use for a new link
- if (insertLinkAtCaret)
- {
- // Append the link text as the last child node
- // of the anchor node
- var textNode = gActiveEditor.document.createTextNode(newLinkText);
- if (textNode)
- anchorElement.appendChild(textNode);
- try {
- gActiveEditor.insertElementAtSelection(anchorElement, false);
- } catch (e) {
- dump("Exception occured in InsertElementAtSelection\n");
- return true;
- }
- } else if (insertNew || replaceExistingLink)
- {
- // Link source was supplied by the selection,
- // so insert a link node as parent of this
- // (may be text, image, or other inline content)
- try {
- gActiveEditor.insertLinkAroundSelection(anchorElement);
- } catch (e) {
- dump("Exception occured in InsertElementAtSelection\n");
- return true;
- }
- }
- // Check if the link was to a heading
- if (href in gHNodeArray)
- {
- var anchorNode = gActiveEditor.createElementWithDefaults("a");
- if (anchorNode)
- {
- anchorNode.name = href.substr(1);
-
- // Insert the anchor into the document,
- // but don't let the transaction change the selection
- gActiveEditor.setShouldTxnSetSelection(false);
- gActiveEditor.insertNode(anchorNode, gHNodeArray[href], 0);
- gActiveEditor.setShouldTxnSetSelection(true);
- }
- }
- gActiveEditor.endTransaction();
- }
- else if (!insertNew)
- {
- // We already had a link, but empty HREF means remove it
- EditorRemoveTextProperty("href", "");
- }
- SaveWindowLocation();
- return true;
- }
- return false;
-}
diff --git a/editor/ui/dialogs/content/EdLinkProps.xul b/editor/ui/dialogs/content/EdLinkProps.xul
deleted file mode 100644
index 82c0210d6..000000000
--- a/editor/ui/dialogs/content/EdLinkProps.xul
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorLinkProperties.dtd">
-
-<dialog id="linkDlg" title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdLinkProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <vbox style="min-width: 20em">
- <groupbox><caption id="linkTextCaption"/>
- <vbox>
- <label id="linkTextMessage" control="linkTextInput"/>
- <textbox id="linkTextInput"/>
- </vbox>
- </groupbox>
-
- <groupbox id="LinkURLBox"><caption label="&LinkURLBox.label;"/>
- <vbox id="LinkLocationBox"/>
- <!-- mail compose will insert custom item here defined in mailComposeEditorOverlay.xul -->
- </groupbox>
- </vbox>
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdListProps.js b/editor/ui/dialogs/content/EdListProps.js
deleted file mode 100644
index e886e72ed..000000000
--- a/editor/ui/dialogs/content/EdListProps.js
+++ /dev/null
@@ -1,441 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-//Cancel() is in EdDialogCommon.js
-var gBulletStyleType = "";
-var gNumberStyleType = "";
-var gListElement;
-var gOriginalListType = "";
-var gListType = "";
-var gMixedListSelection = false;
-var gStyleType = "";
-var gOriginalStyleType = "";
-const gOnesArray = ["", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"];
-const gTensArray = ["", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"];
-const gHundredsArray = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"];
-const gThousandsArray = ["", "M", "MM", "MMM", "MMMM", "MMMMM", "MMMMMM", "MMMMMMM", "MMMMMMMM", "MMMMMMMMM"];
-const gRomanDigits = {I: 1, V: 5, X: 10, L: 50, C: 100, D: 500, M: 1000};
-const A = "A".charCodeAt(0);
-const gArabic = "1";
-const gUpperRoman = "I";
-const gLowerRoman = "i";
-const gUpperLetters = "A";
-const gLowerLetters = "a";
-const gDecimalCSS = "decimal";
-const gUpperRomanCSS = "upper-roman";
-const gLowerRomanCSS = "lower-roman";
-const gUpperAlphaCSS = "upper-alpha";
-const gLowerAlphaCSS = "lower-alpha";
-
-// dialog initialization code
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
- gDialog.ListTypeList = document.getElementById("ListType");
- gDialog.BulletStyleList = document.getElementById("BulletStyle");
- gDialog.BulletStyleLabel = document.getElementById("BulletStyleLabel");
- gDialog.StartingNumberInput = document.getElementById("StartingNumber");
- gDialog.StartingNumberLabel = document.getElementById("StartingNumberLabel");
- gDialog.AdvancedEditButton = document.getElementById("AdvancedEditButton1");
- gDialog.RadioGroup = document.getElementById("RadioGroup");
- gDialog.ChangeAllRadio = document.getElementById("ChangeAll");
- gDialog.ChangeSelectedRadio = document.getElementById("ChangeSelected");
-
- // Try to get an existing list(s)
- var mixedObj = { value: null };
- try {
- gListType = editor.getListState(mixedObj, {}, {}, {} );
-
- // We may have mixed list and non-list, or > 1 list type in selection
- gMixedListSelection = mixedObj.value;
-
- // Get the list element at the anchor node
- gListElement = editor.getElementOrParentByTagName("list", null);
- } catch (e) {}
-
- // The copy to use in AdvancedEdit
- if (gListElement)
- globalElement = gListElement.cloneNode(false);
-
- // Show extra options for changing entire list if we have one already.
- gDialog.RadioGroup.collapsed = !gListElement;
- if (gListElement)
- {
- // Radio button index is persistent
- if (gDialog.RadioGroup.getAttribute("index") == "1")
- gDialog.RadioGroup.selectedItem = gDialog.ChangeSelectedRadio;
- else
- gDialog.RadioGroup.selectedItem = gDialog.ChangeAllRadio;
- }
-
- InitDialog();
-
- gOriginalListType = gListType;
-
- gDialog.ListTypeList.focus();
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- // Note that if mixed, we we pay attention
- // only to the anchor node's list type
- // (i.e., don't confuse user with "mixed" designation)
- if (gListElement)
- gListType = gListElement.nodeName.toLowerCase();
- else
- gListType = "";
-
- gDialog.ListTypeList.value = gListType;
- gDialog.StartingNumberInput.value = "";
-
- // Last param = true means attribute value is case-sensitive
- var type = globalElement ? GetHTMLOrCSSStyleValue(globalElement, "type", "list-style-type") : null;
-
- var index = 0;
- if (gListType == "ul")
- {
- if (type)
- {
- type = type.toLowerCase();
- gBulletStyleType = type;
- gOriginalStyleType = type;
- }
- }
- else if (gListType == "ol")
- {
- // Translate CSS property strings
- switch (type.toLowerCase())
- {
- case gDecimalCSS:
- type = gArabic;
- break;
- case gUpperRomanCSS:
- type = gUpperRoman;
- break;
- case gLowerRomanCSS:
- type = gLowerRoman;
- break;
- case gUpperAlphaCSS:
- type = gUpperLetters;
- break;
- case gLowerAlphaCSS:
- type = gLowerLetters;
- break;
- }
- if (type)
- {
- gNumberStyleType = type;
- gOriginalStyleType = type;
- }
-
- // Convert attribute number to appropriate letter or roman numeral
- gDialog.StartingNumberInput.value =
- ConvertStartAttrToUserString(globalElement.getAttribute("start"), type);
- }
- BuildBulletStyleList();
-}
-
-// Convert attribute number to appropriate letter or roman numeral
-function ConvertStartAttrToUserString(startAttr, type)
-{
- switch (type)
- {
- case gUpperRoman:
- startAttr = ConvertArabicToRoman(startAttr);
- break;
- case gLowerRoman:
- startAttr = ConvertArabicToRoman(startAttr).toLowerCase();
- break;
- case gUpperLetters:
- startAttr = ConvertArabicToLetters(startAttr);
- break;
- case gLowerLetters:
- startAttr = ConvertArabicToLetters(startAttr).toLowerCase();
- break;
- }
- return startAttr;
-}
-
-function BuildBulletStyleList()
-{
- gDialog.BulletStyleList.removeAllItems();
- var label;
-
- if (gListType == "ul")
- {
- gDialog.BulletStyleList.removeAttribute("disabled");
- gDialog.BulletStyleLabel.removeAttribute("disabled");
- gDialog.StartingNumberInput.setAttribute("disabled", "true");
- gDialog.StartingNumberLabel.setAttribute("disabled", "true");
-
- label = GetString("BulletStyle");
-
- gDialog.BulletStyleList.appendItem(GetString("Automatic"), "");
- gDialog.BulletStyleList.appendItem(GetString("SolidCircle"), "disc");
- gDialog.BulletStyleList.appendItem(GetString("OpenCircle"), "circle");
- gDialog.BulletStyleList.appendItem(GetString("SolidSquare"), "square");
-
- gDialog.BulletStyleList.value = gBulletStyleType;
- }
- else if (gListType == "ol")
- {
- gDialog.BulletStyleList.removeAttribute("disabled");
- gDialog.BulletStyleLabel.removeAttribute("disabled");
- gDialog.StartingNumberInput.removeAttribute("disabled");
- gDialog.StartingNumberLabel.removeAttribute("disabled");
- label = GetString("NumberStyle");
-
- gDialog.BulletStyleList.appendItem(GetString("Automatic"), "");
- gDialog.BulletStyleList.appendItem(GetString("Style_1"), gArabic);
- gDialog.BulletStyleList.appendItem(GetString("Style_I"), gUpperRoman);
- gDialog.BulletStyleList.appendItem(GetString("Style_i"), gLowerRoman);
- gDialog.BulletStyleList.appendItem(GetString("Style_A"), gUpperLetters);
- gDialog.BulletStyleList.appendItem(GetString("Style_a"), gLowerLetters);
-
- gDialog.BulletStyleList.value = gNumberStyleType;
- }
- else
- {
- gDialog.BulletStyleList.setAttribute("disabled", "true");
- gDialog.BulletStyleLabel.setAttribute("disabled", "true");
- gDialog.StartingNumberInput.setAttribute("disabled", "true");
- gDialog.StartingNumberLabel.setAttribute("disabled", "true");
- }
-
- // Disable advanced edit button if changing to "normal"
- if (gListType)
- gDialog.AdvancedEditButton.removeAttribute("disabled");
- else
- gDialog.AdvancedEditButton.setAttribute("disabled", "true");
-
- if (label)
- gDialog.BulletStyleLabel.setAttribute("label",label);
-}
-
-function SelectListType()
-{
- // Each list type is stored in the "value" of each menuitem
- var NewType = gDialog.ListTypeList.value;
-
- if (NewType == "ol")
- SetTextboxFocus(gDialog.StartingNumberInput);
-
- if (gListType != NewType)
- {
- gListType = NewType;
-
- // Create a newlist object for Advanced Editing
- try {
- if (gListType)
- globalElement = GetCurrentEditor().createElementWithDefaults(gListType);
- } catch (e) {}
-
- BuildBulletStyleList();
- }
-}
-
-function SelectBulletStyle()
-{
- // Save the selected index so when user changes
- // list style, restore index to associated list
- // Each bullet or number type is stored in the "value" of each menuitem
- if (gListType == "ul")
- gBulletStyleType = gDialog.BulletStyleList.value;
- else if (gListType == "ol")
- {
- var type = gDialog.BulletStyleList.value;
- if (gNumberStyleType != type)
- {
- // Convert existing input value to attr number first,
- // then convert to the appropriate format for the newly-selected
- gDialog.StartingNumberInput.value =
- ConvertStartAttrToUserString( ConvertUserStringToStartAttr(gNumberStyleType), type);
-
- gNumberStyleType = type;
- SetTextboxFocus(gDialog.StartingNumberInput);
- }
- }
-}
-
-function ValidateData()
-{
- gBulletStyleType = gDialog.BulletStyleList.value;
- // globalElement should already be of the correct type
-
- if (globalElement)
- {
- var editor = GetCurrentEditor();
- if (gListType == "ul")
- {
- if (gBulletStyleType && gDialog.ChangeAllRadio.selected)
- globalElement.setAttribute("type", gBulletStyleType);
- else
- try {
- editor.removeAttributeOrEquivalent(globalElement, "type", true);
- } catch (e) {}
-
- }
- else if (gListType == "ol")
- {
- if (gBulletStyleType)
- globalElement.setAttribute("type", gBulletStyleType);
- else
- try {
- editor.removeAttributeOrEquivalent(globalElement, "type", true);
- } catch (e) {}
-
- var startingNumber = ConvertUserStringToStartAttr(gBulletStyleType);
- if (startingNumber)
- globalElement.setAttribute("start", startingNumber);
- else
- globalElement.removeAttribute("start");
- }
- }
- return true;
-}
-
-function ConvertUserStringToStartAttr(type)
-{
- var startingNumber = TrimString(gDialog.StartingNumberInput.value);
-
- switch (type)
- {
- case gUpperRoman:
- case gLowerRoman:
- // If the input isn't an integer, assume it's a roman numeral. Convert it.
- if (!Number(startingNumber))
- startingNumber = ConvertRomanToArabic(startingNumber);
- break;
- case gUpperLetters:
- case gLowerLetters:
- // Get the number equivalent of the letters
- if (!Number(startingNumber))
- startingNumber = ConvertLettersToArabic(startingNumber);
- break;
- }
- return startingNumber;
-}
-
-function ConvertRomanToArabic(num)
-{
- num = num.toUpperCase();
- if (num && !/[^MDCLXVI]/i.test(num))
- {
- var Arabic = 0;
- var last_digit = 1000;
- for (var i=0; i < num.length; i++)
- {
- var digit = gRomanDigits[num.charAt(i)];
- if (last_digit < digit)
- Arabic -= 2 * last_digit;
-
- last_digit = digit;
- Arabic += last_digit;
- }
- return Arabic;
- }
-
- return "";
-}
-
-function ConvertArabicToRoman(num)
-{
- if (/^\d{1,4}$/.test(num))
- {
- var digits = ("000" + num).substr(-4);
- return gThousandsArray[digits.charAt(0)] +
- gHundredsArray[digits.charAt(1)] +
- gTensArray[digits.charAt(2)] +
- gOnesArray[digits.charAt(3)];
- }
- return "";
-}
-
-function ConvertLettersToArabic(letters)
-{
- letters = letters.toUpperCase();
- if (!letters || /[^A-Z]/.test(letters))
- return "";
-
- var num = 0;
- for (var i = 0; i < letters.length; i++)
- num = num * 26 + letters.charCodeAt(i) - A + 1;
- return num;
-}
-
-function ConvertArabicToLetters(num)
-{
- var letters = "";
- while (num) {
- num--;
- letters = String.fromCharCode(A + (num % 26)) + letters;
- num = Math.floor(num / 26);
- }
- return letters;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- // Coalesce into one undo transaction
- var editor = GetCurrentEditor();
-
- editor.beginTransaction();
-
- var changeEntireList = gDialog.RadioGroup.selectedItem == gDialog.ChangeAllRadio;
-
- // Remember which radio button was selected
- if (gListElement)
- gDialog.RadioGroup.setAttribute("index", changeEntireList ? "0" : "1");
-
- var changeList;
- if (gListElement && gDialog.ChangeAllRadio.selected)
- {
- changeList = true;
- }
- else
- changeList = gMixedListSelection || gListType != gOriginalListType ||
- gBulletStyleType != gOriginalStyleType;
- if (changeList)
- {
- try {
- if (gListType)
- {
- editor.makeOrChangeList(gListType, changeEntireList,
- (gBulletStyleType != gOriginalStyleType) ? gBulletStyleType : null);
-
- // Get the new list created:
- gListElement = editor.getElementOrParentByTagName(gListType, null);
-
- editor.cloneAttributes(gListElement, globalElement);
- }
- else
- {
- // Remove all existing lists
- if (gListElement && changeEntireList)
- editor.selectElement(gListElement);
-
- editor.removeList("ol");
- editor.removeList("ul");
- editor.removeList("dl");
- }
- } catch (e) {}
- }
-
- editor.endTransaction();
-
- SaveWindowLocation();
-
- return true;
- }
- return false;
-}
diff --git a/editor/ui/dialogs/content/EdListProps.xul b/editor/ui/dialogs/content/EdListProps.xul
deleted file mode 100644
index 308b1d8a5..000000000
--- a/editor/ui/dialogs/content/EdListProps.xul
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorListProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdListProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox flex="1"><caption label="&ListType.label;"/>
- <menulist id="ListType" oncommand="SelectListType()">
- <menupopup>
- <menuitem label="&none.value;"/>
- <menuitem value="ul" label="&bulletList.value;"/>
- <menuitem value="ol" label="&numberList.value;"/>
- <menuitem value="dl" label="&definitionList.value;"/>
- </menupopup>
- </menulist>
- </groupbox>
- <spacer class="spacer"/>
-
- <!-- message text and list items are set in JS
- text value should be identical to string with id=BulletStyle in editor.properties
- -->
- <groupbox flex="1"><caption id="BulletStyleLabel" label="&bulletStyle.label;"/>
- <menulist class="MinWidth10em" id="BulletStyle" oncommand="SelectBulletStyle()">
- <menupopup/>
- </menulist>
- <spacer class="spacer"/>
- <hbox>
- <label id="StartingNumberLabel" control="StartingNumber"
- value="&startingNumber.label;" accesskey="&startingNumber.accessKey;"/>
- <textbox class="narrow" id="StartingNumber"/>
- <spacer/>
- </hbox>
- </groupbox>
- <radiogroup id="RadioGroup" index="0" persist="index">
- <radio id="ChangeAll" label="&changeEntireListRadio.label;" accesskey="&changeEntireListRadio.accessKey;"/>
- <radio id="ChangeSelected" label="&changeSelectedRadio.label;" accesskey="&changeSelectedRadio.accessKey;"/>
- </radiogroup>
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdNamedAnchorProps.js b/editor/ui/dialogs/content/EdNamedAnchorProps.js
deleted file mode 100644
index 8ded1e94a..000000000
--- a/editor/ui/dialogs/content/EdNamedAnchorProps.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gInsertNew = true;
-var gAnchorElement = null;
-var gOriginalName = "";
-const kTagName = "anchor";
-
-// dialog initialization code
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- gDialog.OkButton = document.documentElement.getButton("accept");
- gDialog.NameInput = document.getElementById("nameInput");
-
- // Get a single selected element of the desired type
- gAnchorElement = editor.getSelectedElement(kTagName);
-
- if (gAnchorElement) {
- // We found an element and don't need to insert one
- gInsertNew = false;
-
- // Make a copy to use for AdvancedEdit
- globalElement = gAnchorElement.cloneNode(false);
- gOriginalName = ConvertToCDATAString(gAnchorElement.name);
- } else {
- gInsertNew = true;
- // We don't have an element selected,
- // so create one with default attributes
- gAnchorElement = editor.createElementWithDefaults(kTagName);
- if (gAnchorElement) {
- // Use the current selection as suggested name
- var name = GetSelectionAsText();
- // Get 40 characters of the selected text and don't add "...",
- // replace whitespace with "_" and strip non-word characters
- name = ConvertToCDATAString(TruncateStringAtWordEnd(name, 40, false));
- //Be sure the name is unique to the document
- if (AnchorNameExists(name))
- name += "_"
-
- // Make a copy to use for AdvancedEdit
- globalElement = gAnchorElement.cloneNode(false);
- globalElement.setAttribute("name",name);
- }
- }
- if(!gAnchorElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
-
- InitDialog();
-
- DoEnabling();
- SetTextboxFocus(gDialog.NameInput);
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- gDialog.NameInput.value = globalElement.getAttribute("name");
-}
-
-function ChangeName()
-{
- if (gDialog.NameInput.value.length > 0)
- {
- // Replace spaces with "_" and strip other non-URL characters
- // Note: we could use ConvertAndEscape, but then we'd
- // have to UnEscapeAndConvert beforehand - too messy!
- gDialog.NameInput.value = ConvertToCDATAString(gDialog.NameInput.value);
- }
- DoEnabling();
-}
-
-function DoEnabling()
-{
- var enable = gDialog.NameInput.value.length > 0;
- SetElementEnabled(gDialog.OkButton, enable);
- SetElementEnabledById("AdvancedEditButton1", enable);
-}
-
-function AnchorNameExists(name)
-{
- var anchorList;
- try {
- anchorList = GetCurrentEditor().document.anchors;
- } catch (e) {}
-
- if (anchorList) {
- for (var i = 0; i < anchorList.length; i++) {
- if (anchorList[i].name == name)
- return true;
- }
- }
- return false;
-}
-
-// Get and validate data from widgets.
-// Set attributes on globalElement so they can be accessed by AdvancedEdit()
-function ValidateData()
-{
- var name = TrimString(gDialog.NameInput.value);
- if (!name)
- {
- ShowInputErrorMessage(GetString("MissingAnchorNameError"));
- SetTextboxFocus(gDialog.NameInput);
- return false;
- } else {
- // Replace spaces with "_" and strip other characters
- // Note: we could use ConvertAndEscape, but then we'd
- // have to UnConverAndEscape beforehand - too messy!
- name = ConvertToCDATAString(name);
-
- if (gOriginalName != name && AnchorNameExists(name))
- {
- ShowInputErrorMessage(GetString("DuplicateAnchorNameError").replace(/%name%/,name));
- SetTextboxFocus(gDialog.NameInput);
- return false;
- }
- globalElement.name = name;
- }
- return true;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- if (gOriginalName != globalElement.name)
- {
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- try {
- // "false" = don't delete selected text when inserting
- if (gInsertNew)
- {
- // We must insert element before copying CSS style attribute,
- // but we must set the name else it won't insert at all
- gAnchorElement.name = globalElement.name;
- editor.insertElementAtSelection(gAnchorElement, false);
- }
-
- // Copy attributes to element we are changing or inserting
- editor.cloneAttributes(gAnchorElement, globalElement);
-
- } catch (e) {}
-
- editor.endTransaction();
- }
- SaveWindowLocation();
- return true;
- }
- return false;
-}
diff --git a/editor/ui/dialogs/content/EdNamedAnchorProps.xul b/editor/ui/dialogs/content/EdNamedAnchorProps.xul
deleted file mode 100644
index e2685d21e..000000000
--- a/editor/ui/dialogs/content/EdNamedAnchorProps.xul
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdNamedAnchorProperties.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload = "Startup()"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdNamedAnchorProps.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <label control="nameInput"
- value="&anchorNameEditField.label;"
- accesskey="&anchorNameEditField.accessKey;"/>
- <textbox class="MinWidth20em" id="nameInput" oninput="ChangeName()"
- tooltiptext="&nameInput.tooltip;"/>
- <spacer class="spacer"/>
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdPageProps.js b/editor/ui/dialogs/content/EdPageProps.js
deleted file mode 100644
index 8a129b685..000000000
--- a/editor/ui/dialogs/content/EdPageProps.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gNewTitle = "";
-var gAuthor = "";
-var gDescription = "";
-var gAuthorElement;
-var gDescriptionElement;
-var gInsertNewAuthor = false;
-var gInsertNewDescription = false;
-var gTitleWasEdited = false;
-var gAuthorWasEdited = false;
-var gDescWasEdited = false;
-
-//Cancel() is in EdDialogCommon.js
-// dialog initialization code
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- gDialog.PageLocation = document.getElementById("PageLocation");
- gDialog.PageModDate = document.getElementById("PageModDate");
- gDialog.TitleInput = document.getElementById("TitleInput");
- gDialog.AuthorInput = document.getElementById("AuthorInput");
- gDialog.DescriptionInput = document.getElementById("DescriptionInput");
-
- // Default string for new page is set from DTD string in XUL,
- // so set only if not new doc URL
- var location = GetDocumentUrl();
- var lastmodString = GetString("Unknown");
-
- if (!IsUrlAboutBlank(location))
- {
- // NEVER show username and password in clear text
- gDialog.PageLocation.setAttribute("value", StripPassword(location));
-
- // Get last-modified file date+time
- // TODO: Convert this to local time?
- var lastmod;
- try {
- lastmod = editor.document.lastModified; // get string of last modified date
- } catch (e) {}
- // Convert modified string to date (0 = unknown date or January 1, 1970 GMT)
- if(Date.parse(lastmod))
- {
- try {
- const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1";
- const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat;
- var dateService = Components.classes[nsScriptableDateFormat_CONTRACTID]
- .getService(nsIScriptableDateFormat);
-
- var lastModDate = new Date();
- lastModDate.setTime(Date.parse(lastmod));
- lastmodString = dateService.FormatDateTime("",
- dateService.dateFormatLong,
- dateService.timeFormatSeconds,
- lastModDate.getFullYear(),
- lastModDate.getMonth()+1,
- lastModDate.getDate(),
- lastModDate.getHours(),
- lastModDate.getMinutes(),
- lastModDate.getSeconds());
- } catch (e) {}
- }
- }
- gDialog.PageModDate.value = lastmodString;
-
- gAuthorElement = GetMetaElementByAttribute("name", "author");
- if (!gAuthorElement)
- {
- gAuthorElement = CreateMetaElementWithAttribute("name", "author");
- if (!gAuthorElement)
- {
- window.close();
- return;
- }
- gInsertNewAuthor = true;
- }
-
- gDescriptionElement = GetMetaElementByAttribute("name", "description");
- if (!gDescriptionElement)
- {
- gDescriptionElement = CreateMetaElementWithAttribute("name", "description");
- if (!gDescriptionElement)
- window.close();
-
- gInsertNewDescription = true;
- }
-
- InitDialog();
-
- SetTextboxFocus(gDialog.TitleInput);
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- gDialog.TitleInput.value = GetDocumentTitle();
-
- var gAuthor = TrimString(gAuthorElement.getAttribute("content"));
- if (!gAuthor)
- {
- // Fill in with value from editor prefs
- gAuthor = Services.prefs.getCharPref("editor.author");
- }
- gDialog.AuthorInput.value = gAuthor;
- gDialog.DescriptionInput.value = gDescriptionElement.getAttribute("content");
-}
-
-function TextboxChanged(ID)
-{
- switch(ID)
- {
- case "TitleInput":
- gTitleWasEdited = true;
- break;
- case "AuthorInput":
- gAuthorWasEdited = true;
- break;
- case "DescriptionInput":
- gDescWasEdited = true;
- break;
- }
-}
-
-function ValidateData()
-{
- gNewTitle = TrimString(gDialog.TitleInput.value);
- gAuthor = TrimString(gDialog.AuthorInput.value);
- gDescription = TrimString(gDialog.DescriptionInput.value);
- return true;
-}
-
-function onAccept()
-{
- if (ValidateData())
- {
- var editor = GetCurrentEditor();
- editor.beginTransaction();
-
- // Set title contents even if string is empty
- // because TITLE is a required HTML element
- if (gTitleWasEdited)
- SetDocumentTitle(gNewTitle);
-
- if (gAuthorWasEdited)
- SetMetaElementContent(gAuthorElement, gAuthor, gInsertNewAuthor, false);
-
- if (gDescWasEdited)
- SetMetaElementContent(gDescriptionElement, gDescription, gInsertNewDescription, false);
-
- editor.endTransaction();
-
- SaveWindowLocation();
- return true; // do close the window
- }
- return false;
-}
-
diff --git a/editor/ui/dialogs/content/EdPageProps.xul b/editor/ui/dialogs/content/EdPageProps.xul
deleted file mode 100644
index e5d666f83..000000000
--- a/editor/ui/dialogs/content/EdPageProps.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPageProperties.dtd">
-
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdPageProps.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
- <grid>
- <columns><column flex="1"/><column flex="2"/></columns>
- <rows>
- <row>
- <label value="&location.label;"/>
- <label value="&locationNewPage.label;" id="PageLocation"/>
- </row>
- <row>
- <label value="&lastModified.label;"/>
- <label id="PageModDate"/>
- </row>
- <spacer class="spacer"/>
- <row align="center">
- <label value="&titleInput.label;" accesskey="&titleInput.accessKey;" control="TitleInput"/>
- <textbox class="MinWidth20em" id="TitleInput" oninput="TextboxChanged(this.id)"/>
- </row>
- <row align="center">
- <label value="&authorInput.label;" accesskey="&authorInput.accessKey;" control="AuthorInput"/>
- <textbox class="MinWidth20em" id="AuthorInput" oninput="TextboxChanged(this.id)"/>
- </row>
- <row align="center">
- <label value="&descriptionInput.label;" accesskey="&descriptionInput.accessKey;" control="DescriptionInput"/>
- <textbox class="MinWidth20em" id="DescriptionInput" oninput="TextboxChanged(this.id)"/>
- </row>
- </rows>
- </grid>
- <spacer class="bigspacer"/>
- <label value="&EditHEADSource1.label;"/>
- <description class="wrap" flex="1">&EditHEADSource2.label;</description>
- <separator class="groove"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdReplace.js b/editor/ui/dialogs/content/EdReplace.js
deleted file mode 100644
index ee7b0d281..000000000
--- a/editor/ui/dialogs/content/EdReplace.js
+++ /dev/null
@@ -1,380 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gReplaceDialog; // Quick access to document/form elements.
-var gFindInst; // nsIWebBrowserFind that we're going to use
-var gFindService; // Global service which remembers find params
-var gEditor; // the editor we're using
-
-function initDialogObject()
-{
- // Create gReplaceDialog object and initialize.
- gReplaceDialog = {};
- gReplaceDialog.findInput = document.getElementById("dialog.findInput");
- gReplaceDialog.replaceInput = document.getElementById("dialog.replaceInput");
- gReplaceDialog.caseSensitive = document.getElementById("dialog.caseSensitive");
- gReplaceDialog.wrap = document.getElementById("dialog.wrap");
- gReplaceDialog.searchBackwards = document.getElementById("dialog.searchBackwards");
- gReplaceDialog.findNext = document.getElementById("findNext");
- gReplaceDialog.replace = document.getElementById("replace");
- gReplaceDialog.replaceAndFind = document.getElementById("replaceAndFind");
- gReplaceDialog.replaceAll = document.getElementById("replaceAll");
-}
-
-function loadDialog()
-{
- // Set initial dialog field contents.
- // Set initial dialog field contents. Use the gFindInst attributes first,
- // this is necessary for window.find()
- gReplaceDialog.findInput.value = (gFindInst.searchString
- ? gFindInst.searchString
- : gFindService.searchString);
- gReplaceDialog.replaceInput.value = gFindService.replaceString;
- gReplaceDialog.caseSensitive.checked = (gFindInst.matchCase
- ? gFindInst.matchCase
- : gFindService.matchCase);
- gReplaceDialog.wrap.checked = (gFindInst.wrapFind
- ? gFindInst.wrapFind
- : gFindService.wrapFind);
- gReplaceDialog.searchBackwards.checked = (gFindInst.findBackwards
- ? gFindInst.findBackwards
- : gFindService.findBackwards);
-
- doEnabling();
-}
-
-function onLoad()
-{
- // Get the xul <editor> element:
- var editorElement = window.arguments[0];
-
- // If we don't get the editor, then we won't allow replacing.
- gEditor = editorElement.getEditor(editorElement.contentWindow);
- if (!gEditor)
- {
- window.close();
- return;
- }
-
- // Get the nsIWebBrowserFind service:
- gFindInst = editorElement.webBrowserFind;
-
- try {
- // get the find service, which stores global find state
- gFindService = Components.classes["@mozilla.org/find/find_service;1"]
- .getService(Components.interfaces.nsIFindService);
- } catch(e) { dump("No find service!\n"); gFindService = 0; }
-
- // Init gReplaceDialog.
- initDialogObject();
-
- // Change "OK" to "Find".
- //dialog.find.label = document.getElementById("fBLT").getAttribute("label");
-
- // Fill dialog.
- loadDialog();
-
- if (gReplaceDialog.findInput.value)
- gReplaceDialog.findInput.select();
- else
- gReplaceDialog.findInput.focus();
-}
-
-function onUnload() {
- // Disconnect context from this dialog.
- gFindReplaceData.replaceDialog = null;
-}
-
-function saveFindData()
-{
- // Set data attributes per user input.
- if (gFindService)
- {
- gFindService.searchString = gReplaceDialog.findInput.value;
- gFindService.matchCase = gReplaceDialog.caseSensitive.checked;
- gFindService.wrapFind = gReplaceDialog.wrap.checked;
- gFindService.findBackwards = gReplaceDialog.searchBackwards.checked;
- }
-}
-
-function setUpFindInst()
-{
- gFindInst.searchString = gReplaceDialog.findInput.value;
- gFindInst.matchCase = gReplaceDialog.caseSensitive.checked;
- gFindInst.wrapFind = gReplaceDialog.wrap.checked;
- gFindInst.findBackwards = gReplaceDialog.searchBackwards.checked;
-}
-
-function onFindNext()
-{
- // Transfer dialog contents to the find service.
- saveFindData();
- // set up the find instance
- setUpFindInst();
-
- // Search.
- var result = gFindInst.findNext();
-
- if (!result)
- {
- var bundle = document.getElementById("findBundle");
- Services.prompt.alert(window, GetString("Alert"), bundle.getString("notFoundWarning"));
- SetTextboxFocus(gReplaceDialog.findInput);
- gReplaceDialog.findInput.select();
- gReplaceDialog.findInput.focus();
- return false;
- }
- return true;
-}
-
-function onReplace()
-{
- if (!gEditor)
- return false;
-
- // Does the current selection match the find string?
- var selection = gEditor.selection;
-
- var selStr = selection.toString();
- var specStr = gReplaceDialog.findInput.value;
- if (!gReplaceDialog.caseSensitive.checked)
- {
- selStr = selStr.toLowerCase();
- specStr = specStr.toLowerCase();
- }
- // Unfortunately, because of whitespace we can't just check
- // whether (selStr == specStr), but have to loop ourselves.
- // N chars of whitespace in specStr can match any M >= N in selStr.
- var matches = true;
- var specLen = specStr.length;
- var selLen = selStr.length;
- if (selLen < specLen)
- matches = false;
- else
- {
- var specArray = specStr.match(/\S+|\s+/g);
- var selArray = selStr.match(/\S+|\s+/g);
- if ( specArray.length != selArray.length)
- matches = false;
- else
- {
- for (var i=0; i<selArray.length; i++)
- {
- if (selArray[i] != specArray[i])
- {
- if ( /\S/.test(selArray[i][0]) || /\S/.test(specArray[i][0]) )
- {
- // not a space chunk -- match fails
- matches = false;
- break;
- }
- else if ( selArray[i].length < specArray[i].length )
- {
- // if it's a space chunk then we only care that sel be
- // at least as long as spec
- matches = false;
- break;
- }
- }
- }
- }
- }
-
- // If the current selection doesn't match the pattern,
- // then we want to find the next match, but not do the replace.
- // That's what most other apps seem to do.
- // So here, just return.
- if (!matches)
- return false;
-
- // Transfer dialog contents to the find service.
- saveFindData();
-
- // For reverse finds, need to remember the caret position
- // before current selection
- var newRange;
- if (gReplaceDialog.searchBackwards.checked && selection.rangeCount > 0)
- {
- newRange = selection.getRangeAt(0).cloneRange();
- newRange.collapse(true);
- }
-
- // nsPlaintextEditor::InsertText fails if the string is empty,
- // so make that a special case:
- var replStr = gReplaceDialog.replaceInput.value;
- if (replStr == "")
- gEditor.deleteSelection(gEditor.eNone, gEditor.eStrip);
- else
- gEditor.insertText(replStr);
-
- // For reverse finds, need to move caret just before the replaced text
- if (gReplaceDialog.searchBackwards.checked && newRange)
- {
- gEditor.selection.removeAllRanges();
- gEditor.selection.addRange(newRange);
- }
-
- return true;
-}
-
-function onReplaceAll()
-{
- if (!gEditor)
- return;
-
- var findStr = gReplaceDialog.findInput.value;
- var repStr = gReplaceDialog.replaceInput.value;
-
- // Transfer dialog contents to the find service.
- saveFindData();
-
- var finder = Components.classes["@mozilla.org/embedcomp/rangefind;1"].createInstance().QueryInterface(Components.interfaces.nsIFind);
-
- finder.caseSensitive = gReplaceDialog.caseSensitive.checked;
- finder.findBackwards = gReplaceDialog.searchBackwards.checked;
-
- // We want the whole operation to be undoable in one swell foop,
- // so start a transaction:
- gEditor.beginTransaction();
-
- // and to make sure we close the transaction, guard against exceptions:
- try {
- // Make a range containing the current selection,
- // so we don't go past it when we wrap.
- var selection = gEditor.selection;
- var selecRange;
- if (selection.rangeCount > 0)
- selecRange = selection.getRangeAt(0);
- var origRange = selecRange.cloneRange();
-
- // We'll need a range for the whole document:
- var wholeDocRange = gEditor.document.createRange();
- var rootNode = gEditor.rootElement.QueryInterface(Components.interfaces.nsIDOMNode);
- wholeDocRange.selectNodeContents(rootNode);
-
- // And start and end points:
- var endPt = gEditor.document.createRange();
-
- if (gReplaceDialog.searchBackwards.checked)
- {
- endPt.setStart(wholeDocRange.startContainer, wholeDocRange.startOffset);
- endPt.setEnd(wholeDocRange.startContainer, wholeDocRange.startOffset);
- }
- else
- {
- endPt.setStart(wholeDocRange.endContainer, wholeDocRange.endOffset);
- endPt.setEnd(wholeDocRange.endContainer, wholeDocRange.endOffset);
- }
-
- // Find and replace from here to end (start) of document:
- var foundRange;
- var searchRange = wholeDocRange.cloneRange();
- while ((foundRange = finder.Find(findStr, searchRange,
- selecRange, endPt)) != null)
- {
- gEditor.selection.removeAllRanges();
- gEditor.selection.addRange(foundRange);
-
- // The editor will leave the caret at the end of the replaced text.
- // For reverse finds, we need it at the beginning,
- // so save the next position now.
- if (gReplaceDialog.searchBackwards.checked)
- {
- selecRange = foundRange.cloneRange();
- selecRange.setEnd(selecRange.startContainer, selecRange.startOffset);
- }
-
- // nsPlaintextEditor::InsertText fails if the string is empty,
- // so make that a special case:
- if (repStr == "")
- gEditor.deleteSelection(gEditor.eNone, gEditor.eStrip);
- else
- gEditor.insertText(repStr);
-
- // If we're going forward, we didn't save selecRange before, so do it now:
- if (!gReplaceDialog.searchBackwards.checked)
- {
- selection = gEditor.selection;
- if (selection.rangeCount <= 0) {
- gEditor.endTransaction();
- return;
- }
- selecRange = selection.getRangeAt(0).cloneRange();
- }
- }
-
- // If no wrapping, then we're done
- if (!gReplaceDialog.wrap.checked) {
- gEditor.endTransaction();
- return;
- }
-
- // If wrapping, find from start/end of document back to start point.
- if (gReplaceDialog.searchBackwards.checked)
- {
- // Collapse origRange to end
- origRange.setStart(origRange.endContainer, origRange.endOffset);
- // Set current position to document end
- selecRange.setEnd(wholeDocRange.endContainer, wholeDocRange.endOffset);
- selecRange.setStart(wholeDocRange.endContainer, wholeDocRange.endOffset);
- }
- else
- {
- // Collapse origRange to start
- origRange.setEnd(origRange.startContainer, origRange.startOffset);
- // Set current position to document start
- selecRange.setStart(wholeDocRange.startContainer,
- wholeDocRange.startOffset);
- selecRange.setEnd(wholeDocRange.startContainer, wholeDocRange.startOffset);
- }
-
- while ((foundRange = finder.Find(findStr, wholeDocRange,
- selecRange, origRange)) != null)
- {
- gEditor.selection.removeAllRanges();
- gEditor.selection.addRange(foundRange);
-
- // Save insert point for backward case
- if (gReplaceDialog.searchBackwards.checked)
- {
- selecRange = foundRange.cloneRange();
- selecRange.setEnd(selecRange.startContainer, selecRange.startOffset);
- }
-
- // nsPlaintextEditor::InsertText fails if the string is empty,
- // so make that a special case:
- if (repStr == "")
- gEditor.deleteSelection(gEditor.eNone, gEditor.eStrip);
- else
- gEditor.insertText(repStr);
-
- // Get insert point for forward case
- if (!gReplaceDialog.searchBackwards.checked)
- {
- selection = gEditor.selection;
- if (selection.rangeCount <= 0) {
- gEditor.endTransaction();
- return;
- }
- selecRange = selection.getRangeAt(0);
- }
- }
- } // end try
- catch (e) { }
-
- gEditor.endTransaction();
-}
-
-function doEnabling()
-{
- var findStr = gReplaceDialog.findInput.value;
- var repStr = gReplaceDialog.replaceInput.value;
- gReplaceDialog.enabled = findStr;
- gReplaceDialog.findNext.disabled = !findStr;
- gReplaceDialog.replace.disabled = !findStr;
- gReplaceDialog.replaceAndFind.disabled = !findStr;
- gReplaceDialog.replaceAll.disabled = !findStr;
-}
diff --git a/editor/ui/dialogs/content/EdReplace.xul b/editor/ui/dialogs/content/EdReplace.xul
deleted file mode 100644
index 307331e1a..000000000
--- a/editor/ui/dialogs/content/EdReplace.xul
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorReplace.dtd">
-
-<dialog id="replaceDlg" title="&replaceDialog.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- persist="screenX screenY"
- buttons="cancel"
- onload = "onLoad()"
- ondialogaccept="onFindNext(); return false">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdReplace.js"/>
- <stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
-
- <hbox>
- <vbox>
- <spacer class="spacer"/>
- <grid align="start">
- <columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label value="&findField.label;" accesskey="&findField.accesskey;" control="dialog.findInput"/>
- <textbox id="dialog.findInput" oninput="doEnabling();"/>
- </row>
- <row align="center">
- <label value="&replaceField.label;" accesskey="&replaceField.accesskey;" control="dialog.replaceInput"/>
- <textbox id="dialog.replaceInput" oninput="doEnabling();"/>
- </row>
- <row align="start">
- <spacer/>
- <vbox align="start">
- <spacer class="bigspacer"/>
- <checkbox id="dialog.caseSensitive" label="&caseSensitiveCheckbox.label;"
- accesskey="&caseSensitiveCheckbox.accesskey;"/>
- <checkbox id="dialog.wrap" label="&wrapCheckbox.label;"
- accesskey="&wrapCheckbox.accesskey;"/>
- <checkbox id="dialog.searchBackwards" label="&backwardsCheckbox.label;"
- accesskey="&backwardsCheckbox.accesskey;"/>
- </vbox>
- </row>
- </rows>
- </grid>
- </vbox>
- <vbox>
- <button id="findNext" label="&findNextButton.label;" accesskey="&findNextButton.accesskey;"
- oncommand="onFindNext();" default="true"/>
- <button id="replace" label="&replaceButton.label;" accesskey="&replaceButton.accesskey;"
- oncommand="onReplace();"/>
- <button id="replaceAndFind" label="&replaceAndFindButton.label;"
- accesskey="&replaceAndFindButton.accesskey;" oncommand="onReplace(); onFindNext();"/>
- <button id="replaceAll" label="&replaceAllButton.label;"
- accesskey="&replaceAllButton.accesskey;" oncommand="onReplaceAll();"/>
- <button dlgtype="cancel" label="&closeButton.label;"/>
- </vbox>
- </hbox>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdSelectProps.js b/editor/ui/dialogs/content/EdSelectProps.js
deleted file mode 100644
index 0471f824c..000000000
--- a/editor/ui/dialogs/content/EdSelectProps.js
+++ /dev/null
@@ -1,752 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Global variables
-
-var hasValue;
-var oldValue;
-var insertNew;
-var itemArray;
-var treeBoxObject;
-var treeSelection;
-var selectElement;
-var currentItem = null;
-var selectedOption = null;
-var selectedOptionCount = 0;
-
-// Utility functions
-
-function getParentIndex(index)
-{
- switch (itemArray[index].level)
- {
- case 0: return -1;
- case 1: return 0;
- }
- while (itemArray[--index].level > 1);
- return index;
-}
-
-function UpdateSelectMultiple()
-{
- if (selectedOptionCount > 1)
- {
- gDialog.selectMultiple.checked = true;
- gDialog.selectMultiple.disabled = true;
- }
- else
- gDialog.selectMultiple.disabled = false;
-}
-
-/* wrapper objects:
- * readonly attribute Node element; // DOM node (select/optgroup/option)
- * readonly attribute int level; // tree depth
- * readonly attribute boolean container; // can contain options
- * string getCellText(string col); // tree view helper
- * string cycleCell(int currentIndex); // tree view helper
- * void onFocus(); // load data into deck
- * void onBlur(); // save data from deck
- * boolean canDestroy(boolean prompt); // NB prompt not used
- * void destroy(); // post remove callback
- * void moveUp();
- * boolean canMoveDown();
- * void moveDown();
- * void appendOption(newElement, currentIndex);
- */
-
-// OPTION element wrapper object
-
-// Create a wrapper for the given element at the given level
-function optionObject(option, level)
-{
- // select an added option (when loading from document)
- if (option.hasAttribute("selected"))
- selectedOptionCount++;
- this.level = level;
- this.element = option;
-}
-
-optionObject.prototype.container = false;
-
-optionObject.prototype.getCellText = function getCellText(column)
-{
- if (column.id == "SelectSelCol")
- return "";
- if (column.id == "SelectValCol" && this.element.hasAttribute("value"))
- return this.element.getAttribute("value");
- return this.element.text;
-}
-
-optionObject.prototype.cycleCell = function cycleCell(index)
-{
- if (this.element.hasAttribute("selected"))
- {
- this.element.removeAttribute("selected");
- selectedOptionCount--;
- selectedOption = null;
- }
- else
- {
- // Different handling for multiselect lists
- if (gDialog.selectMultiple.checked || !selectedOption)
- selectedOptionCount++;
- else if (selectedOption)
- {
- selectedOption.removeAttribute("selected");
- var column = treeBoxObject.columns["SelectSelCol"];
- treeBoxObject.invalidateColumn(column);
- selectedOption = null;
- }
- this.element.setAttribute("selected", "");
- selectedOption = this.element;
- var column = treeBoxObject.columns["SelectSelCol"];
- treeBoxObject.invalidateCell(index, column);
- }
- if (currentItem == this)
- // Also update the deck
- gDialog.optionSelected.setAttribute("checked", this.element.hasAttribute("selected"));
- UpdateSelectMultiple();
-};
-
-optionObject.prototype.onFocus = function onFocus()
-{
- gDialog.optionText.value = this.element.text;
- hasValue = this.element.hasAttribute("value");
- oldValue = this.element.value;
- gDialog.optionHasValue.checked = hasValue;
- gDialog.optionValue.value = hasValue ? this.element.value : this.element.text;
- gDialog.optionSelected.checked = this.element.hasAttribute("selected");
- gDialog.optionDisabled.checked = this.element.hasAttribute("disabled");
- gDialog.selectDeck.setAttribute("selectedIndex", "2");
-};
-
-optionObject.prototype.onBlur = function onBlur()
-{
- this.element.text = gDialog.optionText.value;
- if (gDialog.optionHasValue.checked)
- this.element.value = gDialog.optionValue.value;
- else
- this.element.removeAttribute("value");
- if (gDialog.optionSelected.checked)
- this.element.setAttribute("selected", "");
- else
- this.element.removeAttribute("selected");
- if (gDialog.optionDisabled.checked)
- this.element.setAttribute("disabled", "");
- else
- this.element.removeAttribute("disabled");
-};
-
-optionObject.prototype.canDestroy = function canDestroy(prompt)
-{
- return true;
-/*return !prompt ||
- ConfirmWithTitle(GetString("DeleteOption"),
- GetString("DeleteOptionMsg"),
- GetString("DeleteOption"));*/
-};
-
-optionObject.prototype.destroy = function destroy()
-{
- // Deselect a removed option
- if (this.element.hasAttribute("selected"))
- {
- selectedOptionCount--;
- selectedOption = null;
- UpdateSelectMultiple();
- }
-};
-
-/* 4 cases:
- * a) optgroup -> optgroup
- * ... ...
- * option option
- * b) optgroup -> option
- * option optgroup
- * ... ...
- * c) option
- * option
- * d) option
- * option
- */
-
-optionObject.prototype.moveUp = function moveUp()
-{
- var i;
- var index = treeSelection.currentIndex;
- if (itemArray[index].level < itemArray[index - 1].level + itemArray[index - 1].container)
- {
- // we need to repaint the tree's lines
- treeBoxObject.invalidateRange(getParentIndex(index), index);
- // a) option is just after an optgroup, so it becomes the last child
- itemArray[index].level = 2;
- treeBoxObject.view.selectionChanged();
- }
- else
- {
- // otherwise new option level is now the same as the previous item
- itemArray[index].level = itemArray[index - 1].level;
- // swap the option with the previous item
- itemArray.splice(index, 0, itemArray.splice(--index, 1)[0]);
- }
- selectTreeIndex(index, true);
-}
-
-optionObject.prototype.canMoveDown = function canMoveDown()
-{
- // move down is not allowed on the last option if its level is 1
- return this.level > 1 || itemArray.length - treeSelection.currentIndex > 1;
-}
-
-optionObject.prototype.moveDown = function moveDown()
-{
- var i;
- var index = treeSelection.currentIndex;
- if (index + 1 == itemArray.length || itemArray[index].level > itemArray[index + 1].level)
- {
- // we need to repaint the tree's lines
- treeBoxObject.invalidateRange(getParentIndex(index), index);
- // a) option is last child of an optgroup, so it moves just after
- itemArray[index].level = 1;
- treeBoxObject.view.selectionChanged();
- }
- else
- {
- // level increases if the option was preceding an optgroup
- itemArray[index].level += itemArray[index + 1].container;
- // swap the option with the next item
- itemArray.splice(index, 0, itemArray.splice(++index, 1)[0]);
- }
- selectTreeIndex(index, true);
-}
-
-optionObject.prototype.appendOption = function appendOption(child, parent)
-{
- // special case quick check
- if (this.level == 1)
- return gDialog.appendOption(child, 0);
-
- // append the option to the parent element
- parent = getParentIndex(parent);
- return itemArray[parent].appendOption(child, parent);
-};
-
-// OPTGROUP element wrapper object
-
-function optgroupObject(optgroup)
-{
- this.element = optgroup;
-}
-
-optgroupObject.prototype.level = 1;
-
-optgroupObject.prototype.container = true;
-
-optgroupObject.prototype.getCellText = function getCellText(column)
-{
- return column.id == "SelectTextCol" ? this.element.label : "";
-}
-
-optgroupObject.prototype.cycleCell = function cycleCell(index)
-{
-};
-
-optgroupObject.prototype.onFocus = function onFocus()
-{
- gDialog.optgroupLabel.value = this.element.label;
- gDialog.optgroupDisabled.checked = this.element.disabled;
- gDialog.selectDeck.setAttribute("selectedIndex", "1");
-};
-
-optgroupObject.prototype.onBlur = function onBlur()
-{
- this.element.label = gDialog.optgroupLabel.value;
- this.element.disabled = gDialog.optgroupDisabled.checked;
-};
-
-optgroupObject.prototype.canDestroy = function canDestroy(prompt)
-{
- // Only removing empty option groups for now
- return gDialog.nextChild(treeSelection.currentIndex) - treeSelection.currentIndex == 1;
-/*&& (!prompt ||
- ConfirmWithTitle(GetString("DeleteOptGroup"),
- GetString("DeleteOptGroupMsg"),
- GetString("DeleteOptGroup")));
-*/
-};
-
-optgroupObject.prototype.destroy = function destroy()
-{
-};
-
-optgroupObject.prototype.moveUp = function moveUp()
-{
- // Find the index of the previous and next elements at the same level
- var index = treeSelection.currentIndex;
- var i = index;
- while (itemArray[--index].level > 1);
- var j = gDialog.nextChild(i);
- // Cut out the element, cut the array in two, then join together
- var movedItems = itemArray.splice(i, j - i);
- var endItems = itemArray.splice(index);
- itemArray = itemArray.concat(movedItems).concat(endItems);
- // Repaint the lot
- treeBoxObject.invalidateRange(index, j);
- selectTreeIndex(index, true);
-}
-
-optgroupObject.prototype.canMoveDown = function canMoveDown()
-{
- return gDialog.lastChild() > treeSelection.currentIndex;
-}
-
-optgroupObject.prototype.moveDown = function moveDown()
-{
- // Find the index of the next two elements at the same level
- var index = treeSelection.currentIndex;
- var i = gDialog.nextChild(index);
- var j = gDialog.nextChild(i);
- // Cut out the element, cut the array in two, then join together
- var movedItems = itemArray.splice(i, j - 1);
- var endItems = itemArray.splice(index);
- itemArray = itemArray.concat(movedItems).concat(endItems);
- // Repaint the lot
- treeBoxObject.invalidateRange(index, j);
- index += j - i;
- selectTreeIndex(index, true);
-}
-
-optgroupObject.prototype.appendOption = function appendOption(child, parent)
-{
- var index = gDialog.nextChild(parent);
- // XXX need to repaint the lines, tree won't do this
- var primaryCol = treeBoxObject.columns.getPrimaryColumn();
- treeBoxObject.invalidateCell(index - 1, primaryCol);
- // insert the wrapped object as the last child
- itemArray.splice(index, 0, new optionObject(child, 2));
- treeBoxObject.rowCountChanged(index, 1);
- selectTreeIndex(index, false);
-};
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- // Get a single selected select element
- const kTagName = "select";
- try {
- selectElement = editor.getSelectedElement(kTagName);
- } catch (e) {}
-
- if (selectElement)
- // We found an element and don't need to insert one
- insertNew = false;
- else
- {
- insertNew = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- selectElement = editor.createElementWithDefaults(kTagName);
- } catch (e) {}
-
- if(!selectElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- }
-
- // SELECT element wrapper object
- gDialog = {
- // useful elements
- accept: document.documentElement.getButton("accept"),
- selectDeck: document.getElementById("SelectDeck"),
- selectName: document.getElementById("SelectName"),
- selectSize: document.getElementById("SelectSize"),
- selectMultiple: document.getElementById("SelectMultiple"),
- selectDisabled: document.getElementById("SelectDisabled"),
- selectTabIndex: document.getElementById("SelectTabIndex"),
- optgroupLabel: document.getElementById("OptGroupLabel"),
- optgroupDisabled: document.getElementById("OptGroupDisabled"),
- optionText: document.getElementById("OptionText"),
- optionHasValue: document.getElementById("OptionHasValue"),
- optionValue: document.getElementById("OptionValue"),
- optionSelected: document.getElementById("OptionSelected"),
- optionDisabled: document.getElementById("OptionDisabled"),
- removeButton: document.getElementById("RemoveButton"),
- previousButton: document.getElementById("PreviousButton"),
- nextButton: document.getElementById("NextButton"),
- tree: document.getElementById("SelectTree"),
- // wrapper methods (except MoveUp and MoveDown)
- element: selectElement.cloneNode(false),
- level: 0,
- container: true,
- getCellText: function getCellText(column)
- {
- return column.id == "SelectTextCol" ? this.element.getAttribute("name") : "";
- },
- cycleCell: function cycleCell(index) {},
- onFocus: function onFocus()
- {
- gDialog.selectName.value = this.element.getAttribute("name");
- gDialog.selectSize.value = this.element.getAttribute("size");
- gDialog.selectMultiple.checked = this.element.hasAttribute("multiple");
- gDialog.selectDisabled.checked = this.element.hasAttribute("disabled");
- gDialog.selectTabIndex.value = this.element.getAttribute("tabindex");
- this.selectDeck.setAttribute("selectedIndex", "0");
- onNameInput();
- },
- onBlur: function onBlur()
- {
- this.element.setAttribute("name", gDialog.selectName.value);
- if (gDialog.selectSize.value)
- this.element.setAttribute("size", gDialog.selectSize.value);
- else
- this.element.removeAttribute("size");
- if (gDialog.selectMultiple.checked)
- this.element.setAttribute("multiple", "");
- else
- this.element.removeAttribute("multiple");
- if (gDialog.selectDisabled.checked)
- this.element.setAttribute("disabled", "");
- else
- this.element.removeAttribute("disabled");
- if (gDialog.selectTabIndex.value)
- this.element.setAttribute("tabindex", gDialog.selectTabIndex.value);
- else
- this.element.removeAttribute("tabindex");
- },
- appendOption: function appendOption(child, parent)
- {
- var index = itemArray.length;
- // XXX need to repaint the lines, tree won't do this
- treeBoxObject.invalidateRange(this.lastChild(), index);
- // append the wrapped object
- itemArray.push(new optionObject(child, 1));
- treeBoxObject.rowCountChanged(index, 1);
- selectTreeIndex(index, false);
- },
- canDestroy: function canDestroy(prompt)
- {
- return false;
- },
- canMoveDown: function canMoveDown()
- {
- return false;
- },
- // helper methods
- // Find the index of the next immediate child of the select
- nextChild: function nextChild(index)
- {
- while (++index < itemArray.length && itemArray[index].level > 1);
- return index;
- },
- // Find the index of the last immediate child of the select
- lastChild: function lastChild()
- {
- var index = itemArray.length;
- while (itemArray[--index].level > 1);
- return index;
- }
- }
- // Start with the <select> wrapper
- itemArray = [gDialog];
-
- // We modify the actual option and optgroup elements so clone them first
- for (var child = selectElement.firstChild; child; child = child.nextSibling)
- {
- if (child.tagName == "OPTION")
- itemArray.push(new optionObject(child.cloneNode(true), 1));
- else if (child.tagName == "OPTGROUP")
- {
- itemArray.push(new optgroupObject(child.cloneNode(false)));
- for (var grandchild = child.firstChild; grandchild; grandchild = grandchild.nextSibling)
- if (grandchild.tagName == "OPTION")
- itemArray.push(new optionObject(grandchild.cloneNode(true), 2));
- }
- }
-
- UpdateSelectMultiple();
-
- // Define a custom view for the tree
- treeBoxObject = gDialog.tree.treeBoxObject;
- treeBoxObject.view = {
- QueryInterface : function QueryInterface(aIID)
- {
- if (aIID.equals(Components.interfaces.nsITreeView) ||
- aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
- aIID.equals(Components.interfaces.nsISupports))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
- // useful for debugging
- get wrappedJSObject() { return this; },
- get rowCount() { return itemArray.length; },
- get selection() { return treeSelection; },
- set selection(selection) { return treeSelection = selection; },
- getRowProperties: function getRowProperties(index) { return ""; },
- // could have used a wrapper for this
- getCellProperties: function getCellProperties(index, column)
- {
- if (column.id == "SelectSelCol" && !itemArray[index].container)
- return "checked-" + itemArray[index].element.hasAttribute("selected");
- return "";
- },
- getColumnProperties: function getColumnProperties(column) { return ""; },
- // get info from wrapper
- isContainer: function isContainer(index) { return itemArray[index].container; },
- isContainerOpen: function isContainerOpen(index) { return true; },
- isContainerEmpty: function isContainerEmpty(index) { return true; },
- isSeparator: function isSeparator(index) { return false; },
- isSorted: function isSorted() { return false; },
- // d&d not implemented yet!
- canDrop: function canDrop(index, orientation) { return false; },
- drop: function drop(index, orientation) { alert('drop:' + index + ',' + orientation); },
- // same as the global helper
- getParentIndex: getParentIndex,
- // tree needs to know when to paint lines
- hasNextSibling: function hasNextSibling(index, after)
- {
- if (!index)
- return false;
- var level = itemArray[index].level;
- while (++after < itemArray.length)
- switch (level - itemArray[after].level)
- {
- case 1: return false;
- case 0: return true;
- }
- return false;
- },
- getLevel: function getLevel(index) { return itemArray[index].level; },
- getImageSrc: function getImageSrc(index, column) { },
- getProgressMode : function getProgressMode(index,column) { },
- getCellValue: function getCellValue(index, column) { },
- getCellText: function getCellText(index, column) { return itemArray[index].getCellText(column); },
- setTree: function setTree(tree) { this.tree = tree; },
- toggleOpenState: function toggleOpenState(index) { },
- cycleHeader: function cycleHeader(col) { },
- selectionChanged: function selectionChanged()
- {
- // Save current values and update buttons and deck
- if (currentItem)
- currentItem.onBlur();
- var currentIndex = treeSelection.currentIndex;
- currentItem = itemArray[currentIndex];
- gDialog.removeButton.disabled = !currentItem.canDestroy();
- gDialog.previousButton.disabled = currentIndex < 2;
- gDialog.nextButton.disabled = !currentItem.canMoveDown();
- // For Advanced Edit
- globalElement = currentItem.element;
- currentItem.onFocus();
- },
- cycleCell: function cycleCell(index, column) { itemArray[index].cycleCell(index); },
- isEditable: function isEditable(index, column) { return false; },
- isSelectable: function isSelectable(index, column) { return false; },
- performAction: function performAction(action) { },
- performActionOnCell: function performActionOnCell(action, index, column) { }
- };
- treeSelection.select(0);
- currentItem = gDialog;
- //onNameInput();
-
- SetTextboxFocus(gDialog.selectName);
-
- SetWindowLocation();
-}
-
-// Called from Advanced Edit
-function InitDialog()
-{
- currentItem.onFocus();
-}
-
-// Called from Advanced Edit
-function ValidateData()
-{
- currentItem.onBlur();
- return true;
-}
-
-function onAccept()
-{
- // All values are valid - copy to actual element in doc or
- // element created to insert
- ValidateData();
-
- var editor = GetCurrentEditor();
-
- // Coalesce into one undo transaction
- editor.beginTransaction();
-
- try
- {
- editor.cloneAttributes(selectElement, gDialog.element);
-
- if (insertNew)
- // 'true' means delete the selection before inserting
- editor.insertElementAtSelection(selectElement, true);
-
- editor.setShouldTxnSetSelection(false);
-
- while (selectElement.lastChild)
- editor.deleteNode(selectElement.lastChild);
-
- var offset = 0;
- for (var i = 1; i < itemArray.length; i++)
- if (itemArray[i].level > 1)
- selectElement.lastChild.appendChild(itemArray[i].element);
- else
- editor.insertNode(itemArray[i].element, selectElement, offset++, true);
-
- editor.setShouldTxnSetSelection(true);
- }
- finally
- {
- editor.endTransaction();
- }
-
- SaveWindowLocation();
-
- return true;
-}
-
-// Button actions
-function AddOption()
-{
- currentItem.appendOption(GetCurrentEditor().createElementWithDefaults("option"), treeSelection.currentIndex);
- SetTextboxFocus(gDialog.optionText);
-}
-
-function AddOptGroup()
-{
- var optgroupElement = GetCurrentEditor().createElementWithDefaults("optgroup");
- var index = itemArray.length;
- // XXX need to repaint the lines, tree won't do this
- treeBoxObject.invalidateRange(gDialog.lastChild(), index);
- // append the wrapped object
- itemArray.push(new optgroupObject(optgroupElement));
- treeBoxObject.rowCountChanged(index, 1);
- selectTreeIndex(index, false);
- SetTextboxFocus(gDialog.optgroupLabel);
-}
-
-function RemoveElement()
-{
- if (currentItem.canDestroy(true))
- {
- // Only removing empty option groups for now
- var index = treeSelection.currentIndex;
- var level = itemArray[index].level;
- // Perform necessary cleanup and remove the wrapper
- itemArray[index].destroy();
- itemArray.splice(index, 1);
- --index;
- // XXX need to repaint the lines, tree won't do this
- if (level == 1) {
- var last = gDialog.lastChild();
- if (index > last)
- treeBoxObject.invalidateRange(last, index);
- }
- selectTreeIndex(index, true);
- treeBoxObject.rowCountChanged(++index, -1);
- }
-}
-
-// Event handler
-function onTreeKeyUp(event)
-{
- if (event.keyCode == event.DOM_VK_SPACE)
- currentItem.cycleCell();
-}
-
-function onNameInput()
-{
- var disabled = !gDialog.selectName.value;
- if (gDialog.accept.disabled != disabled)
- gDialog.accept.disabled = disabled;
- gDialog.element.setAttribute("name", gDialog.selectName.value);
- // repaint the tree
- var primaryCol = treeBoxObject.columns.getPrimaryColumn();
- treeBoxObject.invalidateCell(treeSelection.currentIndex, primaryCol);
-}
-
-function onLabelInput()
-{
- currentItem.element.setAttribute("label", gDialog.optgroupLabel.value);
- // repaint the tree
- var primaryCol = treeBoxObject.columns.getPrimaryColumn();
- treeBoxObject.invalidateCell(treeSelection.currentIndex, primaryCol);
-}
-
-function onTextInput()
-{
- currentItem.element.text = gDialog.optionText.value;
- // repaint the tree
- if (hasValue) {
- var primaryCol = treeBoxObject.columns.getPrimaryColumn();
- treeBoxObject.invalidateCell(treeSelection.currentIndex, primaryCol);
- }
- else
- {
- gDialog.optionValue.value = gDialog.optionText.value;
- treeBoxObject.invalidateRow(treeSelection.currentIndex);
- }
-}
-
-function onValueInput()
-{
- gDialog.optionHasValue.checked = hasValue = true;
- oldValue = gDialog.optionValue.value;
- currentItem.element.setAttribute("value", oldValue);
- // repaint the tree
- var column = treeBoxObject.columns["SelectValCol"];
- treeBoxObject.invalidateCell(treeSelection.currentIndex, column);
-}
-
-function onHasValueClick()
-{
- hasValue = gDialog.optionHasValue.checked;
- if (hasValue)
- {
- gDialog.optionValue.value = oldValue;
- currentItem.element.setAttribute("value", oldValue);
- }
- else
- {
- oldValue = gDialog.optionValue.value;
- gDialog.optionValue.value = gDialog.optionText.value;
- currentItem.element.removeAttribute("value");
- }
- // repaint the tree
- var column = treeBoxObject.columns["SelectValCol"];
- treeBoxObject.invalidateCell(treeSelection.currentIndex, column);
-}
-
-function onSelectMultipleClick()
-{
- // Recalculate the unique selected option if we need it and have lost it
- if (!gDialog.selectMultiple.checked && selectedOptionCount == 1 && !selectedOption)
- for (var i = 1; !(selectedOption = itemArray[i].element).hasAttribute("selected"); i++);
-}
-
-function selectTreeIndex(index, focus)
-{
- treeSelection.select(index);
- treeBoxObject.ensureRowIsVisible(index);
- if (focus)
- gDialog.tree.focus();
-}
diff --git a/editor/ui/dialogs/content/EdSelectProps.xul b/editor/ui/dialogs/content/EdSelectProps.xul
deleted file mode 100644
index 94786fe87..000000000
--- a/editor/ui/dialogs/content/EdSelectProps.xul
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorSelectProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdSelectProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <!-- Setting rows="7" on tree isn't working, equalsize vbox sets tree height. -->
- <vbox equalsize="always">
- <tree id="SelectTree" onselect="treeBoxObject.view.selectionChanged();" onkeyup="onTreeKeyUp(event);">
- <treecols id="SelectCols">
- <treecol id="SelectTextCol" flex="3" label="&TextHeader.label;" primary="true"/>
- <splitter class="tree-splitter"/>
- <treecol id="SelectValCol" flex="2" label="&ValueHeader.label;"/>
- <treecol id="SelectSelCol" label="&SelectedHeader.label;" cycler="true"/>
- </treecols>
-
- <treechildren id="SelectTreeChildren"/>
- </tree>
-
- <hbox flex="1">
- <deck flex="1" id="SelectDeck" index="0">
- <groupbox flex="1"><caption label="&Select.label;"/>
- <grid flex="1"><columns><column flex="1"/><column/></columns>
- <rows>
- <row align="center">
- <label control="SelectName" value="&SelectName.label;" accesskey="&SelectName.accesskey;"/>
- <textbox id="SelectName" flex="1" oninput="onNameInput();"/>
- </row>
- <row align="center">
- <label control="SelectSize" value="&SelectSize.label;" accesskey="&SelectSize.accesskey;"/>
- <hbox>
- <textbox id="SelectSize" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- <row>
- <spacer/>
- <checkbox id="SelectMultiple" flex="1" label="&SelectMultiple.label;" accesskey="&SelectMultiple.accesskey;" oncommand="onSelectMultipleClick();"/>
- </row>
- <row>
- <spacer/>
- <checkbox id="SelectDisabled" flex="1" label="&SelectDisabled.label;" accesskey="&SelectDisabled.accesskey;"/>
- </row>
- <row align="center">
- <label control="SelectTabIndex" value="&SelectTabIndex.label;" accesskey="&SelectTabIndex.accesskey;"/>
- <hbox>
- <textbox id="SelectTabIndex" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <groupbox flex="1"><caption label="&OptGroup.label;"/>
- <grid flex="1"><columns><column flex="1"/><column/></columns>
- <rows>
- <row align="center">
- <label control="OptGroupLabel" value="&OptGroupLabel.label;" accesskey="&OptGroupLabel.accesskey;"/>
- <textbox id="OptGroupLabel" oninput="onLabelInput();"/>
- </row>
- <row>
- <spacer/>
- <checkbox id="OptGroupDisabled" label="&OptGroupDisabled.label;" accesskey="&OptGroupDisabled.accesskey;"/>
- </row>
- </rows>
- </grid>
- </groupbox>
-
- <groupbox flex="1"><caption label="&Option.label;"/>
- <grid flex="1"><columns><column flex="1"/><column/></columns>
- <rows>
- <row align="center">
- <label control="OptionText" value="&OptionText.label;" accesskey="&OptionText.accesskey;"/>
- <textbox id="OptionText" oninput="onTextInput();"/>
- </row>
- <row align="center">
- <checkbox id="OptionHasValue" label="&OptionValue.label;" accesskey="&OptionValue.accesskey;" oncommand="onHasValueClick();"/>
- <textbox id="OptionValue" oninput="onValueInput();"/>
- </row>
- <row>
- <spacer/>
- <checkbox id="OptionSelected" label="&OptionSelected.label;" accesskey="&OptionSelected.accesskey;" oncommand="currentItem.cycleCell();"/>
- </row>
- <row>
- <spacer/>
- <checkbox id="OptionDisabled" label="&OptionDisabled.label;" accesskey="&OptionDisabled.accesskey;"/>
- </row>
- </rows>
- </grid>
- </groupbox>
- </deck>
-
- <vbox>
- <button label="&AddOption.label;" accesskey="&AddOption.accesskey;" oncommand="AddOption();"/>
- <button label="&AddOptGroup.label;" accesskey="&AddOptGroup.accesskey;" oncommand="AddOptGroup();"/>
- <button id="RemoveButton" label="&RemoveElement.label;" accesskey="&RemoveElement.accesskey;"
- oncommand="RemoveElement();" disabled="true"/>
- <button id="PreviousButton" label="&MoveElementUp.label;" accesskey="&MoveElementUp.accesskey;"
- oncommand="currentItem.moveUp();" disabled="true" type="row"/>
- <button id="NextButton" label="&MoveElementDown.label;" accesskey="&MoveElementDown.accesskey;"
- oncommand="currentItem.moveDown();" disabled="true" type="row"/>
- <spacer flex="1"/>
- <button id="AdvancedEditButton"/>
- </vbox>
- </hbox>
- </vbox>
-
- <separator class="groove"/>
-
-</dialog>
diff --git a/editor/ui/dialogs/content/EdSpellCheck.js b/editor/ui/dialogs/content/EdSpellCheck.js
deleted file mode 100644
index 7f355ac4c..000000000
--- a/editor/ui/dialogs/content/EdSpellCheck.js
+++ /dev/null
@@ -1,522 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
-
-var gMisspelledWord;
-var gSpellChecker = null;
-var gAllowSelectWord = true;
-var gPreviousReplaceWord = "";
-var gFirstTime = true;
-var gLastSelectedLang = null;
-var gDictCount = 0;
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- window.close();
- return;
- }
-
- // Get the spellChecker shell
- gSpellChecker = Components.classes['@mozilla.org/editor/editorspellchecker;1'].createInstance(Components.interfaces.nsIEditorSpellCheck);
- if (!gSpellChecker)
- {
- dump("SpellChecker not found!!!\n");
- window.close();
- return;
- }
-
- // Start the spell checker module.
- try {
- // TxtSrv Filter Contract Id
- var filterContractId;
- var skipBlockQuotes = window.arguments[1];
- var enableSelectionChecking = window.arguments[2];
-
- if (skipBlockQuotes)
- filterContractId = "@mozilla.org/editor/txtsrvfiltermail;1";
- else
- filterContractId = "@mozilla.org/editor/txtsrvfilter;1";
-
- gSpellChecker.setFilter(Components.classes[filterContractId].createInstance(Components.interfaces.nsITextServicesFilter));
- gSpellChecker.InitSpellChecker(editor, enableSelectionChecking, spellCheckStarted);
-
- }
- catch(ex) {
- dump("*** Exception error: InitSpellChecker\n");
- window.close();
- return;
- }
-}
-
-function spellCheckStarted() {
- gDialog.MisspelledWordLabel = document.getElementById("MisspelledWordLabel");
- gDialog.MisspelledWord = document.getElementById("MisspelledWord");
- gDialog.ReplaceButton = document.getElementById("Replace");
- gDialog.IgnoreButton = document.getElementById("Ignore");
- gDialog.StopButton = document.getElementById("Stop");
- gDialog.CloseButton = document.getElementById("Close");
- gDialog.ReplaceWordInput = document.getElementById("ReplaceWordInput");
- gDialog.SuggestedList = document.getElementById("SuggestedList");
- gDialog.LanguageMenulist = document.getElementById("LanguageMenulist");
-
- // Fill in the language menulist and sync it up
- // with the spellchecker's current language.
-
- var curLang;
-
- try {
- curLang = gSpellChecker.GetCurrentDictionary();
- } catch(ex) {
- curLang = "";
- }
-
- InitLanguageMenu(curLang);
-
- // Get the first misspelled word and setup all UI
- NextWord();
-
- // When startup param is true, setup different UI when spell checking
- // just before sending mail message
- if (window.arguments[0])
- {
- // If no misspelled words found, simply close dialog and send message
- if (!gMisspelledWord)
- {
- onClose();
- return;
- }
-
- // Hide "Close" button and use "Send" instead
- gDialog.CloseButton.hidden = true;
- gDialog.CloseButton = document.getElementById("Send");
- gDialog.CloseButton.hidden = false;
- }
- else
- {
- // Normal spell checking - hide the "Stop" button
- // (Note that this button is the "Cancel" button for
- // Esc keybinding and related window close actions)
- gDialog.StopButton.hidden = true;
- }
-
- // Clear flag that determines message when
- // no misspelled word is found
- // (different message when used for the first time)
- gFirstTime = false;
-
- window.sizeToContent();
-}
-
-function InitLanguageMenu(aCurLang)
-{
-
- var o1 = {};
- var o2 = {};
-
- // Get the list of dictionaries from
- // the spellchecker.
-
- try
- {
- gSpellChecker.GetDictionaryList(o1, o2);
- }
- catch(ex)
- {
- dump("Failed to get DictionaryList!\n");
- return;
- }
-
- var dictList = o1.value;
- var count = o2.value;
-
- // If we're not just starting up and dictionary count
- // hasn't changed then no need to update the menu.
- if (gDictCount == count)
- return;
-
- // Store current dictionary count.
- gDictCount = count;
-
- var inlineSpellChecker = new InlineSpellChecker();
- var sortedList = inlineSpellChecker.sortDictionaryList(dictList);
-
- // Remove any languages from the list.
- var languageMenuPopup = gDialog.LanguageMenulist.firstChild;
- while (languageMenuPopup.firstChild.localName != "menuseparator")
- languageMenuPopup.firstChild.remove();
-
- var defaultItem = null;
-
- for (var i = 0; i < count; i++)
- {
- var item = gDialog.LanguageMenulist.insertItemAt(i, sortedList[i].label, sortedList[i].id);
- if (aCurLang && sortedList[i].id == aCurLang)
- defaultItem = item;
- }
-
- // Now make sure the correct item in the menu list is selected.
- if (defaultItem)
- {
- gDialog.LanguageMenulist.selectedItem = defaultItem;
- gLastSelectedLang = defaultItem;
- }
-}
-
-function DoEnabling()
-{
- if (!gMisspelledWord)
- {
- // No more misspelled words
- gDialog.MisspelledWord.setAttribute("value",GetString( gFirstTime ? "NoMisspelledWord" : "CheckSpellingDone"));
-
- gDialog.ReplaceButton.removeAttribute("default");
- gDialog.IgnoreButton.removeAttribute("default");
-
- gDialog.CloseButton.setAttribute("default","true");
- // Shouldn't have to do this if "default" is true?
- gDialog.CloseButton.focus();
-
- SetElementEnabledById("MisspelledWordLabel", false);
- SetElementEnabledById("ReplaceWordLabel", false);
- SetElementEnabledById("ReplaceWordInput", false);
- SetElementEnabledById("CheckWord", false);
- SetElementEnabledById("SuggestedListLabel", false);
- SetElementEnabledById("SuggestedList", false);
- SetElementEnabledById("Ignore", false);
- SetElementEnabledById("IgnoreAll", false);
- SetElementEnabledById("Replace", false);
- SetElementEnabledById("ReplaceAll", false);
- SetElementEnabledById("AddToDictionary", false);
- } else {
- SetElementEnabledById("MisspelledWordLabel", true);
- SetElementEnabledById("ReplaceWordLabel", true);
- SetElementEnabledById("ReplaceWordInput", true);
- SetElementEnabledById("CheckWord", true);
- SetElementEnabledById("SuggestedListLabel", true);
- SetElementEnabledById("SuggestedList", true);
- SetElementEnabledById("Ignore", true);
- SetElementEnabledById("IgnoreAll", true);
- SetElementEnabledById("AddToDictionary", true);
-
- gDialog.CloseButton.removeAttribute("default");
- SetReplaceEnable();
- }
-}
-
-function NextWord()
-{
- gMisspelledWord = gSpellChecker.GetNextMisspelledWord();
- SetWidgetsForMisspelledWord();
-}
-
-function SetWidgetsForMisspelledWord()
-{
- gDialog.MisspelledWord.setAttribute("value", gMisspelledWord);
-
-
- // Initial replace word is misspelled word
- gDialog.ReplaceWordInput.value = gMisspelledWord;
- gPreviousReplaceWord = gMisspelledWord;
-
- // This sets gDialog.ReplaceWordInput to first suggested word in list
- FillSuggestedList(gMisspelledWord);
-
- DoEnabling();
-
- if (gMisspelledWord)
- SetTextboxFocus(gDialog.ReplaceWordInput);
-}
-
-function CheckWord()
-{
- var word = gDialog.ReplaceWordInput.value;
- if (word)
- {
- if (gSpellChecker.CheckCurrentWord(word))
- {
- FillSuggestedList(word);
- SetReplaceEnable();
- }
- else
- {
- ClearListbox(gDialog.SuggestedList);
- var item = gDialog.SuggestedList.appendItem(GetString("CorrectSpelling"), "");
- if (item) item.setAttribute("disabled", "true");
- // Suppress being able to select the message text
- gAllowSelectWord = false;
- }
- }
-}
-
-function SelectSuggestedWord()
-{
- if (gAllowSelectWord)
- {
- var selectedItem
- if (gDialog.SuggestedList.selectedItem)
- {
- var selValue = gDialog.SuggestedList.selectedItem.getAttribute("label");
- gDialog.ReplaceWordInput.value = selValue;
- gPreviousReplaceWord = selValue;
- }
- else
- {
- gDialog.ReplaceWordInput.value = gPreviousReplaceWord;
- }
- SetReplaceEnable();
- }
-}
-
-function ChangeReplaceWord()
-{
- // Calling this triggers SelectSuggestedWord(),
- // so temporarily suppress the effect of that
- var saveAllow = gAllowSelectWord;
- gAllowSelectWord = false;
-
- // Select matching word in list
- var newIndex = -1;
- var newSelectedItem;
- var replaceWord = TrimString(gDialog.ReplaceWordInput.value);
- if (replaceWord)
- {
- for (var i = 0; i < gDialog.SuggestedList.getRowCount(); i++)
- {
- var item = gDialog.SuggestedList.getItemAtIndex(i);
- if (item.getAttribute("label") == replaceWord)
- {
- newSelectedItem = item;
- break;
- }
- }
- }
- gDialog.SuggestedList.selectedItem = newSelectedItem;
-
- gAllowSelectWord = saveAllow;
-
- // Remember the new word
- gPreviousReplaceWord = gDialog.ReplaceWordInput.value;
-
- SetReplaceEnable();
-}
-
-function Ignore()
-{
- NextWord();
-}
-
-function IgnoreAll()
-{
- if (gMisspelledWord) {
- gSpellChecker.IgnoreWordAllOccurrences(gMisspelledWord);
- }
- NextWord();
-}
-
-function Replace(newWord)
-{
- if (!newWord)
- return;
-
- if (gMisspelledWord && gMisspelledWord != newWord)
- {
- var editor = GetCurrentEditor();
- editor.beginTransaction();
- try {
- gSpellChecker.ReplaceWord(gMisspelledWord, newWord, false);
- } catch (e) {}
- editor.endTransaction();
- }
- NextWord();
-}
-
-function ReplaceAll()
-{
- var newWord = gDialog.ReplaceWordInput.value;
- if (gMisspelledWord && gMisspelledWord != newWord)
- {
- var editor = GetCurrentEditor();
- editor.beginTransaction();
- try {
- gSpellChecker.ReplaceWord(gMisspelledWord, newWord, true);
- } catch (e) {}
- editor.endTransaction();
- }
- NextWord();
-}
-
-function AddToDictionary()
-{
- if (gMisspelledWord) {
- gSpellChecker.AddWordToDictionary(gMisspelledWord);
- }
- NextWord();
-}
-
-function EditDictionary()
-{
- window.openDialog("chrome://editor/content/EdDictionary.xul", "_blank", "chrome,close,titlebar,modal", "", gMisspelledWord);
-}
-
-function SelectLanguage()
-{
- var item = gDialog.LanguageMenulist.selectedItem;
- if (item.value != "more-cmd") {
- gSpellChecker.SetCurrentDictionary(item.value);
- // For compose windows we need to set the "lang" attribute so the
- // core editor uses the correct dictionary for the inline spell check.
- if (window.arguments[1]) {
- window.opener.document.documentElement.setAttribute("lang", item.value);
- }
- gLastSelectedLang = item;
- }
- else {
- openDictionaryList();
-
- if (gLastSelectedLang)
- gDialog.LanguageMenulist.selectedItem = gLastSelectedLang;
- }
-}
-
-function Recheck()
-{
- var recheckLanguage;
-
- function finishRecheck() {
- gSpellChecker.SetCurrentDictionary(recheckLanguage);
- gMisspelledWord = gSpellChecker.GetNextMisspelledWord();
- SetWidgetsForMisspelledWord();
- }
-
- //TODO: Should we bother to add a "Recheck" method to interface?
- try {
- recheckLanguage = gSpellChecker.GetCurrentDictionary();
- gSpellChecker.UninitSpellChecker();
- // Clear the ignore all list.
- Components.classes["@mozilla.org/spellchecker/personaldictionary;1"]
- .getService(Components.interfaces.mozIPersonalDictionary)
- .endSession();
- gSpellChecker.InitSpellChecker(GetCurrentEditor(), false, finishRecheck);
- } catch(ex) {
- Components.utils.reportError(ex);
- }
-}
-
-function FillSuggestedList(misspelledWord)
-{
- var list = gDialog.SuggestedList;
-
- // Clear the current contents of the list
- gAllowSelectWord = false;
- ClearListbox(list);
- var item;
-
- if (misspelledWord.length > 0)
- {
- // Get suggested words until an empty string is returned
- var count = 0;
- var firstWord = 0;
- do {
- var word = gSpellChecker.GetSuggestedWord();
- if (count==0)
- firstWord = word;
- if (word.length > 0)
- {
- list.appendItem(word, "");
- count++;
- }
- } while (word.length > 0);
-
- if (count == 0)
- {
- // No suggestions - show a message but don't let user select it
- item = list.appendItem(GetString("NoSuggestedWords"));
- if (item) item.setAttribute("disabled", "true");
- gAllowSelectWord = false;
- } else {
- gAllowSelectWord = true;
- // Initialize with first suggested list by selecting it
- gDialog.SuggestedList.selectedIndex = 0;
- }
- }
- else
- {
- item = list.appendItem("", "");
- if (item)
- item.setAttribute("disabled", "true");
- }
-}
-
-function SetReplaceEnable()
-{
- // Enable "Change..." buttons only if new word is different than misspelled
- var newWord = gDialog.ReplaceWordInput.value;
- var enable = newWord.length > 0 && newWord != gMisspelledWord;
- SetElementEnabledById("Replace", enable);
- SetElementEnabledById("ReplaceAll", enable);
- if (enable)
- {
- gDialog.ReplaceButton.setAttribute("default","true");
- gDialog.IgnoreButton.removeAttribute("default");
- }
- else
- {
- gDialog.IgnoreButton.setAttribute("default","true");
- gDialog.ReplaceButton.removeAttribute("default");
- }
-}
-
-function doDefault()
-{
- if (gDialog.ReplaceButton.getAttribute("default") == "true")
- Replace(gDialog.ReplaceWordInput.value);
- else if (gDialog.IgnoreButton.getAttribute("default") == "true")
- Ignore();
- else if (gDialog.CloseButton.getAttribute("default") == "true")
- onClose();
-
- return false;
-}
-
-function ExitSpellChecker()
-{
- if (gSpellChecker)
- {
- try
- {
- gSpellChecker.UninitSpellChecker();
- // now check the document over again with the new dictionary
- // if we have an inline spellchecker
- if (("InlineSpellCheckerUI" in window.opener) &&
- window.opener.InlineSpellCheckerUI.enabled)
- window.opener.InlineSpellCheckerUI.mInlineSpellChecker.spellCheckRange(null);
- }
- finally
- {
- gSpellChecker = null;
- }
- }
-}
-
-function CancelSpellCheck()
-{
- ExitSpellChecker();
-
- // Signal to calling window that we canceled
- window.opener.cancelSendMessage = true;
- return true;
-}
-
-function onClose()
-{
- ExitSpellChecker();
-
- window.opener.cancelSendMessage = false;
- window.close();
-}
diff --git a/editor/ui/dialogs/content/EdSpellCheck.xul b/editor/ui/dialogs/content/EdSpellCheck.xul
deleted file mode 100644
index c14647792..000000000
--- a/editor/ui/dialogs/content/EdSpellCheck.xul
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorSpellCheck.dtd">
-
-<!-- dialog containing a control requiring initial setup -->
-<dialog id="spellCheckDlg" buttons="cancel" title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- persist="screenX screenY"
- onload = "Startup()"
- ondialogaccept="return doDefault();"
- ondialogcancel="return CancelSpellCheck();">
-
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdSpellCheck.js"/>
- <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
-
- <broadcaster id="args" value=""/>
-
- <stringbundle id="languageBundle" src="chrome://global/locale/languageNames.properties"/>
- <stringbundle id="regionBundle" src="chrome://global/locale/regionNames.properties"/>
-
- <grid>
- <columns>
- <column class="spell-check"/>
- <column class="spell-check" flex="1"/>
- <column class="spell-check"/>
- </columns>
- <rows>
- <row align="center">
- <label id="MisspelledWordLabel" value="&misspelledWord.label;"/>
- <label class="bold" id="MisspelledWord" crop="end"/>
- <button class="spell-check" label="&recheckButton2.label;" oncommand="Recheck();"
- accesskey="&recheckButton2.accessKey;"/>
- </row>
- <row align="center">
- <label id="ReplaceWordLabel" value="&wordEditField.label;"
- control="ReplaceWordInput"
- accesskey="&wordEditField.accessKey;"/>
- <textbox id="ReplaceWordInput" oninput="ChangeReplaceWord()" flex="1"/>
- <button id="CheckWord" oncommand="CheckWord()" label="&checkwordButton.label;"
- accesskey="&checkwordButton.accessKey;"/>
- </row>
- </rows>
- </grid>
- <label id="SuggestedListLabel" value="&suggestions.label;"
- control="SuggestedList"
- accesskey="&suggestions.accessKey;"/>
- <grid flex="1">
- <columns><column flex="1"/><column/></columns>
- <rows>
- <row flex="1">
- <!-- BUG! setting class="MinWidth20em" on tree doesn't work (width=0) -->
- <listbox rows="6" id="SuggestedList" onselect="SelectSuggestedWord()"
- ondblclick="if (gAllowSelectWord) Replace(event.target.getAttribute('label'));"/>
- <vbox>
- <grid>
- <columns><column class="spell-check" flex="1"/><column class="spell-check" flex="1"/></columns>
- <rows>
- <row>
- <button id="Replace" label="&replaceButton.label;"
- oncommand="Replace(gDialog.ReplaceWordInput.value);"
- accesskey="&replaceButton.accessKey;"/>
- <button id="Ignore" oncommand="Ignore();" label="&ignoreButton.label;"
- accesskey="&ignoreButton.accessKey;"/>
- </row>
- <row>
- <button id="ReplaceAll" oncommand="ReplaceAll();" label="&replaceAllButton.label;"
- accesskey="&replaceAllButton.accessKey;"/>
- <button id="IgnoreAll" oncommand="IgnoreAll();" label="&ignoreAllButton.label;"
- accesskey="&ignoreAllButton.accessKey;"/>
- </row>
- </rows>
- </grid>
- <separator/>
- <label value="&userDictionary.label;"/>
- <hbox align="start">
- <button class="spell-check" id="AddToDictionary" oncommand="AddToDictionary()" label="&addToUserDictionaryButton.label;"
- accesskey="&addToUserDictionaryButton.accessKey;"/>
- <button class="spell-check" id="EditDictionary" oncommand="EditDictionary()" label="&editUserDictionaryButton.label;"
- accesskey="&editUserDictionaryButton.accessKey;"/>
- </hbox>
- </vbox>
- </row>
- <label value ="&languagePopup.label;"
- control="LanguageMenulist"
- accesskey="&languagePopup.accessKey;"/>
- <row>
- <menulist id="LanguageMenulist" oncommand="SelectLanguage()">
- <menupopup onpopupshowing="InitLanguageMenu(gDialog.LanguageMenulist.selectedItem.value);">
- <!-- dynamic content populated by JS -->
- <menuseparator/>
- <menuitem value="more-cmd" label="&moreDictionaries.label;"/>
- </menupopup>
- </menulist>
- <hbox flex="1">
- <button class="spell-check" dlgtype="cancel" id="Stop" label="&stopButton.label;" oncommand="CancelSpellCheck();"
- accesskey="&stopButton.accessKey;"/>
- <spacer flex="1"/>
- <button class="spell-check" id="Close" label="&closeButton.label;" oncommand="onClose();"
- accesskey="&closeButton.accessKey;"/>
- <button class="spell-check" id="Send" label="&sendButton.label;" oncommand="onClose();"
- accesskey="&sendButton.accessKey;" hidden="true"/>
- </hbox>
- </row>
- </rows>
- </grid>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdTableProps.js b/editor/ui/dialogs/content/EdTableProps.js
deleted file mode 100644
index 8b0458c6e..000000000
--- a/editor/ui/dialogs/content/EdTableProps.js
+++ /dev/null
@@ -1,1273 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-//Cancel() is in EdDialogCommon.js
-
-var gTableElement;
-var gCellElement;
-var gTableCaptionElement;
-var globalCellElement;
-var globalTableElement
-var gValidateTab;
-const defHAlign = "left";
-const centerStr = "center"; //Index=1
-const rightStr = "right"; // 2
-const justifyStr = "justify"; // 3
-const charStr = "char"; // 4
-const defVAlign = "middle";
-const topStr = "top";
-const bottomStr = "bottom";
-const bgcolor = "bgcolor";
-var gTableColor;
-var gCellColor;
-
-const cssBackgroundColorStr = "background-color";
-
-var gRowCount = 1;
-var gColCount = 1;
-var gLastRowIndex;
-var gLastColIndex;
-var gNewRowCount;
-var gNewColCount;
-var gCurRowIndex;
-var gCurColIndex;
-var gCurColSpan;
-var gSelectedCellsType = 1;
-const SELECT_CELL = 1;
-const SELECT_ROW = 2;
-const SELECT_COLUMN = 3;
-const RESET_SELECTION = 0;
-var gCellData = { value:null, startRowIndex:0, startColIndex:0, rowSpan:0, colSpan:0,
- actualRowSpan:0, actualColSpan:0, isSelected:false
- };
-var gAdvancedEditUsed;
-var gAlignWasChar = false;
-
-/*
-From C++:
- 0 TABLESELECTION_TABLE
- 1 TABLESELECTION_CELL There are 1 or more cells selected
- but complete rows or columns are not selected
- 2 TABLESELECTION_ROW All cells are in 1 or more rows
- and in each row, all cells selected
- Note: This is the value if all rows (thus all cells) are selected
- 3 TABLESELECTION_COLUMN All cells are in 1 or more columns
-*/
-
-var gSelectedCellCount = 0;
-var gApplyUsed = false;
-var gSelection;
-var gCellDataChanged = false;
-var gCanDelete = false;
-var gUseCSS = true;
-var gActiveEditor;
-
-// dialog initialization code
-function Startup()
-{
- gActiveEditor = GetCurrentTableEditor();
- if (!gActiveEditor)
- {
- window.close();
- return;
- }
-
- try {
- gSelection = gActiveEditor.selection;
- } catch (e) {}
- if (!gSelection) return;
-
- // Get dialog widgets - Table Panel
- gDialog.TableRowsInput = document.getElementById("TableRowsInput");
- gDialog.TableColumnsInput = document.getElementById("TableColumnsInput");
- gDialog.TableWidthInput = document.getElementById("TableWidthInput");
- gDialog.TableWidthUnits = document.getElementById("TableWidthUnits");
- gDialog.TableHeightInput = document.getElementById("TableHeightInput");
- gDialog.TableHeightUnits = document.getElementById("TableHeightUnits");
- try {
- if (!Services.prefs.getBoolPref("editor.use_css") || (gActiveEditor.flags & 1))
- {
- gUseCSS = false;
- var tableHeightLabel = document.getElementById("TableHeightLabel");
- tableHeightLabel.remove();
- gDialog.TableHeightInput.remove();
- gDialog.TableHeightUnits.remove();
- }
- } catch (e) {}
- gDialog.BorderWidthInput = document.getElementById("BorderWidthInput");
- gDialog.SpacingInput = document.getElementById("SpacingInput");
- gDialog.PaddingInput = document.getElementById("PaddingInput");
- gDialog.TableAlignList = document.getElementById("TableAlignList");
- gDialog.TableCaptionList = document.getElementById("TableCaptionList");
- gDialog.TableInheritColor = document.getElementById("TableInheritColor");
- gDialog.TabBox = document.getElementById("TabBox");
-
- // Cell Panel
- gDialog.SelectionList = document.getElementById("SelectionList");
- gDialog.PreviousButton = document.getElementById("PreviousButton");
- gDialog.NextButton = document.getElementById("NextButton");
- // Currently, we always apply changes and load new attributes when changing selection
- // (Let's keep this for possible future use)
- //gDialog.ApplyBeforeMove = document.getElementById("ApplyBeforeMove");
- //gDialog.KeepCurrentData = document.getElementById("KeepCurrentData");
-
- gDialog.CellHeightInput = document.getElementById("CellHeightInput");
- gDialog.CellHeightUnits = document.getElementById("CellHeightUnits");
- gDialog.CellWidthInput = document.getElementById("CellWidthInput");
- gDialog.CellWidthUnits = document.getElementById("CellWidthUnits");
- gDialog.CellHAlignList = document.getElementById("CellHAlignList");
- gDialog.CellVAlignList = document.getElementById("CellVAlignList");
- gDialog.CellInheritColor = document.getElementById("CellInheritColor");
- gDialog.CellStyleList = document.getElementById("CellStyleList");
- gDialog.TextWrapList = document.getElementById("TextWrapList");
-
- // In cell panel, user must tell us which attributes to apply via checkboxes,
- // else we would apply values from one cell to ALL in selection
- // and that's probably not what they expect!
- gDialog.CellHeightCheckbox = document.getElementById("CellHeightCheckbox");
- gDialog.CellWidthCheckbox = document.getElementById("CellWidthCheckbox");
- gDialog.CellHAlignCheckbox = document.getElementById("CellHAlignCheckbox");
- gDialog.CellVAlignCheckbox = document.getElementById("CellVAlignCheckbox");
- gDialog.CellStyleCheckbox = document.getElementById("CellStyleCheckbox");
- gDialog.TextWrapCheckbox = document.getElementById("TextWrapCheckbox");
- gDialog.CellColorCheckbox = document.getElementById("CellColorCheckbox");
- gDialog.TableTab = document.getElementById("TableTab");
- gDialog.CellTab = document.getElementById("CellTab");
- gDialog.AdvancedEditCell = document.getElementById("AdvancedEditButton2");
- // Save "normal" tooltip message for Advanced Edit button
- gDialog.AdvancedEditCellToolTipText = gDialog.AdvancedEditCell.getAttribute("tooltiptext");
-
- try {
- gTableElement = gActiveEditor.getElementOrParentByTagName("table", null);
- } catch (e) {}
- if(!gTableElement)
- {
- dump("Failed to get table element!\n");
- window.close();
- return;
- }
- globalTableElement = gTableElement.cloneNode(false);
-
- var tagNameObj = { value: "" };
- var countObj = { value : 0 };
- var tableOrCellElement;
- try {
- tableOrCellElement = gActiveEditor.getSelectedOrParentTableElement(tagNameObj, countObj);
- } catch (e) {}
-
- if (tagNameObj.value == "td")
- {
- // We are in a cell
- gSelectedCellCount = countObj.value;
- gCellElement = tableOrCellElement;
- globalCellElement = gCellElement.cloneNode(false);
-
- // Tells us whether cell, row, or column is selected
- try {
- gSelectedCellsType = gActiveEditor.getSelectedCellsType(gTableElement);
- } catch (e) {}
-
- // Ignore types except Cell, Row, and Column
- if (gSelectedCellsType < SELECT_CELL || gSelectedCellsType > SELECT_COLUMN)
- gSelectedCellsType = SELECT_CELL;
-
- // Be sure at least 1 cell is selected.
- // (If the count is 0, then we were inside the cell.)
- if (gSelectedCellCount == 0)
- DoCellSelection();
-
- // Get location in the cell map
- var rowIndexObj = { value: 0 };
- var colIndexObj = { value: 0 };
- try {
- gActiveEditor.getCellIndexes(gCellElement, rowIndexObj, colIndexObj);
- } catch (e) {}
- gCurRowIndex = rowIndexObj.value;
- gCurColIndex = colIndexObj.value;
-
- // We save the current colspan to quickly
- // move selection from from cell to cell
- if (GetCellData(gCurRowIndex, gCurColIndex))
- gCurColSpan = gCellData.colSpan;
-
- // Starting TabPanel name is passed in
- if (window.arguments[1] == "CellPanel")
- gDialog.TabBox.selectedTab = gDialog.CellTab;
- }
-
- if (gDialog.TabBox.selectedTab == gDialog.TableTab)
- {
- // We may call this with table selected, but no cell,
- // so disable the Cell Properties tab
- if(!gCellElement)
- {
- // XXX: Disabling of tabs is currently broken, so for
- // now we'll just remove the tab completely.
- //gDialog.CellTab.disabled = true;
- gDialog.CellTab.remove();
- }
- }
-
- // Note: we must use gTableElement, not globalTableElement for these,
- // thus we should not put this in InitDialog.
- // Instead, monitor desired counts with separate globals
- var rowCountObj = { value: 0 };
- var colCountObj = { value: 0 };
- try {
- gActiveEditor.getTableSize(gTableElement, rowCountObj, colCountObj);
- } catch (e) {}
-
- gRowCount = rowCountObj.value;
- gLastRowIndex = gRowCount-1;
- gColCount = colCountObj.value;
- gLastColIndex = gColCount-1;
-
-
- // Set appropriate icons and enable state for the Previous/Next buttons
- SetSelectionButtons();
-
- // If only one cell in table, disable change-selection widgets
- if (gRowCount == 1 && gColCount == 1)
- gDialog.SelectionList.setAttribute("disabled", "true");
-
- // User can change these via textboxes
- gNewRowCount = gRowCount;
- gNewColCount = gColCount;
-
- // This flag is used to control whether set check state
- // on "set attribute" checkboxes
- // (Advanced Edit dialog use calls InitDialog when done)
- gAdvancedEditUsed = false;
- InitDialog();
- gAdvancedEditUsed = true;
-
- // If first initializing, we really aren't changing anything
- gCellDataChanged = false;
-
- SetWindowLocation();
-}
-
-
-function InitDialog()
-{
- // Get Table attributes
- gDialog.TableRowsInput.value = gRowCount;
- gDialog.TableColumnsInput.value = gColCount;
- gDialog.TableWidthInput.value = InitPixelOrPercentMenulist(globalTableElement, gTableElement, "width", "TableWidthUnits", gPercent);
- if (gUseCSS) {
- gDialog.TableHeightInput.value = InitPixelOrPercentMenulist(globalTableElement, gTableElement, "height",
- "TableHeightUnits", gPercent);
- }
- gDialog.BorderWidthInput.value = globalTableElement.border;
- gDialog.SpacingInput.value = globalTableElement.cellSpacing;
- gDialog.PaddingInput.value = globalTableElement.cellPadding;
-
- var marginLeft = GetHTMLOrCSSStyleValue(globalTableElement, "align", "margin-left");
- var marginRight = GetHTMLOrCSSStyleValue(globalTableElement, "align", "margin-right");
- var halign = marginLeft.toLowerCase() + " " + marginRight.toLowerCase();
- if (halign == "center center" || halign == "auto auto")
- gDialog.TableAlignList.value = "center";
- else if (halign == "right right" || halign == "auto 0px")
- gDialog.TableAlignList.value = "right";
- else // Default = left
- gDialog.TableAlignList.value = "left";
-
- // Be sure to get caption from table in doc, not the copied "globalTableElement"
- gTableCaptionElement = gTableElement.caption;
- if (gTableCaptionElement)
- {
- var align = GetHTMLOrCSSStyleValue(gTableCaptionElement, "align", "caption-side");
- if (align != "bottom" && align != "left" && align != "right")
- align = "top";
- gDialog.TableCaptionList.value = align;
- }
-
- gTableColor = GetHTMLOrCSSStyleValue(globalTableElement, bgcolor, cssBackgroundColorStr);
- gTableColor = ConvertRGBColorIntoHEXColor(gTableColor);
- SetColor("tableBackgroundCW", gTableColor);
-
- InitCellPanel();
-}
-
-function InitCellPanel()
-{
- // Get cell attributes
- if (globalCellElement)
- {
- // This assumes order of items is Cell, Row, Column
- gDialog.SelectionList.value = gSelectedCellsType;
-
- var previousValue = gDialog.CellHeightInput.value;
- gDialog.CellHeightInput.value = InitPixelOrPercentMenulist(globalCellElement, gCellElement, "height", "CellHeightUnits", gPixel);
- gDialog.CellHeightCheckbox.checked = gAdvancedEditUsed && previousValue != gDialog.CellHeightInput.value;
-
- previousValue= gDialog.CellWidthInput.value;
- gDialog.CellWidthInput.value = InitPixelOrPercentMenulist(globalCellElement, gCellElement, "width", "CellWidthUnits", gPixel);
- gDialog.CellWidthCheckbox.checked = gAdvancedEditUsed && previousValue != gDialog.CellWidthInput.value;
-
- var previousIndex = gDialog.CellVAlignList.selectedIndex;
- var valign = GetHTMLOrCSSStyleValue(globalCellElement, "valign", "vertical-align").toLowerCase();
- if (valign == topStr || valign == bottomStr)
- gDialog.CellVAlignList.value = valign;
- else // Default = middle
- gDialog.CellVAlignList.value = defVAlign;
-
- gDialog.CellVAlignCheckbox.checked = gAdvancedEditUsed && previousIndex != gDialog.CellVAlignList.selectedIndex;
-
- previousIndex = gDialog.CellHAlignList.selectedIndex;
-
- gAlignWasChar = false;
-
- var halign = GetHTMLOrCSSStyleValue(globalCellElement, "align", "text-align").toLowerCase();
- switch (halign)
- {
- case centerStr:
- case rightStr:
- case justifyStr:
- gDialog.CellHAlignList.value = halign;
- break;
- case charStr:
- // We don't support UI for this because layout doesn't work: bug 2212.
- // Remember that's what they had so we don't change it
- // unless they change the alignment by using the menulist
- gAlignWasChar = true;
- // Fall through to use show default alignment in menu
- default:
- // Default depends on cell type (TH is "center", TD is "left")
- gDialog.CellHAlignList.value =
- (globalCellElement.nodeName.toLowerCase() == "th") ? "center" : "left";
- break;
- }
-
- gDialog.CellHAlignCheckbox.checked = gAdvancedEditUsed &&
- previousIndex != gDialog.CellHAlignList.selectedIndex;
-
- previousIndex = gDialog.CellStyleList.selectedIndex;
- gDialog.CellStyleList.value = globalCellElement.nodeName.toLowerCase();
- gDialog.CellStyleCheckbox.checked = gAdvancedEditUsed && previousIndex != gDialog.CellStyleList.selectedIndex;
-
- previousIndex = gDialog.TextWrapList.selectedIndex;
- if (GetHTMLOrCSSStyleValue(globalCellElement, "nowrap", "white-space") == "nowrap")
- gDialog.TextWrapList.value = "nowrap";
- else
- gDialog.TextWrapList.value = "wrap";
- gDialog.TextWrapCheckbox.checked = gAdvancedEditUsed && previousIndex != gDialog.TextWrapList.selectedIndex;
-
- previousValue = gCellColor;
- gCellColor = GetHTMLOrCSSStyleValue(globalCellElement, bgcolor, cssBackgroundColorStr);
- gCellColor = ConvertRGBColorIntoHEXColor(gCellColor);
- SetColor("cellBackgroundCW", gCellColor);
- gDialog.CellColorCheckbox.checked = gAdvancedEditUsed && previousValue != gCellColor;
-
- // We want to set this true in case changes came
- // from Advanced Edit dialog session (must assume something changed)
- gCellDataChanged = true;
- }
-}
-
-function GetCellData(rowIndex, colIndex)
-{
- // Get actual rowspan and colspan
- var startRowIndexObj = { value: 0 };
- var startColIndexObj = { value: 0 };
- var rowSpanObj = { value: 0 };
- var colSpanObj = { value: 0 };
- var actualRowSpanObj = { value: 0 };
- var actualColSpanObj = { value: 0 };
- var isSelectedObj = { value: false };
-
- try {
- gActiveEditor.getCellDataAt(gTableElement, rowIndex, colIndex,
- gCellData,
- startRowIndexObj, startColIndexObj,
- rowSpanObj, colSpanObj,
- actualRowSpanObj, actualColSpanObj, isSelectedObj);
- // We didn't find a cell
- if (!gCellData.value) return false;
- }
- catch(ex) {
- return false;
- }
-
- gCellData.startRowIndex = startRowIndexObj.value;
- gCellData.startColIndex = startColIndexObj.value;
- gCellData.rowSpan = rowSpanObj.value;
- gCellData.colSpan = colSpanObj.value;
- gCellData.actualRowSpan = actualRowSpanObj.value;
- gCellData.actualColSpan = actualColSpanObj.value;
- gCellData.isSelected = isSelectedObj.value;
- return true;
-}
-
-function SelectCellHAlign()
-{
- SetCheckbox("CellHAlignCheckbox");
- // Once user changes the alignment,
- // we lose their original "CharAt" alignment"
- gAlignWasChar = false;
-}
-
-function GetColorAndUpdate(ColorWellID)
-{
- var colorWell = document.getElementById(ColorWellID);
- if (!colorWell) return;
-
- var colorObj = { Type:"", TableColor:0, CellColor:0, NoDefault:false, Cancel:false, BackgroundColor:0 };
-
- switch( ColorWellID )
- {
- case "tableBackgroundCW":
- colorObj.Type = "Table";
- colorObj.TableColor = gTableColor;
- break;
- case "cellBackgroundCW":
- colorObj.Type = "Cell";
- colorObj.CellColor = gCellColor;
- break;
- }
- window.openDialog("chrome://editor/content/EdColorPicker.xul", "_blank", "chrome,close,titlebar,modal", "", colorObj);
-
- // User canceled the dialog
- if (colorObj.Cancel)
- return;
-
- switch( ColorWellID )
- {
- case "tableBackgroundCW":
- gTableColor = colorObj.BackgroundColor;
- SetColor(ColorWellID, gTableColor);
- break;
- case "cellBackgroundCW":
- gCellColor = colorObj.BackgroundColor;
- SetColor(ColorWellID, gCellColor);
- SetCheckbox('CellColorCheckbox');
- break;
- }
-}
-
-function SetColor(ColorWellID, color)
-{
- // Save the color
- if (ColorWellID == "cellBackgroundCW")
- {
- if (color)
- {
- try {
- gActiveEditor.setAttributeOrEquivalent(globalCellElement, bgcolor,
- color, true);
- } catch(e) {}
- gDialog.CellInheritColor.collapsed = true;
- }
- else
- {
- try {
- gActiveEditor.removeAttributeOrEquivalent(globalCellElement, bgcolor, true);
- } catch(e) {}
- // Reveal addition message explaining "default" color
- gDialog.CellInheritColor.collapsed = false;
- }
- }
- else
- {
- if (color)
- {
- try {
- gActiveEditor.setAttributeOrEquivalent(globalTableElement, bgcolor,
- color, true);
- } catch(e) {}
- gDialog.TableInheritColor.collapsed = true;
- }
- else
- {
- try {
- gActiveEditor.removeAttributeOrEquivalent(globalTableElement, bgcolor, true);
- } catch(e) {}
- gDialog.TableInheritColor.collapsed = false;
- }
- SetCheckbox('CellColorCheckbox');
- }
-
- setColorWell(ColorWellID, color);
-}
-
-function ChangeSelectionToFirstCell()
-{
- if (!GetCellData(0,0))
- {
- dump("Can't find first cell in table!\n");
- return;
- }
- gCellElement = gCellData.value;
- globalCellElement = gCellElement;
-
- gCurRowIndex = 0;
- gCurColIndex = 0;
- ChangeSelection(RESET_SELECTION);
-}
-
-function ChangeSelection(newType)
-{
- newType = Number(newType);
-
- if (gSelectedCellsType == newType)
- return;
-
- if (newType == RESET_SELECTION)
- // Restore selection to existing focus cell
- gSelection.collapse(gCellElement,0);
- else
- gSelectedCellsType = newType;
-
- // Keep the same focus gCellElement, just change the type
- DoCellSelection();
- SetSelectionButtons();
-
- // Note: globalCellElement should still be a clone of gCellElement
-}
-
-function MoveSelection(forward)
-{
- var newRowIndex = gCurRowIndex;
- var newColIndex = gCurColIndex;
- var focusCell;
- var inRow = false;
-
- if (gSelectedCellsType == SELECT_ROW)
- {
- newRowIndex += (forward ? 1 : -1);
-
- // Wrap around if before first or after last row
- if (newRowIndex < 0)
- newRowIndex = gLastRowIndex;
- else if (newRowIndex > gLastRowIndex)
- newRowIndex = 0;
- inRow = true;
-
- // Use first cell in row for focus cell
- newColIndex = 0;
- }
- else
- {
- // Cell or column:
- if (!forward)
- newColIndex--;
-
- if (gSelectedCellsType == SELECT_CELL)
- {
- // Skip to next cell
- if (forward)
- newColIndex += gCurColSpan;
- }
- else // SELECT_COLUMN
- {
- // Use first cell in column for focus cell
- newRowIndex = 0;
-
- // Don't skip by colspan,
- // but find first cell in next cellmap column
- if (forward)
- newColIndex++;
- }
-
- if (newColIndex < 0)
- {
- // Request is before the first cell in column
-
- // Wrap to last cell in column
- newColIndex = gLastColIndex;
-
- if (gSelectedCellsType == SELECT_CELL)
- {
- // If moving by cell, also wrap to previous...
- if (newRowIndex > 0)
- newRowIndex -= 1;
- else
- // ...or the last row
- newRowIndex = gLastRowIndex;
-
- inRow = true;
- }
- }
- else if (newColIndex > gLastColIndex)
- {
- // Request is after the last cell in column
-
- // Wrap to first cell in column
- newColIndex = 0;
-
- if (gSelectedCellsType == SELECT_CELL)
- {
- // If moving by cell, also wrap to next...
- if (newRowIndex < gLastRowIndex)
- newRowIndex++;
- else
- // ...or the first row
- newRowIndex = 0;
-
- inRow = true;
- }
- }
- }
-
- // Get the cell at the new location
- do {
- if (!GetCellData(newRowIndex, newColIndex))
- {
- dump("MoveSelection: CELL NOT FOUND\n");
- return;
- }
- if (inRow)
- {
- if (gCellData.startRowIndex == newRowIndex)
- break;
- else
- // Cell spans from a row above, look for the next cell in row
- newRowIndex += gCellData.actualRowSpan;
- }
- else
- {
- if (gCellData.startColIndex == newColIndex)
- break;
- else
- // Cell spans from a Col above, look for the next cell in column
- newColIndex += gCellData.actualColSpan;
- }
- }
- while(true);
-
- // Save data for current selection before changing
- if (gCellDataChanged) // && gDialog.ApplyBeforeMove.checked)
- {
- if (!ValidateCellData())
- return;
-
- gActiveEditor.beginTransaction();
- // Apply changes to all selected cells
- ApplyCellAttributes();
- gActiveEditor.endTransaction();
-
- SetCloseButton();
- }
-
- // Set cell and other data for new selection
- gCellElement = gCellData.value;
-
- // Save globals for new current cell
- gCurRowIndex = gCellData.startRowIndex;
- gCurColIndex = gCellData.startColIndex;
- gCurColSpan = gCellData.actualColSpan;
-
- // Copy for new global cell
- globalCellElement = gCellElement.cloneNode(false);
-
- // Change the selection
- DoCellSelection();
-
- // Scroll page so new selection is visible
- // Using SELECTION_ANCHOR_REGION makes the upper-left corner of first selected cell
- // the point to bring into view.
- try {
- var selectionController = gActiveEditor.selectionController;
- selectionController.scrollSelectionIntoView(selectionController.SELECTION_NORMAL, selectionController.SELECTION_ANCHOR_REGION, true);
- } catch (e) {}
-
- // Reinitialize dialog using new cell
-// if (!gDialog.KeepCurrentData.checked)
- // Setting this false unchecks all "set attributes" checkboxes
- gAdvancedEditUsed = false;
- InitCellPanel();
- gAdvancedEditUsed = true;
-}
-
-
-function DoCellSelection()
-{
- // Collapse selection into to the focus cell
- // so editor uses that as start cell
- gSelection.collapse(gCellElement, 0);
-
- var tagNameObj = { value: "" };
- var countObj = { value: 0 };
- try {
- switch (gSelectedCellsType)
- {
- case SELECT_CELL:
- gActiveEditor.selectTableCell();
- break
- case SELECT_ROW:
- gActiveEditor.selectTableRow();
- break;
- default:
- gActiveEditor.selectTableColumn();
- break;
- }
- // Get number of cells selected
- var tableOrCellElement = gActiveEditor.getSelectedOrParentTableElement(tagNameObj, countObj);
- } catch (e) {}
-
- if (tagNameObj.value == "td")
- gSelectedCellCount = countObj.value;
- else
- gSelectedCellCount = 0;
-
- // Currently, we can only allow advanced editing on ONE cell element at a time
- // else we ignore CSS, JS, and HTML attributes not already in dialog
- SetElementEnabled(gDialog.AdvancedEditCell, gSelectedCellCount == 1);
-
- gDialog.AdvancedEditCell.setAttribute("tooltiptext",
- gSelectedCellCount > 1 ? GetString("AdvancedEditForCellMsg") :
- gDialog.AdvancedEditCellToolTipText);
-}
-
-function SetSelectionButtons()
-{
- if (gSelectedCellsType == SELECT_ROW)
- {
- // Trigger CSS to set images of up and down arrows
- gDialog.PreviousButton.setAttribute("type","row");
- gDialog.NextButton.setAttribute("type","row");
- }
- else
- {
- // or images of left and right arrows
- gDialog.PreviousButton.setAttribute("type","col");
- gDialog.NextButton.setAttribute("type","col");
- }
- DisableSelectionButtons((gSelectedCellsType == SELECT_ROW && gRowCount == 1) ||
- (gSelectedCellsType == SELECT_COLUMN && gColCount == 1) ||
- (gRowCount == 1 && gColCount == 1));
-}
-
-function DisableSelectionButtons( disable )
-{
- gDialog.PreviousButton.setAttribute("disabled", disable ? "true" : "false");
- gDialog.NextButton.setAttribute("disabled", disable ? "true" : "false");
-}
-
-function SwitchToValidatePanel()
-{
- if (gDialog.TabBox.selectedTab != gValidateTab)
- gDialog.TabBox.selectedTab = gValidateTab;
-}
-
-function SetAlign(listID, defaultValue, element, attName)
-{
- var value = document.getElementById(listID).value;
- if (value == defaultValue)
- {
- try {
- gActiveEditor.removeAttributeOrEquivalent(element, attName, true);
- } catch(e) {}
- }
- else
- {
- try {
- gActiveEditor.setAttributeOrEquivalent(element, attName, value, true);
- } catch(e) {}
- }
-}
-
-function ValidateTableData()
-{
- gValidateTab = gDialog.TableTab;
- gNewRowCount = Number(ValidateNumber(gDialog.TableRowsInput, null, 1, gMaxRows, null, true, true));
- if (gValidationError) return false;
-
- gNewColCount = Number(ValidateNumber(gDialog.TableColumnsInput, null, 1, gMaxColumns, null, true, true));
- if (gValidationError) return false;
-
- // If user is deleting any cells, get confirmation
- // (This is a global to the dialog and we ask only once per dialog session)
- if ( !gCanDelete &&
- (gNewRowCount < gRowCount ||
- gNewColCount < gColCount) )
- {
- if (ConfirmWithTitle(GetString("DeleteTableTitle"),
- GetString("DeleteTableMsg"),
- GetString("DeleteCells")) )
- {
- gCanDelete = true;
- }
- else
- {
- SetTextboxFocus(gNewRowCount < gRowCount ? gDialog.TableRowsInput : gDialog.TableColumnsInput);
- return false;
- }
- }
-
- ValidateNumber(gDialog.TableWidthInput, gDialog.TableWidthUnits,
- 1, gMaxTableSize, globalTableElement, "width");
- if (gValidationError) return false;
-
- if (gUseCSS) {
- ValidateNumber(gDialog.TableHeightInput, gDialog.TableHeightUnits,
- 1, gMaxTableSize, globalTableElement, "height");
- if (gValidationError) return false;
- }
-
- var border = ValidateNumber(gDialog.BorderWidthInput, null, 0, gMaxPixels, globalTableElement, "border");
- // TODO: Deal with "BORDER" without value issue
- if (gValidationError) return false;
-
- ValidateNumber(gDialog.SpacingInput, null, 0, gMaxPixels, globalTableElement, "cellspacing");
- if (gValidationError) return false;
-
- ValidateNumber(gDialog.PaddingInput, null, 0, gMaxPixels, globalTableElement, "cellpadding");
- if (gValidationError) return false;
-
- SetAlign("TableAlignList", defHAlign, globalTableElement, "align");
-
- // Color is set on globalCellElement immediately
- return true;
-}
-
-function ValidateCellData()
-{
-
- gValidateTab = gDialog.CellTab;
-
- if (gDialog.CellHeightCheckbox.checked)
- {
- ValidateNumber(gDialog.CellHeightInput, gDialog.CellHeightUnits,
- 1, gMaxTableSize, globalCellElement, "height");
- if (gValidationError) return false;
- }
-
- if (gDialog.CellWidthCheckbox.checked)
- {
- ValidateNumber(gDialog.CellWidthInput, gDialog.CellWidthUnits,
- 1, gMaxTableSize, globalCellElement, "width");
- if (gValidationError) return false;
- }
-
- if (gDialog.CellHAlignCheckbox.checked)
- {
- var hAlign = gDialog.CellHAlignList.value;
-
- // Horizontal alignment is complicated by "char" type
- // We don't change current values if user didn't edit alignment
- if (!gAlignWasChar)
- {
- globalCellElement.removeAttribute(charStr);
-
- // Always set "align" attribute,
- // so the default "left" is effective in a cell
- // when parent row has align set.
- globalCellElement.setAttribute("align", hAlign);
- }
- }
-
- if (gDialog.CellVAlignCheckbox.checked)
- {
- // Always set valign (no default in 2nd param) so
- // the default "middle" is effective in a cell
- // when parent row has valign set.
- SetAlign("CellVAlignList", "", globalCellElement, "valign");
- }
-
- if (gDialog.TextWrapCheckbox.checked)
- {
- if (gDialog.TextWrapList.value == "nowrap")
- try {
- gActiveEditor.setAttributeOrEquivalent(globalCellElement, "nowrap",
- "nowrap", true);
- } catch(e) {}
- else
- try {
- gActiveEditor.removeAttributeOrEquivalent(globalCellElement, "nowrap", true);
- } catch(e) {}
- }
-
- return true;
-}
-
-function ValidateData()
-{
- var result;
-
- // Validate current panel first
- if (gDialog.TabBox.selectedTab == gDialog.TableTab)
- {
- result = ValidateTableData();
- if (result)
- result = ValidateCellData();
- } else {
- result = ValidateCellData();
- if (result)
- result = ValidateTableData();
- }
- if(!result) return false;
-
- // Set global element for AdvancedEdit
- if(gDialog.TabBox.selectedTab == gDialog.TableTab)
- globalElement = globalTableElement;
- else
- globalElement = globalCellElement;
-
- return true;
-}
-
-function ChangeCellTextbox(textboxID)
-{
- // Filter input for just integers
- forceInteger(textboxID);
-
- if (gDialog.TabBox.selectedTab == gDialog.CellTab)
- gCellDataChanged = true;
-}
-
-// Call this when a textbox or menulist is changed
-// so the checkbox is automatically set
-function SetCheckbox(checkboxID)
-{
- if (checkboxID && checkboxID.length > 0)
- {
- // Set associated checkbox
- document.getElementById(checkboxID).checked = true;
- }
- gCellDataChanged = true;
-}
-
-function ChangeIntTextbox(textboxID, checkboxID)
-{
- // Filter input for just integers
- forceInteger(textboxID);
-
- // Set associated checkbox
- SetCheckbox(checkboxID);
-}
-
-function CloneAttribute(destElement, srcElement, attr)
-{
- var value = srcElement.getAttribute(attr);
- // Use editor methods since we are always
- // modifying a table in the document and
- // we need transaction system for undo
- try {
- if (!value || value.length == 0)
- gActiveEditor.removeAttributeOrEquivalent(destElement, attr, false);
- else
- gActiveEditor.setAttributeOrEquivalent(destElement, attr, value, false);
- } catch(e) {}
-}
-
-function ApplyTableAttributes()
-{
- var newAlign = gDialog.TableCaptionList.value;
- if (!newAlign) newAlign = "";
-
- if (gTableCaptionElement)
- {
- // Get current alignment
- var align = GetHTMLOrCSSStyleValue(gTableCaptionElement, "align", "caption-side").toLowerCase();
- // This is the default
- if (!align) align = "top";
-
- if (newAlign == "")
- {
- // Remove existing caption
- try {
- gActiveEditor.deleteNode(gTableCaptionElement);
- } catch(e) {}
- gTableCaptionElement = null;
- }
- else if(newAlign != align)
- {
- try {
- if (newAlign == "top") // This is default, so don't explicitly set it
- gActiveEditor.removeAttributeOrEquivalent(gTableCaptionElement, "align", false);
- else
- gActiveEditor.setAttributeOrEquivalent(gTableCaptionElement, "align", newAlign, false);
- } catch(e) {}
- }
- }
- else if (newAlign != "")
- {
- // Create and insert a caption:
- try {
- gTableCaptionElement = gActiveEditor.createElementWithDefaults("caption");
- } catch (e) {}
- if (gTableCaptionElement)
- {
- if (newAlign != "top")
- gTableCaptionElement.setAttribute("align", newAlign);
-
- // Insert it into the table - caption is always inserted as first child
- try {
- gActiveEditor.insertNode(gTableCaptionElement, gTableElement, 0);
- } catch(e) {}
-
- // Put selecton back where it was
- ChangeSelection(RESET_SELECTION);
- }
- }
-
- var countDelta;
- var foundCell;
- var i;
-
- if (gNewRowCount != gRowCount)
- {
- countDelta = gNewRowCount - gRowCount;
- if (gNewRowCount > gRowCount)
- {
- // Append new rows
- // Find first cell in last row
- if(GetCellData(gLastRowIndex, 0))
- {
- try {
- // Move selection to the last cell
- gSelection.collapse(gCellData.value,0);
- // Insert new rows after it
- gActiveEditor.insertTableRow(countDelta, true);
- gRowCount = gNewRowCount;
- gLastRowIndex = gRowCount - 1;
- // Put selecton back where it was
- ChangeSelection(RESET_SELECTION);
- }
- catch(ex) {
- dump("FAILED TO FIND FIRST CELL IN LAST ROW\n");
- }
- }
- }
- else
- {
- // Delete rows
- if (gCanDelete)
- {
- // Find first cell starting in first row we delete
- var firstDeleteRow = gRowCount + countDelta;
- foundCell = false;
- for ( i = 0; i <= gLastColIndex; i++)
- {
- if (!GetCellData(firstDeleteRow, i))
- break; // We failed to find a cell
-
- if (gCellData.startRowIndex == firstDeleteRow)
- {
- foundCell = true;
- break;
- }
- };
- if (foundCell)
- {
- try {
- // Move selection to the cell we found
- gSelection.collapse(gCellData.value, 0);
- gActiveEditor.deleteTableRow(-countDelta);
- gRowCount = gNewRowCount;
- gLastRowIndex = gRowCount - 1;
- if (gCurRowIndex > gLastRowIndex)
- // We are deleting our selection
- // move it to start of table
- ChangeSelectionToFirstCell()
- else
- // Put selecton back where it was
- ChangeSelection(RESET_SELECTION);
- }
- catch(ex) {
- dump("FAILED TO FIND FIRST CELL IN LAST ROW\n");
- }
- }
- }
- }
- }
-
- if (gNewColCount != gColCount)
- {
- countDelta = gNewColCount - gColCount;
-
- if (gNewColCount > gColCount)
- {
- // Append new columns
- // Find last cell in first column
- if(GetCellData(0, gLastColIndex))
- {
- try {
- // Move selection to the last cell
- gSelection.collapse(gCellData.value,0);
- gActiveEditor.insertTableColumn(countDelta, true);
- gColCount = gNewColCount;
- gLastColIndex = gColCount-1;
- // Restore selection
- ChangeSelection(RESET_SELECTION);
- }
- catch(ex) {
- dump("FAILED TO FIND FIRST CELL IN LAST COLUMN\n");
- }
- }
- }
- else
- {
- // Delete columns
- if (gCanDelete)
- {
- var firstDeleteCol = gColCount + countDelta;
- foundCell = false;
- for ( i = 0; i <= gLastRowIndex; i++)
- {
- // Find first cell starting in first column we delete
- if (!GetCellData(i, firstDeleteCol))
- break; // We failed to find a cell
-
- if (gCellData.startColIndex == firstDeleteCol)
- {
- foundCell = true;
- break;
- }
- };
- if (foundCell)
- {
- try {
- // Move selection to the cell we found
- gSelection.collapse(gCellData.value, 0);
- gActiveEditor.deleteTableColumn(-countDelta);
- gColCount = gNewColCount;
- gLastColIndex = gColCount-1;
- if (gCurColIndex > gLastColIndex)
- ChangeSelectionToFirstCell()
- else
- ChangeSelection(RESET_SELECTION);
- }
- catch(ex) {
- dump("FAILED TO FIND FIRST CELL IN LAST ROW\n");
- }
- }
- }
- }
- }
-
- // Clone all remaining attributes to pick up
- // anything changed by Advanced Edit Dialog
- try {
- gActiveEditor.cloneAttributes(gTableElement, globalTableElement);
- } catch(e) {}
-}
-
-function ApplyCellAttributes()
-{
- var rangeObj = { value: null };
- var selectedCell;
- try {
- selectedCell = gActiveEditor.getFirstSelectedCell(rangeObj);
- } catch(e) {}
-
- if (!selectedCell)
- return;
-
- if (gSelectedCellCount == 1)
- {
- // When only one cell is selected, simply clone entire element,
- // thus CSS and JS from Advanced edit is copied
- try {
- gActiveEditor.cloneAttributes(selectedCell, globalCellElement);
- } catch(e) {}
-
- if (gDialog.CellStyleCheckbox.checked)
- {
- var currentStyleIndex = (selectedCell.nodeName.toLowerCase() == "th") ? 1 : 0;
- if (gDialog.CellStyleList.selectedIndex != currentStyleIndex)
- {
- // Switch cell types
- // (replaces with new cell and copies attributes and contents)
- try {
- selectedCell = gActiveEditor.switchTableCellHeaderType(selectedCell);
- } catch(e) {}
- }
- }
- }
- else
- {
- // Apply changes to all selected cells
- //XXX THIS DOESN'T COPY ADVANCED EDIT CHANGES!
- try {
- while (selectedCell)
- {
- ApplyAttributesToOneCell(selectedCell);
- selectedCell = gActiveEditor.getNextSelectedCell(rangeObj);
- }
- } catch(e) {}
- }
- gCellDataChanged = false;
-}
-
-function ApplyAttributesToOneCell(destElement)
-{
- if (gDialog.CellHeightCheckbox.checked)
- CloneAttribute(destElement, globalCellElement, "height");
-
- if (gDialog.CellWidthCheckbox.checked)
- CloneAttribute(destElement, globalCellElement, "width");
-
- if (gDialog.CellHAlignCheckbox.checked)
- {
- CloneAttribute(destElement, globalCellElement, "align");
- CloneAttribute(destElement, globalCellElement, charStr);
- }
-
- if (gDialog.CellVAlignCheckbox.checked)
- CloneAttribute(destElement, globalCellElement, "valign");
-
- if (gDialog.TextWrapCheckbox.checked)
- CloneAttribute(destElement, globalCellElement, "nowrap");
-
- if (gDialog.CellStyleCheckbox.checked)
- {
- var newStyleIndex = gDialog.CellStyleList.selectedIndex;
- var currentStyleIndex = (destElement.nodeName.toLowerCase() == "th") ? 1 : 0;
-
- if (newStyleIndex != currentStyleIndex)
- {
- // Switch cell types
- // (replaces with new cell and copies attributes and contents)
- try {
- destElement = gActiveEditor.switchTableCellHeaderType(destElement);
- } catch(e) {}
- }
- }
-
- if (gDialog.CellColorCheckbox.checked)
- CloneAttribute(destElement, globalCellElement, "bgcolor");
-}
-
-function SetCloseButton()
-{
- // Change text on "Cancel" button after Apply is used
- if (!gApplyUsed)
- {
- document.documentElement.setAttribute("buttonlabelcancel",
- document.documentElement.getAttribute("buttonlabelclose"));
- gApplyUsed = true;
- }
-}
-
-function Apply()
-{
- if (ValidateData())
- {
- gActiveEditor.beginTransaction();
-
- ApplyTableAttributes();
-
- // We may have just a table, so check for cell element
- if (globalCellElement)
- ApplyCellAttributes();
-
- gActiveEditor.endTransaction();
-
- SetCloseButton();
- return true;
- }
- return false;
-}
-
-function onAccept()
-{
- // Do same as Apply and close window if ValidateData succeeded
- var retVal = Apply();
- if (retVal)
- SaveWindowLocation();
-
- return retVal;
-}
diff --git a/editor/ui/dialogs/content/EdTableProps.xul b/editor/ui/dialogs/content/EdTableProps.xul
deleted file mode 100644
index 126e53eca..000000000
--- a/editor/ui/dialogs/content/EdTableProps.xul
+++ /dev/null
@@ -1,266 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">
-
-<dialog title="&tableWindow.title;"
- id="tableDlg"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup()"
- buttons="accept,extra1,cancel"
- buttonlabelclose="&closeButton.label;"
- buttonlabelextra1="&applyButton.label;"
- buttonaccesskeyextra1="&applyButton.accesskey;"
- ondialogaccept="return onAccept();"
- ondialogextra1="return Apply();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdTableProps.js"/>
-
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
- <broadcaster id="args" value=""/>
-
- <tabbox id="TabBox">
- <tabs flex="1">
- <tab id="TableTab" label="&tableTab.label;"/>
- <tab id="CellTab" label="&cellTab.label;"/>
- </tabs>
- <tabpanels>
-
- <!-- TABLE PANEL -->
- <vbox>
- <groupbox orient="horizontal"><caption label="&size.label;"/>
- <grid>
- <columns><column/><column/><column/><column/><column/></columns>
- <rows>
- <row align="center">
- <label value="&tableRows.label;" accesskey="&tableRows.accessKey;" control="TableRowsInput"/>
- <textbox class="narrow" id="TableRowsInput" oninput="forceInteger(this.id);"/>
- <spring class="bigspacer"/>
- <label value="&tableHeight.label;" accesskey="&tableHeight.accessKey;"
- id="TableHeightLabel" control="TableHeightInput"/>
- <textbox class="narrow" id="TableHeightInput" oninput="forceInteger(this.id);"/>
- <menulist id="TableHeightUnits"/>
- </row>
- <row align="center">
- <label value="&tableColumns.label;" accesskey="&tableColumns.accessKey;" control="TableColumnsInput"/>
- <textbox class="narrow" id="TableColumnsInput" oninput="forceInteger(this.id);"/>
- <spring class="bigspacer"/>
- <label value="&tableWidth.label;" accesskey="&tableWidth.accessKey;" control="TableWidthInput"/>
- <textbox class="narrow" id="TableWidthInput" oninput="forceInteger(this.id);"/>
- <menulist id="TableWidthUnits"/>
- </row>
- </rows>
- <!-- KEEP GRID LAYOUT here since we will be adding back support for table HEIGHT via CSS -->
- </grid>
- </groupbox>
- <groupbox><caption label="&tableBorderSpacing.label;"/>
- <grid>
- <columns><column/><column/><column/></columns>
- <rows>
- <row align="center">
- <label control="BorderWidthInput"
- value="&tableBorderWidth.label;"
- accesskey="&tableBorderWidth.accessKey;"/>
- <textbox class="narrow" id="BorderWidthInput" oninput="forceInteger(this.id);"/>
- <label align="left" value="&pixels.label;"/>
- </row>
- <row align="center">
- <label control="SpacingInput"
- value="&tableSpacing.label;"
- accesskey="&tableSpacing.accessKey;"/>
- <textbox class="narrow" id="SpacingInput" oninput="forceInteger(this.id);"/>
- <label value="&tablePxBetwCells.label;"/>
- </row>
- <row align="center">
- <label control="PaddingInput"
- value="&tablePadding.label;"
- accesskey="&tablePadding.accessKey;"/>
- <textbox class="narrow" id="PaddingInput" oninput="forceInteger(this.id);"/>
- <label value="&tablePxBetwBrdrCellContent.label;"/>
- </row>
- </rows>
- </grid>
- </groupbox>
- <!-- Table Alignment and Caption -->
- <hbox flex="1" align="center">
- <label control="TableAlignList"
- value="&tableAlignment.label;"
- accesskey="&tableAlignment.accessKey;"/>
- <menulist id="TableAlignList">
- <menupopup>
- <menuitem label="&AlignLeft.label;" value="left"/>
- <menuitem label="&AlignCenter.label;" value="center"/>
- <menuitem label="&AlignRight.label;" value="right"/>
- </menupopup>
- </menulist>
- <spacer class="spacer"/>
- <label control="TableCaptionList"
- value="&tableCaption.label;"
- accesskey="&tableCaption.accessKey;"/>
- <menulist id="TableCaptionList">
- <menupopup>
- <menuitem label="&tableCaptionNone.label;" value=""/>
- <menuitem label="&tableCaptionAbove.label;" value="top"/>
- <menuitem label="&tableCaptionBelow.label;" value="bottom"/>
- <menuitem label="&tableCaptionLeft.label;" value="left"/>
- <menuitem label="&tableCaptionRight.label;" value="right"/>
- </menupopup>
- </menulist>
- </hbox>
- <separator class="groove"/>
- <hbox align="center">
- <label value="&backgroundColor.label;"/>
- <button id="tableBackground" class="color-button" oncommand="GetColorAndUpdate('tableBackgroundCW');">
- <spacer id="tableBackgroundCW" class="color-well"/>
- </button>
- <spacer class="spacer"/>
- <label id="TableInheritColor" value="&tableInheritColor.label;" collapsed="true"/>
- </hbox>
- <separator class="groove"/>
- <hbox flex="1" align="center">
- <spacer flex="1"/>
- <!-- From EdDialogOvlerlay.xul -->
- <button id="AdvancedEditButton"/>
- </hbox>
- <spacer flex="1"/>
- </vbox><!-- Table Panel -->
-
- <!-- CELL PANEL -->
- <vbox>
- <groupbox orient="horizontal" align="center">
- <caption label="&cellSelection.label;"/>
- <vbox>
- <menulist id="SelectionList" oncommand="ChangeSelection(event.target.value)" flex="1">
- <menupopup>
- <!-- JS code assumes order is Cell, Row, Column -->
- <menuitem label="&cellSelectCell.label;" value="1"/>
- <menuitem label="&cellSelectRow.label;" value="2"/>
- <menuitem label="&cellSelectColumn.label;" value="3"/>
- </menupopup>
- </menulist>
- <hbox flex="1">
- <button id="PreviousButton"
- oncommand="MoveSelection(0)"
- flex="1">
- <image/>
- <label value="&cellSelectPrevious.label;"
- accesskey="&cellSelectPrevious.accessKey;"
- control="PreviousButton"/>
- </button>
- <button id="NextButton"
- oncommand="MoveSelection(1)"
- class="align-right"
- flex="1">
- <image/>
- <label value="&cellSelectNext.label;"
- accesskey="&cellSelectNext.accessKey;"
- control="NextButton"/>
- </button>
- </hbox>
- </vbox>
- <spacer class="bigspacer"/>
- <description class="wrap" flex="1">&applyBeforeChange.label;</description>
- </groupbox>
- <hbox align="center">
- <!-- cell size groupbox -->
- <groupbox><caption label="&size.label;"/>
- <grid>
- <columns><column/><column/><column flex="1"/></columns>
- <rows>
- <row align="center">
- <checkbox id="CellHeightCheckbox" label="&tableHeight.label;" accesskey="&tableHeight.accessKey;"/>
- <textbox class="narrow" id="CellHeightInput"
- oninput="ChangeIntTextbox(this.id,'CellHeightCheckbox');"/>
- <menulist id="CellHeightUnits" oncommand="SetCheckbox('CellHeightCheckbox');"/>
- </row>
- <row align="center">
- <checkbox id="CellWidthCheckbox" label="&tableWidth.label;" accesskey="&tableWidth.accessKey;"/>
- <textbox class="narrow" id="CellWidthInput"
- oninput="ChangeIntTextbox(this.id,'CellWidthCheckbox');"/>
- <menulist id="CellWidthUnits" oncommand="SetCheckbox('CellWidthCheckbox');"/>
- </row>
- </rows>
- </grid>
- <spacer class="bigspacer"/>
- </groupbox>
- <!-- Alignment -->
- <groupbox><caption label="&cellContentAlignment.label;"/>
- <grid>
- <columns><column/><column flex="1"/><column/></columns>
- <rows>
- <row align="center">
- <checkbox id="CellVAlignCheckbox" label="&cellVertical.label;" accesskey="&cellVertical.accessKey;"/>
- <menulist id="CellVAlignList" oncommand="SetCheckbox('CellVAlignCheckbox');">
- <menupopup>
- <menuitem label="&cellAlignTop.label;" value="top"/>
- <menuitem label="&cellAlignMiddle.label;" value="middle"/>
- <menuitem label="&cellAlignBottom.label;" value="bottom"/>
- </menupopup>
- </menulist>
- </row>
- <row align="center">
- <checkbox id="CellHAlignCheckbox" label="&cellHorizontal.label;" accesskey="&cellHorizontal.accessKey;"/>
- <menulist id="CellHAlignList" oncommand="SelectCellHAlign()">
- <menupopup>
- <menuitem label="&AlignLeft.label;" value="left"/>
- <menuitem label="&AlignCenter.label;" value="center"/>
- <menuitem label="&AlignRight.label;" value="right"/>
- <menuitem label="&cellAlignJustify.label;" value="justify"/>
- </menupopup>
- </menulist>
- </row>
- </rows>
- </grid>
- </groupbox>
- </hbox>
- <spacer class="spacer"/>
- <hbox align="center">
- <checkbox id="CellStyleCheckbox" label="&cellStyle.label;" accesskey="&cellStyle.accessKey;"/>
- <menulist id="CellStyleList" oncommand="SetCheckbox('CellStyleCheckbox');">
- <menupopup>
- <menuitem label="&cellNormal.label;" value="td"/>
- <menuitem label="&cellHeader.label;" value="th"/>
- </menupopup>
- </menulist>
- <spacer class="bigspacer"/>
- <checkbox id="TextWrapCheckbox" label="&cellTextWrap.label;" accesskey="&cellTextWrap.accessKey;"/>
- <menulist id="TextWrapList" oncommand="SetCheckbox('TextWrapCheckbox');">
- <menupopup>
- <menuitem label="&cellWrap.label;" value="wrap"/>
- <menuitem label="&cellNoWrap.label;" value="nowrap"/>
- </menupopup>
- </menulist>
- </hbox>
- <separator class="groove"/>
- <hbox align="center">
- <checkbox id="CellColorCheckbox" label="&backgroundColor.label;" accesskey="&backgroundColor.accessKey;"/>
- <button class="color-button" oncommand="GetColorAndUpdate('cellBackgroundCW');">
- <spacer id="cellBackgroundCW" class="color-well"/>
- </button>
- <spacer class="spacer"/>
- <label id="CellInheritColor" value="&cellInheritColor.label;" collapsed="true"/>
- </hbox>
- <separator class="groove"/>
- <hbox align="center">
- <description class="wrap" flex="1" style="width: 1em">&cellUseCheckboxHelp.label;</description>
- <!-- From EdDialogOvlerlay.xul -->
- <button id="AdvancedEditButton2"/>
- </hbox>
- <spacer flex="1"/>
- </vbox><!-- Cell Panel -->
- </tabpanels>
- </tabbox>
- <spacer class="spacer"/>
-</dialog>
diff --git a/editor/ui/dialogs/content/EdTextAreaProps.js b/editor/ui/dialogs/content/EdTextAreaProps.js
deleted file mode 100644
index 8e14b93f3..000000000
--- a/editor/ui/dialogs/content/EdTextAreaProps.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var insertNew;
-var textareaElement;
-
-// dialog initialization code
-
-function Startup()
-{
- var editor = GetCurrentEditor();
- if (!editor)
- {
- dump("Failed to get active editor!\n");
- window.close();
- return;
- }
-
- gDialog = {
- accept: document.documentElement.getButton("accept"),
- textareaName: document.getElementById("TextAreaName"),
- textareaRows: document.getElementById("TextAreaRows"),
- textareaCols: document.getElementById("TextAreaCols"),
- textareaWrap: document.getElementById("TextAreaWrap"),
- textareaReadOnly: document.getElementById("TextAreaReadOnly"),
- textareaDisabled: document.getElementById("TextAreaDisabled"),
- textareaTabIndex: document.getElementById("TextAreaTabIndex"),
- textareaAccessKey: document.getElementById("TextAreaAccessKey"),
- textareaValue: document.getElementById("TextAreaValue"),
- MoreSection: document.getElementById("MoreSection"),
- MoreFewerButton: document.getElementById("MoreFewerButton")
- };
-
- // Get a single selected text area element
- const kTagName = "textarea";
- try {
- textareaElement = editor.getSelectedElement(kTagName);
- } catch (e) {}
-
- if (textareaElement) {
- // We found an element and don't need to insert one
- insertNew = false;
-
- gDialog.textareaValue.value = textareaElement.value;
- }
- else
- {
- insertNew = true;
-
- // We don't have an element selected,
- // so create one with default attributes
- try {
- textareaElement = editor.createElementWithDefaults(kTagName);
- } catch(e) {}
-
- if (!textareaElement)
- {
- dump("Failed to get selected element or create a new one!\n");
- window.close();
- return;
- }
- else
- gDialog.textareaValue.value = GetSelectionAsText();
- }
-
- // Make a copy to use for AdvancedEdit
- globalElement = textareaElement.cloneNode(false);
-
- InitDialog();
-
- InitMoreFewer();
-
- SetTextboxFocus(gDialog.textareaName);
-
- SetWindowLocation();
-}
-
-function InitDialog()
-{
- gDialog.textareaName.value = globalElement.getAttribute("name");
- gDialog.textareaRows.value = globalElement.getAttribute("rows");
- gDialog.textareaCols.value = globalElement.getAttribute("cols");
- gDialog.textareaWrap.value = GetHTMLOrCSSStyleValue(globalElement, "wrap", "white-space");
- gDialog.textareaReadOnly.checked = globalElement.hasAttribute("readonly");
- gDialog.textareaDisabled.checked = globalElement.hasAttribute("disabled");
- gDialog.textareaTabIndex.value = globalElement.getAttribute("tabindex");
- gDialog.textareaAccessKey.value = globalElement.getAttribute("accesskey");
- onInput();
-}
-
-function onInput()
-{
- var disabled = !gDialog.textareaName.value || !gDialog.textareaRows.value || !gDialog.textareaCols.value;
- if (gDialog.accept.disabled != disabled)
- gDialog.accept.disabled = disabled;
-}
-
-function ValidateData()
-{
- var attributes = {
- name: gDialog.textareaName.value,
- rows: gDialog.textareaRows.value,
- cols: gDialog.textareaCols.value,
- wrap: gDialog.textareaWrap.value,
- tabindex: gDialog.textareaTabIndex.value,
- accesskey: gDialog.textareaAccessKey.value
- };
- var flags = {
- readonly: gDialog.textareaReadOnly.checked,
- disabled: gDialog.textareaDisabled.checked
- };
- for (var a in attributes)
- {
- if (attributes[a])
- globalElement.setAttribute(a, attributes[a]);
- else
- globalElement.removeAttribute(a);
- }
- for (var f in flags)
- {
- if (flags[f])
- globalElement.setAttribute(f, "");
- else
- globalElement.removeAttribute(f);
- }
- return true;
-}
-
-function onAccept()
-{
- // All values are valid - copy to actual element in doc or
- // element created to insert
- ValidateData();
-
- var editor = GetCurrentEditor();
-
- editor.beginTransaction();
-
- try {
- editor.cloneAttributes(textareaElement, globalElement);
-
- if (insertNew)
- editor.insertElementAtSelection(textareaElement, true);
-
- // undoably set value
- var initialText = gDialog.textareaValue.value;
- if (initialText != textareaElement.value) {
- editor.setShouldTxnSetSelection(false);
-
- while (textareaElement.hasChildNodes())
- editor.deleteNode(textareaElement.lastChild);
- if (initialText) {
- var textNode = editor.document.createTextNode(initialText);
- editor.insertNode(textNode, textareaElement, 0);
- }
-
- editor.setShouldTxnSetSelection(true);
- }
- } finally {
- editor.endTransaction();
- }
-
- SaveWindowLocation();
-
- return true;
-}
-
diff --git a/editor/ui/dialogs/content/EdTextAreaProps.xul b/editor/ui/dialogs/content/EdTextAreaProps.xul
deleted file mode 100644
index 27fd32470..000000000
--- a/editor/ui/dialogs/content/EdTextAreaProps.xul
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
-<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
-
-<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorTextAreaProperties.dtd">
-<dialog title="&windowTitle.label;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="Startup();"
- buttons="accept,cancel"
- ondialogaccept="return onAccept();"
- ondialogcancel="return onCancel();">
-
- <!-- Methods common to all editor dialogs -->
- <script type="application/javascript" src="chrome://editor/content/editorUtilities.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdDialogCommon.js"/>
- <script type="application/javascript" src="chrome://editor/content/EdTextAreaProps.js"/>
-
- <broadcaster id="args" value=""/>
- <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
-
- <groupbox><caption label="&Settings.label;"/>
- <grid><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label control="TextAreaName" value="&TextAreaName.label;" accesskey="&TextAreaName.accessKey;"/>
- <textbox id="TextAreaName" oninput="onInput();"/>
- </row>
- <row align="center">
- <label control="TextAreaRows" value="&TextAreaRows.label;" accesskey="&TextAreaRows.accessKey;"/>
- <hbox>
- <textbox id="TextAreaRows" class="narrow" oninput="forceInteger(this.id);onInput();"/>
- </hbox>
- </row>
- <row align="center">
- <label control="TextAreaCols" value="&TextAreaCols.label;" accesskey="&TextAreaCols.accessKey;"/>
- <hbox>
- <textbox id="TextAreaCols" class="narrow" oninput="forceInteger(this.id);onInput();"/>
- </hbox>
- </row>
- </rows>
- </grid>
- <hbox>
- <button id="MoreFewerButton" oncommand="onMoreFewer();" persist="more"/>
- </hbox>
- <grid id="MoreSection"><columns><column/><column/></columns>
- <rows>
- <row align="center">
- <label control="TextAreaWrap" value="&TextAreaWrap.label;" accesskey="&TextAreaWrap.accessKey;"/>
- <menulist id="TextAreaWrap">
- <menupopup>
- <menuitem label="&WrapDefault.value;"/>
- <menuitem label="&WrapOff.value;" value="off"/>
- <menuseparator/>
- <menuitem label="&WrapSoft.value;" value="soft"/>
- <menuitem label="&WrapHard.value;" value="hard"/>
- <menuseparator/>
- <menuitem label="&WrapPhysical.value;" value="physical"/>
- <menuitem label="&WrapVirtual.value;" value="virtual"/>
- <menuseparator/>
- <menuitem label="normal" value="normal"/>
- <menuitem label="nowrap" value="nowrap"/>
- <menuitem label="pre" value="pre"/>
- </menupopup>
- </menulist>
- </row>
- <row>
- <spacer/>
- <checkbox id="TextAreaReadOnly" label="&TextAreaReadOnly.label;" accesskey="&TextAreaReadOnly.accessKey;"/>
- </row>
- <row>
- <spacer/>
- <checkbox id="TextAreaDisabled" label="&TextAreaDisabled.label;" accesskey="&TextAreaDisabled.accessKey;"/>
- </row>
- <row align="center">
- <label control="TextAreaTabIndex" value="&TextAreaTabIndex.label;" accesskey="&TextAreaTabIndex.accessKey;"/>
- <hbox>
- <textbox id="TextAreaTabIndex" class="narrow" oninput="forceInteger(this.id);"/>
- </hbox>
- </row>
- <row align="center">
- <label control="TextAreaAccessKey" value="&TextAreaAccessKey.label;" accesskey="&TextAreaAccessKey.accessKey;"/>
- <hbox>
- <textbox id="TextAreaAccessKey" class="narrow" maxlength="1"/>
- </hbox>
- </row>
- <row>
- <label control="TextAreaValue" value="&InitialText.label;" accesskey="&InitialText.accessKey;"/>
- </row>
- <textbox id="TextAreaValue" flex="1" multiline="true" rows="5"/>
- </rows>
- </grid>
- </groupbox>
-
- <!-- from EdDialogOverlay -->
- <vbox id="AdvancedEdit"/>
-
-</dialog>
diff --git a/editor/ui/editorUtilities.jsm b/editor/ui/editorUtilities.jsm
deleted file mode 100644
index f8e35b183..000000000
--- a/editor/ui/editorUtilities.jsm
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var EXPORTED_SYMBOLS = ["GetNextUntitledValue"];
-
-var sUntitledCount = 1;
-
-function GetNextUntitledValue()
-{
- return sUntitledCount++;
-}
diff --git a/editor/ui/jar.mn b/editor/ui/jar.mn
deleted file mode 100644
index 91aec9909..000000000
--- a/editor/ui/jar.mn
+++ /dev/null
@@ -1,81 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-comm.jar:
-% content editor %content/editor/
-% overlay chrome://communicator/content/tasksOverlay.xul chrome://editor/content/editorTasksOverlay.xul
-% overlay chrome://messenger/content/mailWindowOverlay.xul chrome://editor/content/editorMailOverlay.xul
- content/editor/editor.js (composer/content/editor.js)
- content/editor/editorUtilities.js (composer/content/editorUtilities.js)
- content/editor/ComposerCommands.js (composer/content/ComposerCommands.js)
- content/editor/EditorContent.css (composer/content/EditorContent.css)
- content/editor/editorSmileyOverlay.xul (composer/content/editorSmileyOverlay.xul)
- content/editor/editorNavigatorOverlay.xul (composer/content/editorNavigatorOverlay.xul)
- content/editor/editorMailOverlay.xul (composer/content/editorMailOverlay.xul)
- content/editor/editorTasksOverlay.xul (composer/content/editorTasksOverlay.xul)
- content/editor/editorApplicationOverlay.js (composer/content/editorApplicationOverlay.js)
- content/editor/images/tag-anchor.gif (composer/content/images/tag-anchor.gif)
- content/editor/EdDialogCommon.js (dialogs/content/EdDialogCommon.js)
- content/editor/EdLinkProps.xul (dialogs/content/EdLinkProps.xul)
- content/editor/EdLinkProps.js (dialogs/content/EdLinkProps.js)
- content/editor/EdImageProps.xul (dialogs/content/EdImageProps.xul)
- content/editor/EdImageProps.js (dialogs/content/EdImageProps.js)
- content/editor/EdImageOverlay.xul (dialogs/content/EdImageOverlay.xul)
- content/editor/EdImageOverlay.js (dialogs/content/EdImageOverlay.js)
- content/editor/EdHLineProps.xul (dialogs/content/EdHLineProps.xul)
- content/editor/EdHLineProps.js (dialogs/content/EdHLineProps.js)
- content/editor/EdReplace.xul (dialogs/content/EdReplace.xul)
- content/editor/EdReplace.js (dialogs/content/EdReplace.js)
- content/editor/EdSpellCheck.xul (dialogs/content/EdSpellCheck.xul)
- content/editor/EdSpellCheck.js (dialogs/content/EdSpellCheck.js)
- content/editor/EdDictionary.xul (dialogs/content/EdDictionary.xul)
- content/editor/EdDictionary.js (dialogs/content/EdDictionary.js)
- content/editor/EdNamedAnchorProps.xul (dialogs/content/EdNamedAnchorProps.xul)
- content/editor/EdNamedAnchorProps.js (dialogs/content/EdNamedAnchorProps.js)
- content/editor/EdInsertTOC.xul (dialogs/content/EdInsertTOC.xul)
- content/editor/EdInsertTOC.js (dialogs/content/EdInsertTOC.js)
- content/editor/EdInsertTable.xul (dialogs/content/EdInsertTable.xul)
- content/editor/EdInsertTable.js (dialogs/content/EdInsertTable.js)
- content/editor/EdInsertMath.xul (dialogs/content/EdInsertMath.xul)
- content/editor/EdInsertMath.js (dialogs/content/EdInsertMath.js)
- content/editor/EdTableProps.xul (dialogs/content/EdTableProps.xul)
- content/editor/EdTableProps.js (dialogs/content/EdTableProps.js)
- content/editor/EdFormProps.xul (dialogs/content/EdFormProps.xul)
- content/editor/EdFormProps.js (dialogs/content/EdFormProps.js)
- content/editor/EdInputProps.xul (dialogs/content/EdInputProps.xul)
- content/editor/EdInputProps.js (dialogs/content/EdInputProps.js)
- content/editor/EdInputImage.xul (dialogs/content/EdInputImage.xul)
- content/editor/EdInputImage.js (dialogs/content/EdInputImage.js)
- content/editor/EdTextAreaProps.xul (dialogs/content/EdTextAreaProps.xul)
- content/editor/EdTextAreaProps.js (dialogs/content/EdTextAreaProps.js)
- content/editor/EdSelectProps.xul (dialogs/content/EdSelectProps.xul)
- content/editor/EdSelectProps.js (dialogs/content/EdSelectProps.js)
- content/editor/EdButtonProps.xul (dialogs/content/EdButtonProps.xul)
- content/editor/EdButtonProps.js (dialogs/content/EdButtonProps.js)
- content/editor/EdLabelProps.xul (dialogs/content/EdLabelProps.xul)
- content/editor/EdLabelProps.js (dialogs/content/EdLabelProps.js)
- content/editor/EdFieldSetProps.xul (dialogs/content/EdFieldSetProps.xul)
- content/editor/EdFieldSetProps.js (dialogs/content/EdFieldSetProps.js)
- content/editor/EdInsSrc.xul (dialogs/content/EdInsSrc.xul)
- content/editor/EdInsSrc.js (dialogs/content/EdInsSrc.js)
- content/editor/EdInsertChars.xul (dialogs/content/EdInsertChars.xul)
- content/editor/EdInsertChars.js (dialogs/content/EdInsertChars.js)
- content/editor/EdDialogOverlay.xul (dialogs/content/EdDialogOverlay.xul)
- content/editor/EdAdvancedEdit.xul (dialogs/content/EdAdvancedEdit.xul)
- content/editor/EdAdvancedEdit.js (dialogs/content/EdAdvancedEdit.js)
- content/editor/EdListProps.xul (dialogs/content/EdListProps.xul)
- content/editor/EdListProps.js (dialogs/content/EdListProps.js)
- content/editor/EdPageProps.xul (dialogs/content/EdPageProps.xul)
- content/editor/EdPageProps.js (dialogs/content/EdPageProps.js)
- content/editor/EdColorProps.xul (dialogs/content/EdColorProps.xul)
- content/editor/EdColorProps.js (dialogs/content/EdColorProps.js)
- content/editor/EdColorPicker.xul (dialogs/content/EdColorPicker.xul)
- content/editor/EdColorPicker.js (dialogs/content/EdColorPicker.js)
- content/editor/EdAECSSAttributes.js (dialogs/content/EdAECSSAttributes.js)
- content/editor/EdAEHTMLAttributes.js (dialogs/content/EdAEHTMLAttributes.js)
- content/editor/EdAEJSEAttributes.js (dialogs/content/EdAEJSEAttributes.js)
- content/editor/EdAEAttributes.js (dialogs/content/EdAEAttributes.js)
- content/editor/EdConvertToTable.xul (dialogs/content/EdConvertToTable.xul)
- content/editor/EdConvertToTable.js (dialogs/content/EdConvertToTable.js)
- content/editor/TeXZilla.js (texzilla/content/TeXZilla.js)
diff --git a/editor/ui/locales/en-US/chrome/composer/editor.properties b/editor/ui/locales/en-US/chrome/composer/editor.properties
deleted file mode 100644
index de482771a..000000000
--- a/editor/ui/locales/en-US/chrome/composer/editor.properties
+++ /dev/null
@@ -1,208 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# LOCALIZATION NOTE FILE: embedded "\n" represent HTML breaks (<br>)
-# Don't translate embedded "\n".
-# Don't translate strings like this: %variable%
-# as they will be replaced using JavaScript
-#
-No=No
-Save=Save
-More=More
-Less=Less
-MoreProperties=More Properties
-FewerProperties=Fewer Properties
-PropertiesAccessKey=P
-None=None
-none=none
-OpenHTMLFile=Open HTML File
-OpenTextFile=Open Text File
-SelectImageFile=Select Image File
-SaveDocument=Save Page
-SaveDocumentAs=Save Page As
-SaveTextAs=Save Text As
-EditMode=Edit Mode
-Preview=Preview
-Publish=Publish
-PublishPage=Publish Page
-DontPublish=Don't Publish
-SavePassword=Use Password Manager to save this password
-CorrectSpelling=(correct spelling)
-NoSuggestedWords=(no suggested words)
-NoMisspelledWord=No misspelled words
-CheckSpellingDone=Completed spell checking.
-CheckSpelling=Check Spelling
-InputError=Error
-Alert=Alert
-CantEditFramesetMsg=Composer cannot edit HTML framesets, or pages with inline frames. For framesets, try editing the page for each frame separately. For pages with iframes, save a copy of the page and remove the <iframe> tag.
-CantEditMimeTypeMsg=This type of page can't be edited.
-CantEditDocumentMsg=This page can't be edited for an unknown reason.
-BeforeClosing=before closing
-BeforePreview=before viewing in the browser
-BeforeValidate=before validating the document
-# LOCALIZATION NOTE (SaveFilePrompt, PublishPrompt): Don't translate %title% and %reason% (this is the reason for asking user to close, such as "before closing")
-SaveFilePrompt=Save changes to "%title%" %reason%?
-PublishPrompt=Save changes to "%title%" %reason%?
-SaveFileFailed=Saving file failed!
-
-# Publishing error strings:
-# LOCALIZATION NOTE Don't translate %dir% or %file% in the Publishing error strings:
-FileNotFound=%file% not found.
-SubdirDoesNotExist=The subdirectory "%dir%" doesn't exist on this site or the filename "%file%" is already in use by another subdirectory.
-FilenameIsSubdir=The filename "%file%" is already in use by another subdirectory.
-ServerNotAvailable=The server is not available. Check your connection and try again later.
-Offline=You are currently offline. Click the icon near the lower-right corner of any window to go online.
-DiskFull=There is not enough disk space available to save the file "%file%."
-NameTooLong=The filename or subdirectory name is too long.
-AccessDenied=You do not have permission to publish to this location.
-UnknownPublishError=Unknown publishing error occurred.
-PublishFailed=Publishing failed.
-PublishCompleted=Publishing completed.
-AllFilesPublished=All files published
-# LOCALIZATION NOTE Don't translate %x% or %total%
-FailedFileMsg=%x% of %total% files failed to publish.
-# End-Publishing error strings
-Prompt=Prompt
-# LOCALIZATION NOTE (PromptFTPUsernamePassword): Don't translate %host%
-PromptFTPUsernamePassword=Enter username and password for FTP server at %host%
-RevertCaption=Revert To Last Saved
-Revert=Revert
-SendPageReason=before sending this page
-Send=Send
-## LOCALIZATION NOTE (PublishProgressCaption, PublishToSite, AbandonChanges): Don't translate %title%
-PublishProgressCaption=Publishing: %title%
-PublishToSite=Publishing to Site: %title%
-AbandonChanges=Abandon unsaved changes to "%title%" and reload page?
-DocumentTitle=Page Title
-NeedDocTitle=Please enter a title for the current page.
-DocTitleHelp=This identifies the page in the window title and bookmarks.
-CancelPublishTitle=Cancel publishing?
-## LOCALIZATION NOTE: "Continue" in this sentence must match the text for
-## the CancelPublishContinue key below
-CancelPublishMessage=Cancelling while publishing is in progress may result in your file(s) being incompletely transferred. Would you like to Continue or Cancel?
-CancelPublishContinue=Continue
-MissingImageError=Please enter or choose an image of type gif, jpg, or png.
-EmptyHREFError=Please choose a location to create a new link.
-LinkText=Link Text
-LinkImage=Link Image
-MixedSelection=[Mixed selection]
-Mixed=(mixed)
-# LOCALIZATION NOTE (NotInstalled): %S is the name of the font
-NotInstalled=%S (not installed)
-EnterLinkText=Enter text to display for the link:
-EnterLinkTextAccessKey=T
-EmptyLinkTextError=Please enter some text for this link.
-EditTextWarning=This will replace existing content.
-#LOCALIZATION NOTE (ValidateNumber):Don't translate: %n% %min% %max%
-ValidateRangeMsg=The number you entered (%n%) is outside of the allowed range.
-ValidateNumberMsg=Please enter a number between %min% and %max%.
-MissingAnchorNameError=Please enter a name for this anchor.
-#LOCALIZATION NOTE (DuplicateAnchorNameError): Don't translate %name%
-DuplicateAnchorNameError="%name%" already exists in this page. Please enter a different name.
-BulletStyle=Bullet Style
-SolidCircle=Solid circle
-OpenCircle=Open circle
-SolidSquare=Solid square
-NumberStyle=Number Style
-Automatic=Automatic
-Style_1=1, 2, 3…
-Style_I=I, II, III…
-Style_i=i, ii, iii…
-Style_A=A, B, C…
-Style_a=a, b, c…
-Pixels=pixels
-Percent=percent
-PercentOfCell=% of cell
-PercentOfWindow=% of window
-PercentOfTable=% of table
-#LOCALIZATION NOTE (untitledTitle): %S is the window #. No plural handling needed.
-untitledTitle=untitled-%S
-untitledDefaultFilename=untitled
-ShowToolbar=Show Toolbar
-HideToolbar=Hide Toolbar
-ImapError=Unable to load image
-ImapCheck=\nPlease select a new location (URL) and try again.
-SaveToUseRelativeUrl=Relative URLs can only be used on pages which have been saved
-NoNamedAnchorsOrHeadings=(No named anchors or headings in this page)
-TextColor=Text Color
-HighlightColor=Highlight Color
-PageColor=Page Background Color
-BlockColor=Block Background Color
-TableColor=Table Background Color
-CellColor=Cell Background Color
-TableOrCellColor=Table or Cell Color
-LinkColor=Link Text Color
-ActiveLinkColor=Active Link Color
-VisitedLinkColor=Visited Link Color
-NoColorError=Click on a color or enter a valid HTML color string
-Table=Table
-TableCell=Table Cell
-NestedTable=Nested Table
-HLine=Horizontal Line
-Link=Link
-Image=Image
-ImageAndLink=Image and Link
-NamedAnchor=Named Anchor
-List=List
-ListItem=List Item
-Form=Form
-InputTag=Form Field
-InputImage=Form Image
-TextArea=Text Area
-Select=Selection List
-Button=Button
-Label=Label
-FieldSet=Field Set
-Tag=Tag
-MissingSiteNameError=Please enter a name for this publishing site.
-MissingPublishUrlError=Please enter a location for publishing this page.
-MissingPublishFilename=Please enter a filename for the current page.
-#LOCALIZATION NOTE (DuplicateSiteNameError): Don't translate %name%
-DuplicateSiteNameError="%name%" already exists. Please enter a different site name.
-AdvancedProperties=Advanced Properties…
-AdvancedEditForCellMsg=Advanced Edit is unavailable when multiple cells are selected
-# LOCALIZATION NOTE (ObjectProperties):Don't translate "%obj%" it will be replaced with one of above object nouns
-ObjectProperties=%obj% Properties…
-# LOCALIZATION NOTE This character must be in the above string and not confict with other accesskeys in Format menu
-ObjectPropertiesAccessKey=o
-# LOCALIZATION NOTE (JoinSelectedCells): This variable should contain the "tableJoinCells.accesskey"
-# letter as defined in editorOverlay.dtd
-JoinSelectedCells=Join Selected Cells
-# LOCALIZATION NOTE (JoinCellToRight): This variable should contain the "tableJoinCells.accesskey"
-# letter as defined in editorOverlay.dtd
-JoinCellToRight=Join with Cell to the Right
-JoinCellAccesskey=j
-# LOCALIZATION NOTE (TableSelectKey): Ctrl key on a keyboard
-TableSelectKey=Ctrl+
-# LOCALIZATION NOTE (XulKeyMac): Command key on a Mac keyboard
-XulKeyMac=Cmd+
-# LOCALIZATION NOTE (Del): Del key on a keyboard
-Del=Del
-Delete=Delete
-DeleteCells=Delete Cells
-DeleteTableTitle=Delete Rows or Columns
-DeleteTableMsg=Reducing the number of rows or columns will delete table cells and their contents. Do you really want to do this?
-Clear=Clear
-#Mouse actions
-Click=Click
-Drag=Drag
-Unknown=Unknown
-#
-# LOCALIZATION NOTE "RemoveTextStylesAccesskey" is used for both
-# menu items: "RemoveTextStyles" and "StopTextStyles"
-RemoveTextStylesAccesskey=x
-RemoveTextStyles=Remove All Text Styles
-StopTextStyles=Discontinue Text Styles
-#
-# LOCALIZATION NOTE "RemoveLinksAccesskey" is used for both
-# menu items: "RemoveLinks" and "StopLinks"
-RemoveLinksAccesskey=n
-RemoveLinks=Remove Links
-StopLinks=Discontinue Link
-#
-NoFormAction=It is recommended that you enter an action for this form. Self-posting forms are an advanced technique that may not work consistently in all browsers.
-NoAltText=If the image is relevant to the content of the document, you must supply alternate text that will appear in text-only browsers, and that will appear in other browsers when an image is loading or when image loading is disabled.
-#
-Malformed=The source could not be converted back into the document because it is not valid XHTML.
-NoLinksToCheck=There are no elements with links to check
diff --git a/editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd b/editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd
deleted file mode 100644
index 9e4f8b065..000000000
--- a/editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd
+++ /dev/null
@@ -1,346 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Attn: Localization - some of the menus in this dialog directly affect mail also. -->
-
-<!-- File menu items -->
-<!ENTITY saveCmd.key "S">
-
-<!-- Edit menu items -->
-<!ENTITY pasteNoFormatting.label "Paste Without Formatting">
-<!ENTITY pasteNoFormatting.accesskey "n">
-<!ENTITY pasteNoFormatting.key "V">
-<!ENTITY pasteAs.label "Paste As">
-<!ENTITY pasteAs.accesskey "a">
-<!ENTITY pasteAsQuotationCmd.label "Paste As Quotation">
-<!ENTITY pasteAsQuotationCmd.accesskey "Q">
-<!ENTITY pasteAsQuotationCmd.key "o">
-<!ENTITY findBarCmd.label "Find…">
-<!ENTITY findReplaceCmd.label "Find and Replace…">
-<!ENTITY enableInlineSpellChecker.label "Spellcheck As You Type">
-<!ENTITY enableInlineSpellChecker.accesskey "S">
-<!ENTITY checkSpellingCmd2.label "Check Spelling…">
-<!ENTITY checkSpellingCmd2.accesskey "h">
-<!ENTITY checkSpellingCmd2.key "p">
-
-<!-- Insert menu items -->
-<!ENTITY insertMenu.label "Insert">
-<!ENTITY insertMenu.accesskey "I">
-<!ENTITY insertLinkCmd2.label "Link…">
-<!ENTITY insertLinkCmd2.accesskey "L">
-<!ENTITY insertLinkCmd2.key "K">
-<!ENTITY insertAnchorCmd.label "Named Anchor…">
-<!ENTITY insertAnchorCmd.accesskey "A">
-<!ENTITY insertImageCmd.label "Image…">
-<!ENTITY insertImageCmd.accesskey "I">
-<!ENTITY insertHLineCmd.label "Horizontal Line">
-<!ENTITY insertHLineCmd.accesskey "o">
-<!ENTITY insertTableCmd.label "Table…">
-<!ENTITY insertTableCmd.accesskey "T">
-<!ENTITY insertHTMLCmd.label "HTML…">
-<!ENTITY insertHTMLCmd.accesskey "H">
-<!ENTITY insertMathCmd.label "Math…">
-<!ENTITY insertMathCmd.accesskey "M">
-<!ENTITY insertCharsCmd.label "Characters and Symbols…">
-<!ENTITY insertCharsCmd.accesskey "C">
-<!ENTITY insertBreakAllCmd.label "Break Below Image(s)">
-<!ENTITY insertBreakAllCmd.accesskey "k">
-
-<!-- Used just in context popup. -->
-<!ENTITY createLinkCmd.label "Create Link…">
-<!ENTITY createLinkCmd.accesskey "k">
-<!ENTITY editLinkCmd.label "Edit Link in New Composer">
-<!ENTITY editLinkCmd.accesskey "i">
-
-<!-- Font Face SubMenu -->
-<!ENTITY FontFaceSelect.tooltip "Choose a font">
-<!ENTITY fontfaceMenu.label "Font">
-<!ENTITY fontfaceMenu.accesskey "F">
-<!ENTITY fontVarWidth.label "Variable Width">
-<!ENTITY fontVarWidth.accesskey "V">
-<!ENTITY fontFixedWidth.label "Fixed Width">
-<!ENTITY fontFixedWidth.accesskey "x">
-<!ENTITY fontFixedWidth.key "T">
-<!ENTITY fontHelvetica.label "Helvetica, Arial">
-<!ENTITY fontHelvetica.accesskey "l">
-<!ENTITY fontTimes.label "Times">
-<!ENTITY fontTimes.accesskey "T">
-<!ENTITY fontCourier.label "Courier">
-<!ENTITY fontCourier.accesskey "C">
-
-<!-- Font Size SubMenu -->
-<!ENTITY FontSizeSelect.tooltip "Choose a font size">
-<!ENTITY decreaseFontSize.label "Smaller">
-<!ENTITY decreaseFontSize.accesskey "r">
-<!ENTITY decrementFontSize.key "&lt;">
-<!ENTITY decrementFontSize.key2 ","> <!-- < is above this key on many keyboards -->
-<!ENTITY increaseFontSize.label "Larger">
-<!ENTITY increaseFontSize.accesskey "g">
-<!ENTITY incrementFontSize.key "&gt;">
-<!ENTITY incrementFontSize.key2 "."> <!-- > is above this key on many keyboards -->
-
-<!ENTITY fontSizeMenu.label "Size">
-<!ENTITY fontSizeMenu.accesskey "z">
-<!ENTITY size-tinyCmd.label "Tiny">
-<!ENTITY size-tinyCmd.accesskey "T">
-<!ENTITY size-smallCmd.label "Small">
-<!ENTITY size-smallCmd.accesskey "S">
-<!ENTITY size-mediumCmd.label "Medium">
-<!ENTITY size-mediumCmd.accesskey "M">
-<!ENTITY size-largeCmd.label "Large">
-<!ENTITY size-largeCmd.accesskey "L">
-<!ENTITY size-extraLargeCmd.label "Extra Large">
-<!ENTITY size-extraLargeCmd.accesskey "x">
-<!ENTITY size-hugeCmd.label "Huge">
-<!ENTITY size-hugeCmd.accesskey "H">
-
-<!-- Font Style SubMenu -->
-<!ENTITY fontStyleMenu.label "Text Style">
-<!ENTITY fontStyleMenu.accesskey "S">
-<!ENTITY styleBoldCmd.label "Bold">
-<!ENTITY styleBoldCmd.accesskey "B">
-<!ENTITY styleBoldCmd.key "B">
-<!ENTITY styleItalicCmd.label "Italic">
-<!ENTITY styleItalicCmd.accesskey "I">
-<!ENTITY styleItalicCmd.key "I">
-<!ENTITY styleUnderlineCmd.label "Underline">
-<!ENTITY styleUnderlineCmd.accesskey "U">
-<!ENTITY styleUnderlineCmd.key "U">
-<!ENTITY styleStrikeThruCmd.label "Strikethrough">
-<!ENTITY styleStrikeThruCmd.accesskey "k">
-<!ENTITY styleSuperscriptCmd.label "Superscript">
-<!ENTITY styleSuperscriptCmd.accesskey "p">
-<!ENTITY styleSubscriptCmd.label "Subscript">
-<!ENTITY styleSubscriptCmd.accesskey "S">
-<!ENTITY styleNonbreakingCmd.label "Nonbreaking">
-<!ENTITY styleNonbreakingCmd.accesskey "N">
-<!ENTITY styleEm.label "Emphasis">
-<!ENTITY styleEm.accesskey "E">
-<!ENTITY styleStrong.label "Stronger Emphasis">
-<!ENTITY styleStrong.accesskey "t">
-<!ENTITY styleCite.label "Citation">
-<!ENTITY styleCite.accesskey "C">
-<!ENTITY styleAbbr.label "Abbreviation">
-<!ENTITY styleAbbr.accesskey "A">
-<!ENTITY styleAcronym.label "Acronym">
-<!ENTITY styleAcronym.accesskey "r">
-<!ENTITY styleCode.label "Code">
-<!ENTITY styleCode.accesskey "o">
-<!ENTITY styleSamp.label "Sample Output">
-<!ENTITY styleSamp.accesskey "m">
-<!ENTITY styleVar.label "Variable">
-<!ENTITY styleVar.accesskey "V">
-
-<!ENTITY formatFontColor.label "Text Color…">
-<!ENTITY formatFontColor.accesskey "C">
-<!ENTITY tableOrCellColor.label "Table or Cell Background Color…">
-<!ENTITY tableOrCellColor.accesskey "B">
-
-<!ENTITY formatRemoveStyles.key "Y">
-<!ENTITY formatRemoveLinks.key "K">
-<!ENTITY formatRemoveNamedAnchors.label "Remove Named Anchors">
-<!ENTITY formatRemoveNamedAnchors.accesskey "R">
-<!ENTITY formatRemoveNamedAnchors2.key "R">
-
-<!ENTITY paragraphMenu.label "Paragraph">
-<!ENTITY paragraphMenu.accesskey "P">
-<!ENTITY paragraphParagraphCmd.label "Paragraph">
-<!ENTITY paragraphParagraphCmd.accesskey "P">
-<!ENTITY heading1Cmd.label "Heading 1">
-<!ENTITY heading1Cmd.accesskey "1">
-<!ENTITY heading2Cmd.label "Heading 2">
-<!ENTITY heading2Cmd.accesskey "2">
-<!ENTITY heading3Cmd.label "Heading 3">
-<!ENTITY heading3Cmd.accesskey "3">
-<!ENTITY heading4Cmd.label "Heading 4">
-<!ENTITY heading4Cmd.accesskey "4">
-<!ENTITY heading5Cmd.label "Heading 5">
-<!ENTITY heading5Cmd.accesskey "5">
-<!ENTITY heading6Cmd.label "Heading 6">
-<!ENTITY heading6Cmd.accesskey "6">
-<!ENTITY paragraphAddressCmd.label "Address">
-<!ENTITY paragraphAddressCmd.accesskey "A">
-<!ENTITY paragraphPreformatCmd.label "Preformat">
-<!ENTITY paragraphPreformatCmd.accesskey "f">
-
-<!-- List menu items -->
-<!ENTITY formatlistMenu.label "List">
-<!ENTITY formatlistMenu.accesskey "L">
-<!ENTITY noneCmd.label "None">
-<!ENTITY noneCmd.accesskey "N">
-<!ENTITY listBulletCmd.label "Bulleted">
-<!ENTITY listBulletCmd.accesskey "B">
-<!ENTITY listNumberedCmd.label "Numbered">
-<!ENTITY listNumberedCmd.accesskey "m">
-<!ENTITY listTermCmd.label "Term">
-<!ENTITY listTermCmd.accesskey "T">
-<!ENTITY listDefinitionCmd.label "Definition">
-<!ENTITY listDefinitionCmd.accesskey "D">
-<!ENTITY listPropsCmd.label "List Properties…">
-<!ENTITY listPropsCmd.accesskey "L">
-
-<!ENTITY ParagraphSelect.tooltip "Choose a paragraph format">
-<!-- Shared in Paragraph, and Toolbar menulist -->
-<!ENTITY bodyTextCmd.label "Body Text">
-<!ENTITY bodyTextCmd.accesskey "T">
-<!-- isn't used in menu now, but may be added in future -->
-<!ENTITY advancedPropertiesCmd.label "Advanced Properties">
-<!ENTITY advancedPropertiesCmd.accesskey "v">
-
-<!-- Align menu items -->
-<!ENTITY alignMenu.label "Align">
-<!ENTITY alignMenu.accesskey "A">
-<!ENTITY alignLeft.label "Left">
-<!ENTITY alignLeft.accesskey "L">
-<!ENTITY alignLeft.tooltip "Align Left">
-<!ENTITY alignCenter.label "Center">
-<!ENTITY alignCenter.accesskey "C">
-<!ENTITY alignCenter.tooltip "Align Center">
-<!ENTITY alignRight.label "Right">
-<!ENTITY alignRight.accesskey "R">
-<!ENTITY alignRight.tooltip "Align Right">
-<!ENTITY alignJustify.label "Justify">
-<!ENTITY alignJustify.accesskey "J">
-<!ENTITY alignJustify.tooltip "Align Justified">
-
-<!-- Layer toolbar items -->
-<!ENTITY layer.tooltip "Layer">
-<!ENTITY layerSendToBack.tooltip "Send to Back">
-<!ENTITY layerBringToFront.tooltip "Bring to Front">
-
-<!ENTITY increaseIndent.label "Increase Indent">
-<!ENTITY increaseIndent.accesskey "I">
-<!ENTITY increaseIndent.key "]">
-<!ENTITY decreaseIndent.label "Decrease Indent">
-<!ENTITY decreaseIndent.accesskey "D">
-<!ENTITY decreaseIndent.key "[">
-
-<!ENTITY colorsAndBackground.label "Page Colors and Background…">
-<!ENTITY colorsAndBackground.accesskey "u">
-
-<!-- Table Menu -->
-<!ENTITY tableMenu.label "Table">
-<!ENTITY tableMenu.accesskey "b">
-
-<!-- Select Submenu -->
-<!ENTITY tableSelectMenu.label "Select">
-<!ENTITY tableSelectMenu.accesskey "S">
-
-<!ENTITY tableSelectMenu2.label "Table Select">
-<!ENTITY tableSelectMenu2.accesskey "S">
-<!ENTITY tableInsertMenu2.label "Table Insert">
-<!ENTITY tableInsertMenu2.accesskey "I">
-<!ENTITY tableDeleteMenu2.label "Table Delete">
-<!ENTITY tableDeleteMenu2.accesskey "D">
-
-<!-- Insert SubMenu -->
-<!ENTITY tableInsertMenu.label "Insert">
-<!ENTITY tableInsertMenu.accesskey "I">
-<!ENTITY tableTable.label "Table">
-<!ENTITY tableTable.accesskey "T">
-<!ENTITY tableRow.label "Row">
-<!ENTITY tableRows.label "Row(s)">
-<!ENTITY tableRow.accesskey "R">
-<!ENTITY tableRowAbove.label "Row Above">
-<!ENTITY tableRowAbove.accesskey "R">
-<!ENTITY tableRowBelow.label "Row Below">
-<!ENTITY tableRowBelow.accesskey "B">
-<!ENTITY tableColumn.label "Column">
-<!ENTITY tableColumns.label "Column(s)">
-<!ENTITY tableColumn.accesskey "o">
-<!ENTITY tableColumnBefore.label "Column Before">
-<!ENTITY tableColumnBefore.accesskey "o">
-<!ENTITY tableColumnAfter.label "Column After">
-<!ENTITY tableColumnAfter.accesskey "A">
-<!ENTITY tableCell.label "Cell">
-<!ENTITY tableCells.label "Cell(s)">
-<!ENTITY tableCell.accesskey "C">
-<!ENTITY tableCellContents.label "Cell Contents">
-<!ENTITY tableCellContents.accesskey "n">
-<!ENTITY tableAllCells.label "All Cells">
-<!ENTITY tableAllCells.accesskey "A">
-<!ENTITY tableCellBefore.label "Cell Before">
-<!ENTITY tableCellBefore.accesskey "C">
-<!ENTITY tableCellAfter.label "Cell After">
-<!ENTITY tableCellAfter.accesskey "f">
-<!-- Delete SubMenu -->
-<!ENTITY tableDeleteMenu.label "Delete">
-<!ENTITY tableDeleteMenu.accesskey "D">
-
-<!-- text for "Join Cells" is in editor.properties
- ("JoinSelectedCells" and "JoinCellToRight")
- the access key must exist in both of those strings
- But value must be set here for accesskey to draw properly
--->
-<!ENTITY tableJoinCells.label "j">
-<!ENTITY tableJoinCells.accesskey "j">
-<!ENTITY tableSplitCell.label "Split Cell">
-<!ENTITY tableSplitCell.accesskey "C">
-<!ENTITY convertToTable.label "Create Table from Selection">
-<!ENTITY convertToTable.accesskey "r">
-<!ENTITY tableProperties.label "Table Properties…">
-<!ENTITY tableProperties.accesskey "o">
-
-<!-- Toolbar-only items -->
-<!ENTITY menuBar.tooltip "Menu Bar">
-<!ENTITY formatToolbar.tooltip "Formatting Toolbar">
-<!ENTITY cutToolbarCmd.tooltip "Cut">
-<!ENTITY copyToolbarCmd.tooltip "Copy">
-<!ENTITY pasteToolbarCmd.tooltip "Paste">
-<!ENTITY printToolbarCmd.label "Print">
-<!ENTITY printToolbarCmd.tooltip "Print this page">
-<!ENTITY findToolbarCmd.label "Find">
-<!ENTITY findToolbarCmd.tooltip "Find text in page">
-<!ENTITY spellToolbarCmd.label "Spell">
-<!ENTITY spellToolbarCmd.tooltip "Check spelling of selection or entire page">
-<!ENTITY imageToolbarCmd.label "Image">
-<!ENTITY imageToolbarCmd.tooltip "Insert new image or edit selected image's properties">
-<!ENTITY hruleToolbarCmd.label "H.Line">
-<!ENTITY hruleToolbarCmd.tooltip "Insert horizontal line or edit selected line's properties">
-<!ENTITY tableToolbarCmd.label "Table">
-<!ENTITY tableToolbarCmd.tooltip "Insert new table or edit selected table's properties">
-<!ENTITY linkToolbarCmd.label "Link">
-<!ENTITY linkToolbarCmd.tooltip "Insert new link or edit selected link's properties">
-<!ENTITY anchorToolbarCmd.label "Anchor">
-<!ENTITY anchorToolbarCmd.tooltip "Insert new named anchor or edit selected anchor's properties">
-<!ENTITY TextColorButton.tooltip "Choose color for text">
-<!ENTITY BackgroundColorButton.tooltip "Choose color for background">
-<!ENTITY throbber.tooltip "Go to the &vendorShortName; home page">
-<!ENTITY HighlightColorButton.tooltip "Choose highlight color for text">
-
-<!-- Editor toolbar -->
-<!ENTITY absoluteFontSizeToolbarCmd.tooltip "Set font size">
-<!ENTITY decreaseFontSizeToolbarCmd.tooltip "Smaller font size">
-<!ENTITY increaseFontSizeToolbarCmd.tooltip "Larger font size">
-<!ENTITY boldToolbarCmd.tooltip "Bold">
-<!ENTITY italicToolbarCmd.tooltip "Italic">
-<!ENTITY underlineToolbarCmd.tooltip "Underline">
-<!ENTITY bulletListToolbarCmd.tooltip "Apply or remove bulleted list">
-<!ENTITY numberListToolbarCmd.tooltip "Apply or remove numbered list">
-<!ENTITY outdentToolbarCmd.tooltip "Outdent text (move left)">
-<!ENTITY indentToolbarCmd.tooltip "Indent text (move right)">
-<!ENTITY AlignPopupButton.tooltip "Choose text alignment">
-<!ENTITY InsertPopupButton.tooltip "Insert a Link, Anchor, Image, Horizontal Line, or Table">
-<!ENTITY alignLeftButton.tooltip "Align text along left margin">
-<!ENTITY alignCenterButton.tooltip "Align text centered">
-<!ENTITY alignRightButton.tooltip "Align text along right margin">
-<!ENTITY alignJustifyButton.tooltip "Align text along left and right margins">
-
-<!-- Structure Toolbar Context Menu items -->
-<!ENTITY structSelect.label "Select">
-<!ENTITY structSelect.accesskey "s">
-<!ENTITY structRemoveTag.label "Remove tag">
-<!ENTITY structRemoveTag.accesskey "r">
-<!ENTITY structChangeTag.label "Change tag">
-<!ENTITY structChangeTag.accesskey "c">
-
-<!-- TOC manipulation -->
-<!ENTITY insertTOC.label "Insert">
-<!ENTITY insertTOC.accesskey "i">
-<!ENTITY updateTOC.label "Update">
-<!ENTITY updateTOC.accesskey "u">
-<!ENTITY removeTOC.label "Remove">
-<!ENTITY removeTOC.accesskey "r">
-<!ENTITY tocMenu.label "Table of Contents…">
-<!ENTITY tocMenu.accesskey "b">
diff --git a/editor/ui/locales/en-US/chrome/composer/editorSmileyOverlay.dtd b/editor/ui/locales/en-US/chrome/composer/editorSmileyOverlay.dtd
deleted file mode 100644
index 74c3269d7..000000000
--- a/editor/ui/locales/en-US/chrome/composer/editorSmileyOverlay.dtd
+++ /dev/null
@@ -1,58 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Smiley Menu items -->
-<!ENTITY insertSmiley.label "Smiley">
-<!ENTITY insertSmiley.accesskey "S">
-
-<!ENTITY smiley1Cmd.label "Smile">
-<!ENTITY smiley1Cmd.accesskey "S">
-<!ENTITY smiley1Cmd.tooltip "Insert a smiley face">
-<!ENTITY smiley2Cmd.label "Frown">
-<!ENTITY smiley2Cmd.accesskey "F">
-<!ENTITY smiley2Cmd.tooltip "Insert a frown face">
-<!ENTITY smiley3Cmd.label "Wink">
-<!ENTITY smiley3Cmd.accesskey "W">
-<!ENTITY smiley3Cmd.tooltip "Insert a wink face">
-<!ENTITY smiley4Cmd.label "Tongue-out">
-<!ENTITY smiley4Cmd.accesskey "T">
-<!ENTITY smiley4Cmd.tooltip "Insert a tongue-out face">
-<!ENTITY smiley5Cmd.label "Laughing">
-<!ENTITY smiley5Cmd.accesskey "L">
-<!ENTITY smiley5Cmd.tooltip "Insert a laughing face">
-<!ENTITY smiley6Cmd.label "Embarrassed">
-<!ENTITY smiley6Cmd.accesskey "E">
-<!ENTITY smiley6Cmd.tooltip "Insert an embarrassed face">
-<!ENTITY smiley7Cmd.label "Undecided">
-<!ENTITY smiley7Cmd.accesskey "U">
-<!ENTITY smiley7Cmd.tooltip "Insert an undecided face">
-<!ENTITY smiley8Cmd.label "Surprise">
-<!ENTITY smiley8Cmd.accesskey "p">
-<!ENTITY smiley8Cmd.tooltip "Insert a surprised face">
-<!ENTITY smiley9Cmd.label "Kiss">
-<!ENTITY smiley9Cmd.accesskey "K">
-<!ENTITY smiley9Cmd.tooltip "Insert a kiss face">
-<!ENTITY smiley10Cmd.label "Yell">
-<!ENTITY smiley10Cmd.accesskey "Y">
-<!ENTITY smiley10Cmd.tooltip "Insert a yelling face">
-<!ENTITY smiley11Cmd.label "Cool">
-<!ENTITY smiley11Cmd.accesskey "C">
-<!ENTITY smiley11Cmd.tooltip "Insert a cool face">
-<!ENTITY smiley12Cmd.label "Money-Mouth">
-<!ENTITY smiley12Cmd.accesskey "M">
-<!ENTITY smiley12Cmd.tooltip "Insert a money-mouth face">
-<!ENTITY smiley13Cmd.label "Foot-in-Mouth">
-<!ENTITY smiley13Cmd.accesskey "o">
-<!ENTITY smiley13Cmd.tooltip "Insert a foot-in-mouth face">
-<!ENTITY smiley14Cmd.label "Innocent">
-<!ENTITY smiley14Cmd.accesskey "I">
-<!ENTITY smiley14Cmd.tooltip "Insert an innocent face">
-<!ENTITY smiley15Cmd.label "Cry">
-<!ENTITY smiley15Cmd.accesskey "r">
-<!ENTITY smiley15Cmd.tooltip "Insert a crying face">
-<!ENTITY smiley16Cmd.label "Lips-are-Sealed">
-<!ENTITY smiley16Cmd.accesskey "a">
-<!ENTITY smiley16Cmd.tooltip "Insert a lips-are-sealed face">
-<!ENTITY SmileButton.tooltip "Insert a smiley face">
-
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EdAdvancedEdit.dtd b/editor/ui/locales/en-US/chrome/dialogs/EdAdvancedEdit.dtd
deleted file mode 100644
index 83fcbd741..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EdAdvancedEdit.dtd
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY WindowTitle.label "Advanced Property Editor">
-<!ENTITY AttName.label "Attribute: ">
-<!ENTITY AttValue.label "Value: ">
-<!ENTITY PropertyName.label "Property: ">
-<!ENTITY currentattributesfor.label "Current attributes for: ">
-<!ENTITY tree.attributeHeader.label "Attribute">
-<!ENTITY tree.propertyHeader.label "Property">
-<!ENTITY tree.valueHeader.label "Value">
-<!ENTITY tabHTML.label "HTML Attributes">
-<!ENTITY tabCSS.label "Inline Style">
-<!ENTITY tabJSE.label "JavaScript Events">
-
-<!ENTITY editAttribute.label "Click on an item above to edit its value">
-<!ENTITY removeAttribute.label "Remove">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EdColorPicker.dtd b/editor/ui/locales/en-US/chrome/dialogs/EdColorPicker.dtd
deleted file mode 100644
index f1d9d447b..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EdColorPicker.dtd
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Color">
-<!ENTITY lastPickedColor.label "Last-picked color">
-<!ENTITY lastPickedColor.accessKey "L">
-<!ENTITY setColor1.label "Click on a color or">
-<!ENTITY setColor2.label "enter an HTML color string">
-<!ENTITY setColor2.accessKey "H">
-<!ENTITY setColorExample.label "(e.g.: &quot;#0000ff&quot; or &quot;blue&quot;):">
-<!ENTITY default.label "Default">
-<!ENTITY default.accessKey "D">
-<!ENTITY palette.label "Palette:">
-<!ENTITY standardPalette.label "Standard">
-<!ENTITY webPalette.label "All web colors">
-<!ENTITY background.label "Background for:">
-<!ENTITY background.accessKey "B">
-<!ENTITY table.label "Table">
-<!ENTITY table.accessKey "T">
-<!ENTITY cell.label "Cell(s)">
-<!ENTITY cell.accessKey "C">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EdConvertToTable.dtd b/editor/ui/locales/en-US/chrome/dialogs/EdConvertToTable.dtd
deleted file mode 100644
index 044f60e49..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EdConvertToTable.dtd
+++ /dev/null
@@ -1,15 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Convert To Table">
-<!ENTITY instructions1.label "Composer creates a new table row for each paragraph in the selection.">
-<!ENTITY instructions2.label "Choose the character used to separate the selection into columns:">
-<!ENTITY commaRadio.label "Comma">
-<!ENTITY spaceRadio.label "Space">
-<!ENTITY otherRadio.label "Other Character:">
-<!ENTITY deleteCharCheck.label "Delete separator character">
-<!ENTITY collapseSpaces.label "Ignore extra spaces">
-<!ENTITY collapseSpaces.tooltip "Convert adjacent spaces to one separator">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EdDialogOverlay.dtd b/editor/ui/locales/en-US/chrome/dialogs/EdDialogOverlay.dtd
deleted file mode 100644
index 99fd02a31..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EdDialogOverlay.dtd
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY AdvancedEditButton.label "Advanced Edit…">
-<!ENTITY AdvancedEditButton.accessKey "E">
-<!ENTITY AdvancedEditButton.tooltip "Add or modify HTML attributes, style attributes, and JavaScript">
-<!ENTITY chooseFileButton.label "Choose File...">
-<!ENTITY chooseFileButton.accessKey "F">
-<!ENTITY chooseFileLinkButton.label "Choose File...">
-<!ENTITY chooseFileLinkButton.accessKey "o">
-<!ENTITY makeUrlRelative.label "URL is relative to page location">
-<!ENTITY makeUrlRelative.accessKey "r">
-<!ENTITY makeUrlRelative.tooltip "Change between relative and absolute URL. You must first save the page to change this.">
-
-<!-- Shared by Link and Image dialogs -->
-<!ENTITY LinkURLEditField.label "Enter a web page location, a local file, or select a Named Anchor or Heading from the popup list:">
-<!ENTITY LinkURLEditField.accessKey "w">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EdNamedAnchorProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EdNamedAnchorProperties.dtd
deleted file mode 100644
index faa1e1992..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EdNamedAnchorProperties.dtd
+++ /dev/null
@@ -1,10 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Named Anchor Properties">
-<!ENTITY anchorNameEditField.label "Anchor Name:">
-<!ENTITY anchorNameEditField.accessKey "N">
-<!ENTITY nameInput.tooltip "Enter a unique name for this named anchor (target)">
-
-
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorButtonProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorButtonProperties.dtd
deleted file mode 100644
index efc6b400d..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorButtonProperties.dtd
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Button Properties">
-
-<!ENTITY Settings.label "Settings">
-
-<!ENTITY ButtonType.label "Type">
-<!ENTITY ButtonType.accesskey "T">
-<!ENTITY submit.value "Submit">
-<!ENTITY reset.value "Reset">
-<!ENTITY button.value "Button">
-
-<!ENTITY ButtonName.label "Name:">
-<!ENTITY ButtonName.accesskey "N">
-<!ENTITY ButtonValue.label "Value:">
-<!ENTITY ButtonValue.accesskey "V">
-<!ENTITY tabIndex.label "Tab Index:">
-<!ENTITY tabIndex.accesskey "I">
-<!ENTITY ButtonDisabled.label "Disabled">
-<!ENTITY ButtonDisabled.accesskey "D">
-<!ENTITY AccessKey.label "Access Key:">
-<!ENTITY AccessKey.accesskey "K">
-
-<!ENTITY RemoveButton.label "Remove Button">
-<!ENTITY RemoveButton.accesskey "R">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorColorProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorColorProperties.dtd
deleted file mode 100644
index 9d40d4de4..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorColorProperties.dtd
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Page Colors and Background">
-<!ENTITY pageColors.label "Page Colors">
-<!ENTITY defaultColorsRadio.label "Reader's default colors (Don't set colors in page)">
-<!ENTITY defaultColorsRadio.accessKey "D">
-<!ENTITY defaultColorsRadio.tooltip "Use the color settings from the viewer (reader's) browser only">
-<!ENTITY customColorsRadio.label "Use custom colors:">
-<!ENTITY customColorsRadio.accessKey "C">
-<!ENTITY customColorsRadio.tooltip "These color settings override the viewer's browser settings">
-
-<!ENTITY normalText.label "Normal text">
-<!ENTITY normalText.accessKey "N">
-<!ENTITY linkText.label "Link text">
-<!ENTITY linkText.accessKey "L">
-<!ENTITY activeLinkText.label "Active link text">
-<!ENTITY activeLinkText.accessKey "A">
-<!ENTITY visitedLinkText.label "Visited link text">
-<!ENTITY visitedLinkText.accessKey "V">
-<!ENTITY background.label "Background:">
-<!ENTITY background.accessKey "B">
-<!ENTITY colon.character ":">
-<!ENTITY backgroundImage.label "Background Image:">
-<!ENTITY backgroundImage.accessKey "m">
-<!ENTITY backgroundImage.tooltip "Use an image file as the background for your page">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorFieldSetProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorFieldSetProperties.dtd
deleted file mode 100644
index a2db9d4e6..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorFieldSetProperties.dtd
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Field Set Properties">
-
-<!ENTITY Legend.label "Legend">
-<!ENTITY Legend.accesskey "L">
-
-<!ENTITY EditLegendText.label "Edit Legend:">
-<!ENTITY EditLegendText.accesskey "T">
-<!ENTITY LegendAlign.label "Align Legend:">
-<!ENTITY LegendAlign.accesskey "A">
-<!ENTITY AlignDefault.label "Default">
-<!ENTITY AlignLeft.label "Left">
-<!ENTITY AlignCenter.label "Center">
-<!ENTITY AlignRight.label "Right">
-
-<!ENTITY RemoveFieldSet.label "Remove Field Set">
-<!ENTITY RemoveFieldSet.accesskey "R">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorFormProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorFormProperties.dtd
deleted file mode 100644
index 2389adff2..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorFormProperties.dtd
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Form Properties">
-
-<!ENTITY Settings.label "Settings">
-
-<!ENTITY FormName.label "Form Name:">
-<!ENTITY FormName.accesskey "N">
-<!ENTITY FormAction.label "Action URL:">
-<!ENTITY FormAction.accesskey "A">
-<!ENTITY FormMethod.label "Method:">
-<!ENTITY FormMethod.accesskey "M">
-<!ENTITY FormEncType.label "Encoding:">
-<!ENTITY FormEncType.accesskey "c">
-<!ENTITY FormTarget.label "Target Frame:">
-<!ENTITY FormTarget.accesskey "T">
-
-<!ENTITY RemoveForm.label "Remove Form">
-<!ENTITY RemoveForm.accesskey "R">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorHLineProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorHLineProperties.dtd
deleted file mode 100644
index 9ad023dee..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorHLineProperties.dtd
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Horizontal Line Properties">
-
-<!ENTITY dimensionsBox.label "Dimensions">
-<!ENTITY heightEditField.label "Height:">
-<!ENTITY heightEditField.accessKey "G">
-<!ENTITY widthEditField.label "Width:">
-<!ENTITY widthEditField.accessKey "W">
-<!ENTITY pixelsPopup.value "pixels">
-<!ENTITY alignmentBox.label "Alignment">
-<!ENTITY leftRadio.label "Left">
-<!ENTITY leftRadio.accessKey "L">
-<!ENTITY centerRadio.label "Center">
-<!ENTITY centerRadio.accessKey "C">
-<!ENTITY rightRadio.label "Right">
-<!ENTITY rightRadio.accessKey "R">
-
-<!ENTITY threeDShading.label "3-D Shading">
-<!ENTITY threeDShading.accessKey "S">
-<!ENTITY saveSettings.label "Use as Default">
-<!ENTITY saveSettings.accessKey "D">
-<!ENTITY saveSettings.tooltip "Save these settings to use when inserting new horizontal lines">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorImageProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorImageProperties.dtd
deleted file mode 100644
index 280af6df2..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorImageProperties.dtd
+++ /dev/null
@@ -1,79 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- These strings are for use specifically in the editor's image and form image dialogs. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Image Properties">
-
-<!ENTITY pixelsPopup.value "pixels">
-
-<!-- These are in the Location tab panel -->
-<!ENTITY locationEditField.label "Image Location:">
-<!ENTITY locationEditField.accessKey "L">
-<!ENTITY locationEditField.tooltip "Type the image's filename or location">
-<!ENTITY locationEditField.shortenedDataURI "Shortened data URI (copy will place the full URI onto the clipboard)">
-<!ENTITY title.label "Tooltip:">
-<!ENTITY title.accessKey "T">
-<!ENTITY title.tooltip "The html 'title' attribute that displays as a tooltip">
-<!ENTITY altText.label "Alternate text:">
-<!ENTITY altText.accessKey "A">
-<!ENTITY altTextEditField.tooltip "Type text to display in place of the image">
-<!ENTITY noAltText.label "Don't use alternate text">
-<!ENTITY noAltText.accessKey "D">
-
-<!ENTITY previewBox.label "Image Preview">
-
-<!-- These controls are in the Dimensions tab panel -->
-<!-- actualSize.label should be same as actualSizeRadio.label + ":" -->
-<!ENTITY actualSize.label "Actual Size:">
-<!ENTITY actualSizeRadio.label "Actual Size">
-<!ENTITY actualSizeRadio.accessKey "A">
-<!ENTITY actualSizeRadio.tooltip "Revert to the image's actual size">
-<!ENTITY customSizeRadio.label "Custom Size">
-<!ENTITY customSizeRadio.accessKey "S">
-<!ENTITY customSizeRadio.tooltip "Change the image's size as displayed in the page">
-<!ENTITY heightEditField.label "Height:">
-<!ENTITY heightEditField.accessKey "G">
-<!ENTITY widthEditField.label "Width:">
-<!ENTITY widthEditField.accessKey "W">
-<!ENTITY constrainCheckbox.label "Constrain">
-<!ENTITY constrainCheckbox.accessKey "C">
-<!ENTITY constrainCheckbox.tooltip "Maintain the image's aspect ratio">
-
-<!-- These controls are in the Image Map box of the expanded area -->
-<!ENTITY imagemapBox.label "Image Map">
-<!ENTITY removeImageMapButton.label "Remove">
-<!ENTITY removeImageMapButton.accessKey "R">
-
-<!-- These are the options for image alignment -->
-<!ENTITY alignment.label "Align Text to Image">
-<!ENTITY bottomPopup.value "At the bottom">
-<!ENTITY topPopup.value "At the top">
-<!ENTITY centerPopup.value "In the center">
-<!ENTITY wrapRightPopup.value "Wrap to the right">
-<!ENTITY wrapLeftPopup.value "Wrap to the left">
-
-<!-- These controls are in the Spacing Box -->
-<!ENTITY spacingBox.label "Spacing">
-<!ENTITY leftRightEditField.label "Left and Right:">
-<!ENTITY leftRightEditField.accessKey "L">
-<!ENTITY topBottomEditField.label "Top and Bottom:">
-<!ENTITY topBottomEditField.accessKey "T">
-<!ENTITY borderEditField.label "Solid Border:">
-<!ENTITY borderEditField.accessKey "B">
-
-<!-- These controls are in the Link Box -->
-<!ENTITY showImageLinkBorder.label "Show border around linked image">
-<!ENTITY showImageLinkBorder.accessKey "B">
-<!ENTITY LinkAdvancedEditButton.label "Link Advanced Edit…">
-<!ENTITY LinkAdvancedEditButton.accessKey "L">
-<!ENTITY LinkAdvancedEditButton.tooltip "Add or modify HTML attributes, style attributes, and JavaScript">
-
-<!-- These tabs are currently used in the image input dialog -->
-<!ENTITY imageInputTab.label "Form">
-<!ENTITY imageLocationTab.label "Location">
-<!ENTITY imageDimensionsTab.label "Dimensions">
-<!ENTITY imageAppearanceTab.label "Appearance">
-<!ENTITY imageLinkTab.label "Link">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorInputProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorInputProperties.dtd
deleted file mode 100644
index ea7d09c75..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorInputProperties.dtd
+++ /dev/null
@@ -1,50 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Form Field Properties">
-<!ENTITY windowTitleImage.label "Form Image Properties">
-
-<!ENTITY InputType.label "Field Type">
-<!ENTITY InputType.accesskey "T">
-<!ENTITY text.value "Text">
-<!ENTITY password.value "Password">
-<!ENTITY checkbox.value "Check Box">
-<!ENTITY radio.value "Radio Button">
-<!ENTITY submit.value "Submit Button">
-<!ENTITY reset.value "Reset Button">
-<!ENTITY file.value "File">
-<!ENTITY hidden.value "Hidden">
-<!ENTITY image.value "Image">
-<!ENTITY button.value "Button">
-
-<!ENTITY InputSettings.label "Field Settings">
-<!ENTITY InputName.label "Field Name:">
-<!ENTITY InputName.accesskey "N">
-<!ENTITY GroupName.label "Group Name:">
-<!ENTITY GroupName.accesskey "N">
-<!ENTITY InputValue.label "Field Value:">
-<!ENTITY InputValue.accesskey "V">
-<!ENTITY InitialValue.label "Initial Value:">
-<!ENTITY InitialValue.accesskey "V">
-<!ENTITY InputChecked.label "Initially Checked">
-<!ENTITY InputChecked.accesskey "C">
-<!ENTITY InputSelected.label "Initially Selected">
-<!ENTITY InputSelected.accesskey "S">
-<!ENTITY InputReadOnly.label "Read Only">
-<!ENTITY InputReadOnly.accesskey "R">
-<!ENTITY InputDisabled.label "Disabled">
-<!ENTITY InputDisabled.accesskey "D">
-<!ENTITY tabIndex.label "Tab Index:">
-<!ENTITY tabIndex.accesskey "I">
-<!ENTITY TextSize.label "Field Size:">
-<!ENTITY TextSize.accesskey "F">
-<!ENTITY TextLength.label "Maximum Length:">
-<!ENTITY TextLength.accesskey "L">
-<!ENTITY AccessKey.label "Access Key:">
-<!ENTITY AccessKey.accesskey "K">
-<!ENTITY Accept.label "Accept Types:">
-<!ENTITY Accept.accesskey "A">
-
-<!ENTITY ImageProperties.label "Image Properties…">
-<!ENTITY ImageProperties.accesskey "E">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertChars.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorInsertChars.dtd
deleted file mode 100644
index 1755e499c..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertChars.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Insert Character">
-<!ENTITY category.label "Category">
-<!ENTITY letter.label "Letter:">
-<!ENTITY letter.accessKey "L">
-<!ENTITY character.label "Character:">
-<!ENTITY character.accessKey "C">
-<!ENTITY accentUpper.label "Accent Uppercase">
-<!ENTITY accentLower.label "Accent Lowercase">
-<!ENTITY otherUpper.label "Other Uppercase">
-<!ENTITY otherLower.label "Other Lowercase">
-<!ENTITY commonSymbols.label "Common Symbols">
-<!ENTITY insertButton.label "Insert">
-<!ENTITY closeButton.label "Close">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertMath.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorInsertMath.dtd
deleted file mode 100644
index 357ed0b20..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertMath.dtd
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Insert Math">
-
-<!ENTITY sourceEditField.label "Enter LaTeX source code:">
-
-<!ENTITY options.label "Options">
-<!ENTITY optionInline.label "Inline mode">
-<!ENTITY optionInline.accesskey "N">
-<!ENTITY optionDisplay.label "Display mode">
-<!ENTITY optionDisplay.accesskey "D">
-<!ENTITY optionLTR.label "Left-to-right direction">
-<!ENTITY optionLTR.accesskey "L">
-<!ENTITY optionRTL.label "Right-to-left direction">
-<!ENTITY optionRTL.accesskey "R">
-
-<!ENTITY insertButton.label "Insert">
-<!ENTITY insertButton.accesskey "I">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertSource.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorInsertSource.dtd
deleted file mode 100644
index 0b51a86c8..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertSource.dtd
+++ /dev/null
@@ -1,15 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Insert HTML">
-<!ENTITY sourceEditField.label "Enter HTML tags and text:">
-<!ENTITY example.label "Example: ">
-<!-- LOCALIZATION NOTE (exampleOpenTag.label): DONT_TRANSLATE: they are text for HTML tagnames: "<i>" and "</i>" -->
-<!ENTITY exampleOpenTag.label "&lt;i&gt;">
-<!-- LOCALIZATION NOTE (exampleCloseTag.label): DONT_TRANSLATE: they are text for HTML tagnames: "<i>" and "</i>" -->
-<!ENTITY exampleCloseTag.label "&lt;/i&gt;">
-<!ENTITY exampleText.label "Hello World!">
-<!ENTITY insertButton.label "Insert">
-<!ENTITY insertButton.accesskey "I">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertTOC.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorInsertTOC.dtd
deleted file mode 100644
index f3285a357..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertTOC.dtd
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY Window.title "Table of Contents">
-<!ENTITY buildToc.label "Build table of contents from:">
-<!ENTITY tag.label "Tag:">
-<!ENTITY class.label "Class:">
-<!ENTITY header1.label "Level 1">
-<!ENTITY header2.label "Level 2">
-<!ENTITY header3.label "Level 3">
-<!ENTITY header4.label "Level 4">
-<!ENTITY header5.label "Level 5">
-<!ENTITY header6.label "Level 6">
-<!ENTITY makeReadOnly.label "Make the table of contents read-only">
-<!ENTITY orderedList.label "Number all entries in the table of contents">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertTable.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorInsertTable.dtd
deleted file mode 100644
index 00b5d2d13..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorInsertTable.dtd
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Insert Table">
-
-<!ENTITY size.label "Size">
-<!ENTITY numRowsEditField.label "Rows:">
-<!ENTITY numRowsEditField.accessKey "R">
-<!ENTITY numColumnsEditField.label "Columns:">
-<!ENTITY numColumnsEditField.accessKey "C">
-<!ENTITY widthEditField.label "Width:">
-<!ENTITY widthEditField.accessKey "W">
-<!ENTITY borderEditField.label "Border:">
-<!ENTITY borderEditField.accessKey "B">
-<!ENTITY borderEditField.tooltip "Type a number for the table's border, or type zero (0) for no border">
-<!ENTITY pixels.label "pixels">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorLabelProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorLabelProperties.dtd
deleted file mode 100644
index 5ed05aa63..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorLabelProperties.dtd
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Label Properties">
-
-<!ENTITY Settings.label "Settings">
-<!ENTITY Settings.accesskey "S">
-
-<!ENTITY EditLabelText.label "Edit Text:">
-<!ENTITY EditLabelText.accesskey "T">
-<!ENTITY LabelFor.label "For Control:">
-<!ENTITY LabelFor.accesskey "F">
-<!ENTITY AccessKey.label "Access Key:">
-<!ENTITY AccessKey.accesskey "K">
-
-<!ENTITY RemoveLabel.label "Remove Label">
-<!ENTITY RemoveLabel.accesskey "R">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorLinkProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorLinkProperties.dtd
deleted file mode 100644
index 09b3b0155..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorLinkProperties.dtd
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Link Properties">
-<!ENTITY LinkURLBox.label "Link Location">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorListProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorListProperties.dtd
deleted file mode 100644
index 249433000..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorListProperties.dtd
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "List Properties">
-
-<!ENTITY ListType.label "List Type">
-<!ENTITY bulletStyle.label "Bullet Style:">
-<!ENTITY startingNumber.label "Start at:">
-<!ENTITY startingNumber.accessKey "S">
-<!ENTITY none.value "None">
-<!ENTITY bulletList.value "Bullet (Unnumbered) List">
-<!ENTITY numberList.value "Numbered List">
-<!ENTITY definitionList.value "Definition List">
-<!ENTITY changeEntireListRadio.label "Change entire list">
-<!ENTITY changeEntireListRadio.accessKey "C">
-<!ENTITY changeSelectedRadio.label "Change just selected items">
-<!ENTITY changeSelectedRadio.accessKey "I">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorPersonalDictionary.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorPersonalDictionary.dtd
deleted file mode 100644
index 2a8cf9b72..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorPersonalDictionary.dtd
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Personal Dictionary">
-
-<!ENTITY wordEditField.label "New word:">
-<!ENTITY wordEditField.accessKey "N">
-<!ENTITY AddButton.label "Add">
-<!ENTITY AddButton.accessKey "A">
-<!ENTITY DictionaryList.label "Words in dictionary:">
-<!ENTITY DictionaryList.accessKey "W">
-<!ENTITY ReplaceButton.label "Replace">
-<!ENTITY ReplaceButton.accessKey "R">
-<!ENTITY RemoveButton.label "Remove">
-<!ENTITY RemoveButton.accessKey "e">
-
-<!ENTITY CloseButton.label "Close">
-<!ENTITY CloseButton.accessKey "C">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorReplace.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorReplace.dtd
deleted file mode 100644
index 0bee6e40a..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorReplace.dtd
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- extracted from EdReplace.xul -->
-
-<!ENTITY replaceDialog.title "Find and Replace">
-<!ENTITY findField.label "Find text:">
-<!ENTITY findField.accesskey "n">
-<!ENTITY replaceField.label "Replace with:">
-<!ENTITY replaceField.accesskey "e">
-<!ENTITY caseSensitiveCheckbox.label "Match exact case">
-<!ENTITY caseSensitiveCheckbox.accesskey "c">
-<!ENTITY wrapCheckbox.label "Wrap around">
-<!ENTITY wrapCheckbox.accesskey "W">
-<!ENTITY backwardsCheckbox.label "Search backwards">
-<!ENTITY backwardsCheckbox.accesskey "b">
-<!ENTITY findNextButton.label "Find Next">
-<!ENTITY findNextButton.accesskey "F">
-<!ENTITY replaceButton.label "Replace">
-<!ENTITY replaceButton.accesskey "R">
-<!ENTITY replaceAndFindButton.label "Replace and Find">
-<!ENTITY replaceAndFindButton.accesskey "d">
-<!ENTITY replaceAllButton.label "Replace All">
-<!ENTITY replaceAllButton.accesskey "A">
-<!ENTITY closeButton.label "Close">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorSelectProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorSelectProperties.dtd
deleted file mode 100644
index e2eb20e69..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorSelectProperties.dtd
+++ /dev/null
@@ -1,48 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Selection List Properties">
-
-<!ENTITY Select.label "Selection List">
-<!ENTITY SelectName.label "List Name:">
-<!ENTITY SelectName.accesskey "N">
-<!ENTITY SelectSize.label "Height:">
-<!ENTITY SelectSize.accesskey "H">
-<!ENTITY SelectMultiple.label "Multiple Selection">
-<!ENTITY SelectMultiple.accesskey "M">
-<!ENTITY SelectDisabled.label "Disabled">
-<!ENTITY SelectDisabled.accesskey "D">
-<!ENTITY SelectTabIndex.label "Tab Index:">
-<!ENTITY SelectTabIndex.accesskey "I">
-
-<!ENTITY OptGroup.label "Option Group">
-<!ENTITY OptGroupLabel.label "Label:">
-<!ENTITY OptGroupLabel.accesskey "L">
-<!ENTITY OptGroupDisabled.label "Disabled">
-<!ENTITY OptGroupDisabled.accesskey "D">
-
-<!ENTITY Option.label "Option">
-<!ENTITY OptionText.label "Text:">
-<!ENTITY OptionText.accesskey "T">
-<!ENTITY OptionValue.label "Value:">
-<!ENTITY OptionValue.accesskey "V">
-<!ENTITY OptionSelected.label "Initially Selected">
-<!ENTITY OptionSelected.accesskey "S">
-<!ENTITY OptionDisabled.label "Disabled">
-<!ENTITY OptionDisabled.accesskey "D">
-
-<!ENTITY TextHeader.label "Text">
-<!ENTITY ValueHeader.label "Value">
-<!ENTITY SelectedHeader.label "Selected">
-
-<!ENTITY AddOption.label "Add Option">
-<!ENTITY AddOption.accesskey "O">
-<!ENTITY AddOptGroup.label "Add Group">
-<!ENTITY AddOptGroup.accesskey "G">
-<!ENTITY RemoveElement.label "Remove">
-<!ENTITY RemoveElement.accesskey "R">
-<!ENTITY MoveElementUp.label "Move Up">
-<!ENTITY MoveElementUp.accesskey "U">
-<!ENTITY MoveElementDown.label "Move Down">
-<!ENTITY MoveElementDown.accesskey "D">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorSpellCheck.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorSpellCheck.dtd
deleted file mode 100644
index 7d2915483..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorSpellCheck.dtd
+++ /dev/null
@@ -1,38 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- Window title -->
-<!ENTITY windowTitle.label "Check Spelling">
-
-<!ENTITY misspelledWord.label "Misspelled word:">
-<!ENTITY wordEditField.label "Replace with:">
-<!ENTITY wordEditField.accessKey "w">
-<!ENTITY checkwordButton.label "Check Word">
-<!ENTITY checkwordButton.accessKey "k">
-<!ENTITY suggestions.label "Suggestions:">
-<!ENTITY suggestions.accessKey "u">
-<!ENTITY ignoreButton.label "Ignore">
-<!ENTITY ignoreButton.accessKey "I">
-<!ENTITY ignoreAllButton.label "Ignore All">
-<!ENTITY ignoreAllButton.accessKey "n">
-<!ENTITY replaceButton.label "Replace">
-<!ENTITY replaceButton.accessKey "R">
-<!ENTITY replaceAllButton.label "Replace All">
-<!ENTITY replaceAllButton.accessKey "A">
-<!ENTITY stopButton.label "Stop">
-<!ENTITY stopButton.accessKey "o">
-<!ENTITY userDictionary.label "Personal Dictionary:">
-<!ENTITY moreDictionaries.label "Download more dictionaries…">
-<!ENTITY addToUserDictionaryButton.label "Add Word">
-<!ENTITY addToUserDictionaryButton.accessKey "d">
-<!ENTITY editUserDictionaryButton.label "Edit…">
-<!ENTITY editUserDictionaryButton.accessKey "E">
-<!ENTITY recheckButton2.label "Recheck Text">
-<!ENTITY recheckButton2.accessKey "T">
-<!ENTITY closeButton.label "Close">
-<!ENTITY closeButton.accessKey "C">
-<!ENTITY sendButton.label "Send">
-<!ENTITY sendButton.accessKey "S">
-<!ENTITY languagePopup.label "Language:">
-<!ENTITY languagePopup.accessKey "L">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorTableProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorTableProperties.dtd
deleted file mode 100644
index 512734d7a..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorTableProperties.dtd
+++ /dev/null
@@ -1,75 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY tableWindow.title "Table Properties">
-<!ENTITY applyButton.label "Apply">
-<!ENTITY applyButton.accesskey "A">
-<!ENTITY closeButton.label "Close">
-<!ENTITY tableTab.label "Table">
-<!ENTITY cellTab.label "Cells">
-<!ENTITY tableRows.label "Rows:">
-<!ENTITY tableRows.accessKey "R">
-<!ENTITY tableColumns.label "Columns:">
-<!ENTITY tableColumns.accessKey "C">
-<!ENTITY tableHeight.label "Height:">
-<!ENTITY tableHeight.accessKey "G">
-<!ENTITY tableWidth.label "Width:">
-<!ENTITY tableWidth.accessKey "W">
-<!ENTITY tableBorderSpacing.label "Borders and Spacing">
-<!ENTITY tableBorderWidth.label "Border:">
-<!ENTITY tableBorderWidth.accessKey "B">
-<!ENTITY tableSpacing.label "Spacing:">
-<!ENTITY tableSpacing.accessKey "S">
-<!ENTITY tablePadding.label "Padding:">
-<!ENTITY tablePadding.accessKey "P">
-<!ENTITY tablePxBetwCells.label "pixels between cells">
-<!ENTITY tablePxBetwBrdrCellContent.label "pixels between cell border and content">
-<!ENTITY tableAlignment.label "Table Alignment:">
-<!ENTITY tableAlignment.accessKey "T">
-<!ENTITY tableCaption.label "Caption:">
-<!ENTITY tableCaption.accessKey "N">
-<!ENTITY tableCaptionAbove.label "Above Table">
-<!ENTITY tableCaptionBelow.label "Below Table">
-<!ENTITY tableCaptionLeft.label "Left of Table">
-<!ENTITY tableCaptionRight.label "Right of table">
-<!ENTITY tableCaptionNone.label "None">
-<!ENTITY tableInheritColor.label "(Let page color show through)">
-
-<!ENTITY cellSelection.label "Selection">
-<!ENTITY cellSelectCell.label "Cell">
-<!ENTITY cellSelectRow.label "Row">
-<!ENTITY cellSelectColumn.label "Column">
-<!ENTITY cellSelectNext.label "Next">
-<!ENTITY cellSelectNext.accessKey "N">
-<!ENTITY cellSelectPrevious.label "Previous">
-<!ENTITY cellSelectPrevious.accessKey "P">
-<!ENTITY applyBeforeChange.label "Current changes will be applied before changing the selection.">
-<!ENTITY cellContentAlignment.label "Content Alignment">
-<!ENTITY cellHorizontal.label "Horizontal:">
-<!ENTITY cellHorizontal.accessKey "Z">
-<!ENTITY cellVertical.label "Vertical:">
-<!ENTITY cellVertical.accessKey "V">
-<!ENTITY cellStyle.label "Cell Style:">
-<!ENTITY cellStyle.accessKey "C">
-<!ENTITY cellNormal.label "Normal">
-<!ENTITY cellHeader.label "Header">
-<!ENTITY cellTextWrap.label "Text Wrap:">
-<!ENTITY cellTextWrap.accessKey "T">
-<!ENTITY cellWrap.label "Wrap">
-<!ENTITY cellNoWrap.label "Don't wrap">
-<!ENTITY cellAlignTop.label "Top">
-<!ENTITY cellAlignMiddle.label "Middle">
-<!ENTITY cellAlignBottom.label "Bottom">
-<!ENTITY cellAlignJustify.label "Justify">
-<!ENTITY cellInheritColor.label "(Let table color show through)">
-<!ENTITY cellUseCheckboxHelp.label "Use checkboxes to determine which properties are applied to all selected cells">
-
-<!-- Used in both Table and Cell panels -->
-<!ENTITY size.label "Size">
-<!ENTITY pixels.label "pixels">
-<!ENTITY backgroundColor.label "Background Color:">
-<!ENTITY backgroundColor.accessKey "B">
-<!ENTITY AlignLeft.label "Left">
-<!ENTITY AlignCenter.label "Center">
-<!ENTITY AlignRight.label "Right">
diff --git a/editor/ui/locales/en-US/chrome/dialogs/EditorTextAreaProperties.dtd b/editor/ui/locales/en-US/chrome/dialogs/EditorTextAreaProperties.dtd
deleted file mode 100644
index a1e8bbd03..000000000
--- a/editor/ui/locales/en-US/chrome/dialogs/EditorTextAreaProperties.dtd
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY windowTitle.label "Text Area Properties">
-
-<!ENTITY Settings.label "Settings">
-
-<!ENTITY TextAreaName.label "Field Name:">
-<!ENTITY TextAreaName.accessKey "N">
-<!ENTITY TextAreaRows.label "Rows:">
-<!ENTITY TextAreaRows.accessKey "R">
-<!ENTITY TextAreaCols.label "Columns:">
-<!ENTITY TextAreaCols.accessKey "C">
-<!ENTITY TextAreaReadOnly.label "Read Only">
-<!ENTITY TextAreaReadOnly.accessKey "O">
-<!ENTITY TextAreaDisabled.label "Disabled">
-<!ENTITY TextAreaDisabled.accessKey "D">
-<!ENTITY TextAreaTabIndex.label "Tab Index:">
-<!ENTITY TextAreaTabIndex.accessKey "I">
-<!ENTITY TextAreaAccessKey.label "Access Key:">
-<!ENTITY TextAreaAccessKey.accessKey "K">
-<!ENTITY InitialText.label "Initial Text:">
-<!ENTITY InitialText.accessKey "T">
-
-<!ENTITY TextAreaWrap.label "Wrap Mode:">
-<!ENTITY TextAreaWrap.accessKey "W">
-<!ENTITY WrapDefault.value "Default">
-<!ENTITY WrapOff.value "Off">
-<!ENTITY WrapHard.value "Hard">
-<!ENTITY WrapSoft.value "Soft">
-<!ENTITY WrapPhysical.value "Physical">
-<!ENTITY WrapVirtual.value "Virtual">
diff --git a/editor/ui/locales/jar.mn b/editor/ui/locales/jar.mn
deleted file mode 100644
index e0817a2eb..000000000
--- a/editor/ui/locales/jar.mn
+++ /dev/null
@@ -1,38 +0,0 @@
-#filter substitution
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-
-@AB_CD@.jar:
-% locale editor @AB_CD@ %locale/@AB_CD@/editor/
- locale/@AB_CD@/editor/editorSmileyOverlay.dtd (%chrome/composer/editorSmileyOverlay.dtd)
- locale/@AB_CD@/editor/editorOverlay.dtd (%chrome/composer/editorOverlay.dtd)
- locale/@AB_CD@/editor/editor.properties (%chrome/composer/editor.properties)
- locale/@AB_CD@/editor/EditorHLineProperties.dtd (%chrome/dialogs/EditorHLineProperties.dtd)
- locale/@AB_CD@/editor/EditorImageProperties.dtd (%chrome/dialogs/EditorImageProperties.dtd)
- locale/@AB_CD@/editor/EditorInsertSource.dtd (%chrome/dialogs/EditorInsertSource.dtd)
- locale/@AB_CD@/editor/EditorInsertMath.dtd (%chrome/dialogs/EditorInsertMath.dtd)
- locale/@AB_CD@/editor/EditorInsertChars.dtd (%chrome/dialogs/EditorInsertChars.dtd)
- locale/@AB_CD@/editor/EditorInsertTable.dtd (%chrome/dialogs/EditorInsertTable.dtd)
- locale/@AB_CD@/editor/EditorInsertTOC.dtd (%chrome/dialogs/EditorInsertTOC.dtd)
- locale/@AB_CD@/editor/EditorLinkProperties.dtd (%chrome/dialogs/EditorLinkProperties.dtd)
- locale/@AB_CD@/editor/EditorListProperties.dtd (%chrome/dialogs/EditorListProperties.dtd)
- locale/@AB_CD@/editor/EditorColorProperties.dtd (%chrome/dialogs/EditorColorProperties.dtd)
- locale/@AB_CD@/editor/EdColorPicker.dtd (%chrome/dialogs/EdColorPicker.dtd)
- locale/@AB_CD@/editor/EditorReplace.dtd (%chrome/dialogs/EditorReplace.dtd)
- locale/@AB_CD@/editor/EditorSpellCheck.dtd (%chrome/dialogs/EditorSpellCheck.dtd)
- locale/@AB_CD@/editor/EditorPersonalDictionary.dtd (%chrome/dialogs/EditorPersonalDictionary.dtd)
- locale/@AB_CD@/editor/EditorTableProperties.dtd (%chrome/dialogs/EditorTableProperties.dtd)
- locale/@AB_CD@/editor/EditorFormProperties.dtd (%chrome/dialogs/EditorFormProperties.dtd)
- locale/@AB_CD@/editor/EditorInputProperties.dtd (%chrome/dialogs/EditorInputProperties.dtd)
- locale/@AB_CD@/editor/EditorTextAreaProperties.dtd (%chrome/dialogs/EditorTextAreaProperties.dtd)
- locale/@AB_CD@/editor/EditorSelectProperties.dtd (%chrome/dialogs/EditorSelectProperties.dtd)
- locale/@AB_CD@/editor/EditorButtonProperties.dtd (%chrome/dialogs/EditorButtonProperties.dtd)
- locale/@AB_CD@/editor/EditorLabelProperties.dtd (%chrome/dialogs/EditorLabelProperties.dtd)
- locale/@AB_CD@/editor/EditorFieldSetProperties.dtd (%chrome/dialogs/EditorFieldSetProperties.dtd)
- locale/@AB_CD@/editor/EdNamedAnchorProperties.dtd (%chrome/dialogs/EdNamedAnchorProperties.dtd)
- locale/@AB_CD@/editor/EdDialogOverlay.dtd (%chrome/dialogs/EdDialogOverlay.dtd)
- locale/@AB_CD@/editor/EdAdvancedEdit.dtd (%chrome/dialogs/EdAdvancedEdit.dtd)
- locale/@AB_CD@/editor/EdConvertToTable.dtd (%chrome/dialogs/EdConvertToTable.dtd)
-
diff --git a/editor/ui/moz.build b/editor/ui/moz.build
deleted file mode 100644
index 5fc4d6eb0..000000000
--- a/editor/ui/moz.build
+++ /dev/null
@@ -1,8 +0,0 @@
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIRS += ['locales']
-EXTRA_JS_MODULES += ['editorUtilities.jsm']
-JAR_MANIFESTS += ['jar.mn']
diff --git a/editor/ui/texzilla/content/TeXZilla.js b/editor/ui/texzilla/content/TeXZilla.js
deleted file mode 100644
index 290d34e79..000000000
--- a/editor/ui/texzilla/content/TeXZilla.js
+++ /dev/null
@@ -1,815 +0,0 @@
-/* THIS IS A GENERATED FILE. DO NOT EDIT THIS DIRECTLY. */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-var h=!0,n=null,p=!1,u=function(){function t(b){return b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function B(b){b=b.trim();var a=/(-?[0-9]*(?:[0-9]\.?|\.[0-9])[0-9]*)(e[mx]|in|cm|mm|p[xtc]|%)?/.exec(b);if(a)return a[1]=parseFloat(a[1]),a[2]||(a[1]*=100,a[2]="%"),{j:a[1],l:a[2]};b="negativeveryverythinmathspace negativeverythinmathspace negativemediummathspace negativethickmathspace negativeverythickmathspace negativeveryverythickmathspace veryverythinmathspace verythinmathspace thinmathspace mediummathspace thickmathspace verythickmathspace veryverythickmathspace".split(" ").indexOf(b);
-return{j:(-1===b?0:b-6)/18,l:"em"}}function d(b,a,d){var e="<"+b;d&&(e+=" "+d);return e+(">"+a+"</"+b+">")}function f(b,a,d){var e="<mo";a&&(e+=' lspace="'+a+'"');d&&(e+=' rspace="'+d+'"');return e+=">"+t(b)+"</mo>"}function r(b,a,d,e){return b?!d?"<mover>"+a+e+"</mover>":!e?"<munder>"+a+d+"</munder>":"<munderover>"+a+d+e+"</munderover>":!d?"<msup>"+a+e+"</msup>":!e?"<msub>"+a+d+"</msub>":"<msubsup>"+a+d+e+"</msubsup>"}function k(b,a,d){var e;if(!a){if(1==b.length)return b[0];a="mrow"}e="<"+a;d&&
-(e+=" "+d);return e+=">"+b.join("")+"</"+a+">"}function w(b,a,d){var e='<math xmlns="'+x+'"';a&&(e+=' display="block"');e+="><semantics>"+k(b);e=e+'<annotation encoding="TeX">'+t(d);return e+="</annotation></semantics></math>"}function C(b){if(!b||b.namespaceURI!==x)return n;if("semantics"===b.tagName)for(b=b.firstElementChild;b;b=b.nextElementSibling){if(b.namespaceURI===x&&"annotation"===b.localName&&-1!==D.indexOf(b.getAttribute("encoding")))return b.textContent}else if(1===b.childElementCount)return C(b.firstElementChild);
-return n}function E(b){for(var a="",d,e,g=0;g<b.length;g++)d=b.charCodeAt(g),128>d?a+=b.charAt(g):55296<=d&&56319>=d?(g++,e=b.charCodeAt(g),a+="&#x"+(1024*(d-55296)+e-56320+65536).toString(16)+";"):a+="&#x"+d.toString(16)+";";return a}function F(b){throw Error(b.replace(/\nExpecting [^\n]*$/,"\n"));}function y(){this.f={}}var l={trace:function(){},f:{},la:{error:2,textOptArg:3,"[":4,TEXTOPTARG:5,"]":6,textArg:7,"{":8,TEXTARG:9,"}":10,lengthOptArg:11,lengthArg:12,attrOptArg:13,attrArg:14,tokenContent:15,
-arrayAlign:16,columnAlign:17,collayout:18,COLLAYOUT:19,colalign:20,COLALIGN:21,rowalign:22,ROWALIGN:23,rowspan:24,ROWSPAN:25,colspan:26,COLSPAN:27,align:28,ALIGN:29,eqrows:30,EQROWS:31,eqcols:32,EQCOLS:33,rowlines:34,ROWLINES:35,collines:36,COLLINES:37,frame:38,FRAME:39,padding:40,PADDING:41,cellopt:42,celloptList:43,rowopt:44,arrayopt:45,arrayoptList:46,rowoptList:47,left:48,LEFT:49,OPFS:50,".":51,right:52,RIGHT:53,closedTerm:54,styledExpression:55,BIG:56,BBIG:57,BIGG:58,BBIGG:59,BIGL:60,BBIGL:61,
-BIGGL:62,BBIGGL:63,TEXATOP:64,TEXOVER:65,TEXCHOOSE:66,NUM:67,TEXT:68,A:69,F:70,MI:71,MN:72,MO:73,OP:74,OPS:75,OPAS:76,MS:77,MTEXT:78,HIGH_SURROGATE:79,LOW_SURROGATE:80,BMP_CHARACTER:81,OPERATORNAME:82,MATHOP:83,MATHBIN:84,MATHREL:85,FRAC:86,ROOT:87,SQRT:88,UNDERSET:89,OVERSET:90,UNDEROVERSET:91,XARROW:92,MATHRLAP:93,MATHLLAP:94,MATHCLAP:95,PHANTOM:96,TFRAC:97,BINOM:98,TBINOM:99,PMOD:100,UNDERBRACE:101,UNDERLINE:102,OVERBRACE:103,ACCENT:104,ACCENTNS:105,BOXED:106,SLASH:107,QUAD:108,QQUAD:109,NEGSPACE:110,
-NEGMEDSPACE:111,NEGTHICKSPACE:112,THINSPACE:113,MEDSPACE:114,THICKSPACE:115,SPACE:116,MATHRAISEBOX:117,MATHBB:118,MATHBF:119,MATHBIT:120,MATHSCR:121,MATHBSCR:122,MATHSF:123,MATHFRAK:124,MATHIT:125,MATHTT:126,MATHRM:127,HREF:128,STATUSLINE:129,TOOLTIP:130,TOGGLE:131,BTOGGLE:132,closedTermList:133,ETOGGLE:134,TENSOR:135,subsupList:136,MULTI:137,BMATRIX:138,tableRowList:139,EMATRIX:140,BGATHERED:141,EGATHERED:142,BPMATRIX:143,EPMATRIX:144,BBMATRIX:145,EBMATRIX:146,BVMATRIX:147,EVMATRIX:148,BBBMATRIX:149,
-EBBMATRIX:150,BVVMATRIX:151,EVVMATRIX:152,BSMALLMATRIX:153,ESMALLMATRIX:154,BCASES:155,ECASES:156,BALIGNED:157,EALIGNED:158,BARRAY:159,EARRAY:160,SUBSTACK:161,ARRAY:162,ARRAYOPTS:163,compoundTerm:164,_:165,"^":166,OPP:167,opm:168,OPM:169,FM:170,compoundTermList:171,subsupTermScript:172,subsupTerm:173,textstyle:174,DISPLAYSTYLE:175,TEXTSTYLE:176,TEXTSIZE:177,SCRIPTSIZE:178,SCRIPTSCRIPTSIZE:179,COLOR:180,BGCOLOR:181,tableCell:182,CELLOPTS:183,tableCellList:184,COLSEP:185,tableRow:186,ROWOPTS:187,ROWSEP:188,
-document:189,documentItemList:190,EOF:191,documentItem:192,STARTMATH0:193,ENDMATH0:194,STARTMATH1:195,ENDMATH1:196,STARTMATH2:197,ENDMATH2:198,STARTMATH3:199,ENDMATH3:200,$accept:0,$end:1},B:{2:"error",4:"[",5:"TEXTOPTARG",6:"]",8:"{",9:"TEXTARG",10:"}",19:"COLLAYOUT",21:"COLALIGN",23:"ROWALIGN",25:"ROWSPAN",27:"COLSPAN",29:"ALIGN",31:"EQROWS",33:"EQCOLS",35:"ROWLINES",37:"COLLINES",39:"FRAME",41:"PADDING",49:"LEFT",50:"OPFS",51:".",53:"RIGHT",56:"BIG",57:"BBIG",58:"BIGG",59:"BBIGG",60:"BIGL",61:"BBIGL",
-62:"BIGGL",63:"BBIGGL",64:"TEXATOP",65:"TEXOVER",66:"TEXCHOOSE",67:"NUM",68:"TEXT",69:"A",70:"F",71:"MI",72:"MN",73:"MO",74:"OP",75:"OPS",76:"OPAS",77:"MS",78:"MTEXT",79:"HIGH_SURROGATE",80:"LOW_SURROGATE",81:"BMP_CHARACTER",82:"OPERATORNAME",83:"MATHOP",84:"MATHBIN",85:"MATHREL",86:"FRAC",87:"ROOT",88:"SQRT",89:"UNDERSET",90:"OVERSET",91:"UNDEROVERSET",92:"XARROW",93:"MATHRLAP",94:"MATHLLAP",95:"MATHCLAP",96:"PHANTOM",97:"TFRAC",98:"BINOM",99:"TBINOM",100:"PMOD",101:"UNDERBRACE",102:"UNDERLINE",
-103:"OVERBRACE",104:"ACCENT",105:"ACCENTNS",106:"BOXED",107:"SLASH",108:"QUAD",109:"QQUAD",110:"NEGSPACE",111:"NEGMEDSPACE",112:"NEGTHICKSPACE",113:"THINSPACE",114:"MEDSPACE",115:"THICKSPACE",116:"SPACE",117:"MATHRAISEBOX",118:"MATHBB",119:"MATHBF",120:"MATHBIT",121:"MATHSCR",122:"MATHBSCR",123:"MATHSF",124:"MATHFRAK",125:"MATHIT",126:"MATHTT",127:"MATHRM",128:"HREF",129:"STATUSLINE",130:"TOOLTIP",131:"TOGGLE",132:"BTOGGLE",134:"ETOGGLE",135:"TENSOR",137:"MULTI",138:"BMATRIX",140:"EMATRIX",141:"BGATHERED",
-142:"EGATHERED",143:"BPMATRIX",144:"EPMATRIX",145:"BBMATRIX",146:"EBMATRIX",147:"BVMATRIX",148:"EVMATRIX",149:"BBBMATRIX",150:"EBBMATRIX",151:"BVVMATRIX",152:"EVVMATRIX",153:"BSMALLMATRIX",154:"ESMALLMATRIX",155:"BCASES",156:"ECASES",157:"BALIGNED",158:"EALIGNED",159:"BARRAY",160:"EARRAY",161:"SUBSTACK",162:"ARRAY",163:"ARRAYOPTS",165:"_",166:"^",167:"OPP",169:"OPM",170:"FM",175:"DISPLAYSTYLE",176:"TEXTSTYLE",177:"TEXTSIZE",178:"SCRIPTSIZE",179:"SCRIPTSCRIPTSIZE",180:"COLOR",181:"BGCOLOR",183:"CELLOPTS",
-185:"COLSEP",187:"ROWOPTS",188:"ROWSEP",191:"EOF",193:"STARTMATH0",194:"ENDMATH0",195:"STARTMATH1",196:"ENDMATH1",197:"STARTMATH2",198:"ENDMATH2",199:"STARTMATH3",200:"ENDMATH3"},W:[0,[3,3],[7,3],[11,3],[12,3],[13,1],[14,1],[15,1],[16,1],[17,1],[18,2],[20,2],[22,2],[24,2],[26,2],[28,2],[30,2],[32,2],[34,2],[36,2],[38,2],[40,2],[42,1],[42,1],[42,1],[42,1],[43,1],[43,2],[44,1],[44,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,1],[46,2],[47,1],[47,2],[48,2],[48,2],[52,
-2],[52,2],[54,2],[54,3],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,3],[54,5],[54,5],[54,5],[54,5],[54,5],[54,5],[54,1],[54,1],[54,1],[54,1],[54,2],[54,2],[54,2],[54,1],[54,1],[54,1],[54,1],[54,1],[54,2],[54,4],[54,2],[54,2],[54,1],[54,2],[54,2],[54,2],[54,2],[54,3],[54,3],[54,2],[54,5],[54,3],[54,3],[54,4],[54,5],[54,2],[54,2],[54,2],[54,2],[54,2],[54,3],[54,3],[54,3],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,
-4],[54,5],[54,4],[54,3],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,2],[54,3],[54,3],[54,3],[54,3],[54,3],[54,5],[54,8],[54,7],[54,7],[54,3],[54,3],[54,3],[54,3],[54,3],[54,3],[54,3],[54,3],[54,3],[54,3],[54,5],[54,4],[54,4],[54,4],[54,8],[133,1],[133,2],[164,3],[164,5],[164,4],[164,5],[164,4],[164,3],[164,3],[164,2],[164,1],[164,5],[164,5],[164,3],[164,3],[164,1],[168,1],[168,1],[171,1],[171,2],[172,1],[172,1],[173,4],[173,2],[173,2],[173,3],[136,1],[136,2],[174,1],[174,1],
-[174,1],[174,1],[174,1],[174,2],[174,2],[55,2],[55,1],[182,0],[182,5],[182,1],[184,1],[184,3],[186,5],[186,1],[139,1],[139,3],[189,2],[190,1],[190,2],[192,1],[192,2],[192,3],[192,2],[192,3],[192,3],[192,3]],I:function(b,a,G,e,g,c){b=c.length-1;switch(g){case 1:this.b=c[b-1].replace(/\\[\\\]]/g,function(a){return a.slice(1)});this.b=t(this.b);break;case 2:this.b=c[b-1].replace(/\\[\\\}]/g,function(a){return a.slice(1)});this.b=t(this.b);break;case 3:this.b=B(c[b-1]);break;case 4:this.b=B(c[b-1]);break;
-case 5:this.b='"'+c[b].replace(/"/g,"&#x22;")+'"';break;case 6:this.b='"'+c[b].replace(/"/g,"&#x22;")+'"';break;case 7:this.b=c[b].replace(/\s+/g," ").replace(/^ | $/g," ");break;case 8:c[b]=c[b].trim();if("t"===c[b])this.b="axis 1";else if("c"===c[b])this.b="center";else if("b"===c[b])this.b="axis -1";else throw"Unknown array alignment";break;case 9:this.b="";c[b]=c[b].replace(/\s+/g,"");for(e=0;e<c[b].length;e++)"c"===c[b][e]?this.b+=" center":"l"===c[b][e]?this.b+=" left":"r"===c[b][e]&&(this.b+=
-" right");if(this.b.length)this.b=this.b.slice(1);else throw"Invalid column alignments";break;case 10:this.b="columnalign="+c[b];break;case 11:this.b="columnalign="+c[b];break;case 12:this.b="rowalign="+c[b];break;case 13:this.b="rowspan="+c[b];break;case 14:this.b="colspan="+c[b];break;case 15:this.b="align="+c[b];break;case 16:this.b="equalrows="+c[b];break;case 17:this.b="equalcolumns="+c[b];break;case 18:this.b="rowlines="+c[b];break;case 19:this.b="columnlines="+c[b];break;case 20:this.b="frame="+
-c[b];break;case 21:this.b="rowspacing="+c[b]+" columnspacing="+c[b];break;case 22:this.b=c[b];break;case 23:this.b=c[b];break;case 24:this.b=c[b];break;case 25:this.b=c[b];break;case 26:this.b=c[b];break;case 27:this.b=c[b-1]+" "+c[b];break;case 28:this.b=c[b];break;case 29:this.b=c[b];break;case 30:this.b=c[b];break;case 31:this.b=c[b];break;case 32:this.b=c[b];break;case 33:this.b=c[b];break;case 34:this.b=c[b];break;case 35:this.b=c[b];break;case 36:this.b=c[b];break;case 37:this.b=c[b];break;
-case 38:this.b=c[b];break;case 39:this.b=c[b];break;case 40:this.b=c[b];break;case 41:this.b=c[b-1]+" "+c[b];break;case 42:this.b=c[b];break;case 43:this.b=c[b-1]+" "+c[b];break;case 44:this.b=f(c[b]);break;case 45:this.b="";break;case 46:this.b=f(c[b]);break;case 47:this.b="";break;case 48:this.b="<mrow/>";break;case 49:this.b=k(c[b-1]);break;case 50:this.b=d("mo",c[b],'maxsize="1.2em" minsize="1.2em"');break;case 51:this.b=d("mo",c[b],'maxsize="1.8em" minsize="1.8em"');break;case 52:this.b=d("mo",
-c[b],'maxsize="2.4em" minsize="2.4em"');break;case 53:this.b=d("mo",c[b],'maxsize="3em" minsize="3em"');break;case 54:this.b=d("mo",c[b],'maxsize="1.2em" minsize="1.2em"');break;case 55:this.b=d("mo",c[b],'maxsize="1.8em" minsize="1.8em"');break;case 56:this.b=d("mo",c[b],'maxsize="2.4em" minsize="2.4em"');break;case 57:this.b=d("mo",c[b],'maxsize="3em" minsize="3em"');break;case 58:this.b=d("mrow",c[b-2]+k(c[b-1])+c[b]);break;case 59:this.b=d("mfrac",k(c[b-3])+k(c[b-1]),'linethickness="0"');break;
-case 60:this.b=d("mfrac",k(c[b-3])+k(c[b-1]),'linethickness="0"');this.b=d("mrow",c[b-4]+this.b+c[b-2]);break;case 61:this.b=d("mfrac",k(c[b-3])+k(c[b-1]));break;case 62:this.b=d("mfrac",k(c[b-3])+k(c[b-1]));this.b=d("mrow",c[b-4]+this.b+c[b-2]);break;case 63:this.b=d("mfrac",k(c[b-3])+k(c[b-1]),'linethickness="0"');this.b=d("mrow",f("(")+this.b+f(")"));break;case 64:this.b=d("mfrac",k(c[b-3])+k(c[b-1]),'linethickness="0"');this.b=d("mrow",c[b-4]+this.b+c[b-2]);this.b=d("mrow",f("(")+this.b+f(")"));
-break;case 65:this.b=d("mn",c[b]);break;case 66:this.b=d("mtext",c[b]);break;case 67:this.b=d("mi",t(c[b]));break;case 68:this.b=f(c[b],"0em","0em");break;case 69:this.b=d("mi",c[b]);break;case 70:this.b=d("mn",c[b]);break;case 71:this.b=f(c[b]);break;case 72:this.b=f(c[b]);break;case 73:this.b=f(c[b]);break;case 74:this.b=d("mo",c[b],'stretchy="false"');break;case 75:this.b=d("mo",c[b],'stretchy="false"');break;case 76:this.b=d("mo",c[b],'stretchy="false"');break;case 77:this.b=d("ms",c[b]);break;
-case 78:this.b=d("ms",c[b],"lquote="+c[b-2]+" rquote="+c[b-1]);break;case 79:this.b=d("mtext",c[b]);break;case 80:this.b=d("mtext",c[b-1]+c[b]);break;case 81:this.b=d("mtext",c[b]);break;case 82:this.b=f(c[b],"0em","thinmathspace");break;case 83:this.b=f(c[b],"thinmathspace","thinmathspace");break;case 84:this.b=f(c[b],"mediummathspace","mediummathspace");break;case 85:this.b=f(c[b],"thickmathspace","thickmathspace");break;case 86:this.b=d("mfrac",c[b-1]+c[b]);break;case 87:this.b=d("mroot",c[b]+
-c[b-1]);break;case 88:this.b=d("msqrt",c[b]);break;case 89:this.b=d("mroot",c[b]+k(c[b-2]));break;case 90:this.b=d("munder",c[b]+c[b-1]);break;case 91:this.b=d("mover",c[b]+c[b-1]);break;case 92:this.b=d("munderover",c[b]+c[b-2]+c[b-1]);break;case 93:this.b="<mrow/>"===c[b]?d("munder",f(c[b-4])+k(c[b-2])):d("munderover",f(c[b-4])+k(c[b-2])+c[b]);break;case 94:this.b=d("mover",f(c[b-1])+c[b]);break;case 95:this.b=d("mpadded",c[b],'width="0em"');break;case 96:this.b=d("mpadded",c[b],'width="0em" lspace="-100%width"');
-break;case 97:this.b=d("mpadded",c[b],'width="0em" lspace="-50%width"');break;case 98:this.b=d("mphantom",c[b]);break;case 99:this.b=d("mfrac",c[b-1]+c[b]);this.b=d("mstyle",this.b,'displaystyle="false"');break;case 100:this.b=d("mfrac",c[b-1]+c[b],'linethickness="0"');this.b=d("mrow",f("(")+this.b+f(")"));break;case 101:this.b=d("mfrac",c[b-1]+c[b],'linethickness="0"');this.b=d("mstyle",this.b,'displaystyle="false"');this.b=d("mrow",f("(")+this.b+f(")"));break;case 102:this.b='<mrow><mo lspace="mediummathspace">(</mo><mo rspace="thinmathspace">mod</mo>'+
-c[b]+'<mo rspace="mediummathspace">)</mo></mrow>';break;case 103:this.b=d("munder",c[b]+f("⏟"));break;case 104:this.b=d("munder",c[b]+f("_"));break;case 105:this.b=d("mover",c[b]+f("⏞"));break;case 106:this.b=d("mover",c[b]+f(c[b-1]));break;case 107:this.b=d("mover",c[b]+d("mo",c[b-1],'stretchy="false"'));break;case 108:this.b=d("menclose",c[b],'notation="box"');break;case 109:this.b=d("menclose",c[b],'notation="updiagonalstrike"');break;case 110:this.b='<mspace width="1em"/>';break;case 111:this.b=
-'<mspace width="2em"/>';break;case 112:this.b='<mspace width="negativethinmathspace"/>';break;case 113:this.b='<mspace width="negativemediummathspace"/>';break;case 114:this.b='<mspace width="negativethickmathspace"/>';break;case 115:this.b='<mspace width="thinmathspace"/>';break;case 116:this.b='<mspace width="mediummathspace"/>';break;case 117:this.b='<mspace width="thickmathspace"/>';break;case 118:this.b='<mspace height=".'+c[b-2]+'ex" depth=".'+c[b-1]+'ex" width=".'+c[b]+'em"/>';break;case 119:this.b=
-d("mpadded",c[b],'voffset="'+c[b-3].j+c[b-3].l+'" height="'+c[b-2].j+c[b-2].l+'" depth="'+c[b-1].j+c[b-1].l+'"');break;case 120:this.b=d("mpadded",c[b],'voffset="'+c[b-2].j+c[b-2].l+'" height="'+c[b-1].j+c[b-1].l+'" depth="'+(0>c[b-2].j?"+"+-c[b-2].j+c[b-2].l:"depth")+'"');break;case 121:this.b=d("mpadded",c[b],'voffset="'+c[b-1].j+c[b-1].l+'" '+(0<=c[b-1].j?'height="+'+c[b-1].j+c[b-1].l+'"':'height="0pt" depth="+'+-c[b-1].j+c[b-1].l+'"'));break;case 122:this.b=d("mstyle",c[b],'mathvariant="double-struck"');
-break;case 123:this.b=d("mstyle",c[b],'mathvariant="bold"');break;case 124:this.b=d("mstyle",c[b],'mathvariant="bold-italic"');break;case 125:this.b=d("mstyle",c[b],'mathvariant="script"');break;case 126:this.b=d("mstyle",c[b],'mathvariant="bold-script"');break;case 127:this.b=d("mstyle",c[b],'mathvariant="sans-serif"');break;case 128:this.b=d("mstyle",c[b],'mathvariant="fraktur"');break;case 129:this.b=d("mstyle",c[b],'mathvariant="italic"');break;case 130:this.b=d("mstyle",c[b],'mathvariant="monospace"');
-break;case 131:this.b=d("mstyle",c[b],'mathvariant="normal"');break;case 132:this.b=d("mrow",c[b],e.w?n:"href="+c[b-1]);break;case 133:this.b=e.w?c[b]:d("maction",c[b]+d("mtext",c[b-1]),'actiontype="statusline"');break;case 134:this.b=e.w?c[b]:d("maction",c[b]+d("mtext",c[b-1]),'actiontype="tooltip"');break;case 135:this.b=e.w?c[b]:d("maction",c[b-1]+c[b],'actiontype="toggle" selection="2"');break;case 136:this.b=e.w?d("mrow",c[b-1]):d("maction",c[b-1],'actiontype="toggle"');break;case 137:this.b=
-d("mmultiscripts",c[b-3]+c[b-1]);break;case 138:this.b=d("mmultiscripts",c[b-3]+c[b-1]+"<mprescripts/>"+c[b-5]);break;case 139:this.b=d("mmultiscripts",c[b-2]+"<mprescripts/>"+c[b-4]);break;case 140:this.b=d("mmultiscripts",c[b-3]+c[b-1]);break;case 141:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');break;case 142:this.b=d("mtable",c[b-1],'displaystyle="true" rowspacing="1.0ex"');break;case 143:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');this.b=d("mrow",
-f("(")+this.b+f(")"));break;case 144:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');this.b=d("mrow",f("[")+this.b+f("]"));break;case 145:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');this.b=d("mrow",f("|")+this.b+f("|"));break;case 146:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');this.b=d("mrow",f("{")+this.b+f("}"));break;case 147:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');this.b=d("mrow",f("‖")+this.b+f("‖"));
-break;case 148:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex"');this.b=d("mstyle",this.b,'scriptlevel="2"');break;case 149:this.b=d("mtable",c[b-1],'displaystyle="false" columnalign="left left"');this.b=d("mrow",f("{")+this.b);break;case 150:this.b=d("mtable",c[b-1],'displaystyle="true" columnalign="right left right left right left right left right left" columnspacing="0em"');break;case 151:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex" align="'+c[b-3]+'" columnalign="'+
-c[b-2]+'"');break;case 152:this.b=d("mtable",c[b-1],'displaystyle="false" rowspacing="0.5ex" columnalign="'+c[b-2]+'"');break;case 153:this.b=d("mtable",c[b-1],'displaystyle="false" columnalign="center" rowspacing="0.5ex"');break;case 154:this.b=d("mtable",c[b-1],'displaystyle="false"');break;case 155:this.b=d("mtable",c[b-1],'displaystyle="false" '+c[b-3]);break;case 156:this.b=c[b];break;case 157:this.b=c[b-1]+c[b];break;case 158:this.b=d("mmultiscripts",c[b-1]+c[b]);break;case 159:this.b=r(p,c[b-
-4],c[b-2],c[b]);break;case 160:this.b=r(p,c[b-3],c[b-1],f(c[b]));break;case 161:this.b=r(p,c[b-4],c[b],c[b-2]);break;case 162:this.b=r(p,c[b-3],c[b],f(c[b-2]));break;case 163:this.b=r(p,c[b-2],c[b],n);break;case 164:this.b=r(p,c[b-2],n,c[b]);break;case 165:this.b=r(p,c[b-1],n,f(c[b]));break;case 166:this.b=c[b];break;case 167:this.b=r(h,c[b-4],c[b-2],c[b]);break;case 168:this.b=r(h,c[b-4],c[b],c[b-2]);break;case 169:this.b=r(h,c[b-2],c[b],n);break;case 170:this.b=r(h,c[b-2],n,c[b]);break;case 171:this.b=
-c[b];break;case 172:this.b=f(c[b]);break;case 173:this.b=f(c[b],"0em","0em");break;case 174:this.b=[c[b]];break;case 175:c[b-1].push(c[b]);this.b=c[b-1];break;case 176:this.b=c[b];break;case 177:this.b=c[b];break;case 178:this.b=c[b-2]+c[b];break;case 179:this.b=c[b]+"<none/>";break;case 180:this.b="<none/>"+c[b];break;case 181:this.b="<none/>"+c[b];break;case 182:this.b=c[b];break;case 183:this.b=c[b-1]+c[b];break;case 184:this.b='displaystyle="true"';break;case 185:this.b='displaystyle="false"';
-break;case 186:this.b='scriptlevel="0"';break;case 187:this.b='scriptlevel="1"';break;case 188:this.b='scriptlevel="2"';break;case 189:this.b="mathcolor="+c[b];break;case 190:this.b="mathbackground="+c[b];break;case 191:this.b=[k(c[b],"mstyle",c[b-1])];break;case 192:this.b=c[b];break;case 193:this.b=d("mtd","");break;case 194:this.b=k(c[b],"mtd",c[b-2]);break;case 195:this.b=k(c[b],"mtd");break;case 196:this.b=c[b];break;case 197:this.b=c[b-2]+c[b];break;case 198:this.b=this.b=d("mtr",c[b],c[b-2]);
-break;case 199:this.b=d("mtr",c[b]);break;case 200:this.b=c[b];break;case 201:this.b=c[b-2]+c[b];break;case 202:return this.b=c[b-1];case 203:this.b=c[b];break;case 204:this.b=c[b-1]+c[b];break;case 205:this.b=c[b];break;case 206:this.b=w(["<mrow/>"],p,e.u);break;case 207:this.b=w(c[b-1],p,e.u);break;case 208:this.b=w(["<mrow/>"],h,e.u);break;case 209:this.b=w(c[b-1],h,e.u);break;case 210:this.b=w(c[b-1],p,e.u);break;case 211:this.b=w(c[b-1],h,e.u)}},ma:[{68:[1,4],189:1,190:2,192:3,193:[1,5],195:[1,
-6],197:[1,7],199:[1,8]},{1:[3]},{68:[1,4],191:[1,9],192:10,193:[1,5],195:[1,6],197:[1,7],199:[1,8]},{68:[2,203],191:[2,203],193:[2,203],195:[2,203],197:[2,203],199:[2,203]},{68:[2,205],191:[2,205],193:[2,205],195:[2,205],197:[2,205],199:[2,205]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:12,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,
-49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],
-127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],194:[1,11]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:121,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,
-32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,
-84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],
-181:[1,21],196:[1,120]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:122,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,
-71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],
-161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:123,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],
-89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,
-104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{1:[2,202]},{68:[2,204],191:[2,204],193:[2,204],195:[2,204],197:[2,204],199:[2,204]},{68:[2,206],191:[2,206],193:[2,206],195:[2,206],197:[2,206],199:[2,206]},{194:[1,124]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,
-55:125,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,
-78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,
-175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{6:[2,192],8:[1,26],10:[2,192],48:35,49:[1,119],50:[1,47],51:[1,43],53:[2,192],54:24,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],64:[2,192],65:[2,192],66:[2,192],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,
-60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],140:[2,
-192],141:[1,105],142:[2,192],143:[1,106],144:[2,192],145:[1,107],146:[2,192],147:[1,108],148:[2,192],149:[1,109],150:[2,192],151:[1,110],152:[2,192],153:[1,111],154:[2,192],155:[1,112],156:[2,192],157:[1,113],158:[2,192],159:[1,114],160:[2,192],161:[1,115],162:[1,116],164:126,168:25,169:[1,117],170:[1,118],185:[2,192],188:[2,192],194:[2,192],196:[2,192],198:[2,192],200:[2,192]},{8:[2,184],49:[2,184],50:[2,184],51:[2,184],56:[2,184],57:[2,184],58:[2,184],59:[2,184],60:[2,184],61:[2,184],62:[2,184],
-63:[2,184],67:[2,184],68:[2,184],69:[2,184],70:[2,184],71:[2,184],72:[2,184],73:[2,184],74:[2,184],75:[2,184],76:[2,184],77:[2,184],78:[2,184],79:[2,184],81:[2,184],82:[2,184],83:[2,184],84:[2,184],85:[2,184],86:[2,184],87:[2,184],88:[2,184],89:[2,184],90:[2,184],91:[2,184],92:[2,184],93:[2,184],94:[2,184],95:[2,184],96:[2,184],97:[2,184],98:[2,184],99:[2,184],100:[2,184],101:[2,184],102:[2,184],103:[2,184],104:[2,184],105:[2,184],106:[2,184],107:[2,184],108:[2,184],109:[2,184],110:[2,184],111:[2,
-184],112:[2,184],113:[2,184],114:[2,184],115:[2,184],116:[2,184],117:[2,184],118:[2,184],119:[2,184],120:[2,184],121:[2,184],122:[2,184],123:[2,184],124:[2,184],125:[2,184],126:[2,184],127:[2,184],128:[2,184],129:[2,184],130:[2,184],131:[2,184],132:[2,184],135:[2,184],137:[2,184],138:[2,184],141:[2,184],143:[2,184],145:[2,184],147:[2,184],149:[2,184],151:[2,184],153:[2,184],155:[2,184],157:[2,184],159:[2,184],161:[2,184],162:[2,184],169:[2,184],170:[2,184],175:[2,184],176:[2,184],177:[2,184],178:[2,
-184],179:[2,184],180:[2,184],181:[2,184]},{8:[2,185],49:[2,185],50:[2,185],51:[2,185],56:[2,185],57:[2,185],58:[2,185],59:[2,185],60:[2,185],61:[2,185],62:[2,185],63:[2,185],67:[2,185],68:[2,185],69:[2,185],70:[2,185],71:[2,185],72:[2,185],73:[2,185],74:[2,185],75:[2,185],76:[2,185],77:[2,185],78:[2,185],79:[2,185],81:[2,185],82:[2,185],83:[2,185],84:[2,185],85:[2,185],86:[2,185],87:[2,185],88:[2,185],89:[2,185],90:[2,185],91:[2,185],92:[2,185],93:[2,185],94:[2,185],95:[2,185],96:[2,185],97:[2,185],
-98:[2,185],99:[2,185],100:[2,185],101:[2,185],102:[2,185],103:[2,185],104:[2,185],105:[2,185],106:[2,185],107:[2,185],108:[2,185],109:[2,185],110:[2,185],111:[2,185],112:[2,185],113:[2,185],114:[2,185],115:[2,185],116:[2,185],117:[2,185],118:[2,185],119:[2,185],120:[2,185],121:[2,185],122:[2,185],123:[2,185],124:[2,185],125:[2,185],126:[2,185],127:[2,185],128:[2,185],129:[2,185],130:[2,185],131:[2,185],132:[2,185],135:[2,185],137:[2,185],138:[2,185],141:[2,185],143:[2,185],145:[2,185],147:[2,185],
-149:[2,185],151:[2,185],153:[2,185],155:[2,185],157:[2,185],159:[2,185],161:[2,185],162:[2,185],169:[2,185],170:[2,185],175:[2,185],176:[2,185],177:[2,185],178:[2,185],179:[2,185],180:[2,185],181:[2,185]},{8:[2,186],49:[2,186],50:[2,186],51:[2,186],56:[2,186],57:[2,186],58:[2,186],59:[2,186],60:[2,186],61:[2,186],62:[2,186],63:[2,186],67:[2,186],68:[2,186],69:[2,186],70:[2,186],71:[2,186],72:[2,186],73:[2,186],74:[2,186],75:[2,186],76:[2,186],77:[2,186],78:[2,186],79:[2,186],81:[2,186],82:[2,186],
-83:[2,186],84:[2,186],85:[2,186],86:[2,186],87:[2,186],88:[2,186],89:[2,186],90:[2,186],91:[2,186],92:[2,186],93:[2,186],94:[2,186],95:[2,186],96:[2,186],97:[2,186],98:[2,186],99:[2,186],100:[2,186],101:[2,186],102:[2,186],103:[2,186],104:[2,186],105:[2,186],106:[2,186],107:[2,186],108:[2,186],109:[2,186],110:[2,186],111:[2,186],112:[2,186],113:[2,186],114:[2,186],115:[2,186],116:[2,186],117:[2,186],118:[2,186],119:[2,186],120:[2,186],121:[2,186],122:[2,186],123:[2,186],124:[2,186],125:[2,186],126:[2,
-186],127:[2,186],128:[2,186],129:[2,186],130:[2,186],131:[2,186],132:[2,186],135:[2,186],137:[2,186],138:[2,186],141:[2,186],143:[2,186],145:[2,186],147:[2,186],149:[2,186],151:[2,186],153:[2,186],155:[2,186],157:[2,186],159:[2,186],161:[2,186],162:[2,186],169:[2,186],170:[2,186],175:[2,186],176:[2,186],177:[2,186],178:[2,186],179:[2,186],180:[2,186],181:[2,186]},{8:[2,187],49:[2,187],50:[2,187],51:[2,187],56:[2,187],57:[2,187],58:[2,187],59:[2,187],60:[2,187],61:[2,187],62:[2,187],63:[2,187],67:[2,
-187],68:[2,187],69:[2,187],70:[2,187],71:[2,187],72:[2,187],73:[2,187],74:[2,187],75:[2,187],76:[2,187],77:[2,187],78:[2,187],79:[2,187],81:[2,187],82:[2,187],83:[2,187],84:[2,187],85:[2,187],86:[2,187],87:[2,187],88:[2,187],89:[2,187],90:[2,187],91:[2,187],92:[2,187],93:[2,187],94:[2,187],95:[2,187],96:[2,187],97:[2,187],98:[2,187],99:[2,187],100:[2,187],101:[2,187],102:[2,187],103:[2,187],104:[2,187],105:[2,187],106:[2,187],107:[2,187],108:[2,187],109:[2,187],110:[2,187],111:[2,187],112:[2,187],
-113:[2,187],114:[2,187],115:[2,187],116:[2,187],117:[2,187],118:[2,187],119:[2,187],120:[2,187],121:[2,187],122:[2,187],123:[2,187],124:[2,187],125:[2,187],126:[2,187],127:[2,187],128:[2,187],129:[2,187],130:[2,187],131:[2,187],132:[2,187],135:[2,187],137:[2,187],138:[2,187],141:[2,187],143:[2,187],145:[2,187],147:[2,187],149:[2,187],151:[2,187],153:[2,187],155:[2,187],157:[2,187],159:[2,187],161:[2,187],162:[2,187],169:[2,187],170:[2,187],175:[2,187],176:[2,187],177:[2,187],178:[2,187],179:[2,187],
-180:[2,187],181:[2,187]},{8:[2,188],49:[2,188],50:[2,188],51:[2,188],56:[2,188],57:[2,188],58:[2,188],59:[2,188],60:[2,188],61:[2,188],62:[2,188],63:[2,188],67:[2,188],68:[2,188],69:[2,188],70:[2,188],71:[2,188],72:[2,188],73:[2,188],74:[2,188],75:[2,188],76:[2,188],77:[2,188],78:[2,188],79:[2,188],81:[2,188],82:[2,188],83:[2,188],84:[2,188],85:[2,188],86:[2,188],87:[2,188],88:[2,188],89:[2,188],90:[2,188],91:[2,188],92:[2,188],93:[2,188],94:[2,188],95:[2,188],96:[2,188],97:[2,188],98:[2,188],99:[2,
-188],100:[2,188],101:[2,188],102:[2,188],103:[2,188],104:[2,188],105:[2,188],106:[2,188],107:[2,188],108:[2,188],109:[2,188],110:[2,188],111:[2,188],112:[2,188],113:[2,188],114:[2,188],115:[2,188],116:[2,188],117:[2,188],118:[2,188],119:[2,188],120:[2,188],121:[2,188],122:[2,188],123:[2,188],124:[2,188],125:[2,188],126:[2,188],127:[2,188],128:[2,188],129:[2,188],130:[2,188],131:[2,188],132:[2,188],135:[2,188],137:[2,188],138:[2,188],141:[2,188],143:[2,188],145:[2,188],147:[2,188],149:[2,188],151:[2,
-188],153:[2,188],155:[2,188],157:[2,188],159:[2,188],161:[2,188],162:[2,188],169:[2,188],170:[2,188],175:[2,188],176:[2,188],177:[2,188],178:[2,188],179:[2,188],180:[2,188],181:[2,188]},{7:128,8:[1,129],14:127},{7:128,8:[1,129],14:130},{6:[2,174],8:[2,174],10:[2,174],49:[2,174],50:[2,174],51:[2,174],53:[2,174],56:[2,174],57:[2,174],58:[2,174],59:[2,174],60:[2,174],61:[2,174],62:[2,174],63:[2,174],64:[2,174],65:[2,174],66:[2,174],67:[2,174],68:[2,174],69:[2,174],70:[2,174],71:[2,174],72:[2,174],73:[2,
-174],74:[2,174],75:[2,174],76:[2,174],77:[2,174],78:[2,174],79:[2,174],81:[2,174],82:[2,174],83:[2,174],84:[2,174],85:[2,174],86:[2,174],87:[2,174],88:[2,174],89:[2,174],90:[2,174],91:[2,174],92:[2,174],93:[2,174],94:[2,174],95:[2,174],96:[2,174],97:[2,174],98:[2,174],99:[2,174],100:[2,174],101:[2,174],102:[2,174],103:[2,174],104:[2,174],105:[2,174],106:[2,174],107:[2,174],108:[2,174],109:[2,174],110:[2,174],111:[2,174],112:[2,174],113:[2,174],114:[2,174],115:[2,174],116:[2,174],117:[2,174],118:[2,
-174],119:[2,174],120:[2,174],121:[2,174],122:[2,174],123:[2,174],124:[2,174],125:[2,174],126:[2,174],127:[2,174],128:[2,174],129:[2,174],130:[2,174],131:[2,174],132:[2,174],135:[2,174],137:[2,174],138:[2,174],140:[2,174],141:[2,174],142:[2,174],143:[2,174],144:[2,174],145:[2,174],146:[2,174],147:[2,174],148:[2,174],149:[2,174],150:[2,174],151:[2,174],152:[2,174],153:[2,174],154:[2,174],155:[2,174],156:[2,174],157:[2,174],158:[2,174],159:[2,174],160:[2,174],161:[2,174],162:[2,174],169:[2,174],170:[2,
-174],185:[2,174],188:[2,174],194:[2,174],196:[2,174],198:[2,174],200:[2,174]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:131,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],
-97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],
-153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,166],8:[2,166],10:[2,166],49:[2,166],50:[2,166],51:[2,166],53:[2,166],56:[2,166],57:[2,166],58:[2,166],59:[2,166],60:[2,166],61:[2,166],62:[2,166],63:[2,166],64:[2,166],65:[2,166],66:[2,166],67:[2,166],68:[2,166],69:[2,166],70:[2,166],71:[2,166],72:[2,166],73:[2,166],74:[2,166],75:[2,166],76:[2,166],77:[2,166],78:[2,166],79:[2,166],81:[2,166],82:[2,166],83:[2,166],84:[2,166],85:[2,166],86:[2,166],87:[2,166],88:[2,166],
-89:[2,166],90:[2,166],91:[2,166],92:[2,166],93:[2,166],94:[2,166],95:[2,166],96:[2,166],97:[2,166],98:[2,166],99:[2,166],100:[2,166],101:[2,166],102:[2,166],103:[2,166],104:[2,166],105:[2,166],106:[2,166],107:[2,166],108:[2,166],109:[2,166],110:[2,166],111:[2,166],112:[2,166],113:[2,166],114:[2,166],115:[2,166],116:[2,166],117:[2,166],118:[2,166],119:[2,166],120:[2,166],121:[2,166],122:[2,166],123:[2,166],124:[2,166],125:[2,166],126:[2,166],127:[2,166],128:[2,166],129:[2,166],130:[2,166],131:[2,166],
-132:[2,166],135:[2,166],137:[2,166],138:[2,166],140:[2,166],141:[2,166],142:[2,166],143:[2,166],144:[2,166],145:[2,166],146:[2,166],147:[2,166],148:[2,166],149:[2,166],150:[2,166],151:[2,166],152:[2,166],153:[2,166],154:[2,166],155:[2,166],156:[2,166],157:[2,166],158:[2,166],159:[2,166],160:[2,166],161:[2,166],162:[2,166],165:[1,133],166:[1,134],167:[1,135],169:[2,166],170:[2,166],185:[2,166],188:[2,166],194:[2,166],196:[2,166],198:[2,166],200:[2,166]},{6:[2,171],8:[2,171],10:[2,171],49:[2,171],50:[2,
-171],51:[2,171],53:[2,171],56:[2,171],57:[2,171],58:[2,171],59:[2,171],60:[2,171],61:[2,171],62:[2,171],63:[2,171],64:[2,171],65:[2,171],66:[2,171],67:[2,171],68:[2,171],69:[2,171],70:[2,171],71:[2,171],72:[2,171],73:[2,171],74:[2,171],75:[2,171],76:[2,171],77:[2,171],78:[2,171],79:[2,171],81:[2,171],82:[2,171],83:[2,171],84:[2,171],85:[2,171],86:[2,171],87:[2,171],88:[2,171],89:[2,171],90:[2,171],91:[2,171],92:[2,171],93:[2,171],94:[2,171],95:[2,171],96:[2,171],97:[2,171],98:[2,171],99:[2,171],100:[2,
-171],101:[2,171],102:[2,171],103:[2,171],104:[2,171],105:[2,171],106:[2,171],107:[2,171],108:[2,171],109:[2,171],110:[2,171],111:[2,171],112:[2,171],113:[2,171],114:[2,171],115:[2,171],116:[2,171],117:[2,171],118:[2,171],119:[2,171],120:[2,171],121:[2,171],122:[2,171],123:[2,171],124:[2,171],125:[2,171],126:[2,171],127:[2,171],128:[2,171],129:[2,171],130:[2,171],131:[2,171],132:[2,171],135:[2,171],137:[2,171],138:[2,171],140:[2,171],141:[2,171],142:[2,171],143:[2,171],144:[2,171],145:[2,171],146:[2,
-171],147:[2,171],148:[2,171],149:[2,171],150:[2,171],151:[2,171],152:[2,171],153:[2,171],154:[2,171],155:[2,171],156:[2,171],157:[2,171],158:[2,171],159:[2,171],160:[2,171],161:[2,171],162:[2,171],165:[1,136],166:[1,137],169:[2,171],170:[2,171],185:[2,171],188:[2,171],194:[2,171],196:[2,171],198:[2,171],200:[2,171]},{8:[1,26],10:[1,138],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:139,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,
-39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],
-120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{50:[1,140]},{50:[1,141]},{50:[1,142]},{50:[1,
-143]},{50:[1,144]},{50:[1,145]},{50:[1,146]},{50:[1,147]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:148,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,
-68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,
-112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{6:[2,65],8:[2,65],10:[2,65],49:[2,65],50:[2,65],51:[2,65],53:[2,65],56:[2,65],57:[2,65],58:[2,65],59:[2,65],60:[2,65],61:[2,65],62:[2,65],63:[2,65],64:[2,65],65:[2,65],66:[2,65],67:[2,65],68:[2,65],69:[2,65],70:[2,65],71:[2,65],72:[2,65],73:[2,65],74:[2,65],75:[2,65],76:[2,65],77:[2,65],78:[2,65],79:[2,65],81:[2,65],
-82:[2,65],83:[2,65],84:[2,65],85:[2,65],86:[2,65],87:[2,65],88:[2,65],89:[2,65],90:[2,65],91:[2,65],92:[2,65],93:[2,65],94:[2,65],95:[2,65],96:[2,65],97:[2,65],98:[2,65],99:[2,65],100:[2,65],101:[2,65],102:[2,65],103:[2,65],104:[2,65],105:[2,65],106:[2,65],107:[2,65],108:[2,65],109:[2,65],110:[2,65],111:[2,65],112:[2,65],113:[2,65],114:[2,65],115:[2,65],116:[2,65],117:[2,65],118:[2,65],119:[2,65],120:[2,65],121:[2,65],122:[2,65],123:[2,65],124:[2,65],125:[2,65],126:[2,65],127:[2,65],128:[2,65],129:[2,
-65],130:[2,65],131:[2,65],132:[2,65],134:[2,65],135:[2,65],137:[2,65],138:[2,65],140:[2,65],141:[2,65],142:[2,65],143:[2,65],144:[2,65],145:[2,65],146:[2,65],147:[2,65],148:[2,65],149:[2,65],150:[2,65],151:[2,65],152:[2,65],153:[2,65],154:[2,65],155:[2,65],156:[2,65],157:[2,65],158:[2,65],159:[2,65],160:[2,65],161:[2,65],162:[2,65],165:[2,65],166:[2,65],167:[2,65],169:[2,65],170:[2,65],185:[2,65],188:[2,65],194:[2,65],196:[2,65],198:[2,65],200:[2,65]},{6:[2,66],8:[2,66],10:[2,66],49:[2,66],50:[2,
-66],51:[2,66],53:[2,66],56:[2,66],57:[2,66],58:[2,66],59:[2,66],60:[2,66],61:[2,66],62:[2,66],63:[2,66],64:[2,66],65:[2,66],66:[2,66],67:[2,66],68:[2,66],69:[2,66],70:[2,66],71:[2,66],72:[2,66],73:[2,66],74:[2,66],75:[2,66],76:[2,66],77:[2,66],78:[2,66],79:[2,66],81:[2,66],82:[2,66],83:[2,66],84:[2,66],85:[2,66],86:[2,66],87:[2,66],88:[2,66],89:[2,66],90:[2,66],91:[2,66],92:[2,66],93:[2,66],94:[2,66],95:[2,66],96:[2,66],97:[2,66],98:[2,66],99:[2,66],100:[2,66],101:[2,66],102:[2,66],103:[2,66],104:[2,
-66],105:[2,66],106:[2,66],107:[2,66],108:[2,66],109:[2,66],110:[2,66],111:[2,66],112:[2,66],113:[2,66],114:[2,66],115:[2,66],116:[2,66],117:[2,66],118:[2,66],119:[2,66],120:[2,66],121:[2,66],122:[2,66],123:[2,66],124:[2,66],125:[2,66],126:[2,66],127:[2,66],128:[2,66],129:[2,66],130:[2,66],131:[2,66],132:[2,66],134:[2,66],135:[2,66],137:[2,66],138:[2,66],140:[2,66],141:[2,66],142:[2,66],143:[2,66],144:[2,66],145:[2,66],146:[2,66],147:[2,66],148:[2,66],149:[2,66],150:[2,66],151:[2,66],152:[2,66],153:[2,
-66],154:[2,66],155:[2,66],156:[2,66],157:[2,66],158:[2,66],159:[2,66],160:[2,66],161:[2,66],162:[2,66],165:[2,66],166:[2,66],167:[2,66],169:[2,66],170:[2,66],185:[2,66],188:[2,66],194:[2,66],196:[2,66],198:[2,66],200:[2,66]},{6:[2,67],8:[2,67],10:[2,67],49:[2,67],50:[2,67],51:[2,67],53:[2,67],56:[2,67],57:[2,67],58:[2,67],59:[2,67],60:[2,67],61:[2,67],62:[2,67],63:[2,67],64:[2,67],65:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],70:[2,67],71:[2,67],72:[2,67],73:[2,67],74:[2,67],75:[2,67],76:[2,67],
-77:[2,67],78:[2,67],79:[2,67],81:[2,67],82:[2,67],83:[2,67],84:[2,67],85:[2,67],86:[2,67],87:[2,67],88:[2,67],89:[2,67],90:[2,67],91:[2,67],92:[2,67],93:[2,67],94:[2,67],95:[2,67],96:[2,67],97:[2,67],98:[2,67],99:[2,67],100:[2,67],101:[2,67],102:[2,67],103:[2,67],104:[2,67],105:[2,67],106:[2,67],107:[2,67],108:[2,67],109:[2,67],110:[2,67],111:[2,67],112:[2,67],113:[2,67],114:[2,67],115:[2,67],116:[2,67],117:[2,67],118:[2,67],119:[2,67],120:[2,67],121:[2,67],122:[2,67],123:[2,67],124:[2,67],125:[2,
-67],126:[2,67],127:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],134:[2,67],135:[2,67],137:[2,67],138:[2,67],140:[2,67],141:[2,67],142:[2,67],143:[2,67],144:[2,67],145:[2,67],146:[2,67],147:[2,67],148:[2,67],149:[2,67],150:[2,67],151:[2,67],152:[2,67],153:[2,67],154:[2,67],155:[2,67],156:[2,67],157:[2,67],158:[2,67],159:[2,67],160:[2,67],161:[2,67],162:[2,67],165:[2,67],166:[2,67],167:[2,67],169:[2,67],170:[2,67],185:[2,67],188:[2,67],194:[2,67],196:[2,67],198:[2,67],200:[2,67]},{6:[2,
-68],8:[2,68],10:[2,68],49:[2,68],50:[2,68],51:[2,68],53:[2,68],56:[2,68],57:[2,68],58:[2,68],59:[2,68],60:[2,68],61:[2,68],62:[2,68],63:[2,68],64:[2,68],65:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],70:[2,68],71:[2,68],72:[2,68],73:[2,68],74:[2,68],75:[2,68],76:[2,68],77:[2,68],78:[2,68],79:[2,68],81:[2,68],82:[2,68],83:[2,68],84:[2,68],85:[2,68],86:[2,68],87:[2,68],88:[2,68],89:[2,68],90:[2,68],91:[2,68],92:[2,68],93:[2,68],94:[2,68],95:[2,68],96:[2,68],97:[2,68],98:[2,68],99:[2,68],100:[2,68],
-101:[2,68],102:[2,68],103:[2,68],104:[2,68],105:[2,68],106:[2,68],107:[2,68],108:[2,68],109:[2,68],110:[2,68],111:[2,68],112:[2,68],113:[2,68],114:[2,68],115:[2,68],116:[2,68],117:[2,68],118:[2,68],119:[2,68],120:[2,68],121:[2,68],122:[2,68],123:[2,68],124:[2,68],125:[2,68],126:[2,68],127:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],134:[2,68],135:[2,68],137:[2,68],138:[2,68],140:[2,68],141:[2,68],142:[2,68],143:[2,68],144:[2,68],145:[2,68],146:[2,68],147:[2,68],148:[2,68],149:[2,
-68],150:[2,68],151:[2,68],152:[2,68],153:[2,68],154:[2,68],155:[2,68],156:[2,68],157:[2,68],158:[2,68],159:[2,68],160:[2,68],161:[2,68],162:[2,68],165:[2,68],166:[2,68],167:[2,68],169:[2,68],170:[2,68],185:[2,68],188:[2,68],194:[2,68],196:[2,68],198:[2,68],200:[2,68]},{7:150,8:[1,129],15:149},{7:150,8:[1,129],15:151},{7:150,8:[1,129],15:152},{6:[2,72],8:[2,72],10:[2,72],49:[2,72],50:[2,72],51:[2,72],53:[2,72],56:[2,72],57:[2,72],58:[2,72],59:[2,72],60:[2,72],61:[2,72],62:[2,72],63:[2,72],64:[2,72],
-65:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],70:[2,72],71:[2,72],72:[2,72],73:[2,72],74:[2,72],75:[2,72],76:[2,72],77:[2,72],78:[2,72],79:[2,72],81:[2,72],82:[2,72],83:[2,72],84:[2,72],85:[2,72],86:[2,72],87:[2,72],88:[2,72],89:[2,72],90:[2,72],91:[2,72],92:[2,72],93:[2,72],94:[2,72],95:[2,72],96:[2,72],97:[2,72],98:[2,72],99:[2,72],100:[2,72],101:[2,72],102:[2,72],103:[2,72],104:[2,72],105:[2,72],106:[2,72],107:[2,72],108:[2,72],109:[2,72],110:[2,72],111:[2,72],112:[2,72],113:[2,72],114:[2,
-72],115:[2,72],116:[2,72],117:[2,72],118:[2,72],119:[2,72],120:[2,72],121:[2,72],122:[2,72],123:[2,72],124:[2,72],125:[2,72],126:[2,72],127:[2,72],128:[2,72],129:[2,72],130:[2,72],131:[2,72],132:[2,72],134:[2,72],135:[2,72],137:[2,72],138:[2,72],140:[2,72],141:[2,72],142:[2,72],143:[2,72],144:[2,72],145:[2,72],146:[2,72],147:[2,72],148:[2,72],149:[2,72],150:[2,72],151:[2,72],152:[2,72],153:[2,72],154:[2,72],155:[2,72],156:[2,72],157:[2,72],158:[2,72],159:[2,72],160:[2,72],161:[2,72],162:[2,72],165:[2,
-72],166:[2,72],167:[2,72],169:[2,72],170:[2,72],185:[2,72],188:[2,72],194:[2,72],196:[2,72],198:[2,72],200:[2,72]},{6:[2,73],8:[2,73],10:[2,73],49:[2,73],50:[2,73],51:[2,73],53:[2,73],56:[2,73],57:[2,73],58:[2,73],59:[2,73],60:[2,73],61:[2,73],62:[2,73],63:[2,73],64:[2,73],65:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],70:[2,73],71:[2,73],72:[2,73],73:[2,73],74:[2,73],75:[2,73],76:[2,73],77:[2,73],78:[2,73],79:[2,73],81:[2,73],82:[2,73],83:[2,73],84:[2,73],85:[2,73],86:[2,73],87:[2,73],88:[2,73],
-89:[2,73],90:[2,73],91:[2,73],92:[2,73],93:[2,73],94:[2,73],95:[2,73],96:[2,73],97:[2,73],98:[2,73],99:[2,73],100:[2,73],101:[2,73],102:[2,73],103:[2,73],104:[2,73],105:[2,73],106:[2,73],107:[2,73],108:[2,73],109:[2,73],110:[2,73],111:[2,73],112:[2,73],113:[2,73],114:[2,73],115:[2,73],116:[2,73],117:[2,73],118:[2,73],119:[2,73],120:[2,73],121:[2,73],122:[2,73],123:[2,73],124:[2,73],125:[2,73],126:[2,73],127:[2,73],128:[2,73],129:[2,73],130:[2,73],131:[2,73],132:[2,73],134:[2,73],135:[2,73],137:[2,
-73],138:[2,73],140:[2,73],141:[2,73],142:[2,73],143:[2,73],144:[2,73],145:[2,73],146:[2,73],147:[2,73],148:[2,73],149:[2,73],150:[2,73],151:[2,73],152:[2,73],153:[2,73],154:[2,73],155:[2,73],156:[2,73],157:[2,73],158:[2,73],159:[2,73],160:[2,73],161:[2,73],162:[2,73],165:[2,73],166:[2,73],167:[2,73],169:[2,73],170:[2,73],185:[2,73],188:[2,73],194:[2,73],196:[2,73],198:[2,73],200:[2,73]},{6:[2,74],8:[2,74],10:[2,74],49:[2,74],50:[2,74],51:[2,74],53:[2,74],56:[2,74],57:[2,74],58:[2,74],59:[2,74],60:[2,
-74],61:[2,74],62:[2,74],63:[2,74],64:[2,74],65:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],70:[2,74],71:[2,74],72:[2,74],73:[2,74],74:[2,74],75:[2,74],76:[2,74],77:[2,74],78:[2,74],79:[2,74],81:[2,74],82:[2,74],83:[2,74],84:[2,74],85:[2,74],86:[2,74],87:[2,74],88:[2,74],89:[2,74],90:[2,74],91:[2,74],92:[2,74],93:[2,74],94:[2,74],95:[2,74],96:[2,74],97:[2,74],98:[2,74],99:[2,74],100:[2,74],101:[2,74],102:[2,74],103:[2,74],104:[2,74],105:[2,74],106:[2,74],107:[2,74],108:[2,74],109:[2,74],110:[2,
-74],111:[2,74],112:[2,74],113:[2,74],114:[2,74],115:[2,74],116:[2,74],117:[2,74],118:[2,74],119:[2,74],120:[2,74],121:[2,74],122:[2,74],123:[2,74],124:[2,74],125:[2,74],126:[2,74],127:[2,74],128:[2,74],129:[2,74],130:[2,74],131:[2,74],132:[2,74],134:[2,74],135:[2,74],137:[2,74],138:[2,74],140:[2,74],141:[2,74],142:[2,74],143:[2,74],144:[2,74],145:[2,74],146:[2,74],147:[2,74],148:[2,74],149:[2,74],150:[2,74],151:[2,74],152:[2,74],153:[2,74],154:[2,74],155:[2,74],156:[2,74],157:[2,74],158:[2,74],159:[2,
-74],160:[2,74],161:[2,74],162:[2,74],165:[2,74],166:[2,74],167:[2,74],169:[2,74],170:[2,74],185:[2,74],188:[2,74],194:[2,74],196:[2,74],198:[2,74],200:[2,74]},{6:[2,75],8:[2,75],10:[2,75],49:[2,75],50:[2,75],51:[2,75],53:[2,75],56:[2,75],57:[2,75],58:[2,75],59:[2,75],60:[2,75],61:[2,75],62:[2,75],63:[2,75],64:[2,75],65:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],70:[2,75],71:[2,75],72:[2,75],73:[2,75],74:[2,75],75:[2,75],76:[2,75],77:[2,75],78:[2,75],79:[2,75],81:[2,75],82:[2,75],83:[2,75],84:[2,
-75],85:[2,75],86:[2,75],87:[2,75],88:[2,75],89:[2,75],90:[2,75],91:[2,75],92:[2,75],93:[2,75],94:[2,75],95:[2,75],96:[2,75],97:[2,75],98:[2,75],99:[2,75],100:[2,75],101:[2,75],102:[2,75],103:[2,75],104:[2,75],105:[2,75],106:[2,75],107:[2,75],108:[2,75],109:[2,75],110:[2,75],111:[2,75],112:[2,75],113:[2,75],114:[2,75],115:[2,75],116:[2,75],117:[2,75],118:[2,75],119:[2,75],120:[2,75],121:[2,75],122:[2,75],123:[2,75],124:[2,75],125:[2,75],126:[2,75],127:[2,75],128:[2,75],129:[2,75],130:[2,75],131:[2,
-75],132:[2,75],134:[2,75],135:[2,75],137:[2,75],138:[2,75],140:[2,75],141:[2,75],142:[2,75],143:[2,75],144:[2,75],145:[2,75],146:[2,75],147:[2,75],148:[2,75],149:[2,75],150:[2,75],151:[2,75],152:[2,75],153:[2,75],154:[2,75],155:[2,75],156:[2,75],157:[2,75],158:[2,75],159:[2,75],160:[2,75],161:[2,75],162:[2,75],165:[2,75],166:[2,75],167:[2,75],169:[2,75],170:[2,75],185:[2,75],188:[2,75],194:[2,75],196:[2,75],198:[2,75],200:[2,75]},{6:[2,76],8:[2,76],10:[2,76],49:[2,76],50:[2,76],51:[2,76],53:[2,76],
-56:[2,76],57:[2,76],58:[2,76],59:[2,76],60:[2,76],61:[2,76],62:[2,76],63:[2,76],64:[2,76],65:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],70:[2,76],71:[2,76],72:[2,76],73:[2,76],74:[2,76],75:[2,76],76:[2,76],77:[2,76],78:[2,76],79:[2,76],81:[2,76],82:[2,76],83:[2,76],84:[2,76],85:[2,76],86:[2,76],87:[2,76],88:[2,76],89:[2,76],90:[2,76],91:[2,76],92:[2,76],93:[2,76],94:[2,76],95:[2,76],96:[2,76],97:[2,76],98:[2,76],99:[2,76],100:[2,76],101:[2,76],102:[2,76],103:[2,76],104:[2,76],105:[2,76],106:[2,
-76],107:[2,76],108:[2,76],109:[2,76],110:[2,76],111:[2,76],112:[2,76],113:[2,76],114:[2,76],115:[2,76],116:[2,76],117:[2,76],118:[2,76],119:[2,76],120:[2,76],121:[2,76],122:[2,76],123:[2,76],124:[2,76],125:[2,76],126:[2,76],127:[2,76],128:[2,76],129:[2,76],130:[2,76],131:[2,76],132:[2,76],134:[2,76],135:[2,76],137:[2,76],138:[2,76],140:[2,76],141:[2,76],142:[2,76],143:[2,76],144:[2,76],145:[2,76],146:[2,76],147:[2,76],148:[2,76],149:[2,76],150:[2,76],151:[2,76],152:[2,76],153:[2,76],154:[2,76],155:[2,
-76],156:[2,76],157:[2,76],158:[2,76],159:[2,76],160:[2,76],161:[2,76],162:[2,76],165:[2,76],166:[2,76],167:[2,76],169:[2,76],170:[2,76],185:[2,76],188:[2,76],194:[2,76],196:[2,76],198:[2,76],200:[2,76]},{3:155,4:[1,156],7:150,8:[1,129],13:154,15:153},{7:150,8:[1,129],15:157},{80:[1,158]},{6:[2,81],8:[2,81],10:[2,81],49:[2,81],50:[2,81],51:[2,81],53:[2,81],56:[2,81],57:[2,81],58:[2,81],59:[2,81],60:[2,81],61:[2,81],62:[2,81],63:[2,81],64:[2,81],65:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],70:[2,
-81],71:[2,81],72:[2,81],73:[2,81],74:[2,81],75:[2,81],76:[2,81],77:[2,81],78:[2,81],79:[2,81],81:[2,81],82:[2,81],83:[2,81],84:[2,81],85:[2,81],86:[2,81],87:[2,81],88:[2,81],89:[2,81],90:[2,81],91:[2,81],92:[2,81],93:[2,81],94:[2,81],95:[2,81],96:[2,81],97:[2,81],98:[2,81],99:[2,81],100:[2,81],101:[2,81],102:[2,81],103:[2,81],104:[2,81],105:[2,81],106:[2,81],107:[2,81],108:[2,81],109:[2,81],110:[2,81],111:[2,81],112:[2,81],113:[2,81],114:[2,81],115:[2,81],116:[2,81],117:[2,81],118:[2,81],119:[2,81],
-120:[2,81],121:[2,81],122:[2,81],123:[2,81],124:[2,81],125:[2,81],126:[2,81],127:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],134:[2,81],135:[2,81],137:[2,81],138:[2,81],140:[2,81],141:[2,81],142:[2,81],143:[2,81],144:[2,81],145:[2,81],146:[2,81],147:[2,81],148:[2,81],149:[2,81],150:[2,81],151:[2,81],152:[2,81],153:[2,81],154:[2,81],155:[2,81],156:[2,81],157:[2,81],158:[2,81],159:[2,81],160:[2,81],161:[2,81],162:[2,81],165:[2,81],166:[2,81],167:[2,81],169:[2,81],170:[2,81],185:[2,
-81],188:[2,81],194:[2,81],196:[2,81],198:[2,81],200:[2,81]},{7:159,8:[1,129]},{7:160,8:[1,129]},{7:161,8:[1,129]},{7:162,8:[1,129]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:163,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,
-61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,
-106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:164,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,
-62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,
-107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{4:[1,166],8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:165,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,
-62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,
-107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:167,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,
-63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],
-147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:168,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],
-94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,
-108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:169,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,
-64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],
-149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{4:[1,170],8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:171,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],
-94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,
-108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:172,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,
-64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],
-149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:173,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],
-95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,
-109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:174,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],
-96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],
-151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:175,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,
-66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,
-110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:176,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],
-97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],
-153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:177,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,
-67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,
-111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:178,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,
-68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,
-112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:179,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,
-69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],
-157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:180,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],
-100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,
-113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:181,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,
-70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],
-159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:182,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],
-101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,
-114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:183,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,
-71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],
-161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:184,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],
-102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,
-115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:185,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,
-72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],
-162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:186,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,
-73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,
-116]},{6:[2,110],8:[2,110],10:[2,110],49:[2,110],50:[2,110],51:[2,110],53:[2,110],56:[2,110],57:[2,110],58:[2,110],59:[2,110],60:[2,110],61:[2,110],62:[2,110],63:[2,110],64:[2,110],65:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],70:[2,110],71:[2,110],72:[2,110],73:[2,110],74:[2,110],75:[2,110],76:[2,110],77:[2,110],78:[2,110],79:[2,110],81:[2,110],82:[2,110],83:[2,110],84:[2,110],85:[2,110],86:[2,110],87:[2,110],88:[2,110],89:[2,110],90:[2,110],91:[2,110],92:[2,110],93:[2,110],94:[2,110],95:[2,
-110],96:[2,110],97:[2,110],98:[2,110],99:[2,110],100:[2,110],101:[2,110],102:[2,110],103:[2,110],104:[2,110],105:[2,110],106:[2,110],107:[2,110],108:[2,110],109:[2,110],110:[2,110],111:[2,110],112:[2,110],113:[2,110],114:[2,110],115:[2,110],116:[2,110],117:[2,110],118:[2,110],119:[2,110],120:[2,110],121:[2,110],122:[2,110],123:[2,110],124:[2,110],125:[2,110],126:[2,110],127:[2,110],128:[2,110],129:[2,110],130:[2,110],131:[2,110],132:[2,110],134:[2,110],135:[2,110],137:[2,110],138:[2,110],140:[2,110],
-141:[2,110],142:[2,110],143:[2,110],144:[2,110],145:[2,110],146:[2,110],147:[2,110],148:[2,110],149:[2,110],150:[2,110],151:[2,110],152:[2,110],153:[2,110],154:[2,110],155:[2,110],156:[2,110],157:[2,110],158:[2,110],159:[2,110],160:[2,110],161:[2,110],162:[2,110],165:[2,110],166:[2,110],167:[2,110],169:[2,110],170:[2,110],185:[2,110],188:[2,110],194:[2,110],196:[2,110],198:[2,110],200:[2,110]},{6:[2,111],8:[2,111],10:[2,111],49:[2,111],50:[2,111],51:[2,111],53:[2,111],56:[2,111],57:[2,111],58:[2,
-111],59:[2,111],60:[2,111],61:[2,111],62:[2,111],63:[2,111],64:[2,111],65:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],70:[2,111],71:[2,111],72:[2,111],73:[2,111],74:[2,111],75:[2,111],76:[2,111],77:[2,111],78:[2,111],79:[2,111],81:[2,111],82:[2,111],83:[2,111],84:[2,111],85:[2,111],86:[2,111],87:[2,111],88:[2,111],89:[2,111],90:[2,111],91:[2,111],92:[2,111],93:[2,111],94:[2,111],95:[2,111],96:[2,111],97:[2,111],98:[2,111],99:[2,111],100:[2,111],101:[2,111],102:[2,111],103:[2,111],104:[2,111],
-105:[2,111],106:[2,111],107:[2,111],108:[2,111],109:[2,111],110:[2,111],111:[2,111],112:[2,111],113:[2,111],114:[2,111],115:[2,111],116:[2,111],117:[2,111],118:[2,111],119:[2,111],120:[2,111],121:[2,111],122:[2,111],123:[2,111],124:[2,111],125:[2,111],126:[2,111],127:[2,111],128:[2,111],129:[2,111],130:[2,111],131:[2,111],132:[2,111],134:[2,111],135:[2,111],137:[2,111],138:[2,111],140:[2,111],141:[2,111],142:[2,111],143:[2,111],144:[2,111],145:[2,111],146:[2,111],147:[2,111],148:[2,111],149:[2,111],
-150:[2,111],151:[2,111],152:[2,111],153:[2,111],154:[2,111],155:[2,111],156:[2,111],157:[2,111],158:[2,111],159:[2,111],160:[2,111],161:[2,111],162:[2,111],165:[2,111],166:[2,111],167:[2,111],169:[2,111],170:[2,111],185:[2,111],188:[2,111],194:[2,111],196:[2,111],198:[2,111],200:[2,111]},{6:[2,112],8:[2,112],10:[2,112],49:[2,112],50:[2,112],51:[2,112],53:[2,112],56:[2,112],57:[2,112],58:[2,112],59:[2,112],60:[2,112],61:[2,112],62:[2,112],63:[2,112],64:[2,112],65:[2,112],66:[2,112],67:[2,112],68:[2,
-112],69:[2,112],70:[2,112],71:[2,112],72:[2,112],73:[2,112],74:[2,112],75:[2,112],76:[2,112],77:[2,112],78:[2,112],79:[2,112],81:[2,112],82:[2,112],83:[2,112],84:[2,112],85:[2,112],86:[2,112],87:[2,112],88:[2,112],89:[2,112],90:[2,112],91:[2,112],92:[2,112],93:[2,112],94:[2,112],95:[2,112],96:[2,112],97:[2,112],98:[2,112],99:[2,112],100:[2,112],101:[2,112],102:[2,112],103:[2,112],104:[2,112],105:[2,112],106:[2,112],107:[2,112],108:[2,112],109:[2,112],110:[2,112],111:[2,112],112:[2,112],113:[2,112],
-114:[2,112],115:[2,112],116:[2,112],117:[2,112],118:[2,112],119:[2,112],120:[2,112],121:[2,112],122:[2,112],123:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112],129:[2,112],130:[2,112],131:[2,112],132:[2,112],134:[2,112],135:[2,112],137:[2,112],138:[2,112],140:[2,112],141:[2,112],142:[2,112],143:[2,112],144:[2,112],145:[2,112],146:[2,112],147:[2,112],148:[2,112],149:[2,112],150:[2,112],151:[2,112],152:[2,112],153:[2,112],154:[2,112],155:[2,112],156:[2,112],157:[2,112],158:[2,112],
-159:[2,112],160:[2,112],161:[2,112],162:[2,112],165:[2,112],166:[2,112],167:[2,112],169:[2,112],170:[2,112],185:[2,112],188:[2,112],194:[2,112],196:[2,112],198:[2,112],200:[2,112]},{6:[2,113],8:[2,113],10:[2,113],49:[2,113],50:[2,113],51:[2,113],53:[2,113],56:[2,113],57:[2,113],58:[2,113],59:[2,113],60:[2,113],61:[2,113],62:[2,113],63:[2,113],64:[2,113],65:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],70:[2,113],71:[2,113],72:[2,113],73:[2,113],74:[2,113],75:[2,113],76:[2,113],77:[2,113],78:[2,
-113],79:[2,113],81:[2,113],82:[2,113],83:[2,113],84:[2,113],85:[2,113],86:[2,113],87:[2,113],88:[2,113],89:[2,113],90:[2,113],91:[2,113],92:[2,113],93:[2,113],94:[2,113],95:[2,113],96:[2,113],97:[2,113],98:[2,113],99:[2,113],100:[2,113],101:[2,113],102:[2,113],103:[2,113],104:[2,113],105:[2,113],106:[2,113],107:[2,113],108:[2,113],109:[2,113],110:[2,113],111:[2,113],112:[2,113],113:[2,113],114:[2,113],115:[2,113],116:[2,113],117:[2,113],118:[2,113],119:[2,113],120:[2,113],121:[2,113],122:[2,113],
-123:[2,113],124:[2,113],125:[2,113],126:[2,113],127:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],134:[2,113],135:[2,113],137:[2,113],138:[2,113],140:[2,113],141:[2,113],142:[2,113],143:[2,113],144:[2,113],145:[2,113],146:[2,113],147:[2,113],148:[2,113],149:[2,113],150:[2,113],151:[2,113],152:[2,113],153:[2,113],154:[2,113],155:[2,113],156:[2,113],157:[2,113],158:[2,113],159:[2,113],160:[2,113],161:[2,113],162:[2,113],165:[2,113],166:[2,113],167:[2,113],169:[2,113],170:[2,113],
-185:[2,113],188:[2,113],194:[2,113],196:[2,113],198:[2,113],200:[2,113]},{6:[2,114],8:[2,114],10:[2,114],49:[2,114],50:[2,114],51:[2,114],53:[2,114],56:[2,114],57:[2,114],58:[2,114],59:[2,114],60:[2,114],61:[2,114],62:[2,114],63:[2,114],64:[2,114],65:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],70:[2,114],71:[2,114],72:[2,114],73:[2,114],74:[2,114],75:[2,114],76:[2,114],77:[2,114],78:[2,114],79:[2,114],81:[2,114],82:[2,114],83:[2,114],84:[2,114],85:[2,114],86:[2,114],87:[2,114],88:[2,114],
-89:[2,114],90:[2,114],91:[2,114],92:[2,114],93:[2,114],94:[2,114],95:[2,114],96:[2,114],97:[2,114],98:[2,114],99:[2,114],100:[2,114],101:[2,114],102:[2,114],103:[2,114],104:[2,114],105:[2,114],106:[2,114],107:[2,114],108:[2,114],109:[2,114],110:[2,114],111:[2,114],112:[2,114],113:[2,114],114:[2,114],115:[2,114],116:[2,114],117:[2,114],118:[2,114],119:[2,114],120:[2,114],121:[2,114],122:[2,114],123:[2,114],124:[2,114],125:[2,114],126:[2,114],127:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],
-132:[2,114],134:[2,114],135:[2,114],137:[2,114],138:[2,114],140:[2,114],141:[2,114],142:[2,114],143:[2,114],144:[2,114],145:[2,114],146:[2,114],147:[2,114],148:[2,114],149:[2,114],150:[2,114],151:[2,114],152:[2,114],153:[2,114],154:[2,114],155:[2,114],156:[2,114],157:[2,114],158:[2,114],159:[2,114],160:[2,114],161:[2,114],162:[2,114],165:[2,114],166:[2,114],167:[2,114],169:[2,114],170:[2,114],185:[2,114],188:[2,114],194:[2,114],196:[2,114],198:[2,114],200:[2,114]},{6:[2,115],8:[2,115],10:[2,115],
-49:[2,115],50:[2,115],51:[2,115],53:[2,115],56:[2,115],57:[2,115],58:[2,115],59:[2,115],60:[2,115],61:[2,115],62:[2,115],63:[2,115],64:[2,115],65:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],70:[2,115],71:[2,115],72:[2,115],73:[2,115],74:[2,115],75:[2,115],76:[2,115],77:[2,115],78:[2,115],79:[2,115],81:[2,115],82:[2,115],83:[2,115],84:[2,115],85:[2,115],86:[2,115],87:[2,115],88:[2,115],89:[2,115],90:[2,115],91:[2,115],92:[2,115],93:[2,115],94:[2,115],95:[2,115],96:[2,115],97:[2,115],98:[2,
-115],99:[2,115],100:[2,115],101:[2,115],102:[2,115],103:[2,115],104:[2,115],105:[2,115],106:[2,115],107:[2,115],108:[2,115],109:[2,115],110:[2,115],111:[2,115],112:[2,115],113:[2,115],114:[2,115],115:[2,115],116:[2,115],117:[2,115],118:[2,115],119:[2,115],120:[2,115],121:[2,115],122:[2,115],123:[2,115],124:[2,115],125:[2,115],126:[2,115],127:[2,115],128:[2,115],129:[2,115],130:[2,115],131:[2,115],132:[2,115],134:[2,115],135:[2,115],137:[2,115],138:[2,115],140:[2,115],141:[2,115],142:[2,115],143:[2,
-115],144:[2,115],145:[2,115],146:[2,115],147:[2,115],148:[2,115],149:[2,115],150:[2,115],151:[2,115],152:[2,115],153:[2,115],154:[2,115],155:[2,115],156:[2,115],157:[2,115],158:[2,115],159:[2,115],160:[2,115],161:[2,115],162:[2,115],165:[2,115],166:[2,115],167:[2,115],169:[2,115],170:[2,115],185:[2,115],188:[2,115],194:[2,115],196:[2,115],198:[2,115],200:[2,115]},{6:[2,116],8:[2,116],10:[2,116],49:[2,116],50:[2,116],51:[2,116],53:[2,116],56:[2,116],57:[2,116],58:[2,116],59:[2,116],60:[2,116],61:[2,
-116],62:[2,116],63:[2,116],64:[2,116],65:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],70:[2,116],71:[2,116],72:[2,116],73:[2,116],74:[2,116],75:[2,116],76:[2,116],77:[2,116],78:[2,116],79:[2,116],81:[2,116],82:[2,116],83:[2,116],84:[2,116],85:[2,116],86:[2,116],87:[2,116],88:[2,116],89:[2,116],90:[2,116],91:[2,116],92:[2,116],93:[2,116],94:[2,116],95:[2,116],96:[2,116],97:[2,116],98:[2,116],99:[2,116],100:[2,116],101:[2,116],102:[2,116],103:[2,116],104:[2,116],105:[2,116],106:[2,116],107:[2,
-116],108:[2,116],109:[2,116],110:[2,116],111:[2,116],112:[2,116],113:[2,116],114:[2,116],115:[2,116],116:[2,116],117:[2,116],118:[2,116],119:[2,116],120:[2,116],121:[2,116],122:[2,116],123:[2,116],124:[2,116],125:[2,116],126:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116],132:[2,116],134:[2,116],135:[2,116],137:[2,116],138:[2,116],140:[2,116],141:[2,116],142:[2,116],143:[2,116],144:[2,116],145:[2,116],146:[2,116],147:[2,116],148:[2,116],149:[2,116],150:[2,116],151:[2,116],152:[2,
-116],153:[2,116],154:[2,116],155:[2,116],156:[2,116],157:[2,116],158:[2,116],159:[2,116],160:[2,116],161:[2,116],162:[2,116],165:[2,116],166:[2,116],167:[2,116],169:[2,116],170:[2,116],185:[2,116],188:[2,116],194:[2,116],196:[2,116],198:[2,116],200:[2,116]},{6:[2,117],8:[2,117],10:[2,117],49:[2,117],50:[2,117],51:[2,117],53:[2,117],56:[2,117],57:[2,117],58:[2,117],59:[2,117],60:[2,117],61:[2,117],62:[2,117],63:[2,117],64:[2,117],65:[2,117],66:[2,117],67:[2,117],68:[2,117],69:[2,117],70:[2,117],71:[2,
-117],72:[2,117],73:[2,117],74:[2,117],75:[2,117],76:[2,117],77:[2,117],78:[2,117],79:[2,117],81:[2,117],82:[2,117],83:[2,117],84:[2,117],85:[2,117],86:[2,117],87:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,117],92:[2,117],93:[2,117],94:[2,117],95:[2,117],96:[2,117],97:[2,117],98:[2,117],99:[2,117],100:[2,117],101:[2,117],102:[2,117],103:[2,117],104:[2,117],105:[2,117],106:[2,117],107:[2,117],108:[2,117],109:[2,117],110:[2,117],111:[2,117],112:[2,117],113:[2,117],114:[2,117],115:[2,117],116:[2,
-117],117:[2,117],118:[2,117],119:[2,117],120:[2,117],121:[2,117],122:[2,117],123:[2,117],124:[2,117],125:[2,117],126:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117],132:[2,117],134:[2,117],135:[2,117],137:[2,117],138:[2,117],140:[2,117],141:[2,117],142:[2,117],143:[2,117],144:[2,117],145:[2,117],146:[2,117],147:[2,117],148:[2,117],149:[2,117],150:[2,117],151:[2,117],152:[2,117],153:[2,117],154:[2,117],155:[2,117],156:[2,117],157:[2,117],158:[2,117],159:[2,117],160:[2,117],161:[2,
-117],162:[2,117],165:[2,117],166:[2,117],167:[2,117],169:[2,117],170:[2,117],185:[2,117],188:[2,117],194:[2,117],196:[2,117],198:[2,117],200:[2,117]},{7:187,8:[1,129]},{8:[1,189],12:188},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:190,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],
-86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,
-102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:191,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,
-56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,
-132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:192,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,
-57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],
-137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:193,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],
-88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,
-103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:194,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,
-58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],
-138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:195,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],
-89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,
-104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:196,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],
-90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],
-141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:197,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,
-60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,
-105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:198,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],
-91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],
-143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:199,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,
-61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,
-106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{7:128,8:[1,129],14:200},{7:201,8:[1,129]},{7:202,8:[1,129]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:203,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],
-86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,
-102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:205,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,
-56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],133:204,
-135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,206]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],
-85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],
-132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:207,140:[2,193],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],
-59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],
-112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:214,141:[1,105],142:[2,193],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,
-16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],
-91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:215,141:[1,
-105],143:[1,106],144:[2,193],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],
-68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,
-87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:216,141:[1,105],143:[1,106],145:[1,107],146:[2,193],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,
-183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,
-67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:217,141:[1,105],143:[1,106],145:[1,107],147:[1,108],148:[2,193],149:[1,109],
-151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,
-44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,
-93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:218,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],150:[2,193],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,
-193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,
-73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:219,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],152:[2,193],153:[1,111],155:[1,112],157:[1,113],159:[1,114],
-161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,
-51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],
-129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:220,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],154:[2,193],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,
-55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,
-78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:221,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],156:[2,193],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,
-118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,
-57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],
-137:[1,103],138:[1,104],139:222,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],158:[2,193],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{3:225,4:[1,156],7:226,8:[1,129],16:223,17:224},{8:[1,227]},{8:[1,228]},{6:[2,172],8:[2,172],10:[2,172],49:[2,172],
-50:[2,172],51:[2,172],53:[2,172],56:[2,172],57:[2,172],58:[2,172],59:[2,172],60:[2,172],61:[2,172],62:[2,172],63:[2,172],64:[2,172],65:[2,172],66:[2,172],67:[2,172],68:[2,172],69:[2,172],70:[2,172],71:[2,172],72:[2,172],73:[2,172],74:[2,172],75:[2,172],76:[2,172],77:[2,172],78:[2,172],79:[2,172],81:[2,172],82:[2,172],83:[2,172],84:[2,172],85:[2,172],86:[2,172],87:[2,172],88:[2,172],89:[2,172],90:[2,172],91:[2,172],92:[2,172],93:[2,172],94:[2,172],95:[2,172],96:[2,172],97:[2,172],98:[2,172],99:[2,
-172],100:[2,172],101:[2,172],102:[2,172],103:[2,172],104:[2,172],105:[2,172],106:[2,172],107:[2,172],108:[2,172],109:[2,172],110:[2,172],111:[2,172],112:[2,172],113:[2,172],114:[2,172],115:[2,172],116:[2,172],117:[2,172],118:[2,172],119:[2,172],120:[2,172],121:[2,172],122:[2,172],123:[2,172],124:[2,172],125:[2,172],126:[2,172],127:[2,172],128:[2,172],129:[2,172],130:[2,172],131:[2,172],132:[2,172],135:[2,172],137:[2,172],138:[2,172],140:[2,172],141:[2,172],142:[2,172],143:[2,172],144:[2,172],145:[2,
-172],146:[2,172],147:[2,172],148:[2,172],149:[2,172],150:[2,172],151:[2,172],152:[2,172],153:[2,172],154:[2,172],155:[2,172],156:[2,172],157:[2,172],158:[2,172],159:[2,172],160:[2,172],161:[2,172],162:[2,172],165:[2,172],166:[2,172],169:[2,172],170:[2,172],185:[2,172],188:[2,172],194:[2,172],196:[2,172],198:[2,172],200:[2,172]},{6:[2,173],8:[2,173],10:[2,173],49:[2,173],50:[2,173],51:[2,173],53:[2,173],56:[2,173],57:[2,173],58:[2,173],59:[2,173],60:[2,173],61:[2,173],62:[2,173],63:[2,173],64:[2,173],
-65:[2,173],66:[2,173],67:[2,173],68:[2,173],69:[2,173],70:[2,173],71:[2,173],72:[2,173],73:[2,173],74:[2,173],75:[2,173],76:[2,173],77:[2,173],78:[2,173],79:[2,173],81:[2,173],82:[2,173],83:[2,173],84:[2,173],85:[2,173],86:[2,173],87:[2,173],88:[2,173],89:[2,173],90:[2,173],91:[2,173],92:[2,173],93:[2,173],94:[2,173],95:[2,173],96:[2,173],97:[2,173],98:[2,173],99:[2,173],100:[2,173],101:[2,173],102:[2,173],103:[2,173],104:[2,173],105:[2,173],106:[2,173],107:[2,173],108:[2,173],109:[2,173],110:[2,
-173],111:[2,173],112:[2,173],113:[2,173],114:[2,173],115:[2,173],116:[2,173],117:[2,173],118:[2,173],119:[2,173],120:[2,173],121:[2,173],122:[2,173],123:[2,173],124:[2,173],125:[2,173],126:[2,173],127:[2,173],128:[2,173],129:[2,173],130:[2,173],131:[2,173],132:[2,173],135:[2,173],137:[2,173],138:[2,173],140:[2,173],141:[2,173],142:[2,173],143:[2,173],144:[2,173],145:[2,173],146:[2,173],147:[2,173],148:[2,173],149:[2,173],150:[2,173],151:[2,173],152:[2,173],153:[2,173],154:[2,173],155:[2,173],156:[2,
-173],157:[2,173],158:[2,173],159:[2,173],160:[2,173],161:[2,173],162:[2,173],165:[2,173],166:[2,173],169:[2,173],170:[2,173],185:[2,173],188:[2,173],194:[2,173],196:[2,173],198:[2,173],200:[2,173]},{50:[1,229],51:[1,230]},{68:[2,208],191:[2,208],193:[2,208],195:[2,208],197:[2,208],199:[2,208]},{196:[1,231]},{198:[1,232]},{200:[1,233]},{68:[2,207],191:[2,207],193:[2,207],195:[2,207],197:[2,207],199:[2,207]},{6:[2,191],10:[2,191],53:[2,191],64:[2,191],65:[2,191],66:[2,191],140:[2,191],142:[2,191],144:[2,
-191],146:[2,191],148:[2,191],150:[2,191],152:[2,191],154:[2,191],156:[2,191],158:[2,191],160:[2,191],185:[2,191],188:[2,191],194:[2,191],196:[2,191],198:[2,191],200:[2,191]},{6:[2,175],8:[2,175],10:[2,175],49:[2,175],50:[2,175],51:[2,175],53:[2,175],56:[2,175],57:[2,175],58:[2,175],59:[2,175],60:[2,175],61:[2,175],62:[2,175],63:[2,175],64:[2,175],65:[2,175],66:[2,175],67:[2,175],68:[2,175],69:[2,175],70:[2,175],71:[2,175],72:[2,175],73:[2,175],74:[2,175],75:[2,175],76:[2,175],77:[2,175],78:[2,175],
-79:[2,175],81:[2,175],82:[2,175],83:[2,175],84:[2,175],85:[2,175],86:[2,175],87:[2,175],88:[2,175],89:[2,175],90:[2,175],91:[2,175],92:[2,175],93:[2,175],94:[2,175],95:[2,175],96:[2,175],97:[2,175],98:[2,175],99:[2,175],100:[2,175],101:[2,175],102:[2,175],103:[2,175],104:[2,175],105:[2,175],106:[2,175],107:[2,175],108:[2,175],109:[2,175],110:[2,175],111:[2,175],112:[2,175],113:[2,175],114:[2,175],115:[2,175],116:[2,175],117:[2,175],118:[2,175],119:[2,175],120:[2,175],121:[2,175],122:[2,175],123:[2,
-175],124:[2,175],125:[2,175],126:[2,175],127:[2,175],128:[2,175],129:[2,175],130:[2,175],131:[2,175],132:[2,175],135:[2,175],137:[2,175],138:[2,175],140:[2,175],141:[2,175],142:[2,175],143:[2,175],144:[2,175],145:[2,175],146:[2,175],147:[2,175],148:[2,175],149:[2,175],150:[2,175],151:[2,175],152:[2,175],153:[2,175],154:[2,175],155:[2,175],156:[2,175],157:[2,175],158:[2,175],159:[2,175],160:[2,175],161:[2,175],162:[2,175],169:[2,175],170:[2,175],185:[2,175],188:[2,175],194:[2,175],196:[2,175],198:[2,
-175],200:[2,175]},{8:[2,189],49:[2,189],50:[2,189],51:[2,189],56:[2,189],57:[2,189],58:[2,189],59:[2,189],60:[2,189],61:[2,189],62:[2,189],63:[2,189],67:[2,189],68:[2,189],69:[2,189],70:[2,189],71:[2,189],72:[2,189],73:[2,189],74:[2,189],75:[2,189],76:[2,189],77:[2,189],78:[2,189],79:[2,189],81:[2,189],82:[2,189],83:[2,189],84:[2,189],85:[2,189],86:[2,189],87:[2,189],88:[2,189],89:[2,189],90:[2,189],91:[2,189],92:[2,189],93:[2,189],94:[2,189],95:[2,189],96:[2,189],97:[2,189],98:[2,189],99:[2,189],
-100:[2,189],101:[2,189],102:[2,189],103:[2,189],104:[2,189],105:[2,189],106:[2,189],107:[2,189],108:[2,189],109:[2,189],110:[2,189],111:[2,189],112:[2,189],113:[2,189],114:[2,189],115:[2,189],116:[2,189],117:[2,189],118:[2,189],119:[2,189],120:[2,189],121:[2,189],122:[2,189],123:[2,189],124:[2,189],125:[2,189],126:[2,189],127:[2,189],128:[2,189],129:[2,189],130:[2,189],131:[2,189],132:[2,189],135:[2,189],137:[2,189],138:[2,189],141:[2,189],143:[2,189],145:[2,189],147:[2,189],149:[2,189],151:[2,189],
-153:[2,189],155:[2,189],157:[2,189],159:[2,189],161:[2,189],162:[2,189],169:[2,189],170:[2,189],175:[2,189],176:[2,189],177:[2,189],178:[2,189],179:[2,189],180:[2,189],181:[2,189]},{8:[2,6],10:[2,6],19:[2,6],21:[2,6],23:[2,6],25:[2,6],27:[2,6],29:[2,6],31:[2,6],33:[2,6],35:[2,6],37:[2,6],39:[2,6],41:[2,6],49:[2,6],50:[2,6],51:[2,6],56:[2,6],57:[2,6],58:[2,6],59:[2,6],60:[2,6],61:[2,6],62:[2,6],63:[2,6],67:[2,6],68:[2,6],69:[2,6],70:[2,6],71:[2,6],72:[2,6],73:[2,6],74:[2,6],75:[2,6],76:[2,6],77:[2,
-6],78:[2,6],79:[2,6],81:[2,6],82:[2,6],83:[2,6],84:[2,6],85:[2,6],86:[2,6],87:[2,6],88:[2,6],89:[2,6],90:[2,6],91:[2,6],92:[2,6],93:[2,6],94:[2,6],95:[2,6],96:[2,6],97:[2,6],98:[2,6],99:[2,6],100:[2,6],101:[2,6],102:[2,6],103:[2,6],104:[2,6],105:[2,6],106:[2,6],107:[2,6],108:[2,6],109:[2,6],110:[2,6],111:[2,6],112:[2,6],113:[2,6],114:[2,6],115:[2,6],116:[2,6],117:[2,6],118:[2,6],119:[2,6],120:[2,6],121:[2,6],122:[2,6],123:[2,6],124:[2,6],125:[2,6],126:[2,6],127:[2,6],128:[2,6],129:[2,6],130:[2,6],
-131:[2,6],132:[2,6],135:[2,6],137:[2,6],138:[2,6],141:[2,6],143:[2,6],145:[2,6],147:[2,6],149:[2,6],151:[2,6],153:[2,6],155:[2,6],157:[2,6],159:[2,6],161:[2,6],162:[2,6],169:[2,6],170:[2,6],175:[2,6],176:[2,6],177:[2,6],178:[2,6],179:[2,6],180:[2,6],181:[2,6]},{9:[1,234]},{8:[2,190],49:[2,190],50:[2,190],51:[2,190],56:[2,190],57:[2,190],58:[2,190],59:[2,190],60:[2,190],61:[2,190],62:[2,190],63:[2,190],67:[2,190],68:[2,190],69:[2,190],70:[2,190],71:[2,190],72:[2,190],73:[2,190],74:[2,190],75:[2,190],
-76:[2,190],77:[2,190],78:[2,190],79:[2,190],81:[2,190],82:[2,190],83:[2,190],84:[2,190],85:[2,190],86:[2,190],87:[2,190],88:[2,190],89:[2,190],90:[2,190],91:[2,190],92:[2,190],93:[2,190],94:[2,190],95:[2,190],96:[2,190],97:[2,190],98:[2,190],99:[2,190],100:[2,190],101:[2,190],102:[2,190],103:[2,190],104:[2,190],105:[2,190],106:[2,190],107:[2,190],108:[2,190],109:[2,190],110:[2,190],111:[2,190],112:[2,190],113:[2,190],114:[2,190],115:[2,190],116:[2,190],117:[2,190],118:[2,190],119:[2,190],120:[2,190],
-121:[2,190],122:[2,190],123:[2,190],124:[2,190],125:[2,190],126:[2,190],127:[2,190],128:[2,190],129:[2,190],130:[2,190],131:[2,190],132:[2,190],135:[2,190],137:[2,190],138:[2,190],141:[2,190],143:[2,190],145:[2,190],147:[2,190],149:[2,190],151:[2,190],153:[2,190],155:[2,190],157:[2,190],159:[2,190],161:[2,190],162:[2,190],169:[2,190],170:[2,190],175:[2,190],176:[2,190],177:[2,190],178:[2,190],179:[2,190],180:[2,190],181:[2,190]},{8:[1,236],136:235,165:[1,238],166:[1,239],173:237},{8:[1,26],48:35,
-49:[1,119],50:[1,47],51:[1,43],54:240,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],
-106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,
-119],50:[1,47],51:[1,43],54:241,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,
-76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],
-50:[1,47],51:[1,43],54:242,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],
-107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,165],8:[2,165],10:[2,165],
-49:[2,165],50:[2,165],51:[2,165],53:[2,165],56:[2,165],57:[2,165],58:[2,165],59:[2,165],60:[2,165],61:[2,165],62:[2,165],63:[2,165],64:[2,165],65:[2,165],66:[2,165],67:[2,165],68:[2,165],69:[2,165],70:[2,165],71:[2,165],72:[2,165],73:[2,165],74:[2,165],75:[2,165],76:[2,165],77:[2,165],78:[2,165],79:[2,165],81:[2,165],82:[2,165],83:[2,165],84:[2,165],85:[2,165],86:[2,165],87:[2,165],88:[2,165],89:[2,165],90:[2,165],91:[2,165],92:[2,165],93:[2,165],94:[2,165],95:[2,165],96:[2,165],97:[2,165],98:[2,
-165],99:[2,165],100:[2,165],101:[2,165],102:[2,165],103:[2,165],104:[2,165],105:[2,165],106:[2,165],107:[2,165],108:[2,165],109:[2,165],110:[2,165],111:[2,165],112:[2,165],113:[2,165],114:[2,165],115:[2,165],116:[2,165],117:[2,165],118:[2,165],119:[2,165],120:[2,165],121:[2,165],122:[2,165],123:[2,165],124:[2,165],125:[2,165],126:[2,165],127:[2,165],128:[2,165],129:[2,165],130:[2,165],131:[2,165],132:[2,165],135:[2,165],137:[2,165],138:[2,165],140:[2,165],141:[2,165],142:[2,165],143:[2,165],144:[2,
-165],145:[2,165],146:[2,165],147:[2,165],148:[2,165],149:[2,165],150:[2,165],151:[2,165],152:[2,165],153:[2,165],154:[2,165],155:[2,165],156:[2,165],157:[2,165],158:[2,165],159:[2,165],160:[2,165],161:[2,165],162:[2,165],165:[1,243],169:[2,165],170:[2,165],185:[2,165],188:[2,165],194:[2,165],196:[2,165],198:[2,165],200:[2,165]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:244,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],
-71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,
-90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:245,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],
-72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],
-121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,48],8:[2,48],10:[2,48],49:[2,48],50:[2,48],51:[2,48],53:[2,48],56:[2,48],57:[2,48],58:[2,48],59:[2,48],60:[2,48],61:[2,48],62:[2,48],63:[2,48],64:[2,48],65:[2,48],66:[2,48],67:[2,
-48],68:[2,48],69:[2,48],70:[2,48],71:[2,48],72:[2,48],73:[2,48],74:[2,48],75:[2,48],76:[2,48],77:[2,48],78:[2,48],79:[2,48],81:[2,48],82:[2,48],83:[2,48],84:[2,48],85:[2,48],86:[2,48],87:[2,48],88:[2,48],89:[2,48],90:[2,48],91:[2,48],92:[2,48],93:[2,48],94:[2,48],95:[2,48],96:[2,48],97:[2,48],98:[2,48],99:[2,48],100:[2,48],101:[2,48],102:[2,48],103:[2,48],104:[2,48],105:[2,48],106:[2,48],107:[2,48],108:[2,48],109:[2,48],110:[2,48],111:[2,48],112:[2,48],113:[2,48],114:[2,48],115:[2,48],116:[2,48],
-117:[2,48],118:[2,48],119:[2,48],120:[2,48],121:[2,48],122:[2,48],123:[2,48],124:[2,48],125:[2,48],126:[2,48],127:[2,48],128:[2,48],129:[2,48],130:[2,48],131:[2,48],132:[2,48],134:[2,48],135:[2,48],137:[2,48],138:[2,48],140:[2,48],141:[2,48],142:[2,48],143:[2,48],144:[2,48],145:[2,48],146:[2,48],147:[2,48],148:[2,48],149:[2,48],150:[2,48],151:[2,48],152:[2,48],153:[2,48],154:[2,48],155:[2,48],156:[2,48],157:[2,48],158:[2,48],159:[2,48],160:[2,48],161:[2,48],162:[2,48],165:[2,48],166:[2,48],167:[2,
-48],169:[2,48],170:[2,48],185:[2,48],188:[2,48],194:[2,48],196:[2,48],198:[2,48],200:[2,48]},{10:[1,246],64:[1,247],65:[1,248],66:[1,249]},{6:[2,50],8:[2,50],10:[2,50],49:[2,50],50:[2,50],51:[2,50],53:[2,50],56:[2,50],57:[2,50],58:[2,50],59:[2,50],60:[2,50],61:[2,50],62:[2,50],63:[2,50],64:[2,50],65:[2,50],66:[2,50],67:[2,50],68:[2,50],69:[2,50],70:[2,50],71:[2,50],72:[2,50],73:[2,50],74:[2,50],75:[2,50],76:[2,50],77:[2,50],78:[2,50],79:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50],86:[2,
-50],87:[2,50],88:[2,50],89:[2,50],90:[2,50],91:[2,50],92:[2,50],93:[2,50],94:[2,50],95:[2,50],96:[2,50],97:[2,50],98:[2,50],99:[2,50],100:[2,50],101:[2,50],102:[2,50],103:[2,50],104:[2,50],105:[2,50],106:[2,50],107:[2,50],108:[2,50],109:[2,50],110:[2,50],111:[2,50],112:[2,50],113:[2,50],114:[2,50],115:[2,50],116:[2,50],117:[2,50],118:[2,50],119:[2,50],120:[2,50],121:[2,50],122:[2,50],123:[2,50],124:[2,50],125:[2,50],126:[2,50],127:[2,50],128:[2,50],129:[2,50],130:[2,50],131:[2,50],132:[2,50],134:[2,
-50],135:[2,50],137:[2,50],138:[2,50],140:[2,50],141:[2,50],142:[2,50],143:[2,50],144:[2,50],145:[2,50],146:[2,50],147:[2,50],148:[2,50],149:[2,50],150:[2,50],151:[2,50],152:[2,50],153:[2,50],154:[2,50],155:[2,50],156:[2,50],157:[2,50],158:[2,50],159:[2,50],160:[2,50],161:[2,50],162:[2,50],165:[2,50],166:[2,50],167:[2,50],169:[2,50],170:[2,50],185:[2,50],188:[2,50],194:[2,50],196:[2,50],198:[2,50],200:[2,50]},{6:[2,51],8:[2,51],10:[2,51],49:[2,51],50:[2,51],51:[2,51],53:[2,51],56:[2,51],57:[2,51],
-58:[2,51],59:[2,51],60:[2,51],61:[2,51],62:[2,51],63:[2,51],64:[2,51],65:[2,51],66:[2,51],67:[2,51],68:[2,51],69:[2,51],70:[2,51],71:[2,51],72:[2,51],73:[2,51],74:[2,51],75:[2,51],76:[2,51],77:[2,51],78:[2,51],79:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51],86:[2,51],87:[2,51],88:[2,51],89:[2,51],90:[2,51],91:[2,51],92:[2,51],93:[2,51],94:[2,51],95:[2,51],96:[2,51],97:[2,51],98:[2,51],99:[2,51],100:[2,51],101:[2,51],102:[2,51],103:[2,51],104:[2,51],105:[2,51],106:[2,51],107:[2,51],108:[2,
-51],109:[2,51],110:[2,51],111:[2,51],112:[2,51],113:[2,51],114:[2,51],115:[2,51],116:[2,51],117:[2,51],118:[2,51],119:[2,51],120:[2,51],121:[2,51],122:[2,51],123:[2,51],124:[2,51],125:[2,51],126:[2,51],127:[2,51],128:[2,51],129:[2,51],130:[2,51],131:[2,51],132:[2,51],134:[2,51],135:[2,51],137:[2,51],138:[2,51],140:[2,51],141:[2,51],142:[2,51],143:[2,51],144:[2,51],145:[2,51],146:[2,51],147:[2,51],148:[2,51],149:[2,51],150:[2,51],151:[2,51],152:[2,51],153:[2,51],154:[2,51],155:[2,51],156:[2,51],157:[2,
-51],158:[2,51],159:[2,51],160:[2,51],161:[2,51],162:[2,51],165:[2,51],166:[2,51],167:[2,51],169:[2,51],170:[2,51],185:[2,51],188:[2,51],194:[2,51],196:[2,51],198:[2,51],200:[2,51]},{6:[2,52],8:[2,52],10:[2,52],49:[2,52],50:[2,52],51:[2,52],53:[2,52],56:[2,52],57:[2,52],58:[2,52],59:[2,52],60:[2,52],61:[2,52],62:[2,52],63:[2,52],64:[2,52],65:[2,52],66:[2,52],67:[2,52],68:[2,52],69:[2,52],70:[2,52],71:[2,52],72:[2,52],73:[2,52],74:[2,52],75:[2,52],76:[2,52],77:[2,52],78:[2,52],79:[2,52],81:[2,52],82:[2,
-52],83:[2,52],84:[2,52],85:[2,52],86:[2,52],87:[2,52],88:[2,52],89:[2,52],90:[2,52],91:[2,52],92:[2,52],93:[2,52],94:[2,52],95:[2,52],96:[2,52],97:[2,52],98:[2,52],99:[2,52],100:[2,52],101:[2,52],102:[2,52],103:[2,52],104:[2,52],105:[2,52],106:[2,52],107:[2,52],108:[2,52],109:[2,52],110:[2,52],111:[2,52],112:[2,52],113:[2,52],114:[2,52],115:[2,52],116:[2,52],117:[2,52],118:[2,52],119:[2,52],120:[2,52],121:[2,52],122:[2,52],123:[2,52],124:[2,52],125:[2,52],126:[2,52],127:[2,52],128:[2,52],129:[2,52],
-130:[2,52],131:[2,52],132:[2,52],134:[2,52],135:[2,52],137:[2,52],138:[2,52],140:[2,52],141:[2,52],142:[2,52],143:[2,52],144:[2,52],145:[2,52],146:[2,52],147:[2,52],148:[2,52],149:[2,52],150:[2,52],151:[2,52],152:[2,52],153:[2,52],154:[2,52],155:[2,52],156:[2,52],157:[2,52],158:[2,52],159:[2,52],160:[2,52],161:[2,52],162:[2,52],165:[2,52],166:[2,52],167:[2,52],169:[2,52],170:[2,52],185:[2,52],188:[2,52],194:[2,52],196:[2,52],198:[2,52],200:[2,52]},{6:[2,53],8:[2,53],10:[2,53],49:[2,53],50:[2,53],
-51:[2,53],53:[2,53],56:[2,53],57:[2,53],58:[2,53],59:[2,53],60:[2,53],61:[2,53],62:[2,53],63:[2,53],64:[2,53],65:[2,53],66:[2,53],67:[2,53],68:[2,53],69:[2,53],70:[2,53],71:[2,53],72:[2,53],73:[2,53],74:[2,53],75:[2,53],76:[2,53],77:[2,53],78:[2,53],79:[2,53],81:[2,53],82:[2,53],83:[2,53],84:[2,53],85:[2,53],86:[2,53],87:[2,53],88:[2,53],89:[2,53],90:[2,53],91:[2,53],92:[2,53],93:[2,53],94:[2,53],95:[2,53],96:[2,53],97:[2,53],98:[2,53],99:[2,53],100:[2,53],101:[2,53],102:[2,53],103:[2,53],104:[2,
-53],105:[2,53],106:[2,53],107:[2,53],108:[2,53],109:[2,53],110:[2,53],111:[2,53],112:[2,53],113:[2,53],114:[2,53],115:[2,53],116:[2,53],117:[2,53],118:[2,53],119:[2,53],120:[2,53],121:[2,53],122:[2,53],123:[2,53],124:[2,53],125:[2,53],126:[2,53],127:[2,53],128:[2,53],129:[2,53],130:[2,53],131:[2,53],132:[2,53],134:[2,53],135:[2,53],137:[2,53],138:[2,53],140:[2,53],141:[2,53],142:[2,53],143:[2,53],144:[2,53],145:[2,53],146:[2,53],147:[2,53],148:[2,53],149:[2,53],150:[2,53],151:[2,53],152:[2,53],153:[2,
-53],154:[2,53],155:[2,53],156:[2,53],157:[2,53],158:[2,53],159:[2,53],160:[2,53],161:[2,53],162:[2,53],165:[2,53],166:[2,53],167:[2,53],169:[2,53],170:[2,53],185:[2,53],188:[2,53],194:[2,53],196:[2,53],198:[2,53],200:[2,53]},{6:[2,54],8:[2,54],10:[2,54],49:[2,54],50:[2,54],51:[2,54],53:[2,54],56:[2,54],57:[2,54],58:[2,54],59:[2,54],60:[2,54],61:[2,54],62:[2,54],63:[2,54],64:[2,54],65:[2,54],66:[2,54],67:[2,54],68:[2,54],69:[2,54],70:[2,54],71:[2,54],72:[2,54],73:[2,54],74:[2,54],75:[2,54],76:[2,54],
-77:[2,54],78:[2,54],79:[2,54],81:[2,54],82:[2,54],83:[2,54],84:[2,54],85:[2,54],86:[2,54],87:[2,54],88:[2,54],89:[2,54],90:[2,54],91:[2,54],92:[2,54],93:[2,54],94:[2,54],95:[2,54],96:[2,54],97:[2,54],98:[2,54],99:[2,54],100:[2,54],101:[2,54],102:[2,54],103:[2,54],104:[2,54],105:[2,54],106:[2,54],107:[2,54],108:[2,54],109:[2,54],110:[2,54],111:[2,54],112:[2,54],113:[2,54],114:[2,54],115:[2,54],116:[2,54],117:[2,54],118:[2,54],119:[2,54],120:[2,54],121:[2,54],122:[2,54],123:[2,54],124:[2,54],125:[2,
-54],126:[2,54],127:[2,54],128:[2,54],129:[2,54],130:[2,54],131:[2,54],132:[2,54],134:[2,54],135:[2,54],137:[2,54],138:[2,54],140:[2,54],141:[2,54],142:[2,54],143:[2,54],144:[2,54],145:[2,54],146:[2,54],147:[2,54],148:[2,54],149:[2,54],150:[2,54],151:[2,54],152:[2,54],153:[2,54],154:[2,54],155:[2,54],156:[2,54],157:[2,54],158:[2,54],159:[2,54],160:[2,54],161:[2,54],162:[2,54],165:[2,54],166:[2,54],167:[2,54],169:[2,54],170:[2,54],185:[2,54],188:[2,54],194:[2,54],196:[2,54],198:[2,54],200:[2,54]},{6:[2,
-55],8:[2,55],10:[2,55],49:[2,55],50:[2,55],51:[2,55],53:[2,55],56:[2,55],57:[2,55],58:[2,55],59:[2,55],60:[2,55],61:[2,55],62:[2,55],63:[2,55],64:[2,55],65:[2,55],66:[2,55],67:[2,55],68:[2,55],69:[2,55],70:[2,55],71:[2,55],72:[2,55],73:[2,55],74:[2,55],75:[2,55],76:[2,55],77:[2,55],78:[2,55],79:[2,55],81:[2,55],82:[2,55],83:[2,55],84:[2,55],85:[2,55],86:[2,55],87:[2,55],88:[2,55],89:[2,55],90:[2,55],91:[2,55],92:[2,55],93:[2,55],94:[2,55],95:[2,55],96:[2,55],97:[2,55],98:[2,55],99:[2,55],100:[2,55],
-101:[2,55],102:[2,55],103:[2,55],104:[2,55],105:[2,55],106:[2,55],107:[2,55],108:[2,55],109:[2,55],110:[2,55],111:[2,55],112:[2,55],113:[2,55],114:[2,55],115:[2,55],116:[2,55],117:[2,55],118:[2,55],119:[2,55],120:[2,55],121:[2,55],122:[2,55],123:[2,55],124:[2,55],125:[2,55],126:[2,55],127:[2,55],128:[2,55],129:[2,55],130:[2,55],131:[2,55],132:[2,55],134:[2,55],135:[2,55],137:[2,55],138:[2,55],140:[2,55],141:[2,55],142:[2,55],143:[2,55],144:[2,55],145:[2,55],146:[2,55],147:[2,55],148:[2,55],149:[2,
-55],150:[2,55],151:[2,55],152:[2,55],153:[2,55],154:[2,55],155:[2,55],156:[2,55],157:[2,55],158:[2,55],159:[2,55],160:[2,55],161:[2,55],162:[2,55],165:[2,55],166:[2,55],167:[2,55],169:[2,55],170:[2,55],185:[2,55],188:[2,55],194:[2,55],196:[2,55],198:[2,55],200:[2,55]},{6:[2,56],8:[2,56],10:[2,56],49:[2,56],50:[2,56],51:[2,56],53:[2,56],56:[2,56],57:[2,56],58:[2,56],59:[2,56],60:[2,56],61:[2,56],62:[2,56],63:[2,56],64:[2,56],65:[2,56],66:[2,56],67:[2,56],68:[2,56],69:[2,56],70:[2,56],71:[2,56],72:[2,
-56],73:[2,56],74:[2,56],75:[2,56],76:[2,56],77:[2,56],78:[2,56],79:[2,56],81:[2,56],82:[2,56],83:[2,56],84:[2,56],85:[2,56],86:[2,56],87:[2,56],88:[2,56],89:[2,56],90:[2,56],91:[2,56],92:[2,56],93:[2,56],94:[2,56],95:[2,56],96:[2,56],97:[2,56],98:[2,56],99:[2,56],100:[2,56],101:[2,56],102:[2,56],103:[2,56],104:[2,56],105:[2,56],106:[2,56],107:[2,56],108:[2,56],109:[2,56],110:[2,56],111:[2,56],112:[2,56],113:[2,56],114:[2,56],115:[2,56],116:[2,56],117:[2,56],118:[2,56],119:[2,56],120:[2,56],121:[2,
-56],122:[2,56],123:[2,56],124:[2,56],125:[2,56],126:[2,56],127:[2,56],128:[2,56],129:[2,56],130:[2,56],131:[2,56],132:[2,56],134:[2,56],135:[2,56],137:[2,56],138:[2,56],140:[2,56],141:[2,56],142:[2,56],143:[2,56],144:[2,56],145:[2,56],146:[2,56],147:[2,56],148:[2,56],149:[2,56],150:[2,56],151:[2,56],152:[2,56],153:[2,56],154:[2,56],155:[2,56],156:[2,56],157:[2,56],158:[2,56],159:[2,56],160:[2,56],161:[2,56],162:[2,56],165:[2,56],166:[2,56],167:[2,56],169:[2,56],170:[2,56],185:[2,56],188:[2,56],194:[2,
-56],196:[2,56],198:[2,56],200:[2,56]},{6:[2,57],8:[2,57],10:[2,57],49:[2,57],50:[2,57],51:[2,57],53:[2,57],56:[2,57],57:[2,57],58:[2,57],59:[2,57],60:[2,57],61:[2,57],62:[2,57],63:[2,57],64:[2,57],65:[2,57],66:[2,57],67:[2,57],68:[2,57],69:[2,57],70:[2,57],71:[2,57],72:[2,57],73:[2,57],74:[2,57],75:[2,57],76:[2,57],77:[2,57],78:[2,57],79:[2,57],81:[2,57],82:[2,57],83:[2,57],84:[2,57],85:[2,57],86:[2,57],87:[2,57],88:[2,57],89:[2,57],90:[2,57],91:[2,57],92:[2,57],93:[2,57],94:[2,57],95:[2,57],96:[2,
-57],97:[2,57],98:[2,57],99:[2,57],100:[2,57],101:[2,57],102:[2,57],103:[2,57],104:[2,57],105:[2,57],106:[2,57],107:[2,57],108:[2,57],109:[2,57],110:[2,57],111:[2,57],112:[2,57],113:[2,57],114:[2,57],115:[2,57],116:[2,57],117:[2,57],118:[2,57],119:[2,57],120:[2,57],121:[2,57],122:[2,57],123:[2,57],124:[2,57],125:[2,57],126:[2,57],127:[2,57],128:[2,57],129:[2,57],130:[2,57],131:[2,57],132:[2,57],134:[2,57],135:[2,57],137:[2,57],138:[2,57],140:[2,57],141:[2,57],142:[2,57],143:[2,57],144:[2,57],145:[2,
-57],146:[2,57],147:[2,57],148:[2,57],149:[2,57],150:[2,57],151:[2,57],152:[2,57],153:[2,57],154:[2,57],155:[2,57],156:[2,57],157:[2,57],158:[2,57],159:[2,57],160:[2,57],161:[2,57],162:[2,57],165:[2,57],166:[2,57],167:[2,57],169:[2,57],170:[2,57],185:[2,57],188:[2,57],194:[2,57],196:[2,57],198:[2,57],200:[2,57]},{52:250,53:[1,254],64:[1,251],65:[1,252],66:[1,253]},{6:[2,69],8:[2,69],10:[2,69],49:[2,69],50:[2,69],51:[2,69],53:[2,69],56:[2,69],57:[2,69],58:[2,69],59:[2,69],60:[2,69],61:[2,69],62:[2,
-69],63:[2,69],64:[2,69],65:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],70:[2,69],71:[2,69],72:[2,69],73:[2,69],74:[2,69],75:[2,69],76:[2,69],77:[2,69],78:[2,69],79:[2,69],81:[2,69],82:[2,69],83:[2,69],84:[2,69],85:[2,69],86:[2,69],87:[2,69],88:[2,69],89:[2,69],90:[2,69],91:[2,69],92:[2,69],93:[2,69],94:[2,69],95:[2,69],96:[2,69],97:[2,69],98:[2,69],99:[2,69],100:[2,69],101:[2,69],102:[2,69],103:[2,69],104:[2,69],105:[2,69],106:[2,69],107:[2,69],108:[2,69],109:[2,69],110:[2,69],111:[2,69],112:[2,
-69],113:[2,69],114:[2,69],115:[2,69],116:[2,69],117:[2,69],118:[2,69],119:[2,69],120:[2,69],121:[2,69],122:[2,69],123:[2,69],124:[2,69],125:[2,69],126:[2,69],127:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],134:[2,69],135:[2,69],137:[2,69],138:[2,69],140:[2,69],141:[2,69],142:[2,69],143:[2,69],144:[2,69],145:[2,69],146:[2,69],147:[2,69],148:[2,69],149:[2,69],150:[2,69],151:[2,69],152:[2,69],153:[2,69],154:[2,69],155:[2,69],156:[2,69],157:[2,69],158:[2,69],159:[2,69],160:[2,69],161:[2,
-69],162:[2,69],165:[2,69],166:[2,69],167:[2,69],169:[2,69],170:[2,69],185:[2,69],188:[2,69],194:[2,69],196:[2,69],198:[2,69],200:[2,69]},{6:[2,7],8:[2,7],10:[2,7],49:[2,7],50:[2,7],51:[2,7],53:[2,7],56:[2,7],57:[2,7],58:[2,7],59:[2,7],60:[2,7],61:[2,7],62:[2,7],63:[2,7],64:[2,7],65:[2,7],66:[2,7],67:[2,7],68:[2,7],69:[2,7],70:[2,7],71:[2,7],72:[2,7],73:[2,7],74:[2,7],75:[2,7],76:[2,7],77:[2,7],78:[2,7],79:[2,7],81:[2,7],82:[2,7],83:[2,7],84:[2,7],85:[2,7],86:[2,7],87:[2,7],88:[2,7],89:[2,7],90:[2,
-7],91:[2,7],92:[2,7],93:[2,7],94:[2,7],95:[2,7],96:[2,7],97:[2,7],98:[2,7],99:[2,7],100:[2,7],101:[2,7],102:[2,7],103:[2,7],104:[2,7],105:[2,7],106:[2,7],107:[2,7],108:[2,7],109:[2,7],110:[2,7],111:[2,7],112:[2,7],113:[2,7],114:[2,7],115:[2,7],116:[2,7],117:[2,7],118:[2,7],119:[2,7],120:[2,7],121:[2,7],122:[2,7],123:[2,7],124:[2,7],125:[2,7],126:[2,7],127:[2,7],128:[2,7],129:[2,7],130:[2,7],131:[2,7],132:[2,7],134:[2,7],135:[2,7],137:[2,7],138:[2,7],140:[2,7],141:[2,7],142:[2,7],143:[2,7],144:[2,
-7],145:[2,7],146:[2,7],147:[2,7],148:[2,7],149:[2,7],150:[2,7],151:[2,7],152:[2,7],153:[2,7],154:[2,7],155:[2,7],156:[2,7],157:[2,7],158:[2,7],159:[2,7],160:[2,7],161:[2,7],162:[2,7],165:[2,7],166:[2,7],167:[2,7],169:[2,7],170:[2,7],185:[2,7],188:[2,7],194:[2,7],196:[2,7],198:[2,7],200:[2,7]},{6:[2,70],8:[2,70],10:[2,70],49:[2,70],50:[2,70],51:[2,70],53:[2,70],56:[2,70],57:[2,70],58:[2,70],59:[2,70],60:[2,70],61:[2,70],62:[2,70],63:[2,70],64:[2,70],65:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],
-70:[2,70],71:[2,70],72:[2,70],73:[2,70],74:[2,70],75:[2,70],76:[2,70],77:[2,70],78:[2,70],79:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70],86:[2,70],87:[2,70],88:[2,70],89:[2,70],90:[2,70],91:[2,70],92:[2,70],93:[2,70],94:[2,70],95:[2,70],96:[2,70],97:[2,70],98:[2,70],99:[2,70],100:[2,70],101:[2,70],102:[2,70],103:[2,70],104:[2,70],105:[2,70],106:[2,70],107:[2,70],108:[2,70],109:[2,70],110:[2,70],111:[2,70],112:[2,70],113:[2,70],114:[2,70],115:[2,70],116:[2,70],117:[2,70],118:[2,70],119:[2,
-70],120:[2,70],121:[2,70],122:[2,70],123:[2,70],124:[2,70],125:[2,70],126:[2,70],127:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],134:[2,70],135:[2,70],137:[2,70],138:[2,70],140:[2,70],141:[2,70],142:[2,70],143:[2,70],144:[2,70],145:[2,70],146:[2,70],147:[2,70],148:[2,70],149:[2,70],150:[2,70],151:[2,70],152:[2,70],153:[2,70],154:[2,70],155:[2,70],156:[2,70],157:[2,70],158:[2,70],159:[2,70],160:[2,70],161:[2,70],162:[2,70],165:[2,70],166:[2,70],167:[2,70],169:[2,70],170:[2,70],185:[2,
-70],188:[2,70],194:[2,70],196:[2,70],198:[2,70],200:[2,70]},{6:[2,71],8:[2,71],10:[2,71],49:[2,71],50:[2,71],51:[2,71],53:[2,71],56:[2,71],57:[2,71],58:[2,71],59:[2,71],60:[2,71],61:[2,71],62:[2,71],63:[2,71],64:[2,71],65:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],70:[2,71],71:[2,71],72:[2,71],73:[2,71],74:[2,71],75:[2,71],76:[2,71],77:[2,71],78:[2,71],79:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71],86:[2,71],87:[2,71],88:[2,71],89:[2,71],90:[2,71],91:[2,71],92:[2,71],93:[2,71],94:[2,
-71],95:[2,71],96:[2,71],97:[2,71],98:[2,71],99:[2,71],100:[2,71],101:[2,71],102:[2,71],103:[2,71],104:[2,71],105:[2,71],106:[2,71],107:[2,71],108:[2,71],109:[2,71],110:[2,71],111:[2,71],112:[2,71],113:[2,71],114:[2,71],115:[2,71],116:[2,71],117:[2,71],118:[2,71],119:[2,71],120:[2,71],121:[2,71],122:[2,71],123:[2,71],124:[2,71],125:[2,71],126:[2,71],127:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],134:[2,71],135:[2,71],137:[2,71],138:[2,71],140:[2,71],141:[2,71],142:[2,71],143:[2,
-71],144:[2,71],145:[2,71],146:[2,71],147:[2,71],148:[2,71],149:[2,71],150:[2,71],151:[2,71],152:[2,71],153:[2,71],154:[2,71],155:[2,71],156:[2,71],157:[2,71],158:[2,71],159:[2,71],160:[2,71],161:[2,71],162:[2,71],165:[2,71],166:[2,71],167:[2,71],169:[2,71],170:[2,71],185:[2,71],188:[2,71],194:[2,71],196:[2,71],198:[2,71],200:[2,71]},{6:[2,77],8:[2,77],10:[2,77],49:[2,77],50:[2,77],51:[2,77],53:[2,77],56:[2,77],57:[2,77],58:[2,77],59:[2,77],60:[2,77],61:[2,77],62:[2,77],63:[2,77],64:[2,77],65:[2,77],
-66:[2,77],67:[2,77],68:[2,77],69:[2,77],70:[2,77],71:[2,77],72:[2,77],73:[2,77],74:[2,77],75:[2,77],76:[2,77],77:[2,77],78:[2,77],79:[2,77],81:[2,77],82:[2,77],83:[2,77],84:[2,77],85:[2,77],86:[2,77],87:[2,77],88:[2,77],89:[2,77],90:[2,77],91:[2,77],92:[2,77],93:[2,77],94:[2,77],95:[2,77],96:[2,77],97:[2,77],98:[2,77],99:[2,77],100:[2,77],101:[2,77],102:[2,77],103:[2,77],104:[2,77],105:[2,77],106:[2,77],107:[2,77],108:[2,77],109:[2,77],110:[2,77],111:[2,77],112:[2,77],113:[2,77],114:[2,77],115:[2,
-77],116:[2,77],117:[2,77],118:[2,77],119:[2,77],120:[2,77],121:[2,77],122:[2,77],123:[2,77],124:[2,77],125:[2,77],126:[2,77],127:[2,77],128:[2,77],129:[2,77],130:[2,77],131:[2,77],132:[2,77],134:[2,77],135:[2,77],137:[2,77],138:[2,77],140:[2,77],141:[2,77],142:[2,77],143:[2,77],144:[2,77],145:[2,77],146:[2,77],147:[2,77],148:[2,77],149:[2,77],150:[2,77],151:[2,77],152:[2,77],153:[2,77],154:[2,77],155:[2,77],156:[2,77],157:[2,77],158:[2,77],159:[2,77],160:[2,77],161:[2,77],162:[2,77],165:[2,77],166:[2,
-77],167:[2,77],169:[2,77],170:[2,77],185:[2,77],188:[2,77],194:[2,77],196:[2,77],198:[2,77],200:[2,77]},{3:155,4:[1,156],13:255},{4:[2,5],8:[2,5]},{5:[1,256]},{6:[2,79],8:[2,79],10:[2,79],49:[2,79],50:[2,79],51:[2,79],53:[2,79],56:[2,79],57:[2,79],58:[2,79],59:[2,79],60:[2,79],61:[2,79],62:[2,79],63:[2,79],64:[2,79],65:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],70:[2,79],71:[2,79],72:[2,79],73:[2,79],74:[2,79],75:[2,79],76:[2,79],77:[2,79],78:[2,79],79:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,
-79],85:[2,79],86:[2,79],87:[2,79],88:[2,79],89:[2,79],90:[2,79],91:[2,79],92:[2,79],93:[2,79],94:[2,79],95:[2,79],96:[2,79],97:[2,79],98:[2,79],99:[2,79],100:[2,79],101:[2,79],102:[2,79],103:[2,79],104:[2,79],105:[2,79],106:[2,79],107:[2,79],108:[2,79],109:[2,79],110:[2,79],111:[2,79],112:[2,79],113:[2,79],114:[2,79],115:[2,79],116:[2,79],117:[2,79],118:[2,79],119:[2,79],120:[2,79],121:[2,79],122:[2,79],123:[2,79],124:[2,79],125:[2,79],126:[2,79],127:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,
-79],132:[2,79],134:[2,79],135:[2,79],137:[2,79],138:[2,79],140:[2,79],141:[2,79],142:[2,79],143:[2,79],144:[2,79],145:[2,79],146:[2,79],147:[2,79],148:[2,79],149:[2,79],150:[2,79],151:[2,79],152:[2,79],153:[2,79],154:[2,79],155:[2,79],156:[2,79],157:[2,79],158:[2,79],159:[2,79],160:[2,79],161:[2,79],162:[2,79],165:[2,79],166:[2,79],167:[2,79],169:[2,79],170:[2,79],185:[2,79],188:[2,79],194:[2,79],196:[2,79],198:[2,79],200:[2,79]},{6:[2,80],8:[2,80],10:[2,80],49:[2,80],50:[2,80],51:[2,80],53:[2,80],
-56:[2,80],57:[2,80],58:[2,80],59:[2,80],60:[2,80],61:[2,80],62:[2,80],63:[2,80],64:[2,80],65:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],70:[2,80],71:[2,80],72:[2,80],73:[2,80],74:[2,80],75:[2,80],76:[2,80],77:[2,80],78:[2,80],79:[2,80],81:[2,80],82:[2,80],83:[2,80],84:[2,80],85:[2,80],86:[2,80],87:[2,80],88:[2,80],89:[2,80],90:[2,80],91:[2,80],92:[2,80],93:[2,80],94:[2,80],95:[2,80],96:[2,80],97:[2,80],98:[2,80],99:[2,80],100:[2,80],101:[2,80],102:[2,80],103:[2,80],104:[2,80],105:[2,80],106:[2,
-80],107:[2,80],108:[2,80],109:[2,80],110:[2,80],111:[2,80],112:[2,80],113:[2,80],114:[2,80],115:[2,80],116:[2,80],117:[2,80],118:[2,80],119:[2,80],120:[2,80],121:[2,80],122:[2,80],123:[2,80],124:[2,80],125:[2,80],126:[2,80],127:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],134:[2,80],135:[2,80],137:[2,80],138:[2,80],140:[2,80],141:[2,80],142:[2,80],143:[2,80],144:[2,80],145:[2,80],146:[2,80],147:[2,80],148:[2,80],149:[2,80],150:[2,80],151:[2,80],152:[2,80],153:[2,80],154:[2,80],155:[2,
-80],156:[2,80],157:[2,80],158:[2,80],159:[2,80],160:[2,80],161:[2,80],162:[2,80],165:[2,80],166:[2,80],167:[2,80],169:[2,80],170:[2,80],185:[2,80],188:[2,80],194:[2,80],196:[2,80],198:[2,80],200:[2,80]},{6:[2,82],8:[2,82],10:[2,82],49:[2,82],50:[2,82],51:[2,82],53:[2,82],56:[2,82],57:[2,82],58:[2,82],59:[2,82],60:[2,82],61:[2,82],62:[2,82],63:[2,82],64:[2,82],65:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],70:[2,82],71:[2,82],72:[2,82],73:[2,82],74:[2,82],75:[2,82],76:[2,82],77:[2,82],78:[2,82],
-79:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82],86:[2,82],87:[2,82],88:[2,82],89:[2,82],90:[2,82],91:[2,82],92:[2,82],93:[2,82],94:[2,82],95:[2,82],96:[2,82],97:[2,82],98:[2,82],99:[2,82],100:[2,82],101:[2,82],102:[2,82],103:[2,82],104:[2,82],105:[2,82],106:[2,82],107:[2,82],108:[2,82],109:[2,82],110:[2,82],111:[2,82],112:[2,82],113:[2,82],114:[2,82],115:[2,82],116:[2,82],117:[2,82],118:[2,82],119:[2,82],120:[2,82],121:[2,82],122:[2,82],123:[2,82],124:[2,82],125:[2,82],126:[2,82],127:[2,
-82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],134:[2,82],135:[2,82],137:[2,82],138:[2,82],140:[2,82],141:[2,82],142:[2,82],143:[2,82],144:[2,82],145:[2,82],146:[2,82],147:[2,82],148:[2,82],149:[2,82],150:[2,82],151:[2,82],152:[2,82],153:[2,82],154:[2,82],155:[2,82],156:[2,82],157:[2,82],158:[2,82],159:[2,82],160:[2,82],161:[2,82],162:[2,82],165:[2,82],166:[2,82],167:[2,82],169:[2,82],170:[2,82],185:[2,82],188:[2,82],194:[2,82],196:[2,82],198:[2,82],200:[2,82]},{6:[2,83],8:[2,83],10:[2,
-83],49:[2,83],50:[2,83],51:[2,83],53:[2,83],56:[2,83],57:[2,83],58:[2,83],59:[2,83],60:[2,83],61:[2,83],62:[2,83],63:[2,83],64:[2,83],65:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],70:[2,83],71:[2,83],72:[2,83],73:[2,83],74:[2,83],75:[2,83],76:[2,83],77:[2,83],78:[2,83],79:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83],86:[2,83],87:[2,83],88:[2,83],89:[2,83],90:[2,83],91:[2,83],92:[2,83],93:[2,83],94:[2,83],95:[2,83],96:[2,83],97:[2,83],98:[2,83],99:[2,83],100:[2,83],101:[2,83],102:[2,
-83],103:[2,83],104:[2,83],105:[2,83],106:[2,83],107:[2,83],108:[2,83],109:[2,83],110:[2,83],111:[2,83],112:[2,83],113:[2,83],114:[2,83],115:[2,83],116:[2,83],117:[2,83],118:[2,83],119:[2,83],120:[2,83],121:[2,83],122:[2,83],123:[2,83],124:[2,83],125:[2,83],126:[2,83],127:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],134:[2,83],135:[2,83],137:[2,83],138:[2,83],140:[2,83],141:[2,83],142:[2,83],143:[2,83],144:[2,83],145:[2,83],146:[2,83],147:[2,83],148:[2,83],149:[2,83],150:[2,83],151:[2,
-83],152:[2,83],153:[2,83],154:[2,83],155:[2,83],156:[2,83],157:[2,83],158:[2,83],159:[2,83],160:[2,83],161:[2,83],162:[2,83],165:[2,83],166:[2,83],167:[2,83],169:[2,83],170:[2,83],185:[2,83],188:[2,83],194:[2,83],196:[2,83],198:[2,83],200:[2,83]},{6:[2,84],8:[2,84],10:[2,84],49:[2,84],50:[2,84],51:[2,84],53:[2,84],56:[2,84],57:[2,84],58:[2,84],59:[2,84],60:[2,84],61:[2,84],62:[2,84],63:[2,84],64:[2,84],65:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],70:[2,84],71:[2,84],72:[2,84],73:[2,84],74:[2,
-84],75:[2,84],76:[2,84],77:[2,84],78:[2,84],79:[2,84],81:[2,84],82:[2,84],83:[2,84],84:[2,84],85:[2,84],86:[2,84],87:[2,84],88:[2,84],89:[2,84],90:[2,84],91:[2,84],92:[2,84],93:[2,84],94:[2,84],95:[2,84],96:[2,84],97:[2,84],98:[2,84],99:[2,84],100:[2,84],101:[2,84],102:[2,84],103:[2,84],104:[2,84],105:[2,84],106:[2,84],107:[2,84],108:[2,84],109:[2,84],110:[2,84],111:[2,84],112:[2,84],113:[2,84],114:[2,84],115:[2,84],116:[2,84],117:[2,84],118:[2,84],119:[2,84],120:[2,84],121:[2,84],122:[2,84],123:[2,
-84],124:[2,84],125:[2,84],126:[2,84],127:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],134:[2,84],135:[2,84],137:[2,84],138:[2,84],140:[2,84],141:[2,84],142:[2,84],143:[2,84],144:[2,84],145:[2,84],146:[2,84],147:[2,84],148:[2,84],149:[2,84],150:[2,84],151:[2,84],152:[2,84],153:[2,84],154:[2,84],155:[2,84],156:[2,84],157:[2,84],158:[2,84],159:[2,84],160:[2,84],161:[2,84],162:[2,84],165:[2,84],166:[2,84],167:[2,84],169:[2,84],170:[2,84],185:[2,84],188:[2,84],194:[2,84],196:[2,84],198:[2,
-84],200:[2,84]},{6:[2,85],8:[2,85],10:[2,85],49:[2,85],50:[2,85],51:[2,85],53:[2,85],56:[2,85],57:[2,85],58:[2,85],59:[2,85],60:[2,85],61:[2,85],62:[2,85],63:[2,85],64:[2,85],65:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],70:[2,85],71:[2,85],72:[2,85],73:[2,85],74:[2,85],75:[2,85],76:[2,85],77:[2,85],78:[2,85],79:[2,85],81:[2,85],82:[2,85],83:[2,85],84:[2,85],85:[2,85],86:[2,85],87:[2,85],88:[2,85],89:[2,85],90:[2,85],91:[2,85],92:[2,85],93:[2,85],94:[2,85],95:[2,85],96:[2,85],97:[2,85],98:[2,
-85],99:[2,85],100:[2,85],101:[2,85],102:[2,85],103:[2,85],104:[2,85],105:[2,85],106:[2,85],107:[2,85],108:[2,85],109:[2,85],110:[2,85],111:[2,85],112:[2,85],113:[2,85],114:[2,85],115:[2,85],116:[2,85],117:[2,85],118:[2,85],119:[2,85],120:[2,85],121:[2,85],122:[2,85],123:[2,85],124:[2,85],125:[2,85],126:[2,85],127:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],134:[2,85],135:[2,85],137:[2,85],138:[2,85],140:[2,85],141:[2,85],142:[2,85],143:[2,85],144:[2,85],145:[2,85],146:[2,85],147:[2,
-85],148:[2,85],149:[2,85],150:[2,85],151:[2,85],152:[2,85],153:[2,85],154:[2,85],155:[2,85],156:[2,85],157:[2,85],158:[2,85],159:[2,85],160:[2,85],161:[2,85],162:[2,85],165:[2,85],166:[2,85],167:[2,85],169:[2,85],170:[2,85],185:[2,85],188:[2,85],194:[2,85],196:[2,85],198:[2,85],200:[2,85]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:257,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,
-44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,
-93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:258,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],
-75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],
-124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,88],8:[2,88],10:[2,88],49:[2,88],50:[2,88],51:[2,88],53:[2,88],56:[2,88],57:[2,88],58:[2,88],59:[2,88],60:[2,88],61:[2,88],62:[2,88],63:[2,88],64:[2,88],65:[2,88],66:[2,88],67:[2,88],68:[2,88],69:[2,88],70:[2,88],
-71:[2,88],72:[2,88],73:[2,88],74:[2,88],75:[2,88],76:[2,88],77:[2,88],78:[2,88],79:[2,88],81:[2,88],82:[2,88],83:[2,88],84:[2,88],85:[2,88],86:[2,88],87:[2,88],88:[2,88],89:[2,88],90:[2,88],91:[2,88],92:[2,88],93:[2,88],94:[2,88],95:[2,88],96:[2,88],97:[2,88],98:[2,88],99:[2,88],100:[2,88],101:[2,88],102:[2,88],103:[2,88],104:[2,88],105:[2,88],106:[2,88],107:[2,88],108:[2,88],109:[2,88],110:[2,88],111:[2,88],112:[2,88],113:[2,88],114:[2,88],115:[2,88],116:[2,88],117:[2,88],118:[2,88],119:[2,88],120:[2,
-88],121:[2,88],122:[2,88],123:[2,88],124:[2,88],125:[2,88],126:[2,88],127:[2,88],128:[2,88],129:[2,88],130:[2,88],131:[2,88],132:[2,88],134:[2,88],135:[2,88],137:[2,88],138:[2,88],140:[2,88],141:[2,88],142:[2,88],143:[2,88],144:[2,88],145:[2,88],146:[2,88],147:[2,88],148:[2,88],149:[2,88],150:[2,88],151:[2,88],152:[2,88],153:[2,88],154:[2,88],155:[2,88],156:[2,88],157:[2,88],158:[2,88],159:[2,88],160:[2,88],161:[2,88],162:[2,88],165:[2,88],166:[2,88],167:[2,88],169:[2,88],170:[2,88],185:[2,88],188:[2,
-88],194:[2,88],196:[2,88],198:[2,88],200:[2,88]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:259,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,
-69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],
-157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:260,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],
-87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,
-132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:261,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,
-57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],
-137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:262,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],
-88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,
-103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:263,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],
-88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,
-103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{6:[2,94],8:[2,94],10:[2,94],49:[2,94],50:[2,94],51:[2,94],53:[2,94],56:[2,94],57:[2,94],58:[2,94],59:[2,94],60:[2,94],61:[2,94],62:[2,94],63:[2,94],64:[2,94],65:[2,94],66:[2,94],67:[2,94],68:[2,94],69:[2,94],70:[2,
-94],71:[2,94],72:[2,94],73:[2,94],74:[2,94],75:[2,94],76:[2,94],77:[2,94],78:[2,94],79:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94],86:[2,94],87:[2,94],88:[2,94],89:[2,94],90:[2,94],91:[2,94],92:[2,94],93:[2,94],94:[2,94],95:[2,94],96:[2,94],97:[2,94],98:[2,94],99:[2,94],100:[2,94],101:[2,94],102:[2,94],103:[2,94],104:[2,94],105:[2,94],106:[2,94],107:[2,94],108:[2,94],109:[2,94],110:[2,94],111:[2,94],112:[2,94],113:[2,94],114:[2,94],115:[2,94],116:[2,94],117:[2,94],118:[2,94],119:[2,94],
-120:[2,94],121:[2,94],122:[2,94],123:[2,94],124:[2,94],125:[2,94],126:[2,94],127:[2,94],128:[2,94],129:[2,94],130:[2,94],131:[2,94],132:[2,94],134:[2,94],135:[2,94],137:[2,94],138:[2,94],140:[2,94],141:[2,94],142:[2,94],143:[2,94],144:[2,94],145:[2,94],146:[2,94],147:[2,94],148:[2,94],149:[2,94],150:[2,94],151:[2,94],152:[2,94],153:[2,94],154:[2,94],155:[2,94],156:[2,94],157:[2,94],158:[2,94],159:[2,94],160:[2,94],161:[2,94],162:[2,94],165:[2,94],166:[2,94],167:[2,94],169:[2,94],170:[2,94],185:[2,
-94],188:[2,94],194:[2,94],196:[2,94],198:[2,94],200:[2,94]},{6:[2,95],8:[2,95],10:[2,95],49:[2,95],50:[2,95],51:[2,95],53:[2,95],56:[2,95],57:[2,95],58:[2,95],59:[2,95],60:[2,95],61:[2,95],62:[2,95],63:[2,95],64:[2,95],65:[2,95],66:[2,95],67:[2,95],68:[2,95],69:[2,95],70:[2,95],71:[2,95],72:[2,95],73:[2,95],74:[2,95],75:[2,95],76:[2,95],77:[2,95],78:[2,95],79:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95],86:[2,95],87:[2,95],88:[2,95],89:[2,95],90:[2,95],91:[2,95],92:[2,95],93:[2,95],94:[2,
-95],95:[2,95],96:[2,95],97:[2,95],98:[2,95],99:[2,95],100:[2,95],101:[2,95],102:[2,95],103:[2,95],104:[2,95],105:[2,95],106:[2,95],107:[2,95],108:[2,95],109:[2,95],110:[2,95],111:[2,95],112:[2,95],113:[2,95],114:[2,95],115:[2,95],116:[2,95],117:[2,95],118:[2,95],119:[2,95],120:[2,95],121:[2,95],122:[2,95],123:[2,95],124:[2,95],125:[2,95],126:[2,95],127:[2,95],128:[2,95],129:[2,95],130:[2,95],131:[2,95],132:[2,95],134:[2,95],135:[2,95],137:[2,95],138:[2,95],140:[2,95],141:[2,95],142:[2,95],143:[2,
-95],144:[2,95],145:[2,95],146:[2,95],147:[2,95],148:[2,95],149:[2,95],150:[2,95],151:[2,95],152:[2,95],153:[2,95],154:[2,95],155:[2,95],156:[2,95],157:[2,95],158:[2,95],159:[2,95],160:[2,95],161:[2,95],162:[2,95],165:[2,95],166:[2,95],167:[2,95],169:[2,95],170:[2,95],185:[2,95],188:[2,95],194:[2,95],196:[2,95],198:[2,95],200:[2,95]},{6:[2,96],8:[2,96],10:[2,96],49:[2,96],50:[2,96],51:[2,96],53:[2,96],56:[2,96],57:[2,96],58:[2,96],59:[2,96],60:[2,96],61:[2,96],62:[2,96],63:[2,96],64:[2,96],65:[2,96],
-66:[2,96],67:[2,96],68:[2,96],69:[2,96],70:[2,96],71:[2,96],72:[2,96],73:[2,96],74:[2,96],75:[2,96],76:[2,96],77:[2,96],78:[2,96],79:[2,96],81:[2,96],82:[2,96],83:[2,96],84:[2,96],85:[2,96],86:[2,96],87:[2,96],88:[2,96],89:[2,96],90:[2,96],91:[2,96],92:[2,96],93:[2,96],94:[2,96],95:[2,96],96:[2,96],97:[2,96],98:[2,96],99:[2,96],100:[2,96],101:[2,96],102:[2,96],103:[2,96],104:[2,96],105:[2,96],106:[2,96],107:[2,96],108:[2,96],109:[2,96],110:[2,96],111:[2,96],112:[2,96],113:[2,96],114:[2,96],115:[2,
-96],116:[2,96],117:[2,96],118:[2,96],119:[2,96],120:[2,96],121:[2,96],122:[2,96],123:[2,96],124:[2,96],125:[2,96],126:[2,96],127:[2,96],128:[2,96],129:[2,96],130:[2,96],131:[2,96],132:[2,96],134:[2,96],135:[2,96],137:[2,96],138:[2,96],140:[2,96],141:[2,96],142:[2,96],143:[2,96],144:[2,96],145:[2,96],146:[2,96],147:[2,96],148:[2,96],149:[2,96],150:[2,96],151:[2,96],152:[2,96],153:[2,96],154:[2,96],155:[2,96],156:[2,96],157:[2,96],158:[2,96],159:[2,96],160:[2,96],161:[2,96],162:[2,96],165:[2,96],166:[2,
-96],167:[2,96],169:[2,96],170:[2,96],185:[2,96],188:[2,96],194:[2,96],196:[2,96],198:[2,96],200:[2,96]},{6:[2,97],8:[2,97],10:[2,97],49:[2,97],50:[2,97],51:[2,97],53:[2,97],56:[2,97],57:[2,97],58:[2,97],59:[2,97],60:[2,97],61:[2,97],62:[2,97],63:[2,97],64:[2,97],65:[2,97],66:[2,97],67:[2,97],68:[2,97],69:[2,97],70:[2,97],71:[2,97],72:[2,97],73:[2,97],74:[2,97],75:[2,97],76:[2,97],77:[2,97],78:[2,97],79:[2,97],81:[2,97],82:[2,97],83:[2,97],84:[2,97],85:[2,97],86:[2,97],87:[2,97],88:[2,97],89:[2,97],
-90:[2,97],91:[2,97],92:[2,97],93:[2,97],94:[2,97],95:[2,97],96:[2,97],97:[2,97],98:[2,97],99:[2,97],100:[2,97],101:[2,97],102:[2,97],103:[2,97],104:[2,97],105:[2,97],106:[2,97],107:[2,97],108:[2,97],109:[2,97],110:[2,97],111:[2,97],112:[2,97],113:[2,97],114:[2,97],115:[2,97],116:[2,97],117:[2,97],118:[2,97],119:[2,97],120:[2,97],121:[2,97],122:[2,97],123:[2,97],124:[2,97],125:[2,97],126:[2,97],127:[2,97],128:[2,97],129:[2,97],130:[2,97],131:[2,97],132:[2,97],134:[2,97],135:[2,97],137:[2,97],138:[2,
-97],140:[2,97],141:[2,97],142:[2,97],143:[2,97],144:[2,97],145:[2,97],146:[2,97],147:[2,97],148:[2,97],149:[2,97],150:[2,97],151:[2,97],152:[2,97],153:[2,97],154:[2,97],155:[2,97],156:[2,97],157:[2,97],158:[2,97],159:[2,97],160:[2,97],161:[2,97],162:[2,97],165:[2,97],166:[2,97],167:[2,97],169:[2,97],170:[2,97],185:[2,97],188:[2,97],194:[2,97],196:[2,97],198:[2,97],200:[2,97]},{6:[2,98],8:[2,98],10:[2,98],49:[2,98],50:[2,98],51:[2,98],53:[2,98],56:[2,98],57:[2,98],58:[2,98],59:[2,98],60:[2,98],61:[2,
-98],62:[2,98],63:[2,98],64:[2,98],65:[2,98],66:[2,98],67:[2,98],68:[2,98],69:[2,98],70:[2,98],71:[2,98],72:[2,98],73:[2,98],74:[2,98],75:[2,98],76:[2,98],77:[2,98],78:[2,98],79:[2,98],81:[2,98],82:[2,98],83:[2,98],84:[2,98],85:[2,98],86:[2,98],87:[2,98],88:[2,98],89:[2,98],90:[2,98],91:[2,98],92:[2,98],93:[2,98],94:[2,98],95:[2,98],96:[2,98],97:[2,98],98:[2,98],99:[2,98],100:[2,98],101:[2,98],102:[2,98],103:[2,98],104:[2,98],105:[2,98],106:[2,98],107:[2,98],108:[2,98],109:[2,98],110:[2,98],111:[2,
-98],112:[2,98],113:[2,98],114:[2,98],115:[2,98],116:[2,98],117:[2,98],118:[2,98],119:[2,98],120:[2,98],121:[2,98],122:[2,98],123:[2,98],124:[2,98],125:[2,98],126:[2,98],127:[2,98],128:[2,98],129:[2,98],130:[2,98],131:[2,98],132:[2,98],134:[2,98],135:[2,98],137:[2,98],138:[2,98],140:[2,98],141:[2,98],142:[2,98],143:[2,98],144:[2,98],145:[2,98],146:[2,98],147:[2,98],148:[2,98],149:[2,98],150:[2,98],151:[2,98],152:[2,98],153:[2,98],154:[2,98],155:[2,98],156:[2,98],157:[2,98],158:[2,98],159:[2,98],160:[2,
-98],161:[2,98],162:[2,98],165:[2,98],166:[2,98],167:[2,98],169:[2,98],170:[2,98],185:[2,98],188:[2,98],194:[2,98],196:[2,98],198:[2,98],200:[2,98]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:264,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],
-90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],
-141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:265,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,
-60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,
-105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:266,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],
-91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],
-143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,102],8:[2,102],10:[2,102],49:[2,102],50:[2,102],51:[2,102],53:[2,102],56:[2,102],57:[2,102],58:[2,102],59:[2,102],60:[2,102],61:[2,102],62:[2,102],63:[2,102],64:[2,102],65:[2,102],66:[2,102],67:[2,102],68:[2,102],69:[2,102],70:[2,102],71:[2,102],72:[2,102],73:[2,102],74:[2,102],75:[2,102],76:[2,102],77:[2,102],78:[2,102],79:[2,102],81:[2,102],82:[2,102],83:[2,
-102],84:[2,102],85:[2,102],86:[2,102],87:[2,102],88:[2,102],89:[2,102],90:[2,102],91:[2,102],92:[2,102],93:[2,102],94:[2,102],95:[2,102],96:[2,102],97:[2,102],98:[2,102],99:[2,102],100:[2,102],101:[2,102],102:[2,102],103:[2,102],104:[2,102],105:[2,102],106:[2,102],107:[2,102],108:[2,102],109:[2,102],110:[2,102],111:[2,102],112:[2,102],113:[2,102],114:[2,102],115:[2,102],116:[2,102],117:[2,102],118:[2,102],119:[2,102],120:[2,102],121:[2,102],122:[2,102],123:[2,102],124:[2,102],125:[2,102],126:[2,102],
-127:[2,102],128:[2,102],129:[2,102],130:[2,102],131:[2,102],132:[2,102],134:[2,102],135:[2,102],137:[2,102],138:[2,102],140:[2,102],141:[2,102],142:[2,102],143:[2,102],144:[2,102],145:[2,102],146:[2,102],147:[2,102],148:[2,102],149:[2,102],150:[2,102],151:[2,102],152:[2,102],153:[2,102],154:[2,102],155:[2,102],156:[2,102],157:[2,102],158:[2,102],159:[2,102],160:[2,102],161:[2,102],162:[2,102],165:[2,102],166:[2,102],167:[2,102],169:[2,102],170:[2,102],185:[2,102],188:[2,102],194:[2,102],196:[2,102],
-198:[2,102],200:[2,102]},{6:[2,103],8:[2,103],10:[2,103],49:[2,103],50:[2,103],51:[2,103],53:[2,103],56:[2,103],57:[2,103],58:[2,103],59:[2,103],60:[2,103],61:[2,103],62:[2,103],63:[2,103],64:[2,103],65:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],70:[2,103],71:[2,103],72:[2,103],73:[2,103],74:[2,103],75:[2,103],76:[2,103],77:[2,103],78:[2,103],79:[2,103],81:[2,103],82:[2,103],83:[2,103],84:[2,103],85:[2,103],86:[2,103],87:[2,103],88:[2,103],89:[2,103],90:[2,103],91:[2,103],92:[2,103],93:[2,
-103],94:[2,103],95:[2,103],96:[2,103],97:[2,103],98:[2,103],99:[2,103],100:[2,103],101:[2,103],102:[2,103],103:[2,103],104:[2,103],105:[2,103],106:[2,103],107:[2,103],108:[2,103],109:[2,103],110:[2,103],111:[2,103],112:[2,103],113:[2,103],114:[2,103],115:[2,103],116:[2,103],117:[2,103],118:[2,103],119:[2,103],120:[2,103],121:[2,103],122:[2,103],123:[2,103],124:[2,103],125:[2,103],126:[2,103],127:[2,103],128:[2,103],129:[2,103],130:[2,103],131:[2,103],132:[2,103],134:[2,103],135:[2,103],137:[2,103],
-138:[2,103],140:[2,103],141:[2,103],142:[2,103],143:[2,103],144:[2,103],145:[2,103],146:[2,103],147:[2,103],148:[2,103],149:[2,103],150:[2,103],151:[2,103],152:[2,103],153:[2,103],154:[2,103],155:[2,103],156:[2,103],157:[2,103],158:[2,103],159:[2,103],160:[2,103],161:[2,103],162:[2,103],165:[2,103],166:[2,103],167:[2,103],169:[2,103],170:[2,103],185:[2,103],188:[2,103],194:[2,103],196:[2,103],198:[2,103],200:[2,103]},{6:[2,104],8:[2,104],10:[2,104],49:[2,104],50:[2,104],51:[2,104],53:[2,104],56:[2,
-104],57:[2,104],58:[2,104],59:[2,104],60:[2,104],61:[2,104],62:[2,104],63:[2,104],64:[2,104],65:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],70:[2,104],71:[2,104],72:[2,104],73:[2,104],74:[2,104],75:[2,104],76:[2,104],77:[2,104],78:[2,104],79:[2,104],81:[2,104],82:[2,104],83:[2,104],84:[2,104],85:[2,104],86:[2,104],87:[2,104],88:[2,104],89:[2,104],90:[2,104],91:[2,104],92:[2,104],93:[2,104],94:[2,104],95:[2,104],96:[2,104],97:[2,104],98:[2,104],99:[2,104],100:[2,104],101:[2,104],102:[2,104],
-103:[2,104],104:[2,104],105:[2,104],106:[2,104],107:[2,104],108:[2,104],109:[2,104],110:[2,104],111:[2,104],112:[2,104],113:[2,104],114:[2,104],115:[2,104],116:[2,104],117:[2,104],118:[2,104],119:[2,104],120:[2,104],121:[2,104],122:[2,104],123:[2,104],124:[2,104],125:[2,104],126:[2,104],127:[2,104],128:[2,104],129:[2,104],130:[2,104],131:[2,104],132:[2,104],134:[2,104],135:[2,104],137:[2,104],138:[2,104],140:[2,104],141:[2,104],142:[2,104],143:[2,104],144:[2,104],145:[2,104],146:[2,104],147:[2,104],
-148:[2,104],149:[2,104],150:[2,104],151:[2,104],152:[2,104],153:[2,104],154:[2,104],155:[2,104],156:[2,104],157:[2,104],158:[2,104],159:[2,104],160:[2,104],161:[2,104],162:[2,104],165:[2,104],166:[2,104],167:[2,104],169:[2,104],170:[2,104],185:[2,104],188:[2,104],194:[2,104],196:[2,104],198:[2,104],200:[2,104]},{6:[2,105],8:[2,105],10:[2,105],49:[2,105],50:[2,105],51:[2,105],53:[2,105],56:[2,105],57:[2,105],58:[2,105],59:[2,105],60:[2,105],61:[2,105],62:[2,105],63:[2,105],64:[2,105],65:[2,105],66:[2,
-105],67:[2,105],68:[2,105],69:[2,105],70:[2,105],71:[2,105],72:[2,105],73:[2,105],74:[2,105],75:[2,105],76:[2,105],77:[2,105],78:[2,105],79:[2,105],81:[2,105],82:[2,105],83:[2,105],84:[2,105],85:[2,105],86:[2,105],87:[2,105],88:[2,105],89:[2,105],90:[2,105],91:[2,105],92:[2,105],93:[2,105],94:[2,105],95:[2,105],96:[2,105],97:[2,105],98:[2,105],99:[2,105],100:[2,105],101:[2,105],102:[2,105],103:[2,105],104:[2,105],105:[2,105],106:[2,105],107:[2,105],108:[2,105],109:[2,105],110:[2,105],111:[2,105],
-112:[2,105],113:[2,105],114:[2,105],115:[2,105],116:[2,105],117:[2,105],118:[2,105],119:[2,105],120:[2,105],121:[2,105],122:[2,105],123:[2,105],124:[2,105],125:[2,105],126:[2,105],127:[2,105],128:[2,105],129:[2,105],130:[2,105],131:[2,105],132:[2,105],134:[2,105],135:[2,105],137:[2,105],138:[2,105],140:[2,105],141:[2,105],142:[2,105],143:[2,105],144:[2,105],145:[2,105],146:[2,105],147:[2,105],148:[2,105],149:[2,105],150:[2,105],151:[2,105],152:[2,105],153:[2,105],154:[2,105],155:[2,105],156:[2,105],
-157:[2,105],158:[2,105],159:[2,105],160:[2,105],161:[2,105],162:[2,105],165:[2,105],166:[2,105],167:[2,105],169:[2,105],170:[2,105],185:[2,105],188:[2,105],194:[2,105],196:[2,105],198:[2,105],200:[2,105]},{6:[2,106],8:[2,106],10:[2,106],49:[2,106],50:[2,106],51:[2,106],53:[2,106],56:[2,106],57:[2,106],58:[2,106],59:[2,106],60:[2,106],61:[2,106],62:[2,106],63:[2,106],64:[2,106],65:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],70:[2,106],71:[2,106],72:[2,106],73:[2,106],74:[2,106],75:[2,106],
-76:[2,106],77:[2,106],78:[2,106],79:[2,106],81:[2,106],82:[2,106],83:[2,106],84:[2,106],85:[2,106],86:[2,106],87:[2,106],88:[2,106],89:[2,106],90:[2,106],91:[2,106],92:[2,106],93:[2,106],94:[2,106],95:[2,106],96:[2,106],97:[2,106],98:[2,106],99:[2,106],100:[2,106],101:[2,106],102:[2,106],103:[2,106],104:[2,106],105:[2,106],106:[2,106],107:[2,106],108:[2,106],109:[2,106],110:[2,106],111:[2,106],112:[2,106],113:[2,106],114:[2,106],115:[2,106],116:[2,106],117:[2,106],118:[2,106],119:[2,106],120:[2,106],
-121:[2,106],122:[2,106],123:[2,106],124:[2,106],125:[2,106],126:[2,106],127:[2,106],128:[2,106],129:[2,106],130:[2,106],131:[2,106],132:[2,106],134:[2,106],135:[2,106],137:[2,106],138:[2,106],140:[2,106],141:[2,106],142:[2,106],143:[2,106],144:[2,106],145:[2,106],146:[2,106],147:[2,106],148:[2,106],149:[2,106],150:[2,106],151:[2,106],152:[2,106],153:[2,106],154:[2,106],155:[2,106],156:[2,106],157:[2,106],158:[2,106],159:[2,106],160:[2,106],161:[2,106],162:[2,106],165:[2,106],166:[2,106],167:[2,106],
-169:[2,106],170:[2,106],185:[2,106],188:[2,106],194:[2,106],196:[2,106],198:[2,106],200:[2,106]},{6:[2,107],8:[2,107],10:[2,107],49:[2,107],50:[2,107],51:[2,107],53:[2,107],56:[2,107],57:[2,107],58:[2,107],59:[2,107],60:[2,107],61:[2,107],62:[2,107],63:[2,107],64:[2,107],65:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],70:[2,107],71:[2,107],72:[2,107],73:[2,107],74:[2,107],75:[2,107],76:[2,107],77:[2,107],78:[2,107],79:[2,107],81:[2,107],82:[2,107],83:[2,107],84:[2,107],85:[2,107],86:[2,107],
-87:[2,107],88:[2,107],89:[2,107],90:[2,107],91:[2,107],92:[2,107],93:[2,107],94:[2,107],95:[2,107],96:[2,107],97:[2,107],98:[2,107],99:[2,107],100:[2,107],101:[2,107],102:[2,107],103:[2,107],104:[2,107],105:[2,107],106:[2,107],107:[2,107],108:[2,107],109:[2,107],110:[2,107],111:[2,107],112:[2,107],113:[2,107],114:[2,107],115:[2,107],116:[2,107],117:[2,107],118:[2,107],119:[2,107],120:[2,107],121:[2,107],122:[2,107],123:[2,107],124:[2,107],125:[2,107],126:[2,107],127:[2,107],128:[2,107],129:[2,107],
-130:[2,107],131:[2,107],132:[2,107],134:[2,107],135:[2,107],137:[2,107],138:[2,107],140:[2,107],141:[2,107],142:[2,107],143:[2,107],144:[2,107],145:[2,107],146:[2,107],147:[2,107],148:[2,107],149:[2,107],150:[2,107],151:[2,107],152:[2,107],153:[2,107],154:[2,107],155:[2,107],156:[2,107],157:[2,107],158:[2,107],159:[2,107],160:[2,107],161:[2,107],162:[2,107],165:[2,107],166:[2,107],167:[2,107],169:[2,107],170:[2,107],185:[2,107],188:[2,107],194:[2,107],196:[2,107],198:[2,107],200:[2,107]},{6:[2,108],
-8:[2,108],10:[2,108],49:[2,108],50:[2,108],51:[2,108],53:[2,108],56:[2,108],57:[2,108],58:[2,108],59:[2,108],60:[2,108],61:[2,108],62:[2,108],63:[2,108],64:[2,108],65:[2,108],66:[2,108],67:[2,108],68:[2,108],69:[2,108],70:[2,108],71:[2,108],72:[2,108],73:[2,108],74:[2,108],75:[2,108],76:[2,108],77:[2,108],78:[2,108],79:[2,108],81:[2,108],82:[2,108],83:[2,108],84:[2,108],85:[2,108],86:[2,108],87:[2,108],88:[2,108],89:[2,108],90:[2,108],91:[2,108],92:[2,108],93:[2,108],94:[2,108],95:[2,108],96:[2,108],
-97:[2,108],98:[2,108],99:[2,108],100:[2,108],101:[2,108],102:[2,108],103:[2,108],104:[2,108],105:[2,108],106:[2,108],107:[2,108],108:[2,108],109:[2,108],110:[2,108],111:[2,108],112:[2,108],113:[2,108],114:[2,108],115:[2,108],116:[2,108],117:[2,108],118:[2,108],119:[2,108],120:[2,108],121:[2,108],122:[2,108],123:[2,108],124:[2,108],125:[2,108],126:[2,108],127:[2,108],128:[2,108],129:[2,108],130:[2,108],131:[2,108],132:[2,108],134:[2,108],135:[2,108],137:[2,108],138:[2,108],140:[2,108],141:[2,108],
-142:[2,108],143:[2,108],144:[2,108],145:[2,108],146:[2,108],147:[2,108],148:[2,108],149:[2,108],150:[2,108],151:[2,108],152:[2,108],153:[2,108],154:[2,108],155:[2,108],156:[2,108],157:[2,108],158:[2,108],159:[2,108],160:[2,108],161:[2,108],162:[2,108],165:[2,108],166:[2,108],167:[2,108],169:[2,108],170:[2,108],185:[2,108],188:[2,108],194:[2,108],196:[2,108],198:[2,108],200:[2,108]},{6:[2,109],8:[2,109],10:[2,109],49:[2,109],50:[2,109],51:[2,109],53:[2,109],56:[2,109],57:[2,109],58:[2,109],59:[2,109],
-60:[2,109],61:[2,109],62:[2,109],63:[2,109],64:[2,109],65:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],70:[2,109],71:[2,109],72:[2,109],73:[2,109],74:[2,109],75:[2,109],76:[2,109],77:[2,109],78:[2,109],79:[2,109],81:[2,109],82:[2,109],83:[2,109],84:[2,109],85:[2,109],86:[2,109],87:[2,109],88:[2,109],89:[2,109],90:[2,109],91:[2,109],92:[2,109],93:[2,109],94:[2,109],95:[2,109],96:[2,109],97:[2,109],98:[2,109],99:[2,109],100:[2,109],101:[2,109],102:[2,109],103:[2,109],104:[2,109],105:[2,109],
-106:[2,109],107:[2,109],108:[2,109],109:[2,109],110:[2,109],111:[2,109],112:[2,109],113:[2,109],114:[2,109],115:[2,109],116:[2,109],117:[2,109],118:[2,109],119:[2,109],120:[2,109],121:[2,109],122:[2,109],123:[2,109],124:[2,109],125:[2,109],126:[2,109],127:[2,109],128:[2,109],129:[2,109],130:[2,109],131:[2,109],132:[2,109],134:[2,109],135:[2,109],137:[2,109],138:[2,109],140:[2,109],141:[2,109],142:[2,109],143:[2,109],144:[2,109],145:[2,109],146:[2,109],147:[2,109],148:[2,109],149:[2,109],150:[2,109],
-151:[2,109],152:[2,109],153:[2,109],154:[2,109],155:[2,109],156:[2,109],157:[2,109],158:[2,109],159:[2,109],160:[2,109],161:[2,109],162:[2,109],165:[2,109],166:[2,109],167:[2,109],169:[2,109],170:[2,109],185:[2,109],188:[2,109],194:[2,109],196:[2,109],198:[2,109],200:[2,109]},{7:267,8:[1,129]},{4:[1,270],8:[1,26],11:268,48:35,49:[1,119],50:[1,47],51:[1,43],54:269,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,
-41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,
-91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{9:[1,271]},{6:[2,122],8:[2,122],10:[2,122],49:[2,122],50:[2,122],51:[2,122],53:[2,122],56:[2,122],57:[2,122],58:[2,122],59:[2,122],60:[2,122],61:[2,122],62:[2,122],63:[2,122],64:[2,122],65:[2,
-122],66:[2,122],67:[2,122],68:[2,122],69:[2,122],70:[2,122],71:[2,122],72:[2,122],73:[2,122],74:[2,122],75:[2,122],76:[2,122],77:[2,122],78:[2,122],79:[2,122],81:[2,122],82:[2,122],83:[2,122],84:[2,122],85:[2,122],86:[2,122],87:[2,122],88:[2,122],89:[2,122],90:[2,122],91:[2,122],92:[2,122],93:[2,122],94:[2,122],95:[2,122],96:[2,122],97:[2,122],98:[2,122],99:[2,122],100:[2,122],101:[2,122],102:[2,122],103:[2,122],104:[2,122],105:[2,122],106:[2,122],107:[2,122],108:[2,122],109:[2,122],110:[2,122],111:[2,
-122],112:[2,122],113:[2,122],114:[2,122],115:[2,122],116:[2,122],117:[2,122],118:[2,122],119:[2,122],120:[2,122],121:[2,122],122:[2,122],123:[2,122],124:[2,122],125:[2,122],126:[2,122],127:[2,122],128:[2,122],129:[2,122],130:[2,122],131:[2,122],132:[2,122],134:[2,122],135:[2,122],137:[2,122],138:[2,122],140:[2,122],141:[2,122],142:[2,122],143:[2,122],144:[2,122],145:[2,122],146:[2,122],147:[2,122],148:[2,122],149:[2,122],150:[2,122],151:[2,122],152:[2,122],153:[2,122],154:[2,122],155:[2,122],156:[2,
-122],157:[2,122],158:[2,122],159:[2,122],160:[2,122],161:[2,122],162:[2,122],165:[2,122],166:[2,122],167:[2,122],169:[2,122],170:[2,122],185:[2,122],188:[2,122],194:[2,122],196:[2,122],198:[2,122],200:[2,122]},{6:[2,123],8:[2,123],10:[2,123],49:[2,123],50:[2,123],51:[2,123],53:[2,123],56:[2,123],57:[2,123],58:[2,123],59:[2,123],60:[2,123],61:[2,123],62:[2,123],63:[2,123],64:[2,123],65:[2,123],66:[2,123],67:[2,123],68:[2,123],69:[2,123],70:[2,123],71:[2,123],72:[2,123],73:[2,123],74:[2,123],75:[2,
-123],76:[2,123],77:[2,123],78:[2,123],79:[2,123],81:[2,123],82:[2,123],83:[2,123],84:[2,123],85:[2,123],86:[2,123],87:[2,123],88:[2,123],89:[2,123],90:[2,123],91:[2,123],92:[2,123],93:[2,123],94:[2,123],95:[2,123],96:[2,123],97:[2,123],98:[2,123],99:[2,123],100:[2,123],101:[2,123],102:[2,123],103:[2,123],104:[2,123],105:[2,123],106:[2,123],107:[2,123],108:[2,123],109:[2,123],110:[2,123],111:[2,123],112:[2,123],113:[2,123],114:[2,123],115:[2,123],116:[2,123],117:[2,123],118:[2,123],119:[2,123],120:[2,
-123],121:[2,123],122:[2,123],123:[2,123],124:[2,123],125:[2,123],126:[2,123],127:[2,123],128:[2,123],129:[2,123],130:[2,123],131:[2,123],132:[2,123],134:[2,123],135:[2,123],137:[2,123],138:[2,123],140:[2,123],141:[2,123],142:[2,123],143:[2,123],144:[2,123],145:[2,123],146:[2,123],147:[2,123],148:[2,123],149:[2,123],150:[2,123],151:[2,123],152:[2,123],153:[2,123],154:[2,123],155:[2,123],156:[2,123],157:[2,123],158:[2,123],159:[2,123],160:[2,123],161:[2,123],162:[2,123],165:[2,123],166:[2,123],167:[2,
-123],169:[2,123],170:[2,123],185:[2,123],188:[2,123],194:[2,123],196:[2,123],198:[2,123],200:[2,123]},{6:[2,124],8:[2,124],10:[2,124],49:[2,124],50:[2,124],51:[2,124],53:[2,124],56:[2,124],57:[2,124],58:[2,124],59:[2,124],60:[2,124],61:[2,124],62:[2,124],63:[2,124],64:[2,124],65:[2,124],66:[2,124],67:[2,124],68:[2,124],69:[2,124],70:[2,124],71:[2,124],72:[2,124],73:[2,124],74:[2,124],75:[2,124],76:[2,124],77:[2,124],78:[2,124],79:[2,124],81:[2,124],82:[2,124],83:[2,124],84:[2,124],85:[2,124],86:[2,
-124],87:[2,124],88:[2,124],89:[2,124],90:[2,124],91:[2,124],92:[2,124],93:[2,124],94:[2,124],95:[2,124],96:[2,124],97:[2,124],98:[2,124],99:[2,124],100:[2,124],101:[2,124],102:[2,124],103:[2,124],104:[2,124],105:[2,124],106:[2,124],107:[2,124],108:[2,124],109:[2,124],110:[2,124],111:[2,124],112:[2,124],113:[2,124],114:[2,124],115:[2,124],116:[2,124],117:[2,124],118:[2,124],119:[2,124],120:[2,124],121:[2,124],122:[2,124],123:[2,124],124:[2,124],125:[2,124],126:[2,124],127:[2,124],128:[2,124],129:[2,
-124],130:[2,124],131:[2,124],132:[2,124],134:[2,124],135:[2,124],137:[2,124],138:[2,124],140:[2,124],141:[2,124],142:[2,124],143:[2,124],144:[2,124],145:[2,124],146:[2,124],147:[2,124],148:[2,124],149:[2,124],150:[2,124],151:[2,124],152:[2,124],153:[2,124],154:[2,124],155:[2,124],156:[2,124],157:[2,124],158:[2,124],159:[2,124],160:[2,124],161:[2,124],162:[2,124],165:[2,124],166:[2,124],167:[2,124],169:[2,124],170:[2,124],185:[2,124],188:[2,124],194:[2,124],196:[2,124],198:[2,124],200:[2,124]},{6:[2,
-125],8:[2,125],10:[2,125],49:[2,125],50:[2,125],51:[2,125],53:[2,125],56:[2,125],57:[2,125],58:[2,125],59:[2,125],60:[2,125],61:[2,125],62:[2,125],63:[2,125],64:[2,125],65:[2,125],66:[2,125],67:[2,125],68:[2,125],69:[2,125],70:[2,125],71:[2,125],72:[2,125],73:[2,125],74:[2,125],75:[2,125],76:[2,125],77:[2,125],78:[2,125],79:[2,125],81:[2,125],82:[2,125],83:[2,125],84:[2,125],85:[2,125],86:[2,125],87:[2,125],88:[2,125],89:[2,125],90:[2,125],91:[2,125],92:[2,125],93:[2,125],94:[2,125],95:[2,125],96:[2,
-125],97:[2,125],98:[2,125],99:[2,125],100:[2,125],101:[2,125],102:[2,125],103:[2,125],104:[2,125],105:[2,125],106:[2,125],107:[2,125],108:[2,125],109:[2,125],110:[2,125],111:[2,125],112:[2,125],113:[2,125],114:[2,125],115:[2,125],116:[2,125],117:[2,125],118:[2,125],119:[2,125],120:[2,125],121:[2,125],122:[2,125],123:[2,125],124:[2,125],125:[2,125],126:[2,125],127:[2,125],128:[2,125],129:[2,125],130:[2,125],131:[2,125],132:[2,125],134:[2,125],135:[2,125],137:[2,125],138:[2,125],140:[2,125],141:[2,
-125],142:[2,125],143:[2,125],144:[2,125],145:[2,125],146:[2,125],147:[2,125],148:[2,125],149:[2,125],150:[2,125],151:[2,125],152:[2,125],153:[2,125],154:[2,125],155:[2,125],156:[2,125],157:[2,125],158:[2,125],159:[2,125],160:[2,125],161:[2,125],162:[2,125],165:[2,125],166:[2,125],167:[2,125],169:[2,125],170:[2,125],185:[2,125],188:[2,125],194:[2,125],196:[2,125],198:[2,125],200:[2,125]},{6:[2,126],8:[2,126],10:[2,126],49:[2,126],50:[2,126],51:[2,126],53:[2,126],56:[2,126],57:[2,126],58:[2,126],59:[2,
-126],60:[2,126],61:[2,126],62:[2,126],63:[2,126],64:[2,126],65:[2,126],66:[2,126],67:[2,126],68:[2,126],69:[2,126],70:[2,126],71:[2,126],72:[2,126],73:[2,126],74:[2,126],75:[2,126],76:[2,126],77:[2,126],78:[2,126],79:[2,126],81:[2,126],82:[2,126],83:[2,126],84:[2,126],85:[2,126],86:[2,126],87:[2,126],88:[2,126],89:[2,126],90:[2,126],91:[2,126],92:[2,126],93:[2,126],94:[2,126],95:[2,126],96:[2,126],97:[2,126],98:[2,126],99:[2,126],100:[2,126],101:[2,126],102:[2,126],103:[2,126],104:[2,126],105:[2,
-126],106:[2,126],107:[2,126],108:[2,126],109:[2,126],110:[2,126],111:[2,126],112:[2,126],113:[2,126],114:[2,126],115:[2,126],116:[2,126],117:[2,126],118:[2,126],119:[2,126],120:[2,126],121:[2,126],122:[2,126],123:[2,126],124:[2,126],125:[2,126],126:[2,126],127:[2,126],128:[2,126],129:[2,126],130:[2,126],131:[2,126],132:[2,126],134:[2,126],135:[2,126],137:[2,126],138:[2,126],140:[2,126],141:[2,126],142:[2,126],143:[2,126],144:[2,126],145:[2,126],146:[2,126],147:[2,126],148:[2,126],149:[2,126],150:[2,
-126],151:[2,126],152:[2,126],153:[2,126],154:[2,126],155:[2,126],156:[2,126],157:[2,126],158:[2,126],159:[2,126],160:[2,126],161:[2,126],162:[2,126],165:[2,126],166:[2,126],167:[2,126],169:[2,126],170:[2,126],185:[2,126],188:[2,126],194:[2,126],196:[2,126],198:[2,126],200:[2,126]},{6:[2,127],8:[2,127],10:[2,127],49:[2,127],50:[2,127],51:[2,127],53:[2,127],56:[2,127],57:[2,127],58:[2,127],59:[2,127],60:[2,127],61:[2,127],62:[2,127],63:[2,127],64:[2,127],65:[2,127],66:[2,127],67:[2,127],68:[2,127],
-69:[2,127],70:[2,127],71:[2,127],72:[2,127],73:[2,127],74:[2,127],75:[2,127],76:[2,127],77:[2,127],78:[2,127],79:[2,127],81:[2,127],82:[2,127],83:[2,127],84:[2,127],85:[2,127],86:[2,127],87:[2,127],88:[2,127],89:[2,127],90:[2,127],91:[2,127],92:[2,127],93:[2,127],94:[2,127],95:[2,127],96:[2,127],97:[2,127],98:[2,127],99:[2,127],100:[2,127],101:[2,127],102:[2,127],103:[2,127],104:[2,127],105:[2,127],106:[2,127],107:[2,127],108:[2,127],109:[2,127],110:[2,127],111:[2,127],112:[2,127],113:[2,127],114:[2,
-127],115:[2,127],116:[2,127],117:[2,127],118:[2,127],119:[2,127],120:[2,127],121:[2,127],122:[2,127],123:[2,127],124:[2,127],125:[2,127],126:[2,127],127:[2,127],128:[2,127],129:[2,127],130:[2,127],131:[2,127],132:[2,127],134:[2,127],135:[2,127],137:[2,127],138:[2,127],140:[2,127],141:[2,127],142:[2,127],143:[2,127],144:[2,127],145:[2,127],146:[2,127],147:[2,127],148:[2,127],149:[2,127],150:[2,127],151:[2,127],152:[2,127],153:[2,127],154:[2,127],155:[2,127],156:[2,127],157:[2,127],158:[2,127],159:[2,
-127],160:[2,127],161:[2,127],162:[2,127],165:[2,127],166:[2,127],167:[2,127],169:[2,127],170:[2,127],185:[2,127],188:[2,127],194:[2,127],196:[2,127],198:[2,127],200:[2,127]},{6:[2,128],8:[2,128],10:[2,128],49:[2,128],50:[2,128],51:[2,128],53:[2,128],56:[2,128],57:[2,128],58:[2,128],59:[2,128],60:[2,128],61:[2,128],62:[2,128],63:[2,128],64:[2,128],65:[2,128],66:[2,128],67:[2,128],68:[2,128],69:[2,128],70:[2,128],71:[2,128],72:[2,128],73:[2,128],74:[2,128],75:[2,128],76:[2,128],77:[2,128],78:[2,128],
-79:[2,128],81:[2,128],82:[2,128],83:[2,128],84:[2,128],85:[2,128],86:[2,128],87:[2,128],88:[2,128],89:[2,128],90:[2,128],91:[2,128],92:[2,128],93:[2,128],94:[2,128],95:[2,128],96:[2,128],97:[2,128],98:[2,128],99:[2,128],100:[2,128],101:[2,128],102:[2,128],103:[2,128],104:[2,128],105:[2,128],106:[2,128],107:[2,128],108:[2,128],109:[2,128],110:[2,128],111:[2,128],112:[2,128],113:[2,128],114:[2,128],115:[2,128],116:[2,128],117:[2,128],118:[2,128],119:[2,128],120:[2,128],121:[2,128],122:[2,128],123:[2,
-128],124:[2,128],125:[2,128],126:[2,128],127:[2,128],128:[2,128],129:[2,128],130:[2,128],131:[2,128],132:[2,128],134:[2,128],135:[2,128],137:[2,128],138:[2,128],140:[2,128],141:[2,128],142:[2,128],143:[2,128],144:[2,128],145:[2,128],146:[2,128],147:[2,128],148:[2,128],149:[2,128],150:[2,128],151:[2,128],152:[2,128],153:[2,128],154:[2,128],155:[2,128],156:[2,128],157:[2,128],158:[2,128],159:[2,128],160:[2,128],161:[2,128],162:[2,128],165:[2,128],166:[2,128],167:[2,128],169:[2,128],170:[2,128],185:[2,
-128],188:[2,128],194:[2,128],196:[2,128],198:[2,128],200:[2,128]},{6:[2,129],8:[2,129],10:[2,129],49:[2,129],50:[2,129],51:[2,129],53:[2,129],56:[2,129],57:[2,129],58:[2,129],59:[2,129],60:[2,129],61:[2,129],62:[2,129],63:[2,129],64:[2,129],65:[2,129],66:[2,129],67:[2,129],68:[2,129],69:[2,129],70:[2,129],71:[2,129],72:[2,129],73:[2,129],74:[2,129],75:[2,129],76:[2,129],77:[2,129],78:[2,129],79:[2,129],81:[2,129],82:[2,129],83:[2,129],84:[2,129],85:[2,129],86:[2,129],87:[2,129],88:[2,129],89:[2,129],
-90:[2,129],91:[2,129],92:[2,129],93:[2,129],94:[2,129],95:[2,129],96:[2,129],97:[2,129],98:[2,129],99:[2,129],100:[2,129],101:[2,129],102:[2,129],103:[2,129],104:[2,129],105:[2,129],106:[2,129],107:[2,129],108:[2,129],109:[2,129],110:[2,129],111:[2,129],112:[2,129],113:[2,129],114:[2,129],115:[2,129],116:[2,129],117:[2,129],118:[2,129],119:[2,129],120:[2,129],121:[2,129],122:[2,129],123:[2,129],124:[2,129],125:[2,129],126:[2,129],127:[2,129],128:[2,129],129:[2,129],130:[2,129],131:[2,129],132:[2,
-129],134:[2,129],135:[2,129],137:[2,129],138:[2,129],140:[2,129],141:[2,129],142:[2,129],143:[2,129],144:[2,129],145:[2,129],146:[2,129],147:[2,129],148:[2,129],149:[2,129],150:[2,129],151:[2,129],152:[2,129],153:[2,129],154:[2,129],155:[2,129],156:[2,129],157:[2,129],158:[2,129],159:[2,129],160:[2,129],161:[2,129],162:[2,129],165:[2,129],166:[2,129],167:[2,129],169:[2,129],170:[2,129],185:[2,129],188:[2,129],194:[2,129],196:[2,129],198:[2,129],200:[2,129]},{6:[2,130],8:[2,130],10:[2,130],49:[2,130],
-50:[2,130],51:[2,130],53:[2,130],56:[2,130],57:[2,130],58:[2,130],59:[2,130],60:[2,130],61:[2,130],62:[2,130],63:[2,130],64:[2,130],65:[2,130],66:[2,130],67:[2,130],68:[2,130],69:[2,130],70:[2,130],71:[2,130],72:[2,130],73:[2,130],74:[2,130],75:[2,130],76:[2,130],77:[2,130],78:[2,130],79:[2,130],81:[2,130],82:[2,130],83:[2,130],84:[2,130],85:[2,130],86:[2,130],87:[2,130],88:[2,130],89:[2,130],90:[2,130],91:[2,130],92:[2,130],93:[2,130],94:[2,130],95:[2,130],96:[2,130],97:[2,130],98:[2,130],99:[2,
-130],100:[2,130],101:[2,130],102:[2,130],103:[2,130],104:[2,130],105:[2,130],106:[2,130],107:[2,130],108:[2,130],109:[2,130],110:[2,130],111:[2,130],112:[2,130],113:[2,130],114:[2,130],115:[2,130],116:[2,130],117:[2,130],118:[2,130],119:[2,130],120:[2,130],121:[2,130],122:[2,130],123:[2,130],124:[2,130],125:[2,130],126:[2,130],127:[2,130],128:[2,130],129:[2,130],130:[2,130],131:[2,130],132:[2,130],134:[2,130],135:[2,130],137:[2,130],138:[2,130],140:[2,130],141:[2,130],142:[2,130],143:[2,130],144:[2,
-130],145:[2,130],146:[2,130],147:[2,130],148:[2,130],149:[2,130],150:[2,130],151:[2,130],152:[2,130],153:[2,130],154:[2,130],155:[2,130],156:[2,130],157:[2,130],158:[2,130],159:[2,130],160:[2,130],161:[2,130],162:[2,130],165:[2,130],166:[2,130],167:[2,130],169:[2,130],170:[2,130],185:[2,130],188:[2,130],194:[2,130],196:[2,130],198:[2,130],200:[2,130]},{6:[2,131],8:[2,131],10:[2,131],49:[2,131],50:[2,131],51:[2,131],53:[2,131],56:[2,131],57:[2,131],58:[2,131],59:[2,131],60:[2,131],61:[2,131],62:[2,
-131],63:[2,131],64:[2,131],65:[2,131],66:[2,131],67:[2,131],68:[2,131],69:[2,131],70:[2,131],71:[2,131],72:[2,131],73:[2,131],74:[2,131],75:[2,131],76:[2,131],77:[2,131],78:[2,131],79:[2,131],81:[2,131],82:[2,131],83:[2,131],84:[2,131],85:[2,131],86:[2,131],87:[2,131],88:[2,131],89:[2,131],90:[2,131],91:[2,131],92:[2,131],93:[2,131],94:[2,131],95:[2,131],96:[2,131],97:[2,131],98:[2,131],99:[2,131],100:[2,131],101:[2,131],102:[2,131],103:[2,131],104:[2,131],105:[2,131],106:[2,131],107:[2,131],108:[2,
-131],109:[2,131],110:[2,131],111:[2,131],112:[2,131],113:[2,131],114:[2,131],115:[2,131],116:[2,131],117:[2,131],118:[2,131],119:[2,131],120:[2,131],121:[2,131],122:[2,131],123:[2,131],124:[2,131],125:[2,131],126:[2,131],127:[2,131],128:[2,131],129:[2,131],130:[2,131],131:[2,131],132:[2,131],134:[2,131],135:[2,131],137:[2,131],138:[2,131],140:[2,131],141:[2,131],142:[2,131],143:[2,131],144:[2,131],145:[2,131],146:[2,131],147:[2,131],148:[2,131],149:[2,131],150:[2,131],151:[2,131],152:[2,131],153:[2,
-131],154:[2,131],155:[2,131],156:[2,131],157:[2,131],158:[2,131],159:[2,131],160:[2,131],161:[2,131],162:[2,131],165:[2,131],166:[2,131],167:[2,131],169:[2,131],170:[2,131],185:[2,131],188:[2,131],194:[2,131],196:[2,131],198:[2,131],200:[2,131]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:272,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,
-50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],
-128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:273,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],
-81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,
-98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:274,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,
-51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],
-129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:275,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],
-82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,
-99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:277,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,
-52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],
-130:[1,100],131:[1,101],132:[1,102],134:[1,276],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[2,156],49:[2,156],50:[2,156],51:[2,156],56:[2,156],57:[2,156],58:[2,156],59:[2,156],60:[2,156],61:[2,156],62:[2,156],63:[2,156],67:[2,156],68:[2,156],69:[2,156],70:[2,156],71:[2,156],72:[2,156],73:[2,156],74:[2,156],75:[2,156],76:[2,156],77:[2,156],78:[2,156],79:[2,156],
-81:[2,156],82:[2,156],83:[2,156],84:[2,156],85:[2,156],86:[2,156],87:[2,156],88:[2,156],89:[2,156],90:[2,156],91:[2,156],92:[2,156],93:[2,156],94:[2,156],95:[2,156],96:[2,156],97:[2,156],98:[2,156],99:[2,156],100:[2,156],101:[2,156],102:[2,156],103:[2,156],104:[2,156],105:[2,156],106:[2,156],107:[2,156],108:[2,156],109:[2,156],110:[2,156],111:[2,156],112:[2,156],113:[2,156],114:[2,156],115:[2,156],116:[2,156],117:[2,156],118:[2,156],119:[2,156],120:[2,156],121:[2,156],122:[2,156],123:[2,156],124:[2,
-156],125:[2,156],126:[2,156],127:[2,156],128:[2,156],129:[2,156],130:[2,156],131:[2,156],132:[2,156],134:[2,156],135:[2,156],137:[2,156],138:[2,156],141:[2,156],143:[2,156],145:[2,156],147:[2,156],149:[2,156],151:[2,156],153:[2,156],155:[2,156],157:[2,156],159:[2,156],161:[2,156],162:[2,156]},{10:[1,279],136:278,165:[1,238],166:[1,239],173:237},{140:[1,280],188:[1,281]},{10:[2,200],140:[2,200],142:[2,200],144:[2,200],146:[2,200],148:[2,200],150:[2,200],152:[2,200],154:[2,200],156:[2,200],158:[2,200],
-160:[2,200],188:[2,200]},{8:[1,282]},{10:[2,199],140:[2,199],142:[2,199],144:[2,199],146:[2,199],148:[2,199],150:[2,199],152:[2,199],154:[2,199],156:[2,199],158:[2,199],160:[2,199],185:[1,283],188:[2,199]},{10:[2,196],140:[2,196],142:[2,196],144:[2,196],146:[2,196],148:[2,196],150:[2,196],152:[2,196],154:[2,196],156:[2,196],158:[2,196],160:[2,196],185:[2,196],188:[2,196]},{8:[1,284]},{10:[2,195],140:[2,195],142:[2,195],144:[2,195],146:[2,195],148:[2,195],150:[2,195],152:[2,195],154:[2,195],156:[2,
-195],158:[2,195],160:[2,195],185:[2,195],188:[2,195]},{142:[1,285],188:[1,281]},{144:[1,286],188:[1,281]},{146:[1,287],188:[1,281]},{148:[1,288],188:[1,281]},{150:[1,289],188:[1,281]},{152:[1,290],188:[1,281]},{154:[1,291],188:[1,281]},{156:[1,292],188:[1,281]},{158:[1,293],188:[1,281]},{7:226,8:[1,129],17:294},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],
-72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],
-121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:295,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],160:[2,193],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],
-186:208,187:[1,209],188:[2,193]},{8:[2,8]},{8:[2,9],49:[2,9],50:[2,9],51:[2,9],56:[2,9],57:[2,9],58:[2,9],59:[2,9],60:[2,9],61:[2,9],62:[2,9],63:[2,9],67:[2,9],68:[2,9],69:[2,9],70:[2,9],71:[2,9],72:[2,9],73:[2,9],74:[2,9],75:[2,9],76:[2,9],77:[2,9],78:[2,9],79:[2,9],81:[2,9],82:[2,9],83:[2,9],84:[2,9],85:[2,9],86:[2,9],87:[2,9],88:[2,9],89:[2,9],90:[2,9],91:[2,9],92:[2,9],93:[2,9],94:[2,9],95:[2,9],96:[2,9],97:[2,9],98:[2,9],99:[2,9],100:[2,9],101:[2,9],102:[2,9],103:[2,9],104:[2,9],105:[2,9],106:[2,
-9],107:[2,9],108:[2,9],109:[2,9],110:[2,9],111:[2,9],112:[2,9],113:[2,9],114:[2,9],115:[2,9],116:[2,9],117:[2,9],118:[2,9],119:[2,9],120:[2,9],121:[2,9],122:[2,9],123:[2,9],124:[2,9],125:[2,9],126:[2,9],127:[2,9],128:[2,9],129:[2,9],130:[2,9],131:[2,9],132:[2,9],135:[2,9],137:[2,9],138:[2,9],141:[2,9],143:[2,9],145:[2,9],147:[2,9],149:[2,9],151:[2,9],153:[2,9],155:[2,9],157:[2,9],159:[2,9],160:[2,9],161:[2,9],162:[2,9],169:[2,9],170:[2,9],175:[2,9],176:[2,9],177:[2,9],178:[2,9],179:[2,9],180:[2,9],
-181:[2,9],183:[2,9],185:[2,9],187:[2,9],188:[2,9]},{8:[1,26],10:[2,193],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],
-98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:296,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],
-153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{8:[1,26],10:[2,193],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,
-44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,
-93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:297,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],163:[1,298],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,
-193]},{8:[2,44],49:[2,44],50:[2,44],51:[2,44],56:[2,44],57:[2,44],58:[2,44],59:[2,44],60:[2,44],61:[2,44],62:[2,44],63:[2,44],67:[2,44],68:[2,44],69:[2,44],70:[2,44],71:[2,44],72:[2,44],73:[2,44],74:[2,44],75:[2,44],76:[2,44],77:[2,44],78:[2,44],79:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],86:[2,44],87:[2,44],88:[2,44],89:[2,44],90:[2,44],91:[2,44],92:[2,44],93:[2,44],94:[2,44],95:[2,44],96:[2,44],97:[2,44],98:[2,44],99:[2,44],100:[2,44],101:[2,44],102:[2,44],103:[2,44],104:[2,44],
-105:[2,44],106:[2,44],107:[2,44],108:[2,44],109:[2,44],110:[2,44],111:[2,44],112:[2,44],113:[2,44],114:[2,44],115:[2,44],116:[2,44],117:[2,44],118:[2,44],119:[2,44],120:[2,44],121:[2,44],122:[2,44],123:[2,44],124:[2,44],125:[2,44],126:[2,44],127:[2,44],128:[2,44],129:[2,44],130:[2,44],131:[2,44],132:[2,44],135:[2,44],137:[2,44],138:[2,44],141:[2,44],143:[2,44],145:[2,44],147:[2,44],149:[2,44],151:[2,44],153:[2,44],155:[2,44],157:[2,44],159:[2,44],161:[2,44],162:[2,44],169:[2,44],170:[2,44],175:[2,
-44],176:[2,44],177:[2,44],178:[2,44],179:[2,44],180:[2,44],181:[2,44]},{8:[2,45],49:[2,45],50:[2,45],51:[2,45],56:[2,45],57:[2,45],58:[2,45],59:[2,45],60:[2,45],61:[2,45],62:[2,45],63:[2,45],67:[2,45],68:[2,45],69:[2,45],70:[2,45],71:[2,45],72:[2,45],73:[2,45],74:[2,45],75:[2,45],76:[2,45],77:[2,45],78:[2,45],79:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],86:[2,45],87:[2,45],88:[2,45],89:[2,45],90:[2,45],91:[2,45],92:[2,45],93:[2,45],94:[2,45],95:[2,45],96:[2,45],97:[2,45],98:[2,45],
-99:[2,45],100:[2,45],101:[2,45],102:[2,45],103:[2,45],104:[2,45],105:[2,45],106:[2,45],107:[2,45],108:[2,45],109:[2,45],110:[2,45],111:[2,45],112:[2,45],113:[2,45],114:[2,45],115:[2,45],116:[2,45],117:[2,45],118:[2,45],119:[2,45],120:[2,45],121:[2,45],122:[2,45],123:[2,45],124:[2,45],125:[2,45],126:[2,45],127:[2,45],128:[2,45],129:[2,45],130:[2,45],131:[2,45],132:[2,45],135:[2,45],137:[2,45],138:[2,45],141:[2,45],143:[2,45],145:[2,45],147:[2,45],149:[2,45],151:[2,45],153:[2,45],155:[2,45],157:[2,
-45],159:[2,45],161:[2,45],162:[2,45],169:[2,45],170:[2,45],175:[2,45],176:[2,45],177:[2,45],178:[2,45],179:[2,45],180:[2,45],181:[2,45]},{68:[2,209],191:[2,209],193:[2,209],195:[2,209],197:[2,209],199:[2,209]},{68:[2,210],191:[2,210],193:[2,210],195:[2,210],197:[2,210],199:[2,210]},{68:[2,211],191:[2,211],193:[2,211],195:[2,211],197:[2,211],199:[2,211]},{10:[1,299]},{6:[2,158],8:[2,158],10:[2,158],49:[2,158],50:[2,158],51:[2,158],53:[2,158],56:[2,158],57:[2,158],58:[2,158],59:[2,158],60:[2,158],61:[2,
-158],62:[2,158],63:[2,158],64:[2,158],65:[2,158],66:[2,158],67:[2,158],68:[2,158],69:[2,158],70:[2,158],71:[2,158],72:[2,158],73:[2,158],74:[2,158],75:[2,158],76:[2,158],77:[2,158],78:[2,158],79:[2,158],81:[2,158],82:[2,158],83:[2,158],84:[2,158],85:[2,158],86:[2,158],87:[2,158],88:[2,158],89:[2,158],90:[2,158],91:[2,158],92:[2,158],93:[2,158],94:[2,158],95:[2,158],96:[2,158],97:[2,158],98:[2,158],99:[2,158],100:[2,158],101:[2,158],102:[2,158],103:[2,158],104:[2,158],105:[2,158],106:[2,158],107:[2,
-158],108:[2,158],109:[2,158],110:[2,158],111:[2,158],112:[2,158],113:[2,158],114:[2,158],115:[2,158],116:[2,158],117:[2,158],118:[2,158],119:[2,158],120:[2,158],121:[2,158],122:[2,158],123:[2,158],124:[2,158],125:[2,158],126:[2,158],127:[2,158],128:[2,158],129:[2,158],130:[2,158],131:[2,158],132:[2,158],135:[2,158],137:[2,158],138:[2,158],140:[2,158],141:[2,158],142:[2,158],143:[2,158],144:[2,158],145:[2,158],146:[2,158],147:[2,158],148:[2,158],149:[2,158],150:[2,158],151:[2,158],152:[2,158],153:[2,
-158],154:[2,158],155:[2,158],156:[2,158],157:[2,158],158:[2,158],159:[2,158],160:[2,158],161:[2,158],162:[2,158],165:[1,238],166:[1,239],169:[2,158],170:[2,158],173:300,185:[2,158],188:[2,158],194:[2,158],196:[2,158],198:[2,158],200:[2,158]},{136:301,165:[1,238],166:[1,239],173:237},{6:[2,182],8:[2,182],10:[2,182],49:[2,182],50:[2,182],51:[2,182],53:[2,182],56:[2,182],57:[2,182],58:[2,182],59:[2,182],60:[2,182],61:[2,182],62:[2,182],63:[2,182],64:[2,182],65:[2,182],66:[2,182],67:[2,182],68:[2,182],
-69:[2,182],70:[2,182],71:[2,182],72:[2,182],73:[2,182],74:[2,182],75:[2,182],76:[2,182],77:[2,182],78:[2,182],79:[2,182],81:[2,182],82:[2,182],83:[2,182],84:[2,182],85:[2,182],86:[2,182],87:[2,182],88:[2,182],89:[2,182],90:[2,182],91:[2,182],92:[2,182],93:[2,182],94:[2,182],95:[2,182],96:[2,182],97:[2,182],98:[2,182],99:[2,182],100:[2,182],101:[2,182],102:[2,182],103:[2,182],104:[2,182],105:[2,182],106:[2,182],107:[2,182],108:[2,182],109:[2,182],110:[2,182],111:[2,182],112:[2,182],113:[2,182],114:[2,
-182],115:[2,182],116:[2,182],117:[2,182],118:[2,182],119:[2,182],120:[2,182],121:[2,182],122:[2,182],123:[2,182],124:[2,182],125:[2,182],126:[2,182],127:[2,182],128:[2,182],129:[2,182],130:[2,182],131:[2,182],132:[2,182],135:[2,182],137:[2,182],138:[2,182],140:[2,182],141:[2,182],142:[2,182],143:[2,182],144:[2,182],145:[2,182],146:[2,182],147:[2,182],148:[2,182],149:[2,182],150:[2,182],151:[2,182],152:[2,182],153:[2,182],154:[2,182],155:[2,182],156:[2,182],157:[2,182],158:[2,182],159:[2,182],160:[2,
-182],161:[2,182],162:[2,182],165:[2,182],166:[2,182],169:[2,182],170:[2,182],185:[2,182],188:[2,182],194:[2,182],196:[2,182],198:[2,182],200:[2,182]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:304,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],
-90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],
-141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],166:[1,303],168:305,169:[1,117],170:[1,118],172:302},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:304,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],
-85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],
-132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],168:305,169:[1,117],170:[1,118],172:306},{8:[1,236]},{6:[2,163],8:[2,163],10:[2,163],49:[2,163],50:[2,163],51:[2,163],53:[2,163],56:[2,163],57:[2,163],58:[2,163],59:[2,163],60:[2,163],61:[2,163],62:[2,163],63:[2,163],64:[2,163],65:[2,163],66:[2,163],67:[2,163],68:[2,163],69:[2,163],70:[2,163],71:[2,163],72:[2,
-163],73:[2,163],74:[2,163],75:[2,163],76:[2,163],77:[2,163],78:[2,163],79:[2,163],81:[2,163],82:[2,163],83:[2,163],84:[2,163],85:[2,163],86:[2,163],87:[2,163],88:[2,163],89:[2,163],90:[2,163],91:[2,163],92:[2,163],93:[2,163],94:[2,163],95:[2,163],96:[2,163],97:[2,163],98:[2,163],99:[2,163],100:[2,163],101:[2,163],102:[2,163],103:[2,163],104:[2,163],105:[2,163],106:[2,163],107:[2,163],108:[2,163],109:[2,163],110:[2,163],111:[2,163],112:[2,163],113:[2,163],114:[2,163],115:[2,163],116:[2,163],117:[2,
-163],118:[2,163],119:[2,163],120:[2,163],121:[2,163],122:[2,163],123:[2,163],124:[2,163],125:[2,163],126:[2,163],127:[2,163],128:[2,163],129:[2,163],130:[2,163],131:[2,163],132:[2,163],135:[2,163],137:[2,163],138:[2,163],140:[2,163],141:[2,163],142:[2,163],143:[2,163],144:[2,163],145:[2,163],146:[2,163],147:[2,163],148:[2,163],149:[2,163],150:[2,163],151:[2,163],152:[2,163],153:[2,163],154:[2,163],155:[2,163],156:[2,163],157:[2,163],158:[2,163],159:[2,163],160:[2,163],161:[2,163],162:[2,163],166:[1,
-307],167:[1,308],169:[2,163],170:[2,163],185:[2,163],188:[2,163],194:[2,163],196:[2,163],198:[2,163],200:[2,163]},{6:[2,164],8:[2,164],10:[2,164],49:[2,164],50:[2,164],51:[2,164],53:[2,164],56:[2,164],57:[2,164],58:[2,164],59:[2,164],60:[2,164],61:[2,164],62:[2,164],63:[2,164],64:[2,164],65:[2,164],66:[2,164],67:[2,164],68:[2,164],69:[2,164],70:[2,164],71:[2,164],72:[2,164],73:[2,164],74:[2,164],75:[2,164],76:[2,164],77:[2,164],78:[2,164],79:[2,164],81:[2,164],82:[2,164],83:[2,164],84:[2,164],85:[2,
-164],86:[2,164],87:[2,164],88:[2,164],89:[2,164],90:[2,164],91:[2,164],92:[2,164],93:[2,164],94:[2,164],95:[2,164],96:[2,164],97:[2,164],98:[2,164],99:[2,164],100:[2,164],101:[2,164],102:[2,164],103:[2,164],104:[2,164],105:[2,164],106:[2,164],107:[2,164],108:[2,164],109:[2,164],110:[2,164],111:[2,164],112:[2,164],113:[2,164],114:[2,164],115:[2,164],116:[2,164],117:[2,164],118:[2,164],119:[2,164],120:[2,164],121:[2,164],122:[2,164],123:[2,164],124:[2,164],125:[2,164],126:[2,164],127:[2,164],128:[2,
-164],129:[2,164],130:[2,164],131:[2,164],132:[2,164],135:[2,164],137:[2,164],138:[2,164],140:[2,164],141:[2,164],142:[2,164],143:[2,164],144:[2,164],145:[2,164],146:[2,164],147:[2,164],148:[2,164],149:[2,164],150:[2,164],151:[2,164],152:[2,164],153:[2,164],154:[2,164],155:[2,164],156:[2,164],157:[2,164],158:[2,164],159:[2,164],160:[2,164],161:[2,164],162:[2,164],165:[1,309],169:[2,164],170:[2,164],185:[2,164],188:[2,164],194:[2,164],196:[2,164],198:[2,164],200:[2,164]},{8:[1,26],48:35,49:[1,119],
-50:[1,47],51:[1,43],54:310,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],
-107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,169],8:[2,169],10:[2,169],
-49:[2,169],50:[2,169],51:[2,169],53:[2,169],56:[2,169],57:[2,169],58:[2,169],59:[2,169],60:[2,169],61:[2,169],62:[2,169],63:[2,169],64:[2,169],65:[2,169],66:[2,169],67:[2,169],68:[2,169],69:[2,169],70:[2,169],71:[2,169],72:[2,169],73:[2,169],74:[2,169],75:[2,169],76:[2,169],77:[2,169],78:[2,169],79:[2,169],81:[2,169],82:[2,169],83:[2,169],84:[2,169],85:[2,169],86:[2,169],87:[2,169],88:[2,169],89:[2,169],90:[2,169],91:[2,169],92:[2,169],93:[2,169],94:[2,169],95:[2,169],96:[2,169],97:[2,169],98:[2,
-169],99:[2,169],100:[2,169],101:[2,169],102:[2,169],103:[2,169],104:[2,169],105:[2,169],106:[2,169],107:[2,169],108:[2,169],109:[2,169],110:[2,169],111:[2,169],112:[2,169],113:[2,169],114:[2,169],115:[2,169],116:[2,169],117:[2,169],118:[2,169],119:[2,169],120:[2,169],121:[2,169],122:[2,169],123:[2,169],124:[2,169],125:[2,169],126:[2,169],127:[2,169],128:[2,169],129:[2,169],130:[2,169],131:[2,169],132:[2,169],135:[2,169],137:[2,169],138:[2,169],140:[2,169],141:[2,169],142:[2,169],143:[2,169],144:[2,
-169],145:[2,169],146:[2,169],147:[2,169],148:[2,169],149:[2,169],150:[2,169],151:[2,169],152:[2,169],153:[2,169],154:[2,169],155:[2,169],156:[2,169],157:[2,169],158:[2,169],159:[2,169],160:[2,169],161:[2,169],162:[2,169],166:[1,311],169:[2,169],170:[2,169],185:[2,169],188:[2,169],194:[2,169],196:[2,169],198:[2,169],200:[2,169]},{6:[2,170],8:[2,170],10:[2,170],49:[2,170],50:[2,170],51:[2,170],53:[2,170],56:[2,170],57:[2,170],58:[2,170],59:[2,170],60:[2,170],61:[2,170],62:[2,170],63:[2,170],64:[2,170],
-65:[2,170],66:[2,170],67:[2,170],68:[2,170],69:[2,170],70:[2,170],71:[2,170],72:[2,170],73:[2,170],74:[2,170],75:[2,170],76:[2,170],77:[2,170],78:[2,170],79:[2,170],81:[2,170],82:[2,170],83:[2,170],84:[2,170],85:[2,170],86:[2,170],87:[2,170],88:[2,170],89:[2,170],90:[2,170],91:[2,170],92:[2,170],93:[2,170],94:[2,170],95:[2,170],96:[2,170],97:[2,170],98:[2,170],99:[2,170],100:[2,170],101:[2,170],102:[2,170],103:[2,170],104:[2,170],105:[2,170],106:[2,170],107:[2,170],108:[2,170],109:[2,170],110:[2,
-170],111:[2,170],112:[2,170],113:[2,170],114:[2,170],115:[2,170],116:[2,170],117:[2,170],118:[2,170],119:[2,170],120:[2,170],121:[2,170],122:[2,170],123:[2,170],124:[2,170],125:[2,170],126:[2,170],127:[2,170],128:[2,170],129:[2,170],130:[2,170],131:[2,170],132:[2,170],135:[2,170],137:[2,170],138:[2,170],140:[2,170],141:[2,170],142:[2,170],143:[2,170],144:[2,170],145:[2,170],146:[2,170],147:[2,170],148:[2,170],149:[2,170],150:[2,170],151:[2,170],152:[2,170],153:[2,170],154:[2,170],155:[2,170],156:[2,
-170],157:[2,170],158:[2,170],159:[2,170],160:[2,170],161:[2,170],162:[2,170],165:[1,312],169:[2,170],170:[2,170],185:[2,170],188:[2,170],194:[2,170],196:[2,170],198:[2,170],200:[2,170]},{6:[2,49],8:[2,49],10:[2,49],49:[2,49],50:[2,49],51:[2,49],53:[2,49],56:[2,49],57:[2,49],58:[2,49],59:[2,49],60:[2,49],61:[2,49],62:[2,49],63:[2,49],64:[2,49],65:[2,49],66:[2,49],67:[2,49],68:[2,49],69:[2,49],70:[2,49],71:[2,49],72:[2,49],73:[2,49],74:[2,49],75:[2,49],76:[2,49],77:[2,49],78:[2,49],79:[2,49],81:[2,
-49],82:[2,49],83:[2,49],84:[2,49],85:[2,49],86:[2,49],87:[2,49],88:[2,49],89:[2,49],90:[2,49],91:[2,49],92:[2,49],93:[2,49],94:[2,49],95:[2,49],96:[2,49],97:[2,49],98:[2,49],99:[2,49],100:[2,49],101:[2,49],102:[2,49],103:[2,49],104:[2,49],105:[2,49],106:[2,49],107:[2,49],108:[2,49],109:[2,49],110:[2,49],111:[2,49],112:[2,49],113:[2,49],114:[2,49],115:[2,49],116:[2,49],117:[2,49],118:[2,49],119:[2,49],120:[2,49],121:[2,49],122:[2,49],123:[2,49],124:[2,49],125:[2,49],126:[2,49],127:[2,49],128:[2,49],
-129:[2,49],130:[2,49],131:[2,49],132:[2,49],134:[2,49],135:[2,49],137:[2,49],138:[2,49],140:[2,49],141:[2,49],142:[2,49],143:[2,49],144:[2,49],145:[2,49],146:[2,49],147:[2,49],148:[2,49],149:[2,49],150:[2,49],151:[2,49],152:[2,49],153:[2,49],154:[2,49],155:[2,49],156:[2,49],157:[2,49],158:[2,49],159:[2,49],160:[2,49],161:[2,49],162:[2,49],165:[2,49],166:[2,49],167:[2,49],169:[2,49],170:[2,49],185:[2,49],188:[2,49],194:[2,49],196:[2,49],198:[2,49],200:[2,49]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,
-43],54:24,55:313,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,
-77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,
-174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:314,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,
-65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],
-151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:315,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],
-83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,
-100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{6:[2,58],8:[2,58],10:[2,58],49:[2,58],50:[2,58],51:[2,58],53:[2,58],56:[2,58],57:[2,58],58:[2,58],59:[2,58],60:[2,58],61:[2,58],62:[2,58],63:[2,58],64:[2,58],65:[2,
-58],66:[2,58],67:[2,58],68:[2,58],69:[2,58],70:[2,58],71:[2,58],72:[2,58],73:[2,58],74:[2,58],75:[2,58],76:[2,58],77:[2,58],78:[2,58],79:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58],86:[2,58],87:[2,58],88:[2,58],89:[2,58],90:[2,58],91:[2,58],92:[2,58],93:[2,58],94:[2,58],95:[2,58],96:[2,58],97:[2,58],98:[2,58],99:[2,58],100:[2,58],101:[2,58],102:[2,58],103:[2,58],104:[2,58],105:[2,58],106:[2,58],107:[2,58],108:[2,58],109:[2,58],110:[2,58],111:[2,58],112:[2,58],113:[2,58],114:[2,58],115:[2,
-58],116:[2,58],117:[2,58],118:[2,58],119:[2,58],120:[2,58],121:[2,58],122:[2,58],123:[2,58],124:[2,58],125:[2,58],126:[2,58],127:[2,58],128:[2,58],129:[2,58],130:[2,58],131:[2,58],132:[2,58],134:[2,58],135:[2,58],137:[2,58],138:[2,58],140:[2,58],141:[2,58],142:[2,58],143:[2,58],144:[2,58],145:[2,58],146:[2,58],147:[2,58],148:[2,58],149:[2,58],150:[2,58],151:[2,58],152:[2,58],153:[2,58],154:[2,58],155:[2,58],156:[2,58],157:[2,58],158:[2,58],159:[2,58],160:[2,58],161:[2,58],162:[2,58],165:[2,58],166:[2,
-58],167:[2,58],169:[2,58],170:[2,58],185:[2,58],188:[2,58],194:[2,58],196:[2,58],198:[2,58],200:[2,58]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:316,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],
-94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,
-108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:317,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],
-81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,
-98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:318,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,
-36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],
-117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{50:[1,319],51:[1,
-320]},{7:150,8:[1,129],15:321},{6:[1,322]},{6:[2,86],8:[2,86],10:[2,86],49:[2,86],50:[2,86],51:[2,86],53:[2,86],56:[2,86],57:[2,86],58:[2,86],59:[2,86],60:[2,86],61:[2,86],62:[2,86],63:[2,86],64:[2,86],65:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],70:[2,86],71:[2,86],72:[2,86],73:[2,86],74:[2,86],75:[2,86],76:[2,86],77:[2,86],78:[2,86],79:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86],86:[2,86],87:[2,86],88:[2,86],89:[2,86],90:[2,86],91:[2,86],92:[2,86],93:[2,86],94:[2,86],95:[2,86],
-96:[2,86],97:[2,86],98:[2,86],99:[2,86],100:[2,86],101:[2,86],102:[2,86],103:[2,86],104:[2,86],105:[2,86],106:[2,86],107:[2,86],108:[2,86],109:[2,86],110:[2,86],111:[2,86],112:[2,86],113:[2,86],114:[2,86],115:[2,86],116:[2,86],117:[2,86],118:[2,86],119:[2,86],120:[2,86],121:[2,86],122:[2,86],123:[2,86],124:[2,86],125:[2,86],126:[2,86],127:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],134:[2,86],135:[2,86],137:[2,86],138:[2,86],140:[2,86],141:[2,86],142:[2,86],143:[2,86],144:[2,86],
-145:[2,86],146:[2,86],147:[2,86],148:[2,86],149:[2,86],150:[2,86],151:[2,86],152:[2,86],153:[2,86],154:[2,86],155:[2,86],156:[2,86],157:[2,86],158:[2,86],159:[2,86],160:[2,86],161:[2,86],162:[2,86],165:[2,86],166:[2,86],167:[2,86],169:[2,86],170:[2,86],185:[2,86],188:[2,86],194:[2,86],196:[2,86],198:[2,86],200:[2,86]},{6:[2,87],8:[2,87],10:[2,87],49:[2,87],50:[2,87],51:[2,87],53:[2,87],56:[2,87],57:[2,87],58:[2,87],59:[2,87],60:[2,87],61:[2,87],62:[2,87],63:[2,87],64:[2,87],65:[2,87],66:[2,87],67:[2,
-87],68:[2,87],69:[2,87],70:[2,87],71:[2,87],72:[2,87],73:[2,87],74:[2,87],75:[2,87],76:[2,87],77:[2,87],78:[2,87],79:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87],86:[2,87],87:[2,87],88:[2,87],89:[2,87],90:[2,87],91:[2,87],92:[2,87],93:[2,87],94:[2,87],95:[2,87],96:[2,87],97:[2,87],98:[2,87],99:[2,87],100:[2,87],101:[2,87],102:[2,87],103:[2,87],104:[2,87],105:[2,87],106:[2,87],107:[2,87],108:[2,87],109:[2,87],110:[2,87],111:[2,87],112:[2,87],113:[2,87],114:[2,87],115:[2,87],116:[2,87],
-117:[2,87],118:[2,87],119:[2,87],120:[2,87],121:[2,87],122:[2,87],123:[2,87],124:[2,87],125:[2,87],126:[2,87],127:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],134:[2,87],135:[2,87],137:[2,87],138:[2,87],140:[2,87],141:[2,87],142:[2,87],143:[2,87],144:[2,87],145:[2,87],146:[2,87],147:[2,87],148:[2,87],149:[2,87],150:[2,87],151:[2,87],152:[2,87],153:[2,87],154:[2,87],155:[2,87],156:[2,87],157:[2,87],158:[2,87],159:[2,87],160:[2,87],161:[2,87],162:[2,87],165:[2,87],166:[2,87],167:[2,
-87],169:[2,87],170:[2,87],185:[2,87],188:[2,87],194:[2,87],196:[2,87],198:[2,87],200:[2,87]},{6:[1,323]},{6:[2,90],8:[2,90],10:[2,90],49:[2,90],50:[2,90],51:[2,90],53:[2,90],56:[2,90],57:[2,90],58:[2,90],59:[2,90],60:[2,90],61:[2,90],62:[2,90],63:[2,90],64:[2,90],65:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],70:[2,90],71:[2,90],72:[2,90],73:[2,90],74:[2,90],75:[2,90],76:[2,90],77:[2,90],78:[2,90],79:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90],86:[2,90],87:[2,90],88:[2,90],89:[2,90],
-90:[2,90],91:[2,90],92:[2,90],93:[2,90],94:[2,90],95:[2,90],96:[2,90],97:[2,90],98:[2,90],99:[2,90],100:[2,90],101:[2,90],102:[2,90],103:[2,90],104:[2,90],105:[2,90],106:[2,90],107:[2,90],108:[2,90],109:[2,90],110:[2,90],111:[2,90],112:[2,90],113:[2,90],114:[2,90],115:[2,90],116:[2,90],117:[2,90],118:[2,90],119:[2,90],120:[2,90],121:[2,90],122:[2,90],123:[2,90],124:[2,90],125:[2,90],126:[2,90],127:[2,90],128:[2,90],129:[2,90],130:[2,90],131:[2,90],132:[2,90],134:[2,90],135:[2,90],137:[2,90],138:[2,
-90],140:[2,90],141:[2,90],142:[2,90],143:[2,90],144:[2,90],145:[2,90],146:[2,90],147:[2,90],148:[2,90],149:[2,90],150:[2,90],151:[2,90],152:[2,90],153:[2,90],154:[2,90],155:[2,90],156:[2,90],157:[2,90],158:[2,90],159:[2,90],160:[2,90],161:[2,90],162:[2,90],165:[2,90],166:[2,90],167:[2,90],169:[2,90],170:[2,90],185:[2,90],188:[2,90],194:[2,90],196:[2,90],198:[2,90],200:[2,90]},{6:[2,91],8:[2,91],10:[2,91],49:[2,91],50:[2,91],51:[2,91],53:[2,91],56:[2,91],57:[2,91],58:[2,91],59:[2,91],60:[2,91],61:[2,
-91],62:[2,91],63:[2,91],64:[2,91],65:[2,91],66:[2,91],67:[2,91],68:[2,91],69:[2,91],70:[2,91],71:[2,91],72:[2,91],73:[2,91],74:[2,91],75:[2,91],76:[2,91],77:[2,91],78:[2,91],79:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91],86:[2,91],87:[2,91],88:[2,91],89:[2,91],90:[2,91],91:[2,91],92:[2,91],93:[2,91],94:[2,91],95:[2,91],96:[2,91],97:[2,91],98:[2,91],99:[2,91],100:[2,91],101:[2,91],102:[2,91],103:[2,91],104:[2,91],105:[2,91],106:[2,91],107:[2,91],108:[2,91],109:[2,91],110:[2,91],111:[2,
-91],112:[2,91],113:[2,91],114:[2,91],115:[2,91],116:[2,91],117:[2,91],118:[2,91],119:[2,91],120:[2,91],121:[2,91],122:[2,91],123:[2,91],124:[2,91],125:[2,91],126:[2,91],127:[2,91],128:[2,91],129:[2,91],130:[2,91],131:[2,91],132:[2,91],134:[2,91],135:[2,91],137:[2,91],138:[2,91],140:[2,91],141:[2,91],142:[2,91],143:[2,91],144:[2,91],145:[2,91],146:[2,91],147:[2,91],148:[2,91],149:[2,91],150:[2,91],151:[2,91],152:[2,91],153:[2,91],154:[2,91],155:[2,91],156:[2,91],157:[2,91],158:[2,91],159:[2,91],160:[2,
-91],161:[2,91],162:[2,91],165:[2,91],166:[2,91],167:[2,91],169:[2,91],170:[2,91],185:[2,91],188:[2,91],194:[2,91],196:[2,91],198:[2,91],200:[2,91]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:324,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],
-90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],
-141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[1,325]},{6:[2,99],8:[2,99],10:[2,99],49:[2,99],50:[2,99],51:[2,99],53:[2,99],56:[2,99],57:[2,99],58:[2,99],59:[2,99],60:[2,99],61:[2,99],62:[2,99],63:[2,99],64:[2,99],65:[2,99],66:[2,99],67:[2,99],68:[2,99],69:[2,99],70:[2,99],71:[2,99],72:[2,99],73:[2,99],74:[2,99],75:[2,99],76:[2,99],77:[2,99],78:[2,99],79:[2,99],81:[2,99],82:[2,99],83:[2,99],84:[2,
-99],85:[2,99],86:[2,99],87:[2,99],88:[2,99],89:[2,99],90:[2,99],91:[2,99],92:[2,99],93:[2,99],94:[2,99],95:[2,99],96:[2,99],97:[2,99],98:[2,99],99:[2,99],100:[2,99],101:[2,99],102:[2,99],103:[2,99],104:[2,99],105:[2,99],106:[2,99],107:[2,99],108:[2,99],109:[2,99],110:[2,99],111:[2,99],112:[2,99],113:[2,99],114:[2,99],115:[2,99],116:[2,99],117:[2,99],118:[2,99],119:[2,99],120:[2,99],121:[2,99],122:[2,99],123:[2,99],124:[2,99],125:[2,99],126:[2,99],127:[2,99],128:[2,99],129:[2,99],130:[2,99],131:[2,
-99],132:[2,99],134:[2,99],135:[2,99],137:[2,99],138:[2,99],140:[2,99],141:[2,99],142:[2,99],143:[2,99],144:[2,99],145:[2,99],146:[2,99],147:[2,99],148:[2,99],149:[2,99],150:[2,99],151:[2,99],152:[2,99],153:[2,99],154:[2,99],155:[2,99],156:[2,99],157:[2,99],158:[2,99],159:[2,99],160:[2,99],161:[2,99],162:[2,99],165:[2,99],166:[2,99],167:[2,99],169:[2,99],170:[2,99],185:[2,99],188:[2,99],194:[2,99],196:[2,99],198:[2,99],200:[2,99]},{6:[2,100],8:[2,100],10:[2,100],49:[2,100],50:[2,100],51:[2,100],53:[2,
-100],56:[2,100],57:[2,100],58:[2,100],59:[2,100],60:[2,100],61:[2,100],62:[2,100],63:[2,100],64:[2,100],65:[2,100],66:[2,100],67:[2,100],68:[2,100],69:[2,100],70:[2,100],71:[2,100],72:[2,100],73:[2,100],74:[2,100],75:[2,100],76:[2,100],77:[2,100],78:[2,100],79:[2,100],81:[2,100],82:[2,100],83:[2,100],84:[2,100],85:[2,100],86:[2,100],87:[2,100],88:[2,100],89:[2,100],90:[2,100],91:[2,100],92:[2,100],93:[2,100],94:[2,100],95:[2,100],96:[2,100],97:[2,100],98:[2,100],99:[2,100],100:[2,100],101:[2,100],
-102:[2,100],103:[2,100],104:[2,100],105:[2,100],106:[2,100],107:[2,100],108:[2,100],109:[2,100],110:[2,100],111:[2,100],112:[2,100],113:[2,100],114:[2,100],115:[2,100],116:[2,100],117:[2,100],118:[2,100],119:[2,100],120:[2,100],121:[2,100],122:[2,100],123:[2,100],124:[2,100],125:[2,100],126:[2,100],127:[2,100],128:[2,100],129:[2,100],130:[2,100],131:[2,100],132:[2,100],134:[2,100],135:[2,100],137:[2,100],138:[2,100],140:[2,100],141:[2,100],142:[2,100],143:[2,100],144:[2,100],145:[2,100],146:[2,100],
-147:[2,100],148:[2,100],149:[2,100],150:[2,100],151:[2,100],152:[2,100],153:[2,100],154:[2,100],155:[2,100],156:[2,100],157:[2,100],158:[2,100],159:[2,100],160:[2,100],161:[2,100],162:[2,100],165:[2,100],166:[2,100],167:[2,100],169:[2,100],170:[2,100],185:[2,100],188:[2,100],194:[2,100],196:[2,100],198:[2,100],200:[2,100]},{6:[2,101],8:[2,101],10:[2,101],49:[2,101],50:[2,101],51:[2,101],53:[2,101],56:[2,101],57:[2,101],58:[2,101],59:[2,101],60:[2,101],61:[2,101],62:[2,101],63:[2,101],64:[2,101],65:[2,
-101],66:[2,101],67:[2,101],68:[2,101],69:[2,101],70:[2,101],71:[2,101],72:[2,101],73:[2,101],74:[2,101],75:[2,101],76:[2,101],77:[2,101],78:[2,101],79:[2,101],81:[2,101],82:[2,101],83:[2,101],84:[2,101],85:[2,101],86:[2,101],87:[2,101],88:[2,101],89:[2,101],90:[2,101],91:[2,101],92:[2,101],93:[2,101],94:[2,101],95:[2,101],96:[2,101],97:[2,101],98:[2,101],99:[2,101],100:[2,101],101:[2,101],102:[2,101],103:[2,101],104:[2,101],105:[2,101],106:[2,101],107:[2,101],108:[2,101],109:[2,101],110:[2,101],111:[2,
-101],112:[2,101],113:[2,101],114:[2,101],115:[2,101],116:[2,101],117:[2,101],118:[2,101],119:[2,101],120:[2,101],121:[2,101],122:[2,101],123:[2,101],124:[2,101],125:[2,101],126:[2,101],127:[2,101],128:[2,101],129:[2,101],130:[2,101],131:[2,101],132:[2,101],134:[2,101],135:[2,101],137:[2,101],138:[2,101],140:[2,101],141:[2,101],142:[2,101],143:[2,101],144:[2,101],145:[2,101],146:[2,101],147:[2,101],148:[2,101],149:[2,101],150:[2,101],151:[2,101],152:[2,101],153:[2,101],154:[2,101],155:[2,101],156:[2,
-101],157:[2,101],158:[2,101],159:[2,101],160:[2,101],161:[2,101],162:[2,101],165:[2,101],166:[2,101],167:[2,101],169:[2,101],170:[2,101],185:[2,101],188:[2,101],194:[2,101],196:[2,101],198:[2,101],200:[2,101]},{7:326,8:[1,129]},{4:[1,270],8:[1,26],11:327,48:35,49:[1,119],50:[1,47],51:[1,43],54:328,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,
-50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],
-128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,121],8:[2,121],10:[2,121],49:[2,121],50:[2,121],51:[2,121],53:[2,121],56:[2,121],57:[2,121],58:[2,121],59:[2,121],60:[2,121],61:[2,121],62:[2,121],63:[2,121],64:[2,121],65:[2,121],66:[2,121],67:[2,121],68:[2,121],69:[2,121],70:[2,121],71:[2,121],72:[2,121],
-73:[2,121],74:[2,121],75:[2,121],76:[2,121],77:[2,121],78:[2,121],79:[2,121],81:[2,121],82:[2,121],83:[2,121],84:[2,121],85:[2,121],86:[2,121],87:[2,121],88:[2,121],89:[2,121],90:[2,121],91:[2,121],92:[2,121],93:[2,121],94:[2,121],95:[2,121],96:[2,121],97:[2,121],98:[2,121],99:[2,121],100:[2,121],101:[2,121],102:[2,121],103:[2,121],104:[2,121],105:[2,121],106:[2,121],107:[2,121],108:[2,121],109:[2,121],110:[2,121],111:[2,121],112:[2,121],113:[2,121],114:[2,121],115:[2,121],116:[2,121],117:[2,121],
-118:[2,121],119:[2,121],120:[2,121],121:[2,121],122:[2,121],123:[2,121],124:[2,121],125:[2,121],126:[2,121],127:[2,121],128:[2,121],129:[2,121],130:[2,121],131:[2,121],132:[2,121],134:[2,121],135:[2,121],137:[2,121],138:[2,121],140:[2,121],141:[2,121],142:[2,121],143:[2,121],144:[2,121],145:[2,121],146:[2,121],147:[2,121],148:[2,121],149:[2,121],150:[2,121],151:[2,121],152:[2,121],153:[2,121],154:[2,121],155:[2,121],156:[2,121],157:[2,121],158:[2,121],159:[2,121],160:[2,121],161:[2,121],162:[2,121],
-165:[2,121],166:[2,121],167:[2,121],169:[2,121],170:[2,121],185:[2,121],188:[2,121],194:[2,121],196:[2,121],198:[2,121],200:[2,121]},{5:[1,329]},{10:[1,330]},{6:[2,132],8:[2,132],10:[2,132],49:[2,132],50:[2,132],51:[2,132],53:[2,132],56:[2,132],57:[2,132],58:[2,132],59:[2,132],60:[2,132],61:[2,132],62:[2,132],63:[2,132],64:[2,132],65:[2,132],66:[2,132],67:[2,132],68:[2,132],69:[2,132],70:[2,132],71:[2,132],72:[2,132],73:[2,132],74:[2,132],75:[2,132],76:[2,132],77:[2,132],78:[2,132],79:[2,132],81:[2,
-132],82:[2,132],83:[2,132],84:[2,132],85:[2,132],86:[2,132],87:[2,132],88:[2,132],89:[2,132],90:[2,132],91:[2,132],92:[2,132],93:[2,132],94:[2,132],95:[2,132],96:[2,132],97:[2,132],98:[2,132],99:[2,132],100:[2,132],101:[2,132],102:[2,132],103:[2,132],104:[2,132],105:[2,132],106:[2,132],107:[2,132],108:[2,132],109:[2,132],110:[2,132],111:[2,132],112:[2,132],113:[2,132],114:[2,132],115:[2,132],116:[2,132],117:[2,132],118:[2,132],119:[2,132],120:[2,132],121:[2,132],122:[2,132],123:[2,132],124:[2,132],
-125:[2,132],126:[2,132],127:[2,132],128:[2,132],129:[2,132],130:[2,132],131:[2,132],132:[2,132],134:[2,132],135:[2,132],137:[2,132],138:[2,132],140:[2,132],141:[2,132],142:[2,132],143:[2,132],144:[2,132],145:[2,132],146:[2,132],147:[2,132],148:[2,132],149:[2,132],150:[2,132],151:[2,132],152:[2,132],153:[2,132],154:[2,132],155:[2,132],156:[2,132],157:[2,132],158:[2,132],159:[2,132],160:[2,132],161:[2,132],162:[2,132],165:[2,132],166:[2,132],167:[2,132],169:[2,132],170:[2,132],185:[2,132],188:[2,132],
-194:[2,132],196:[2,132],198:[2,132],200:[2,132]},{6:[2,133],8:[2,133],10:[2,133],49:[2,133],50:[2,133],51:[2,133],53:[2,133],56:[2,133],57:[2,133],58:[2,133],59:[2,133],60:[2,133],61:[2,133],62:[2,133],63:[2,133],64:[2,133],65:[2,133],66:[2,133],67:[2,133],68:[2,133],69:[2,133],70:[2,133],71:[2,133],72:[2,133],73:[2,133],74:[2,133],75:[2,133],76:[2,133],77:[2,133],78:[2,133],79:[2,133],81:[2,133],82:[2,133],83:[2,133],84:[2,133],85:[2,133],86:[2,133],87:[2,133],88:[2,133],89:[2,133],90:[2,133],91:[2,
-133],92:[2,133],93:[2,133],94:[2,133],95:[2,133],96:[2,133],97:[2,133],98:[2,133],99:[2,133],100:[2,133],101:[2,133],102:[2,133],103:[2,133],104:[2,133],105:[2,133],106:[2,133],107:[2,133],108:[2,133],109:[2,133],110:[2,133],111:[2,133],112:[2,133],113:[2,133],114:[2,133],115:[2,133],116:[2,133],117:[2,133],118:[2,133],119:[2,133],120:[2,133],121:[2,133],122:[2,133],123:[2,133],124:[2,133],125:[2,133],126:[2,133],127:[2,133],128:[2,133],129:[2,133],130:[2,133],131:[2,133],132:[2,133],134:[2,133],
-135:[2,133],137:[2,133],138:[2,133],140:[2,133],141:[2,133],142:[2,133],143:[2,133],144:[2,133],145:[2,133],146:[2,133],147:[2,133],148:[2,133],149:[2,133],150:[2,133],151:[2,133],152:[2,133],153:[2,133],154:[2,133],155:[2,133],156:[2,133],157:[2,133],158:[2,133],159:[2,133],160:[2,133],161:[2,133],162:[2,133],165:[2,133],166:[2,133],167:[2,133],169:[2,133],170:[2,133],185:[2,133],188:[2,133],194:[2,133],196:[2,133],198:[2,133],200:[2,133]},{6:[2,134],8:[2,134],10:[2,134],49:[2,134],50:[2,134],51:[2,
-134],53:[2,134],56:[2,134],57:[2,134],58:[2,134],59:[2,134],60:[2,134],61:[2,134],62:[2,134],63:[2,134],64:[2,134],65:[2,134],66:[2,134],67:[2,134],68:[2,134],69:[2,134],70:[2,134],71:[2,134],72:[2,134],73:[2,134],74:[2,134],75:[2,134],76:[2,134],77:[2,134],78:[2,134],79:[2,134],81:[2,134],82:[2,134],83:[2,134],84:[2,134],85:[2,134],86:[2,134],87:[2,134],88:[2,134],89:[2,134],90:[2,134],91:[2,134],92:[2,134],93:[2,134],94:[2,134],95:[2,134],96:[2,134],97:[2,134],98:[2,134],99:[2,134],100:[2,134],
-101:[2,134],102:[2,134],103:[2,134],104:[2,134],105:[2,134],106:[2,134],107:[2,134],108:[2,134],109:[2,134],110:[2,134],111:[2,134],112:[2,134],113:[2,134],114:[2,134],115:[2,134],116:[2,134],117:[2,134],118:[2,134],119:[2,134],120:[2,134],121:[2,134],122:[2,134],123:[2,134],124:[2,134],125:[2,134],126:[2,134],127:[2,134],128:[2,134],129:[2,134],130:[2,134],131:[2,134],132:[2,134],134:[2,134],135:[2,134],137:[2,134],138:[2,134],140:[2,134],141:[2,134],142:[2,134],143:[2,134],144:[2,134],145:[2,134],
-146:[2,134],147:[2,134],148:[2,134],149:[2,134],150:[2,134],151:[2,134],152:[2,134],153:[2,134],154:[2,134],155:[2,134],156:[2,134],157:[2,134],158:[2,134],159:[2,134],160:[2,134],161:[2,134],162:[2,134],165:[2,134],166:[2,134],167:[2,134],169:[2,134],170:[2,134],185:[2,134],188:[2,134],194:[2,134],196:[2,134],198:[2,134],200:[2,134]},{6:[2,135],8:[2,135],10:[2,135],49:[2,135],50:[2,135],51:[2,135],53:[2,135],56:[2,135],57:[2,135],58:[2,135],59:[2,135],60:[2,135],61:[2,135],62:[2,135],63:[2,135],
-64:[2,135],65:[2,135],66:[2,135],67:[2,135],68:[2,135],69:[2,135],70:[2,135],71:[2,135],72:[2,135],73:[2,135],74:[2,135],75:[2,135],76:[2,135],77:[2,135],78:[2,135],79:[2,135],81:[2,135],82:[2,135],83:[2,135],84:[2,135],85:[2,135],86:[2,135],87:[2,135],88:[2,135],89:[2,135],90:[2,135],91:[2,135],92:[2,135],93:[2,135],94:[2,135],95:[2,135],96:[2,135],97:[2,135],98:[2,135],99:[2,135],100:[2,135],101:[2,135],102:[2,135],103:[2,135],104:[2,135],105:[2,135],106:[2,135],107:[2,135],108:[2,135],109:[2,135],
-110:[2,135],111:[2,135],112:[2,135],113:[2,135],114:[2,135],115:[2,135],116:[2,135],117:[2,135],118:[2,135],119:[2,135],120:[2,135],121:[2,135],122:[2,135],123:[2,135],124:[2,135],125:[2,135],126:[2,135],127:[2,135],128:[2,135],129:[2,135],130:[2,135],131:[2,135],132:[2,135],134:[2,135],135:[2,135],137:[2,135],138:[2,135],140:[2,135],141:[2,135],142:[2,135],143:[2,135],144:[2,135],145:[2,135],146:[2,135],147:[2,135],148:[2,135],149:[2,135],150:[2,135],151:[2,135],152:[2,135],153:[2,135],154:[2,135],
-155:[2,135],156:[2,135],157:[2,135],158:[2,135],159:[2,135],160:[2,135],161:[2,135],162:[2,135],165:[2,135],166:[2,135],167:[2,135],169:[2,135],170:[2,135],185:[2,135],188:[2,135],194:[2,135],196:[2,135],198:[2,135],200:[2,135]},{6:[2,136],8:[2,136],10:[2,136],49:[2,136],50:[2,136],51:[2,136],53:[2,136],56:[2,136],57:[2,136],58:[2,136],59:[2,136],60:[2,136],61:[2,136],62:[2,136],63:[2,136],64:[2,136],65:[2,136],66:[2,136],67:[2,136],68:[2,136],69:[2,136],70:[2,136],71:[2,136],72:[2,136],73:[2,136],
-74:[2,136],75:[2,136],76:[2,136],77:[2,136],78:[2,136],79:[2,136],81:[2,136],82:[2,136],83:[2,136],84:[2,136],85:[2,136],86:[2,136],87:[2,136],88:[2,136],89:[2,136],90:[2,136],91:[2,136],92:[2,136],93:[2,136],94:[2,136],95:[2,136],96:[2,136],97:[2,136],98:[2,136],99:[2,136],100:[2,136],101:[2,136],102:[2,136],103:[2,136],104:[2,136],105:[2,136],106:[2,136],107:[2,136],108:[2,136],109:[2,136],110:[2,136],111:[2,136],112:[2,136],113:[2,136],114:[2,136],115:[2,136],116:[2,136],117:[2,136],118:[2,136],
-119:[2,136],120:[2,136],121:[2,136],122:[2,136],123:[2,136],124:[2,136],125:[2,136],126:[2,136],127:[2,136],128:[2,136],129:[2,136],130:[2,136],131:[2,136],132:[2,136],134:[2,136],135:[2,136],137:[2,136],138:[2,136],140:[2,136],141:[2,136],142:[2,136],143:[2,136],144:[2,136],145:[2,136],146:[2,136],147:[2,136],148:[2,136],149:[2,136],150:[2,136],151:[2,136],152:[2,136],153:[2,136],154:[2,136],155:[2,136],156:[2,136],157:[2,136],158:[2,136],159:[2,136],160:[2,136],161:[2,136],162:[2,136],165:[2,136],
-166:[2,136],167:[2,136],169:[2,136],170:[2,136],185:[2,136],188:[2,136],194:[2,136],196:[2,136],198:[2,136],200:[2,136]},{8:[2,157],49:[2,157],50:[2,157],51:[2,157],56:[2,157],57:[2,157],58:[2,157],59:[2,157],60:[2,157],61:[2,157],62:[2,157],63:[2,157],67:[2,157],68:[2,157],69:[2,157],70:[2,157],71:[2,157],72:[2,157],73:[2,157],74:[2,157],75:[2,157],76:[2,157],77:[2,157],78:[2,157],79:[2,157],81:[2,157],82:[2,157],83:[2,157],84:[2,157],85:[2,157],86:[2,157],87:[2,157],88:[2,157],89:[2,157],90:[2,
-157],91:[2,157],92:[2,157],93:[2,157],94:[2,157],95:[2,157],96:[2,157],97:[2,157],98:[2,157],99:[2,157],100:[2,157],101:[2,157],102:[2,157],103:[2,157],104:[2,157],105:[2,157],106:[2,157],107:[2,157],108:[2,157],109:[2,157],110:[2,157],111:[2,157],112:[2,157],113:[2,157],114:[2,157],115:[2,157],116:[2,157],117:[2,157],118:[2,157],119:[2,157],120:[2,157],121:[2,157],122:[2,157],123:[2,157],124:[2,157],125:[2,157],126:[2,157],127:[2,157],128:[2,157],129:[2,157],130:[2,157],131:[2,157],132:[2,157],134:[2,
-157],135:[2,157],137:[2,157],138:[2,157],141:[2,157],143:[2,157],145:[2,157],147:[2,157],149:[2,157],151:[2,157],153:[2,157],155:[2,157],157:[2,157],159:[2,157],161:[2,157],162:[2,157]},{10:[1,331],165:[1,238],166:[1,239],173:300},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:332,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,
-51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],
-129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,141],8:[2,141],10:[2,141],49:[2,141],50:[2,141],51:[2,141],53:[2,141],56:[2,141],57:[2,141],58:[2,141],59:[2,141],60:[2,141],61:[2,141],62:[2,141],63:[2,141],64:[2,141],65:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],70:[2,141],71:[2,141],72:[2,141],73:[2,141],
-74:[2,141],75:[2,141],76:[2,141],77:[2,141],78:[2,141],79:[2,141],81:[2,141],82:[2,141],83:[2,141],84:[2,141],85:[2,141],86:[2,141],87:[2,141],88:[2,141],89:[2,141],90:[2,141],91:[2,141],92:[2,141],93:[2,141],94:[2,141],95:[2,141],96:[2,141],97:[2,141],98:[2,141],99:[2,141],100:[2,141],101:[2,141],102:[2,141],103:[2,141],104:[2,141],105:[2,141],106:[2,141],107:[2,141],108:[2,141],109:[2,141],110:[2,141],111:[2,141],112:[2,141],113:[2,141],114:[2,141],115:[2,141],116:[2,141],117:[2,141],118:[2,141],
-119:[2,141],120:[2,141],121:[2,141],122:[2,141],123:[2,141],124:[2,141],125:[2,141],126:[2,141],127:[2,141],128:[2,141],129:[2,141],130:[2,141],131:[2,141],132:[2,141],134:[2,141],135:[2,141],137:[2,141],138:[2,141],140:[2,141],141:[2,141],142:[2,141],143:[2,141],144:[2,141],145:[2,141],146:[2,141],147:[2,141],148:[2,141],149:[2,141],150:[2,141],151:[2,141],152:[2,141],153:[2,141],154:[2,141],155:[2,141],156:[2,141],157:[2,141],158:[2,141],159:[2,141],160:[2,141],161:[2,141],162:[2,141],165:[2,141],
-166:[2,141],167:[2,141],169:[2,141],170:[2,141],185:[2,141],188:[2,141],194:[2,141],196:[2,141],198:[2,141],200:[2,141]},{8:[1,26],10:[2,193],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],
-91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],140:[2,193],
-141:[1,105],142:[2,193],143:[1,106],144:[2,193],145:[1,107],146:[2,193],147:[1,108],148:[2,193],149:[1,109],150:[2,193],151:[1,110],152:[2,193],153:[1,111],154:[2,193],155:[1,112],156:[2,193],157:[1,113],158:[2,193],159:[1,114],160:[2,193],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:333,187:[1,209],188:[2,193]},{20:336,21:[1,338],22:337,23:[1,339],
-44:335,47:334},{8:[1,26],10:[2,193],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,
-71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],140:[2,193],141:[1,105],142:[2,193],143:[1,106],144:[2,193],145:[1,107],146:[2,193],147:[1,108],148:[2,193],149:[1,109],
-150:[2,193],151:[1,110],152:[2,193],153:[1,111],154:[2,193],155:[1,112],156:[2,193],157:[1,113],158:[2,193],159:[1,114],160:[2,193],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:340,183:[1,212],185:[2,193],188:[2,193]},{20:343,21:[1,338],22:344,23:[1,339],24:345,25:[1,347],26:346,27:[1,348],42:342,43:341},{6:[2,142],8:[2,142],10:[2,142],49:[2,142],50:[2,142],51:[2,142],53:[2,142],56:[2,142],
-57:[2,142],58:[2,142],59:[2,142],60:[2,142],61:[2,142],62:[2,142],63:[2,142],64:[2,142],65:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],70:[2,142],71:[2,142],72:[2,142],73:[2,142],74:[2,142],75:[2,142],76:[2,142],77:[2,142],78:[2,142],79:[2,142],81:[2,142],82:[2,142],83:[2,142],84:[2,142],85:[2,142],86:[2,142],87:[2,142],88:[2,142],89:[2,142],90:[2,142],91:[2,142],92:[2,142],93:[2,142],94:[2,142],95:[2,142],96:[2,142],97:[2,142],98:[2,142],99:[2,142],100:[2,142],101:[2,142],102:[2,142],103:[2,
-142],104:[2,142],105:[2,142],106:[2,142],107:[2,142],108:[2,142],109:[2,142],110:[2,142],111:[2,142],112:[2,142],113:[2,142],114:[2,142],115:[2,142],116:[2,142],117:[2,142],118:[2,142],119:[2,142],120:[2,142],121:[2,142],122:[2,142],123:[2,142],124:[2,142],125:[2,142],126:[2,142],127:[2,142],128:[2,142],129:[2,142],130:[2,142],131:[2,142],132:[2,142],134:[2,142],135:[2,142],137:[2,142],138:[2,142],140:[2,142],141:[2,142],142:[2,142],143:[2,142],144:[2,142],145:[2,142],146:[2,142],147:[2,142],148:[2,
-142],149:[2,142],150:[2,142],151:[2,142],152:[2,142],153:[2,142],154:[2,142],155:[2,142],156:[2,142],157:[2,142],158:[2,142],159:[2,142],160:[2,142],161:[2,142],162:[2,142],165:[2,142],166:[2,142],167:[2,142],169:[2,142],170:[2,142],185:[2,142],188:[2,142],194:[2,142],196:[2,142],198:[2,142],200:[2,142]},{6:[2,143],8:[2,143],10:[2,143],49:[2,143],50:[2,143],51:[2,143],53:[2,143],56:[2,143],57:[2,143],58:[2,143],59:[2,143],60:[2,143],61:[2,143],62:[2,143],63:[2,143],64:[2,143],65:[2,143],66:[2,143],
-67:[2,143],68:[2,143],69:[2,143],70:[2,143],71:[2,143],72:[2,143],73:[2,143],74:[2,143],75:[2,143],76:[2,143],77:[2,143],78:[2,143],79:[2,143],81:[2,143],82:[2,143],83:[2,143],84:[2,143],85:[2,143],86:[2,143],87:[2,143],88:[2,143],89:[2,143],90:[2,143],91:[2,143],92:[2,143],93:[2,143],94:[2,143],95:[2,143],96:[2,143],97:[2,143],98:[2,143],99:[2,143],100:[2,143],101:[2,143],102:[2,143],103:[2,143],104:[2,143],105:[2,143],106:[2,143],107:[2,143],108:[2,143],109:[2,143],110:[2,143],111:[2,143],112:[2,
-143],113:[2,143],114:[2,143],115:[2,143],116:[2,143],117:[2,143],118:[2,143],119:[2,143],120:[2,143],121:[2,143],122:[2,143],123:[2,143],124:[2,143],125:[2,143],126:[2,143],127:[2,143],128:[2,143],129:[2,143],130:[2,143],131:[2,143],132:[2,143],134:[2,143],135:[2,143],137:[2,143],138:[2,143],140:[2,143],141:[2,143],142:[2,143],143:[2,143],144:[2,143],145:[2,143],146:[2,143],147:[2,143],148:[2,143],149:[2,143],150:[2,143],151:[2,143],152:[2,143],153:[2,143],154:[2,143],155:[2,143],156:[2,143],157:[2,
-143],158:[2,143],159:[2,143],160:[2,143],161:[2,143],162:[2,143],165:[2,143],166:[2,143],167:[2,143],169:[2,143],170:[2,143],185:[2,143],188:[2,143],194:[2,143],196:[2,143],198:[2,143],200:[2,143]},{6:[2,144],8:[2,144],10:[2,144],49:[2,144],50:[2,144],51:[2,144],53:[2,144],56:[2,144],57:[2,144],58:[2,144],59:[2,144],60:[2,144],61:[2,144],62:[2,144],63:[2,144],64:[2,144],65:[2,144],66:[2,144],67:[2,144],68:[2,144],69:[2,144],70:[2,144],71:[2,144],72:[2,144],73:[2,144],74:[2,144],75:[2,144],76:[2,144],
-77:[2,144],78:[2,144],79:[2,144],81:[2,144],82:[2,144],83:[2,144],84:[2,144],85:[2,144],86:[2,144],87:[2,144],88:[2,144],89:[2,144],90:[2,144],91:[2,144],92:[2,144],93:[2,144],94:[2,144],95:[2,144],96:[2,144],97:[2,144],98:[2,144],99:[2,144],100:[2,144],101:[2,144],102:[2,144],103:[2,144],104:[2,144],105:[2,144],106:[2,144],107:[2,144],108:[2,144],109:[2,144],110:[2,144],111:[2,144],112:[2,144],113:[2,144],114:[2,144],115:[2,144],116:[2,144],117:[2,144],118:[2,144],119:[2,144],120:[2,144],121:[2,
-144],122:[2,144],123:[2,144],124:[2,144],125:[2,144],126:[2,144],127:[2,144],128:[2,144],129:[2,144],130:[2,144],131:[2,144],132:[2,144],134:[2,144],135:[2,144],137:[2,144],138:[2,144],140:[2,144],141:[2,144],142:[2,144],143:[2,144],144:[2,144],145:[2,144],146:[2,144],147:[2,144],148:[2,144],149:[2,144],150:[2,144],151:[2,144],152:[2,144],153:[2,144],154:[2,144],155:[2,144],156:[2,144],157:[2,144],158:[2,144],159:[2,144],160:[2,144],161:[2,144],162:[2,144],165:[2,144],166:[2,144],167:[2,144],169:[2,
-144],170:[2,144],185:[2,144],188:[2,144],194:[2,144],196:[2,144],198:[2,144],200:[2,144]},{6:[2,145],8:[2,145],10:[2,145],49:[2,145],50:[2,145],51:[2,145],53:[2,145],56:[2,145],57:[2,145],58:[2,145],59:[2,145],60:[2,145],61:[2,145],62:[2,145],63:[2,145],64:[2,145],65:[2,145],66:[2,145],67:[2,145],68:[2,145],69:[2,145],70:[2,145],71:[2,145],72:[2,145],73:[2,145],74:[2,145],75:[2,145],76:[2,145],77:[2,145],78:[2,145],79:[2,145],81:[2,145],82:[2,145],83:[2,145],84:[2,145],85:[2,145],86:[2,145],87:[2,
-145],88:[2,145],89:[2,145],90:[2,145],91:[2,145],92:[2,145],93:[2,145],94:[2,145],95:[2,145],96:[2,145],97:[2,145],98:[2,145],99:[2,145],100:[2,145],101:[2,145],102:[2,145],103:[2,145],104:[2,145],105:[2,145],106:[2,145],107:[2,145],108:[2,145],109:[2,145],110:[2,145],111:[2,145],112:[2,145],113:[2,145],114:[2,145],115:[2,145],116:[2,145],117:[2,145],118:[2,145],119:[2,145],120:[2,145],121:[2,145],122:[2,145],123:[2,145],124:[2,145],125:[2,145],126:[2,145],127:[2,145],128:[2,145],129:[2,145],130:[2,
-145],131:[2,145],132:[2,145],134:[2,145],135:[2,145],137:[2,145],138:[2,145],140:[2,145],141:[2,145],142:[2,145],143:[2,145],144:[2,145],145:[2,145],146:[2,145],147:[2,145],148:[2,145],149:[2,145],150:[2,145],151:[2,145],152:[2,145],153:[2,145],154:[2,145],155:[2,145],156:[2,145],157:[2,145],158:[2,145],159:[2,145],160:[2,145],161:[2,145],162:[2,145],165:[2,145],166:[2,145],167:[2,145],169:[2,145],170:[2,145],185:[2,145],188:[2,145],194:[2,145],196:[2,145],198:[2,145],200:[2,145]},{6:[2,146],8:[2,
-146],10:[2,146],49:[2,146],50:[2,146],51:[2,146],53:[2,146],56:[2,146],57:[2,146],58:[2,146],59:[2,146],60:[2,146],61:[2,146],62:[2,146],63:[2,146],64:[2,146],65:[2,146],66:[2,146],67:[2,146],68:[2,146],69:[2,146],70:[2,146],71:[2,146],72:[2,146],73:[2,146],74:[2,146],75:[2,146],76:[2,146],77:[2,146],78:[2,146],79:[2,146],81:[2,146],82:[2,146],83:[2,146],84:[2,146],85:[2,146],86:[2,146],87:[2,146],88:[2,146],89:[2,146],90:[2,146],91:[2,146],92:[2,146],93:[2,146],94:[2,146],95:[2,146],96:[2,146],97:[2,
-146],98:[2,146],99:[2,146],100:[2,146],101:[2,146],102:[2,146],103:[2,146],104:[2,146],105:[2,146],106:[2,146],107:[2,146],108:[2,146],109:[2,146],110:[2,146],111:[2,146],112:[2,146],113:[2,146],114:[2,146],115:[2,146],116:[2,146],117:[2,146],118:[2,146],119:[2,146],120:[2,146],121:[2,146],122:[2,146],123:[2,146],124:[2,146],125:[2,146],126:[2,146],127:[2,146],128:[2,146],129:[2,146],130:[2,146],131:[2,146],132:[2,146],134:[2,146],135:[2,146],137:[2,146],138:[2,146],140:[2,146],141:[2,146],142:[2,
-146],143:[2,146],144:[2,146],145:[2,146],146:[2,146],147:[2,146],148:[2,146],149:[2,146],150:[2,146],151:[2,146],152:[2,146],153:[2,146],154:[2,146],155:[2,146],156:[2,146],157:[2,146],158:[2,146],159:[2,146],160:[2,146],161:[2,146],162:[2,146],165:[2,146],166:[2,146],167:[2,146],169:[2,146],170:[2,146],185:[2,146],188:[2,146],194:[2,146],196:[2,146],198:[2,146],200:[2,146]},{6:[2,147],8:[2,147],10:[2,147],49:[2,147],50:[2,147],51:[2,147],53:[2,147],56:[2,147],57:[2,147],58:[2,147],59:[2,147],60:[2,
-147],61:[2,147],62:[2,147],63:[2,147],64:[2,147],65:[2,147],66:[2,147],67:[2,147],68:[2,147],69:[2,147],70:[2,147],71:[2,147],72:[2,147],73:[2,147],74:[2,147],75:[2,147],76:[2,147],77:[2,147],78:[2,147],79:[2,147],81:[2,147],82:[2,147],83:[2,147],84:[2,147],85:[2,147],86:[2,147],87:[2,147],88:[2,147],89:[2,147],90:[2,147],91:[2,147],92:[2,147],93:[2,147],94:[2,147],95:[2,147],96:[2,147],97:[2,147],98:[2,147],99:[2,147],100:[2,147],101:[2,147],102:[2,147],103:[2,147],104:[2,147],105:[2,147],106:[2,
-147],107:[2,147],108:[2,147],109:[2,147],110:[2,147],111:[2,147],112:[2,147],113:[2,147],114:[2,147],115:[2,147],116:[2,147],117:[2,147],118:[2,147],119:[2,147],120:[2,147],121:[2,147],122:[2,147],123:[2,147],124:[2,147],125:[2,147],126:[2,147],127:[2,147],128:[2,147],129:[2,147],130:[2,147],131:[2,147],132:[2,147],134:[2,147],135:[2,147],137:[2,147],138:[2,147],140:[2,147],141:[2,147],142:[2,147],143:[2,147],144:[2,147],145:[2,147],146:[2,147],147:[2,147],148:[2,147],149:[2,147],150:[2,147],151:[2,
-147],152:[2,147],153:[2,147],154:[2,147],155:[2,147],156:[2,147],157:[2,147],158:[2,147],159:[2,147],160:[2,147],161:[2,147],162:[2,147],165:[2,147],166:[2,147],167:[2,147],169:[2,147],170:[2,147],185:[2,147],188:[2,147],194:[2,147],196:[2,147],198:[2,147],200:[2,147]},{6:[2,148],8:[2,148],10:[2,148],49:[2,148],50:[2,148],51:[2,148],53:[2,148],56:[2,148],57:[2,148],58:[2,148],59:[2,148],60:[2,148],61:[2,148],62:[2,148],63:[2,148],64:[2,148],65:[2,148],66:[2,148],67:[2,148],68:[2,148],69:[2,148],70:[2,
-148],71:[2,148],72:[2,148],73:[2,148],74:[2,148],75:[2,148],76:[2,148],77:[2,148],78:[2,148],79:[2,148],81:[2,148],82:[2,148],83:[2,148],84:[2,148],85:[2,148],86:[2,148],87:[2,148],88:[2,148],89:[2,148],90:[2,148],91:[2,148],92:[2,148],93:[2,148],94:[2,148],95:[2,148],96:[2,148],97:[2,148],98:[2,148],99:[2,148],100:[2,148],101:[2,148],102:[2,148],103:[2,148],104:[2,148],105:[2,148],106:[2,148],107:[2,148],108:[2,148],109:[2,148],110:[2,148],111:[2,148],112:[2,148],113:[2,148],114:[2,148],115:[2,148],
-116:[2,148],117:[2,148],118:[2,148],119:[2,148],120:[2,148],121:[2,148],122:[2,148],123:[2,148],124:[2,148],125:[2,148],126:[2,148],127:[2,148],128:[2,148],129:[2,148],130:[2,148],131:[2,148],132:[2,148],134:[2,148],135:[2,148],137:[2,148],138:[2,148],140:[2,148],141:[2,148],142:[2,148],143:[2,148],144:[2,148],145:[2,148],146:[2,148],147:[2,148],148:[2,148],149:[2,148],150:[2,148],151:[2,148],152:[2,148],153:[2,148],154:[2,148],155:[2,148],156:[2,148],157:[2,148],158:[2,148],159:[2,148],160:[2,148],
-161:[2,148],162:[2,148],165:[2,148],166:[2,148],167:[2,148],169:[2,148],170:[2,148],185:[2,148],188:[2,148],194:[2,148],196:[2,148],198:[2,148],200:[2,148]},{6:[2,149],8:[2,149],10:[2,149],49:[2,149],50:[2,149],51:[2,149],53:[2,149],56:[2,149],57:[2,149],58:[2,149],59:[2,149],60:[2,149],61:[2,149],62:[2,149],63:[2,149],64:[2,149],65:[2,149],66:[2,149],67:[2,149],68:[2,149],69:[2,149],70:[2,149],71:[2,149],72:[2,149],73:[2,149],74:[2,149],75:[2,149],76:[2,149],77:[2,149],78:[2,149],79:[2,149],81:[2,
-149],82:[2,149],83:[2,149],84:[2,149],85:[2,149],86:[2,149],87:[2,149],88:[2,149],89:[2,149],90:[2,149],91:[2,149],92:[2,149],93:[2,149],94:[2,149],95:[2,149],96:[2,149],97:[2,149],98:[2,149],99:[2,149],100:[2,149],101:[2,149],102:[2,149],103:[2,149],104:[2,149],105:[2,149],106:[2,149],107:[2,149],108:[2,149],109:[2,149],110:[2,149],111:[2,149],112:[2,149],113:[2,149],114:[2,149],115:[2,149],116:[2,149],117:[2,149],118:[2,149],119:[2,149],120:[2,149],121:[2,149],122:[2,149],123:[2,149],124:[2,149],
-125:[2,149],126:[2,149],127:[2,149],128:[2,149],129:[2,149],130:[2,149],131:[2,149],132:[2,149],134:[2,149],135:[2,149],137:[2,149],138:[2,149],140:[2,149],141:[2,149],142:[2,149],143:[2,149],144:[2,149],145:[2,149],146:[2,149],147:[2,149],148:[2,149],149:[2,149],150:[2,149],151:[2,149],152:[2,149],153:[2,149],154:[2,149],155:[2,149],156:[2,149],157:[2,149],158:[2,149],159:[2,149],160:[2,149],161:[2,149],162:[2,149],165:[2,149],166:[2,149],167:[2,149],169:[2,149],170:[2,149],185:[2,149],188:[2,149],
-194:[2,149],196:[2,149],198:[2,149],200:[2,149]},{6:[2,150],8:[2,150],10:[2,150],49:[2,150],50:[2,150],51:[2,150],53:[2,150],56:[2,150],57:[2,150],58:[2,150],59:[2,150],60:[2,150],61:[2,150],62:[2,150],63:[2,150],64:[2,150],65:[2,150],66:[2,150],67:[2,150],68:[2,150],69:[2,150],70:[2,150],71:[2,150],72:[2,150],73:[2,150],74:[2,150],75:[2,150],76:[2,150],77:[2,150],78:[2,150],79:[2,150],81:[2,150],82:[2,150],83:[2,150],84:[2,150],85:[2,150],86:[2,150],87:[2,150],88:[2,150],89:[2,150],90:[2,150],91:[2,
-150],92:[2,150],93:[2,150],94:[2,150],95:[2,150],96:[2,150],97:[2,150],98:[2,150],99:[2,150],100:[2,150],101:[2,150],102:[2,150],103:[2,150],104:[2,150],105:[2,150],106:[2,150],107:[2,150],108:[2,150],109:[2,150],110:[2,150],111:[2,150],112:[2,150],113:[2,150],114:[2,150],115:[2,150],116:[2,150],117:[2,150],118:[2,150],119:[2,150],120:[2,150],121:[2,150],122:[2,150],123:[2,150],124:[2,150],125:[2,150],126:[2,150],127:[2,150],128:[2,150],129:[2,150],130:[2,150],131:[2,150],132:[2,150],134:[2,150],
-135:[2,150],137:[2,150],138:[2,150],140:[2,150],141:[2,150],142:[2,150],143:[2,150],144:[2,150],145:[2,150],146:[2,150],147:[2,150],148:[2,150],149:[2,150],150:[2,150],151:[2,150],152:[2,150],153:[2,150],154:[2,150],155:[2,150],156:[2,150],157:[2,150],158:[2,150],159:[2,150],160:[2,150],161:[2,150],162:[2,150],165:[2,150],166:[2,150],167:[2,150],169:[2,150],170:[2,150],185:[2,150],188:[2,150],194:[2,150],196:[2,150],198:[2,150],200:[2,150]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,
-56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,
-79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:349,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],160:[2,193],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,
-174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{160:[1,350],188:[1,281]},{10:[1,351],188:[1,281]},{10:[1,352],188:[1,281]},{8:[1,353]},{6:[2,2],8:[2,2],10:[2,2],19:[2,2],21:[2,2],23:[2,2],25:[2,2],27:[2,2],29:[2,2],31:[2,2],33:[2,2],35:[2,2],37:[2,2],39:[2,2],41:[2,2],49:[2,2],50:[2,2],51:[2,2],53:[2,2],56:[2,2],57:[2,2],58:[2,2],59:[2,2],60:[2,2],61:[2,2],62:[2,2],63:[2,2],64:[2,2],65:[2,
-2],66:[2,2],67:[2,2],68:[2,2],69:[2,2],70:[2,2],71:[2,2],72:[2,2],73:[2,2],74:[2,2],75:[2,2],76:[2,2],77:[2,2],78:[2,2],79:[2,2],81:[2,2],82:[2,2],83:[2,2],84:[2,2],85:[2,2],86:[2,2],87:[2,2],88:[2,2],89:[2,2],90:[2,2],91:[2,2],92:[2,2],93:[2,2],94:[2,2],95:[2,2],96:[2,2],97:[2,2],98:[2,2],99:[2,2],100:[2,2],101:[2,2],102:[2,2],103:[2,2],104:[2,2],105:[2,2],106:[2,2],107:[2,2],108:[2,2],109:[2,2],110:[2,2],111:[2,2],112:[2,2],113:[2,2],114:[2,2],115:[2,2],116:[2,2],117:[2,2],118:[2,2],119:[2,2],120:[2,
-2],121:[2,2],122:[2,2],123:[2,2],124:[2,2],125:[2,2],126:[2,2],127:[2,2],128:[2,2],129:[2,2],130:[2,2],131:[2,2],132:[2,2],134:[2,2],135:[2,2],137:[2,2],138:[2,2],140:[2,2],141:[2,2],142:[2,2],143:[2,2],144:[2,2],145:[2,2],146:[2,2],147:[2,2],148:[2,2],149:[2,2],150:[2,2],151:[2,2],152:[2,2],153:[2,2],154:[2,2],155:[2,2],156:[2,2],157:[2,2],158:[2,2],159:[2,2],160:[2,2],161:[2,2],162:[2,2],165:[2,2],166:[2,2],167:[2,2],169:[2,2],170:[2,2],175:[2,2],176:[2,2],177:[2,2],178:[2,2],179:[2,2],180:[2,2],
-181:[2,2],183:[2,2],185:[2,2],187:[2,2],188:[2,2],194:[2,2],196:[2,2],198:[2,2],200:[2,2]},{6:[2,183],8:[2,183],10:[2,183],49:[2,183],50:[2,183],51:[2,183],53:[2,183],56:[2,183],57:[2,183],58:[2,183],59:[2,183],60:[2,183],61:[2,183],62:[2,183],63:[2,183],64:[2,183],65:[2,183],66:[2,183],67:[2,183],68:[2,183],69:[2,183],70:[2,183],71:[2,183],72:[2,183],73:[2,183],74:[2,183],75:[2,183],76:[2,183],77:[2,183],78:[2,183],79:[2,183],81:[2,183],82:[2,183],83:[2,183],84:[2,183],85:[2,183],86:[2,183],87:[2,
-183],88:[2,183],89:[2,183],90:[2,183],91:[2,183],92:[2,183],93:[2,183],94:[2,183],95:[2,183],96:[2,183],97:[2,183],98:[2,183],99:[2,183],100:[2,183],101:[2,183],102:[2,183],103:[2,183],104:[2,183],105:[2,183],106:[2,183],107:[2,183],108:[2,183],109:[2,183],110:[2,183],111:[2,183],112:[2,183],113:[2,183],114:[2,183],115:[2,183],116:[2,183],117:[2,183],118:[2,183],119:[2,183],120:[2,183],121:[2,183],122:[2,183],123:[2,183],124:[2,183],125:[2,183],126:[2,183],127:[2,183],128:[2,183],129:[2,183],130:[2,
-183],131:[2,183],132:[2,183],135:[2,183],137:[2,183],138:[2,183],140:[2,183],141:[2,183],142:[2,183],143:[2,183],144:[2,183],145:[2,183],146:[2,183],147:[2,183],148:[2,183],149:[2,183],150:[2,183],151:[2,183],152:[2,183],153:[2,183],154:[2,183],155:[2,183],156:[2,183],157:[2,183],158:[2,183],159:[2,183],160:[2,183],161:[2,183],162:[2,183],165:[2,183],166:[2,183],169:[2,183],170:[2,183],185:[2,183],188:[2,183],194:[2,183],196:[2,183],198:[2,183],200:[2,183]},{10:[1,354],165:[1,238],166:[1,239],173:300},
-{6:[2,179],8:[2,179],10:[2,179],49:[2,179],50:[2,179],51:[2,179],53:[2,179],56:[2,179],57:[2,179],58:[2,179],59:[2,179],60:[2,179],61:[2,179],62:[2,179],63:[2,179],64:[2,179],65:[2,179],66:[2,179],67:[2,179],68:[2,179],69:[2,179],70:[2,179],71:[2,179],72:[2,179],73:[2,179],74:[2,179],75:[2,179],76:[2,179],77:[2,179],78:[2,179],79:[2,179],81:[2,179],82:[2,179],83:[2,179],84:[2,179],85:[2,179],86:[2,179],87:[2,179],88:[2,179],89:[2,179],90:[2,179],91:[2,179],92:[2,179],93:[2,179],94:[2,179],95:[2,179],
-96:[2,179],97:[2,179],98:[2,179],99:[2,179],100:[2,179],101:[2,179],102:[2,179],103:[2,179],104:[2,179],105:[2,179],106:[2,179],107:[2,179],108:[2,179],109:[2,179],110:[2,179],111:[2,179],112:[2,179],113:[2,179],114:[2,179],115:[2,179],116:[2,179],117:[2,179],118:[2,179],119:[2,179],120:[2,179],121:[2,179],122:[2,179],123:[2,179],124:[2,179],125:[2,179],126:[2,179],127:[2,179],128:[2,179],129:[2,179],130:[2,179],131:[2,179],132:[2,179],135:[2,179],137:[2,179],138:[2,179],140:[2,179],141:[2,179],142:[2,
-179],143:[2,179],144:[2,179],145:[2,179],146:[2,179],147:[2,179],148:[2,179],149:[2,179],150:[2,179],151:[2,179],152:[2,179],153:[2,179],154:[2,179],155:[2,179],156:[2,179],157:[2,179],158:[2,179],159:[2,179],160:[2,179],161:[2,179],162:[2,179],165:[2,179],166:[1,355],169:[2,179],170:[2,179],185:[2,179],188:[2,179],194:[2,179],196:[2,179],198:[2,179],200:[2,179]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:304,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,
-36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],
-117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],168:305,169:[1,117],170:[1,118],172:356},{6:[2,176],8:[2,176],10:[2,176],49:[2,176],50:[2,176],51:[2,176],53:[2,176],56:[2,176],57:[2,176],58:[2,
-176],59:[2,176],60:[2,176],61:[2,176],62:[2,176],63:[2,176],64:[2,176],65:[2,176],66:[2,176],67:[2,176],68:[2,176],69:[2,176],70:[2,176],71:[2,176],72:[2,176],73:[2,176],74:[2,176],75:[2,176],76:[2,176],77:[2,176],78:[2,176],79:[2,176],81:[2,176],82:[2,176],83:[2,176],84:[2,176],85:[2,176],86:[2,176],87:[2,176],88:[2,176],89:[2,176],90:[2,176],91:[2,176],92:[2,176],93:[2,176],94:[2,176],95:[2,176],96:[2,176],97:[2,176],98:[2,176],99:[2,176],100:[2,176],101:[2,176],102:[2,176],103:[2,176],104:[2,176],
-105:[2,176],106:[2,176],107:[2,176],108:[2,176],109:[2,176],110:[2,176],111:[2,176],112:[2,176],113:[2,176],114:[2,176],115:[2,176],116:[2,176],117:[2,176],118:[2,176],119:[2,176],120:[2,176],121:[2,176],122:[2,176],123:[2,176],124:[2,176],125:[2,176],126:[2,176],127:[2,176],128:[2,176],129:[2,176],130:[2,176],131:[2,176],132:[2,176],135:[2,176],137:[2,176],138:[2,176],140:[2,176],141:[2,176],142:[2,176],143:[2,176],144:[2,176],145:[2,176],146:[2,176],147:[2,176],148:[2,176],149:[2,176],150:[2,176],
-151:[2,176],152:[2,176],153:[2,176],154:[2,176],155:[2,176],156:[2,176],157:[2,176],158:[2,176],159:[2,176],160:[2,176],161:[2,176],162:[2,176],165:[2,176],166:[2,176],169:[2,176],170:[2,176],185:[2,176],188:[2,176],194:[2,176],196:[2,176],198:[2,176],200:[2,176]},{6:[2,177],8:[2,177],10:[2,177],49:[2,177],50:[2,177],51:[2,177],53:[2,177],56:[2,177],57:[2,177],58:[2,177],59:[2,177],60:[2,177],61:[2,177],62:[2,177],63:[2,177],64:[2,177],65:[2,177],66:[2,177],67:[2,177],68:[2,177],69:[2,177],70:[2,
-177],71:[2,177],72:[2,177],73:[2,177],74:[2,177],75:[2,177],76:[2,177],77:[2,177],78:[2,177],79:[2,177],81:[2,177],82:[2,177],83:[2,177],84:[2,177],85:[2,177],86:[2,177],87:[2,177],88:[2,177],89:[2,177],90:[2,177],91:[2,177],92:[2,177],93:[2,177],94:[2,177],95:[2,177],96:[2,177],97:[2,177],98:[2,177],99:[2,177],100:[2,177],101:[2,177],102:[2,177],103:[2,177],104:[2,177],105:[2,177],106:[2,177],107:[2,177],108:[2,177],109:[2,177],110:[2,177],111:[2,177],112:[2,177],113:[2,177],114:[2,177],115:[2,177],
-116:[2,177],117:[2,177],118:[2,177],119:[2,177],120:[2,177],121:[2,177],122:[2,177],123:[2,177],124:[2,177],125:[2,177],126:[2,177],127:[2,177],128:[2,177],129:[2,177],130:[2,177],131:[2,177],132:[2,177],135:[2,177],137:[2,177],138:[2,177],140:[2,177],141:[2,177],142:[2,177],143:[2,177],144:[2,177],145:[2,177],146:[2,177],147:[2,177],148:[2,177],149:[2,177],150:[2,177],151:[2,177],152:[2,177],153:[2,177],154:[2,177],155:[2,177],156:[2,177],157:[2,177],158:[2,177],159:[2,177],160:[2,177],161:[2,177],
-162:[2,177],165:[2,177],166:[2,177],169:[2,177],170:[2,177],185:[2,177],188:[2,177],194:[2,177],196:[2,177],198:[2,177],200:[2,177]},{6:[2,180],8:[2,180],10:[2,180],49:[2,180],50:[2,180],51:[2,180],53:[2,180],56:[2,180],57:[2,180],58:[2,180],59:[2,180],60:[2,180],61:[2,180],62:[2,180],63:[2,180],64:[2,180],65:[2,180],66:[2,180],67:[2,180],68:[2,180],69:[2,180],70:[2,180],71:[2,180],72:[2,180],73:[2,180],74:[2,180],75:[2,180],76:[2,180],77:[2,180],78:[2,180],79:[2,180],81:[2,180],82:[2,180],83:[2,
-180],84:[2,180],85:[2,180],86:[2,180],87:[2,180],88:[2,180],89:[2,180],90:[2,180],91:[2,180],92:[2,180],93:[2,180],94:[2,180],95:[2,180],96:[2,180],97:[2,180],98:[2,180],99:[2,180],100:[2,180],101:[2,180],102:[2,180],103:[2,180],104:[2,180],105:[2,180],106:[2,180],107:[2,180],108:[2,180],109:[2,180],110:[2,180],111:[2,180],112:[2,180],113:[2,180],114:[2,180],115:[2,180],116:[2,180],117:[2,180],118:[2,180],119:[2,180],120:[2,180],121:[2,180],122:[2,180],123:[2,180],124:[2,180],125:[2,180],126:[2,180],
-127:[2,180],128:[2,180],129:[2,180],130:[2,180],131:[2,180],132:[2,180],135:[2,180],137:[2,180],138:[2,180],140:[2,180],141:[2,180],142:[2,180],143:[2,180],144:[2,180],145:[2,180],146:[2,180],147:[2,180],148:[2,180],149:[2,180],150:[2,180],151:[2,180],152:[2,180],153:[2,180],154:[2,180],155:[2,180],156:[2,180],157:[2,180],158:[2,180],159:[2,180],160:[2,180],161:[2,180],162:[2,180],165:[2,180],166:[2,180],169:[2,180],170:[2,180],185:[2,180],188:[2,180],194:[2,180],196:[2,180],198:[2,180],200:[2,180]},
-{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:357,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,
-74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,
-160],8:[2,160],10:[2,160],49:[2,160],50:[2,160],51:[2,160],53:[2,160],56:[2,160],57:[2,160],58:[2,160],59:[2,160],60:[2,160],61:[2,160],62:[2,160],63:[2,160],64:[2,160],65:[2,160],66:[2,160],67:[2,160],68:[2,160],69:[2,160],70:[2,160],71:[2,160],72:[2,160],73:[2,160],74:[2,160],75:[2,160],76:[2,160],77:[2,160],78:[2,160],79:[2,160],81:[2,160],82:[2,160],83:[2,160],84:[2,160],85:[2,160],86:[2,160],87:[2,160],88:[2,160],89:[2,160],90:[2,160],91:[2,160],92:[2,160],93:[2,160],94:[2,160],95:[2,160],96:[2,
-160],97:[2,160],98:[2,160],99:[2,160],100:[2,160],101:[2,160],102:[2,160],103:[2,160],104:[2,160],105:[2,160],106:[2,160],107:[2,160],108:[2,160],109:[2,160],110:[2,160],111:[2,160],112:[2,160],113:[2,160],114:[2,160],115:[2,160],116:[2,160],117:[2,160],118:[2,160],119:[2,160],120:[2,160],121:[2,160],122:[2,160],123:[2,160],124:[2,160],125:[2,160],126:[2,160],127:[2,160],128:[2,160],129:[2,160],130:[2,160],131:[2,160],132:[2,160],135:[2,160],137:[2,160],138:[2,160],140:[2,160],141:[2,160],142:[2,
-160],143:[2,160],144:[2,160],145:[2,160],146:[2,160],147:[2,160],148:[2,160],149:[2,160],150:[2,160],151:[2,160],152:[2,160],153:[2,160],154:[2,160],155:[2,160],156:[2,160],157:[2,160],158:[2,160],159:[2,160],160:[2,160],161:[2,160],162:[2,160],169:[2,160],170:[2,160],185:[2,160],188:[2,160],194:[2,160],196:[2,160],198:[2,160],200:[2,160]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:358,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,
-38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],
-119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,162],8:[2,162],10:[2,162],49:[2,162],50:[2,162],51:[2,162],53:[2,162],56:[2,162],57:[2,162],58:[2,162],59:[2,162],60:[2,162],61:[2,162],62:[2,162],63:[2,162],
-64:[2,162],65:[2,162],66:[2,162],67:[2,162],68:[2,162],69:[2,162],70:[2,162],71:[2,162],72:[2,162],73:[2,162],74:[2,162],75:[2,162],76:[2,162],77:[2,162],78:[2,162],79:[2,162],81:[2,162],82:[2,162],83:[2,162],84:[2,162],85:[2,162],86:[2,162],87:[2,162],88:[2,162],89:[2,162],90:[2,162],91:[2,162],92:[2,162],93:[2,162],94:[2,162],95:[2,162],96:[2,162],97:[2,162],98:[2,162],99:[2,162],100:[2,162],101:[2,162],102:[2,162],103:[2,162],104:[2,162],105:[2,162],106:[2,162],107:[2,162],108:[2,162],109:[2,162],
-110:[2,162],111:[2,162],112:[2,162],113:[2,162],114:[2,162],115:[2,162],116:[2,162],117:[2,162],118:[2,162],119:[2,162],120:[2,162],121:[2,162],122:[2,162],123:[2,162],124:[2,162],125:[2,162],126:[2,162],127:[2,162],128:[2,162],129:[2,162],130:[2,162],131:[2,162],132:[2,162],135:[2,162],137:[2,162],138:[2,162],140:[2,162],141:[2,162],142:[2,162],143:[2,162],144:[2,162],145:[2,162],146:[2,162],147:[2,162],148:[2,162],149:[2,162],150:[2,162],151:[2,162],152:[2,162],153:[2,162],154:[2,162],155:[2,162],
-156:[2,162],157:[2,162],158:[2,162],159:[2,162],160:[2,162],161:[2,162],162:[2,162],169:[2,162],170:[2,162],185:[2,162],188:[2,162],194:[2,162],196:[2,162],198:[2,162],200:[2,162]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:359,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,
-56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,
-132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:360,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,
-57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],
-137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{10:[1,361]},{10:[1,362]},{10:[1,363]},{52:364,53:[1,254]},{52:365,53:[1,254]},{52:366,53:[1,254]},{6:[2,46],8:[2,46],10:[2,46],49:[2,46],50:[2,46],51:[2,46],53:[2,46],56:[2,46],57:[2,46],58:[2,46],59:[2,46],60:[2,46],61:[2,46],62:[2,46],63:[2,46],64:[2,46],65:[2,46],66:[2,46],67:[2,46],68:[2,46],69:[2,46],70:[2,46],71:[2,46],72:[2,
-46],73:[2,46],74:[2,46],75:[2,46],76:[2,46],77:[2,46],78:[2,46],79:[2,46],81:[2,46],82:[2,46],83:[2,46],84:[2,46],85:[2,46],86:[2,46],87:[2,46],88:[2,46],89:[2,46],90:[2,46],91:[2,46],92:[2,46],93:[2,46],94:[2,46],95:[2,46],96:[2,46],97:[2,46],98:[2,46],99:[2,46],100:[2,46],101:[2,46],102:[2,46],103:[2,46],104:[2,46],105:[2,46],106:[2,46],107:[2,46],108:[2,46],109:[2,46],110:[2,46],111:[2,46],112:[2,46],113:[2,46],114:[2,46],115:[2,46],116:[2,46],117:[2,46],118:[2,46],119:[2,46],120:[2,46],121:[2,
-46],122:[2,46],123:[2,46],124:[2,46],125:[2,46],126:[2,46],127:[2,46],128:[2,46],129:[2,46],130:[2,46],131:[2,46],132:[2,46],134:[2,46],135:[2,46],137:[2,46],138:[2,46],140:[2,46],141:[2,46],142:[2,46],143:[2,46],144:[2,46],145:[2,46],146:[2,46],147:[2,46],148:[2,46],149:[2,46],150:[2,46],151:[2,46],152:[2,46],153:[2,46],154:[2,46],155:[2,46],156:[2,46],157:[2,46],158:[2,46],159:[2,46],160:[2,46],161:[2,46],162:[2,46],165:[2,46],166:[2,46],167:[2,46],169:[2,46],170:[2,46],185:[2,46],188:[2,46],194:[2,
-46],196:[2,46],198:[2,46],200:[2,46]},{6:[2,47],8:[2,47],10:[2,47],49:[2,47],50:[2,47],51:[2,47],53:[2,47],56:[2,47],57:[2,47],58:[2,47],59:[2,47],60:[2,47],61:[2,47],62:[2,47],63:[2,47],64:[2,47],65:[2,47],66:[2,47],67:[2,47],68:[2,47],69:[2,47],70:[2,47],71:[2,47],72:[2,47],73:[2,47],74:[2,47],75:[2,47],76:[2,47],77:[2,47],78:[2,47],79:[2,47],81:[2,47],82:[2,47],83:[2,47],84:[2,47],85:[2,47],86:[2,47],87:[2,47],88:[2,47],89:[2,47],90:[2,47],91:[2,47],92:[2,47],93:[2,47],94:[2,47],95:[2,47],96:[2,
-47],97:[2,47],98:[2,47],99:[2,47],100:[2,47],101:[2,47],102:[2,47],103:[2,47],104:[2,47],105:[2,47],106:[2,47],107:[2,47],108:[2,47],109:[2,47],110:[2,47],111:[2,47],112:[2,47],113:[2,47],114:[2,47],115:[2,47],116:[2,47],117:[2,47],118:[2,47],119:[2,47],120:[2,47],121:[2,47],122:[2,47],123:[2,47],124:[2,47],125:[2,47],126:[2,47],127:[2,47],128:[2,47],129:[2,47],130:[2,47],131:[2,47],132:[2,47],134:[2,47],135:[2,47],137:[2,47],138:[2,47],140:[2,47],141:[2,47],142:[2,47],143:[2,47],144:[2,47],145:[2,
-47],146:[2,47],147:[2,47],148:[2,47],149:[2,47],150:[2,47],151:[2,47],152:[2,47],153:[2,47],154:[2,47],155:[2,47],156:[2,47],157:[2,47],158:[2,47],159:[2,47],160:[2,47],161:[2,47],162:[2,47],165:[2,47],166:[2,47],167:[2,47],169:[2,47],170:[2,47],185:[2,47],188:[2,47],194:[2,47],196:[2,47],198:[2,47],200:[2,47]},{6:[2,78],8:[2,78],10:[2,78],49:[2,78],50:[2,78],51:[2,78],53:[2,78],56:[2,78],57:[2,78],58:[2,78],59:[2,78],60:[2,78],61:[2,78],62:[2,78],63:[2,78],64:[2,78],65:[2,78],66:[2,78],67:[2,78],
-68:[2,78],69:[2,78],70:[2,78],71:[2,78],72:[2,78],73:[2,78],74:[2,78],75:[2,78],76:[2,78],77:[2,78],78:[2,78],79:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78],86:[2,78],87:[2,78],88:[2,78],89:[2,78],90:[2,78],91:[2,78],92:[2,78],93:[2,78],94:[2,78],95:[2,78],96:[2,78],97:[2,78],98:[2,78],99:[2,78],100:[2,78],101:[2,78],102:[2,78],103:[2,78],104:[2,78],105:[2,78],106:[2,78],107:[2,78],108:[2,78],109:[2,78],110:[2,78],111:[2,78],112:[2,78],113:[2,78],114:[2,78],115:[2,78],116:[2,78],117:[2,
-78],118:[2,78],119:[2,78],120:[2,78],121:[2,78],122:[2,78],123:[2,78],124:[2,78],125:[2,78],126:[2,78],127:[2,78],128:[2,78],129:[2,78],130:[2,78],131:[2,78],132:[2,78],134:[2,78],135:[2,78],137:[2,78],138:[2,78],140:[2,78],141:[2,78],142:[2,78],143:[2,78],144:[2,78],145:[2,78],146:[2,78],147:[2,78],148:[2,78],149:[2,78],150:[2,78],151:[2,78],152:[2,78],153:[2,78],154:[2,78],155:[2,78],156:[2,78],157:[2,78],158:[2,78],159:[2,78],160:[2,78],161:[2,78],162:[2,78],165:[2,78],166:[2,78],167:[2,78],169:[2,
-78],170:[2,78],185:[2,78],188:[2,78],194:[2,78],196:[2,78],198:[2,78],200:[2,78]},{4:[2,1],8:[2,1]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:367,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],
-95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,
-109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,92],8:[2,92],10:[2,92],49:[2,92],50:[2,92],51:[2,92],53:[2,92],56:[2,92],57:[2,92],58:[2,92],59:[2,92],60:[2,92],61:[2,92],62:[2,92],63:[2,92],64:[2,92],65:[2,92],66:[2,92],67:[2,92],68:[2,92],69:[2,92],70:[2,92],71:[2,92],72:[2,92],73:[2,92],74:[2,92],75:[2,92],76:[2,92],77:[2,92],78:[2,92],79:[2,92],81:[2,92],82:[2,92],83:[2,92],84:[2,92],85:[2,92],86:[2,92],87:[2,92],88:[2,92],89:[2,92],90:[2,92],91:[2,
-92],92:[2,92],93:[2,92],94:[2,92],95:[2,92],96:[2,92],97:[2,92],98:[2,92],99:[2,92],100:[2,92],101:[2,92],102:[2,92],103:[2,92],104:[2,92],105:[2,92],106:[2,92],107:[2,92],108:[2,92],109:[2,92],110:[2,92],111:[2,92],112:[2,92],113:[2,92],114:[2,92],115:[2,92],116:[2,92],117:[2,92],118:[2,92],119:[2,92],120:[2,92],121:[2,92],122:[2,92],123:[2,92],124:[2,92],125:[2,92],126:[2,92],127:[2,92],128:[2,92],129:[2,92],130:[2,92],131:[2,92],132:[2,92],134:[2,92],135:[2,92],137:[2,92],138:[2,92],140:[2,92],
-141:[2,92],142:[2,92],143:[2,92],144:[2,92],145:[2,92],146:[2,92],147:[2,92],148:[2,92],149:[2,92],150:[2,92],151:[2,92],152:[2,92],153:[2,92],154:[2,92],155:[2,92],156:[2,92],157:[2,92],158:[2,92],159:[2,92],160:[2,92],161:[2,92],162:[2,92],165:[2,92],166:[2,92],167:[2,92],169:[2,92],170:[2,92],185:[2,92],188:[2,92],194:[2,92],196:[2,92],198:[2,92],200:[2,92]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:368,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,
-36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],
-117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,118],8:[2,118],10:[2,118],49:[2,118],50:[2,118],51:[2,118],53:[2,118],56:[2,118],57:[2,118],58:[2,118],59:[2,118],60:[2,118],61:[2,118],
-62:[2,118],63:[2,118],64:[2,118],65:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],70:[2,118],71:[2,118],72:[2,118],73:[2,118],74:[2,118],75:[2,118],76:[2,118],77:[2,118],78:[2,118],79:[2,118],81:[2,118],82:[2,118],83:[2,118],84:[2,118],85:[2,118],86:[2,118],87:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,118],92:[2,118],93:[2,118],94:[2,118],95:[2,118],96:[2,118],97:[2,118],98:[2,118],99:[2,118],100:[2,118],101:[2,118],102:[2,118],103:[2,118],104:[2,118],105:[2,118],106:[2,118],107:[2,118],
-108:[2,118],109:[2,118],110:[2,118],111:[2,118],112:[2,118],113:[2,118],114:[2,118],115:[2,118],116:[2,118],117:[2,118],118:[2,118],119:[2,118],120:[2,118],121:[2,118],122:[2,118],123:[2,118],124:[2,118],125:[2,118],126:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118],132:[2,118],134:[2,118],135:[2,118],137:[2,118],138:[2,118],140:[2,118],141:[2,118],142:[2,118],143:[2,118],144:[2,118],145:[2,118],146:[2,118],147:[2,118],148:[2,118],149:[2,118],150:[2,118],151:[2,118],152:[2,118],
-153:[2,118],154:[2,118],155:[2,118],156:[2,118],157:[2,118],158:[2,118],159:[2,118],160:[2,118],161:[2,118],162:[2,118],165:[2,118],166:[2,118],167:[2,118],169:[2,118],170:[2,118],185:[2,118],188:[2,118],194:[2,118],196:[2,118],198:[2,118],200:[2,118]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:369,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,
-49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],
-127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116]},{6:[2,120],8:[2,120],10:[2,120],49:[2,120],50:[2,120],51:[2,120],53:[2,120],56:[2,120],57:[2,120],58:[2,120],59:[2,120],60:[2,120],61:[2,120],62:[2,120],63:[2,120],64:[2,120],65:[2,120],66:[2,120],67:[2,120],68:[2,120],69:[2,120],70:[2,120],71:[2,120],
-72:[2,120],73:[2,120],74:[2,120],75:[2,120],76:[2,120],77:[2,120],78:[2,120],79:[2,120],81:[2,120],82:[2,120],83:[2,120],84:[2,120],85:[2,120],86:[2,120],87:[2,120],88:[2,120],89:[2,120],90:[2,120],91:[2,120],92:[2,120],93:[2,120],94:[2,120],95:[2,120],96:[2,120],97:[2,120],98:[2,120],99:[2,120],100:[2,120],101:[2,120],102:[2,120],103:[2,120],104:[2,120],105:[2,120],106:[2,120],107:[2,120],108:[2,120],109:[2,120],110:[2,120],111:[2,120],112:[2,120],113:[2,120],114:[2,120],115:[2,120],116:[2,120],
-117:[2,120],118:[2,120],119:[2,120],120:[2,120],121:[2,120],122:[2,120],123:[2,120],124:[2,120],125:[2,120],126:[2,120],127:[2,120],128:[2,120],129:[2,120],130:[2,120],131:[2,120],132:[2,120],134:[2,120],135:[2,120],137:[2,120],138:[2,120],140:[2,120],141:[2,120],142:[2,120],143:[2,120],144:[2,120],145:[2,120],146:[2,120],147:[2,120],148:[2,120],149:[2,120],150:[2,120],151:[2,120],152:[2,120],153:[2,120],154:[2,120],155:[2,120],156:[2,120],157:[2,120],158:[2,120],159:[2,120],160:[2,120],161:[2,120],
-162:[2,120],165:[2,120],166:[2,120],167:[2,120],169:[2,120],170:[2,120],185:[2,120],188:[2,120],194:[2,120],196:[2,120],198:[2,120],200:[2,120]},{6:[1,370]},{4:[2,4],8:[2,4],49:[2,4],50:[2,4],51:[2,4],56:[2,4],57:[2,4],58:[2,4],59:[2,4],60:[2,4],61:[2,4],62:[2,4],63:[2,4],67:[2,4],68:[2,4],69:[2,4],70:[2,4],71:[2,4],72:[2,4],73:[2,4],74:[2,4],75:[2,4],76:[2,4],77:[2,4],78:[2,4],79:[2,4],81:[2,4],82:[2,4],83:[2,4],84:[2,4],85:[2,4],86:[2,4],87:[2,4],88:[2,4],89:[2,4],90:[2,4],91:[2,4],92:[2,4],93:[2,
-4],94:[2,4],95:[2,4],96:[2,4],97:[2,4],98:[2,4],99:[2,4],100:[2,4],101:[2,4],102:[2,4],103:[2,4],104:[2,4],105:[2,4],106:[2,4],107:[2,4],108:[2,4],109:[2,4],110:[2,4],111:[2,4],112:[2,4],113:[2,4],114:[2,4],115:[2,4],116:[2,4],117:[2,4],118:[2,4],119:[2,4],120:[2,4],121:[2,4],122:[2,4],123:[2,4],124:[2,4],125:[2,4],126:[2,4],127:[2,4],128:[2,4],129:[2,4],130:[2,4],131:[2,4],132:[2,4],135:[2,4],137:[2,4],138:[2,4],141:[2,4],143:[2,4],145:[2,4],147:[2,4],149:[2,4],151:[2,4],153:[2,4],155:[2,4],157:[2,
-4],159:[2,4],161:[2,4],162:[2,4]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:371,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,
-71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],
-161:[1,115],162:[1,116]},{8:[1,372]},{10:[2,201],140:[2,201],142:[2,201],144:[2,201],146:[2,201],148:[2,201],150:[2,201],152:[2,201],154:[2,201],156:[2,201],158:[2,201],160:[2,201],188:[2,201]},{10:[1,373],20:336,21:[1,338],22:337,23:[1,339],44:374},{10:[2,42],21:[2,42],23:[2,42]},{10:[2,28],21:[2,28],23:[2,28]},{10:[2,29],21:[2,29],23:[2,29]},{7:128,8:[1,129],14:375},{7:128,8:[1,129],14:376},{10:[2,197],140:[2,197],142:[2,197],144:[2,197],146:[2,197],148:[2,197],150:[2,197],152:[2,197],154:[2,197],
-156:[2,197],158:[2,197],160:[2,197],185:[2,197],188:[2,197]},{10:[1,377],20:343,21:[1,338],22:344,23:[1,339],24:345,25:[1,347],26:346,27:[1,348],42:378},{10:[2,26],21:[2,26],23:[2,26],25:[2,26],27:[2,26]},{10:[2,22],21:[2,22],23:[2,22],25:[2,22],27:[2,22]},{10:[2,23],21:[2,23],23:[2,23],25:[2,23],27:[2,23]},{10:[2,24],21:[2,24],23:[2,24],25:[2,24],27:[2,24]},{10:[2,25],21:[2,25],23:[2,25],25:[2,25],27:[2,25]},{7:128,8:[1,129],14:379},{7:128,8:[1,129],14:380},{160:[1,381],188:[1,281]},{6:[2,152],8:[2,
-152],10:[2,152],49:[2,152],50:[2,152],51:[2,152],53:[2,152],56:[2,152],57:[2,152],58:[2,152],59:[2,152],60:[2,152],61:[2,152],62:[2,152],63:[2,152],64:[2,152],65:[2,152],66:[2,152],67:[2,152],68:[2,152],69:[2,152],70:[2,152],71:[2,152],72:[2,152],73:[2,152],74:[2,152],75:[2,152],76:[2,152],77:[2,152],78:[2,152],79:[2,152],81:[2,152],82:[2,152],83:[2,152],84:[2,152],85:[2,152],86:[2,152],87:[2,152],88:[2,152],89:[2,152],90:[2,152],91:[2,152],92:[2,152],93:[2,152],94:[2,152],95:[2,152],96:[2,152],97:[2,
-152],98:[2,152],99:[2,152],100:[2,152],101:[2,152],102:[2,152],103:[2,152],104:[2,152],105:[2,152],106:[2,152],107:[2,152],108:[2,152],109:[2,152],110:[2,152],111:[2,152],112:[2,152],113:[2,152],114:[2,152],115:[2,152],116:[2,152],117:[2,152],118:[2,152],119:[2,152],120:[2,152],121:[2,152],122:[2,152],123:[2,152],124:[2,152],125:[2,152],126:[2,152],127:[2,152],128:[2,152],129:[2,152],130:[2,152],131:[2,152],132:[2,152],134:[2,152],135:[2,152],137:[2,152],138:[2,152],140:[2,152],141:[2,152],142:[2,
-152],143:[2,152],144:[2,152],145:[2,152],146:[2,152],147:[2,152],148:[2,152],149:[2,152],150:[2,152],151:[2,152],152:[2,152],153:[2,152],154:[2,152],155:[2,152],156:[2,152],157:[2,152],158:[2,152],159:[2,152],160:[2,152],161:[2,152],162:[2,152],165:[2,152],166:[2,152],167:[2,152],169:[2,152],170:[2,152],185:[2,152],188:[2,152],194:[2,152],196:[2,152],198:[2,152],200:[2,152]},{6:[2,153],8:[2,153],10:[2,153],49:[2,153],50:[2,153],51:[2,153],53:[2,153],56:[2,153],57:[2,153],58:[2,153],59:[2,153],60:[2,
-153],61:[2,153],62:[2,153],63:[2,153],64:[2,153],65:[2,153],66:[2,153],67:[2,153],68:[2,153],69:[2,153],70:[2,153],71:[2,153],72:[2,153],73:[2,153],74:[2,153],75:[2,153],76:[2,153],77:[2,153],78:[2,153],79:[2,153],81:[2,153],82:[2,153],83:[2,153],84:[2,153],85:[2,153],86:[2,153],87:[2,153],88:[2,153],89:[2,153],90:[2,153],91:[2,153],92:[2,153],93:[2,153],94:[2,153],95:[2,153],96:[2,153],97:[2,153],98:[2,153],99:[2,153],100:[2,153],101:[2,153],102:[2,153],103:[2,153],104:[2,153],105:[2,153],106:[2,
-153],107:[2,153],108:[2,153],109:[2,153],110:[2,153],111:[2,153],112:[2,153],113:[2,153],114:[2,153],115:[2,153],116:[2,153],117:[2,153],118:[2,153],119:[2,153],120:[2,153],121:[2,153],122:[2,153],123:[2,153],124:[2,153],125:[2,153],126:[2,153],127:[2,153],128:[2,153],129:[2,153],130:[2,153],131:[2,153],132:[2,153],134:[2,153],135:[2,153],137:[2,153],138:[2,153],140:[2,153],141:[2,153],142:[2,153],143:[2,153],144:[2,153],145:[2,153],146:[2,153],147:[2,153],148:[2,153],149:[2,153],150:[2,153],151:[2,
-153],152:[2,153],153:[2,153],154:[2,153],155:[2,153],156:[2,153],157:[2,153],158:[2,153],159:[2,153],160:[2,153],161:[2,153],162:[2,153],165:[2,153],166:[2,153],167:[2,153],169:[2,153],170:[2,153],185:[2,153],188:[2,153],194:[2,153],196:[2,153],198:[2,153],200:[2,153]},{6:[2,154],8:[2,154],10:[2,154],49:[2,154],50:[2,154],51:[2,154],53:[2,154],56:[2,154],57:[2,154],58:[2,154],59:[2,154],60:[2,154],61:[2,154],62:[2,154],63:[2,154],64:[2,154],65:[2,154],66:[2,154],67:[2,154],68:[2,154],69:[2,154],70:[2,
-154],71:[2,154],72:[2,154],73:[2,154],74:[2,154],75:[2,154],76:[2,154],77:[2,154],78:[2,154],79:[2,154],81:[2,154],82:[2,154],83:[2,154],84:[2,154],85:[2,154],86:[2,154],87:[2,154],88:[2,154],89:[2,154],90:[2,154],91:[2,154],92:[2,154],93:[2,154],94:[2,154],95:[2,154],96:[2,154],97:[2,154],98:[2,154],99:[2,154],100:[2,154],101:[2,154],102:[2,154],103:[2,154],104:[2,154],105:[2,154],106:[2,154],107:[2,154],108:[2,154],109:[2,154],110:[2,154],111:[2,154],112:[2,154],113:[2,154],114:[2,154],115:[2,154],
-116:[2,154],117:[2,154],118:[2,154],119:[2,154],120:[2,154],121:[2,154],122:[2,154],123:[2,154],124:[2,154],125:[2,154],126:[2,154],127:[2,154],128:[2,154],129:[2,154],130:[2,154],131:[2,154],132:[2,154],134:[2,154],135:[2,154],137:[2,154],138:[2,154],140:[2,154],141:[2,154],142:[2,154],143:[2,154],144:[2,154],145:[2,154],146:[2,154],147:[2,154],148:[2,154],149:[2,154],150:[2,154],151:[2,154],152:[2,154],153:[2,154],154:[2,154],155:[2,154],156:[2,154],157:[2,154],158:[2,154],159:[2,154],160:[2,154],
-161:[2,154],162:[2,154],165:[2,154],166:[2,154],167:[2,154],169:[2,154],170:[2,154],185:[2,154],188:[2,154],194:[2,154],196:[2,154],198:[2,154],200:[2,154]},{18:384,19:[1,394],20:385,21:[1,338],22:386,23:[1,339],28:387,29:[1,395],30:388,31:[1,396],32:389,33:[1,397],34:390,35:[1,398],36:391,37:[1,399],38:392,39:[1,400],40:393,41:[1,401],45:383,46:382},{6:[2,137],8:[2,137],10:[2,137],49:[2,137],50:[2,137],51:[2,137],53:[2,137],56:[2,137],57:[2,137],58:[2,137],59:[2,137],60:[2,137],61:[2,137],62:[2,
-137],63:[2,137],64:[2,137],65:[2,137],66:[2,137],67:[2,137],68:[2,137],69:[2,137],70:[2,137],71:[2,137],72:[2,137],73:[2,137],74:[2,137],75:[2,137],76:[2,137],77:[2,137],78:[2,137],79:[2,137],81:[2,137],82:[2,137],83:[2,137],84:[2,137],85:[2,137],86:[2,137],87:[2,137],88:[2,137],89:[2,137],90:[2,137],91:[2,137],92:[2,137],93:[2,137],94:[2,137],95:[2,137],96:[2,137],97:[2,137],98:[2,137],99:[2,137],100:[2,137],101:[2,137],102:[2,137],103:[2,137],104:[2,137],105:[2,137],106:[2,137],107:[2,137],108:[2,
-137],109:[2,137],110:[2,137],111:[2,137],112:[2,137],113:[2,137],114:[2,137],115:[2,137],116:[2,137],117:[2,137],118:[2,137],119:[2,137],120:[2,137],121:[2,137],122:[2,137],123:[2,137],124:[2,137],125:[2,137],126:[2,137],127:[2,137],128:[2,137],129:[2,137],130:[2,137],131:[2,137],132:[2,137],134:[2,137],135:[2,137],137:[2,137],138:[2,137],140:[2,137],141:[2,137],142:[2,137],143:[2,137],144:[2,137],145:[2,137],146:[2,137],147:[2,137],148:[2,137],149:[2,137],150:[2,137],151:[2,137],152:[2,137],153:[2,
-137],154:[2,137],155:[2,137],156:[2,137],157:[2,137],158:[2,137],159:[2,137],160:[2,137],161:[2,137],162:[2,137],165:[2,137],166:[2,137],167:[2,137],169:[2,137],170:[2,137],185:[2,137],188:[2,137],194:[2,137],196:[2,137],198:[2,137],200:[2,137]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:304,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,
-50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],
-128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,132],137:[1,103],138:[1,104],141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],168:305,169:[1,117],170:[1,118],172:402},{6:[2,181],8:[2,181],10:[2,181],49:[2,181],50:[2,181],51:[2,181],53:[2,181],56:[2,181],57:[2,181],58:[2,181],59:[2,181],60:[2,181],61:[2,181],62:[2,181],63:[2,181],64:[2,181],65:[2,181],66:[2,181],67:[2,181],68:[2,181],69:[2,
-181],70:[2,181],71:[2,181],72:[2,181],73:[2,181],74:[2,181],75:[2,181],76:[2,181],77:[2,181],78:[2,181],79:[2,181],81:[2,181],82:[2,181],83:[2,181],84:[2,181],85:[2,181],86:[2,181],87:[2,181],88:[2,181],89:[2,181],90:[2,181],91:[2,181],92:[2,181],93:[2,181],94:[2,181],95:[2,181],96:[2,181],97:[2,181],98:[2,181],99:[2,181],100:[2,181],101:[2,181],102:[2,181],103:[2,181],104:[2,181],105:[2,181],106:[2,181],107:[2,181],108:[2,181],109:[2,181],110:[2,181],111:[2,181],112:[2,181],113:[2,181],114:[2,181],
-115:[2,181],116:[2,181],117:[2,181],118:[2,181],119:[2,181],120:[2,181],121:[2,181],122:[2,181],123:[2,181],124:[2,181],125:[2,181],126:[2,181],127:[2,181],128:[2,181],129:[2,181],130:[2,181],131:[2,181],132:[2,181],135:[2,181],137:[2,181],138:[2,181],140:[2,181],141:[2,181],142:[2,181],143:[2,181],144:[2,181],145:[2,181],146:[2,181],147:[2,181],148:[2,181],149:[2,181],150:[2,181],151:[2,181],152:[2,181],153:[2,181],154:[2,181],155:[2,181],156:[2,181],157:[2,181],158:[2,181],159:[2,181],160:[2,181],
-161:[2,181],162:[2,181],165:[2,181],166:[2,181],169:[2,181],170:[2,181],185:[2,181],188:[2,181],194:[2,181],196:[2,181],198:[2,181],200:[2,181]},{6:[2,159],8:[2,159],10:[2,159],49:[2,159],50:[2,159],51:[2,159],53:[2,159],56:[2,159],57:[2,159],58:[2,159],59:[2,159],60:[2,159],61:[2,159],62:[2,159],63:[2,159],64:[2,159],65:[2,159],66:[2,159],67:[2,159],68:[2,159],69:[2,159],70:[2,159],71:[2,159],72:[2,159],73:[2,159],74:[2,159],75:[2,159],76:[2,159],77:[2,159],78:[2,159],79:[2,159],81:[2,159],82:[2,
-159],83:[2,159],84:[2,159],85:[2,159],86:[2,159],87:[2,159],88:[2,159],89:[2,159],90:[2,159],91:[2,159],92:[2,159],93:[2,159],94:[2,159],95:[2,159],96:[2,159],97:[2,159],98:[2,159],99:[2,159],100:[2,159],101:[2,159],102:[2,159],103:[2,159],104:[2,159],105:[2,159],106:[2,159],107:[2,159],108:[2,159],109:[2,159],110:[2,159],111:[2,159],112:[2,159],113:[2,159],114:[2,159],115:[2,159],116:[2,159],117:[2,159],118:[2,159],119:[2,159],120:[2,159],121:[2,159],122:[2,159],123:[2,159],124:[2,159],125:[2,159],
-126:[2,159],127:[2,159],128:[2,159],129:[2,159],130:[2,159],131:[2,159],132:[2,159],135:[2,159],137:[2,159],138:[2,159],140:[2,159],141:[2,159],142:[2,159],143:[2,159],144:[2,159],145:[2,159],146:[2,159],147:[2,159],148:[2,159],149:[2,159],150:[2,159],151:[2,159],152:[2,159],153:[2,159],154:[2,159],155:[2,159],156:[2,159],157:[2,159],158:[2,159],159:[2,159],160:[2,159],161:[2,159],162:[2,159],169:[2,159],170:[2,159],185:[2,159],188:[2,159],194:[2,159],196:[2,159],198:[2,159],200:[2,159]},{6:[2,161],
-8:[2,161],10:[2,161],49:[2,161],50:[2,161],51:[2,161],53:[2,161],56:[2,161],57:[2,161],58:[2,161],59:[2,161],60:[2,161],61:[2,161],62:[2,161],63:[2,161],64:[2,161],65:[2,161],66:[2,161],67:[2,161],68:[2,161],69:[2,161],70:[2,161],71:[2,161],72:[2,161],73:[2,161],74:[2,161],75:[2,161],76:[2,161],77:[2,161],78:[2,161],79:[2,161],81:[2,161],82:[2,161],83:[2,161],84:[2,161],85:[2,161],86:[2,161],87:[2,161],88:[2,161],89:[2,161],90:[2,161],91:[2,161],92:[2,161],93:[2,161],94:[2,161],95:[2,161],96:[2,161],
-97:[2,161],98:[2,161],99:[2,161],100:[2,161],101:[2,161],102:[2,161],103:[2,161],104:[2,161],105:[2,161],106:[2,161],107:[2,161],108:[2,161],109:[2,161],110:[2,161],111:[2,161],112:[2,161],113:[2,161],114:[2,161],115:[2,161],116:[2,161],117:[2,161],118:[2,161],119:[2,161],120:[2,161],121:[2,161],122:[2,161],123:[2,161],124:[2,161],125:[2,161],126:[2,161],127:[2,161],128:[2,161],129:[2,161],130:[2,161],131:[2,161],132:[2,161],135:[2,161],137:[2,161],138:[2,161],140:[2,161],141:[2,161],142:[2,161],
-143:[2,161],144:[2,161],145:[2,161],146:[2,161],147:[2,161],148:[2,161],149:[2,161],150:[2,161],151:[2,161],152:[2,161],153:[2,161],154:[2,161],155:[2,161],156:[2,161],157:[2,161],158:[2,161],159:[2,161],160:[2,161],161:[2,161],162:[2,161],169:[2,161],170:[2,161],185:[2,161],188:[2,161],194:[2,161],196:[2,161],198:[2,161],200:[2,161]},{6:[2,167],8:[2,167],10:[2,167],49:[2,167],50:[2,167],51:[2,167],53:[2,167],56:[2,167],57:[2,167],58:[2,167],59:[2,167],60:[2,167],61:[2,167],62:[2,167],63:[2,167],
-64:[2,167],65:[2,167],66:[2,167],67:[2,167],68:[2,167],69:[2,167],70:[2,167],71:[2,167],72:[2,167],73:[2,167],74:[2,167],75:[2,167],76:[2,167],77:[2,167],78:[2,167],79:[2,167],81:[2,167],82:[2,167],83:[2,167],84:[2,167],85:[2,167],86:[2,167],87:[2,167],88:[2,167],89:[2,167],90:[2,167],91:[2,167],92:[2,167],93:[2,167],94:[2,167],95:[2,167],96:[2,167],97:[2,167],98:[2,167],99:[2,167],100:[2,167],101:[2,167],102:[2,167],103:[2,167],104:[2,167],105:[2,167],106:[2,167],107:[2,167],108:[2,167],109:[2,167],
-110:[2,167],111:[2,167],112:[2,167],113:[2,167],114:[2,167],115:[2,167],116:[2,167],117:[2,167],118:[2,167],119:[2,167],120:[2,167],121:[2,167],122:[2,167],123:[2,167],124:[2,167],125:[2,167],126:[2,167],127:[2,167],128:[2,167],129:[2,167],130:[2,167],131:[2,167],132:[2,167],135:[2,167],137:[2,167],138:[2,167],140:[2,167],141:[2,167],142:[2,167],143:[2,167],144:[2,167],145:[2,167],146:[2,167],147:[2,167],148:[2,167],149:[2,167],150:[2,167],151:[2,167],152:[2,167],153:[2,167],154:[2,167],155:[2,167],
-156:[2,167],157:[2,167],158:[2,167],159:[2,167],160:[2,167],161:[2,167],162:[2,167],169:[2,167],170:[2,167],185:[2,167],188:[2,167],194:[2,167],196:[2,167],198:[2,167],200:[2,167]},{6:[2,168],8:[2,168],10:[2,168],49:[2,168],50:[2,168],51:[2,168],53:[2,168],56:[2,168],57:[2,168],58:[2,168],59:[2,168],60:[2,168],61:[2,168],62:[2,168],63:[2,168],64:[2,168],65:[2,168],66:[2,168],67:[2,168],68:[2,168],69:[2,168],70:[2,168],71:[2,168],72:[2,168],73:[2,168],74:[2,168],75:[2,168],76:[2,168],77:[2,168],78:[2,
-168],79:[2,168],81:[2,168],82:[2,168],83:[2,168],84:[2,168],85:[2,168],86:[2,168],87:[2,168],88:[2,168],89:[2,168],90:[2,168],91:[2,168],92:[2,168],93:[2,168],94:[2,168],95:[2,168],96:[2,168],97:[2,168],98:[2,168],99:[2,168],100:[2,168],101:[2,168],102:[2,168],103:[2,168],104:[2,168],105:[2,168],106:[2,168],107:[2,168],108:[2,168],109:[2,168],110:[2,168],111:[2,168],112:[2,168],113:[2,168],114:[2,168],115:[2,168],116:[2,168],117:[2,168],118:[2,168],119:[2,168],120:[2,168],121:[2,168],122:[2,168],
-123:[2,168],124:[2,168],125:[2,168],126:[2,168],127:[2,168],128:[2,168],129:[2,168],130:[2,168],131:[2,168],132:[2,168],135:[2,168],137:[2,168],138:[2,168],140:[2,168],141:[2,168],142:[2,168],143:[2,168],144:[2,168],145:[2,168],146:[2,168],147:[2,168],148:[2,168],149:[2,168],150:[2,168],151:[2,168],152:[2,168],153:[2,168],154:[2,168],155:[2,168],156:[2,168],157:[2,168],158:[2,168],159:[2,168],160:[2,168],161:[2,168],162:[2,168],169:[2,168],170:[2,168],185:[2,168],188:[2,168],194:[2,168],196:[2,168],
-198:[2,168],200:[2,168]},{6:[2,59],8:[2,59],10:[2,59],49:[2,59],50:[2,59],51:[2,59],53:[2,59],56:[2,59],57:[2,59],58:[2,59],59:[2,59],60:[2,59],61:[2,59],62:[2,59],63:[2,59],64:[2,59],65:[2,59],66:[2,59],67:[2,59],68:[2,59],69:[2,59],70:[2,59],71:[2,59],72:[2,59],73:[2,59],74:[2,59],75:[2,59],76:[2,59],77:[2,59],78:[2,59],79:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59],86:[2,59],87:[2,59],88:[2,59],89:[2,59],90:[2,59],91:[2,59],92:[2,59],93:[2,59],94:[2,59],95:[2,59],96:[2,59],97:[2,59],
-98:[2,59],99:[2,59],100:[2,59],101:[2,59],102:[2,59],103:[2,59],104:[2,59],105:[2,59],106:[2,59],107:[2,59],108:[2,59],109:[2,59],110:[2,59],111:[2,59],112:[2,59],113:[2,59],114:[2,59],115:[2,59],116:[2,59],117:[2,59],118:[2,59],119:[2,59],120:[2,59],121:[2,59],122:[2,59],123:[2,59],124:[2,59],125:[2,59],126:[2,59],127:[2,59],128:[2,59],129:[2,59],130:[2,59],131:[2,59],132:[2,59],134:[2,59],135:[2,59],137:[2,59],138:[2,59],140:[2,59],141:[2,59],142:[2,59],143:[2,59],144:[2,59],145:[2,59],146:[2,59],
-147:[2,59],148:[2,59],149:[2,59],150:[2,59],151:[2,59],152:[2,59],153:[2,59],154:[2,59],155:[2,59],156:[2,59],157:[2,59],158:[2,59],159:[2,59],160:[2,59],161:[2,59],162:[2,59],165:[2,59],166:[2,59],167:[2,59],169:[2,59],170:[2,59],185:[2,59],188:[2,59],194:[2,59],196:[2,59],198:[2,59],200:[2,59]},{6:[2,61],8:[2,61],10:[2,61],49:[2,61],50:[2,61],51:[2,61],53:[2,61],56:[2,61],57:[2,61],58:[2,61],59:[2,61],60:[2,61],61:[2,61],62:[2,61],63:[2,61],64:[2,61],65:[2,61],66:[2,61],67:[2,61],68:[2,61],69:[2,
-61],70:[2,61],71:[2,61],72:[2,61],73:[2,61],74:[2,61],75:[2,61],76:[2,61],77:[2,61],78:[2,61],79:[2,61],81:[2,61],82:[2,61],83:[2,61],84:[2,61],85:[2,61],86:[2,61],87:[2,61],88:[2,61],89:[2,61],90:[2,61],91:[2,61],92:[2,61],93:[2,61],94:[2,61],95:[2,61],96:[2,61],97:[2,61],98:[2,61],99:[2,61],100:[2,61],101:[2,61],102:[2,61],103:[2,61],104:[2,61],105:[2,61],106:[2,61],107:[2,61],108:[2,61],109:[2,61],110:[2,61],111:[2,61],112:[2,61],113:[2,61],114:[2,61],115:[2,61],116:[2,61],117:[2,61],118:[2,61],
-119:[2,61],120:[2,61],121:[2,61],122:[2,61],123:[2,61],124:[2,61],125:[2,61],126:[2,61],127:[2,61],128:[2,61],129:[2,61],130:[2,61],131:[2,61],132:[2,61],134:[2,61],135:[2,61],137:[2,61],138:[2,61],140:[2,61],141:[2,61],142:[2,61],143:[2,61],144:[2,61],145:[2,61],146:[2,61],147:[2,61],148:[2,61],149:[2,61],150:[2,61],151:[2,61],152:[2,61],153:[2,61],154:[2,61],155:[2,61],156:[2,61],157:[2,61],158:[2,61],159:[2,61],160:[2,61],161:[2,61],162:[2,61],165:[2,61],166:[2,61],167:[2,61],169:[2,61],170:[2,
-61],185:[2,61],188:[2,61],194:[2,61],196:[2,61],198:[2,61],200:[2,61]},{6:[2,63],8:[2,63],10:[2,63],49:[2,63],50:[2,63],51:[2,63],53:[2,63],56:[2,63],57:[2,63],58:[2,63],59:[2,63],60:[2,63],61:[2,63],62:[2,63],63:[2,63],64:[2,63],65:[2,63],66:[2,63],67:[2,63],68:[2,63],69:[2,63],70:[2,63],71:[2,63],72:[2,63],73:[2,63],74:[2,63],75:[2,63],76:[2,63],77:[2,63],78:[2,63],79:[2,63],81:[2,63],82:[2,63],83:[2,63],84:[2,63],85:[2,63],86:[2,63],87:[2,63],88:[2,63],89:[2,63],90:[2,63],91:[2,63],92:[2,63],93:[2,
-63],94:[2,63],95:[2,63],96:[2,63],97:[2,63],98:[2,63],99:[2,63],100:[2,63],101:[2,63],102:[2,63],103:[2,63],104:[2,63],105:[2,63],106:[2,63],107:[2,63],108:[2,63],109:[2,63],110:[2,63],111:[2,63],112:[2,63],113:[2,63],114:[2,63],115:[2,63],116:[2,63],117:[2,63],118:[2,63],119:[2,63],120:[2,63],121:[2,63],122:[2,63],123:[2,63],124:[2,63],125:[2,63],126:[2,63],127:[2,63],128:[2,63],129:[2,63],130:[2,63],131:[2,63],132:[2,63],134:[2,63],135:[2,63],137:[2,63],138:[2,63],140:[2,63],141:[2,63],142:[2,63],
-143:[2,63],144:[2,63],145:[2,63],146:[2,63],147:[2,63],148:[2,63],149:[2,63],150:[2,63],151:[2,63],152:[2,63],153:[2,63],154:[2,63],155:[2,63],156:[2,63],157:[2,63],158:[2,63],159:[2,63],160:[2,63],161:[2,63],162:[2,63],165:[2,63],166:[2,63],167:[2,63],169:[2,63],170:[2,63],185:[2,63],188:[2,63],194:[2,63],196:[2,63],198:[2,63],200:[2,63]},{6:[2,60],8:[2,60],10:[2,60],49:[2,60],50:[2,60],51:[2,60],53:[2,60],56:[2,60],57:[2,60],58:[2,60],59:[2,60],60:[2,60],61:[2,60],62:[2,60],63:[2,60],64:[2,60],
-65:[2,60],66:[2,60],67:[2,60],68:[2,60],69:[2,60],70:[2,60],71:[2,60],72:[2,60],73:[2,60],74:[2,60],75:[2,60],76:[2,60],77:[2,60],78:[2,60],79:[2,60],81:[2,60],82:[2,60],83:[2,60],84:[2,60],85:[2,60],86:[2,60],87:[2,60],88:[2,60],89:[2,60],90:[2,60],91:[2,60],92:[2,60],93:[2,60],94:[2,60],95:[2,60],96:[2,60],97:[2,60],98:[2,60],99:[2,60],100:[2,60],101:[2,60],102:[2,60],103:[2,60],104:[2,60],105:[2,60],106:[2,60],107:[2,60],108:[2,60],109:[2,60],110:[2,60],111:[2,60],112:[2,60],113:[2,60],114:[2,
-60],115:[2,60],116:[2,60],117:[2,60],118:[2,60],119:[2,60],120:[2,60],121:[2,60],122:[2,60],123:[2,60],124:[2,60],125:[2,60],126:[2,60],127:[2,60],128:[2,60],129:[2,60],130:[2,60],131:[2,60],132:[2,60],134:[2,60],135:[2,60],137:[2,60],138:[2,60],140:[2,60],141:[2,60],142:[2,60],143:[2,60],144:[2,60],145:[2,60],146:[2,60],147:[2,60],148:[2,60],149:[2,60],150:[2,60],151:[2,60],152:[2,60],153:[2,60],154:[2,60],155:[2,60],156:[2,60],157:[2,60],158:[2,60],159:[2,60],160:[2,60],161:[2,60],162:[2,60],165:[2,
-60],166:[2,60],167:[2,60],169:[2,60],170:[2,60],185:[2,60],188:[2,60],194:[2,60],196:[2,60],198:[2,60],200:[2,60]},{6:[2,62],8:[2,62],10:[2,62],49:[2,62],50:[2,62],51:[2,62],53:[2,62],56:[2,62],57:[2,62],58:[2,62],59:[2,62],60:[2,62],61:[2,62],62:[2,62],63:[2,62],64:[2,62],65:[2,62],66:[2,62],67:[2,62],68:[2,62],69:[2,62],70:[2,62],71:[2,62],72:[2,62],73:[2,62],74:[2,62],75:[2,62],76:[2,62],77:[2,62],78:[2,62],79:[2,62],81:[2,62],82:[2,62],83:[2,62],84:[2,62],85:[2,62],86:[2,62],87:[2,62],88:[2,62],
-89:[2,62],90:[2,62],91:[2,62],92:[2,62],93:[2,62],94:[2,62],95:[2,62],96:[2,62],97:[2,62],98:[2,62],99:[2,62],100:[2,62],101:[2,62],102:[2,62],103:[2,62],104:[2,62],105:[2,62],106:[2,62],107:[2,62],108:[2,62],109:[2,62],110:[2,62],111:[2,62],112:[2,62],113:[2,62],114:[2,62],115:[2,62],116:[2,62],117:[2,62],118:[2,62],119:[2,62],120:[2,62],121:[2,62],122:[2,62],123:[2,62],124:[2,62],125:[2,62],126:[2,62],127:[2,62],128:[2,62],129:[2,62],130:[2,62],131:[2,62],132:[2,62],134:[2,62],135:[2,62],137:[2,
-62],138:[2,62],140:[2,62],141:[2,62],142:[2,62],143:[2,62],144:[2,62],145:[2,62],146:[2,62],147:[2,62],148:[2,62],149:[2,62],150:[2,62],151:[2,62],152:[2,62],153:[2,62],154:[2,62],155:[2,62],156:[2,62],157:[2,62],158:[2,62],159:[2,62],160:[2,62],161:[2,62],162:[2,62],165:[2,62],166:[2,62],167:[2,62],169:[2,62],170:[2,62],185:[2,62],188:[2,62],194:[2,62],196:[2,62],198:[2,62],200:[2,62]},{6:[2,64],8:[2,64],10:[2,64],49:[2,64],50:[2,64],51:[2,64],53:[2,64],56:[2,64],57:[2,64],58:[2,64],59:[2,64],60:[2,
-64],61:[2,64],62:[2,64],63:[2,64],64:[2,64],65:[2,64],66:[2,64],67:[2,64],68:[2,64],69:[2,64],70:[2,64],71:[2,64],72:[2,64],73:[2,64],74:[2,64],75:[2,64],76:[2,64],77:[2,64],78:[2,64],79:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64],86:[2,64],87:[2,64],88:[2,64],89:[2,64],90:[2,64],91:[2,64],92:[2,64],93:[2,64],94:[2,64],95:[2,64],96:[2,64],97:[2,64],98:[2,64],99:[2,64],100:[2,64],101:[2,64],102:[2,64],103:[2,64],104:[2,64],105:[2,64],106:[2,64],107:[2,64],108:[2,64],109:[2,64],110:[2,
-64],111:[2,64],112:[2,64],113:[2,64],114:[2,64],115:[2,64],116:[2,64],117:[2,64],118:[2,64],119:[2,64],120:[2,64],121:[2,64],122:[2,64],123:[2,64],124:[2,64],125:[2,64],126:[2,64],127:[2,64],128:[2,64],129:[2,64],130:[2,64],131:[2,64],132:[2,64],134:[2,64],135:[2,64],137:[2,64],138:[2,64],140:[2,64],141:[2,64],142:[2,64],143:[2,64],144:[2,64],145:[2,64],146:[2,64],147:[2,64],148:[2,64],149:[2,64],150:[2,64],151:[2,64],152:[2,64],153:[2,64],154:[2,64],155:[2,64],156:[2,64],157:[2,64],158:[2,64],159:[2,
-64],160:[2,64],161:[2,64],162:[2,64],165:[2,64],166:[2,64],167:[2,64],169:[2,64],170:[2,64],185:[2,64],188:[2,64],194:[2,64],196:[2,64],198:[2,64],200:[2,64]},{6:[2,89],8:[2,89],10:[2,89],49:[2,89],50:[2,89],51:[2,89],53:[2,89],56:[2,89],57:[2,89],58:[2,89],59:[2,89],60:[2,89],61:[2,89],62:[2,89],63:[2,89],64:[2,89],65:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],70:[2,89],71:[2,89],72:[2,89],73:[2,89],74:[2,89],75:[2,89],76:[2,89],77:[2,89],78:[2,89],79:[2,89],81:[2,89],82:[2,89],83:[2,89],84:[2,
-89],85:[2,89],86:[2,89],87:[2,89],88:[2,89],89:[2,89],90:[2,89],91:[2,89],92:[2,89],93:[2,89],94:[2,89],95:[2,89],96:[2,89],97:[2,89],98:[2,89],99:[2,89],100:[2,89],101:[2,89],102:[2,89],103:[2,89],104:[2,89],105:[2,89],106:[2,89],107:[2,89],108:[2,89],109:[2,89],110:[2,89],111:[2,89],112:[2,89],113:[2,89],114:[2,89],115:[2,89],116:[2,89],117:[2,89],118:[2,89],119:[2,89],120:[2,89],121:[2,89],122:[2,89],123:[2,89],124:[2,89],125:[2,89],126:[2,89],127:[2,89],128:[2,89],129:[2,89],130:[2,89],131:[2,
-89],132:[2,89],134:[2,89],135:[2,89],137:[2,89],138:[2,89],140:[2,89],141:[2,89],142:[2,89],143:[2,89],144:[2,89],145:[2,89],146:[2,89],147:[2,89],148:[2,89],149:[2,89],150:[2,89],151:[2,89],152:[2,89],153:[2,89],154:[2,89],155:[2,89],156:[2,89],157:[2,89],158:[2,89],159:[2,89],160:[2,89],161:[2,89],162:[2,89],165:[2,89],166:[2,89],167:[2,89],169:[2,89],170:[2,89],185:[2,89],188:[2,89],194:[2,89],196:[2,89],198:[2,89],200:[2,89]},{6:[2,93],8:[2,93],10:[2,93],49:[2,93],50:[2,93],51:[2,93],53:[2,93],
-56:[2,93],57:[2,93],58:[2,93],59:[2,93],60:[2,93],61:[2,93],62:[2,93],63:[2,93],64:[2,93],65:[2,93],66:[2,93],67:[2,93],68:[2,93],69:[2,93],70:[2,93],71:[2,93],72:[2,93],73:[2,93],74:[2,93],75:[2,93],76:[2,93],77:[2,93],78:[2,93],79:[2,93],81:[2,93],82:[2,93],83:[2,93],84:[2,93],85:[2,93],86:[2,93],87:[2,93],88:[2,93],89:[2,93],90:[2,93],91:[2,93],92:[2,93],93:[2,93],94:[2,93],95:[2,93],96:[2,93],97:[2,93],98:[2,93],99:[2,93],100:[2,93],101:[2,93],102:[2,93],103:[2,93],104:[2,93],105:[2,93],106:[2,
-93],107:[2,93],108:[2,93],109:[2,93],110:[2,93],111:[2,93],112:[2,93],113:[2,93],114:[2,93],115:[2,93],116:[2,93],117:[2,93],118:[2,93],119:[2,93],120:[2,93],121:[2,93],122:[2,93],123:[2,93],124:[2,93],125:[2,93],126:[2,93],127:[2,93],128:[2,93],129:[2,93],130:[2,93],131:[2,93],132:[2,93],134:[2,93],135:[2,93],137:[2,93],138:[2,93],140:[2,93],141:[2,93],142:[2,93],143:[2,93],144:[2,93],145:[2,93],146:[2,93],147:[2,93],148:[2,93],149:[2,93],150:[2,93],151:[2,93],152:[2,93],153:[2,93],154:[2,93],155:[2,
-93],156:[2,93],157:[2,93],158:[2,93],159:[2,93],160:[2,93],161:[2,93],162:[2,93],165:[2,93],166:[2,93],167:[2,93],169:[2,93],170:[2,93],185:[2,93],188:[2,93],194:[2,93],196:[2,93],198:[2,93],200:[2,93]},{6:[2,119],8:[2,119],10:[2,119],49:[2,119],50:[2,119],51:[2,119],53:[2,119],56:[2,119],57:[2,119],58:[2,119],59:[2,119],60:[2,119],61:[2,119],62:[2,119],63:[2,119],64:[2,119],65:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],70:[2,119],71:[2,119],72:[2,119],73:[2,119],74:[2,119],75:[2,119],76:[2,
-119],77:[2,119],78:[2,119],79:[2,119],81:[2,119],82:[2,119],83:[2,119],84:[2,119],85:[2,119],86:[2,119],87:[2,119],88:[2,119],89:[2,119],90:[2,119],91:[2,119],92:[2,119],93:[2,119],94:[2,119],95:[2,119],96:[2,119],97:[2,119],98:[2,119],99:[2,119],100:[2,119],101:[2,119],102:[2,119],103:[2,119],104:[2,119],105:[2,119],106:[2,119],107:[2,119],108:[2,119],109:[2,119],110:[2,119],111:[2,119],112:[2,119],113:[2,119],114:[2,119],115:[2,119],116:[2,119],117:[2,119],118:[2,119],119:[2,119],120:[2,119],121:[2,
-119],122:[2,119],123:[2,119],124:[2,119],125:[2,119],126:[2,119],127:[2,119],128:[2,119],129:[2,119],130:[2,119],131:[2,119],132:[2,119],134:[2,119],135:[2,119],137:[2,119],138:[2,119],140:[2,119],141:[2,119],142:[2,119],143:[2,119],144:[2,119],145:[2,119],146:[2,119],147:[2,119],148:[2,119],149:[2,119],150:[2,119],151:[2,119],152:[2,119],153:[2,119],154:[2,119],155:[2,119],156:[2,119],157:[2,119],158:[2,119],159:[2,119],160:[2,119],161:[2,119],162:[2,119],165:[2,119],166:[2,119],167:[2,119],169:[2,
-119],170:[2,119],185:[2,119],188:[2,119],194:[2,119],196:[2,119],198:[2,119],200:[2,119]},{4:[2,3],8:[2,3],49:[2,3],50:[2,3],51:[2,3],56:[2,3],57:[2,3],58:[2,3],59:[2,3],60:[2,3],61:[2,3],62:[2,3],63:[2,3],67:[2,3],68:[2,3],69:[2,3],70:[2,3],71:[2,3],72:[2,3],73:[2,3],74:[2,3],75:[2,3],76:[2,3],77:[2,3],78:[2,3],79:[2,3],81:[2,3],82:[2,3],83:[2,3],84:[2,3],85:[2,3],86:[2,3],87:[2,3],88:[2,3],89:[2,3],90:[2,3],91:[2,3],92:[2,3],93:[2,3],94:[2,3],95:[2,3],96:[2,3],97:[2,3],98:[2,3],99:[2,3],100:[2,
-3],101:[2,3],102:[2,3],103:[2,3],104:[2,3],105:[2,3],106:[2,3],107:[2,3],108:[2,3],109:[2,3],110:[2,3],111:[2,3],112:[2,3],113:[2,3],114:[2,3],115:[2,3],116:[2,3],117:[2,3],118:[2,3],119:[2,3],120:[2,3],121:[2,3],122:[2,3],123:[2,3],124:[2,3],125:[2,3],126:[2,3],127:[2,3],128:[2,3],129:[2,3],130:[2,3],131:[2,3],132:[2,3],135:[2,3],137:[2,3],138:[2,3],141:[2,3],143:[2,3],145:[2,3],147:[2,3],149:[2,3],151:[2,3],153:[2,3],155:[2,3],157:[2,3],159:[2,3],161:[2,3],162:[2,3]},{8:[1,403]},{136:404,165:[1,
-238],166:[1,239],173:237},{8:[1,26],10:[2,193],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,
-70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],140:[2,193],141:[1,105],142:[2,193],143:[1,106],144:[2,193],145:[1,107],146:[2,193],147:[1,108],148:[2,193],
-149:[1,109],150:[2,193],151:[1,110],152:[2,193],153:[1,111],154:[2,193],155:[1,112],156:[2,193],157:[1,113],158:[2,193],159:[1,114],160:[2,193],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:405,185:[2,193],188:[2,193]},{10:[2,43],21:[2,43],23:[2,43]},{10:[2,11],19:[2,11],21:[2,11],23:[2,11],25:[2,11],27:[2,11],29:[2,11],31:[2,11],33:[2,11],35:[2,11],37:[2,11],39:[2,11],
-41:[2,11]},{10:[2,12],19:[2,12],21:[2,12],23:[2,12],25:[2,12],27:[2,12],29:[2,12],31:[2,12],33:[2,12],35:[2,12],37:[2,12],39:[2,12],41:[2,12]},{8:[1,26],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:406,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],
-90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],
-141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21]},{10:[2,27],21:[2,27],23:[2,27],25:[2,27],27:[2,27]},{10:[2,13],21:[2,13],23:[2,13],25:[2,13],27:[2,13]},{10:[2,14],21:[2,14],23:[2,14],25:[2,14],27:[2,14]},{6:[2,151],8:[2,151],10:[2,151],49:[2,151],50:[2,151],51:[2,151],53:[2,
-151],56:[2,151],57:[2,151],58:[2,151],59:[2,151],60:[2,151],61:[2,151],62:[2,151],63:[2,151],64:[2,151],65:[2,151],66:[2,151],67:[2,151],68:[2,151],69:[2,151],70:[2,151],71:[2,151],72:[2,151],73:[2,151],74:[2,151],75:[2,151],76:[2,151],77:[2,151],78:[2,151],79:[2,151],81:[2,151],82:[2,151],83:[2,151],84:[2,151],85:[2,151],86:[2,151],87:[2,151],88:[2,151],89:[2,151],90:[2,151],91:[2,151],92:[2,151],93:[2,151],94:[2,151],95:[2,151],96:[2,151],97:[2,151],98:[2,151],99:[2,151],100:[2,151],101:[2,151],
-102:[2,151],103:[2,151],104:[2,151],105:[2,151],106:[2,151],107:[2,151],108:[2,151],109:[2,151],110:[2,151],111:[2,151],112:[2,151],113:[2,151],114:[2,151],115:[2,151],116:[2,151],117:[2,151],118:[2,151],119:[2,151],120:[2,151],121:[2,151],122:[2,151],123:[2,151],124:[2,151],125:[2,151],126:[2,151],127:[2,151],128:[2,151],129:[2,151],130:[2,151],131:[2,151],132:[2,151],134:[2,151],135:[2,151],137:[2,151],138:[2,151],140:[2,151],141:[2,151],142:[2,151],143:[2,151],144:[2,151],145:[2,151],146:[2,151],
-147:[2,151],148:[2,151],149:[2,151],150:[2,151],151:[2,151],152:[2,151],153:[2,151],154:[2,151],155:[2,151],156:[2,151],157:[2,151],158:[2,151],159:[2,151],160:[2,151],161:[2,151],162:[2,151],165:[2,151],166:[2,151],167:[2,151],169:[2,151],170:[2,151],185:[2,151],188:[2,151],194:[2,151],196:[2,151],198:[2,151],200:[2,151]},{10:[1,407],18:384,19:[1,394],20:385,21:[1,338],22:386,23:[1,339],28:387,29:[1,395],30:388,31:[1,396],32:389,33:[1,397],34:390,35:[1,398],36:391,37:[1,399],38:392,39:[1,400],40:393,
-41:[1,401],45:408},{10:[2,40],19:[2,40],21:[2,40],23:[2,40],29:[2,40],31:[2,40],33:[2,40],35:[2,40],37:[2,40],39:[2,40],41:[2,40]},{10:[2,30],19:[2,30],21:[2,30],23:[2,30],29:[2,30],31:[2,30],33:[2,30],35:[2,30],37:[2,30],39:[2,30],41:[2,30]},{10:[2,31],19:[2,31],21:[2,31],23:[2,31],29:[2,31],31:[2,31],33:[2,31],35:[2,31],37:[2,31],39:[2,31],41:[2,31]},{10:[2,32],19:[2,32],21:[2,32],23:[2,32],29:[2,32],31:[2,32],33:[2,32],35:[2,32],37:[2,32],39:[2,32],41:[2,32]},{10:[2,33],19:[2,33],21:[2,33],23:[2,
-33],29:[2,33],31:[2,33],33:[2,33],35:[2,33],37:[2,33],39:[2,33],41:[2,33]},{10:[2,34],19:[2,34],21:[2,34],23:[2,34],29:[2,34],31:[2,34],33:[2,34],35:[2,34],37:[2,34],39:[2,34],41:[2,34]},{10:[2,35],19:[2,35],21:[2,35],23:[2,35],29:[2,35],31:[2,35],33:[2,35],35:[2,35],37:[2,35],39:[2,35],41:[2,35]},{10:[2,36],19:[2,36],21:[2,36],23:[2,36],29:[2,36],31:[2,36],33:[2,36],35:[2,36],37:[2,36],39:[2,36],41:[2,36]},{10:[2,37],19:[2,37],21:[2,37],23:[2,37],29:[2,37],31:[2,37],33:[2,37],35:[2,37],37:[2,37],
-39:[2,37],41:[2,37]},{10:[2,38],19:[2,38],21:[2,38],23:[2,38],29:[2,38],31:[2,38],33:[2,38],35:[2,38],37:[2,38],39:[2,38],41:[2,38]},{10:[2,39],19:[2,39],21:[2,39],23:[2,39],29:[2,39],31:[2,39],33:[2,39],35:[2,39],37:[2,39],39:[2,39],41:[2,39]},{7:128,8:[1,129],14:409},{7:128,8:[1,129],14:410},{7:128,8:[1,129],14:411},{7:128,8:[1,129],14:412},{7:128,8:[1,129],14:413},{7:128,8:[1,129],14:414},{7:128,8:[1,129],14:415},{7:128,8:[1,129],14:416},{6:[2,178],8:[2,178],10:[2,178],49:[2,178],50:[2,178],51:[2,
-178],53:[2,178],56:[2,178],57:[2,178],58:[2,178],59:[2,178],60:[2,178],61:[2,178],62:[2,178],63:[2,178],64:[2,178],65:[2,178],66:[2,178],67:[2,178],68:[2,178],69:[2,178],70:[2,178],71:[2,178],72:[2,178],73:[2,178],74:[2,178],75:[2,178],76:[2,178],77:[2,178],78:[2,178],79:[2,178],81:[2,178],82:[2,178],83:[2,178],84:[2,178],85:[2,178],86:[2,178],87:[2,178],88:[2,178],89:[2,178],90:[2,178],91:[2,178],92:[2,178],93:[2,178],94:[2,178],95:[2,178],96:[2,178],97:[2,178],98:[2,178],99:[2,178],100:[2,178],
-101:[2,178],102:[2,178],103:[2,178],104:[2,178],105:[2,178],106:[2,178],107:[2,178],108:[2,178],109:[2,178],110:[2,178],111:[2,178],112:[2,178],113:[2,178],114:[2,178],115:[2,178],116:[2,178],117:[2,178],118:[2,178],119:[2,178],120:[2,178],121:[2,178],122:[2,178],123:[2,178],124:[2,178],125:[2,178],126:[2,178],127:[2,178],128:[2,178],129:[2,178],130:[2,178],131:[2,178],132:[2,178],135:[2,178],137:[2,178],138:[2,178],140:[2,178],141:[2,178],142:[2,178],143:[2,178],144:[2,178],145:[2,178],146:[2,178],
-147:[2,178],148:[2,178],149:[2,178],150:[2,178],151:[2,178],152:[2,178],153:[2,178],154:[2,178],155:[2,178],156:[2,178],157:[2,178],158:[2,178],159:[2,178],160:[2,178],161:[2,178],162:[2,178],165:[2,178],166:[2,178],169:[2,178],170:[2,178],185:[2,178],188:[2,178],194:[2,178],196:[2,178],198:[2,178],200:[2,178]},{10:[1,418],136:417,165:[1,238],166:[1,239],173:237},{10:[1,419],165:[1,238],166:[1,239],173:300},{10:[2,198],140:[2,198],142:[2,198],144:[2,198],146:[2,198],148:[2,198],150:[2,198],152:[2,
-198],154:[2,198],156:[2,198],158:[2,198],160:[2,198],185:[1,283],188:[2,198]},{10:[2,194],140:[2,194],142:[2,194],144:[2,194],146:[2,194],148:[2,194],150:[2,194],152:[2,194],154:[2,194],156:[2,194],158:[2,194],160:[2,194],185:[2,194],188:[2,194]},{8:[1,26],10:[2,193],48:35,49:[1,119],50:[1,47],51:[1,43],54:24,55:213,56:[1,27],57:[1,28],58:[1,29],59:[1,30],60:[1,31],61:[1,32],62:[1,33],63:[1,34],67:[1,36],68:[1,37],69:[1,38],70:[1,39],71:[1,40],72:[1,41],73:[1,42],74:[1,44],75:[1,45],76:[1,46],77:[1,
-48],78:[1,49],79:[1,50],81:[1,51],82:[1,52],83:[1,53],84:[1,54],85:[1,55],86:[1,56],87:[1,57],88:[1,58],89:[1,59],90:[1,60],91:[1,61],92:[1,62],93:[1,63],94:[1,64],95:[1,65],96:[1,66],97:[1,67],98:[1,68],99:[1,69],100:[1,70],101:[1,71],102:[1,72],103:[1,73],104:[1,74],105:[1,75],106:[1,76],107:[1,77],108:[1,78],109:[1,79],110:[1,80],111:[1,81],112:[1,82],113:[1,83],114:[1,84],115:[1,85],116:[1,86],117:[1,87],118:[1,88],119:[1,89],120:[1,90],121:[1,91],122:[1,92],123:[1,93],124:[1,94],125:[1,95],126:[1,
-96],127:[1,97],128:[1,98],129:[1,99],130:[1,100],131:[1,101],132:[1,102],135:[1,23],137:[1,103],138:[1,104],139:420,141:[1,105],143:[1,106],145:[1,107],147:[1,108],149:[1,109],151:[1,110],153:[1,111],155:[1,112],157:[1,113],159:[1,114],161:[1,115],162:[1,116],164:22,168:25,169:[1,117],170:[1,118],171:14,174:13,175:[1,15],176:[1,16],177:[1,17],178:[1,18],179:[1,19],180:[1,20],181:[1,21],182:211,183:[1,212],184:210,185:[2,193],186:208,187:[1,209],188:[2,193]},{10:[2,41],19:[2,41],21:[2,41],23:[2,41],
-29:[2,41],31:[2,41],33:[2,41],35:[2,41],37:[2,41],39:[2,41],41:[2,41]},{10:[2,10],19:[2,10],21:[2,10],23:[2,10],29:[2,10],31:[2,10],33:[2,10],35:[2,10],37:[2,10],39:[2,10],41:[2,10]},{10:[2,15],19:[2,15],21:[2,15],23:[2,15],29:[2,15],31:[2,15],33:[2,15],35:[2,15],37:[2,15],39:[2,15],41:[2,15]},{10:[2,16],19:[2,16],21:[2,16],23:[2,16],29:[2,16],31:[2,16],33:[2,16],35:[2,16],37:[2,16],39:[2,16],41:[2,16]},{10:[2,17],19:[2,17],21:[2,17],23:[2,17],29:[2,17],31:[2,17],33:[2,17],35:[2,17],37:[2,17],39:[2,
-17],41:[2,17]},{10:[2,18],19:[2,18],21:[2,18],23:[2,18],29:[2,18],31:[2,18],33:[2,18],35:[2,18],37:[2,18],39:[2,18],41:[2,18]},{10:[2,19],19:[2,19],21:[2,19],23:[2,19],29:[2,19],31:[2,19],33:[2,19],35:[2,19],37:[2,19],39:[2,19],41:[2,19]},{10:[2,20],19:[2,20],21:[2,20],23:[2,20],29:[2,20],31:[2,20],33:[2,20],35:[2,20],37:[2,20],39:[2,20],41:[2,20]},{10:[2,21],19:[2,21],21:[2,21],23:[2,21],29:[2,21],31:[2,21],33:[2,21],35:[2,21],37:[2,21],39:[2,21],41:[2,21]},{10:[1,421],165:[1,238],166:[1,239],173:300},
-{6:[2,139],8:[2,139],10:[2,139],49:[2,139],50:[2,139],51:[2,139],53:[2,139],56:[2,139],57:[2,139],58:[2,139],59:[2,139],60:[2,139],61:[2,139],62:[2,139],63:[2,139],64:[2,139],65:[2,139],66:[2,139],67:[2,139],68:[2,139],69:[2,139],70:[2,139],71:[2,139],72:[2,139],73:[2,139],74:[2,139],75:[2,139],76:[2,139],77:[2,139],78:[2,139],79:[2,139],81:[2,139],82:[2,139],83:[2,139],84:[2,139],85:[2,139],86:[2,139],87:[2,139],88:[2,139],89:[2,139],90:[2,139],91:[2,139],92:[2,139],93:[2,139],94:[2,139],95:[2,139],
-96:[2,139],97:[2,139],98:[2,139],99:[2,139],100:[2,139],101:[2,139],102:[2,139],103:[2,139],104:[2,139],105:[2,139],106:[2,139],107:[2,139],108:[2,139],109:[2,139],110:[2,139],111:[2,139],112:[2,139],113:[2,139],114:[2,139],115:[2,139],116:[2,139],117:[2,139],118:[2,139],119:[2,139],120:[2,139],121:[2,139],122:[2,139],123:[2,139],124:[2,139],125:[2,139],126:[2,139],127:[2,139],128:[2,139],129:[2,139],130:[2,139],131:[2,139],132:[2,139],134:[2,139],135:[2,139],137:[2,139],138:[2,139],140:[2,139],141:[2,
-139],142:[2,139],143:[2,139],144:[2,139],145:[2,139],146:[2,139],147:[2,139],148:[2,139],149:[2,139],150:[2,139],151:[2,139],152:[2,139],153:[2,139],154:[2,139],155:[2,139],156:[2,139],157:[2,139],158:[2,139],159:[2,139],160:[2,139],161:[2,139],162:[2,139],165:[2,139],166:[2,139],167:[2,139],169:[2,139],170:[2,139],185:[2,139],188:[2,139],194:[2,139],196:[2,139],198:[2,139],200:[2,139]},{6:[2,140],8:[2,140],10:[2,140],49:[2,140],50:[2,140],51:[2,140],53:[2,140],56:[2,140],57:[2,140],58:[2,140],59:[2,
-140],60:[2,140],61:[2,140],62:[2,140],63:[2,140],64:[2,140],65:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],70:[2,140],71:[2,140],72:[2,140],73:[2,140],74:[2,140],75:[2,140],76:[2,140],77:[2,140],78:[2,140],79:[2,140],81:[2,140],82:[2,140],83:[2,140],84:[2,140],85:[2,140],86:[2,140],87:[2,140],88:[2,140],89:[2,140],90:[2,140],91:[2,140],92:[2,140],93:[2,140],94:[2,140],95:[2,140],96:[2,140],97:[2,140],98:[2,140],99:[2,140],100:[2,140],101:[2,140],102:[2,140],103:[2,140],104:[2,140],105:[2,
-140],106:[2,140],107:[2,140],108:[2,140],109:[2,140],110:[2,140],111:[2,140],112:[2,140],113:[2,140],114:[2,140],115:[2,140],116:[2,140],117:[2,140],118:[2,140],119:[2,140],120:[2,140],121:[2,140],122:[2,140],123:[2,140],124:[2,140],125:[2,140],126:[2,140],127:[2,140],128:[2,140],129:[2,140],130:[2,140],131:[2,140],132:[2,140],134:[2,140],135:[2,140],137:[2,140],138:[2,140],140:[2,140],141:[2,140],142:[2,140],143:[2,140],144:[2,140],145:[2,140],146:[2,140],147:[2,140],148:[2,140],149:[2,140],150:[2,
-140],151:[2,140],152:[2,140],153:[2,140],154:[2,140],155:[2,140],156:[2,140],157:[2,140],158:[2,140],159:[2,140],160:[2,140],161:[2,140],162:[2,140],165:[2,140],166:[2,140],167:[2,140],169:[2,140],170:[2,140],185:[2,140],188:[2,140],194:[2,140],196:[2,140],198:[2,140],200:[2,140]},{10:[1,422],188:[1,281]},{6:[2,138],8:[2,138],10:[2,138],49:[2,138],50:[2,138],51:[2,138],53:[2,138],56:[2,138],57:[2,138],58:[2,138],59:[2,138],60:[2,138],61:[2,138],62:[2,138],63:[2,138],64:[2,138],65:[2,138],66:[2,138],
-67:[2,138],68:[2,138],69:[2,138],70:[2,138],71:[2,138],72:[2,138],73:[2,138],74:[2,138],75:[2,138],76:[2,138],77:[2,138],78:[2,138],79:[2,138],81:[2,138],82:[2,138],83:[2,138],84:[2,138],85:[2,138],86:[2,138],87:[2,138],88:[2,138],89:[2,138],90:[2,138],91:[2,138],92:[2,138],93:[2,138],94:[2,138],95:[2,138],96:[2,138],97:[2,138],98:[2,138],99:[2,138],100:[2,138],101:[2,138],102:[2,138],103:[2,138],104:[2,138],105:[2,138],106:[2,138],107:[2,138],108:[2,138],109:[2,138],110:[2,138],111:[2,138],112:[2,
-138],113:[2,138],114:[2,138],115:[2,138],116:[2,138],117:[2,138],118:[2,138],119:[2,138],120:[2,138],121:[2,138],122:[2,138],123:[2,138],124:[2,138],125:[2,138],126:[2,138],127:[2,138],128:[2,138],129:[2,138],130:[2,138],131:[2,138],132:[2,138],134:[2,138],135:[2,138],137:[2,138],138:[2,138],140:[2,138],141:[2,138],142:[2,138],143:[2,138],144:[2,138],145:[2,138],146:[2,138],147:[2,138],148:[2,138],149:[2,138],150:[2,138],151:[2,138],152:[2,138],153:[2,138],154:[2,138],155:[2,138],156:[2,138],157:[2,
-138],158:[2,138],159:[2,138],160:[2,138],161:[2,138],162:[2,138],165:[2,138],166:[2,138],167:[2,138],169:[2,138],170:[2,138],185:[2,138],188:[2,138],194:[2,138],196:[2,138],198:[2,138],200:[2,138]},{6:[2,155],8:[2,155],10:[2,155],49:[2,155],50:[2,155],51:[2,155],53:[2,155],56:[2,155],57:[2,155],58:[2,155],59:[2,155],60:[2,155],61:[2,155],62:[2,155],63:[2,155],64:[2,155],65:[2,155],66:[2,155],67:[2,155],68:[2,155],69:[2,155],70:[2,155],71:[2,155],72:[2,155],73:[2,155],74:[2,155],75:[2,155],76:[2,155],
-77:[2,155],78:[2,155],79:[2,155],81:[2,155],82:[2,155],83:[2,155],84:[2,155],85:[2,155],86:[2,155],87:[2,155],88:[2,155],89:[2,155],90:[2,155],91:[2,155],92:[2,155],93:[2,155],94:[2,155],95:[2,155],96:[2,155],97:[2,155],98:[2,155],99:[2,155],100:[2,155],101:[2,155],102:[2,155],103:[2,155],104:[2,155],105:[2,155],106:[2,155],107:[2,155],108:[2,155],109:[2,155],110:[2,155],111:[2,155],112:[2,155],113:[2,155],114:[2,155],115:[2,155],116:[2,155],117:[2,155],118:[2,155],119:[2,155],120:[2,155],121:[2,
-155],122:[2,155],123:[2,155],124:[2,155],125:[2,155],126:[2,155],127:[2,155],128:[2,155],129:[2,155],130:[2,155],131:[2,155],132:[2,155],134:[2,155],135:[2,155],137:[2,155],138:[2,155],140:[2,155],141:[2,155],142:[2,155],143:[2,155],144:[2,155],145:[2,155],146:[2,155],147:[2,155],148:[2,155],149:[2,155],150:[2,155],151:[2,155],152:[2,155],153:[2,155],154:[2,155],155:[2,155],156:[2,155],157:[2,155],158:[2,155],159:[2,155],160:[2,155],161:[2,155],162:[2,155],165:[2,155],166:[2,155],167:[2,155],169:[2,
-155],170:[2,155],185:[2,155],188:[2,155],194:[2,155],196:[2,155],198:[2,155],200:[2,155]}],O:{9:[2,202],225:[2,8]},parseError:function(b,a){if(a.va)this.trace(b);else throw Error(b);},parse:function(b){var a=[0],d=[n],e=[],g=this.ma,c="",f=0,k=0,l=0,r=e.slice.call(arguments,1);this.d.ga(b);this.d.f=this.f;this.f.d=this.d;this.f.V=this;"undefined"==typeof this.d.c&&(this.d.c={});var t=this.d.c;e.push(t);var w=this.d.options&&this.d.options.z;this.parseError=F;for(var m,x,v,q,z={},A,s;;){v=a[a.length-
-1];if(this.O[v])q=this.O[v];else{if(m===n||"undefined"==typeof m)m=void 0,m=this.d.S()||1,"number"!==typeof m&&(m=this.la[m]||m);q=g[v]&&g[v][m]}if("undefined"===typeof q||!q.length||!q[0]){var y="";s=[];for(A in g[v])this.B[A]&&2<A&&s.push("'"+this.B[A]+"'");y=this.d.G?"Parse error on line "+(f+1)+":\n"+this.d.G()+"\nExpecting "+s.join(", ")+", got '"+(this.B[m]||m)+"'":"Parse error on line "+(f+1)+": Unexpected "+(1==m?"end of input":"'"+(this.B[m]||m)+"'");this.parseError(y,{text:this.d.match,
-$:this.B[m]||m,T:this.d.g,ta:t,qa:s})}if(q[0]instanceof Array&&1<q.length)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(q[0]){case 1:a.push(m);d.push(this.d.a);e.push(this.d.c);a.push(q[1]);m=n;x?(m=x,x=n):(k=this.d.r,c=this.d.a,f=this.d.g,t=this.d.c,0<l&&l--);break;case 2:s=this.W[q[1]][1];z.b=d[d.length-s];z.L={s:e[e.length-(s||1)].s,p:e[e.length-1].p,m:e[e.length-(s||1)].m,n:e[e.length-1].n};w&&(z.L.o=[e[e.length-(s||1)].o[0],e[e.length-1].o[1]]);v=this.I.apply(z,
-[c,k,f,this.f,q[1],d,e].concat(r));if("undefined"!==typeof v)return v;s&&(a=a.slice(0,-2*s),d=d.slice(0,-1*s),e=e.slice(0,-1*s));a.push(this.W[q[1]][0]);d.push(z.b);e.push(z.L);q=g[a[a.length-2]][a[a.length-1]];a.push(q);break;case 3:return h}}return h}},x="http://www.w3.org/1998/Math/MathML",D="TeX LaTeX text/x-tex text/x-latex application/x-tex application/x-latex".split(" ");try{l.D=new DOMParser}catch(H){l.D={parseFromString:function(){throw"DOMParser undefined. Did you call TeXZilla.setDOMParser?";
-}}}l.fa=function(b){this.D=b};try{l.H=new XMLSerializer}catch(I){l.H={serializeToString:function(){throw"XMLSerializer undefined. Did you call TeXZilla.setXMLSerializer?";}}}l.ja=function(b){this.H=b};l.U=function(b){return this.D.parseFromString(b,"application/xml").documentElement};l.ia=function(b){this.f.w=b};l.ha=function(b){this.f.da=b};l.ca=function(b){"string"===typeof b&&(b=this.U(b));return C(b)};l.Z=function(b,a,d,e){var g;try{g=this.parse("\\("+b+"\\)")}catch(c){if(e)throw c;g=w(["<merror><mtext>"+
-t(c.message)+"</mtext></merror>"],p,b)}d&&(g=g.replace(/^<math/,'<math dir="rtl"'));a&&(g=g.replace(/^<math/,'<math display="block"'));return g};l.Y=function(b,a,d,e){return this.U(this.Z(b,a,d,e))};l.na=function(b,a,d,e,g){var c,f;void 0===e&&(e=64);void 0===g&&(g=window.document);a=this.Y(b,h,a);a.setAttribute("mathsize",e+"px");e=document.createElement("div");e.style.visibility="hidden";e.style.position="absolute";e.appendChild(a);g.body.appendChild(e);c=a.getBoundingClientRect();g.body.removeChild(e);
-e.removeChild(a);d?(d=Math.pow(2,Math.ceil(Math.log(c.width)/Math.LN2)),g=Math.pow(2,Math.ceil(Math.log(c.height)/Math.LN2))):(d=Math.ceil(c.width),g=Math.ceil(c.height));f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("width",d+"px");f.setAttribute("height",g+"px");e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttribute("transform","translate("+(d-c.width)/2+","+(g-c.height)/2+")");f.appendChild(e);e=document.createElementNS("http://www.w3.org/2000/svg",
-"foreignObject");e.setAttribute("width",c.width);e.setAttribute("height",c.height);e.appendChild(a);f.firstChild.appendChild(e);a=new Image;a.src="data:image/svg+xml;base64,"+window.btoa(E(this.H.serializeToString(f)));a.width=d;a.height=g;a.alt=t(b);return a};l.R=function(b,a){try{return this.parse(b)}catch(d){if(a)throw d;return b}};l.Q=function(b,a){var d,e,f;for(f=b.firstChild;f;f=f.nextSibling)switch(f.nodeType){case 1:this.Q(f,a);break;case 3:this.f.P=h;d=this.D.parseFromString("<root>"+u.R(f.data,
-a)+"</root>","application/xml").documentElement;for(this.f.P=p;e=d.firstChild;)b.insertBefore(d.removeChild(e),f);e=f.previousSibling;b.removeChild(f);f=e}};l.d=function(){return{K:1,parseError:function(b,a){if(this.f.V)this.f.V.parseError(b,a);else throw Error(b);},ga:function(b){this.h=b;this.v=this.C=this.t=p;this.g=this.r=0;this.a=this.i=this.match="";this.e=["INITIAL"];this.c={s:1,m:0,p:1,n:0};this.options.z&&(this.c.o=[0,0]);this.offset=0;return this},input:function(){var b=this.h[0];this.a+=
-b;this.r++;this.offset++;this.match+=b;this.i+=b;b.match(/(?:\r\n?|\n).*/g)?(this.g++,this.c.p++):this.c.n++;this.options.z&&this.c.o[1]++;this.h=this.h.slice(1);return b},J:function(b){var a=b.length,d=b.split(/(?:\r\n?|\n)/g);this.h=b+this.h;this.a=this.a.substr(0,this.a.length-a-1);this.offset-=a;b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.i=this.i.substr(0,this.i.length-1);d.length-1&&(this.g-=d.length-1);var e=this.c.o;this.c={s:this.c.s,p:this.g+
-1,m:this.c.m,n:d?(d.length===b.length?this.c.m:0)+b[b.length-d.length].length-d[0].length:this.c.m-a};this.options.z&&(this.c.o=[e[0],e[0]+this.r-a]);this.r=this.a.length;return this},ua:function(){this.v=h;return this},wa:function(){if(this.options.M)this.C=h;else return this.parseError("Lexical error on line "+(this.g+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.G(),{text:"",$:n,T:this.g});return this},
-sa:function(b){this.J(this.match.slice(b))},ea:function(){var b=this.i.substr(0,this.i.length-this.match.length);return(20<b.length?"...":"")+b.substr(-20).replace(/\n/g,"")},oa:function(){var b=this.match;20>b.length&&(b+=this.h.substr(0,20-b.length));return(b.substr(0,20)+(20<b.length?"...":"")).replace(/\n/g,"")},G:function(){var b=this.ea(),a=Array(b.length+1).join("-");return b+this.oa()+"\n"+a+"^"},X:function(b,a){var d,e;this.options.M&&(e={g:this.g,c:{s:this.c.s,p:this.p,m:this.c.m,n:this.c.n},
-a:this.a,match:this.match,matches:this.matches,i:this.i,r:this.r,offset:this.offset,v:this.v,h:this.h,f:this.f,e:this.e.slice(0),t:this.t},this.options.z&&(e.c.o=this.c.o.slice(0)));if(d=b[0].match(/(?:\r\n?|\n).*/g))this.g+=d.length;this.c={s:this.c.p,p:this.g+1,m:this.c.n,n:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.c.n+b[0].length};this.a+=b[0];this.match+=b[0];this.matches=b;this.r=this.a.length;this.options.z&&(this.c.o=[this.offset,this.offset+=this.r]);this.C=this.v=
-p;this.h=this.h.slice(b[0].length);this.i+=b[0];d=this.I.call(this,this.f,this,a,this.e[this.e.length-1]);this.t&&this.h&&(this.t=p);if(d)return d;if(this.C)for(var f in e)this[f]=e[f];return p},next:function(){if(this.t)return this.K;this.h||(this.t=h);var b,a,d;this.v||(this.match=this.a="");for(var e=this.aa(),f=0;f<e.length;f++)if((a=this.h.match(this.rules[e[f]]))&&(!b||a[0].length>b[0].length))if(b=a,d=f,this.options.M){b=this.X(a,e[f]);if(b!==p)return b;if(this.C)b=p;else return p}else if(!this.options.ra)break;
-return b?(b=this.X(b,e[d]),b!==p?b:p):""===this.h?this.K:this.parseError("Lexical error on line "+(this.g+1)+". Unrecognized text.\n"+this.G(),{text:"",$:n,T:this.g})},S:function(){var b=this.next();return b?b:this.S()},k:function(b){this.e.push(b)},q:function(){return 0<this.e.length-1?this.e.pop():this.e[0]},aa:function(){return this.e.length&&this.e[this.e.length-1]?this.N[this.e[this.e.length-1]].rules:this.N.INITIAL.rules},ya:function(b){b=this.e.length-1-Math.abs(b||0);return 0<=b?this.e[b]:
-"INITIAL"},pushState:function(b){this.k(b)},xa:function(){return this.e.length},options:{},I:function(b,a,d){switch(d){case 0:this.J(a.a);this.pushState("DOCUMENT");break;case 1:return this.pushState("MATH"+(0+!!b.da)),b.ka=this.i.length,"STARTMATH"+(2*("$"==a.a[0])+("$"==a.a[1]||"["==a.a[1]));case 2:return this.q(),"EOF";case 3:return a.a=a.a[1],"TEXT";case 4:return b.P&&(a.a=t(a.a)),"TEXT";case 5:return"TEXT";case 6:return this.q(),"[";case 7:this.J(a.a);this.q();this.q();break;case 8:return"TEXTOPTARG";
-case 9:return this.q(),"]";case 10:return"{";case 11:return"TEXTARG";case 12:return this.q(),"}";case 13:return this.q(),"]";case 15:return this.q(),b.ba=this.i.length-this.match.length,b.u=this.i.substring(b.ka,b.ba),"ENDMATH"+(2*("$"==a.a[0])+("$"==a.a[1]||"]"==a.a[1]));case 16:return"{";case 17:return"}";case 18:return"^";case 19:return"_";case 20:return".";case 21:return"COLSEP";case 22:return"ROWSEP";case 23:return"NUM";case 24:return"A";case 25:return a.a="Ζ","A";case 26:return a.a="ζ","A";
-case 27:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="⇌","XARROW";case 28:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="⇒","XARROW";case 29:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="→","XARROW";case 30:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="↦","XARROW";case 31:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="⇋","XARROW";case 32:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="⇔",
-"XARROW";case 33:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="↔","XARROW";case 34:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="⇐","XARROW";case 35:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="←","XARROW";case 36:return a.a="Ξ","A";case 37:return a.a="ξ","A";case 38:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="↪","XARROW";case 39:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),a.a="↩","XARROW";case 40:return a.a=
-"≀","OP";case 41:return a.a="℘","A";case 42:return a.a="⇀","ACCENT";case 43:return a.a="˜","ACCENT";case 44:return a.a="^","ACCENT";case 45:return a.a="ˇ","ACCENT";case 46:return a.a="¯","ACCENT";case 47:return a.a="≙","OP";case 48:return a.a="⋀","OPM";case 49:return a.a="∧","OP";case 50:return a.a="⦀","OPFS";case 51:return a.a="⊪","OP";case 52:return a.a="‖","OPFS";case 53:return a.a="|","OPFS";case 54:return a.a="⊻","OP";case 55:return a.a="⋁","OPM";case 56:return a.a="∨","OP";case 57:return a.a=
-"⇀","ACCENTNS";case 58:return a.a="⋮","OP";case 59:return a.a="⊫","OP";case 60:return a.a="⊩","OP";case 61:return a.a="⊨","OP";case 62:return a.a="⊢","OP";case 63:return a.a="⫫","OP";case 64:return a.a="⊳","OP";case 65:return a.a="⊲","OP";case 66:return a.a="▵","OP";case 67:return a.a="ϑ","A";case 68:return a.a="⫌︀","OP";case 69:return a.a="⊋︀","OP";case 70:return a.a="⫋︀","OP";case 71:return a.a="⊊︀","OP";case 72:return a.a="⊊︀","OP";case 73:return a.a="ς","A";case 74:return a.a="ϱ","A";case 75:return a.a=
-"∝","OP";case 76:return a.a="ϖ","A";case 77:return a.a="φ","A";case 78:return a.a="∅","A";case 79:return a.a="ϰ","A";case 80:return a.a="ε","A";case 81:return a.a="⤊","OPS";case 82:return a.a="⇈","OPS";case 83:return a.a="ϒ","A";case 84:return a.a="υ","A";case 85:return a.a="ϒ","A";case 86:return a.a="⊎","OP";case 87:return a.a="⨛","OP";case 88:return a.a="↿","OPS";case 89:return a.a="↾","OPS";case 90:return a.a="⇕","OPS";case 91:return a.a="↕","OPS";case 92:return a.a="↕","OPS";case 93:return a.a=
-"⇑","OPS";case 94:return a.a="↑","OPS";case 95:return a.a="↑","OPS";case 96:return a.a="⊵","OP";case 97:return a.a="⊴","OP";case 98:return a.a="⋃","OPM";case 99:return a.a="∪","OP";case 100:return"UNDERSET";case 101:return"UNDEROVERSET";case 102:return"UNDERLINE";case 103:return"UNDERBRACE";case 104:return a.a="⋰","OP";case 105:return"OP";case 106:return"OP";case 107:return"OP";case 108:return"OP";case 109:return"OP";case 110:return"OP";case 111:return"OP";case 112:return"OP";case 113:return"OP";
-case 114:return"OP";case 115:return"OP";case 116:return"OP";case 117:return"OP";case 118:return"OP";case 119:return"OP";case 120:return"OP";case 121:return"OP";case 122:return"OP";case 123:return"OP";case 124:return"OP";case 125:return"OP";case 126:return"OP";case 127:return"OP";case 128:return"OP";case 129:return"OP";case 130:return"OP";case 131:return"OP";case 132:return"OP";case 133:return"OP";case 134:return"OP";case 135:return"OP";case 136:return"OP";case 137:return"OP";case 138:return"OPFS";
-case 139:return"OPFS";case 140:return"OP";case 141:return"OP";case 142:return"OP";case 143:return"OP";case 144:return"OP";case 145:return"OP";case 146:return"OP";case 147:return"OP";case 148:return"OP";case 149:return"OP";case 150:return"OP";case 151:return"OP";case 152:return"OP";case 153:return"OP";case 154:return"OP";case 155:return"OP";case 156:return"OP";case 157:return"OP";case 158:return"OP";case 159:return"OP";case 160:return"OP";case 161:return a.a="⤖","OP";case 162:return a.a="↠","OPS";
-case 163:return a.a="↞","OPS";case 164:return a.a="∭","OP";case 165:return a.a="⊵","OP";case 166:return a.a="▹","OP";case 167:return a.a="≜","OP";case 168:return a.a="⊴","OP";case 169:return a.a="◃","OP";case 170:return a.a="▿","OP";case 171:return a.a="▵","OP";case 172:return a.a="⤪","OP";case 173:return a.a="⤩","OP";case 174:return a.a="⊤","OP";case 175:return this.pushState("TEXTARG"),"TOOLTIP";case 176:return a.a="⤧","OP";case 177:return"TOGGLE";case 178:return a.a="⤨","OP";case 179:return a.a=
-"→","OPS";case 180:return a.a="⊠","OP";case 181:return a.a="×","OP";case 182:return a.a="˜","ACCENTNS";case 183:return"THINSPACE";case 184:return"THICKSPACE";case 185:return a.a="∼","OP";case 186:return a.a="≈","OP";case 187:return a.a="Θ","A";case 188:return a.a="θ","A";case 189:return a.a="∴","OP";case 190:return"TFRAC";case 191:return"TEXTSTYLE";case 192:return"TEXTSIZE";case 193:return a.a="”","OPF";case 194:return a.a="“","OPF";case 195:return a.a="~","OPS";case 196:return a.a="`","OP";case 197:return a.a=
-"^","OPS";case 198:return a.a="´","OP";case 199:return this.k("TEXTARG"),"MTEXT";case 200:return"TENSOR";case 201:return"TBINOM";case 202:return a.a="Τ","A";case 203:return a.a="τ","A";case 204:return a.a="⇙","OPS";case 205:return a.a="↙","OPS";case 206:return a.a="⇙","OPS";case 207:return a.a="↙","OPS";case 208:return a.a="√","OPS";case 209:return a.a="⫌","OP";case 210:return a.a="⊋","OP";case 211:return a.a="⫆","OP";case 212:return a.a="⊇","OP";case 213:return a.a="⋑","OP";case 214:return a.a="⊃",
-"OP";case 215:return a.a="∑","OPM";case 216:return a.a="≿","OP";case 217:return a.a="⋩","OP";case 218:return a.a="⪶","OP";case 219:return a.a="⪺","OP";case 220:return a.a="⪰","OP";case 221:return a.a="≽","OP";case 222:return a.a="⪸","OP";case 223:return a.a="≻","OP";case 224:return"SUBSTACK";case 225:return a.a="⫋","OP";case 226:return a.a="⊊","OP";case 227:return a.a="⫅","OP";case 228:return a.a="⊆","OP";case 229:return a.a="⋐","OP";case 230:return a.a="⊂","OP";case 231:return this.pushState("TEXTARG"),
-"STATUSLINE";case 232:return a.a="⋆","OP";case 233:return"OVERSET";case 234:return a.a="⫽","OP";case 235:return a.a="□","OP";case 236:return a.a="⊒","OP";case 237:return a.a="⊐","OP";case 238:return a.a="⊑","OP";case 239:return a.a="⊏","OP";case 240:return this.pushState("OPTARG"),this.pushState("TRYOPTARG"),"SQRT";case 241:return a.a="⊔","OP";case 242:return a.a="⊓","OP";case 243:return a.a="∢","OP";case 244:return a.a="♠","OP";case 245:return this.pushState("TEXTARG"),this.pushState("TEXTARG"),
-this.pushState("TEXTARG"),"SPACE";case 246:return a.a="⌣","OP";case 247:return a.a="⌣","OP";case 248:return a.a="∖","OP";case 249:return a.a="⌢","OP";case 250:return"SLASH";case 251:return a.a="≃","OP";case 252:return a.a="∼","OP";case 253:return a.a="Σ","A";case 254:return a.a="σ","A";case 255:return a.a="⧢","OP";case 256:return a.a="∥","OP";case 257:return a.a="∣","OP";case 258:return a.a="♯","OP";case 259:return a.a="∖","OP";case 260:return a.a="⤭","OP";case 261:return a.a="⇘","OPS";case 262:return a.a=
-"↘","OPS";case 263:return a.a="⇘","OPS";case 264:return a.a="↘","OPS";case 265:return"SCRIPTSIZE";case 266:return"SCRIPTSCRIPTSIZE";case 267:return a.a="⋊","OP";case 268:return a.a="↱","OPS";case 269:return a.a="⇛","OPS";case 270:return a.a="⟫","OPFS";case 271:return a.a="’","OPF";case 272:return this.k("TEXTARG"),"ROWSPAN";case 273:return"ROWOPTS";case 274:return this.pushState("TEXTARG"),"ROWLINES";case 275:return this.k("TEXTARG"),"ROWALIGN";case 276:return"ROOT";case 277:return a.a="⎱","OP";case 278:return a.a=
-"≓","OP";case 279:return a.a="⟲","OP";case 280:return a.a="⋌","OP";case 281:return a.a="↝","OPS";case 282:return a.a="⇉","OPS";case 283:return a.a="⇌","OPS";case 284:return a.a="⇄","OPS";case 285:return a.a="⇀","OPS";case 286:return a.a="⇁","OPS";case 287:return a.a="⇾","OPS";case 288:return a.a="↣","OPS";case 289:return a.a="⇒","OPS";case 290:return a.a="→","OPS";case 291:return"RIGHT";case 292:return a.a="Ρ","A";case 293:return a.a="ρ","A";case 294:return a.a="⊳","OP";case 295:return a.a="⌋","OPFS";
-case 296:return a.a="ℜ","A";case 297:return a.a="⤰","OP";case 298:return a.a="⤫","OP";case 299:return a.a="⌉","OPFS";case 300:return a.a="]","OPFS";case 301:return a.a="}","OPFS";case 302:return a.a="⟩","OPFS";case 303:return a.a="⟩","OPFS";case 304:return a.a="≟","OP";case 305:return a.a="⨌","OP";case 306:return"QUAD";case 307:return"QQUAD";case 308:return a.a="▪","OP";case 309:return a.a="Ψ","A";case 310:return a.a="ψ","A";case 311:return a.a="∝","OP";case 312:return a.a="∏","OPM";case 313:return a.a=
-"∏","OPM";case 314:return a.a="′","OPP";case 315:return a.a="≾","OP";case 316:return a.a="⋨","OP";case 317:return a.a="⪵","OP";case 318:return a.a="⪹","OP";case 319:return a.a="⪯","OP";case 320:return a.a="≼","OP";case 321:return a.a="⪷","OP";case 322:return a.a="≺","OP";case 323:return"PMOD";case 324:return a.a="±","OP";case 325:return a.a="⨥","OP";case 326:return a.a="⊞","OP";case 327:return a.a="⋔","OP";case 328:return a.a="Π","A";case 329:return a.a="π","A";case 330:return a.a="Φ","A";case 331:return a.a=
-"ϕ","A";case 332:return"PHANTOM";case 333:return a.a="⫫","OP";case 334:return a.a="⊥","OP";case 335:return a.a="⪣","OP";case 336:return a.a="∂","OP";case 337:return a.a="⅋","OP";case 338:return a.a="∥","OP";case 339:return this.pushState("TEXTARG"),"PADDING";case 340:return"OVERSET";case 341:return a.a="¯","ACCENT";case 342:return"OVERBRACE";case 343:return"TEXOVER";case 344:return a.a="⨴","OP";case 345:return a.a="⊗","OP";case 346:return a.a="⊘","OP";case 347:return"OPS";case 348:return"OPP";case 349:return"OPM";
-case 350:return a.a="⨭","OP";case 351:return a.a="⊕","OP";case 352:return"OPFS";case 353:return"OPF";case 354:return this.k("TEXTARG"),"OPERATORNAME";case 355:return"OP";case 356:return a.a="⊖","OP";case 357:return a.a="ℴ","A";case 358:return a.a="Ω","A";case 359:return a.a="ω","A";case 360:return a.a="∮","OP";case 361:return a.a="∯","OP";case 362:return a.a="∰","OP";case 363:return a.a="⊙","OP";case 364:return a.a="⊝","OP";case 365:return a.a="⦸","OP";case 366:return a.a="⤲","OP";case 367:return a.a=
-"⇖","OPS";case 368:return a.a="↖","OPS";case 369:return a.a="⇖","OPS";case 370:return a.a="↖","OPS";case 371:return a.a="⊯","OP";case 372:return a.a="⊮","OP";case 373:return a.a="⊭","OP";case 374:return a.a="⊬","OP";case 375:return"NUM";case 376:return a.a="Ν","A";case 377:return a.a="ν","A";case 378:return a.a="⋭","OP";case 379:return a.a="⋫","OP";case 380:return a.a="⋬","OP";case 381:return a.a="⋪","OP";case 382:return a.a="⊉","OP";case 383:return a.a="⊅","OP";case 384:return a.a="≿̸","OP";case 385:return a.a=
-"⪰̸","OP";case 386:return a.a="⊁","OP";case 387:return a.a="⊈","OP";case 388:return a.a="⊈","OP";case 389:return a.a="⊄","OP";case 390:return a.a="≄","OP";case 391:return a.a="≁","OP";case 392:return a.a="∦","OP";case 393:return a.a="∤","OP";case 394:return a.a="⇏","OP";case 395:return a.a="↛","OP";case 396:return a.a="⪯̸","OP";case 397:return a.a="⊀","OP";case 398:return a.a="∦","OP";case 399:return a.a="∌","OP";case 400:return a.a="∉","OP";case 401:return a.a="¬","OP";case 402:return a.a="∤","OP";
-case 403:return a.a="≮","OP";case 404:return a.a="⩽̸","OP";case 405:return a.a="⩽̸","OP";case 406:return a.a="≰","OP";case 407:return a.a="⇎","OP";case 408:return a.a="↮","OP";case 409:return a.a="⇍","OP";case 410:return a.a="↚","OP";case 411:return a.a="∋","OP";case 412:return a.a="≯","OP";case 413:return a.a="⩾̸","OP";case 414:return a.a="⩾̸","OP";case 415:return a.a="≱","OP";case 416:return a.a="∄","OP";case 417:return a.a="≢","OP";case 418:return a.a="≂̸","OP";case 419:return a.a="≠","OP";case 420:return a.a=
-"⤮","OP";case 421:return a.a="⤱","OP";case 422:return"NEGTHICKSPACE";case 423:return"NEGSPACE";case 424:return"NEGMEDSPACE";case 425:return a.a="¬","OP";case 426:return a.a="⇗","OPS";case 427:return a.a="↗","OPS";case 428:return a.a="⇗","OPS";case 429:return a.a="↗","OPS";case 430:return a.a="≠","OP";case 431:return a.a="≇","OP";case 432:return a.a="≎̸","OP";case 433:return a.a="≏̸","OP";case 434:return a.a="♮","OP";case 435:return a.a="≉","OP";case 436:return a.a="∇","OP";case 437:return"MULTI";
-case 438:return a.a="⊸","OP";case 439:return a.a="Μ","A";case 440:return a.a="μ","A";case 441:return this.k("TEXTARG"),"MTEXT";case 442:return this.pushState("TEXTARG"),this.pushState("TEXTOPTARG"),this.pushState("TRYOPTARG"),this.pushState("TEXTOPTARG"),this.pushState("TRYOPTARG"),"MS";case 443:return a.a="∓","OP";case 444:return a.a="⊧","OP";case 445:return a.a="mod","MO";case 446:return this.pushState("TEXTARG"),"MO";case 447:return this.pushState("TEXTARG"),"MN";case 448:return a.a="⫛","OP";case 449:return a.a=
-"⨪","OP";case 450:return a.a="⊟","OP";case 451:return a.a="−","OP";case 452:return a.a=a.a.slice(1),"FM";case 453:return a.a="∣","OP";case 454:return this.pushState("TEXTARG"),"MI";case 455:return a.a="℧","A";case 456:return a.a="℧","A";case 457:return"MEDSPACE";case 458:return a.a="∡","OP";case 459:return"MATHTT";case 460:return"MATHSF";case 461:return"MATHSCR";case 462:return"MATHRM";case 463:return"MATHRLAP";case 464:return this.k("TEXTARG"),"MATHREL";case 465:return this.pushState("TEXTOPTARG"),
-this.pushState("TRYOPTARG"),this.pushState("TEXTOPTARG"),this.pushState("TRYOPTARG"),this.pushState("TEXTARG"),"MATHRAISEBOX";case 466:return this.k("TEXTARG"),"MATHOP";case 467:return"MATHIT";case 468:return"MATHLLAP";case 469:return"MATHIT";case 470:return"MATHFRAK";case 471:return"MATHFRAK";case 472:return"MATHCLAP";case 473:return"MATHSCR";case 474:return"MATHBSCR";case 475:return"MATHBIT";case 476:return this.k("TEXTARG"),"MATHBIN";case 477:return"MATHBF";case 478:return"MATHBSCR";case 479:return"MATHBB";
-case 480:return a.a="⤇","OP";case 481:return a.a="↦","OPS";case 482:return a.a="⤆","OP";case 483:return a.a="↦","OPS";case 484:return a.a="≨︀","OP";case 485:return a.a="≨︀","OP";case 486:return a.a="⋉","OP";case 487:return a.a="<","OP";case 488:return a.a="↰","OPS";case 489:return a.a="‘","OPF";case 490:return a.a="◊","OP";case 491:return a.a="⨜","OP";case 492:return a.a="↬","OPS";case 493:return a.a="↫","OPS";case 494:return a.a="⟹","OPS";case 495:return a.a="⟶","OPS";case 496:return a.a="⟼","OPS";
-case 497:return a.a="⟺","OPS";case 498:return a.a="⟷","OPS";case 499:return a.a="⟸","OPS";case 500:return a.a="⟵","OPS";case 501:return a.a="⋦","OP";case 502:return a.a="≨","OP";case 503:return a.a="⪇","OP";case 504:return a.a="⪉","OP";case 505:return a.a="⎰","OP";case 506:return a.a="⋘","OP";case 507:return a.a="⇚","OPS";case 508:return a.a="⟪","OPFS";case 509:return a.a="≪","OP";case 510:return a.a="⊲","OP";case 511:return a.a="⌊","OPFS";case 512:return a.a="≲","OP";case 513:return a.a="≶","OP";
-case 514:return a.a="⪋","OP";case 515:return a.a="⋚","OP";case 516:return a.a="⋖","OP";case 517:return a.a="⪅","OP";case 518:return a.a="<","OP";case 519:return a.a="⩽","OP";case 520:return a.a="≦","OP";case 521:return a.a="≤","OP";case 522:return a.a="⟳","OP";case 523:return a.a="⋋","OP";case 524:return a.a="↜","OPS";case 525:return a.a="↭","OPS";case 526:return a.a="⇋","OPS";case 527:return a.a="⇿","OPS";case 528:return a.a="⇆","OPS";case 529:return a.a="⇔","OPS";case 530:return a.a="↔","OPS";case 531:return a.a=
-"⇇","OPS";case 532:return a.a="↼","OPS";case 533:return a.a="↽","OPS";case 534:return a.a="⇽","OPS";case 535:return a.a="↢","OPS";case 536:return a.a="⇐","OPS";case 537:return a.a="←","OPS";case 538:return"LEFT";case 539:return a.a="≤","OP";case 540:return a.a="…","OP";case 541:return a.a="⌈","OPFS";case 542:return a.a="[","OPFS";case 543:return a.a="{","OPFS";case 544:return a.a="⟨","OPFS";case 545:return a.a="⟨","OPFS";case 546:return a.a="Λ","A";case 547:return a.a="λ","A";case 548:return a.a=
-"∻","OP";case 549:return a.a="Κ","A";case 550:return a.a="κ","A";case 551:return a.a="ȷ","A";case 552:return this.pushState("TEXTARG"),"MN";case 553:return a.a="Ι","A";case 554:return a.a="ι","A";case 555:return a.a="⅋","OP";case 556:return a.a="⨘","OP";case 557:return a.a="⨽","OP";case 558:return a.a="⨼","OP";case 559:return a.a="⋂","OPM";case 560:return a.a="∩","OP";case 561:return a.a="⫴","OP";case 562:return a.a="⊺","OP";case 563:return a.a="∫","OP";case 564:return a.a="⨚","OP";case 565:return a.a=
-"⨙","OP";case 566:return a.a="⨎","OP";case 567:return a.a="⨍","OP";case 568:return a.a="∫","OP";case 569:return a.a="∞","NUM";case 570:return a.a="∞","NUM";case 571:return a.a=a.a.slice(1),"FM";case 572:return a.a="∊","OP";case 573:return a.a="⇒","OPS";case 574:return a.a="⇐","OPS";case 575:return a.a="ı","A";case 576:return a.a="ℑ","A";case 577:return a.a="∬","OP";case 578:return a.a="∭","OP";case 579:return a.a="⨌","OP";case 580:return a.a="⟺","OPS";case 581:return a.a="ℏ","A";case 582:return this.pushState("TEXTARG"),
-"HREF";case 583:return a.a="↪","OPS";case 584:return a.a="↩","OPS";case 585:return a.a="⤦","OP";case 586:return a.a="⤥","OP";case 587:return a.a="♡","OP";case 588:return a.a="ℏ","A";case 589:return a.a="^","ACCENTNS";case 590:return a.a="≩︀","OP";case 591:return a.a="≩︀","OP";case 592:return a.a="≳","OP";case 593:return a.a="≷","OP";case 594:return a.a="⪌","OP";case 595:return a.a="⋛","OP";case 596:return a.a="⋗","OP";case 597:return a.a="⪆","OP";case 598:return a.a=">","OP";case 599:return a.a=">",
-"OP";case 600:return a.a="⋧","OP";case 601:return a.a="≩","OP";case 602:return a.a="⪈","OP";case 603:return a.a="⪊","OP";case 604:return a.a="ℷ","A";case 605:return a.a="⋙","OP";case 606:return a.a="≫","OP";case 607:return a.a="⩾","OP";case 608:return a.a="≧","OP";case 609:return a.a="≥","OP";case 610:return a.a="≥","OP";case 611:return a.a="Γ","A";case 612:return a.a="γ","A";case 613:return a.a="⌢","OP";case 614:return this.pushState("TEXTARG"),"FRAME";case 615:return"FRAC";case 616:return a.a="⫝",
-"OP";case 617:return a.a="⫝̸","OP";case 618:return a.a="∀","OP";case 619:return a.a="♭","OP";case 620:return a.a="⤬","OP";case 621:return a.a="⤯","OP";case 622:return a.a="≒","OP";case 623:return a.a="∃","OP";case 624:return a.a="ð","A";case 625:return a.a="ð","A";case 626:return a.a="Η","A";case 627:return a.a="η","A";case 628:return a.a="≡","OP";case 629:return this.pushState("TEXTARG"),"EQROWS";case 630:return this.pushState("TEXTARG"),"EQCOLS";case 631:return a.a="⪕","OP";case 632:return a.a=
-"⪖","OP";case 633:return a.a="≂","OP";case 634:return a.a="=∷","OP";case 635:return a.a="≕","OP";case 636:return a.a="−∷","OP";case 637:return a.a="=∷","OP";case 638:return a.a="=∷","OP";case 639:return a.a="=∷","OP";case 640:return a.a="≕","OP";case 641:return a.a="≖","OP";case 642:return a.a="ϵ","A";case 643:return"EVVMATRIX";case 644:return"EVMATRIX";case 645:return"ETOGGLE";case 646:return"EALIGNED";case 647:return"ESMALLMATRIX";case 648:return"EPMATRIX";case 649:return"EMATRIX";case 650:return"EGATHERED";
-case 651:return"ECASES";case 652:return"EBBMATRIX";case 653:return"EBMATRIX";case 654:return"EARRAY";case 655:return"EALIGNED";case 656:return a.a="∅","A";case 657:return a.a="∅","A";case 658:return a.a="↪","OPS";case 659:return a.a="ℓ","A";case 660:return a.a="↕","OPS";case 661:return a.a="⧟","OP";case 662:return a.a="⤐","OPS";case 663:return a.a="↕","OPS";case 664:return a.a="⇂","OPS";case 665:return a.a="⇃","OPS";case 666:return a.a="⇊","OPS";case 667:return a.a="⇓","OPS";case 668:return a.a="↓",
-"OPS";case 669:return a.a="∬","OP";case 670:return a.a="⌆","OP";case 671:return a.a="⌆","OP";case 672:return a.a="…","OP";case 673:return a.a="∔","OP";case 674:return a.a="∸","OP";case 675:return a.a="≑","OP";case 676:return a.a="≑","OP";case 677:return a.a="≐","OP";case 678:return a.a="˙","ACCENT";case 679:return a.a="⋇","OP";case 680:return a.a="÷","OP";case 681:return"DISPLAYSTYLE";case 682:return a.a="⨈","OPM";case 683:return a.a="ϝ","A";case 684:return a.a="♢","OP";case 685:return a.a="⋄","OP";
-case 686:return a.a="⋄","OP";case 687:return a.a=a.a.slice(1),"FM";case 688:return a.a="Δ","A";case 689:return a.a="δ","A";case 690:return a.a="∇","OP";case 691:return a.a="°","OP";case 692:return a.a="⤋","OPS";case 693:return a.a="⩷","OP";case 694:return a.a="⋱","OP";case 695:return a.a="̈","ACCENT";case 696:return a.a="⃛","OP";case 697:return a.a="⃛","ACCENT";case 698:return a.a="⃜","OP";case 699:return a.a="⃜","ACCENT";case 700:return a.a="‡","OP";case 701:return a.a="∷","OP";case 702:return a.a=
-"⤏","OPS";case 703:return a.a="⫤","OP";case 704:return a.a="⫣","OP";case 705:return a.a="⊣","OP";case 706:return a.a="⤏","OPS";case 707:return a.a="⤎","OPS";case 708:return a.a="↓","OPS";case 709:return a.a="ℸ","A";case 710:return a.a="†","OP";case 711:return a.a="↷","OP";case 712:return a.a="↶","OP";case 713:return a.a="⤻","OP";case 714:return a.a="⋏","OP";case 715:return a.a="⋎","OP";case 716:return a.a="⋟","OP";case 717:return a.a="⋞","OP";case 718:return a.a="⊍","OP";case 719:return a.a="⋓","OP";
-case 720:return a.a="∪","OP";case 721:return a.a="∐","OPM";case 722:return a.a="∐","OPM";case 723:return a.a="∮","OP";case 724:return a.a="⨇","OPM";case 725:return a.a="∮","OP";case 726:return a.a="≅","OP";case 727:return a.a="∁","OP";case 728:return this.k("TEXTARG"),"COLSPAN";case 729:return this.pushState("TEXTARG"),"COLOR";case 730:return a.a="∷∼","OP";case 731:return a.a="∶∼","OP";case 732:return a.a="⩴","OP";case 733:return a.a="≔","OP";case 734:return a.a="∷−","OP";case 735:return a.a="≔",
-"OP";case 736:return a.a="∷≈","OP";case 737:return a.a="∶≈","OP";case 738:return a.a="∷","OP";case 739:return a.a=":","OP";case 740:return this.pushState("TEXTARG"),"COLLINES";case 741:return this.pushState("TEXTARG"),"COLLAYOUT";case 742:return this.k("TEXTARG"),"COLALIGN";case 743:return a.a="♣","OP";case 744:return a.a="¯","ACCENT";case 745:return a.a="⊝","OP";case 746:return a.a="⊚","OP";case 747:return a.a="⊛","OP";case 748:return a.a="⥁","OP";case 749:return a.a="⥀","OP";case 750:return a.a=
-"≗","OP";case 751:return a.a="∘","OP";case 752:return"TEXCHOOSE";case 753:return a.a="χ","A";case 754:return a.a="ˇ","ACCENTNS";case 755:return"CELLOPTS";case 756:return a.a="⋯","OP";case 757:return a.a="·","OP";case 758:return a.a="⋅","OP";case 759:return a.a="⋒","OP";case 760:return a.a="∩","OP";case 761:return a.a="⪮","OP";case 762:return a.a="≎","OP";case 763:return a.a="≏","OP";case 764:return a.a="•","OP";case 765:return a.a="⨲","OP";case 766:return a.a="⊠","OP";case 767:return a.a="⊞","OP";
-case 768:return a.a="⊟","OP";case 769:return"BOXED";case 770:return a.a="⊡","OP";case 771:return a.a="⧄","OP";case 772:return a.a="⧇","OP";case 773:return a.a="⧅","OP";case 774:return a.a="⧆","OP";case 775:return a.a="□","OP";case 776:return a.a="⋈","OP";case 777:return a.a="⊥","OP";case 778:return a.a="⊥","OP";case 779:return"MATHBF";case 780:return a.a="▸","OP";case 781:return a.a="◂","OP";case 782:return a.a="▾","OP";case 783:return a.a="▴","OP";case 784:return a.a="■","OP";case 785:return a.a=
-"⧫","OP";case 786:return a.a="⤍","OPS";case 787:return"BINOM";case 788:return a.a="⋀","OPM";case 789:return a.a="⋁","OPM";case 790:return a.a="⨄","OPM";case 791:return a.a="△","OP";case 792:return a.a="▽","OP";case 793:return a.a="⨉","OPM";case 794:return a.a="★","OP";case 795:return a.a="⨆","OPM";case 796:return a.a="⨅","OPM";case 797:return"BBIG";case 798:return"BIG";case 799:return a.a="⨂","OPM";case 800:return a.a="⨁","OPM";case 801:return a.a="⨀","OPM";case 802:return"BBIGL";case 803:return"BIGL";
-case 804:return a.a="⫼","OPM";case 805:return"BBIGG";case 806:return"BIGG";case 807:return"BBIGGL";case 808:return"BIGGL";case 809:return"BBIGG";case 810:return"BIGG";case 811:return a.a="⨃","OPM";case 812:return a.a="⋃","OPM";case 813:return a.a="○","OP";case 814:return a.a="⋂","OPM";case 815:return"BBIG";case 816:return"BIG";case 817:return this.pushState("TEXTARG"),"BGCOLOR";case 818:return a.a="≬","OP";case 819:return a.a="ℶ","A";case 820:return a.a="Β","A";case 821:return a.a="β","A";case 822:return"BVVMATRIX";
-case 823:return"BVMATRIX";case 824:return"BTOGGLE";case 825:return"BALIGNED";case 826:return"BSMALLMATRIX";case 827:return"BPMATRIX";case 828:return"BMATRIX";case 829:return"BGATHERED";case 830:return"BCASES";case 831:return"BBBMATRIX";case 832:return"BBMATRIX";case 833:return this.pushState("TEXTARG"),this.pushState("TEXTOPTARG"),this.pushState("TRYOPTARG"),"BARRAY";case 834:return"BALIGNED";case 835:return a.a="∵","OP";case 836:return a.a="ℿ","A";case 837:return a.a="⌅","OP";case 838:return a.a=
-"¯","ACCENTNS";case 839:return a.a="\\","OP";case 840:return a.a="⋍","OP";case 841:return a.a="∽","OP";case 842:return a.a="‵","OPP";case 843:return a.a="϶","OP";case 844:return"TEXATOP";case 845:return a.a="≍","OP";case 846:return a.a="∗","OP";case 847:return"ARRAYOPTS";case 848:return"ARRAY";case 849:return a.a=a.a.slice(1),"F";case 850:return a.a="≊","OP";case 851:return a.a="≈","OP";case 852:return a.a="∠","OP";case 853:return a.a="⨿","OP";case 854:return a.a="Α","A";case 855:return a.a="α","A";
-case 856:return this.pushState("TEXTARG"),"ALIGN";case 857:return a.a="ℵ","A";case 858:return a.a="⋰","OP";case 859:return a.a="Å","A";case 860:return"A";case 861:return a.a="%","A";case 862:return a.a="#","OP";case 863:return a.a="&","A";case 864:return a.a="$","A";case 865:return a.a="}","OPFS";case 866:return a.a="{","OPFS";case 867:return"NEGSPACE";case 868:return"MEDSPACE";case 869:return"THICKSPACE";case 870:return"THINSPACE";case 871:return a.a="‖","OPFS";case 872:return a.a="⁗","OPP";case 873:return a.a=
-"‴","OPP";case 874:return a.a="″","OPP";case 875:return a.a="′","OPP";case 876:return"HIGH_SURROGATE";case 877:return"LOW_SURROGATE";case 878:return"BMP_CHARACTER"}},rules:[/^(?:.)/,/^(?:\$\$|\\\[|\$|\\\()/,/^(?:$)/,/^(?:\\[$\\])/,/^(?:[<&>])/,/^(?:[^])/,/^(?:\s*\[)/,/^(?:.)/,/^(?:([^\\\]]|(\\[\\\]]))+)/,/^(?:\])/,/^(?:\s*\{)/,/^(?:([^\\\}]|(\\[\\\}]))+)/,/^(?:\})/,/^(?:\])/,/^(?:\s+)/,/^(?:\$\$|\\\]|\$|\\\))/,/^(?:\{)/,/^(?:\})/,/^(?:\^)/,/^(?:_)/,/^(?:\.)/,/^(?:&)/,/^(?:\\\\)/,/^(?:[0-9]+(?:\.[0-9]+)?|[\u0660-\u0669]+(?:\u066B[\u0660-\u0669]+)?|(?:\uD835[\uDFCE-\uDFD7])+|(?:\uD835[\uDFCE-\uDFD7])+|(?:\uD835[\uDFD8-\uDFE1])+|(?:\uD835[\uDFE2-\uDFEB])+|(?:\uD835[\uDFEC-\uDFF5])+|(?:\uD835[\uDFF6-\uDFFF])+)/,
-/^(?:[a-zA-Z]+)/,/^(?:\\Zeta)/,/^(?:\\zeta)/,/^(?:\\xrightleftharpoons)/,/^(?:\\xRightarrow)/,/^(?:\\xrightarrow)/,/^(?:\\xmapsto)/,/^(?:\\xleftrightharpoons)/,/^(?:\\xLeftrightarrow)/,/^(?:\\xleftrightarrow)/,/^(?:\\xLeftarrow)/,/^(?:\\xleftarrow)/,/^(?:\\Xi)/,/^(?:\\xi)/,/^(?:\\xhookrightarrow)/,/^(?:\\xhookleftarrow)/,/^(?:\\wr)/,/^(?:\\wp)/,/^(?:\\widevec)/,/^(?:\\widetilde)/,/^(?:\\widehat)/,/^(?:\\widecheck)/,/^(?:\\widebar)/,/^(?:\\wedgeq)/,/^(?:\\Wedge)/,/^(?:\\wedge)/,/^(?:\\Vvert)/,/^(?:\\Vvdash)/,
-/^(?:\\Vert)/,/^(?:\\vert)/,/^(?:\\veebar)/,/^(?:\\Vee)/,/^(?:\\vee)/,/^(?:\\vec)/,/^(?:\\vdots)/,/^(?:\\VDash)/,/^(?:\\Vdash)/,/^(?:\\vDash)/,/^(?:\\vdash)/,/^(?:\\Vbar)/,/^(?:\\vartriangleright)/,/^(?:\\vartriangleleft)/,/^(?:\\vartriangle)/,/^(?:\\vartheta)/,/^(?:\\varsupsetneqq)/,/^(?:\\varsupsetneq)/,/^(?:\\varsubsetneqq)/,/^(?:\\varsubsetneqq)/,/^(?:\\varsubsetneq)/,/^(?:\\varsigma)/,/^(?:\\varrho)/,/^(?:\\varpropto)/,/^(?:\\varpi)/,/^(?:\\varphi)/,/^(?:\\varnothing)/,/^(?:\\varkappa)/,/^(?:\\varepsilon)/,
-/^(?:\\Uuparrow)/,/^(?:\\upuparrows)/,/^(?:\\Upsilon)/,/^(?:\\upsilon)/,/^(?:\\Upsi)/,/^(?:\\uplus)/,/^(?:\\upint)/,/^(?:\\upharpoonright)/,/^(?:\\upharpoonleft)/,/^(?:\\Updownarrow)/,/^(?:\\updownarrow)/,/^(?:\\updarr)/,/^(?:\\Uparrow)/,/^(?:\\uparrow)/,/^(?:\\uparr)/,/^(?:\\unrhd)/,/^(?:\\unlhd)/,/^(?:\\Union)/,/^(?:\\union)/,/^(?:\\underset)/,/^(?:\\underoverset)/,/^(?:\\underline)/,/^(?:\\underbrace)/,/^(?:\\udots)/,/^(?:\u2ADD\u0338)/,/^(?:\u2ACC\uFE00)/,/^(?:\u2ACB\uFE00)/,/^(?:\u2AB0\u0338)/,
-/^(?:\u2AAF\u0338)/,/^(?:\u2AA2\u0338)/,/^(?:\u2AA1\u0338)/,/^(?:\u2A7E\u0338)/,/^(?:\u2A7D\u0338)/,/^(?:\u29D0\u0338)/,/^(?:\u29CF\u0338)/,/^(?:\u2290\u0338)/,/^(?:\u228F\u0338)/,/^(?:\u228B\uFE00)/,/^(?:\u228A\uFE00)/,/^(?:\u2283\u20D2)/,/^(?:\u2282\u20D2)/,/^(?:\u227F\u0338)/,/^(?:\u226B\u0338)/,/^(?:\u226A\u0338)/,/^(?:\u2269\uFE00)/,/^(?:\u2268\uFE00)/,/^(?:\u2266\u0338)/,/^(?:\u224F\u0338)/,/^(?:\u224E\u0338)/,/^(?:\u2242\u0338)/,/^(?:\u223D\u0331)/,/^(?:\u2237\u2248)/,/^(?:\u2237\u223C)/,/^(?:\u2237\u2212)/,
-/^(?:\u2236\u2248)/,/^(?:\u2236\u223C)/,/^(?:\u2212\u2237)/,/^(?:\u007C\u007C\u007C)/,/^(?:\u007C\u007C)/,/^(?:\u003E\u003D)/,/^(?:\u003D\u2237)/,/^(?:\u003D\u2237)/,/^(?:\u003D\u003D)/,/^(?:\u003C\u003E)/,/^(?:\u003C\u003D)/,/^(?:\u003A\u003D)/,/^(?:\u002F\u003D)/,/^(?:\u002F\u002F)/,/^(?:\u002E\u002E\u002E)/,/^(?:\u002E\u002E)/,/^(?:\u002D\u003E)/,/^(?:\u002D\u003D)/,/^(?:\u002D\u002D)/,/^(?:\u002B\u003D)/,/^(?:\u002B\u002B)/,/^(?:\u002A\u003D)/,/^(?:\u002A\u002A)/,/^(?:\u0026\u0026)/,/^(?:\u0021\u003D)/,
-/^(?:\u0021\u0021)/,/^(?:\\twoheadrightarrowtail)/,/^(?:\\twoheadrightarrow)/,/^(?:\\twoheadleftarrow)/,/^(?:\\tripleintegral)/,/^(?:\\trianglerighteq)/,/^(?:\\triangleright)/,/^(?:\\triangleq)/,/^(?:\\trianglelefteq)/,/^(?:\\triangleleft)/,/^(?:\\triangledown)/,/^(?:\\triangle)/,/^(?:\\towa)/,/^(?:\\tosa)/,/^(?:\\top)/,/^(?:\\tooltip)/,/^(?:\\tona)/,/^(?:\\toggle)/,/^(?:\\toea)/,/^(?:\\to)/,/^(?:\\timesb)/,/^(?:\\times)/,/^(?:\\tilde)/,/^(?:\\thinspace)/,/^(?:\\thickspace)/,/^(?:\\thicksim)/,/^(?:\\thickapprox)/,
-/^(?:\\Theta)/,/^(?:\\theta)/,/^(?:\\therefore)/,/^(?:\\tfrac)/,/^(?:\\textstyle)/,/^(?:\\textsize)/,/^(?:\\textquotedblright)/,/^(?:\\textquotedblleft)/,/^(?:\\textasciitilde)/,/^(?:\\textasciigrave)/,/^(?:\\textasciicircumflex)/,/^(?:\\textasciiacute)/,/^(?:\\text)/,/^(?:\\tensor)/,/^(?:\\tbinom)/,/^(?:\\Tau)/,/^(?:\\tau)/,/^(?:\\swArrow)/,/^(?:\\swarrow)/,/^(?:\\swArr)/,/^(?:\\swarr)/,/^(?:\\surd)/,/^(?:\\supsetneqq)/,/^(?:\\supsetneq)/,/^(?:\\supseteqq)/,/^(?:\\supseteq)/,/^(?:\\Supset)/,/^(?:\\supset)/,
-/^(?:\\sum)/,/^(?:\\succsim)/,/^(?:\\succnsim)/,/^(?:\\succneqq)/,/^(?:\\succnapprox)/,/^(?:\\succeq)/,/^(?:\\succcurlyeq)/,/^(?:\\succapprox)/,/^(?:\\succ)/,/^(?:\\substack)/,/^(?:\\subsetneqq)/,/^(?:\\subsetneq)/,/^(?:\\subseteqq)/,/^(?:\\subseteq)/,/^(?:\\Subset)/,/^(?:\\subset)/,/^(?:\\statusline)/,/^(?:\\star)/,/^(?:\\stackrel)/,/^(?:\\sslash)/,/^(?:\\square)/,/^(?:\\sqsupseteq)/,/^(?:\\sqsupset)/,/^(?:\\sqsubseteq)/,/^(?:\\sqsubset)/,/^(?:\\sqrt)/,/^(?:\\sqcup)/,/^(?:\\sqcap)/,/^(?:\\sphericalangle)/,
-/^(?:\\spadesuit)/,/^(?:\\space)/,/^(?:\\smile)/,/^(?:\\smallsmile)/,/^(?:\\smallsetminus)/,/^(?:\\smallfrown)/,/^(?:\\slash)/,/^(?:\\simeq)/,/^(?:\\sim)/,/^(?:\\Sigma)/,/^(?:\\sigma)/,/^(?:\\shuffle)/,/^(?:\\shortparallel)/,/^(?:\\shortmid)/,/^(?:\\sharp)/,/^(?:\\setminus)/,/^(?:\\seovnearrow)/,/^(?:\\seArrow)/,/^(?:\\searrow)/,/^(?:\\seArr)/,/^(?:\\searr)/,/^(?:\\scriptsize)/,/^(?:\\scriptscriptsize)/,/^(?:\\rtimes)/,/^(?:\\Rsh)/,/^(?:\\Rrightarrow)/,/^(?:\\rrangle)/,/^(?:\\rq)/,/^(?:\\rowspan)/,
-/^(?:\\rowopts)/,/^(?:\\rowlines)/,/^(?:\\rowalign)/,/^(?:\\root)/,/^(?:\\rmoustache)/,/^(?:\\risingdotseq)/,/^(?:\\righttoleftarrow)/,/^(?:\\rightthreetimes)/,/^(?:\\rightsquigarrow)/,/^(?:\\rightrightarrows)/,/^(?:\\rightleftharpoons)/,/^(?:\\rightleftarrows)/,/^(?:\\rightharpoonup)/,/^(?:\\rightharpoondown)/,/^(?:\\rightarrowtriangle)/,/^(?:\\rightarrowtail)/,/^(?:\\Rightarrow)/,/^(?:\\rightarrow)/,/^(?:\\right)/,/^(?:\\Rho)/,/^(?:\\rho)/,/^(?:\\rhd)/,/^(?:\\rfloor)/,/^(?:\\Re)/,/^(?:\\rdiagovsearrow)/,
-/^(?:\\rdiagovfdiag)/,/^(?:\\rceil)/,/^(?:\\rbrack)/,/^(?:\\rbrace)/,/^(?:\\rangle)/,/^(?:\\rang)/,/^(?:\\questeq)/,/^(?:\\quadrupleintegral)/,/^(?:\\quad)/,/^(?:\\qquad)/,/^(?:\\qed)/,/^(?:\\Psi)/,/^(?:\\psi)/,/^(?:\\propto)/,/^(?:\\product)/,/^(?:\\prod)/,/^(?:\\prime)/,/^(?:\\precsim)/,/^(?:\\precnsim)/,/^(?:\\precneqq)/,/^(?:\\precnapprox)/,/^(?:\\preceq)/,/^(?:\\preccurlyeq)/,/^(?:\\precapprox)/,/^(?:\\prec)/,/^(?:\\pmod)/,/^(?:\\pm)/,/^(?:\\plusdot)/,/^(?:\\plusb)/,/^(?:\\pitchfork)/,/^(?:\\Pi)/,
-/^(?:\\pi)/,/^(?:\\Phi)/,/^(?:\\phi)/,/^(?:\\phantom)/,/^(?:\\Perp)/,/^(?:\\perp)/,/^(?:\\partialmeetcontraction)/,/^(?:\\partial)/,/^(?:\\parr)/,/^(?:\\parallel)/,/^(?:\\padding)/,/^(?:\\overset)/,/^(?:\\overline)/,/^(?:\\overbrace)/,/^(?:\\over)/,/^(?:\\Otimes)/,/^(?:\\otimes)/,/^(?:\\oslash)/,/^(?:[\u007E\u00AF\u02C6\u02C7\u02C9\u02CD\u02DC\u02F7\u0302\u203E\u2044\u2190-\u2199\u219C-\u21AD\u21AF-\u21B5\u21B9\u21BC-\u21CC\u21D0-\u21DD\u21E0-\u21F0\u21F3\u21F5\u21F6\u21FD-\u21FF\u2215\u221A\u23B4\u23B5\u23DC-\u23E1\u27F0\u27F1\u27F5-\u27FF\u290A-\u2910\u2912\u2913\u2921\u2922\u294E-\u2961\u296E\u296F\u2B45\u2B46])/,
-/^(?:[\u2032-\u2035\u2057])/,/^(?:[\u220F-\u2211\u22C0-\u22C3\u2A00-\u2A0A\u2A10-\u2A14\u2AFC\u2AFF])/,/^(?:\\Oplus)/,/^(?:\\oplus)/,/^(?:[\u0028\u0029\u005B\u005D\u007C\u2016\u2308-\u230B\u2329\u232A\u2772\u2773\u27E6-\u27EF\u2980\u2983-\u2998\u29FC\u29FD])/,/^(?:[\u2018\u2019\u201C\u201D])/,/^(?:\\operatorname)/,/^(?:[\u0021-\u0023\u002A-\u002D\u002F\u003A-\u0040\u0060\u00A8\u00AA\u00AC\u00B0-\u00B4\u00B7-\u00BA\u00D7\u00F7\u02CA\u02CB\u02D8-\u02DA\u02DD\u0311\u03F6\u201A\u201B\u201E-\u2022\u2026\u2036\u2037\u2043\u2061-\u2064\u20DB\u20DC\u2145\u2146\u214B\u219A\u219B\u21AE\u21B6-\u21B8\u21BA\u21BB\u21CD-\u21CF\u21DE\u21DF\u21F1\u21F2\u21F4\u21F7-\u21FC\u2200-\u2204\u2206-\u220E\u2212-\u2214\u2216-\u2219\u221B-\u221D\u221F-\u22BF\u22C4-\u22FF\u2305\u2306\u2322\u2323\u23B0\u23B1\u25A0\u25A1\u25AA\u25AB\u25AD-\u25B9\u25BC-\u25CF\u25D6\u25D7\u25E6\u2605\u2660-\u2663\u266D-\u266F\u2758\u27F2\u27F3\u2900-\u2909\u2911\u2914-\u2920\u2923-\u294D\u2962-\u296D\u2970-\u297F\u2981\u2982\u2999-\u29D9\u29DB-\u29FB\u29FE\u29FF\u2A0B-\u2A0F\u2A15-\u2ADB\u2ADD-\u2AFB\u2AFD\u2AFE])/,
-/^(?:\\ominus)/,/^(?:\\omicron)/,/^(?:\\Omega)/,/^(?:\\omega)/,/^(?:\\oint)/,/^(?:\\oiint)/,/^(?:\\oiiint)/,/^(?:\\odot)/,/^(?:\\odash)/,/^(?:\\obslash)/,/^(?:\\nwovnearrow)/,/^(?:\\nwArrow)/,/^(?:\\nwarrow)/,/^(?:\\nwArr)/,/^(?:\\nwarr)/,/^(?:\\nVDash)/,/^(?:\\nVdash)/,/^(?:\\nvDash)/,/^(?:\\nvdash)/,/^(?:\u221E)/,/^(?:\\Nu)/,/^(?:\\nu)/,/^(?:\\ntrianglerighteq)/,/^(?:\\ntriangleright)/,/^(?:\\ntrianglelefteq)/,/^(?:\\ntriangleleft)/,/^(?:\\nsupseteq)/,/^(?:\\nsupset)/,/^(?:\\nsuccsim)/,/^(?:\\nsucceq)/,
-/^(?:\\nsucc)/,/^(?:\\nsubseteqq)/,/^(?:\\nsubseteq)/,/^(?:\\nsubset)/,/^(?:\\nsime)/,/^(?:\\nsim)/,/^(?:\\nshortparallel)/,/^(?:\\nshortmid)/,/^(?:\\nRightarrow)/,/^(?:\\nrightarrow)/,/^(?:\\npreceq)/,/^(?:\\nprec)/,/^(?:\\nparallel)/,/^(?:\\notni)/,/^(?:\\notin)/,/^(?:\\not)/,/^(?:\\nmid)/,/^(?:\\nless)/,/^(?:\\nleqslant)/,/^(?:\\nleqq)/,/^(?:\\nleq)/,/^(?:\\nLeftrightarrow)/,/^(?:\\nleftrightarrow)/,/^(?:\\nLeftarrow)/,/^(?:\\nleftarrow)/,/^(?:\\ni)/,/^(?:\\ngtr)/,/^(?:\\ngeqslant)/,/^(?:\\ngeqq)/,
-/^(?:\\ngeq)/,/^(?:\\nexists)/,/^(?:\\nequiv)/,/^(?:\\neqsim)/,/^(?:\\neq)/,/^(?:\\neovsearrow)/,/^(?:\\neovnwarrow)/,/^(?:\\negthickspace)/,/^(?:\\negspace)/,/^(?:\\negmedspace)/,/^(?:\\neg)/,/^(?:\\neArrow)/,/^(?:\\nearrow)/,/^(?:\\neArr)/,/^(?:\\nearr)/,/^(?:\\ne)/,/^(?:\\ncong)/,/^(?:\\nBumpeq)/,/^(?:\\nbumpeq)/,/^(?:\\natural)/,/^(?:\\napprox)/,/^(?:\\nabla)/,/^(?:\\multiscripts)/,/^(?:\\multimap)/,/^(?:\\Mu)/,/^(?:\\mu)/,/^(?:\\mtext)/,/^(?:\\ms)/,/^(?:\\mp)/,/^(?:\\models)/,/^(?:\\mod)/,/^(?:\\mo)/,
-/^(?:\\mn)/,/^(?:\\mlcp)/,/^(?:\\minusdot)/,/^(?:\\minusb)/,/^(?:\\minus)/,/^(?:\\min)/,/^(?:\\mid)/,/^(?:\\mi)/,/^(?:\\mho)/,/^(?:\\mho)/,/^(?:\\medspace)/,/^(?:\\measuredangle)/,/^(?:\\mathtt)/,/^(?:\\mathsf)/,/^(?:\\mathscr)/,/^(?:\\mathrm)/,/^(?:\\mathrlap)/,/^(?:\\mathrel)/,/^(?:\\mathraisebox)/,/^(?:\\mathop)/,/^(?:\\mathmit)/,/^(?:\\mathllap)/,/^(?:\\mathit)/,/^(?:\\mathfrak)/,/^(?:\\mathfr)/,/^(?:\\mathclap)/,/^(?:\\mathcal)/,/^(?:\\mathbscr)/,/^(?:\\mathbit)/,/^(?:\\mathbin)/,/^(?:\\mathbf)/,
-/^(?:\\mathbcal)/,/^(?:\\mathbb)/,/^(?:\\Mapsto)/,/^(?:\\mapsto)/,/^(?:\\Mapsfrom)/,/^(?:\\map)/,/^(?:\\lvertneqq)/,/^(?:\\lvertneqq)/,/^(?:\\ltimes)/,/^(?:\\lt)/,/^(?:\\Lsh)/,/^(?:\\lq)/,/^(?:\\lozenge)/,/^(?:\\lowint)/,/^(?:\\looparrowright)/,/^(?:\\looparrowleft)/,/^(?:\\Longrightarrow)/,/^(?:\\longrightarrow)/,/^(?:\\longmapsto)/,/^(?:\\Longleftrightarrow)/,/^(?:\\longleftrightarrow)/,/^(?:\\Longleftarrow)/,/^(?:\\longleftarrow)/,/^(?:\\lnsim)/,/^(?:\\lneqq)/,/^(?:\\lneq)/,/^(?:\\lnapprox)/,/^(?:\\lmoustache)/,
-/^(?:\\lll)/,/^(?:\\Lleftarrow)/,/^(?:\\llangle)/,/^(?:\\ll)/,/^(?:\\lhd)/,/^(?:\\lfloor)/,/^(?:\\lesssim)/,/^(?:\\lessgtr)/,/^(?:\\lesseqqgtr)/,/^(?:\\lesseqgtr)/,/^(?:\\lessdot)/,/^(?:\\lessapprox)/,/^(?:\\less)/,/^(?:\\leqslant)/,/^(?:\\leqq)/,/^(?:\\leq)/,/^(?:\\lefttorightarrow)/,/^(?:\\leftthreetimes)/,/^(?:\\leftsquigarrow)/,/^(?:\\leftrightsquigarrow)/,/^(?:\\leftrightharpoons)/,/^(?:\\leftrightarrowtria\*)/,/^(?:\\leftrightarrows)/,/^(?:\\Leftrightarrow)/,/^(?:\\leftrightarrow)/,/^(?:\\leftleftarrows)/,
-/^(?:\\leftharpoonup)/,/^(?:\\leftharpoondown)/,/^(?:\\leftarrowtriangle)/,/^(?:\\leftarrowtail)/,/^(?:\\Leftarrow)/,/^(?:\\leftarrow)/,/^(?:\\left)/,/^(?:\\le)/,/^(?:\\ldots)/,/^(?:\\lceil)/,/^(?:\\lbrack)/,/^(?:\\lbrace)/,/^(?:\\langle)/,/^(?:\\lang)/,/^(?:\\Lambda)/,/^(?:\\lambda)/,/^(?:\\kernelcontraction)/,/^(?:\\Kappa)/,/^(?:\\kappa)/,/^(?:\\jmath)/,/^(?:\\itexnum)/,/^(?:\\Iota)/,/^(?:\\iota)/,/^(?:\\invamp)/,/^(?:\\intx)/,/^(?:\\intprodr)/,/^(?:\\intprod)/,/^(?:\\Intersection)/,/^(?:\\intersection)/,
-/^(?:\\interleave)/,/^(?:\\intercal)/,/^(?:\\integral)/,/^(?:\\intcup)/,/^(?:\\intcap)/,/^(?:\\intBar)/,/^(?:\\intbar)/,/^(?:\\int)/,/^(?:\\infty)/,/^(?:\\infinity)/,/^(?:\\inf)/,/^(?:\\in)/,/^(?:\\implies)/,/^(?:\\impliedby)/,/^(?:\\imath)/,/^(?:\\Im)/,/^(?:\\iint)/,/^(?:\\iiint)/,/^(?:\\iiiint)/,/^(?:\\iff)/,/^(?:\\hslash)/,/^(?:\\href)/,/^(?:\\hookrightarrow)/,/^(?:\\hookleftarrow)/,/^(?:\\hkswarow)/,/^(?:\\hksearow)/,/^(?:\\heartsuit)/,/^(?:\\hbar)/,/^(?:\\hat)/,/^(?:\\gvertneqq)/,/^(?:\\gvertneqq)/,
-/^(?:\\gtrsim)/,/^(?:\\gtrless)/,/^(?:\\gtreqqless)/,/^(?:\\gtreqless)/,/^(?:\\gtrdot)/,/^(?:\\gtrapprox)/,/^(?:\\gt)/,/^(?:\\greater)/,/^(?:\\gnsim)/,/^(?:\\gneqq)/,/^(?:\\gneq)/,/^(?:\\gnapprox)/,/^(?:\\gimel)/,/^(?:\\ggg)/,/^(?:\\gg)/,/^(?:\\geqslant)/,/^(?:\\geqq)/,/^(?:\\geq)/,/^(?:\\ge)/,/^(?:\\Gamma)/,/^(?:\\gamma)/,/^(?:\\frown)/,/^(?:\\frame)/,/^(?:\\frac)/,/^(?:\\forksnot)/,/^(?:\\forks)/,/^(?:\\forall)/,/^(?:\\flat)/,/^(?:\\fdiagovrdiag)/,/^(?:\\fdiagovnearrow)/,/^(?:\\fallingdotseq)/,
-/^(?:\\exists)/,/^(?:\\eth)/,/^(?:\\eth)/,/^(?:\\Eta)/,/^(?:\\eta)/,/^(?:\\equiv)/,/^(?:\\equalrows)/,/^(?:\\equalcols)/,/^(?:\\eqslantless)/,/^(?:\\eqslantgtr)/,/^(?:\\eqsim)/,/^(?:\\Eqqcolon)/,/^(?:\\eqqcolon)/,/^(?:\\Eqcolon)/,/^(?:\\Eqcolon)/,/^(?:\\Eqcolon)/,/^(?:\\Eqcolon)/,/^(?:\\eqcolon)/,/^(?:\\eqcirc)/,/^(?:\\epsilon)/,/^(?:\\end\{Vmatrix\})/,/^(?:\\end\{vmatrix\})/,/^(?:\\endtoggle)/,/^(?:\\end\{split\})/,/^(?:\\end\{smallmatrix\})/,/^(?:\\end\{pmatrix\})/,/^(?:\\end\{matrix\})/,/^(?:\\end\{gathered\})/,
-/^(?:\\end\{cases\})/,/^(?:\\end\{Bmatrix\})/,/^(?:\\end\{bmatrix\})/,/^(?:\\end\{array\})/,/^(?:\\end\{aligned\})/,/^(?:\\emptyset)/,/^(?:\\empty)/,/^(?:\\embedsin)/,/^(?:\\ell)/,/^(?:\\duparr)/,/^(?:\\dualmap)/,/^(?:\\drbkarrow)/,/^(?:\\downuparrow)/,/^(?:\\downharpoonright)/,/^(?:\\downharpoonleft)/,/^(?:\\downdownarrows)/,/^(?:\\Downarrow)/,/^(?:\\downarrow)/,/^(?:\\doubleintegral)/,/^(?:\\doublebarwedge)/,/^(?:\\doublebarwedge)/,/^(?:\\dots)/,/^(?:\\dotplus)/,/^(?:\\dotminus)/,/^(?:\\doteqdot)/,
-/^(?:\\Doteq)/,/^(?:\\doteq)/,/^(?:\\dot)/,/^(?:\\divideontimes)/,/^(?:\\div)/,/^(?:\\displaystyle)/,/^(?:\\disjquant)/,/^(?:\\digamma)/,/^(?:\\diamondsuit)/,/^(?:\\Diamond)/,/^(?:\\diamond)/,/^(?:\\det|\\gcd|\\liminf|\\limsup|\\lim|\\max|\\Pr|\\sup)/,/^(?:\\Delta)/,/^(?:\\delta)/,/^(?:\\Del)/,/^(?:\\degree)/,/^(?:\\Ddownarrow)/,/^(?:\\ddotseq)/,/^(?:\\ddots)/,/^(?:\\ddot)/,/^(?:\\dddot)/,/^(?:\\dddot)/,/^(?:\\ddddot)/,/^(?:\\ddddot)/,/^(?:\\ddagger)/,/^(?:\\dblcolon)/,/^(?:\\dbkarow)/,/^(?:\\Dashv)/,
-/^(?:\\dashV)/,/^(?:\\dashv)/,/^(?:\\dashrightarrow)/,/^(?:\\dashleftarrow)/,/^(?:\\darr)/,/^(?:\\daleth)/,/^(?:\\dagger)/,/^(?:\\curvearrowright)/,/^(?:\\curvearrowleft)/,/^(?:\\curvearrowbotright)/,/^(?:\\curlywedge)/,/^(?:\\curlyvee)/,/^(?:\\curlyeqsucc)/,/^(?:\\curlyeqprec)/,/^(?:\\cupdot)/,/^(?:\\Cup)/,/^(?:\\cup)/,/^(?:\\coproduct)/,/^(?:\\coprod)/,/^(?:\\contourintegral)/,/^(?:\\conjquant)/,/^(?:\\conint)/,/^(?:\\cong)/,/^(?:\\complement)/,/^(?:\\colspan)/,/^(?:\\color)/,/^(?:\\Colonsim)/,
-/^(?:\\colonsim)/,/^(?:\\Coloneqq)/,/^(?:\\coloneqq)/,/^(?:\\Coloneq)/,/^(?:\\coloneq)/,/^(?:\\Colonapprox)/,/^(?:\\colonapprox)/,/^(?:\\Colon)/,/^(?:\\colon)/,/^(?:\\collines)/,/^(?:\\collayout)/,/^(?:\\colalign)/,/^(?:\\clubsuit)/,/^(?:\\closure)/,/^(?:\\circleddash)/,/^(?:\\circledcirc)/,/^(?:\\circledast)/,/^(?:\\circlearrowright)/,/^(?:\\circlearrowleft)/,/^(?:\\circeq)/,/^(?:\\circ)/,/^(?:\\choose)/,/^(?:\\chi)/,/^(?:\\check)/,/^(?:\\cellopts)/,/^(?:\\cdots)/,/^(?:\\cdotp)/,/^(?:\\cdot)/,/^(?:\\Cap)/,
-/^(?:\\cap)/,/^(?:\\bumpeqq)/,/^(?:\\Bumpeq)/,/^(?:\\bumpeq)/,/^(?:\\bullet)/,/^(?:\\btimes)/,/^(?:\\boxtimes)/,/^(?:\\boxplus)/,/^(?:\\boxminus)/,/^(?:\\boxed)/,/^(?:\\boxdot)/,/^(?:\\boxdiag)/,/^(?:\\boxcircle)/,/^(?:\\boxbslash)/,/^(?:\\boxast)/,/^(?:\\Box)/,/^(?:\\bowtie)/,/^(?:\\bottom)/,/^(?:\\bot)/,/^(?:\\boldsymbol)/,/^(?:\\blacktriangleright)/,/^(?:\\blacktriangleleft)/,/^(?:\\blacktriangledown)/,/^(?:\\blacktriangle)/,/^(?:\\blacksquare)/,/^(?:\\blacklozenge)/,/^(?:\\bkarow)/,/^(?:\\binom)/,
-/^(?:\\bigwedge)/,/^(?:\\bigvee)/,/^(?:\\biguplus)/,/^(?:\\bigtriangleup)/,/^(?:\\bigtriangledown)/,/^(?:\\bigtimes)/,/^(?:\\bigstar)/,/^(?:\\bigsqcup)/,/^(?:\\bigsqcap)/,/^(?:\\Bigr)/,/^(?:\\bigr)/,/^(?:\\bigotimes)/,/^(?:\\bigoplus)/,/^(?:\\bigodot)/,/^(?:\\Bigl)/,/^(?:\\bigl)/,/^(?:\\biginterleave)/,/^(?:\\Biggr)/,/^(?:\\biggr)/,/^(?:\\Biggl)/,/^(?:\\biggl)/,/^(?:\\Bigg)/,/^(?:\\bigg)/,/^(?:\\bigcupdot)/,/^(?:\\bigcup)/,/^(?:\\bigcirc)/,/^(?:\\bigcap)/,/^(?:\\Big)/,/^(?:\\big)/,/^(?:\\bgcolor)/,
-/^(?:\\between)/,/^(?:\\beth)/,/^(?:\\Beta)/,/^(?:\\beta)/,/^(?:\\begin\{Vmatrix\})/,/^(?:\\begin\{vmatrix\})/,/^(?:\\begintoggle)/,/^(?:\\begin\{split\})/,/^(?:\\begin\{smallmatrix\})/,/^(?:\\begin\{pmatrix\})/,/^(?:\\begin\{matrix\})/,/^(?:\\begin\{gathered\})/,/^(?:\\begin\{cases\})/,/^(?:\\begin\{Bmatrix\})/,/^(?:\\begin\{bmatrix\})/,/^(?:\\begin\{array\})/,/^(?:\\begin\{aligned\})/,/^(?:\\because)/,/^(?:\\BbbPi)/,/^(?:\\barwedge)/,/^(?:\\bar)/,/^(?:\\backslash)/,/^(?:\\backsimeq)/,/^(?:\\backsim)/,
-/^(?:\\backprime)/,/^(?:\\backepsilon)/,/^(?:\\atop)/,/^(?:\\asymp)/,/^(?:\\ast)/,/^(?:\\arrayopts)/,/^(?:\\array)/,/^(?:\\arccos|\\arcsin|\\arctan|\\arg|\\cosh|\\cos|\\coth|\\cot|\\csc|\\deg|\\dim|\\exp|\\hom|\\ker|\\lg|\\ln|\\log|\\sec|\\sinh|\\sin|\\tanh|\\tan)/,/^(?:\\approxeq)/,/^(?:\\approx)/,/^(?:\\angle)/,/^(?:\\amalg)/,/^(?:\\Alpha)/,/^(?:\\alpha)/,/^(?:\\align)/,/^(?:\\aleph)/,/^(?:\\adots)/,/^(?:\\AA)/,/^(?:[\u0041-\u005A\u0061-\u007A\u00F0\u0131\u0237\u0391-\u03A1\u03A3\u03A4\u03A6-\u03A9\u03B1-\u03C9\u03D0-\u03D2\u03D5\u03D6\u03DA-\u03DD\u03E0\u03E1\u03F0\u03F1\u03F4\u03F5\u0428\u0608\u0627-\u063A\u2102\u210A-\u210D\u210F-\u2113\u2115\u2118-\u211D\u2124\u2127\u2128\u212B-\u212D\u212F-\u2131\u2133-\u2138\u213C\u213D\u213F\u2205]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB])/,
-/^(?:\\%)/,/^(?:\\#)/,/^(?:\\&)/,/^(?:\\\$)/,/^(?:\\\})/,/^(?:\\\{)/,/^(?:\\!)/,/^(?:\\:)/,/^(?:\\;)/,/^(?:\\,)/,/^(?:\\\|)/,/^(?:'''')/,/^(?:''')/,/^(?:'')/,/^(?:')/,/^(?:[\uD800-\uDBFF])/,/^(?:[\uDC00-\uDFFF])/,/^(?:.)/],N:{MATH0:{rules:[14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,
-102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,
-228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,
-354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,
-480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,
-606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,
-732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,
-858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878],inclusive:h},MATH1:{rules:[14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,
-133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,
-259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,
-385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,
-511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,
-637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,
-763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878],inclusive:h},OPTARG:{rules:[13,14,15,
-16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,
-163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,
-289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,
-415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,
-541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,
-667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,
-793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878],inclusive:h},DOCUMENT:{rules:[1,2,3,4,5],inclusive:p},TRYOPTARG:{rules:[6,7],inclusive:p},TEXTOPTARG:{rules:[8,9],inclusive:p},TEXTARG:{rules:[10,11,12],inclusive:p},
-INITIAL:{rules:[0,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,
-157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,
-283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,
-409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,
-535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,
-661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,
-787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878],inclusive:h}}}}();y.prototype=l;l.pa=y;return new y}();window.TeXZilla=u;window.TeXZilla.setDOMParser=u.fa;
-window.TeXZilla.setXMLSerializer=u.ja;window.TeXZilla.setSafeMode=u.ia;window.TeXZilla.setItexIdentifierMode=u.ha;window.TeXZilla.getTeXSource=u.ca;window.TeXZilla.toMathMLString=u.Z;window.TeXZilla.toMathML=u.Y;window.TeXZilla.toImage=u.na;window.TeXZilla.filterString=u.R;window.TeXZilla.filterElement=u.Q;
diff --git a/mail/app.mozbuild b/mail/app.mozbuild
index 6854f2361..a5c6bef0e 100644
--- a/mail/app.mozbuild
+++ b/mail/app.mozbuild
@@ -3,11 +3,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+include('/xpfe/xpfe.mozbuild')
+
if not CONFIG['MOZ_INCOMPLETE_EXTERNAL_LINKAGE']:
DIRS += ['/mail/components']
-include('/xptoolkit/xptoolkit.mozbuild')
-
if CONFIG['MOZ_EXTENSIONS']:
DIRS += ['/extensions']
diff --git a/navigator/app.mozbuild b/navigator/app.mozbuild
index bdfcaa8d2..e06926559 100644
--- a/navigator/app.mozbuild
+++ b/navigator/app.mozbuild
@@ -3,14 +3,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-include('/xptoolkit/xptoolkit.mozbuild')
+include('/xpfe/xpfe.mozbuild')
if CONFIG['MOZ_EXTENSIONS']:
DIRS += ['/extensions']
DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
-DIRS += [
- '/xpfe/components/autocomplete',
- '/navigator',
-]
+DIRS += ['/navigator']
diff --git a/navigator/modules/PolyGHL.jsm b/navigator/modules/PolyGHL.jsm
index e633aeeb1..c3508a8c3 100644
--- a/navigator/modules/PolyGHL.jsm
+++ b/navigator/modules/PolyGHL.jsm
@@ -22,7 +22,6 @@ this.EXPORTED_SYMBOLS = [ "PolyGHL" ];
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");
-Components.utils.import("resource://services-common/async.js");
const pfBase = `typeof queueMicrotask !== 'function' && (queueMicrotask = function(f) {setTimeout(f, 0)});(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,e)})(e)}function c(e,t,r){return(c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&a(o,r.prototype),o}).apply(null,arguments)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.r(t);var l=function(e){function t(e){var r,i,s,c,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?u(e):t}(this,(r=f(t)).call.apply(r,[this].concat(o(e)))),s=u(i),a=void 0,(c="_entries")in s?Object.defineProperty(s,c,{value:a,enumerable:!0,configurable:!0,writable:!0}):s[c]=a,i._entries=e,i}var r,s,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,e),r=t,(s=[{key:"getEntries",value:function(){return this._entries}},{key:"getEntriesByType",value:function(e){return this._entries.filter((function(t){return t.entryType===e}))}},{key:"getEntriesByName",value:function(e,t){return this._entries.filter((function(t){return t.name===e})).filter((function(e){return!t||e.entryType===t}))}}])&&i(r.prototype,s),c&&i(r,c),t}(s(Array));function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=["mark","measure","navigation","resource"],h="Failed to execute 'observe' on 'PerformanceObserver': either an 'entryTypes' or 'type' member must be present.",m="Failed to execute 'observe' on 'PerformanceObserver': either an 'entryTypes' or 'type' member must be present, not both.",g="Aborting 'observe' on 'PerformanceObserver': no valid entry types present in either 'entryTypes' or 'type' member.",O="Invalid or unsupported entry types provided to 'observe' on 'PerformanceObserver'.",w=function(e){return d.some((function(t){return e===t}))},P=new(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.registeredObservers,n=void 0===r?new Set:r,o=t.processedEntries,i=void 0===o?new Set:o,u=t.interval,s=void 0===u?100:u,c=t.context,a=void 0===c?self:c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),p(this,"registeredObservers",void 0),p(this,"processedEntries",void 0),p(this,"interval",void 0),p(this,"intervalId",void 0),p(this,"context",void 0),this.registeredObservers=n,this.processedEntries=i,this.interval=s,this.context=a,this.intervalId=null}var t,r,n;return t=e,(r=[{key:"getNewEntries",value:function(){var e=this;return this.context.performance.getEntries().filter((function(t){return!e.processedEntries.has(t)}))}},{key:"getObserversForType",value:function(e,t){return Array.from(e).filter((function(e){return e.entryTypes.some((function(e){return e===t}))}))}},{key:"processBuffer",value:function(e){var t=Array.from(e.buffer),r=new l(t);e.buffer.clear(),t.length&&e.callback&&e.callback.call(void 0,r,e)}},{key:"processEntries",value:function(){var e=this;this.getNewEntries().forEach((function(t){var r=t.entryType;e.getObserversForType(e.registeredObservers,r).forEach((function(e){e.buffer.add(t)})),e.processedEntries.add(t)}));var t=function(){return e.registeredObservers.forEach(e.processBuffer)};"requestAnimationFrame"in this.context?this.context.requestAnimationFrame(t):this.context.setTimeout(t,0)}},{key:"add",value:function(e){this.registeredObservers.add(e),1===this.registeredObservers.size&&this.observe()}},{key:"remove",value:function(e){this.registeredObservers.delete(e),this.registeredObservers.size||this.disconnect()}},{key:"observe",value:function(){this.intervalId=this.context.setInterval(this.processEntries.bind(this),this.interval)}},{key:"disconnect",value:function(){this.intervalId=this.context.clearInterval(this.intervalId)}}])&&y(t.prototype,r),n&&y(t,n),e}()),k=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,"callback",void 0),b(this,"buffer",void 0),b(this,"entryTypes",[]),b(this,"taskQueue",void 0),this.callback=t,this.buffer=new Set,this.taskQueue=r}var t,r,n;return t=e,(r=[{key:"observe",value:function(e){if(!e)throw new Error(h);if(e.entryTypes&&e.type)throw new Error(m);var t;if(e.entryTypes)t=e.entryTypes;else{if(!e.type)throw new Error(h);t=[e.type]}var r=t.filter(w);r.length>0&&r.length!==t.length&&console.warn(O),r.length?(this.entryTypes=r,this.taskQueue.add(this)):console.warn(g)}},{key:"disconnect",value:function(){this.taskQueue.remove(this)}},{key:"takeRecords",value:function(){var e=Array.from(this.buffer);return new l(e)}}])&&v(t.prototype,r),n&&v(t,n),e}();b(k,"supportedEntryTypes",d);var E="PerformanceObserver"in self&&"function"==typeof PerformanceObserver?PerformanceObserver:k,j=self;j.PerformanceObserver||(j.PerformanceObserver=E)}])}).call(this);(function(){if(Element.prototype.replaceChildren===undefined){Element.prototype.replaceChildren=function(...nodesOrDOMStrings){while(this.lastChild){this.removeChild(this.lastChild)}if(nodesOrDOMStrings.length){this.append(...nodesOrDOMStrings)}}}}());`;
@@ -140,12 +139,8 @@ this.PolyGHL = {
}
},
usingExtension: function() {
- let cb = Async.makeSyncCallback();
- AddonManager.getAddonByID("github-wc-polyfill@Off.JustOff", cb);
-
- let addon = Async.waitForSyncCallback(cb);
-
let rv = false
+ let addon = AddonManager.getAddonByID("github-wc-polyfill@Off.JustOff");
if (addon && addon.isActive) {
rv = true;
diff --git a/platform b/platform
-Subproject feb23197192637f1fe761c45bb6e22fd63d10ec
+Subproject 4af56f8f2394f69d9793e6ee5cd8e059d59e695
diff --git a/xpfe/components/autocomplete/jar.mn b/xpfe/components/autocomplete/jar.mn
new file mode 100644
index 000000000..d3ddf8a61
--- /dev/null
+++ b/xpfe/components/autocomplete/jar.mn
@@ -0,0 +1,9 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+toolkit.jar:
+ content/global/autocomplete.xml (resources/content/autocomplete.xml)
+
+comm.jar:
+ content/communicator/autocomplete.css (resources/content/autocomplete.css)
diff --git a/xptoolkit/components/preferences/moz.build b/xpfe/components/autocomplete/moz.build
index e0eb66aac..635fa39c9 100644
--- a/xptoolkit/components/preferences/moz.build
+++ b/xpfe/components/autocomplete/moz.build
@@ -1,6 +1,6 @@
-# vim: set filetype=python:
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-JAR_MANIFESTS += ['jar.mn']
+JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file
diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.css b/xpfe/components/autocomplete/resources/content/autocomplete.css
new file mode 100644
index 000000000..6c67bad2e
--- /dev/null
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.css
@@ -0,0 +1,46 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+
+.autocomplete-result-popupset {
+ width: 0 !important;
+}
+
+.autocomplete-result-popup {
+ display: -moz-popup !important;
+}
+
+/* the C++ implementation of widgets is too eager to make popups visible.
+ this causes problems (bug 120155 and others), thus this workaround: */
+.autocomplete-result-popup[hidden="true"] {
+ visibility: hidden;
+}
+
+.autocomplete-tree {
+ -moz-user-focus: ignore;
+}
+
+.autocomplete-history-dropmarker {
+ display: none;
+}
+
+.autocomplete-history-dropmarker[enablehistory="true"] {
+ display: -moz-box;
+}
+
+/* The following rule is here to fix bug 96899 (and now 117952).
+ Somehow trees create a situation
+ in which a popupset flows itself as if its popup child is directly within it
+ instead of the placeholder child that should actually be inside the popupset.
+ This is a stopgap measure, and it does not address the real bug. */
+popupset {
+ max-width: 0px;
+ width: 0px;
+ min-width: 0%;
+ min-height: 0%;
+}
+
+treecolpicker {
+ display: none;
+}
diff --git a/xpfe/components/autocomplete/resources/content/autocomplete.xml b/xpfe/components/autocomplete/resources/content/autocomplete.xml
new file mode 100644
index 000000000..93b6dfdb0
--- /dev/null
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml
@@ -0,0 +1,1646 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+
+<bindings id="autocompleteBindings"
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:xbl="http://www.mozilla.org/xbl">
+
+ <binding id="autocomplete" role="xul:combobox"
+ extends="chrome://global/content/bindings/textbox.xml#textbox">
+ <resources>
+ <stylesheet src="chrome://communicator/content/autocomplete.css"/>
+ <stylesheet src="chrome://global/skin/autocomplete.css"/>
+ </resources>
+
+ <content>
+ <children includes="menupopup"/>
+
+ <xul:hbox class="autocomplete-textbox-container" flex="1" align="center">
+ <children includes="image|deck|stack|box">
+ <xul:image class="autocomplete-icon" allowevents="true"/>
+ </children>
+
+ <xul:hbox class="textbox-input-box" flex="1" xbl:inherits="context,tooltiptext=inputtooltiptext">
+ <children/>
+ <html:input anonid="input" class="autocomplete-textbox textbox-input"
+ allowevents="true"
+ xbl:inherits="tooltiptext=inputtooltiptext,value,type,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey,mozactionhint,userAction"/>
+ </xul:hbox>
+ <children includes="hbox"/>
+ </xul:hbox>
+
+ <xul:dropmarker class="autocomplete-history-dropmarker" allowevents="true"
+ xbl:inherits="open,enablehistory" anonid="historydropmarker"/>
+
+ <xul:popupset>
+ <xul:panel type="autocomplete" anonid="popup"
+ ignorekeys="true" noautofocus="true" level="top"
+ xbl:inherits="for=id,nomatch"/>
+ </xul:popupset>
+ </content>
+
+ <implementation implements="nsIDOMXULMenuListElement">
+
+ <constructor><![CDATA[
+ // XXX bug 90337 band-aid until we figure out what's going on here
+ if (this.value != this.mInputElt.value)
+ this.mInputElt.value = this.value;
+ delete this.value;
+
+ // listen for pastes
+ this.mInputElt.controllers.insertControllerAt(0, this.mPasteController);
+
+ // listen for menubar activation
+ window.top.addEventListener("DOMMenuBarActive", this.mMenuBarListener, true);
+
+ // set default property values
+ this.ifSetAttribute("timeout", 50);
+ this.ifSetAttribute("pastetimeout", 1000);
+ this.ifSetAttribute("maxrows", 5);
+ this.ifSetAttribute("showpopup", true);
+ this.ifSetAttribute("disableKeyNavigation", true);
+
+ // initialize the search sessions
+ if (this.hasAttribute("autocompletesearch"))
+ this.initAutoCompleteSearch();
+
+ // hack to work around lack of bottom-up constructor calling
+ if ("initialize" in this.popup)
+ this.popup.initialize();
+ ]]></constructor>
+
+ <destructor><![CDATA[
+ this.clearResults(false);
+ window.top.removeEventListener("DOMMenuBarActive", this.mMenuBarListener, true);
+ this.mInputElt.controllers.removeController(this.mPasteController);
+ ]]></destructor>
+
+ <!-- =================== nsIAutoCompleteInput =================== -->
+ <!-- XXX: This implementation is currently incomplete. -->
+
+ <!-- reference to the results popup element -->
+ <field name="popup"><![CDATA[
+ document.getAnonymousElementByAttribute(this, "anonid", "popup");
+ ]]></field>
+
+ <property name="popupOpen"
+ onget="return this.mMenuOpen;"
+ onset="if (val) this.openPopup(); else this.closePopup(); return val;"/>
+
+ <!-- option to turn off autocomplete -->
+ <property name="disableAutoComplete"
+ onset="this.setAttribute('disableautocomplete', val); return val;"
+ onget="return this.getAttribute('disableautocomplete') == 'true';"/>
+
+ <!-- if the resulting match string is not at the beginning of the typed string,
+ this will optionally autofill like this "bar |>> foobar|" -->
+ <property name="completeDefaultIndex"
+ onset="this.setAttribute('completedefaultindex', val); return val;"
+ onget="return this.getAttribute('completedefaultindex') == 'true';"/>
+
+ <!-- option for completing to the default result whenever the user hits
+ enter or the textbox loses focus -->
+ <property name="forceComplete"
+ onset="this.setAttribute('forcecomplete', val); return val;"
+ onget="return this.getAttribute('forcecomplete') == 'true';"/>
+
+ <property name="minResultsForPopup"
+ onset="this.setAttribute('minresultsforpopup', val); return val;"
+ onget="var t = this.getAttribute('minresultsforpopup'); return t ? parseInt(t) : 1;"/>
+
+ <!-- maximum number of rows to display -->
+ <property name="maxRows"
+ onset="this.setAttribute('maxrows', val); return val;"
+ onget="return parseInt(this.getAttribute('maxrows')) || 0;"/>
+
+ <!-- toggles a second column in the results list which contains
+ the string in the comment field of each autocomplete result -->
+ <property name="showCommentColumn"
+ onget="return this.getAttribute('showcommentcolumn') == 'true';">
+ <setter><![CDATA[
+ this.popup.showCommentColumn = val;
+ this.setAttribute('showcommentcolumn', val);
+ return val;
+ ]]></setter>
+ </property>
+
+ <!-- number of milliseconds after a keystroke before a search begins -->
+ <property name="timeout"
+ onset="this.setAttribute('timeout', val); return val;"
+ onget="return parseInt(this.getAttribute('timeout')) || 0;"/>
+
+ <property name="searchParam"
+ onget="return this.getAttribute('autocompletesearchparam') || '';"
+ onset="this.setAttribute('autocompletesearchparam', val); return val;"/>
+
+ <property name="searchCount" readonly="true"
+ onget="return this.sessionCount;"/>
+
+ <method name="getSearchAt">
+ <parameter name="aIndex"/>
+ <body><![CDATA[
+ var idx = -1;
+ for (var name in this.mSessions)
+ if (++idx == aIndex)
+ return name;
+
+ return null;
+ ]]></body>
+ </method>
+
+ <property name="textValue"
+ onget="return this.value;"
+ onset="this.setTextValue(val); return val;"/>
+
+ <method name="onSearchBegin">
+ <body><![CDATA[
+ this._fireEvent("searchbegin");
+ ]]></body>
+ </method>
+
+ <method name="onSearchComplete">
+ <body><![CDATA[
+ if (this.noMatch)
+ this.setAttribute("nomatch", "true");
+ else
+ this.removeAttribute("nomatch");
+
+ this._fireEvent("searchcomplete");
+ ]]></body>
+ </method>
+
+ <method name="onTextReverted">
+ <body><![CDATA[
+ return this._fireEvent("textreverted");
+ ]]></body>
+ </method>
+
+ <!-- =================== nsIDOMXULMenuListElement =================== -->
+
+ <property name="editable" readonly="true"
+ onget="return true;" />
+
+ <property name="crop"
+ onset="this.setAttribute('crop', val); return val;"
+ onget="return this.getAttribute('crop');"/>
+
+ <property name="label" readonly="true"
+ onget="return this.mInputElt.value;"/>
+
+ <property name="open"
+ onget="return this.getAttribute('open') == 'true';">
+ <setter>
+ <![CDATA[
+ var historyPopup = document.getAnonymousElementByAttribute(this, "anonid", "historydropmarker");
+ if (val) {
+ this.setAttribute('open', true);
+ historyPopup.showPopup();
+ } else {
+ this.removeAttribute('open');
+ historyPopup.hidePopup();
+ }
+ ]]>
+ </setter>
+ </property>
+
+ <!-- =================== PUBLIC PROPERTIES =================== -->
+
+ <property name="value"
+ onget="return this.mInputElt.value;">
+ <setter><![CDATA[
+ this.ignoreInputEvent = true;
+ this.mInputElt.value = val;
+ this.ignoreInputEvent = false;
+ var event = document.createEvent('Events');
+ event.initEvent('ValueChange', true, true);
+ this.mInputElt.dispatchEvent(event);
+ return val;
+ ]]></setter>
+ </property>
+
+ <property name="focused"
+ onget="return this.getAttribute('focused') == 'true';"/>
+
+ <method name="initAutoCompleteSearch">
+ <body><![CDATA[
+ var list = this.getAttribute("autocompletesearch").split(" ");
+ for (var i = 0; i < list.length; i++) {
+ var name = list[i];
+ var contractid = "@mozilla.org/autocomplete/search;1?name=" + name;
+ if (contractid in Components.classes) {
+ try {
+ this.mSessions[name] =
+ Components.classes[contractid].getService(Components.interfaces.nsIAutoCompleteSearch);
+ this.mLastResults[name] = null;
+ this.mLastRows[name] = 0;
+ ++this.sessionCount;
+ } catch (e) {
+ dump("### ERROR - unable to create search \"" + name + "\".\n");
+ }
+ } else {
+ dump("search \"" + name + "\" not found - skipping.\n");
+ }
+ }
+ ]]></body>
+ </method>
+
+ <!-- the number of sessions currently in use -->
+ <field name="sessionCount">0</field>
+
+ <!-- number of milliseconds after a paste before a search begins -->
+ <property name="pasteTimeout"
+ onset="this.setAttribute('pastetimeout', val); return val;"
+ onget="var t = parseInt(this.getAttribute('pastetimeout')); return t ? t : 0;"/>
+
+ <!-- option for filling the textbox with the best match while typing
+ and selecting the difference -->
+ <property name="autoFill"
+ onset="this.setAttribute('autofill', val); return val;"
+ onget="return this.getAttribute('autofill') == 'true';"/>
+
+ <!-- if this attribute is set, allow different style for
+ non auto-completed lines -->
+ <property name="highlightNonMatches"
+ onset="this.setAttribute('highlightnonmatches', val); return val;"
+ onget="return this.getAttribute('highlightnonmatches') == 'true';"/>
+
+ <!-- option to show the popup containing the results -->
+ <property name="showPopup"
+ onset="this.setAttribute('showpopup', val); return val;"
+ onget="return this.getAttribute('showpopup') == 'true';"/>
+
+ <!-- option to allow scrolling through the list via the tab key, rather than
+ tab moving focus out of the textbox -->
+ <property name="tabScrolling"
+ onset="this.setAttribute('tabscrolling', val); return val;"
+ onget="return this.getAttribute('tabscrolling') == 'true';"/>
+
+ <!-- option to completely ignore any blur events while
+ searches are still going on. This is useful so that nothing
+ gets autopicked if the window is required to lose focus for
+ some reason (eg in LDAP autocomplete, another window may be
+ brought up so that the user can enter a password to authenticate
+ to an LDAP server). -->
+ <property name="ignoreBlurWhileSearching"
+ onset="this.setAttribute('ignoreblurwhilesearching', val); return val;"
+ onget="return this.getAttribute('ignoreblurwhilesearching') == 'true';"/>
+
+ <!-- state which indicates the current action being performed by the user.
+ Possible values are : none, typing, scrolling -->
+ <property name="userAction"
+ onset="this.setAttribute('userAction', val); return val;"
+ onget="return this.getAttribute('userAction');"/>
+
+ <!-- state which indicates if the last search had no matches -->
+ <field name="noMatch">true</field>
+
+ <!-- state which indicates a search is currently happening -->
+ <field name="isSearching">false</field>
+
+ <!-- state which indicates a search timeout is current waiting -->
+ <property name="isWaiting"
+ onget="return this.mAutoCompleteTimer != 0;"/>
+
+ <!-- =================== PRIVATE PROPERTIES =================== -->
+
+ <field name="mSessions">({})</field>
+ <field name="mLastResults">({})</field>
+ <field name="mLastRows">({})</field>
+ <field name="mLastKeyCode">null</field>
+ <field name="mAutoCompleteTimer">0</field>
+ <field name="mMenuOpen">false</field>
+ <field name="mFireAfterSearch">false</field>
+ <field name="mFinishAfterSearch">false</field>
+ <field name="mNeedToFinish">false</field>
+ <field name="mNeedToComplete">false</field>
+ <field name="mTransientValue">false</field>
+ <field name="mView">null</field>
+ <field name="currentSearchString">""</field>
+ <field name="ignoreInputEvent">false</field>
+ <field name="oninit">null</field>
+ <field name="mDefaultMatchFilled">false</field>
+ <field name="mFirstReturn">true</field>
+ <field name="mIsPasting">false</field>
+
+ <field name="mPasteController"><![CDATA[
+ ({
+ self: this,
+ kGlobalClipboard: Components.interfaces.nsIClipboard.kGlobalClipboard,
+ supportsCommand: function(aCommand) {
+ return aCommand == "cmd_paste";
+ },
+ isCommandEnabled: function(aCommand) {
+ return aCommand == "cmd_paste" &&
+ this.self.editor.isSelectionEditable &&
+ this.self.editor.canPaste(this.kGlobalClipboard);
+ },
+ doCommand: function(aCommand) {
+ if (aCommand == "cmd_paste") {
+ this.self.mIsPasting = true;
+ this.self.editor.paste(this.kGlobalClipboard);
+ this.self.mIsPasting = false;
+ }
+ },
+ onEvent: function() {}
+ })
+ ]]></field>
+
+ <field name="mMenuBarListener"><![CDATA[
+ ({
+ self: this,
+ handleEvent: function(aEvent) {
+ try {
+ this.self.finishAutoComplete(false, false, aEvent);
+ this.self.clearTimer();
+ this.self.closePopup();
+ } catch (e) {
+ window.top.removeEventListener("DOMMenuBarActive", this, true);
+ }
+ }
+ })
+ ]]></field>
+
+ <field name="mAutoCompleteObserver"><![CDATA[
+ ({
+ self: this,
+ onSearchResult: function(aSearch, aResult) {
+ for (var name in this.self.mSessions)
+ if (this.self.mSessions[name] == aSearch)
+ this.self.processResults(name, aResult);
+ }
+ })
+ ]]></field>
+
+ <field name="mInputElt"><![CDATA[
+ document.getAnonymousElementByAttribute(this, "anonid", "input");
+ ]]></field>
+
+ <field name="mMenuAccessKey"><![CDATA[
+ Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch)
+ .getIntPref("ui.key.menuAccessKey");
+ ]]></field>
+
+ <!-- =================== PUBLIC METHODS =================== -->
+
+ <method name="getErrorAt">
+ <parameter name="aIndex"/>
+ <body><![CDATA[
+ var obj = aIndex < 0 ? null : this.convertIndexToSession(aIndex);
+ return obj && this.mLastResults[obj.session] &&
+ this.mLastResults[obj.session].errorDescription;
+ ]]></body>
+ </method>
+
+ <!-- get a value from the autocomplete results as a string via an absolute index-->
+ <method name="getResultValueAt">
+ <parameter name="aIndex"/>
+ <body><![CDATA[
+ var obj = this.convertIndexToSession(aIndex);
+ return obj ? this.getSessionValueAt(obj.session, obj.index) : null;
+ ]]></body>
+ </method>
+
+ <!-- get a value from the autocomplete results as a string from a specific session -->
+ <method name="getSessionValueAt">
+ <parameter name="aSession"/>
+ <parameter name="aIndex"/>
+ <body><![CDATA[
+ var result = this.mLastResults[aSession];
+ return result.errorDescription || result.getValueAt(aIndex);
+ ]]></body>
+ </method>
+
+ <!-- get the total number of results overall -->
+ <method name="getResultCount">
+ <body><![CDATA[
+ return this.view.rowCount;
+ ]]></body>
+ </method>
+
+ <!-- get the first session that has results -->
+ <method name="getDefaultSession">
+ <body><![CDATA[
+ for (var name in this.mLastResults) {
+ var results = this.mLastResults[name];
+ if (results && results.matchCount > 0 && !results.errorDescription)
+ return name;
+ }
+ return null;
+ ]]></body>
+ </method>
+
+ <!-- empty the cached result data and empty the results popup -->
+ <method name="clearResults">
+ <parameter name="aInvalidate"/>
+ <body><![CDATA[
+ this.clearResultData();
+ this.clearResultElements(aInvalidate);
+ ]]></body>
+ </method>
+
+ <!-- =================== PRIVATE METHODS =================== -->
+
+ <!-- ::::::::::::: session searching ::::::::::::: -->
+
+ <!-- -->
+ <method name="callListener">
+ <parameter name="me"/>
+ <parameter name="aAction"/>
+ <body><![CDATA[
+ // bail if the binding was detached or the element removed from
+ // document during the timeout
+ if (!("startLookup" in me) || !me.ownerDocument || !me.parentNode)
+ return;
+
+ me.clearTimer();
+
+ if (me.disableAutoComplete)
+ return;
+
+ switch (aAction) {
+ case "startLookup":
+ me.startLookup();
+ break;
+
+ case "stopLookup":
+ me.stopLookup();
+ break;
+ }
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="startLookup">
+ <body><![CDATA[
+ var str = this.currentSearchString;
+ if (!str) {
+ this.clearResults(false);
+ this.closePopup();
+ return;
+ }
+
+ this.isSearching = true;
+ this.mFirstReturn = true;
+ this.mSessionReturns = this.sessionCount;
+ this.mFailureItems = 0;
+ this.mDefaultMatchFilled = false; // clear out our prefill state.
+
+ // Notify the input that the search is beginning.
+ this.onSearchBegin();
+
+ // tell each session to start searching...
+ for (var name in this.mSessions)
+ try {
+ this.mSessions[name].startSearch(str, this.searchParam, this.mLastResults[name], this.mAutoCompleteObserver);
+ } catch (e) {
+ --this.mSessionReturns;
+ this.searchFailed();
+ }
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="stopLookup">
+ <body><![CDATA[
+ for (var name in this.mSessions)
+ this.mSessions[name].stopSearch();
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="processResults">
+ <parameter name="aSessionName"/>
+ <parameter name="aResults"/>
+ <body><![CDATA[
+ if (this.disableAutoComplete)
+ return;
+
+ const ACR = Components.interfaces.nsIAutoCompleteResult;
+ var status = aResults.searchResult;
+ if (status != ACR.RESULT_NOMATCH_ONGOING &&
+ status != ACR.RESULT_SUCCESS_ONGOING)
+ --this.mSessionReturns;
+
+ // check the many criteria for failure
+ if (aResults.errorDescription)
+ ++this.mFailureItems;
+ else if (status == ACR.RESULT_IGNORED ||
+ status == ACR.RESULT_FAILURE ||
+ status == ACR.RESULT_NOMATCH ||
+ status == ACR.RESULT_NOMATCH_ONGOING ||
+ aResults.matchCount == 0 ||
+ aResults.searchString != this.currentSearchString)
+ {
+ this.mLastResults[aSessionName] = null;
+ if (this.mFirstReturn)
+ this.clearResultElements(false);
+ this.mFirstReturn = false;
+ this.searchFailed();
+ return;
+ }
+
+ if (this.mFirstReturn) {
+ if (this.view.mTree)
+ this.view.mTree.beginUpdateBatch();
+ this.clearResultElements(false); // clear results, but don't repaint yet
+ }
+
+ // always call openPopup...we may not have opened it
+ // if a previous search session didn't return enough search results.
+ // it's smart and doesn't try to open itself multiple times...
+ // be sure to add our result elements before calling openPopup as we need
+ // to know the total # of results found so far.
+ this.addResultElements(aSessionName, aResults);
+
+ this.autoFillInput(aSessionName, aResults, false);
+ if (this.mFirstReturn && this.view.mTree)
+ this.view.mTree.endUpdateBatch();
+ this.openPopup();
+ this.mFirstReturn = false;
+
+ // if this is the last session to return...
+ if (this.mSessionReturns == 0)
+ this.postSearchCleanup();
+
+ if (this.mFinishAfterSearch)
+ this.finishAutoComplete(false, this.mFireAfterSearch, null);
+ ]]></body>
+ </method>
+
+ <!-- called each time a search fails, except when failure items need
+ to be displayed. If all searches have failed, clear the list
+ and close the popup -->
+ <method name="searchFailed">
+ <body><![CDATA[
+ // if all searches are done and they all failed...
+ if (this.mSessionReturns == 0 && this.getResultCount() == 0) {
+ if (this.minResultsForPopup == 0) {
+ this.clearResults(true); // clear data and repaint empty
+ this.openPopup();
+ } else {
+ this.closePopup();
+ }
+ }
+
+ // if it's the last session to return, time to clean up...
+ if (this.mSessionReturns == 0)
+ this.postSearchCleanup();
+ ]]></body>
+ </method>
+
+ <!-- does some stuff after a search is done (success or failure) -->
+ <method name="postSearchCleanup">
+ <body><![CDATA[
+ this.isSearching = false;
+
+ // figure out if there are no matches in all search sessions
+ var failed = true;
+ for (var name in this.mSessions) {
+ if (this.mLastResults[name])
+ failed = this.mLastResults[name].errorDescription ||
+ this.mLastResults[name].matchCount == 0;
+ if (!failed)
+ break;
+ }
+ this.noMatch = failed;
+
+ // if we have processed all of our searches, and none of them gave us a default index,
+ // then we should try to auto fill the input field with the first match.
+ // note: autoFillInput is smart enough to kick out if we've already prefilled something...
+ if (!this.noMatch) {
+ var defaultSession = this.getDefaultSession();
+ if (defaultSession)
+ this.autoFillInput(defaultSession, this.mLastResults[defaultSession], true);
+ }
+
+ // Notify the input that the search is complete.
+ this.onSearchComplete();
+ ]]></body>
+ </method>
+
+ <!-- when the focus exits the widget or user hits return,
+ determine what value to leave in the textbox -->
+ <method name="finishAutoComplete">
+ <parameter name="aForceComplete"/>
+ <parameter name="aFireTextCommand"/>
+ <parameter name="aTriggeringEvent"/>
+ <body><![CDATA[
+ this.mFinishAfterSearch = false;
+ this.mFireAfterSearch = false;
+ if (this.mNeedToFinish && !this.disableAutoComplete) {
+ // set textbox value to either override value, or default search result
+ var val = this.popup.overrideValue;
+ if (val) {
+ this.setTextValue(val);
+ this.mNeedToFinish = false;
+ } else if (this.mTransientValue ||
+ !(this.forceComplete ||
+ (aForceComplete &&
+ this.mDefaultMatchFilled &&
+ this.mNeedToComplete))) {
+ this.mNeedToFinish = false;
+ } else if (this.isWaiting) {
+ // if the user typed, the search results are out of date, so let
+ // the search finish, and tell it to come back here when it's done
+ this.mFinishAfterSearch = true;
+ this.mFireAfterSearch = aFireTextCommand;
+ return;
+ } else {
+ // we want to use the default item index for the first session which gave us a valid
+ // default item index...
+ for (var name in this.mLastResults) {
+ var results = this.mLastResults[name];
+ if (results && results.matchCount > 0 &&
+ !results.errorDescription && results.defaultIndex != -1)
+ {
+ val = results.getValueAt(results.defaultIndex);
+ this.setTextValue(val);
+ this.mDefaultMatchFilled = true;
+ this.mNeedToFinish = false;
+ break;
+ }
+ }
+
+ if (this.mNeedToFinish) {
+ // if a search is happening at this juncture, bail out of this function
+ // and let the search finish, and tell it to come back here when it's done
+ if (this.isSearching) {
+ this.mFinishAfterSearch = true;
+ this.mFireAfterSearch = aFireTextCommand;
+ return;
+ }
+
+ this.mNeedToFinish = false;
+ var defaultSession = this.getDefaultSession();
+ if (defaultSession)
+ {
+ // preselect the first one
+ var first = this.getSessionValueAt(defaultSession, 0);
+ this.setTextValue(first);
+ this.mDefaultMatchFilled = true;
+ }
+ }
+ }
+
+ this.stopLookup();
+
+ this.closePopup();
+ }
+
+ this.mNeedToComplete = false;
+ this.clearTimer();
+
+ if (aFireTextCommand)
+ this._fireEvent("textentered", this.userAction, aTriggeringEvent);
+ ]]></body>
+ </method>
+
+ <!-- when the user clicks an entry in the autocomplete popup -->
+ <method name="onResultClick">
+ <body><![CDATA[
+ // set textbox value to either override value, or the clicked result
+ var errItem = this.getErrorAt(this.popup.selectedIndex);
+ var val = this.popup.overrideValue;
+ if (val)
+ this.setTextValue(val);
+ else if (this.popup.selectedIndex != -1) {
+ if (errItem) {
+ this.setTextValue(this.currentSearchString);
+ this.mTransientValue = true;
+ } else {
+ this.setTextValue(this.getResultValueAt(
+ this.popup.selectedIndex));
+ }
+ }
+
+ this.mNeedToFinish = false;
+ this.mNeedToComplete = false;
+
+ this.closePopup();
+
+ this.currentSearchString = "";
+
+ if (errItem)
+ this._fireEvent("errorcommand", errItem);
+ this._fireEvent("textentered", "clicking");
+ ]]></body>
+ </method>
+
+ <!-- when the user hits escape, revert the previously typed value in the textbox -->
+ <method name="undoAutoComplete">
+ <body><![CDATA[
+ var val = this.currentSearchString;
+
+ var ok = this.onTextReverted();
+ if ((ok || ok == undefined) && val)
+ this.setTextValue(val);
+
+ this.userAction = "typing";
+
+ this.currentSearchString = this.value;
+ this.mNeedToComplete = false;
+ ]]></body>
+ </method>
+
+ <!-- convert an absolute result index into a session name/index pair -->
+ <method name="convertIndexToSession">
+ <parameter name="aIndex"/>
+ <body><![CDATA[
+ for (var name in this.mLastRows) {
+ if (aIndex < this.mLastRows[name])
+ return { session: name, index: aIndex };
+ aIndex -= this.mLastRows[name];
+ }
+ return null;
+ ]]></body>
+ </method>
+
+ <!-- ::::::::::::: user input handling ::::::::::::: -->
+
+ <!-- -->
+ <method name="processInput">
+ <body><![CDATA[
+ // stop current lookup in case it's async.
+ this.stopLookup();
+ // stop the queued up lookup on a timer
+ this.clearTimer();
+
+ if (this.disableAutoComplete)
+ return;
+
+ this.userAction = "typing";
+ this.mFinishAfterSearch = false;
+ this.mNeedToFinish = true;
+ this.mTransientValue = false;
+ this.mNeedToComplete = true;
+ var str = this.value;
+ this.currentSearchString = str;
+ this.popup.clearSelection();
+
+ var timeout = this.mIsPasting ? this.pasteTimeout : this.timeout;
+ this.mAutoCompleteTimer = setTimeout(this.callListener, timeout, this, "startLookup");
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="processKeyPress">
+ <parameter name="aEvent"/>
+ <body><![CDATA[
+ this.mLastKeyCode = aEvent.keyCode;
+
+ var killEvent = false;
+
+ switch (aEvent.keyCode) {
+ case KeyEvent.DOM_VK_TAB:
+ if (this.tabScrolling) {
+ // don't kill this event if alt-tab or ctrl-tab is hit
+ if (!aEvent.altKey && !aEvent.ctrlKey) {
+ killEvent = this.mMenuOpen;
+ if (killEvent)
+ this.keyNavigation(aEvent);
+ }
+ }
+ break;
+
+ case KeyEvent.DOM_VK_RETURN:
+
+ // if this is a failure item, save it for fireErrorCommand
+ var errItem = this.getErrorAt(this.popup.selectedIndex);
+
+ killEvent = this.mMenuOpen;
+ this.finishAutoComplete(true, true, aEvent);
+ this.closePopup();
+ if (errItem) {
+ this._fireEvent("errorcommand", errItem);
+ }
+ break;
+
+ case KeyEvent.DOM_VK_ESCAPE:
+ this.clearTimer();
+ killEvent = this.mMenuOpen;
+ this.undoAutoComplete();
+ this.closePopup();
+ break;
+
+ case KeyEvent.DOM_VK_LEFT:
+ case KeyEvent.DOM_VK_RIGHT:
+ case KeyEvent.DOM_VK_HOME:
+ case KeyEvent.DOM_VK_END:
+ this.finishAutoComplete(true, false, aEvent);
+ this.clearTimer();
+ this.closePopup();
+ break;
+
+ case KeyEvent.DOM_VK_DOWN:
+ if (!aEvent.altKey) {
+ this.clearTimer();
+ killEvent = this.keyNavigation(aEvent);
+ break;
+ }
+ // Alt+Down falls through to history popup toggling code
+
+ case KeyEvent.DOM_VK_F4:
+ if (!aEvent.ctrlKey && !aEvent.shiftKey && this.getAttribute("enablehistory") == "true") {
+ var historyPopup = document.getAnonymousElementByAttribute(this, "anonid", "historydropmarker");
+ if (historyPopup)
+ historyPopup.showPopup();
+ else
+ historyPopup.hidePopup();
+ }
+ break;
+ case KeyEvent.DOM_VK_PAGE_UP:
+ case KeyEvent.DOM_VK_PAGE_DOWN:
+ case KeyEvent.DOM_VK_UP:
+ if (!aEvent.ctrlKey && !aEvent.metaKey) {
+ this.clearTimer();
+ killEvent = this.keyNavigation(aEvent);
+ }
+ break;
+
+ case KeyEvent.DOM_VK_BACK_SPACE:
+ if (!aEvent.ctrlKey && !aEvent.altKey && !aEvent.shiftKey &&
+ this.selectionStart == this.currentSearchString.length &&
+ this.selectionEnd == this.value.length &&
+ this.mDefaultMatchFilled) {
+ this.mDefaultMatchFilled = false;
+ this.value = this.currentSearchString;
+ }
+
+ if (!/Mac/.test(navigator.platform))
+ break;
+ case KeyEvent.DOM_VK_DELETE:
+ if (/Mac/.test(navigator.platform) && !aEvent.shiftKey)
+ break;
+
+ if (this.mMenuOpen && this.popup.selectedIndex != -1) {
+ var obj = this.convertIndexToSession(this.popup.selectedIndex);
+ if (obj) {
+ var result = this.mLastResults[obj.session];
+ if (!result.errorDescription) {
+ var count = result.matchCount;
+ result.removeValueAt(obj.index, true);
+ this.view.updateResults(this.popup.selectedIndex, result.matchCount - count);
+ killEvent = true;
+ }
+ }
+ }
+ break;
+ }
+
+ if (killEvent) {
+ aEvent.preventDefault();
+ aEvent.stopPropagation();
+ }
+
+ return true;
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="processStartComposition">
+ <body><![CDATA[
+ this.finishAutoComplete(false, false, null);
+ this.clearTimer();
+ this.closePopup();
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="keyNavigation">
+ <parameter name="aEvent"/>
+ <body><![CDATA[
+ var k = aEvent.keyCode;
+ if (k == KeyEvent.DOM_VK_TAB ||
+ k == KeyEvent.DOM_VK_UP || k == KeyEvent.DOM_VK_DOWN ||
+ k == KeyEvent.DOM_VK_PAGE_UP || k == KeyEvent.DOM_VK_PAGE_DOWN)
+ {
+ if (!this.mMenuOpen) {
+ // Original xpfe style was to allow the up and down keys to have
+ // their default Mac action if the popup could not be opened.
+ // For compatibility for toolkit we now have to predict which
+ // keys have a default action that we can always allow to fire.
+ if (/Mac/.test(navigator.platform) &&
+ ((k == KeyEvent.DOM_VK_UP &&
+ (this.selectionStart != 0 ||
+ this.selectionEnd != 0)) ||
+ (k == KeyEvent.DOM_VK_DOWN &&
+ (this.selectionStart != this.value.length ||
+ this.selectionEnd != this.value.length))))
+ return false;
+ if (this.currentSearchString != this.value) {
+ this.processInput();
+ return true;
+ }
+ if (this.view.rowCount < this.minResultsForPopup)
+ return true; // used to be false, see above
+
+ this.mNeedToFinish = true;
+ this.openPopup();
+ return true;
+ }
+
+ this.userAction = "scrolling";
+ this.mNeedToComplete = false;
+
+ var reverse = k == KeyEvent.DOM_VK_TAB && aEvent.shiftKey ||
+ k == KeyEvent.DOM_VK_UP ||
+ k == KeyEvent.DOM_VK_PAGE_UP;
+ var page = k == KeyEvent.DOM_VK_PAGE_UP ||
+ k == KeyEvent.DOM_VK_PAGE_DOWN;
+ var selected = this.popup.selectBy(reverse, page);
+
+ // determine which value to place in the textbox
+ this.ignoreInputEvent = true;
+ if (selected != -1) {
+ if (this.getErrorAt(selected)) {
+ if (this.currentSearchString)
+ this.setTextValue(this.currentSearchString);
+ } else {
+ this.setTextValue(this.getResultValueAt(selected));
+ }
+ this.mTransientValue = true;
+ } else {
+ if (this.currentSearchString)
+ this.setTextValue(this.currentSearchString);
+ this.mTransientValue = false;
+ }
+
+ // move cursor to the end
+ this.mInputElt.setSelectionRange(this.value.length, this.value.length);
+ this.ignoreInputEvent = false;
+ }
+ return true;
+ ]]></body>
+ </method>
+
+ <!-- while the user is typing, fill the textbox with the "default" value
+ if one can be assumed, and select the end of the text -->
+ <method name="autoFillInput">
+ <parameter name="aSessionName"/>
+ <parameter name="aResults"/>
+ <parameter name="aUseFirstMatchIfNoDefault"/>
+ <body><![CDATA[
+ if (this.mInputElt.selectionEnd < this.currentSearchString.length ||
+ this.mDefaultMatchFilled)
+ return;
+
+ if (!this.mFinishAfterSearch &&
+ (this.autoFill || this.completeDefaultIndex) &&
+ this.mLastKeyCode != KeyEvent.DOM_VK_BACK_SPACE &&
+ this.mLastKeyCode != KeyEvent.DOM_VK_DELETE) {
+ var indexToUse = aResults.defaultIndex;
+ if (aUseFirstMatchIfNoDefault && indexToUse == -1)
+ indexToUse = 0;
+
+ if (indexToUse != -1) {
+ var resultValue = this.getSessionValueAt(aSessionName, indexToUse);
+ var match = resultValue.toLowerCase();
+ var entry = this.currentSearchString.toLowerCase();
+ this.ignoreInputEvent = true;
+ if (match.indexOf(entry) == 0) {
+ var endPoint = this.value.length;
+ this.setTextValue(this.value + resultValue.substr(endPoint));
+ this.mInputElt.setSelectionRange(endPoint, this.value.length);
+ } else {
+ if (this.completeDefaultIndex) {
+ this.setTextValue(this.value + " >> " + resultValue);
+ this.mInputElt.setSelectionRange(entry.length, this.value.length);
+ } else {
+ var postIndex = resultValue.indexOf(this.value);
+ if (postIndex >= 0) {
+ var startPt = this.value.length;
+ this.setTextValue(this.value +
+ resultValue.substr(startPt+postIndex));
+ this.mInputElt.setSelectionRange(startPt, this.value.length);
+ }
+ }
+ }
+ this.mNeedToComplete = true;
+ this.ignoreInputEvent = false;
+ this.mDefaultMatchFilled = true;
+ }
+ }
+ ]]></body>
+ </method>
+
+ <!-- ::::::::::::: popup and tree ::::::::::::: -->
+
+ <!-- -->
+ <method name="openPopup">
+ <body><![CDATA[
+ if (!this.mMenuOpen && this.focused &&
+ (this.getResultCount() >= this.minResultsForPopup ||
+ this.mFailureItems)) {
+ var w = this.boxObject.width;
+ if (w != this.popup.boxObject.width)
+ this.popup.setAttribute("width", w);
+ this.popup.showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
+ this.mMenuOpen = true;
+ }
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="closePopup">
+ <body><![CDATA[
+ if (this.popup && this.mMenuOpen) {
+ this.popup.hidePopup();
+ this.mMenuOpen = false;
+ }
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="addResultElements">
+ <parameter name="aSession"/>
+ <parameter name="aResults"/>
+ <body><![CDATA[
+ var count = aResults.errorDescription ? 1 : aResults.matchCount;
+ if (this.focused && this.showPopup) {
+ var row = 0;
+ for (var name in this.mSessions) {
+ row += this.mLastRows[name];
+ if (name == aSession)
+ break;
+ }
+ this.view.updateResults(row, count - this.mLastRows[name]);
+ this.popup.adjustHeight();
+ }
+ this.mLastResults[aSession] = aResults;
+ this.mLastRows[aSession] = count;
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="clearResultElements">
+ <parameter name="aInvalidate"/>
+ <body><![CDATA[
+ for (var name in this.mSessions)
+ this.mLastRows[name] = 0;
+ this.view.clearResults();
+ if (aInvalidate)
+ this.popup.adjustHeight();
+
+ this.noMatch = true;
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="setTextValue">
+ <parameter name="aValue"/>
+ <body><![CDATA[
+ this.value = aValue;
+
+ // Completing a result should simulate the user typing the result,
+ // so fire an input event.
+ var evt = document.createEvent("UIEvents");
+ evt.initUIEvent("input", true, false, window, 0);
+ var oldIgnoreInput = this.ignoreInputEvent;
+ this.ignoreInputEvent = true;
+ this.dispatchEvent(evt);
+ this.ignoreInputEvent = oldIgnoreInput;
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="clearResultData">
+ <body><![CDATA[
+ for (var name in this.mSessions)
+ this.mLastResults[name] = null;
+ ]]></body>
+ </method>
+
+ <!-- ::::::::::::: miscellaneous ::::::::::::: -->
+
+ <!-- -->
+ <method name="ifSetAttribute">
+ <parameter name="aAttr"/>
+ <parameter name="aVal"/>
+ <body><![CDATA[
+ if (!this.hasAttribute(aAttr))
+ this.setAttribute(aAttr, aVal);
+ ]]></body>
+ </method>
+
+ <!-- -->
+ <method name="clearTimer">
+ <body><![CDATA[
+ if (this.mAutoCompleteTimer) {
+ clearTimeout(this.mAutoCompleteTimer);
+ this.mAutoCompleteTimer = 0;
+ }
+ ]]></body>
+ </method>
+
+ <!-- ::::::::::::: event dispatching ::::::::::::: -->
+
+ <method name="_fireEvent">
+ <parameter name="aEventType"/>
+ <parameter name="aEventParam"/>
+ <parameter name="aTriggeringEvent"/>
+ <body>
+ <![CDATA[
+ var noCancel = true;
+ // handle any xml attribute event handlers
+ var handler = this.getAttribute("on"+aEventType);
+ if (handler) {
+ var fn = new Function("eventParam", "domEvent", handler);
+ var returned = fn.apply(this, [aEventParam, aTriggeringEvent]);
+ if (returned == false)
+ noCancel = false;
+ }
+
+ return noCancel;
+ ]]>
+ </body>
+ </method>
+
+ <!-- =================== TREE VIEW =================== -->
+
+ <field name="view"><![CDATA[
+ ({
+ mTextbox: this,
+ mTree: null,
+ mSelection: null,
+ mRowCount: 0,
+
+ clearResults: function()
+ {
+ var oldCount = this.mRowCount;
+ this.mRowCount = 0;
+
+ if (this.mTree) {
+ this.mTree.rowCountChanged(0, -oldCount);
+ this.mTree.scrollToRow(0);
+ }
+ },
+
+ updateResults: function(aRow, aCount)
+ {
+ this.mRowCount += aCount;
+
+ if (this.mTree)
+ this.mTree.rowCountChanged(aRow, aCount);
+ },
+
+ //////////////////////////////////////////////////////////
+ // nsIAutoCompleteController interface
+
+ // this is the only method required by the treebody mouseup handler
+ handleEnter: function(aIsPopupSelection) {
+ this.mTextbox.onResultClick();
+ },
+
+ //////////////////////////////////////////////////////////
+ // nsITreeView interface
+
+ get rowCount() {
+ return this.mRowCount;
+ },
+
+ get selection() {
+ return this.mSelection;
+ },
+
+ set selection(aVal) {
+ return this.mSelection = aVal;
+ },
+
+ setTree: function(aTree)
+ {
+ this.mTree = aTree;
+ },
+
+ getCellText: function(aRow, aCol)
+ {
+ for (var name in this.mTextbox.mSessions) {
+ if (aRow < this.mTextbox.mLastRows[name]) {
+ var result = this.mTextbox.mLastResults[name];
+ switch (aCol.id) {
+ case "treecolAutoCompleteValue":
+ return result.errorDescription || result.getLabelAt(aRow);
+ case "treecolAutoCompleteComment":
+ if (!result.errorDescription)
+ return result.getCommentAt(aRow);
+ default:
+ return "";
+ }
+ }
+ aRow -= this.mTextbox.mLastRows[name];
+ }
+ return "";
+ },
+
+ getRowProperties: function(aIndex)
+ {
+ return "";
+ },
+
+ getCellProperties: function(aIndex, aCol)
+ {
+ // for the value column, append nsIAutoCompleteItem::className
+ // to the property list so that we can style this column
+ // using that property
+ if (aCol.id == "treecolAutoCompleteValue") {
+ for (var name in this.mTextbox.mSessions) {
+ if (aIndex < this.mTextbox.mLastRows[name]) {
+ var result = this.mTextbox.mLastResults[name];
+ if (result.errorDescription)
+ return "";
+ return result.getStyleAt(aIndex);
+ }
+ aIndex -= this.mTextbox.mLastRows[name];
+ }
+ }
+ return "";
+ },
+
+ getColumnProperties: function(aCol)
+ {
+ return "";
+ },
+
+ getImageSrc: function(aRow, aCol)
+ {
+ if (aCol.id == "treecolAutoCompleteValue") {
+ for (var name in this.mTextbox.mSessions) {
+ if (aRow < this.mTextbox.mLastRows[name]) {
+ var result = this.mTextbox.mLastResults[name];
+ if (result.errorDescription)
+ return "";
+ return result.getImageAt(aRow);
+ }
+ aRow -= this.mTextbox.mLastRows[name];
+ }
+ }
+ return "";
+ },
+
+ getParentIndex: function(aRowIndex) { },
+ hasNextSibling: function(aRowIndex, aAfterIndex) { },
+ getLevel: function(aIndex) {},
+ getProgressMode: function(aRow, aCol) {},
+ getCellValue: function(aRow, aCol) {},
+ isContainer: function(aIndex) {},
+ isContainerOpen: function(aIndex) {},
+ isContainerEmpty: function(aIndex) {},
+ isSeparator: function(aIndex) {},
+ isSorted: function() {},
+ toggleOpenState: function(aIndex) {},
+ selectionChanged: function() {},
+ cycleHeader: function(aCol) {},
+ cycleCell: function(aRow, aCol) {},
+ isEditable: function(aRow, aCol) {},
+ isSelectable: function(aRow, aCol) {},
+ setCellValue: function(aRow, aCol, aValue) {},
+ setCellText: function(aRow, aCol, aValue) {},
+ performAction: function(aAction) {},
+ performActionOnRow: function(aAction, aRow) {},
+ performActionOnCell: function(aAction, aRow, aCol) {}
+ });
+ ]]></field>
+
+ </implementation>
+
+ <handlers>
+ <handler event="input"
+ action="if (!this.ignoreInputEvent) this.processInput();"/>
+
+ <handler event="keypress" phase="capturing"
+ action="return this.processKeyPress(event);"/>
+
+ <handler event="compositionstart" phase="capturing"
+ action="this.processStartComposition();"/>
+
+ <handler event="focus" phase="capturing"
+ action="this.userAction = 'typing';"/>
+
+ <handler event="blur" phase="capturing"
+ action="if ( !(this.ignoreBlurWhileSearching &amp;&amp; this.isSearching) ) {this.userAction = 'none'; this.finishAutoComplete(false, false, event);}"/>
+
+ <handler event="mousedown" phase="capturing"
+ action="if ( !this.mMenuOpen ) this.finishAutoComplete(false, false, event);"/>
+ </handlers>
+ </binding>
+
+ <binding id="autocomplete-result-popup" extends="chrome://global/content/bindings/popup.xml#popup">
+ <resources>
+ <stylesheet src="chrome://communicator/content/autocomplete.css"/>
+ <stylesheet src="chrome://global/skin/autocomplete.css"/>
+ </resources>
+
+ <content ignorekeys="true" level="top">
+ <xul:tree anonid="tree" class="autocomplete-tree plain" flex="1">
+ <xul:treecols anonid="treecols">
+ <xul:treecol class="autocomplete-treecol" id="treecolAutoCompleteValue" flex="2"/>
+ <xul:treecol class="autocomplete-treecol" id="treecolAutoCompleteComment" flex="1" hidden="true"/>
+ </xul:treecols>
+ <xul:treechildren anonid="treebody" class="autocomplete-treebody"/>
+ </xul:tree>
+ </content>
+
+ <implementation implements="nsIAutoCompletePopup">
+ <constructor><![CDATA[
+ if (this.textbox && this.textbox.view)
+ this.initialize();
+ ]]></constructor>
+
+ <destructor><![CDATA[
+ if (this.view)
+ this.tree.view = null;
+ ]]></destructor>
+
+ <field name="textbox">
+ document.getBindingParent(this);
+ </field>
+
+ <field name="tree">
+ document.getAnonymousElementByAttribute(this, "anonid", "tree");
+ </field>
+
+ <field name="treecols">
+ document.getAnonymousElementByAttribute(this, "anonid", "treecols");
+ </field>
+
+ <field name="treebody">
+ document.getAnonymousElementByAttribute(this, "anonid", "treebody");
+ </field>
+
+ <field name="view">
+ null
+ </field>
+
+ <!-- Setting tree.view doesn't always immediately create a selection,
+ so we ensure the selection by asking the tree for the view. Note:
+ this.view.selection is quicker if we know the selection exists. -->
+ <property name="selection" onget="return this.tree.view.selection;"/>
+
+ <property name="pageCount"
+ onget="return this.tree.treeBoxObject.getPageLength();"/>
+
+ <field name="maxRows">0</field>
+ <field name="mLastRows">0</field>
+
+ <method name="initialize">
+ <body><![CDATA[
+ this.showCommentColumn = this.textbox.showCommentColumn;
+ this.tree.view = this.textbox.view;
+ this.view = this.textbox.view;
+ this.maxRows = this.textbox.maxRows;
+ ]]></body>
+ </method>
+
+ <property name="showCommentColumn"
+ onget="return !this.treecols.lastChild.hidden;"
+ onset="this.treecols.lastChild.hidden = !val; return val;"/>
+
+ <method name="adjustHeight">
+ <body><![CDATA[
+ // detect the desired height of the tree
+ var bx = this.tree.treeBoxObject;
+ var view = this.view;
+ var rows = this.maxRows || 6;
+ if (!view.rowCount || (rows && view.rowCount < rows))
+ rows = view.rowCount;
+
+ var height = rows * bx.rowHeight;
+
+ if (height == 0)
+ this.tree.setAttribute("collapsed", "true");
+ else {
+ if (this.tree.hasAttribute("collapsed"))
+ this.tree.removeAttribute("collapsed");
+ this.tree.setAttribute("height", height);
+ }
+ ]]></body>
+ </method>
+
+ <method name="clearSelection">
+ <body>
+ this.selection.clearSelection();
+ </body>
+ </method>
+
+ <method name="getNextIndex">
+ <parameter name="aReverse"/>
+ <parameter name="aPage"/>
+ <parameter name="aIndex"/>
+ <parameter name="aMaxRow"/>
+ <body><![CDATA[
+ if (aMaxRow < 0)
+ return -1;
+
+ if (aIndex == -1)
+ return aReverse ? aMaxRow : 0;
+ if (aIndex == (aReverse ? 0 : aMaxRow))
+ return -1;
+
+ var amount = aPage ? this.pageCount - 1 : 1;
+ aIndex = aReverse ? aIndex - amount : aIndex + amount;
+ if (aIndex > aMaxRow)
+ return aMaxRow;
+ if (aIndex < 0)
+ return 0;
+ return aIndex;
+ ]]></body>
+ </method>
+
+ <!-- =================== nsIAutoCompletePopup =================== -->
+
+ <field name="input">
+ null
+ </field>
+
+ <!-- This property is meant to be overriden by bindings extending
+ this one. When the user selects an item from the list by
+ hitting enter or clicking, this method can set the value
+ of the textbox to a different value if it wants to. -->
+ <property name="overrideValue" readonly="true" onget="return null;"/>
+
+ <property name="selectedIndex">
+ <getter>
+ if (!this.view || !this.selection.count)
+ return -1;
+ var start = {}, end = {};
+ this.view.selection.getRangeAt(0, start, end);
+ return start.value;
+ </getter>
+ <setter>
+ if (this.view) {
+ this.selection.select(val);
+ if (val >= 0) {
+ this.view.selection.currentIndex = -1;
+ this.tree.treeBoxObject.ensureRowIsVisible(val);
+ }
+ }
+ return val;
+ </setter>
+ </property>
+
+ <property name="popupOpen" onget="return !!this.input;" readonly="true"/>
+
+ <method name="openAutocompletePopup">
+ <parameter name="aInput"/>
+ <parameter name="aElement"/>
+ <body><![CDATA[
+ if (!this.input) {
+ this.tree.view = aInput.controller;
+ this.view = this.tree.view;
+ this.showCommentColumn = aInput.showCommentColumn;
+ this.maxRows = aInput.maxRows;
+ this.invalidate();
+
+ var viewer = aElement
+ .ownerDocument
+ .defaultView
+ .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
+ .getInterface(Components.interfaces.nsIWebNavigation)
+ .QueryInterface(Components.interfaces.nsIDocShell)
+ .contentViewer;
+ var rect = aElement.getBoundingClientRect();
+ var width = Math.round((rect.right - rect.left) * viewer.fullZoom);
+ this.setAttribute("width", width > 100 ? width : 100);
+ // Adjust the direction (which is not inherited) of the autocomplete
+ // popup list, based on the textbox direction. (Bug 707039)
+ this.style.direction = aElement.ownerDocument.defaultView
+ .getComputedStyle(aElement)
+ .direction;
+ this.popupBoxObject.setConsumeRollupEvent(aInput.consumeRollupEvent
+ ? PopupBoxObject.ROLLUP_CONSUME
+ : PopupBoxObject.ROLLUP_NO_CONSUME);
+ this.openPopup(aElement, "after_start", 0, 0, false, false);
+ if (this.state != "closed")
+ this.input = aInput;
+ }
+ ]]></body>
+ </method>
+
+ <method name="closePopup">
+ <body>
+ this.hidePopup();
+ </body>
+ </method>
+
+ <method name="invalidate">
+ <body>
+ if (this.view)
+ this.adjustHeight();
+ this.tree.treeBoxObject.invalidate();
+ </body>
+ </method>
+
+ <method name="selectBy">
+ <parameter name="aReverse"/>
+ <parameter name="aPage"/>
+ <body><![CDATA[
+ try {
+ return this.selectedIndex = this.getNextIndex(aReverse, aPage, this.selectedIndex, this.view.rowCount - 1);
+ } catch (ex) {
+ // do nothing - occasionally timer-related js errors happen here
+ // e.g. "this.selectedIndex has no properties", when you type fast and hit a
+ // navigation key before this popup has opened
+ return -1;
+ }
+ ]]></body>
+ </method>
+ </implementation>
+
+ <handlers>
+ <handler event="popupshowing">
+ if (this.textbox)
+ this.textbox.mMenuOpen = true;
+ </handler>
+
+ <handler event="popuphiding">
+ if (this.textbox)
+ this.textbox.mMenuOpen = false;
+ this.clearSelection();
+ this.input = null;
+ </handler>
+ </handlers>
+ </binding>
+
+ <binding id="autocomplete-treebody">
+ <implementation>
+ <field name="popup">document.getBindingParent(this);</field>
+
+ <field name="mLastMoveTime">Date.now()</field>
+ </implementation>
+
+ <handlers>
+ <handler event="mouseout" action="this.popup.selectedIndex = -1;"/>
+
+ <handler event="mouseup"><![CDATA[
+ var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY);
+ if (rc != -1) {
+ this.popup.selectedIndex = rc;
+ this.popup.view.handleEnter(true);
+ }
+ ]]></handler>
+
+ <handler event="mousemove"><![CDATA[
+ if (Date.now() - this.mLastMoveTime > 30) {
+ var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY);
+ if (rc != -1 && rc != this.popup.selectedIndex)
+ this.popup.selectedIndex = rc;
+ this.mLastMoveTime = Date.now();
+ }
+ ]]></handler>
+ </handlers>
+ </binding>
+
+ <binding id="autocomplete-history-popup"
+ extends="chrome://global/content/bindings/popup.xml#popup-scrollbars">
+ <resources>
+ <stylesheet src="chrome://communicator/content/autocomplete.css"/>
+ <stylesheet src="chrome://global/skin/autocomplete.css"/>
+ </resources>
+
+ <implementation>
+ <method name="removeOpenAttribute">
+ <parameter name="parentNode"/>
+ <body><![CDATA[
+ parentNode.removeAttribute("open");
+ ]]></body>
+ </method>
+ </implementation>
+
+ <handlers>
+ <handler event="popuphiding"><![CDATA[
+ setTimeout(this.removeOpenAttribute, 0, this.parentNode);
+ ]]></handler>
+ </handlers>
+ </binding>
+
+ <binding id="history-dropmarker" extends="chrome://global/content/bindings/general.xml#dropmarker">
+
+ <implementation>
+ <method name="showPopup">
+ <body><![CDATA[
+ var textbox = document.getBindingParent(this);
+ var kids = textbox.getElementsByClassName("autocomplete-history-popup");
+ if (kids.item(0) && textbox.getAttribute("open") != "true") { // Open history popup
+ var w = textbox.boxObject.width;
+ if (w != kids[0].boxObject.width)
+ kids[0].width = w;
+ kids[0].showPopup(textbox, -1, -1, "popup", "bottomleft", "topleft");
+ textbox.setAttribute("open", "true");
+ }
+ ]]></body>
+ </method>
+ </implementation>
+
+ <handlers>
+ <handler event="mousedown"><![CDATA[
+ this.showPopup();
+ ]]></handler>
+ </handlers>
+ </binding>
+
+</bindings>
diff --git a/xptoolkit/components/devtools/content/devtoolsOverlay.js b/xpfe/components/devtools/content/devtoolsOverlay.js
index d4392f133..d4392f133 100644
--- a/xptoolkit/components/devtools/content/devtoolsOverlay.js
+++ b/xpfe/components/devtools/content/devtoolsOverlay.js
diff --git a/xptoolkit/components/devtools/content/devtoolsOverlay.xul b/xpfe/components/devtools/content/devtoolsOverlay.xul
index f26a4d695..f26a4d695 100644
--- a/xptoolkit/components/devtools/content/devtoolsOverlay.xul
+++ b/xpfe/components/devtools/content/devtoolsOverlay.xul
diff --git a/xptoolkit/components/devtools/content/scratchpad/scratchpad.js b/xpfe/components/devtools/content/scratchpad/scratchpad.js
index 351f568cc..351f568cc 100644
--- a/xptoolkit/components/devtools/content/scratchpad/scratchpad.js
+++ b/xpfe/components/devtools/content/scratchpad/scratchpad.js
diff --git a/xptoolkit/components/devtools/content/scratchpad/scratchpad.xul b/xpfe/components/devtools/content/scratchpad/scratchpad.xul
index e0a01270a..e0a01270a 100644
--- a/xptoolkit/components/devtools/content/scratchpad/scratchpad.xul
+++ b/xpfe/components/devtools/content/scratchpad/scratchpad.xul
diff --git a/xptoolkit/components/devtools/devtools-prefs.js b/xpfe/components/devtools/devtools-prefs.js
index 271537b01..271537b01 100644
--- a/xptoolkit/components/devtools/devtools-prefs.js
+++ b/xpfe/components/devtools/devtools-prefs.js
diff --git a/xptoolkit/components/devtools/jar.mn b/xpfe/components/devtools/jar.mn
index d12ec0f18..d12ec0f18 100644
--- a/xptoolkit/components/devtools/jar.mn
+++ b/xpfe/components/devtools/jar.mn
diff --git a/xptoolkit/components/devtools/locale/devtoolsOverlay.dtd b/xpfe/components/devtools/locale/devtoolsOverlay.dtd
index 476ebcbb8..476ebcbb8 100644
--- a/xptoolkit/components/devtools/locale/devtoolsOverlay.dtd
+++ b/xpfe/components/devtools/locale/devtoolsOverlay.dtd
diff --git a/xptoolkit/components/devtools/locale/scratchpad.dtd b/xpfe/components/devtools/locale/scratchpad.dtd
index 680a71230..680a71230 100644
--- a/xptoolkit/components/devtools/locale/scratchpad.dtd
+++ b/xpfe/components/devtools/locale/scratchpad.dtd
diff --git a/xptoolkit/components/devtools/locale/scratchpad.properties b/xpfe/components/devtools/locale/scratchpad.properties
index 36f71bc23..36f71bc23 100644
--- a/xptoolkit/components/devtools/locale/scratchpad.properties
+++ b/xpfe/components/devtools/locale/scratchpad.properties
diff --git a/xptoolkit/components/devtools/modules/PropertyPanel.jsm b/xpfe/components/devtools/modules/PropertyPanel.jsm
index fde4ebef4..fde4ebef4 100644
--- a/xptoolkit/components/devtools/modules/PropertyPanel.jsm
+++ b/xpfe/components/devtools/modules/PropertyPanel.jsm
diff --git a/xptoolkit/components/devtools/moz.build b/xpfe/components/devtools/moz.build
index c538bfdf5..c538bfdf5 100644
--- a/xptoolkit/components/devtools/moz.build
+++ b/xpfe/components/devtools/moz.build
diff --git a/xptoolkit/components/downloads/content/DownloadProgressListener.js b/xpfe/components/downloads/content/DownloadProgressListener.js
index 5341b44d8..5341b44d8 100644
--- a/xptoolkit/components/downloads/content/DownloadProgressListener.js
+++ b/xpfe/components/downloads/content/DownloadProgressListener.js
diff --git a/xptoolkit/components/downloads/content/downloadmanager.js b/xpfe/components/downloads/content/downloadmanager.js
index 692bc2264..692bc2264 100644
--- a/xptoolkit/components/downloads/content/downloadmanager.js
+++ b/xpfe/components/downloads/content/downloadmanager.js
diff --git a/xptoolkit/components/downloads/content/downloadmanager.xul b/xpfe/components/downloads/content/downloadmanager.xul
index a6ec8090a..a6ec8090a 100644
--- a/xptoolkit/components/downloads/content/downloadmanager.xul
+++ b/xpfe/components/downloads/content/downloadmanager.xul
diff --git a/xptoolkit/components/downloads/content/progressDialog.js b/xpfe/components/downloads/content/progressDialog.js
index 4fa6ccc3a..4fa6ccc3a 100644
--- a/xptoolkit/components/downloads/content/progressDialog.js
+++ b/xpfe/components/downloads/content/progressDialog.js
diff --git a/xptoolkit/components/downloads/content/progressDialog.xul b/xpfe/components/downloads/content/progressDialog.xul
index 9c10a1af7..9c10a1af7 100644
--- a/xptoolkit/components/downloads/content/progressDialog.xul
+++ b/xpfe/components/downloads/content/progressDialog.xul
diff --git a/xptoolkit/components/downloads/content/treeView.js b/xpfe/components/downloads/content/treeView.js
index 0be76ea64..0be76ea64 100644
--- a/xptoolkit/components/downloads/content/treeView.js
+++ b/xpfe/components/downloads/content/treeView.js
diff --git a/xptoolkit/components/downloads/content/uploadProgress.js b/xpfe/components/downloads/content/uploadProgress.js
index b537ff420..b537ff420 100644
--- a/xptoolkit/components/downloads/content/uploadProgress.js
+++ b/xpfe/components/downloads/content/uploadProgress.js
diff --git a/xptoolkit/components/downloads/content/uploadProgress.xul b/xpfe/components/downloads/content/uploadProgress.xul
index 4d074b540..4d074b540 100644
--- a/xptoolkit/components/downloads/content/uploadProgress.xul
+++ b/xpfe/components/downloads/content/uploadProgress.xul
diff --git a/xptoolkit/components/downloads/download-prefs.js b/xpfe/components/downloads/download-prefs.js
index e0c77f184..e0c77f184 100644
--- a/xptoolkit/components/downloads/download-prefs.js
+++ b/xpfe/components/downloads/download-prefs.js
diff --git a/xptoolkit/components/downloads/jar.mn b/xpfe/components/downloads/jar.mn
index defaff5f5..defaff5f5 100644
--- a/xptoolkit/components/downloads/jar.mn
+++ b/xpfe/components/downloads/jar.mn
diff --git a/xptoolkit/components/downloads/locale/downloadmanager.dtd b/xpfe/components/downloads/locale/downloadmanager.dtd
index 26160d84a..26160d84a 100644
--- a/xptoolkit/components/downloads/locale/downloadmanager.dtd
+++ b/xpfe/components/downloads/locale/downloadmanager.dtd
diff --git a/xptoolkit/components/downloads/locale/downloadmanager.properties b/xpfe/components/downloads/locale/downloadmanager.properties
index 4e6499e7b..4e6499e7b 100644
--- a/xptoolkit/components/downloads/locale/downloadmanager.properties
+++ b/xpfe/components/downloads/locale/downloadmanager.properties
diff --git a/xptoolkit/components/downloads/locale/progressDialog.dtd b/xpfe/components/downloads/locale/progressDialog.dtd
index 733faf736..733faf736 100644
--- a/xptoolkit/components/downloads/locale/progressDialog.dtd
+++ b/xpfe/components/downloads/locale/progressDialog.dtd
diff --git a/xptoolkit/components/downloads/moz.build b/xpfe/components/downloads/moz.build
index 4ff9c1b1c..20d06f2dc 100644
--- a/xptoolkit/components/downloads/moz.build
+++ b/xpfe/components/downloads/moz.build
@@ -4,15 +4,15 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
- 'public/nsISuiteDownloadManagerUI.idl',
+ 'public/nsISuiteDownloadManagerUI.idl',
]
XPIDL_MODULE = 'navigatorcompsbase'
EXTRA_COMPONENTS += [
- 'nsSuiteDownloadManager.manifest',
- 'src/nsDownloadsStartup.js',
- 'src/nsSuiteDownloadManagerUI.js',
+ 'nsSuiteDownloadManager.manifest',
+ 'src/nsDownloadsStartup.js',
+ 'src/nsSuiteDownloadManagerUI.js',
]
JS_PREFERENCE_PP_FILES += ['download-prefs.js']
diff --git a/xptoolkit/components/downloads/nsSuiteDownloadManager.manifest b/xpfe/components/downloads/nsSuiteDownloadManager.manifest
index 1c7f22eee..1c7f22eee 100644
--- a/xptoolkit/components/downloads/nsSuiteDownloadManager.manifest
+++ b/xpfe/components/downloads/nsSuiteDownloadManager.manifest
diff --git a/xptoolkit/components/downloads/public/nsISuiteDownloadManagerUI.idl b/xpfe/components/downloads/public/nsISuiteDownloadManagerUI.idl
index 6e780c564..6e780c564 100644
--- a/xptoolkit/components/downloads/public/nsISuiteDownloadManagerUI.idl
+++ b/xpfe/components/downloads/public/nsISuiteDownloadManagerUI.idl
diff --git a/xptoolkit/components/downloads/skin/dl-remove.png b/xpfe/components/downloads/skin/dl-remove.png
index 167ecbb08..167ecbb08 100644
--- a/xptoolkit/components/downloads/skin/dl-remove.png
+++ b/xpfe/components/downloads/skin/dl-remove.png
Binary files differ
diff --git a/xptoolkit/components/downloads/skin/downloadButtons.png b/xpfe/components/downloads/skin/downloadButtons.png
index 4fe7963ab..4fe7963ab 100644
--- a/xptoolkit/components/downloads/skin/downloadButtons.png
+++ b/xpfe/components/downloads/skin/downloadButtons.png
Binary files differ
diff --git a/xptoolkit/components/downloads/skin/downloadmanager.css b/xpfe/components/downloads/skin/downloadmanager.css
index db3e1e2a8..db3e1e2a8 100644
--- a/xptoolkit/components/downloads/skin/downloadmanager.css
+++ b/xpfe/components/downloads/skin/downloadmanager.css
diff --git a/xptoolkit/components/downloads/skin/mac/downloadButtons.png b/xpfe/components/downloads/skin/mac/downloadButtons.png
index 6f3c7c985..6f3c7c985 100644
--- a/xptoolkit/components/downloads/skin/mac/downloadButtons.png
+++ b/xpfe/components/downloads/skin/mac/downloadButtons.png
Binary files differ
diff --git a/xptoolkit/components/downloads/skin/mac/downloadmanager.css b/xpfe/components/downloads/skin/mac/downloadmanager.css
index 36b2399b9..36b2399b9 100644
--- a/xptoolkit/components/downloads/skin/mac/downloadmanager.css
+++ b/xpfe/components/downloads/skin/mac/downloadmanager.css
diff --git a/xptoolkit/components/downloads/skin/mac/progressBg.png b/xpfe/components/downloads/skin/mac/progressBg.png
index 0586429da..0586429da 100644
--- a/xptoolkit/components/downloads/skin/mac/progressBg.png
+++ b/xpfe/components/downloads/skin/mac/progressBg.png
Binary files differ
diff --git a/xptoolkit/components/downloads/src/nsDownloadsStartup.js b/xpfe/components/downloads/src/nsDownloadsStartup.js
index fd09cb1b2..fd09cb1b2 100644
--- a/xptoolkit/components/downloads/src/nsDownloadsStartup.js
+++ b/xpfe/components/downloads/src/nsDownloadsStartup.js
diff --git a/xptoolkit/components/downloads/src/nsSuiteDownloadManagerUI.js b/xpfe/components/downloads/src/nsSuiteDownloadManagerUI.js
index d01f2e0e4..d01f2e0e4 100644
--- a/xptoolkit/components/downloads/src/nsSuiteDownloadManagerUI.js
+++ b/xpfe/components/downloads/src/nsSuiteDownloadManagerUI.js
diff --git a/xptoolkit/components/eula/content/eula.js b/xpfe/components/eula/content/eula.js
index fe11d0971..fe11d0971 100644
--- a/xptoolkit/components/eula/content/eula.js
+++ b/xpfe/components/eula/content/eula.js
diff --git a/xptoolkit/components/eula/content/eula.xul b/xpfe/components/eula/content/eula.xul
index a7ee23148..a7ee23148 100644
--- a/xptoolkit/components/eula/content/eula.xul
+++ b/xpfe/components/eula/content/eula.xul
diff --git a/xptoolkit/components/eula/jar.mn b/xpfe/components/eula/jar.mn
index f04ee8e27..f04ee8e27 100644
--- a/xptoolkit/components/eula/jar.mn
+++ b/xpfe/components/eula/jar.mn
diff --git a/xptoolkit/components/eula/locale/eula.dtd b/xpfe/components/eula/locale/eula.dtd
index e764bb726..e764bb726 100644
--- a/xptoolkit/components/eula/locale/eula.dtd
+++ b/xpfe/components/eula/locale/eula.dtd
diff --git a/xptoolkit/components/eula/moz.build b/xpfe/components/eula/moz.build
index 697e0cda1..697e0cda1 100644
--- a/xptoolkit/components/eula/moz.build
+++ b/xpfe/components/eula/moz.build
diff --git a/xptoolkit/components/eula/skin/eula.css b/xpfe/components/eula/skin/eula.css
index 5a308d930..5a308d930 100644
--- a/xptoolkit/components/eula/skin/eula.css
+++ b/xpfe/components/eula/skin/eula.css
diff --git a/xptoolkit/components/moz.build b/xpfe/components/moz.build
index db3e77c04..2ba4b5fe1 100644
--- a/xptoolkit/components/moz.build
+++ b/xpfe/components/moz.build
@@ -4,15 +4,16 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [
- 'eula',
- 'profile',
+ 'eula',
+ 'profile',
]
if CONFIG['BINOC_NAVIGATOR']:
- DIRS += [
- 'devtools',
- 'preferences',
- ]
+ DIRS += [
+ 'autocomplete',
+ 'devtools',
+ 'preferences',
+ ]
if CONFIG['BINOC_DOWNLOADS']:
- DIRS += ['downloads'] \ No newline at end of file
+ DIRS += ['downloads'] \ No newline at end of file
diff --git a/xptoolkit/components/preferences/content/pref-advanced.xul b/xpfe/components/preferences/content/pref-advanced.xul
index faae8b693..faae8b693 100644
--- a/xptoolkit/components/preferences/content/pref-advanced.xul
+++ b/xpfe/components/preferences/content/pref-advanced.xul
diff --git a/xptoolkit/components/preferences/content/pref-applicationManager.js b/xpfe/components/preferences/content/pref-applicationManager.js
index 5a8e5e61a..5a8e5e61a 100644
--- a/xptoolkit/components/preferences/content/pref-applicationManager.js
+++ b/xpfe/components/preferences/content/pref-applicationManager.js
diff --git a/xptoolkit/components/preferences/content/pref-applicationManager.xul b/xpfe/components/preferences/content/pref-applicationManager.xul
index 503c64176..503c64176 100644
--- a/xptoolkit/components/preferences/content/pref-applicationManager.xul
+++ b/xpfe/components/preferences/content/pref-applicationManager.xul
diff --git a/xptoolkit/components/preferences/content/pref-applications.js b/xpfe/components/preferences/content/pref-applications.js
index 0305d1337..0305d1337 100644
--- a/xptoolkit/components/preferences/content/pref-applications.js
+++ b/xpfe/components/preferences/content/pref-applications.js
diff --git a/xptoolkit/components/preferences/content/pref-applications.xul b/xpfe/components/preferences/content/pref-applications.xul
index 73d583801..73d583801 100644
--- a/xptoolkit/components/preferences/content/pref-applications.xul
+++ b/xpfe/components/preferences/content/pref-applications.xul
diff --git a/xptoolkit/components/preferences/content/pref-certs.js b/xpfe/components/preferences/content/pref-certs.js
index a630f0aa9..a630f0aa9 100644
--- a/xptoolkit/components/preferences/content/pref-certs.js
+++ b/xpfe/components/preferences/content/pref-certs.js
diff --git a/xptoolkit/components/preferences/content/pref-certs.xul b/xpfe/components/preferences/content/pref-certs.xul
index 76b507d4f..76b507d4f 100644
--- a/xptoolkit/components/preferences/content/pref-certs.xul
+++ b/xpfe/components/preferences/content/pref-certs.xul
diff --git a/xptoolkit/components/preferences/content/pref-download.js b/xpfe/components/preferences/content/pref-download.js
index d09b8c4c3..d09b8c4c3 100644
--- a/xptoolkit/components/preferences/content/pref-download.js
+++ b/xpfe/components/preferences/content/pref-download.js
diff --git a/xptoolkit/components/preferences/content/pref-download.xul b/xpfe/components/preferences/content/pref-download.xul
index 246d0d72a..246d0d72a 100644
--- a/xptoolkit/components/preferences/content/pref-download.xul
+++ b/xpfe/components/preferences/content/pref-download.xul
diff --git a/xptoolkit/components/preferences/content/pref-http.js b/xpfe/components/preferences/content/pref-http.js
index d65449038..d65449038 100644
--- a/xptoolkit/components/preferences/content/pref-http.js
+++ b/xpfe/components/preferences/content/pref-http.js
diff --git a/xptoolkit/components/preferences/content/pref-http.xul b/xpfe/components/preferences/content/pref-http.xul
index 5b4f869b5..5b4f869b5 100644
--- a/xptoolkit/components/preferences/content/pref-http.xul
+++ b/xpfe/components/preferences/content/pref-http.xul
diff --git a/xptoolkit/components/preferences/content/pref-masterpass.js b/xpfe/components/preferences/content/pref-masterpass.js
index 921bf16fb..921bf16fb 100644
--- a/xptoolkit/components/preferences/content/pref-masterpass.js
+++ b/xpfe/components/preferences/content/pref-masterpass.js
diff --git a/xptoolkit/components/preferences/content/pref-masterpass.xul b/xpfe/components/preferences/content/pref-masterpass.xul
index 18e07c115..18e07c115 100644
--- a/xptoolkit/components/preferences/content/pref-masterpass.xul
+++ b/xpfe/components/preferences/content/pref-masterpass.xul
diff --git a/xptoolkit/components/preferences/content/pref-proxies-advanced.xul b/xpfe/components/preferences/content/pref-proxies-advanced.xul
index f042ffe4d..f042ffe4d 100644
--- a/xptoolkit/components/preferences/content/pref-proxies-advanced.xul
+++ b/xpfe/components/preferences/content/pref-proxies-advanced.xul
diff --git a/xptoolkit/components/preferences/content/pref-proxies.js b/xpfe/components/preferences/content/pref-proxies.js
index b31e64f34..b31e64f34 100644
--- a/xptoolkit/components/preferences/content/pref-proxies.js
+++ b/xpfe/components/preferences/content/pref-proxies.js
diff --git a/xptoolkit/components/preferences/content/pref-proxies.xul b/xpfe/components/preferences/content/pref-proxies.xul
index acd1a1f05..acd1a1f05 100644
--- a/xptoolkit/components/preferences/content/pref-proxies.xul
+++ b/xpfe/components/preferences/content/pref-proxies.xul
diff --git a/xptoolkit/components/preferences/content/pref-smartupdate.js b/xpfe/components/preferences/content/pref-smartupdate.js
index 740048ac0..740048ac0 100644
--- a/xptoolkit/components/preferences/content/pref-smartupdate.js
+++ b/xpfe/components/preferences/content/pref-smartupdate.js
diff --git a/xptoolkit/components/preferences/content/pref-smartupdate.xul b/xpfe/components/preferences/content/pref-smartupdate.xul
index a6d3fcb8e..a6d3fcb8e 100644
--- a/xptoolkit/components/preferences/content/pref-smartupdate.xul
+++ b/xpfe/components/preferences/content/pref-smartupdate.xul
diff --git a/xptoolkit/components/preferences/content/pref-ssl.js b/xpfe/components/preferences/content/pref-ssl.js
index 1e807f740..1e807f740 100644
--- a/xptoolkit/components/preferences/content/pref-ssl.js
+++ b/xpfe/components/preferences/content/pref-ssl.js
diff --git a/xptoolkit/components/preferences/content/pref-ssl.xul b/xpfe/components/preferences/content/pref-ssl.xul
index aa4cbbf49..aa4cbbf49 100644
--- a/xptoolkit/components/preferences/content/pref-ssl.xul
+++ b/xpfe/components/preferences/content/pref-ssl.xul
diff --git a/xptoolkit/components/preferences/content/preferences.js b/xpfe/components/preferences/content/preferences.js
index 511d3c039..511d3c039 100644
--- a/xptoolkit/components/preferences/content/preferences.js
+++ b/xpfe/components/preferences/content/preferences.js
diff --git a/xptoolkit/components/preferences/content/preferences.xul b/xpfe/components/preferences/content/preferences.xul
index 82ff62de9..82ff62de9 100644
--- a/xptoolkit/components/preferences/content/preferences.xul
+++ b/xpfe/components/preferences/content/preferences.xul
diff --git a/xptoolkit/components/preferences/content/prefpanels.css b/xpfe/components/preferences/content/prefpanels.css
index af78b1b10..af78b1b10 100644
--- a/xptoolkit/components/preferences/content/prefpanels.css
+++ b/xpfe/components/preferences/content/prefpanels.css
diff --git a/xptoolkit/components/preferences/content/prefpanels.xml b/xpfe/components/preferences/content/prefpanels.xml
index 347eac975..347eac975 100644
--- a/xptoolkit/components/preferences/content/prefpanels.xml
+++ b/xpfe/components/preferences/content/prefpanels.xml
diff --git a/xptoolkit/components/preferences/content/prefwindow.xml b/xpfe/components/preferences/content/prefwindow.xml
index dee0a3152..dee0a3152 100644
--- a/xptoolkit/components/preferences/content/prefwindow.xml
+++ b/xpfe/components/preferences/content/prefwindow.xml
diff --git a/xptoolkit/components/preferences/jar.mn b/xpfe/components/preferences/jar.mn
index 9b1002278..9b1002278 100644
--- a/xptoolkit/components/preferences/jar.mn
+++ b/xpfe/components/preferences/jar.mn
diff --git a/xptoolkit/components/preferences/locale/pref-advanced.dtd b/xpfe/components/preferences/locale/pref-advanced.dtd
index 79e8fb92d..79e8fb92d 100644
--- a/xptoolkit/components/preferences/locale/pref-advanced.dtd
+++ b/xpfe/components/preferences/locale/pref-advanced.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-applicationManager.dtd b/xpfe/components/preferences/locale/pref-applicationManager.dtd
index 86883d0e3..86883d0e3 100644
--- a/xptoolkit/components/preferences/locale/pref-applicationManager.dtd
+++ b/xpfe/components/preferences/locale/pref-applicationManager.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-applicationManager.properties b/xpfe/components/preferences/locale/pref-applicationManager.properties
index 0d35bd49f..0d35bd49f 100644
--- a/xptoolkit/components/preferences/locale/pref-applicationManager.properties
+++ b/xpfe/components/preferences/locale/pref-applicationManager.properties
diff --git a/xptoolkit/components/preferences/locale/pref-applications.dtd b/xpfe/components/preferences/locale/pref-applications.dtd
index ca9828f71..ca9828f71 100644
--- a/xptoolkit/components/preferences/locale/pref-applications.dtd
+++ b/xpfe/components/preferences/locale/pref-applications.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-applications.properties b/xpfe/components/preferences/locale/pref-applications.properties
index 48098c6bb..48098c6bb 100644
--- a/xptoolkit/components/preferences/locale/pref-applications.properties
+++ b/xpfe/components/preferences/locale/pref-applications.properties
diff --git a/xptoolkit/components/preferences/locale/pref-certs.dtd b/xpfe/components/preferences/locale/pref-certs.dtd
index a29ee665a..a29ee665a 100644
--- a/xptoolkit/components/preferences/locale/pref-certs.dtd
+++ b/xpfe/components/preferences/locale/pref-certs.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-download.dtd b/xpfe/components/preferences/locale/pref-download.dtd
index bb79a45cc..bb79a45cc 100644
--- a/xptoolkit/components/preferences/locale/pref-download.dtd
+++ b/xpfe/components/preferences/locale/pref-download.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-http.dtd b/xpfe/components/preferences/locale/pref-http.dtd
index e51ddd541..e51ddd541 100644
--- a/xptoolkit/components/preferences/locale/pref-http.dtd
+++ b/xpfe/components/preferences/locale/pref-http.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-masterpass.dtd b/xpfe/components/preferences/locale/pref-masterpass.dtd
index de71c1c91..de71c1c91 100644
--- a/xptoolkit/components/preferences/locale/pref-masterpass.dtd
+++ b/xpfe/components/preferences/locale/pref-masterpass.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-proxies-advanced.dtd b/xpfe/components/preferences/locale/pref-proxies-advanced.dtd
index 319aacb25..319aacb25 100644
--- a/xptoolkit/components/preferences/locale/pref-proxies-advanced.dtd
+++ b/xpfe/components/preferences/locale/pref-proxies-advanced.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-proxies.dtd b/xpfe/components/preferences/locale/pref-proxies.dtd
index 01baaefd7..01baaefd7 100644
--- a/xptoolkit/components/preferences/locale/pref-proxies.dtd
+++ b/xpfe/components/preferences/locale/pref-proxies.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-smartupdate.dtd b/xpfe/components/preferences/locale/pref-smartupdate.dtd
index 22845003c..22845003c 100644
--- a/xptoolkit/components/preferences/locale/pref-smartupdate.dtd
+++ b/xpfe/components/preferences/locale/pref-smartupdate.dtd
diff --git a/xptoolkit/components/preferences/locale/pref-ssl.dtd b/xpfe/components/preferences/locale/pref-ssl.dtd
index e33c42878..e33c42878 100644
--- a/xptoolkit/components/preferences/locale/pref-ssl.dtd
+++ b/xpfe/components/preferences/locale/pref-ssl.dtd
diff --git a/xptoolkit/components/preferences/locale/preferences.dtd b/xpfe/components/preferences/locale/preferences.dtd
index a76f4e1f4..a76f4e1f4 100644
--- a/xptoolkit/components/preferences/locale/preferences.dtd
+++ b/xpfe/components/preferences/locale/preferences.dtd
diff --git a/xptoolkit/components/preferences/locale/prefutilities.dtd b/xpfe/components/preferences/locale/prefutilities.dtd
index 9c6f2b852..9c6f2b852 100644
--- a/xptoolkit/components/preferences/locale/prefutilities.dtd
+++ b/xpfe/components/preferences/locale/prefutilities.dtd
diff --git a/xptoolkit/components/preferences/locale/prefutilities.properties b/xpfe/components/preferences/locale/prefutilities.properties
index c56282e02..c56282e02 100644
--- a/xptoolkit/components/preferences/locale/prefutilities.properties
+++ b/xpfe/components/preferences/locale/prefutilities.properties
diff --git a/editor/ui/locales/moz.build b/xpfe/components/preferences/moz.build
index e0eb66aac..e0eb66aac 100644
--- a/editor/ui/locales/moz.build
+++ b/xpfe/components/preferences/moz.build
diff --git a/xptoolkit/components/preferences/skin/preferences.css b/xpfe/components/preferences/skin/preferences.css
index 4b039b4bd..4b039b4bd 100644
--- a/xptoolkit/components/preferences/skin/preferences.css
+++ b/xpfe/components/preferences/skin/preferences.css
diff --git a/xptoolkit/components/preferences/skin/prefpanels.css b/xpfe/components/preferences/skin/prefpanels.css
index 880e47cd0..880e47cd0 100644
--- a/xptoolkit/components/preferences/skin/prefpanels.css
+++ b/xpfe/components/preferences/skin/prefpanels.css
diff --git a/xptoolkit/components/profile/content/profileSelection.js b/xpfe/components/profile/content/profileSelection.js
index 2af63ccb1..2af63ccb1 100644
--- a/xptoolkit/components/profile/content/profileSelection.js
+++ b/xpfe/components/profile/content/profileSelection.js
diff --git a/xptoolkit/components/profile/content/profileSelection.xul b/xpfe/components/profile/content/profileSelection.xul
index 3fa211b85..3fa211b85 100644
--- a/xptoolkit/components/profile/content/profileSelection.xul
+++ b/xpfe/components/profile/content/profileSelection.xul
diff --git a/xptoolkit/components/profile/jar.mn b/xpfe/components/profile/jar.mn
index 590d7a685..590d7a685 100644
--- a/xptoolkit/components/profile/jar.mn
+++ b/xpfe/components/profile/jar.mn
diff --git a/xptoolkit/components/profile/locale/profileSelection.dtd b/xpfe/components/profile/locale/profileSelection.dtd
index 858292f8d..858292f8d 100644
--- a/xptoolkit/components/profile/locale/profileSelection.dtd
+++ b/xpfe/components/profile/locale/profileSelection.dtd
diff --git a/xptoolkit/components/profile/locale/profileSelection.properties b/xpfe/components/profile/locale/profileSelection.properties
index 5b5ad1a8a..5b5ad1a8a 100644
--- a/xptoolkit/components/profile/locale/profileSelection.properties
+++ b/xpfe/components/profile/locale/profileSelection.properties
diff --git a/xptoolkit/components/profile/moz.build b/xpfe/components/profile/moz.build
index 697e0cda1..697e0cda1 100644
--- a/xptoolkit/components/profile/moz.build
+++ b/xpfe/components/profile/moz.build
diff --git a/xptoolkit/components/profile/skin/migrate.gif b/xpfe/components/profile/skin/migrate.gif
index 5b4380995..5b4380995 100644
--- a/xptoolkit/components/profile/skin/migrate.gif
+++ b/xpfe/components/profile/skin/migrate.gif
Binary files differ
diff --git a/xptoolkit/components/profile/skin/profile.css b/xpfe/components/profile/skin/profile.css
index 1e7f3c37c..1e7f3c37c 100644
--- a/xptoolkit/components/profile/skin/profile.css
+++ b/xpfe/components/profile/skin/profile.css
diff --git a/xptoolkit/components/profile/skin/profileManager.css b/xpfe/components/profile/skin/profileManager.css
index 4fd88568a..4fd88568a 100644
--- a/xptoolkit/components/profile/skin/profileManager.css
+++ b/xpfe/components/profile/skin/profileManager.css
diff --git a/xptoolkit/components/profile/skin/profileicon-large.gif b/xpfe/components/profile/skin/profileicon-large.gif
index 749bf955b..749bf955b 100644
--- a/xptoolkit/components/profile/skin/profileicon-large.gif
+++ b/xpfe/components/profile/skin/profileicon-large.gif
Binary files differ
diff --git a/xptoolkit/content/communicator.css b/xpfe/content/communicator.css
index a934b0561..a934b0561 100644
--- a/xptoolkit/content/communicator.css
+++ b/xpfe/content/communicator.css
diff --git a/xptoolkit/content/jar.mn b/xpfe/content/jar.mn
index 977eb7a7c..977eb7a7c 100644
--- a/xptoolkit/content/jar.mn
+++ b/xpfe/content/jar.mn
diff --git a/xptoolkit/content/moz.build b/xpfe/content/moz.build
index 697e0cda1..697e0cda1 100644
--- a/xptoolkit/content/moz.build
+++ b/xpfe/content/moz.build
diff --git a/xptoolkit/modules/Communicator.jsm b/xpfe/modules/Communicator.jsm
index f9f4731ce..f9f4731ce 100644
--- a/xptoolkit/modules/Communicator.jsm
+++ b/xpfe/modules/Communicator.jsm
diff --git a/xptoolkit/modules/moz.build b/xpfe/modules/moz.build
index 22751cd65..22751cd65 100644
--- a/xptoolkit/modules/moz.build
+++ b/xpfe/modules/moz.build
diff --git a/xptoolkit/moz.build b/xpfe/moz.build
index 8738ab1c4..846936e5d 100644
--- a/xptoolkit/moz.build
+++ b/xpfe/moz.build
@@ -4,12 +4,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [
- 'components',
- 'modules',
- 'searchplugins'
+ 'components',
+ 'modules',
+ 'searchplugins'
]
if CONFIG['BINOC_NAVIGATOR']:
- DIRS += [
- 'content',
- ] \ No newline at end of file
+ DIRS += ['content'] \ No newline at end of file
diff --git a/xptoolkit/searchplugins/duckduckgo-palemoon.xml b/xpfe/searchplugins/duckduckgo-palemoon.xml
index 57395e32d..57395e32d 100644
--- a/xptoolkit/searchplugins/duckduckgo-palemoon.xml
+++ b/xpfe/searchplugins/duckduckgo-palemoon.xml
diff --git a/xptoolkit/searchplugins/ecosia.xml b/xpfe/searchplugins/ecosia.xml
index 04c8d229b..04c8d229b 100644
--- a/xptoolkit/searchplugins/ecosia.xml
+++ b/xpfe/searchplugins/ecosia.xml
diff --git a/xptoolkit/searchplugins/ekoru.xml b/xpfe/searchplugins/ekoru.xml
index 84f75bddd..84f75bddd 100644
--- a/xptoolkit/searchplugins/ekoru.xml
+++ b/xpfe/searchplugins/ekoru.xml
diff --git a/xptoolkit/searchplugins/moz.build b/xpfe/searchplugins/moz.build
index 562edb037..562edb037 100644
--- a/xptoolkit/searchplugins/moz.build
+++ b/xpfe/searchplugins/moz.build
diff --git a/xptoolkit/searchplugins/wikipedia.xml b/xpfe/searchplugins/wikipedia.xml
index 6bfb0ccd8..6bfb0ccd8 100644
--- a/xptoolkit/searchplugins/wikipedia.xml
+++ b/xpfe/searchplugins/wikipedia.xml
diff --git a/xptoolkit/xptoolkit.mozbuild b/xpfe/xpfe.mozbuild
index 39ddf5e95..a636ac42d 100644
--- a/xptoolkit/xptoolkit.mozbuild
+++ b/xpfe/xpfe.mozbuild
@@ -5,14 +5,11 @@
include('/system/toolkit.mozbuild')
-if CONFIG['MOZ_COMPOSER']:
- DIRS += ['/editor/ui']
-
if CONFIG['MOZ_CALENDAR']:
- DIRS += [
- '/calendar/libical',
- '/calendar/lightning',
- '/calendar/timezones'
- ]
+ DIRS += [
+ '/calendar/libical',
+ '/calendar/lightning',
+ '/calendar/timezones'
+ ]
-DIRS += ['/xptoolkit']
+DIRS += ['/xpfe']